@softistx/pulsarix-widget 0.8.5 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -48
- package/dist/chunks/{abnfDiagram-XWFEHMT6.b9yk4x5x.js → abnfDiagram-XWFEHMT6.rxx9wyp3.js} +1 -1
- package/dist/chunks/architecture-WOLXFQ4H.hwrxbct0.js +1 -0
- package/dist/chunks/architectureDiagram-CSQXQB3N.mrm0pgc0.js +36 -0
- package/dist/chunks/{blockDiagram-BEDRHYPZ.bb08b9nt.js → blockDiagram-BEDRHYPZ.f4dfpk7e.js} +11 -11
- package/dist/chunks/{c4Diagram-M2UUVUY5.px0epccd.js → c4Diagram-M2UUVUY5.rz43j1my.js} +3 -3
- package/dist/chunks/{chat-markdown-CrbWbK1O.k4nmgyey.js → chat-markdown-BSu4FB_l.xgn4yj83.js} +29 -29
- package/dist/chunks/{classDiagram-v2-KXABOMEV.f02387t9.js → classDiagram-v2-KXABOMEV.m96cfcad.js} +8 -8
- package/dist/chunks/cose-bilkent-JH36ORCC.zz2rwyw6.js +1 -0
- package/dist/chunks/cynefin-EF2NZ3EQ.y29bn1cz.js +1 -0
- package/dist/chunks/{cynefinDiagram-NJNITYFG.zt7gprt1.js → cynefinDiagram-NJNITYFG.az2k68wq.js} +1 -1
- package/dist/chunks/{dagre-KIHZ2IZ3.702bqbr9.js → dagre-KIHZ2IZ3.mgwg8bc4.js} +2 -2
- package/dist/chunks/{diagram-7YQZDPLS.m7vf21j6.js → diagram-7YQZDPLS.x8fg6705.js} +2 -2
- package/dist/chunks/{diagram-QBROCOUO.33e5hv7x.js → diagram-QBROCOUO.db60dsss.js} +24 -24
- package/dist/chunks/{diagram-RJJCUUZO.94k74bz7.js → diagram-RJJCUUZO.a7e9w297.js} +4 -4
- package/dist/chunks/{diagram-WERXNKYE.7fe849z6.js → diagram-WERXNKYE.a04f53kd.js} +2 -2
- package/dist/chunks/diagram-YHHI257C.v19jhmrh.js +3 -0
- package/dist/chunks/{diagram-YR4HJLHV.310x2we2.js → diagram-YR4HJLHV.c5e87gmw.js} +1 -1
- package/dist/chunks/{ebnfDiagram-N527522P.a4crteq1.js → ebnfDiagram-N527522P.bjrxfgze.js} +1 -1
- package/dist/chunks/editor-shortcuts-dialog-Cz3T8435.5ve4nsaw.js +1 -0
- package/dist/chunks/editor.yak1qktd.js +4 -0
- package/dist/chunks/{elk-O5DQBFGD.dx61etan.js → elk-O5DQBFGD.1ydp0b7a.js} +13 -13
- package/dist/chunks/emoji-picker-00Bw2c2b.gzznrrz5.js +4 -0
- package/dist/chunks/{erDiagram-K3K3BIDK.qzqv67zm.js → erDiagram-K3K3BIDK.g171ckq1.js} +8 -8
- package/dist/chunks/eventmodeling-K75KTNOO.46qfxqj7.js +1 -0
- package/dist/chunks/{flow-diagram-AiM6FiIm.73jr19pb.js → flow-diagram-DGZOc1z1.3gbgbm5m.js} +6 -6
- package/dist/chunks/flowDiagram-Z6JWZHQI.f0eaj70g.js +1 -0
- package/dist/chunks/{ganttDiagram-3PRQTZWP.xngzb32h.js → ganttDiagram-3PRQTZWP.3b9dh4nr.js} +5 -5
- package/dist/chunks/gitGraph-VSP46ZUC.swware7n.js +1 -0
- package/dist/chunks/{gitGraphDiagram-VXDFKS5L.1sm36z2q.js → gitGraphDiagram-VXDFKS5L.thyp7vsd.js} +22 -22
- package/dist/chunks/{grid-E2QIVN74.76pgtn2n.js → grid-E2QIVN74.entqjpa3.js} +1 -1
- package/dist/chunks/illustration-BcaGDjvB.1q9xtmyq.js +1 -0
- package/dist/chunks/{index.r0p3fm9f.js → index.0g1t1pjx.js} +1 -1
- package/dist/chunks/{index.rfyzb2yv.js → index.35d4zbh8.js} +4 -4
- package/dist/chunks/index.5fcbba6e.js +2 -0
- package/dist/chunks/{index.7gxz6d1f.js → index.6pzexww5.js} +10 -10
- package/dist/chunks/{index.zm5x44tn.js → index.8vaktk8x.js} +1 -1
- package/dist/chunks/{index.dnnzjw18.js → index.8zg579vd.js} +2 -2
- package/dist/chunks/{index.0k4tbjhp.js → index.9n1y396a.js} +1 -1
- package/dist/chunks/{index.8f3x951p.js → index.a3njhfdd.js} +2 -2
- package/dist/chunks/{index.a6rz456z.js → index.cw97ff3b.js} +2 -2
- package/dist/chunks/{index.fv9af3wd.js → index.d57x7pg9.js} +6 -6
- package/dist/chunks/{index.fbeztcp3.js → index.g2ba0pke.js} +2 -2
- package/dist/chunks/index.h1xzvasx.js +2 -0
- package/dist/chunks/{index.hvdnkr5m.js → index.qr6a02kx.js} +2 -2
- package/dist/chunks/index.rkgfxpm3.js +44 -0
- package/dist/chunks/index.sw8gvntb.js +2 -0
- package/dist/chunks/{index.0e4s8r4m.js → index.v02zf4zg.js} +2 -2
- package/dist/chunks/{index.t34t6kpe.js → index.w1516g8q.js} +35 -35
- package/dist/chunks/{index.9bf5qrah.js → index.w4emtsqw.js} +2 -2
- package/dist/chunks/{index.nsckd1vt.js → index.yhmqh641.js} +2 -2
- package/dist/chunks/{index.1d7qpsyx.js → index.zkngte5k.js} +2 -2
- package/dist/chunks/{index.a1bxkgd3.js → index.zkx4ryzt.js} +104 -104
- package/dist/chunks/info-OHQRW6UA.1er9b42t.js +1 -0
- package/dist/chunks/{infoDiagram-EZ3ZOAHP.pfd0fjwn.js → infoDiagram-EZ3ZOAHP.833fvq8n.js} +2 -2
- package/dist/chunks/{ishikawaDiagram-S3EKX5GW.h5kjez1x.js → ishikawaDiagram-S3EKX5GW.q3evaw24.js} +5 -5
- package/dist/chunks/{journeyDiagram-POQNLL5X.55cqc9p0.js → journeyDiagram-POQNLL5X.9werrmpy.js} +5 -5
- package/dist/chunks/{kanban-definition-BH5XI6FM.pkdvda4y.js → kanban-definition-BH5XI6FM.f3ssda0m.js} +7 -7
- package/dist/chunks/markup-color-chrome-ykGNUl8y.pcgw4znz.js +1 -0
- package/dist/chunks/markup-custom-color-MM-HnrqY.sygnt3gs.js +1 -0
- package/dist/chunks/mention-list-6cR5VSPa.x0x55xzp.js +1 -0
- package/dist/chunks/{mermaid.core.j7s05j63.js → mermaid.core.5cqab0cw.js} +7 -7
- package/dist/chunks/{mindmap-definition-WVAN44T4.x3jbxvft.js → mindmap-definition-WVAN44T4.pjjxgse0.js} +6 -6
- package/dist/chunks/packet-JDAUHWVQ.t5jwb2rb.js +1 -0
- package/dist/chunks/panel.2vwd6k3h.js +7 -0
- package/dist/chunks/{pegDiagram-D4NLKWP3.xq15gqy9.js → pegDiagram-D4NLKWP3.mdacgbzb.js} +1 -1
- package/dist/chunks/pie-XZMESJXO.pe88zesw.js +1 -0
- package/dist/chunks/pieDiagram-36ENHN4W.fb0d6a9w.js +39 -0
- package/dist/chunks/plated-illustration-pTqcYOQg.6b9fm4a7.js +1 -0
- package/dist/chunks/{quadrantDiagram-ZQUDMS73.k28g8jpn.js → quadrantDiagram-ZQUDMS73.m5cgqatg.js} +4 -4
- package/dist/chunks/radar-ABXABTNO.jtbddwfq.js +1 -0
- package/dist/chunks/railroad-I3PHUGI6.kvyt0f9s.js +1 -0
- package/dist/chunks/railroad-abnf-LNEFI6M7.ybx0vspg.js +1 -0
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.yx4c4enn.js +1 -0
- package/dist/chunks/railroad-peg-JR7BVNR7.mb71eyqe.js +1 -0
- package/dist/chunks/{railroadDiagram-JIZHGYPL.e7p2vqgg.js → railroadDiagram-JIZHGYPL.w2e1k61e.js} +1 -1
- package/dist/chunks/{render-VIF2ZAQL.w5ytncsg.js → render-VIF2ZAQL.exs2rt60.js} +1 -1
- package/dist/chunks/{requirementDiagram-AXW2TVFA.arekdz02.js → requirementDiagram-AXW2TVFA.mrxb120d.js} +4 -4
- package/dist/chunks/{sankeyDiagram-FBCJTAIF.1d04xcmb.js → sankeyDiagram-FBCJTAIF.csj5n1sg.js} +6 -6
- package/dist/chunks/{sequenceDiagram-3LA2ROMG.j4xywwp1.js → sequenceDiagram-3LA2ROMG.73qx1ab4.js} +11 -11
- package/dist/chunks/{sizeCapture-2Q2CQKSF.862bnf6p.js → sizeCapture-2Q2CQKSF.vfe8maj3.js} +1 -1
- package/dist/chunks/{stateDiagram-v2-ATKHQDJO.xvvtr0y2.js → stateDiagram-v2-ATKHQDJO.h4grfmy4.js} +8 -8
- package/dist/chunks/{swimlanes-YQL5WMAO.dtnjb4xt.js → swimlanes-YQL5WMAO.e2y8jam1.js} +1 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.dtthssd5.js +8 -0
- package/dist/chunks/{timeline-definition-7Z437IG3.zfhqzc4r.js → timeline-definition-7Z437IG3.2zxa6hz5.js} +9 -9
- package/dist/chunks/treeView-D4JQ5SDB.3kgztv30.js +1 -0
- package/dist/chunks/treemap-SAJKECNS.xj47e2ae.js +1 -0
- package/dist/chunks/{usecaseDiagram-RDK6N6HP.ewxnyz4c.js → usecaseDiagram-RDK6N6HP.61cdyktj.js} +57 -57
- package/dist/chunks/{vennDiagram-SHRQU5PJ.wkzf1f00.js → vennDiagram-SHRQU5PJ.4tspw3rs.js} +7 -7
- package/dist/chunks/wardley-7MLQ67FV.pckbr6zr.js +1 -0
- package/dist/chunks/{wardleyDiagram-F3OXNVQS.srjfm4nb.js → wardleyDiagram-F3OXNVQS.q2p8tshx.js} +4 -4
- package/dist/chunks/{xychartDiagram-GDYJKCDI.xfa2vexk.js → xychartDiagram-GDYJKCDI.69desp9j.js} +5 -5
- package/dist/index.js +48 -21
- package/dist/react.js +74 -0
- package/dist/server.js +20 -0
- package/dist/types/config.d.ts +1 -1
- package/dist/types/mount.d.ts +1 -1
- package/dist/types/react.d.ts +27 -0
- package/dist/types/server.d.ts +15 -0
- package/docs/integration.md +109 -36
- package/package.json +20 -5
- package/dist/chunks/architecture-WOLXFQ4H.aft3rkrr.js +0 -1
- package/dist/chunks/architectureDiagram-CSQXQB3N.qz18rz0g.js +0 -36
- package/dist/chunks/cose-bilkent-JH36ORCC.azq9k24r.js +0 -1
- package/dist/chunks/cynefin-EF2NZ3EQ.dk039jny.js +0 -1
- package/dist/chunks/diagram-YHHI257C.qjjjfq7w.js +0 -3
- package/dist/chunks/editor-shortcuts-dialog-B0ppoiza.x3p4h07t.js +0 -1
- package/dist/chunks/editor.arg3zy29.js +0 -4
- package/dist/chunks/emoji-picker-CbvQZ2ZL.nst616hd.js +0 -4
- package/dist/chunks/eventmodeling-K75KTNOO.gmm1bcak.js +0 -1
- package/dist/chunks/flowDiagram-Z6JWZHQI.fzwqg115.js +0 -1
- package/dist/chunks/gitGraph-VSP46ZUC.0m8jykgw.js +0 -1
- package/dist/chunks/illustration-BOW28wq5.bkz28k1x.js +0 -1
- package/dist/chunks/index.32jxrb9b.js +0 -2
- package/dist/chunks/index.7k5v3p25.js +0 -2
- package/dist/chunks/index.e35b4yh5.js +0 -44
- package/dist/chunks/index.wrjdgn4c.js +0 -2
- package/dist/chunks/info-OHQRW6UA.e0a85drn.js +0 -1
- package/dist/chunks/markup-color-chrome-ykGNUl8y.0ds56d6x.js +0 -1
- package/dist/chunks/markup-custom-color-Dgm2hHI7.7darvajx.js +0 -1
- package/dist/chunks/mention-list-CkAUzPBG.mtjgmmzb.js +0 -1
- package/dist/chunks/packet-JDAUHWVQ.52409p3r.js +0 -1
- package/dist/chunks/panel.9tp7gr60.js +0 -7
- package/dist/chunks/pie-XZMESJXO.q5kre8cx.js +0 -1
- package/dist/chunks/pieDiagram-36ENHN4W.8h0wam54.js +0 -39
- package/dist/chunks/plated-illustration-COZYWJ81.xy7ba5mq.js +0 -1
- package/dist/chunks/radar-ABXABTNO.yk872k2n.js +0 -1
- package/dist/chunks/railroad-I3PHUGI6.9wfa6vs3.js +0 -1
- package/dist/chunks/railroad-abnf-LNEFI6M7.70zznk3b.js +0 -1
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.4pvdng0p.js +0 -1
- package/dist/chunks/railroad-peg-JR7BVNR7.ev15ebp6.js +0 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.0q8kd5qn.js +0 -8
- package/dist/chunks/treeView-D4JQ5SDB.3fzswdjp.js +0 -1
- package/dist/chunks/treemap-SAJKECNS.cgh74bhn.js +0 -1
- package/dist/chunks/wardley-7MLQ67FV.6q5tgt0s.js +0 -1
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import{Xn}from"./index.
|
|
2
|
-
`)){if(d!==void 0){let E=l.length-l.trimStart().length;if(l.trim()===""||E>d){h.push(l);continue}d=void 0}let
|
|
3
|
-
`)}e(M1,"stripLineTrailingCommas");var q1=class{constructor(){this.vertexCounter=0,this.config=u(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=L,this.setAccDescription=I,this.setDiagramTitle=
|
|
1
|
+
import{Xn}from"./index.8vaktk8x.js";import{e,n,me,mt,Oe,Lr,y,A,L,R,I,M,P,O,u,Dt,Wr,p,ct,ut,ge,de,fe,Je,F,Ve,aa,Se,Ee}from"./index.zkx4ryzt.js";import{Kt}from"./index.v02zf4zg.js";import{Ye}from"./index.8zg579vd.js";import{Ce}from"./index.5fcbba6e.js";import{pe}from"./index.w4emtsqw.js";var _t={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},U1=new Set([_t.SHAPE_UNSUPPORTED,_t.SHAPE_REMOVED,_t.CONTAINMENT_VIOLATION]),vs=new Set(Object.values(_t).filter((t)=>!U1.has(t))),j1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["lean_right","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),z1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),W1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),Tt="roundedRect";function vt(t){if(!t)return t;return j1.get(t)??t}e(vt,"resolveShapeAlias");function _1(t,r){for(let a of t){if(a.isGroup)continue;if(!a.shape||a.shape==="squareRect"||a.shape==="rect")a.shape=Tt;if(z1.has(a.shape)){let o=`shape "${a.shape}" was removed in v0.8.1, using "${Tt}"`;if(r?.emitError)r.emitError("SHAPE_REMOVED",o,{nodeId:a.id});else n.warn(`agentflow: ${o}`);a.shape=Tt;continue}if(!W1.has(a.shape)){let o=`shape "${a.shape}" is not supported, using "${Tt}"`;if(r?.emitWarning)r.emitWarning("SHAPE_UNSUPPORTED",o,{nodeId:a.id});else n.warn(`agentflow: ${o}`);a.shape=Tt}}}e(_1,"normaliseNodeShapes");var i1=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),F1=i1.size,V1=e((t)=>`af-kind-${t}`,"kindClass"),K1=[...i1.keys()],I1=e((t)=>Math.max(1,t-F1),"containerSlotCount"),L1=e((t,r)=>{let a=F1+t%I1(r);return r>0?a%r:a},"containerSlot");function B1(t,r,a){let o=u().themeVariables?.borderColorArray,d=Array.isArray(o)?o.length:0,h=a.size;for(let l of t??[]){if(l.isGroup||l.shape==="collapsedGroup"){let m=a.get(String(l.id))??h++;l.colorIndex=L1(m,d);continue}let f=r(String(l.id));if(f&&i1.has(f))l.cssClasses=`${l.cssClasses??""} ${V1(f)}`.replace(/\s+/g," ").trim()}}e(B1,"assignColorSlots");var v1="agentflow-",c1=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),H1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),Y1={flow:"flowGroup"};function M1(t){let r=!1,a=!1,o=0,d,h=[];for(let l of t.split(`
|
|
2
|
+
`)){if(d!==void 0){let E=l.length-l.trimStart().length;if(l.trim()===""||E>d){h.push(l);continue}d=void 0}let f=-1;for(let E=0;E<l.length;E++){let S=l[E];if(a){if(S==="\\")E++;else if(S==='"')a=!1}else if(r){if(S==="'")r=!1}else if(S==='"')a=!0;else if(S==="'")r=!0;else if(S==="#"&&(E===0||l[E-1]===" "||l[E-1]==="\t")){f=E;break}else if(S==="["||S==="{")o++;else if(S==="]"||S==="}")o=Math.max(0,o-1)}if(r||a||o>0){h.push(l);continue}let m=f>=0?l.slice(0,f):l,k=f>=0?l.slice(f):"";if(/:\s*[>|][\d+-]*\s*$/.test(m)){d=l.length-l.trimStart().length,h.push(l);continue}h.push(m.replace(/,([\t ]*)$/,"$1")+k)}return h.join(`
|
|
3
|
+
`)}e(M1,"stripLineTrailingCommas");var q1=class{constructor(){this.vertexCounter=0,this.config=u(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=L,this.setAccDescription=I,this.setDiagramTitle=P,this.getAccTitle=R,this.getAccDescription=M,this.getDiagramTitle=O,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.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.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.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{e(this,"AgentFlowDB")}sanitizeText(t){return y.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let r of this.vertices.values())if(r.id===t)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,r,a,o,d,h,l={},f,m){if(!t||t.trim().length===0)return;let k;if(f!==void 0){let C;if(!f.includes(`
|
|
4
4
|
`))C=`{
|
|
5
|
-
`+
|
|
6
|
-
}`;else C=
|
|
7
|
-
`;try{
|
|
8
|
-
`)?M1(
|
|
9
|
-
`,{schema:
|
|
5
|
+
`+f+`
|
|
6
|
+
}`;else C=f+`
|
|
7
|
+
`;try{k=ut(C,{schema:ct})??{}}catch(g){let b=f.includes(`
|
|
8
|
+
`)?M1(f):f;if(b!==f)try{k=ut(b+`
|
|
9
|
+
`,{schema:ct})??{}}catch{this.rethrowMetadataYamlError(g,f,m)}else this.rethrowMetadataYamlError(g,f,m)}k=Xn(k)}let E;if(k&&typeof k.shape==="string"){let C=k;E=C.shape;let g=vt(E);if(g&&g!==E)C.shape=g}let S=this.subGraphLookup.get(t);if(S&&k){S.metadata={...S.metadata,...k};return}let N=this.connectors.get(t);if(N&&k){N.metadata={...N.metadata,...k};return}if(t==="connectors")return;let v=this.edges.find((C)=>C.id===t);if(v){let C=k;if(C?.animate!==void 0)v.animate=C.animate;if(C?.animation!==void 0)v.animation=C.animation;if(C?.curve!==void 0)v.interpolate=C.curve;if(k)v.metadata={...v.metadata,...k};return}let W,V=this.vertices.get(t);if(V===void 0)V={id:t,labelType:"text",domId:v1+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,V);if(this.vertexCounter++,r!==void 0){if(this.config=u(),W=this.sanitizeText(r.text.trim()),V.labelType=r.type,W.startsWith('"')&&W.endsWith('"'))W=W.substring(1,W.length-1);V.text=W}else if(V.text===void 0)V.text=t;if(a!==void 0)V.type=a;if(o!==void 0&&o!==null)o.forEach((C)=>{V.styles.push(C)});if(d!==void 0&&d!==null)d.forEach((C)=>{V.classes.push(C)});if(h!==void 0)V.dir=h;if(V.props===void 0)V.props=l;else if(l!==void 0)Object.assign(V.props,l);if(k){if(V.metadata={...V.metadata,...k},k.shape){let C=E??k.shape;if(typeof C!=="string")throw this.positionedShapeError(`No such shape: ${JSON.stringify(C)}.`,m);if(C!==C.toLowerCase()||C.includes("_"))throw this.positionedShapeError(`No such shape: ${C}. Shape names should be lowercase.`,m);else if(!aa(k.shape))throw this.positionedShapeError(`No such shape: ${k.shape}.`,m);V.type=k?.shape}if(k?.label)V.text=this.sanitizeText(k.label),V.labelType=this.sanitizeNodeLabelType(k?.labelType)}}positionedShapeError(t,r){let a=Error(t);if(!r)return a;let o=r.first_line+this.frontmatterLineOffset;return Object.assign(a,{hash:{text:"",token:null,line:o-1,loc:{first_line:o,last_line:r.last_line+this.frontmatterLineOffset,first_column:r.first_column,last_column:r.last_column},expected:[]}}),a}rethrowMetadataYamlError(t,r,a){let o=t;if(!o||o.name!=="YAMLException"||!o.mark||!a)throw t;let d;try{let h=!r.includes(`
|
|
10
10
|
`),l=h?`{
|
|
11
11
|
`+r+`
|
|
12
12
|
}`:r+`
|
|
13
|
-
`,
|
|
13
|
+
`,f=a.first_line+this.frontmatterLineOffset,m=a.first_column+2,k=e((C,g)=>{if(h)return{line:f,column:m+(C===1?g:0)};return{line:f+C,column:C===0?m+g:g}},"toSource"),E=k(o.mark.line,o.mark.column),S=o.reason??(o.message??"").split(`
|
|
14
14
|
`)[0].replace(/\s*\(\d+:\d+\)\s*$/,""),N=l.split(`
|
|
15
|
-
`),
|
|
15
|
+
`),v=[];if(h)v.push(1);else for(let C=o.mark.line-1;C<=o.mark.line+1;C++){if(C<0||C>=N.length)continue;if(C===N.length-1&&N[C]===""&&C!==o.mark.line)continue;v.push(C)}let W=Math.max(...v.map((C)=>String(k(C,0).line).length)),V=[];for(let C of v){let g=k(C,0).line,b=` ${String(g).padStart(W)} | `;if(V.push(b+N[C].replace(/\t/g,"→")),C===o.mark.line)V.push("-".repeat(b.length+o.mark.column)+"^")}d={message:`${S} (${E.line}:${E.column+1})
|
|
16
16
|
|
|
17
17
|
${V.join(`
|
|
18
|
-
`)}`,markLine:E.line-1,markColumn:E.column,hash:{text:"",token:null,line:E.line-1,loc:{first_line:E.line,last_line:E.line,first_column:E.column,last_column:E.column+1},expected:[]}}}catch{}if(d)o.message=d.message,o.mark.line=d.markLine,o.mark.column=d.markColumn,o.hash=d.hash;throw o}addSingleLink(t,r,a,o){let l={start:t,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};n.info("abc78 Got edge...",l);let
|
|
18
|
+
`)}`,markLine:E.line-1,markColumn:E.column,hash:{text:"",token:null,line:E.line-1,loc:{first_line:E.line,last_line:E.line,first_column:E.column,last_column:E.column+1},expected:[]}}}catch{}if(d)o.message=d.message,o.mark.line=d.markLine,o.mark.column=d.markColumn,o.hash=d.hash;throw o}addSingleLink(t,r,a,o){let l={start:t,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};n.info("abc78 Got edge...",l);let f=a.text;if(f!==void 0){if(l.text=this.sanitizeText(f.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"'))l.text=l.text.substring(1,l.text.length-1);l.labelType=this.sanitizeNodeLabelType(f.type)}if(a!==void 0){if(l.type=a.type,l.stroke=a.stroke,l.length=a.length>10?10:a.length,a.edgeSemantic)l.edgeSemantic=a.edgeSemantic}if(o&&!this.edges.some((m)=>m.id===o))l.id=o,l.isUserDefinedId=!0;else{let m=this.edges.filter((k)=>k.start===l.start&&k.end===l.end);if(m.length===0)l.id=Ve(l.start,l.end,{counter:0,prefix:"L"});else l.id=Ve(l.start,l.end,{counter:m.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))n.info("Pushing edge..."),this.edges.push(l);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
|
19
19
|
|
|
20
20
|
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
21
21
|
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
22
|
-
You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t==="object"&&"id"in t&&typeof t.id==="string"}addLink(t,r,a){let o=this.isLinkData(a)?a.id.replace("@",""):void 0;n.info("addLink",t,r,o);for(let d of t)for(let h of r){let l=d===t[t.length-1],p=h===r[0];if(l&&p)this.addSingleLink(d,h,a,o);else this.addSingleLink(d,h,a,void 0)}}updateLinkInterpolate(t,r){t.forEach((a)=>{if(a==="default"){this.edges.defaultInterpolate=r;return}if(typeof a==="number"&&a>=this.edges.length)throw Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);this.edges[a].interpolate=r})}updateLink(t,r){t.forEach((a)=>{if(typeof a==="number"&&a>=this.edges.length)throw Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(a==="default")this.edges.defaultStyle=r;else if(this.edges[a].style=r,(this.edges[a]?.style?.length??0)>0&&!this.edges[a]?.style?.some((o)=>o?.startsWith("fill")))this.edges[a]?.style?.push("fill:none")})}addClass(t,r){let a=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach((o)=>{let d=this.classes.get(o);if(d===void 0)d={id:o,styles:[],textStyles:[]},this.classes.set(o,d);if(a!==void 0&&a!==null)a.forEach((h)=>{if(/color/.exec(h)){let l=h.replace("fill","bgFill");d.textStyles.push(l)}d.styles.push(h)})})}setDirection(t){if(this.direction=t.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(t,r){for(let a of t.split(",")){let o=this.vertices.get(a);if(o)o.classes.push(r);let d=this.edges.find((l)=>l.id===a);if(d)d.classes.push(r);let h=this.subGraphLookup.get(a);if(h)h.classes.push(r)}}setTooltip(t,r){if(r===void 0)return;r=this.sanitizeText(r);for(let a of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,r)}setClickFun(t,r,a){if(u().securityLevel!=="loose")return;if(r===void 0)return;let o=[];if(typeof a==="string"){o=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let h=0;h<o.length;h++){let l=o[h].trim();if(l.startsWith('"')&&l.endsWith('"'))l=l.substr(1,l.length-2);o[h]=l}}if(o.length===0)o.push(t);let d=this.vertices.get(t);if(d)d.haveCallback=!0,this.funs.push(()=>{let h=this.lookUpDomId(t),l=document.querySelector(`[id="${h}"]`);if(l!==null)l.addEventListener("click",()=>{z.runFunc(r,...o)},!1)})}setLink(t,r,a){t.split(",").forEach((o)=>{let d=this.vertices.get(o);if(d!==void 0)d.link=z.formatUrl(r,this.config),d.linkTarget=a}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,r,a){t.split(",").forEach((o)=>{this.setClickFun(o,r,a)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach((r)=>{r(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(t){return H1.has(t.type)}getTools(){let t=[];for(let r of this.vertices.values())if(this.isToolDefinition(r))t.push(r);return t}getClasses(){return this.classes}setupToolTips(t){let r=Xt();m(t).select("svg").selectAll("g.node").on("mouseover",(d)=>{let h=m(d.currentTarget),l=h.attr("title");if(l===null)return;let p=d.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(h.attr("title")).style("left",window.scrollX+p.left+(p.right-p.left)/2+"px").style("top",window.scrollY+p.bottom+"px"),r.html(Pe.sanitize(l)),h.classed("hover",!0)}).on("mouseout",(d)=>{r.transition().duration(500).style("opacity",0),m(d.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=u(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,A()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,r,a,o){let d=t?.text?.trim(),h=a?.text;if(t===a&&a?.text&&/\s/.exec(a.text))d=void 0;let p=e((_)=>{let W={boolean:{},number:{},string:{}},V=[],C;return{nodeList:_.filter(function(g){let F=typeof g;if(g.stmt&&g.stmt==="dir")return C=g.value,!1;if(g.trim()==="")return!1;if(F in W)return W[F].hasOwnProperty(g)?!1:W[F][g]=!0;else return V.includes(g)?!1:V.push(g)}),dir:C}},"uniq")(r.flat()),{nodeList:k,dir:b}=p,E=u().flowchart??{};if(b=b??(E.inheritDir?this.getDirection()??u().direction??void 0:void 0),this.version==="gen-1")for(let _=0;_<k.length;_++)k[_]=this.lookUpDomId(k[_]);d=d??"subGraph"+this.subCount,h=h||"",h=this.sanitizeText(h),this.subCount=this.subCount+1;let S={id:d,nodes:k.filter((_)=>_!==d&&!this.globalNodes.has(_)),title:h.trim(),classes:[],dir:b,labelType:this.sanitizeNodeLabelType(a?.type),type:o??"flow"};n.info("Adding",S.id,S.nodes,S.dir),S.nodes=this.makeUniq(S,this.subGraphs).nodes;let N=this.getPosForId(d);if(N!==-1){let _=this.subGraphs[N];for(let W of S.nodes)if(!_.nodes.includes(W))_.nodes.push(W);if(S.title)_.title=S.title;if(S.dir)_.dir=S.dir;if(S.type)_.type=S.type;this.subGraphLookup.set(d,_)}else this.subGraphs.push(S),this.subGraphLookup.set(d,S);return d}addGlobal(t){for(let r of t.flat()){if(typeof r!=="string")continue;let a=r.trim();if(a!=="")this.globalNodes.add(a)}for(let r of this.subGraphs)r.nodes=r.nodes.filter((a)=>!this.globalNodes.has(a))}getPosForId(t){for(let[r,a]of this.subGraphs.entries())if(a.id===t)return r;return-1}indexNodes2(t,r){let a=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===t)return{result:!0,count:0};let o=0,d=1;while(o<a.length){let h=this.getPosForId(a[o]);if(h>=0){let l=this.indexNodes2(t,h);if(l.result)return{result:!0,count:d+l.count};else d=d+l.count}o=o+1}return{result:!1,count:d}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}addConnector(t,r){let a=t?.text?.trim();if(!a)return"";let o=r?.text?.trim()??"",d=o.length>0?this.sanitizeText(o):a,h=this.connectors.get(a);if(!h)h={id:a,labelType:"text",domId:v1+a+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:d},this.connectors.set(a,h),this.vertices.set(a,h),this.vertexCounter++;else if(o.length>0)h.text=d;return a}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}computeEdgeSemantic(t,r){if(t==="arrow_point"&&r==="normal")return"sequence";if(t==="arrow_cross"&&r==="normal")return"failure";if(t==="arrow_open"&&r==="dotted")return"reference";return}destructStartLink(t){let r=t.trim(),a="arrow_open",o="normal";if(r.includes("."))o="dotted";return{type:"arrow_open",stroke:o}}countChar(t,r){let a=r.length,o=0;for(let d=0;d<a;++d)if(r[d]===t)++o;return o}destructEndLink(t){let r=t.trim(),a=r.slice(0,-1),o="arrow_open";switch(r.slice(-1)){case"x":o="arrow_cross";break;case">":o="arrow_point";break;case"-":case".":o="arrow_open",a=r;break}let d="normal",h=a.length-1,l=this.countChar(".",a);if(l>0)d="dotted",h=l;return{type:o,stroke:d,length:h}}destructLink(t,r){let a=this.destructEndLink(t),o;if(r){if(o=this.destructStartLink(r),o.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};return o.type=a.type,o.length=a.length,{...o,edgeSemantic:this.computeEdgeSemantic(o.type,o.stroke)}}return{...a,edgeSemantic:this.computeEdgeSemantic(a.type,a.stroke)}}exists(t,r){for(let a of t)if(a.nodes.includes(r))return!0;return!1}makeUniq(t,r){let a=[];return t.nodes.forEach((o,d)=>{if(!this.exists(r,o))a.push(t.nodes[d])}),{nodes:a}}getTypeFromVertex(t){let r=typeof t.type==="string"?Dt(t.type):t.type;switch(r){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return r}}findNode(t,r){return t.find((a)=>a.id===r)}destructEdgeType(t){let r="none",a="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":a=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=t.replace("double_",""),a=r;break}return{arrowTypeStart:r,arrowTypeEnd:a}}addNodeFromVertex(t,r,a,o,d,h){let l=a.get(t.id),p=o.get(t.id)??!1,k=this.findNode(r,t.id);if(k)k.cssStyles=t.styles,k.cssCompiledStyles=this.getCompiledStyles(t.classes),k.cssClasses=t.classes.join(" ");else{let b={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:l,padding:d.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:h,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),metadata:t.metadata};if(p)r.push({...b,isGroup:!0,shape:"rect"});else r.push({...b,isGroup:!1,shape:this.getTypeFromVertex(t),wrappingWidth:d.agentflow?.wrappingWidth,minWidth:d.agentflow?.minNodeWidth})}}getCompiledStyles(t){let r=[];for(let a of t){let o=this.classes.get(a);if(o?.styles)r=[...r,...o.styles??[]].map((d)=>d.trim());if(o?.textStyles)r=[...r,...o.textStyles??[]].map((d)=>d.trim())}return r}runPostParseValidators(){if(this.postParseValidationRun)return;this.postParseValidationRun=!0}getData(){this.runPostParseValidators();let t=u(),r=[],a=[],o=this.getSubGraphs(),d=new Map,h=new Map,l=new Set,p=new Map,k=e((f,g,F=new Set)=>{if(F.has(f))return;F.add(f);let q=this.subGraphLookup.get(f);if(!q)return;for(let me of q.nodes){if(me===g||F.has(me))continue;l.add(me),p.set(me,g),k(me,g,F)}},"collectDescendants");for(let f of o)if(f.metadata?.view==="collapsed"&&!l.has(f.id))k(f.id,f.id);let b=e((f,g)=>{let F=new Set,q=g;while(q!==void 0&&!F.has(q)){if(q===f)return!0;F.add(q),q=d.get(q)}return!1},"wouldCloseContainmentCycle");for(let f=o.length-1;f>=0;f--){let g=o[f];if(l.has(g.id))continue;if(g.nodes.length>0)h.set(g.id,!0);for(let F of g.nodes){if(b(F,g.id)){this.emitWarning(vt.CONTAINMENT_VIOLATION,`Container "${g.id}" cannot contain "${F}" because "${F}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:F});continue}d.set(F,g.id)}}for(let f=o.length-1;f>=0;f--){let g=o[f];if(l.has(g.id))continue;if(g.metadata?.view==="collapsed"){let q={...g.metadata,containerType:g.type};r.push({id:g.id,label:g.title,labelStyle:"",labelType:g.labelType,parentId:d.get(g.id),padding:8,cssCompiledStyles:this.getCompiledStyles(g.classes),cssClasses:g.classes.join(" "),shape:"collapsedGroup",dir:g.dir,isGroup:!1,look:t.look,metadata:q})}else r.push({id:g.id,label:g.title,labelStyle:"",labelType:g.labelType,parentId:d.get(g.id),padding:8,cssCompiledStyles:this.getCompiledStyles(g.classes),cssClasses:g.classes.join(" "),shape:Y1[g.type??"flow"],dir:g.dir,isGroup:!0,look:t.look,metadata:g.metadata})}this.getVertices().forEach((f)=>{if(l.has(f.id))return;this.addNodeFromVertex(f,r,d,h,t,t.look||"classic")});let S=this.getEdges();S.forEach((f,g)=>{let F=p.get(f.start)??f.start,q=p.get(f.end)??f.end;if(F===q&&f.start!==f.end)return;let{arrowTypeStart:me,arrowTypeEnd:Ie}=this.destructEdgeType(f.type),Fe=[...S.defaultStyle??[]];if(f.style)Fe.push(...f.style);let Le={id:We(F,q,{counter:g,prefix:"L"},f.id),isUserDefinedId:f.isUserDefinedId,start:F,end:q,type:f.type??"normal",label:f.text,labelType:f.labelType,labelpos:"c",thickness:f.stroke,minlen:f.length,classes:f?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:f?.stroke==="invisible"||f?.type==="arrow_open"?"none":me,arrowTypeEnd:f?.stroke==="invisible"||f?.type==="arrow_open"?"none":Ie,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(f.classes),labelStyle:Fe,style:Fe,pattern:f.stroke,look:t.look,animate:f.animate,animation:f.animation,curve:f.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve,metadata:f.metadata};a.push(Le)}),_1(r,this);let N=new Map,_=new Map;for(let f of o){let g=d.get(f.id);if(g!==void 0)_.set(g,[..._.get(g)??[],f.id])}let W=0,V=e((f)=>{if(N.has(f))return;N.set(f,W++);for(let g of _.get(f)??[])V(g)},"walkContainers");for(let f of o)if(d.get(f.id)===void 0)V(f.id);let C=new Set(this.getConnectors().map((f)=>f.id));return B1(r,(f)=>{if(C.has(f))return"connector";let g=this.vertices.get(f);return g?this.deriveVertexKind(g,Dt(g.type)):void 0},N),{nodes:r,edges:a,other:{},config:t,connectors:this.getConnectors()}}validate(){if(u().layout!=="grid")return;Ir(void 0,[...this.vertices.values(),...this.subGraphs])}defaultConfig(){return Kr.flowchart}deriveVertexKind(t,r){if(this.isToolDefinition(t))return"tool";if(r==="hexagon"||r==="hex")return"action";if(r==="lean-right"||r==="lean_right")return"input";if(r==="lin-doc"||r==="lined-document")return"refdoc";if(r==="diamond")return"decision";return"task"}getSemanticModel(){this.runPostParseValidators();let t=new Set(this.subGraphs.map((l)=>l.id)),r=[],a=[];for(let[l,p]of this.vertices){if(t.has(l))continue;if(p.isConnector){let E={id:l};if(p.text!==void 0&&p.text!==l)E.title=p.text;if(p.metadata&&Object.keys(p.metadata).length>0){let S={};for(let[N,_]of Object.entries(p.metadata)){if(c1.has(N))continue;S[N]=_}if(Object.keys(S).length>0)E.metadata=S}a.push(E);continue}let k={id:l};if(p.text!==void 0)k.label=p.text;let b=typeof p.type==="string"?Dt(p.type):p.type;if(b!==void 0)k.shape=b;if(k.vertexKind=this.deriveVertexKind(p,b),p.metadata&&Object.keys(p.metadata).length>0){let E={};for(let[S,N]of Object.entries(p.metadata)){if(c1.has(S))continue;E[S]=N}if(Object.keys(E).length>0)k.metadata=E}r.push(k)}let o=this.edges.map((l)=>{let p={start:l.start,end:l.end};if(l.id!==void 0)p.id=l.id;if(typeof l.text==="string"&&l.text.length>0)p.label=l.text;if(l.type!==void 0)p.type=l.type;if(l.stroke!==void 0)p.stroke=l.stroke;if(l.edgeSemantic!==void 0)p.edgeSemantic=l.edgeSemantic;if(l.length!==void 0)p.length=l.length;if(l.metadata&&Object.keys(l.metadata).length>0)p.metadata={...l.metadata};return p}),d=this.subGraphs.map((l)=>{let p={id:l.id,nodes:[...l.nodes]};if(l.type!==void 0)p.type=l.type;if(l.title!==void 0)p.title=l.title;if(l.dir!==void 0)p.direction=l.dir;if(l.metadata&&Object.keys(l.metadata).length>0){let k={};for(let[b,E]of Object.entries(l.metadata)){if(c1.has(b))continue;k[b]=E}if(Object.keys(k).length>0)p.metadata=k}return p}),h={vertices:r,edges:o,subGraphs:d,connectors:a,diagnostics:this.diagnostics};if(this.direction!==void 0)h.direction=this.direction;return h}setFrontmatterLineOffset(t){this.frontmatterLineOffset=t??0}toElementPosition(t){let r=t?.first_line??0,a=t?.first_column??0,o=t?.last_line??r,d=t?.last_column??a,[h,l]=t?.range??[0,0];return{startLine:r+this.frontmatterLineOffset,startColumn:a,endLine:o+this.frontmatterLineOffset,endColumn:d,startIndex:h,endIndex:l}}pushMapping(t,r,a){if(!t)return;let o={id:t,type:r,position:this.toElementPosition(a)};return this.elementMappings.push(o),o}addVertexMapping(t,r,a,o){let d=this.pushMapping(t,"vertex",o);if(d&&a==null)this.bareVertexMappings.add(d)}extendVertexMapping(t,r){if(!t||!r)return;let a=this.toElementPosition(r);for(let o=this.elementMappings.length-1;o>=0;o--){let d=this.elementMappings[o];if(d.type==="vertex"&&d.id===t){if(this.bareVertexMappings.has(d))d.type="attachment",this.bareVertexMappings.delete(d);if(a.endLine>d.position.endLine||a.endLine===d.position.endLine&&a.endColumn>d.position.endColumn)d.position.endLine=a.endLine,d.position.endColumn=a.endColumn,d.position.endIndex=a.endIndex;return}}this.pushMapping(t,"attachment",r)}addEdgeMapping(t,r,a,o){let d=Array.isArray(r)?r.map((l)=>typeof l==="string"?l:l?.id??"").filter(Boolean):[],h=d.length>0?d.join(">"):"edge";this.pushMapping(h,"edge",o)}addSubgraphMapping(t,r,a,o){let d=(typeof t==="string"?t:t?.text)??"",h=this.toElementPosition(a),l=o?this.toElementPosition(o):h;if(!d)return;this.elementMappings.push({id:d,type:"subgraph",position:{startLine:h.startLine,startColumn:h.startColumn,endLine:l.endLine,endColumn:l.endColumn,startIndex:h.startIndex,endIndex:l.endIndex}})}addConnectorMapping(t,r,a,o){let d=t?.text?.trim()??"";if(!d)return;let h=this.toElementPosition(a),l=o?this.toElementPosition(o):h;this.elementMappings.push({id:d,type:"connector",position:{startLine:h.startLine,startColumn:h.startColumn,endLine:l.endLine,endColumn:l.endColumn,startIndex:h.startIndex,endIndex:l.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(t){return this.elementMappings.find((r)=>r.id===t)}getElementsOnLine(t){return this.elementMappings.filter((r)=>t>=r.position.startLine&&t<=r.position.endLine)}getElementAtPosition(t,r){let a=this.elementMappings.filter((d)=>{let{startLine:h,startColumn:l,endLine:p,endColumn:k}=d.position;if(t<h||t>p)return!1;if(t===h&&r<l)return!1;if(t===p&&r>k)return!1;return!0});if(a.length===0)return;let o=e(({position:d})=>[d.endLine-d.startLine,d.endColumn-d.startColumn],"span");return a.reduce((d,h)=>{let[l,p]=o(d),[k,b]=o(h);if(k!==l)return k<l?h:d;return b<p?h:d})}getMappingStats(){let t=0,r=0,a=0,o=0,d=0;for(let h of this.elementMappings)if(h.type==="vertex")t++;else if(h.type==="edge")r++;else if(h.type==="subgraph")a++;else if(h.type==="connector")o++;else if(h.type==="attachment")d++;return{vertices:t,edges:r,subgraphs:a,connectors:o,attachments:d,totalElements:this.elementMappings.length}}emitDiagnostic(t,r,a,o){let d=o?.nodeId??o?.edgeId,h=d?this.getElementById(d):void 0,l={id:t,severity:r,message:a,...o?.nodeId?{nodeId:o.nodeId}:{},...o?.edgeId&&!o?.nodeId?{edgeId:o.edgeId}:{},...h?{position:h.position}:{}};if(this.diagnostics.some((b)=>b.id===l.id&&b.severity===l.severity&&b.message===l.message&&b.nodeId===l.nodeId&&b.edgeId===l.edgeId))return;this.diagnostics.push(l);let k=`agentflow[${t}]: ${a}`;if(r==="error")n.error(k);else n.warn(k)}emitWarning(t,r,a){this.emitDiagnostic(t,"warning",r,a)}emitError(t,r,a){this.emitDiagnostic(t,"error",r,a)}getDiagnostics(){return[...this.diagnostics]}},X1=e(function(t,r){return r.db.getClasses()},"getClasses"),Q1=e(async function(t,r,a,o){n.debug("Drawing agentflow diagram",r);let{securityLevel:d,agentflow:h,layout:l}=u();o.db.setDiagramId(r),n.debug("Before getData: ");let p=o.db.getData();n.debug("Data: ",p);let k=Ee(r,d),b=o.db.getDirection();if(p.type=o.type,p.layoutAlgorithm=_e(l),p.layoutAlgorithm==="dagre"&&l==="elk")n.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback.");p.direction=b,p.nodeSpacing=h?.nodeSpacing||50,p.rankSpacing=h?.rankSpacing||50,p.markers=["point","circle","cross","hierarchy"],p.diagramId=r,n.debug("REF1:",p),await Ae(p,k);let E=h?.diagramPadding??8;z.insertTitle(k,"agentflowTitleText",h?.titleTopMargin??0,o.db.getDiagramTitle()),ge(k,E,"agentflow",h?.useMaxWidth??!0)},"draw"),J1={getClasses:X1,draw:Q1},d1=function(){var t=e(function(Ke,x,T,v){for(T=T||{},v=Ke.length;v--;T[Ke[v]]=x);return T},"o"),r=[1,5],a=[1,4],o=[1,3],d=[1,6],h=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],l=[2,2],p=[1,15],k=[1,16],b=[1,17],E=[1,18],S=[1,19],N=[1,26],_=[1,27],W=[1,28],V=[1,30],C=[1,31],f=[1,32],g=[1,55],F=[1,54],q=[1,34],me=[1,35],Ie=[1,36],Fe=[1,37],Le=[1,38],Q=[1,50],J=[1,52],Z=[1,48],ee=[1,53],te=[1,49],se=[1,56],ie=[1,51],re=[1,57],ne=[1,58],He=[1,39],Ye=[1,40],qe=[1,41],Qe=[1,42],Je=[1,43],je=[1,64],B=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],ce=[1,70],de=[1,68],fe=[1,67],ke=[1,69],st=[8,9,10,12,78,80,81],it=[1,88],rt=[1,101],nt=[1,106],at=[1,105],ot=[1,102],lt=[1,98],ct=[1,104],ht=[1,100],pt=[1,107],ft=[1,103],bt=[1,108],kt=[1,99],Ze=[8,9,10,11,12,43,78,80,81],oe=[8,9,10,11,12,43,49,78,80,81],Se=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],h1=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],mt=[47,63,92,105,108,109,112,114,117,118,119],p1=[1,131],f1=[1,132],_t=[1,134],Ft=[1,133],g1=[47,63,65,77,92,105,108,109,112,114,117,118,119],Vt=[1,143],It=[1,157],Lt=[1,158],Bt=[1,159],Mt=[1,162],wt=[1,161],yt=[1,160],Nt=[1,145],Rt=[1,147],Ot=[1,151],b1=[1,139],k1=[1,140],Gt=[1,152],Ut=[1,153],jt=[1,154],zt=[1,155],Wt=[1,156],Kt=[1,163],Ht=[1,164],Yt=[1,141],qt=[1,142],Qt=[1,149],Jt=[1,144],Zt=[1,148],$t=[1,146],At=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],m1=[1,168],Et=[1,170],X=[8,9,10,12],xe=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],P=[1,190],ue=[1,186],le=[1,187],G=[1,191],U=[1,188],j=[1,189],Ct=[80,119,122],K=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],A1=[11,109],ze=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],Be=[1,269],Me=[1,267],we=[1,271],ye=[1,265],Ne=[1,266],Re=[1,268],Oe=[1,270],Ge=[1,272],St=[1,292],E1=[8,9,10,12,109],Ve=[8,9,10,11,12,63,87,108,109,112,113,114,115],r1={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:e(function(x,T,v,c,H,s,w){var i=s.length-1;switch(H){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 198:this.$=s[i];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:c.setDirection("TB"),this.$="TB";break;case 14:c.setDirection(s[i-1]),this.$=s[i-1];break;case 32:this.$=s[i-1].nodes;break;case 38:if(this.$=c.addSubGraph(s[i-6],s[i-1],s[i-4],"flow"),c.addSubgraphMapping)c.addSubgraphMapping(s[i-6],s[i-4],w[i-8],w[i]);break;case 39:if(this.$=c.addSubGraph(s[i-7],s[i-1],s[i-5],"flow"),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],w[i-3]),c.addSubgraphMapping)c.addSubgraphMapping(s[i-7],s[i-5],w[i-9],w[i]);break;case 40:if(this.$=c.addSubGraph(s[i-3],s[i-1],{text:"",type:"text"},"flow"),c.addSubgraphMapping)c.addSubgraphMapping(s[i-3],{text:"",type:"text"},w[i-5],w[i]);break;case 41:if(this.$=c.addSubGraph(s[i-4],s[i-1],{text:"",type:"text"},"flow"),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],w[i-3]),c.addSubgraphMapping)c.addSubgraphMapping(s[i-4],{text:"",type:"text"},w[i-6],w[i]);break;case 42:if(this.$=c.addSubGraph(void 0,s[i-1],void 0,"flow"),c.addSubgraphMapping)c.addSubgraphMapping(void 0,void 0,w[i-3],w[i]);break;case 43:c.addGlobal(s[i-1]),this.$=[];break;case 44:if(this.$=c.addConnector(s[i-4],s[i-2]),c.addConnectorMapping)c.addConnectorMapping(s[i-4],s[i-2],w[i-6],w[i]);break;case 45:if(this.$=c.addConnector(s[i-5],s[i-3]),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],w[i-1]),c.addConnectorMapping)c.addConnectorMapping(s[i-5],s[i-3],w[i-7],w[i]);break;case 46:if(this.$=c.addConnector(s[i-1],{text:"",type:"text"}),c.addConnectorMapping)c.addConnectorMapping(s[i-1],{text:"",type:"text"},w[i-3],w[i]);break;case 47:if(this.$=c.addConnector(s[i-2],{text:"",type:"text"}),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],w[i-1]),c.addConnectorMapping)c.addConnectorMapping(s[i-2],{text:"",type:"text"},w[i-4],w[i]);break;case 49:this.$=s[i].trim(),c.setAccTitle(this.$);break;case 50:case 51:this.$=s[i].trim(),c.setAccDescription(this.$);break;case 56:this.$=s[i-1]+s[i];break;case 57:this.$=s[i];break;case 58:if(c.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],w[i]),c.extendVertexMapping)c.extendVertexMapping(s[i-1][s[i-1].length-1],w[i]);if(c.addLink(s[i-3].stmt,s[i-1],s[i-2]),c.addEdgeMapping)c.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 59:if(c.addLink(s[i-2].stmt,s[i],s[i-1]),c.addEdgeMapping)c.addEdgeMapping(s[i-2].stmt,s[i],s[i-1],this._$);this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 60:if(c.addLink(s[i-3].stmt,s[i-1],s[i-2]),c.addEdgeMapping)c.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 61:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 62:if(c.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],w[i]),c.extendVertexMapping)c.extendVertexMapping(s[i-1][s[i-1].length-1],w[i]);this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 63:this.$={stmt:s[i],nodes:s[i]};break;case 64:this.$=[s[i]];break;case 65:if(c.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4],w[i-4]),c.extendVertexMapping)c.extendVertexMapping(s[i-5][s[i-5].length-1],w[i-4]);this.$=s[i-5].concat(s[i]);break;case 66:this.$=s[i-4].concat(s[i]);break;case 67:this.$=s[i];break;case 68:this.$=s[i-2],c.setClass(s[i-2],s[i]);break;case 69:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"square"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"square",this._$);break;case 70:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"doublecircle"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"doublecircle",this._$);break;case 71:if(this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"circle"),c.addVertexMapping)c.addVertexMapping(s[i-5],s[i-2],"circle",this._$);break;case 72:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"ellipse"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"ellipse",this._$);break;case 73:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"stadium"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"stadium",this._$);break;case 74:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"subroutine"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"subroutine",this._$);break;case 75:if(this.$=s[i-7],c.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]])),c.addVertexMapping)c.addVertexMapping(s[i-7],s[i-1],"rect",this._$);break;case 76:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"cylinder"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"cylinder",this._$);break;case 77:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"round"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"round",this._$);break;case 78:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"diamond"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"diamond",this._$);break;case 79:if(this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"hexagon"),c.addVertexMapping)c.addVertexMapping(s[i-5],s[i-2],"hexagon",this._$);break;case 80:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"odd"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"odd",this._$);break;case 81:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"trapezoid"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"trapezoid",this._$);break;case 82:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"inv_trapezoid"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"inv_trapezoid",this._$);break;case 83:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_right"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"lean_right",this._$);break;case 84:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_left"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"lean_left",this._$);break;case 85:if(this.$=s[i],c.addVertex(s[i]),c.addVertexMapping)c.addVertexMapping(s[i],void 0,void 0,this._$);break;case 86:s[i-1].text=s[i],this.$=s[i-1];break;case 87:case 88:s[i-2].text=s[i-1],this.$=s[i-2];break;case 89:this.$=s[i];break;case 90:var Y=c.destructLink(s[i],s[i-2]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,text:s[i-1]};break;case 91:var Y=c.destructLink(s[i],s[i-2]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,text:s[i-1],id:s[i-3]};break;case 92:this.$={text:s[i],type:"text"};break;case 93:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 94:this.$={text:s[i],type:"string"};break;case 95:this.$={text:s[i],type:"markdown"};break;case 96:var Y=c.destructLink(s[i]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic};break;case 97:var Y=c.destructLink(s[i]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,id:s[i-1]};break;case 98:this.$=s[i-1];break;case 99:this.$={text:s[i],type:"text"};break;case 100:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 101:this.$={text:s[i],type:"string"};break;case 102:case 119:this.$={text:s[i],type:"markdown"};break;case 116:this.$={text:s[i],type:"text"};break;case 117:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 118:this.$={text:s[i],type:"text"};break;case 120:this.$=s[i-4],c.addClass(s[i-2],s[i]);break;case 121:this.$=s[i-4],c.setClass(s[i-2],s[i]);break;case 122:case 130:this.$=s[i-1],c.setClickEvent(s[i-1],s[i]);break;case 123:case 131:this.$=s[i-3],c.setClickEvent(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 124:this.$=s[i-2],c.setClickEvent(s[i-2],s[i-1],s[i]);break;case 125:this.$=s[i-4],c.setClickEvent(s[i-4],s[i-3],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 126:this.$=s[i-2],c.setLink(s[i-2],s[i]);break;case 127:this.$=s[i-4],c.setLink(s[i-4],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 128:this.$=s[i-4],c.setLink(s[i-4],s[i-2],s[i]);break;case 129:this.$=s[i-6],c.setLink(s[i-6],s[i-4],s[i]),c.setTooltip(s[i-6],s[i-2]);break;case 132:this.$=s[i-1],c.setLink(s[i-1],s[i]);break;case 133:this.$=s[i-3],c.setLink(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 134:this.$=s[i-3],c.setLink(s[i-3],s[i-2],s[i]);break;case 135:this.$=s[i-5],c.setLink(s[i-5],s[i-4],s[i]),c.setTooltip(s[i-5],s[i-2]);break;case 136:this.$=s[i-4],c.addVertex(s[i-2],void 0,void 0,s[i]);break;case 137:this.$=s[i-4],c.updateLink([s[i-2]],s[i]);break;case 138:this.$=s[i-4],c.updateLink(s[i-2],s[i]);break;case 139:this.$=s[i-8],c.updateLinkInterpolate([s[i-6]],s[i-2]),c.updateLink([s[i-6]],s[i]);break;case 140:this.$=s[i-8],c.updateLinkInterpolate(s[i-6],s[i-2]),c.updateLink(s[i-6],s[i]);break;case 141:this.$=s[i-6],c.updateLinkInterpolate([s[i-4]],s[i]);break;case 142:this.$=s[i-6],c.updateLinkInterpolate(s[i-4],s[i]);break;case 143:case 145:this.$=[s[i]];break;case 144:case 146:s[i-2].push(s[i]),this.$=s[i-2];break;case 148:this.$=s[i-1]+s[i];break;case 196:this.$=s[i];break;case 197:this.$=s[i-1]+""+s[i];break;case 199:this.$=s[i-1]+""+s[i];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,8:r,10:a,11:o,13:d},{1:[3]},t(h,l,{5:7}),{4:8,8:r,10:a,11:o,13:d},{4:9,8:r,10:a,11:o,13:d},{4:10,8:r,10:a,11:o,13:d},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:p,9:k,10:b,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,35:_,36:W,37:29,38:V,40:C,42:f,45:33,46:44,47:g,48:45,50:46,63:F,87:q,88:me,89:Ie,90:Fe,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:qe,127:Qe,128:Je},t(h,[2,10]),t(h,[2,11]),t(h,[2,12]),t(h,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:je,16:59,19:62},t(B,[2,3]),t(B,[2,4]),t(B,[2,5]),t(B,[2,6]),t(B,[2,7]),t(B,[2,8]),t(B,[2,9]),{8:ce,9:de,10:fe,12:ke,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:ce,9:de,10:fe,12:ke,22:75},{8:ce,9:de,10:fe,12:ke,22:76},{8:ce,9:de,10:fe,12:ke,22:77},{8:ce,9:de,10:fe,12:ke,22:78},{8:ce,9:de,10:fe,12:ke,22:79},{8:ce,9:de,10:fe,11:[1,80],12:ke,22:81},{8:ce,9:de,10:fe,12:ke,22:82},{11:[1,83]},t(B,[2,48]),{39:[1,84]},{41:[1,85]},t(B,[2,51]),t(st,[2,63],{19:86,34:87,11:je,43:it}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:rt,47:nt,63:at,83:[1,96],92:ot,98:[1,93],100:[1,94],104:95,108:lt,109:ct,112:ht,114:pt,117:ft,118:bt,119:kt,123:97},t(B,[2,200]),t(B,[2,201]),t(B,[2,202]),t(B,[2,203]),t(B,[2,204]),t(Ze,[2,64]),t(Ze,[2,67],{49:[1,109]}),t(oe,[2,85],{116:122,30:[1,110],47:g,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:F,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),t(Se,[2,196]),t(Se,[2,157]),t(Se,[2,158]),t(Se,[2,159]),t(Se,[2,160]),t(Se,[2,161]),t(Se,[2,162]),t(Se,[2,163]),t(Se,[2,164]),t(Se,[2,165]),t(Se,[2,166]),t(Se,[2,167]),t(h,[2,14]),t(h,[2,20]),t(h,[2,21]),{10:[1,123]},t(h,[2,23]),t(h1,[2,31],{19:124,11:je}),t(B,[2,32]),{45:125,46:44,47:g,48:45,50:46,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},t(B,[2,52]),t(B,[2,53]),t(B,[2,54]),t(B,[2,55]),t(mt,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:p1,84:f1,119:_t,122:Ft},{78:[1,135],80:[1,136]},t(g1,[2,96]),t(B,[2,33]),t(B,[2,34]),t(B,[2,35]),t(B,[2,36]),t(B,[2,37]),{11:Vt,13:It,15:Lt,28:Bt,29:137,33:Mt,35:wt,36:yt,47:Nt,63:Rt,78:Ot,83:b1,84:k1,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:138,108:Yt,112:qt,114:Qt,117:Jt,118:Zt,119:$t},t(At,l,{5:165}),t(At,l,{5:166}),{11:Vt,13:It,15:Lt,28:Bt,29:167,33:Mt,35:wt,36:yt,47:Nt,63:Rt,78:Ot,83:b1,84:k1,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:138,108:Yt,112:qt,114:Qt,117:Jt,118:Zt,119:$t},t(B,[2,49]),t(B,[2,50]),t(st,[2,61],{47:m1}),t(st,[2,62],{19:169,11:je,43:Et}),t(Ze,[2,57]),{47:g,50:171,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{105:[1,172],106:173,108:[1,174]},{47:g,50:175,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{47:g,50:176,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},t(X,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},t(X,[2,130],{123:181,11:[1,180],15:rt,47:nt,63:at,92:ot,108:lt,109:ct,112:ht,114:pt,117:ft,118:bt,119:kt}),t(X,[2,132],{11:[1,182]}),t(xe,[2,198]),t(xe,[2,185]),t(xe,[2,186]),t(xe,[2,187]),t(xe,[2,188]),t(xe,[2,189]),t(xe,[2,190]),t(xe,[2,191]),t(xe,[2,192]),t(xe,[2,193]),t(xe,[2,194]),t(xe,[2,195]),{47:g,50:183,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{31:184,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{31:192,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{31:194,53:[1,193],70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{31:195,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{31:196,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{31:197,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{112:[1,198]},{31:199,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{31:200,68:[1,201],70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{31:202,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{31:203,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{31:204,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},t(Se,[2,197]),t(h,[2,22]),t(h1,[2,30]),t(st,[2,59],{34:205,19:206,11:je,43:it}),t(mt,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{80:[1,210],82:211,119:_t,122:Ft},t(Ct,[2,92]),t(Ct,[2,94]),t(Ct,[2,95]),t(Ct,[2,183]),t(Ct,[2,184]),{79:212,82:130,83:p1,84:f1,119:_t,122:Ft},t(g1,[2,97]),{8:ce,9:de,10:fe,11:Vt,12:ke,13:It,15:Lt,22:214,28:Bt,30:[1,213],33:Mt,34:215,35:wt,36:yt,43:it,47:Nt,63:Rt,78:Ot,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:216,108:Yt,112:qt,114:Qt,117:Jt,118:Zt,119:$t},t(K,[2,116]),t(K,[2,118]),t(K,[2,119]),t(K,[2,172]),t(K,[2,173]),t(K,[2,174]),t(K,[2,175]),t(K,[2,176]),t(K,[2,177]),t(K,[2,178]),t(K,[2,179]),t(K,[2,180]),t(K,[2,181]),t(K,[2,182]),t(K,[2,103]),t(K,[2,104]),t(K,[2,105]),t(K,[2,106]),t(K,[2,107]),t(K,[2,108]),t(K,[2,109]),t(K,[2,110]),t(K,[2,111]),t(K,[2,112]),t(K,[2,113]),t(K,[2,114]),t(K,[2,115]),{6:13,7:14,8:p,9:k,10:b,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,217],35:_,36:W,37:29,38:V,40:C,42:f,45:33,46:44,47:g,48:45,50:46,63:F,87:q,88:me,89:Ie,90:Fe,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:qe,127:Qe,128:Je},{6:13,7:14,8:p,9:k,10:b,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,218],35:_,36:W,37:29,38:V,40:C,42:f,45:33,46:44,47:g,48:45,50:46,63:F,87:q,88:me,89:Ie,90:Fe,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:qe,127:Qe,128:Je},{8:ce,9:de,10:fe,11:Vt,12:ke,13:It,15:Lt,22:220,28:Bt,30:[1,219],33:Mt,34:221,35:wt,36:yt,43:it,47:Nt,63:Rt,78:Ot,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:216,108:Yt,112:qt,114:Qt,117:Jt,118:Zt,119:$t},{11:je,19:222},{47:[1,223]},t(Ze,[2,56]),{11:[1,224],47:g,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,225]},{11:[1,226],109:[1,227]},t(A1,[2,143]),{11:[1,228],47:g,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,229],47:g,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{83:[1,230]},t(X,[2,124],{11:[1,231]}),t(X,[2,126],{11:[1,232]}),{83:[1,233]},t(xe,[2,199]),{83:[1,234],101:[1,235]},t(Ze,[2,68],{116:122,47:g,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),{32:[1,236],70:P,85:237,119:G,120:U,121:j},t(ze,[2,99]),t(ze,[2,101]),t(ze,[2,102]),t(ze,[2,168]),t(ze,[2,169]),t(ze,[2,170]),t(ze,[2,171]),{52:[1,238],70:P,85:237,119:G,120:U,121:j},{31:239,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{54:[1,240],70:P,85:237,119:G,120:U,121:j},{56:[1,241],70:P,85:237,119:G,120:U,121:j},{58:[1,242],70:P,85:237,119:G,120:U,121:j},{60:[1,243],70:P,85:237,119:G,120:U,121:j},{63:[1,244]},{67:[1,245],70:P,85:237,119:G,120:U,121:j},{69:[1,246],70:P,85:237,119:G,120:U,121:j},{31:247,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},{32:[1,248],70:P,85:237,119:G,120:U,121:j},{70:P,72:[1,249],74:[1,250],85:237,119:G,120:U,121:j},{70:P,72:[1,252],74:[1,251],85:237,119:G,120:U,121:j},t(st,[2,58],{19:169,11:je,43:Et}),t(st,[2,60],{47:m1}),t(mt,[2,88]),t(mt,[2,87]),{65:[1,253],70:P,85:237,119:G,120:U,121:j},t(mt,[2,90]),t(Ct,[2,93]),{80:[1,254],82:211,119:_t,122:Ft},{31:255,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},t(At,l,{5:256}),{8:ce,9:de,10:fe,12:ke,22:257,43:Et},t(K,[2,117]),t(B,[2,42]),t(B,[2,43]),{31:258,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},t(B,[2,46]),{8:ce,9:de,10:fe,12:ke,22:259,43:Et},{46:260,47:g,48:45,50:46,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{11:je,19:261},{11:Be,63:Me,87:we,95:262,108:ye,110:263,111:264,112:Ne,113:Re,114:Oe,115:Ge},{11:Be,63:Me,87:we,95:273,107:[1,274],108:ye,110:263,111:264,112:Ne,113:Re,114:Oe,115:Ge},{11:Be,63:Me,87:we,95:275,107:[1,276],108:ye,110:263,111:264,112:Ne,113:Re,114:Oe,115:Ge},{108:[1,277]},{11:Be,63:Me,87:we,95:278,108:ye,110:263,111:264,112:Ne,113:Re,114:Oe,115:Ge},{47:g,50:279,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},t(X,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},t(X,[2,131]),t(X,[2,133],{11:[1,283]}),t(X,[2,134]),t(oe,[2,69]),t(ze,[2,100]),t(oe,[2,70]),{54:[1,284],70:P,85:237,119:G,120:U,121:j},t(oe,[2,77]),t(oe,[2,72]),t(oe,[2,73]),t(oe,[2,74]),{112:[1,285]},t(oe,[2,76]),t(oe,[2,78]),{69:[1,286],70:P,85:237,119:G,120:U,121:j},t(oe,[2,80]),t(oe,[2,81]),t(oe,[2,83]),t(oe,[2,82]),t(oe,[2,84]),t([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),t(mt,[2,91]),{32:[1,287],70:P,85:237,119:G,120:U,121:j},{6:13,7:14,8:p,9:k,10:b,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,288],35:_,36:W,37:29,38:V,40:C,42:f,45:33,46:44,47:g,48:45,50:46,63:F,87:q,88:me,89:Ie,90:Fe,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:qe,127:Qe,128:Je},t(At,l,{5:289}),{32:[1,290],70:P,85:237,119:G,120:U,121:j},t(B,[2,47]),t(Ze,[2,66]),{46:291,47:g,48:45,50:46,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},t(X,[2,136],{109:St}),t(E1,[2,145],{111:293,11:Be,63:Me,87:we,108:ye,112:Ne,113:Re,114:Oe,115:Ge}),t(Ve,[2,147]),t(Ve,[2,149]),t(Ve,[2,150]),t(Ve,[2,151]),t(Ve,[2,152]),t(Ve,[2,153]),t(Ve,[2,154]),t(Ve,[2,155]),t(Ve,[2,156]),t(X,[2,137],{109:St}),{11:[1,294]},t(X,[2,138],{109:St}),{11:[1,295]},t(A1,[2,144]),t(X,[2,120],{109:St}),t(X,[2,121],{116:122,47:g,63:F,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),t(X,[2,125]),t(X,[2,127],{11:[1,296]}),t(X,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:ce,9:de,10:fe,12:ke,22:301,34:302,43:it},t(B,[2,40]),{6:13,7:14,8:p,9:k,10:b,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,303],35:_,36:W,37:29,38:V,40:C,42:f,45:33,46:44,47:g,48:45,50:46,63:F,87:q,88:me,89:Ie,90:Fe,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:qe,127:Qe,128:Je},{8:ce,9:de,10:fe,12:ke,22:304,34:305,43:it},t(Ze,[2,65]),{11:Be,63:Me,87:we,108:ye,110:306,111:264,112:Ne,113:Re,114:Oe,115:Ge},t(Ve,[2,148]),{15:rt,47:nt,63:at,92:ot,104:307,108:lt,109:ct,112:ht,114:pt,117:ft,118:bt,119:kt,123:97},{15:rt,47:nt,63:at,92:ot,104:308,108:lt,109:ct,112:ht,114:pt,117:ft,118:bt,119:kt,123:97},{101:[1,309]},t(X,[2,135]),t(oe,[2,71]),{31:310,70:P,83:ue,84:le,85:185,119:G,120:U,121:j},t(oe,[2,79]),t(At,l,{5:311}),{8:ce,9:de,10:fe,12:ke,22:312,43:Et},t(B,[2,41]),t(B,[2,44]),{8:ce,9:de,10:fe,12:ke,22:313,43:Et},t(E1,[2,146],{111:293,11:Be,63:Me,87:we,108:ye,112:Ne,113:Re,114:Oe,115:Ge}),t(X,[2,141],{123:181,11:[1,314],15:rt,47:nt,63:at,92:ot,108:lt,109:ct,112:ht,114:pt,117:ft,118:bt,119:kt}),t(X,[2,142],{123:181,11:[1,315],15:rt,47:nt,63:at,92:ot,108:lt,109:ct,112:ht,114:pt,117:ft,118:bt,119:kt}),t(X,[2,129]),{32:[1,316],70:P,85:237,119:G,120:U,121:j},{6:13,7:14,8:p,9:k,10:b,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,317],35:_,36:W,37:29,38:V,40:C,42:f,45:33,46:44,47:g,48:45,50:46,63:F,87:q,88:me,89:Ie,90:Fe,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:qe,127:Qe,128:Je},t(At,l,{5:318}),t(B,[2,45]),{11:Be,63:Me,87:we,95:319,108:ye,110:263,111:264,112:Ne,113:Re,114:Oe,115:Ge},{11:Be,63:Me,87:we,95:320,108:ye,110:263,111:264,112:Ne,113:Re,114:Oe,115:Ge},t(oe,[2,75]),t(B,[2,38]),{6:13,7:14,8:p,9:k,10:b,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,321],35:_,36:W,37:29,38:V,40:C,42:f,45:33,46:44,47:g,48:45,50:46,63:F,87:q,88:me,89:Ie,90:Fe,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:qe,127:Qe,128:Je},t(X,[2,139],{109:St}),t(X,[2,140],{109:St}),t(B,[2,39])],defaultActions:{},parseError:e(function(x,T){if(T.recoverable)this.trace(x);else{var v=Error(x);throw v.hash=T,v}},"parseError"),parse:e(function(x){var T=this,v=[0],c=[],H=[null],s=[],w=this.table,i="",Y=0,C1=0,S1=0,R1=2,x1=1,O1=s.slice.call(arguments,1),ae=Object.create(this.lexer),$e={yy:{}};for(var n1 in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,n1))$e.yy[n1]=this.yy[n1];if(ae.setInput(x,$e.yy),$e.yy.lexer=ae,$e.yy.parser=this,typeof ae.yylloc>"u")ae.yylloc={};var a1=ae.yylloc;s.push(a1);var P1=ae.options&&ae.options.ranges;if(typeof $e.yy.parseError==="function")this.parseError=$e.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function G1(De){v.length=v.length-2*De,H.length=H.length-De,s.length=s.length-De}e(G1,"popStack");function T1(){var De=c.pop()||ae.lex()||x1;if(typeof De!=="number"){if(De instanceof Array)c=De,De=c.pop();De=T.symbols_[De]||De}return De}e(T1,"lex");var Ce,o1,et,Te,is,u1,xt={},t1,Ue,D1,s1;while(!0){if(et=v[v.length-1],this.defaultActions[et])Te=this.defaultActions[et];else{if(Ce===null||typeof Ce>"u")Ce=T1();Te=w[et]&&w[et][Ce]}if(typeof Te>"u"||!Te.length||!Te[0]){var l1="";s1=[];for(t1 in w[et])if(this.terminals_[t1]&&t1>R1)s1.push("'"+this.terminals_[t1]+"'");if(ae.showPosition)l1="Parse error on line "+(Y+1)+`:
|
|
22
|
+
You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t==="object"&&"id"in t&&typeof t.id==="string"}addLink(t,r,a){let o=this.isLinkData(a)?a.id.replace("@",""):void 0;n.info("addLink",t,r,o);for(let d of t)for(let h of r){let l=d===t[t.length-1],f=h===r[0];if(l&&f)this.addSingleLink(d,h,a,o);else this.addSingleLink(d,h,a,void 0)}}updateLinkInterpolate(t,r){t.forEach((a)=>{if(a==="default"){this.edges.defaultInterpolate=r;return}if(typeof a==="number"&&a>=this.edges.length)throw Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);this.edges[a].interpolate=r})}updateLink(t,r){t.forEach((a)=>{if(typeof a==="number"&&a>=this.edges.length)throw Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(a==="default")this.edges.defaultStyle=r;else if(this.edges[a].style=r,(this.edges[a]?.style?.length??0)>0&&!this.edges[a]?.style?.some((o)=>o?.startsWith("fill")))this.edges[a]?.style?.push("fill:none")})}addClass(t,r){let a=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach((o)=>{let d=this.classes.get(o);if(d===void 0)d={id:o,styles:[],textStyles:[]},this.classes.set(o,d);if(a!==void 0&&a!==null)a.forEach((h)=>{if(/color/.exec(h)){let l=h.replace("fill","bgFill");d.textStyles.push(l)}d.styles.push(h)})})}setDirection(t){if(this.direction=t.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(t,r){for(let a of t.split(",")){let o=this.vertices.get(a);if(o)o.classes.push(r);let d=this.edges.find((l)=>l.id===a);if(d)d.classes.push(r);let h=this.subGraphLookup.get(a);if(h)h.classes.push(r)}}setTooltip(t,r){if(r===void 0)return;r=this.sanitizeText(r);for(let a of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,r)}setClickFun(t,r,a){if(u().securityLevel!=="loose")return;if(r===void 0)return;let o=[];if(typeof a==="string"){o=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let h=0;h<o.length;h++){let l=o[h].trim();if(l.startsWith('"')&&l.endsWith('"'))l=l.substr(1,l.length-2);o[h]=l}}if(o.length===0)o.push(t);let d=this.vertices.get(t);if(d)d.haveCallback=!0,this.funs.push(()=>{let h=this.lookUpDomId(t),l=document.querySelector(`[id="${h}"]`);if(l!==null)l.addEventListener("click",()=>{F.runFunc(r,...o)},!1)})}setLink(t,r,a){t.split(",").forEach((o)=>{let d=this.vertices.get(o);if(d!==void 0)d.link=F.formatUrl(r,this.config),d.linkTarget=a}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,r,a){t.split(",").forEach((o)=>{this.setClickFun(o,r,a)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach((r)=>{r(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(t){return H1.has(t.type)}getTools(){let t=[];for(let r of this.vertices.values())if(this.isToolDefinition(r))t.push(r);return t}getClasses(){return this.classes}setupToolTips(t){let r=Kt();p(t).select("svg").selectAll("g.node").on("mouseover",(d)=>{let h=p(d.currentTarget),l=h.attr("title");if(l===null)return;let f=d.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(h.attr("title")).style("left",window.scrollX+f.left+(f.right-f.left)/2+"px").style("top",window.scrollY+f.bottom+"px"),r.html(Oe.sanitize(l)),h.classed("hover",!0)}).on("mouseout",(d)=>{r.transition().duration(500).style("opacity",0),p(d.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=u(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,A()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,r,a,o){let d=t?.text?.trim(),h=a?.text;if(t===a&&a?.text&&/\s/.exec(a.text))d=void 0;let f=e((v)=>{let W={boolean:{},number:{},string:{}},V=[],C;return{nodeList:v.filter(function(b){let _=typeof b;if(b.stmt&&b.stmt==="dir")return C=b.value,!1;if(b.trim()==="")return!1;if(_ in W)return W[_].hasOwnProperty(b)?!1:W[_][b]=!0;else return V.includes(b)?!1:V.push(b)}),dir:C}},"uniq")(r.flat()),{nodeList:m,dir:k}=f,E=u().flowchart??{};if(k=k??(E.inheritDir?this.getDirection()??u().direction??void 0:void 0),this.version==="gen-1")for(let v=0;v<m.length;v++)m[v]=this.lookUpDomId(m[v]);d=d??"subGraph"+this.subCount,h=h||"",h=this.sanitizeText(h),this.subCount=this.subCount+1;let S={id:d,nodes:m.filter((v)=>v!==d&&!this.globalNodes.has(v)),title:h.trim(),classes:[],dir:k,labelType:this.sanitizeNodeLabelType(a?.type),type:o??"flow"};n.info("Adding",S.id,S.nodes,S.dir),S.nodes=this.makeUniq(S,this.subGraphs).nodes;let N=this.getPosForId(d);if(N!==-1){let v=this.subGraphs[N];for(let W of S.nodes)if(!v.nodes.includes(W))v.nodes.push(W);if(S.title)v.title=S.title;if(S.dir)v.dir=S.dir;if(S.type)v.type=S.type;this.subGraphLookup.set(d,v)}else this.subGraphs.push(S),this.subGraphLookup.set(d,S);return d}addGlobal(t){for(let r of t.flat()){if(typeof r!=="string")continue;let a=r.trim();if(a!=="")this.globalNodes.add(a)}for(let r of this.subGraphs)r.nodes=r.nodes.filter((a)=>!this.globalNodes.has(a))}getPosForId(t){for(let[r,a]of this.subGraphs.entries())if(a.id===t)return r;return-1}indexNodes2(t,r){let a=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===t)return{result:!0,count:0};let o=0,d=1;while(o<a.length){let h=this.getPosForId(a[o]);if(h>=0){let l=this.indexNodes2(t,h);if(l.result)return{result:!0,count:d+l.count};else d=d+l.count}o=o+1}return{result:!1,count:d}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}addConnector(t,r){let a=t?.text?.trim();if(!a)return"";let o=r?.text?.trim()??"",d=o.length>0?this.sanitizeText(o):a,h=this.connectors.get(a);if(!h)h={id:a,labelType:"text",domId:v1+a+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:d},this.connectors.set(a,h),this.vertices.set(a,h),this.vertexCounter++;else if(o.length>0)h.text=d;return a}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}computeEdgeSemantic(t,r){if(t==="arrow_point"&&r==="normal")return"sequence";if(t==="arrow_cross"&&r==="normal")return"failure";if(t==="arrow_open"&&r==="dotted")return"reference";return}destructStartLink(t){let r=t.trim(),a="arrow_open",o="normal";if(r.includes("."))o="dotted";return{type:"arrow_open",stroke:o}}countChar(t,r){let a=r.length,o=0;for(let d=0;d<a;++d)if(r[d]===t)++o;return o}destructEndLink(t){let r=t.trim(),a=r.slice(0,-1),o="arrow_open";switch(r.slice(-1)){case"x":o="arrow_cross";break;case">":o="arrow_point";break;case"-":case".":o="arrow_open",a=r;break}let d="normal",h=a.length-1,l=this.countChar(".",a);if(l>0)d="dotted",h=l;return{type:o,stroke:d,length:h}}destructLink(t,r){let a=this.destructEndLink(t),o;if(r){if(o=this.destructStartLink(r),o.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};return o.type=a.type,o.length=a.length,{...o,edgeSemantic:this.computeEdgeSemantic(o.type,o.stroke)}}return{...a,edgeSemantic:this.computeEdgeSemantic(a.type,a.stroke)}}exists(t,r){for(let a of t)if(a.nodes.includes(r))return!0;return!1}makeUniq(t,r){let a=[];return t.nodes.forEach((o,d)=>{if(!this.exists(r,o))a.push(t.nodes[d])}),{nodes:a}}getTypeFromVertex(t){let r=typeof t.type==="string"?vt(t.type):t.type;switch(r){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return r}}findNode(t,r){return t.find((a)=>a.id===r)}destructEdgeType(t){let r="none",a="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":a=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=t.replace("double_",""),a=r;break}return{arrowTypeStart:r,arrowTypeEnd:a}}addNodeFromVertex(t,r,a,o,d,h){let l=a.get(t.id),f=o.get(t.id)??!1,m=this.findNode(r,t.id);if(m)m.cssStyles=t.styles,m.cssCompiledStyles=this.getCompiledStyles(t.classes),m.cssClasses=t.classes.join(" ");else{let k={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:l,padding:d.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:h,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),metadata:t.metadata};if(f)r.push({...k,isGroup:!0,shape:"rect"});else r.push({...k,isGroup:!1,shape:this.getTypeFromVertex(t),wrappingWidth:d.agentflow?.wrappingWidth,minWidth:d.agentflow?.minNodeWidth})}}getCompiledStyles(t){let r=[];for(let a of t){let o=this.classes.get(a);if(o?.styles)r=[...r,...o.styles??[]].map((d)=>d.trim());if(o?.textStyles)r=[...r,...o.textStyles??[]].map((d)=>d.trim())}return r}runPostParseValidators(){if(this.postParseValidationRun)return;this.postParseValidationRun=!0}getData(){this.runPostParseValidators();let t=u(),r=[],a=[],o=this.getSubGraphs(),d=new Map,h=new Map,l=new Set,f=new Map,m=e((g,b,_=new Set)=>{if(_.has(g))return;_.add(g);let q=this.subGraphLookup.get(g);if(!q)return;for(let Ae of q.nodes){if(Ae===b||_.has(Ae))continue;l.add(Ae),f.set(Ae,b),m(Ae,b,_)}},"collectDescendants");for(let g of o)if(g.metadata?.view==="collapsed"&&!l.has(g.id))m(g.id,g.id);let k=e((g,b)=>{let _=new Set,q=b;while(q!==void 0&&!_.has(q)){if(q===g)return!0;_.add(q),q=d.get(q)}return!1},"wouldCloseContainmentCycle");for(let g=o.length-1;g>=0;g--){let b=o[g];if(l.has(b.id))continue;if(b.nodes.length>0)h.set(b.id,!0);for(let _ of b.nodes){if(k(_,b.id)){this.emitWarning(_t.CONTAINMENT_VIOLATION,`Container "${b.id}" cannot contain "${_}" because "${_}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:_});continue}d.set(_,b.id)}}for(let g=o.length-1;g>=0;g--){let b=o[g];if(l.has(b.id))continue;if(b.metadata?.view==="collapsed"){let q={...b.metadata,containerType:b.type};r.push({id:b.id,label:b.title,labelStyle:"",labelType:b.labelType,parentId:d.get(b.id),padding:8,cssCompiledStyles:this.getCompiledStyles(b.classes),cssClasses:b.classes.join(" "),shape:"collapsedGroup",dir:b.dir,isGroup:!1,look:t.look,metadata:q})}else r.push({id:b.id,label:b.title,labelStyle:"",labelType:b.labelType,parentId:d.get(b.id),padding:8,cssCompiledStyles:this.getCompiledStyles(b.classes),cssClasses:b.classes.join(" "),shape:Y1[b.type??"flow"],dir:b.dir,isGroup:!0,look:t.look,metadata:b.metadata})}this.getVertices().forEach((g)=>{if(l.has(g.id))return;this.addNodeFromVertex(g,r,d,h,t,t.look||"classic")});let S=this.getEdges();S.forEach((g,b)=>{let _=f.get(g.start)??g.start,q=f.get(g.end)??g.end;if(_===q&&g.start!==g.end)return;let{arrowTypeStart:Ae,arrowTypeEnd:Le}=this.destructEdgeType(g.type),Fe=[...S.defaultStyle??[]];if(g.style)Fe.push(...g.style);let Be={id:Ve(_,q,{counter:b,prefix:"L"},g.id),isUserDefinedId:g.isUserDefinedId,start:_,end:q,type:g.type??"normal",label:g.text,labelType:g.labelType,labelpos:"c",thickness:g.stroke,minlen:g.length,classes:g?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:g?.stroke==="invisible"||g?.type==="arrow_open"?"none":Ae,arrowTypeEnd:g?.stroke==="invisible"||g?.type==="arrow_open"?"none":Le,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(g.classes),labelStyle:Fe,style:Fe,pattern:g.stroke,look:t.look,animate:g.animate,animation:g.animation,curve:g.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve,metadata:g.metadata};a.push(Be)}),_1(r,this);let N=new Map,v=new Map;for(let g of o){let b=d.get(g.id);if(b!==void 0)v.set(b,[...v.get(b)??[],g.id])}let W=0,V=e((g)=>{if(N.has(g))return;N.set(g,W++);for(let b of v.get(g)??[])V(b)},"walkContainers");for(let g of o)if(d.get(g.id)===void 0)V(g.id);let C=new Set(this.getConnectors().map((g)=>g.id));return B1(r,(g)=>{if(C.has(g))return"connector";let b=this.vertices.get(g);return b?this.deriveVertexKind(b,vt(b.type)):void 0},N),{nodes:r,edges:a,other:{},config:t,connectors:this.getConnectors()}}validate(){if(u().layout!=="grid")return;Lr(void 0,[...this.vertices.values(),...this.subGraphs])}defaultConfig(){return Wr.flowchart}deriveVertexKind(t,r){if(this.isToolDefinition(t))return"tool";if(r==="hexagon"||r==="hex")return"action";if(r==="lean-right"||r==="lean_right")return"input";if(r==="lin-doc"||r==="lined-document")return"refdoc";if(r==="diamond")return"decision";return"task"}getSemanticModel(){this.runPostParseValidators();let t=new Set(this.subGraphs.map((l)=>l.id)),r=[],a=[];for(let[l,f]of this.vertices){if(t.has(l))continue;if(f.isConnector){let E={id:l};if(f.text!==void 0&&f.text!==l)E.title=f.text;if(f.metadata&&Object.keys(f.metadata).length>0){let S={};for(let[N,v]of Object.entries(f.metadata)){if(c1.has(N))continue;S[N]=v}if(Object.keys(S).length>0)E.metadata=S}a.push(E);continue}let m={id:l};if(f.text!==void 0)m.label=f.text;let k=typeof f.type==="string"?vt(f.type):f.type;if(k!==void 0)m.shape=k;if(m.vertexKind=this.deriveVertexKind(f,k),f.metadata&&Object.keys(f.metadata).length>0){let E={};for(let[S,N]of Object.entries(f.metadata)){if(c1.has(S))continue;E[S]=N}if(Object.keys(E).length>0)m.metadata=E}r.push(m)}let o=this.edges.map((l)=>{let f={start:l.start,end:l.end};if(l.id!==void 0)f.id=l.id;if(typeof l.text==="string"&&l.text.length>0)f.label=l.text;if(l.type!==void 0)f.type=l.type;if(l.stroke!==void 0)f.stroke=l.stroke;if(l.edgeSemantic!==void 0)f.edgeSemantic=l.edgeSemantic;if(l.length!==void 0)f.length=l.length;if(l.metadata&&Object.keys(l.metadata).length>0)f.metadata={...l.metadata};return f}),d=this.subGraphs.map((l)=>{let f={id:l.id,nodes:[...l.nodes]};if(l.type!==void 0)f.type=l.type;if(l.title!==void 0)f.title=l.title;if(l.dir!==void 0)f.direction=l.dir;if(l.metadata&&Object.keys(l.metadata).length>0){let m={};for(let[k,E]of Object.entries(l.metadata)){if(c1.has(k))continue;m[k]=E}if(Object.keys(m).length>0)f.metadata=m}return f}),h={vertices:r,edges:o,subGraphs:d,connectors:a,diagnostics:this.diagnostics};if(this.direction!==void 0)h.direction=this.direction;return h}setFrontmatterLineOffset(t){this.frontmatterLineOffset=t??0}toElementPosition(t){let r=t?.first_line??0,a=t?.first_column??0,o=t?.last_line??r,d=t?.last_column??a,[h,l]=t?.range??[0,0];return{startLine:r+this.frontmatterLineOffset,startColumn:a,endLine:o+this.frontmatterLineOffset,endColumn:d,startIndex:h,endIndex:l}}pushMapping(t,r,a){if(!t)return;let o={id:t,type:r,position:this.toElementPosition(a)};return this.elementMappings.push(o),o}addVertexMapping(t,r,a,o){let d=this.pushMapping(t,"vertex",o);if(d&&a==null)this.bareVertexMappings.add(d)}extendVertexMapping(t,r){if(!t||!r)return;let a=this.toElementPosition(r);for(let o=this.elementMappings.length-1;o>=0;o--){let d=this.elementMappings[o];if(d.type==="vertex"&&d.id===t){if(this.bareVertexMappings.has(d))d.type="attachment",this.bareVertexMappings.delete(d);if(a.endLine>d.position.endLine||a.endLine===d.position.endLine&&a.endColumn>d.position.endColumn)d.position.endLine=a.endLine,d.position.endColumn=a.endColumn,d.position.endIndex=a.endIndex;return}}this.pushMapping(t,"attachment",r)}addEdgeMapping(t,r,a,o){let d=Array.isArray(r)?r.map((l)=>typeof l==="string"?l:l?.id??"").filter(Boolean):[],h=d.length>0?d.join(">"):"edge";this.pushMapping(h,"edge",o)}addSubgraphMapping(t,r,a,o){let d=(typeof t==="string"?t:t?.text)??"",h=this.toElementPosition(a),l=o?this.toElementPosition(o):h;if(!d)return;this.elementMappings.push({id:d,type:"subgraph",position:{startLine:h.startLine,startColumn:h.startColumn,endLine:l.endLine,endColumn:l.endColumn,startIndex:h.startIndex,endIndex:l.endIndex}})}addConnectorMapping(t,r,a,o){let d=t?.text?.trim()??"";if(!d)return;let h=this.toElementPosition(a),l=o?this.toElementPosition(o):h;this.elementMappings.push({id:d,type:"connector",position:{startLine:h.startLine,startColumn:h.startColumn,endLine:l.endLine,endColumn:l.endColumn,startIndex:h.startIndex,endIndex:l.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(t){return this.elementMappings.find((r)=>r.id===t)}getElementsOnLine(t){return this.elementMappings.filter((r)=>t>=r.position.startLine&&t<=r.position.endLine)}getElementAtPosition(t,r){let a=this.elementMappings.filter((d)=>{let{startLine:h,startColumn:l,endLine:f,endColumn:m}=d.position;if(t<h||t>f)return!1;if(t===h&&r<l)return!1;if(t===f&&r>m)return!1;return!0});if(a.length===0)return;let o=e(({position:d})=>[d.endLine-d.startLine,d.endColumn-d.startColumn],"span");return a.reduce((d,h)=>{let[l,f]=o(d),[m,k]=o(h);if(m!==l)return m<l?h:d;return k<f?h:d})}getMappingStats(){let t=0,r=0,a=0,o=0,d=0;for(let h of this.elementMappings)if(h.type==="vertex")t++;else if(h.type==="edge")r++;else if(h.type==="subgraph")a++;else if(h.type==="connector")o++;else if(h.type==="attachment")d++;return{vertices:t,edges:r,subgraphs:a,connectors:o,attachments:d,totalElements:this.elementMappings.length}}emitDiagnostic(t,r,a,o){let d=o?.nodeId??o?.edgeId,h=d?this.getElementById(d):void 0,l={id:t,severity:r,message:a,...o?.nodeId?{nodeId:o.nodeId}:{},...o?.edgeId&&!o?.nodeId?{edgeId:o.edgeId}:{},...h?{position:h.position}:{}};if(this.diagnostics.some((k)=>k.id===l.id&&k.severity===l.severity&&k.message===l.message&&k.nodeId===l.nodeId&&k.edgeId===l.edgeId))return;this.diagnostics.push(l);let m=`agentflow[${t}]: ${a}`;if(r==="error")n.error(m);else n.warn(m)}emitWarning(t,r,a){this.emitDiagnostic(t,"warning",r,a)}emitError(t,r,a){this.emitDiagnostic(t,"error",r,a)}getDiagnostics(){return[...this.diagnostics]}},X1=e(function(t,r){return r.db.getClasses()},"getClasses"),Q1=e(async function(t,r,a,o){n.debug("Drawing agentflow diagram",r);let{securityLevel:d,agentflow:h,layout:l}=u();o.db.setDiagramId(r),n.debug("Before getData: ");let f=o.db.getData();n.debug("Data: ",f);let m=Ce(r,d),k=o.db.getDirection();if(f.type=o.type,f.layoutAlgorithm=Ee(l),f.layoutAlgorithm==="dagre"&&l==="elk")n.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback.");f.direction=k,f.nodeSpacing=h?.nodeSpacing||50,f.rankSpacing=h?.rankSpacing||50,f.markers=["point","circle","cross","hierarchy"],f.diagramId=r,n.debug("REF1:",f),await Se(f,m);let E=h?.diagramPadding??8;F.insertTitle(m,"agentflowTitleText",h?.titleTopMargin??0,o.db.getDiagramTitle()),pe(m,E,"agentflow",h?.useMaxWidth??!0)},"draw"),J1={getClasses:X1,draw:Q1},d1=function(){var t=e(function(Ke,x,T,D){for(T=T||{},D=Ke.length;D--;T[Ke[D]]=x);return T},"o"),r=[1,5],a=[1,4],o=[1,3],d=[1,6],h=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],l=[2,2],f=[1,15],m=[1,16],k=[1,17],E=[1,18],S=[1,19],N=[1,26],v=[1,27],W=[1,28],V=[1,30],C=[1,31],g=[1,32],b=[1,55],_=[1,54],q=[1,34],Ae=[1,35],Le=[1,36],Fe=[1,37],Be=[1,38],Q=[1,50],J=[1,52],Z=[1,48],ee=[1,53],te=[1,49],se=[1,56],ie=[1,51],re=[1,57],ne=[1,58],He=[1,39],qe=[1,40],Xe=[1,41],Qe=[1,42],Ze=[1,43],ze=[1,64],B=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],ce=[1,70],he=[1,68],be=[1,67],ke=[1,69],st=[8,9,10,12,78,80,81],it=[1,88],rt=[1,101],nt=[1,106],at=[1,105],ot=[1,102],lt=[1,98],dt=[1,104],ht=[1,100],pt=[1,107],ft=[1,103],gt=[1,108],bt=[1,99],$e=[8,9,10,11,12,43,78,80,81],oe=[8,9,10,11,12,43,49,78,80,81],Te=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],h1=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],kt=[47,63,92,105,108,109,112,114,117,118,119],p1=[1,131],f1=[1,132],Ft=[1,134],Vt=[1,133],g1=[47,63,65,77,92,105,108,109,112,114,117,118,119],It=[1,143],Lt=[1,157],Bt=[1,158],Mt=[1,159],wt=[1,162],yt=[1,161],Nt=[1,160],Rt=[1,145],Ot=[1,147],Pt=[1,151],b1=[1,139],k1=[1,140],Gt=[1,152],Ut=[1,153],jt=[1,154],zt=[1,155],Wt=[1,156],Ht=[1,163],Yt=[1,164],qt=[1,141],Xt=[1,142],Qt=[1,149],Jt=[1,144],Zt=[1,148],$t=[1,146],At=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],m1=[1,168],Et=[1,170],X=[8,9,10,12],De=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],G=[1,190],ue=[1,186],le=[1,187],U=[1,191],j=[1,188],z=[1,189],Ct=[80,119,122],K=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],A1=[11,109],We=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],Me=[1,269],we=[1,267],ye=[1,271],Ne=[1,265],Re=[1,266],Pe=[1,268],Ge=[1,270],Ue=[1,272],St=[1,292],E1=[8,9,10,12,109],Ie=[8,9,10,11,12,63,87,108,109,112,113,114,115],r1={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:e(function(x,T,D,c,H,s,w){var i=s.length-1;switch(H){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 198:this.$=s[i];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:c.setDirection("TB"),this.$="TB";break;case 14:c.setDirection(s[i-1]),this.$=s[i-1];break;case 32:this.$=s[i-1].nodes;break;case 38:if(this.$=c.addSubGraph(s[i-6],s[i-1],s[i-4],"flow"),c.addSubgraphMapping)c.addSubgraphMapping(s[i-6],s[i-4],w[i-8],w[i]);break;case 39:if(this.$=c.addSubGraph(s[i-7],s[i-1],s[i-5],"flow"),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],w[i-3]),c.addSubgraphMapping)c.addSubgraphMapping(s[i-7],s[i-5],w[i-9],w[i]);break;case 40:if(this.$=c.addSubGraph(s[i-3],s[i-1],{text:"",type:"text"},"flow"),c.addSubgraphMapping)c.addSubgraphMapping(s[i-3],{text:"",type:"text"},w[i-5],w[i]);break;case 41:if(this.$=c.addSubGraph(s[i-4],s[i-1],{text:"",type:"text"},"flow"),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],w[i-3]),c.addSubgraphMapping)c.addSubgraphMapping(s[i-4],{text:"",type:"text"},w[i-6],w[i]);break;case 42:if(this.$=c.addSubGraph(void 0,s[i-1],void 0,"flow"),c.addSubgraphMapping)c.addSubgraphMapping(void 0,void 0,w[i-3],w[i]);break;case 43:c.addGlobal(s[i-1]),this.$=[];break;case 44:if(this.$=c.addConnector(s[i-4],s[i-2]),c.addConnectorMapping)c.addConnectorMapping(s[i-4],s[i-2],w[i-6],w[i]);break;case 45:if(this.$=c.addConnector(s[i-5],s[i-3]),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],w[i-1]),c.addConnectorMapping)c.addConnectorMapping(s[i-5],s[i-3],w[i-7],w[i]);break;case 46:if(this.$=c.addConnector(s[i-1],{text:"",type:"text"}),c.addConnectorMapping)c.addConnectorMapping(s[i-1],{text:"",type:"text"},w[i-3],w[i]);break;case 47:if(this.$=c.addConnector(s[i-2],{text:"",type:"text"}),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],w[i-1]),c.addConnectorMapping)c.addConnectorMapping(s[i-2],{text:"",type:"text"},w[i-4],w[i]);break;case 49:this.$=s[i].trim(),c.setAccTitle(this.$);break;case 50:case 51:this.$=s[i].trim(),c.setAccDescription(this.$);break;case 56:this.$=s[i-1]+s[i];break;case 57:this.$=s[i];break;case 58:if(c.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],w[i]),c.extendVertexMapping)c.extendVertexMapping(s[i-1][s[i-1].length-1],w[i]);if(c.addLink(s[i-3].stmt,s[i-1],s[i-2]),c.addEdgeMapping)c.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 59:if(c.addLink(s[i-2].stmt,s[i],s[i-1]),c.addEdgeMapping)c.addEdgeMapping(s[i-2].stmt,s[i],s[i-1],this._$);this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 60:if(c.addLink(s[i-3].stmt,s[i-1],s[i-2]),c.addEdgeMapping)c.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 61:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 62:if(c.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],w[i]),c.extendVertexMapping)c.extendVertexMapping(s[i-1][s[i-1].length-1],w[i]);this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 63:this.$={stmt:s[i],nodes:s[i]};break;case 64:this.$=[s[i]];break;case 65:if(c.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4],w[i-4]),c.extendVertexMapping)c.extendVertexMapping(s[i-5][s[i-5].length-1],w[i-4]);this.$=s[i-5].concat(s[i]);break;case 66:this.$=s[i-4].concat(s[i]);break;case 67:this.$=s[i];break;case 68:this.$=s[i-2],c.setClass(s[i-2],s[i]);break;case 69:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"square"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"square",this._$);break;case 70:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"doublecircle"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"doublecircle",this._$);break;case 71:if(this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"circle"),c.addVertexMapping)c.addVertexMapping(s[i-5],s[i-2],"circle",this._$);break;case 72:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"ellipse"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"ellipse",this._$);break;case 73:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"stadium"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"stadium",this._$);break;case 74:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"subroutine"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"subroutine",this._$);break;case 75:if(this.$=s[i-7],c.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]])),c.addVertexMapping)c.addVertexMapping(s[i-7],s[i-1],"rect",this._$);break;case 76:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"cylinder"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"cylinder",this._$);break;case 77:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"round"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"round",this._$);break;case 78:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"diamond"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"diamond",this._$);break;case 79:if(this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"hexagon"),c.addVertexMapping)c.addVertexMapping(s[i-5],s[i-2],"hexagon",this._$);break;case 80:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"odd"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"odd",this._$);break;case 81:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"trapezoid"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"trapezoid",this._$);break;case 82:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"inv_trapezoid"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"inv_trapezoid",this._$);break;case 83:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_right"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"lean_right",this._$);break;case 84:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_left"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"lean_left",this._$);break;case 85:if(this.$=s[i],c.addVertex(s[i]),c.addVertexMapping)c.addVertexMapping(s[i],void 0,void 0,this._$);break;case 86:s[i-1].text=s[i],this.$=s[i-1];break;case 87:case 88:s[i-2].text=s[i-1],this.$=s[i-2];break;case 89:this.$=s[i];break;case 90:var Y=c.destructLink(s[i],s[i-2]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,text:s[i-1]};break;case 91:var Y=c.destructLink(s[i],s[i-2]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,text:s[i-1],id:s[i-3]};break;case 92:this.$={text:s[i],type:"text"};break;case 93:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 94:this.$={text:s[i],type:"string"};break;case 95:this.$={text:s[i],type:"markdown"};break;case 96:var Y=c.destructLink(s[i]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic};break;case 97:var Y=c.destructLink(s[i]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,id:s[i-1]};break;case 98:this.$=s[i-1];break;case 99:this.$={text:s[i],type:"text"};break;case 100:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 101:this.$={text:s[i],type:"string"};break;case 102:case 119:this.$={text:s[i],type:"markdown"};break;case 116:this.$={text:s[i],type:"text"};break;case 117:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 118:this.$={text:s[i],type:"text"};break;case 120:this.$=s[i-4],c.addClass(s[i-2],s[i]);break;case 121:this.$=s[i-4],c.setClass(s[i-2],s[i]);break;case 122:case 130:this.$=s[i-1],c.setClickEvent(s[i-1],s[i]);break;case 123:case 131:this.$=s[i-3],c.setClickEvent(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 124:this.$=s[i-2],c.setClickEvent(s[i-2],s[i-1],s[i]);break;case 125:this.$=s[i-4],c.setClickEvent(s[i-4],s[i-3],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 126:this.$=s[i-2],c.setLink(s[i-2],s[i]);break;case 127:this.$=s[i-4],c.setLink(s[i-4],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 128:this.$=s[i-4],c.setLink(s[i-4],s[i-2],s[i]);break;case 129:this.$=s[i-6],c.setLink(s[i-6],s[i-4],s[i]),c.setTooltip(s[i-6],s[i-2]);break;case 132:this.$=s[i-1],c.setLink(s[i-1],s[i]);break;case 133:this.$=s[i-3],c.setLink(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 134:this.$=s[i-3],c.setLink(s[i-3],s[i-2],s[i]);break;case 135:this.$=s[i-5],c.setLink(s[i-5],s[i-4],s[i]),c.setTooltip(s[i-5],s[i-2]);break;case 136:this.$=s[i-4],c.addVertex(s[i-2],void 0,void 0,s[i]);break;case 137:this.$=s[i-4],c.updateLink([s[i-2]],s[i]);break;case 138:this.$=s[i-4],c.updateLink(s[i-2],s[i]);break;case 139:this.$=s[i-8],c.updateLinkInterpolate([s[i-6]],s[i-2]),c.updateLink([s[i-6]],s[i]);break;case 140:this.$=s[i-8],c.updateLinkInterpolate(s[i-6],s[i-2]),c.updateLink(s[i-6],s[i]);break;case 141:this.$=s[i-6],c.updateLinkInterpolate([s[i-4]],s[i]);break;case 142:this.$=s[i-6],c.updateLinkInterpolate(s[i-4],s[i]);break;case 143:case 145:this.$=[s[i]];break;case 144:case 146:s[i-2].push(s[i]),this.$=s[i-2];break;case 148:this.$=s[i-1]+s[i];break;case 196:this.$=s[i];break;case 197:this.$=s[i-1]+""+s[i];break;case 199:this.$=s[i-1]+""+s[i];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,8:r,10:a,11:o,13:d},{1:[3]},t(h,l,{5:7}),{4:8,8:r,10:a,11:o,13:d},{4:9,8:r,10:a,11:o,13:d},{4:10,8:r,10:a,11:o,13:d},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:f,9:m,10:k,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,35:v,36:W,37:29,38:V,40:C,42:g,45:33,46:44,47:b,48:45,50:46,63:_,87:q,88:Ae,89:Le,90:Fe,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:qe,126:Xe,127:Qe,128:Ze},t(h,[2,10]),t(h,[2,11]),t(h,[2,12]),t(h,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:ze,16:59,19:62},t(B,[2,3]),t(B,[2,4]),t(B,[2,5]),t(B,[2,6]),t(B,[2,7]),t(B,[2,8]),t(B,[2,9]),{8:ce,9:he,10:be,12:ke,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:ce,9:he,10:be,12:ke,22:75},{8:ce,9:he,10:be,12:ke,22:76},{8:ce,9:he,10:be,12:ke,22:77},{8:ce,9:he,10:be,12:ke,22:78},{8:ce,9:he,10:be,12:ke,22:79},{8:ce,9:he,10:be,11:[1,80],12:ke,22:81},{8:ce,9:he,10:be,12:ke,22:82},{11:[1,83]},t(B,[2,48]),{39:[1,84]},{41:[1,85]},t(B,[2,51]),t(st,[2,63],{19:86,34:87,11:ze,43:it}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:rt,47:nt,63:at,83:[1,96],92:ot,98:[1,93],100:[1,94],104:95,108:lt,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},t(B,[2,200]),t(B,[2,201]),t(B,[2,202]),t(B,[2,203]),t(B,[2,204]),t($e,[2,64]),t($e,[2,67],{49:[1,109]}),t(oe,[2,85],{116:122,30:[1,110],47:b,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:_,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),t(Te,[2,196]),t(Te,[2,157]),t(Te,[2,158]),t(Te,[2,159]),t(Te,[2,160]),t(Te,[2,161]),t(Te,[2,162]),t(Te,[2,163]),t(Te,[2,164]),t(Te,[2,165]),t(Te,[2,166]),t(Te,[2,167]),t(h,[2,14]),t(h,[2,20]),t(h,[2,21]),{10:[1,123]},t(h,[2,23]),t(h1,[2,31],{19:124,11:ze}),t(B,[2,32]),{45:125,46:44,47:b,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},t(B,[2,52]),t(B,[2,53]),t(B,[2,54]),t(B,[2,55]),t(kt,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:p1,84:f1,119:Ft,122:Vt},{78:[1,135],80:[1,136]},t(g1,[2,96]),t(B,[2,33]),t(B,[2,34]),t(B,[2,35]),t(B,[2,36]),t(B,[2,37]),{11:It,13:Lt,15:Bt,28:Mt,29:137,33:wt,35:yt,36:Nt,47:Rt,63:Ot,78:Pt,83:b1,84:k1,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Ht,93:Yt,94:138,108:qt,112:Xt,114:Qt,117:Jt,118:Zt,119:$t},t(At,l,{5:165}),t(At,l,{5:166}),{11:It,13:Lt,15:Bt,28:Mt,29:167,33:wt,35:yt,36:Nt,47:Rt,63:Ot,78:Pt,83:b1,84:k1,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Ht,93:Yt,94:138,108:qt,112:Xt,114:Qt,117:Jt,118:Zt,119:$t},t(B,[2,49]),t(B,[2,50]),t(st,[2,61],{47:m1}),t(st,[2,62],{19:169,11:ze,43:Et}),t($e,[2,57]),{47:b,50:171,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{105:[1,172],106:173,108:[1,174]},{47:b,50:175,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{47:b,50:176,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},t(X,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},t(X,[2,130],{123:181,11:[1,180],15:rt,47:nt,63:at,92:ot,108:lt,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),t(X,[2,132],{11:[1,182]}),t(De,[2,198]),t(De,[2,185]),t(De,[2,186]),t(De,[2,187]),t(De,[2,188]),t(De,[2,189]),t(De,[2,190]),t(De,[2,191]),t(De,[2,192]),t(De,[2,193]),t(De,[2,194]),t(De,[2,195]),{47:b,50:183,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{31:184,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{31:192,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{31:194,53:[1,193],70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{31:195,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{31:196,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{31:197,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{112:[1,198]},{31:199,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{31:200,68:[1,201],70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{31:202,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{31:203,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{31:204,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},t(Te,[2,197]),t(h,[2,22]),t(h1,[2,30]),t(st,[2,59],{34:205,19:206,11:ze,43:it}),t(kt,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{80:[1,210],82:211,119:Ft,122:Vt},t(Ct,[2,92]),t(Ct,[2,94]),t(Ct,[2,95]),t(Ct,[2,183]),t(Ct,[2,184]),{79:212,82:130,83:p1,84:f1,119:Ft,122:Vt},t(g1,[2,97]),{8:ce,9:he,10:be,11:It,12:ke,13:Lt,15:Bt,22:214,28:Mt,30:[1,213],33:wt,34:215,35:yt,36:Nt,43:it,47:Rt,63:Ot,78:Pt,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Ht,93:Yt,94:216,108:qt,112:Xt,114:Qt,117:Jt,118:Zt,119:$t},t(K,[2,116]),t(K,[2,118]),t(K,[2,119]),t(K,[2,172]),t(K,[2,173]),t(K,[2,174]),t(K,[2,175]),t(K,[2,176]),t(K,[2,177]),t(K,[2,178]),t(K,[2,179]),t(K,[2,180]),t(K,[2,181]),t(K,[2,182]),t(K,[2,103]),t(K,[2,104]),t(K,[2,105]),t(K,[2,106]),t(K,[2,107]),t(K,[2,108]),t(K,[2,109]),t(K,[2,110]),t(K,[2,111]),t(K,[2,112]),t(K,[2,113]),t(K,[2,114]),t(K,[2,115]),{6:13,7:14,8:f,9:m,10:k,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,217],35:v,36:W,37:29,38:V,40:C,42:g,45:33,46:44,47:b,48:45,50:46,63:_,87:q,88:Ae,89:Le,90:Fe,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:qe,126:Xe,127:Qe,128:Ze},{6:13,7:14,8:f,9:m,10:k,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,218],35:v,36:W,37:29,38:V,40:C,42:g,45:33,46:44,47:b,48:45,50:46,63:_,87:q,88:Ae,89:Le,90:Fe,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:qe,126:Xe,127:Qe,128:Ze},{8:ce,9:he,10:be,11:It,12:ke,13:Lt,15:Bt,22:220,28:Mt,30:[1,219],33:wt,34:221,35:yt,36:Nt,43:it,47:Rt,63:Ot,78:Pt,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Ht,93:Yt,94:216,108:qt,112:Xt,114:Qt,117:Jt,118:Zt,119:$t},{11:ze,19:222},{47:[1,223]},t($e,[2,56]),{11:[1,224],47:b,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,225]},{11:[1,226],109:[1,227]},t(A1,[2,143]),{11:[1,228],47:b,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,229],47:b,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{83:[1,230]},t(X,[2,124],{11:[1,231]}),t(X,[2,126],{11:[1,232]}),{83:[1,233]},t(De,[2,199]),{83:[1,234],101:[1,235]},t($e,[2,68],{116:122,47:b,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),{32:[1,236],70:G,85:237,119:U,120:j,121:z},t(We,[2,99]),t(We,[2,101]),t(We,[2,102]),t(We,[2,168]),t(We,[2,169]),t(We,[2,170]),t(We,[2,171]),{52:[1,238],70:G,85:237,119:U,120:j,121:z},{31:239,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{54:[1,240],70:G,85:237,119:U,120:j,121:z},{56:[1,241],70:G,85:237,119:U,120:j,121:z},{58:[1,242],70:G,85:237,119:U,120:j,121:z},{60:[1,243],70:G,85:237,119:U,120:j,121:z},{63:[1,244]},{67:[1,245],70:G,85:237,119:U,120:j,121:z},{69:[1,246],70:G,85:237,119:U,120:j,121:z},{31:247,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},{32:[1,248],70:G,85:237,119:U,120:j,121:z},{70:G,72:[1,249],74:[1,250],85:237,119:U,120:j,121:z},{70:G,72:[1,252],74:[1,251],85:237,119:U,120:j,121:z},t(st,[2,58],{19:169,11:ze,43:Et}),t(st,[2,60],{47:m1}),t(kt,[2,88]),t(kt,[2,87]),{65:[1,253],70:G,85:237,119:U,120:j,121:z},t(kt,[2,90]),t(Ct,[2,93]),{80:[1,254],82:211,119:Ft,122:Vt},{31:255,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},t(At,l,{5:256}),{8:ce,9:he,10:be,12:ke,22:257,43:Et},t(K,[2,117]),t(B,[2,42]),t(B,[2,43]),{31:258,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},t(B,[2,46]),{8:ce,9:he,10:be,12:ke,22:259,43:Et},{46:260,47:b,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{11:ze,19:261},{11:Me,63:we,87:ye,95:262,108:Ne,110:263,111:264,112:Re,113:Pe,114:Ge,115:Ue},{11:Me,63:we,87:ye,95:273,107:[1,274],108:Ne,110:263,111:264,112:Re,113:Pe,114:Ge,115:Ue},{11:Me,63:we,87:ye,95:275,107:[1,276],108:Ne,110:263,111:264,112:Re,113:Pe,114:Ge,115:Ue},{108:[1,277]},{11:Me,63:we,87:ye,95:278,108:Ne,110:263,111:264,112:Re,113:Pe,114:Ge,115:Ue},{47:b,50:279,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},t(X,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},t(X,[2,131]),t(X,[2,133],{11:[1,283]}),t(X,[2,134]),t(oe,[2,69]),t(We,[2,100]),t(oe,[2,70]),{54:[1,284],70:G,85:237,119:U,120:j,121:z},t(oe,[2,77]),t(oe,[2,72]),t(oe,[2,73]),t(oe,[2,74]),{112:[1,285]},t(oe,[2,76]),t(oe,[2,78]),{69:[1,286],70:G,85:237,119:U,120:j,121:z},t(oe,[2,80]),t(oe,[2,81]),t(oe,[2,83]),t(oe,[2,82]),t(oe,[2,84]),t([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),t(kt,[2,91]),{32:[1,287],70:G,85:237,119:U,120:j,121:z},{6:13,7:14,8:f,9:m,10:k,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,288],35:v,36:W,37:29,38:V,40:C,42:g,45:33,46:44,47:b,48:45,50:46,63:_,87:q,88:Ae,89:Le,90:Fe,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:qe,126:Xe,127:Qe,128:Ze},t(At,l,{5:289}),{32:[1,290],70:G,85:237,119:U,120:j,121:z},t(B,[2,47]),t($e,[2,66]),{46:291,47:b,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},t(X,[2,136],{109:St}),t(E1,[2,145],{111:293,11:Me,63:we,87:ye,108:Ne,112:Re,113:Pe,114:Ge,115:Ue}),t(Ie,[2,147]),t(Ie,[2,149]),t(Ie,[2,150]),t(Ie,[2,151]),t(Ie,[2,152]),t(Ie,[2,153]),t(Ie,[2,154]),t(Ie,[2,155]),t(Ie,[2,156]),t(X,[2,137],{109:St}),{11:[1,294]},t(X,[2,138],{109:St}),{11:[1,295]},t(A1,[2,144]),t(X,[2,120],{109:St}),t(X,[2,121],{116:122,47:b,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),t(X,[2,125]),t(X,[2,127],{11:[1,296]}),t(X,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:ce,9:he,10:be,12:ke,22:301,34:302,43:it},t(B,[2,40]),{6:13,7:14,8:f,9:m,10:k,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,303],35:v,36:W,37:29,38:V,40:C,42:g,45:33,46:44,47:b,48:45,50:46,63:_,87:q,88:Ae,89:Le,90:Fe,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:qe,126:Xe,127:Qe,128:Ze},{8:ce,9:he,10:be,12:ke,22:304,34:305,43:it},t($e,[2,65]),{11:Me,63:we,87:ye,108:Ne,110:306,111:264,112:Re,113:Pe,114:Ge,115:Ue},t(Ie,[2,148]),{15:rt,47:nt,63:at,92:ot,104:307,108:lt,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},{15:rt,47:nt,63:at,92:ot,104:308,108:lt,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},{101:[1,309]},t(X,[2,135]),t(oe,[2,71]),{31:310,70:G,83:ue,84:le,85:185,119:U,120:j,121:z},t(oe,[2,79]),t(At,l,{5:311}),{8:ce,9:he,10:be,12:ke,22:312,43:Et},t(B,[2,41]),t(B,[2,44]),{8:ce,9:he,10:be,12:ke,22:313,43:Et},t(E1,[2,146],{111:293,11:Me,63:we,87:ye,108:Ne,112:Re,113:Pe,114:Ge,115:Ue}),t(X,[2,141],{123:181,11:[1,314],15:rt,47:nt,63:at,92:ot,108:lt,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),t(X,[2,142],{123:181,11:[1,315],15:rt,47:nt,63:at,92:ot,108:lt,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),t(X,[2,129]),{32:[1,316],70:G,85:237,119:U,120:j,121:z},{6:13,7:14,8:f,9:m,10:k,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,317],35:v,36:W,37:29,38:V,40:C,42:g,45:33,46:44,47:b,48:45,50:46,63:_,87:q,88:Ae,89:Le,90:Fe,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:qe,126:Xe,127:Qe,128:Ze},t(At,l,{5:318}),t(B,[2,45]),{11:Me,63:we,87:ye,95:319,108:Ne,110:263,111:264,112:Re,113:Pe,114:Ge,115:Ue},{11:Me,63:we,87:ye,95:320,108:Ne,110:263,111:264,112:Re,113:Pe,114:Ge,115:Ue},t(oe,[2,75]),t(B,[2,38]),{6:13,7:14,8:f,9:m,10:k,11:E,12:S,21:20,23:21,24:22,25:23,26:24,27:25,28:N,33:[1,321],35:v,36:W,37:29,38:V,40:C,42:g,45:33,46:44,47:b,48:45,50:46,63:_,87:q,88:Ae,89:Le,90:Fe,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:qe,126:Xe,127:Qe,128:Ze},t(X,[2,139],{109:St}),t(X,[2,140],{109:St}),t(B,[2,39])],defaultActions:{},parseError:e(function(x,T){if(T.recoverable)this.trace(x);else{var D=Error(x);throw D.hash=T,D}},"parseError"),parse:e(function(x){var T=this,D=[0],c=[],H=[null],s=[],w=this.table,i="",Y=0,C1=0,S1=0,R1=2,x1=1,O1=s.slice.call(arguments,1),ae=Object.create(this.lexer),et={yy:{}};for(var n1 in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,n1))et.yy[n1]=this.yy[n1];if(ae.setInput(x,et.yy),et.yy.lexer=ae,et.yy.parser=this,typeof ae.yylloc>"u")ae.yylloc={};var a1=ae.yylloc;s.push(a1);var P1=ae.options&&ae.options.ranges;if(typeof et.yy.parseError==="function")this.parseError=et.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function G1(_e){D.length=D.length-2*_e,H.length=H.length-_e,s.length=s.length-_e}e(G1,"popStack");function T1(){var _e=c.pop()||ae.lex()||x1;if(typeof _e!=="number"){if(_e instanceof Array)c=_e,_e=c.pop();_e=T.symbols_[_e]||_e}return _e}e(T1,"lex");var xe,o1,tt,ve,is,u1,xt={},t1,je,D1,s1;while(!0){if(tt=D[D.length-1],this.defaultActions[tt])ve=this.defaultActions[tt];else{if(xe===null||typeof xe>"u")xe=T1();ve=w[tt]&&w[tt][xe]}if(typeof ve>"u"||!ve.length||!ve[0]){var l1="";s1=[];for(t1 in w[tt])if(this.terminals_[t1]&&t1>R1)s1.push("'"+this.terminals_[t1]+"'");if(ae.showPosition)l1="Parse error on line "+(Y+1)+`:
|
|
23
23
|
`+ae.showPosition()+`
|
|
24
|
-
Expecting `+s1.join(", ")+", got '"+(this.terminals_[
|
|
24
|
+
Expecting `+s1.join(", ")+", got '"+(this.terminals_[xe]||xe)+"'";else l1="Parse error on line "+(Y+1)+": Unexpected "+(xe==x1?"end of input":"'"+(this.terminals_[xe]||xe)+"'");this.parseError(l1,{text:ae.match,token:this.terminals_[xe]||xe,line:ae.yylineno,loc:a1,expected:s1})}if(ve[0]instanceof Array&&ve.length>1)throw Error("Parse Error: multiple actions possible at state: "+tt+", token: "+xe);switch(ve[0]){case 1:if(D.push(xe),H.push(ae.yytext),s.push(ae.yylloc),D.push(ve[1]),xe=null,!o1){if(C1=ae.yyleng,i=ae.yytext,Y=ae.yylineno,a1=ae.yylloc,S1>0)S1--}else xe=o1,o1=null;break;case 2:if(je=this.productions_[ve[1]][1],xt.$=H[H.length-je],xt._$={first_line:s[s.length-(je||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(je||1)].first_column,last_column:s[s.length-1].last_column},P1)xt._$.range=[s[s.length-(je||1)].range[0],s[s.length-1].range[1]];if(u1=this.performAction.apply(xt,[i,C1,Y,et.yy,ve[1],H,s].concat(O1)),typeof u1<"u")return u1;if(je)D=D.slice(0,-1*je*2),H=H.slice(0,-1*je),s=s.slice(0,-1*je);D.push(this.productions_[ve[1]][0]),H.push(xt.$),s.push(xt._$),D1=w[D[D.length-2]][D[D.length-1]],D.push(D1);break;case 3:return!0}}return!0},"parse")},N1=function(){var Ke={EOF:1,parseError:e(function(T,D){if(this.yy.parser)this.yy.parser.parseError(T,D);else throw Error(T)},"parseError"),setInput:e(function(x,T){if(this.yy=T||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var T=x.match(/(?:\r\n?|\n).*/g);if(T)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),x},"input"),unput:e(function(x){var T=x.length,D=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var c=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),D.length-1)this.yylineno-=D.length-1;var H=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:D?(D.length===c.length?this.yylloc.first_column:0)+c[c.length-D.length].length-D[0].length:this.yylloc.first_column-T},this.options.ranges)this.yylloc.range=[H[0],H[0]+this.yyleng-T];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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).
|
|
25
25
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(x){this.unput(this.match.slice(x))},"less"),pastInput:e(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var x=this.match;if(x.length<20)x+=this._input.substr(0,20-x.length);return(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var x=this.pastInput(),T=Array(x.length+1).join("-");return x+this.upcomingInput()+`
|
|
26
|
-
`+T+"^"},"showPosition"),test_match:e(function(x,T){var
|
|
27
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var T=this.next();if(T)return T;else return this.lex()},"lex"),begin:e(function(T){this.conditionStack.push(T)},"begin"),popState:e(function(){var T=this.conditionStack.length-1;if(T>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(T){if(T=this.conditionStack.length-1-Math.abs(T||0),T>=0)return this.conditionStack[T];else return"INITIAL"},"topState"),pushState:e(function(T){this.begin(T)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(T,v,c,H){var s=H;switch(c){case 0:return this.begin("acc_title"),38;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),40;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),v.yytext="",43;break;case 8:return this.pushState("shapeDataStr"),43;break;case 9:return this.popState(),43;break;case 10:let w=/\n\s*/g;return v.yytext=v.yytext.replace(w,"<br/>"),43;break;case 11:return 43;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 98;case 17:this.popState();break;case 18:return 99;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 91;case 35:if(T.lex.firstGraph())this.begin("dir");return 13;case 36:if(T.lex.firstGraph())return this.begin("dir"),13;return 112;case 37:return 28;case 38:return 36;case 39:return 35;case 40:return 33;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return 101;case 45:return this.popState(),14;break;case 46:return this.popState(),15;break;case 47:return this.popState(),15;break;case 48:return this.popState(),15;break;case 49:return this.popState(),15;break;case 50:return this.popState(),15;break;case 51:return this.popState(),15;break;case 52:return this.popState(),15;break;case 53:return this.popState(),15;break;case 54:return this.popState(),15;break;case 55:return this.popState(),15;break;case 56:return 124;case 57:return 125;case 58:return 126;case 59:return 127;case 60:return 128;case 61:return 81;case 62:return 108;case 63:return 114;case 64:return 49;case 65:return 63;case 66:return 47;case 67:return 9;case 68:return 109;case 69:return 118;case 70:return this.popState(),80;break;case 71:return this.pushState("edgeText"),78;break;case 72:return 122;case 73:return 80;case 74:break;case 75:return this.popState(),56;break;case 76:return"TEXT";case 77:return this.pushState("ellipseText"),55;break;case 78:return this.popState(),58;break;case 79:return this.pushState("text"),57;break;case 80:return this.popState(),60;break;case 81:return this.pushState("text"),59;break;case 82:return 61;case 83:return this.pushState("text"),70;break;case 84:return this.popState(),67;break;case 85:return this.pushState("text"),66;break;case 86:return this.popState(),52;break;case 87:return this.pushState("text"),51;break;case 88:break;case 89:return this.popState(),72;break;case 90:return this.popState(),74;break;case 91:return 120;case 92:return this.pushState("trapText"),71;break;case 93:return this.pushState("trapText"),73;break;case 94:return 121;case 95:return 70;case 96:return 93;case 97:return"SEP";case 98:return 92;case 99:return 118;case 100:return 114;case 101:return 47;case 102:return 8;case 103:return 112;case 104:return 117;case 105:return 119;case 106:return this.popState(),65;break;case 107:return this.pushState("text"),65;break;case 108:return this.popState(),54;break;case 109:return this.pushState("text"),53;break;case 110:return this.popState(),32;break;case 111:return this.pushState("text"),30;break;case 112:return this.popState(),69;break;case 113:return this.pushState("text"),68;break;case 114:break;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 10;case 118:return 11;case 119:return 12}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:agentflow-beta\b)/,/^(?:agentflow(?=[\s;]|$))/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},href:{rules:[21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,70,72,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,77,79,81,85,87,88,89,90,91,92,93,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,74,75,76,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},text:{rules:[21,24,77,78,79,80,81,84,85,86,87,92,93,106,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,77,79,81,82,83,85,87,92,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,116,117,118,119],inclusive:!0}}};return Ke}();r1.lexer=N1;function e1(){this.yy={}}return e(e1,"Parser"),e1.prototype=r1,r1.Parser=e1,new e1}();d1.parser=d1;var w1=d1,y1=Object.assign({},w1);y1.parse=(t)=>{let r=t.replace(/}[^\S\n]*\n/g,`}
|
|
28
|
-
`);return w1.parse(r)};var Z1=y1,$1=e((t)=>{let{theme:r,bkgColorArray:a,borderColorArray:o}=t;if(!
|
|
26
|
+
`+T+"^"},"showPosition"),test_match:e(function(x,T){var D,c,H;if(this.options.backtrack_lexer){if(H={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)H.yylloc.range=this.yylloc.range.slice(0)}if(c=x[0].match(/(?:\r\n?|\n).*/g),c)this.yylineno+=c.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],D=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(D)return D;else if(this._backtrack){for(var s in H)this[s]=H[s];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var x,T,D,c;if(!this._more)this.yytext="",this.match="";var H=this._currentRules();for(var s=0;s<H.length;s++)if(D=this._input.match(this.rules[H[s]]),D&&(!T||D[0].length>T[0].length)){if(T=D,c=s,this.options.backtrack_lexer)if(x=this.test_match(D,H[s]),x!==!1)return x;else if(this._backtrack){T=!1;continue}else return!1;else if(!this.options.flex)break}if(T){if(x=this.test_match(T,H[c]),x!==!1)return x;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
27
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var T=this.next();if(T)return T;else return this.lex()},"lex"),begin:e(function(T){this.conditionStack.push(T)},"begin"),popState:e(function(){var T=this.conditionStack.length-1;if(T>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(T){if(T=this.conditionStack.length-1-Math.abs(T||0),T>=0)return this.conditionStack[T];else return"INITIAL"},"topState"),pushState:e(function(T){this.begin(T)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(T,D,c,H){var s=H;switch(c){case 0:return this.begin("acc_title"),38;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),40;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),D.yytext="",43;break;case 8:return this.pushState("shapeDataStr"),43;break;case 9:return this.popState(),43;break;case 10:let w=/\n\s*/g;return D.yytext=D.yytext.replace(w,"<br/>"),43;break;case 11:return 43;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 98;case 17:this.popState();break;case 18:return 99;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 91;case 35:if(T.lex.firstGraph())this.begin("dir");return 13;case 36:if(T.lex.firstGraph())return this.begin("dir"),13;return 112;case 37:return 28;case 38:return 36;case 39:return 35;case 40:return 33;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return 101;case 45:return this.popState(),14;break;case 46:return this.popState(),15;break;case 47:return this.popState(),15;break;case 48:return this.popState(),15;break;case 49:return this.popState(),15;break;case 50:return this.popState(),15;break;case 51:return this.popState(),15;break;case 52:return this.popState(),15;break;case 53:return this.popState(),15;break;case 54:return this.popState(),15;break;case 55:return this.popState(),15;break;case 56:return 124;case 57:return 125;case 58:return 126;case 59:return 127;case 60:return 128;case 61:return 81;case 62:return 108;case 63:return 114;case 64:return 49;case 65:return 63;case 66:return 47;case 67:return 9;case 68:return 109;case 69:return 118;case 70:return this.popState(),80;break;case 71:return this.pushState("edgeText"),78;break;case 72:return 122;case 73:return 80;case 74:break;case 75:return this.popState(),56;break;case 76:return"TEXT";case 77:return this.pushState("ellipseText"),55;break;case 78:return this.popState(),58;break;case 79:return this.pushState("text"),57;break;case 80:return this.popState(),60;break;case 81:return this.pushState("text"),59;break;case 82:return 61;case 83:return this.pushState("text"),70;break;case 84:return this.popState(),67;break;case 85:return this.pushState("text"),66;break;case 86:return this.popState(),52;break;case 87:return this.pushState("text"),51;break;case 88:break;case 89:return this.popState(),72;break;case 90:return this.popState(),74;break;case 91:return 120;case 92:return this.pushState("trapText"),71;break;case 93:return this.pushState("trapText"),73;break;case 94:return 121;case 95:return 70;case 96:return 93;case 97:return"SEP";case 98:return 92;case 99:return 118;case 100:return 114;case 101:return 47;case 102:return 8;case 103:return 112;case 104:return 117;case 105:return 119;case 106:return this.popState(),65;break;case 107:return this.pushState("text"),65;break;case 108:return this.popState(),54;break;case 109:return this.pushState("text"),53;break;case 110:return this.popState(),32;break;case 111:return this.pushState("text"),30;break;case 112:return this.popState(),69;break;case 113:return this.pushState("text"),68;break;case 114:break;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 10;case 118:return 11;case 119:return 12}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:agentflow-beta\b)/,/^(?:agentflow(?=[\s;]|$))/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},href:{rules:[21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,70,72,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,77,79,81,85,87,88,89,90,91,92,93,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,74,75,76,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},text:{rules:[21,24,77,78,79,80,81,84,85,86,87,92,93,106,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,77,79,81,85,87,92,93,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,77,79,81,82,83,85,87,92,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,116,117,118,119],inclusive:!0}}};return Ke}();r1.lexer=N1;function e1(){this.yy={}}return e(e1,"Parser"),e1.prototype=r1,r1.Parser=e1,new e1}();d1.parser=d1;var w1=d1,y1=Object.assign({},w1);y1.parse=(t)=>{let r=t.replace(/}[^\S\n]*\n/g,`}
|
|
28
|
+
`);return w1.parse(r)};var Z1=y1,$1=e((t)=>{let{theme:r,bkgColorArray:a,borderColorArray:o}=t;if(!de(r,o))return"";let d=fe(t.look),h=ge(a),l=Je(t.THEME_COLOR_LIMIT,o),f=e((E)=>o[E%o.length],"border"),m=e((E)=>h?`fill: ${a[E%a.length]};`:"","fill"),k="";for(let E of K1){let S=i1.get(E),N=`[data-look="${d}"].node.${V1(E)}`;k+=`
|
|
29
29
|
|
|
30
30
|
${N} rect,
|
|
31
31
|
${N} path,
|
|
32
32
|
${N} polygon {
|
|
33
|
-
stroke: ${
|
|
34
|
-
${
|
|
33
|
+
stroke: ${f(S)};
|
|
34
|
+
${m(S)}
|
|
35
35
|
}
|
|
36
|
-
`}for(let E=0;E<I1(l);E++){let S=L1(E,l),N=`[data-look="${d}"][data-color-id="color-${S}"].cluster`,
|
|
36
|
+
`}for(let E=0;E<I1(l);E++){let S=L1(E,l),N=`[data-look="${d}"][data-color-id="color-${S}"].cluster`,v=`[data-look="${d}"][data-color-id="color-${S}"].node`,W=e((V)=>`${N} ${V}, ${v} ${V}`,"rule");k+=`
|
|
37
37
|
|
|
38
38
|
${W("rect")},
|
|
39
39
|
${W("path")} {
|
|
40
|
-
stroke: ${
|
|
41
|
-
${
|
|
40
|
+
stroke: ${f(S)};
|
|
41
|
+
${m(S)}
|
|
42
42
|
}
|
|
43
|
-
`}return
|
|
43
|
+
`}return k},"genColor"),es=e((t,r)=>{let a=mt,o=a(t,"r"),d=a(t,"g"),h=a(t,"b");return me(o,d,h,r)},"fade"),ts=e((t)=>`${$1(t)}
|
|
44
44
|
.label {
|
|
45
45
|
font-family: ${t.fontFamily};
|
|
46
46
|
color: ${t.nodeTextColor||t.textColor};
|
|
@@ -196,5 +196,5 @@ Expecting `+s1.join(", ")+", got '"+(this.terminals_[Ce]||Ce)+"'";else l1="Parse
|
|
|
196
196
|
}
|
|
197
197
|
text-align: center;
|
|
198
198
|
}
|
|
199
|
-
${
|
|
200
|
-
`,"getStyles"),ss=ts,Fs={parser:Z1,get db(){return new q1},renderer:J1,styles:ss,init:e((t)=>{if(t.agentflow??={},t.layout)
|
|
199
|
+
${Ye()}
|
|
200
|
+
`,"getStyles"),ss=ts,Fs={parser:Z1,get db(){return new q1},renderer:J1,styles:ss,init:e((t)=>{if(t.agentflow??={},t.layout)Dt({layout:t.layout});t.flowchart??={},t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Dt({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")};export{Fs as diagram};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{ee}from"./index.
|
|
2
|
-
`),t=new Map,o=-1;for(let[g,d]of r.entries())if(d.trim()==="treeView-beta"){o=g;break}if(o===-1)return{text:i,lineMap:t};let c=[];for(let g=o+1;g<r.length;g++){let d=r[g];if(d.trim()===""||_.test(d)||
|
|
3
|
-
`),lineMap:t}}e(
|
|
4
|
-
`+i);let c=o.db,s=c.getRoot(),a=c.getConfig(),l=
|
|
1
|
+
import{ee}from"./index.0g1t1pjx.js";import{Pr}from"./index.a3njhfdd.js";import{e,n,B,k,q,j,A,L,R,I,M,P,O,X,pr,tt,Y}from"./index.zkx4ryzt.js";import{oe}from"./index.6pzexww5.js";var H=/[─━│┃└┗├┣]/,W=/[└┗├┣]/,K=/[─━]/,E=/^[\s│┃]+$/,D=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,_=/^\s*%%/,Q=" ";function z(i){return i.some((r)=>H.test(r))}e(z,"isBoxDrawingFormat");function G(i){for(let r of i){let t=W.exec(r);if(t?.index&&t.index>0)return t.index}return 4}e(G,"inferSegmentWidth");function F(i,r){return i.replace(/\bline\s+(\d+)\b/gi,(t,o)=>{let c=parseInt(o,10),s=r.get(c);return s?`line ${s}`:t})}e(F,"remapErrorLines");function Z(i){let r=i.split(`
|
|
2
|
+
`),t=new Map,o=-1;for(let[g,d]of r.entries())if(d.trim()==="treeView-beta"){o=g;break}if(o===-1)return{text:i,lineMap:t};let c=[];for(let g=o+1;g<r.length;g++){let d=r[g];if(d.trim()===""||_.test(d)||D.test(d))continue;if(E.test(d))continue;c.push(d.replace(/\t/g," "))}if(!z(c))return{text:i,lineMap:t};let s=G(c),a=[],l=0;for(let g=0;g<=o;g++)a.push(r[g]),l++,t.set(l,g+1);for(let g=o+1;g<r.length;g++){let d=r[g],p=d.trim(),f=g+1;if(p===""){a.push(d),l++,t.set(l,f);continue}if(_.test(d)){a.push(d),l++,t.set(l,f);continue}if(D.test(d)){a.push(d),l++,t.set(l,f);continue}if(E.test(d))continue;let h=d.replace(/\t/g," "),w=W.exec(h);if(w?.index!==void 0){let u=w.index,x=Math.round(u/s)+1,m=u+1;while(m<h.length&&K.test(h[m]))m++;while(m<h.length&&h[m]===" ")m++;let b=h.slice(m).trimEnd();if(!b)throw Error(`Line ${f}: Empty node — expected a filename or directory name after the box-drawing prefix`);let J=Q.repeat(x);a.push(J+b),l++,t.set(l,f)}else if(/^[\s─━│┃└┗├┣]+$/.test(h))continue;else if(H.test(h))a.push(d),l++,t.set(l,f);else if(/^\s+/.test(h))throw Error(`Line ${f}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);else a.push(d),l++,t.set(l,f)}return{text:a.join(`
|
|
3
|
+
`),lineMap:t}}e(Z,"preprocessBoxDrawing");var v=new Pr(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),te=e(()=>{v.reset(),A()},"clear"),re=e(()=>v.records.stack[0],"getRoot"),ne=e(()=>v.records.cnt,"getCount"),ie=B.treeView,se=e(()=>Y(ie,k().treeView),"getConfig"),ae=e((i,r,t,o,c,s)=>{while(i<=v.records.stack[v.records.stack.length-1].level)v.records.stack.pop();let a={id:v.records.cnt++,level:i,name:r,nodeType:t,icon:c,cssClass:o,description:s,children:[]};v.records.stack[v.records.stack.length-1].children.push(a),v.records.stack.push(a)},"addNode"),ce={clear:te,addNode:ae,getRoot:re,getCount:ne,getConfig:se,getAccTitle:R,getAccDescription:M,getDiagramTitle:O,setAccDescription:I,setAccTitle:L,setDiagramTitle:P},y=ce,le=e((i)=>{ee(i,y);for(let r of i.nodes){let t=typeof r.indent==="number"?r.indent:0,o=r.name,c=o.endsWith("/");if(c)o=o.slice(0,-1);let s=c?"directory":"file",a=r.classAnnotation||void 0,l=r.iconAnnotation,g=l!==void 0?l||"none":void 0,d=r.descAnnotation||void 0,p=d?q(d,k()):void 0;y.addNode(t,o,s,a,g,p)}},"populate"),de={parse:e(async(i)=>{let{text:r,lineMap:t}=Z(i);try{let o=await oe("treeView",r);n.debug(o),le(o)}catch(o){if(t.size>0&&o instanceof Error)o.message=F(o.message,t);throw o}},"parse")},C={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function U(i,r){let t=r?.filenameIcons?.[i];if(t)return t;let o=i.lastIndexOf(".");if(o>0){let c=i.substring(o).toLowerCase(),s=r?.extensionIcons;return s?.[c]??s?.[c.slice(1)]}return}e(U,"detectIcon");function T(i,r){if(i.includes(":"))return i;if(i in C.icons||!r)return`${C.prefix}:${i}`;return`${r}:${i}`}e(T,"qualifyIcon");function N(i,r){if(i.icon==="none")return;if(i.icon)return T(i.icon,r.defaultIconPack);if(!r.showIcons)return;if(i.nodeType==="file"){let t=U(i.name,r);if(t==="none")return;if(t)return T(t,r.defaultIconPack)}return`${C.prefix}:${i.nodeType==="directory"?"folder":"file"}`}e(N,"getNodeIcon");pr([{name:C.prefix,icons:C}]);var V=14,he=4,pe=16,fe=e(async(i,r)=>{let t=[],o=e((s)=>{let a=N(s,r);if(a)t.push({icon:a,node:s});s.children.forEach(o)},"collect");o(i);let c=await Promise.all(t.map(async({icon:s,node:a})=>({id:a.id,svg:await tt(s,{height:V,width:V})})));return new Map(c.map(({id:s,svg:a})=>[s,a]))},"resolveNodeIcons"),ge=e((i,r,t,o,c,s)=>{let a=o.append("g"),l="treeView-node-label";if(t.nodeType==="directory")l+=" treeView-node-dir";if(t.cssClass)l+=` ${t.cssClass}`;let g=V+he,d=N(t,c),p=d!==void 0;if(d)a.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${i+c.paddingX}, ${r+c.paddingY})`).html(s.get(t.id)??"");let f=a.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:h,width:w}=f.node().getBBox(),u=h+c.paddingY*2,x=i+c.paddingX+(p?g:0);f.attr("x",x),f.attr("y",r+u/2);let m=x+w,b=w+c.paddingX*2+(p?g:0);if(t.BBox={x:i,y:r,width:b,height:u},t.cssClass?.split(/\s+/).includes("highlight"))a.insert("rect",":first-child").attr("x",i).attr("y",r+1).attr("width",0).attr("height",u-2).attr("rx",3).attr("class","treeView-highlight-bg");return{node:t,nodeGroup:a,labelRightEdge:m,centerY:r+u/2}},"positionLabel"),S=e((i,r,t,o,c,s)=>i.append("line").attr("x1",r).attr("y1",t).attr("x2",o).attr("y2",c).attr("stroke-width",s).attr("class","treeView-node-line"),"positionLine"),ue=e((i,r,t,o)=>{let c=0,s=0,a=[],l=e((p,f,h,w)=>{let u=w*(h.rowIndent+h.paddingX),x=ge(u,c,f,p,h,o);a.push(x);let{height:m,width:b}=f.BBox;S(p,u-h.rowIndent,c+m/2,u,c+m/2,h.lineThickness),s=Math.max(s,u+b),c+=m},"drawNode"),g=e((p,f=0)=>{l(i,p,t,f),p.children.forEach((x)=>{g(x,f+1)});let{x:h,y:w,height:u}=p.BBox;if(p.children.length){let{y:x,height:m}=p.children[p.children.length-1].BBox;S(i,h+t.paddingX,w+u,h+t.paddingX,x+m/2+t.lineThickness/2,t.lineThickness)}},"processNode");g(r);let d=a.filter((p)=>p.node.description);if(d.length>0){let f=Math.max(...a.map((h)=>h.labelRightEdge))+pe;for(let h of d){let u=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",h.centerY).node().getBBox();s=Math.max(s,f+u.width+t.paddingX)}}for(let p of a)if(p.node.cssClass?.split(/\s+/).includes("highlight")){let f=p.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let h=s-p.node.BBox.x+8;f.attr("width",h),s=Math.max(s,p.node.BBox.x+h+2)}}return{totalHeight:c,totalWidth:s}},"drawTree"),me=e(async(i,r,t,o)=>{n.debug(`Rendering treeView diagram
|
|
4
|
+
`+i);let c=o.db,s=c.getRoot(),a=c.getConfig(),l=X(r),g=l.append("g");g.attr("class","tree-view");let d=await fe(s,a),{totalHeight:p,totalWidth:f}=ue(g,s,a,d);l.attr("viewBox",`-${a.lineThickness/2} 0 ${f} ${p}`),j(l,p,f,a.useMaxWidth)},"draw"),we={draw:me},xe=we,ve={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},be=e(({treeView:i})=>{let{labelFontSize:r,labelColor:t,lineColor:o,iconColor:c,descriptionColor:s,highlightBg:a,highlightStroke:l}=Y(ve,i);return`
|
|
5
5
|
.treeView-node-label {
|
|
6
6
|
font-size: ${r};
|
|
7
7
|
fill: ${t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ee}from"./index.
|
|
1
|
+
import{ee}from"./index.0g1t1pjx.js";import{e,n,B,k,j,A,L,R,I,M,P,O,X,Y}from"./index.zkx4ryzt.js";import{oe}from"./index.6pzexww5.js";var E=B.packet,S=class{constructor(){this.packet=[],this.setAccTitle=L,this.getAccTitle=R,this.setDiagramTitle=P,this.getDiagramTitle=O,this.getAccDescription=M,this.setAccDescription=I}static{e(this,"PacketDB")}getConfig(){let t=Y({...E,...k().packet});if(t.showBits)t.paddingY+=10;return t}getPacket(){return this.packet}pushWord(t){if(t.length>0)this.packet.push(t)}clear(){A(),this.packet=[]}},F=1e4,W=e((t,r)=>{ee(t,r);let o=-1,i=[],l=1,{bitsPerRow:d}=r.getConfig();for(let{start:a,end:s,bits:g,label:f}of t.blocks){if(a!==void 0&&s!==void 0&&s<a)throw Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if(a??=o+1,a!==o+1)throw Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${o+1}.`);if(g===0)throw Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);s??=a+(g??1)-1,g??=s-a+1,o=s,n.debug(`Packet block ${a} - ${o} with label ${f}`);while(i.length<=d+1&&r.getPacket().length<F){let[p,h]=_({start:a,end:s,bits:g,label:f},l,d);if(i.push(p),p.end+1===l*d)r.pushWord(i),i=[],l++;if(!h)break;({start:a,end:s,bits:g,label:f}=h)}}r.pushWord(i)},"populate"),_=e((t,r,o)=>{if(t.start===void 0)throw Error("start should have been set during first phase");if(t.end===void 0)throw Error("end should have been set during first phase");if(t.start>t.end)throw Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=r*o)return[t,void 0];let i=r*o-1,l=r*o;return[{start:t.start,end:i,label:t.label,bits:i-t.start},{start:l,end:t.end,label:t.label,bits:t.end-l}]},"getNextFittingBlock"),D={parser:{yy:void 0},parse:e(async(t)=>{let r=await oe("packet",t),o=D.parser?.yy;if(!(o instanceof S))throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");n.debug(r),W(r,o)},"parse")},N=e((t,r,o,i)=>{let l=i.db,d=l.getConfig(),{rowHeight:a,paddingY:s,bitWidth:g,bitsPerRow:f}=d,p=l.getPacket(),h=l.getDiagramTitle(),w=a+s,c=w*(p.length+1)-(h?0:a),m=g*f+2,u=X(r);u.attr("viewBox",`0 0 ${m} ${c}`),j(u,c,m,d.useMaxWidth);for(let[y,b]of p.entries())G(u,b,y,d);u.append("text").text(h).attr("x",m/2).attr("y",c-w/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),G=e((t,r,o,{rowHeight:i,paddingX:l,paddingY:d,bitWidth:a,bitsPerRow:s,showBits:g,bitOrder:f})=>{let p=t.append("g"),h=o*(i+d)+d,w=f==="descending";for(let c of r){let m=c.end-c.start+1,u=c.start%s,b=(w?s-u-m:u)*a+1,v=m*a-l;if(p.append("rect").attr("x",b).attr("y",h).attr("width",v).attr("height",i).attr("class","packetBlock"),p.append("text").attr("x",b+v/2).attr("y",h+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),!g)continue;let[T,z]=w?[c.end,c.start]:[c.start,c.end],x=m===1,C=h-2;if(p.append("text").attr("x",b+(x?v/2:0)).attr("y",C).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",x?"middle":"start").text(T),!x)p.append("text").attr("x",b+v).attr("y",C).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(z)}},"drawWord"),H={draw:N},K={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},U=e(({packet:t}={})=>{let r=Y(K,t);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${r.byteFontSize};
|
|
4
4
|
}
|
|
@@ -21,4 +21,4 @@ import{ee}from"./index.r0p3fm9f.js";import{e,n,F,k,j,A,L,R,I,M,D,O,Y,K}from"./in
|
|
|
21
21
|
stroke-width: ${r.blockStrokeWidth};
|
|
22
22
|
fill: ${r.blockFillColor};
|
|
23
23
|
}
|
|
24
|
-
`},"styles"),rt={parser:
|
|
24
|
+
`},"styles"),rt={parser:D,get db(){return new S},renderer:H,styles:U};export{rt as diagram};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{ee}from"./index.0g1t1pjx.js";import{e,n,B,k,q,A,L,R,I,M,P,O,u,ra,p,Yr,Fa,Y}from"./index.zkx4ryzt.js";import{ka,oe}from"./index.6pzexww5.js";var H="position frame",U="frame positioned",E="position relation",_="relation positioned",pe=e(function(t){n.debug("options str",t)},"setOptions"),ve=e(function(){return{}},"getOptions"),be=e(function(){G(),A()},"clear");function G(){S={}}e(G,"reset");var we=B.eventmodeling,ye=e(()=>Y({...we,...k().eventmodeling}),"getConfig"),S={};function V(){let t=Pe,{ast:r}=S,i=T();if(!r)throw Error("No data for EventModel");return r.frames.forEach((a,o)=>{let s=Z(a,r.dataEntities,i);t=y(t,{$kind:H,index:o,frame:a,textProps:s});let l=void 0;if(se(a))n.debug("source frame",a.sourceFrames),l=r.frames.filter((c)=>a.sourceFrames.some((m)=>m.$refText===c.name)),l.forEach((c)=>{t=y(t,{$kind:E,index:o,frame:a,sourceFrame:c})});else t=y(t,{$kind:E,index:o,frame:a})}),t={...t,sortedSwimlanesArray:C(t.swimlanes)},t}e(V,"getState");function X(t){S.ast=void 0;let r=new Set;for(let i of t.frames){if(r.has(i.name)){let a=i.$cstNode?.range.start.line,o=a===void 0?"":` on line ${a+1}`;throw Error(`Duplicate event modeling frame ID "${i.name}"${o}`)}r.add(i.name)}S.ast=t}e(X,"setAst");var d={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function T(){return d}e(T,"getDiagramProps");var Pe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function j(t){let r=t.split(".");if(r.length===2)return r[0];return}e(j,"extractNamespace");function z(t){let r=t.split(".");if(r.length===2)return r[1];return t}e(z,"extractName");function K(t,r){if(!r||r.length===0)return;return Object.values(t).find((i)=>i.namespace===r)}e(K,"findSwimlaneByNamespace");function w(t,r,i){return Math.max(r,...Object.keys(t).filter((a)=>{let o=Number.parseInt(a);return o>r&&o<i}).map((a)=>Number.parseInt(a)))+1}e(w,"findNextAvailableIndex");function J(t,r){let i=j(t.entityIdentifier),a=K(r,i);switch(t.modelEntityType){case"ui":case"pcr":case"processor":if(a)return{index:a.index,label:a.namespace||d.labelUiAutomation};else if(i)return{index:w(r,0,100),label:d.labelUiAutomationPrefix+i};return{index:0,label:d.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":if(a)return{index:a.index,label:a.namespace||d.labelCommandReadModel};else if(i)return{index:w(r,100,200),label:d.labelCommandReadModelPrefix+i};return{index:100,label:d.labelCommandReadModel};case"evt":case"event":default:if(a)return{index:a.index,label:a.namespace||d.labelEvents};else if(i)return{index:w(r,200,300),label:d.labelEventsPrefix+i};return{index:200,label:d.labelEvents}}}e(J,"calculateSwimlaneProps");function Q(t){let{themeVariables:r}=k();switch(t.modelEntityType){case"ui":return{fill:r.emUiFill??"white",stroke:r.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:r.emProcessorFill??"#edb3f6",stroke:r.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:r.emReadModelFill??"#d3f1a2",stroke:r.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:r.emCommandFill??"#bcd6fe",stroke:r.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:r.emEventFill??"#ffb778",stroke:r.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}e(Q,"calculateEntityVisualProps");function Z(t,r,i){let a=k(),o=q(z(t.entityIdentifier)??"",a),s,l={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},m=`<b>${Yr(o,i.textMaxWidth,l)}</b>`;if(t.dataInlineValue)s=t.dataInlineValue,s=s.substring(s.indexOf("{")+1),s=s.substring(0,s.lastIndexOf("}")-1),s=q(s,a),s=Yr(s,i.textMaxWidth,l),s=s.replaceAll(" "," ");if(t.dataReference){let b=r.find((F)=>F.name===t.dataReference?.$refText);if(b)s=b.dataBlockValue,s=s.substring(s.indexOf(`{
|
|
2
|
+
`)+2),s=s.substring(0,s.lastIndexOf("}")-1),s=q(s,a),s=Yr(s,i.textMaxWidth,l),s=s.replaceAll(" "," "),s+="<br/>"}let x=s!==void 0;if(x)m+=`<br/><br/><code style="text-align: left; display: block;max-width:${i.textMaxWidth}px">${s}</code>`;let g={fontSize:l.fontSize,fontWeight:l.fontWeight,fontFamily:l.fontFamily},f=Fa(m,g),v=x?f.width/3:f.width,h={content:m,width:v,height:f.height};return n.debug(`[${t.name}] ${t.entityIdentifier} text`,h),h}e(Z,"calculateTextProps");function te(t,r){let i=r,a=Q(i.frame),o={width:i.textProps.width+2*d.boxTextPadding,height:i.textProps.height+2*d.boxTextPadding};return[{$kind:U,frame:i.frame,index:i.index,visual:a,dimension:o,textProps:i.textProps}]}e(te,"decidePositionFrame");function ne(t,r,i){if(r===void 0)return d.contentStartX;if(r.index===t.index&&t.r)return t.r+d.boxPadding;if(i===void 0)return d.contentStartX;return i.r-d.boxOverlap+d.boxPadding}e(ne,"calculateX");function ie(t,r){let i=[...t.map((a)=>a.r),r];return Math.max(...i)}e(ie,"calculateMaxRight");function C(t){return Object.values(t).sort((r,i)=>r.index-i.index)}e(C,"sortedSwimlanesArray");function re(t,r){let i=r,a=J(i.frame,t.swimlanes),o;if(a.index in t.swimlanes)o=t.swimlanes[a.index];else o={index:a.index,label:a.label,r:0,y:a.index*d.swimlaneMinHeight+d.swimlaneGap,height:d.swimlaneMinHeight,maxHeight:d.swimlaneMinHeight};let s=t.boxes.length>0?t.boxes[t.boxes.length-1]:void 0,l=t.previousSwimlaneNumber!==void 0?t.swimlanes[t.previousSwimlaneNumber]:void 0,c={width:Math.max(d.boxMinWidth,Math.min(d.boxMaxWidth,i.dimension.width))+2*d.boxPadding,height:Math.max(d.boxMinHeight,Math.min(d.boxMaxHeight,i.dimension.height))+2*d.boxPadding},m=ne(o,l,s),x=m+c.width+d.boxPadding,g=ie(Object.values(t.swimlanes),x);o.r=m+c.width,o.maxHeight=Math.max(o.maxHeight,c.height),o.height=Math.max(d.swimlaneMinHeight,o.maxHeight)+2*d.swimlanePadding;let f={x:m,y:d.swimlanePadding+o.y,r:x,dimension:c,leftSibling:!1,swimlane:o,visual:i.visual,text:i.textProps.content,frame:i.frame,index:i.index},v={...t,boxes:[...t.boxes,f],swimlanes:{...t.swimlanes,[`${o.index}`]:o},previousSwimlaneNumber:a.index,previousFrame:i.frame,maxR:g},h=C(v.swimlanes);if(h.length>0)h[0].y=0;for(let b=1;b<h.length;b++){let F=h[b],W=h[b-1];F.y=W.y+W.height+d.swimlaneGap}return v}e(re,"evolveFramePositioned");function ae(t,r){if(t===0&&r.sourceFrames.length===0)return!0;return!1}e(ae,"isFirstFrame");function se(t){return t.sourceFrames!==void 0&&t.sourceFrames!==null&&t.sourceFrames.length>0}e(se,"hasSourceFrame");function D(t,r){if(r===void 0||r===null)return;return t.find((i)=>i.frame.name===r.name)}e(D,"findBoxByFrame");function de(t,r,i){if(i<0)return;for(let a=i;a>=0;a--){let o=t[a];if(o.swimlane.index!==r)return o}return}e(de,"findBoxByLineIndex");function le(t,r){let i=r;if(ae(i.index,i.frame))return[];let a=D(t.boxes,i.frame);if(a===void 0)throw Error(`Target box not found for frame ${i.frame.name}`);let o;if(i.sourceFrame)o=D(t.boxes,i.sourceFrame);else{if(ka(i.frame))return[];o=de(t.boxes,a.swimlane.index,i.index-1)}if(o===void 0)return[];return[{$kind:_,frame:i.frame,index:i.index,sourceBox:o,targetBox:a}]}e(le,"decidePositionRelation");function ce(t,r){let i=r,a={visual:{fill:"none",stroke:"#000"},source:{x:i.sourceBox.x,y:i.sourceBox.y},target:{x:i.targetBox.x,y:i.targetBox.y},sourceBox:i.sourceBox,targetBox:i.targetBox};return{...t,relations:[...t.relations,a]}}e(ce,"evolveRelationPositioned");var Se={[H]:te,[E]:le},Me={[U]:re,[_]:ce};function me(t,r){let i=Se[r.$kind];if(i===void 0||i===null)return[];let a=i(t,r);return n.debug("decided events",a),a}e(me,"decide");function ue(t,r){let i=r.reduce((a,o)=>{let s=Me[o.$kind];if(s===void 0||s===null)return a;return s(a,o)},t);return n.debug("evolve events",{state:t,newState:i,events:r}),i}e(ue,"evolve");function y(t,r){let i=me(t,r);return ue(t,i)}e(y,"dispatch");var N={getConfig:ye,preserveCommentsWhenParsing:!0,setOptions:pe,getOptions:ve,clear:be,setAccTitle:L,getAccTitle:R,getAccDescription:M,setAccDescription:I,setDiagramTitle:P,getDiagramTitle:O,setAst:X,getDiagramProps:T,getState:V},ke={parse:e(async(t)=>{let r=await oe("eventmodeling",t);n.debug(r),N.setAst(r),ee(r,N)},"parse")},Fe=u(),Be=Fe?.eventmodeling;function xe(t,r){return(i)=>{let a=i.swimlane.y+r.swimlanePadding,o=t.append("g").attr("class","em-box");o.append("rect").attr("x",i.x).attr("y",a).attr("rx","3").attr("width",i.dimension.width).attr("height",i.dimension.height).attr("stroke",i.visual.stroke).attr("fill",i.visual.fill),o.append("foreignObject").attr("x",i.x+r.boxPadding).attr("y",a+10).attr("width",i.dimension.width-2*r.boxPadding).attr("height",i.dimension.height-2*r.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(i.text)}}e(xe,"renderD3Box");function fe(t,r){return t>r}e(fe,"dirUpwards");function ge(t,r,i,a){return(o)=>{let s=o.sourceBox.swimlane.y+r.swimlanePadding,l=o.targetBox.swimlane.y+r.swimlanePadding,c=fe(s,l),m=o.sourceBox.x+o.sourceBox.dimension.width*2/3,x=o.targetBox.x+o.targetBox.dimension.width/3,g,f;if(n.debug(`rendering relation up=${c} for `,{sourceBox:o.sourceBox,targetBox:o.targetBox}),c)g=s,f=l+o.targetBox.dimension.height;else g=s+o.sourceBox.dimension.height,f=l;let v=a.emRelationStroke??o.visual.stroke;t.append("path").attr("class","em-relation").attr("fill",o.visual.fill).attr("stroke",v).attr("stroke-width","1").attr("marker-end",`url(#${i})`).attr("d",`M${m} ${g} L${x} ${f}`)}}e(ge,"renderD3Relation");function he(t,r,i,a){return(o)=>{let s=t.append("g").attr("class","em-swimlane"),l=a.emSwimlaneBackgroundOdd??"rgb(250,250,250)",c=a.emSwimlaneBackgroundStroke??"rgb(240,240,240)";s.append("rect").attr("x",0).attr("y",o.y).attr("rx","3").attr("width",r+i.swimlanePadding).attr("height",o.height).attr("fill",l).attr("stroke",c),s.append("text").attr("font-weight",i.swimlaneTextFontWeight).attr("x",30).attr("y",o.y+30).text(o.label)}}e(he,"renderD3Swimlane");var Ee=e(function(t,r,i,a){if(n.debug("in eventmodeling renderer",t+`
|
|
3
|
+
`,"id:",r,i),!Be)throw Error("EventModeling config not found");let o=a.db,{themeVariables:s,eventmodeling:l}=u(),c=p(`[id="${r}"]`),m=o.getDiagramProps(),x=o.getState(),g=`em-arrowhead-${r}`,f=s.emArrowhead??"#000000";x.sortedSwimlanesArray.forEach(he(c,x.maxR,m,s)),x.boxes.forEach(xe(c,m)),x.relations.forEach(ge(c,m,g,s)),c.append("defs").append("marker").attr("id",g).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),ra(void 0,c,l?.padding??30,l?.useMaxWidth)},"draw"),Ae={draw:Ee},$e=e((t)=>"","getStyles"),Re=$e,Ue={parser:ke,db:N,renderer:Ae,styles:Re};export{Ue as diagram};
|