@juki-team/base-ui 1.5.13 → 1.5.14
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/dist/esm/ArrowForwardIcon-C9lEPgxF.js +1 -0
- package/dist/esm/{BarChart-D2X8Qu4u.js → BarChart-CmUpEfgx.js} +1 -1
- package/dist/esm/{CartesianChart-DYpkf6Ou.js → CartesianChart-DCv2SXML.js} +1 -1
- package/dist/esm/{ChangePasswordModal-yc4D7RMs.js → ChangePasswordModal-CLhaqd0t.js} +1 -1
- package/dist/esm/{CodeEditor-Dxp5QnTB.js → CodeEditor-BCPgv2Cb.js} +1 -1
- package/dist/esm/{CodeViewer-BSZXIngC.js → CodeViewer-BRpMXuea.js} +1 -1
- package/dist/esm/{Collapse-D-w5SKss.js → Collapse-afKIPlSN.js} +1 -1
- package/dist/esm/{DataGrid-BdFgb8IP.js → DataGrid-1GBbtJPo.js} +1 -1
- package/dist/esm/{DataViewer-DVVGkDSK.js → DataViewer-sY3-mm2f.js} +1 -1
- package/dist/esm/{DrawerView-DCRvckZd.js → DrawerView-CDVcbXRh.js} +1 -1
- package/dist/esm/{ExcalidrawButton-_a-eNbyb.js → ExcalidrawButton-DpC-H9ia.js} +1 -1
- package/dist/esm/{GraphvizViewer-B2-JVx0t.js → GraphvizViewer-BVrLuU49.js} +1 -1
- package/dist/esm/{ImageLoaderCropper-wV-hPOjq.js → ImageLoaderCropper-qgwMwAGw.js} +1 -1
- package/dist/esm/{InputCellPhoneNumber-Bcl22QsC.js → InputCellPhoneNumber-EJdJwdOU.js} +1 -1
- package/dist/esm/{InputColor-CHgGjI3f.js → InputColor-UJ28fLOn.js} +1 -1
- package/dist/esm/{LineChart-ByKPkVhP.js → LineChart-CK_uehIw.js} +1 -1
- package/dist/esm/{LoaderLayer-ECtsj85k.js → LoaderLayer-CyitSTCe.js} +1 -1
- package/dist/esm/{MdMath-DljkRDxR.js → MdMath-DdXwM7hb.js} +1 -1
- package/dist/esm/{MdMathEditor-Dvq5oODw.js → MdMathEditor-DWwwX_SO.js} +1 -1
- package/dist/esm/{Popover-CX8YffOd.js → Popover-CmhtPayh.js} +1 -1
- package/dist/esm/ReplyIcon-CxQ2sdad.js +1 -0
- package/dist/esm/{SettingsIcon-B9nmP4lD.js → SettingsIcon-CegP07CF.js} +1 -1
- package/dist/esm/{SlideDeck-C0n93gz0.js → SlideDeck-BCpZmg4u.js} +1 -1
- package/dist/esm/{TableEyeIcon-Mb5aFvN0.js → TableEyeIcon-C4nuk_xp.js} +1 -1
- package/dist/esm/{TableOfContents-BBAEZx6Z.js → TableOfContents-B7API9_v.js} +1 -1
- package/dist/esm/{Tooltip-DB0S1ErV.js → Tooltip-C_PscPTv.js} +1 -1
- package/dist/esm/{UserCodeEditor-B1d5gyVE.js → UserCodeEditor-DqHZdH0s.js} +2 -2
- package/dist/esm/{VirtualizedRowsFixed-ChX4ON0l.js → VirtualizedRowsFixed-ExvaHy3O.js} +1 -1
- package/dist/esm/{WorksheetAsSlides-CpiXbUML.js → WorksheetAsSlides-Bf0TBaKQ.js} +1 -1
- package/dist/esm/{WorksheetBodies-CO67-rEz.js → WorksheetBodies-dstnMykc.js} +1 -1
- package/dist/esm/{WorksheetContents-ClZpiXB-.js → WorksheetContents-DSLbRrOR.js} +1 -1
- package/dist/esm/{WorksheetEditor-CjAvgOx6.js → WorksheetEditor-DHgjrze5.js} +1 -1
- package/dist/esm/{WorksheetNode-BgNNzY8I.js → WorksheetNode-BWrXWPtD.js} +1 -1
- package/dist/esm/{WorksheetViewer-DVQitUzi.js → WorksheetViewer-BtWO3C0N.js} +1 -1
- package/dist/esm/{abnfDiagram-WEYOIA3C-CwJ1V2U1.js → abnfDiagram-WEYOIA3C-Hw5eOSwT.js} +1 -1
- package/dist/esm/{arc-COK0VEkT.js → arc-DomqdCJb.js} +1 -1
- package/dist/esm/{architectureDiagram-ZHVYKT53-CM6AQFKG.js → architectureDiagram-ZHVYKT53-BU7Zo-Vd.js} +1 -1
- package/dist/esm/{blockDiagram-RJAE7QA3-CdSNo9Pe.js → blockDiagram-RJAE7QA3-DSHzRL6J.js} +1 -1
- package/dist/esm/{c4Diagram-XDPPPE54-BhfYKASq.js → c4Diagram-XDPPPE54-CpLQ9pqY.js} +1 -1
- package/dist/esm/channel-p0K5iSo0.js +1 -0
- package/dist/esm/{chunk-2E7WHVMD-CVBqw5fR.js → chunk-2E7WHVMD-Beocb-Jh.js} +1 -1
- package/dist/esm/{chunk-2Q5K7J3B-CyZYeWxE.js → chunk-2Q5K7J3B-BvYoUWYj.js} +1 -1
- package/dist/esm/{chunk-4EMNKR2T-D1yHHif8.js → chunk-4EMNKR2T-CwTwaoZv.js} +1 -1
- package/dist/esm/{chunk-55XCU76K-CvYWAV_o.js → chunk-55XCU76K-Bm2vEyhO.js} +1 -1
- package/dist/esm/{chunk-5VM5RSS4-CS0kZLYA.js → chunk-5VM5RSS4-bDfGkvI-.js} +1 -1
- package/dist/esm/{chunk-JWPE2WC7-Ct5OBLCL.js → chunk-JWPE2WC7-WoJ0Gwzc.js} +1 -1
- package/dist/esm/{chunk-NQOKRVIF-D0-2mmH4.js → chunk-NQOKRVIF-BsYoUZL4.js} +1 -1
- package/dist/esm/{chunk-VQ5W62QI-CsGo0PTx.js → chunk-VQ5W62QI-BTvKzH75.js} +1 -1
- package/dist/esm/{chunk-XXDRQBXY-DPPGTM3w.js → chunk-XXDRQBXY-ClHdtw3t.js} +1 -1
- package/dist/esm/{chunk-ZCHMQSOR-Bvjutmxm.js → chunk-ZCHMQSOR-BuzD1sYe.js} +1 -1
- package/dist/esm/{classDiagram-v2-4MYWR3UA-J_cOAAHS.js → classDiagram-v2-4MYWR3UA-BGFOFtLW.js} +1 -1
- package/dist/esm/{commons-iref2pEJ.js → commons-CmbPiYDE.js} +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/{cose-bilkent-JH36ORCC-BHzp2aV0.js → cose-bilkent-JH36ORCC-WrGk8F3q.js} +1 -1
- package/dist/esm/{cynefinDiagram-WF24UDRP-B3Y9mCh3.js → cynefinDiagram-WF24UDRP-plMeajnN.js} +1 -1
- package/dist/esm/{dagre-NK4GIZVX-BSfh-C_i.js → dagre-NK4GIZVX-DFmweJ5L.js} +1 -1
- package/dist/esm/{diagram-CBK3MWTC-w-BT1S7I.js → diagram-CBK3MWTC-Do3xyOgp.js} +1 -1
- package/dist/esm/{diagram-I5XIIV2D-wMqo87b_.js → diagram-I5XIIV2D-BjcBIOdi.js} +1 -1
- package/dist/esm/{diagram-ODIL2UCW-DQhUXqDu.js → diagram-ODIL2UCW-B9Avmrsd.js} +1 -1
- package/dist/esm/{diagram-PFBEJUXE-BlCntZMJ.js → diagram-PFBEJUXE-BspjnifG.js} +1 -1
- package/dist/esm/{diagram-RJA3I4VV-Cev21A9i.js → diagram-RJA3I4VV-CDb0YVvV.js} +1 -1
- package/dist/esm/{diagram-TYUNFSNR-BiiLNoPs.js → diagram-TYUNFSNR-CowQmn1U.js} +1 -1
- package/dist/esm/{ebnfDiagram-V4P3TTPT-BWNnHl88.js → ebnfDiagram-V4P3TTPT-DoV9Lfm1.js} +1 -1
- package/dist/esm/{elk-QONTBCTQ-DhvgoeNg.js → elk-QONTBCTQ-Di5ig-t7.js} +1 -1
- package/dist/esm/{erDiagram-KYQIGQAA-DkFGw08p.js → erDiagram-KYQIGQAA-bd6-MJG2.js} +1 -1
- package/dist/esm/flowDiagram-IUGLLWBU-B0MSMUTA.js +1 -0
- package/dist/esm/{ganttDiagram-R7GPNTJY-Bvr90Acy.js → ganttDiagram-R7GPNTJY-lkIa_H6_.js} +1 -1
- package/dist/esm/{gitGraphDiagram-PDYL7XHY-DHszoB7b.js → gitGraphDiagram-PDYL7XHY-Vj--WuIK.js} +1 -1
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/{index-DkZReaeM.js → index-D9j3iMPO.js} +1 -1
- package/dist/esm/{index-B5Soolr4.js → index-DBVTTZ07.js} +1 -1
- package/dist/esm/{index-2PTQqTnK.js → index-KB6gLBva.js} +1 -1
- package/dist/esm/{index-70SVfF-m.js → index-P2yxumel.js} +1 -1
- package/dist/esm/index-jAIWmSeN.js +1 -0
- package/dist/esm/{infoDiagram-MVDRKAX5-D05SjyVf.js → infoDiagram-MVDRKAX5-DOeZ2-C8.js} +1 -1
- package/dist/esm/{ishikawaDiagram-HPEHV2GE-50RQ8Owd.js → ishikawaDiagram-HPEHV2GE-CENo4osB.js} +1 -1
- package/dist/esm/{journeyDiagram-BOSHW7O7-DnHu8DYt.js → journeyDiagram-BOSHW7O7-C2tDYh4z.js} +1 -1
- package/dist/esm/{kanban-definition-FNSA4HC5-BF3y0Q5O.js → kanban-definition-FNSA4HC5-CoyAxabP.js} +1 -1
- package/dist/esm/main.js +1 -1
- package/dist/esm/{mermaid.core-DRk6tt5W.js → mermaid.core-GJX79pQL.js} +2 -2
- package/dist/esm/{mindmap-definition-6OY57UG3-D2VvQCn5.js → mindmap-definition-6OY57UG3-Cz5x8Ddo.js} +1 -1
- package/dist/esm/{pegDiagram-ECIUJNBX-LCa_e2vp.js → pegDiagram-ECIUJNBX-Cp7mSGqB.js} +1 -1
- package/dist/esm/{pieDiagram-GNMPY74T-BFxRc695.js → pieDiagram-GNMPY74T-DoaR6KZl.js} +1 -1
- package/dist/esm/{quadrantDiagram-D57K4MC3-m-v5Oved.js → quadrantDiagram-D57K4MC3-vGvfladt.js} +1 -1
- package/dist/esm/{railroadDiagram-Y72NRBL7-CGhQNkt2.js → railroadDiagram-Y72NRBL7-CC8xjkre.js} +1 -1
- package/dist/esm/{requirementDiagram-EQYSW5RA-D4TUJX2j.js → requirementDiagram-EQYSW5RA-CvYZNdVi.js} +1 -1
- package/dist/esm/{sankeyDiagram-SY24JHO5-qeunG13D.js → sankeyDiagram-SY24JHO5-DTEzoJWs.js} +1 -1
- package/dist/esm/{sequenceDiagram-BLEHNHQU-Bf8dSGiP.js → sequenceDiagram-BLEHNHQU-B1ssXHBq.js} +1 -1
- package/dist/esm/server.js +1 -1
- package/dist/esm/{settings-CBGV-lz3.js → settings-oXVFKYs2.js} +1 -1
- package/dist/esm/settings.js +1 -1
- package/dist/esm/{sizeCapture-INFHLROL-B0tQoQkY.js → sizeCapture-INFHLROL-BpAWjro_.js} +1 -1
- package/dist/esm/{stateDiagram-v2-A6IESKWZ-D-bM5qVN.js → stateDiagram-v2-A6IESKWZ-BpWTAT11.js} +1 -1
- package/dist/esm/{swimlanes-B3ENRKFQ-DR9euVhL.js → swimlanes-B3ENRKFQ-CRPiPPkB.js} +1 -1
- package/dist/esm/swimlanesDiagram-AYQRV4AK-CPu0_glt.js +1 -0
- package/dist/esm/{timeline-definition-JXYKGLGB-ChsOD2es.js → timeline-definition-JXYKGLGB-D7lhGXLl.js} +1 -1
- package/dist/esm/{types-DsZvEANP.js → types-DS5jBUtV.js} +1 -1
- package/dist/esm/{usecaseDiagram-WPOLBNNX-DZFg1Zof.js → usecaseDiagram-WPOLBNNX-07MB5ZhJ.js} +1 -1
- package/dist/esm/{vennDiagram-Q3Y3IDCW-DAW-dDy7.js → vennDiagram-Q3Y3IDCW-BF4CwCTB.js} +1 -1
- package/dist/esm/{wardleyDiagram-IVAIDKWA-B-gsebc8.js → wardleyDiagram-IVAIDKWA-CE_jsTBp.js} +1 -1
- package/dist/esm/{websocket-CdeP8N_S.js → websocket-CXHGKJlm.js} +1 -1
- package/dist/esm/{xychartDiagram-4URNHDU4-DS3Qm0VA.js → xychartDiagram-4URNHDU4-DK5TR51V.js} +1 -1
- package/dist/module-types/src/components/hooks/useCompanyPresence.d.ts +18 -0
- package/dist/module-types/src/components/hooks/useOwnPresence.d.ts +5 -0
- package/dist/module-types/src/hooks/index.d.ts +2 -1
- package/dist/module-types/src/settings/ApiManager.d.ts +0 -8
- package/dist/module-types/src/stores/websocket/topicChannels.d.ts +14 -1
- package/dist/module-types/src/stores/websocket/types.d.ts +1 -2
- package/package.json +5 -5
- package/dist/esm/ArrowForwardIcon-DelUFdaJ.js +0 -1
- package/dist/esm/ReplyIcon-BNYBKbgb.js +0 -1
- package/dist/esm/channel-DWjyymG_.js +0 -1
- package/dist/esm/flowDiagram-IUGLLWBU-B-Bxdnen.js +0 -1
- package/dist/esm/index-BpcqEzEG.js +0 -1
- package/dist/esm/swimlanesDiagram-AYQRV4AK-D0-BBYnj.js +0 -1
- package/dist/module-types/src/components/hooks/useClientTrackLocation.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,l as t,T as n,O as r,C as i,a7 as a,d as o,j as l,c as s}from"./mermaid.core-DRk6tt5W.js";var d="",m="",c="",h=[],p=new Map,u=e(e=>l(e,s()),"sanitizeText"),g=e(e=>{switch(e.type){case"terminal":return{...e,value:u(e.value)};case"nonterminal":return{...e,name:u(e.name)};case"sequence":return{...e,elements:e.elements.map(g)};case"choice":return{...e,alternatives:e.alternatives.map(g)};case"optional":return{...e,element:g(e.element)};case"repetition":return{...e,element:g(e.element),separator:e.separator?g(e.separator):void 0};case"special":return{...e,text:u(e.text)}}},"sanitizeAstNode"),T=e(()=>{d="",m="",c="",h.length=0,p.clear(),i(),t.debug("[Railroad] Database cleared")},"clear"),f=e(e=>{d=u(e),t.debug("[Railroad] Title set:",e)},"setTitle"),x=e(()=>d,"getTitle"),w={clear:T,setTitle:f,getTitle:x,addRule:e(e=>{const n={...e,name:u(e.name),definition:g(e.definition),comment:e.comment?u(e.comment):void 0};t.debug("[Railroad] Adding rule:",n.name),p.has(n.name)&&t.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`),h.push(n),p.set(n.name,n)},"addRule"),getRules:e(()=>h,"getRules"),getRule:e(e=>p.get(e),"getRule"),setAccTitle:e(e=>{m=u(e).replace(/^\s+/g,""),t.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),getAccTitle:e(()=>m,"getAccTitle"),setAccDescription:e(e=>{c=u(e).replace(/\n\s+/g,"\n"),t.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),getAccDescription:e(()=>c,"getAccDescription"),setDiagramTitle:f,getDiagramTitle:x},k={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},C=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,F=/^[\w "',.-]+$/,S=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),$=e(e=>!!e&&Object.keys(e).every(e=>"railroad"===e||S.has(e)),"isRailroadStyleOptions"),y=e(e=>e?"railroad"in e&&e.railroad?e.railroad:$(e)?e:{}:{},"extractRailroadOverrides"),b=e(e=>{if(!e||$(e))return{};const{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},"extractThemeOverrides"),R=e((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return C.test(n)?n:t},"sanitizeColorValue"),v=e((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return F.test(n)?n:t},"sanitizeFontFamilyValue"),z=e((e,t)=>{const n="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:t},"sanitizeNumberValue"),N=e(e=>{const t="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(t)&&t>0?t:void 0},"parseThemeFontSize"),M=e(e=>{const t=v(e.fontFamily,k.fontFamily),n=N(e.fontSize)??k.fontSize;return{...k,fontFamily:t,fontSize:n,terminalFill:R(e.secondBkg??e.secondaryColor,k.terminalFill),terminalStroke:R(e.secondaryBorderColor??e.lineColor,k.terminalStroke),terminalTextColor:R(e.secondaryTextColor??e.textColor,k.terminalTextColor),nonTerminalFill:R(e.mainBkg??e.background,k.nonTerminalFill),nonTerminalStroke:R(e.primaryBorderColor??e.lineColor,k.nonTerminalStroke),nonTerminalTextColor:R(e.primaryTextColor??e.textColor,k.nonTerminalTextColor),lineColor:R(e.lineColor,k.lineColor),markerFill:R(e.lineColor,k.markerFill),commentFill:R(e.labelBackground??e.tertiaryColor,k.commentFill),commentStroke:R(e.tertiaryBorderColor??e.lineColor,k.commentStroke),commentTextColor:R(e.tertiaryTextColor??e.textColor,k.commentTextColor),specialFill:R(e.tertiaryColor??e.secondaryColor,k.specialFill),specialStroke:R(e.tertiaryBorderColor??e.secondaryBorderColor,k.specialStroke),ruleNameColor:R(e.titleColor??e.textColor,k.ruleNameColor)}},"buildThemeDefaults"),A=e(e=>{const t=r(),n={...a(),...t.themeVariables??{},...b(e)},i=M(n),o={...t.railroad??{},...y(e)};return{compactMode:o.compactMode??i.compactMode,padding:z(o.padding,i.padding),verticalSeparation:z(o.verticalSeparation,i.verticalSeparation),horizontalSeparation:z(o.horizontalSeparation,i.horizontalSeparation),arcRadius:z(o.arcRadius,i.arcRadius),fontSize:z(o.fontSize,i.fontSize),fontFamily:v(o.fontFamily,i.fontFamily),terminalFill:R(o.terminalFill,i.terminalFill),terminalStroke:R(o.terminalStroke,i.terminalStroke),terminalTextColor:R(o.terminalTextColor,i.terminalTextColor),nonTerminalFill:R(o.nonTerminalFill,i.nonTerminalFill),nonTerminalStroke:R(o.nonTerminalStroke,i.nonTerminalStroke),nonTerminalTextColor:R(o.nonTerminalTextColor,i.nonTerminalTextColor),lineColor:R(o.lineColor,i.lineColor),strokeWidth:z(o.strokeWidth,i.strokeWidth),markerFill:R(o.markerFill,i.markerFill),commentFill:R(o.commentFill,i.commentFill),commentStroke:R(o.commentStroke,i.commentStroke),commentTextColor:R(o.commentTextColor,i.commentTextColor),specialFill:R(o.specialFill,i.specialFill),specialStroke:R(o.specialStroke,i.specialStroke),ruleNameColor:R(o.ruleNameColor,i.ruleNameColor),showMarkers:o.showMarkers??i.showMarkers,markerRadius:z(o.markerRadius,i.markerRadius)}},"buildRailroadStyleOptions"),B=e(e=>{const{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:l,nonTerminalTextColor:s,lineColor:d,strokeWidth:m,markerFill:c,commentFill:h,commentStroke:p,commentTextColor:u,specialFill:g,specialStroke:T,ruleNameColor:f}=A(e);return`\n .railroad-diagram {\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-terminal rect {\n fill: ${r};\n stroke: ${i};\n stroke-width: ${m}px;\n }\n\n .railroad-terminal text {\n fill: ${a};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-nonterminal rect {\n fill: ${o};\n stroke: ${l};\n stroke-width: ${m}px;\n }\n\n .railroad-nonterminal text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-line {\n stroke: ${d};\n stroke-width: ${m}px;\n fill: none;\n }\n\n .railroad-start circle,\n .railroad-end circle {\n fill: ${c};\n }\n\n .railroad-comment ellipse {\n fill: ${h};\n stroke: ${p};\n stroke-width: ${m}px;\n }\n\n .railroad-comment text {\n fill: ${u};\n font-style: italic;\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-special rect {\n fill: ${g};\n stroke: ${T};\n stroke-width: ${m}px;\n stroke-dasharray: 5,3;\n }\n\n .railroad-special text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-rule-name {\n font-weight: bold;\n fill: ${f};\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-group {\n /* Grouping container, no specific styles */\n }\n`},"getStyles"),E=class{constructor(){this.d=""}static{e(this,"PathBuilder")}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,n,r,i,a,o){return this.d+=`A ${e} ${t} ${n} ${r?1:0} ${i?1:0} ${a} ${o} `,this}build(){return this.d.trim()}},D=class{constructor(e,t=A()){this.textCache=new Map,this.svg=e,this.config=t}static{e(this,"RailroadRenderer")}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);const t=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),n=t.node().getBBox(),r={width:n.width,height:n.height};return t.remove(),this.textCache.set(e,r),r}renderTerminal(e,t){const n=this.measureText(t),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-terminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i).attr("rx",10).attr("ry",10),a.append("text").attr("x",r/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,t){const n=this.measureText(t),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-nonterminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i),a.append("text").attr("x",r/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderSequence(e,t){const n=t.map(t=>this.renderExpression(e,t));let r=0,i=0,a=0;for(const e of n)r+=e.dimensions.width,i=Math.max(i,e.dimensions.up),a=Math.max(a,e.dimensions.down);r+=(n.length-1)*this.config.horizontalSeparation;const o=e.append("g").attr("class","railroad-sequence");let l=0;for(let e=0;e<n.length;e++){const t=n[e],r=i-t.dimensions.up;if(o.node().appendChild(t.element).setAttribute("transform",`translate(${l}, ${r})`),e<n.length-1){const e=l+t.dimensions.width,n=e+this.config.horizontalSeparation,r=i;o.append("path").attr("class","railroad-line").attr("d",(new E).moveTo(e,r).lineTo(n,r).build())}l+=t.dimensions.width+this.config.horizontalSeparation}return{element:o.node(),dimensions:{width:r,height:i+a,up:i,down:a}}}renderChoice(e,t){const n=t.map(t=>this.renderExpression(e,t));let r=0,i=0;for(const e of n)r=Math.max(r,e.dimensions.width),i+=e.dimensions.height;i+=(n.length-1)*this.config.verticalSeparation;const a=this.config.arcRadius,o=r+4*a,l=e.append("g").attr("class","railroad-choice");let s=0;const d=i/2;for(const e of n){const t=s,n=t+e.dimensions.up,i=2*a+(r-e.dimensions.width)/2;l.node().appendChild(e.element).setAttribute("transform",`translate(${i}, ${t})`);const m=new E,c=n>d;n===d?m.moveTo(0,d).lineTo(i,n):m.moveTo(0,d).arcTo(a,a,0,!1,c,a,d+(c?a:-a)).lineTo(a,n-(c?a:-a)).arcTo(a,a,0,!1,!c,2*a,n).lineTo(i,n),l.append("path").attr("class","railroad-line").attr("d",m.build());const h=new E,p=i+e.dimensions.width,u=o-2*a;n===d?h.moveTo(p,n).lineTo(o,d):h.moveTo(p,n).lineTo(u,n).arcTo(a,a,0,!1,!c,o-a,n+(c?-a:a)).lineTo(o-a,d+(c?a:-a)).arcTo(a,a,0,!1,c,o,d),l.append("path").attr("class","railroad-line").attr("d",h.build()),s+=e.dimensions.height+this.config.verticalSeparation}return{element:l.node(),dimensions:{width:o,height:i,up:d,down:i-d}}}renderOptional(e,t){const n=this.renderExpression(e,t),r=this.config.arcRadius,i=2*r,a=n.dimensions.width+4*r,o=n.dimensions.height+i,l=e.append("g").attr("class","railroad-optional"),s=2*r,d=i;l.node().appendChild(n.element).setAttribute("transform",`translate(${s}, ${d})`);const m=d+n.dimensions.up,c=(new E).moveTo(0,m).lineTo(2*r,m);l.append("path").attr("class","railroad-line").attr("d",c.build());const h=(new E).moveTo(s+n.dimensions.width,m).lineTo(a,m);l.append("path").attr("class","railroad-line").attr("d",h.build());const p=(new E).moveTo(0,m).arcTo(r,r,0,!1,!1,r,m-r).lineTo(r,r).arcTo(r,r,0,!1,!0,2*r,0).lineTo(a-2*r,0).arcTo(r,r,0,!1,!0,a-r,r).lineTo(a-r,m-r).arcTo(r,r,0,!1,!1,a,m);return l.append("path").attr("class","railroad-line").attr("d",p.build()),{element:l.node(),dimensions:{width:a,height:o,up:m,down:o-m}}}renderRepetition(e,t,n){const r=this.renderExpression(e,t),i=this.config.arcRadius,a=2*i,o=r.dimensions.width+4*i,l=0===n,s=r.dimensions.height+a+(l?a:0),d=e.append("g").attr("class","railroad-repetition"),m=2*i,c=l?a:0;d.node().appendChild(r.element).setAttribute("transform",`translate(${m}, ${c})`);const h=c+r.dimensions.up;d.append("path").attr("class","railroad-line").attr("d",(new E).moveTo(0,h).lineTo(2*i,h).build()),d.append("path").attr("class","railroad-line").attr("d",(new E).moveTo(m+r.dimensions.width,h).lineTo(o,h).build());const p=c+r.dimensions.height+i,u=(new E).moveTo(m+r.dimensions.width,h).arcTo(i,i,0,!1,!0,m+r.dimensions.width+i,h+i).lineTo(m+r.dimensions.width+i,p).arcTo(i,i,0,!1,!0,m+r.dimensions.width,p+i).lineTo(2*i,p+i).arcTo(i,i,0,!1,!0,i,p).lineTo(i,h+i).arcTo(i,i,0,!1,!0,2*i,h);if(d.append("path").attr("class","railroad-line").attr("d",u.build()),l){const e=(new E).moveTo(0,h).arcTo(i,i,0,!1,!1,i,h-i).lineTo(i,i).arcTo(i,i,0,!1,!0,2*i,0).lineTo(o-2*i,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,h-i).arcTo(i,i,0,!1,!1,o,h);d.append("path").attr("class","railroad-line").attr("d",e.build())}return{element:d.node(),dimensions:{width:o,height:s,up:h,down:s-h}}}renderSpecial(e,t){const n=this.measureText("? "+t+" ?"),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-special");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i),a.append("text").attr("x",r/2).attr("y",i/2).text("? "+t+" ?"),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderExpression(e,t){switch(t.type){case"terminal":return this.renderTerminal(e,t.value);case"nonterminal":return this.renderNonTerminal(e,t.name);case"sequence":return this.renderSequence(e,t.elements);case"choice":return this.renderChoice(e,t.alternatives);case"optional":return this.renderOptional(e,t.element);case"repetition":return this.renderRepetition(e,t.element,t.min);case"special":return this.renderSpecial(e,t.text);default:throw new Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){const n=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${t})`),r=e.name+" =",i=this.measureText(r).width+20,a=i+20,o=n.append("g"),l=this.renderExpression(o,e.definition),s=Math.max(20,l.dimensions.up),d=s-l.dimensions.up;o.attr("transform",`translate(${a}, ${d})`);n.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",s).text(r);n.append("g").attr("class","railroad-start").append("circle").attr("cx",i).attr("cy",s).attr("r",this.config.markerRadius);return n.append("g").attr("class","railroad-end").append("circle").attr("cx",a+l.dimensions.width+10).attr("cy",s).attr("r",this.config.markerRadius),n.append("path").attr("class","railroad-line").attr("d",(new E).moveTo(i+this.config.markerRadius,s).lineTo(a,s).build()),n.append("path").attr("class","railroad-line").attr("d",(new E).moveTo(a+l.dimensions.width,s).lineTo(a+l.dimensions.width+10-this.config.markerRadius,s).build()),{height:Math.max(40,d+l.dimensions.height+2*this.config.padding),width:a+l.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,n=0;for(const r of e){const e=this.renderRule(r,t);t+=e.height+this.config.verticalSeparation,n=Math.max(n,e.width)}return{width:n+2*this.config.padding,height:t+this.config.padding}}},O=e((e,t,n)=>{o(e,t.height,t.width,n),e.attr("viewBox",`0 0 ${t.width} ${t.height}`)},"configureRailroadSvgSize"),W={draw:e((e,i,a)=>{t.debug("[Railroad] Rendering diagram\n"+e);try{const e=n(i);e.attr("class","railroad-diagram");const a=r().railroad,o=a?.useMaxWidth??!0,l=w.getRules();if(t.debug(`[Railroad] Rendering ${l.length} rules`),0===l.length)return t.warn("[Railroad] No rules to render"),void O(e,{height:100,width:200},o);const s=new D(e,A()).renderDiagram(l);O(e,s,o),t.debug("[Railroad] Render complete")}catch(e){throw t.error("[Railroad] Render error:",e),e}},"draw")};export{w as d,B as g,W as r};
|
|
1
|
+
import{_ as e,l as t,T as n,O as r,C as i,a7 as a,d as o,j as l,c as s}from"./mermaid.core-GJX79pQL.js";var d="",m="",c="",h=[],p=new Map,u=e(e=>l(e,s()),"sanitizeText"),g=e(e=>{switch(e.type){case"terminal":return{...e,value:u(e.value)};case"nonterminal":return{...e,name:u(e.name)};case"sequence":return{...e,elements:e.elements.map(g)};case"choice":return{...e,alternatives:e.alternatives.map(g)};case"optional":return{...e,element:g(e.element)};case"repetition":return{...e,element:g(e.element),separator:e.separator?g(e.separator):void 0};case"special":return{...e,text:u(e.text)}}},"sanitizeAstNode"),T=e(()=>{d="",m="",c="",h.length=0,p.clear(),i(),t.debug("[Railroad] Database cleared")},"clear"),f=e(e=>{d=u(e),t.debug("[Railroad] Title set:",e)},"setTitle"),x=e(()=>d,"getTitle"),w={clear:T,setTitle:f,getTitle:x,addRule:e(e=>{const n={...e,name:u(e.name),definition:g(e.definition),comment:e.comment?u(e.comment):void 0};t.debug("[Railroad] Adding rule:",n.name),p.has(n.name)&&t.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`),h.push(n),p.set(n.name,n)},"addRule"),getRules:e(()=>h,"getRules"),getRule:e(e=>p.get(e),"getRule"),setAccTitle:e(e=>{m=u(e).replace(/^\s+/g,""),t.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),getAccTitle:e(()=>m,"getAccTitle"),setAccDescription:e(e=>{c=u(e).replace(/\n\s+/g,"\n"),t.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),getAccDescription:e(()=>c,"getAccDescription"),setDiagramTitle:f,getDiagramTitle:x},k={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},C=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,F=/^[\w "',.-]+$/,S=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),$=e(e=>!!e&&Object.keys(e).every(e=>"railroad"===e||S.has(e)),"isRailroadStyleOptions"),y=e(e=>e?"railroad"in e&&e.railroad?e.railroad:$(e)?e:{}:{},"extractRailroadOverrides"),b=e(e=>{if(!e||$(e))return{};const{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},"extractThemeOverrides"),R=e((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return C.test(n)?n:t},"sanitizeColorValue"),v=e((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return F.test(n)?n:t},"sanitizeFontFamilyValue"),z=e((e,t)=>{const n="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:t},"sanitizeNumberValue"),N=e(e=>{const t="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(t)&&t>0?t:void 0},"parseThemeFontSize"),M=e(e=>{const t=v(e.fontFamily,k.fontFamily),n=N(e.fontSize)??k.fontSize;return{...k,fontFamily:t,fontSize:n,terminalFill:R(e.secondBkg??e.secondaryColor,k.terminalFill),terminalStroke:R(e.secondaryBorderColor??e.lineColor,k.terminalStroke),terminalTextColor:R(e.secondaryTextColor??e.textColor,k.terminalTextColor),nonTerminalFill:R(e.mainBkg??e.background,k.nonTerminalFill),nonTerminalStroke:R(e.primaryBorderColor??e.lineColor,k.nonTerminalStroke),nonTerminalTextColor:R(e.primaryTextColor??e.textColor,k.nonTerminalTextColor),lineColor:R(e.lineColor,k.lineColor),markerFill:R(e.lineColor,k.markerFill),commentFill:R(e.labelBackground??e.tertiaryColor,k.commentFill),commentStroke:R(e.tertiaryBorderColor??e.lineColor,k.commentStroke),commentTextColor:R(e.tertiaryTextColor??e.textColor,k.commentTextColor),specialFill:R(e.tertiaryColor??e.secondaryColor,k.specialFill),specialStroke:R(e.tertiaryBorderColor??e.secondaryBorderColor,k.specialStroke),ruleNameColor:R(e.titleColor??e.textColor,k.ruleNameColor)}},"buildThemeDefaults"),A=e(e=>{const t=r(),n={...a(),...t.themeVariables??{},...b(e)},i=M(n),o={...t.railroad??{},...y(e)};return{compactMode:o.compactMode??i.compactMode,padding:z(o.padding,i.padding),verticalSeparation:z(o.verticalSeparation,i.verticalSeparation),horizontalSeparation:z(o.horizontalSeparation,i.horizontalSeparation),arcRadius:z(o.arcRadius,i.arcRadius),fontSize:z(o.fontSize,i.fontSize),fontFamily:v(o.fontFamily,i.fontFamily),terminalFill:R(o.terminalFill,i.terminalFill),terminalStroke:R(o.terminalStroke,i.terminalStroke),terminalTextColor:R(o.terminalTextColor,i.terminalTextColor),nonTerminalFill:R(o.nonTerminalFill,i.nonTerminalFill),nonTerminalStroke:R(o.nonTerminalStroke,i.nonTerminalStroke),nonTerminalTextColor:R(o.nonTerminalTextColor,i.nonTerminalTextColor),lineColor:R(o.lineColor,i.lineColor),strokeWidth:z(o.strokeWidth,i.strokeWidth),markerFill:R(o.markerFill,i.markerFill),commentFill:R(o.commentFill,i.commentFill),commentStroke:R(o.commentStroke,i.commentStroke),commentTextColor:R(o.commentTextColor,i.commentTextColor),specialFill:R(o.specialFill,i.specialFill),specialStroke:R(o.specialStroke,i.specialStroke),ruleNameColor:R(o.ruleNameColor,i.ruleNameColor),showMarkers:o.showMarkers??i.showMarkers,markerRadius:z(o.markerRadius,i.markerRadius)}},"buildRailroadStyleOptions"),B=e(e=>{const{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:l,nonTerminalTextColor:s,lineColor:d,strokeWidth:m,markerFill:c,commentFill:h,commentStroke:p,commentTextColor:u,specialFill:g,specialStroke:T,ruleNameColor:f}=A(e);return`\n .railroad-diagram {\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-terminal rect {\n fill: ${r};\n stroke: ${i};\n stroke-width: ${m}px;\n }\n\n .railroad-terminal text {\n fill: ${a};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-nonterminal rect {\n fill: ${o};\n stroke: ${l};\n stroke-width: ${m}px;\n }\n\n .railroad-nonterminal text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-line {\n stroke: ${d};\n stroke-width: ${m}px;\n fill: none;\n }\n\n .railroad-start circle,\n .railroad-end circle {\n fill: ${c};\n }\n\n .railroad-comment ellipse {\n fill: ${h};\n stroke: ${p};\n stroke-width: ${m}px;\n }\n\n .railroad-comment text {\n fill: ${u};\n font-style: italic;\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-special rect {\n fill: ${g};\n stroke: ${T};\n stroke-width: ${m}px;\n stroke-dasharray: 5,3;\n }\n\n .railroad-special text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-rule-name {\n font-weight: bold;\n fill: ${f};\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-group {\n /* Grouping container, no specific styles */\n }\n`},"getStyles"),E=class{constructor(){this.d=""}static{e(this,"PathBuilder")}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,n,r,i,a,o){return this.d+=`A ${e} ${t} ${n} ${r?1:0} ${i?1:0} ${a} ${o} `,this}build(){return this.d.trim()}},D=class{constructor(e,t=A()){this.textCache=new Map,this.svg=e,this.config=t}static{e(this,"RailroadRenderer")}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);const t=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),n=t.node().getBBox(),r={width:n.width,height:n.height};return t.remove(),this.textCache.set(e,r),r}renderTerminal(e,t){const n=this.measureText(t),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-terminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i).attr("rx",10).attr("ry",10),a.append("text").attr("x",r/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,t){const n=this.measureText(t),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-nonterminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i),a.append("text").attr("x",r/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderSequence(e,t){const n=t.map(t=>this.renderExpression(e,t));let r=0,i=0,a=0;for(const e of n)r+=e.dimensions.width,i=Math.max(i,e.dimensions.up),a=Math.max(a,e.dimensions.down);r+=(n.length-1)*this.config.horizontalSeparation;const o=e.append("g").attr("class","railroad-sequence");let l=0;for(let e=0;e<n.length;e++){const t=n[e],r=i-t.dimensions.up;if(o.node().appendChild(t.element).setAttribute("transform",`translate(${l}, ${r})`),e<n.length-1){const e=l+t.dimensions.width,n=e+this.config.horizontalSeparation,r=i;o.append("path").attr("class","railroad-line").attr("d",(new E).moveTo(e,r).lineTo(n,r).build())}l+=t.dimensions.width+this.config.horizontalSeparation}return{element:o.node(),dimensions:{width:r,height:i+a,up:i,down:a}}}renderChoice(e,t){const n=t.map(t=>this.renderExpression(e,t));let r=0,i=0;for(const e of n)r=Math.max(r,e.dimensions.width),i+=e.dimensions.height;i+=(n.length-1)*this.config.verticalSeparation;const a=this.config.arcRadius,o=r+4*a,l=e.append("g").attr("class","railroad-choice");let s=0;const d=i/2;for(const e of n){const t=s,n=t+e.dimensions.up,i=2*a+(r-e.dimensions.width)/2;l.node().appendChild(e.element).setAttribute("transform",`translate(${i}, ${t})`);const m=new E,c=n>d;n===d?m.moveTo(0,d).lineTo(i,n):m.moveTo(0,d).arcTo(a,a,0,!1,c,a,d+(c?a:-a)).lineTo(a,n-(c?a:-a)).arcTo(a,a,0,!1,!c,2*a,n).lineTo(i,n),l.append("path").attr("class","railroad-line").attr("d",m.build());const h=new E,p=i+e.dimensions.width,u=o-2*a;n===d?h.moveTo(p,n).lineTo(o,d):h.moveTo(p,n).lineTo(u,n).arcTo(a,a,0,!1,!c,o-a,n+(c?-a:a)).lineTo(o-a,d+(c?a:-a)).arcTo(a,a,0,!1,c,o,d),l.append("path").attr("class","railroad-line").attr("d",h.build()),s+=e.dimensions.height+this.config.verticalSeparation}return{element:l.node(),dimensions:{width:o,height:i,up:d,down:i-d}}}renderOptional(e,t){const n=this.renderExpression(e,t),r=this.config.arcRadius,i=2*r,a=n.dimensions.width+4*r,o=n.dimensions.height+i,l=e.append("g").attr("class","railroad-optional"),s=2*r,d=i;l.node().appendChild(n.element).setAttribute("transform",`translate(${s}, ${d})`);const m=d+n.dimensions.up,c=(new E).moveTo(0,m).lineTo(2*r,m);l.append("path").attr("class","railroad-line").attr("d",c.build());const h=(new E).moveTo(s+n.dimensions.width,m).lineTo(a,m);l.append("path").attr("class","railroad-line").attr("d",h.build());const p=(new E).moveTo(0,m).arcTo(r,r,0,!1,!1,r,m-r).lineTo(r,r).arcTo(r,r,0,!1,!0,2*r,0).lineTo(a-2*r,0).arcTo(r,r,0,!1,!0,a-r,r).lineTo(a-r,m-r).arcTo(r,r,0,!1,!1,a,m);return l.append("path").attr("class","railroad-line").attr("d",p.build()),{element:l.node(),dimensions:{width:a,height:o,up:m,down:o-m}}}renderRepetition(e,t,n){const r=this.renderExpression(e,t),i=this.config.arcRadius,a=2*i,o=r.dimensions.width+4*i,l=0===n,s=r.dimensions.height+a+(l?a:0),d=e.append("g").attr("class","railroad-repetition"),m=2*i,c=l?a:0;d.node().appendChild(r.element).setAttribute("transform",`translate(${m}, ${c})`);const h=c+r.dimensions.up;d.append("path").attr("class","railroad-line").attr("d",(new E).moveTo(0,h).lineTo(2*i,h).build()),d.append("path").attr("class","railroad-line").attr("d",(new E).moveTo(m+r.dimensions.width,h).lineTo(o,h).build());const p=c+r.dimensions.height+i,u=(new E).moveTo(m+r.dimensions.width,h).arcTo(i,i,0,!1,!0,m+r.dimensions.width+i,h+i).lineTo(m+r.dimensions.width+i,p).arcTo(i,i,0,!1,!0,m+r.dimensions.width,p+i).lineTo(2*i,p+i).arcTo(i,i,0,!1,!0,i,p).lineTo(i,h+i).arcTo(i,i,0,!1,!0,2*i,h);if(d.append("path").attr("class","railroad-line").attr("d",u.build()),l){const e=(new E).moveTo(0,h).arcTo(i,i,0,!1,!1,i,h-i).lineTo(i,i).arcTo(i,i,0,!1,!0,2*i,0).lineTo(o-2*i,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,h-i).arcTo(i,i,0,!1,!1,o,h);d.append("path").attr("class","railroad-line").attr("d",e.build())}return{element:d.node(),dimensions:{width:o,height:s,up:h,down:s-h}}}renderSpecial(e,t){const n=this.measureText("? "+t+" ?"),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-special");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i),a.append("text").attr("x",r/2).attr("y",i/2).text("? "+t+" ?"),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderExpression(e,t){switch(t.type){case"terminal":return this.renderTerminal(e,t.value);case"nonterminal":return this.renderNonTerminal(e,t.name);case"sequence":return this.renderSequence(e,t.elements);case"choice":return this.renderChoice(e,t.alternatives);case"optional":return this.renderOptional(e,t.element);case"repetition":return this.renderRepetition(e,t.element,t.min);case"special":return this.renderSpecial(e,t.text);default:throw new Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){const n=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${t})`),r=e.name+" =",i=this.measureText(r).width+20,a=i+20,o=n.append("g"),l=this.renderExpression(o,e.definition),s=Math.max(20,l.dimensions.up),d=s-l.dimensions.up;o.attr("transform",`translate(${a}, ${d})`);n.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",s).text(r);n.append("g").attr("class","railroad-start").append("circle").attr("cx",i).attr("cy",s).attr("r",this.config.markerRadius);return n.append("g").attr("class","railroad-end").append("circle").attr("cx",a+l.dimensions.width+10).attr("cy",s).attr("r",this.config.markerRadius),n.append("path").attr("class","railroad-line").attr("d",(new E).moveTo(i+this.config.markerRadius,s).lineTo(a,s).build()),n.append("path").attr("class","railroad-line").attr("d",(new E).moveTo(a+l.dimensions.width,s).lineTo(a+l.dimensions.width+10-this.config.markerRadius,s).build()),{height:Math.max(40,d+l.dimensions.height+2*this.config.padding),width:a+l.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,n=0;for(const r of e){const e=this.renderRule(r,t);t+=e.height+this.config.verticalSeparation,n=Math.max(n,e.width)}return{width:n+2*this.config.padding,height:t+this.config.padding}}},O=e((e,t,n)=>{o(e,t.height,t.width,n),e.attr("viewBox",`0 0 ${t.width} ${t.height}`)},"configureRailroadSvgSize"),W={draw:e((e,i,a)=>{t.debug("[Railroad] Rendering diagram\n"+e);try{const e=n(i);e.attr("class","railroad-diagram");const a=r().railroad,o=a?.useMaxWidth??!0,l=w.getRules();if(t.debug(`[Railroad] Rendering ${l.length} rules`),0===l.length)return t.warn("[Railroad] No rules to render"),void O(e,{height:100,width:200},o);const s=new D(e,A()).renderDiagram(l);O(e,s,o),t.debug("[Railroad] Render complete")}catch(e){throw t.error("[Railroad] Render error:",e),e}},"draw")};export{w as d,B as g,W as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t}from"./mermaid.core-
|
|
1
|
+
import{_ as t}from"./mermaid.core-GJX79pQL.js";var i=class{constructor(t){this.init=t,this.records=this.init()}static{t(this,"ImperativeState")}reset(){this.records=this.init()}};export{i as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{au as t,_ as n}from"./mermaid.core-
|
|
1
|
+
import{au as t,_ as n}from"./mermaid.core-GJX79pQL.js";var e=1e-5,o=1e-6;function r(t){const n=[];for(let e=0;e<t.length-1;e++)n.push({a:t[e],b:t[e+1]});return n}function s(t,n,e,r){const s=n.x-t.x,u=n.y-t.y,i=r.x-e.x,a=r.y-e.y,c=s*a-u*i;if(0===c)return null;const f=e.x-t.x,l=e.y-t.y,p=(f*a-l*i)/c,d=(f*u-l*s)/c;return p<=o||p>=.999999||d<=o||d>=.999999?null:{point:{x:t.x+p*s,y:t.y+p*u},tA:p,tB:d}}function u(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}function i(t,n,e){if("rounded"!==t.curve)return!1;const o=t.points,r=o[n],s=o[n+1];if(!r||!s)return!1;const u=Math.hypot(s.x-r.x,s.y-r.y),i=e*u,a=n>0?h(o[n-1],r,s,5):null;if(a&&i<a.cutLen)return!0;const c=n+2<o.length?h(r,s,o[n+2],5):null;return null!==c&&u-i<c.cutLen}function a(t){const n=[];for(let e=0;e<t.length;e++){const o=t[e],a=r(o.points);for(let c=e+1;c<t.length;c++){const e=t[c],f=r(e.points);for(const[t,r]of a.entries())for(const[a,c]of f.entries()){const f=s(r.a,r.b,c.a,c.b);if(!f)continue;if(i(o,t,f.tA)||i(e,a,f.tB))continue;const l=u(r);!!(l!==u(c))&&l?n.push({jumpEdgeId:o.id,otherEdgeId:e.id,segIndex:t,t:f.tA,point:f.point}):n.push({jumpEdgeId:e.id,otherEdgeId:o.id,segIndex:a,t:f.tB,point:f.point})}}}return n}function c(t){const n=Math.round(1e3*t)/1e3;return Number.isInteger(n),`${n}`}function f(t){return`${c(t.x)},${c(t.y)}`}function l(t){const n=t.b.x-t.a.x,e=t.b.y-t.a.y;return Math.abs(n)>=Math.abs(e)?n>=0?1:0:e>=0?1:0}function p(n,e){if(n.length<2)return n.map(t=>({...t}));const o=n.map(t=>({...t})),r=e.arrowTypeStart&&t[e.arrowTypeStart];if(r){const t=n[0],e=n[1],s=Math.atan2(e.y-t.y,e.x-t.x);o[0].x=t.x+r*Math.cos(s),o[0].y=t.y+r*Math.sin(s)}const s=e.arrowTypeEnd&&t[e.arrowTypeEnd];if(s){const t=n.length,e=n[t-2],r=n[t-1],u=Math.atan2(r.y-e.y,r.x-e.x);o[t-1].x=r.x-s*Math.cos(u),o[t-1].y=r.y-s*Math.sin(u)}return o}function d(t,n,e,o,r){const s=t.point.x,u=t.point.y,i={x:s-n*t.r,y:u-e*t.r},a={x:s+n*t.r,y:u+e*t.r},l=[`L${f(i)}`];return"arc"===r?l.push(`A${c(t.r)},${c(t.r)} 0 0 ${o} ${f(a)}`):l.push(`M${f(a)}`),l}function h(t,n,o,r){const s=n.x-t.x,u=n.y-t.y,i=o.x-n.x,a=o.y-n.y,c=Math.hypot(s,u),f=Math.hypot(i,a);if(c<e||f<e)return null;const l=s/c,p=u/c,d=i/f,h=a/f,y=l*d+p*h,g=Math.max(-1,Math.min(1,y)),x=Math.acos(g);if(x<e||Math.abs(Math.PI-x)<e)return null;const M=Math.min(r/Math.sin(x/2),c/2,f/2);return{startX:n.x-l*M,startY:n.y-p*M,endX:n.x+d*M,endY:n.y+h*M,ctrlX:n.x,ctrlY:n.y,cutLen:M}}function y(t,n,e){const o=t.points;if(o.length<2)return"";const s=p(o,t),u="rounded"===t.curve,i=r(s),a=new Map;for(const t of n){const n=i[t.segIndex];if(!n)continue;const o=Math.hypot(n.b.x-n.a.x,n.b.y-n.a.y),r=a.get(t.segIndex)??[];r.push({t:t.t,point:t.point,d:t.t*o,r:e.jumpRadius}),a.set(t.segIndex,r)}const y=[`M${f(s[0])}`];for(let t=0;t<i.length;t++){const n=i[t],o=Math.hypot(n.b.x-n.a.x,n.b.y-n.a.y),r=0===o?0:(n.b.x-n.a.x)/o,p=0===o?0:(n.b.y-n.a.y)/o,g=l(n);let x=0;if(u&&t>0){const n=h(s[t-1],s[t],s[t+1]??s[t],5);n&&(x=n.cutLen)}let M=o,b=null;u&&t<i.length-1&&(b=h(s[t],s[t+1],s[t+2]??s[t+1],5),b&&(M=o-b.cutLen));const m=.6*e.jumpRadius,$=[...a.get(t)??[]].sort((t,n)=>t.t-n.t).filter(t=>{const n=Math.min(t.d-x,M-t.d)-2;return t.r=Math.min(t.r,n),t.r>=m});for(let t=0;t<$.length-1;t++){const n=$[t+1].d-$[t].d;if($[t].r+$[t+1].r>n){const e=n/2;$[t].r=Math.min($[t].r,e),$[t+1].r=Math.min($[t+1].r,e)}}for(const t of $)t.r<m||y.push(...d(t,r,p,g,e.jumpStyle));u&&b?(y.push(`L${c(b.startX)},${c(b.startY)}`),y.push(`Q${c(b.ctrlX)},${c(b.ctrlY)} ${c(b.endX)},${c(b.endY)}`)):y.push(`L${f(n.b)}`)}return y.join(" ")}function g(t){return/^[\d\s+,.LMelm-]*$/.test(t)}function x(t){return!t||("linear"===t||"rounded"===t||"step"===t||"stepBefore"===t||"stepAfter"===t)}function M(t){if(!t)return null;try{const n="function"==typeof atob?atob(t):Buffer.from(t,"base64").toString(),e=JSON.parse(n);if(!Array.isArray(e))return null;const o=[];for(const t of e)t&&"number"==typeof t.x&&"number"==typeof t.y&&o.push({x:t.x,y:t.y});return o.length>=2?o:null}catch{return null}}function b(t,n,e){if(!e.enabled)return;const o=t.node();if(!o)return;const r=new Map;for(const t of n)r.set(t.id,t);const s=new Map;for(const t of o.querySelectorAll("path[data-id]")){const n=t.getAttribute("data-id");null===n||s.has(n)||s.set(n,t)}const u=[];for(const t of n){const n=s.get(t.id);if(!n)continue;const e=M(n.getAttribute("data-points"))??t.points;u.push({...t,points:e})}const i=a(u);if(0===i.length)return;const c=new Map;for(const t of i){const n=c.get(t.jumpEdgeId)??[];n.push(t),c.set(t.jumpEdgeId,n)}for(const t of u){const n=c.get(t.id);if(!n||0===n.length)continue;const o=r.get(t.id),u=o?.curve;if(void 0!==u&&!x(u))continue;const i=s.get(t.id);if(!i)continue;if(void 0===u){if(!g(i.getAttribute("d")??""))continue}const a=i.getAttribute("style")??"",f=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(a),l=f?Number.parseFloat(f[1]):null,p=f?Number.parseFloat(f[2]):null,d=y(t,n,e);if(i.setAttribute("d",d),null!==l&&null!==p&&"function"==typeof i.getTotalLength){const t=i.getTotalLength(),n=`0 ${l} ${Math.max(0,t-l-p)} ${p}`,e=a.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${n};`).replace(/;\s*;+/g,";");i.setAttribute("style",e)}}}n(r,"buildSegmentList"),n(s,"segmentIntersection"),n(u,"isHorizontalSeg"),n(i,"crossingSitsInRoundedCorner"),n(a,"findEdgeIntersections"),n(c,"fmt"),n(f,"pointToString"),n(l,"getArcSweepFlag"),n(p,"applyMarkerOffsets"),n(d,"emitJump"),n(h,"computeRoundedCorner"),n(y,"rewriteEdgePath"),n(g,"isStraightPath"),n(x,"curveSupportsLineHops"),n(M,"decodeDataPoints"),n(b,"applyLineJumpsToSvg");export{b as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,k as a,o as r,p as e}from"./mermaid.core-
|
|
1
|
+
import{_ as t,k as a,o as r,p as e}from"./mermaid.core-GJX79pQL.js";var s=t((t,a)=>{const r=t.append("rect");if(r.attr("x",a.x),r.attr("y",a.y),r.attr("fill",a.fill),r.attr("stroke",a.stroke),r.attr("width",a.width),r.attr("height",a.height),a.name&&r.attr("name",a.name),a.rx&&r.attr("rx",a.rx),a.ry&&r.attr("ry",a.ry),void 0!==a.attrs)for(const t in a.attrs)r.attr(t,a.attrs[t]);return a.class&&r.attr("class",a.class),r},"drawRect"),o=t((t,a)=>{const r={x:a.startx,y:a.starty,width:a.stopx-a.startx,height:a.stopy-a.starty,fill:a.fill,stroke:a.stroke,class:"rect"};s(t,r).lower()},"drawBackgroundRect"),n=t((t,a)=>{const e=a.text.replace(r," "),s=t.append("text");s.attr("x",a.x),s.attr("y",a.y),s.attr("class","legend"),s.style("text-anchor",a.anchor),a.class&&s.attr("class",a.class);const o=s.append("tspan");return o.attr("x",a.x+2*a.textMargin),o.text(e),s},"drawText"),i=t((t,a,r,s)=>{const o=t.append("image");o.attr("x",a),o.attr("y",r);const n=e.sanitizeUrl(s);o.attr("xlink:href",n)},"drawImage"),l=t((t,a,r,s)=>{const o=t.append("use");o.attr("x",a),o.attr("y",r);const n=e.sanitizeUrl(s);o.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),x=t(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),d=t(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),c=t(()=>{let t=a(".mermaidTooltip");return t.empty()&&(t=a("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");export{o as a,x as b,c,s as d,l as e,i as f,d as g,n as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as n}from"./mermaid.core-
|
|
1
|
+
import{_ as n}from"./mermaid.core-GJX79pQL.js";var e=n(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles");export{e as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as c}from"./mermaid.core-
|
|
1
|
+
import{_ as c}from"./mermaid.core-GJX79pQL.js";function e(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}c(e,"populateCommonDb");export{e as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t}from"./chunk-5VM5RSS4-CS0kZLYA.js";import{g as e}from"./chunk-XXDRQBXY-DPPGTM3w.js";import{s}from"./chunk-VQ5W62QI-CsGo0PTx.js";import{_ as i,q as n,l as r,c as a,r as u,t as o,u as l,b as c,s as h,v as d,a as p,g,x as A,m as y,y as k,J as f,z as b,A as m,k as E,B as C,C as D,D as T,E as x,F as S,G as F,H as _,I as B}from"./mermaid.core-DRk6tt5W.js";import{c as v}from"./chunk-55XCU76K-CvYWAV_o.js";import{c as $}from"./channel-DWjyymG_.js";var w=class{constructor(){this.vertexCounter=0,this.config=a(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=c,this.setAccDescription=h,this.setDiagramTitle=d,this.getAccTitle=p,this.getAccDescription=g,this.getDiagramTitle=A,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{i(this,"FlowDB")}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(const e of this.vertices.values())if(e.id===t)return this.diagramId?`${this.diagramId}-${e.domId}`:e.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,e,s,i,n,u,o={},l){if(!t||0===t.trim().length)return;let c;if(void 0!==l){let t;t=l.includes("\n")?l+"\n":"{\n"+l+"\n}",c=k(t,{schema:f})}const h=this.subGraphLookup.get(t);if(h&&c)return void(h.metadata={...h.metadata,...c});const d=this.edges.find(e=>e.id===t);if(d){const t=c;return void 0!==t?.animate&&(d.animate=t.animate),void 0!==t?.animation&&(d.animation=t.animation),void(void 0!==t?.curve&&(d.interpolate=t.curve))}let p,g=this.vertices.get(t);if(void 0===g&&(void 0===e&&void 0===s&&null!=i&&r.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),g={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,g)),this.vertexCounter++,void 0!==e?(this.config=a(),p=this.sanitizeText(e.text.trim()),g.labelType=e.type,p.startsWith('"')&&p.endsWith('"')&&(p=p.substring(1,p.length-1)),g.text=p):void 0===g.text&&(g.text=t),void 0!==s&&(g.type=s),null!=i&&i.forEach(t=>{g.styles.push(t)}),null!=n&&n.forEach(t=>{g.classes.push(t)}),void 0!==u&&(g.dir=u),void 0===g.props?g.props=o:void 0!==o&&Object.assign(g.props,o),void 0!==c){if(c.shape){if(c.shape!==c.shape.toLowerCase()||c.shape.includes("_"))throw new Error(`No such shape: ${c.shape}. Shape names should be lowercase.`);if(!b(c.shape))throw new Error(`No such shape: ${c.shape}.`);g.type=c?.shape}c?.label&&(g.text=c?.label,g.labelType=this.sanitizeNodeLabelType(c?.labelType)),c?.icon&&(g.icon=c?.icon,c.label?.trim()||g.text!==t||(g.text="")),c?.form&&(g.form=c?.form),c?.pos&&(g.pos=c?.pos),c?.img&&(g.img=c?.img,c.label?.trim()||g.text!==t||(g.text="")),c?.constraint&&(g.constraint=c.constraint),c.w&&(g.assetWidth=Number(c.w)),c.h&&(g.assetHeight=Number(c.h))}}addSingleLink(t,e,s,i){const n={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};r.info("abc78 Got edge...",n);const a=s.text;if(void 0!==a&&(n.text=this.sanitizeText(a.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=this.sanitizeNodeLabelType(a.type)),void 0!==s&&(n.type=s.type,n.stroke=s.stroke,n.length=s.length>10?10:s.length),i&&!this.edges.some(t=>t.id===i))n.id=i,n.isUserDefinedId=!0;else{const t=this.edges.filter(t=>t.start===n.start&&t.end===n.end);0===t.length?n.id=m(n.start,n.end,{counter:0,prefix:"L"}):n.id=m(n.start,n.end,{counter:t.length+1,prefix:"L"})}if(!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);r.info("Pushing edge..."),this.edges.push(n)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,s){const i=this.isLinkData(s)?s.id.replace("@",""):void 0;r.info("addLink",t,e,i);for(const n of t)for(const r of e){const a=n===t[t.length-1],u=r===e[0];a&&u?this.addSingleLink(n,r,s,i):this.addSingleLink(n,r,s,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} 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.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,(this.edges[t]?.style?.length??0)>0&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){const s=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=s&&s.forEach(t=>{if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)})})}setDirection(t){this.direction=t.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,e){for(const s of t.split(",")){const t=this.vertices.get(s);t&&t.classes.push(e);const i=this.edges.find(t=>t.id===s);i&&i.classes.push(e);const n=this.subGraphLookup.get(s);n&&n.classes.push(e)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(const s of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(s):s,e)}}setClickFun(t,e,s){if("loose"!==a().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof s){i=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t);const n=this.vertices.get(t);n&&(n.haveCallback=!0,this.funs.push(()=>{const s=this.lookUpDomId(t),n=document.querySelector(`[id="${s}"]`);null!==n&&n.addEventListener("click",()=>{l.runFunc(e,...i)},!1)}))}setLink(t,e,s){t.split(",").forEach(t=>{const i=this.vertices.get(t);void 0!==i&&(i.link=l.formatUrl(e,this.config),i.linkTarget=s)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFun(t,e,s)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){const e=v();E(t).select("svg").selectAll("g.node").on("mouseover",t=>{const s=E(t.currentTarget),i=s.attr("title");if(null===i)return;const n=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),e.html(C.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);E(t.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.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=a(),D()}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,e,s){let n=t.text.trim(),u=s.text;t===s&&/\s/.exec(s.text)&&(n=void 0);const o=i(t=>{const e={boolean:{},number:{},string:{}},s=[];let i;return{nodeList:t.filter(function(t){const n=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(n in e?!e[n].hasOwnProperty(t)&&(e[n][t]=!0):!s.includes(t)&&s.push(t))}),dir:i}},"uniq")(e.flat()),l=o.nodeList;let c=o.dir;const h=a().flowchart??{};if(c=c??(h.inheritDir?this.getDirection()??a().direction??void 0:void 0),"gen-1"===this.version)for(let t=0;t<l.length;t++)l[t]=this.lookUpDomId(l[t]);n=n??"subGraph"+this.subCount,u=u||"",u=this.sanitizeText(u),this.subCount=this.subCount+1;const d={id:n,nodes:l,title:u.trim(),classes:[],dir:c,labelType:this.sanitizeNodeLabelType(s?.type)};r.info("Adding",d.id,d.nodes,d.dir),d.nodes=this.makeUniq(d,this.subGraphs).nodes.filter(t=>t!==n);const p=this.subGraphs.find(t=>t.id===n);return p?p.nodes.push(...d.nodes):this.subGraphs.push(d),this.subGraphLookup.set(n,p??d),n}getPosForId(t){for(const[e,s]of this.subGraphs.entries())if(s.id===t)return e;return-1}indexNodes2(t,e){const s=this.subGraphs[e].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i<s.length;){const e=this.getPosForId(s[i]);if(e>=0){const s=this.indexNodes2(t,e);if(s.result)return{result:!0,count:n+s.count};n+=s.count}i+=1}return{result:!1,count:n}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}destructStartLink(t){let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:s,stroke:i}}countChar(t,e){const s=e.length;let i=0;for(let n=0;n<s;++n)e[n]===t&&++i;return i}destructEndLink(t){const e=t.trim();let s=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross",e.startsWith("x")&&(i="double_"+i,s=s.slice(1));break;case">":i="arrow_point",e.startsWith("<")&&(i="double_"+i,s=s.slice(1));break;case"o":i="arrow_circle",e.startsWith("o")&&(i="double_"+i,s=s.slice(1))}let n="normal",r=s.length-1;s.startsWith("=")&&(n="thick"),s.startsWith("~")&&(n="invisible");const a=this.countChar(".",s);return a&&(n="dotted",r=a),{type:i,stroke:n,length:r}}destructLink(t,e){const s=this.destructEndLink(t);let i;if(e){if(i=this.destructStartLink(e),i.stroke!==s.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===i.type)i.type=s.type;else{if(i.type!==s.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return"double_arrow"===i.type&&(i.type="double_arrow_point"),i.length=s.length,i}return s}exists(t,e){for(const s of t)if(s.nodes.includes(e))return!0;return!1}makeUniq(t,e){const s=[];return t.nodes.forEach((i,n)=>{this.exists(e,i)||s.push(t.nodes[n])}),{nodes:s}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}addNodeFromVertex(t,e,s,i,n,r){const a=s.get(t.id),u=i.get(t.id)??!1,o=this.findNode(e,t.id);if(o)o.cssStyles=t.styles,o.cssCompiledStyles=this.getCompiledStyles(t.classes),o.cssClasses=t.classes.join(" ");else{const s={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:a,padding:n.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:r,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};u?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t),minWidth:n.flowchart?.minNodeWidth})}}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}getData(){const t=a(),e=[],s=[],n=this.getSubGraphs(),r=new Map,u=new Map,o=new Map;for(const t of n)for(const e of t.nodes)this.subGraphLookup.has(e)&&o.set(e,t.id);const l=new Map,c=new Map;for(const t of n){const e=o.get(t.id);void 0!==e&&c.set(e,[...c.get(e)??[],t.id])}let h=0;const d=i(t=>{l.set(t,h++);for(const e of c.get(t)??[])d(e)},"walk");for(const t of n)o.has(t.id)||d(t.id);const p=i(t=>"collapsed"===this.subGraphLookup.get(t)?.metadata?.view,"isCollapsed"),g=i(t=>{let e;const s=new Set;let i=t;for(;void 0!==i&&!s.has(i);)s.add(i),p(i)&&(e=i),i=o.get(i);return e},"outermostCollapsed"),A=new Set,y=new Map;for(const t of n){const e=g(t.id);if(void 0!==e){t.id!==e&&(A.add(t.id),y.set(t.id,e));for(const s of t.nodes)s!==e&&(A.add(s),y.set(s,e))}}for(let t=n.length-1;t>=0;t--){const e=n[t];if(!A.has(e.id)){e.nodes.length>0&&u.set(e.id,!0);for(const t of e.nodes)r.set(t,e.id)}}for(let s=n.length-1;s>=0;s--){const i=n[s];A.has(i.id)||("collapsed"===i.metadata?.view?e.push({id:i.id,label:i.title,labelStyle:"",labelType:i.labelType,parentId:r.get(i.id),padding:8,cssCompiledStyles:this.getCompiledStyles(i.classes),cssClasses:i.classes.join(" "),shape:"collapsedGroup",dir:i.dir,isGroup:!1,look:t.look,colorIndex:l.get(i.id)}):e.push({id:i.id,label:i.title,labelStyle:"",labelType:i.labelType,parentId:r.get(i.id),padding:8,cssCompiledStyles:this.getCompiledStyles(i.classes),cssClasses:i.classes.join(" "),shape:"rect",dir:i.dir,isGroup:!0,look:t.look,colorIndex:l.get(i.id),metadata:i.metadata}))}this.getVertices().forEach(s=>{A.has(s.id)||this.addNodeFromVertex(s,e,r,u,t,t.look||"classic")});const k=this.getEdges();return k.forEach((e,i)=>{const{arrowTypeStart:n,arrowTypeEnd:r}=this.destructEdgeType(e.type),a=[...k.defaultStyle??[]],u=y.get(e.start)??e.start,o=y.get(e.end)??e.end;if(u===o&&(y.has(e.start)||y.has(e.end)))return;e.style&&a.push(...e.style);const l={id:m(u,o,{counter:i,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:u,end:o,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":n,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":r,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:a,style:a,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};s.push(l)}),{nodes:e,edges:s,other:{},config:t}}defaultConfig(){return T.flowchart}},L={getClasses:i(function(t,e){return e.db.getClasses()},"getClasses"),draw:i(async function(t,i,n,c){r.info("REF0:"),r.info("Drawing state diagram (v2)",i);const{securityLevel:h,flowchart:d,layout:p}=a();c.db.setDiagramId(i),r.debug("Before getData: ");const g=c.db.getData();r.debug("Data: ",g);const A=e(i,h),y=c.db.getDirection();g.type=c.type,g.layoutAlgorithm=u(p),g.direction=y,g.nodeSpacing=d?.nodeSpacing||50,g.rankSpacing=d?.rankSpacing||50,g.markers=["point","circle","cross"],g.diagramId=i,r.debug("REF1:",g),await o(g,A);const k=g.config.flowchart?.diagramPadding??8;l.insertTitle(A,"flowchartTitleText",d?.titleTopMargin||0,c.db.getDiagramTitle()),s(A,k,"flowchart",d?.useMaxWidth||!1)},"draw")},I=function(){var t=i(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,4],s=[1,3],n=[1,5],r=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],a=[2,2],u=[1,13],o=[1,14],l=[1,15],c=[1,16],h=[1,23],d=[1,25],p=[1,26],g=[1,27],A=[1,50],y=[1,49],k=[1,29],f=[1,30],b=[1,31],m=[1,32],E=[1,33],C=[1,45],D=[1,47],T=[1,43],x=[1,48],S=[1,44],F=[1,51],_=[1,46],B=[1,52],v=[1,53],$=[1,34],w=[1,35],L=[1,36],I=[1,37],R=[1,38],N=[1,58],G=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],P=[1,62],O=[1,61],M=[1,63],U=[8,9,11,75,77,78],V=[1,79],W=[1,92],j=[1,97],z=[1,96],K=[1,93],Y=[1,89],H=[1,95],X=[1,91],q=[1,98],Q=[1,94],J=[1,99],Z=[1,90],tt=[8,9,10,11,40,75,77,78],et=[8,9,10,11,40,46,75,77,78],st=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],it=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],nt=[44,60,89,102,105,106,109,111,114,115,116],rt=[1,122],at=[1,123],ut=[1,125],ot=[1,124],lt=[44,60,62,74,89,102,105,106,109,111,114,115,116],ct=[1,134],ht=[1,148],dt=[1,149],pt=[1,150],gt=[1,151],At=[1,136],yt=[1,138],kt=[1,142],ft=[1,143],bt=[1,144],mt=[1,145],Et=[1,146],Ct=[1,147],Dt=[1,152],Tt=[1,153],xt=[1,132],St=[1,133],Ft=[1,140],_t=[1,135],Bt=[1,139],vt=[1,137],$t=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],wt=[1,155],Lt=[1,157],It=[8,9,11],Rt=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],Nt=[1,177],Gt=[1,173],Pt=[1,174],Ot=[1,178],Mt=[1,175],Ut=[1,176],Vt=[77,116,119],Wt=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],jt=[10,106],zt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Kt=[1,248],Yt=[1,246],Ht=[1,250],Xt=[1,244],qt=[1,245],Qt=[1,247],Jt=[1,249],Zt=[1,251],te=[1,269],ee=[8,9,11,106],se=[8,9,10,11,60,84,105,106,109,110,111,112],ie={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:i(function(t,e,s,i,n,r,a){var u=r.length-1;switch(n){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(r[u])||r[u].length>0)&&r[u-1].push(r[u]),this.$=r[u-1];break;case 4:case 183:case 44:case 54:case 76:case 181:this.$=r[u];break;case 11:i.setDirection("TB"),this.$="TB";break;case 12:i.setDirection(r[u-1]),this.$=r[u-1];break;case 27:this.$=r[u-1].nodes;break;case 33:this.$=i.addSubGraph(r[u-6],r[u-1],r[u-4]);break;case 34:this.$=i.addSubGraph(r[u-3],r[u-1],r[u-3]);break;case 35:this.$=i.addSubGraph(void 0,r[u-1],void 0);break;case 37:this.$=r[u].trim(),i.setAccTitle(this.$);break;case 38:case 39:this.$=r[u].trim(),i.setAccDescription(this.$);break;case 43:case 133:this.$=r[u-1]+r[u];break;case 45:i.addVertex(r[u-1][r[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u]),i.addLink(r[u-3].stmt,r[u-1],r[u-2]),this.$={stmt:r[u-1],nodes:r[u-1].concat(r[u-3].nodes)};break;case 46:i.addLink(r[u-2].stmt,r[u],r[u-1]),this.$={stmt:r[u],nodes:r[u].concat(r[u-2].nodes)};break;case 47:i.addLink(r[u-3].stmt,r[u-1],r[u-2]),this.$={stmt:r[u-1],nodes:r[u-1].concat(r[u-3].nodes)};break;case 48:this.$={stmt:r[u-1],nodes:r[u-1]};break;case 49:i.addVertex(r[u-1][r[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u]),this.$={stmt:r[u-1],nodes:r[u-1],shapeData:r[u]};break;case 50:this.$={stmt:r[u],nodes:r[u]};break;case 51:case 128:case 130:this.$=[r[u]];break;case 52:i.addVertex(r[u-5][r[u-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u-4]),this.$=r[u-5].concat(r[u]);break;case 53:this.$=r[u-4].concat(r[u]);break;case 55:this.$=r[u-2],i.setClass(r[u-2],r[u]);break;case 56:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"square");break;case 57:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"doublecircle");break;case 58:this.$=r[u-5],i.addVertex(r[u-5],r[u-2],"circle");break;case 59:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"ellipse");break;case 60:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"stadium");break;case 61:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"subroutine");break;case 62:this.$=r[u-7],i.addVertex(r[u-7],r[u-1],"rect",void 0,void 0,void 0,Object.fromEntries([[r[u-5],r[u-3]]]));break;case 63:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"cylinder");break;case 64:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"round");break;case 65:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"diamond");break;case 66:this.$=r[u-5],i.addVertex(r[u-5],r[u-2],"hexagon");break;case 67:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"odd");break;case 68:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"trapezoid");break;case 69:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"inv_trapezoid");break;case 70:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"lean_right");break;case 71:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"lean_left");break;case 72:this.$=r[u],i.addVertex(r[u]);break;case 73:r[u-1].text=r[u],this.$=r[u-1];break;case 74:case 75:r[u-2].text=r[u-1],this.$=r[u-2];break;case 77:var o=i.destructLink(r[u],r[u-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:r[u-1]};break;case 78:o=i.destructLink(r[u],r[u-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:r[u-1],id:r[u-3]};break;case 79:case 86:case 101:case 103:this.$={text:r[u],type:"text"};break;case 80:case 87:case 102:this.$={text:r[u-1].text+""+r[u],type:r[u-1].type};break;case 81:case 88:this.$={text:r[u],type:"string"};break;case 82:case 89:case 104:this.$={text:r[u],type:"markdown"};break;case 83:o=i.destructLink(r[u]);this.$={type:o.type,stroke:o.stroke,length:o.length};break;case 84:o=i.destructLink(r[u]);this.$={type:o.type,stroke:o.stroke,length:o.length,id:r[u-1]};break;case 85:this.$=r[u-1];break;case 105:this.$=r[u-4],i.addClass(r[u-2],r[u]);break;case 106:this.$=r[u-4],i.setClass(r[u-2],r[u]);break;case 107:case 115:this.$=r[u-1],i.setClickEvent(r[u-1],r[u]);break;case 108:case 116:this.$=r[u-3],i.setClickEvent(r[u-3],r[u-2]),i.setTooltip(r[u-3],r[u]);break;case 109:this.$=r[u-2],i.setClickEvent(r[u-2],r[u-1],r[u]);break;case 110:this.$=r[u-4],i.setClickEvent(r[u-4],r[u-3],r[u-2]),i.setTooltip(r[u-4],r[u]);break;case 111:this.$=r[u-2],i.setLink(r[u-2],r[u]);break;case 112:this.$=r[u-4],i.setLink(r[u-4],r[u-2]),i.setTooltip(r[u-4],r[u]);break;case 113:this.$=r[u-4],i.setLink(r[u-4],r[u-2],r[u]);break;case 114:this.$=r[u-6],i.setLink(r[u-6],r[u-4],r[u]),i.setTooltip(r[u-6],r[u-2]);break;case 117:this.$=r[u-1],i.setLink(r[u-1],r[u]);break;case 118:this.$=r[u-3],i.setLink(r[u-3],r[u-2]),i.setTooltip(r[u-3],r[u]);break;case 119:this.$=r[u-3],i.setLink(r[u-3],r[u-2],r[u]);break;case 120:this.$=r[u-5],i.setLink(r[u-5],r[u-4],r[u]),i.setTooltip(r[u-5],r[u-2]);break;case 121:this.$=r[u-4],i.addVertex(r[u-2],void 0,void 0,r[u]);break;case 122:this.$=r[u-4],i.updateLink([r[u-2]],r[u]);break;case 123:this.$=r[u-4],i.updateLink(r[u-2],r[u]);break;case 124:this.$=r[u-8],i.updateLinkInterpolate([r[u-6]],r[u-2]),i.updateLink([r[u-6]],r[u]);break;case 125:this.$=r[u-8],i.updateLinkInterpolate(r[u-6],r[u-2]),i.updateLink(r[u-6],r[u]);break;case 126:this.$=r[u-6],i.updateLinkInterpolate([r[u-4]],r[u]);break;case 127:this.$=r[u-6],i.updateLinkInterpolate(r[u-4],r[u]);break;case 129:case 131:r[u-2].push(r[u]),this.$=r[u-2];break;case 182:case 184:this.$=r[u-1]+""+r[u];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"}}},"anonymous"),table:[{3:1,4:2,9:e,10:s,12:n},{1:[3]},t(r,a,{5:6}),{4:7,9:e,10:s,12:n},{4:8,9:e,10:s,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:u,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:d,36:p,38:g,42:28,43:39,44:A,45:40,47:41,60:y,84:k,85:f,86:b,87:m,88:E,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v,121:$,122:w,123:L,124:I,125:R},t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),{8:[1,55],9:[1,56],10:N,15:54,18:57},t(G,[2,3]),t(G,[2,4]),t(G,[2,5]),t(G,[2,6]),t(G,[2,7]),t(G,[2,8]),{8:P,9:O,11:M,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:P,9:O,11:M,21:68},{8:P,9:O,11:M,21:69},{8:P,9:O,11:M,21:70},{8:P,9:O,11:M,21:71},{8:P,9:O,11:M,21:72},{8:P,9:O,10:[1,73],11:M,21:74},t(G,[2,36]),{35:[1,75]},{37:[1,76]},t(G,[2,39]),t(U,[2,50],{18:77,39:78,10:N,40:V}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:W,44:j,60:z,80:[1,87],89:K,95:[1,84],97:[1,85],101:86,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},t(G,[2,185]),t(G,[2,186]),t(G,[2,187]),t(G,[2,188]),t(G,[2,189]),t(tt,[2,51]),t(tt,[2,54],{46:[1,100]}),t(et,[2,72],{113:113,29:[1,101],44:A,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:y,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:C,102:D,105:T,106:x,109:S,111:F,114:_,115:B,116:v}),t(st,[2,181]),t(st,[2,142]),t(st,[2,143]),t(st,[2,144]),t(st,[2,145]),t(st,[2,146]),t(st,[2,147]),t(st,[2,148]),t(st,[2,149]),t(st,[2,150]),t(st,[2,151]),t(st,[2,152]),t(r,[2,12]),t(r,[2,18]),t(r,[2,19]),{9:[1,114]},t(it,[2,26],{18:115,10:N}),t(G,[2,27]),{42:116,43:39,44:A,45:40,47:41,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},t(G,[2,40]),t(G,[2,41]),t(G,[2,42]),t(nt,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:rt,81:at,116:ut,119:ot},{75:[1,126],77:[1,127]},t(lt,[2,83]),t(G,[2,28]),t(G,[2,29]),t(G,[2,30]),t(G,[2,31]),t(G,[2,32]),{10:ct,12:ht,14:dt,27:pt,28:128,32:gt,44:At,60:yt,75:kt,80:[1,130],81:[1,131],83:141,84:ft,85:bt,86:mt,87:Et,88:Ct,89:Dt,90:Tt,91:129,105:xt,109:St,111:Ft,114:_t,115:Bt,116:vt},t($t,a,{5:154}),t(G,[2,37]),t(G,[2,38]),t(U,[2,48],{44:wt}),t(U,[2,49],{18:156,10:N,40:Lt}),t(tt,[2,44]),{44:A,47:158,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},{102:[1,159],103:160,105:[1,161]},{44:A,47:162,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},{44:A,47:163,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},t(It,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},t(It,[2,115],{120:168,10:[1,167],14:W,44:j,60:z,89:K,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,117],{10:[1,169]}),t(Rt,[2,183]),t(Rt,[2,170]),t(Rt,[2,171]),t(Rt,[2,172]),t(Rt,[2,173]),t(Rt,[2,174]),t(Rt,[2,175]),t(Rt,[2,176]),t(Rt,[2,177]),t(Rt,[2,178]),t(Rt,[2,179]),t(Rt,[2,180]),{44:A,47:170,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},{30:171,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:179,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:181,50:[1,180],67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:182,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:183,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:184,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{109:[1,185]},{30:186,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:187,65:[1,188],67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:189,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:190,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:191,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},t(st,[2,182]),t(r,[2,20]),t(it,[2,25]),t(U,[2,46],{39:192,18:193,10:N,40:V}),t(nt,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{77:[1,197],79:198,116:ut,119:ot},t(Vt,[2,79]),t(Vt,[2,81]),t(Vt,[2,82]),t(Vt,[2,168]),t(Vt,[2,169]),{76:199,79:121,80:rt,81:at,116:ut,119:ot},t(lt,[2,84]),{8:P,9:O,10:ct,11:M,12:ht,14:dt,21:201,27:pt,29:[1,200],32:gt,44:At,60:yt,75:kt,83:141,84:ft,85:bt,86:mt,87:Et,88:Ct,89:Dt,90:Tt,91:202,105:xt,109:St,111:Ft,114:_t,115:Bt,116:vt},t(Wt,[2,101]),t(Wt,[2,103]),t(Wt,[2,104]),t(Wt,[2,157]),t(Wt,[2,158]),t(Wt,[2,159]),t(Wt,[2,160]),t(Wt,[2,161]),t(Wt,[2,162]),t(Wt,[2,163]),t(Wt,[2,164]),t(Wt,[2,165]),t(Wt,[2,166]),t(Wt,[2,167]),t(Wt,[2,90]),t(Wt,[2,91]),t(Wt,[2,92]),t(Wt,[2,93]),t(Wt,[2,94]),t(Wt,[2,95]),t(Wt,[2,96]),t(Wt,[2,97]),t(Wt,[2,98]),t(Wt,[2,99]),t(Wt,[2,100]),{6:11,7:12,8:u,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,203],33:24,34:d,36:p,38:g,42:28,43:39,44:A,45:40,47:41,60:y,84:k,85:f,86:b,87:m,88:E,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v,121:$,122:w,123:L,124:I,125:R},{10:N,18:204},{44:[1,205]},t(tt,[2,43]),{10:[1,206],44:A,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:113,114:_,115:B,116:v},{10:[1,207]},{10:[1,208],106:[1,209]},t(jt,[2,128]),{10:[1,210],44:A,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:113,114:_,115:B,116:v},{10:[1,211],44:A,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:113,114:_,115:B,116:v},{80:[1,212]},t(It,[2,109],{10:[1,213]}),t(It,[2,111],{10:[1,214]}),{80:[1,215]},t(Rt,[2,184]),{80:[1,216],98:[1,217]},t(tt,[2,55],{113:113,44:A,60:y,89:C,102:D,105:T,106:x,109:S,111:F,114:_,115:B,116:v}),{31:[1,218],67:Nt,82:219,116:Ot,117:Mt,118:Ut},t(zt,[2,86]),t(zt,[2,88]),t(zt,[2,89]),t(zt,[2,153]),t(zt,[2,154]),t(zt,[2,155]),t(zt,[2,156]),{49:[1,220],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{30:221,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{51:[1,222],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{53:[1,223],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{55:[1,224],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{57:[1,225],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{60:[1,226]},{64:[1,227],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{66:[1,228],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{30:229,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{31:[1,230],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{67:Nt,69:[1,231],71:[1,232],82:219,116:Ot,117:Mt,118:Ut},{67:Nt,69:[1,234],71:[1,233],82:219,116:Ot,117:Mt,118:Ut},t(U,[2,45],{18:156,10:N,40:Lt}),t(U,[2,47],{44:wt}),t(nt,[2,75]),t(nt,[2,74]),{62:[1,235],67:Nt,82:219,116:Ot,117:Mt,118:Ut},t(nt,[2,77]),t(Vt,[2,80]),{77:[1,236],79:198,116:ut,119:ot},{30:237,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},t($t,a,{5:238}),t(Wt,[2,102]),t(G,[2,35]),{43:239,44:A,45:40,47:41,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},{10:N,18:240},{10:Kt,60:Yt,84:Ht,92:241,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:Kt,60:Yt,84:Ht,92:252,104:[1,253],105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:Kt,60:Yt,84:Ht,92:254,104:[1,255],105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{105:[1,256]},{10:Kt,60:Yt,84:Ht,92:257,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{44:A,47:258,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},t(It,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},t(It,[2,116]),t(It,[2,118],{10:[1,262]}),t(It,[2,119]),t(et,[2,56]),t(zt,[2,87]),t(et,[2,57]),{51:[1,263],67:Nt,82:219,116:Ot,117:Mt,118:Ut},t(et,[2,64]),t(et,[2,59]),t(et,[2,60]),t(et,[2,61]),{109:[1,264]},t(et,[2,63]),t(et,[2,65]),{66:[1,265],67:Nt,82:219,116:Ot,117:Mt,118:Ut},t(et,[2,67]),t(et,[2,68]),t(et,[2,70]),t(et,[2,69]),t(et,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(nt,[2,78]),{31:[1,266],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{6:11,7:12,8:u,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,267],33:24,34:d,36:p,38:g,42:28,43:39,44:A,45:40,47:41,60:y,84:k,85:f,86:b,87:m,88:E,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v,121:$,122:w,123:L,124:I,125:R},t(tt,[2,53]),{43:268,44:A,45:40,47:41,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},t(It,[2,121],{106:te}),t(ee,[2,130],{108:270,10:Kt,60:Yt,84:Ht,105:Xt,109:qt,110:Qt,111:Jt,112:Zt}),t(se,[2,132]),t(se,[2,134]),t(se,[2,135]),t(se,[2,136]),t(se,[2,137]),t(se,[2,138]),t(se,[2,139]),t(se,[2,140]),t(se,[2,141]),t(It,[2,122],{106:te}),{10:[1,271]},t(It,[2,123],{106:te}),{10:[1,272]},t(jt,[2,129]),t(It,[2,105],{106:te}),t(It,[2,106],{113:113,44:A,60:y,89:C,102:D,105:T,106:x,109:S,111:F,114:_,115:B,116:v}),t(It,[2,110]),t(It,[2,112],{10:[1,273]}),t(It,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:P,9:O,11:M,21:278},t(G,[2,34]),t(tt,[2,52]),{10:Kt,60:Yt,84:Ht,105:Xt,107:279,108:243,109:qt,110:Qt,111:Jt,112:Zt},t(se,[2,133]),{14:W,44:j,60:z,89:K,101:280,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},{14:W,44:j,60:z,89:K,101:281,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},{98:[1,282]},t(It,[2,120]),t(et,[2,58]),{30:283,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},t(et,[2,66]),t($t,a,{5:284}),t(ee,[2,131],{108:270,10:Kt,60:Yt,84:Ht,105:Xt,109:qt,110:Qt,111:Jt,112:Zt}),t(It,[2,126],{120:168,10:[1,285],14:W,44:j,60:z,89:K,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,127],{120:168,10:[1,286],14:W,44:j,60:z,89:K,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,114]),{31:[1,287],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{6:11,7:12,8:u,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,288],33:24,34:d,36:p,38:g,42:28,43:39,44:A,45:40,47:41,60:y,84:k,85:f,86:b,87:m,88:E,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v,121:$,122:w,123:L,124:I,125:R},{10:Kt,60:Yt,84:Ht,92:289,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:Kt,60:Yt,84:Ht,92:290,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},t(et,[2,62]),t(G,[2,33]),t(It,[2,124],{106:te}),t(It,[2,125],{106:te})],defaultActions:{},parseError:i(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:i(function(t){var e=this,s=[0],n=[],r=[null],a=[],u=this.table,o="",l=0,c=0,h=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var A=d.yylloc;a.push(A);var y=d.options&&d.options.ranges;function k(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),i(k,"lex");for(var f,b,m,E,C,D,T,x,S={};;){if(b=s[s.length-1],this.defaultActions[b]?m=this.defaultActions[b]:(null==f&&(f=k()),m=u[b]&&u[b][f]),void 0===m||!m.length||!m[0]){var F="";for(C in x=[],u[b])this.terminals_[C]&&C>2&&x.push("'"+this.terminals_[C]+"'");F=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(F,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:A,expected:x})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+f);switch(m[0]){case 1:s.push(f),r.push(d.yytext),a.push(d.yylloc),s.push(m[1]),f=null,c=d.yyleng,o=d.yytext,l=d.yylineno,A=d.yylloc;break;case 2:if(D=this.productions_[m[1]][1],S.$=r[r.length-D],S._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(S,[o,c,l,p.yy,m[1],r,a].concat(h))))return E;D&&(s=s.slice(0,-1*D*2),r=r.slice(0,-1*D),a=a.slice(0,-1*D)),s.push(this.productions_[m[1]][0]),r.push(S.$),a.push(S._$),T=u[s[s.length-2]][s[s.length-1]],s.push(T);break;case 3:return!0}}return!0},"parse")},ne=function(){return{EOF:1,parseError:i(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:i(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:i(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:i(function(t){this.unput(this.match.slice(t))},"less"),pastInput:i(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:i(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var t=this.next();return t||this.lex()},"lex"),begin:i(function(t){this.conditionStack.push(t)},"begin"),popState:i(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:i(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:i(function(t){this.begin(t)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:i(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const s=/\n\s*/g;return e.yytext=e.yytext.replace(s,"<br/>"),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 18:return 96;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 34:return 88;case 35:case 36:case 37:case 38:return t.lex.firstGraph()&&this.begin("dir"),12;case 39:return 27;case 40:return 32;case 41:case 42:case 43:case 44:return 98;case 45:return this.popState(),13;case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:return this.popState(),14;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:case 104:return 111;case 64:return 46;case 65:return 60;case 66:case 105:return 44;case 67:return 8;case 68:return 106;case 69:case 103:return 115;case 70:case 73:case 76:return this.popState(),77;case 71:return this.pushState("edgeText"),75;case 72:case 75:case 78:return 119;case 74:return this.pushState("thickEdgeText"),75;case 77:return this.pushState("dottedEdgeText"),75;case 79:return 77;case 80:return this.popState(),53;case 81:case 117:return"TEXT";case 82:return this.pushState("ellipseText"),52;case 83:return this.popState(),55;case 84:return this.pushState("text"),54;case 85:return this.popState(),57;case 86:return this.pushState("text"),56;case 87:return 58;case 88:return this.pushState("text"),67;case 89:return this.popState(),64;case 90:return this.pushState("text"),63;case 91:return this.popState(),49;case 92:return this.pushState("text"),48;case 93:return this.popState(),69;case 94:return this.popState(),71;case 95:return 117;case 96:return this.pushState("trapText"),68;case 97:return this.pushState("trapText"),70;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;case 110:return this.pushState("text"),62;case 111:return this.popState(),51;case 112:return this.pushState("text"),50;case 113:return this.popState(),31;case 114:return this.pushState("text"),29;case 115:return this.popState(),66;case 116:return this.pushState("text"),65;case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121:return 11}},"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]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_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*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([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])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:[^\S\n\r]+)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],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,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}}}();function re(){this.yy={}}return ie.lexer=ne,i(re,"Parser"),re.prototype=ie,ie.Parser=re,new re}();I.parser=I;var R=I,N=Object.assign({},R);N.parse=t=>{const e=t.replace(/}\s*\n/g,"}\n");return R.parse(e)};var G=N,P=i(t=>{const{theme:e,bkgColorArray:s,borderColorArray:n}=t;if(!x(e,n))return"";const r=S(t.look),a=F(s);let u="";for(let e=0;e<_(t.THEME_COLOR_LIMIT,n);e++){const t=n[e%n.length],o=a?`fill: ${s[e%s.length]};`:"",l=`[data-look="${r}"][data-color-id="color-${e}"]`,c=i(t=>`${l}.node ${t}, ${l}.rough-node ${t}`,"collapsedRule"),h=i(t=>`${l}.swimlane.cluster .swimlane-title${t}, ${l}.swimlane.cluster .swimlane-body${t}`,"laneRule");u+=`\n\n ${l}.cluster:not(.swimlane) rect {\n stroke: ${t};\n ${o}\n }\n\n ${l}.cluster:not(.swimlane) path {\n stroke: ${t};\n ${o}\n }\n\n /* Lane, classic and neo. */\n ${l}.swimlane.cluster rect.swimlane-title,\n ${l}.swimlane.cluster rect.swimlane-body {\n stroke: ${t};\n ${o}\n }\n\n /* Lane, handDrawn: roughjs emits the hachure fill first, then the outline. */\n ${h(" path:nth-of-type(2)")} {\n stroke: ${t};\n }\n${a?`\n /* A roughjs fill is drawn as lines, so the lane fill is a stroke here. */\n ${h(" path:first-of-type")} {\n stroke: ${s[e%s.length]};\n }\n`:""}\n ${c(".collapsed-group")},\n ${c(".collapsed-group path")} {\n stroke: ${t};\n ${o}\n }\n\n /* The ellipsis dots and the separator take clusterBorder further down, so without\n these the container is palette-coloured while its own markers are not. */\n ${c(".collapsed-indicator")} {\n fill: ${t};\n }\n\n ${c(".collapsed-separator")} {\n stroke: ${t};\n }\n `}return u},"genColor"),O=i((t,e)=>{const s=$,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return B(i,n,r,e)},"fade"),M=i(e=>`${P(e)}\n .label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span {\n color: ${e.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: ${e.strokeWidth??1}px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${e.lineColor} !important;\n stroke-width: 0;\n stroke: ${e.lineColor};\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePaths .path {\n stroke: ${e.lineColor};\n stroke-width: ${e.strokeWidth??2}px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n p {\n background-color: ${e.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${O(e.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n /* Collapsed subgraph node (@{ view: collapsed }) */\n .node .collapsed-indicator {\n fill: ${e.clusterBorder};\n stroke: none;\n opacity: 0.6;\n }\n\n .node .collapsed-separator {\n stroke: ${e.clusterBorder};\n stroke-width: 0.75px;\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${e.edgeLabelBackground};\n p {\n background-color: ${e.edgeLabelBackground};\n padding: 2px;\n }\n .label rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n ${t()}\n`,"getStyles"),U=i(({styles:t=M}={})=>({parser:G,get db(){return new w},renderer:L,styles:t,init:i(t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,n({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),V=U();export{U as c,V as d,M as s};
|
|
1
|
+
import{g as t}from"./chunk-5VM5RSS4-bDfGkvI-.js";import{g as e}from"./chunk-XXDRQBXY-ClHdtw3t.js";import{s}from"./chunk-VQ5W62QI-BTvKzH75.js";import{_ as i,q as n,l as r,c as a,r as u,t as o,u as l,b as c,s as h,v as d,a as p,g,x as A,m as y,y as k,J as f,z as b,A as m,k as E,B as C,C as D,D as T,E as x,F as S,G as F,H as _,I as B}from"./mermaid.core-GJX79pQL.js";import{c as v}from"./chunk-55XCU76K-Bm2vEyhO.js";import{c as $}from"./channel-p0K5iSo0.js";var w=class{constructor(){this.vertexCounter=0,this.config=a(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=c,this.setAccDescription=h,this.setDiagramTitle=d,this.getAccTitle=p,this.getAccDescription=g,this.getDiagramTitle=A,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{i(this,"FlowDB")}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(const e of this.vertices.values())if(e.id===t)return this.diagramId?`${this.diagramId}-${e.domId}`:e.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,e,s,i,n,u,o={},l){if(!t||0===t.trim().length)return;let c;if(void 0!==l){let t;t=l.includes("\n")?l+"\n":"{\n"+l+"\n}",c=k(t,{schema:f})}const h=this.subGraphLookup.get(t);if(h&&c)return void(h.metadata={...h.metadata,...c});const d=this.edges.find(e=>e.id===t);if(d){const t=c;return void 0!==t?.animate&&(d.animate=t.animate),void 0!==t?.animation&&(d.animation=t.animation),void(void 0!==t?.curve&&(d.interpolate=t.curve))}let p,g=this.vertices.get(t);if(void 0===g&&(void 0===e&&void 0===s&&null!=i&&r.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),g={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,g)),this.vertexCounter++,void 0!==e?(this.config=a(),p=this.sanitizeText(e.text.trim()),g.labelType=e.type,p.startsWith('"')&&p.endsWith('"')&&(p=p.substring(1,p.length-1)),g.text=p):void 0===g.text&&(g.text=t),void 0!==s&&(g.type=s),null!=i&&i.forEach(t=>{g.styles.push(t)}),null!=n&&n.forEach(t=>{g.classes.push(t)}),void 0!==u&&(g.dir=u),void 0===g.props?g.props=o:void 0!==o&&Object.assign(g.props,o),void 0!==c){if(c.shape){if(c.shape!==c.shape.toLowerCase()||c.shape.includes("_"))throw new Error(`No such shape: ${c.shape}. Shape names should be lowercase.`);if(!b(c.shape))throw new Error(`No such shape: ${c.shape}.`);g.type=c?.shape}c?.label&&(g.text=c?.label,g.labelType=this.sanitizeNodeLabelType(c?.labelType)),c?.icon&&(g.icon=c?.icon,c.label?.trim()||g.text!==t||(g.text="")),c?.form&&(g.form=c?.form),c?.pos&&(g.pos=c?.pos),c?.img&&(g.img=c?.img,c.label?.trim()||g.text!==t||(g.text="")),c?.constraint&&(g.constraint=c.constraint),c.w&&(g.assetWidth=Number(c.w)),c.h&&(g.assetHeight=Number(c.h))}}addSingleLink(t,e,s,i){const n={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};r.info("abc78 Got edge...",n);const a=s.text;if(void 0!==a&&(n.text=this.sanitizeText(a.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=this.sanitizeNodeLabelType(a.type)),void 0!==s&&(n.type=s.type,n.stroke=s.stroke,n.length=s.length>10?10:s.length),i&&!this.edges.some(t=>t.id===i))n.id=i,n.isUserDefinedId=!0;else{const t=this.edges.filter(t=>t.start===n.start&&t.end===n.end);0===t.length?n.id=m(n.start,n.end,{counter:0,prefix:"L"}):n.id=m(n.start,n.end,{counter:t.length+1,prefix:"L"})}if(!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);r.info("Pushing edge..."),this.edges.push(n)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,s){const i=this.isLinkData(s)?s.id.replace("@",""):void 0;r.info("addLink",t,e,i);for(const n of t)for(const r of e){const a=n===t[t.length-1],u=r===e[0];a&&u?this.addSingleLink(n,r,s,i):this.addSingleLink(n,r,s,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} 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.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,(this.edges[t]?.style?.length??0)>0&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){const s=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=s&&s.forEach(t=>{if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)})})}setDirection(t){this.direction=t.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,e){for(const s of t.split(",")){const t=this.vertices.get(s);t&&t.classes.push(e);const i=this.edges.find(t=>t.id===s);i&&i.classes.push(e);const n=this.subGraphLookup.get(s);n&&n.classes.push(e)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(const s of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(s):s,e)}}setClickFun(t,e,s){if("loose"!==a().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof s){i=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t);const n=this.vertices.get(t);n&&(n.haveCallback=!0,this.funs.push(()=>{const s=this.lookUpDomId(t),n=document.querySelector(`[id="${s}"]`);null!==n&&n.addEventListener("click",()=>{l.runFunc(e,...i)},!1)}))}setLink(t,e,s){t.split(",").forEach(t=>{const i=this.vertices.get(t);void 0!==i&&(i.link=l.formatUrl(e,this.config),i.linkTarget=s)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFun(t,e,s)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){const e=v();E(t).select("svg").selectAll("g.node").on("mouseover",t=>{const s=E(t.currentTarget),i=s.attr("title");if(null===i)return;const n=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),e.html(C.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);E(t.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.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=a(),D()}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,e,s){let n=t.text.trim(),u=s.text;t===s&&/\s/.exec(s.text)&&(n=void 0);const o=i(t=>{const e={boolean:{},number:{},string:{}},s=[];let i;return{nodeList:t.filter(function(t){const n=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(n in e?!e[n].hasOwnProperty(t)&&(e[n][t]=!0):!s.includes(t)&&s.push(t))}),dir:i}},"uniq")(e.flat()),l=o.nodeList;let c=o.dir;const h=a().flowchart??{};if(c=c??(h.inheritDir?this.getDirection()??a().direction??void 0:void 0),"gen-1"===this.version)for(let t=0;t<l.length;t++)l[t]=this.lookUpDomId(l[t]);n=n??"subGraph"+this.subCount,u=u||"",u=this.sanitizeText(u),this.subCount=this.subCount+1;const d={id:n,nodes:l,title:u.trim(),classes:[],dir:c,labelType:this.sanitizeNodeLabelType(s?.type)};r.info("Adding",d.id,d.nodes,d.dir),d.nodes=this.makeUniq(d,this.subGraphs).nodes.filter(t=>t!==n);const p=this.subGraphs.find(t=>t.id===n);return p?p.nodes.push(...d.nodes):this.subGraphs.push(d),this.subGraphLookup.set(n,p??d),n}getPosForId(t){for(const[e,s]of this.subGraphs.entries())if(s.id===t)return e;return-1}indexNodes2(t,e){const s=this.subGraphs[e].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i<s.length;){const e=this.getPosForId(s[i]);if(e>=0){const s=this.indexNodes2(t,e);if(s.result)return{result:!0,count:n+s.count};n+=s.count}i+=1}return{result:!1,count:n}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}destructStartLink(t){let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:s,stroke:i}}countChar(t,e){const s=e.length;let i=0;for(let n=0;n<s;++n)e[n]===t&&++i;return i}destructEndLink(t){const e=t.trim();let s=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross",e.startsWith("x")&&(i="double_"+i,s=s.slice(1));break;case">":i="arrow_point",e.startsWith("<")&&(i="double_"+i,s=s.slice(1));break;case"o":i="arrow_circle",e.startsWith("o")&&(i="double_"+i,s=s.slice(1))}let n="normal",r=s.length-1;s.startsWith("=")&&(n="thick"),s.startsWith("~")&&(n="invisible");const a=this.countChar(".",s);return a&&(n="dotted",r=a),{type:i,stroke:n,length:r}}destructLink(t,e){const s=this.destructEndLink(t);let i;if(e){if(i=this.destructStartLink(e),i.stroke!==s.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===i.type)i.type=s.type;else{if(i.type!==s.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return"double_arrow"===i.type&&(i.type="double_arrow_point"),i.length=s.length,i}return s}exists(t,e){for(const s of t)if(s.nodes.includes(e))return!0;return!1}makeUniq(t,e){const s=[];return t.nodes.forEach((i,n)=>{this.exists(e,i)||s.push(t.nodes[n])}),{nodes:s}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}addNodeFromVertex(t,e,s,i,n,r){const a=s.get(t.id),u=i.get(t.id)??!1,o=this.findNode(e,t.id);if(o)o.cssStyles=t.styles,o.cssCompiledStyles=this.getCompiledStyles(t.classes),o.cssClasses=t.classes.join(" ");else{const s={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:a,padding:n.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:r,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};u?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t),minWidth:n.flowchart?.minNodeWidth})}}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}getData(){const t=a(),e=[],s=[],n=this.getSubGraphs(),r=new Map,u=new Map,o=new Map;for(const t of n)for(const e of t.nodes)this.subGraphLookup.has(e)&&o.set(e,t.id);const l=new Map,c=new Map;for(const t of n){const e=o.get(t.id);void 0!==e&&c.set(e,[...c.get(e)??[],t.id])}let h=0;const d=i(t=>{l.set(t,h++);for(const e of c.get(t)??[])d(e)},"walk");for(const t of n)o.has(t.id)||d(t.id);const p=i(t=>"collapsed"===this.subGraphLookup.get(t)?.metadata?.view,"isCollapsed"),g=i(t=>{let e;const s=new Set;let i=t;for(;void 0!==i&&!s.has(i);)s.add(i),p(i)&&(e=i),i=o.get(i);return e},"outermostCollapsed"),A=new Set,y=new Map;for(const t of n){const e=g(t.id);if(void 0!==e){t.id!==e&&(A.add(t.id),y.set(t.id,e));for(const s of t.nodes)s!==e&&(A.add(s),y.set(s,e))}}for(let t=n.length-1;t>=0;t--){const e=n[t];if(!A.has(e.id)){e.nodes.length>0&&u.set(e.id,!0);for(const t of e.nodes)r.set(t,e.id)}}for(let s=n.length-1;s>=0;s--){const i=n[s];A.has(i.id)||("collapsed"===i.metadata?.view?e.push({id:i.id,label:i.title,labelStyle:"",labelType:i.labelType,parentId:r.get(i.id),padding:8,cssCompiledStyles:this.getCompiledStyles(i.classes),cssClasses:i.classes.join(" "),shape:"collapsedGroup",dir:i.dir,isGroup:!1,look:t.look,colorIndex:l.get(i.id)}):e.push({id:i.id,label:i.title,labelStyle:"",labelType:i.labelType,parentId:r.get(i.id),padding:8,cssCompiledStyles:this.getCompiledStyles(i.classes),cssClasses:i.classes.join(" "),shape:"rect",dir:i.dir,isGroup:!0,look:t.look,colorIndex:l.get(i.id),metadata:i.metadata}))}this.getVertices().forEach(s=>{A.has(s.id)||this.addNodeFromVertex(s,e,r,u,t,t.look||"classic")});const k=this.getEdges();return k.forEach((e,i)=>{const{arrowTypeStart:n,arrowTypeEnd:r}=this.destructEdgeType(e.type),a=[...k.defaultStyle??[]],u=y.get(e.start)??e.start,o=y.get(e.end)??e.end;if(u===o&&(y.has(e.start)||y.has(e.end)))return;e.style&&a.push(...e.style);const l={id:m(u,o,{counter:i,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:u,end:o,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":n,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":r,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:a,style:a,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};s.push(l)}),{nodes:e,edges:s,other:{},config:t}}defaultConfig(){return T.flowchart}},L={getClasses:i(function(t,e){return e.db.getClasses()},"getClasses"),draw:i(async function(t,i,n,c){r.info("REF0:"),r.info("Drawing state diagram (v2)",i);const{securityLevel:h,flowchart:d,layout:p}=a();c.db.setDiagramId(i),r.debug("Before getData: ");const g=c.db.getData();r.debug("Data: ",g);const A=e(i,h),y=c.db.getDirection();g.type=c.type,g.layoutAlgorithm=u(p),g.direction=y,g.nodeSpacing=d?.nodeSpacing||50,g.rankSpacing=d?.rankSpacing||50,g.markers=["point","circle","cross"],g.diagramId=i,r.debug("REF1:",g),await o(g,A);const k=g.config.flowchart?.diagramPadding??8;l.insertTitle(A,"flowchartTitleText",d?.titleTopMargin||0,c.db.getDiagramTitle()),s(A,k,"flowchart",d?.useMaxWidth||!1)},"draw")},I=function(){var t=i(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,4],s=[1,3],n=[1,5],r=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],a=[2,2],u=[1,13],o=[1,14],l=[1,15],c=[1,16],h=[1,23],d=[1,25],p=[1,26],g=[1,27],A=[1,50],y=[1,49],k=[1,29],f=[1,30],b=[1,31],m=[1,32],E=[1,33],C=[1,45],D=[1,47],T=[1,43],x=[1,48],S=[1,44],F=[1,51],_=[1,46],B=[1,52],v=[1,53],$=[1,34],w=[1,35],L=[1,36],I=[1,37],R=[1,38],N=[1,58],G=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],P=[1,62],O=[1,61],M=[1,63],U=[8,9,11,75,77,78],V=[1,79],W=[1,92],j=[1,97],z=[1,96],K=[1,93],Y=[1,89],H=[1,95],X=[1,91],q=[1,98],Q=[1,94],J=[1,99],Z=[1,90],tt=[8,9,10,11,40,75,77,78],et=[8,9,10,11,40,46,75,77,78],st=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],it=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],nt=[44,60,89,102,105,106,109,111,114,115,116],rt=[1,122],at=[1,123],ut=[1,125],ot=[1,124],lt=[44,60,62,74,89,102,105,106,109,111,114,115,116],ct=[1,134],ht=[1,148],dt=[1,149],pt=[1,150],gt=[1,151],At=[1,136],yt=[1,138],kt=[1,142],ft=[1,143],bt=[1,144],mt=[1,145],Et=[1,146],Ct=[1,147],Dt=[1,152],Tt=[1,153],xt=[1,132],St=[1,133],Ft=[1,140],_t=[1,135],Bt=[1,139],vt=[1,137],$t=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],wt=[1,155],Lt=[1,157],It=[8,9,11],Rt=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],Nt=[1,177],Gt=[1,173],Pt=[1,174],Ot=[1,178],Mt=[1,175],Ut=[1,176],Vt=[77,116,119],Wt=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],jt=[10,106],zt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Kt=[1,248],Yt=[1,246],Ht=[1,250],Xt=[1,244],qt=[1,245],Qt=[1,247],Jt=[1,249],Zt=[1,251],te=[1,269],ee=[8,9,11,106],se=[8,9,10,11,60,84,105,106,109,110,111,112],ie={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:i(function(t,e,s,i,n,r,a){var u=r.length-1;switch(n){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(r[u])||r[u].length>0)&&r[u-1].push(r[u]),this.$=r[u-1];break;case 4:case 183:case 44:case 54:case 76:case 181:this.$=r[u];break;case 11:i.setDirection("TB"),this.$="TB";break;case 12:i.setDirection(r[u-1]),this.$=r[u-1];break;case 27:this.$=r[u-1].nodes;break;case 33:this.$=i.addSubGraph(r[u-6],r[u-1],r[u-4]);break;case 34:this.$=i.addSubGraph(r[u-3],r[u-1],r[u-3]);break;case 35:this.$=i.addSubGraph(void 0,r[u-1],void 0);break;case 37:this.$=r[u].trim(),i.setAccTitle(this.$);break;case 38:case 39:this.$=r[u].trim(),i.setAccDescription(this.$);break;case 43:case 133:this.$=r[u-1]+r[u];break;case 45:i.addVertex(r[u-1][r[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u]),i.addLink(r[u-3].stmt,r[u-1],r[u-2]),this.$={stmt:r[u-1],nodes:r[u-1].concat(r[u-3].nodes)};break;case 46:i.addLink(r[u-2].stmt,r[u],r[u-1]),this.$={stmt:r[u],nodes:r[u].concat(r[u-2].nodes)};break;case 47:i.addLink(r[u-3].stmt,r[u-1],r[u-2]),this.$={stmt:r[u-1],nodes:r[u-1].concat(r[u-3].nodes)};break;case 48:this.$={stmt:r[u-1],nodes:r[u-1]};break;case 49:i.addVertex(r[u-1][r[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u]),this.$={stmt:r[u-1],nodes:r[u-1],shapeData:r[u]};break;case 50:this.$={stmt:r[u],nodes:r[u]};break;case 51:case 128:case 130:this.$=[r[u]];break;case 52:i.addVertex(r[u-5][r[u-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u-4]),this.$=r[u-5].concat(r[u]);break;case 53:this.$=r[u-4].concat(r[u]);break;case 55:this.$=r[u-2],i.setClass(r[u-2],r[u]);break;case 56:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"square");break;case 57:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"doublecircle");break;case 58:this.$=r[u-5],i.addVertex(r[u-5],r[u-2],"circle");break;case 59:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"ellipse");break;case 60:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"stadium");break;case 61:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"subroutine");break;case 62:this.$=r[u-7],i.addVertex(r[u-7],r[u-1],"rect",void 0,void 0,void 0,Object.fromEntries([[r[u-5],r[u-3]]]));break;case 63:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"cylinder");break;case 64:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"round");break;case 65:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"diamond");break;case 66:this.$=r[u-5],i.addVertex(r[u-5],r[u-2],"hexagon");break;case 67:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"odd");break;case 68:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"trapezoid");break;case 69:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"inv_trapezoid");break;case 70:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"lean_right");break;case 71:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"lean_left");break;case 72:this.$=r[u],i.addVertex(r[u]);break;case 73:r[u-1].text=r[u],this.$=r[u-1];break;case 74:case 75:r[u-2].text=r[u-1],this.$=r[u-2];break;case 77:var o=i.destructLink(r[u],r[u-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:r[u-1]};break;case 78:o=i.destructLink(r[u],r[u-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:r[u-1],id:r[u-3]};break;case 79:case 86:case 101:case 103:this.$={text:r[u],type:"text"};break;case 80:case 87:case 102:this.$={text:r[u-1].text+""+r[u],type:r[u-1].type};break;case 81:case 88:this.$={text:r[u],type:"string"};break;case 82:case 89:case 104:this.$={text:r[u],type:"markdown"};break;case 83:o=i.destructLink(r[u]);this.$={type:o.type,stroke:o.stroke,length:o.length};break;case 84:o=i.destructLink(r[u]);this.$={type:o.type,stroke:o.stroke,length:o.length,id:r[u-1]};break;case 85:this.$=r[u-1];break;case 105:this.$=r[u-4],i.addClass(r[u-2],r[u]);break;case 106:this.$=r[u-4],i.setClass(r[u-2],r[u]);break;case 107:case 115:this.$=r[u-1],i.setClickEvent(r[u-1],r[u]);break;case 108:case 116:this.$=r[u-3],i.setClickEvent(r[u-3],r[u-2]),i.setTooltip(r[u-3],r[u]);break;case 109:this.$=r[u-2],i.setClickEvent(r[u-2],r[u-1],r[u]);break;case 110:this.$=r[u-4],i.setClickEvent(r[u-4],r[u-3],r[u-2]),i.setTooltip(r[u-4],r[u]);break;case 111:this.$=r[u-2],i.setLink(r[u-2],r[u]);break;case 112:this.$=r[u-4],i.setLink(r[u-4],r[u-2]),i.setTooltip(r[u-4],r[u]);break;case 113:this.$=r[u-4],i.setLink(r[u-4],r[u-2],r[u]);break;case 114:this.$=r[u-6],i.setLink(r[u-6],r[u-4],r[u]),i.setTooltip(r[u-6],r[u-2]);break;case 117:this.$=r[u-1],i.setLink(r[u-1],r[u]);break;case 118:this.$=r[u-3],i.setLink(r[u-3],r[u-2]),i.setTooltip(r[u-3],r[u]);break;case 119:this.$=r[u-3],i.setLink(r[u-3],r[u-2],r[u]);break;case 120:this.$=r[u-5],i.setLink(r[u-5],r[u-4],r[u]),i.setTooltip(r[u-5],r[u-2]);break;case 121:this.$=r[u-4],i.addVertex(r[u-2],void 0,void 0,r[u]);break;case 122:this.$=r[u-4],i.updateLink([r[u-2]],r[u]);break;case 123:this.$=r[u-4],i.updateLink(r[u-2],r[u]);break;case 124:this.$=r[u-8],i.updateLinkInterpolate([r[u-6]],r[u-2]),i.updateLink([r[u-6]],r[u]);break;case 125:this.$=r[u-8],i.updateLinkInterpolate(r[u-6],r[u-2]),i.updateLink(r[u-6],r[u]);break;case 126:this.$=r[u-6],i.updateLinkInterpolate([r[u-4]],r[u]);break;case 127:this.$=r[u-6],i.updateLinkInterpolate(r[u-4],r[u]);break;case 129:case 131:r[u-2].push(r[u]),this.$=r[u-2];break;case 182:case 184:this.$=r[u-1]+""+r[u];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"}}},"anonymous"),table:[{3:1,4:2,9:e,10:s,12:n},{1:[3]},t(r,a,{5:6}),{4:7,9:e,10:s,12:n},{4:8,9:e,10:s,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:u,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:d,36:p,38:g,42:28,43:39,44:A,45:40,47:41,60:y,84:k,85:f,86:b,87:m,88:E,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v,121:$,122:w,123:L,124:I,125:R},t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),{8:[1,55],9:[1,56],10:N,15:54,18:57},t(G,[2,3]),t(G,[2,4]),t(G,[2,5]),t(G,[2,6]),t(G,[2,7]),t(G,[2,8]),{8:P,9:O,11:M,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:P,9:O,11:M,21:68},{8:P,9:O,11:M,21:69},{8:P,9:O,11:M,21:70},{8:P,9:O,11:M,21:71},{8:P,9:O,11:M,21:72},{8:P,9:O,10:[1,73],11:M,21:74},t(G,[2,36]),{35:[1,75]},{37:[1,76]},t(G,[2,39]),t(U,[2,50],{18:77,39:78,10:N,40:V}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:W,44:j,60:z,80:[1,87],89:K,95:[1,84],97:[1,85],101:86,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},t(G,[2,185]),t(G,[2,186]),t(G,[2,187]),t(G,[2,188]),t(G,[2,189]),t(tt,[2,51]),t(tt,[2,54],{46:[1,100]}),t(et,[2,72],{113:113,29:[1,101],44:A,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:y,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:C,102:D,105:T,106:x,109:S,111:F,114:_,115:B,116:v}),t(st,[2,181]),t(st,[2,142]),t(st,[2,143]),t(st,[2,144]),t(st,[2,145]),t(st,[2,146]),t(st,[2,147]),t(st,[2,148]),t(st,[2,149]),t(st,[2,150]),t(st,[2,151]),t(st,[2,152]),t(r,[2,12]),t(r,[2,18]),t(r,[2,19]),{9:[1,114]},t(it,[2,26],{18:115,10:N}),t(G,[2,27]),{42:116,43:39,44:A,45:40,47:41,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},t(G,[2,40]),t(G,[2,41]),t(G,[2,42]),t(nt,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:rt,81:at,116:ut,119:ot},{75:[1,126],77:[1,127]},t(lt,[2,83]),t(G,[2,28]),t(G,[2,29]),t(G,[2,30]),t(G,[2,31]),t(G,[2,32]),{10:ct,12:ht,14:dt,27:pt,28:128,32:gt,44:At,60:yt,75:kt,80:[1,130],81:[1,131],83:141,84:ft,85:bt,86:mt,87:Et,88:Ct,89:Dt,90:Tt,91:129,105:xt,109:St,111:Ft,114:_t,115:Bt,116:vt},t($t,a,{5:154}),t(G,[2,37]),t(G,[2,38]),t(U,[2,48],{44:wt}),t(U,[2,49],{18:156,10:N,40:Lt}),t(tt,[2,44]),{44:A,47:158,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},{102:[1,159],103:160,105:[1,161]},{44:A,47:162,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},{44:A,47:163,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},t(It,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},t(It,[2,115],{120:168,10:[1,167],14:W,44:j,60:z,89:K,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,117],{10:[1,169]}),t(Rt,[2,183]),t(Rt,[2,170]),t(Rt,[2,171]),t(Rt,[2,172]),t(Rt,[2,173]),t(Rt,[2,174]),t(Rt,[2,175]),t(Rt,[2,176]),t(Rt,[2,177]),t(Rt,[2,178]),t(Rt,[2,179]),t(Rt,[2,180]),{44:A,47:170,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},{30:171,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:179,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:181,50:[1,180],67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:182,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:183,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:184,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{109:[1,185]},{30:186,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:187,65:[1,188],67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:189,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:190,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{30:191,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},t(st,[2,182]),t(r,[2,20]),t(it,[2,25]),t(U,[2,46],{39:192,18:193,10:N,40:V}),t(nt,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{77:[1,197],79:198,116:ut,119:ot},t(Vt,[2,79]),t(Vt,[2,81]),t(Vt,[2,82]),t(Vt,[2,168]),t(Vt,[2,169]),{76:199,79:121,80:rt,81:at,116:ut,119:ot},t(lt,[2,84]),{8:P,9:O,10:ct,11:M,12:ht,14:dt,21:201,27:pt,29:[1,200],32:gt,44:At,60:yt,75:kt,83:141,84:ft,85:bt,86:mt,87:Et,88:Ct,89:Dt,90:Tt,91:202,105:xt,109:St,111:Ft,114:_t,115:Bt,116:vt},t(Wt,[2,101]),t(Wt,[2,103]),t(Wt,[2,104]),t(Wt,[2,157]),t(Wt,[2,158]),t(Wt,[2,159]),t(Wt,[2,160]),t(Wt,[2,161]),t(Wt,[2,162]),t(Wt,[2,163]),t(Wt,[2,164]),t(Wt,[2,165]),t(Wt,[2,166]),t(Wt,[2,167]),t(Wt,[2,90]),t(Wt,[2,91]),t(Wt,[2,92]),t(Wt,[2,93]),t(Wt,[2,94]),t(Wt,[2,95]),t(Wt,[2,96]),t(Wt,[2,97]),t(Wt,[2,98]),t(Wt,[2,99]),t(Wt,[2,100]),{6:11,7:12,8:u,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,203],33:24,34:d,36:p,38:g,42:28,43:39,44:A,45:40,47:41,60:y,84:k,85:f,86:b,87:m,88:E,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v,121:$,122:w,123:L,124:I,125:R},{10:N,18:204},{44:[1,205]},t(tt,[2,43]),{10:[1,206],44:A,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:113,114:_,115:B,116:v},{10:[1,207]},{10:[1,208],106:[1,209]},t(jt,[2,128]),{10:[1,210],44:A,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:113,114:_,115:B,116:v},{10:[1,211],44:A,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:113,114:_,115:B,116:v},{80:[1,212]},t(It,[2,109],{10:[1,213]}),t(It,[2,111],{10:[1,214]}),{80:[1,215]},t(Rt,[2,184]),{80:[1,216],98:[1,217]},t(tt,[2,55],{113:113,44:A,60:y,89:C,102:D,105:T,106:x,109:S,111:F,114:_,115:B,116:v}),{31:[1,218],67:Nt,82:219,116:Ot,117:Mt,118:Ut},t(zt,[2,86]),t(zt,[2,88]),t(zt,[2,89]),t(zt,[2,153]),t(zt,[2,154]),t(zt,[2,155]),t(zt,[2,156]),{49:[1,220],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{30:221,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{51:[1,222],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{53:[1,223],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{55:[1,224],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{57:[1,225],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{60:[1,226]},{64:[1,227],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{66:[1,228],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{30:229,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},{31:[1,230],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{67:Nt,69:[1,231],71:[1,232],82:219,116:Ot,117:Mt,118:Ut},{67:Nt,69:[1,234],71:[1,233],82:219,116:Ot,117:Mt,118:Ut},t(U,[2,45],{18:156,10:N,40:Lt}),t(U,[2,47],{44:wt}),t(nt,[2,75]),t(nt,[2,74]),{62:[1,235],67:Nt,82:219,116:Ot,117:Mt,118:Ut},t(nt,[2,77]),t(Vt,[2,80]),{77:[1,236],79:198,116:ut,119:ot},{30:237,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},t($t,a,{5:238}),t(Wt,[2,102]),t(G,[2,35]),{43:239,44:A,45:40,47:41,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},{10:N,18:240},{10:Kt,60:Yt,84:Ht,92:241,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:Kt,60:Yt,84:Ht,92:252,104:[1,253],105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:Kt,60:Yt,84:Ht,92:254,104:[1,255],105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{105:[1,256]},{10:Kt,60:Yt,84:Ht,92:257,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{44:A,47:258,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},t(It,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},t(It,[2,116]),t(It,[2,118],{10:[1,262]}),t(It,[2,119]),t(et,[2,56]),t(zt,[2,87]),t(et,[2,57]),{51:[1,263],67:Nt,82:219,116:Ot,117:Mt,118:Ut},t(et,[2,64]),t(et,[2,59]),t(et,[2,60]),t(et,[2,61]),{109:[1,264]},t(et,[2,63]),t(et,[2,65]),{66:[1,265],67:Nt,82:219,116:Ot,117:Mt,118:Ut},t(et,[2,67]),t(et,[2,68]),t(et,[2,70]),t(et,[2,69]),t(et,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(nt,[2,78]),{31:[1,266],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{6:11,7:12,8:u,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,267],33:24,34:d,36:p,38:g,42:28,43:39,44:A,45:40,47:41,60:y,84:k,85:f,86:b,87:m,88:E,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v,121:$,122:w,123:L,124:I,125:R},t(tt,[2,53]),{43:268,44:A,45:40,47:41,60:y,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v},t(It,[2,121],{106:te}),t(ee,[2,130],{108:270,10:Kt,60:Yt,84:Ht,105:Xt,109:qt,110:Qt,111:Jt,112:Zt}),t(se,[2,132]),t(se,[2,134]),t(se,[2,135]),t(se,[2,136]),t(se,[2,137]),t(se,[2,138]),t(se,[2,139]),t(se,[2,140]),t(se,[2,141]),t(It,[2,122],{106:te}),{10:[1,271]},t(It,[2,123],{106:te}),{10:[1,272]},t(jt,[2,129]),t(It,[2,105],{106:te}),t(It,[2,106],{113:113,44:A,60:y,89:C,102:D,105:T,106:x,109:S,111:F,114:_,115:B,116:v}),t(It,[2,110]),t(It,[2,112],{10:[1,273]}),t(It,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:P,9:O,11:M,21:278},t(G,[2,34]),t(tt,[2,52]),{10:Kt,60:Yt,84:Ht,105:Xt,107:279,108:243,109:qt,110:Qt,111:Jt,112:Zt},t(se,[2,133]),{14:W,44:j,60:z,89:K,101:280,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},{14:W,44:j,60:z,89:K,101:281,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},{98:[1,282]},t(It,[2,120]),t(et,[2,58]),{30:283,67:Nt,80:Gt,81:Pt,82:172,116:Ot,117:Mt,118:Ut},t(et,[2,66]),t($t,a,{5:284}),t(ee,[2,131],{108:270,10:Kt,60:Yt,84:Ht,105:Xt,109:qt,110:Qt,111:Jt,112:Zt}),t(It,[2,126],{120:168,10:[1,285],14:W,44:j,60:z,89:K,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,127],{120:168,10:[1,286],14:W,44:j,60:z,89:K,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,114]),{31:[1,287],67:Nt,82:219,116:Ot,117:Mt,118:Ut},{6:11,7:12,8:u,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,288],33:24,34:d,36:p,38:g,42:28,43:39,44:A,45:40,47:41,60:y,84:k,85:f,86:b,87:m,88:E,89:C,102:D,105:T,106:x,109:S,111:F,113:42,114:_,115:B,116:v,121:$,122:w,123:L,124:I,125:R},{10:Kt,60:Yt,84:Ht,92:289,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:Kt,60:Yt,84:Ht,92:290,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},t(et,[2,62]),t(G,[2,33]),t(It,[2,124],{106:te}),t(It,[2,125],{106:te})],defaultActions:{},parseError:i(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:i(function(t){var e=this,s=[0],n=[],r=[null],a=[],u=this.table,o="",l=0,c=0,h=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var A=d.yylloc;a.push(A);var y=d.options&&d.options.ranges;function k(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),i(k,"lex");for(var f,b,m,E,C,D,T,x,S={};;){if(b=s[s.length-1],this.defaultActions[b]?m=this.defaultActions[b]:(null==f&&(f=k()),m=u[b]&&u[b][f]),void 0===m||!m.length||!m[0]){var F="";for(C in x=[],u[b])this.terminals_[C]&&C>2&&x.push("'"+this.terminals_[C]+"'");F=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(F,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:A,expected:x})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+f);switch(m[0]){case 1:s.push(f),r.push(d.yytext),a.push(d.yylloc),s.push(m[1]),f=null,c=d.yyleng,o=d.yytext,l=d.yylineno,A=d.yylloc;break;case 2:if(D=this.productions_[m[1]][1],S.$=r[r.length-D],S._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(S,[o,c,l,p.yy,m[1],r,a].concat(h))))return E;D&&(s=s.slice(0,-1*D*2),r=r.slice(0,-1*D),a=a.slice(0,-1*D)),s.push(this.productions_[m[1]][0]),r.push(S.$),a.push(S._$),T=u[s[s.length-2]][s[s.length-1]],s.push(T);break;case 3:return!0}}return!0},"parse")},ne=function(){return{EOF:1,parseError:i(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:i(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:i(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:i(function(t){this.unput(this.match.slice(t))},"less"),pastInput:i(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:i(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var t=this.next();return t||this.lex()},"lex"),begin:i(function(t){this.conditionStack.push(t)},"begin"),popState:i(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:i(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:i(function(t){this.begin(t)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:i(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const s=/\n\s*/g;return e.yytext=e.yytext.replace(s,"<br/>"),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 18:return 96;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 34:return 88;case 35:case 36:case 37:case 38:return t.lex.firstGraph()&&this.begin("dir"),12;case 39:return 27;case 40:return 32;case 41:case 42:case 43:case 44:return 98;case 45:return this.popState(),13;case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:return this.popState(),14;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:case 104:return 111;case 64:return 46;case 65:return 60;case 66:case 105:return 44;case 67:return 8;case 68:return 106;case 69:case 103:return 115;case 70:case 73:case 76:return this.popState(),77;case 71:return this.pushState("edgeText"),75;case 72:case 75:case 78:return 119;case 74:return this.pushState("thickEdgeText"),75;case 77:return this.pushState("dottedEdgeText"),75;case 79:return 77;case 80:return this.popState(),53;case 81:case 117:return"TEXT";case 82:return this.pushState("ellipseText"),52;case 83:return this.popState(),55;case 84:return this.pushState("text"),54;case 85:return this.popState(),57;case 86:return this.pushState("text"),56;case 87:return 58;case 88:return this.pushState("text"),67;case 89:return this.popState(),64;case 90:return this.pushState("text"),63;case 91:return this.popState(),49;case 92:return this.pushState("text"),48;case 93:return this.popState(),69;case 94:return this.popState(),71;case 95:return 117;case 96:return this.pushState("trapText"),68;case 97:return this.pushState("trapText"),70;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;case 110:return this.pushState("text"),62;case 111:return this.popState(),51;case 112:return this.pushState("text"),50;case 113:return this.popState(),31;case 114:return this.pushState("text"),29;case 115:return this.popState(),66;case 116:return this.pushState("text"),65;case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121:return 11}},"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]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_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*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([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])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:[^\S\n\r]+)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],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,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}}}();function re(){this.yy={}}return ie.lexer=ne,i(re,"Parser"),re.prototype=ie,ie.Parser=re,new re}();I.parser=I;var R=I,N=Object.assign({},R);N.parse=t=>{const e=t.replace(/}\s*\n/g,"}\n");return R.parse(e)};var G=N,P=i(t=>{const{theme:e,bkgColorArray:s,borderColorArray:n}=t;if(!x(e,n))return"";const r=S(t.look),a=F(s);let u="";for(let e=0;e<_(t.THEME_COLOR_LIMIT,n);e++){const t=n[e%n.length],o=a?`fill: ${s[e%s.length]};`:"",l=`[data-look="${r}"][data-color-id="color-${e}"]`,c=i(t=>`${l}.node ${t}, ${l}.rough-node ${t}`,"collapsedRule"),h=i(t=>`${l}.swimlane.cluster .swimlane-title${t}, ${l}.swimlane.cluster .swimlane-body${t}`,"laneRule");u+=`\n\n ${l}.cluster:not(.swimlane) rect {\n stroke: ${t};\n ${o}\n }\n\n ${l}.cluster:not(.swimlane) path {\n stroke: ${t};\n ${o}\n }\n\n /* Lane, classic and neo. */\n ${l}.swimlane.cluster rect.swimlane-title,\n ${l}.swimlane.cluster rect.swimlane-body {\n stroke: ${t};\n ${o}\n }\n\n /* Lane, handDrawn: roughjs emits the hachure fill first, then the outline. */\n ${h(" path:nth-of-type(2)")} {\n stroke: ${t};\n }\n${a?`\n /* A roughjs fill is drawn as lines, so the lane fill is a stroke here. */\n ${h(" path:first-of-type")} {\n stroke: ${s[e%s.length]};\n }\n`:""}\n ${c(".collapsed-group")},\n ${c(".collapsed-group path")} {\n stroke: ${t};\n ${o}\n }\n\n /* The ellipsis dots and the separator take clusterBorder further down, so without\n these the container is palette-coloured while its own markers are not. */\n ${c(".collapsed-indicator")} {\n fill: ${t};\n }\n\n ${c(".collapsed-separator")} {\n stroke: ${t};\n }\n `}return u},"genColor"),O=i((t,e)=>{const s=$,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return B(i,n,r,e)},"fade"),M=i(e=>`${P(e)}\n .label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span {\n color: ${e.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: ${e.strokeWidth??1}px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${e.lineColor} !important;\n stroke-width: 0;\n stroke: ${e.lineColor};\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePaths .path {\n stroke: ${e.lineColor};\n stroke-width: ${e.strokeWidth??2}px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n p {\n background-color: ${e.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${O(e.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n /* Collapsed subgraph node (@{ view: collapsed }) */\n .node .collapsed-indicator {\n fill: ${e.clusterBorder};\n stroke: none;\n opacity: 0.6;\n }\n\n .node .collapsed-separator {\n stroke: ${e.clusterBorder};\n stroke-width: 0.75px;\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${e.edgeLabelBackground};\n p {\n background-color: ${e.edgeLabelBackground};\n padding: 2px;\n }\n .label rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n ${t()}\n`,"getStyles"),U=i(({styles:t=M}={})=>({parser:G,get db(){return new w},renderer:L,styles:t,init:i(t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,n({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),V=U();export{U as c,V as d,M as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,d as e,l as i}from"./mermaid.core-
|
|
1
|
+
import{_ as t,d as e,l as i}from"./mermaid.core-GJX79pQL.js";var o=t((t,o,r,s)=>{t.attr("class",r);const{width:d,height:n,x:c,y:g}=a(t,o);e(t,n,d,s);const w=h(c,g,d,n,o);t.attr("viewBox",w),i.debug(`viewBox configured: ${w} with padding: ${o}`)},"setupViewPortForSVG"),a=t((t,e)=>{const i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+2*e,height:i.height+2*e,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),h=t((t,e,i,o,a)=>`${t-a} ${e-a} ${i} ${o}`,"createViewBox");export{o as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,k as o}from"./mermaid.core-
|
|
1
|
+
import{_ as e,k as o}from"./mermaid.core-GJX79pQL.js";var t=e((e,t)=>{let a;"sandbox"===t&&(a=o("#i"+e));return o("sandbox"===t?a.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)},"getDiagramElement");export{t as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,l as t,av as n,ao as a,aw as r,ax as s,ay as o,ap as i,an as d,az as c,aA as l,aB as g,aC as u,c as f,O as h,aD as p,aE as w,aF as b,aG as m,u as y}from"./mermaid.core-
|
|
1
|
+
import{_ as e,l as t,av as n,ao as a,aw as r,ax as s,ay as o,ap as i,an as d,az as c,aA as l,aB as g,aC as u,c as f,O as h,aD as p,aE as w,aF as b,aG as m,u as y}from"./mermaid.core-GJX79pQL.js";import{G as v}from"./graph-rGqC_56m.js";function L(e,{edgePathsClass:t="edges edgePaths"}={}){const n=e.insert("g").attr("class","root");return{clusters:n.insert("g").attr("class","clusters"),edgePaths:n.insert("g").attr("class",t),edgeLabels:n.insert("g").attr("class","edgeLabels"),nodes:n.insert("g").attr("class","nodes"),rootGroups:n}}async function C(e,t,n){if(t.label){const{shapeSvg:a,bbox:r}=await m(e,void 0===n?t:{...t,width:n});t.labelBBox={width:r.width,height:r.height},a.remove()}else t.labelBBox={width:0,height:0}}async function E(e,t,n){const r=await a(e,t,n),s=r.node()?.getBBox()??{width:0,height:0};return t.width=s.width,t.height=s.height,r}function x(e,t,n){let a=e;const r=new Set;for(;a;){if(a.dir)return a.dir;if(!a.parentId||r.has(a.parentId))break;r.add(a.parentId),a=t.get(a.parentId)}return n}async function N(e,t,n={}){const a=new v({multigraph:!0,compound:!0}),r=[...t.edges],s=f(),o=L(e),{edgeLabels:i,nodes:d}=o,c=new Map,g=new Map(t.nodes.map(e=>[e.id,e])),h=t.direction,p=null!=e.node();await Promise.all(t.nodes.map(async e=>{if(e.isGroup){if(p){const t=n.unwrapGroupLabels&&"markdown"!==e.labelType;await C(d,e,t?Number.POSITIVE_INFINITY:void 0)}a.setNode(e.id,{...e})}else{if(p){const t=await E(d,e,{config:s,dir:x(e,g,h)});c.set(e.id,t)}a.setNode(e.id,{...e})}}));for(const e of r){p&&l(e)&&await u(i,e),a.setEdge(e.start,e.end,{...e},e.id);t.edges.some(t=>t.id===e.id)||t.edges.push(e)}if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:n}=await(import("./sizeCapture-INFHLROL-BpAWjro_.js"));n(e,t)}return{graph:a,groups:o,nodeElements:c}}e(L,"createLayoutElementGroups"),e(C,"measureGroupLabel"),e(E,"insertMeasuredNode"),e(x,"resolveNodeDir"),e(N,"createGraphWithElements");var I=new Map,D=new Map,k=new Map,S=e(()=>{D.clear(),k.clear(),I.clear()},"clear"),R=e((e,n)=>{const a=D.get(n)||[];return t.trace("In isDescendant",n," ",e," = ",a.includes(e)),a.includes(e)},"isDescendant"),P=e((e,n)=>{const a=D.get(n)||[];return t.info("Descendants of ",n," is ",a),t.info("Edge is ",e),e.v!==n&&e.w!==n&&(a?a.includes(e.v)||R(e.v,n)||R(e.w,n)||a.includes(e.w):(t.debug("Tilt, ",n,",not in descendants"),!1))},"edgeInCluster"),T=e((e,n,a,r)=>{t.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),t.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(s=>{if(n.children(s).length>0)T(s,n,a,r);else{const o=n.node(s);t.info("cp ",s," to ",r," with parent ",e),a.setNode(s,o),r!==n.parent(s)&&(t.debug("Setting parent",s,n.parent(s)),a.setParent(s,n.parent(s))),e!==r&&s!==e?(t.debug("Setting parent",s,e),a.setParent(s,e)):(t.info("In copy ",e,"root",r,"data",n.node(e),r),t.debug("Not Setting parent for node=",s,"cluster!==rootId",e!==r,"node!==clusterId",s!==e));const i=n.edges(s);t.debug("Copying Edges",i),i.forEach(s=>{t.info("Edge",s);const o=n.edge(s.v,s.w,s.name);t.info("Edge data",o,r);try{P(s,r)?(t.info("Copying as ",s.v,s.w,o,s.name),a.setEdge(s.v,s.w,o,s.name),t.info("newGraph edges ",a.edges(),a.edge(a.edges()[0]))):t.info("Skipping copy of edge ",s.v,"--\x3e",s.w," rootId: ",r," clusterId:",e)}catch(e){t.error(e)}})}t.debug("Removing node",s),n.removeNode(s)})},"copy"),B=e((e,t)=>{const n=t.children(e);let a=[...n];for(const r of n)k.set(r,e),a=[...a,...B(r,t)];return a},"extractDescendants"),G=e((e,t,n)=>{const a=e.edges().filter(e=>e.v===t||e.w===t),r=e.edges().filter(e=>e.v===n||e.w===n),s=a.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=r.map(e=>({v:e.v,w:e.w}));return s.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},"findCommonEdges"),X=e((e,n,a)=>{const r=n.children(e);if(t.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const e of r){const t=X(e,n,a),r=G(n,a,t);if(t){if(!(r.length>0))return t;s=t}}return s},"findNonClusterChild"),M=e(e=>I.has(e)&&I.get(e).externalConnections&&I.has(e)?I.get(e).id:e,"getAnchorId"),O=e((e,n)=>{if(!e||n>10)t.debug("Opting out, no graph ");else{t.debug("Opting in, graph "),e.nodes().forEach(function(n){e.children(n).length>0&&(t.debug("Cluster identified",n," Replacement id in edges: ",X(n,e,n)),D.set(n,B(n,e)),I.set(n,{id:X(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),r=e.edges();a.length>0?(t.debug("Cluster identified",n,D),r.forEach(e=>{R(e.v,n)^R(e.w,n)&&(t.debug("Edge: ",e," leaves cluster ",n),t.debug("Descendants of XXX ",n,": ",D.get(n)),I.get(n).externalConnections=!0)})):t.debug("Not a cluster ",n,D)});for(let t of I.keys()){const n=I.get(t).id,a=e.parent(n);a!==t&&I.has(a)&&!I.get(a).externalConnections&&(I.get(t).id=a);const r=e.edges().some(e=>e.v===t);if(n&&I.get(t)?.externalConnections&&r&&j(e,n,t)){const a=z(e,t,e.parent(n));a&&(I.get(t).id=a)}}e.edges().forEach(function(n){const a=e.edge(n);t.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),t.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,s=n.w;if(t.debug("Fix XXX",I,"ids:",n.v,n.w,"Translating: ",I.get(n.v)," --- ",I.get(n.w)),I.get(n.v)||I.get(n.w)){if(t.debug("Fixing and trying - removing XXX",n.v,n.w,n.name),r=M(n.v),s=M(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const t=e.parent(r);I.get(t).externalConnections=!0,a.fromCluster=n.v}if(s!==n.w){const t=e.parent(s);I.get(t).externalConnections=!0,a.toCluster=n.w}t.debug("Fix Replacing with XXX",r,s,n.name),e.setEdge(r,s,a,n.name)}}),F(e,0),t.trace(I)}},"adjustClustersAndEdges"),F=e((e,n)=>{if(n>10)return void t.error("Bailing out");let a=e.nodes(),r=!1;for(const t of a){const n=e.children(t);r=r||n.length>0}if(r){t.debug("Nodes = ",a,n);for(const r of a)if(t.debug("Extracting node",r,I,I.has(r)&&!I.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",n),I.has(r))if(!I.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){t.debug("Cluster without external connections, without a parent and with children",r,n);let a="TB"===e.graph().rankdir?"LR":"TB";I.get(r)?.clusterData?.dir&&(a=I.get(r).clusterData.dir,t.debug("Fixing dir",I.get(r).clusterData.dir,a));const s=new v({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});T(r,e,s,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:I.get(r).clusterData,label:I.get(r).label,graph:s})}else t.debug("Cluster ** ",r," **not meeting the criteria !externalConnections:",!I.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),n),t.debug(I);else t.debug("Not a cluster",r,n);a=e.nodes(),t.debug("New list of nodes",a);for(const r of a){const a=e.node(r);t.debug(" Now next level",r,a),a?.clusterNode&&F(a.graph,n+1)}}else t.debug("Done, no node has children",e.nodes())},"extractor"),_=e((e,t)=>{if(0===t.length)return[];let n=Object.assign([],t);return t.forEach(t=>{const a=e.children(t),r=_(e,a);n=[...n,...r]}),n},"sorter"),A=e(e=>_(e,e.children()),"sortNodesByHierarchy"),j=e((e,t,n)=>{let a=e.parent(t);for(;a&&a!==n;){const t=I.get(a);if(t&&!t.externalConnections)return!0;a=e.parent(a)}return!1},"isNodeInExtractableCluster"),z=e((e,t,n)=>{const a=e.children(t)??[];for(const r of a){if(r===n||R(r,n))continue;const a=X(r,e,t);if(a&&!j(e,a,t))return a}return null},"findSafeAnchorNode");function $({prepareLayout:t,measureLayout:a,runLayoutCore:r,paintLayout:s,afterPaint:o,paintOptions:i}){const d=a??J;return e(async function(e,a,c,l){const g=a.select("g");(c?.insertMarkers??n)(g,e.markers,e.type,e.diagramId),H();const u={element:g,helpers:c,options:l};u.preparedLayout=await(t?.(e,u));const f=await d(e,u),h=await r(e,u),p={...u,measure:f};s?await s(e,p,h):await W(e,p,i),await(o?.(e,p,h))},"render")}function H(){r(),s(),o(),S()}async function J(e,{element:t},n){return await N(t,e,n)}async function W(e,t,n={}){const{measure:a}=t,{groups:r}=a;for(const a of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(a,t)||await V(r,a,t,n);const s=Z(e.nodes);for(const a of e.edges)q(a,n)||await K(r,a,s,e,n,t)}async function V(e,t,n,a){t.clusterNode?i(t):Y(t,n,a)?await d(e.clusters,t):i(t)}function Y(e,t,n){return!0===e.isGroup&&(n.isCluster?.(e,t)??!0)}function Z(e){const t=new Map;for(const n of e)n?.id&&t.set(n.id,n);return t}function q(e,t){return e.isLayoutOnly||Boolean(t.skipEdge?.(e))}async function K(e,t,n,a,r,s){const o=c(e.edgePaths,{...t},r.clusterDb??new Map,a.type,Q(t.start,t,n,s,r),Q(t.end,t,n,s,r),a.diagramId,U(t,r),a.layoutAlgorithm);l(t)&&(g.has(t.id)||await u(e.edgeLabels,t),ee(t,o))}function Q(e,t,n,a,r){return r.getEdgeNode?.(e,t,a)??(e?n.get(e)??{}:{})}function U(e,t){return"function"==typeof t.skipIntersect?t.skipIntersect(e):t.skipIntersect??!1}function ee(e,t){const n=t?.updatedPath??t?.originalPath,a=h(),{subGraphTitleTotalMargin:r}=p({flowchart:a.flowchart??{}});if(e.label){const n=g.get(e.id),{x:a,y:s}=w(e,t);n.attr("transform",`translate(${a}, ${s+r/2})`)}for(const[t,a]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(a){const{x:a,y:r}=ne(e,t,n);b.get(e.id)[t].attr("transform",`translate(${a}, ${r})`)}}e($,"createCommonLayoutRenderer"),e(H,"clearLayoutRenderState"),e(J,"defaultMeasureLayout"),e(W,"paintLayoutData"),e(V,"paintLayoutNode"),e(Y,"shouldPaintAsCluster"),e(Z,"buildNodeLookup"),e(q,"shouldSkipPaintEdge"),e(K,"paintLayoutEdge"),e(Q,"getRenderedNode"),e(U,"shouldSkipIntersect"),e(ee,"positionRenderedEdgeLabel");var te={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function ne(e,t,n){const a=e.terminalLabelCenters?.[t];if(a)return{...a};if(!n)return{x:e.x,y:e.y};const r=t.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return y.calcTerminalLabelPosition(r?10:0,te[t],n)}e(ne,"terminalLabelTranslate");export{O as a,L as b,$ as c,J as d,I as e,X as f,E as i,A as s};
|