pmx-canvas 0.9.3 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/extensions/pmx-canvas/runtime.json +1 -1
- package/.github/extensions/pmx-canvas/tools.json +9418 -2016
- package/CHANGELOG.md +54 -1
- package/dist/canvas/chunks/abnfDiagram-N423BO3Z-p8dtp6va.js +1 -0
- package/dist/canvas/chunks/architecture-TIHT7OUA-9tffvpsv.js +1 -0
- package/dist/canvas/chunks/architectureDiagram-T3A2C74G-5jhmxrzf.js +36 -0
- package/dist/canvas/chunks/blockDiagram-VBNYF7ZC-pw1fa9yb.js +132 -0
- package/dist/canvas/chunks/c4Diagram-5PPSVZJV-x07nq0tt.js +10 -0
- package/dist/canvas/chunks/classDiagram-JCYQIIEL-nc6g5x1r.js +1 -0
- package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-0qnbpwvh.js +1 -0
- package/dist/canvas/chunks/cose-bilkent-JH36ORCC-nm39npq0.js +1 -0
- package/dist/canvas/chunks/cynefin-VYW2F7L2-ys8p46ts.js +1 -0
- package/dist/canvas/chunks/cynefinDiagram-MW4NZA55-vdxrwahz.js +62 -0
- package/dist/canvas/chunks/dagre-VZM6K2ZE-bqdm7wpd.js +4 -0
- package/dist/canvas/chunks/diagram-7IWD3JNH-gs5gpr93.js +30 -0
- package/dist/canvas/chunks/diagram-B4RE2ZJO-cgwjg47s.js +3 -0
- package/dist/canvas/chunks/diagram-LBJQPF4R-w3vahpav.js +24 -0
- package/dist/canvas/chunks/diagram-Q27KOJAE-42837z6h.js +24 -0
- package/dist/canvas/chunks/diagram-UB23O5K3-4fz83q59.js +41 -0
- package/dist/canvas/chunks/ebnfDiagram-BXEA7PRR-zphtgegj.js +1 -0
- package/dist/canvas/chunks/erDiagram-JOGREHBK-zvbbdxp4.js +85 -0
- package/dist/canvas/chunks/eventmodeling-45OFAUF4-v9q6dn4c.js +1 -0
- package/dist/canvas/chunks/flowDiagram-UKHOOZJN-yrr5z8tc.js +1 -0
- package/dist/canvas/chunks/ganttDiagram-PKOTCBZU-282jzycm.js +292 -0
- package/dist/canvas/chunks/gitGraph-TEB2WS4Q-kdwb8m0a.js +1 -0
- package/dist/canvas/chunks/gitGraphDiagram-DS77QQ5N-vqqy6p1b.js +106 -0
- package/dist/canvas/chunks/index-0rk4gp1g.js +2 -0
- package/dist/canvas/chunks/index-194m3hc3.js +2 -0
- package/dist/canvas/chunks/index-1r72hdzb.js +301 -0
- package/dist/canvas/chunks/index-353m7b0p.js +2 -0
- package/dist/canvas/chunks/index-3cy1bzwh.js +2 -0
- package/dist/canvas/chunks/index-5tv8v1hk.js +1 -0
- package/dist/canvas/chunks/index-6ceya556.js +332 -0
- package/dist/canvas/chunks/index-6qmsnxwy.js +4 -0
- package/dist/canvas/chunks/index-d3b3gqe9.js +2 -0
- package/dist/canvas/chunks/index-fjtdggjn.js +2 -0
- package/dist/canvas/chunks/index-g3pwnqeb.js +2 -0
- package/dist/canvas/chunks/index-gf4e0et4.js +2 -0
- package/dist/canvas/chunks/index-hj99nz1f.js +1 -0
- package/dist/canvas/chunks/index-nprm96xp.js +16 -0
- package/dist/canvas/chunks/index-qj8fxwsf.js +2 -0
- package/dist/canvas/chunks/index-r2fyc9w1.js +89 -0
- package/dist/canvas/chunks/index-rft2hcz5.js +2 -0
- package/dist/canvas/chunks/index-rh7nv68n.js +2 -0
- package/dist/canvas/chunks/index-s4j678gj.js +2 -0
- package/dist/canvas/chunks/index-tb1wf525.js +179 -0
- package/dist/canvas/chunks/index-vv56h019.js +2 -0
- package/dist/canvas/chunks/index-w2mra17t.js +207 -0
- package/dist/canvas/chunks/index-wgv7en21.js +232 -0
- package/dist/canvas/chunks/index-yw8h9vha.js +157 -0
- package/dist/canvas/chunks/info-DKCQHKI2-wpzs6sz3.js +1 -0
- package/dist/canvas/chunks/infoDiagram-6WML65LV-v1yvggqj.js +2 -0
- package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-5hnq1a9p.js +70 -0
- package/dist/canvas/chunks/journeyDiagram-NVQOT4AX-zjcffveh.js +139 -0
- package/dist/canvas/chunks/kanban-definition-27J2QSJJ-dakqtfp1.js +89 -0
- package/dist/canvas/chunks/katex-dmg8k4zm.js +257 -0
- package/dist/canvas/chunks/mermaid.core-j2geswrd.js +12 -0
- package/dist/canvas/chunks/mindmap-definition-FAOFIHXS-142xhr3k.js +96 -0
- package/dist/canvas/chunks/packet-7NZHBO7P-xn439f0s.js +1 -0
- package/dist/canvas/chunks/pegDiagram-VL7TDLO6-5wvk7vsd.js +1 -0
- package/dist/canvas/chunks/pie-RZYD4A2V-0kf16rwh.js +1 -0
- package/dist/canvas/chunks/pieDiagram-7S7Q4E2Y-ztdhwycc.js +39 -0
- package/dist/canvas/chunks/quadrantDiagram-CIZ2JOQS-c5p9gmg6.js +7 -0
- package/dist/canvas/chunks/radar-I7S5WNFK-0g2pz36t.js +1 -0
- package/dist/canvas/chunks/railroad-3IZDKUUU-fcaran6j.js +1 -0
- package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-wgdya41q.js +1 -0
- package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-gy07a4ka.js +1 -0
- package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-ewk6wtkh.js +1 -0
- package/dist/canvas/chunks/railroadDiagram-AXF67PYL-xkmqkjwf.js +1 -0
- package/dist/canvas/chunks/requirementDiagram-LRYGKXZP-9wm2dyaw.js +84 -0
- package/dist/canvas/chunks/sankeyDiagram-W5VNT64P-2w19etgb.js +40 -0
- package/dist/canvas/chunks/sequenceDiagram-SI44F4Z6-0jn0vwmz.js +162 -0
- package/dist/canvas/chunks/sizeCapture-X5ZJPWSS-x75epwdq.js +1 -0
- package/dist/canvas/chunks/stateDiagram-OKZ733FA-schjpy6d.js +1 -0
- package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-k8sfp2e7.js +1 -0
- package/dist/canvas/chunks/swimlanes-SLNWSIFB-gkw4xce3.js +1 -0
- package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-nqysw67j.js +8 -0
- package/dist/canvas/chunks/timeline-definition-Z64GVDOM-x7nkcy01.js +120 -0
- package/dist/canvas/chunks/treeView-QDETBFTQ-cesw6gp0.js +1 -0
- package/dist/canvas/chunks/treemap-6X3UGDF4-zdv4knp9.js +1 -0
- package/dist/canvas/chunks/vennDiagram-T6HMQDX7-x8dqn9yf.js +34 -0
- package/dist/canvas/chunks/wardley-OPB4EBWU-44pdddez.js +1 -0
- package/dist/canvas/chunks/wardleyDiagram-T6FBY63Y-t1j52t9r.js +78 -0
- package/dist/canvas/chunks/xychartDiagram-ELKLHX3M-38t16pme.js +7 -0
- package/dist/canvas/global.css +389 -229
- package/dist/canvas/index.js +141 -211
- package/dist/canvas/mcp-app.html +4205 -554
- package/dist/canvas/mermaid-entry.js +338 -338
- package/dist/canvas/surface-theme.css +6 -6
- package/dist/json-render/index.css +1 -1
- package/dist/json-render/index.js +49 -49
- package/dist/types/client/canvas/BarHint.d.ts +5 -3
- package/dist/types/client/canvas/CanvasNode.d.ts +0 -11
- package/dist/types/client/canvas/EdgeLayer.d.ts +1 -2
- package/dist/types/client/canvas/auto-fit.d.ts +4 -5
- package/dist/types/client/mermaid-entry.d.ts +1 -2
- package/dist/types/client/mermaid-render.d.ts +1 -0
- package/dist/types/client/nodes/BoardNode.d.ts +1 -1
- package/dist/types/client/nodes/ExtAppFrame.d.ts +7 -90
- package/dist/types/client/nodes/McpAppNode.d.ts +1 -25
- package/dist/types/client/nodes/MermaidNode.d.ts +1 -8
- package/dist/types/client/nodes/ViewerFrame.d.ts +29 -0
- package/dist/types/client/nodes/ViewerHost.d.ts +6 -0
- package/dist/types/client/nodes/iframe-document-url.d.ts +3 -9
- package/dist/types/client/nodes/primitive-copy.d.ts +5 -0
- package/dist/types/client/nodes/use-iframe-content-height.d.ts +1 -1
- package/dist/types/client/nodes/use-surface-frame.d.ts +4 -6
- package/dist/types/client/nodes/viewer-runtime-state.d.ts +2 -1
- package/dist/types/client/state/canvas-store.d.ts +3 -1
- package/dist/types/client/state/intent-bridge.d.ts +1 -0
- package/dist/types/client/state/presentation.d.ts +17 -6
- package/dist/types/json-render/server.d.ts +2 -1
- package/dist/types/mcp/canvas-access.d.ts +1 -12
- package/dist/types/mcp/resource-subscriptions.d.ts +7 -0
- package/dist/types/mcp/server.d.ts +2 -0
- package/dist/types/server/ax-wait.d.ts +1 -0
- package/dist/types/server/canvas-operations.d.ts +1 -0
- package/dist/types/server/canvas-state.d.ts +2 -0
- package/dist/types/server/index.d.ts +11 -6
- package/dist/types/server/operations/http.d.ts +10 -0
- package/dist/types/server/operations/index.d.ts +2 -2
- package/dist/types/server/operations/invoker.d.ts +4 -3
- package/dist/types/server/operations/mcp-contracts.d.ts +20 -0
- package/dist/types/server/operations/mcp.d.ts +2 -0
- package/dist/types/server/operations/ops/batch.d.ts +1 -0
- package/dist/types/server/operations/ops/boards.d.ts +0 -1
- package/dist/types/server/operations/registry.d.ts +2 -2
- package/dist/types/server/operations/types.d.ts +12 -2
- package/dist/types/server/server.d.ts +2 -0
- package/dist/types/server/tour-control.d.ts +13 -3
- package/dist/types/server/webpage-node.d.ts +1 -0
- package/dist/types/shared/ax-surface-protocol.d.ts +0 -9
- package/dist/types/shared/tour.d.ts +8 -0
- package/docs/api-reference.md +2 -2
- package/docs/cli.md +1 -1
- package/docs/design/Chrome.dc.html +32 -6
- package/docs/design/Types1.dc.html +3 -2
- package/docs/design/Types2.dc.html +1 -1
- package/docs/design/Types3.dc.html +1 -1
- package/docs/design/Zoom.dc.html +37 -60
- package/docs/design/canvas.json +1 -1
- package/docs/design.md +169 -4
- package/docs/http-api.md +82 -1
- package/docs/mcp.md +101 -21
- package/docs/node-types.md +38 -3
- package/docs/plans/plan-009-tech-debt-backlog.md +2 -2
- package/docs/plans/plan-019-post-0.9-roadmap.md +402 -13
- package/docs/product-vision-2026-09.md +9 -0
- package/docs/sdk.md +5 -2
- package/package.json +2 -2
- package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/plugin.json +1 -1
- package/plugins/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/tools.json +9418 -2016
- package/skills/pmx-canvas/SKILL.md +19 -21
- package/skills/pmx-canvas/references/full-reference.md +44 -6
- package/skills/pmx-canvas/references/installing-pmx-canvas.md +7 -7
- package/skills/published-consumer-e2e/scripts/run-published-consumer-e2e.sh +3 -5
- package/src/client/canvas/BarHint.tsx +6 -3
- package/src/client/canvas/CanvasNode.tsx +34 -47
- package/src/client/canvas/CanvasViewport.tsx +6 -7
- package/src/client/canvas/ContextMenu.tsx +63 -3
- package/src/client/canvas/EdgeLayer.tsx +365 -169
- package/src/client/canvas/ExpandedNodeOverlay.tsx +1 -2
- package/src/client/canvas/Presentation.tsx +53 -3
- package/src/client/canvas/ToolRail.tsx +2 -0
- package/src/client/canvas/TopBar.tsx +24 -9
- package/src/client/canvas/auto-fit.ts +9 -11
- package/src/client/canvas/canvas-area.ts +1 -1
- package/src/client/canvas/use-focus-trap.ts +6 -1
- package/src/client/mermaid-entry.ts +6 -20
- package/src/client/mermaid-render.ts +39 -0
- package/src/client/nodes/AxStepControls.tsx +45 -69
- package/src/client/nodes/BoardNode.tsx +65 -9
- package/src/client/nodes/ContextNode.tsx +88 -396
- package/src/client/nodes/ExtAppFrame.tsx +283 -1462
- package/src/client/nodes/FileNode.tsx +92 -81
- package/src/client/nodes/HtmlNode.tsx +8 -36
- package/src/client/nodes/LedgerNode.tsx +31 -17
- package/src/client/nodes/MarkdownNode.tsx +8 -17
- package/src/client/nodes/McpAppNode.tsx +48 -154
- package/src/client/nodes/MermaidNode.tsx +80 -69
- package/src/client/nodes/PromptNode.tsx +12 -14
- package/src/client/nodes/ResponseNode.tsx +8 -6
- package/src/client/nodes/StatusNode.tsx +22 -7
- package/src/client/nodes/StatusSummary.tsx +5 -3
- package/src/client/nodes/TraceNode.tsx +8 -8
- package/src/client/nodes/ViewerFrame.tsx +262 -0
- package/src/client/nodes/ViewerHost.tsx +41 -0
- package/src/client/nodes/WebpageNode.tsx +22 -24
- package/src/client/nodes/iframe-document-url.ts +20 -27
- package/src/client/nodes/primitive-copy.ts +97 -0
- package/src/client/nodes/use-iframe-content-height.ts +34 -10
- package/src/client/nodes/use-surface-frame.ts +22 -11
- package/src/client/nodes/viewer-runtime-state.ts +41 -35
- package/src/client/state/canvas-store.ts +18 -12
- package/src/client/state/intent-bridge.ts +1 -0
- package/src/client/state/presentation.ts +135 -15
- package/src/client/state/sse-bridge.ts +18 -19
- package/src/client/theme/global.css +389 -229
- package/src/client/theme/surface-theme.css +6 -6
- package/src/json-render/charts/tufte-components.tsx +44 -2
- package/src/json-render/renderer/index.css +62 -2
- package/src/json-render/renderer/index.tsx +31 -7
- package/src/json-render/server.ts +3 -2
- package/src/mcp/canvas-access.ts +6 -47
- package/src/mcp/resource-subscriptions.ts +181 -0
- package/src/mcp/server.ts +185 -219
- package/src/server/ax-wait.ts +21 -6
- package/src/server/board-export.ts +35 -24
- package/src/server/canvas-geometry.ts +1 -0
- package/src/server/canvas-operations.ts +6 -2
- package/src/server/canvas-state.ts +5 -0
- package/src/server/demo-state.json +106 -100
- package/src/server/html-primitives.ts +3 -9
- package/src/server/html-surface.ts +8 -0
- package/src/server/index.ts +30 -12
- package/src/server/operations/http.ts +69 -21
- package/src/server/operations/index.ts +8 -1
- package/src/server/operations/invoker.ts +53 -5
- package/src/server/operations/mcp-contracts.ts +354 -0
- package/src/server/operations/mcp.ts +153 -18
- package/src/server/operations/ops/ax-await.ts +18 -10
- package/src/server/operations/ops/ax-read.ts +2 -0
- package/src/server/operations/ops/ax-timeline.ts +2 -2
- package/src/server/operations/ops/batch.ts +27 -8
- package/src/server/operations/ops/boards.ts +1 -3
- package/src/server/operations/ops/nodes.ts +18 -3
- package/src/server/operations/ops/viewport.ts +11 -9
- package/src/server/operations/registry.ts +24 -4
- package/src/server/operations/types.ts +16 -2
- package/src/server/server.ts +17 -59
- package/src/server/tour-control.ts +66 -6
- package/src/server/webpage-node.ts +9 -4
- package/src/shared/ax-surface-protocol.ts +0 -11
- package/src/shared/content-height-reporter.ts +4 -3
- package/src/shared/tour.ts +8 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import{e,t,q,Gr,l,d,f,p,m,g,b,v,r,gr,Wr,n,Ze,Je,h,Me,_i,fe,Ce}from"./index-1r72hdzb.js";import{V}from"./index-6qmsnxwy.js";import{It}from"./index-qj8fxwsf.js";import{we}from"./index-nprm96xp.js";import{Rt}from"./index-g3pwnqeb.js";import{le}from"./index-s4j678gj.js";import{J}from"./index-3cy1bzwh.js";var dt="flowchart-",pt=class{constructor(){this.vertexCounter=0,this.config=r(),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=f,this.setAccDescription=m,this.setDiagramTitle=b,this.getAccTitle=p,this.getAccDescription=g,this.getDiagramTitle=v,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{e(this,"FlowDB")}sanitizeText(s){return l.sanitizeText(s,this.config)}sanitizeNodeLabelType(s){switch(s){case"markdown":case"string":case"text":return s;default:return"markdown"}}setDiagramId(s){this.diagramId=s}lookUpDomId(s){for(let u of this.vertices.values())if(u.id===s)return this.diagramId?`${this.diagramId}-${u.domId}`:u.domId;return this.diagramId?`${this.diagramId}-${s}`:s}addVertex(s,u,o,c,D,S,C={},_){if(!s||s.trim().length===0)return;let k;if(_!==void 0){let B;if(!_.includes(`
|
|
2
|
+
`))B=`{
|
|
3
|
+
`+_+`
|
|
4
|
+
}`;else B=_+`
|
|
5
|
+
`;k=Je(B,{schema:Ze})}let F=this.edges.find((B)=>B.id===s);if(F){let B=k;if(B?.animate!==void 0)F.animate=B.animate;if(B?.animation!==void 0)F.animation=B.animation;if(B?.curve!==void 0)F.interpolate=B.curve;return}let z,x=this.vertices.get(s);if(x===void 0){if(u===void 0&&o===void 0&&c!==void 0&&c!==null)t.warn(`Style applied to unknown node "${s}". This may indicate a typo. The node will be created automatically.`);x={id:s,labelType:"text",domId:dt+s+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(s,x)}if(this.vertexCounter++,u!==void 0){if(this.config=r(),z=this.sanitizeText(u.text.trim()),x.labelType=u.type,z.startsWith('"')&&z.endsWith('"'))z=z.substring(1,z.length-1);x.text=z}else if(x.text===void 0)x.text=s;if(o!==void 0)x.type=o;if(c!==void 0&&c!==null)c.forEach((B)=>{x.styles.push(B)});if(D!==void 0&&D!==null)D.forEach((B)=>{x.classes.push(B)});if(S!==void 0)x.dir=S;if(x.props===void 0)x.props=C;else if(C!==void 0)Object.assign(x.props,C);if(k!==void 0){if(k.shape){if(k.shape!==k.shape.toLowerCase()||k.shape.includes("_"))throw Error(`No such shape: ${k.shape}. Shape names should be lowercase.`);else if(!_i(k.shape))throw Error(`No such shape: ${k.shape}.`);x.type=k?.shape}if(k?.label)x.text=k?.label,x.labelType=this.sanitizeNodeLabelType(k?.labelType);if(k?.icon){if(x.icon=k?.icon,!k.label?.trim()&&x.text===s)x.text=""}if(k?.form)x.form=k?.form;if(k?.pos)x.pos=k?.pos;if(k?.img){if(x.img=k?.img,!k.label?.trim()&&x.text===s)x.text=""}if(k?.constraint)x.constraint=k.constraint;if(k.w)x.assetWidth=Number(k.w);if(k.h)x.assetHeight=Number(k.h)}}addSingleLink(s,u,o,c){let C={start:s,end:u,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};t.info("abc78 Got edge...",C);let _=o.text;if(_!==void 0){if(C.text=this.sanitizeText(_.text.trim()),C.text.startsWith('"')&&C.text.endsWith('"'))C.text=C.text.substring(1,C.text.length-1);C.labelType=this.sanitizeNodeLabelType(_.type)}if(o!==void 0)C.type=o.type,C.stroke=o.stroke,C.length=o.length>10?10:o.length;if(c&&!this.edges.some((k)=>k.id===c))C.id=c,C.isUserDefinedId=!0;else{let k=this.edges.filter((F)=>F.start===C.start&&F.end===C.end);if(k.length===0)C.id=Me(C.start,C.end,{counter:0,prefix:"L"});else C.id=Me(C.start,C.end,{counter:k.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))t.info("Pushing edge..."),this.edges.push(C);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
|
6
|
+
|
|
7
|
+
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
8
|
+
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
9
|
+
You have to call mermaid.initialize.`)}isLinkData(s){return s!==null&&typeof s==="object"&&"id"in s&&typeof s.id==="string"}addLink(s,u,o){let c=this.isLinkData(o)?o.id.replace("@",""):void 0;t.info("addLink",s,u,c);for(let D of s)for(let S of u){let C=D===s[s.length-1],_=S===u[0];if(C&&_)this.addSingleLink(D,S,o,c);else this.addSingleLink(D,S,o,void 0)}}updateLinkInterpolate(s,u){s.forEach((o)=>{if(o==="default")this.edges.defaultInterpolate=u;else this.edges[o].interpolate=u})}updateLink(s,u){s.forEach((o)=>{if(typeof o==="number"&&o>=this.edges.length)throw Error(`The index ${o} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(o==="default")this.edges.defaultStyle=u;else if(this.edges[o].style=u,(this.edges[o]?.style?.length??0)>0&&!this.edges[o]?.style?.some((c)=>c?.startsWith("fill")))this.edges[o]?.style?.push("fill:none")})}addClass(s,u){let o=u.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");s.split(",").forEach((c)=>{let D=this.classes.get(c);if(D===void 0)D={id:c,styles:[],textStyles:[]},this.classes.set(c,D);if(o!==void 0&&o!==null)o.forEach((S)=>{if(/color/.exec(S)){let C=S.replace("fill","bgFill");D.textStyles.push(C)}D.styles.push(S)})})}setDirection(s){if(this.direction=s.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(s,u){for(let o of s.split(",")){let c=this.vertices.get(o);if(c)c.classes.push(u);let D=this.edges.find((C)=>C.id===o);if(D)D.classes.push(u);let S=this.subGraphLookup.get(o);if(S)S.classes.push(u)}}setTooltip(s,u){if(u===void 0)return;u=this.sanitizeText(u);for(let o of s.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(o):o,u)}setClickFun(s,u,o){if(r().securityLevel!=="loose")return;if(u===void 0)return;let c=[];if(typeof o==="string"){c=o.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let S=0;S<c.length;S++){let C=c[S].trim();if(C.startsWith('"')&&C.endsWith('"'))C=C.substr(1,C.length-2);c[S]=C}}if(c.length===0)c.push(s);let D=this.vertices.get(s);if(D)D.haveCallback=!0,this.funs.push(()=>{let S=this.lookUpDomId(s),C=document.querySelector(`[id="${S}"]`);if(C!==null)C.addEventListener("click",()=>{h.runFunc(u,...c)},!1)})}setLink(s,u,o){s.split(",").forEach((c)=>{let D=this.vertices.get(c);if(D!==void 0)D.link=h.formatUrl(u,this.config),D.linkTarget=o}),this.setClass(s,"clickable")}getTooltip(s){return this.tooltips.get(s)}setClickEvent(s,u,o){s.split(",").forEach((c)=>{this.setClickFun(c,u,o)}),this.setClass(s,"clickable")}bindFunctions(s){this.funs.forEach((u)=>{u(s)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(s){let u=It();n(s).select("svg").selectAll("g.node").on("mouseover",(D)=>{let S=n(D.currentTarget),C=S.attr("title");if(C===null)return;let _=D.currentTarget?.getBoundingClientRect();u.transition().duration(200).style("opacity",".9"),u.text(S.attr("title")).style("left",window.scrollX+_.left+(_.right-_.left)/2+"px").style("top",window.scrollY+_.bottom+"px"),u.html(V.sanitize(C)),S.classed("hover",!0)}).on("mouseout",(D)=>{u.transition().duration(500).style("opacity",0),n(D.currentTarget).classed("hover",!1)})}clear(s="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=s,this.config=r(),d()}setGen(s){this.version=s||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(s,u,o){let c=s.text.trim(),D=o.text;if(s===o&&/\s/.exec(o.text))c=void 0;let C=e((oe)=>{let M={boolean:{},number:{},string:{}},U=[],Ie;return{nodeList:oe.filter(function(ue){let Be=typeof ue;if(ue.stmt&&ue.stmt==="dir")return Ie=ue.value,!1;if(ue.trim()==="")return!1;if(Be in M)return M[Be].hasOwnProperty(ue)?!1:M[Be][ue]=!0;else return U.includes(ue)?!1:U.push(ue)}),dir:Ie}},"uniq")(u.flat()),{nodeList:_,dir:k}=C,F=k!==void 0,z=r().flowchart??{},x=k??(z.inheritDir?this.getDirection()??r().direction??void 0:void 0);if(this.version==="gen-1")for(let oe=0;oe<_.length;oe++)_[oe]=this.lookUpDomId(_[oe]);c=c??"subGraph"+this.subCount,D=D||"",D=this.sanitizeText(D),this.subCount=this.subCount+1;let B={id:c,nodes:_,title:D.trim(),classes:[],dir:x,hasExplicitDir:F,labelType:this.sanitizeNodeLabelType(o?.type)};return t.info("Adding",B.id,B.nodes,B.dir),B.nodes=this.makeUniq(B,this.subGraphs).nodes,this.subGraphs.push(B),this.subGraphLookup.set(c,B),c}getPosForId(s){for(let[u,o]of this.subGraphs.entries())if(o.id===s)return u;return-1}indexNodes2(s,u){let o=this.subGraphs[u].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=u,this.subGraphs[u].id===s)return{result:!0,count:0};let c=0,D=1;while(c<o.length){let S=this.getPosForId(o[c]);if(S>=0){let C=this.indexNodes2(s,S);if(C.result)return{result:!0,count:D+C.count};else D=D+C.count}c=c+1}return{result:!1,count:D}}getDepthFirstPos(s){return this.posCrossRef[s]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}destructStartLink(s){let u=s.trim(),o="arrow_open";switch(u[0]){case"<":o="arrow_point",u=u.slice(1);break;case"x":o="arrow_cross",u=u.slice(1);break;case"o":o="arrow_circle",u=u.slice(1);break}let c="normal";if(u.includes("="))c="thick";if(u.includes("."))c="dotted";return{type:o,stroke:c}}countChar(s,u){let o=u.length,c=0;for(let D=0;D<o;++D)if(u[D]===s)++c;return c}destructEndLink(s){let u=s.trim(),o=u.slice(0,-1),c="arrow_open";switch(u.slice(-1)){case"x":if(c="arrow_cross",u.startsWith("x"))c="double_"+c,o=o.slice(1);break;case">":if(c="arrow_point",u.startsWith("<"))c="double_"+c,o=o.slice(1);break;case"o":if(c="arrow_circle",u.startsWith("o"))c="double_"+c,o=o.slice(1);break}let D="normal",S=o.length-1;if(o.startsWith("="))D="thick";if(o.startsWith("~"))D="invisible";let C=this.countChar(".",o);if(C)D="dotted",S=C;return{type:c,stroke:D,length:S}}destructLink(s,u){let o=this.destructEndLink(s),c;if(u){if(c=this.destructStartLink(u),c.stroke!==o.stroke)return{type:"INVALID",stroke:"INVALID"};if(c.type==="arrow_open")c.type=o.type;else{if(c.type!==o.type)return{type:"INVALID",stroke:"INVALID"};c.type="double_"+c.type}if(c.type==="double_arrow")c.type="double_arrow_point";return c.length=o.length,c}return o}exists(s,u){for(let o of s)if(o.nodes.includes(u))return!0;return!1}makeUniq(s,u){let o=[];return s.nodes.forEach((c,D)=>{if(!this.exists(u,c))o.push(s.nodes[D])}),{nodes:o}}getTypeFromVertex(s){if(s.img)return"imageSquare";if(s.icon){if(s.form==="circle")return"iconCircle";if(s.form==="square")return"iconSquare";if(s.form==="rounded")return"iconRounded";return"icon"}switch(s.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return s.type}}findNode(s,u){return s.find((o)=>o.id===u)}destructEdgeType(s){let u="none",o="arrow_point";switch(s){case"arrow_point":case"arrow_circle":case"arrow_cross":o=s;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":u=s.replace("double_",""),o=u;break}return{arrowTypeStart:u,arrowTypeEnd:o}}addNodeFromVertex(s,u,o,c,D,S){let C=o.get(s.id),_=c.get(s.id)??!1,k=this.findNode(u,s.id);if(k)k.cssStyles=s.styles,k.cssCompiledStyles=this.getCompiledStyles(s.classes),k.cssClasses=s.classes.join(" ");else{let F={id:s.id,label:s.text,labelType:s.labelType,labelStyle:"",parentId:C,padding:D.flowchart?.padding||8,cssStyles:s.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...s.classes]),cssClasses:"default "+s.classes.join(" "),dir:s.dir,domId:s.domId,look:S,link:s.link,linkTarget:s.linkTarget,tooltip:this.getTooltip(s.id),icon:s.icon,pos:s.pos,img:s.img,assetWidth:s.assetWidth,assetHeight:s.assetHeight,constraint:s.constraint};if(_)u.push({...F,isGroup:!0,shape:"rect"});else u.push({...F,isGroup:!1,shape:this.getTypeFromVertex(s)})}}getCompiledStyles(s){let u=[];for(let o of s){let c=this.classes.get(o);if(c?.styles)u=[...u,...c.styles??[]].map((D)=>D.trim());if(c?.textStyles)u=[...u,...c.textStyles??[]].map((D)=>D.trim())}return u}getData(){let s=r(),u=[],o=[],c=this.getSubGraphs(),D=new Map,S=new Map;for(let k=c.length-1;k>=0;k--){let F=c[k];if(F.nodes.length>0)S.set(F.id,!0);for(let z of F.nodes)D.set(z,F.id)}for(let k=c.length-1;k>=0;k--){let F=c[k];u.push({id:F.id,label:F.title,labelStyle:"",labelType:F.labelType,parentId:D.get(F.id),padding:8,cssCompiledStyles:this.getCompiledStyles(F.classes),cssClasses:F.classes.join(" "),shape:"rect",dir:F.dir==="TD"?"TB":F.dir,explicitDir:F.hasExplicitDir,isGroup:!0,look:s.look})}this.getVertices().forEach((k)=>{this.addNodeFromVertex(k,u,D,S,s,s.look||"classic")});let _=this.getEdges();return _.forEach((k,F)=>{let{arrowTypeStart:z,arrowTypeEnd:x}=this.destructEdgeType(k.type),B=[..._.defaultStyle??[]];if(k.style)B.push(...k.style);let oe={id:Me(k.start,k.end,{counter:F,prefix:"L"},k.id),isUserDefinedId:k.isUserDefinedId,start:k.start,end:k.end,type:k.type??"normal",label:k.text,labelType:k.labelType,labelpos:"c",thickness:k.stroke,minlen:k.length,classes:k?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:k?.stroke==="invisible"||k?.type==="arrow_open"?"none":z,arrowTypeEnd:k?.stroke==="invisible"||k?.type==="arrow_open"?"none":x,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(k.classes),labelStyle:B,style:B,pattern:k.stroke,look:s.look,animate:k.animate,animation:k.animation,curve:k.interpolate||this.edges.defaultInterpolate||s.flowchart?.curve};o.push(oe)}),{nodes:u,edges:o,other:{},config:s}}defaultConfig(){return Wr.flowchart}},ft=e(function(s,u){return u.db.getClasses()},"getClasses"),bt=e(async function(s,u,o,c,D){t.info("REF0:"),t.info("Drawing state diagram (v2)",u);let{securityLevel:S,flowchart:C,layout:_}=r();c.db.setDiagramId(u),t.debug("Before getData: ");let k=c.db.getData();t.debug("Data: ",k);let F=le(u,S),z=c.db.getDirection();if(k.type=c.type,k.layoutAlgorithm=Ce(_),k.layoutAlgorithm==="dagre"&&_==="elk")t.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback.");k.direction=z,k.nodeSpacing=C?.nodeSpacing||50,k.rankSpacing=C?.rankSpacing||50,k.markers=["point","circle","cross"],k.diagramId=u,t.debug("REF1:",k),await fe(k,F,D);let x=k.config.flowchart?.diagramPadding??8;h.insertTitle(F,"flowchartTitleText",C?.titleTopMargin||0,c.db.getDiagramTitle()),J(F,x,"flowchart",C?.useMaxWidth||!1)},"draw"),kt={getClasses:ft,draw:bt},T1=function(){var s=e(function(Ve,E,T,y){for(T=T||{},y=Ve.length;y--;T[Ve[y]]=E);return T},"o"),u=[1,4],o=[1,3],c=[1,5],D=[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],S=[2,2],C=[1,13],_=[1,14],k=[1,15],F=[1,16],z=[1,23],x=[1,25],B=[1,26],oe=[1,27],M=[1,50],U=[1,49],Ie=[1,29],r1=[1,30],ue=[1,31],Be=[1,32],a1=[1,33],K=[1,45],j=[1,47],Y=[1,43],H=[1,48],X=[1,44],Q=[1,51],Z=[1,46],ee=[1,52],te=[1,53],n1=[1,34],u1=[1,35],o1=[1,36],l1=[1,37],c1=[1,38],ve=[1,58],N=[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],ke=[1,62],ge=[1,61],Ae=[1,63],Oe=[8,9,11,75,77,78],S1=[1,79],Ue=[1,92],ze=[1,97],We=[1,96],Ke=[1,93],je=[1,89],Ye=[1,95],He=[1,91],qe=[1,98],Xe=[1,94],Qe=[1,99],$e=[1,90],Re=[8,9,10,11,40,75,77,78],ie=[8,9,10,11,40,46,75,77,78],ce=[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],y1=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],e1=[44,60,89,102,105,106,109,111,114,115,116],x1=[1,122],F1=[1,123],h1=[1,125],d1=[1,124],_1=[44,60,62,74,89,102,105,106,109,111,114,115,116],B1=[1,134],v1=[1,148],L1=[1,149],V1=[1,150],I1=[1,151],w1=[1,136],R1=[1,138],N1=[1,142],G1=[1,143],P1=[1,144],O1=[1,145],M1=[1,146],U1=[1,147],z1=[1,152],W1=[1,153],K1=[1,132],j1=[1,133],Y1=[1,140],H1=[1,135],q1=[1,139],X1=[1,137],k1=[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],Q1=[1,155],J1=[1,157],O=[8,9,11],he=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],L=[1,177],re=[1,173],ae=[1,174],I=[1,178],w=[1,175],R=[1,176],t1=[77,116,119],G=[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],Z1=[10,106],Le=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],me=[1,248],De=[1,246],Ee=[1,250],Te=[1,244],Se=[1,245],ye=[1,247],xe=[1,249],Fe=[1,251],s1=[1,269],$1=[8,9,11,106],be=[8,9,10,11,60,84,105,106,109,110,111,112],g1={trace:e(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:e(function(E,T,y,A,P,i,Ne){var a=i.length-1;switch(P){case 2:this.$=[];break;case 3:if(!Array.isArray(i[a])||i[a].length>0)i[a-1].push(i[a]);this.$=i[a-1];break;case 4:case 183:this.$=i[a];break;case 11:A.setDirection("TB"),this.$="TB";break;case 12:A.setDirection(i[a-1]),this.$=i[a-1];break;case 27:this.$=i[a-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=A.addSubGraph(i[a-6],i[a-1],i[a-4]);break;case 34:this.$=A.addSubGraph(i[a-3],i[a-1],i[a-3]);break;case 35:this.$=A.addSubGraph(void 0,i[a-1],void 0);break;case 37:this.$=i[a].trim(),A.setAccTitle(this.$);break;case 38:case 39:this.$=i[a].trim(),A.setAccDescription(this.$);break;case 43:this.$=i[a-1]+i[a];break;case 44:this.$=i[a];break;case 45:A.addVertex(i[a-1][i[a-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,i[a]),A.addLink(i[a-3].stmt,i[a-1],i[a-2]),this.$={stmt:i[a-1],nodes:i[a-1].concat(i[a-3].nodes)};break;case 46:A.addLink(i[a-2].stmt,i[a],i[a-1]),this.$={stmt:i[a],nodes:i[a].concat(i[a-2].nodes)};break;case 47:A.addLink(i[a-3].stmt,i[a-1],i[a-2]),this.$={stmt:i[a-1],nodes:i[a-1].concat(i[a-3].nodes)};break;case 48:this.$={stmt:i[a-1],nodes:i[a-1]};break;case 49:A.addVertex(i[a-1][i[a-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,i[a]),this.$={stmt:i[a-1],nodes:i[a-1],shapeData:i[a]};break;case 50:this.$={stmt:i[a],nodes:i[a]};break;case 51:this.$=[i[a]];break;case 52:A.addVertex(i[a-5][i[a-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,i[a-4]),this.$=i[a-5].concat(i[a]);break;case 53:this.$=i[a-4].concat(i[a]);break;case 54:this.$=i[a];break;case 55:this.$=i[a-2],A.setClass(i[a-2],i[a]);break;case 56:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"square");break;case 57:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"doublecircle");break;case 58:this.$=i[a-5],A.addVertex(i[a-5],i[a-2],"circle");break;case 59:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"ellipse");break;case 60:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"stadium");break;case 61:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"subroutine");break;case 62:this.$=i[a-7],A.addVertex(i[a-7],i[a-1],"rect",void 0,void 0,void 0,Object.fromEntries([[i[a-5],i[a-3]]]));break;case 63:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"cylinder");break;case 64:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"round");break;case 65:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"diamond");break;case 66:this.$=i[a-5],A.addVertex(i[a-5],i[a-2],"hexagon");break;case 67:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"odd");break;case 68:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"trapezoid");break;case 69:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"inv_trapezoid");break;case 70:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"lean_right");break;case 71:this.$=i[a-3],A.addVertex(i[a-3],i[a-1],"lean_left");break;case 72:this.$=i[a],A.addVertex(i[a]);break;case 73:i[a-1].text=i[a],this.$=i[a-1];break;case 74:case 75:i[a-2].text=i[a-1],this.$=i[a-2];break;case 76:this.$=i[a];break;case 77:var W=A.destructLink(i[a],i[a-2]);this.$={type:W.type,stroke:W.stroke,length:W.length,text:i[a-1]};break;case 78:var W=A.destructLink(i[a],i[a-2]);this.$={type:W.type,stroke:W.stroke,length:W.length,text:i[a-1],id:i[a-3]};break;case 79:this.$={text:i[a],type:"text"};break;case 80:this.$={text:i[a-1].text+""+i[a],type:i[a-1].type};break;case 81:this.$={text:i[a],type:"string"};break;case 82:this.$={text:i[a],type:"markdown"};break;case 83:var W=A.destructLink(i[a]);this.$={type:W.type,stroke:W.stroke,length:W.length};break;case 84:var W=A.destructLink(i[a]);this.$={type:W.type,stroke:W.stroke,length:W.length,id:i[a-1]};break;case 85:this.$=i[a-1];break;case 86:this.$={text:i[a],type:"text"};break;case 87:this.$={text:i[a-1].text+""+i[a],type:i[a-1].type};break;case 88:this.$={text:i[a],type:"string"};break;case 89:case 104:this.$={text:i[a],type:"markdown"};break;case 101:this.$={text:i[a],type:"text"};break;case 102:this.$={text:i[a-1].text+""+i[a],type:i[a-1].type};break;case 103:this.$={text:i[a],type:"text"};break;case 105:this.$=i[a-4],A.addClass(i[a-2],i[a]);break;case 106:this.$=i[a-4],A.setClass(i[a-2],i[a]);break;case 107:case 115:this.$=i[a-1],A.setClickEvent(i[a-1],i[a]);break;case 108:case 116:this.$=i[a-3],A.setClickEvent(i[a-3],i[a-2]),A.setTooltip(i[a-3],i[a]);break;case 109:this.$=i[a-2],A.setClickEvent(i[a-2],i[a-1],i[a]);break;case 110:this.$=i[a-4],A.setClickEvent(i[a-4],i[a-3],i[a-2]),A.setTooltip(i[a-4],i[a]);break;case 111:this.$=i[a-2],A.setLink(i[a-2],i[a]);break;case 112:this.$=i[a-4],A.setLink(i[a-4],i[a-2]),A.setTooltip(i[a-4],i[a]);break;case 113:this.$=i[a-4],A.setLink(i[a-4],i[a-2],i[a]);break;case 114:this.$=i[a-6],A.setLink(i[a-6],i[a-4],i[a]),A.setTooltip(i[a-6],i[a-2]);break;case 117:this.$=i[a-1],A.setLink(i[a-1],i[a]);break;case 118:this.$=i[a-3],A.setLink(i[a-3],i[a-2]),A.setTooltip(i[a-3],i[a]);break;case 119:this.$=i[a-3],A.setLink(i[a-3],i[a-2],i[a]);break;case 120:this.$=i[a-5],A.setLink(i[a-5],i[a-4],i[a]),A.setTooltip(i[a-5],i[a-2]);break;case 121:this.$=i[a-4],A.addVertex(i[a-2],void 0,void 0,i[a]);break;case 122:this.$=i[a-4],A.updateLink([i[a-2]],i[a]);break;case 123:this.$=i[a-4],A.updateLink(i[a-2],i[a]);break;case 124:this.$=i[a-8],A.updateLinkInterpolate([i[a-6]],i[a-2]),A.updateLink([i[a-6]],i[a]);break;case 125:this.$=i[a-8],A.updateLinkInterpolate(i[a-6],i[a-2]),A.updateLink(i[a-6],i[a]);break;case 126:this.$=i[a-6],A.updateLinkInterpolate([i[a-4]],i[a]);break;case 127:this.$=i[a-6],A.updateLinkInterpolate(i[a-4],i[a]);break;case 128:case 130:this.$=[i[a]];break;case 129:case 131:i[a-2].push(i[a]),this.$=i[a-2];break;case 133:this.$=i[a-1]+i[a];break;case 181:this.$=i[a];break;case 182:this.$=i[a-1]+""+i[a];break;case 184:this.$=i[a-1]+""+i[a];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"};break}},"anonymous"),table:[{3:1,4:2,9:u,10:o,12:c},{1:[3]},s(D,S,{5:6}),{4:7,9:u,10:o,12:c},{4:8,9:u,10:o,12:c},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:C,9:_,10:k,11:F,20:17,22:18,23:19,24:20,25:21,26:22,27:z,33:24,34:x,36:B,38:oe,42:28,43:39,44:M,45:40,47:41,60:U,84:Ie,85:r1,86:ue,87:Be,88:a1,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te,121:n1,122:u1,123:o1,124:l1,125:c1},s(D,[2,9]),s(D,[2,10]),s(D,[2,11]),{8:[1,55],9:[1,56],10:ve,15:54,18:57},s(N,[2,3]),s(N,[2,4]),s(N,[2,5]),s(N,[2,6]),s(N,[2,7]),s(N,[2,8]),{8:ke,9:ge,11:Ae,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:ke,9:ge,11:Ae,21:68},{8:ke,9:ge,11:Ae,21:69},{8:ke,9:ge,11:Ae,21:70},{8:ke,9:ge,11:Ae,21:71},{8:ke,9:ge,11:Ae,21:72},{8:ke,9:ge,10:[1,73],11:Ae,21:74},s(N,[2,36]),{35:[1,75]},{37:[1,76]},s(N,[2,39]),s(Oe,[2,50],{18:77,39:78,10:ve,40:S1}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:Ue,44:ze,60:We,80:[1,87],89:Ke,95:[1,84],97:[1,85],101:86,105:je,106:Ye,109:He,111:qe,114:Xe,115:Qe,116:$e,120:88},s(N,[2,185]),s(N,[2,186]),s(N,[2,187]),s(N,[2,188]),s(N,[2,189]),s(Re,[2,51]),s(Re,[2,54],{46:[1,100]}),s(ie,[2,72],{113:113,29:[1,101],44:M,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:U,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:K,102:j,105:Y,106:H,109:X,111:Q,114:Z,115:ee,116:te}),s(ce,[2,181]),s(ce,[2,142]),s(ce,[2,143]),s(ce,[2,144]),s(ce,[2,145]),s(ce,[2,146]),s(ce,[2,147]),s(ce,[2,148]),s(ce,[2,149]),s(ce,[2,150]),s(ce,[2,151]),s(ce,[2,152]),s(D,[2,12]),s(D,[2,18]),s(D,[2,19]),{9:[1,114]},s(y1,[2,26],{18:115,10:ve}),s(N,[2,27]),{42:116,43:39,44:M,45:40,47:41,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te},s(N,[2,40]),s(N,[2,41]),s(N,[2,42]),s(e1,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:x1,81:F1,116:h1,119:d1},{75:[1,126],77:[1,127]},s(_1,[2,83]),s(N,[2,28]),s(N,[2,29]),s(N,[2,30]),s(N,[2,31]),s(N,[2,32]),{10:B1,12:v1,14:L1,27:V1,28:128,32:I1,44:w1,60:R1,75:N1,80:[1,130],81:[1,131],83:141,84:G1,85:P1,86:O1,87:M1,88:U1,89:z1,90:W1,91:129,105:K1,109:j1,111:Y1,114:H1,115:q1,116:X1},s(k1,S,{5:154}),s(N,[2,37]),s(N,[2,38]),s(Oe,[2,48],{44:Q1}),s(Oe,[2,49],{18:156,10:ve,40:J1}),s(Re,[2,44]),{44:M,47:158,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te},{102:[1,159],103:160,105:[1,161]},{44:M,47:162,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te},{44:M,47:163,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te},s(O,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},s(O,[2,115],{120:168,10:[1,167],14:Ue,44:ze,60:We,89:Ke,105:je,106:Ye,109:He,111:qe,114:Xe,115:Qe,116:$e}),s(O,[2,117],{10:[1,169]}),s(he,[2,183]),s(he,[2,170]),s(he,[2,171]),s(he,[2,172]),s(he,[2,173]),s(he,[2,174]),s(he,[2,175]),s(he,[2,176]),s(he,[2,177]),s(he,[2,178]),s(he,[2,179]),s(he,[2,180]),{44:M,47:170,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te},{30:171,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{30:179,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{30:181,50:[1,180],67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{30:182,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{30:183,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{30:184,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{109:[1,185]},{30:186,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{30:187,65:[1,188],67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{30:189,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{30:190,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{30:191,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},s(ce,[2,182]),s(D,[2,20]),s(y1,[2,25]),s(Oe,[2,46],{39:192,18:193,10:ve,40:S1}),s(e1,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{77:[1,197],79:198,116:h1,119:d1},s(t1,[2,79]),s(t1,[2,81]),s(t1,[2,82]),s(t1,[2,168]),s(t1,[2,169]),{76:199,79:121,80:x1,81:F1,116:h1,119:d1},s(_1,[2,84]),{8:ke,9:ge,10:B1,11:Ae,12:v1,14:L1,21:201,27:V1,29:[1,200],32:I1,44:w1,60:R1,75:N1,83:141,84:G1,85:P1,86:O1,87:M1,88:U1,89:z1,90:W1,91:202,105:K1,109:j1,111:Y1,114:H1,115:q1,116:X1},s(G,[2,101]),s(G,[2,103]),s(G,[2,104]),s(G,[2,157]),s(G,[2,158]),s(G,[2,159]),s(G,[2,160]),s(G,[2,161]),s(G,[2,162]),s(G,[2,163]),s(G,[2,164]),s(G,[2,165]),s(G,[2,166]),s(G,[2,167]),s(G,[2,90]),s(G,[2,91]),s(G,[2,92]),s(G,[2,93]),s(G,[2,94]),s(G,[2,95]),s(G,[2,96]),s(G,[2,97]),s(G,[2,98]),s(G,[2,99]),s(G,[2,100]),{6:11,7:12,8:C,9:_,10:k,11:F,20:17,22:18,23:19,24:20,25:21,26:22,27:z,32:[1,203],33:24,34:x,36:B,38:oe,42:28,43:39,44:M,45:40,47:41,60:U,84:Ie,85:r1,86:ue,87:Be,88:a1,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te,121:n1,122:u1,123:o1,124:l1,125:c1},{10:ve,18:204},{44:[1,205]},s(Re,[2,43]),{10:[1,206],44:M,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,113:113,114:Z,115:ee,116:te},{10:[1,207]},{10:[1,208],106:[1,209]},s(Z1,[2,128]),{10:[1,210],44:M,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,113:113,114:Z,115:ee,116:te},{10:[1,211],44:M,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,113:113,114:Z,115:ee,116:te},{80:[1,212]},s(O,[2,109],{10:[1,213]}),s(O,[2,111],{10:[1,214]}),{80:[1,215]},s(he,[2,184]),{80:[1,216],98:[1,217]},s(Re,[2,55],{113:113,44:M,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,114:Z,115:ee,116:te}),{31:[1,218],67:L,82:219,116:I,117:w,118:R},s(Le,[2,86]),s(Le,[2,88]),s(Le,[2,89]),s(Le,[2,153]),s(Le,[2,154]),s(Le,[2,155]),s(Le,[2,156]),{49:[1,220],67:L,82:219,116:I,117:w,118:R},{30:221,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{51:[1,222],67:L,82:219,116:I,117:w,118:R},{53:[1,223],67:L,82:219,116:I,117:w,118:R},{55:[1,224],67:L,82:219,116:I,117:w,118:R},{57:[1,225],67:L,82:219,116:I,117:w,118:R},{60:[1,226]},{64:[1,227],67:L,82:219,116:I,117:w,118:R},{66:[1,228],67:L,82:219,116:I,117:w,118:R},{30:229,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},{31:[1,230],67:L,82:219,116:I,117:w,118:R},{67:L,69:[1,231],71:[1,232],82:219,116:I,117:w,118:R},{67:L,69:[1,234],71:[1,233],82:219,116:I,117:w,118:R},s(Oe,[2,45],{18:156,10:ve,40:J1}),s(Oe,[2,47],{44:Q1}),s(e1,[2,75]),s(e1,[2,74]),{62:[1,235],67:L,82:219,116:I,117:w,118:R},s(e1,[2,77]),s(t1,[2,80]),{77:[1,236],79:198,116:h1,119:d1},{30:237,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},s(k1,S,{5:238}),s(G,[2,102]),s(N,[2,35]),{43:239,44:M,45:40,47:41,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te},{10:ve,18:240},{10:me,60:De,84:Ee,92:241,105:Te,107:242,108:243,109:Se,110:ye,111:xe,112:Fe},{10:me,60:De,84:Ee,92:252,104:[1,253],105:Te,107:242,108:243,109:Se,110:ye,111:xe,112:Fe},{10:me,60:De,84:Ee,92:254,104:[1,255],105:Te,107:242,108:243,109:Se,110:ye,111:xe,112:Fe},{105:[1,256]},{10:me,60:De,84:Ee,92:257,105:Te,107:242,108:243,109:Se,110:ye,111:xe,112:Fe},{44:M,47:258,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te},s(O,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},s(O,[2,116]),s(O,[2,118],{10:[1,262]}),s(O,[2,119]),s(ie,[2,56]),s(Le,[2,87]),s(ie,[2,57]),{51:[1,263],67:L,82:219,116:I,117:w,118:R},s(ie,[2,64]),s(ie,[2,59]),s(ie,[2,60]),s(ie,[2,61]),{109:[1,264]},s(ie,[2,63]),s(ie,[2,65]),{66:[1,265],67:L,82:219,116:I,117:w,118:R},s(ie,[2,67]),s(ie,[2,68]),s(ie,[2,70]),s(ie,[2,69]),s(ie,[2,71]),s([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),s(e1,[2,78]),{31:[1,266],67:L,82:219,116:I,117:w,118:R},{6:11,7:12,8:C,9:_,10:k,11:F,20:17,22:18,23:19,24:20,25:21,26:22,27:z,32:[1,267],33:24,34:x,36:B,38:oe,42:28,43:39,44:M,45:40,47:41,60:U,84:Ie,85:r1,86:ue,87:Be,88:a1,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te,121:n1,122:u1,123:o1,124:l1,125:c1},s(Re,[2,53]),{43:268,44:M,45:40,47:41,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te},s(O,[2,121],{106:s1}),s($1,[2,130],{108:270,10:me,60:De,84:Ee,105:Te,109:Se,110:ye,111:xe,112:Fe}),s(be,[2,132]),s(be,[2,134]),s(be,[2,135]),s(be,[2,136]),s(be,[2,137]),s(be,[2,138]),s(be,[2,139]),s(be,[2,140]),s(be,[2,141]),s(O,[2,122],{106:s1}),{10:[1,271]},s(O,[2,123],{106:s1}),{10:[1,272]},s(Z1,[2,129]),s(O,[2,105],{106:s1}),s(O,[2,106],{113:113,44:M,60:U,89:K,102:j,105:Y,106:H,109:X,111:Q,114:Z,115:ee,116:te}),s(O,[2,110]),s(O,[2,112],{10:[1,273]}),s(O,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:ke,9:ge,11:Ae,21:278},s(N,[2,34]),s(Re,[2,52]),{10:me,60:De,84:Ee,105:Te,107:279,108:243,109:Se,110:ye,111:xe,112:Fe},s(be,[2,133]),{14:Ue,44:ze,60:We,89:Ke,101:280,105:je,106:Ye,109:He,111:qe,114:Xe,115:Qe,116:$e,120:88},{14:Ue,44:ze,60:We,89:Ke,101:281,105:je,106:Ye,109:He,111:qe,114:Xe,115:Qe,116:$e,120:88},{98:[1,282]},s(O,[2,120]),s(ie,[2,58]),{30:283,67:L,80:re,81:ae,82:172,116:I,117:w,118:R},s(ie,[2,66]),s(k1,S,{5:284}),s($1,[2,131],{108:270,10:me,60:De,84:Ee,105:Te,109:Se,110:ye,111:xe,112:Fe}),s(O,[2,126],{120:168,10:[1,285],14:Ue,44:ze,60:We,89:Ke,105:je,106:Ye,109:He,111:qe,114:Xe,115:Qe,116:$e}),s(O,[2,127],{120:168,10:[1,286],14:Ue,44:ze,60:We,89:Ke,105:je,106:Ye,109:He,111:qe,114:Xe,115:Qe,116:$e}),s(O,[2,114]),{31:[1,287],67:L,82:219,116:I,117:w,118:R},{6:11,7:12,8:C,9:_,10:k,11:F,20:17,22:18,23:19,24:20,25:21,26:22,27:z,32:[1,288],33:24,34:x,36:B,38:oe,42:28,43:39,44:M,45:40,47:41,60:U,84:Ie,85:r1,86:ue,87:Be,88:a1,89:K,102:j,105:Y,106:H,109:X,111:Q,113:42,114:Z,115:ee,116:te,121:n1,122:u1,123:o1,124:l1,125:c1},{10:me,60:De,84:Ee,92:289,105:Te,107:242,108:243,109:Se,110:ye,111:xe,112:Fe},{10:me,60:De,84:Ee,92:290,105:Te,107:242,108:243,109:Se,110:ye,111:xe,112:Fe},s(ie,[2,62]),s(N,[2,33]),s(O,[2,124],{106:s1}),s(O,[2,125],{106:s1})],defaultActions:{},parseError:e(function(E,T){if(T.recoverable)this.trace(E);else{var y=Error(E);throw y.hash=T,y}},"parseError"),parse:e(function(E){var T=this,y=[0],A=[],P=[null],i=[],Ne=this.table,a="",W=0,et=0,tt=0,ot=2,st=1,lt=i.slice.call(arguments,1),se=Object.create(this.lexer),Ge={yy:{}};for(var A1 in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,A1))Ge.yy[A1]=this.yy[A1];if(se.setInput(E,Ge.yy),Ge.yy.lexer=se,Ge.yy.parser=this,typeof se.yylloc>"u")se.yylloc={};var m1=se.yylloc;i.push(m1);var ct=se.options&&se.options.ranges;if(typeof Ge.yy.parseError==="function")this.parseError=Ge.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ht(pe){y.length=y.length-2*pe,P.length=P.length-pe,i.length=i.length-pe}e(ht,"popStack");function it(){var pe=A.pop()||se.lex()||st;if(typeof pe!=="number"){if(pe instanceof Array)A=pe,pe=A.pop();pe=T.symbols_[pe]||pe}return pe}e(it,"lex");var ne,D1,Pe,de,Dt,C1,i1={},f1,_e,rt,b1;while(!0){if(Pe=y[y.length-1],this.defaultActions[Pe])de=this.defaultActions[Pe];else{if(ne===null||typeof ne>"u")ne=it();de=Ne[Pe]&&Ne[Pe][ne]}if(typeof de>"u"||!de.length||!de[0]){var E1="";b1=[];for(f1 in Ne[Pe])if(this.terminals_[f1]&&f1>ot)b1.push("'"+this.terminals_[f1]+"'");if(se.showPosition)E1="Parse error on line "+(W+1)+`:
|
|
10
|
+
`+se.showPosition()+`
|
|
11
|
+
Expecting `+b1.join(", ")+", got '"+(this.terminals_[ne]||ne)+"'";else E1="Parse error on line "+(W+1)+": Unexpected "+(ne==st?"end of input":"'"+(this.terminals_[ne]||ne)+"'");this.parseError(E1,{text:se.match,token:this.terminals_[ne]||ne,line:se.yylineno,loc:m1,expected:b1})}if(de[0]instanceof Array&&de.length>1)throw Error("Parse Error: multiple actions possible at state: "+Pe+", token: "+ne);switch(de[0]){case 1:if(y.push(ne),P.push(se.yytext),i.push(se.yylloc),y.push(de[1]),ne=null,!D1){if(et=se.yyleng,a=se.yytext,W=se.yylineno,m1=se.yylloc,tt>0)tt--}else ne=D1,D1=null;break;case 2:if(_e=this.productions_[de[1]][1],i1.$=P[P.length-_e],i1._$={first_line:i[i.length-(_e||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(_e||1)].first_column,last_column:i[i.length-1].last_column},ct)i1._$.range=[i[i.length-(_e||1)].range[0],i[i.length-1].range[1]];if(C1=this.performAction.apply(i1,[a,et,W,Ge.yy,de[1],P,i].concat(lt)),typeof C1<"u")return C1;if(_e)y=y.slice(0,-1*_e*2),P=P.slice(0,-1*_e),i=i.slice(0,-1*_e);y.push(this.productions_[de[1]][0]),P.push(i1.$),i.push(i1._$),rt=Ne[y[y.length-2]][y[y.length-1]],y.push(rt);break;case 3:return!0}}return!0},"parse")},ut=function(){var Ve={EOF:1,parseError:e(function(T,y){if(this.yy.parser)this.yy.parser.parseError(T,y);else throw Error(T)},"parseError"),setInput:e(function(E,T){if(this.yy=T||this.yy||{},this._input=E,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var E=this._input[0];this.yytext+=E,this.yyleng++,this.offset++,this.match+=E,this.matched+=E;var T=E.match(/(?:\r\n?|\n).*/g);if(T)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),E},"input"),unput:e(function(E){var T=E.length,y=E.split(/(?:\r\n?|\n)/g);this._input=E+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var A=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1)this.yylineno-=y.length-1;var P=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===A.length?this.yylloc.first_column:0)+A[A.length-y.length].length-y[0].length:this.yylloc.first_column-T},this.options.ranges)this.yylloc.range=[P[0],P[0]+this.yyleng-T];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
12
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(E){this.unput(this.match.slice(E))},"less"),pastInput:e(function(){var E=this.matched.substr(0,this.matched.length-this.match.length);return(E.length>20?"...":"")+E.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var E=this.match;if(E.length<20)E+=this._input.substr(0,20-E.length);return(E.substr(0,20)+(E.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var E=this.pastInput(),T=Array(E.length+1).join("-");return E+this.upcomingInput()+`
|
|
13
|
+
`+T+"^"},"showPosition"),test_match:e(function(E,T){var y,A,P;if(this.options.backtrack_lexer){if(P={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)P.yylloc.range=this.yylloc.range.slice(0)}if(A=E[0].match(/(?:\r\n?|\n).*/g),A)this.yylineno+=A.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+E[0].length},this.yytext+=E[0],this.match+=E[0],this.matches=E,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(E[0].length),this.matched+=E[0],y=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(y)return y;else if(this._backtrack){for(var i in P)this[i]=P[i];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var E,T,y,A;if(!this._more)this.yytext="",this.match="";var P=this._currentRules();for(var i=0;i<P.length;i++)if(y=this._input.match(this.rules[P[i]]),y&&(!T||y[0].length>T[0].length)){if(T=y,A=i,this.options.backtrack_lexer)if(E=this.test_match(y,P[i]),E!==!1)return E;else if(this._backtrack){T=!1;continue}else return!1;else if(!this.options.flex)break}if(T){if(E=this.test_match(T,P[A]),E!==!1)return E;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
14
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var T=this.next();if(T)return T;else return this.lex()},"lex"),begin:e(function(T){this.conditionStack.push(T)},"begin"),popState:e(function(){var T=this.conditionStack.length-1;if(T>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(T){if(T=this.conditionStack.length-1-Math.abs(T||0),T>=0)return this.conditionStack[T];else return"INITIAL"},"topState"),pushState:e(function(T){this.begin(T)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(T,y,A,P){var i=P;switch(A){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),y.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let Ne=/\n\s*/g;return y.yytext=y.yytext.replace(Ne,"<br/>"),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 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 33:this.popState();break;case 34:return 88;case 35:if(T.lex.firstGraph())this.begin("dir");return 12;case 36:if(T.lex.firstGraph())this.begin("dir");return 12;case 37:if(T.lex.firstGraph())this.begin("dir");return 12;case 38:if(T.lex.firstGraph())this.begin("dir");return 12;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return this.popState(),14;break;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:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;break;case 71:return this.pushState("edgeText"),75;break;case 72:return 119;case 73:return this.popState(),77;break;case 74:return this.pushState("thickEdgeText"),75;break;case 75:return 119;case 76:return this.popState(),77;break;case 77:return this.pushState("dottedEdgeText"),75;break;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;break;case 81:return"TEXT";case 82:return this.pushState("ellipseText"),52;break;case 83:return this.popState(),55;break;case 84:return this.pushState("text"),54;break;case 85:return this.popState(),57;break;case 86:return this.pushState("text"),56;break;case 87:return 58;case 88:return this.pushState("text"),67;break;case 89:return this.popState(),64;break;case 90:return this.pushState("text"),63;break;case 91:return this.popState(),49;break;case 92:return this.pushState("text"),48;break;case 93:return this.popState(),69;break;case 94:return this.popState(),71;break;case 95:return 117;case 96:return this.pushState("trapText"),68;break;case 97:return this.pushState("trapText"),70;break;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;break;case 110:return this.pushState("text"),62;break;case 111:return this.popState(),51;break;case 112:return this.pushState("text"),50;break;case 113:return this.popState(),31;break;case 114:return this.pushState("text"),29;break;case 115:return this.popState(),66;break;case 116:return this.pushState("text"),65;break;case 117:return"TEXT";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)/,/^(?:$)/],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}}};return Ve}();g1.lexer=ut;function p1(){this.yy={}}return e(p1,"Parser"),p1.prototype=g1,g1.Parser=p1,new p1}();T1.parser=T1;var at=T1,nt=Object.assign({},at);nt.parse=(s)=>{let u=s.replace(/}\s*\n/g,`}
|
|
15
|
+
`);return at.parse(u)};var gt=nt,At=e((s,u)=>{let o=Rt,c=o(s,"r"),D=o(s,"g"),S=o(s,"b");return q(c,D,S,u)},"fade"),mt=e((s)=>`.label {
|
|
16
|
+
font-family: ${s.fontFamily};
|
|
17
|
+
color: ${s.nodeTextColor||s.textColor};
|
|
18
|
+
}
|
|
19
|
+
.cluster-label text {
|
|
20
|
+
fill: ${s.titleColor};
|
|
21
|
+
}
|
|
22
|
+
.cluster-label span {
|
|
23
|
+
color: ${s.titleColor};
|
|
24
|
+
}
|
|
25
|
+
.cluster-label span p {
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.label text,span {
|
|
30
|
+
fill: ${s.nodeTextColor||s.textColor};
|
|
31
|
+
color: ${s.nodeTextColor||s.textColor};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.node rect,
|
|
35
|
+
.node circle,
|
|
36
|
+
.node ellipse,
|
|
37
|
+
.node polygon,
|
|
38
|
+
.node path {
|
|
39
|
+
fill: ${s.mainBkg};
|
|
40
|
+
stroke: ${s.nodeBorder};
|
|
41
|
+
stroke-width: ${s.strokeWidth??1}px;
|
|
42
|
+
}
|
|
43
|
+
.rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
|
|
44
|
+
text-anchor: middle;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.node .katex path {
|
|
48
|
+
fill: #000;
|
|
49
|
+
stroke: #000;
|
|
50
|
+
stroke-width: 1px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
|
|
54
|
+
text-align: center;
|
|
55
|
+
}
|
|
56
|
+
.node.clickable {
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
.root .anchor path {
|
|
62
|
+
fill: ${s.lineColor} !important;
|
|
63
|
+
stroke-width: 0;
|
|
64
|
+
stroke: ${s.lineColor};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.arrowheadPath {
|
|
68
|
+
fill: ${s.arrowheadColor};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.edgePath .path {
|
|
72
|
+
stroke: ${s.lineColor};
|
|
73
|
+
stroke-width: ${s.strokeWidth??2}px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.flowchart-link {
|
|
77
|
+
stroke: ${s.lineColor};
|
|
78
|
+
fill: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.edgeLabel {
|
|
82
|
+
background-color: ${s.edgeLabelBackground};
|
|
83
|
+
p {
|
|
84
|
+
background-color: ${s.edgeLabelBackground};
|
|
85
|
+
}
|
|
86
|
+
rect {
|
|
87
|
+
opacity: 0.5;
|
|
88
|
+
background-color: ${s.edgeLabelBackground};
|
|
89
|
+
fill: ${s.edgeLabelBackground};
|
|
90
|
+
}
|
|
91
|
+
text-align: center;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* For html labels only */
|
|
95
|
+
.labelBkg {
|
|
96
|
+
background-color: ${At(s.edgeLabelBackground,0.5)};
|
|
97
|
+
// background-color:
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.cluster rect {
|
|
101
|
+
fill: ${s.clusterBkg};
|
|
102
|
+
stroke: ${s.clusterBorder};
|
|
103
|
+
stroke-width: 1px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.cluster text {
|
|
107
|
+
fill: ${s.titleColor};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.cluster span {
|
|
111
|
+
color: ${s.titleColor};
|
|
112
|
+
}
|
|
113
|
+
/* .cluster div {
|
|
114
|
+
color: ${s.titleColor};
|
|
115
|
+
} */
|
|
116
|
+
|
|
117
|
+
div.mermaidTooltip {
|
|
118
|
+
position: absolute;
|
|
119
|
+
text-align: center;
|
|
120
|
+
max-width: 200px;
|
|
121
|
+
padding: 2px;
|
|
122
|
+
font-family: ${s.fontFamily};
|
|
123
|
+
font-size: 12px;
|
|
124
|
+
background: ${s.tertiaryColor};
|
|
125
|
+
border: 1px solid ${s.border2};
|
|
126
|
+
border-radius: 2px;
|
|
127
|
+
pointer-events: none;
|
|
128
|
+
z-index: 100;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.flowchartTitleText {
|
|
132
|
+
text-anchor: middle;
|
|
133
|
+
font-size: 18px;
|
|
134
|
+
fill: ${s.textColor};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
rect.text {
|
|
138
|
+
fill: none;
|
|
139
|
+
stroke-width: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.icon-shape, .image-shape {
|
|
143
|
+
background-color: ${s.edgeLabelBackground};
|
|
144
|
+
p {
|
|
145
|
+
background-color: ${s.edgeLabelBackground};
|
|
146
|
+
padding: 2px;
|
|
147
|
+
}
|
|
148
|
+
.label rect {
|
|
149
|
+
opacity: 0.5;
|
|
150
|
+
background-color: ${s.edgeLabelBackground};
|
|
151
|
+
fill: ${s.edgeLabelBackground};
|
|
152
|
+
}
|
|
153
|
+
text-align: center;
|
|
154
|
+
}
|
|
155
|
+
${we()}
|
|
156
|
+
`,"getStyles"),di=mt,hi=e(({defaultLayout:s,styles:u=di}={})=>({parser:gt,get db(){return new pt},renderer:kt,styles:u,init:e((o)=>{if(!o.flowchart)o.flowchart={};let c=Gr().layout??s??o.layout;if(c)gr({layout:c});o.flowchart.arrowMarkerAbsolute=o.arrowMarkerAbsolute,gr({flowchart:{arrowMarkerAbsolute:o.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),qi=hi();
|
|
157
|
+
export{di,hi,qi};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ai}from"./index-tb1wf525.js";export{ai as createInfoServices};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e,t,k,A}from"./index-1r72hdzb.js";import"./index-6qmsnxwy.js";import{D}from"./index-tb1wf525.js";var i={parse:e(async(r)=>{let a=await D("info",r);t.debug(a)},"parse")},s={version:"11.16.1"},p=e(()=>s.version,"getVersion"),g={getVersion:p},m=e((r,a,n)=>{t.debug(`rendering info diagram
|
|
2
|
+
`+r);let o=A(a);k(o,100,400,!0),o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),v={draw:m},y={parser:i,db:g,renderer:v};export{y as diagram};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import{e,l,k,d,f,p,m,g,b,v,r,A,he,o}from"./index-1r72hdzb.js";import"./index-6qmsnxwy.js";var dt=function(){var t=e(function(H,i,n,s){for(n=n||{},s=H.length;s--;n[H[s]]=i);return n},"o"),x=[1,4],h=[1,14],c=[1,12],u=[1,13],S=[6,7,8],I=[1,20],_=[1,18],P=[1,19],w=[6,7,11],M=[1,6,13,14],T=[1,23],N=[1,24],D=[1,6,7,11,13,14],Z={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(i,n,s,y,E,a,O){var B=a.length-1;switch(E){case 6:case 7:return y;case 15:y.addNode(a[B-1].length,a[B].trim());break;case 16:y.addNode(0,a[B].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:x},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:x},{6:h,7:[1,10],9:9,12:11,13:c,14:u},t(S,[2,3]),{1:[2,2]},t(S,[2,4]),t(S,[2,5]),{1:[2,6],6:h,12:15,13:c,14:u},{6:h,9:16,12:11,13:c,14:u},{6:I,7:_,10:17,11:P},t(w,[2,18],{14:[1,21]}),t(w,[2,16]),t(w,[2,17]),{6:I,7:_,10:22,11:P},{1:[2,7],6:h,12:15,13:c,14:u},t(M,[2,14],{7:T,11:N}),t(D,[2,8]),t(D,[2,9]),t(D,[2,10]),t(w,[2,15]),t(M,[2,13],{7:T,11:N}),t(D,[2,11]),t(D,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(i,n){if(n.recoverable)this.trace(i);else{var s=Error(i);throw s.hash=n,s}},"parseError"),parse:e(function(i){var n=this,s=[0],y=[],E=[null],a=[],O=this.table,B="",F=0,C=0,W=0,j=2,Y=1,rt=a.slice.call(arguments,1),L=Object.create(this.lexer),V={yy:{}};for(var q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,q))V.yy[q]=this.yy[q];if(L.setInput(i,V.yy),V.yy.lexer=L,V.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var Q=L.yylloc;a.push(Q);var lt=L.options&&L.options.ranges;if(typeof V.yy.parseError==="function")this.parseError=V.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(U){s.length=s.length-2*U,E.length=E.length-U,a.length=a.length-U}e(xt,"popStack");function yt(){var U=y.pop()||L.lex()||Y;if(typeof U!=="number"){if(U instanceof Array)y=U,U=y.pop();U=n.symbols_[U]||U}return U}e(yt,"lex");var z,ot,J,G,Vt,ht,tt={},st,K,ft,nt;while(!0){if(J=s[s.length-1],this.defaultActions[J])G=this.defaultActions[J];else{if(z===null||typeof z>"u")z=yt();G=O[J]&&O[J][z]}if(typeof G>"u"||!G.length||!G[0]){var ct="";nt=[];for(st in O[J])if(this.terminals_[st]&&st>j)nt.push("'"+this.terminals_[st]+"'");if(L.showPosition)ct="Parse error on line "+(F+1)+`:
|
|
2
|
+
`+L.showPosition()+`
|
|
3
|
+
Expecting `+nt.join(", ")+", got '"+(this.terminals_[z]||z)+"'";else ct="Parse error on line "+(F+1)+": Unexpected "+(z==Y?"end of input":"'"+(this.terminals_[z]||z)+"'");this.parseError(ct,{text:L.match,token:this.terminals_[z]||z,line:L.yylineno,loc:Q,expected:nt})}if(G[0]instanceof Array&&G.length>1)throw Error("Parse Error: multiple actions possible at state: "+J+", token: "+z);switch(G[0]){case 1:if(s.push(z),E.push(L.yytext),a.push(L.yylloc),s.push(G[1]),z=null,!ot){if(C=L.yyleng,B=L.yytext,F=L.yylineno,Q=L.yylloc,W>0)W--}else z=ot,ot=null;break;case 2:if(K=this.productions_[G[1]][1],tt.$=E[E.length-K],tt._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},lt)tt._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]];if(ht=this.performAction.apply(tt,[B,C,F,V.yy,G[1],E,a].concat(rt)),typeof ht<"u")return ht;if(K)s=s.slice(0,-1*K*2),E=E.slice(0,-1*K),a=a.slice(0,-1*K);s.push(this.productions_[G[1]][0]),E.push(tt.$),a.push(tt._$),ft=O[s[s.length-2]][s[s.length-1]],s.push(ft);break;case 3:return!0}}return!0},"parse")},X=function(){var H={EOF:1,parseError:e(function(n,s){if(this.yy.parser)this.yy.parser.parseError(n,s);else throw Error(n)},"parseError"),setInput:e(function(i,n){if(this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);if(n)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),i},"input"),unput:e(function(i){var n=i.length,s=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1)this.yylineno-=s.length-1;var E=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===y.length?this.yylloc.first_column:0)+y[y.length-s.length].length-s[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[E[0],E[0]+this.yyleng-n];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(i){this.unput(this.match.slice(i))},"less"),pastInput:e(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var i=this.match;if(i.length<20)i+=this._input.substr(0,20-i.length);return(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var i=this.pastInput(),n=Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
+
`+n+"^"},"showPosition"),test_match:e(function(i,n){var s,y,E;if(this.options.backtrack_lexer){if(E={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)E.yylloc.range=this.yylloc.range.slice(0)}if(y=i[0].match(/(?:\r\n?|\n).*/g),y)this.yylineno+=y.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],s=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(s)return s;else if(this._backtrack){for(var a in E)this[a]=E[a];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var i,n,s,y;if(!this._more)this.yytext="",this.match="";var E=this._currentRules();for(var a=0;a<E.length;a++)if(s=this._input.match(this.rules[E[a]]),s&&(!n||s[0].length>n[0].length)){if(n=s,y=a,this.options.backtrack_lexer)if(i=this.test_match(s,E[a]),i!==!1)return i;else if(this._backtrack){n=!1;continue}else return!1;else if(!this.options.flex)break}if(n){if(i=this.test_match(n,E[y]),i!==!1)return i;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:e(function(n){this.conditionStack.push(n)},"begin"),popState:e(function(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:e(function(n){this.begin(n)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(n,s,y,E){var a=E;switch(y){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return H}();Z.lexer=X;function R(){this.yy={}}return e(R,"Parser"),R.prototype=Z,Z.Parser=R,new R}();dt.parser=dt;var vt=dt,St=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{e(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,d()}getRoot(){return this.root}addNode(t,x){let h=l.sanitizeText(x,r());if(!this.root){this.root={text:h,children:[]},this.stack=[{level:0,node:this.root}],b(h);return}this.baseLevel??=t;let c=t-this.baseLevel+1;if(c<=0)c=1;while(this.stack.length>1&&this.stack[this.stack.length-1].level>=c)this.stack.pop();let u=this.stack[this.stack.length-1].node,S={text:h,children:[]};u.children.push(S),this.stack.push({level:c,node:S})}getAccTitle(){return p()}setAccTitle(t){f(t)}getAccDescription(){return g()}setAccDescription(t){m(t)}getDiagramTitle(){return v()}setDiagramTitle(t){b(t)}},Et=14,et=250,$t=30,At=60,It=5,bt=82*Math.PI/180,pt=Math.cos(bt),gt=Math.sin(bt),kt=e((t,x,h)=>{let c=t.node().getBBox(),u=c.width+x*2,S=c.height+x*2;k(t,S,u,h),t.attr("viewBox",`${c.x-x} ${c.y-x} ${u} ${S}`)},"applyPaddedViewBox"),Lt=e((t,x,h,c)=>{let S=c.db.getRoot();if(!S)return;let I=r(),{look:_,handDrawnSeed:P,themeVariables:w}=I,M=he(I.fontSize)[0]??Et,T=_==="handDrawn",N=S.children??[],D=I.ishikawa?.diagramPadding??20,Z=I.ishikawa?.useMaxWidth??!1,X=A(x),R=X.append("g").attr("class","ishikawa"),H=T?o.svg(X.node()):void 0,i=H?{roughSvg:H,seed:P??0,lineColor:w?.lineColor??"#333",fillColor:w?.mainBkg??"#fff"}:void 0,n=`ishikawa-arrow-${x}`;if(!T)R.append("defs").append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let s=0,y=et,E=T?void 0:it(R,s,y,s,y,"ishikawa-spine");if(Tt(R,s,y,S.text,M,i),!N.length){if(T)it(R,s,y,s,y,"ishikawa-spine",i);kt(X,D,Z);return}s-=20;let a=N.filter((L,V)=>V%2===0),O=N.filter((L,V)=>V%2===1),B=mt(a),F=mt(O),C=B.total+F.total,W=et,j=et;if(C>0){let L=et*2,V=et*0.3;W=Math.max(V,L*(B.total/C)),j=Math.max(V,L*(F.total/C))}let Y=M*2;if(W=Math.max(W,B.max*Y),j=Math.max(j,F.max*Y),y=Math.max(W,et),E)E.attr("y1",y).attr("y2",y);R.select(".ishikawa-head-group").attr("transform",`translate(0,${y})`);let rt=Math.ceil(N.length/2);for(let L=0;L<rt;L++){let V=R.append("g").attr("class","ishikawa-pair");for(let[q,Q,lt]of[[N[L*2],-1,W],[N[L*2+1],1,j]])if(q)Bt(V,q,s,y,Q,lt,M,i);s=V.selectAll("text").nodes().reduce((q,Q)=>Math.min(q,Q.getBBox().x),1/0)}if(T)it(R,s,y,0,y,"ishikawa-spine",i);else{E.attr("x1",s);let L=`url(#${n})`;R.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",L)}kt(X,D,Z)},"draw"),mt=e((t)=>{let x=e((h)=>h.children.reduce((c,u)=>c+1+x(u),0),"countDescendants");return t.reduce((h,c)=>{let u=x(c);return h.total+=u,h.max=Math.max(h.max,u),h},{total:0,max:0})},"sideStats"),Tt=e((t,x,h,c,u,S)=>{let I=Math.max(6,Math.floor(110/(u*0.6))),_=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${x},${h})`),P=at(_,_t(c,I),0,0,"ishikawa-head-label","start",u),w=P.node().getBBox(),M=Math.max(60,w.width+6),T=Math.max(40,w.height*2+40),N=`M 0 ${-T/2} L 0 ${T/2} Q ${M*2.4} 0 0 ${-T/2} Z`;if(S){let D=S.roughSvg.path(N,{roughness:1.5,seed:S.seed,fill:S.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:S.lineColor,strokeWidth:2});_.insert(()=>D,":first-child").attr("class","ishikawa-head")}else _.insert("path",":first-child").attr("class","ishikawa-head").attr("d",N);P.attr("transform",`translate(${(M-w.width)/2-w.x+3},${-w.y-w.height/2})`)},"drawHead"),Mt=e((t,x)=>{let h=[],c=[],u=e((S,I,_)=>{let P=x===-1?[...S].reverse():S;for(let w of P){let M=h.length,T=w.children??[];if(h.push({depth:_,text:_t(w.text,15),parentIndex:I,childCount:T.length}),_%2===0){if(c.push(M),T.length)u(T,M,_+1)}else{if(T.length)u(T,M,_+1);c.push(M)}}},"walk");return u(t,-1,2),{entries:h,yOrder:c}},"flattenTree"),Pt=e((t,x,h,c,u,S,I)=>{let _=t.append("g").attr("class","ishikawa-label-group"),w=at(_,x,h,c+11*u,"ishikawa-label cause","middle",S).node().getBBox();if(I){let M=I.roughSvg.rectangle(w.x-20,w.y-2,w.width+40,w.height+4,{roughness:1.5,seed:I.seed,fill:I.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:I.lineColor,strokeWidth:2});_.insert(()=>M,":first-child").attr("class","ishikawa-label-box")}else _.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",w.x-20).attr("y",w.y-2).attr("width",w.width+40).attr("height",w.height+4)},"drawCauseLabel"),ut=e((t,x,h,c,u,S)=>{let I=Math.sqrt(c*c+u*u);if(I===0)return;let _=c/I,P=u/I,w=6,M=-P*w,T=_*w,N=x,D=h,Z=`M ${N} ${D} L ${N-_*w*2+M} ${D-P*w*2+T} L ${N-_*w*2-M} ${D-P*w*2-T} Z`,X=S.roughSvg.path(Z,{roughness:1,seed:S.seed,fill:S.lineColor,fillStyle:"solid",stroke:S.lineColor,strokeWidth:1});t.append(()=>X)},"drawArrowMarker"),Bt=e((t,x,h,c,u,S,I,_)=>{let P=x.children??[],w=S*(P.length?1:0.2),M=-pt*w,T=gt*w*u,N=h+M,D=c+T;if(it(t,h,c,N,D,"ishikawa-branch",_),_)ut(t,h,c,h-N,c-D,_);if(Pt(t,x.text,N,D,u,I,_),!P.length)return;let{entries:Z,yOrder:X}=Mt(P,u),R=Z.length,H=Array(R);for(let[E,a]of X.entries())H[a]=c+T*((E+1)/(R+1));let i=new Map;i.set(-1,{x0:h,y0:c,x1:N,y1:D,childCount:P.length,childrenDrawn:0});let n=-pt,s=gt*u,y=u<0?"ishikawa-label up":"ishikawa-label down";for(let[E,a]of Z.entries()){let O=H[E],B=i.get(a.parentIndex),F=t.append("g").attr("class","ishikawa-sub-group"),C=0,W=0,j=0;if(a.depth%2===0){let Y=B.y1-B.y0;if(C=wt(B.x0,B.x1,Y?(O-B.y0)/Y:0.5),W=O,j=C-(a.childCount>0?At+a.childCount*It:$t),it(F,C,O,j,O,"ishikawa-sub-branch",_),_)ut(F,C,O,1,0,_);at(F,a.text,j,O,"ishikawa-label align","end",I)}else{let Y=B.childrenDrawn++;if(C=wt(B.x0,B.x1,(B.childCount-Y)/(B.childCount+1)),W=B.y0,j=C+n*((O-W)/s),it(F,C,W,j,O,"ishikawa-sub-branch",_),_)ut(F,C,W,C-j,W-O,_);at(F,a.text,j,O,y,"end",I)}if(a.childCount>0)i.set(E,{x0:C,y0:W,x1:j,y1:O,childCount:a.childCount,childrenDrawn:0})}},"drawBranch"),Nt=e((t)=>t.split(/<br\s*\/?>|\n/),"splitLines"),_t=e((t,x)=>{if(t.length<=x)return t;let h=[];for(let c of t.split(/\s+/)){let u=h.length-1;if(u>=0&&h[u].length+1+c.length<=x)h[u]+=" "+c;else h.push(c)}return h.join(`
|
|
7
|
+
`)},"wrapText"),at=e((t,x,h,c,u,S,I)=>{let _=Nt(x),P=I*1.05,w=t.append("text").attr("class",u).attr("text-anchor",S).attr("x",h).attr("y",c-(_.length-1)*P/2);for(let[M,T]of _.entries())w.append("tspan").attr("x",h).attr("dy",M===0?0:P).text(T);return w},"drawMultilineText"),wt=e((t,x,h)=>t+(x-t)*h,"lerp"),it=e((t,x,h,c,u,S,I)=>{if(I){let _=I.roughSvg.line(x,h,c,u,{roughness:1.5,seed:I.seed,stroke:I.lineColor,strokeWidth:2});t.append(()=>_).attr("class",S);return}return t.append("line").attr("class",S).attr("x1",x).attr("y1",h).attr("x2",c).attr("y2",u)},"drawLine"),Dt={draw:Lt},Ot=e((t)=>`
|
|
8
|
+
.ishikawa .ishikawa-spine,
|
|
9
|
+
.ishikawa .ishikawa-branch,
|
|
10
|
+
.ishikawa .ishikawa-sub-branch {
|
|
11
|
+
stroke: ${t.lineColor};
|
|
12
|
+
stroke-width: 2;
|
|
13
|
+
fill: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ishikawa .ishikawa-sub-branch {
|
|
17
|
+
stroke-width: 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ishikawa .ishikawa-arrow {
|
|
21
|
+
fill: ${t.lineColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ishikawa .ishikawa-head {
|
|
25
|
+
fill: ${t.mainBkg};
|
|
26
|
+
stroke: ${t.lineColor};
|
|
27
|
+
stroke-width: 2;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ishikawa .ishikawa-label-box {
|
|
31
|
+
fill: ${t.mainBkg};
|
|
32
|
+
stroke: ${t.lineColor};
|
|
33
|
+
stroke-width: 2;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ishikawa text {
|
|
37
|
+
font-family: ${t.fontFamily};
|
|
38
|
+
font-size: ${t.fontSize};
|
|
39
|
+
fill: ${t.textColor};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ishikawa .ishikawa-head-label {
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
text-anchor: middle;
|
|
45
|
+
dominant-baseline: middle;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ishikawa .ishikawa-label {
|
|
50
|
+
text-anchor: end;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ishikawa .ishikawa-label.cause {
|
|
54
|
+
text-anchor: middle;
|
|
55
|
+
dominant-baseline: middle;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ishikawa .ishikawa-label.align {
|
|
59
|
+
text-anchor: end;
|
|
60
|
+
dominant-baseline: middle;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ishikawa .ishikawa-label.up {
|
|
64
|
+
dominant-baseline: baseline;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ishikawa .ishikawa-label.down {
|
|
68
|
+
dominant-baseline: hanging;
|
|
69
|
+
}
|
|
70
|
+
`,"getStyles"),Ct=Ot,Gt={parser:vt,get db(){return new St},renderer:Dt,styles:Ct};export{Gt as diagram};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import{e,k,d,f,p,m,g,b,v,r,n}from"./index-1r72hdzb.js";import"./index-6qmsnxwy.js";import{dt,Br,Mi,ne}from"./index-qj8fxwsf.js";import{De}from"./index-rh7nv68n.js";import{we}from"./index-nprm96xp.js";var nt=function(){var t=e(function(y,a,l,c){for(l=l||{},c=y.length;c--;l[y[c]]=a);return l},"o"),i=[6,8,10,11,12,14,16,17,18],o=[1,9],T=[1,10],s=[1,11],x=[1,12],S=[1,13],h=[1,14],M={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(a,l,c,_,w,u,A){var P=u.length-1;switch(w){case 1:return u[P-1];case 2:this.$=[];break;case 3:u[P-1].push(u[P]),this.$=u[P-1];break;case 4:case 5:this.$=u[P];break;case 6:case 7:this.$=[];break;case 8:_.setDiagramTitle(u[P].substr(6)),this.$=u[P].substr(6);break;case 9:this.$=u[P].trim(),_.setAccTitle(this.$);break;case 10:case 11:this.$=u[P].trim(),_.setAccDescription(this.$);break;case 12:_.addSection(u[P].substr(8)),this.$=u[P].substr(8);break;case 13:_.addTask(u[P-1],u[P]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:o,12:T,14:s,16:x,17:S,18:h},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:15,11:o,12:T,14:s,16:x,17:S,18:h},t(i,[2,5]),t(i,[2,6]),t(i,[2,8]),{13:[1,16]},{15:[1,17]},t(i,[2,11]),t(i,[2,12]),{19:[1,18]},t(i,[2,4]),t(i,[2,9]),t(i,[2,10]),t(i,[2,13])],defaultActions:{},parseError:e(function(a,l){if(l.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=l,c}},"parseError"),parse:e(function(a){var l=this,c=[0],_=[],w=[null],u=[],A=this.table,P="",z=0,ot=0,ct=0,vt=2,ht=1,wt=u.slice.call(arguments,1),I=Object.create(this.lexer),O={yy:{}};for(var Q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Q))O.yy[Q]=this.yy[Q];if(I.setInput(a,O.yy),O.yy.lexer=I,O.yy.parser=this,typeof I.yylloc>"u")I.yylloc={};var D=I.yylloc;u.push(D);var Tt=I.options&&I.options.ranges;if(typeof O.yy.parseError==="function")this.parseError=O.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function St(R){c.length=c.length-2*R,w.length=w.length-R,u.length=u.length-R}e(St,"popStack");function ut(){var R=_.pop()||I.lex()||ht;if(typeof R!=="number"){if(R instanceof Array)_=R,R=_.pop();R=l.symbols_[R]||R}return R}e(ut,"lex");var F,tt,Y,V,Gt,et,q={},Z,j,yt,J;while(!0){if(Y=c[c.length-1],this.defaultActions[Y])V=this.defaultActions[Y];else{if(F===null||typeof F>"u")F=ut();V=A[Y]&&A[Y][F]}if(typeof V>"u"||!V.length||!V[0]){var rt="";J=[];for(Z in A[Y])if(this.terminals_[Z]&&Z>vt)J.push("'"+this.terminals_[Z]+"'");if(I.showPosition)rt="Parse error on line "+(z+1)+`:
|
|
2
|
+
`+I.showPosition()+`
|
|
3
|
+
Expecting `+J.join(", ")+", got '"+(this.terminals_[F]||F)+"'";else rt="Parse error on line "+(z+1)+": Unexpected "+(F==ht?"end of input":"'"+(this.terminals_[F]||F)+"'");this.parseError(rt,{text:I.match,token:this.terminals_[F]||F,line:I.yylineno,loc:D,expected:J})}if(V[0]instanceof Array&&V.length>1)throw Error("Parse Error: multiple actions possible at state: "+Y+", token: "+F);switch(V[0]){case 1:if(c.push(F),w.push(I.yytext),u.push(I.yylloc),c.push(V[1]),F=null,!tt){if(ot=I.yyleng,P=I.yytext,z=I.yylineno,D=I.yylloc,ct>0)ct--}else F=tt,tt=null;break;case 2:if(j=this.productions_[V[1]][1],q.$=w[w.length-j],q._$={first_line:u[u.length-(j||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(j||1)].first_column,last_column:u[u.length-1].last_column},Tt)q._$.range=[u[u.length-(j||1)].range[0],u[u.length-1].range[1]];if(et=this.performAction.apply(q,[P,ot,z,O.yy,V[1],w,u].concat(wt)),typeof et<"u")return et;if(j)c=c.slice(0,-1*j*2),w=w.slice(0,-1*j),u=u.slice(0,-1*j);c.push(this.productions_[V[1]][0]),w.push(q.$),u.push(q._$),yt=A[c[c.length-2]][c[c.length-1]],c.push(yt);break;case 3:return!0}}return!0},"parse")},E=function(){var y={EOF:1,parseError:e(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw Error(l)},"parseError"),setInput:e(function(a,l){if(this.yy=l||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var l=a.match(/(?:\r\n?|\n).*/g);if(l)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),a},"input"),unput:e(function(a){var l=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var _=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1)this.yylineno-=c.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===_.length?this.yylloc.first_column:0)+_[_.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-l];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(a){this.unput(this.match.slice(a))},"less"),pastInput:e(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var a=this.match;if(a.length<20)a+=this._input.substr(0,20-a.length);return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var a=this.pastInput(),l=Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
5
|
+
`+l+"^"},"showPosition"),test_match:e(function(a,l){var c,_,w;if(this.options.backtrack_lexer){if(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)w.yylloc.range=this.yylloc.range.slice(0)}if(_=a[0].match(/(?:\r\n?|\n).*/g),_)this.yylineno+=_.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(c)return c;else if(this._backtrack){for(var u in w)this[u]=w[u];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var a,l,c,_;if(!this._more)this.yytext="",this.match="";var w=this._currentRules();for(var u=0;u<w.length;u++)if(c=this._input.match(this.rules[w[u]]),c&&(!l||c[0].length>l[0].length)){if(l=c,_=u,this.options.backtrack_lexer)if(a=this.test_match(c,w[u]),a!==!1)return a;else if(this._backtrack){l=!1;continue}else return!1;else if(!this.options.flex)break}if(l){if(a=this.test_match(l,w[_]),a!==!1)return a;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var l=this.next();if(l)return l;else return this.lex()},"lex"),begin:e(function(l){this.conditionStack.push(l)},"begin"),popState:e(function(){var l=this.conditionStack.length-1;if(l>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(l){if(l=this.conditionStack.length-1-Math.abs(l||0),l>=0)return this.conditionStack[l];else return"INITIAL"},"topState"),pushState:e(function(l){this.begin(l)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(l,c,_,w){var u=w;switch(_){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return y}();M.lexer=E;function C(){this.yy={}}return e(C,"Parser"),C.prototype=M,M.Parser=C,new C}();nt.parser=nt;var $t=nt,X="",at=[],G=[],H=[],Mt=e(function(){at.length=0,G.length=0,X="",H.length=0,d()},"clear"),Et=e(function(t){X=t,at.push(t)},"addSection"),Ct=e(function(){return at},"getSections"),Pt=e(function(){let t=ft(),i=100,o=0;while(!t&&o<i)t=ft(),o++;return G.push(...H),G},"getTasks"),It=e(function(){let t=[];return G.forEach((o)=>{if(o.people)t.push(...o.people)}),[...new Set(t)].sort()},"updateActors"),At=e(function(t,i){let o=i.substr(1).split(":"),T=0,s=[];if(o.length===1)T=Number(o[0]),s=[];else T=Number(o[0]),s=o[1].split(",");let x=s.map((h)=>h.trim()),S={section:X,type:X,people:x,task:t,score:T};H.push(S)},"addTask"),Ft=e(function(t){let i={section:X,type:X,description:t,task:t,classes:[]};G.push(i)},"addTaskOrg"),ft=e(function(){let t=e(function(o){return H[o].processed},"compileTask"),i=!0;for(let[o,T]of H.entries())t(o),i=i&&T.processed;return i},"compileTasks"),Vt=e(function(){return It()},"getActors"),pt={getConfig:e(()=>r().journey,"getConfig"),clear:Mt,setDiagramTitle:b,getDiagramTitle:v,setAccTitle:f,getAccTitle:p,setAccDescription:m,getAccDescription:g,addSection:Et,getSections:Ct,getTasks:Pt,addTask:At,addTaskOrg:Ft,getActors:Vt},Rt=e((t)=>`.label {
|
|
7
|
+
font-family: ${t.fontFamily};
|
|
8
|
+
color: ${t.textColor};
|
|
9
|
+
}
|
|
10
|
+
.mouth {
|
|
11
|
+
stroke: #666;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
line {
|
|
15
|
+
stroke: ${t.textColor}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.legend {
|
|
19
|
+
fill: ${t.textColor};
|
|
20
|
+
font-family: ${t.fontFamily};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.label text {
|
|
24
|
+
fill: #333;
|
|
25
|
+
}
|
|
26
|
+
.label {
|
|
27
|
+
color: ${t.textColor}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.face {
|
|
31
|
+
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
|
|
32
|
+
stroke: #999;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.node rect,
|
|
36
|
+
.node circle,
|
|
37
|
+
.node ellipse,
|
|
38
|
+
.node polygon,
|
|
39
|
+
.node path {
|
|
40
|
+
fill: ${t.mainBkg};
|
|
41
|
+
stroke: ${t.nodeBorder};
|
|
42
|
+
stroke-width: 1px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.node .label {
|
|
46
|
+
text-align: center;
|
|
47
|
+
}
|
|
48
|
+
.node.clickable {
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.arrowheadPath {
|
|
53
|
+
fill: ${t.arrowheadColor};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.edgePath .path {
|
|
57
|
+
stroke: ${t.lineColor};
|
|
58
|
+
stroke-width: 1.5px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.flowchart-link {
|
|
62
|
+
stroke: ${t.lineColor};
|
|
63
|
+
fill: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.edgeLabel {
|
|
67
|
+
background-color: ${t.edgeLabelBackground};
|
|
68
|
+
rect {
|
|
69
|
+
opacity: 0.5;
|
|
70
|
+
}
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.cluster rect {
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.cluster text {
|
|
78
|
+
fill: ${t.titleColor};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
div.mermaidTooltip {
|
|
82
|
+
position: absolute;
|
|
83
|
+
text-align: center;
|
|
84
|
+
max-width: 200px;
|
|
85
|
+
padding: 2px;
|
|
86
|
+
font-family: ${t.fontFamily};
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
background: ${t.tertiaryColor};
|
|
89
|
+
border: 1px solid ${t.border2};
|
|
90
|
+
border-radius: 2px;
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
z-index: 100;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.task-type-0, .section-type-0 {
|
|
96
|
+
${t.fillType0?`fill: ${t.fillType0}`:""};
|
|
97
|
+
}
|
|
98
|
+
.task-type-1, .section-type-1 {
|
|
99
|
+
${t.fillType0?`fill: ${t.fillType1}`:""};
|
|
100
|
+
}
|
|
101
|
+
.task-type-2, .section-type-2 {
|
|
102
|
+
${t.fillType0?`fill: ${t.fillType2}`:""};
|
|
103
|
+
}
|
|
104
|
+
.task-type-3, .section-type-3 {
|
|
105
|
+
${t.fillType0?`fill: ${t.fillType3}`:""};
|
|
106
|
+
}
|
|
107
|
+
.task-type-4, .section-type-4 {
|
|
108
|
+
${t.fillType0?`fill: ${t.fillType4}`:""};
|
|
109
|
+
}
|
|
110
|
+
.task-type-5, .section-type-5 {
|
|
111
|
+
${t.fillType0?`fill: ${t.fillType5}`:""};
|
|
112
|
+
}
|
|
113
|
+
.task-type-6, .section-type-6 {
|
|
114
|
+
${t.fillType0?`fill: ${t.fillType6}`:""};
|
|
115
|
+
}
|
|
116
|
+
.task-type-7, .section-type-7 {
|
|
117
|
+
${t.fillType0?`fill: ${t.fillType7}`:""};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.actor-0 {
|
|
121
|
+
${t.actor0?`fill: ${t.actor0}`:""};
|
|
122
|
+
}
|
|
123
|
+
.actor-1 {
|
|
124
|
+
${t.actor1?`fill: ${t.actor1}`:""};
|
|
125
|
+
}
|
|
126
|
+
.actor-2 {
|
|
127
|
+
${t.actor2?`fill: ${t.actor2}`:""};
|
|
128
|
+
}
|
|
129
|
+
.actor-3 {
|
|
130
|
+
${t.actor3?`fill: ${t.actor3}`:""};
|
|
131
|
+
}
|
|
132
|
+
.actor-4 {
|
|
133
|
+
${t.actor4?`fill: ${t.actor4}`:""};
|
|
134
|
+
}
|
|
135
|
+
.actor-5 {
|
|
136
|
+
${t.actor5?`fill: ${t.actor5}`:""};
|
|
137
|
+
}
|
|
138
|
+
${we()}
|
|
139
|
+
`,"getStyles"),Lt=Rt,lt=e(function(t,i){return dt(t,i)},"drawRect"),Bt=e(function(t,i){let T=t.append("circle").attr("cx",i.cx).attr("cy",i.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");s.append("circle").attr("cx",i.cx-5).attr("cy",i.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",i.cx+5).attr("cy",i.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function x(M){let E=De().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);M.append("path").attr("class","mouth").attr("d",E).attr("transform","translate("+i.cx+","+(i.cy+2)+")")}e(x,"smile");function S(M){let E=De().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);M.append("path").attr("class","mouth").attr("d",E).attr("transform","translate("+i.cx+","+(i.cy+7)+")")}e(S,"sad");function h(M){M.append("line").attr("class","mouth").attr("stroke",2).attr("x1",i.cx-5).attr("y1",i.cy+7).attr("x2",i.cx+5).attr("y2",i.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}if(e(h,"ambivalent"),i.score>3)x(s);else if(i.score<3)S(s);else h(s);return T},"drawFace"),xt=e(function(t,i){let o=t.append("circle");if(o.attr("cx",i.cx),o.attr("cy",i.cy),o.attr("class","actor-"+i.pos),o.attr("fill",i.fill),o.attr("stroke",i.stroke),o.attr("r",i.r),o.class!==void 0)o.attr("class",o.class);if(i.title!==void 0)o.append("title").text(i.title);return o},"drawCircle"),kt=e(function(t,i){return Mi(t,i)},"drawText"),jt=e(function(t,i){function o(s,x,S,h,M){return s+","+x+" "+(s+S)+","+x+" "+(s+S)+","+(x+h-M)+" "+(s+S-M*1.2)+","+(x+h)+" "+s+","+(x+h)}e(o,"genPoints");let T=t.append("polygon");T.attr("points",o(i.x,i.y,50,20,7)),T.attr("class","labelBox"),i.y=i.y+i.labelMargin,i.x=i.x+0.5*i.labelMargin,kt(t,i)},"drawLabel"),Nt=e(function(t,i,o){let T=t.append("g"),s=ne();s.x=i.x,s.y=i.y,s.fill=i.fill,s.width=o.width*i.taskCount+o.diagramMarginX*(i.taskCount-1),s.height=o.height,s.class="journey-section section-type-"+i.num,s.rx=3,s.ry=3,lt(T,s),bt(o)(i.text,T,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+i.num},o,i.colour)},"drawSection"),st=-1,zt=e(function(t,i,o,T){let s=i.x+o.width/2,x=t.append("g");st++;let S=450;x.append("line").attr("id",T+"-task"+st).attr("x1",s).attr("y1",i.y).attr("x2",s).attr("y2",S).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Bt(x,{cx:s,cy:300+(5-i.score)*30,score:i.score});let h=ne();h.x=i.x,h.y=i.y,h.fill=i.fill,h.width=o.width,h.height=o.height,h.class="task task-type-"+i.num,h.rx=3,h.ry=3,lt(x,h);let M=i.x+14;i.people.forEach((E)=>{let C=i.actors[E].color,y={cx:M,cy:i.y,r:7,fill:C,stroke:"#000",title:E,pos:i.actors[E].position};xt(x,y),M+=10}),bt(o)(i.task,x,h.x,h.y,h.width,h.height,{class:"task"},o,i.colour)},"drawTask"),Wt=e(function(t,i){Br(t,i)},"drawBackgroundRect"),bt=function(){function t(s,x,S,h,M,E,C,y){let a=x.append("text").attr("x",S+M/2).attr("y",h+E/2+5).style("font-color",y).style("text-anchor","middle").text(s);T(a,C)}e(t,"byText");function i(s,x,S,h,M,E,C,y,a){let{taskFontSize:l,taskFontFamily:c}=y,_=s.split(/<br\s*\/?>/gi);for(let w=0;w<_.length;w++){let u=w*l-l*(_.length-1)/2,A=x.append("text").attr("x",S+M/2).attr("y",h).attr("fill",a).style("text-anchor","middle").style("font-size",l).style("font-family",c);A.append("tspan").attr("x",S+M/2).attr("dy",u).text(_[w]),A.attr("y",h+E/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),T(A,C)}}e(i,"byTspan");function o(s,x,S,h,M,E,C,y){let a=x.append("switch"),c=a.append("foreignObject").attr("x",S).attr("y",h).attr("width",M).attr("height",E).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");c.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),i(s,a,S,h,M,E,C,y),T(c,C)}e(o,"byFo");function T(s,x){for(let S in x)if(S in x)s.attr(S,x[S])}return e(T,"_setTextAttrs"),function(s){return s.textPlacement==="fo"?o:s.textPlacement==="old"?t:i}}(),Ot=e(function(t,i){st=-1,t.append("defs").append("marker").attr("id",i+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),U={drawRect:lt,drawCircle:xt,drawSection:Nt,drawText:kt,drawLabel:jt,drawTask:zt,drawBackgroundRect:Wt,initGraphics:Ot},Yt=e(function(t){Object.keys(t).forEach(function(o){B[o]=t[o]})},"setConf"),N={},K=0;function _t(t){let i=r().journey,o=i.maxLabelWidth;K=0;let T=60;Object.keys(N).forEach((s)=>{let x=N[s].color,S={cx:20,cy:T,r:7,fill:x,stroke:"#000",pos:N[s].position};U.drawCircle(t,S);let h=t.append("text").attr("visibility","hidden").text(s),M=h.node().getBoundingClientRect().width;h.remove();let E=[];if(M<=o)E=[s];else{let C=s.split(" "),y="";if(h=t.append("text").attr("visibility","hidden"),C.forEach((a)=>{let l=y?`${y} ${a}`:a;if(h.text(l),h.node().getBoundingClientRect().width>o){if(y)E.push(y);if(y=a,h.text(a),h.node().getBoundingClientRect().width>o){let _="";for(let w of a)if(_+=w,h.text(_+"-"),h.node().getBoundingClientRect().width>o)E.push(_.slice(0,-1)+"-"),_=w;y=_}}else y=l}),y)E.push(y);h.remove()}E.forEach((C,y)=>{let a={x:40,y:T+7+y*20,fill:"#666",text:C,textMargin:i.boxTextMargin??5},c=U.drawText(t,a).node().getBoundingClientRect().width;if(c>K&&c>i.leftMargin-c)K=c}),T+=Math.max(20,E.length*20)})}e(_t,"drawActorLegend");var B=r().journey,W=0,qt=e(function(t,i,o,T){let s=r(),x=s.journey.titleColor,S=s.journey.titleFontSize,h=s.journey.titleFontFamily,M=s.securityLevel,E;if(M==="sandbox")E=n("#i"+i);let C=M==="sandbox"?n(E.nodes()[0].contentDocument.body):n("body");L.init();let y=C.select("#"+i);U.initGraphics(y,i);let a=T.db.getTasks(),l=T.db.getDiagramTitle(),c=T.db.getActors();for(let z in N)delete N[z];let _=0;c.forEach((z)=>{N[z]={color:B.actorColours[_%B.actorColours.length],position:_},_++}),_t(y),W=B.leftMargin+K,L.insert(0,0,W,Object.keys(N).length*50),Xt(y,a,0,i);let w=L.getBounds();if(l)y.append("text").text(l).attr("x",W).attr("font-size",S).attr("font-weight","bold").attr("y",25).attr("fill",x).attr("font-family",h);let u=w.stopy-w.starty+2*B.diagramMarginY,A=W+w.stopx+2*B.diagramMarginX;k(y,u,A,B.useMaxWidth),y.append("line").attr("x1",W).attr("y1",B.height*4).attr("x2",A-W-4).attr("y2",B.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+i+"-arrowhead)");let P=l?70:0;y.attr("viewBox",`${w.startx} -25 ${A} ${u+P}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",u+P+25)},"draw"),L={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:e(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:e(function(t,i,o,T){if(t[i]===void 0)t[i]=o;else t[i]=T(o,t[i])},"updateVal"),updateBounds:e(function(t,i,o,T){let s=r().journey,x=this,S=0;function h(M){return e(function(C){S++;let y=x.sequenceItems.length-S+1;if(x.updateVal(C,"starty",i-y*s.boxMargin,Math.min),x.updateVal(C,"stopy",T+y*s.boxMargin,Math.max),x.updateVal(L.data,"startx",t-y*s.boxMargin,Math.min),x.updateVal(L.data,"stopx",o+y*s.boxMargin,Math.max),M!=="activation")x.updateVal(C,"startx",t-y*s.boxMargin,Math.min),x.updateVal(C,"stopx",o+y*s.boxMargin,Math.max),x.updateVal(L.data,"starty",i-y*s.boxMargin,Math.min),x.updateVal(L.data,"stopy",T+y*s.boxMargin,Math.max)},"updateItemBounds")}e(h,"updateFn"),this.sequenceItems.forEach(h())},"updateBounds"),insert:e(function(t,i,o,T){let s=Math.min(t,o),x=Math.max(t,o),S=Math.min(i,T),h=Math.max(i,T);this.updateVal(L.data,"startx",s,Math.min),this.updateVal(L.data,"starty",S,Math.min),this.updateVal(L.data,"stopx",x,Math.max),this.updateVal(L.data,"stopy",h,Math.max),this.updateBounds(s,S,x,h)},"insert"),bumpVerticalPos:e(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:e(function(){return this.verticalPos},"getVerticalPos"),getBounds:e(function(){return this.data},"getBounds")},{sectionFills:it,sectionColours:gt}=B,Xt=e(function(t,i,o,T){let s=r().journey,x="",S=s.height*2+s.diagramMarginY,h=o+S,M=0,E="#CCC",C="black",y=0;for(let[a,l]of i.entries()){if(x!==l.section){E=it[M%it.length],y=M%it.length,C=gt[M%gt.length];let _=0,w=l.section;for(let A=a;A<i.length;A++)if(i[A].section==w)_=_+1;else break;let u={x:a*s.taskMargin+a*s.width+W,y:50,text:l.section,fill:E,num:y,colour:C,taskCount:_};U.drawSection(t,u,s),x=l.section,M++}let c=l.people.reduce((_,w)=>{if(N[w])_[w]=N[w];return _},{});l.x=a*s.taskMargin+a*s.width+W,l.y=h,l.width=s.diagramMarginX,l.height=s.diagramMarginY,l.colour=C,l.fill=E,l.num=y,l.actors=c,U.drawTask(t,l,s,T),L.insert(l.x,l.y,l.x+l.width+s.taskMargin,450)}},"drawTasks"),mt={setConf:Yt,draw:qt},te={parser:$t,db:pt,renderer:mt,styles:Lt,init:e((t)=>{mt.setConf(t.journey),pt.clear()},"init")};export{te as diagram};
|