mermaid
Version:
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
214 lines • 66.6 kB
JavaScript
import{a as b1}from"./chunk-FM3EP27M.mjs";import{a as y1}from"./chunk-A3LLD7C6.mjs";import{a as k1}from"./chunk-CG7VIXT6.mjs";import{a as D1}from"./chunk-DLH2IEIQ.mjs";import{a as p1,b as f1}from"./chunk-IJTDMCXQ.mjs";import{b as m1,c as A1}from"./chunk-N6HA57SN.mjs";import{h as u1}from"./chunk-3UAVOGSN.mjs";import{a as g1,b as Je}from"./chunk-MTL3NAOM.mjs";import{i as d1}from"./chunk-CBDDXUFN.mjs";import{b as o1,c as l1,d as c1,f as h1}from"./chunk-PNVTB6QF.mjs";import{q as Oe,t as Qe}from"./chunk-3A3SYRXV.mjs";import{$ as s1,D as Qt,L as Jt,X as Zt,Y as $t,Z as e1,_ as t1,aa as i1,b as Ht,ba as r1,c as qt,da as $,ea as n1,fa as a1,n as Xt}from"./chunk-OI4SXON4.mjs";import{b as H,h as Xe}from"./chunk-NXZFCOWJ.mjs";import{a as k}from"./chunk-V3YWWTDH.mjs";var v1="flowchart-",S1=["row","column","horizontalAlign","verticalAlign"],I1=new Set(["shape","label","icon","form","pos","img","w","h","constraint","priority","assigned","ticket","labelType","view",...S1]);function C1(s,i=!1){if(!s)return;let n=s,a={};for(let r of S1)Object.hasOwn(n,r)&&(a[r]=n[r]);return i&&Object.hasOwn(n,"algorithm")&&(a.algorithm=n.algorithm),Object.keys(a).length>0?a:void 0}k(C1,"pickFlowchartLayoutMetadata");var N1=["laneRole","laneIndex","drawnExtent"];function R1(s){if(!s||typeof s!="object")return s;let i={...s};for(let n of N1)Reflect.deleteProperty(i,n);return i}k(R1,"withoutInternalKeys");var Ze=class{constructor(){this.vertexCounter=0;this.config=$();this.diagramId="";this.vertices=new Map;this.edges=[];this.classes=new Map;this.subGraphs=[];this.subGraphLookup=new Map;this.droppedSubGraphMembers=[];this.tooltips=new Map;this.subCount=0;this.firstGraphFlag=!0;this.secCount=-1;this.posCrossRef=[];this.funs=[];this.setAccTitle=$t;this.setAccDescription=t1;this.setDiagramTitle=i1;this.getAccTitle=e1;this.getAccDescription=s1;this.getDiagramTitle=r1;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{k(this,"FlowDB")}sanitizeText(i){return Jt.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(let n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,a,r,u,g,l={},D){if(!i||i.trim().length===0)return;let d;if(D!==void 0){let f;D.includes(`
`)?f=D+`
`:f=`{
`+D+`
}`,d=R1(b1(f1(f,{schema:p1})))}let T=this.subGraphLookup.get(i);if(T&&d){Object.keys(d).length>0&&(T.metadata={...T.metadata,...d});return}let B=this.edges.find(f=>f.id===i);if(B){let f=d;f?.animate!==void 0&&(B.animate=f.animate),f?.animation!==void 0&&(B.animation=f.animation),f?.curve!==void 0&&(B.interpolate=f.curve),f?.step!==void 0&&(Je(f)?B.step=f.step:H.warn(`Ignoring step on edge ${i}: expected a positive integer`,f.step));return}let G,m=this.vertices.get(i);if(m===void 0&&(n===void 0&&a===void 0&&r!==void 0&&r!==null&&H.warn(`Style applied to unknown node "${i}". This may indicate a typo. The node will be created automatically.`),m={id:i,labelType:"text",domId:v1+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,m)),this.vertexCounter++,n!==void 0?(this.config=$(),G=this.sanitizeText(n.text.trim()),m.labelType=n.type,G.startsWith('"')&&G.endsWith('"')&&(G=G.substring(1,G.length-1)),m.text=G):m.text===void 0&&(m.text=i),a!==void 0&&(m.type=a),r?.forEach(f=>{m.styles.push(f)}),u?.forEach(f=>{m.classes.push(f)}),g!==void 0&&(m.dir=g),m.props===void 0?m.props=l:l!==void 0&&Object.assign(m.props,l),d!==void 0){if(m.metadata={...m.metadata,...d},d.shape){if(d.shape!==d.shape.toLowerCase()||d.shape.includes("_"))throw new Error(`No such shape: ${d.shape}. Shape names should be lowercase.`);if(!d1(d.shape))throw new Error(`No such shape: ${d.shape}.`);m.type=d?.shape}d?.label&&(m.text=d?.label,m.labelType=this.sanitizeNodeLabelType(d?.labelType)),d?.icon&&(m.icon=d?.icon,!d.label?.trim()&&m.text===i&&(m.text="")),d?.form&&(m.form=d?.form),d?.pos&&(m.pos=d?.pos),d?.img&&(m.img=d?.img,!d.label?.trim()&&m.text===i&&(m.text="")),d?.constraint&&(m.constraint=d.constraint),d.w&&(m.assetWidth=Number(d.w)),d.h&&(m.assetHeight=Number(d.h))}}addSingleLink(i,n,a,r){let l={start:i,end:n,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};H.info("abc78 Got edge...",l);let D=a.text;if(D!==void 0&&(l.text=this.sanitizeText(D.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=this.sanitizeNodeLabelType(D.type)),a!==void 0&&(l.type=a.type,l.stroke=a.stroke,l.length=a.length>10?10:a.length),r&&!this.edges.some(d=>d.id===r))l.id=r,l.isUserDefinedId=!0;else{let d=this.edges.filter(T=>T.start===l.start&&T.end===l.end);d.length===0?l.id=Qe(l.start,l.end,{counter:0,prefix:"L"}):l.id=Qe(l.start,l.end,{counter:d.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))H.info("Pushing edge..."),this.edges.push(l);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
Initialize mermaid with maxEdges set to a higher number to allow more edges.
You cannot set this config via configuration inside the diagram as it is a secure config.
You have to call mermaid.initialize.`)}isLinkData(i){return i!==null&&typeof i=="object"&&"id"in i&&typeof i.id=="string"}addLink(i,n,a){let r=this.isLinkData(a)?a.id.replace("@",""):void 0;H.info("addLink",i,n,r);for(let u of i)for(let g of n){let l=u===i[i.length-1],D=g===n[0];l&&D?this.addSingleLink(u,g,a,r):this.addSingleLink(u,g,a,void 0)}}updateLinkInterpolate(i,n){i.forEach(a=>{a==="default"?this.edges.defaultInterpolate=n:this.edges[a].interpolate=n})}updateLink(i,n){i.forEach(a=>{if(typeof a=="number"&&a>=this.edges.length)throw new Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);a==="default"?this.edges.defaultStyle=n:(this.edges[a].style=n,(this.edges[a]?.style?.length??0)>0&&!this.edges[a]?.style?.some(r=>r?.startsWith("fill"))&&this.edges[a]?.style?.push("fill:none"))})}addClass(i,n){let a=n.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");i.split(",").forEach(r=>{let u=this.classes.get(r);u===void 0&&(u={id:r,styles:[],textStyles:[]},this.classes.set(r,u)),a?.forEach(g=>{if(/color/.exec(g)){let l=g.replace("fill","bgFill");u.textStyles.push(l)}u.styles.push(g)})})}setDirection(i){this.direction=i.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(i,n){for(let a of i.split(",")){let r=this.vertices.get(a);r&&r.classes.push(n);let u=this.edges.find(l=>l.id===a);u&&u.classes.push(n);let g=this.subGraphLookup.get(a);g&&g.classes.push(n)}}setTooltip(i,n){if(n!==void 0){n=this.sanitizeText(n);for(let a of i.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,n)}}setClickFun(i,n,a){if($().securityLevel!=="loose"||n===void 0)return;let r=[];if(typeof a=="string"){r=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let g=0;g<r.length;g++){let l=r[g].trim();l.startsWith('"')&&l.endsWith('"')&&(l=l.substr(1,l.length-2)),r[g]=l}}r.length===0&&r.push(i);let u=this.vertices.get(i);u&&(u.haveCallback=!0,this.funs.push(()=>{let g=this.lookUpDomId(i),l=document.querySelector(`[id="${g}"]`);l!==null&&l.addEventListener("click",()=>{Oe.runFunc(n,...r)},!1)}))}setLink(i,n,a){i.split(",").forEach(r=>{let u=this.vertices.get(r);u!==void 0&&(u.link=Oe.formatUrl(n,this.config),u.linkTarget=a)}),this.setClass(i,"clickable")}getTooltip(i){return this.tooltips.get(i)}setClickEvent(i,n,a){i.split(",").forEach(r=>{this.setClickFun(r,n,a)}),this.setClass(i,"clickable")}bindFunctions(i){this.funs.forEach(n=>{n(i)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(i){let n=u1();Xe(i).select("svg").selectAll("g.node").on("mouseover",u=>{let g=Xe(u.currentTarget),l=g.attr("title");if(l===null)return;let D=u.currentTarget?.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.text(g.attr("title")).style("left",window.scrollX+D.left+(D.right-D.left)/2+"px").style("top",window.scrollY+D.bottom+"px"),n.html(Qt.sanitize(l)),g.classed("hover",!0)}).on("mouseout",u=>{n.transition().duration(500).style("opacity",0),Xe(u.currentTarget).classed("hover",!1)})}clear(i="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.droppedSubGraphMembers=[],this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=i,this.config=$(),Zt()}setGen(i){this.version=i||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(i,n,a){let r=i.text.trim(),u=a.text;i===a&&/\s/.exec(a.text)&&(r=void 0);let l=k(f=>{let x={boolean:{},number:{},string:{}},fe=[],Z;return{nodeList:f.filter(function(W){let ee=typeof W;return W.stmt&&W.stmt==="dir"?(Z=W.value,!1):W.trim()===""?!1:ee in x?x[ee].hasOwnProperty(W)?!1:x[ee][W]=!0:fe.includes(W)?!1:fe.push(W)}),dir:Z}},"uniq")(n.flat()),D=l.nodeList,d=l.dir,T=$().flowchart??{};if(d=d??(T.inheritDir?this.getDirection()??$().direction??void 0:void 0),this.version==="gen-1")for(let f=0;f<D.length;f++)D[f]=this.lookUpDomId(D[f]);r=r??"subGraph"+this.subCount,u=u||"",u=this.sanitizeText(u),this.subCount=this.subCount+1;let B={id:r,nodes:D,title:u.trim(),classes:[],dir:d,labelType:this.sanitizeNodeLabelType(a?.type)};H.info("Adding",B.id,B.nodes,B.dir);let G=this.makeUniq(B,this.subGraphs).nodes;this.recordDroppedMembers(B,G),B.nodes=G.filter(f=>f!==r);let m=this.subGraphs.find(f=>f.id===r);return m?m.nodes.push(...B.nodes):this.subGraphs.push(B),this.subGraphLookup.set(r,m??B),r}recordDroppedMembers(i,n){let a=new Set(n);for(let r of i.nodes){if(a.has(r)||r===i.id)continue;let u=this.subGraphs.find(g=>g.nodes.includes(r));u&&u.id!==i.id&&!this.isNestedIn(u.id,i)&&this.droppedSubGraphMembers.push({node:r,keptBy:u.id,droppedFrom:i.id})}}isNestedIn(i,n){let a=new Set,r=i;for(;r!==void 0&&!a.has(r);){if(n.nodes.includes(r))return!0;a.add(r);let u=r;r=this.subGraphs.find(g=>g.nodes.includes(u))?.id}return!1}getPosForId(i){for(let[n,a]of this.subGraphs.entries())if(a.id===i)return n;return-1}indexNodes2(i,n){let a=this.subGraphs[n].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=n,this.subGraphs[n].id===i)return{result:!0,count:0};let r=0,u=1;for(;r<a.length;){let g=this.getPosForId(a[r]);if(g>=0){let l=this.indexNodes2(i,g);if(l.result)return{result:!0,count:u+l.count};u=u+l.count}r=r+1}return{result:!1,count:u}}getDepthFirstPos(i){return this.posCrossRef[i]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(i){let n=i.trim(),a="arrow_open";switch(n[0]){case"<":a="arrow_point",n=n.slice(1);break;case"x":a="arrow_cross",n=n.slice(1);break;case"o":a="arrow_circle",n=n.slice(1);break}let r="normal";return n.includes("=")&&(r="thick"),n.includes(".")&&(r="dotted"),{type:a,stroke:r}}countChar(i,n){let a=n.length,r=0;for(let u=0;u<a;++u)n[u]===i&&++r;return r}destructEndLink(i){let n=i.trim(),a=n.slice(0,-1),r="arrow_open";switch(n.slice(-1)){case"x":r="arrow_cross",n.startsWith("x")&&(r="double_"+r,a=a.slice(1));break;case">":r="arrow_point",n.startsWith("<")&&(r="double_"+r,a=a.slice(1));break;case"o":r="arrow_circle",n.startsWith("o")&&(r="double_"+r,a=a.slice(1));break}let u="normal",g=a.length-1;a.startsWith("=")&&(u="thick"),a.startsWith("~")&&(u="invisible");let l=this.countChar(".",a);return l&&(u="dotted",g=l),{type:r,stroke:u,length:g}}destructLink(i,n){let a=this.destructEndLink(i),r;if(n){if(r=this.destructStartLink(n),r.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(r.type==="arrow_open")r.type=a.type;else{if(r.type!==a.type)return{type:"INVALID",stroke:"INVALID"};r.type="double_"+r.type}return r.type==="double_arrow"&&(r.type="double_arrow_point"),r.length=a.length,r}return a}exists(i,n){for(let a of i)if(a.nodes.includes(n))return!0;return!1}makeUniq(i,n){let a=[];return i.nodes.forEach((r,u)=>{this.exists(n,r)||a.push(i.nodes[u])}),{nodes:a}}getTypeFromVertex(i){if(i.img)return"imageSquare";if(i.icon)return i.form==="circle"?"iconCircle":i.form==="square"?"iconSquare":i.form==="rounded"?"iconRounded":"icon";switch(i.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return i.type}}findNode(i,n){return i.find(a=>a.id===n)}destructEdgeType(i){let n="none",a="arrow_point";switch(i){case"arrow_point":case"arrow_circle":case"arrow_cross":a=i;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":n=i.replace("double_",""),a=n;break}return{arrowTypeStart:n,arrowTypeEnd:a}}addNodeFromVertex(i,n,a,r,u,g){let l=a.get(i.id),D=r.get(i.id)??!1,d=this.findNode(n,i.id);if(d)d.cssStyles=i.styles,d.cssCompiledStyles=this.getCompiledStyles(i.classes),d.cssClasses=i.classes.join(" ");else{let T={id:i.id,label:i.text,labelType:i.labelType,labelStyle:"",parentId:l,padding:u.flowchart?.padding||8,cssStyles:i.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...i.classes]),cssClasses:"default "+i.classes.join(" "),dir:i.dir,domId:i.domId,look:g,link:i.link,linkTarget:i.linkTarget,tooltip:this.getTooltip(i.id),icon:i.icon,pos:i.pos,img:i.img,assetWidth:i.assetWidth,assetHeight:i.assetHeight,constraint:i.constraint,metadata:C1(i.metadata)};D?n.push({...T,isGroup:!0,shape:"rect"}):n.push({...T,isGroup:!1,shape:this.getTypeFromVertex(i),minWidth:u.flowchart?.minNodeWidth})}}getCompiledStyles(i){let n=[];for(let a of i){let r=this.classes.get(a);r?.styles&&(n=[...n,...r.styles??[]].map(u=>u.trim())),r?.textStyles&&(n=[...n,...r.textStyles??[]].map(u=>u.trim()))}return n}getData(){let i=$(),n=[],a=[],r=this.getSubGraphs(),u=new Map,g=new Map,l=new Map;for(let c of r)for(let h of c.nodes)this.subGraphLookup.has(h)&&l.set(h,c.id);let D=new Map,d=new Map;for(let c of r){let h=l.get(c.id);h!==void 0&&d.set(h,[...d.get(h)??[],c.id])}let T=0,B=k(c=>{D.set(c,T++);for(let h of d.get(c)??[])B(h)},"walk");for(let c of r)l.has(c.id)||B(c.id);let G=k(c=>this.subGraphLookup.get(c)?.metadata?.view==="collapsed","isCollapsed"),m=k(c=>{let h,F=new Set,_=c;for(;_!==void 0&&!F.has(_);)F.add(_),G(_)&&(h=_),_=l.get(_);return h},"outermostCollapsed"),f=new Set,x=new Map;for(let c of r){let h=m(c.id);if(h!==void 0){c.id!==h&&(f.add(c.id),x.set(c.id,h));for(let F of c.nodes)F!==h&&(f.add(F),x.set(F,h))}}for(let c=r.length-1;c>=0;c--){let h=r[c];if(!f.has(h.id)){h.nodes.length>0&&g.set(h.id,!0);for(let F of h.nodes)u.set(F,h.id)}}for(let c=r.length-1;c>=0;c--){let h=r[c];f.has(h.id)||(h.metadata?.view==="collapsed"?n.push({id:h.id,label:h.title,labelStyle:"",labelType:h.labelType,parentId:u.get(h.id),padding:8,cssCompiledStyles:this.getCompiledStyles(h.classes),cssClasses:h.classes.join(" "),shape:"collapsedGroup",dir:h.dir,isGroup:!1,look:i.look,colorIndex:D.get(h.id)}):n.push({id:h.id,label:h.title,labelStyle:"",labelType:h.labelType,parentId:u.get(h.id),padding:8,cssCompiledStyles:this.getCompiledStyles(h.classes),cssClasses:h.classes.join(" "),shape:"rect",dir:h.dir,isGroup:!0,look:i.look,colorIndex:D.get(h.id),metadata:C1(h.metadata,!0)}))}this.getVertices().forEach(c=>{f.has(c.id)||this.addNodeFromVertex(c,n,u,g,i,i.look||"classic")});let Z=this.getEdges(),me=Z.reduce((c,h)=>Je(h)?Math.max(c,h.step):c,0),W=g1(i.flowchart?.stepDuration),ee=i.flowchart?.stepNumbers===!0?{showStepNumber:!0}:{};Z.forEach((c,h)=>{let{arrowTypeStart:F,arrowTypeEnd:_}=this.destructEdgeType(c.type),I=[...Z.defaultStyle??[]],N=x.get(c.start)??c.start,R=x.get(c.end)??c.end;if(N===R&&(x.has(c.start)||x.has(c.end)))return;c.style&&I.push(...c.style);let O={id:Qe(N,R,{counter:h,prefix:"L"},c.id),isUserDefinedId:c.isUserDefinedId,start:N,end:R,type:c.type??"normal",label:c.text,labelType:c.labelType,labelpos:"c",thickness:c.stroke,minlen:c.length,classes:c?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:c?.stroke==="invisible"||c?.type==="arrow_open"?"none":F,arrowTypeEnd:c?.stroke==="invisible"||c?.type==="arrow_open"?"none":_,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(c.classes),labelStyle:I,style:I,pattern:c.stroke,look:i.look,animate:c.animate,animation:c.animation,...Je(c)?{step:c.step,stepCount:me,stepDuration:W,...ee}:{},curve:c.interpolate||this.edges.defaultInterpolate||i.flowchart?.curve};a.push(O)});let M=this.droppedSubGraphMembers.length>0?{droppedSubGraphMembers:[...this.droppedSubGraphMembers]}:{};return{nodes:n,edges:a,other:M,config:i}}validate(){if($().layout!=="grid")return;let n=[...this.vertices.values(),...this.subGraphs];Xt(void 0,n);for(let a of n){let r=this.subGraphLookup.has(a.id);for(let u of Object.keys(a.metadata??{}))I1.has(u)||r&&u==="algorithm"||H.warn(`Unknown metadata key "${u}" on ${r?"subgraph":"node"} "${a.id}" with grid layout.`)}}defaultConfig(){return a1.flowchart}};var G1=k(function(s,i){return i.db.getClasses()},"getClasses"),M1=k(async function(s,i,n,a){H.info("REF0:"),H.info("Drawing state diagram (v2)",i);let{securityLevel:r,flowchart:u,layout:g}=$();a.db.setDiagramId(i),H.debug("Before getData: ");let l=a.db.getData();H.debug("Data: ",l);let D=k1(i,r),d=a.db.getDirection();l.type=a.type,l.layoutAlgorithm=A1(g),l.direction=d,l.nodeSpacing=u?.nodeSpacing||50,l.rankSpacing=u?.rankSpacing||50,l.markers=["point","circle","cross"],l.diagramId=i,H.debug("REF1:",l),await m1(l,D);let T=l.config.flowchart?.diagramPadding??8;Oe.insertTitle(D,"flowchartTitleText",u?.titleTopMargin||0,a.db.getDiagramTitle()),D1(D,T,"flowchart",u?.useMaxWidth||!1)},"draw"),E1={getClasses:G1,draw:M1};var ot=(function(){var s=k(function(ke,p,b,A){for(b=b||{},A=ke.length;A--;b[ke[A]]=p);return b},"o"),i=[1,4],n=[1,3],a=[1,5],r=[1,8,9,10,11,27,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],u=[2,2],g=[1,13],l=[1,14],D=[1,15],d=[1,16],T=[1,23],B=[1,25],G=[1,26],m=[1,27],f=[1,51],x=[1,50],fe=[1,30],Z=[1,31],me=[1,32],W=[1,33],ee=[1,34],M=[1,46],c=[1,48],h=[1,44],F=[1,49],_=[1,45],I=[1,52],N=[1,47],R=[1,53],O=[1,54],Pe=[1,35],Ue=[1,36],je=[1,37],We=[1,38],ze=[1,39],Ae=[1,59],w=[1,8,9,10,11,27,32,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],se=[1,63],ie=[1,62],re=[1,64],ge=[8,9,11,76,78,79],ct=[1,80],$e=[1,81],Ee=[1,95],Te=[1,100],xe=[1,99],Fe=[1,96],Be=[1,92],_e=[1,98],we=[1,94],Le=[1,101],Ve=[1,97],ve=[1,102],Ie=[1,93],De=[8,9,10,11,40,76,78,79],j=[8,9,10,11,40,47,76,78,79],q=[8,9,10,11,29,40,45,47,49,51,53,55,57,59,61,64,66,68,69,71,76,78,79,90,103,106,107,110,112,115,116,117],ht=[8,9,11,45,61,76,78,79,90,103,106,107,110,112,115,116,117],dt=[2,26],Ne=[45,61,90,103,106,107,110,112,115,116,117],pt=[1,126],ft=[1,127],Ke=[1,129],Ye=[1,128],gt=[45,61,63,75,90,103,106,107,110,112,115,116,117],bt=[1,138],kt=[1,152],mt=[1,153],At=[1,154],Dt=[1,155],yt=[1,140],Ct=[1,142],St=[1,146],Et=[1,147],Tt=[1,148],xt=[1,149],Ft=[1,150],Bt=[1,151],_t=[1,156],wt=[1,157],Lt=[1,136],Vt=[1,137],vt=[1,144],It=[1,139],Nt=[1,143],Rt=[1,141],et=[8,9,10,11,27,32,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],Gt=[1,159],Mt=[8,9,10,11,76,78,79],Ot=[1,160],Pt=[1,162],v=[8,9,11],X=[8,9,10,11,14,45,61,90,106,107,110,112,115,116,117],y=[1,182],z=[1,178],K=[1,179],C=[1,183],S=[1,180],E=[1,181],Re=[78,117,120],L=[8,9,10,11,12,14,27,29,32,45,61,76,85,86,87,88,89,90,91,106,110,112,115,116,117],Ut=[10,107],be=[31,50,52,54,56,58,63,65,67,68,70,72,117,118,119],ne=[1,253],ae=[1,251],ue=[1,255],oe=[1,249],le=[1,250],ce=[1,252],he=[1,254],de=[1,256],Ge=[1,273],jt=[8,9,11,107],te=[8,9,10,11,61,85,106,107,110,111,112,113],tt={trace:k(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,withShape:41,node:42,link:43,styledVertex:44,AMP:45,vertex:46,STYLE_SEPARATOR:47,idString: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:72,linkStatement:73,arrowText:74,TESTSTR:75,START_LINK:76,edgeText:77,LINK:78,LINK_ID:79,edgeTextToken:80,STR:81,MD_STR:82,textToken:83,keywords:84,STYLE:85,LINKSTYLE:86,CLASSDEF:87,CLASS:88,CLICK:89,DOWN:90,UP:91,textNoTagsToken:92,stylesOpt:93,"idString[vertex]":94,"idString[class]":95,CALLBACKNAME:96,CALLBACKARGS:97,HREF:98,LINK_TARGET:99,"STR[link]":100,"STR[tooltip]":101,alphaNum:102,DEFAULT:103,numList:104,INTERPOLATE:105,NUM:106,COMMA:107,style:108,styleComponent:109,NODE_STRING:110,UNIT:111,BRKT:112,PCT:113,idStringToken:114,MINUS:115,MULT:116,UNICODE_TEXT:117,TEXT:118,TAGSTART:119,EDGE_TEXT:120,alphaNumToken:121,direction_tb:122,direction_bt:123,direction_rl:124,direction_lr:125,direction_td:126,$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",45:"AMP",47:"STYLE_SEPARATOR",49:"DOUBLECIRCLESTART",50:"DOUBLECIRCLEEND",51:"PS",52:"PE",53:"(-",54:"-)",55:"STADIUMSTART",56:"STADIUMEND",57:"SUBROUTINESTART",58:"SUBROUTINEEND",59:"VERTEX_WITH_PROPS_START",60:"NODE_STRING[field]",61:"COLON",62:"NODE_STRING[value]",63:"PIPE",64:"CYLINDERSTART",65:"CYLINDEREND",66:"DIAMOND_START",67:"DIAMOND_STOP",68:"TAGEND",69:"TRAPSTART",70:"TRAPEND",71:"INVTRAPSTART",72:"INVTRAPEND",75:"TESTSTR",76:"START_LINK",78:"LINK",79:"LINK_ID",81:"STR",82:"MD_STR",85:"STYLE",86:"LINKSTYLE",87:"CLASSDEF",88:"CLASS",89:"CLICK",90:"DOWN",91:"UP",94:"idString[vertex]",95:"idString[class]",96:"CALLBACKNAME",97:"CALLBACKARGS",98:"HREF",99:"LINK_TARGET",100:"STR[link]",101:"STR[tooltip]",103:"DEFAULT",105:"INTERPOLATE",106:"NUM",107:"COMMA",110:"NODE_STRING",111:"UNIT",112:"BRKT",113:"PCT",115:"MINUS",116:"MULT",117:"UNICODE_TEXT",118:"TEXT",119:"TAGSTART",120:"EDGE_TEXT",122:"direction_tb",123:"direction_bt",124:"direction_rl",125:"direction_lr",126:"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],[41,2],[41,3],[20,3],[20,4],[20,3],[20,4],[20,2],[20,1],[20,2],[20,1],[42,1],[42,5],[42,5],[44,1],[44,3],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,8],[46,4],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,1],[43,2],[43,3],[43,3],[43,1],[43,3],[43,4],[77,1],[77,2],[77,1],[77,1],[73,1],[73,2],[74,3],[30,1],[30,2],[30,1],[30,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,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],[104,1],[104,3],[93,1],[93,3],[108,1],[108,2],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[83,1],[83,1],[83,1],[83,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[80,1],[80,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[48,1],[48,2],[102,1],[102,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:k(function(p,b,A,o,V,e,ye){var t=e.length-1;switch(V){case 2:this.$=[];break;case 3:(!Array.isArray(e[t])||e[t].length>0)&&e[t-1].push(e[t]),this.$=e[t-1];break;case 4:case 187:this.$=e[t];break;case 11:o.setDirection("TB"),this.$="TB";break;case 12:o.setDirection(e[t-1]),this.$=e[t-1];break;case 27:this.$=e[t-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=o.addSubGraph(e[t-6],e[t-1],e[t-4]);break;case 34:this.$=o.addSubGraph(e[t-3],e[t-1],e[t-3]);break;case 35:this.$=o.addSubGraph(void 0,e[t-1],void 0);break;case 37:this.$=e[t].trim(),o.setAccTitle(this.$);break;case 38:case 39:this.$=e[t].trim(),o.setAccDescription(this.$);break;case 43:this.$=e[t-1]+e[t];break;case 44:this.$=e[t];break;case 45:this.$={nodes:e[t-1],shapeData:e[t]};break;case 46:this.$={nodes:e[t-2],shapeData:e[t]};break;case 47:o.addVertex(e[t].nodes[e[t].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t].shapeData),o.addLink(e[t-2].stmt,e[t].nodes,e[t-1]),this.$={stmt:e[t].nodes,nodes:e[t].nodes.concat(e[t-2].nodes)};break;case 48:o.addVertex(e[t-1].nodes[e[t-1].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t-1].shapeData),o.addLink(e[t-3].stmt,e[t-1].nodes,e[t-2]),this.$={stmt:e[t-1].nodes,nodes:e[t-1].nodes.concat(e[t-3].nodes)};break;case 49:o.addLink(e[t-2].stmt,e[t],e[t-1]),this.$={stmt:e[t],nodes:e[t].concat(e[t-2].nodes)};break;case 50:o.addLink(e[t-3].stmt,e[t-1],e[t-2]),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 51:this.$={stmt:e[t-1],nodes:e[t-1]};break;case 52:o.addVertex(e[t].nodes[e[t].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t].shapeData),this.$={stmt:e[t].nodes,nodes:e[t].nodes,shapeData:e[t].shapeData};break;case 53:o.addVertex(e[t-1].nodes[e[t-1].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t-1].shapeData),this.$={stmt:e[t-1].nodes,nodes:e[t-1].nodes,shapeData:e[t-1].shapeData};break;case 54:this.$={stmt:e[t],nodes:e[t]};break;case 55:this.$=[e[t]];break;case 56:o.addVertex(e[t-4].nodes[e[t-4].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t-4].shapeData),this.$=e[t-4].nodes.concat(e[t]);break;case 57:this.$=e[t-4].concat(e[t]);break;case 58:this.$=e[t];break;case 59:this.$=e[t-2],o.setClass(e[t-2],e[t]);break;case 60:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"square");break;case 61:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"doublecircle");break;case 62:this.$=e[t-5],o.addVertex(e[t-5],e[t-2],"circle");break;case 63:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"ellipse");break;case 64:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"stadium");break;case 65:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"subroutine");break;case 66:this.$=e[t-7],o.addVertex(e[t-7],e[t-1],"rect",void 0,void 0,void 0,Object.fromEntries([[e[t-5],e[t-3]]]));break;case 67:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"cylinder");break;case 68:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"round");break;case 69:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"diamond");break;case 70:this.$=e[t-5],o.addVertex(e[t-5],e[t-2],"hexagon");break;case 71:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"odd");break;case 72:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"trapezoid");break;case 73:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"inv_trapezoid");break;case 74:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"lean_right");break;case 75:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"lean_left");break;case 76:this.$=e[t],o.addVertex(e[t]);break;case 77:e[t-1].text=e[t],this.$=e[t-1];break;case 78:case 79:e[t-2].text=e[t-1],this.$=e[t-2];break;case 80:this.$=e[t];break;case 81:var P=o.destructLink(e[t],e[t-2]);this.$={type:P.type,stroke:P.stroke,length:P.length,text:e[t-1]};break;case 82:var P=o.destructLink(e[t],e[t-2]);this.$={type:P.type,stroke:P.stroke,length:P.length,text:e[t-1],id:e[t-3]};break;case 83:this.$={text:e[t],type:"text"};break;case 84:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 85:this.$={text:e[t],type:"string"};break;case 86:this.$={text:e[t],type:"markdown"};break;case 87:var P=o.destructLink(e[t]);this.$={type:P.type,stroke:P.stroke,length:P.length};break;case 88:var P=o.destructLink(e[t]);this.$={type:P.type,stroke:P.stroke,length:P.length,id:e[t-1]};break;case 89:this.$=e[t-1];break;case 90:this.$={text:e[t],type:"text"};break;case 91:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 92:this.$={text:e[t],type:"string"};break;case 93:case 108:this.$={text:e[t],type:"markdown"};break;case 105:this.$={text:e[t],type:"text"};break;case 106:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 107:this.$={text:e[t],type:"text"};break;case 109:this.$=e[t-4],o.addClass(e[t-2],e[t]);break;case 110:this.$=e[t-4],o.setClass(e[t-2],e[t]);break;case 111:case 119:this.$=e[t-1],o.setClickEvent(e[t-1],e[t]);break;case 112:case 120:this.$=e[t-3],o.setClickEvent(e[t-3],e[t-2]),o.setTooltip(e[t-3],e[t]);break;case 113:this.$=e[t-2],o.setClickEvent(e[t-2],e[t-1],e[t]);break;case 114:this.$=e[t-4],o.setClickEvent(e[t-4],e[t-3],e[t-2]),o.setTooltip(e[t-4],e[t]);break;case 115:this.$=e[t-2],o.setLink(e[t-2],e[t]);break;case 116:this.$=e[t-4],o.setLink(e[t-4],e[t-2]),o.setTooltip(e[t-4],e[t]);break;case 117:this.$=e[t-4],o.setLink(e[t-4],e[t-2],e[t]);break;case 118:this.$=e[t-6],o.setLink(e[t-6],e[t-4],e[t]),o.setTooltip(e[t-6],e[t-2]);break;case 121:this.$=e[t-1],o.setLink(e[t-1],e[t]);break;case 122:this.$=e[t-3],o.setLink(e[t-3],e[t-2]),o.setTooltip(e[t-3],e[t]);break;case 123:this.$=e[t-3],o.setLink(e[t-3],e[t-2],e[t]);break;case 124:this.$=e[t-5],o.setLink(e[t-5],e[t-4],e[t]),o.setTooltip(e[t-5],e[t-2]);break;case 125:this.$=e[t-4],o.addVertex(e[t-2],void 0,void 0,e[t]);break;case 126:this.$=e[t-4],o.updateLink([e[t-2]],e[t]);break;case 127:this.$=e[t-4],o.updateLink(e[t-2],e[t]);break;case 128:this.$=e[t-8],o.updateLinkInterpolate([e[t-6]],e[t-2]),o.updateLink([e[t-6]],e[t]);break;case 129:this.$=e[t-8],o.updateLinkInterpolate(e[t-6],e[t-2]),o.updateLink(e[t-6],e[t]);break;case 130:this.$=e[t-6],o.updateLinkInterpolate([e[t-4]],e[t]);break;case 131:this.$=e[t-6],o.updateLinkInterpolate(e[t-4],e[t]);break;case 132:case 134:this.$=[e[t]];break;case 133:case 135:e[t-2].push(e[t]),this.$=e[t-2];break;case 137:this.$=e[t-1]+e[t];break;case 185:this.$=e[t];break;case 186:this.$=e[t-1]+""+e[t];break;case 188:this.$=e[t-1]+""+e[t];break;case 189:this.$={stmt:"dir",value:"TB"};break;case 190:this.$={stmt:"dir",value:"BT"};break;case 191:this.$={stmt:"dir",value:"RL"};break;case 192:this.$={stmt:"dir",value:"LR"};break;case 193:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:i,10:n,12:a},{1:[3]},s(r,u,{5:6}),{4:7,9:i,10:n,12:a},{4:8,9:i,10:n,12:a},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:g,9:l,10:D,11:d,20:17,22:18,23:19,24:20,25:21,26:22,27:T,33:24,34:B,36:G,38:m,41:29,42:28,44:40,45:f,46:41,48:42,61:x,85:fe,86:Z,87:me,88:W,89:ee,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O,122:Pe,123:Ue,124:je,125:We,126:ze},s(r,[2,9]),s(r,[2,10]),s(r,[2,11]),{8:[1,56],9:[1,57],10:Ae,15:55,18:58},s(w,[2,3]),s(w,[2,4]),s(w,[2,5]),s(w,[2,6]),s(w,[2,7]),s(w,[2,8]),{8:se,9:ie,11:re,21:60,43:61,73:65,76:[1,66],78:[1,68],79:[1,67]},{8:se,9:ie,11:re,21:69},{8:se,9:ie,11:re,21:70},{8:se,9:ie,11:re,21:71},{8:se,9:ie,11:re,21:72},{8:se,9:ie,11:re,21:73},{8:se,9:ie,10:[1,74],11:re,21:75},s(w,[2,36]),{35:[1,76]},{37:[1,77]},s(w,[2,39]),s(ge,[2,54],{18:78,39:79,10:ct,40:$e}),s(ge,[2,52],{18:82,10:Ae}),{10:[1,83]},{10:[1,84]},{10:[1,85]},{10:[1,86]},{14:Ee,45:Te,61:xe,81:[1,90],90:Fe,96:[1,87],98:[1,88],102:89,106:Be,107:_e,110:we,112:Le,115:Ve,116:ve,117:Ie,121:91},s(w,[2,189]),s(w,[2,190]),s(w,[2,191]),s(w,[2,192]),s(w,[2,193]),s(De,[2,55]),s(De,[2,58],{47:[1,103]}),s(j,[2,76],{114:116,29:[1,104],45:f,49:[1,105],51:[1,106],53:[1,107],55:[1,108],57:[1,109],59:[1,110],61:x,64:[1,111],66:[1,112],68:[1,113],69:[1,114],71:[1,115],90:M,103:c,106:h,107:F,110:_,112:I,115:N,116:R,117:O}),s(q,[2,185]),s(q,[2,146]),s(q,[2,147]),s(q,[2,148]),s(q,[2,149]),s(q,[2,150]),s(q,[2,151]),s(q,[2,152]),s(q,[2,153]),s(q,[2,154]),s(q,[2,155]),s(q,[2,156]),s(r,[2,12]),s(r,[2,18]),s(r,[2,19]),{9:[1,117]},s(ht,dt,{18:118,10:Ae}),s(w,[2,27]),{41:119,42:120,44:40,45:f,46:41,48:42,61:x,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O},s(w,[2,40]),s(w,[2,41]),s(w,[2,42]),s(Ne,[2,80],{74:121,63:[1,123],75:[1,122]}),{77:124,80:125,81:pt,82:ft,117:Ke,120:Ye},{76:[1,130],78:[1,131]},s(gt,[2,87]),s(w,[2,28]),s(w,[2,29]),s(w,[2,30]),s(w,[2,31]),s(w,[2,32]),{10:bt,12:kt,14:mt,27:At,28:132,32:Dt,45:yt,61:Ct,76:St,81:[1,134],82:[1,135],84:145,85:Et,86:Tt,87:xt,88:Ft,89:Bt,90:_t,91:wt,92:133,106:Lt,110:Vt,112:vt,115:It,116:Nt,117:Rt},s(et,u,{5:158}),s(w,[2,37]),s(w,[2,38]),s(ge,[2,51],{45:Gt}),s(Mt,[2,45],{40:Ot}),s([8,9,11,45,76,78,79],dt,{18:118,39:161,10:Ae,40:$e}),s(De,[2,44]),s(ge,[2,53],{45:Pt}),{45:f,48:163,61:x,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O},{103:[1,164],104:165,106:[1,166]},{45:f,48:167,61:x,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O},{45:f,48:168,61:x,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O},s(v,[2,111],{10:[1,169],97:[1,170]}),{81:[1,171]},s(v,[2,119],{121:173,10:[1,172],14:Ee,45:Te,61:xe,90:Fe,106:Be,107:_e,110:we,112:Le,115:Ve,116:ve,117:Ie}),s(v,[2,121],{10:[1,174]}),s(X,[2,187]),s(X,[2,174]),s(X,[2,175]),s(X,[2,176]),s(X,[2,177]),s(X,[2,178]),s(X,[2,179]),s(X,[2,180]),s(X,[2,181]),s(X,[2,182]),s(X,[2,183]),s(X,[2,184]),{45:f,48:175,61:x,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O},{30:176,68:y,81:z,82:K,83:177,117:C,118:S,119:E},{30:184,68:y,81:z,82:K,83:177,117:C,118:S,119:E},{30:186,51:[1,185],68:y,81:z,82:K,83:177,117:C,118:S,119:E},{30:187,68:y,81:z,82:K,83:177,117:C,118:S,119:E},{30:188,68:y,81:z,82:K,83:177,117:C,118:S,119:E},{30:189,68:y,81:z,82:K,83:177,117:C,118:S,119:E},{110:[1,190]},{30:191,68:y,81:z,82:K,83:177,117:C,118:S,119:E},{30:192,66:[1,193],68:y,81:z,82:K,83:177,117:C,118:S,119:E},{30:194,68:y,81:z,82:K,83:177,117:C,118:S,119:E},{30:195,68:y,81:z,82:K,83:177,117:C,118:S,119:E},{30:196,68:y,81:z,82:K,83:177,117:C,118:S,119:E},s(q,[2,186]),s(r,[2,20]),s(ht,[2,25]),s(ge,[2,47],{18:197,10:Ae}),s(ge,[2,49],{39:79,18:198,10:ct,40:$e}),s(Ne,[2,77],{10:[1,199]}),{10:[1,200]},{30:201,68:y,81:z,82:K,83:177,117:C,118:S,119:E},{78:[1,202],80:203,117:Ke,120:Ye},s(Re,[2,83]),s(Re,[2,85]),s(Re,[2,86]),s(Re,[2,172]),s(Re,[2,173]),{77:204,80:125,81:pt,82:ft,117:Ke,120:Ye},s(gt,[2,88]),{8:se,9:ie,10:bt,11:re,12:kt,14:mt,21:206,27:At,29:[1,205],32:Dt,45:yt,61:Ct,76:St,84:145,85:Et,86:Tt,87:xt,88:Ft,89:Bt,90:_t,91:wt,92:207,106:Lt,110:Vt,112:vt,115:It,116:Nt,117:Rt},s(L,[2,105]),s(L,[2,107]),s(L,[2,108]),s(L,[2,161]),s(L,[2,162]),s(L,[2,163]),s(L,[2,164]),s(L,[2,165]),s(L,[2,166]),s(L,[2,167]),s(L,[2,168]),s(L,[2,169]),s(L,[2,170]),s(L,[2,171]),s(L,[2,94]),s(L,[2,95]),s(L,[2,96]),s(L,[2,97]),s(L,[2,98]),s(L,[2,99]),s(L,[2,100]),s(L,[2,101]),s(L,[2,102]),s(L,[2,103]),s(L,[2,104]),{6:11,7:12,8:g,9:l,10:D,11:d,20:17,22:18,23:19,24:20,25:21,26:22,27:T,32:[1,208],33:24,34:B,36:G,38:m,41:29,42:28,44:40,45:f,46:41,48:42,61:x,85:fe,86:Z,87:me,88:W,89:ee,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O,122:Pe,123:Ue,124:je,125:We,126:ze},{10:Ae,18:209},s(De,[2,43]),s(Mt,[2,46],{40:Ot}),{10:Ae,18:210},{10:[1,211],45:f,61:x,90:M,103:c,106:h,107:F,110:_,112:I,114:116,115:N,116:R,117:O},{10:[1,212]},{10:[1,213],107:[1,214]},s(Ut,[2,132]),{10:[1,215],45:f,61:x,90:M,103:c,106:h,107:F,110:_,112:I,114:116,115:N,116:R,117:O},{10:[1,216],45:f,61:x,90:M,103:c,106:h,107:F,110:_,112:I,114:116,115:N,116:R,117:O},{81:[1,217]},s(v,[2,113],{10:[1,218]}),s(v,[2,115],{10:[1,219]}),{81:[1,220]},s(X,[2,188]),{81:[1,221],99:[1,222]},s(De,[2,59],{114:116,45:f,61:x,90:M,103:c,106:h,107:F,110:_,112:I,115:N,116:R,117:O}),{31:[1,223],68:y,83:224,117:C,118:S,119:E},s(be,[2,90]),s(be,[2,92]),s(be,[2,93]),s(be,[2,157]),s(be,[2,158]),s(be,[2,159]),s(be,[2,160]),{50:[1,225],68:y,83:224,117:C,118:S,119:E},{30:226,68:y,81:z,82:K,83:177,117:C,118:S,119:E},{52:[1,227],68:y,83:224,117:C,118:S,119:E},{54:[1,228],68:y,83:224,117:C,118:S,119:E},{56:[1,229],68:y,83:224,117:C,118:S,119:E},{58:[1,230],68:y,83:224,117:C,118:S,119:E},{61:[1,231]},{65:[1,232],68:y,83:224,117:C,118:S,119:E},{67:[1,233],68:y,83:224,117:C,118:S,119:E},{30:234,68:y,81:z,82:K,83:177,117:C,118:S,119:E},{31:[1,235],68:y,83:224,117:C,118:S,119:E},{68:y,70:[1,236],72:[1,237],83:224,117:C,118:S,119:E},{68:y,70:[1,239],72:[1,238],83:224,117:C,118:S,119:E},s(ge,[2,48],{45:Pt}),s(ge,[2,50],{45:Gt}),s(Ne,[2,79]),s(Ne,[2,78]),{63:[1,240],68:y,83:224,117:C,118:S,119:E},s(Ne,[2,81]),s(Re,[2,84]),{78:[1,241],80:203,117:Ke,120:Ye},{30:242,68:y,81:z,82:K,83:177,117:C,118:S,119:E},s(et,u,{5:243}),s(L,[2,106]),s(w,[2,35]),{44:244,45:f,46:41,48:42,61:x,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O},{44:245,45:f,46:41,48:42,61:x,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O},{10:ne,61:ae,85:ue,93:246,106:oe,108:247,109:248,110:le,111:ce,112:he,113:de},{10:ne,61:ae,85:ue,93:257,105:[1,258],106:oe,108:247,109:248,110:le,111:ce,112:he,113:de},{10:ne,61:ae,85:ue,93:259,105:[1,260],106:oe,108:247,109:248,110:le,111:ce,112:he,113:de},{106:[1,261]},{10:ne,61:ae,85:ue,93:262,106:oe,108:247,109:248,110:le,111:ce,112:he,113:de},{45:f,48:263,61:x,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O},s(v,[2,112]),{81:[1,264]},{81:[1,265],99:[1,266]},s(v,[2,120]),s(v,[2,122],{10:[1,267]}),s(v,[2,123]),s(j,[2,60]),s(be,[2,91]),s(j,[2,61]),{52:[1,268],68:y,83:224,117:C,118:S,119:E},s(j,[2,68]),s(j,[2,63]),s(j,[2,64]),s(j,[2,65]),{110:[1,269]},s(j,[2,67]),s(j,[2,69]),{67:[1,270],68:y,83:224,117:C,118:S,119:E},s(j,[2,71]),s(j,[2,72]),s(j,[2,74]),s(j,[2,73]),s(j,[2,75]),s([10,45,61,90,103,106,107,110,112,115,116,117],[2,89]),s(Ne,[2,82]),{31:[1,271],68:y,83:224,117:C,118:S,119:E},{6:11,7:12,8:g,9:l,10:D,11:d,20:17,22:18,23:19,24:20,25:21,26:22,27:T,32:[1,272],33:24,34:B,36:G,38:m,41:29,42:28,44:40,45:f,46:41,48:42,61:x,85:fe,86:Z,87:me,88:W,89:ee,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O,122:Pe,123:Ue,124:je,125:We,126:ze},s(De,[2,57]),s(De,[2,56]),s(v,[2,125],{107:Ge}),s(jt,[2,134],{109:274,10:ne,61:ae,85:ue,106:oe,110:le,111:ce,112:he,113:de}),s(te,[2,136]),s(te,[2,138]),s(te,[2,139]),s(te,[2,140]),s(te,[2,141]),s(te,[2,142]),s(te,[2,143]),s(te,[2,144]),s(te,[2,145]),s(v,[2,126],{107:Ge}),{10:[1,275]},s(v,[2,127],{107:Ge}),{10:[1,276]},s(Ut,[2,133]),s(v,[2,109],{107:Ge}),s(v,[2,110],{114:116,45:f,61:x,90:M,103:c,106:h,107:F,110:_,112:I,115:N,116:R,117:O}),s(v,[2,114]),s(v,[2,116],{10:[1,277]}),s(v,[2,117]),{99:[1,278]},{52:[1,279]},{63:[1,280]},{67:[1,281]},{8:se,9:ie,11:re,21:282},s(w,[2,34]),{10:ne,61:ae,85:ue,106:oe,108:283,109:248,110:le,111:ce,112:he,113:de},s(te,[2,137]),{14:Ee,45:Te,61:xe,90:Fe,102:284,106:Be,107:_e,110:we,112:Le,115:Ve,116:ve,117:Ie,121:91},{14:Ee,45:Te,61:xe,90:Fe,102:285,106:Be,107:_e,110:we,112:Le,115:Ve,116:ve,117:Ie,121:91},{99:[1,286]},s(v,[2,124]),s(j,[2,62]),{30:287,68:y,81:z,82:K,83:177,117:C,118:S,119:E},s(j,[2,70]),s(et,u,{5:288}),s(jt,[2,135],{109:274,10:ne,61:ae,85:ue,106:oe,110:le,111:ce,112:he,113:de}),s(v,[2,130],{121:173,10:[1,289],14:Ee,45:Te,61:xe,90:Fe,106:Be,107:_e,110:we,112:Le,115:Ve,116:ve,117:Ie}),s(v,[2,131],{121:173,10:[1,290],14:Ee,45:Te,61:xe,90:Fe,106:Be,107:_e,110:we,112:Le,115:Ve,116:ve,117:Ie}),s(v,[2,118]),{31:[1,291],68:y,83:224,117:C,118:S,119:E},{6:11,7:12,8:g,9:l,10:D,11:d,20:17,22:18,23:19,24:20,25:21,26:22,27:T,32:[1,292],33:24,34:B,36:G,38:m,41:29,42:28,44:40,45:f,46:41,48:42,61:x,85:fe,86:Z,87:me,88:W,89:ee,90:M,103:c,106:h,107:F,110:_,112:I,114:43,115:N,116:R,117:O,122:Pe,123:Ue,124:je,125:We,126:ze},{10:ne,61:ae,85:ue,93:293,106:oe,108:247,109:248,110:le,111:ce,112:he,113:de},{10:ne,61:ae,85:ue,93:294,106:oe,108:247,109:248,110:le,111:ce,112:he,113:de},s(j,[2,66]),s(w,[2,33]),s(v,[2,128],{107:Ge}),s(v,[2,129],{107:Ge})],defaultActions:{},parseError:k(function(p,b){if(b.recoverable)this.trace(p);else{var A=new Error(p);throw A.hash=b,A}},"parseError"),parse:k(function(p){var b=this,A=[0],o=[],V=[null],e=[],ye=this.table,t="",P=0,Wt=0,zt=0,_1=2,Kt=1,w1=e.slice.call(arguments,1),U=Object.create(this.lexer),Ce={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(Ce.yy[it]=this.yy[it]);U.setInput(p,Ce.yy),Ce.yy.lexer=U,Ce.yy.parser=this,typeof U.yylloc>"u"&&(U.yylloc={});var rt=U.yylloc;e.push(rt);var L1=U.options&&U.options.ranges;typeof Ce.yy.parseError=="function"?this.parseError=Ce.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W1(Q){A.length=A.length-2*Q,V.length=V.length-Q,e.length=e.length-Q}k(W1,"popStack");function V1(){var Q;return Q=o.pop()||U.lex()||Kt,typeof Q!="number"&&(Q instanceof Array&&(o=Q,Q=o.pop()),Q=b.symbols_[Q]||Q),Q}k(V1,"lex");for(var Y,nt,Se,J,z1,at,Me={},He,pe,Yt,qe;;){if(Se=A[A.length-1],this.defaultActions[Se]?J=this.defaultActions[Se]:((Y===null||typeof Y>"u")&&(Y=V1()),J=ye[Se]&&ye[Se][Y]),typeof J>"u"||!J.length||!J[0]){var ut="";qe=[];for(He in ye[Se])this.terminals_[He]&&He>_1&&qe.push("'"+this.terminals_[He]+"'");U.showPosition?ut="Parse error on line "+(P+1)+`:
`+U.showPosition()+`
Expecting `+qe.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":ut="Parse error on line "+(P+1)+": Unexpected "+(Y==Kt?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(ut,{text:U.match,token:this.terminals_[Y]||Y,line:U.yylineno,loc:rt,expected:qe})}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Se+", token: "+Y);switch(J[0]){case 1:A.push(Y),V.push(U.yytext),e.push(U.yylloc),A.push(J[1]),Y=null,nt?(Y=nt,nt=null):(Wt=U.yyleng,t=U.yytext,P=U.yylineno,rt=U.yylloc,zt>0&&zt--);break;case 2:if(pe=this.productions_[J[1]][1],Me.$=V[V.length-pe],Me._$={first_line:e[e.length-(pe||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(pe||1)].first_column,last_column:e[e.length-1].last_column},L1&&(Me._$.range=[e[e.length-(pe||1)].range[0],e[e.length-1].range[1]]),at=this.performAction.apply(Me,[t,Wt,P,Ce.yy,J[1],V,e].concat(w1)),typeof at<"u")return at;pe&&(A=A.slice(0,-1*pe*2),V=V.slice(0,-1*pe),e=e.slice(0,-1*pe)),A.push(this.productions_[J[1]][0]),V.push(Me.$),e.push(Me._$),Yt=ye[A[A.length-2]][A[A.length-1]],A.push(Yt);break;case 3:return!0}}return!0},"parse")},B1=(function(){var ke={EOF:1,parseError:k(function(b,A){if(this.yy.parser)this.yy.parser.parseError(b,A);else throw new Error(b)},"parseError"),setInput:k(function(p,b){return this.yy=b||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:k(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var b=p.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:k(function(p){var b=p.length,A=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var V=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===o.length?this.yylloc.first_column:0)+o[o.length-A.length].length-A[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[V[0],V[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:k(function(){return this._more=!0,this},"more"),reject:k(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).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:k(function(p){this.unput(this.match.slice(p))},"less"),pastInput:k(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:k(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:k(function(){var p=this.pastInput(),b=new Array(p.length+1).join("-");return p+this.upcomingInput()+`
`+b+"^"},"showPosition"),test_match:k(function(p,b){var A,o,V;if(this.options.backtrack_lexer&&(V={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&&(V.yylloc.range=this.yylloc.range.slice(0))),o=p[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],A=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var e in V)this[e]=V[e];return!1}return!1},"test_match"),next:k(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,b,A,o;this._more||(this.yytext="",this.match="");for(var V=this._currentRules(),e=0;e<V.length;e++)if(A=this._input.match(this.rules[V[e]]),A&&(!b||A[0].length>b[0].length)){if(b=A,o=e,this.options.backtrack_lexer){if(p=this.test_match(A,V[e]),p!==!1)return p;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(p=this.test_match(b,V[o]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:k(function(){var b=this.next();return b||this.lex()},"lex"),begin:k(function(b){this.conditionStack.push(b)},"begin"),popState:k(function(){var b=this.conditionStack.length-1;return b>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:k(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:k(function(b){return b=this.conditionStack.length-1-Math.abs(b||0),b>=0?this.conditionStack[b]:"INITIAL"},"topState"),pushState:k(function(b){this.begin(b)},"pushState"),stateStackSize:k(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:k(function(b,A,o,V){var e=V;switch(o){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"),A.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let ye=/\n\s*/g;return A.yytext=A.yytext.replace(ye,"<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 96;case 17:this.popState();break;case 18:return 97;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 85;case 26:return 103;case 27:return 86;case 28:return 105;case 29:return 87;case 30:return 88;case 31:return 98;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 89;case 35:return b.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return b.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return b.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return b.lex.firstGraph()&&this.begin("dir"),12;break;case 39:return 27;case 40:return 32;case 41:return 99;case 42:return 99;case 43:return 99;case 44:return 99;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 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 126;case 61:return 79;case 62:return 106;case 63:return 112;case 64:return 47;case 65:return 61;case 66:return 45;case 67:return 8;case 68:return 107;case 69:return 116;case 70:return this.popState(),78;break;case 71:return this.pushState("edgeText"),76;break;case 72:return 120;case 73:return this.popState(),78;break;case 74:return this.pushState("thickEdgeText"),76;break;case 75:return 120;case 76:return this.popState(),78;break;case 77:return this.pushState("dottedEdgeText"),76;break;case 78:return 120;case 79:return 78;case 80:return this.popState(),54;break;case 81:return"TEXT";case 82:return this.pushState("ellipseText"),53;break;case 83:return this.popState(),56;break;case 84:return this.pushState("text"),55;break;case 85:return this.popState(),58;break;case 86:return this.pushState("text"),57;break;case 87:return 59;case 88:return this.pushState("text"),68;break;case 89:return this.popState(),65;break;case 90:return this.pushState("text"),64;break;case 91:return this.popState(),50;break;case 92:return this.pushState("text"),49;break;case 93:return this.popState(),70;break;case 94:return this.popState(),72;break;case 95:return 118;case 96:return this.pushState("trapText"),69;break;case 97:return this.pushState("trapText"),71;break;case 98:return 119;case 99:return 68;case 100:return 91;case 101:return"SEP";case 102:return 90;case 103:return 116;case 104:return 112;case 105:return 45;case 106:return 110;case 107:return 115;case 108:return 117;case 109:return this.popState(),63;break;case 110:return this.pushState("text"),63;break;case 111:return this.popState(),52;break;case 112:return this.pushState("text"),51;break;case 113:return this.popState(),31;break;case 114:return this.pushState("text"),29;break;case 115:return this.popState(),67;break;case 116:return this.pushState("text"),66;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\n\r]+)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}};return ke})();tt.lexer=B1;function st(){this.yy={}}return k(st,"Parser"),st.prototype=tt,tt.Parser=st,new st})();ot.parser=ot;var lt=ot;var T1=Object.assign({},lt);T1.parse=s=>{let i=s.replace(/}\s*\n/g,`}
`);return lt.parse(i)};var x1=T1;var O1=k(s=>{let{theme:i,bkgColorArray:n,borderColorArray:a}=s;if(!l1(i,a))return"";let r=c1(s.look),u=o1(n),g="";for(let l=0;l<h1(s.THEME_COLOR_LIMIT,a);l++){let D=a[l%a.length],d=u?`fill: ${n[l%n.length]};`:"",T=`[data-look="${r}"][data-color-id="color-${l}"]`,B=k(m=>`${T}.node ${m}, ${T}.rough-node ${m}`,"collapsedRule"),G=k(m=>`${T}.swimlane.cluster .swimlane-title${m}, ${T}.swimlane.cluster .swimlane-body${m}`,"laneRule");g+=`
${T}.cluster:not(.swimlane) rect {
stroke: ${D};
${d}
}
${T}.cluster:not(.swimlane) path {
stroke: ${D};
${d}
}
/* Lane, classic and neo. */
${T}.swimlane.cluster rect.swimlane-title,
${T}.swimlane.cluster rect.swimlane-body {
stroke: ${D};
${d}
}
/* Lane, handDrawn: roughjs emits the hachure fill first, then the outline. */
${G(" path:nth-of-type(2)")} {
stroke: ${D};
}
${u?`
/* A roughjs fill is drawn as lines, so the lane fill is a stroke here. */
${G(" path:first-of-type")} {
stroke: ${n[l%n.length]};
}
`:""}
${B(".collapsed-group")},
${B(".collapsed-group path")} {
stroke: ${D};
${d}
}
/* The ellipsis dots and the separator take clusterBorder further down, so without
these the container is palette-coloured while its own markers are not. */
${B(".collapsed-indicator")} {
fill: ${D};
}
${B(".collapsed-separator")} {
stroke: ${D};
}
`}return g},"genColor"),P1=k((s,i)=>{let n=qt,a=n(s,"r"),r=n(s,"g"),u=n(s,"b");return Ht(a,r,u,i)},"fade"),U1=k(s=>`${O1(s)}
.label {
font-family: ${s.fontFamily};
color: ${s.nodeTextColor||s.textColor};
}
.cluster-label text {
fill: ${s.titleColor};
}
.cluster-label span {
color: ${s.titleColor};
}
.cluster-label span p {
background-color: transparent;
}
.label text,span {
fill: ${s.nodeTextColor||s.textColor};
color: ${s.nodeTextColor||s.textColor};
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${s.mainBkg};
stroke: ${s.nodeBorder};
stroke-width: ${s.strokeWidth??1}px;
}
.rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
text-anchor: middle;
}
.node .katex path {
fill: #000;
stroke: #000;
stroke-width: 1px;
}
.rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.root .anchor path {
fill: ${s.lineColor} !important;
stroke-width: 0;
stroke: ${s.lineColor};
}
.arrowheadPath {
fill: ${s.arrowheadColor};
}
.edgePaths .path {
stroke: ${s.lineColor};
stroke-width: ${s.strokeWidth??2}px;
}
.flowchart-link {
stroke: ${s.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${s.edgeLabelBackground};
p {
background-color: ${s.edgeLabelBackground};
}
rect {
opacity: 0.5;
background-color: ${s.edgeLabelBackground};
fill: ${s.edgeLabelBackground};
}
text-align: center;
}
/* For html labels only */
.labelBkg {
background-color: ${P1(s.edgeLabelBackground,.5)};
// background-color:
}
.cluster rect {
fill: ${s.clusterBkg};
stroke: ${s.clusterBorder};
stroke-width: 1px;
}
.cluster text {
fill: ${s.titleColor};
}
.cluster span {
color: ${s.titleColor};
}
/* .cluster div {
color: ${s.titleColor};
} */
/* Collapsed subgraph node (@{ view: collapsed }) */
.node .collapsed-indicator {
fill: ${s.clusterBorder};
stroke: none;
opacity: 0.6;
}
.node .collapsed-separator {
stroke: ${s.clusterBorder};
stroke-width: 0.75px;
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${s.fontFamily};
font-size: 12px;
background: ${s.tertiaryColor};
border: 1px solid ${s.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.flowchartTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${s.textColor};
}
rect.text {
fill: none;
stroke-width: 0;
}
.icon-shape, .image-shape {
background-color: ${s.edgeLabelBackground};
p {
background-color: ${s.edgeLabelBackground};
padding: 2px;
}
.label rect {
opacity: 0.5;
background-color: ${s.edgeLabelBackground};
fill: ${s.edgeLabelBackground};
}
text-align: center;
}
${y1()}
`,"getStyles"),F1=U1;var j1=k(({styles:s=F1}={})=>({parser:x1,get db(){return new Ze},renderer:E1,styles:s,init:k(i=>{i.flowchart||(i.flowchart={}),i.flowchart.arrowMarkerAbsolute=i.arrowMarkerAbsolute,n1({flowchart:{arrowMarkerAbsolute:i.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),Bs=j1();export{F1 as a,j1 as b,Bs as c};