(n=o.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let o=r.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
+`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
+`)?"":`
+`)+n.raw,o.text+=`
+`+n.text,this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
+`)?"":`
+`)+n.raw,o.text+=`
+`+n.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let o=1/0,l=t.slice(1),u;this.options.extensions.startBlock.forEach(h=>{u=h.call({lexer:this},l),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(a=t.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let o=r.at(-1);i&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
+`)?"":`
+`)+n.raw,o.text+=`
+`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
+`)?"":`
+`)+n.raw,o.text+=`
+`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,o="";for(;t;){a||(o=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let u=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(u=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(u)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},jT=class{static{s(this,"P")}options;parser;constructor(e){this.options=e||Id}space(e){return""}code({text:e,lang:t,escaped:r}){let i=(t||"").match(Ts.notSpaceStart)?.[0],n=e.replace(Ts.endingNewline,"")+`
+`;return i?''+(r?n:_l(n,!0))+`
+`:""+(r?n:_l(n,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}
+`}hr(e){return`
+`}list(e){let t=e.ordered,r=e.start,i="";for(let o=0;o
+`+i+""+n+`>
+`}listitem(e){let t="";if(e.task){let r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+_l(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`${t}
+`}checkbox({checked:e}){return" '}paragraph({tokens:e}){return`${this.parser.parseInline(e)}
+`}table(e){let t="",r="";for(let n=0;n${i}`),`
+`}tablerow({text:e}){return`
+${e}
+`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`${r}>
+`}strong({tokens:e}){return`${this.parser.parseInline(e)} `}em({tokens:e}){return`${this.parser.parseInline(e)} `}codespan({text:e}){return`${_l(e,!0)}`}br(e){return" "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:r}){let i=this.parser.parseInline(r),n=PH(e);if(n===null)return i;e=n;let a='"+i+" ",a}image({href:e,title:t,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let n=PH(e);if(n===null)return _l(r);e=n;let a=` ",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:_l(e.text)}},FL=class{static{s(this,"$")}strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Ec=class LL{static{s(this,"l")}options;renderer;textRenderer;constructor(t){this.options=t||Id,this.options.renderer=this.options.renderer||new jT,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new FL}static parse(t,r){return new LL(r).parse(t)}static parseInline(t,r){return new LL(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n{let o=n[a].flat(1/0);r=r.concat(this.walkTokens(o,t))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=t.renderers[n.name];a?t.renderers[n.name]=function(...o){let l=n.renderer.apply(this,o);return l===!1&&(l=a.apply(this,o)),l}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[n.level];a?a.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),i.extensions=t),r.renderer){let n=this.defaults.renderer||new jT(this.defaults);for(let a in r.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,l=r.renderer[o],u=n[o];n[o]=(...h)=>{let d=l.apply(n,h);return d===!1&&(d=u.apply(n,h)),d||""}}i.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new qT(this.defaults);for(let a in r.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,l=r.tokenizer[o],u=n[o];n[o]=(...h)=>{let d=l.apply(n,h);return d===!1&&(d=u.apply(n,h)),d}}i.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new E0;for(let a in r.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,l=r.hooks[o],u=n[o];E0.passThroughHooks.has(a)?n[o]=h=>{if(this.defaults.async&&E0.passThroughHooksRespectAsync.has(a))return Promise.resolve(l.call(n,h)).then(f=>u.call(n,f));let d=l.call(n,h);return u.call(n,d)}:n[o]=(...h)=>{let d=l.apply(n,h);return d===!1&&(d=u.apply(n,h)),d}}i.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(o){let l=[];return l.push(a.call(this,o)),n&&(l=l.concat(n.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _c.lex(e,t??this.defaults)}parser(e,t){return Ec.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let i={...r},n={...this.defaults,...i},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));n.hooks&&(n.hooks.options=n,n.hooks.block=e);let o=n.hooks?n.hooks.provideLexer():e?_c.lex:_c.lexInline,l=n.hooks?n.hooks.provideParser():e?Ec.parse:Ec.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(t):t).then(u=>o(u,n)).then(u=>n.hooks?n.hooks.processAllTokens(u):u).then(u=>n.walkTokens?Promise.all(this.walkTokens(u,n.walkTokens)).then(()=>u):u).then(u=>l(u,n)).then(u=>n.hooks?n.hooks.postprocess(u):u).catch(a);try{n.hooks&&(t=n.hooks.preprocess(t));let u=o(t,n);n.hooks&&(u=n.hooks.processAllTokens(u)),n.walkTokens&&this.walkTokens(u,n.walkTokens);let h=l(u,n);return n.hooks&&(h=n.hooks.postprocess(h)),h}catch(u){return a(u)}}}onError(e,t){return r=>{if(r.message+=`
+Please report this to https://github.com/markedjs/marked.`,e){let i="An error occurred:
"+_l(r.message+"",!0)+" ";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}},Dd=new y4t;s($r,"d");$r.options=$r.setOptions=function(e){return Dd.setOptions(e),$r.defaults=Dd.defaults,VH($r.defaults),$r};$r.getDefaults=DL;$r.defaults=Id;$r.use=function(...e){return Dd.use(...e),$r.defaults=Dd.defaults,VH($r.defaults),$r};$r.walkTokens=function(e,t){return Dd.walkTokens(e,t)};$r.parseInline=Dd.parseInline;$r.Parser=Ec;$r.parser=Ec.parse;$r.Renderer=jT;$r.TextRenderer=FL;$r.Lexer=_c;$r.lexer=_c.lex;$r.Tokenizer=qT;$r.Hooks=E0;$r.parse=$r;l2e=$r.options,c2e=$r.setOptions,u2e=$r.use,h2e=$r.walkTokens,d2e=$r.parseInline,f2e=Ec.parse,p2e=_c.lex});function x4t(e,{markdownAutoWrap:t}){let i=e.replace(/ /g,`
+`).replace(/\n{2,}/g,`
+`);return M2(i)}function ZH(e){return e.split(/\\n|\n| /gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}function JH(e,t={}){let r=x4t(e,t),i=$r.lexer(r),n=[[]],a=0;function o(l,u="normal"){l.type==="text"?l.text.split(`
+`).forEach((d,f)=>{f!==0&&(a++,n.push([])),d.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&n[a].push({content:p,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{o(h,l.type)}):l.type==="html"&&n[a].push({content:l.text,type:"normal"})}return s(o,"processNode"),i.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(u=>{o(u)}):l.type==="html"?n[a].push({content:l.text,type:"normal"}):n[a].push({content:l.raw,type:"normal"})}),n}function tY(e){return e?`${e.replace(/\\n|\n/g," ")}
`:""}function eY(e,{markdownAutoWrap:t}={}){let r=$r.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g," ").replace(/ /g," "):n.text.replace(/\n */g," "):n.type==="strong"?`${n.tokens?.map(i).join("")} `:n.type==="em"?`${n.tokens?.map(i).join("")} `:n.type==="paragraph"?`${n.tokens?.map(i).join("")}
`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(z.warn(`Unsupported markdown: ${n.type}`),n.raw)}return s(i,"output"),r.map(i).join("")}var rY=b(()=>{"use strict";QH();Y3();Jt();s(x4t,"preprocessMarkdown");s(ZH,"nonMarkdownToLines");s(JH,"markdownToLines");s(tY,"nonMarkdownToHTML");s(eY,"markdownToHTML")});function b4t(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function k4t(e,t){let r=b4t(t.content);return iY(e,[],r,t.type)}function iY(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];let[n,...a]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?iY(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}function nY(e,t){if(e.some(({content:r})=>r.includes(`
+`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return VL(e,t)}function VL(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());let a=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),t(o))return VL(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){let[l,u]=k4t(t,a);r.push([l]),u.content&&e.unshift(u)}return VL(e,t,r)}var sY=b(()=>{"use strict";s(b4t,"splitTextToChars");s(k4t,"splitWordToFitWidth");s(iY,"splitWordToFitWidthRecursion");s(nY,"splitLineToFitWidth");s(VL,"splitLineToFitWidthRecursion")});function aY(e,t){t&&e.attr("style",t)}async function T4t(e,t,r,i,n=!1,a=le()){let o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,oY)}px`),o.attr("height",`${Math.min(10*r,oY)}px`);let l=o.append("xhtml:div"),u=Ci(t.label)?await xp(t.label.replace(qt.lineBreakRegex,`
+`),a):nr(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(u),aY(d,t.labelStyle),d.attr("class",`${h} ${i}`),aY(l,t.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&l.attr("class","labelBkg");let f=l.node().getBoundingClientRect();return f.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),f=l.node().getBoundingClientRect()),o.node()}function zL(e,t,r,i=!1){let n=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}function C4t(e,t,r){let i=e.append("text"),n=zL(i,1,t);GL(n,r);let a=n.node().getComputedTextLength();return i.remove(),a}function cY(e,t,r){let i=e.append("text"),n=zL(i,1,t);GL(n,[{content:r,type:"normal"}]);let a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}function S4t(e,t,r,i=!1,n=!1){let o=t.append("g"),l=o.insert("rect").attr("class","background").attr("style","stroke: none"),u=o.append("text").attr("y","-10.1");n&&u.attr("text-anchor","middle");let h=0;for(let d of r){let f=s(m=>C4t(o,1.1,m)<=e,"checkWidth"),p=f(d)?[d]:nY(d,f);for(let m of p){let g=zL(u,h,1.1,n);GL(g,m),h++}}if(i){let d=u.node().getBBox(),f=2;return l.attr("x",d.x-f).attr("y",d.y-f).attr("width",d.width+2*f).attr("height",d.height+2*f),o.node()}else return u.node()}function lY(e){let t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}function GL(e,t){e.text(""),t.forEach((r,i)=>{let n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(lY(r.content)):n.text(" "+lY(r.content))})}async function w4t(e,t={}){let r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,o)=>(r.push((async()=>{let l=`${a}:${o}`;return await fF(l)?await ll(l,void 0,{class:"label-icon"}):` `})()),n));let i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}var oY,zi,Xa=b(()=>{"use strict";lr();fr();Jt();rY();Re();Zh();sY();Qe();s(aY,"applyStyle");oY=16384;s(T4t,"addHtmlSpan");s(zL,"createTspan");s(C4t,"computeWidthOfText");s(cY,"computeDimensionOfText");s(S4t,"createFormattedText");s(lY,"decodeHTMLEntities");s(GL,"updateTextContentAndStyles");s(w4t,"replaceIconSubstring");zi=s(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,markdown:o=!0,isNode:l=!0,width:u=200,addSvgBackground:h=!1}={},d)=>{if(z.debug("XYZ createText",t,r,i,n,a,l,"addSvgBackground: ",h),a){let f=o?eY(t,d):tY(t),p=await w4t(ks(f),d),m=t.replace(/\\\\/g,"\\"),g={isNode:l,label:Ci(t)?m:p,labelStyle:r.replace("fill:","color:")};return await T4t(e,g,u,n,h,d)}else{let f=ks(t.replace(/ /g," ")),p=o?JH(f.replace(" "," "),d):ZH(f),m=S4t(u,e,p,t?h:!1,!l);if(l){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");vt(m).attr("style",g)}else{let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");vt(m).select("rect").attr("style",g.replace(/background:/g,"fill:"));let y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");vt(m).select("text").attr("style",y)}return i?vt(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):vt(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText")});async function YT(e,t){let r=e.getElementsByTagName("img");if(!r||r.length===0)return;let i=t.replace(/ ]*>/g,"").trim()==="";await Promise.all([...r].map(n=>new Promise(a=>{function o(){if(n.style.display="flex",n.style.flexDirection="column",i){let l=Q().fontSize?Q().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[h=Ue.fontSize]=Gs(l),d=h*u+"px";n.style.minWidth=d,n.style.maxWidth=d}else n.style.width="100%";a(n)}s(o,"setupImage"),setTimeout(()=>{n.complete&&o()}),n.addEventListener("error",o),n.addEventListener("load",o)})))}var WL=b(()=>{"use strict";ye();ps();Re();s(YT,"configureLabelImages")});function _e(e){let t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function Ka(e,t,r,i,n,a){let o=[],u=r-e,h=i-t,d=u/a,f=2*Math.PI/d,p=t+h/2;for(let m=0;m<=50;m++){let g=m/50,y=e+g*u,x=p+n*Math.sin(f*(y-e));o.push({x:y,y:x})}return o}function Nd(e,t,r,i,n,a){let o=[],l=n*Math.PI/180,d=(a*Math.PI/180-l)/(i-1);for(let f=0;fu.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");r.setAttribute("d",i);let n=t.find(u=>u.getAttribute("fill")!=="none"),a=t.find(u=>u.getAttribute("stroke")!=="none"),o=s((u,h)=>u?.getAttribute(h)??void 0,"getAttr");if(n){let u={fill:o(n,"fill"),"fill-opacity":o(n,"fill-opacity")??"1"};Object.entries(u).forEach(([h,d])=>{d&&r.setAttribute(h,d)})}if(a){let u={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(u).forEach(([h,d])=>{d&&r.setAttribute(h,d)})}let l=document.createElementNS("http://www.w3.org/2000/svg","g");return l.appendChild(r),l}var Qt,XT,Vt,Kt,de=b(()=>{"use strict";Xa();ye();Qe();lr();fr();Re();WL();Qt=s(async(e,t,r)=>{let i,n=t.useHtmlLabels||Kn(Q()?.htmlLabels);r?i=r:i="node default";let a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Pr(t.labelStyle)),l;t.label===void 0?l="":l=typeof t.label=="string"?t.label:t.label[0];let u=!!t.icon||!!t.img,h=t.labelType==="markdown",d=await zi(o,nr(ks(l),Q()),{useHtmlLabels:n,width:t.width||Q().flowchart?.wrappingWidth,classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:u,markdown:h},Q()),f=d.getBBox(),p=(t?.padding??0)/2;if(n){let m=d.children[0],g=vt(d);await YT(m,l),f=m.getBoundingClientRect(),g.attr("width",f.width),g.attr("height",f.height)}return n?o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):o.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:f,halfPadding:p,label:o}},"labelHelper"),XT=s(async(e,t,r)=>{let i=r.useHtmlLabels??Ke(Q()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await zi(n,nr(ks(t),Q()),{useHtmlLabels:i,width:r.width||Q()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),o=a.getBBox(),l=r.padding/2;if(Ke(Q())){let u=a.children[0],h=vt(a);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:l,label:n}},"insertLabel"),Vt=s((e,t)=>{let r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Kt=s((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");s(_e,"createPathFromPoints");s(Ka,"generateFullSineWavePoints");s(Nd,"generateCirclePoints");s(qL,"mergePaths")});function _4t(e,t){return e.intersect(t)}var uY,hY=b(()=>{"use strict";s(_4t,"intersectNode");uY=_4t});function E4t(e,t,r,i){var n=e.x,a=e.y,o=n-i.x,l=a-i.y,u=Math.sqrt(t*t*l*l+r*r*o*o),h=Math.abs(t*r*o/u);i.x{"use strict";s(E4t,"intersectEllipse");KT=E4t});function v4t(e,t,r){return KT(e,t,t,r)}var dY,fY=b(()=>{"use strict";jL();s(v4t,"intersectCircle");dY=v4t});function A4t(e,t,r,i){{let n=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,l=n*r.x+a*r.y+o,u=n*i.x+a*i.y+o,h=1e-6;if(l!==0&&u!==0&&pY(l,u))return;let d=i.y-r.y,f=r.x-i.x,p=i.x*r.y-r.x*i.y,m=d*e.x+f*e.y+p,g=d*t.x+f*t.y+p;if(Math.abs(m)0}var mY,gY=b(()=>{"use strict";s(A4t,"intersectLine");s(pY,"sameSign");mY=A4t});function R4t(e,t,r){let i=e.x,n=e.y,a=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){o=Math.min(o,d.x),l=Math.min(l,d.y)}):(o=Math.min(o,t.x),l=Math.min(l,t.y));let u=i-e.width/2-o,h=n-e.height/2-l;for(let d=0;d1&&a.sort(function(d,f){let p=d.x-r.x,m=d.y-r.y,g=Math.sqrt(p*p+m*m),y=f.x-r.x,x=f.y-r.y,k=Math.sqrt(y*y+x*x);return g{"use strict";gY();s(R4t,"intersectPolygon");yY=R4t});var L4t,$u,UL=b(()=>{"use strict";L4t=s((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,l=e.height/2,u,h;return Math.abs(a)*o>Math.abs(n)*l?(a<0&&(l=-l),u=a===0?0:l*n/a,h=l):(n<0&&(o=-o),u=o,h=n===0?0:o*a/n),{x:r+u,y:i+h}},"intersectRect"),$u=L4t});var Mt,be=b(()=>{"use strict";hY();fY();jL();xY();UL();Mt={node:uY,circle:dY,ellipse:KT,polygon:yY,rect:$u}});var bY,El,D4t,R0,Pt,zt,I4t,me=b(()=>{"use strict";ye();bY=s(e=>{let{handDrawnSeed:t}=Q();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),El=s(e=>{let t=D4t([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),D4t=s(e=>{let t=new Map;return e.forEach(r=>{let[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),R0=s(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Pt=s(e=>{let{stylesArray:t}=El(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{let l=o[0];R0(l)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),l.includes("stroke")&&n.push(o.join(":")+" !important"),l==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),zt=s((e,t)=>{let{themeVariables:r,handDrawnSeed:i}=Q(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=El(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:I4t(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),I4t=s(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let n=isNaN(t[0])?0:t[0];return[n,n]}let r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray")});function HL(e,t,r){if(e&&e.length){let[i,n]=t,a=Math.PI/180*r,o=Math.cos(a),l=Math.sin(a);for(let u of e){let[h,d]=u;u[0]=(h-i)*o-(d-n)*l+i,u[1]=(h-i)*l+(d-n)*o+n}}}function N4t(e,t){return e[0]===t[0]&&e[1]===t[1]}function O4t(e,t,r,i=1){let n=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,l=[0,0];if(n)for(let h of o)HL(h,l,n);let u=(function(h,d,f){let p=[];for(let T of h){let C=[...T];N4t(C[0],C[C.length-1])||C.push([C[0][0],C[0][1]]),C.length>2&&p.push(C)}let m=[];d=Math.max(d,.1);let g=[];for(let T of p)for(let C=0;CT.yminC.ymin?1:T.xC.x?1:T.ymax===C.ymax?0:(T.ymax-C.ymax)/Math.abs(T.ymax-C.ymax))),!g.length)return m;let y=[],x=g[0].ymin,k=0;for(;y.length||g.length;){if(g.length){let T=-1;for(let C=0;Cx);C++)T=C;g.splice(0,T+1).forEach((C=>{y.push({s:x,edge:C})}))}if(y=y.filter((T=>!(T.edge.ymax<=x))),y.sort(((T,C)=>T.edge.x===C.edge.x?0:(T.edge.x-C.edge.x)/Math.abs(T.edge.x-C.edge.x))),(f!==1||k%d==0)&&y.length>1)for(let T=0;T=y.length)break;let _=y[T].edge,S=y[C].edge;m.push([[Math.round(_.x),x],[Math.round(S.x),x]])}x+=f,y.forEach((T=>{T.edge.x=T.edge.x+f*T.edge.islope})),k++}return m})(o,a,i);if(n){for(let h of o)HL(h,l,-n);(function(h,d,f){let p=[];h.forEach((m=>p.push(...m))),HL(p,d,f)})(u,l,-n)}return u}function N0(e,t){var r;let i=t.hachureAngle+90,n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),O4t(e,n,i,a||1)}function sC(e){let t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}function XL(e,t){return e.type===t}function cD(e){let t=[],r=(function(o){let l=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:M4t,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:YL,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return l[l.length]={type:kY,text:""},l})(e),i="BOD",n=0,a=r[n];for(;!XL(a,kY);){let o=0,l=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return cD("M0,0"+e);n++,o=QT[a.text],i=a.text}else XL(a,YL)?o=QT[i]:(n++,o=QT[a.text],i=a.text);if(!(n+od%2?h+r:h+t));a.push({key:"C",data:u}),t=u[4],r=u[5];break}case"Q":a.push({key:"Q",data:[...l]}),t=l[2],r=l[3];break;case"q":{let u=l.map(((h,d)=>d%2?h+r:h+t));a.push({key:"Q",data:u}),t=u[2],r=u[3];break}case"A":a.push({key:"A",data:[...l]}),t=l[5],r=l[6];break;case"a":t+=l[5],r+=l[6],a.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],t,r]});break;case"H":a.push({key:"H",data:[...l]}),t=l[0];break;case"h":t+=l[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...l]}),t=l[2],r=l[3];break;case"s":{let u=l.map(((h,d)=>d%2?h+r:h+t));a.push({key:"S",data:u}),t=u[2],r=u[3];break}case"T":a.push({key:"T",data:[...l]}),t=l[0],r=l[1];break;case"t":t+=l[0],r+=l[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function RY(e){let t=[],r="",i=0,n=0,a=0,o=0,l=0,u=0;for(let{key:h,data:d}of e){switch(h){case"M":t.push({key:"M",data:[...d]}),[i,n]=d,[a,o]=d;break;case"C":t.push({key:"C",data:[...d]}),i=d[4],n=d[5],l=d[2],u=d[3];break;case"L":t.push({key:"L",data:[...d]}),[i,n]=d;break;case"H":i=d[0],t.push({key:"L",data:[i,n]});break;case"V":n=d[0],t.push({key:"L",data:[i,n]});break;case"S":{let f=0,p=0;r==="C"||r==="S"?(f=i+(i-l),p=n+(n-u)):(f=i,p=n),t.push({key:"C",data:[f,p,...d]}),l=d[0],u=d[1],i=d[2],n=d[3];break}case"T":{let[f,p]=d,m=0,g=0;r==="Q"||r==="T"?(m=i+(i-l),g=n+(n-u)):(m=i,g=n);let y=i+2*(m-i)/3,x=n+2*(g-n)/3,k=f+2*(m-f)/3,T=p+2*(g-p)/3;t.push({key:"C",data:[y,x,k,T,f,p]}),l=m,u=g,i=f,n=p;break}case"Q":{let[f,p,m,g]=d,y=i+2*(f-i)/3,x=n+2*(p-n)/3,k=m+2*(f-m)/3,T=g+2*(p-g)/3;t.push({key:"C",data:[y,x,k,T,m,g]}),l=f,u=p,i=m,n=g;break}case"A":{let f=Math.abs(d[0]),p=Math.abs(d[1]),m=d[2],g=d[3],y=d[4],x=d[5],k=d[6];f===0||p===0?(t.push({key:"C",data:[i,n,x,k,x,k]}),i=x,n=k):(i!==x||n!==k)&&(LY(i,n,x,k,f,p,m,g,y).forEach((function(T){t.push({key:"C",data:T})})),i=x,n=k);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=o}r=h}return t}function L0(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function LY(e,t,r,i,n,a,o,l,u,h){let d=(f=o,Math.PI*f/180);var f;let p=[],m=0,g=0,y=0,x=0;if(h)[m,g,y,x]=h;else{[e,t]=L0(e,t,-d),[r,i]=L0(r,i,-d);let B=(e-r)/2,O=(t-i)/2,R=B*B/(n*n)+O*O/(a*a);R>1&&(R=Math.sqrt(R),n*=R,a*=R);let N=n*n,P=a*a,E=N*P-N*O*O-P*B*B,D=N*O*O+P*B*B,V=(l===u?-1:1)*Math.sqrt(Math.abs(E/D));y=V*n*O/a+(e+r)/2,x=V*-a*B/n+(t+i)/2,m=Math.asin(parseFloat(((t-x)/a).toFixed(9))),g=Math.asin(parseFloat(((i-x)/a).toFixed(9))),eg&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let k=g-m;if(Math.abs(k)>120*Math.PI/180){let B=g,O=r,R=i;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=LY(r=y+n*Math.cos(g),i=x+a*Math.sin(g),O,R,n,a,o,0,u,[g,B,y,x])}k=g-m;let T=Math.cos(m),C=Math.sin(m),_=Math.cos(g),S=Math.sin(g),w=Math.tan(k/4),A=4/3*n*w,v=4/3*a*w,M=[e,t],$=[e+A*C,t-v*T],I=[r+A*S,i-v*_],F=[r,i];if($[0]=2*M[0]-$[0],$[1]=2*M[1]-$[1],h)return[$,I,F].concat(p);{p=[$,I,F].concat(p);let B=[];for(let O=0;O2){let n=[];for(let a=0;a2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,x=Math.min(y/2,(g-m)/2),k=EY(x,h,d,f,p,m,g,1,u);if(!u.disableMultiStroke){let T=EY(x,h,d,f,p,m,g,1.5,u);k.push(...T)}return o&&(l?k.push(...Fu(h,d,h+f*Math.cos(m),d+p*Math.sin(m),u),...Fu(h,d,h+f*Math.cos(g),d+p*Math.sin(g),u)):k.push({op:"lineTo",data:[h,d]},{op:"lineTo",data:[h+f*Math.cos(m),d+p*Math.sin(m)]})),{type:"path",ops:k}}function SY(e,t){let r=RY(AY(cD(e))),i=[],n=[0,0],a=[0,0];for(let{key:o,data:l}of r)switch(o){case"M":a=[l[0],l[1]],n=[l[0],l[1]];break;case"L":i.push(...Fu(a[0],a[1],l[0],l[1],t)),a=[l[0],l[1]];break;case"C":{let[u,h,d,f,p,m]=l;i.push(...$4t(u,h,d,f,p,m,a,t)),a=[p,m];break}case"Z":i.push(...Fu(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function KL(e,t){let r=[];for(let i of e)if(i.length){let n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Pe(n,t),i[0][1]+Pe(n,t)]});for(let o=1;o500?.4:-.0016668*u+1.233334;let d=n.maxRandomnessOffset||0;d*d*100>l&&(d=u/10);let f=d/2,p=.2+.2*NY(n),m=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;m=Pe(m,n,h),g=Pe(g,n,h);let y=[],x=s(()=>Pe(f,n,h),"M"),k=s(()=>Pe(d,n,h),"k"),T=n.preserveVertices;return a&&(o?y.push({op:"move",data:[e+(T?0:x()),t+(T?0:x())]}):y.push({op:"move",data:[e+(T?0:Pe(d,n,h)),t+(T?0:Pe(d,n,h))]})),o?y.push({op:"bcurveTo",data:[m+e+(r-e)*p+x(),g+t+(i-t)*p+x(),m+e+2*(r-e)*p+x(),g+t+2*(i-t)*p+x(),r+(T?0:x()),i+(T?0:x())]}):y.push({op:"bcurveTo",data:[m+e+(r-e)*p+k(),g+t+(i-t)*p+k(),m+e+2*(r-e)*p+k(),g+t+2*(i-t)*p+k(),r+(T?0:k()),i+(T?0:k())]}),y}function ZT(e,t,r){if(!e.length)return[];let i=[];i.push([e[0][0]+Pe(t,r),e[0][1]+Pe(t,r)]),i.push([e[0][0]+Pe(t,r),e[0][1]+Pe(t,r)]);for(let n=1;n3){let a=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let l=1;l+21&&n.push(l)):n.push(l),n.push(e[t+3])}else{let u=e[t+0],h=e[t+1],d=e[t+2],f=e[t+3],p=Od(u,h,.5),m=Od(h,d,.5),g=Od(d,f,.5),y=Od(p,m,.5),x=Od(m,g,.5),k=Od(y,x,.5);aD([u,p,y,k],0,r,n),aD([k,x,g,f],0,r,n)}var a,o;return n}function V4t(e,t){return nC(e,0,e.length,t)}function nC(e,t,r,i,n){let a=n||[],o=e[t],l=e[r-1],u=0,h=1;for(let d=t+1;du&&(u=f,h=d)}return Math.sqrt(u)>i?(nC(e,t,h+1,i,a),nC(e,h,r,i,a)):(a.length||a.push(o),a.push(l)),a}function QL(e,t=.15,r){let i=[],n=(e.length-1)/3;for(let a=0;a0?nC(i,0,i.length,r):i}var I0,ZL,JL,tD,eD,rD,Us,iD,M4t,YL,kY,QT,B4t,ka,gm,oD,JT,lD,$t,xe=b(()=>{"use strict";s(HL,"t");s(N4t,"e");s(O4t,"s");s(N0,"n");I0=class{static{s(this,"o")}constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){let i=N0(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){let i=[];for(let n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}};s(sC,"a");ZL=class extends I0{static{s(this,"h")}fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let n=N0(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],l=.5*i*Math.cos(a),u=.5*i*Math.sin(a);for(let[h,d]of n)sC([h,d])&&o.push([[h[0]-l,h[1]+u],[...d]],[[h[0]+l,h[1]-u],[...d]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}},JL=class extends I0{static{s(this,"r")}fillPolygons(t,r){let i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}},tD=class{static{s(this,"i")}constructor(t){this.helper=t}fillPolygons(t,r){let i=N0(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){let i=[],n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let o=n/4;for(let l of t){let u=sC(l),h=u/n,d=Math.ceil(h)-1,f=u-d*n,p=(l[0][0]+l[1][0])/2-n/4,m=Math.min(l[0][1],l[1][1]);for(let g=0;g{let l=sC(o),u=Math.floor(l/(i+n)),h=(l+n-u*(i+n))/2,d=o[0],f=o[1];d[0]>f[0]&&(d=o[1],f=o[0]);let p=Math.atan((f[1]-d[1])/(f[0]-d[0]));for(let m=0;m{let o=sC(a),l=Math.round(o/(2*r)),u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);let d=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let f=0;f2*Math.PI&&(A=0,v=2*Math.PI);let M=(v-A)/T.curveStepCount,$=[];for(let I=A;I<=v;I+=M)$.push([C+S*Math.cos(I),_+w*Math.sin(I)]);return $.push([C+S*Math.cos(v),_+w*Math.sin(v)]),$.push([C,_]),mm([$],T)})(t,r,i,n,a,o,h));return h.stroke!==ka&&d.push(f),this._d("arc",d,h)}curve(t,r){let i=this._o(r),n=[],a=TY(t,i);if(i.fill&&i.fill!==ka)if(i.fillStyle==="solid"){let o=TY(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{let o=[],l=t;if(l.length){let u=typeof l[0][0]=="number"?[l]:l;for(let h of u)h.length<3?o.push(...h):h.length===3?o.push(...QL(vY([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...QL(vY(h),10,(1+i.roughness)/2))}o.length&&n.push(mm([o],i))}return i.stroke!==ka&&n.push(a),this._d("curve",n,i)}polygon(t,r){let i=this._o(r),n=[],a=tC(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(KL([t],i)):n.push(mm([t],i))),i.stroke!==ka&&n.push(a),this._d("polygon",n,i)}path(t,r){let i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=i.fill&&i.fill!=="transparent"&&i.fill!==ka,o=i.stroke!==ka,l=!!(i.simplification&&i.simplification<1),u=(function(d,f,p){let m=RY(AY(cD(d))),g=[],y=[],x=[0,0],k=[],T=s(()=>{k.length>=4&&y.push(...QL(k,f)),k=[]},"i"),C=s(()=>{T(),y.length&&(g.push(y),y=[])},"c");for(let{key:S,data:w}of m)switch(S){case"M":C(),x=[w[0],w[1]],y.push(x);break;case"L":T(),y.push([w[0],w[1]]);break;case"C":if(!k.length){let A=y.length?y[y.length-1]:x;k.push([A[0],A[1]])}k.push([w[0],w[1]]),k.push([w[2],w[3]]),k.push([w[4],w[5]]);break;case"Z":T(),y.push([x[0],x[1]])}if(C(),!p)return g;let _=[];for(let S of g){let w=V4t(S,p);w.length&&_.push(w)}return _})(t,1,l?4-4*(i.simplification||1):(1+i.roughness)/2),h=SY(t,i);if(a)if(i.fillStyle==="solid")if(u.length===1){let d=SY(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else n.push(KL(u,i));else n.push(mm(u,i));return o&&(l?u.forEach((d=>{n.push(tC(d,!1,i))})):n.push(h)),this._d("path",n,i)}opsToPath(t,r){let i="";for(let n of t.ops){let a=typeof r=="number"&&r>=0?n.data.map((o=>+o.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){let r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(let a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ka};break;case"fillPath":o={d:this.opsToPath(a),stroke:ka,strokeWidth:0,fill:i.fill||ka};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ka,strokeWidth:i,fill:ka}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}},oD=class{static{s(this,"st")}constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new gm(r)}draw(t){let r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(let o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";let l=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,l),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(let a of r.ops){let o=typeof i=="number"&&i>=0?a.data.map((l=>+l.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){let o=this.gen.line(t,r,i,n,a);return this.draw(o),o}rectangle(t,r,i,n,a){let o=this.gen.rectangle(t,r,i,n,a);return this.draw(o),o}ellipse(t,r,i,n,a){let o=this.gen.ellipse(t,r,i,n,a);return this.draw(o),o}circle(t,r,i,n){let a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){let i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){let i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,o,l=!1,u){let h=this.gen.arc(t,r,i,n,a,o,l,u);return this.draw(h),h}curve(t,r){let i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){let i=this.gen.path(t,r);return this.draw(i),i}},JT="http://www.w3.org/2000/svg",lD=class{static{s(this,"ot")}constructor(t,r){this.svg=t,this.gen=new gm(r)}draw(t){let r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(JT,"g"),o=t.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=n.createElementNS(JT,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke",i.stroke),u.setAttribute("stroke-width",i.strokeWidth+""),u.setAttribute("fill","none"),i.strokeLineDash&&u.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":u=n.createElementNS(JT,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(n,l,i)}u&&a.appendChild(u)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);let a=t.createElementNS(JT,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){let o=this.gen.line(t,r,i,n,a);return this.draw(o)}rectangle(t,r,i,n,a){let o=this.gen.rectangle(t,r,i,n,a);return this.draw(o)}ellipse(t,r,i,n,a){let o=this.gen.ellipse(t,r,i,n,a);return this.draw(o)}circle(t,r,i,n){let a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){let i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){let i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,o,l=!1,u){let h=this.gen.arc(t,r,i,n,a,o,l,u);return this.draw(h)}curve(t,r){let i=this.gen.curve(t,r);return this.draw(i)}path(t,r){let i=this.gen.path(t,r);return this.draw(i)}},$t={canvas:s((e,t)=>new oD(e,t),"canvas"),svg:s((e,t)=>new lD(e,t),"svg"),generator:s(e=>new gm(e),"generator"),newSeed:s(()=>gm.newSeed(),"newSeed")}});function OY(e,t){let{labelStyles:r}=Pt(t);t.labelStyle=r;let i=Kt(t),n=i;i||(n="anchor");let a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:l}=t,u=$t.svg(a),h=zt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);let d=u.circle(0,0,o*2,h),f=a.insert(()=>d,":first-child");return f.attr("class","anchor").attr("style",Pr(l)),Vt(t,f),t.intersect=function(p){return z.info("Circle intersect",t,o,p),Mt.circle(t,o,p)},a}var MY=b(()=>{"use strict";Jt();de();be();me();xe();Re();s(OY,"anchor")});function BY(e,t,r,i,n,a,o){let u=(e+r)/2,h=(t+i)/2,d=Math.atan2(i-t,r-e),f=(r-e)/2,p=(i-t)/2,m=f/n,g=p/a,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let x=Math.sqrt(1-y**2),k=u+x*a*Math.sin(d)*(o?-1:1),T=h-x*n*Math.cos(d)*(o?-1:1),C=Math.atan2((t-T)/a,(e-k)/n),S=Math.atan2((i-T)/a,(r-k)/n)-C;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);let w=[];for(let A=0;A<20;A++){let v=A/19,M=C+v*S,$=k+n*Math.cos(M),I=T+a*Math.sin(M);w.push({x:$,y:I})}return w}function z4t(e,t,r){let[i,n]=[t,r].sort((a,o)=>o-a);return n*(1-Math.sqrt(1-(e/i/2)**2))}async function PY(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n,l=s(M=>M+o,"calcTotalHeight"),u=s(M=>{let $=M/2;return[$/(2.5+M/50),$]},"calcEllipseRadius"),{shapeSvg:h,bbox:d}=await Qt(e,t,Kt(t)),f=l(t?.height?t?.height:d.height),[p,m]=u(f),g=z4t(f,p,m),x=(t?.width?t?.width:d.width)+a*2+g-g,k=f,{cssStyles:T}=t,C=[{x:x/2,y:-k/2},{x:-x/2,y:-k/2},...BY(-x/2,-k/2,-x/2,k/2,p,m,!1),{x:x/2,y:k/2},...BY(x/2,k/2,x/2,-k/2,p,m,!0)],_=$t.svg(h),S=zt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let w=_e(C),A=_.path(w,S),v=h.insert(()=>A,":first-child");return v.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",T),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${p/2}, 0)`),Vt(t,v),t.intersect=function(M){return Mt.polygon(t,C,M)},h}var $Y=b(()=>{"use strict";de();be();me();xe();s(BY,"generateArcPoints");s(z4t,"calculateArcSagitta");s(PY,"bowTieRect")});function ts(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var vc=b(()=>{"use strict";s(ts,"insertPolygonShape")});async function FY(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?28:n,o=t.look==="neo"?24:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.width??u.width)+(t.look==="neo"?a*2:a+aC),d=(t?.height??u.height)+(t.look==="neo"?o*2:o),f=0,p=h,m=-d,g=0,y=[{x:f+aC,y:m},{x:p,y:m},{x:p,y:g},{x:f,y:g},{x:f,y:m+aC},{x:f+aC,y:m}],x,{cssStyles:k}=t;if(t.look==="handDrawn"){let T=$t.svg(l),C=zt(t,{}),_=_e(y),S=T.path(_,C);x=l.insert(()=>S,":first-child").attr("transform",`translate(${-h/2}, ${d/2})`),k&&x.attr("style",k)}else x=ts(l,h,d,y);return i&&x.attr("style",i),Vt(t,x),t.intersect=function(T){return Mt.polygon(t,y,T)},l}var aC,VY=b(()=>{"use strict";de();be();me();xe();vc();de();aC=12;s(FY,"card")});function zY(e,t){let{nodeStyles:r}=Pt(t);t.label="";let i=e.insert("g").attr("class",Kt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],l=$t.svg(i),u=zt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=_e(o),d=l.path(h,u),f=i.insert(()=>d,":first-child");return n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return Mt.polygon(t,o,p)},i}var GY=b(()=>{"use strict";be();xe();me();de();s(zY,"choice")});async function oC(e,t,r){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i;let{shapeSvg:a,bbox:o,halfPadding:l}=await Qt(e,t,Kt(t)),u=16,h=r?.padding??l,d=t.look==="neo"?o.width/2+u*2:o.width/2+h,f,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=$t.svg(a),g=zt(t,{}),y=m.circle(0,0,d*2,g);f=a.insert(()=>y,":first-child"),f.attr("class","basic label-container").attr("style",Pr(p))}else f=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0);return Vt(t,f),t.calcIntersect=function(m,g){let y=m.width/2;return Mt.circle(m,y,g)},t.intersect=function(m){return z.info("Circle intersect",t,d,m),Mt.circle(t,d,m)},a}var uD=b(()=>{"use strict";xe();Jt();Re();be();me();de();s(oC,"circle")});function G4t(e){let t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},l={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${l.x},${l.y}
+ M ${n.x},${n.y} L ${o.x},${o.y}`}function WY(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r,t.label="";let n=e.insert("g").attr("class",Kt(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,l=$t.svg(n),u=zt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=l.circle(0,0,a*2,u),d=G4t(a),f=l.path(d,u),p=n.insert(()=>h,":first-child");return p.insert(()=>f),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Vt(t,p),t.intersect=function(m){return z.info("crossedCircle intersect",t,{radius:a,point:m}),Mt.circle(t,a,m)},n}var qY=b(()=>{"use strict";Jt();de();me();xe();be();s(G4t,"createLine");s(WY,"crossedCircle")});function Vu(e,t,r,i=100,n=0,a=180){let o=[],l=n*Math.PI/180,d=(a*Math.PI/180-l)/(i-1);for(let f=0;fS,":first-child").attr("stroke-opacity",0),w.insert(()=>C,":first-child"),w.attr("class","text"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${f}, 0)`),o.attr("transform",`translate(${-h/2+f-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,w),t.intersect=function(A){return Mt.polygon(t,g,A)},n}var UY=b(()=>{"use strict";de();be();me();xe();s(Vu,"generateCirclePoints");s(jY,"curlyBraceLeft")});function zu(e,t,r,i=100,n=0,a=180){let o=[],l=n*Math.PI/180,d=(a*Math.PI/180-l)/(i-1);for(let f=0;fS,":first-child").attr("stroke-opacity",0),w.insert(()=>C,":first-child"),w.attr("class","text"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-f}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,w),t.intersect=function(A){return Mt.polygon(t,g,A)},n}var YY=b(()=>{"use strict";de();be();me();xe();s(zu,"generateCirclePoints");s(HY,"curlyBraceRight")});function es(e,t,r,i=100,n=0,a=180){let o=[],l=n*Math.PI/180,d=(a*Math.PI/180-l)/(i-1);for(let f=0;fM,":first-child").attr("stroke-opacity",0),$.insert(()=>_,":first-child"),$.insert(()=>A,":first-child"),$.attr("class","text"),p&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),$.attr("transform",`translate(${f-f/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,$),t.intersect=function(I){return Mt.polygon(t,y,I)},n}var KY=b(()=>{"use strict";de();be();me();xe();s(es,"generateCirclePoints");s(XY,"curlyBraces")});async function QY(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n,l=20,u=5,{shapeSvg:h,bbox:d}=await Qt(e,t,Kt(t)),f=Math.max(l,(d.width+a*2)*1.25,t?.width??0),p=Math.max(u,d.height+o*2,t?.height??0),m=p/2,{cssStyles:g}=t,y=$t.svg(h),x=zt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=f,T=p,C=k-m,_=T/4,S=[{x:C,y:0},{x:_,y:0},{x:0,y:T/2},{x:_,y:T},{x:C,y:T},...Nd(-C,-T/2,m,50,270,90)],w=_e(S),A=y.path(w,x),v=h.insert(()=>A,":first-child");return v.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-f/2}, ${-p/2})`),Vt(t,v),t.intersect=function(M){return Mt.polygon(t,S,M)},h}var ZY=b(()=>{"use strict";de();be();me();xe();s(QY,"curvedTrapezoid")});async function eX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?24:n,o=t.look==="neo"?24:n;if(t.width||t.height){let x=t.width??0;t.width=(t.width??0)-o,t.widthS,":first-child"),g=l.insert(()=>_,":first-child"),g.attr("class","basic label-container"),y&&g.attr("style",y)}else{let x=W4t(0,0,d,m,f,p);g=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Pr(y)).attr("style",i)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-d/2}, ${-(m/2+p)})`),Vt(t,g),h.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(t.padding??0)/1.5-(u.y-(u.top??0))})`),t.intersect=function(x){let k=Mt.rect(t,x),T=k.x-(t.x??0);if(f!=0&&(Math.abs(T)<(t.width??0)/2||Math.abs(T)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-p)){let C=p*p*(1-T*T/(f*f));C>0&&(C=Math.sqrt(C)),C=p-C,x.y-(t.y??0)>0&&(C=-C),k.y+=C}return k},l}var W4t,q4t,j4t,JY,tX,rX=b(()=>{"use strict";de();be();me();xe();Re();W4t=s((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),q4t=s((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),j4t=s((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),JY=8,tX=8;s(eX,"cylinder")});async function iX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:l,label:u}=await Qt(e,t,Kt(t)),h=l.width+n,d=l.height+a,f=d*.2,p=-h/2,m=-d/2-f/2,{cssStyles:g}=t,y=$t.svg(o),x=zt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=[{x:p,y:m+f},{x:-p,y:m+f},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+f}],T=y.polygon(k.map(_=>[_.x,_.y]),x),C=o.insert(()=>T,":first-child");return C.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),u.attr("transform",`translate(${p+(t.padding??0)/2-(l.x-(l.left??0))}, ${m+f+(t.padding??0)/2-(l.y-(l.top??0))})`),Vt(t,C),t.intersect=function(_){return Mt.rect(t,_)},o}var nX=b(()=>{"use strict";de();be();me();xe();s(iX,"dividedRectangle")});async function sX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t),n=t.look==="neo"?12:5;t.labelStyle=r;let a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.width?t?.width/2:u.width/2)+(o??0),d=h-n,f,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=$t.svg(l),g=zt(t,{roughness:.2,strokeWidth:2.5}),y=zt(t,{roughness:.2,strokeWidth:1.5}),x=m.circle(0,0,h*2,g),k=m.circle(0,0,d*2,y);f=l.insert("g",":first-child"),f.attr("class",Pr(t.cssClasses)).attr("style",Pr(p)),f.node()?.appendChild(x),f.node()?.appendChild(k)}else{f=l.insert("g",":first-child");let m=f.insert("circle",":first-child"),g=f.insert("circle");f.attr("class","basic label-container").attr("style",i),m.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),g.attr("class","inner-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0)}return Vt(t,f),t.intersect=function(m){return z.info("DoubleCircle intersect",t,h,m),Mt.circle(t,h,m)},l}var aX=b(()=>{"use strict";Jt();de();be();me();xe();Re();s(sX,"doublecircle")});function oX(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.label="",t.labelStyle=i;let a=e.insert("g").attr("class",Kt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:l}=t,u=$t.svg(a),{nodeBorder:h}=r,d=zt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(d.roughness=0);let f=u.circle(0,0,o*2,d),p=a.insert(()=>f,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),l&&l.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",l),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),Vt(t,p),t.intersect=function(m){return z.info("filledCircle intersect",t,{radius:o,point:m}),Mt.circle(t,o,m)},a}var lX=b(()=>{"use strict";xe();Jt();be();me();de();s(oX,"filledCircle")});async function hX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.height=t?.height??0,t.heightk,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),t.width=h,t.height=d,Vt(t,T),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-d/2+(t.padding??0)/2+(l.y-(l.top??0))})`),t.intersect=function(C){return z.info("Triangle intersect",t,p,C),Mt.polygon(t,p,C)},o}var cX,uX,dX=b(()=>{"use strict";Jt();de();be();me();xe();de();cX=10,uX=10;s(hX,"flippedTriangle")});function fX(e,t,{dir:r,config:{state:i,themeVariables:n}}){let{nodeStyles:a}=Pt(t);t.label="";let o=e.insert("g").attr("class",Kt(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,u=Math.max(70,t?.width??0),h=Math.max(10,t?.height??0);r==="LR"&&(u=Math.max(10,t?.width??0),h=Math.max(70,t?.height??0));let d=-1*u/2,f=-1*h/2,p=$t.svg(o),m=zt(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=p.rectangle(d,f,u,h,m),y=o.insert(()=>g,":first-child");l&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",l),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Vt(t,y);let x=i?.padding??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(k){return Mt.rect(t,k)},o}var pX=b(()=>{"use strict";xe();be();me();de();s(fX,"forkJoin")});async function mX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=15,a=10,o=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-l*2,t.heightT,":first-child");return C.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),Vt(t,C),t.intersect=function(_){return z.info("Pill intersect",t,{radius:p,point:_}),Mt.polygon(t,x,_)},u}var gX=b(()=>{"use strict";Jt();de();be();me();xe();s(mX,"halfRoundedRectangle")});async function yX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t),n=t.look==="neo"?3.5:4;t.labelStyle=r;let a=t.padding??0,o=70,l=32,u=t.look==="neo"?o:a,h=t.look==="neo"?l:a;if(t.width||t.height){let C=(t.height??0)/n;t.width=(t?.width??0)-2*C-h,t.height=(t.height??0)-u}let{shapeSvg:d,bbox:f}=await Qt(e,t,Kt(t)),p=(t?.height?t?.height:f.height)+u,m=p/n,g=(t?.width?t?.width:f.width)+2*m+h,y=[{x:m,y:0},{x:g-m,y:0},{x:g,y:-p/2},{x:g-m,y:-p},{x:m,y:-p},{x:0,y:-p/2}],x,{cssStyles:k}=t;if(t.look==="handDrawn"){let T=$t.svg(d),C=zt(t,{}),_=U4t(0,0,g,p,m),S=T.path(_,C);x=d.insert(()=>S,":first-child").attr("transform",`translate(${-g/2}, ${p/2})`),k&&x.attr("style",k)}else x=ts(d,g,p,y);return i&&x.attr("style",i),t.width=g,t.height=p,Vt(t,x),t.intersect=function(T){return Mt.polygon(t,y,T)},d}var U4t,xX=b(()=>{"use strict";de();be();me();xe();vc();U4t=s((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");s(yX,"hexagon")});async function bX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.label="",t.labelStyle=r;let{shapeSvg:n}=await Qt(e,t,Kt(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:l}=t,u=$t.svg(n),h=zt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let d=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],f=_e(d),p=u.path(f,h),m=n.insert(()=>p,":first-child");return m.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(${-a/2}, ${-o/2})`),Vt(t,m),t.intersect=function(g){return z.info("Pill intersect",t,{points:d}),Mt.polygon(t,d,g)},n}var kX=b(()=>{"use strict";Jt();de();be();me();xe();s(bX,"hourglass")});async function TX(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=i?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,label:f}=await Qt(e,t,"icon-shape default"),p=t.pos==="t",m=l,g=l,{nodeBorder:y}=r,{stylesMap:x}=El(t),k=-g/2,T=-m/2,C=t.label?8:0,_=$t.svg(h),S=zt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let w=_.rectangle(k,T,g,m,S),A=Math.max(g,d.width),v=m+d.height+C,M=_.rectangle(-A/2,-v/2,A,v,{...S,fill:"transparent",stroke:"none"}),$=h.insert(()=>w,":first-child"),I=h.insert(()=>M);if(t.icon){let F=h.append("g");F.html(`${await ll(t.icon,{height:l,width:l,fallbackPrefix:""})} `);let B=F.node().getBBox(),O=B.width,R=B.height,N=B.x,P=B.y;F.attr("transform",`translate(${-O/2-N},${p?d.height/2+C/2-R/2-P:-d.height/2-C/2-R/2-P})`),F.attr("style",`color: ${x.get("stroke")??y};`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${p?-v/2:v/2-d.height})`),$.attr("transform",`translate(0,${p?d.height/2+C/2:-d.height/2-C/2})`),Vt(t,I),t.intersect=function(F){if(z.info("iconSquare intersect",t,F),!t.label)return Mt.rect(t,F);let B=t.x??0,O=t.y??0,R=t.height??0,N=[];return p?N=[{x:B-d.width/2,y:O-R/2},{x:B+d.width/2,y:O-R/2},{x:B+d.width/2,y:O-R/2+d.height+C},{x:B+g/2,y:O-R/2+d.height+C},{x:B+g/2,y:O+R/2},{x:B-g/2,y:O+R/2},{x:B-g/2,y:O-R/2+d.height+C},{x:B-d.width/2,y:O-R/2+d.height+C}]:N=[{x:B-g/2,y:O-R/2},{x:B+g/2,y:O-R/2},{x:B+g/2,y:O-R/2+m},{x:B+d.width/2,y:O-R/2+m},{x:B+d.width/2/2,y:O+R/2},{x:B-d.width/2,y:O+R/2},{x:B-d.width/2,y:O-R/2+m},{x:B-g/2,y:O-R/2+m}],Mt.polygon(t,N,F)},h}var CX=b(()=>{"use strict";xe();Jt();Zh();be();me();de();s(TX,"icon")});async function SX(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=i?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,label:f}=await Qt(e,t,"icon-shape default"),p=20,m=t.label?8:0,g=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:k}=El(t),T=$t.svg(h),C=zt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let _=k.get("fill");C.stroke=_??x;let S=h.append("g");t.icon&&S.html(`${await ll(t.icon,{height:l,width:l,fallbackPrefix:""})} `);let w=S.node().getBBox(),A=w.width,v=w.height,M=w.x,$=w.y,I=Math.max(A,v)*Math.SQRT2+p*2,F=T.circle(0,0,I,C),B=Math.max(I,d.width),O=I+d.height+m,R=T.rectangle(-B/2,-O/2,B,O,{...C,fill:"transparent",stroke:"none"}),N=h.insert(()=>F,":first-child"),P=h.insert(()=>R);return S.attr("transform",`translate(${-A/2-M},${g?d.height/2+m/2-v/2-$:-d.height/2-m/2-v/2-$})`),S.attr("style",`color: ${k.get("stroke")??y};`),f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-O/2:O/2-d.height})`),N.attr("transform",`translate(0,${g?d.height/2+m/2:-d.height/2-m/2})`),Vt(t,P),t.intersect=function(E){return z.info("iconSquare intersect",t,E),Mt.rect(t,E)},h}var wX=b(()=>{"use strict";xe();Jt();Zh();be();me();de();s(SX,"iconCircle")});var Hs,Md=b(()=>{"use strict";Hs=s((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD")});async function _X(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=i?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,halfPadding:f,label:p}=await Qt(e,t,"icon-shape default"),m=t.pos==="t",g=l+f*2,y=l+f*2,{nodeBorder:x,mainBkg:k}=r,{stylesMap:T}=El(t),C=-y/2,_=-g/2,S=t.label?8:0,w=$t.svg(h),A=zt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let v=T.get("fill");A.stroke=v??k;let M=w.path(Hs(C,_,y,g,5),A),$=Math.max(y,d.width),I=g+d.height+S,F=w.rectangle(-$/2,-I/2,$,I,{...A,fill:"transparent",stroke:"none"}),B=h.insert(()=>M,":first-child").attr("class","icon-shape2"),O=h.insert(()=>F);if(t.icon){let R=h.append("g");R.html(`${await ll(t.icon,{height:l,width:l,fallbackPrefix:""})} `);let N=R.node().getBBox(),P=N.width,E=N.height,D=N.x,V=N.y;R.attr("transform",`translate(${-P/2-D},${m?d.height/2+S/2-E/2-V:-d.height/2-S/2-E/2-V})`),R.attr("style",`color: ${T.get("stroke")??x};`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),B.attr("transform",`translate(0,${m?d.height/2+S/2:-d.height/2-S/2})`),Vt(t,O),t.intersect=function(R){if(z.info("iconSquare intersect",t,R),!t.label)return Mt.rect(t,R);let N=t.x??0,P=t.y??0,E=t.height??0,D=[];return m?D=[{x:N-d.width/2,y:P-E/2},{x:N+d.width/2,y:P-E/2},{x:N+d.width/2,y:P-E/2+d.height+S},{x:N+y/2,y:P-E/2+d.height+S},{x:N+y/2,y:P+E/2},{x:N-y/2,y:P+E/2},{x:N-y/2,y:P-E/2+d.height+S},{x:N-d.width/2,y:P-E/2+d.height+S}]:D=[{x:N-y/2,y:P-E/2},{x:N+y/2,y:P-E/2},{x:N+y/2,y:P-E/2+g},{x:N+d.width/2,y:P-E/2+g},{x:N+d.width/2/2,y:P+E/2},{x:N-d.width/2,y:P+E/2},{x:N-d.width/2,y:P-E/2+g},{x:N-y/2,y:P-E/2+g}],Mt.polygon(t,D,R)},h}var EX=b(()=>{"use strict";xe();Jt();Zh();be();me();Md();de();s(_X,"iconRounded")});async function vX(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=i?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,halfPadding:f,label:p}=await Qt(e,t,"icon-shape default"),m=t.pos==="t",g=l+f*2,y=l+f*2,{nodeBorder:x,mainBkg:k}=r,{stylesMap:T}=El(t),C=-y/2,_=-g/2,S=t.label?8:0,w=$t.svg(h),A=zt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let v=T.get("fill");A.stroke=v??k;let M=w.path(Hs(C,_,y,g,.1),A),$=Math.max(y,d.width),I=g+d.height+S,F=w.rectangle(-$/2,-I/2,$,I,{...A,fill:"transparent",stroke:"none"}),B=h.insert(()=>M,":first-child"),O=h.insert(()=>F);if(t.icon){let R=h.append("g");R.html(`${await ll(t.icon,{height:l,width:l,fallbackPrefix:""})} `);let N=R.node().getBBox(),P=N.width,E=N.height,D=N.x,V=N.y;R.attr("transform",`translate(${-P/2-D},${m?d.height/2+S/2-E/2-V:-d.height/2-S/2-E/2-V})`),R.attr("style",`color: ${T.get("stroke")??x};`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),B.attr("transform",`translate(0,${m?d.height/2+S/2:-d.height/2-S/2})`),Vt(t,O),t.intersect=function(R){if(z.info("iconSquare intersect",t,R),!t.label)return Mt.rect(t,R);let N=t.x??0,P=t.y??0,E=t.height??0,D=[];return m?D=[{x:N-d.width/2,y:P-E/2},{x:N+d.width/2,y:P-E/2},{x:N+d.width/2,y:P-E/2+d.height+S},{x:N+y/2,y:P-E/2+d.height+S},{x:N+y/2,y:P+E/2},{x:N-y/2,y:P+E/2},{x:N-y/2,y:P-E/2+d.height+S},{x:N-d.width/2,y:P-E/2+d.height+S}]:D=[{x:N-y/2,y:P-E/2},{x:N+y/2,y:P-E/2},{x:N+y/2,y:P-E/2+g},{x:N+d.width/2,y:P-E/2+g},{x:N+d.width/2/2,y:P+E/2},{x:N-d.width/2,y:P+E/2},{x:N-d.width/2,y:P-E/2+g},{x:N-y/2,y:P-E/2+g}],Mt.polygon(t,D,R)},h}var AX=b(()=>{"use strict";xe();Jt();Zh();be();Md();me();de();s(vX,"iconSquare")});async function RX(e,t,{config:{flowchart:r}}){let i=new Image;i.src=t?.img??"",await i.decode();let n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;let{labelStyles:o}=Pt(t);t.labelStyle=o;let l=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let u=Math.max(t.label?l??0:0,t?.assetWidth??n),h=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:u,d=t.constraint==="on"?h/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(h,l??0);let{shapeSvg:f,bbox:p,label:m}=await Qt(e,t,"image-shape default"),g=t.pos==="t",y=-h/2,x=-d/2,k=t.label?8:0,T=$t.svg(f),C=zt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let _=T.rectangle(y,x,h,d,C),S=Math.max(h,p.width),w=d+p.height+k,A=T.rectangle(-S/2,-w/2,S,w,{...C,fill:"none",stroke:"none"}),v=f.insert(()=>_,":first-child"),M=f.insert(()=>A);if(t.img){let $=f.append("image");$.attr("href",t.img),$.attr("width",h),$.attr("height",d),$.attr("preserveAspectRatio","none"),$.attr("transform",`translate(${-h/2},${g?w/2-d:-w/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-d/2-p.height/2-k/2:d/2-p.height/2+k/2})`),v.attr("transform",`translate(0,${g?p.height/2+k/2:-p.height/2-k/2})`),Vt(t,M),t.intersect=function($){if(z.info("iconSquare intersect",t,$),!t.label)return Mt.rect(t,$);let I=t.x??0,F=t.y??0,B=t.height??0,O=[];return g?O=[{x:I-p.width/2,y:F-B/2},{x:I+p.width/2,y:F-B/2},{x:I+p.width/2,y:F-B/2+p.height+k},{x:I+h/2,y:F-B/2+p.height+k},{x:I+h/2,y:F+B/2},{x:I-h/2,y:F+B/2},{x:I-h/2,y:F-B/2+p.height+k},{x:I-p.width/2,y:F-B/2+p.height+k}]:O=[{x:I-h/2,y:F-B/2},{x:I+h/2,y:F-B/2},{x:I+h/2,y:F-B/2+d},{x:I+p.width/2,y:F-B/2+d},{x:I+p.width/2/2,y:F+B/2},{x:I-p.width/2,y:F+B/2},{x:I-p.width/2,y:F-B/2+d},{x:I-h/2,y:F-B/2+d}],Mt.polygon(t,O,$)},f}var LX=b(()=>{"use strict";xe();Jt();be();me();de();s(RX,"imageSquare")});async function DX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=n,o=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=Math.max(u.width+(o??0)*2,t?.width??0),d=Math.max(u.height+(a??0)*2,t?.height??0),f=[{x:0,y:0},{x:h,y:0},{x:h+3*d/6,y:-d},{x:-3*d/6,y:-d}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=$t.svg(l),y=zt(t,{}),x=_e(f),k=g.path(x,y);p=l.insert(()=>k,":first-child").attr("transform",`translate(${-h/2}, ${d/2})`),m&&p.attr("style",m)}else p=ts(l,h,d,f);return i&&p.attr("style",i),t.width=h,t.height=d,Vt(t,p),t.intersect=function(g){return Mt.polygon(t,f,g)},l}var IX=b(()=>{"use strict";de();be();me();xe();vc();s(DX,"inv_trapezoid")});async function Ac(e,t,r){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i;let{shapeSvg:a,bbox:o}=await Qt(e,t,Kt(t)),l=Math.max(o.width+r.labelPaddingX*2,t?.width||0),u=Math.max(o.height+r.labelPaddingY*2,t?.height||0),h=-l/2,d=-u/2,f,{rx:p,ry:m}=t,{cssStyles:g}=t;if(r?.rx&&r.ry&&(p=r.rx,m=r.ry),t.look==="handDrawn"){let y=$t.svg(a),x=zt(t,{}),k=p||m?y.path(Hs(h,d,l,u,p||0),x):y.rectangle(h,d,l,u,x);f=a.insert(()=>k,":first-child"),f.attr("class","basic label-container").attr("style",Pr(g))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",n).attr("rx",Pr(p)).attr("ry",Pr(m)).attr("x",h).attr("y",d).attr("width",l).attr("height",u);return Vt(t,f),t.calcIntersect=function(y,x){return Mt.rect(y,x)},t.intersect=function(y){return Mt.rect(t,y)},a}var ym=b(()=>{"use strict";de();be();Md();me();xe();Re();s(Ac,"drawRect")});async function NX(e,t){let{shapeSvg:r,bbox:i,label:n}=await Qt(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Vt(t,a),t.intersect=function(u){return Mt.rect(t,u)},r}var OX=b(()=>{"use strict";ym();de();be();s(NX,"labelRect")});async function MX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=n,o=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.height??u.height)+a,d=(t?.width??u.width)+o,f=[{x:0,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:-(3*h)/6,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=$t.svg(l),y=zt(t,{}),x=_e(f),k=g.path(x,y);p=l.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=ts(l,d,h,f);return i&&p.attr("style",i),t.width=d,t.height=h,Vt(t,p),t.intersect=function(g){return Mt.polygon(t,f,g)},l}var BX=b(()=>{"use strict";de();be();me();xe();vc();s(MX,"lean_left")});async function PX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=n,o=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.height??u.height)+a,d=(t?.width??u.width)+o,f=[{x:-3*h/6,y:0},{x:d,y:0},{x:d+3*h/6,y:-h},{x:0,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=$t.svg(l),y=zt(t,{}),x=_e(f),k=g.path(x,y);p=l.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=ts(l,d,h,f);return i&&p.attr("style",i),t.width=d,t.height=h,Vt(t,p),t.intersect=function(g){return Mt.polygon(t,f,g)},l}var $X=b(()=>{"use strict";de();be();me();xe();vc();s(PX,"lean_right")});function FX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.label="",t.labelStyle=r;let n=e.insert("g").attr("class",Kt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),l=Math.max(35,t?.height??0),u=7,h=[{x:o,y:0},{x:0,y:l+u/2},{x:o-2*u,y:l+u/2},{x:0,y:2*l},{x:o,y:l-u/2},{x:2*u,y:l-u/2}],d=$t.svg(n),f=zt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let p=_e(h),m=d.path(p,f),g=n.insert(()=>m,":first-child");return g.attr("class","outer-path"),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-l})`),Vt(t,g),t.intersect=function(y){return z.info("lightningBolt intersect",t,y),Mt.polygon(t,h,y)},n}var VX=b(()=>{"use strict";Jt();de();me();xe();be();de();s(FX,"lightningBolt")});async function WX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?24:n;if(t.width||t.height){let k=t.width??0;t.width=(t.width??0)-a,t.widthw,":first-child").attr("class","line"),y=l.insert(()=>S,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{let k=H4t(0,0,d,m,f,p,g);y=l.insert("path",":first-child").attr("d",k).attr("class","basic label-container outer-path").attr("style",Pr(x)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-d/2}, ${-(m/2+p)})`),Vt(t,y),h.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+p-(u.y-(u.top??0))})`),t.intersect=function(k){let T=Mt.rect(t,k),C=T.x-(t.x??0);if(f!=0&&(Math.abs(C)<(t.width??0)/2||Math.abs(C)==(t.width??0)/2&&Math.abs(T.y-(t.y??0))>(t.height??0)/2-p)){let _=p*p*(1-C*C/(f*f));_>0&&(_=Math.sqrt(_)),_=p-_,k.y-(t.y??0)>0&&(_=-_),T.y+=_}return T},l}var H4t,Y4t,X4t,zX,GX,qX=b(()=>{"use strict";de();be();me();xe();Re();H4t=s((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Y4t=s((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),X4t=s((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),zX=10,GX=10;s(WX,"linedCylinder")});async function jX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n;if(t.width||t.height){let _=t.width;t.width=(_??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10)}let{shapeSvg:l,bbox:u,label:h}=await Qt(e,t,Kt(t)),d=(t?.width?t?.width:u.width)+(a??0)*2,f=(t?.height?t?.height:u.height)+(o??0)*2,p=t.look==="neo"?f/4:f/8,m=f+p,{cssStyles:g}=t,y=$t.svg(l),x=zt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=[{x:-d/2-d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:m/2},...Ka(-d/2-d/2*.1,m/2,d/2+d/2*.1,m/2,p,.8),{x:d/2+d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:-m/2},{x:-d/2,y:-m/2},{x:-d/2,y:m/2*1.1},{x:-d/2,y:-m/2}],T=y.polygon(k.map(_=>[_.x,_.y]),x),C=l.insert(()=>T,":first-child");return C.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)+d/2*.1/2-(u.x-(u.left??0))},${-f/2+(t.padding??0)-p/2-(u.y-(u.top??0))})`),Vt(t,C),t.intersect=function(_){return Mt.polygon(t,k,_)},l}var UX=b(()=>{"use strict";de();be();xe();me();s(jX,"linedWaveEdgedRect")});async function HX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n,l=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*l,10),t.height=Math.max((t?.height??0)-o*2-2*l,10));let{shapeSvg:u,bbox:h,label:d}=await Qt(e,t,Kt(t)),f=(t?.width?t?.width:h.width)+a*2+2*l,p=(t?.height?t?.height:h.height)+o*2+2*l,m=f-2*l,g=p-2*l,y=-m/2,x=-g/2,{cssStyles:k}=t,T=$t.svg(u),C=zt(t,{}),_=[{x:y-l,y:x+l},{x:y-l,y:x+g+l},{x:y+m-l,y:x+g+l},{x:y+m-l,y:x+g},{x:y+m,y:x+g},{x:y+m,y:x+g-l},{x:y+m+l,y:x+g-l},{x:y+m+l,y:x-l},{x:y+l,y:x-l},{x:y+l,y:x},{x:y,y:x},{x:y,y:x+l}],S=[{x:y,y:x+l},{x:y+m-l,y:x+l},{x:y+m-l,y:x+g},{x:y+m,y:x+g},{x:y+m,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let w=_e(_),A=T.path(w,C),v=_e(S),M=T.path(v,C);t.look!=="handDrawn"&&(A=qL(A),M=qL(M));let $=u.insert("g",":first-child");return $.insert(()=>A),$.insert(()=>M),$.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),d.attr("transform",`translate(${-(h.width/2)-l-(h.x-(h.left??0))}, ${-(h.height/2)+l-(h.y-(h.top??0))})`),Vt(t,$),t.intersect=function(I){return Mt.polygon(t,_,I)},u}var YX=b(()=>{"use strict";de();me();xe();be();s(HX,"multiRect")});async function XX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:o}=await Qt(e,t,Kt(t)),l=t.padding??0,u=t.look==="neo"?16:l,h=t.look==="neo"?12:l,d=!0;(t.width||t.height)&&(d=!1,t.width=(t?.width??0)-u*2,t.height=(t?.height??0)-h*3);let f=Math.max(a.width,t?.width??0)+u*2,p=Math.max(a.height,t?.height??0)+h*3,m=t.look==="neo"?p/4:p/8,g=p+(d?m/2:-m/2),y=-f/2,x=-g/2,k=10,{cssStyles:T}=t,C=Ka(y-k,x+g+k,y+f-k,x+g+k,m,.8),_=C?.[C.length-1],S=[{x:y-k,y:x+k},{x:y-k,y:x+g+k},...C,{x:y+f-k,y:_.y-k},{x:y+f,y:_.y-k},{x:y+f,y:_.y-2*k},{x:y+f+k,y:_.y-2*k},{x:y+f+k,y:x-k},{x:y+k,y:x-k},{x:y+k,y:x},{x:y,y:x},{x:y,y:x+k}],w=[{x:y,y:x+k},{x:y+f-k,y:x+k},{x:y+f-k,y:_.y-k},{x:y+f,y:_.y-k},{x:y+f,y:x},{x:y,y:x}],A=$t.svg(n),v=zt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let M=_e(S),$=A.path(M,v),I=_e(w),F=A.path(I,v),B=n.insert(()=>$,":first-child");return B.insert(()=>F),B.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",T),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-m/2})`),o.attr("transform",`translate(${-(a.width/2)-k-(a.x-(a.left??0))}, ${-(a.height/2)+k-m/2-(a.y-(a.top??0))})`),Vt(t,B),t.intersect=function(O){return Mt.polygon(t,S,O)},n}var KX=b(()=>{"use strict";de();be();xe();me();s(XX,"multiWaveEdgedRectangle")});async function QX(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i,t.useHtmlLabels||Ke(le())||(t.centerLabel=!0);let{shapeSvg:o,bbox:l,label:u}=await Qt(e,t,Kt(t)),h=Math.max(l.width+(t.padding??0)*2,t?.width??0),d=Math.max(l.height+(t.padding??0)*2,t?.height??0),f=-h/2,p=-d/2,{cssStyles:m}=t,g=$t.svg(o),y=zt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=g.rectangle(f,p,h,d,y),k=o.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),n&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",n),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Vt(t,k),t.intersect=function(T){return Mt.rect(t,T)},o}var ZX=b(()=>{"use strict";xe();be();me();de();Qe();Qe();s(QX,"note")});async function JX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await Qt(e,t,Kt(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),u=o+l,h=.5,d=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=$t.svg(n),g=zt(t,{}),y=K4t(0,0,u),x=m.path(y,g);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-u/2+h}, ${u/2})`),p&&f.attr("style",p)}else f=ts(n,u,u,d),f.attr("transform",`translate(${-u/2+h}, ${u/2})`);return i&&f.attr("style",i),Vt(t,f),t.calcIntersect=function(m,g){let y=m.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],k=Mt.polygon(m,x,g);return{x:k.x-.5,y:k.y-.5}},t.intersect=function(m){return this.calcIntersect(t,m)},n}var K4t,tK=b(()=>{"use strict";de();be();me();xe();vc();K4t=s((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");s(JX,"question")});async function eK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?21:n??0,o=t.look==="neo"?12:n??0,{shapeSvg:l,bbox:u,label:h}=await Qt(e,t,Kt(t)),d=(t?.width??u.width)+(t.look==="neo"?a*2:a),f=(t?.height??u.height)+(t.look==="neo"?o*2:o),p=-d/2,m=-f/2,g=m/2,y=[{x:p+g,y:m},{x:p,y:0},{x:p+g,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:x}=t,k=$t.svg(l),T=zt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=_e(y),_=k.path(C,T),S=l.insert(()=>_,":first-child");return S.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-g/2},0)`),h.attr("transform",`translate(${-g/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),Vt(t,S),t.intersect=function(w){return Mt.polygon(t,y,w)},l}var rK=b(()=>{"use strict";de();be();me();xe();s(eK,"rect_left_inv_arrow")});var Q4t,Fo,lC=b(()=>{"use strict";Qe();ye();Xa();Q4t=s(async(e,t,r,i=!1,n=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);let o=Q(),l=Ke(o);return await zi(e,a,{style:r,isTitle:i,useHtmlLabels:l,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Fo=Q4t});async function iK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";let a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g"),l=a.insert("g").attr("class","label").attr("style",i),u=t.description,h=t.label,d=await Fo(l,h,t.labelStyle,!0,!0),f={width:0,height:0};if(Ke(Q())){let v=d.children[0],M=vt(d);f=v.getBoundingClientRect(),M.attr("width",f.width),M.attr("height",f.height)}z.info("Text 2",u);let p=u||[],m=d.getBBox(),g=await Fo(l,Array.isArray(p)?p.join(" "):p,t.labelStyle,!0,!0),y=g.children[0],x=vt(g);f=y.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height);let k=(t.padding||0)/2;vt(g).attr("transform","translate( "+(f.width>m.width?0:(m.width-f.width)/2)+", "+(m.height+k+5)+")"),vt(d).attr("transform","translate( "+(f.width(z.debug("Rough node insert CXC",$),I),":first-child"),w=a.insert(()=>(z.debug("Rough node insert CXC",$),$),":first-child")}else w=o.insert("rect",":first-child"),A=o.insert("line"),w.attr("class","outer title-state").attr("style",i).attr("x",-f.width/2-k).attr("y",-f.height/2-k).attr("width",f.width+(t.padding||0)).attr("height",f.height+(t.padding||0)),A.attr("class","divider").attr("x1",-f.width/2-k).attr("x2",f.width/2+k).attr("y1",-f.height/2-k+m.height+k).attr("y2",-f.height/2-k+m.height+k);return Vt(t,w),t.intersect=function(v){return Mt.rect(t,v)},a}var nK=b(()=>{"use strict";lr();de();lC();be();me();xe();ye();Md();Jt();Qe();s(iK,"rectWithTitle")});async function sK(e,t,{config:{themeVariables:r}}){let i=r?.radius??5,n={rx:i,ry:i,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Ac(e,t,n)}var aK=b(()=>{"use strict";ym();s(sK,"roundedRect")});async function oK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:l,label:u}=await Qt(e,t,Kt(t)),h=(t?.width??l.width)+n*2+(t.look==="neo"?Bd:Bd*2),d=(t?.height??l.height)+a*2,f=h-Bd,p=d,m=Bd-h/2,g=-d/2,{cssStyles:y}=t,x=$t.svg(o),k=zt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let T=[{x:m,y:g},{x:m+f,y:g},{x:m+f,y:g+p},{x:m-Bd,y:g+p},{x:m-Bd,y:g},{x:m,y:g},{x:m,y:g+p}],C=x.polygon(T.map(S=>[S.x,S.y]),k),_=o.insert(()=>C,":first-child");return _.attr("class","basic label-container outer-path").attr("style",Pr(y)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),u.attr("transform",`translate(${Bd/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Vt(t,_),t.intersect=function(S){return Mt.rect(t,S)},o}var Bd,lK=b(()=>{"use strict";de();be();me();xe();Re();Bd=8;s(oK,"shadedProcess")});async function cK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:l,bbox:u,label:h}=await Qt(e,t,Kt(t)),d=(t?.width?t?.width:u.width)+a*2,f=((t?.height?t?.height:u.height)+o*2)*1.5,p=d,m=f/1.5,g=-p/2,y=-m/2,{cssStyles:x}=t,k=$t.svg(l),T=zt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=[{x:g,y},{x:g,y:y+m},{x:g+p,y:y+m},{x:g+p,y:y-m/2}],_=_e(C),S=k.path(_,T),w=l.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(0, ${m/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(u.x-(u.left??0))}, ${-m/4+(t.padding??0)-(u.y-(u.top??0))})`),Vt(t,w),t.intersect=function(A){return Mt.polygon(t,C,A)},l}var uK=b(()=>{"use strict";de();be();me();xe();s(cK,"slopedRect")});async function hK(e,t){let r=t.padding??0,i=t.look==="neo"?16:r*2,n=t.look==="neo"?12:r,a={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??i,labelPaddingY:n};return Ac(e,t,a)}var dK=b(()=>{"use strict";ym();s(hK,"squareRect")});async function fK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?20:n,o=t.look==="neo"?12:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=u.height+(t.look==="neo"?o*2:o),d=u.width+h/4+(t.look==="neo"?a*2:a),f=h/2,{cssStyles:p}=t,m=$t.svg(l),g=zt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:-d/2+f,y:-h/2},{x:d/2-f,y:-h/2},...Nd(-d/2+f,0,f,50,90,270),{x:d/2-f,y:h/2},...Nd(d/2-f,0,f,50,270,450)],x=_e(y),k=m.path(x,g),T=l.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Vt(t,T),t.intersect=function(C){return Mt.polygon(t,y,C)},l}var pK=b(()=>{"use strict";de();be();me();xe();s(fK,"stadium")});async function mK(e,t){let r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return Ac(e,t,r)}var gK=b(()=>{"use strict";ym();s(mK,"state")});function yK(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i;let{cssStyles:a}=t,{lineColor:o,stateBorder:l,nodeBorder:u,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let d=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),f=$t.svg(d),p=zt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=f.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),g=l??u,y=(t.width??0)*5/14,x=f.circle(0,0,y,{...p,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),k=d.insert(()=>m,":first-child");if(k.insert(()=>x),t.look!=="handDrawn"&&k.attr("class","outer-path"),a&&k.selectAll("path").attr("style",a),n&&k.selectAll("path").attr("style",n),t.width<25&&h&&t.look!=="handDrawn"){let T=e.node()?.ownerSVGElement?.id??"",C=T?`${T}-drop-shadow-small`:"drop-shadow-small";k.attr("style",`filter:url(#${C})`)}return Vt(t,k),t.intersect=function(T){return Mt.circle(t,(t.width??0)/2,T)},d}var xK=b(()=>{"use strict";xe();be();me();de();s(yK,"stateEnd")});function bK(e,t,{config:{themeVariables:r}}){let{lineColor:i,nodeShadow:n}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),o;if(t.look==="handDrawn"){let u=$t.svg(a).circle(0,0,t.width,bY(i));o=a.insert(()=>u),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&n&&t.look!=="handDrawn"){let l=e.node()?.ownerSVGElement?.id??"",u=l?`${l}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${u})`)}return Vt(t,o),t.intersect=function(l){return Mt.circle(t,(t.width??7)/2,l)},a}var kK=b(()=>{"use strict";xe();be();me();de();s(bK,"stateStart")});async function TK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t?.padding??8,a=t.look==="neo"?28:n,o=t.look==="neo"?12:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.width??u.width)+2*xm+a,d=(t?.height??u.height)+o,f=h-2*xm,p=d,m=-h/2,g=-d/2,y=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){let x=$t.svg(l),k=zt(t,{}),T=x.rectangle(m,g,f+16,p,k),C=x.line(m+xm,g,m+xm,g+p,k),_=x.line(m+xm+f,g,m+xm+f,g+p,k);l.insert(()=>C,":first-child"),l.insert(()=>_,":first-child");let S=l.insert(()=>T,":first-child"),{cssStyles:w}=t;S.attr("class","basic label-container").attr("style",Pr(w)),Vt(t,S)}else{let x=ts(l,f,p,y);i&&x.attr("style",i),Vt(t,x)}return t.intersect=function(x){return Mt.polygon(t,y,x)},l}var xm,CK=b(()=>{"use strict";de();be();me();xe();vc();Re();xm=8;s(TK,"subroutine")});async function SK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-hD*(t.height+o*2),10));let{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.height?t?.height:u.height)+o*2,d=hD*h,f=hD*h,m=(t?.width?t?.width:u.width)+a*2+d-d,g=h,y=-m/2,x=-g/2,{cssStyles:k}=t,T=$t.svg(l),C=zt(t,{}),_=[{x:y-d/2,y:x},{x:y+m+d/2,y:x},{x:y+m+d/2,y:x+g},{x:y-d/2,y:x+g}],S=[{x:y+m-d/2,y:x+g},{x:y+m+d/2,y:x+g},{x:y+m+d/2,y:x+g-f}];t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let w=_e(_),A=T.path(w,C),v=_e(S),M=T.path(v,{...C,fillStyle:"solid"}),$=l.insert(()=>M,":first-child");return $.insert(()=>A,":first-child"),$.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),Vt(t,$),t.intersect=function(I){return Mt.polygon(t,_,I)},l}var hD,wK=b(()=>{"use strict";de();me();xe();be();hD=.2;s(SK,"taggedRect")});async function _K(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:o}=await Qt(e,t,Kt(t)),l=Math.max(a.width+(t.padding??0)*2,t?.width??0),u=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=u/8,d=.2*l,f=.2*u,p=u+h,{cssStyles:m}=t,g=$t.svg(n),y=zt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=[{x:-l/2-l/2*.1,y:p/2},...Ka(-l/2-l/2*.1,p/2,l/2+l/2*.1,p/2,h,.8),{x:l/2+l/2*.1,y:-p/2},{x:-l/2-l/2*.1,y:-p/2}],k=-l/2+l/2*.1,T=-p/2-f*.4,C=[{x:k+l-d,y:(T+u)*1.3},{x:k+l,y:T+u-f},{x:k+l,y:(T+u)*.9},...Ka(k+l,(T+u)*1.25,k+l-d,(T+u)*1.3,-u*.02,.5)],_=_e(x),S=g.path(_,y),w=_e(C),A=g.path(w,{...y,fillStyle:"solid"}),v=n.insert(()=>A,":first-child");return v.insert(()=>S,":first-child"),v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-l/2+(t.padding??0)-(a.x-(a.left??0))},${-u/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),Vt(t,v),t.intersect=function(M){return Mt.polygon(t,x,M)},n}var EK=b(()=>{"use strict";de();be();xe();me();s(_K,"taggedWaveEdgedRectangle")});async function vK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await Qt(e,t,Kt(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),l=Math.max(a.height+(t.padding??0),t?.height||0),u=-o/2,h=-l/2,d=n.insert("rect",":first-child");return d.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",o).attr("height",l),Vt(t,d),t.intersect=function(f){return Mt.rect(t,f)},n}var AK=b(()=>{"use strict";de();be();me();s(vK,"text")});async function DK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?12:n/2;if(t.width||t.height){let y=t.height??0;t.height=(t.height??0)-a,t.heightC,":first-child"),g=o.insert(()=>T,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{let y=Z4t(0,0,p,h,f,d);g=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",Pr(m)).attr("style",i),g.attr("class","basic label-container outer-path"),m&&g.selectAll("path").attr("style",m),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",f),g.attr("transform",`translate(${-p/2}, ${h/2} )`),u.attr("transform",`translate(${-(l.width/2)-f-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Vt(t,g),t.intersect=function(y){let x=Mt.rect(t,y),k=x.y-(t.y??0);if(d!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-f)){let T=f*f*(1-k*k/(d*d));T!=0&&(T=Math.sqrt(Math.abs(T))),T=f-T,y.x-(t.x??0)>0&&(T=-T),x.x+=T}return x},o}var Z4t,J4t,t5t,RK,LK,IK=b(()=>{"use strict";de();me();xe();be();Re();Z4t=s((e,t,r,i,n,a)=>`M${e},${t}
+ a${n},${a} 0,0,1 0,${-i}
+ l${r},0
+ a${n},${a} 0,0,1 0,${i}
+ M${r},${-i}
+ a${n},${a} 0,0,0 0,${i}
+ l${-r},0`,"createCylinderPathD"),J4t=s((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),t5t=s((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),RK=5,LK=10;s(DK,"tiltedCylinder")});async function NK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=(t.look==="neo",n),o=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.height??u.height)+a,d=(t?.width??u.width)+o,f=[{x:-3*h/6,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:0,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=$t.svg(l),y=zt(t,{}),x=_e(f),k=g.path(x,y);p=l.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=ts(l,d,h,f);return i&&p.attr("style",i),t.width=d,t.height=h,Vt(t,p),t.intersect=function(g){return Mt.polygon(t,f,g)},l}var OK=b(()=>{"use strict";de();be();me();xe();vc();s(NK,"trapezoid")});async function MK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n,l=15,u=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.heightT,":first-child");return C.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),Vt(t,C),t.intersect=function(_){return Mt.polygon(t,x,_)},h}var BK=b(()=>{"use strict";de();be();me();xe();s(MK,"trapezoidalPentagon")});async function FK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.width<$K&&(t.width=$K),t.height=t?.height??0,t.heightT,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),t.width=d,t.height=f,Vt(t,C),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${f/2-(l.height+(t.padding??0)/(h?2:1)-(l.y-(l.top??0)))})`),t.intersect=function(_){return z.info("Triangle intersect",t,m,_),Mt.polygon(t,m,_)},o}var PK,$K,VK=b(()=>{"use strict";Jt();de();be();me();xe();de();fr();ye();PK=10,$K=10;s(FK,"triangle")});async function zK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n,l=!0;(t.width||t.height)&&(l=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:u,bbox:h,label:d}=await Qt(e,t,Kt(t)),f=(t?.width?t?.width:h.width)+(a??0)*2,p=(t?.height?t?.height:h.height)+(o??0)*2,m=t.look==="neo"?p/4:p/8,g=p+(l?m:-m),{cssStyles:y}=t,k=14-f,T=k>0?k/2:0,C=$t.svg(u),_=zt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let S=[{x:-f/2-T,y:g/2},...Ka(-f/2-T,g/2,f/2+T,g/2,m,.8),{x:f/2+T,y:-g/2},{x:-f/2-T,y:-g/2}],w=_e(S),A=C.path(w,_),v=u.insert(()=>A,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-m/2})`),d.attr("transform",`translate(${-f/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-m-(h.y-(h.top??0))})`),Vt(t,v),t.intersect=function(M){return Mt.polygon(t,S,M)},u}var GK=b(()=>{"use strict";de();be();xe();me();s(zK,"waveEdgedRectangle")});async function WK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?20:n;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let _=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-_*(20/9)),t.width=t.width-a*2}let{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.width?t?.width:u.width)+a*2,d=(t?.height?t?.height:u.height)+o,f=d/8,p=d+f*2,{cssStyles:m}=t,g=$t.svg(l),y=zt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=[{x:-h/2,y:p/2},...Ka(-h/2,p/2,h/2,p/2,f,1),{x:h/2,y:-p/2},...Ka(h/2,-p/2,-h/2,-p/2,f,-1)],k=_e(x),T=g.path(k,y),C=l.insert(()=>T,":first-child");return C.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),Vt(t,C),t.intersect=function(_){return Mt.polygon(t,x,_)},l}var qK=b(()=>{"use strict";de();be();me();xe();s(WK,"waveRectangle")});async function jK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-n*2-Gi,10),t.height=Math.max((t?.height??0)-a*2-Gi,10));let{shapeSvg:o,bbox:l,label:u}=await Qt(e,t,Kt(t)),h=(t?.width?t?.width:l.width)+n*2+Gi,d=(t?.height?t?.height:l.height)+a*2+Gi,f=h-Gi,p=d-Gi,m=-f/2,g=-p/2,{cssStyles:y}=t,x=$t.svg(o),k=zt(t,{}),T=[{x:m-Gi,y:g-Gi},{x:m-Gi,y:g+p},{x:m+f,y:g+p},{x:m+f,y:g-Gi}],C=`M${m-Gi},${g-Gi} L${m+f},${g-Gi} L${m+f},${g+p} L${m-Gi},${g+p} L${m-Gi},${g-Gi}
+ M${m-Gi},${g} L${m+f},${g}
+ M${m},${g-Gi} L${m},${g+p}`;t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let _=x.path(C,k),S=o.insert(()=>_,":first-child");return S.attr("transform",`translate(${Gi/2}, ${Gi/2})`),S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),u.attr("transform",`translate(${-(l.width/2)+Gi/2-(l.x-(l.left??0))}, ${-(l.height/2)+Gi/2-(l.y-(l.top??0))})`),Vt(t,S),t.intersect=function(w){return Mt.polygon(t,T,w)},o}var Gi,UK=b(()=>{"use strict";de();me();xe();be();Gi=10;s(jK,"windowPane")});async function dD(e,t){let r=t;r.alias&&(t.label=r.alias);let{theme:i,themeVariables:n}=le(),{rowEven:a,rowOdd:o,nodeBorder:l,borderColorArray:u}=n;if(t.look==="handDrawn"){let{themeVariables:st}=le(),{background:X}=st,ut={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${X}`]};await dD(e,ut)}let h=le();t.useHtmlLabels=h.htmlLabels;let d=h.er?.diagramPadding??10,f=h.er?.entityPadding??6,{cssStyles:p}=t,{labelStyles:m,nodeStyles:g}=Pt(t);if(r.attributes.length===0&&t.label){let st={rx:0,ry:0,labelPaddingX:d,labelPaddingY:d*1.5,classes:""};vn(t.label,h)+st.labelPaddingX*20){let st=k.width+d*2-(S+w+A+v);S+=st/I,w+=st/I,A>0&&(A+=st/I),v>0&&(v+=st/I)}let B=S+w+A+v,O=$t.svg(x),R=zt(t,{});t.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let N=0;_.length>0&&(N=_.reduce((st,X)=>st+(X?.rowHeight??0),0));let P=Math.max(F.width+d*2,t?.width||0,B),E=Math.max((N??0)+k.height,t?.height||0),D=-P/2,V=-E/2;if(x.selectAll("g:not(:first-child)").each((st,X,ut)=>{let ot=vt(ut[X]),mt=ot.attr("transform"),ht=0,it=0;if(mt){let St=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(mt);St&&(ht=parseFloat(St[1]),it=parseFloat(St[2]),ot.attr("class").includes("attribute-name")?ht+=S:ot.attr("class").includes("attribute-keys")?ht+=S+w:ot.attr("class").includes("attribute-comment")&&(ht+=S+w+A))}ot.attr("transform",`translate(${D+d/2+ht}, ${it+V+k.height+f/2})`)}),x.select(".name").attr("transform","translate("+-k.width/2+", "+(V+f/2)+")"),i!=null&&HK.has(i)){let st=r.colorIndex??0;x.attr("data-color-id",`color-${st%u.length}`)}let L=O.rectangle(D,V,P,E,R),q=x.insert(()=>L,":first-child").attr("class","outer-path").attr("style",p.join(""));C.push(0);for(let[st,X]of _.entries()){let ot=(st+1)%2===0&&X.yOffset!==0,mt=O.rectangle(D,k.height+V+X?.yOffset,P,X?.rowHeight,{...R,fill:ot?a:o,stroke:l});x.insert(()=>mt,"g.label").attr("style",p.join("")).attr("class",`row-rect-${ot?"even":"odd"}`)}let H=1e-4,K=M0(D,k.height+V,P+D,k.height+V,H),U=O.polygon(K.map(st=>[st.x,st.y]),R);if(x.insert(()=>U).attr("class","divider"),K=M0(S+D,k.height+V,S+D,E+V,H),U=O.polygon(K.map(st=>[st.x,st.y]),R),x.insert(()=>U).attr("class","divider"),M){let st=S+w+D;K=M0(st,k.height+V,st,E+V,H),U=O.polygon(K.map(X=>[X.x,X.y]),R),x.insert(()=>U).attr("class","divider")}if($){let st=S+w+A+D;K=M0(st,k.height+V,st,E+V,H),U=O.polygon(K.map(X=>[X.x,X.y]),R),x.insert(()=>U).attr("class","divider")}for(let st of C){let X=k.height+V+st;K=M0(D,X,P+D,X,H),U=O.polygon(K.map(ut=>[ut.x,ut.y]),R),x.insert(()=>U).attr("class","divider")}if(Vt(t,q),g&&t.look!=="handDrawn")if(i!=null&&e5t.has(i))x.selectAll("path").attr("style",g);else{let X=g.split(";")?.filter(ut=>ut.includes("stroke"))?.map(ut=>`${ut}`).join("; ");x.selectAll("path").attr("style",X??""),x.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(st){return Mt.rect(t,st)},x}async function O0(e,t,r,i=0,n=0,a=[],o=""){let l=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);t!==ol(t)&&(t=ol(t),t=t.replaceAll("<","<").replaceAll(">",">"));let u=l.node().appendChild(await zi(l,t,{width:vn(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let d=u.children[0];for(d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">");d.childNodes[0];)d=d.childNodes[0],d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">")}let h=u.getBBox();if(Kn(r.htmlLabels)){let d=u.children[0];d.style.textAlign="start";let f=vt(u);h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}return h}function M0(e,t,r,i,n){return e===r?[{x:e-n/2,y:t},{x:e+n/2,y:t},{x:r+n/2,y:i},{x:r-n/2,y:i}]:[{x:e,y:t-n/2},{x:e,y:t+n/2},{x:r,y:i+n/2},{x:r,y:i-n/2}]}var HK,e5t,YK=b(()=>{"use strict";de();be();me();xe();ym();Qe();Xa();fr();lr();Re();HK=new Set(["redux-color","redux-dark-color"]),e5t=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);s(dD,"erBox");s(O0,"addText");s(M0,"lineToPolygon")});async function XK(e,t,r,i,n=r.class.padding??12){let a=i?0:3,o=e.insert("g").attr("class",Kt(t)).attr("id",t.domId||t.id),l=null,u=null,h=null,d=null,f=0,p=0,m=0;if(l=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let T=t.annotations[0];await cC(l,{text:`\xAB${T}\xBB`},0),f=l.node().getBBox().height}u=o.insert("g").attr("class","label-group text"),await cC(u,t,0,["font-weight: bolder"]);let g=u.node().getBBox();p=g.height,h=o.insert("g").attr("class","members-group text");let y=0;for(let T of t.members){let C=await cC(h,T,y,[T.parseClassifier()]);y+=C+a}m=h.node().getBBox().height,m<=0&&(m=n/2),d=o.insert("g").attr("class","methods-group text");let x=0;for(let T of t.methods){let C=await cC(d,T,x,[T.parseClassifier()]);x+=C+a}let k=o.node().getBBox();if(l!==null){let T=l.node().getBBox();l.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-g.width/2}, ${f})`),k=o.node().getBBox(),h.attr("transform",`translate(0, ${f+p+n*2})`),k=o.node().getBBox(),d.attr("transform",`translate(0, ${f+p+(m?m+n*4:n*2)})`),k=o.node().getBBox(),{shapeSvg:o,bbox:k}}async function cC(e,t,r,i=[]){let n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=le(),o="useHtmlLabels"in t?t.useHtmlLabels:Kn(a.htmlLabels)??!0,l="";"text"in t?l=t.text:l=t.label,!o&&l.startsWith("\\")&&(l=l.substring(1)),Ci(l)&&(o=!0);let u=await zi(n,a1(ks(l)),{width:vn(l,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a),h,d=1;if(o){let f=u.children[0],p=vt(u);d=f.innerHTML.split(" ").length,f.innerHTML.includes("")&&(d+=f.innerHTML.split("").length-1);let m=f.getElementsByTagName("img");if(m){let g=l.replace(/ ]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(x=>{function k(){if(y.style.display="flex",y.style.flexDirection="column",g){let T=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,_=parseInt(T,10)*5+"px";y.style.minWidth=_,y.style.maxWidth=_}else y.style.width="100%";x(y)}s(k,"setupImage"),setTimeout(()=>{y.complete&&k()}),y.addEventListener("error",k),y.addEventListener("load",k)})))}h=f.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&vt(u).selectAll("tspan").attr("font-weight",""),d=u.children.length;let f=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(f.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),l[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),h=u.getBBox()}return n.attr("transform","translate(0,"+(-h.height/(2*d)+r)+")"),h.height}var KK=b(()=>{"use strict";lr();Qe();de();Re();ye();Xa();fr();s(XK,"textHelper");s(cC,"addText")});async function QK(e,t){let r=Q(),{themeVariables:i}=r,{useGradient:n}=i,a=r.class.padding??12,o=a,l=t.useHtmlLabels??Kn(r.htmlLabels)??!0,u=t;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];let{shapeSvg:h,bbox:d}=await XK(e,t,r,l,o),{labelStyles:f,nodeStyles:p}=Pt(t);t.labelStyle=f,t.cssStyles=u.styles||"";let m=u.styles?.join(";")||p||"";t.cssStyles||(t.cssStyles=m.replaceAll("!important","").split(";"));let g=u.members.length===0&&u.methods.length===0&&!r.class?.hideEmptyMembersBox,y=$t.svg(h),x=zt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=Math.max(t.width??0,d.width),T=Math.max(t.height??0,d.height),C=(t.height??0)>d.height;u.members.length===0&&u.methods.length===0?T+=o:u.members.length>0&&u.methods.length===0&&(T+=o*2);let _=-k/2,S=-T/2,w=g?a*2:u.members.length===0&&u.methods.length===0?-a:0;C&&(w=a*2);let A=y.rectangle(_-a,S-a-(g?a:u.members.length===0&&u.methods.length===0?-a/2:0),k+2*a,T+2*a+w,x),v=h.insert(()=>A,":first-child");v.attr("class","basic label-container outer-path");let M=v.node().getBBox(),$=h.select(".annotation-group").node().getBBox().height-(g?a/2:0)||0,I=h.select(".label-group").node().getBBox().height-(g?a/2:0)||0,F=h.select(".members-group").node().getBBox().height-(g?a/2:0)||0,B=($+I+S+a-(S-a-(g?a:u.members.length===0&&u.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((O,R,N)=>{let P=vt(N[R]),E=P.attr("transform"),D=0;if(E){let H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);H&&(D=parseFloat(H[2]))}let V=D+S+a-(g?a:u.members.length===0&&u.methods.length===0?-a/2:0);if(P.attr("class").includes("methods-group")){let q=Math.max(F,o/2);C?V=Math.max(B,$+I+q+S+o*2+a)+o*2:V=$+I+q+S+o*4+a}u.members.length===0&&u.methods.length===0&&r.class?.hideEmptyMembersBox&&(u.annotations.length>0?V=D-o:V=D),l||(V-=4);let L=_;(P.attr("class").includes("label-group")||P.attr("class").includes("annotation-group"))&&(L=-P.node()?.getBBox().width/2||0,h.selectAll("text").each(function(q,H,K){window.getComputedStyle(K[H]).textAnchor==="middle"&&(L=0)})),P.attr("transform",`translate(${L}, ${V})`)}),u.members.length>0||u.methods.length>0||g){let O=$+I+S+a,R=y.line(M.x,O,M.x+M.width,O+.001,x);h.insert(()=>R).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",m)}if(g||u.members.length>0||u.methods.length>0){let O=$+I+F+S+o*2+a,R=y.line(M.x,C?Math.max(B,O):O,M.x+M.width,(C?Math.max(B,O):O)+.001,x);h.insert(()=>R).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",m)}if(u.look!=="handDrawn"&&h.selectAll("path").attr("style",m),v.select(":nth-child(2)").attr("style",m),h.selectAll(".divider").select("path").attr("style",m),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",m),!l){let O=RegExp(/color\s*:\s*([^;]*)/),R=O.exec(m);if(R){let N=R[0].replace("color","fill");h.selectAll("tspan").attr("style",N)}else if(f){let N=O.exec(f);if(N){let P=N[0].replace("color","fill");h.selectAll("tspan").attr("style",P)}}}return Vt(t,v),t.intersect=function(O){return Mt.rect(t,O)},h}var ZK=b(()=>{"use strict";de();ye();lr();xe();me();be();KK();fr();s(QK,"classBox")});async function JK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t,a=t,o=20,l=20,u="verifyMethod"in t,h=Kt(t),{themeVariables:d}=Q(),{borderColorArray:f,requirementEdgeLabelBackground:p}=d,m=e.insert("g").attr("class",h).attr("id",t.domId??t.id),g;u?g=await Rc(m,`<<${n.type}>>`,0,t.labelStyle):g=await Rc(m,"<<Element>>",0,t.labelStyle);let y=g,x=await Rc(m,n.name,y,t.labelStyle+"; font-weight: bold;");if(y+=x+l,u){let M=await Rc(m,`${n.requirementId?`ID: ${n.requirementId}`:""}`,y,t.labelStyle);y+=M;let $=await Rc(m,`${n.text?`Text: ${n.text}`:""}`,y,t.labelStyle);y+=$;let I=await Rc(m,`${n.risk?`Risk: ${n.risk}`:""}`,y,t.labelStyle);y+=I,await Rc(m,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,y,t.labelStyle)}else{let M=await Rc(m,`${a.type?`Type: ${a.type}`:""}`,y,t.labelStyle);y+=M,await Rc(m,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,y,t.labelStyle)}let k=(m.node()?.getBBox().width??200)+o,T=(m.node()?.getBBox().height??200)+o,C=-k/2,_=-T/2,S=$t.svg(m),w=zt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let A=S.rectangle(C,_,k,T,w),v=m.insert(()=>A,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),f?.length){let M=t.colorIndex??0;m.attr("data-color-id",`color-${M%f.length}`)}if(m.selectAll(".label").each((M,$,I)=>{let F=vt(I[$]),B=F.attr("transform"),O=0,R=0;if(B){let D=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(B);D&&(O=parseFloat(D[1]),R=parseFloat(D[2]))}let N=R-T/2,P=C+o/2;($===0||$===1)&&(P=O),F.attr("transform",`translate(${P}, ${N+o})`)}),y>g+x+l){let M=_+g+x+l,$;if(t.look==="neo"){let B=[[C,M],[C+k,M],[C+k,M+.001],[C,M+.001]];$=S.polygon(B,w)}else $=S.line(C,M,C+k,M,w);m.insert(()=>$).attr("class","divider")}return Vt(t,v),t.intersect=function(M){return Mt.rect(t,M)},i&&t.look!=="handDrawn"&&(p||f?.length)&&m.selectAll("path").attr("style",i),m}async function Rc(e,t,r,i=""){if(t==="")return 0;let n=e.insert("g").attr("class","label").attr("style",i),a=Q(),o=a.htmlLabels??!0,l=await zi(n,a1(ks(t)),{width:vn(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a),u;if(o){let h=l.children[0],d=vt(l);u=h.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{let h=l.children[0];for(let d of h.children)i&&d.setAttribute("style",i);u=l.getBBox(),u.height+=6}return n.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}var tQ=b(()=>{"use strict";de();be();me();xe();Re();ye();Xa();lr();s(JK,"requirementBox");s(Rc,"addText")});async function eQ(e,t,{config:r}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i||"";let a=10,o=t.width;t.width=(t.width??200)-10;let{shapeSvg:l,bbox:u,label:h}=await Qt(e,t,Kt(t)),d=t.padding||10,f="",p;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),p=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let m={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},g,y;p?{label:g,bbox:y}=await XT(p,"ticket"in t&&t.ticket||"",m):{label:g,bbox:y}=await XT(l,"ticket"in t&&t.ticket||"",m);let{label:x,bbox:k}=await XT(l,"assigned"in t&&t.assigned||"",m);t.width=o;let T=10,C=t?.width||0,_=Math.max(y.height,k.height)/2,S=Math.max(u.height+T*2,t?.height||0)+_,w=-C/2,A=-S/2;h.attr("transform","translate("+(d-C/2)+", "+(-_-u.height/2)+")"),g.attr("transform","translate("+(d-C/2)+", "+(-_+u.height/2)+")"),x.attr("transform","translate("+(d+C/2-k.width-2*a)+", "+(-_+u.height/2)+")");let v,{rx:M,ry:$}=t,{cssStyles:I}=t;if(t.look==="handDrawn"){let F=$t.svg(l),B=zt(t,{}),O=M||$?F.path(Hs(w,A,C,S,M||0),B):F.rectangle(w,A,C,S,B);v=l.insert(()=>O,":first-child"),v.attr("class","basic label-container").attr("style",I||null)}else{v=l.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",n).attr("rx",M??5).attr("ry",$??5).attr("x",w).attr("y",A).attr("width",C).attr("height",S);let F="priority"in t&&t.priority;if(F){let B=l.append("line"),O=w+2,R=A+Math.floor((M??0)/2),N=A+S-Math.floor((M??0)/2);B.attr("x1",O).attr("y1",R).attr("x2",O).attr("y2",N).attr("stroke-width","4").attr("stroke",r5t(F))}}return Vt(t,v),t.height=S,t.intersect=function(F){return Mt.rect(t,F)},l}var r5t,rQ=b(()=>{"use strict";de();be();Md();me();xe();r5t=s(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");s(eQ,"kanbanItem")});async function iQ(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:o,label:l}=await Qt(e,t,Kt(t)),u=a.width+10*o,h=a.height+8*o,d=.15*u,{cssStyles:f}=t,p=a.width+20,m=a.height+20,g=Math.max(u,p),y=Math.max(h,m);l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let x,k=`M0 0
+ a${d},${d} 1 0,0 ${g*.25},${-1*y*.1}
+ a${d},${d} 1 0,0 ${g*.25},0
+ a${d},${d} 1 0,0 ${g*.25},0
+ a${d},${d} 1 0,0 ${g*.25},${y*.1}
+
+ a${d},${d} 1 0,0 ${g*.15},${y*.33}
+ a${d*.8},${d*.8} 1 0,0 0,${y*.34}
+ a${d},${d} 1 0,0 ${-1*g*.15},${y*.33}
+
+ a${d},${d} 1 0,0 ${-1*g*.25},${y*.15}
+ a${d},${d} 1 0,0 ${-1*g*.25},0
+ a${d},${d} 1 0,0 ${-1*g*.25},0
+ a${d},${d} 1 0,0 ${-1*g*.25},${-1*y*.15}
+
+ a${d},${d} 1 0,0 ${-1*g*.1},${-1*y*.33}
+ a${d*.8},${d*.8} 1 0,0 0,${-1*y*.34}
+ a${d},${d} 1 0,0 ${g*.1},${-1*y*.33}
+ H0 V0 Z`;if(t.look==="handDrawn"){let T=$t.svg(n),C=zt(t,{}),_=T.path(k,C);x=n.insert(()=>_,":first-child"),x.attr("class","basic label-container").attr("style",Pr(f))}else x=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",k);return x.attr("transform",`translate(${-g/2}, ${-y/2})`),Vt(t,x),t.calcIntersect=function(T,C){return Mt.rect(T,C)},t.intersect=function(T){return z.info("Bang intersect",t,T),Mt.rect(t,T)},n}var nQ=b(()=>{"use strict";Jt();de();be();me();xe();Re();s(iQ,"bang")});async function sQ(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:o,label:l}=await Qt(e,t,Kt(t)),u=a.width+2*o,h=a.height+2*o,d=.15*u,f=.25*u,p=.35*u,m=.2*u,{cssStyles:g}=t,y,x=`M0 0
+ a${d},${d} 0 0,1 ${u*.25},${-1*u*.1}
+ a${p},${p} 1 0,1 ${u*.4},${-1*u*.1}
+ a${f},${f} 1 0,1 ${u*.35},${u*.2}
+
+ a${d},${d} 1 0,1 ${u*.15},${h*.35}
+ a${m},${m} 1 0,1 ${-1*u*.15},${h*.65}
+
+ a${f},${d} 1 0,1 ${-1*u*.25},${u*.15}
+ a${p},${p} 1 0,1 ${-1*u*.5},0
+ a${d},${d} 1 0,1 ${-1*u*.25},${-1*u*.15}
+
+ a${d},${d} 1 0,1 ${-1*u*.1},${-1*h*.35}
+ a${m},${m} 1 0,1 ${u*.1},${-1*h*.65}
+ H0 V0 Z`;if(t.look==="handDrawn"){let k=$t.svg(n),T=zt(t,{}),C=k.path(x,T);y=n.insert(()=>C,":first-child"),y.attr("class","basic label-container").attr("style",Pr(g))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-u/2}, ${-h/2})`),Vt(t,y),t.calcIntersect=function(k,T){return Mt.rect(k,T)},t.intersect=function(k){return z.info("Cloud intersect",t,k),Mt.rect(t,k)},n}var aQ=b(()=>{"use strict";xe();Jt();Re();be();me();de();s(sQ,"cloud")});async function oQ(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:o,label:l}=await Qt(e,t,Kt(t)),u=a.width+8*o,h=a.height+2*o,d=5,f=t.look==="neo"?`
+ M${-u/2} ${h/2-d}
+ v${-h+2*d}
+ q0,-${d} ${d},-${d}
+ h${u-2*d}
+ q${d},0 ${d},${d}
+ v${h-d}
+ H${-u/2}
+ Z
+ `:`
+ M${-u/2} ${h/2-d}
+ v${-h+2*d}
+ q0,-${d} ${d},-${d}
+ h${u-2*d}
+ q${d},0 ${d},${d}
+ v${h-2*d}
+ q0,${d} ${-d},${d}
+ h${-(u-2*d)}
+ q${-d},0 ${-d},${-d}
+ Z
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let p=n.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",f);return n.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",h/2).attr("x2",u/2).attr("y2",h/2),l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>l.node()),Vt(t,p),t.calcIntersect=function(m,g){return Mt.rect(m,g)},t.intersect=function(m){return Mt.rect(t,m)},n}var lQ=b(()=>{"use strict";be();me();de();s(oQ,"defaultMindmapNode")});async function cQ(e,t){let r={padding:t.padding??0};return oC(e,t,r)}var uQ=b(()=>{"use strict";uD();s(cQ,"mindmapCircle")});function hQ(e){return e in fD}var i5t,n5t,fD,pD=b(()=>{"use strict";MY();$Y();VY();GY();uD();qY();UY();YY();KY();ZY();rX();nX();aX();lX();dX();pX();gX();xX();kX();CX();wX();EX();AX();LX();IX();OX();BX();$X();VX();qX();UX();YX();KX();ZX();tK();rK();nK();aK();lK();uK();dK();pK();gK();xK();kK();CK();wK();EK();AK();IK();OK();BK();VK();GK();qK();UK();YK();ZK();tQ();rQ();nQ();aQ();lQ();uQ();i5t=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:hK},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:sK},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:fK},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:TK},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:eX},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:oC},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:iQ},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:sQ},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:JX},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:yX},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:PX},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:MX},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:NK},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:DX},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:sX},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:vK},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:FY},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:oK},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:bK},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:yK},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:fX},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:bX},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:jY},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:HY},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:XY},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:FX},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:zK},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:mX},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:DK},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:WX},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:QY},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:iX},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:FK},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:jK},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:oX},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:MK},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:hX},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:cK},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:XX},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:HX},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:PY},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:WY},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:_K},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:SK},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:WK},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:eK},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:jX}],n5t=s(()=>{let t=[...Object.entries({state:mK,choice:zY,note:QX,rectWithTitle:iK,labelRect:NX,iconSquare:vX,iconCircle:SX,icon:TX,iconRounded:_X,imageSquare:RX,anchor:OY,kanbanItem:eQ,mindmapCircle:cQ,defaultMindmapNode:oQ,classBox:QK,erBox:dD,requirementBox:JK}),...i5t.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),fD=n5t();s(hQ,"isValidShape")});var s5t,uC,dQ=b(()=>{"use strict";lr();S0();ye();Jt();pD();Re();fr();yi();Td();r1();s5t="flowchart-",uC=class{constructor(){this.vertexCounter=0;this.config=Q();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=Ye;this.setAccDescription=Je;this.setDiagramTitle=sr;this.getAccTitle=Ze;this.getAccDescription=tr;this.getDiagramTitle=er;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{s(this,"FlowDB")}sanitizeText(t){return qt.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let r of this.vertices.values())if(r.id===t)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,r,i,n,a,o,l={},u){if(!t||t.trim().length===0)return;let h;if(u!==void 0){let m;u.includes(`
+`)?m=u+`
+`:m=`{
+`+u+`
+}`,h=Pu(m,{schema:Bu})}let d=this.edges.find(m=>m.id===t);if(d){let m=h;m?.animate!==void 0&&(d.animate=m.animate),m?.animation!==void 0&&(d.animation=m.animation),m?.curve!==void 0&&(d.interpolate=m.curve);return}let f,p=this.vertices.get(t);if(p===void 0&&(r===void 0&&i===void 0&&n!==void 0&&n!==null&&z.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),p={id:t,labelType:"text",domId:s5t+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,p)),this.vertexCounter++,r!==void 0?(this.config=Q(),f=this.sanitizeText(r.text.trim()),p.labelType=r.type,f.startsWith('"')&&f.endsWith('"')&&(f=f.substring(1,f.length-1)),p.text=f):p.text===void 0&&(p.text=t),i!==void 0&&(p.type=i),n?.forEach(m=>{p.styles.push(m)}),a?.forEach(m=>{p.classes.push(m)}),o!==void 0&&(p.dir=o),p.props===void 0?p.props=l:l!==void 0&&Object.assign(p.props,l),h!==void 0){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!hQ(h.shape))throw new Error(`No such shape: ${h.shape}.`);p.type=h?.shape}h?.label&&(p.text=h?.label,p.labelType=this.sanitizeNodeLabelType(h?.labelType)),h?.icon&&(p.icon=h?.icon,!h.label?.trim()&&p.text===t&&(p.text="")),h?.form&&(p.form=h?.form),h?.pos&&(p.pos=h?.pos),h?.img&&(p.img=h?.img,!h.label?.trim()&&p.text===t&&(p.text="")),h?.constraint&&(p.constraint=h.constraint),h.w&&(p.assetWidth=Number(h.w)),h.h&&(p.assetHeight=Number(h.h))}}addSingleLink(t,r,i,n){let l={start:t,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};z.info("abc78 Got edge...",l);let u=i.text;if(u!==void 0&&(l.text=this.sanitizeText(u.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=this.sanitizeNodeLabelType(u.type)),i!==void 0&&(l.type=i.type,l.stroke=i.stroke,l.length=i.length>10?10:i.length),n&&!this.edges.some(h=>h.id===n))l.id=n,l.isUserDefinedId=!0;else{let h=this.edges.filter(d=>d.start===l.start&&d.end===l.end);h.length===0?l.id=Nu(l.start,l.end,{counter:0,prefix:"L"}):l.id=Nu(l.start,l.end,{counter:h.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))z.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(t){return t!==null&&typeof t=="object"&&"id"in t&&typeof t.id=="string"}addLink(t,r,i){let n=this.isLinkData(i)?i.id.replace("@",""):void 0;z.info("addLink",t,r,n);for(let a of t)for(let o of r){let l=a===t[t.length-1],u=o===r[0];l&&u?this.addSingleLink(a,o,i,n):this.addSingleLink(a,o,i,void 0)}}updateLinkInterpolate(t,r){t.forEach(i=>{i==="default"?this.edges.defaultInterpolate=r:this.edges[i].interpolate=r})}updateLink(t,r){t.forEach(i=>{if(typeof i=="number"&&i>=this.edges.length)throw new Error(`The index ${i} 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.)`);i==="default"?this.edges.defaultStyle=r:(this.edges[i].style=r,(this.edges[i]?.style?.length??0)>0&&!this.edges[i]?.style?.some(n=>n?.startsWith("fill"))&&this.edges[i]?.style?.push("fill:none"))})}addClass(t,r){let i=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(n=>{let a=this.classes.get(n);a===void 0&&(a={id:n,styles:[],textStyles:[]},this.classes.set(n,a)),i?.forEach(o=>{if(/color/.exec(o)){let l=o.replace("fill","bgFill");a.textStyles.push(l)}a.styles.push(o)})})}setDirection(t){this.direction=t.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(t,r){for(let i of t.split(",")){let n=this.vertices.get(i);n&&n.classes.push(r);let a=this.edges.find(l=>l.id===i);a&&a.classes.push(r);let o=this.subGraphLookup.get(i);o&&o.classes.push(r)}}setTooltip(t,r){if(r!==void 0){r=this.sanitizeText(r);for(let i of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(i):i,r)}}setClickFun(t,r,i){if(Q().securityLevel!=="loose"||r===void 0)return;let n=[];if(typeof i=="string"){n=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o{let o=this.lookUpDomId(t),l=document.querySelector(`[id="${o}"]`);l!==null&&l.addEventListener("click",()=>{Te.runFunc(r,...n)},!1)}))}setLink(t,r,i){t.split(",").forEach(n=>{let a=this.vertices.get(n);a!==void 0&&(a.link=Te.formatUrl(r,this.config),a.linkTarget=i)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,r,i){t.split(",").forEach(n=>{this.setClickFun(n,r,i)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(r=>{r(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=cT();vt(t).select("svg").selectAll("g.node").on("mouseover",a=>{let o=vt(a.currentTarget),l=o.attr("title");if(l===null)return;let u=a.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(o.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(Va.sanitize(l)),o.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),vt(a.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=Q(),He()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,r,i){let n=t.text.trim(),a=i.text;t===i&&/\s/.exec(i.text)&&(n=void 0);let l=s(p=>{let m={boolean:{},number:{},string:{}},g=[],y;return{nodeList:p.filter(function(k){let T=typeof k;return k.stmt&&k.stmt==="dir"?(y=k.value,!1):k.trim()===""?!1:T in m?m[T].hasOwnProperty(k)?!1:m[T][k]=!0:g.includes(k)?!1:g.push(k)}),dir:y}},"uniq")(r.flat()),u=l.nodeList,h=l.dir,d=Q().flowchart??{};if(h=h??(d.inheritDir?this.getDirection()??Q().direction??void 0:void 0),this.version==="gen-1")for(let p=0;p2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===t)return{result:!0,count:0};let n=0,a=1;for(;n=0){let l=this.indexNodes2(t,o);if(l.result)return{result:!0,count:a+l.count};a=a+l.count}n=n+1}return{result:!1,count:a}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(t){let r=t.trim(),i="arrow_open";switch(r[0]){case"<":i="arrow_point",r=r.slice(1);break;case"x":i="arrow_cross",r=r.slice(1);break;case"o":i="arrow_circle",r=r.slice(1);break}let n="normal";return r.includes("=")&&(n="thick"),r.includes(".")&&(n="dotted"),{type:i,stroke:n}}countChar(t,r){let i=r.length,n=0;for(let a=0;a":n="arrow_point",r.startsWith("<")&&(n="double_"+n,i=i.slice(1));break;case"o":n="arrow_circle",r.startsWith("o")&&(n="double_"+n,i=i.slice(1));break}let a="normal",o=i.length-1;i.startsWith("=")&&(a="thick"),i.startsWith("~")&&(a="invisible");let l=this.countChar(".",i);return l&&(a="dotted",o=l),{type:n,stroke:a,length:o}}destructLink(t,r){let i=this.destructEndLink(t),n;if(r){if(n=this.destructStartLink(r),n.stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=i.type;else{if(n.type!==i.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=i.length,n}return i}exists(t,r){for(let i of t)if(i.nodes.includes(r))return!0;return!1}makeUniq(t,r){let i=[];return t.nodes.forEach((n,a)=>{this.exists(r,n)||i.push(t.nodes[a])}),{nodes:i}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return t.form==="circle"?"iconCircle":t.form==="square"?"iconSquare":t.form==="rounded"?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,r){return t.find(i=>i.id===r)}destructEdgeType(t){let r="none",i="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":i=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=t.replace("double_",""),i=r;break}return{arrowTypeStart:r,arrowTypeEnd:i}}addNodeFromVertex(t,r,i,n,a,o){let l=i.get(t.id),u=n.get(t.id)??!1,h=this.findNode(r,t.id);if(h)h.cssStyles=t.styles,h.cssCompiledStyles=this.getCompiledStyles(t.classes),h.cssClasses=t.classes.join(" ");else{let d={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:l,padding:a.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:o,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};u?r.push({...d,isGroup:!0,shape:"rect"}):r.push({...d,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let r=[];for(let i of t){let n=this.classes.get(i);n?.styles&&(r=[...r,...n.styles??[]].map(a=>a.trim())),n?.textStyles&&(r=[...r,...n.textStyles??[]].map(a=>a.trim()))}return r}getData(){let t=Q(),r=[],i=[],n=this.getSubGraphs(),a=new Map,o=new Map;for(let h=n.length-1;h>=0;h--){let d=n[h];d.nodes.length>0&&o.set(d.id,!0);for(let f of d.nodes)a.set(f,d.id)}for(let h=n.length-1;h>=0;h--){let d=n[h];r.push({id:d.id,label:d.title,labelStyle:"",labelType:d.labelType,parentId:a.get(d.id),padding:8,cssCompiledStyles:this.getCompiledStyles(d.classes),cssClasses:d.classes.join(" "),shape:"rect",dir:d.dir,isGroup:!0,look:t.look})}this.getVertices().forEach(h=>{this.addNodeFromVertex(h,r,a,o,t,t.look||"classic")});let u=this.getEdges();return u.forEach((h,d)=>{let{arrowTypeStart:f,arrowTypeEnd:p}=this.destructEdgeType(h.type),m=[...u.defaultStyle??[]];h.style&&m.push(...h.style);let g={id:Nu(h.start,h.end,{counter:d,prefix:"L"},h.id),isUserDefinedId:h.isUserDefinedId,start:h.start,end:h.end,type:h.type??"normal",label:h.text,labelType:h.labelType,labelpos:"c",thickness:h.stroke,minlen:h.length,classes:h?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":f,arrowTypeEnd:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":p,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(h.classes),labelStyle:m,style:m,pattern:h.stroke,look:t.look,animate:h.animate,animation:h.animation,curve:h.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};i.push(g)}),{nodes:r,edges:i,other:{},config:t}}defaultConfig(){return z2.flowchart}}});var vl,bm=b(()=>{"use strict";lr();vl=s((e,t)=>{let r;return t==="sandbox"&&(r=vt("#i"+e)),(t==="sandbox"?vt(r.nodes()[0].contentDocument.body):vt("body")).select(`[id="${e}"]`)},"getDiagramElement")});var Lc,B0=b(()=>{"use strict";Lc=s(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins")});var fQ,a5t,o5t,l5t,c5t,u5t,h5t,pQ,km,mQ,hC=b(()=>{"use strict";ye();Qe();Jt();B0();lr();xe();Xa();UL();lC();Md();me();fQ=s(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);let r=Q(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:d}=Pt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Ke(r),m=f.insert("g").attr("class","cluster-label "),g;t.labelType==="markdown"?g=await zi(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):g=await Fo(m,t.label,t.labelStyle||"",!1,!0);let y=g.getBBox();if(Ke(r)){let A=g.children[0],v=vt(g);y=A.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}let x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;let k=t.height,T=t.x-x/2,C=t.y-k/2;z.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){let A=$t.svg(f),v=zt(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),M=A.path(Hs(T,C,x,k,0),v);_=f.insert(()=>(z.debug("Rough node insert CXC",M),M),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",d.join(";").replace("fill","stroke"))}else _=f.insert("rect",":first-child"),_.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",C).attr("width",x).attr("height",k);let{subGraphTitleTopMargin:S}=Lc(r);if(m.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+S})`),l){let A=m.select("span");A&&A.attr("style",l)}let w=_.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=y.height-t.padding/2,t.intersect=function(A){return $u(t,A)},{cluster:f,labelBBox:y}},"rect"),a5t=s((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");let o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(l){return $u(t,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),o5t=s(async(e,t)=>{let r=Q(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),d=h.insert("g",":first-child"),f=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),m=await Fo(f,t.label,t.labelStyle,void 0,!0),g=m.getBBox();if(Ke(r)){let M=m.children[0],$=vt(m);g=M.getBoundingClientRect(),$.attr("width",g.width),$.attr("height",g.height)}let y=0*t.padding,x=y/2,k=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+y;t.width<=g.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;let T=t.height+y,C=t.height+y-g.height-6,_=t.x-k/2,S=t.y-T/2;t.width=k;let w=t.y-t.height/2-x+g.height+2,A;if(t.look==="handDrawn"){let M=t.cssClasses.includes("statediagram-cluster-alt"),$=$t.svg(h),I=t.rx||t.ry?$.path(Hs(_,S,k,T,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:n}):$.rectangle(_,S,k,T,{seed:n});A=h.insert(()=>I,":first-child");let F=$.rectangle(_,w,k,C,{fill:M?a:o,fillStyle:M?"hachure":"solid",stroke:u,seed:n});A=h.insert(()=>I,":first-child"),p=h.insert(()=>F)}else A=d.insert("rect",":first-child"),A.attr("class","outer").attr("x",_).attr("y",S).attr("width",k).attr("height",T).attr("data-look",t.look),p.attr("class","inner").attr("x",_).attr("y",w).attr("width",k).attr("height",C);f.attr("transform",`translate(${t.x-g.width/2}, ${S+1-(Ke(r)?0:3)})`);let v=A.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(M){return $u(t,M)},{cluster:h,labelBBox:g}},"roundedWithTitle"),l5t=s(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);let r=Q(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:d}=Pt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Ke(r),m=f.insert("g").attr("class","cluster-label "),g=await zi(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),y=g.getBBox();if(Ke(r)){let A=g.children[0],v=vt(g);y=A.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}let x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;let k=t.height,T=t.x-x/2,C=t.y-k/2;z.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){let A=$t.svg(f),v=zt(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),M=A.path(Hs(T,C,x,k,t.rx),v);_=f.insert(()=>(z.debug("Rough node insert CXC",M),M),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",d.join(";").replace("fill","stroke"))}else _=f.insert("rect",":first-child"),_.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",C).attr("width",x).attr("height",k);let{subGraphTitleTopMargin:S}=Lc(r);if(m.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+S})`),l){let A=m.select("span");A&&A.attr("style",l)}let w=_.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=y.height-t.padding/2,t.intersect=function(A){return $u(t,A)},{cluster:f,labelBBox:y}},"kanbanSection"),c5t=s((e,t)=>{let r=Q(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),l=o.insert("g",":first-child"),u=0*t.padding,h=t.width+u;t.diff=-t.padding;let d=t.height+u,f=t.x-h/2,p=t.y-d/2;t.width=h;let m;if(t.look==="handDrawn"){let x=$t.svg(o).rectangle(f,p,h,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});m=o.insert(()=>x,":first-child")}else{m=l.insert("rect",":first-child");let y="outer";t.look,y="divider",m.attr("class",y).attr("x",f).attr("y",p).attr("width",h).attr("height",d).attr("data-look",t.look)}let g=m.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return $u(t,y)},{cluster:o,labelBBox:{}}},"divider"),u5t=fQ,h5t={rect:fQ,squareRect:u5t,roundedWithTitle:o5t,noteGroup:a5t,divider:c5t,kanbanSection:l5t},pQ=new Map,km=s(async(e,t)=>{let r=t.shape||"rect",i=await h5t[r](e,t);return pQ.set(t.id,i),i},"insertCluster"),mQ=s(()=>{pQ=new Map},"clear")});var Qa,mD=b(()=>{"use strict";Qa=s((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";let r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform")});function dC(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=wi(e),t=wi(t);let[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],o=n-r,l=a-i;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}var zn,gD,wi,fC,yD=b(()=>{"use strict";zn={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},gD={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};s(dC,"calculateDeltaAndAngle");wi=s(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),fC=s(e=>({x:s(function(t,r,i){let n=0,a=wi(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(zn,e.arrowTypeEnd)){let{angle:m,deltaX:g}=dC(i[i.length-1],i[i.length-2]);n=zn[e.arrowTypeEnd]*Math.cos(m)*(g>=0?1:-1)}let o=Math.abs(wi(t).x-wi(i[i.length-1]).x),l=Math.abs(wi(t).y-wi(i[i.length-1]).y),u=Math.abs(wi(t).x-wi(i[0]).x),h=Math.abs(wi(t).y-wi(i[0]).y),d=zn[e.arrowTypeStart],f=zn[e.arrowTypeEnd],p=1;if(o0&&l0&&h=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(zn,e.arrowTypeEnd)){let{angle:m,deltaY:g}=dC(i[i.length-1],i[i.length-2]);n=zn[e.arrowTypeEnd]*Math.abs(Math.sin(m))*(g>=0?1:-1)}let o=Math.abs(wi(t).y-wi(i[i.length-1]).y),l=Math.abs(wi(t).x-wi(i[i.length-1]).x),u=Math.abs(wi(t).y-wi(i[0]).y),h=Math.abs(wi(t).x-wi(i[0]).x),d=zn[e.arrowTypeStart],f=zn[e.arrowTypeEnd],p=1;if(o0&&l0&&h{"use strict";Jt();yQ=s((e,t,r,i,n,a=!1,o)=>{t.arrowTypeStart&&gQ(e,"start",t.arrowTypeStart,r,i,n,a,o),t.arrowTypeEnd&&gQ(e,"end",t.arrowTypeEnd,r,i,n,a,o)},"addEdgeMarkers"),d5t={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},f5t=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],gQ=s((e,t,r,i,n,a,o=!1,l)=>{let u=d5t[r],h=u&&f5t.includes(u.type);if(!u){z.warn(`Unknown arrow type: ${r}`);return}let d=u.type,m=`${n}_${a}-${d}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(l&&l.trim()!==""){let g=l.replace(/[^\dA-Za-z]/g,"_"),y=`${m}_${g}`;if(!document.getElementById(y)){let x=document.getElementById(m);if(x){let k=x.cloneNode(!0);k.id=y,k.querySelectorAll("path, circle, line").forEach(C=>{C.setAttribute("stroke",l),u.fill&&C.setAttribute("fill",l)}),x.parentNode?.appendChild(k)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${m})`)},"addEdgeMarker")});function pC(e,t){Ke(Q())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}function y5t(e){let t=[],r=[];for(let i=1;i5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}function k5t(e,t){if(e.length<2)return"";let r="",i=e.length,n=1e-5;for(let a=0;a({...n}));if(e.length>=2&&zn[t.arrowTypeStart]){let n=zn[t.arrowTypeStart],a=e[0],o=e[1],{angle:l}=TQ(a,o),u=n*Math.cos(l),h=n*Math.sin(l);r[0].x=a.x+u,r[0].y=a.y+h}let i=e.length;if(i>=2&&zn[t.arrowTypeEnd]){let n=zn[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:l}=TQ(o,a),u=n*Math.cos(l),h=n*Math.sin(l);r[i-1].x=a.x-u,r[i-1].y=a.y-h}return r}var p5t,mC,Gn,CQ,P0,gC,yC,m5t,g5t,bQ,kQ,x5t,b5t,xC,xD=b(()=>{"use strict";ye();Qe();Jt();Xa();mD();Re();yD();B0();lr();xe();lC();xQ();me();p5t=s(e=>typeof e=="string"?e:Q()?.flowchart?.curve,"resolveEdgeCurveType"),mC=new Map,Gn=new Map,CQ=s(()=>{mC.clear(),Gn.clear()},"clear"),P0=s(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),gC=s(async(e,t)=>{let r=Q(),i=Ke(r),{labelStyles:n}=Pt(t);t.labelStyle=n;let a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),l=t.labelType==="markdown",h=await zi(e,t.label,{style:P0(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:l,width:l?void 0:void 0},r);o.node().appendChild(h),z.info("abc82",t,t.labelType);let d=h.getBBox(),f=d;if(i){let m=h.children[0],g=vt(h);d=m.getBoundingClientRect(),f=d,g.attr("width",d.width),g.attr("height",d.height)}else{let m=vt(h).select("text").node();m&&typeof m.getBBox=="function"&&(f=m.getBBox())}o.attr("transform",Qa(f,i)),mC.set(t.id,a),t.width=d.width,t.height=d.height;let p;if(t.startLabelLeft){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Fo(g,t.startLabelLeft,P0(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){let k=y.children[0],T=vt(y);x=k.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Qa(x,i)),Gn.get(t.id)||Gn.set(t.id,{}),Gn.get(t.id).startLeft=m,pC(p,t.startLabelLeft)}if(t.startLabelRight){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Fo(g,t.startLabelRight,P0(t.labelStyle)||"",!1,!1);p=y,g.node().appendChild(y);let x=y.getBBox();if(i){let k=y.children[0],T=vt(y);x=k.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Qa(x,i)),Gn.get(t.id)||Gn.set(t.id,{}),Gn.get(t.id).startRight=m,pC(p,t.startLabelRight)}if(t.endLabelLeft){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Fo(g,t.endLabelLeft,P0(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){let k=y.children[0],T=vt(y);x=k.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Qa(x,i)),m.node().appendChild(y),Gn.get(t.id)||Gn.set(t.id,{}),Gn.get(t.id).endLeft=m,pC(p,t.endLabelLeft)}if(t.endLabelRight){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Fo(g,t.endLabelRight,P0(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){let k=y.children[0],T=vt(y);x=k.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Qa(x,i)),m.node().appendChild(y),Gn.get(t.id)||Gn.set(t.id,{}),Gn.get(t.id).endRight=m,pC(p,t.endLabelRight)}return h},"insertEdgeLabel");s(pC,"setTerminalWidth");yC=s((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,mC.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath,i=Q(),{subGraphTitleTotalMargin:n}=Lc(i);if(e.label){let a=mC.get(e.id),o=e.x,l=e.y;if(r){let u=Te.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),t.updatedPath&&(o=u.x,l=u.y)}a.attr("transform",`translate(${o}, ${l+n/2})`)}if(e.startLabelLeft){let a=Gn.get(e.id).startLeft,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.startLabelRight){let a=Gn.get(e.id).startRight,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelLeft){let a=Gn.get(e.id).endLeft,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelRight){let a=Gn.get(e.id).endRight,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),m5t=s((e,t)=>{let r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,l=e.height/2;return n>=o||a>=l},"outsideNode"),g5t=s((e,t,r)=>{z.debug(`intersection calc abc89:
+ outsidePoint: ${JSON.stringify(t)}
+ insidePoint : ${JSON.stringify(r)}
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2,l=r.xMath.abs(i-t.x)*u){let f=r.y{z.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(z.info("abc88 checking point",a,t),!m5t(t,a)&&!n){let o=g5t(t,i,a);z.debug("abc88 inside",a,i,o),z.debug("abc88 intersection",o,t);let l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)?z.warn("abc88 no intersect",o,r):r.push(o),n=!0}else z.warn("abc88 outside",a,i),i=a,n||r.push(a)}),z.debug("returning points",r),r},"cutPathAtIntersect");s(y5t,"extractCornerPoints");kQ=s(function(e,t,r){let i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),x5t=s(function(e){let{cornerPointPositions:t}=y5t(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10){z.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));let m=5;o.x===l.x?p={x:h<0?l.x-m+f:l.x+m-f,y:d<0?l.y-f:l.y+f}:p={x:h<0?l.x-f:l.x+f,y:d<0?l.y-m+f:l.y+m-f}}else z.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(p,u)}else r.push(e[i]);return r},"fixCorners"),b5t=s((e,t,r)=>{let i=e-t-r,n=2,a=2,o=n+a,l=Math.floor(i/o),u=Array(l).fill(`${n} ${a}`).join(" ");return`0 ${t} ${u} ${r}`},"generateDashArray"),xC=s(function(e,t,r,i,n,a,o,l=!1){if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:u}=Q(),h=t.points,d=!1,f=n;var p=a;let m=[];for(let P in t.cssCompiledStyles)R0(P)||m.push(t.cssCompiledStyles[P]);z.debug("UIO intersect check",t.points,p.x,f.x),p.intersect&&f.intersect&&!l&&(h=h.slice(1,t.points.length-1),h.unshift(f.intersect(h[0])),z.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));let g=btoa(JSON.stringify(h));t.toCluster&&(z.info("to cluster abc88",r.get(t.toCluster)),h=bQ(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(z.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=bQ(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let y=h.filter(P=>!Number.isNaN(P.y)),x=p5t(t.curve);x!=="rounded"&&(y=x5t(y));let k=xl;switch(x){case"linear":k=xl;break;case"basis":k=Oo;break;case"cardinal":k=X1;break;case"bumpX":k=q1;break;case"bumpY":k=j1;break;case"catmullRom":k=Z1;break;case"monotoneX":k=J1;break;case"monotoneY":k=t0;break;case"natural":k=jp;break;case"step":k=Up;break;case"stepAfter":k=r0;break;case"stepBefore":k=e0;break;case"rounded":k=xl;break;default:k=Oo}let{x:T,y:C}=fC(t),_=No().x(T).y(C).curve(k),S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let w,A=x==="rounded"?k5t(T5t(y,t),5):_(y),v=Array.isArray(t.style)?t.style:[t.style],M=v.find(P=>P?.startsWith("stroke:")),$="";t.animate&&($="edge-animation-fast"),t.animation&&($="edge-animation-"+t.animation);let I=!1;if(t.look==="handDrawn"){let P=$t.svg(e);Object.assign([],y);let E=P.path(A,{roughness:.3,seed:u});S+=" transition",w=vt(E).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+($?" "+$:"")).attr("style",v?v.reduce((V,L)=>V+";"+L,""):"");let D=w.attr("d");w.attr("d",D),e.node().appendChild(w.node())}else{let P=m.join(";"),E=v?v.reduce((K,U)=>K+U+";",""):"",D=(P?P+";"+E+";":E)+";"+(v?v.reduce((K,U)=>K+";"+U,""):"");w=e.append("path").attr("d",A).attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+($?" "+$:"")).attr("style",D),M=D.match(/stroke:([^;]+)/)?.[1],I=t.animate===!0||!!t.animation||P.includes("animation");let V=w.node(),L=typeof V.getTotalLength=="function"?V.getTotalLength():0,q=gD[t.arrowTypeStart]||0,H=gD[t.arrowTypeEnd]||0;if(t.look==="neo"&&!I){let U=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?b5t(L,q,H):`0 ${q} ${L-q-H} ${H}`}; stroke-dashoffset: 0;`;w.attr("style",U+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",t.id),w.attr("data-points",g),w.attr("data-look",Pr(t.look)),t.showPoints&&y.forEach(P=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",P.x).attr("cy",P.y)});let F="";(Q().flowchart.arrowMarkerAbsolute||Q().state.arrowMarkerAbsolute)&&(F=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,F=F.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),z.info("arrowTypeStart",t.arrowTypeStart),z.info("arrowTypeEnd",t.arrowTypeEnd);let B=!I&&t?.look==="neo";yQ(w,t,F,o,i,B,M);let O=Math.floor(h.length/2),R=h[O];Te.isLabelCoordinateInPath(R,w.attr("d"))||(d=!0);let N={};return d&&(N.updatedPath=h),N.originalPath=t.points,N},"insertEdge");s(k5t,"generateRoundedPath");s(TQ,"calculateDeltaAndAngle");s(T5t,"applyMarkerOffsetsToPoints")});var C5t,S5t,w5t,_5t,E5t,v5t,A5t,R5t,L5t,D5t,I5t,N5t,O5t,M5t,B5t,P5t,$5t,F5t,V5t,z5t,G5t,W5t,q5t,j5t,bC,bD=b(()=>{"use strict";Jt();Qe();C5t=s((e,t,r,i)=>{t.forEach(n=>{j5t[n](e,r,i)})},"insertMarkers"),S5t=s((e,t,r)=>{z.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),w5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),_5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),E5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),v5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),A5t=s((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),R5t=s((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),L5t=s((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),D5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),I5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{transitionColor:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),N5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),O5t=s((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),M5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),B5t=s((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),P5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),$5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a,mainBkg:o}=n,l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let u=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),F5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),V5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a,mainBkg:o}=n,l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let u=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),z5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
+ L20,10
+ M20,10
+ L0,20`)},"requirement_arrow"),G5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
+ L20,10
+ M20,10
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),W5t=s((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),q5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a}=n,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),j5t={extension:S5t,composition:w5t,aggregation:_5t,dependency:E5t,lollipop:v5t,point:A5t,circle:R5t,cross:L5t,barb:D5t,barbNeo:I5t,only_one:N5t,zero_or_one:O5t,one_or_more:M5t,zero_or_more:B5t,only_one_neo:P5t,zero_or_one_neo:$5t,one_or_more_neo:F5t,zero_or_more_neo:V5t,requirement_arrow:z5t,requirement_contains:W5t,requirement_arrow_neo:G5t,requirement_contains_neo:q5t},bC=C5t});async function Tm(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let a=t.shape?fD[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return i.attr("data-look",Pr(t.look)),t.tooltip&&n.attr("title",t.tooltip),kC.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var kC,SQ,wQ,$0,TC=b(()=>{"use strict";Jt();pD();Re();kC=new Map;s(Tm,"insertNode");SQ=s((e,t)=>{kC.set(t.id,e)},"setNodeElem"),wQ=s(()=>{kC.clear()},"clear"),$0=s(e=>{let t=kC.get(e.id);z.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode")});var _Q,EQ=b(()=>{"use strict";Qe();fr();Jt();hC();xD();bD();TC();de();Re();_Q={common:qt,getConfig:le,insertCluster:km,insertEdge:xC,insertEdgeLabel:gC,insertMarkers:bC,insertNode:Tm,interpolateToCurve:nL,labelHelper:Qt,log:z,positionEdgeLabel:yC}});function H5t(e){return typeof e=="symbol"||Ni(e)&&Vn(e)==U5t}var U5t,Ta,Pd=b(()=>{"use strict";kc();qa();U5t="[object Symbol]";s(H5t,"isSymbol");Ta=H5t});function Y5t(e,t){for(var r=-1,i=e==null?0:e.length,n=Array(i);++r{"use strict";s(Y5t,"arrayMap");Ys=Y5t});function RQ(e){if(typeof e=="string")return e;if(fe(e))return Ys(e,RQ)+"";if(Ta(e))return AQ?AQ.call(e):"";var t=e+"";return t=="0"&&1/e==-X5t?"-0":t}var X5t,vQ,AQ,LQ,DQ=b(()=>{"use strict";Cd();$d();Si();Pd();X5t=1/0,vQ=_n?_n.prototype:void 0,AQ=vQ?vQ.toString:void 0;s(RQ,"baseToString");LQ=RQ});function Q5t(e){for(var t=e.length;t--&&K5t.test(e.charAt(t)););return t}var K5t,IQ,NQ=b(()=>{"use strict";K5t=/\s/;s(Q5t,"trimmedEndIndex");IQ=Q5t});function J5t(e){return e&&e.slice(0,IQ(e)+1).replace(Z5t,"")}var Z5t,OQ,MQ=b(()=>{"use strict";NQ();Z5t=/^\s+/;s(J5t,"baseTrim");OQ=J5t});function nRt(e){if(typeof e=="number")return e;if(Ta(e))return BQ;if(ii(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ii(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=OQ(e);var r=eRt.test(e);return r||rRt.test(e)?iRt(e.slice(2),r?2:8):tRt.test(e)?BQ:+e}var BQ,tRt,eRt,rRt,iRt,PQ,$Q=b(()=>{"use strict";MQ();xa();Pd();BQ=NaN,tRt=/^[-+]0x[0-9a-f]+$/i,eRt=/^0b[01]+$/i,rRt=/^0o[0-7]+$/i,iRt=parseInt;s(nRt,"toNumber");PQ=nRt});function aRt(e){if(!e)return e===0?e:0;if(e=PQ(e),e===FQ||e===-FQ){var t=e<0?-1:1;return t*sRt}return e===e?e:0}var FQ,sRt,Cm,kD=b(()=>{"use strict";$Q();FQ=1/0,sRt=17976931348623157e292;s(aRt,"toFinite");Cm=aRt});function oRt(e){var t=Cm(e),r=t%1;return t===t?r?t-r:t:0}var Al,Sm=b(()=>{"use strict";kD();s(oRt,"toInteger");Al=oRt});var lRt,CC,VQ=b(()=>{"use strict";wu();Ga();lRt=Fs(Fi,"WeakMap"),CC=lRt});function cRt(){}var Oi,TD=b(()=>{"use strict";s(cRt,"noop");Oi=cRt});function uRt(e,t){for(var r=-1,i=e==null?0:e.length;++r{"use strict";s(uRt,"arrayEach");SC=uRt});function hRt(e,t,r,i){for(var n=e.length,a=r+(i?1:-1);i?a--:++a{"use strict";s(hRt,"baseFindIndex");wC=hRt});function dRt(e){return e!==e}var zQ,GQ=b(()=>{"use strict";s(dRt,"baseIsNaN");zQ=dRt});function fRt(e,t,r){for(var i=r-1,n=e.length;++i{"use strict";s(fRt,"strictIndexOf");WQ=fRt});function pRt(e,t,r){return t===t?WQ(e,t,r):wC(e,zQ,r)}var wm,_C=b(()=>{"use strict";SD();GQ();qQ();s(pRt,"baseIndexOf");wm=pRt});function mRt(e,t){var r=e==null?0:e.length;return!!r&&wm(e,t,0)>-1}var EC,wD=b(()=>{"use strict";_C();s(mRt,"arrayIncludes");EC=mRt});var gRt,jQ,UQ=b(()=>{"use strict";jR();gRt=kT(Object.keys,Object),jQ=gRt});function bRt(e){if(!Tl(e))return jQ(e);var t=[];for(var r in Object(e))xRt.call(e,r)&&r!="constructor"&&t.push(r);return t}var yRt,xRt,_m,vC=b(()=>{"use strict";sm();UQ();yRt=Object.prototype,xRt=yRt.hasOwnProperty;s(bRt,"baseKeys");_m=bRt});function kRt(e){return Vi(e)?_T(e):_m(e)}var Ar,Rl=b(()=>{"use strict";KR();vC();ja();s(kRt,"keys");Ar=kRt});var TRt,CRt,SRt,Wn,HQ=b(()=>{"use strict";cm();vd();tL();ja();sm();Rl();TRt=Object.prototype,CRt=TRt.hasOwnProperty,SRt=AT(function(e,t){if(Tl(t)||Vi(t)){Ya(t,Ar(t),e);return}for(var r in t)CRt.call(t,r)&&Cl(e,r,t[r])}),Wn=SRt});function ERt(e,t){if(fe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ta(e)?!0:_Rt.test(e)||!wRt.test(e)||t!=null&&e in Object(t)}var wRt,_Rt,Em,AC=b(()=>{"use strict";Si();Pd();wRt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_Rt=/^\w*$/;s(ERt,"isKey");Em=ERt});function ARt(e){var t=Qp(e,function(i){return r.size===vRt&&r.clear(),i}),r=t.cache;return t}var vRt,YQ,XQ=b(()=>{"use strict";$R();vRt=500;s(ARt,"memoizeCapped");YQ=ARt});var RRt,LRt,DRt,KQ,QQ=b(()=>{"use strict";XQ();RRt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,LRt=/\\(\\)?/g,DRt=YQ(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(RRt,function(r,i,n,a){t.push(n?a.replace(LRt,"$1"):i||r)}),t}),KQ=DRt});function IRt(e){return e==null?"":LQ(e)}var RC,_D=b(()=>{"use strict";DQ();s(IRt,"toString");RC=IRt});function NRt(e,t){return fe(e)?e:Em(e,t)?[e]:KQ(RC(e))}var Gu,F0=b(()=>{"use strict";Si();AC();QQ();_D();s(NRt,"castPath");Gu=NRt});function MRt(e){if(typeof e=="string"||Ta(e))return e;var t=e+"";return t=="0"&&1/e==-ORt?"-0":t}var ORt,Ll,vm=b(()=>{"use strict";Pd();ORt=1/0;s(MRt,"toKey");Ll=MRt});function BRt(e,t){t=Gu(t,e);for(var r=0,i=t.length;e!=null&&r{"use strict";F0();vm();s(BRt,"baseGet");Wu=BRt});function PRt(e,t,r){var i=e==null?void 0:Wu(e,t);return i===void 0?r:i}var ZQ,JQ=b(()=>{"use strict";V0();s(PRt,"get");ZQ=PRt});function $Rt(e,t){for(var r=-1,i=t.length,n=e.length;++r{"use strict";s($Rt,"arrayPush");Am=$Rt});function FRt(e){return fe(e)||Bo(e)||!!(tZ&&e&&e[tZ])}var tZ,eZ,rZ=b(()=>{"use strict";Cd();am();Si();tZ=_n?_n.isConcatSpreadable:void 0;s(FRt,"isFlattenable");eZ=FRt});function iZ(e,t,r,i,n){var a=-1,o=e.length;for(r||(r=eZ),n||(n=[]);++a0&&r(l)?t>1?iZ(l,t-1,r,i,n):Am(n,l):i||(n[n.length]=l)}return n}var Dl,Rm=b(()=>{"use strict";LC();rZ();s(iZ,"baseFlatten");Dl=iZ});function VRt(e){var t=e==null?0:e.length;return t?Dl(e,1):[]}var Nr,DC=b(()=>{"use strict";Rm();s(VRt,"flatten");Nr=VRt});function zRt(e){return vT(ET(e,void 0,Nr),e+"")}var nZ,sZ=b(()=>{"use strict";DC();QR();JR();s(zRt,"flatRest");nZ=zRt});function GRt(e,t,r){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),r=r>n?n:r,r<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(n);++i{"use strict";s(GRt,"baseSlice");IC=GRt});function QRt(e){return KRt.test(e)}var WRt,qRt,jRt,URt,HRt,YRt,XRt,KRt,aZ,oZ=b(()=>{"use strict";WRt="\\ud800-\\udfff",qRt="\\u0300-\\u036f",jRt="\\ufe20-\\ufe2f",URt="\\u20d0-\\u20ff",HRt=qRt+jRt+URt,YRt="\\ufe0e\\ufe0f",XRt="\\u200d",KRt=RegExp("["+XRt+WRt+HRt+YRt+"]");s(QRt,"hasUnicode");aZ=QRt});function ZRt(e,t,r,i){var n=-1,a=e==null?0:e.length;for(i&&a&&(r=e[++n]);++n{"use strict";s(ZRt,"arrayReduce");lZ=ZRt});function JRt(e,t){return e&&Ya(t,Ar(t),e)}var uZ,hZ=b(()=>{"use strict";vd();Rl();s(JRt,"baseAssign");uZ=JRt});function tLt(e,t){return e&&Ya(t,Vs(t),e)}var dZ,fZ=b(()=>{"use strict";vd();Du();s(tLt,"baseAssignIn");dZ=tLt});function eLt(e,t){for(var r=-1,i=e==null?0:e.length,n=0,a=[];++r{"use strict";s(eLt,"arrayFilter");Lm=eLt});function rLt(){return[]}var OC,vD=b(()=>{"use strict";s(rLt,"stubArray");OC=rLt});var iLt,nLt,pZ,sLt,Dm,MC=b(()=>{"use strict";NC();vD();iLt=Object.prototype,nLt=iLt.propertyIsEnumerable,pZ=Object.getOwnPropertySymbols,sLt=pZ?function(e){return e==null?[]:(e=Object(e),Lm(pZ(e),function(t){return nLt.call(e,t)}))}:OC,Dm=sLt});function aLt(e,t){return Ya(e,Dm(e),t)}var mZ,gZ=b(()=>{"use strict";vd();MC();s(aLt,"copySymbols");mZ=aLt});var oLt,lLt,BC,AD=b(()=>{"use strict";LC();TT();MC();vD();oLt=Object.getOwnPropertySymbols,lLt=oLt?function(e){for(var t=[];e;)Am(t,Dm(e)),e=nm(e);return t}:OC,BC=lLt});function cLt(e,t){return Ya(e,BC(e),t)}var yZ,xZ=b(()=>{"use strict";vd();AD();s(cLt,"copySymbolsIn");yZ=cLt});function uLt(e,t,r){var i=t(e);return fe(e)?i:Am(i,r(e))}var PC,RD=b(()=>{"use strict";LC();Si();s(uLt,"baseGetAllKeys");PC=uLt});function hLt(e){return PC(e,Ar,Dm)}var z0,LD=b(()=>{"use strict";RD();MC();Rl();s(hLt,"getAllKeys");z0=hLt});function dLt(e){return PC(e,Vs,BC)}var $C,DD=b(()=>{"use strict";RD();AD();Du();s(dLt,"getAllKeysIn");$C=dLt});var fLt,FC,bZ=b(()=>{"use strict";wu();Ga();fLt=Fs(Fi,"DataView"),FC=fLt});var pLt,VC,kZ=b(()=>{"use strict";wu();Ga();pLt=Fs(Fi,"Promise"),VC=pLt});var mLt,qu,ID=b(()=>{"use strict";wu();Ga();mLt=Fs(Fi,"Set"),qu=mLt});var TZ,gLt,CZ,SZ,wZ,_Z,yLt,xLt,bLt,kLt,TLt,Fd,Ca,Vd=b(()=>{"use strict";bZ();fT();kZ();ID();VQ();kc();MR();TZ="[object Map]",gLt="[object Object]",CZ="[object Promise]",SZ="[object Set]",wZ="[object WeakMap]",_Z="[object DataView]",yLt=Tc(FC),xLt=Tc(vu),bLt=Tc(VC),kLt=Tc(qu),TLt=Tc(CC),Fd=Vn;(FC&&Fd(new FC(new ArrayBuffer(1)))!=_Z||vu&&Fd(new vu)!=TZ||VC&&Fd(VC.resolve())!=CZ||qu&&Fd(new qu)!=SZ||CC&&Fd(new CC)!=wZ)&&(Fd=s(function(e){var t=Vn(e),r=t==gLt?e.constructor:void 0,i=r?Tc(r):"";if(i)switch(i){case yLt:return _Z;case xLt:return TZ;case bLt:return CZ;case kLt:return SZ;case TLt:return wZ}return t},"getTag"));Ca=Fd});function wLt(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&SLt.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var CLt,SLt,EZ,vZ=b(()=>{"use strict";CLt=Object.prototype,SLt=CLt.hasOwnProperty;s(wLt,"initCloneArray");EZ=wLt});function _Lt(e,t){var r=t?im(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var AZ,RZ=b(()=>{"use strict";yT();s(_Lt,"cloneDataView");AZ=_Lt});function vLt(e){var t=new e.constructor(e.source,ELt.exec(e));return t.lastIndex=e.lastIndex,t}var ELt,LZ,DZ=b(()=>{"use strict";ELt=/\w*$/;s(vLt,"cloneRegExp");LZ=vLt});function ALt(e){return NZ?Object(NZ.call(e)):{}}var IZ,NZ,OZ,MZ=b(()=>{"use strict";Cd();IZ=_n?_n.prototype:void 0,NZ=IZ?IZ.valueOf:void 0;s(ALt,"cloneSymbol");OZ=ALt});function YLt(e,t,r){var i=e.constructor;switch(t){case PLt:return im(e);case RLt:case LLt:return new i(+e);case $Lt:return AZ(e,r);case FLt:case VLt:case zLt:case GLt:case WLt:case qLt:case jLt:case ULt:case HLt:return xT(e,r);case DLt:return new i;case ILt:case MLt:return new i(e);case NLt:return LZ(e);case OLt:return new i;case BLt:return OZ(e)}}var RLt,LLt,DLt,ILt,NLt,OLt,MLt,BLt,PLt,$Lt,FLt,VLt,zLt,GLt,WLt,qLt,jLt,ULt,HLt,BZ,PZ=b(()=>{"use strict";yT();RZ();DZ();MZ();WR();RLt="[object Boolean]",LLt="[object Date]",DLt="[object Map]",ILt="[object Number]",NLt="[object RegExp]",OLt="[object Set]",MLt="[object String]",BLt="[object Symbol]",PLt="[object ArrayBuffer]",$Lt="[object DataView]",FLt="[object Float32Array]",VLt="[object Float64Array]",zLt="[object Int8Array]",GLt="[object Int16Array]",WLt="[object Int32Array]",qLt="[object Uint8Array]",jLt="[object Uint8ClampedArray]",ULt="[object Uint16Array]",HLt="[object Uint32Array]";s(YLt,"initCloneByTag");BZ=YLt});function KLt(e){return Ni(e)&&Ca(e)==XLt}var XLt,$Z,FZ=b(()=>{"use strict";Vd();qa();XLt="[object Map]";s(KLt,"baseIsMap");$Z=KLt});var VZ,QLt,zZ,GZ=b(()=>{"use strict";FZ();Ed();f0();VZ=Ha&&Ha.isMap,QLt=VZ?Ua(VZ):$Z,zZ=QLt});function JLt(e){return Ni(e)&&Ca(e)==ZLt}var ZLt,WZ,qZ=b(()=>{"use strict";Vd();qa();ZLt="[object Set]";s(JLt,"baseIsSet");WZ=JLt});var jZ,tDt,UZ,HZ=b(()=>{"use strict";qZ();Ed();f0();jZ=Ha&&Ha.isSet,tDt=jZ?Ua(jZ):WZ,UZ=tDt});function zC(e,t,r,i,n,a){var o,l=t&eDt,u=t&rDt,h=t&iDt;if(r&&(o=n?r(e,i,n,a):r(e)),o!==void 0)return o;if(!ii(e))return e;var d=fe(e);if(d){if(o=EZ(e),!l)return bT(e,o)}else{var f=Ca(e),p=f==XZ||f==lDt;if(Po(e))return gT(e,l);if(f==KZ||f==YZ||p&&!n){if(o=u||p?{}:CT(e),!l)return u?yZ(e,dZ(o,e)):mZ(e,uZ(o,e))}else{if(!ci[f])return n?e:{};o=BZ(e,f,l)}}a||(a=new bl);var m=a.get(e);if(m)return m;a.set(e,o),UZ(e)?e.forEach(function(x){o.add(zC(x,t,r,x,e,a))}):zZ(e)&&e.forEach(function(x,k){o.set(k,zC(x,t,r,k,e,a))});var g=h?u?$C:z0:u?Vs:Ar,y=d?void 0:g(e);return SC(y||e,function(x,k){y&&(k=x,x=e[k]),Cl(o,k,zC(x,t,r,k,e,a))}),o}var eDt,rDt,iDt,YZ,nDt,sDt,aDt,oDt,XZ,lDt,cDt,uDt,KZ,hDt,dDt,fDt,pDt,mDt,gDt,yDt,xDt,bDt,kDt,TDt,CDt,SDt,wDt,_Dt,EDt,ci,GC,ND=b(()=>{"use strict";u0();CD();cm();hZ();fZ();zR();qR();gZ();xZ();LD();DD();Vd();vZ();PZ();UR();Si();lm();GZ();xa();HZ();Rl();Du();eDt=1,rDt=2,iDt=4,YZ="[object Arguments]",nDt="[object Array]",sDt="[object Boolean]",aDt="[object Date]",oDt="[object Error]",XZ="[object Function]",lDt="[object GeneratorFunction]",cDt="[object Map]",uDt="[object Number]",KZ="[object Object]",hDt="[object RegExp]",dDt="[object Set]",fDt="[object String]",pDt="[object Symbol]",mDt="[object WeakMap]",gDt="[object ArrayBuffer]",yDt="[object DataView]",xDt="[object Float32Array]",bDt="[object Float64Array]",kDt="[object Int8Array]",TDt="[object Int16Array]",CDt="[object Int32Array]",SDt="[object Uint8Array]",wDt="[object Uint8ClampedArray]",_Dt="[object Uint16Array]",EDt="[object Uint32Array]",ci={};ci[YZ]=ci[nDt]=ci[gDt]=ci[yDt]=ci[sDt]=ci[aDt]=ci[xDt]=ci[bDt]=ci[kDt]=ci[TDt]=ci[CDt]=ci[cDt]=ci[uDt]=ci[KZ]=ci[hDt]=ci[dDt]=ci[fDt]=ci[pDt]=ci[SDt]=ci[wDt]=ci[_Dt]=ci[EDt]=!0;ci[oDt]=ci[XZ]=ci[mDt]=!1;s(zC,"baseClone");GC=zC});function ADt(e){return GC(e,vDt)}var vDt,jr,OD=b(()=>{"use strict";ND();vDt=4;s(ADt,"clone");jr=ADt});function DDt(e){return GC(e,RDt|LDt)}var RDt,LDt,MD,QZ=b(()=>{"use strict";ND();RDt=1,LDt=4;s(DDt,"cloneDeep");MD=DDt});function IDt(e){for(var t=-1,r=e==null?0:e.length,i=0,n=[];++t{"use strict";s(IDt,"compact");Il=IDt});function ODt(e){return this.__data__.set(e,NDt),this}var NDt,JZ,tJ=b(()=>{"use strict";NDt="__lodash_hash_undefined__";s(ODt,"setCacheAdd");JZ=ODt});function MDt(e){return this.__data__.has(e)}var eJ,rJ=b(()=>{"use strict";s(MDt,"setCacheHas");eJ=MDt});function WC(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new wd;++t{"use strict";pT();tJ();rJ();s(WC,"SetCache");WC.prototype.add=WC.prototype.push=JZ;WC.prototype.has=eJ;Im=WC});function BDt(e,t){for(var r=-1,i=e==null?0:e.length;++r{"use strict";s(BDt,"arraySome");jC=BDt});function PDt(e,t){return e.has(t)}var Nm,UC=b(()=>{"use strict";s(PDt,"cacheHas");Nm=PDt});function VDt(e,t,r,i,n,a){var o=r&$Dt,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var f=-1,p=!0,m=r&FDt?new Im:void 0;for(a.set(e,t),a.set(t,e);++f{"use strict";qC();BD();UC();$Dt=1,FDt=2;s(VDt,"equalArrays");HC=VDt});function zDt(e){var t=-1,r=Array(e.size);return e.forEach(function(i,n){r[++t]=[n,i]}),r}var iJ,nJ=b(()=>{"use strict";s(zDt,"mapToArray");iJ=zDt});function GDt(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var Om,YC=b(()=>{"use strict";s(GDt,"setToArray");Om=GDt});function r6t(e,t,r,i,n,a,o){switch(r){case e6t:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case t6t:return!(e.byteLength!=t.byteLength||!a(new rm(e),new rm(t)));case jDt:case UDt:case XDt:return Wa(+e,+t);case HDt:return e.name==t.name&&e.message==t.message;case KDt:case ZDt:return e==t+"";case YDt:var l=iJ;case QDt:var u=i&WDt;if(l||(l=Om),e.size!=t.size&&!u)return!1;var h=o.get(e);if(h)return h==t;i|=qDt,o.set(e,t);var d=HC(l(e),l(t),i,n,a,o);return o.delete(e),d;case JDt:if($D)return $D.call(e)==$D.call(t)}return!1}var WDt,qDt,jDt,UDt,HDt,YDt,XDt,KDt,QDt,ZDt,JDt,t6t,e6t,sJ,$D,aJ,oJ=b(()=>{"use strict";Cd();GR();Sd();PD();nJ();YC();WDt=1,qDt=2,jDt="[object Boolean]",UDt="[object Date]",HDt="[object Error]",YDt="[object Map]",XDt="[object Number]",KDt="[object RegExp]",QDt="[object Set]",ZDt="[object String]",JDt="[object Symbol]",t6t="[object ArrayBuffer]",e6t="[object DataView]",sJ=_n?_n.prototype:void 0,$D=sJ?sJ.valueOf:void 0;s(r6t,"equalByTag");aJ=r6t});function a6t(e,t,r,i,n,a){var o=r&i6t,l=z0(e),u=l.length,h=z0(t),d=h.length;if(u!=d&&!o)return!1;for(var f=u;f--;){var p=l[f];if(!(o?p in t:s6t.call(t,p)))return!1}var m=a.get(e),g=a.get(t);if(m&&g)return m==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);for(var x=o;++f{"use strict";LD();i6t=1,n6t=Object.prototype,s6t=n6t.hasOwnProperty;s(a6t,"equalObjects");lJ=a6t});function c6t(e,t,r,i,n,a){var o=fe(e),l=fe(t),u=o?hJ:Ca(e),h=l?hJ:Ca(t);u=u==uJ?XC:u,h=h==uJ?XC:h;var d=u==XC,f=h==XC,p=u==h;if(p&&Po(e)){if(!Po(t))return!1;o=!0,d=!1}if(p&&!d)return a||(a=new bl),o||Ru(e)?HC(e,t,r,i,n,a):aJ(e,t,u,r,i,n,a);if(!(r&o6t)){var m=d&&dJ.call(e,"__wrapped__"),g=f&&dJ.call(t,"__wrapped__");if(m||g){var y=m?e.value():e,x=g?t.value():t;return a||(a=new bl),n(y,x,r,i,a)}}return p?(a||(a=new bl),lJ(e,t,r,i,n,a)):!1}var o6t,uJ,hJ,XC,l6t,dJ,fJ,pJ=b(()=>{"use strict";u0();PD();oJ();cJ();Vd();Si();lm();p0();o6t=1,uJ="[object Arguments]",hJ="[object Array]",XC="[object Object]",l6t=Object.prototype,dJ=l6t.hasOwnProperty;s(c6t,"baseIsEqualDeep");fJ=c6t});function mJ(e,t,r,i,n){return e===t?!0:e==null||t==null||!Ni(e)&&!Ni(t)?e!==e&&t!==t:fJ(e,t,r,i,mJ,n)}var KC,FD=b(()=>{"use strict";pJ();qa();s(mJ,"baseIsEqual");KC=mJ});function d6t(e,t,r,i){var n=r.length,a=n,o=!i;if(e==null)return!a;for(e=Object(e);n--;){var l=r[n];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++n{"use strict";u0();FD();u6t=1,h6t=2;s(d6t,"baseIsMatch");gJ=d6t});function f6t(e){return e===e&&!ii(e)}var QC,VD=b(()=>{"use strict";xa();s(f6t,"isStrictComparable");QC=f6t});function p6t(e){for(var t=Ar(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,QC(n)]}return t}var xJ,bJ=b(()=>{"use strict";VD();Rl();s(p6t,"getMatchData");xJ=p6t});function m6t(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var ZC,zD=b(()=>{"use strict";s(m6t,"matchesStrictComparable");ZC=m6t});function g6t(e){var t=xJ(e);return t.length==1&&t[0][2]?ZC(t[0][0],t[0][1]):function(r){return r===e||gJ(r,e,t)}}var kJ,TJ=b(()=>{"use strict";yJ();bJ();zD();s(g6t,"baseMatches");kJ=g6t});function y6t(e,t){return e!=null&&t in Object(e)}var CJ,SJ=b(()=>{"use strict";s(y6t,"baseHasIn");CJ=y6t});function x6t(e,t,r){t=Gu(t,e);for(var i=-1,n=t.length,a=!1;++i{"use strict";F0();am();Si();g0();ST();vm();s(x6t,"hasPath");JC=x6t});function b6t(e,t){return e!=null&&JC(e,t,CJ)}var tS,WD=b(()=>{"use strict";SJ();GD();s(b6t,"hasIn");tS=b6t});function C6t(e,t){return Em(e)&&QC(t)?ZC(Ll(e),t):function(r){var i=ZQ(r,e);return i===void 0&&i===t?tS(r,e):KC(t,i,k6t|T6t)}}var k6t,T6t,wJ,_J=b(()=>{"use strict";FD();JQ();WD();AC();VD();zD();vm();k6t=1,T6t=2;s(C6t,"baseMatchesProperty");wJ=C6t});function S6t(e){return function(t){return t?.[e]}}var eS,qD=b(()=>{"use strict";s(S6t,"baseProperty");eS=S6t});function w6t(e){return function(t){return Wu(t,e)}}var EJ,vJ=b(()=>{"use strict";V0();s(w6t,"basePropertyDeep");EJ=w6t});function _6t(e){return Em(e)?eS(Ll(e)):EJ(e)}var AJ,RJ=b(()=>{"use strict";qD();vJ();AC();vm();s(_6t,"property");AJ=_6t});function E6t(e){return typeof e=="function"?e:e==null?En:typeof e=="object"?fe(e)?wJ(e[0],e[1]):kJ(e):AJ(e)}var ti,Cs=b(()=>{"use strict";TJ();_J();Sc();Si();RJ();s(E6t,"baseIteratee");ti=E6t});function v6t(e,t,r,i){for(var n=-1,a=e==null?0:e.length;++n{"use strict";s(v6t,"arrayAggregator");LJ=v6t});function A6t(e,t){return e&&em(e,t,Ar)}var Mm,rS=b(()=>{"use strict";mT();Rl();s(A6t,"baseForOwn");Mm=A6t});function R6t(e,t){return function(r,i){if(r==null)return r;if(!Vi(r))return e(r,i);for(var n=r.length,a=t?n:-1,o=Object(r);(t?a--:++a{"use strict";ja();s(R6t,"createBaseEach");IJ=R6t});var L6t,Xs,ju=b(()=>{"use strict";rS();NJ();L6t=IJ(Mm),Xs=L6t});function D6t(e,t,r,i){return Xs(e,function(n,a,o){t(i,n,r(n),o)}),i}var OJ,MJ=b(()=>{"use strict";ju();s(D6t,"baseAggregator");OJ=D6t});function I6t(e,t){return function(r,i){var n=fe(r)?LJ:OJ,a=t?t():{};return n(r,e,ti(i,2),a)}}var BJ,PJ=b(()=>{"use strict";DJ();MJ();Cs();Si();s(I6t,"createAggregator");BJ=I6t});var N6t,iS,$J=b(()=>{"use strict";Ga();N6t=s(function(){return Fi.Date.now()},"now"),iS=N6t});var FJ,O6t,M6t,Uu,VJ=b(()=>{"use strict";um();Sd();Ad();Du();FJ=Object.prototype,O6t=FJ.hasOwnProperty,M6t=Sl(function(e,t){e=Object(e);var r=-1,i=t.length,n=i>2?t[2]:void 0;for(n&&ba(t[0],t[1],n)&&(i=1);++r{"use strict";s(B6t,"arrayIncludesWith");nS=B6t});function $6t(e,t,r,i){var n=-1,a=EC,o=!0,l=e.length,u=[],h=t.length;if(!l)return u;r&&(t=Ys(t,Ua(r))),i?(a=nS,o=!1):t.length>=P6t&&(a=Nm,o=!1,t=new Im(t));t:for(;++n{"use strict";qC();wD();jD();$d();Ed();UC();P6t=200;s($6t,"baseDifference");zJ=$6t});var F6t,Hu,WJ=b(()=>{"use strict";GJ();Rm();um();wT();F6t=Sl(function(e,t){return _d(e)?zJ(e,Dl(t,1,_d,!0)):[]}),Hu=F6t});function V6t(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var An,qJ=b(()=>{"use strict";s(V6t,"last");An=V6t});function z6t(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===void 0?1:Al(t),IC(e,t<0?0:t,i)):[]}var ji,jJ=b(()=>{"use strict";ED();Sm();s(z6t,"drop");ji=z6t});function G6t(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===void 0?1:Al(t),t=i-t,IC(e,0,t<0?0:t)):[]}var Dc,UJ=b(()=>{"use strict";ED();Sm();s(G6t,"dropRight");Dc=G6t});function W6t(e){return typeof e=="function"?e:En}var Bm,sS=b(()=>{"use strict";Sc();s(W6t,"castFunction");Bm=W6t});function q6t(e,t){var r=fe(e)?SC:Xs;return r(e,Bm(t))}var ct,aS=b(()=>{"use strict";CD();ju();sS();Si();s(q6t,"forEach");ct=q6t});var HJ=b(()=>{"use strict";aS()});function j6t(e,t){for(var r=-1,i=e==null?0:e.length;++r{"use strict";s(j6t,"arrayEvery");YJ=j6t});function U6t(e,t){var r=!0;return Xs(e,function(i,n,a){return r=!!t(i,n,a),r}),r}var KJ,QJ=b(()=>{"use strict";ju();s(U6t,"baseEvery");KJ=U6t});function H6t(e,t,r){var i=fe(e)?YJ:KJ;return r&&ba(e,t,r)&&(t=void 0),i(e,ti(t,3))}var rs,ZJ=b(()=>{"use strict";XJ();QJ();Cs();Si();Ad();s(H6t,"every");rs=H6t});function Y6t(e,t){var r=[];return Xs(e,function(i,n,a){t(i,n,a)&&r.push(i)}),r}var oS,UD=b(()=>{"use strict";ju();s(Y6t,"baseFilter");oS=Y6t});function X6t(e,t){var r=fe(e)?Lm:oS;return r(e,ti(t,3))}var Or,HD=b(()=>{"use strict";NC();UD();Cs();Si();s(X6t,"filter");Or=X6t});function K6t(e){return function(t,r,i){var n=Object(t);if(!Vi(t)){var a=ti(r,3);t=Ar(t),r=s(function(l){return a(n[l],l,n)},"predicate")}var o=e(t,r,i);return o>-1?n[a?t[o]:o]:void 0}}var JJ,ttt=b(()=>{"use strict";Cs();ja();Rl();s(K6t,"createFind");JJ=K6t});function Z6t(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var n=r==null?0:Al(r);return n<0&&(n=Q6t(i+n,0)),wC(e,ti(t,3),n)}var Q6t,ett,rtt=b(()=>{"use strict";SD();Cs();Sm();Q6t=Math.max;s(Z6t,"findIndex");ett=Z6t});var J6t,Ss,itt=b(()=>{"use strict";ttt();rtt();J6t=JJ(ett),Ss=J6t});function tIt(e){return e&&e.length?e[0]:void 0}var Rn,ntt=b(()=>{"use strict";s(tIt,"head");Rn=tIt});var stt=b(()=>{"use strict";ntt()});function eIt(e,t){var r=-1,i=Vi(e)?Array(e.length):[];return Xs(e,function(n,a,o){i[++r]=t(n,a,o)}),i}var lS,YD=b(()=>{"use strict";ju();ja();s(eIt,"baseMap");lS=eIt});function rIt(e,t){var r=fe(e)?Ys:lS;return r(e,ti(t,3))}var jt,Pm=b(()=>{"use strict";$d();Cs();YD();Si();s(rIt,"map");jt=rIt});function iIt(e,t){return Dl(jt(e,t),1)}var qn,XD=b(()=>{"use strict";Rm();Pm();s(iIt,"flatMap");qn=iIt});function nIt(e,t){return e==null?e:em(e,Bm(t),Vs)}var KD,att=b(()=>{"use strict";mT();sS();Du();s(nIt,"forIn");KD=nIt});function sIt(e,t){return e&&Mm(e,Bm(t))}var QD,ott=b(()=>{"use strict";rS();sS();s(sIt,"forOwn");QD=sIt});var aIt,oIt,lIt,ZD,ltt=b(()=>{"use strict";tm();PJ();aIt=Object.prototype,oIt=aIt.hasOwnProperty,lIt=BJ(function(e,t,r){oIt.call(e,r)?e[r].push(t):kl(e,r,[t])}),ZD=lIt});function cIt(e,t){return e>t}var ctt,utt=b(()=>{"use strict";s(cIt,"baseGt");ctt=cIt});function dIt(e,t){return e!=null&&hIt.call(e,t)}var uIt,hIt,htt,dtt=b(()=>{"use strict";uIt=Object.prototype,hIt=uIt.hasOwnProperty;s(dIt,"baseHas");htt=dIt});function fIt(e,t){return e!=null&&JC(e,t,htt)}var pe,ftt=b(()=>{"use strict";dtt();GD();s(fIt,"has");pe=fIt});function mIt(e){return typeof e=="string"||!fe(e)&&Ni(e)&&Vn(e)==pIt}var pIt,Ui,cS=b(()=>{"use strict";kc();Si();qa();pIt="[object String]";s(mIt,"isString");Ui=mIt});function gIt(e,t){return Ys(t,function(r){return e[r]})}var ptt,mtt=b(()=>{"use strict";$d();s(gIt,"baseValues");ptt=gIt});function yIt(e){return e==null?[]:ptt(e,Ar(e))}var cr,JD=b(()=>{"use strict";mtt();Rl();s(yIt,"values");cr=yIt});function bIt(e,t,r,i){e=Vi(e)?e:cr(e),r=r&&!i?Al(r):0;var n=e.length;return r<0&&(r=xIt(n+r,0)),Ui(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&wm(e,t,r)>-1}var xIt,_i,gtt=b(()=>{"use strict";_C();ja();cS();Sm();JD();xIt=Math.max;s(bIt,"includes");_i=bIt});function TIt(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var n=r==null?0:Al(r);return n<0&&(n=kIt(i+n,0)),wm(e,t,n)}var kIt,uS,ytt=b(()=>{"use strict";_C();Sm();kIt=Math.max;s(TIt,"indexOf");uS=TIt});function EIt(e){if(e==null)return!0;if(Vi(e)&&(fe(e)||typeof e=="string"||typeof e.splice=="function"||Po(e)||Ru(e)||Bo(e)))return!e.length;var t=Ca(e);if(t==CIt||t==SIt)return!e.size;if(Tl(e))return!_m(e).length;for(var r in e)if(_It.call(e,r))return!1;return!0}var CIt,SIt,wIt,_It,qe,hS=b(()=>{"use strict";vC();Vd();am();Si();ja();lm();sm();p0();CIt="[object Map]",SIt="[object Set]",wIt=Object.prototype,_It=wIt.hasOwnProperty;s(EIt,"isEmpty");qe=EIt});function AIt(e){return Ni(e)&&Vn(e)==vIt}var vIt,xtt,btt=b(()=>{"use strict";kc();qa();vIt="[object RegExp]";s(AIt,"baseIsRegExp");xtt=AIt});var ktt,RIt,Za,Ttt=b(()=>{"use strict";btt();Ed();f0();ktt=Ha&&Ha.isRegExp,RIt=ktt?Ua(ktt):xtt,Za=RIt});function LIt(e){return e===void 0}var rr,Ctt=b(()=>{"use strict";s(LIt,"isUndefined");rr=LIt});function DIt(e,t){return e{"use strict";s(DIt,"baseLt");dS=DIt});function IIt(e,t){var r={};return t=ti(t,3),Mm(e,function(i,n,a){kl(r,n,t(i,n,a))}),r}var zd,Stt=b(()=>{"use strict";tm();rS();Cs();s(IIt,"mapValues");zd=IIt});function NIt(e,t,r){for(var i=-1,n=e.length;++i{"use strict";Pd();s(NIt,"baseExtremum");$m=NIt});function OIt(e){return e&&e.length?$m(e,En,ctt):void 0}var Ks,wtt=b(()=>{"use strict";fS();utt();Sc();s(OIt,"max");Ks=OIt});function MIt(e){return e&&e.length?$m(e,En,dS):void 0}var Vo,e6=b(()=>{"use strict";fS();t6();Sc();s(MIt,"min");Vo=MIt});function BIt(e,t){return e&&e.length?$m(e,ti(t,2),dS):void 0}var Gd,_tt=b(()=>{"use strict";fS();Cs();t6();s(BIt,"minBy");Gd=BIt});function $It(e){if(typeof e!="function")throw new TypeError(PIt);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var PIt,Ett,vtt=b(()=>{"use strict";PIt="Expected a function";s($It,"negate");Ett=$It});function FIt(e,t,r,i){if(!ii(e))return e;t=Gu(t,e);for(var n=-1,a=t.length,o=a-1,l=e;l!=null&&++n{"use strict";cm();F0();g0();xa();vm();s(FIt,"baseSet");Att=FIt});function VIt(e,t,r){for(var i=-1,n=t.length,a={};++i{"use strict";V0();Rtt();F0();s(VIt,"basePickBy");pS=VIt});function zIt(e,t){if(e==null)return{};var r=Ys($C(e),function(i){return[i]});return t=ti(t),pS(e,r,function(i,n){return t(i,n[0])})}var Qs,Ltt=b(()=>{"use strict";$d();Cs();r6();DD();s(zIt,"pickBy");Qs=zIt});function GIt(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var Dtt,Itt=b(()=>{"use strict";s(GIt,"baseSortBy");Dtt=GIt});function WIt(e,t){if(e!==t){var r=e!==void 0,i=e===null,n=e===e,a=Ta(e),o=t!==void 0,l=t===null,u=t===t,h=Ta(t);if(!l&&!h&&!a&&e>t||a&&o&&u&&!l&&!h||i&&o&&u||!r&&u||!n)return 1;if(!i&&!a&&!h&&e{"use strict";Pd();s(WIt,"compareAscending");Ntt=WIt});function qIt(e,t,r){for(var i=-1,n=e.criteria,a=t.criteria,o=n.length,l=r.length;++i=l)return u;var h=r[i];return u*(h=="desc"?-1:1)}}return e.index-t.index}var Mtt,Btt=b(()=>{"use strict";Ott();s(qIt,"compareMultiple");Mtt=qIt});function jIt(e,t,r){t.length?t=Ys(t,function(a){return fe(a)?function(o){return Wu(o,a.length===1?a[0]:a)}:a}):t=[En];var i=-1;t=Ys(t,Ua(ti));var n=lS(e,function(a,o,l){var u=Ys(t,function(h){return h(a)});return{criteria:u,index:++i,value:a}});return Dtt(n,function(a,o){return Mtt(a,o,r)})}var Ptt,$tt=b(()=>{"use strict";$d();V0();Cs();YD();Itt();Ed();Btt();Sc();Si();s(jIt,"baseOrderBy");Ptt=jIt});var UIt,Ftt,Vtt=b(()=>{"use strict";qD();UIt=eS("length"),Ftt=UIt});function nNt(e){for(var t=ztt.lastIndex=0;ztt.test(e);)++t;return t}var Gtt,HIt,YIt,XIt,KIt,QIt,ZIt,i6,n6,JIt,Wtt,qtt,jtt,tNt,Utt,Htt,eNt,rNt,iNt,ztt,Ytt,Xtt=b(()=>{"use strict";Gtt="\\ud800-\\udfff",HIt="\\u0300-\\u036f",YIt="\\ufe20-\\ufe2f",XIt="\\u20d0-\\u20ff",KIt=HIt+YIt+XIt,QIt="\\ufe0e\\ufe0f",ZIt="["+Gtt+"]",i6="["+KIt+"]",n6="\\ud83c[\\udffb-\\udfff]",JIt="(?:"+i6+"|"+n6+")",Wtt="[^"+Gtt+"]",qtt="(?:\\ud83c[\\udde6-\\uddff]){2}",jtt="[\\ud800-\\udbff][\\udc00-\\udfff]",tNt="\\u200d",Utt=JIt+"?",Htt="["+QIt+"]?",eNt="(?:"+tNt+"(?:"+[Wtt,qtt,jtt].join("|")+")"+Htt+Utt+")*",rNt=Htt+Utt+eNt,iNt="(?:"+[Wtt+i6+"?",i6,qtt,jtt,ZIt].join("|")+")",ztt=RegExp(n6+"(?="+n6+")|"+iNt+rNt,"g");s(nNt,"unicodeSize");Ytt=nNt});function sNt(e){return aZ(e)?Ytt(e):Ftt(e)}var Ktt,Qtt=b(()=>{"use strict";Vtt();oZ();Xtt();s(sNt,"stringSize");Ktt=sNt});function aNt(e,t){return pS(e,t,function(r,i){return tS(e,i)})}var Ztt,Jtt=b(()=>{"use strict";r6();WD();s(aNt,"basePick");Ztt=aNt});var oNt,Wd,tet=b(()=>{"use strict";Jtt();sZ();oNt=nZ(function(e,t){return e==null?{}:Ztt(e,t)}),Wd=oNt});function uNt(e,t,r,i){for(var n=-1,a=cNt(lNt((t-e)/(r||1)),0),o=Array(a);a--;)o[i?a:++n]=e,e+=r;return o}var lNt,cNt,eet,ret=b(()=>{"use strict";lNt=Math.ceil,cNt=Math.max;s(uNt,"baseRange");eet=uNt});function hNt(e){return function(t,r,i){return i&&typeof i!="number"&&ba(t,r,i)&&(r=i=void 0),t=Cm(t),r===void 0?(r=t,t=0):r=Cm(r),i=i===void 0?t{"use strict";ret();Ad();kD();s(hNt,"createRange");iet=hNt});var dNt,Ja,set=b(()=>{"use strict";net();dNt=iet(),Ja=dNt});function fNt(e,t,r,i,n){return n(e,function(a,o,l){r=i?(i=!1,a):t(r,a,o,l)}),r}var aet,oet=b(()=>{"use strict";s(fNt,"baseReduce");aet=fNt});function pNt(e,t,r){var i=fe(e)?lZ:aet,n=arguments.length<3;return i(e,ti(t,4),r,n,Xs)}var Mr,s6=b(()=>{"use strict";cZ();ju();Cs();oet();Si();s(pNt,"reduce");Mr=pNt});function mNt(e,t){var r=fe(e)?Lm:oS;return r(e,Ett(ti(t,3)))}var Yu,cet=b(()=>{"use strict";NC();UD();Cs();Si();vtt();s(mNt,"reject");Yu=mNt});function xNt(e){if(e==null)return 0;if(Vi(e))return Ui(e)?Ktt(e):e.length;var t=Ca(e);return t==gNt||t==yNt?e.size:_m(e).length}var gNt,yNt,a6,uet=b(()=>{"use strict";vC();Vd();ja();cS();Qtt();gNt="[object Map]",yNt="[object Set]";s(xNt,"size");a6=xNt});function bNt(e,t){var r;return Xs(e,function(i,n,a){return r=t(i,n,a),!r}),!!r}var het,det=b(()=>{"use strict";ju();s(bNt,"baseSome");het=bNt});function kNt(e,t,r){var i=fe(e)?jC:het;return r&&ba(e,t,r)&&(t=void 0),i(e,ti(t,3))}var G0,fet=b(()=>{"use strict";BD();Cs();det();Si();Ad();s(kNt,"some");G0=kNt});var TNt,Nl,pet=b(()=>{"use strict";Rm();$tt();um();Ad();TNt=Sl(function(e,t){if(e==null)return[];var r=t.length;return r>1&&ba(e,t[0],t[1])?t=[]:r>2&&ba(t[0],t[1],t[2])&&(t=[t[0]]),Ptt(e,Dl(t,1),[])}),Nl=TNt});var CNt,SNt,met,get=b(()=>{"use strict";ID();TD();YC();CNt=1/0,SNt=qu&&1/Om(new qu([,-0]))[1]==CNt?function(e){return new qu(e)}:Oi,met=SNt});function _Nt(e,t,r){var i=-1,n=EC,a=e.length,o=!0,l=[],u=l;if(r)o=!1,n=nS;else if(a>=wNt){var h=t?null:met(e);if(h)return Om(h);o=!1,n=Nm,u=new Im}else u=t?[]:l;t:for(;++i{"use strict";qC();wD();jD();UC();get();YC();wNt=200;s(_Nt,"baseUniq");Fm=_Nt});var ENt,o6,yet=b(()=>{"use strict";Rm();um();mS();wT();ENt=Sl(function(e){return Fm(Dl(e,1,_d,!0))}),o6=ENt});function vNt(e){return e&&e.length?Fm(e):[]}var Vm,xet=b(()=>{"use strict";mS();s(vNt,"uniq");Vm=vNt});function ANt(e,t){return e&&e.length?Fm(e,ti(t,2)):[]}var bet,ket=b(()=>{"use strict";Cs();mS();s(ANt,"uniqBy");bet=ANt});function LNt(e){var t=++RNt;return RC(e)+t}var RNt,qd,Tet=b(()=>{"use strict";_D();RNt=0;s(LNt,"uniqueId");qd=LNt});function DNt(e,t,r){for(var i=-1,n=e.length,a=t.length,o={};++i{"use strict";s(DNt,"baseZipObject");Cet=DNt});function INt(e,t){return Cet(e||[],t||[],Cl)}var gS,_et=b(()=>{"use strict";cm();wet();s(INt,"zipObject");gS=INt});var Ee=b(()=>{"use strict";HQ();OD();QZ();ZZ();ZR();VJ();WJ();jJ();UJ();HJ();ZJ();HD();itt();stt();XD();DC();aS();att();ott();ltt();ftt();Sc();gtt();ytt();Si();hS();s0();xa();Ttt();cS();Ctt();Rl();qJ();Pm();Stt();wtt();eL();e6();_tt();TD();$J();tet();Ltt();set();s6();cet();uet();fet();pet();yet();xet();Tet();JD();_et();});function vet(e,t){e[t]?e[t]++:e[t]=1}function Aet(e,t){--e[t]||delete e[t]}function W0(e,t,r,i){var n=""+t,a=""+r;if(!e&&n>a){var o=n;n=a,a=o}return n+Eet+a+Eet+(rr(i)?NNt:i)}function ONt(e,t,r,i){var n=""+t,a=""+r;if(!e&&n>a){var o=n;n=a,a=o}var l={v:n,w:a};return i&&(l.name=i),l}function l6(e,t){return W0(e,t.v,t.w,t.name)}var NNt,jd,Eet,Ur,yS=b(()=>{"use strict";Ee();NNt="\0",jd="\0",Eet="",Ur=class{static{s(this,"Graph")}constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=zs(void 0),this._defaultEdgeLabelFn=zs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[jd]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return en(t)||(t=zs(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Ar(this._nodes)}sources(){var t=this;return Or(this.nodes(),function(r){return qe(t._in[r])})}sinks(){var t=this;return Or(this.nodes(),function(r){return qe(t._out[r])})}setNodes(t,r){var i=arguments,n=this;return ct(t,function(a){i.length>1?n.setNode(a,r):n.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=jd,this._children[t]={},this._children[jd][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=s(i=>this.removeEdge(this._edgeObjs[i]),"removeEdge");delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ct(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),ct(Ar(this._in[t]),r),delete this._in[t],delete this._preds[t],ct(Ar(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(rr(r))r=jd;else{r+="";for(var i=r;!rr(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==jd)return r}}children(t){if(rr(t)&&(t=jd),this._isCompound){var r=this._children[t];if(r)return Ar(r)}else{if(t===jd)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Ar(r)}successors(t){var r=this._sucs[t];if(r)return Ar(r)}neighbors(t){var r=this.predecessors(t);if(r)return o6(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;ct(this._nodes,function(o,l){t(l)&&r.setNode(l,o)}),ct(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,i.edge(o))});var n={};function a(o){var l=i.parent(o);return l===void 0||r.hasNode(l)?(n[o]=l,l):l in n?n[l]:a(l)}return s(a,"findParent"),this._isCompound&&ct(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(t){return en(t)||(t=zs(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return cr(this._edgeObjs)}setPath(t,r){var i=this,n=arguments;return Mr(t,function(a,o){return n.length>1?i.setEdge(a,o,r):i.setEdge(a,o),o}),this}setEdge(){var t,r,i,n,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,i=o.name,arguments.length===2&&(n=arguments[1],a=!0)):(t=o,r=arguments[1],i=arguments[3],arguments.length>2&&(n=arguments[2],a=!0)),t=""+t,r=""+r,rr(i)||(i=""+i);var l=W0(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,l))return a&&(this._edgeLabels[l]=n),this;if(!rr(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[l]=a?n:this._defaultEdgeLabelFn(t,r,i);var u=ONt(this._isDirected,t,r,i);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[l]=u,vet(this._preds[r],t),vet(this._sucs[t],r),this._in[r][l]=u,this._out[t][l]=u,this._edgeCount++,this}edge(t,r,i){var n=arguments.length===1?l6(this._isDirected,arguments[0]):W0(this._isDirected,t,r,i);return this._edgeLabels[n]}hasEdge(t,r,i){var n=arguments.length===1?l6(this._isDirected,arguments[0]):W0(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,n)}removeEdge(t,r,i){var n=arguments.length===1?l6(this._isDirected,arguments[0]):W0(this._isDirected,t,r,i),a=this._edgeObjs[n];return a&&(t=a.v,r=a.w,delete this._edgeLabels[n],delete this._edgeObjs[n],Aet(this._preds[r],t),Aet(this._sucs[t],r),delete this._in[r][n],delete this._out[t][n],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var n=cr(i);return r?Or(n,function(a){return a.v===r}):n}}outEdges(t,r){var i=this._out[t];if(i){var n=cr(i);return r?Or(n,function(a){return a.w===r}):n}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}};Ur.prototype._nodeCount=0;Ur.prototype._edgeCount=0;s(vet,"incrementOrInitEntry");s(Aet,"decrementOrRemoveEntry");s(W0,"edgeArgsToId");s(ONt,"edgeArgsToObj");s(l6,"edgeObjToId")});var to=b(()=>{"use strict";yS()});function Ret(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function MNt(e,t){if(e!=="_next"&&e!=="_prev")return t}var bS,Let=b(()=>{"use strict";bS=class{static{s(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return Ret(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&Ret(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,i=r._prev;i!==r;)t.push(JSON.stringify(i,MNt)),i=i._prev;return"["+t.join(", ")+"]"}};s(Ret,"unlink");s(MNt,"filterOutLinks")});function Det(e,t){if(e.nodeCount()<=1)return[];var r=$Nt(e,t||BNt),i=PNt(r.graph,r.buckets,r.zeroIdx);return Nr(jt(i,function(n){return e.outEdges(n.v,n.w)}))}function PNt(e,t,r){for(var i=[],n=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)c6(e,t,r,o);for(;o=n.dequeue();)c6(e,t,r,o);if(e.nodeCount()){for(var l=t.length-2;l>0;--l)if(o=t[l].dequeue(),o){i=i.concat(c6(e,t,r,o,!0));break}}}return i}function c6(e,t,r,i,n){var a=n?[]:void 0;return ct(e.inEdges(i.v),function(o){var l=e.edge(o),u=e.node(o.v);n&&a.push({v:o.v,w:o.w}),u.out-=l,u6(t,r,u)}),ct(e.outEdges(i.v),function(o){var l=e.edge(o),u=o.w,h=e.node(u);h.in-=l,u6(t,r,h)}),e.removeNode(i.v),a}function $Nt(e,t){var r=new Ur,i=0,n=0;ct(e.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0})}),ct(e.edges(),function(l){var u=r.edge(l.v,l.w)||0,h=t(l),d=u+h;r.setEdge(l.v,l.w,d),n=Math.max(n,r.node(l.v).out+=h),i=Math.max(i,r.node(l.w).in+=h)});var a=Ja(n+i+3).map(function(){return new bS}),o=i+1;return ct(r.nodes(),function(l){u6(a,o,r.node(l))}),{graph:r,buckets:a,zeroIdx:o}}function u6(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var BNt,Iet=b(()=>{"use strict";Ee();to();Let();BNt=zs(1);s(Det,"greedyFAS");s(PNt,"doGreedyFAS");s(c6,"removeNode");s($Nt,"buildState");s(u6,"assignBucket")});function Net(e){var t=e.graph().acyclicer==="greedy"?Det(e,r(e)):FNt(e);ct(t,function(i){var n=e.edge(i);e.removeEdge(i),n.forwardName=i.name,n.reversed=!0,e.setEdge(i.w,i.v,n,qd("rev"))});function r(i){return function(n){return i.edge(n).weight}}s(r,"weightFn")}function FNt(e){var t=[],r={},i={};function n(a){Object.prototype.hasOwnProperty.call(i,a)||(i[a]=!0,r[a]=!0,ct(e.outEdges(a),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?t.push(o):n(o.w)}),delete r[a])}return s(n,"dfs"),ct(e.nodes(),n),t}function Oet(e){ct(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var i=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,i)}})}var h6=b(()=>{"use strict";Ee();Iet();s(Net,"run");s(FNt,"dfsFAS");s(Oet,"undo")});function Ol(e,t,r,i){var n;do n=qd(i);while(e.hasNode(n));return r.dummy=t,e.setNode(n,r),n}function Bet(e){var t=new Ur().setGraph(e.graph());return ct(e.nodes(),function(r){t.setNode(r,e.node(r))}),ct(e.edges(),function(r){var i=t.edge(r.v,r.w)||{weight:0,minlen:1},n=e.edge(r);t.setEdge(r.v,r.w,{weight:i.weight+n.weight,minlen:Math.max(i.minlen,n.minlen)})}),t}function kS(e){var t=new Ur({multigraph:e.isMultigraph()}).setGraph(e.graph());return ct(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),ct(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function d6(e,t){var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,l=e.height/2;if(!n&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(a)*o>Math.abs(n)*l?(a<0&&(l=-l),u=l*n/a,h=l):(n<0&&(o=-o),u=o,h=o*a/n),{x:r+u,y:i+h}}function Xu(e){var t=jt(Ja(p6(e)+1),function(){return[]});return ct(e.nodes(),function(r){var i=e.node(r),n=i.rank;rr(n)||(t[n][i.order]=r)}),t}function Pet(e){var t=Vo(jt(e.nodes(),function(r){return e.node(r).rank}));ct(e.nodes(),function(r){var i=e.node(r);pe(i,"rank")&&(i.rank-=t)})}function $et(e){var t=Vo(jt(e.nodes(),function(a){return e.node(a).rank})),r=[];ct(e.nodes(),function(a){var o=e.node(a).rank-t;r[o]||(r[o]=[]),r[o].push(a)});var i=0,n=e.graph().nodeRankFactor;ct(r,function(a,o){rr(a)&&o%n!==0?--i:i&&ct(a,function(l){e.node(l).rank+=i})})}function f6(e,t,r,i){var n={width:0,height:0};return arguments.length>=4&&(n.rank=r,n.order=i),Ol(e,"border",n,t)}function p6(e){return Ks(jt(e.nodes(),function(t){var r=e.node(t).rank;if(!rr(r))return r}))}function Fet(e,t){var r={lhs:[],rhs:[]};return ct(e,function(i){t(i)?r.lhs.push(i):r.rhs.push(i)}),r}function Vet(e,t){var r=iS();try{return t()}finally{console.log(e+" time: "+(iS()-r)+"ms")}}function zet(e,t){return t()}var Ml=b(()=>{"use strict";Ee();to();s(Ol,"addDummyNode");s(Bet,"simplify");s(kS,"asNonCompoundGraph");s(d6,"intersectRect");s(Xu,"buildLayerMatrix");s(Pet,"normalizeRanks");s($et,"removeEmptyRanks");s(f6,"addBorderNode");s(p6,"maxRank");s(Fet,"partition");s(Vet,"time");s(zet,"notime")});function Wet(e){function t(r){var i=e.children(r),n=e.node(r);if(i.length&&ct(i,t),Object.prototype.hasOwnProperty.call(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var a=n.minRank,o=n.maxRank+1;a{"use strict";Ee();Ml();s(Wet,"addBorderSegments");s(Get,"addBorderNode")});function Uet(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Yet(e)}function Het(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&VNt(e),(t==="lr"||t==="rl")&&(zNt(e),Yet(e))}function Yet(e){ct(e.nodes(),function(t){jet(e.node(t))}),ct(e.edges(),function(t){jet(e.edge(t))})}function jet(e){var t=e.width;e.width=e.height,e.height=t}function VNt(e){ct(e.nodes(),function(t){m6(e.node(t))}),ct(e.edges(),function(t){var r=e.edge(t);ct(r.points,m6),Object.prototype.hasOwnProperty.call(r,"y")&&m6(r)})}function m6(e){e.y=-e.y}function zNt(e){ct(e.nodes(),function(t){g6(e.node(t))}),ct(e.edges(),function(t){var r=e.edge(t);ct(r.points,g6),Object.prototype.hasOwnProperty.call(r,"x")&&g6(r)})}function g6(e){var t=e.x;e.x=e.y,e.y=t}var Xet=b(()=>{"use strict";Ee();s(Uet,"adjust");s(Het,"undo");s(Yet,"swapWidthHeight");s(jet,"swapWidthHeightOne");s(VNt,"reverseY");s(m6,"reverseYOne");s(zNt,"swapXY");s(g6,"swapXYOne")});function Ket(e){e.graph().dummyChains=[],ct(e.edges(),function(t){WNt(e,t)})}function WNt(e,t){var r=t.v,i=e.node(r).rank,n=t.w,a=e.node(n).rank,o=t.name,l=e.edge(t),u=l.labelRank;if(a!==i+1){e.removeEdge(t);var h=void 0,d,f;for(f=0,++i;i{"use strict";Ee();Ml();s(Ket,"run");s(WNt,"normalizeEdge");s(Qet,"undo")});function q0(e){var t={};function r(i){var n=e.node(i);if(Object.prototype.hasOwnProperty.call(t,i))return n.rank;t[i]=!0;var a=Vo(jt(e.outEdges(i),function(o){return r(o.w)-e.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),n.rank=a}s(r,"dfs"),ct(e.sources(),r)}function Ud(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var TS=b(()=>{"use strict";Ee();s(q0,"longestPath");s(Ud,"slack")});function CS(e){var t=new Ur({directed:!1}),r=e.nodes()[0],i=e.nodeCount();t.setNode(r,{});for(var n,a;qNt(t,e){"use strict";Ee();to();TS();s(CS,"feasibleTree");s(qNt,"tightTree");s(jNt,"findMinSlackEdge");s(UNt,"shiftRanks")});var Jet=b(()=>{"use strict"});var b6=b(()=>{"use strict"});var H9e,k6=b(()=>{"use strict";Ee();b6();H9e=zs(1)});var trt=b(()=>{"use strict";k6()});var T6=b(()=>{"use strict"});var ert=b(()=>{"use strict";T6()});var nFe,rrt=b(()=>{"use strict";Ee();nFe=zs(1)});function C6(e){var t={},r={},i=[];function n(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new j0;Object.prototype.hasOwnProperty.call(t,a)||(r[a]=!0,t[a]=!0,ct(e.predecessors(a),n),delete r[a],i.push(a))}if(s(n,"visit"),ct(e.sinks(),n),a6(t)!==e.nodeCount())throw new j0;return i}function j0(){}var S6=b(()=>{"use strict";Ee();C6.CycleException=j0;s(C6,"topsort");s(j0,"CycleException");j0.prototype=new Error});var irt=b(()=>{"use strict";S6()});function SS(e,t,r){fe(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),n=[],a={};return ct(t,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);nrt(e,o,r==="post",a,i,n)}),n}function nrt(e,t,r,i,n,a){Object.prototype.hasOwnProperty.call(i,t)||(i[t]=!0,r||a.push(t),ct(n(t),function(o){nrt(e,o,r,i,n,a)}),r&&a.push(t))}var w6=b(()=>{"use strict";Ee();s(SS,"dfs");s(nrt,"doDfs")});function _6(e,t){return SS(e,t,"post")}var srt=b(()=>{"use strict";w6();s(_6,"postorder")});function E6(e,t){return SS(e,t,"pre")}var art=b(()=>{"use strict";w6();s(E6,"preorder")});var ort=b(()=>{"use strict";b6();yS()});var lrt=b(()=>{"use strict";Jet();k6();trt();ert();rrt();irt();srt();art();ort();T6();S6()});function Qu(e){e=Bet(e),q0(e);var t=CS(e);A6(t),v6(t,e);for(var r,i;r=drt(t);)i=frt(t,e,r),prt(t,e,r,i)}function v6(e,t){var r=_6(e,e.nodes());r=r.slice(0,r.length-1),ct(r,function(i){QNt(e,t,i)})}function QNt(e,t,r){var i=e.node(r),n=i.parent;e.edge(r,n).cutvalue=urt(e,t,r)}function urt(e,t,r){var i=e.node(r),n=i.parent,a=!0,o=t.edge(r,n),l=0;return o||(a=!1,o=t.edge(n,r)),l=o.weight,ct(t.nodeEdges(r),function(u){var h=u.v===r,d=h?u.w:u.v;if(d!==n){var f=h===a,p=t.edge(u).weight;if(l+=f?p:-p,JNt(e,r,d)){var m=e.edge(r,d).cutvalue;l+=f?-m:m}}}),l}function A6(e,t){arguments.length<2&&(t=e.nodes()[0]),hrt(e,{},1,t)}function hrt(e,t,r,i,n){var a=r,o=e.node(i);return t[i]=!0,ct(e.neighbors(i),function(l){Object.prototype.hasOwnProperty.call(t,l)||(r=hrt(e,t,r,l,i))}),o.low=a,o.lim=r++,n?o.parent=n:delete o.parent,r}function drt(e){return Ss(e.edges(),function(t){return e.edge(t).cutvalue<0})}function frt(e,t,r){var i=r.v,n=r.w;t.hasEdge(i,n)||(i=r.w,n=r.v);var a=e.node(i),o=e.node(n),l=a,u=!1;a.lim>o.lim&&(l=o,u=!0);var h=Or(t.edges(),function(d){return u===crt(e,e.node(d.v),l)&&u!==crt(e,e.node(d.w),l)});return Gd(h,function(d){return Ud(t,d)})}function prt(e,t,r,i){var n=r.v,a=r.w;e.removeEdge(n,a),e.setEdge(i.v,i.w,{}),A6(e),v6(e,t),ZNt(e,t)}function ZNt(e,t){var r=Ss(e.nodes(),function(n){return!t.node(n).parent}),i=E6(e,r);i=i.slice(1),ct(i,function(n){var a=e.node(n).parent,o=t.edge(n,a),l=!1;o||(o=t.edge(a,n),l=!0),t.node(n).rank=t.node(a).rank+(l?o.minlen:-o.minlen)})}function JNt(e,t,r){return e.hasEdge(t,r)}function crt(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var mrt=b(()=>{"use strict";Ee();lrt();Ml();x6();TS();Qu.initLowLimValues=A6;Qu.initCutValues=v6;Qu.calcCutValue=urt;Qu.leaveEdge=drt;Qu.enterEdge=frt;Qu.exchangeEdges=prt;s(Qu,"networkSimplex");s(v6,"initCutValues");s(QNt,"assignCutValue");s(urt,"calcCutValue");s(A6,"initLowLimValues");s(hrt,"dfsAssignLowLim");s(drt,"leaveEdge");s(frt,"enterEdge");s(prt,"exchangeEdges");s(ZNt,"updateRanks");s(JNt,"isTreeEdge");s(crt,"isDescendant")});function R6(e){switch(e.graph().ranker){case"network-simplex":grt(e);break;case"tight-tree":eOt(e);break;case"longest-path":tOt(e);break;default:grt(e)}}function eOt(e){q0(e),CS(e)}function grt(e){Qu(e)}var tOt,L6=b(()=>{"use strict";x6();mrt();TS();s(R6,"rank");tOt=q0;s(eOt,"tightTreeRanker");s(grt,"networkSimplexRanker")});function yrt(e){var t=Ol(e,"root",{},"_root"),r=rOt(e),i=Ks(cr(r))-1,n=2*i+1;e.graph().nestingRoot=t,ct(e.edges(),function(o){e.edge(o).minlen*=n});var a=iOt(e)+1;ct(e.children(),function(o){xrt(e,t,n,a,i,r,o)}),e.graph().nodeRankFactor=n}function xrt(e,t,r,i,n,a,o){var l=e.children(o);if(!l.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:r});return}var u=f6(e,"_bt"),h=f6(e,"_bb"),d=e.node(o);e.setParent(u,o),d.borderTop=u,e.setParent(h,o),d.borderBottom=h,ct(l,function(f){xrt(e,t,r,i,n,a,f);var p=e.node(f),m=p.borderTop?p.borderTop:f,g=p.borderBottom?p.borderBottom:f,y=p.borderTop?i:2*i,x=m!==g?1:n-a[o]+1;e.setEdge(u,m,{weight:y,minlen:x,nestingEdge:!0}),e.setEdge(g,h,{weight:y,minlen:x,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,u,{weight:0,minlen:n+a[o]})}function rOt(e){var t={};function r(i,n){var a=e.children(i);a&&a.length&&ct(a,function(o){r(o,n+1)}),t[i]=n}return s(r,"dfs"),ct(e.children(),function(i){r(i,1)}),t}function iOt(e){return Mr(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function brt(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,ct(e.edges(),function(r){var i=e.edge(r);i.nestingEdge&&e.removeEdge(r)})}var krt=b(()=>{"use strict";Ee();Ml();s(yrt,"run");s(xrt,"dfs");s(rOt,"treeDepths");s(iOt,"sumWeights");s(brt,"cleanup")});function Trt(e,t,r){var i={},n;ct(r,function(a){for(var o=e.parent(a),l,u;o;){if(l=e.parent(o),l?(u=i[l],i[l]=o):(u=n,n=o),u&&u!==o){t.setEdge(u,o);return}o=l}})}var Crt=b(()=>{"use strict";Ee();s(Trt,"addSubgraphConstraints")});function Srt(e,t,r){var i=sOt(e),n=new Ur({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(a){return e.node(a)});return ct(e.nodes(),function(a){var o=e.node(a),l=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(n.setNode(a),n.setParent(a,l||i),ct(e[r](a),function(u){var h=u.v===a?u.w:u.v,d=n.edge(h,a),f=rr(d)?0:d.weight;n.setEdge(h,a,{weight:e.edge(u).weight+f})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&n.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),n}function sOt(e){for(var t;e.hasNode(t=qd("_root")););return t}var wrt=b(()=>{"use strict";Ee();to();s(Srt,"buildLayerGraph");s(sOt,"createRootNode")});function _rt(e,t){for(var r=0,i=1;i0;)d%2&&(f+=l[d+1]),d=d-1>>1,l[d]+=h.weight;u+=h.weight*f})),u}var Ert=b(()=>{"use strict";Ee();s(_rt,"crossCount");s(aOt,"twoLayerCrossCount")});function vrt(e){var t={},r=Or(e.nodes(),function(l){return!e.children(l).length}),i=Ks(jt(r,function(l){return e.node(l).rank})),n=jt(Ja(i+1),function(){return[]});function a(l){if(!pe(t,l)){t[l]=!0;var u=e.node(l);n[u.rank].push(l),ct(e.successors(l),a)}}s(a,"dfs");var o=Nl(r,function(l){return e.node(l).rank});return ct(o,a),n}var Art=b(()=>{"use strict";Ee();s(vrt,"initOrder")});function Rrt(e,t){return jt(t,function(r){var i=e.inEdges(r);if(i.length){var n=Mr(i,function(a,o){var l=e.edge(o),u=e.node(o.v);return{sum:a.sum+l.weight*u.order,weight:a.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:r}})}var Lrt=b(()=>{"use strict";Ee();s(Rrt,"barycenter")});function Drt(e,t){var r={};ct(e,function(n,a){var o=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:a};rr(n.barycenter)||(o.barycenter=n.barycenter,o.weight=n.weight)}),ct(t.edges(),function(n){var a=r[n.v],o=r[n.w];!rr(a)&&!rr(o)&&(o.indegree++,a.out.push(r[n.w]))});var i=Or(r,function(n){return!n.indegree});return oOt(i)}function oOt(e){var t=[];function r(a){return function(o){o.merged||(rr(o.barycenter)||rr(a.barycenter)||o.barycenter>=a.barycenter)&&lOt(a,o)}}s(r,"handleIn");function i(a){return function(o){o.in.push(a),--o.indegree===0&&e.push(o)}}for(s(i,"handleOut");e.length;){var n=e.pop();t.push(n),ct(n.in.reverse(),r(n)),ct(n.out,i(n))}return jt(Or(t,function(a){return!a.merged}),function(a){return Wd(a,["vs","i","barycenter","weight"])})}function lOt(e,t){var r=0,i=0;e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}var Irt=b(()=>{"use strict";Ee();s(Drt,"resolveConflicts");s(oOt,"doResolveConflicts");s(lOt,"mergeEntries")});function Ort(e,t){var r=Fet(e,function(d){return Object.prototype.hasOwnProperty.call(d,"barycenter")}),i=r.lhs,n=Nl(r.rhs,function(d){return-d.i}),a=[],o=0,l=0,u=0;i.sort(cOt(!!t)),u=Nrt(a,n,u),ct(i,function(d){u+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,l+=d.weight,u=Nrt(a,n,u)});var h={vs:Nr(a)};return l&&(h.barycenter=o/l,h.weight=l),h}function Nrt(e,t,r){for(var i;t.length&&(i=An(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function cOt(e){return function(t,r){return t.barycenterr.barycenter?1:e?r.i-t.i:t.i-r.i}}var Mrt=b(()=>{"use strict";Ee();Ml();s(Ort,"sort");s(Nrt,"consumeUnsortable");s(cOt,"compareWithBias")});function D6(e,t,r,i){var n=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,l=a?a.borderRight:void 0,u={};o&&(n=Or(n,function(g){return g!==o&&g!==l}));var h=Rrt(e,n);ct(h,function(g){if(e.children(g.v).length){var y=D6(e,g.v,r,i);u[g.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter")&&hOt(g,y)}});var d=Drt(h,r);uOt(d,u);var f=Ort(d,i);if(o&&(f.vs=Nr([o,f.vs,l]),e.predecessors(o).length)){var p=e.node(e.predecessors(o)[0]),m=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function uOt(e,t){ct(e,function(r){r.vs=Nr(r.vs.map(function(i){return t[i]?t[i].vs:i}))})}function hOt(e,t){rr(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var Brt=b(()=>{"use strict";Ee();Lrt();Irt();Mrt();s(D6,"sortSubgraph");s(uOt,"expandSubgraphs");s(hOt,"mergeBarycenters")});function Frt(e){var t=p6(e),r=Prt(e,Ja(1,t+1),"inEdges"),i=Prt(e,Ja(t-1,-1,-1),"outEdges"),n=vrt(e);$rt(e,n);for(var a=Number.POSITIVE_INFINITY,o,l=0,u=0;u<4;++l,++u){dOt(l%2?r:i,l%4>=2),n=Xu(e);var h=_rt(e,n);h{"use strict";Ee();to();Ml();Crt();wrt();Ert();Art();Brt();s(Frt,"order");s(Prt,"buildLayerGraphs");s(dOt,"sweepLayerGraphs");s($rt,"assignOrder")});function zrt(e){var t=pOt(e);ct(e.graph().dummyChains,function(r){for(var i=e.node(r),n=i.edgeObj,a=fOt(e,t,n.v,n.w),o=a.path,l=a.lca,u=0,h=o[u],d=!0;r!==n.w;){if(i=e.node(r),d){for(;(h=o[u])!==l&&e.node(h).maxRanko||l>t[u].lim));for(h=u,u=i;(u=e.parent(u))!==h;)a.push(u);return{path:n.concat(a.reverse()),lca:h}}function pOt(e){var t={},r=0;function i(n){var a=r;ct(e.children(n),i),t[n]={low:a,lim:r++}}return s(i,"dfs"),ct(e.children(),i),t}var Grt=b(()=>{"use strict";Ee();s(zrt,"parentDummyChains");s(fOt,"findPath");s(pOt,"postorder")});function mOt(e,t){var r={};function i(n,a){var o=0,l=0,u=n.length,h=An(a);return ct(a,function(d,f){var p=yOt(e,d),m=p?e.node(p).order:u;(p||d===h)&&(ct(a.slice(l,f+1),function(g){ct(e.predecessors(g),function(y){var x=e.node(y),k=x.order;(kh)&&Wrt(r,p,d)})})}s(i,"scan");function n(a,o){var l=-1,u,h=0;return ct(o,function(d,f){if(e.node(d).dummy==="border"){var p=e.predecessors(d);p.length&&(u=e.node(p[0]).order,i(o,h,f,l,u),h=f,l=u)}i(o,h,o.length,u,a.length)}),o}return s(n,"visitLayer"),Mr(t,n),r}function yOt(e,t){if(e.node(t).dummy)return Ss(e.predecessors(t),function(r){return e.node(r).dummy})}function Wrt(e,t,r){if(t>r){var i=t;t=r,r=i}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var n=e[t];Object.defineProperty(n,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function xOt(e,t,r){if(t>r){var i=t;t=r,r=i}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function bOt(e,t,r,i){var n={},a={},o={};return ct(t,function(l){ct(l,function(u,h){n[u]=u,a[u]=u,o[u]=h})}),ct(t,function(l){var u=-1;ct(l,function(h){var d=i(h);if(d.length){d=Nl(d,function(y){return o[y]});for(var f=(d.length-1)/2,p=Math.floor(f),m=Math.ceil(f);p<=m;++p){var g=d[p];a[h]===h&&u{"use strict";Ee();to();Ml();s(mOt,"findType1Conflicts");s(gOt,"findType2Conflicts");s(yOt,"findOtherInnerSegmentNode");s(Wrt,"addConflict");s(xOt,"hasConflict");s(bOt,"verticalAlignment");s(kOt,"horizontalCompaction");s(TOt,"buildBlockGraph");s(COt,"findSmallestWidthAlignment");s(SOt,"alignCoordinates");s(wOt,"balance");s(qrt,"positionX");s(_Ot,"sep");s(EOt,"width")});function Urt(e){e=kS(e),vOt(e),QD(qrt(e),function(t,r){e.node(r).x=t})}function vOt(e){var t=Xu(e),r=e.graph().ranksep,i=0;ct(t,function(n){var a=Ks(jt(n,function(o){return e.node(o).height}));ct(n,function(o){e.node(o).y=i+a/2}),i+=a+r})}var Hrt=b(()=>{"use strict";Ee();Ml();jrt();s(Urt,"position");s(vOt,"positionY")});function U0(e,t){var r=t&&t.debugTiming?Vet:zet;r("layout",()=>{var i=r(" buildLayoutGraph",()=>$Ot(e));r(" runLayout",()=>AOt(i,r)),r(" updateInputGraph",()=>ROt(e,i))})}function AOt(e,t){t(" makeSpaceForEdgeLabels",()=>FOt(e)),t(" removeSelfEdges",()=>YOt(e)),t(" acyclic",()=>Net(e)),t(" nestingGraph.run",()=>yrt(e)),t(" rank",()=>R6(kS(e))),t(" injectEdgeLabelProxies",()=>VOt(e)),t(" removeEmptyRanks",()=>$et(e)),t(" nestingGraph.cleanup",()=>brt(e)),t(" normalizeRanks",()=>Pet(e)),t(" assignRankMinMax",()=>zOt(e)),t(" removeEdgeLabelProxies",()=>GOt(e)),t(" normalize.run",()=>Ket(e)),t(" parentDummyChains",()=>zrt(e)),t(" addBorderSegments",()=>Wet(e)),t(" order",()=>Frt(e)),t(" insertSelfEdges",()=>XOt(e)),t(" adjustCoordinateSystem",()=>Uet(e)),t(" position",()=>Urt(e)),t(" positionSelfEdges",()=>KOt(e)),t(" removeBorderNodes",()=>HOt(e)),t(" normalize.undo",()=>Qet(e)),t(" fixupEdgeLabelCoords",()=>jOt(e)),t(" undoCoordinateSystem",()=>Het(e)),t(" translateGraph",()=>WOt(e)),t(" assignNodeIntersects",()=>qOt(e)),t(" reversePoints",()=>UOt(e)),t(" acyclic.undo",()=>Oet(e))}function ROt(e,t){ct(e.nodes(),function(r){var i=e.node(r),n=t.node(r);i&&(i.x=n.x,i.y=n.y,t.children(r).length&&(i.width=n.width,i.height=n.height))}),ct(e.edges(),function(r){var i=e.edge(r),n=t.edge(r);i.points=n.points,Object.prototype.hasOwnProperty.call(n,"x")&&(i.x=n.x,i.y=n.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function $Ot(e){var t=new Ur({multigraph:!0,compound:!0}),r=N6(e.graph());return t.setGraph(Iu({},DOt,I6(r,LOt),Wd(r,IOt))),ct(e.nodes(),function(i){var n=N6(e.node(i));t.setNode(i,Uu(I6(n,NOt),OOt)),t.setParent(i,e.parent(i))}),ct(e.edges(),function(i){var n=N6(e.edge(i));t.setEdge(i,Iu({},BOt,I6(n,MOt),Wd(n,POt)))}),t}function FOt(e){var t=e.graph();t.ranksep/=2,ct(e.edges(),function(r){var i=e.edge(r);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function VOt(e){ct(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var i=e.node(t.v),n=e.node(t.w),a={rank:(n.rank-i.rank)/2+i.rank,e:t};Ol(e,"edge-proxy",a,"_ep")}})}function zOt(e){var t=0;ct(e.nodes(),function(r){var i=e.node(r);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=Ks(t,i.maxRank))}),e.graph().maxRank=t}function GOt(e){ct(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function WOt(e){var t=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,n=0,a=e.graph(),o=a.marginx||0,l=a.marginy||0;function u(h){var d=h.x,f=h.y,p=h.width,m=h.height;t=Math.min(t,d-p/2),r=Math.max(r,d+p/2),i=Math.min(i,f-m/2),n=Math.max(n,f+m/2)}s(u,"getExtremes"),ct(e.nodes(),function(h){u(e.node(h))}),ct(e.edges(),function(h){var d=e.edge(h);Object.prototype.hasOwnProperty.call(d,"x")&&u(d)}),t-=o,i-=l,ct(e.nodes(),function(h){var d=e.node(h);d.x-=t,d.y-=i}),ct(e.edges(),function(h){var d=e.edge(h);ct(d.points,function(f){f.x-=t,f.y-=i}),Object.prototype.hasOwnProperty.call(d,"x")&&(d.x-=t),Object.prototype.hasOwnProperty.call(d,"y")&&(d.y-=i)}),a.width=r-t+o,a.height=n-i+l}function qOt(e){ct(e.edges(),function(t){var r=e.edge(t),i=e.node(t.v),n=e.node(t.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=n,o=i),r.points.unshift(d6(i,a)),r.points.push(d6(n,o))})}function jOt(e){ct(e.edges(),function(t){var r=e.edge(t);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function UOt(e){ct(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function HOt(e){ct(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),i=e.node(r.borderTop),n=e.node(r.borderBottom),a=e.node(An(r.borderLeft)),o=e.node(An(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(n.y-i.y),r.x=a.x+r.width/2,r.y=i.y+r.height/2}}),ct(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function YOt(e){ct(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function XOt(e){var t=Xu(e);ct(t,function(r){var i=0;ct(r,function(n,a){var o=e.node(n);o.order=a+i,ct(o.selfEdges,function(l){Ol(e,"selfedge",{width:l.label.width,height:l.label.height,rank:o.rank,order:a+ ++i,e:l.e,label:l.label},"_se")}),delete o.selfEdges})})}function KOt(e){ct(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var i=e.node(r.e.v),n=i.x+i.width/2,a=i.y,o=r.x-n,l=i.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:n+2*o/3,y:a-l},{x:n+5*o/6,y:a-l},{x:n+o,y:a},{x:n+5*o/6,y:a+l},{x:n+2*o/3,y:a+l}],r.label.x=r.x,r.label.y=r.y}})}function I6(e,t){return zd(Wd(e,t),Number)}function N6(e){var t={};return ct(e,function(r,i){t[i.toLowerCase()]=r}),t}var LOt,DOt,IOt,NOt,OOt,MOt,BOt,POt,Yrt=b(()=>{"use strict";Ee();to();qet();Xet();h6();y6();L6();krt();Vrt();Grt();Hrt();Ml();s(U0,"layout");s(AOt,"runLayout");s(ROt,"updateInputGraph");LOt=["nodesep","edgesep","ranksep","marginx","marginy"],DOt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},IOt=["acyclicer","ranker","rankdir","align"],NOt=["width","height"],OOt={width:0,height:0},MOt=["minlen","weight","width","height","labeloffset"],BOt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},POt=["labelpos"];s($Ot,"buildLayoutGraph");s(FOt,"makeSpaceForEdgeLabels");s(VOt,"injectEdgeLabelProxies");s(zOt,"assignRankMinMax");s(GOt,"removeEdgeLabelProxies");s(WOt,"translateGraph");s(qOt,"assignNodeIntersects");s(jOt,"fixupEdgeLabelCoords");s(UOt,"reversePointsForReversedEdges");s(HOt,"removeBorderNodes");s(YOt,"removeSelfEdges");s(XOt,"insertSelfEdges");s(KOt,"positionSelfEdges");s(I6,"selectNumberAttrs");s(N6,"canonicalize")});var O6=b(()=>{"use strict";h6();Yrt();y6();L6()});function eo(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:QOt(e),edges:ZOt(e)};return rr(e.graph())||(t.value=jr(e.graph())),t}function QOt(e){return jt(e.nodes(),function(t){var r=e.node(t),i=e.parent(t),n={v:t};return rr(r)||(n.value=r),rr(i)||(n.parent=i),n})}function ZOt(e){return jt(e.edges(),function(t){var r=e.edge(t),i={v:t.v,w:t.w};return rr(t.name)||(i.name=t.name),rr(r)||(i.value=r),i})}var M6=b(()=>{"use strict";Ee();yS();s(eo,"write");s(QOt,"writeNodes");s(ZOt,"writeEdges")});var ur,Hd,Qrt,Zrt,wS,JOt,Jrt,tit,tMt,zm,Krt,eit,rit,iit,nit,sit=b(()=>{"use strict";Jt();to();M6();ur=new Map,Hd=new Map,Qrt=new Map,Zrt=s(()=>{Hd.clear(),Qrt.clear(),ur.clear()},"clear"),wS=s((e,t)=>{let r=Hd.get(t)||[];return z.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),JOt=s((e,t)=>{let r=Hd.get(t)||[];return z.info("Descendants of ",t," is ",r),z.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||wS(e.v,t)||wS(e.w,t)||r.includes(e.w):(z.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Jrt=s((e,t,r,i)=>{z.warn("Copying children of ",e,"root",i,"data",t.node(e),i);let n=t.children(e)||[];e!==i&&n.push(e),z.warn("Copying (nodes) clusterId",e,"nodes",n),n.forEach(a=>{if(t.children(a).length>0)Jrt(a,t,r,i);else{let o=t.node(a);z.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),i!==t.parent(a)&&(z.warn("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(z.debug("Setting parent",a,e),r.setParent(a,e)):(z.info("In copy ",e,"root",i,"data",t.node(e),i),z.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));let l=t.edges(a);z.debug("Copying Edges",l),l.forEach(u=>{z.info("Edge",u);let h=t.edge(u.v,u.w,u.name);z.info("Edge data",h,i);try{JOt(u,i)?(z.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),z.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):z.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",i," clusterId:",e)}catch(d){z.error(d)}})}z.debug("Removing node",a),t.removeNode(a)})},"copy"),tit=s((e,t)=>{let r=t.children(e),i=[...r];for(let n of r)Qrt.set(n,e),i=[...i,...tit(n,t)];return i},"extractDescendants"),tMt=s((e,t,r)=>{let i=e.edges().filter(u=>u.v===t||u.w===t),n=e.edges().filter(u=>u.v===r||u.w===r),a=i.map(u=>({v:u.v===t?r:u.v,w:u.w===t?t:u.w})),o=n.map(u=>({v:u.v,w:u.w}));return a.filter(u=>o.some(h=>u.v===h.v&&u.w===h.w))},"findCommonEdges"),zm=s((e,t,r)=>{let i=t.children(e);if(z.trace("Searching children of id ",e,i),i.length<1)return e;let n;for(let a of i){let o=zm(a,t,r),l=tMt(t,r,o);if(o)if(l.length>0)n=o;else return o}return n},"findNonClusterChild"),Krt=s(e=>!ur.has(e)||!ur.get(e).externalConnections?e:ur.has(e)?ur.get(e).id:e,"getAnchorId"),eit=s((e,t)=>{if(!e||t>10){z.debug("Opting out, no graph ");return}else z.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(z.warn("Cluster identified",r," Replacement id in edges: ",zm(r,e,r)),Hd.set(r,tit(r,e)),ur.set(r,{id:zm(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){let i=e.children(r),n=e.edges();i.length>0?(z.debug("Cluster identified",r,Hd),n.forEach(a=>{let o=wS(a.v,r),l=wS(a.w,r);o^l&&(z.warn("Edge: ",a," leaves cluster ",r),z.warn("Descendants of XXX ",r,": ",Hd.get(r)),ur.get(r).externalConnections=!0)})):z.debug("Not a cluster ",r,Hd)});for(let r of ur.keys()){let i=ur.get(r).id,n=e.parent(i);n!==r&&ur.has(n)&&!ur.get(n).externalConnections&&(ur.get(r).id=n)}e.edges().forEach(function(r){let i=e.edge(r);z.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),z.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let n=r.v,a=r.w;if(z.warn("Fix XXX",ur,"ids:",r.v,r.w,"Translating: ",ur.get(r.v)," --- ",ur.get(r.w)),ur.get(r.v)||ur.get(r.w)){if(z.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),n=Krt(r.v),a=Krt(r.w),e.removeEdge(r.v,r.w,r.name),n!==r.v){let o=e.parent(n);ur.get(o).externalConnections=!0,i.fromCluster=r.v}if(a!==r.w){let o=e.parent(a);ur.get(o).externalConnections=!0,i.toCluster=r.w}z.warn("Fix Replacing with XXX",n,a,r.name),e.setEdge(n,a,i,r.name)}}),z.warn("Adjusted Graph",eo(e)),rit(e,0),z.trace(ur)},"adjustClustersAndEdges"),rit=s((e,t)=>{if(z.warn("extractor - ",t,eo(e),e.children("D")),t>10){z.error("Bailing out");return}let r=e.nodes(),i=!1;for(let n of r){let a=e.children(n);i=i||a.length>0}if(!i){z.debug("Done, no node has children",e.nodes());return}z.debug("Nodes = ",r,t);for(let n of r)if(z.debug("Extracting node",n,ur,ur.has(n)&&!ur.get(n).externalConnections,!e.parent(n),e.node(n),e.children("D")," Depth ",t),!ur.has(n))z.debug("Not a cluster",n,t);else if(!ur.get(n).externalConnections&&e.children(n)&&e.children(n).length>0){z.warn("Cluster without external connections, without a parent and with children",n,t);let o=e.graph().rankdir==="TB"?"LR":"TB";ur.get(n)?.clusterData?.dir&&(o=ur.get(n).clusterData.dir,z.warn("Fixing dir",ur.get(n).clusterData.dir,o));let l=new Ur({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});z.warn("Old graph before copy",eo(e)),Jrt(n,e,l,n),e.setNode(n,{clusterNode:!0,id:n,clusterData:ur.get(n).clusterData,label:ur.get(n).label,graph:l}),z.warn("New graph after copy node: (",n,")",eo(l)),z.debug("Old graph after copy",eo(e))}else z.warn("Cluster ** ",n," **not meeting the criteria !externalConnections:",!ur.get(n).externalConnections," no parent: ",!e.parent(n)," children ",e.children(n)&&e.children(n).length>0,e.children("D"),t),z.debug(ur);r=e.nodes(),z.warn("New list of nodes",r);for(let n of r){let a=e.node(n);z.warn(" Now next level",n,a),a?.clusterNode&&rit(a.graph,t+1)}},"extractor"),iit=s((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{let n=e.children(i),a=iit(e,n);r=[...r,...a]}),r},"sorter"),nit=s(e=>iit(e,e.children()),"sortNodesByHierarchy")});var oit={};Fe(oit,{render:()=>eMt});var ait,eMt,lit=b(()=>{"use strict";O6();M6();to();bD();de();sit();TC();hC();xD();Jt();B0();ye();ait=s(async(e,t,r,i,n,a)=>{z.warn("Graph in recursive render:XAX",eo(t),n);let o=t.graph().rankdir;z.trace("Dir in recursive render - dir:",o);let l=e.insert("g").attr("class","root");t.nodes()?z.info("Recursive render XXX",t.nodes()):z.info("No nodes found for",t),t.edges().length>0&&z.info("Recursive edges",t.edge(t.edges()[0]));let u=l.insert("g").attr("class","clusters"),h=l.insert("g").attr("class","edgePaths"),d=l.insert("g").attr("class","edgeLabels"),f=l.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(y){let x=t.node(y);if(n!==void 0){let k=JSON.parse(JSON.stringify(n.clusterData));z.trace(`Setting data for parent cluster XXX
+ Node.id = `,y,`
+ data=`,k.height,`
+Parent cluster`,n.height),t.setNode(n.id,k),t.parent(y)||(z.trace("Setting parent",y,n.id),t.setParent(y,n.id,k))}if(z.info("(Insert) Node XXX"+y+": "+JSON.stringify(t.node(y))),x?.clusterNode){z.info("Cluster identified XBX",y,x.width,t.node(y));let{ranksep:k,nodesep:T}=t.graph();x.graph.setGraph({...x.graph.graph(),ranksep:k+25,nodesep:T});let C=await ait(f,x.graph,r,i,t.node(y),a),_=C.elem;Vt(x,_),x.diff=C.diff||0,z.info("New compound node after recursive render XAX",y,"width",x.width,"height",x.height),SQ(_,x)}else t.children(y).length>0?(z.trace("Cluster - the non recursive path XBX",y,x.id,x,x.width,"Graph:",t),z.trace(zm(x.id,t)),ur.set(x.id,{id:zm(x.id,t),node:x})):(z.trace("Node - the non recursive path XAX",y,f,t.node(y),o),await Tm(f,t.node(y),{config:a,dir:o}))})),await s(async()=>{let y=t.edges().map(async function(x){let k=t.edge(x.v,x.w,x.name);z.info("Edge "+x.v+" -> "+x.w+": "+JSON.stringify(x)),z.info("Edge "+x.v+" -> "+x.w+": ",x," ",JSON.stringify(t.edge(x))),z.info("Fix",ur,"ids:",x.v,x.w,"Translating: ",ur.get(x.v),ur.get(x.w)),await gC(d,k)});await Promise.all(y)},"processEdges")(),z.info("Graph before layout:",JSON.stringify(eo(t))),z.info("############################################# XXX"),z.info("### Layout ### XXX"),z.info("############################################# XXX"),U0(t),z.info("Graph after layout:",JSON.stringify(eo(t)));let m=0,{subGraphTitleTotalMargin:g}=Lc(a);return await Promise.all(nit(t).map(async function(y){let x=t.node(y);if(z.info("Position XBX => "+y+": ("+x.x,","+x.y,") width: ",x.width," height: ",x.height),x?.clusterNode)x.y+=g,z.info("A tainted cluster node XBX1",y,x.id,x.width,x.height,x.x,x.y,t.parent(y)),ur.get(x.id).node=x,$0(x);else if(t.children(y).length>0){z.info("A pure cluster node XBX1",y,x.id,x.x,x.y,x.width,x.height,t.parent(y)),x.height+=g,t.node(x.parentId);let k=x?.padding/2||0,T=x?.labelBBox?.height||0,C=T-k||0;z.debug("OffsetY",C,"labelHeight",T,"halfPadding",k),await km(u,x),ur.get(x.id).node=x}else{let k=t.node(x.parentId);x.y+=g/2,z.info("A regular node XBX1 - using the padding",x.id,"parent",x.parentId,x.width,x.height,x.x,x.y,"offsetY",x.offsetY,"parent",k,k?.offsetY,x),$0(x)}})),t.edges().forEach(function(y){let x=t.edge(y);z.info("Edge "+y.v+" -> "+y.w+": "+JSON.stringify(x),x),x.points.forEach(_=>_.y+=g/2);let k=t.node(y.v);var T=t.node(y.w);let C=xC(h,x,ur,r,k,T,i);yC(x,C)}),t.nodes().forEach(function(y){let x=t.node(y);z.info(y,x.type,x.diff),x.isGroup&&(m=x.diff)}),z.warn("Returning from recursive render XAX",l,m),{elem:l,diff:m}},"recursiveRender"),eMt=s(async(e,t)=>{let r=new Ur({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),i=t.select("g");bC(i,e.markers,e.type,e.diagramId),wQ(),CQ(),mQ(),Zrt(),e.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),z.debug("Edges:",e.edges),e.edges.forEach(a=>{if(a.start===a.end){let o=a.start,l=o+"---"+o+"---1",u=o+"---"+o+"---2",h=r.node(o);r.setNode(l,{domId:l,id:l,parentId:h.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(l,h.parentId),r.setNode(u,{domId:u,id:u,parentId:h.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(u,h.parentId);let d=structuredClone(a),f=structuredClone(a),p=structuredClone(a);d.label="",d.arrowTypeEnd="none",d.id=o+"-cyclic-special-1",f.arrowTypeStart="none",f.arrowTypeEnd="none",f.id=o+"-cyclic-special-mid",p.label="",h.isGroup&&(d.fromCluster=o,p.toCluster=o),p.id=o+"-cyclic-special-2",p.arrowTypeStart="none",r.setEdge(o,l,d,o+"-cyclic-special-0"),r.setEdge(l,u,f,o+"-cyclic-special-1"),r.setEdge(u,o,p,o+"-cyc{"use strict";EQ();Jt();H0={},B6=s(e=>{for(let t of e)H0[t.name]=t},"registerLayoutLoaders"),rMt=s(()=>{B6([{name:"dagre",loader:s(async()=>await Promise.resolve().then(()=>(lit(),oit)),"loader")}])},"registerDefaultLayoutLoaders");rMt();Bl=s(async(e,t)=>{if(!(e.layoutAlgorithm in H0))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let d of e.nodes){let f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}let r=H0[e.layoutAlgorithm],i=await r.loader(),{theme:n,themeVariables:a}=e.config,{useGradient:o,gradientStart:l,gradientStop:u}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n?.includes("dark")?"#FFFFFF":"#000000"}`),o){let d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}return i.render(e,t,_Q,{algorithm:r.algorithm})},"render"),Zu=s((e="",{fallback:t="dagre"}={})=>{if(e in H0)return e;if(t in H0)return z.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm")});var ro,iMt,nMt,Xd=b(()=>{"use strict";gi();Jt();ro=s((e,t,r,i)=>{e.attr("class",r);let{width:n,height:a,x:o,y:l}=iMt(e,t);pr(e,a,n,i);let u=nMt(o,l,n,a,t);e.attr("viewBox",u),z.debug(`viewBox configured: ${u} with padding: ${t}`)},"setupViewPortForSVG"),iMt=s((e,t)=>{let r=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+t*2,height:r.height+t*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),nMt=s((e,t,r,i,n)=>`${e-n} ${t-n} ${r} ${i}`,"createViewBox")});var sMt,aMt,cit,uit=b(()=>{"use strict";ye();Jt();bm();Yd();Xd();Re();sMt=s(function(e,t){return t.db.getClasses()},"getClasses"),aMt=s(async function(e,t,r,i){z.info("REF0:"),z.info("Drawing state diagram (v2)",t);let{securityLevel:n,flowchart:a,layout:o}=Q();i.db.setDiagramId(t),z.debug("Before getData: ");let l=i.db.getData();z.debug("Data: ",l);let u=vl(t,n),h=i.db.getDirection();l.type=i.type,l.layoutAlgorithm=Zu(o),l.layoutAlgorithm==="dagre"&&o==="elk"&&z.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."),l.direction=h,l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,l.markers=["point","circle","cross"],l.diagramId=t,z.debug("REF1:",l),await Bl(l,u);let d=l.config.flowchart?.diagramPadding??8;Te.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,i.db.getDiagramTitle()),ro(u,d,"flowchart",a?.useMaxWidth||!1)},"draw"),cit={getClasses:sMt,draw:aMt}});var P6,$6,hit=b(()=>{"use strict";P6=(function(){var e=s(function(oi,Ce,Ne,je){for(Ne=Ne||{},je=oi.length;je--;Ne[oi[je]]=Ce);return Ne},"o"),t=[1,4],r=[1,3],i=[1,5],n=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],a=[2,2],o=[1,13],l=[1,14],u=[1,15],h=[1,16],d=[1,23],f=[1,25],p=[1,26],m=[1,27],g=[1,50],y=[1,49],x=[1,29],k=[1,30],T=[1,31],C=[1,32],_=[1,33],S=[1,45],w=[1,47],A=[1,43],v=[1,48],M=[1,44],$=[1,51],I=[1,46],F=[1,52],B=[1,53],O=[1,34],R=[1,35],N=[1,36],P=[1,37],E=[1,38],D=[1,58],V=[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],L=[1,62],q=[1,61],H=[1,63],K=[8,9,11,75,77,78],U=[1,79],st=[1,92],X=[1,97],ut=[1,96],ot=[1,93],mt=[1,89],ht=[1,95],it=[1,91],Ot=[1,98],St=[1,94],yt=[1,99],Et=[1,90],Ct=[8,9,10,11,40,75,77,78],Bt=[8,9,10,11,40,46,75,77,78],Lt=[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],ee=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],at=[44,60,89,102,105,106,109,111,114,115,116],$e=[1,122],pt=[1,123],Wt=[1,125],Ht=[1,124],Dt=[44,60,62,74,89,102,105,106,109,111,114,115,116],bt=[1,134],Gt=[1,148],G=[1,149],nt=[1,150],W=[1,151],Rt=[1,136],Y=[1,138],At=[1,142],xt=[1,143],Zt=[1,144],Nt=[1,145],wt=[1,146],he=[1,147],gt=[1,152],te=[1,153],ne=[1,132],It=[1,133],ke=[1,140],J=[1,135],Xe=[1,139],rt=[1,137],or=[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],Sr=[1,155],Dr=[1,157],Ie=[8,9,11],vr=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],ge=[1,177],se=[1,173],Oe=[1,174],ve=[1,178],ue=[1,175],Ge=[1,176],yr=[77,116,119],We=[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],Br=[10,106],Kr=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],kr=[1,248],Gr=[1,246],Xn=[1,250],ae=[1,244],lt=[1,245],Xt=[1,247],oe=[1,249],Tr=[1,251],Jr=[1,269],ei=[8,9,11,106],dr=[8,9,10,11,60,84,105,106,109,110,111,112],da={trace:s(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:s(function(Ce,Ne,je,ie,li,Z,jh){var tt=Z.length-1;switch(li){case 2:this.$=[];break;case 3:(!Array.isArray(Z[tt])||Z[tt].length>0)&&Z[tt-1].push(Z[tt]),this.$=Z[tt-1];break;case 4:case 183:this.$=Z[tt];break;case 11:ie.setDirection("TB"),this.$="TB";break;case 12:ie.setDirection(Z[tt-1]),this.$=Z[tt-1];break;case 27:this.$=Z[tt-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=ie.addSubGraph(Z[tt-6],Z[tt-1],Z[tt-4]);break;case 34:this.$=ie.addSubGraph(Z[tt-3],Z[tt-1],Z[tt-3]);break;case 35:this.$=ie.addSubGraph(void 0,Z[tt-1],void 0);break;case 37:this.$=Z[tt].trim(),ie.setAccTitle(this.$);break;case 38:case 39:this.$=Z[tt].trim(),ie.setAccDescription(this.$);break;case 43:this.$=Z[tt-1]+Z[tt];break;case 44:this.$=Z[tt];break;case 45:ie.addVertex(Z[tt-1][Z[tt-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Z[tt]),ie.addLink(Z[tt-3].stmt,Z[tt-1],Z[tt-2]),this.$={stmt:Z[tt-1],nodes:Z[tt-1].concat(Z[tt-3].nodes)};break;case 46:ie.addLink(Z[tt-2].stmt,Z[tt],Z[tt-1]),this.$={stmt:Z[tt],nodes:Z[tt].concat(Z[tt-2].nodes)};break;case 47:ie.addLink(Z[tt-3].stmt,Z[tt-1],Z[tt-2]),this.$={stmt:Z[tt-1],nodes:Z[tt-1].concat(Z[tt-3].nodes)};break;case 48:this.$={stmt:Z[tt-1],nodes:Z[tt-1]};break;case 49:ie.addVertex(Z[tt-1][Z[tt-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Z[tt]),this.$={stmt:Z[tt-1],nodes:Z[tt-1],shapeData:Z[tt]};break;case 50:this.$={stmt:Z[tt],nodes:Z[tt]};break;case 51:this.$=[Z[tt]];break;case 52:ie.addVertex(Z[tt-5][Z[tt-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Z[tt-4]),this.$=Z[tt-5].concat(Z[tt]);break;case 53:this.$=Z[tt-4].concat(Z[tt]);break;case 54:this.$=Z[tt];break;case 55:this.$=Z[tt-2],ie.setClass(Z[tt-2],Z[tt]);break;case 56:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"square");break;case 57:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"doublecircle");break;case 58:this.$=Z[tt-5],ie.addVertex(Z[tt-5],Z[tt-2],"circle");break;case 59:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"ellipse");break;case 60:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"stadium");break;case 61:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"subroutine");break;case 62:this.$=Z[tt-7],ie.addVertex(Z[tt-7],Z[tt-1],"rect",void 0,void 0,void 0,Object.fromEntries([[Z[tt-5],Z[tt-3]]]));break;case 63:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"cylinder");break;case 64:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"round");break;case 65:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"diamond");break;case 66:this.$=Z[tt-5],ie.addVertex(Z[tt-5],Z[tt-2],"hexagon");break;case 67:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"odd");break;case 68:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"trapezoid");break;case 69:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"inv_trapezoid");break;case 70:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"lean_right");break;case 71:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"lean_left");break;case 72:this.$=Z[tt],ie.addVertex(Z[tt]);break;case 73:Z[tt-1].text=Z[tt],this.$=Z[tt-1];break;case 74:case 75:Z[tt-2].text=Z[tt-1],this.$=Z[tt-2];break;case 76:this.$=Z[tt];break;case 77:var Zi=ie.destructLink(Z[tt],Z[tt-2]);this.$={type:Zi.type,stroke:Zi.stroke,length:Zi.length,text:Z[tt-1]};break;case 78:var Zi=ie.destructLink(Z[tt],Z[tt-2]);this.$={type:Zi.type,stroke:Zi.stroke,length:Zi.length,text:Z[tt-1],id:Z[tt-3]};break;case 79:this.$={text:Z[tt],type:"text"};break;case 80:this.$={text:Z[tt-1].text+""+Z[tt],type:Z[tt-1].type};break;case 81:this.$={text:Z[tt],type:"string"};break;case 82:this.$={text:Z[tt],type:"markdown"};break;case 83:var Zi=ie.destructLink(Z[tt]);this.$={type:Zi.type,stroke:Zi.stroke,length:Zi.length};break;case 84:var Zi=ie.destructLink(Z[tt]);this.$={type:Zi.type,stroke:Zi.stroke,length:Zi.length,id:Z[tt-1]};break;case 85:this.$=Z[tt-1];break;case 86:this.$={text:Z[tt],type:"text"};break;case 87:this.$={text:Z[tt-1].text+""+Z[tt],type:Z[tt-1].type};break;case 88:this.$={text:Z[tt],type:"string"};break;case 89:case 104:this.$={text:Z[tt],type:"markdown"};break;case 101:this.$={text:Z[tt],type:"text"};break;case 102:this.$={text:Z[tt-1].text+""+Z[tt],type:Z[tt-1].type};break;case 103:this.$={text:Z[tt],type:"text"};break;case 105:this.$=Z[tt-4],ie.addClass(Z[tt-2],Z[tt]);break;case 106:this.$=Z[tt-4],ie.setClass(Z[tt-2],Z[tt]);break;case 107:case 115:this.$=Z[tt-1],ie.setClickEvent(Z[tt-1],Z[tt]);break;case 108:case 116:this.$=Z[tt-3],ie.setClickEvent(Z[tt-3],Z[tt-2]),ie.setTooltip(Z[tt-3],Z[tt]);break;case 109:this.$=Z[tt-2],ie.setClickEvent(Z[tt-2],Z[tt-1],Z[tt]);break;case 110:this.$=Z[tt-4],ie.setClickEvent(Z[tt-4],Z[tt-3],Z[tt-2]),ie.setTooltip(Z[tt-4],Z[tt]);break;case 111:this.$=Z[tt-2],ie.setLink(Z[tt-2],Z[tt]);break;case 112:this.$=Z[tt-4],ie.setLink(Z[tt-4],Z[tt-2]),ie.setTooltip(Z[tt-4],Z[tt]);break;case 113:this.$=Z[tt-4],ie.setLink(Z[tt-4],Z[tt-2],Z[tt]);break;case 114:this.$=Z[tt-6],ie.setLink(Z[tt-6],Z[tt-4],Z[tt]),ie.setTooltip(Z[tt-6],Z[tt-2]);break;case 117:this.$=Z[tt-1],ie.setLink(Z[tt-1],Z[tt]);break;case 118:this.$=Z[tt-3],ie.setLink(Z[tt-3],Z[tt-2]),ie.setTooltip(Z[tt-3],Z[tt]);break;case 119:this.$=Z[tt-3],ie.setLink(Z[tt-3],Z[tt-2],Z[tt]);break;case 120:this.$=Z[tt-5],ie.setLink(Z[tt-5],Z[tt-4],Z[tt]),ie.setTooltip(Z[tt-5],Z[tt-2]);break;case 121:this.$=Z[tt-4],ie.addVertex(Z[tt-2],void 0,void 0,Z[tt]);break;case 122:this.$=Z[tt-4],ie.updateLink([Z[tt-2]],Z[tt]);break;case 123:this.$=Z[tt-4],ie.updateLink(Z[tt-2],Z[tt]);break;case 124:this.$=Z[tt-8],ie.updateLinkInterpolate([Z[tt-6]],Z[tt-2]),ie.updateLink([Z[tt-6]],Z[tt]);break;case 125:this.$=Z[tt-8],ie.updateLinkInterpolate(Z[tt-6],Z[tt-2]),ie.updateLink(Z[tt-6],Z[tt]);break;case 126:this.$=Z[tt-6],ie.updateLinkInterpolate([Z[tt-4]],Z[tt]);break;case 127:this.$=Z[tt-6],ie.updateLinkInterpolate(Z[tt-4],Z[tt]);break;case 128:case 130:this.$=[Z[tt]];break;case 129:case 131:Z[tt-2].push(Z[tt]),this.$=Z[tt-2];break;case 133:this.$=Z[tt-1]+Z[tt];break;case 181:this.$=Z[tt];break;case 182:this.$=Z[tt-1]+""+Z[tt];break;case 184:this.$=Z[tt-1]+""+Z[tt];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:t,10:r,12:i},{1:[3]},e(n,a,{5:6}),{4:7,9:t,10:r,12:i},{4:8,9:t,10:r,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:k,86:T,87:C,88:_,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B,121:O,122:R,123:N,124:P,125:E},e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),{8:[1,55],9:[1,56],10:D,15:54,18:57},e(V,[2,3]),e(V,[2,4]),e(V,[2,5]),e(V,[2,6]),e(V,[2,7]),e(V,[2,8]),{8:L,9:q,11:H,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:L,9:q,11:H,21:68},{8:L,9:q,11:H,21:69},{8:L,9:q,11:H,21:70},{8:L,9:q,11:H,21:71},{8:L,9:q,11:H,21:72},{8:L,9:q,10:[1,73],11:H,21:74},e(V,[2,36]),{35:[1,75]},{37:[1,76]},e(V,[2,39]),e(K,[2,50],{18:77,39:78,10:D,40:U}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:st,44:X,60:ut,80:[1,87],89:ot,95:[1,84],97:[1,85],101:86,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et,120:88},e(V,[2,185]),e(V,[2,186]),e(V,[2,187]),e(V,[2,188]),e(V,[2,189]),e(Ct,[2,51]),e(Ct,[2,54],{46:[1,100]}),e(Bt,[2,72],{113:113,29:[1,101],44:g,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:y,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:S,102:w,105:A,106:v,109:M,111:$,114:I,115:F,116:B}),e(Lt,[2,181]),e(Lt,[2,142]),e(Lt,[2,143]),e(Lt,[2,144]),e(Lt,[2,145]),e(Lt,[2,146]),e(Lt,[2,147]),e(Lt,[2,148]),e(Lt,[2,149]),e(Lt,[2,150]),e(Lt,[2,151]),e(Lt,[2,152]),e(n,[2,12]),e(n,[2,18]),e(n,[2,19]),{9:[1,114]},e(ee,[2,26],{18:115,10:D}),e(V,[2,27]),{42:116,43:39,44:g,45:40,47:41,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},e(V,[2,40]),e(V,[2,41]),e(V,[2,42]),e(at,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:$e,81:pt,116:Wt,119:Ht},{75:[1,126],77:[1,127]},e(Dt,[2,83]),e(V,[2,28]),e(V,[2,29]),e(V,[2,30]),e(V,[2,31]),e(V,[2,32]),{10:bt,12:Gt,14:G,27:nt,28:128,32:W,44:Rt,60:Y,75:At,80:[1,130],81:[1,131],83:141,84:xt,85:Zt,86:Nt,87:wt,88:he,89:gt,90:te,91:129,105:ne,109:It,111:ke,114:J,115:Xe,116:rt},e(or,a,{5:154}),e(V,[2,37]),e(V,[2,38]),e(K,[2,48],{44:Sr}),e(K,[2,49],{18:156,10:D,40:Dr}),e(Ct,[2,44]),{44:g,47:158,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},{102:[1,159],103:160,105:[1,161]},{44:g,47:162,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},{44:g,47:163,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},e(Ie,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(Ie,[2,115],{120:168,10:[1,167],14:st,44:X,60:ut,89:ot,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et}),e(Ie,[2,117],{10:[1,169]}),e(vr,[2,183]),e(vr,[2,170]),e(vr,[2,171]),e(vr,[2,172]),e(vr,[2,173]),e(vr,[2,174]),e(vr,[2,175]),e(vr,[2,176]),e(vr,[2,177]),e(vr,[2,178]),e(vr,[2,179]),e(vr,[2,180]),{44:g,47:170,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},{30:171,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:179,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:181,50:[1,180],67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:182,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:183,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:184,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{109:[1,185]},{30:186,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:187,65:[1,188],67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:189,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:190,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:191,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},e(Lt,[2,182]),e(n,[2,20]),e(ee,[2,25]),e(K,[2,46],{39:192,18:193,10:D,40:U}),e(at,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{77:[1,197],79:198,116:Wt,119:Ht},e(yr,[2,79]),e(yr,[2,81]),e(yr,[2,82]),e(yr,[2,168]),e(yr,[2,169]),{76:199,79:121,80:$e,81:pt,116:Wt,119:Ht},e(Dt,[2,84]),{8:L,9:q,10:bt,11:H,12:Gt,14:G,21:201,27:nt,29:[1,200],32:W,44:Rt,60:Y,75:At,83:141,84:xt,85:Zt,86:Nt,87:wt,88:he,89:gt,90:te,91:202,105:ne,109:It,111:ke,114:J,115:Xe,116:rt},e(We,[2,101]),e(We,[2,103]),e(We,[2,104]),e(We,[2,157]),e(We,[2,158]),e(We,[2,159]),e(We,[2,160]),e(We,[2,161]),e(We,[2,162]),e(We,[2,163]),e(We,[2,164]),e(We,[2,165]),e(We,[2,166]),e(We,[2,167]),e(We,[2,90]),e(We,[2,91]),e(We,[2,92]),e(We,[2,93]),e(We,[2,94]),e(We,[2,95]),e(We,[2,96]),e(We,[2,97]),e(We,[2,98]),e(We,[2,99]),e(We,[2,100]),{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,203],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:k,86:T,87:C,88:_,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B,121:O,122:R,123:N,124:P,125:E},{10:D,18:204},{44:[1,205]},e(Ct,[2,43]),{10:[1,206],44:g,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:113,114:I,115:F,116:B},{10:[1,207]},{10:[1,208],106:[1,209]},e(Br,[2,128]),{10:[1,210],44:g,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:113,114:I,115:F,116:B},{10:[1,211],44:g,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:113,114:I,115:F,116:B},{80:[1,212]},e(Ie,[2,109],{10:[1,213]}),e(Ie,[2,111],{10:[1,214]}),{80:[1,215]},e(vr,[2,184]),{80:[1,216],98:[1,217]},e(Ct,[2,55],{113:113,44:g,60:y,89:S,102:w,105:A,106:v,109:M,111:$,114:I,115:F,116:B}),{31:[1,218],67:ge,82:219,116:ve,117:ue,118:Ge},e(Kr,[2,86]),e(Kr,[2,88]),e(Kr,[2,89]),e(Kr,[2,153]),e(Kr,[2,154]),e(Kr,[2,155]),e(Kr,[2,156]),{49:[1,220],67:ge,82:219,116:ve,117:ue,118:Ge},{30:221,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{51:[1,222],67:ge,82:219,116:ve,117:ue,118:Ge},{53:[1,223],67:ge,82:219,116:ve,117:ue,118:Ge},{55:[1,224],67:ge,82:219,116:ve,117:ue,118:Ge},{57:[1,225],67:ge,82:219,116:ve,117:ue,118:Ge},{60:[1,226]},{64:[1,227],67:ge,82:219,116:ve,117:ue,118:Ge},{66:[1,228],67:ge,82:219,116:ve,117:ue,118:Ge},{30:229,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{31:[1,230],67:ge,82:219,116:ve,117:ue,118:Ge},{67:ge,69:[1,231],71:[1,232],82:219,116:ve,117:ue,118:Ge},{67:ge,69:[1,234],71:[1,233],82:219,116:ve,117:ue,118:Ge},e(K,[2,45],{18:156,10:D,40:Dr}),e(K,[2,47],{44:Sr}),e(at,[2,75]),e(at,[2,74]),{62:[1,235],67:ge,82:219,116:ve,117:ue,118:Ge},e(at,[2,77]),e(yr,[2,80]),{77:[1,236],79:198,116:Wt,119:Ht},{30:237,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},e(or,a,{5:238}),e(We,[2,102]),e(V,[2,35]),{43:239,44:g,45:40,47:41,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},{10:D,18:240},{10:kr,60:Gr,84:Xn,92:241,105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},{10:kr,60:Gr,84:Xn,92:252,104:[1,253],105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},{10:kr,60:Gr,84:Xn,92:254,104:[1,255],105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},{105:[1,256]},{10:kr,60:Gr,84:Xn,92:257,105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},{44:g,47:258,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},e(Ie,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(Ie,[2,116]),e(Ie,[2,118],{10:[1,262]}),e(Ie,[2,119]),e(Bt,[2,56]),e(Kr,[2,87]),e(Bt,[2,57]),{51:[1,263],67:ge,82:219,116:ve,117:ue,118:Ge},e(Bt,[2,64]),e(Bt,[2,59]),e(Bt,[2,60]),e(Bt,[2,61]),{109:[1,264]},e(Bt,[2,63]),e(Bt,[2,65]),{66:[1,265],67:ge,82:219,116:ve,117:ue,118:Ge},e(Bt,[2,67]),e(Bt,[2,68]),e(Bt,[2,70]),e(Bt,[2,69]),e(Bt,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(at,[2,78]),{31:[1,266],67:ge,82:219,116:ve,117:ue,118:Ge},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,267],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:k,86:T,87:C,88:_,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B,121:O,122:R,123:N,124:P,125:E},e(Ct,[2,53]),{43:268,44:g,45:40,47:41,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},e(Ie,[2,121],{106:Jr}),e(ei,[2,130],{108:270,10:kr,60:Gr,84:Xn,105:ae,109:lt,110:Xt,111:oe,112:Tr}),e(dr,[2,132]),e(dr,[2,134]),e(dr,[2,135]),e(dr,[2,136]),e(dr,[2,137]),e(dr,[2,138]),e(dr,[2,139]),e(dr,[2,140]),e(dr,[2,141]),e(Ie,[2,122],{106:Jr}),{10:[1,271]},e(Ie,[2,123],{106:Jr}),{10:[1,272]},e(Br,[2,129]),e(Ie,[2,105],{106:Jr}),e(Ie,[2,106],{113:113,44:g,60:y,89:S,102:w,105:A,106:v,109:M,111:$,114:I,115:F,116:B}),e(Ie,[2,110]),e(Ie,[2,112],{10:[1,273]}),e(Ie,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:L,9:q,11:H,21:278},e(V,[2,34]),e(Ct,[2,52]),{10:kr,60:Gr,84:Xn,105:ae,107:279,108:243,109:lt,110:Xt,111:oe,112:Tr},e(dr,[2,133]),{14:st,44:X,60:ut,89:ot,101:280,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et,120:88},{14:st,44:X,60:ut,89:ot,101:281,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et,120:88},{98:[1,282]},e(Ie,[2,120]),e(Bt,[2,58]),{30:283,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},e(Bt,[2,66]),e(or,a,{5:284}),e(ei,[2,131],{108:270,10:kr,60:Gr,84:Xn,105:ae,109:lt,110:Xt,111:oe,112:Tr}),e(Ie,[2,126],{120:168,10:[1,285],14:st,44:X,60:ut,89:ot,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et}),e(Ie,[2,127],{120:168,10:[1,286],14:st,44:X,60:ut,89:ot,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et}),e(Ie,[2,114]),{31:[1,287],67:ge,82:219,116:ve,117:ue,118:Ge},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,288],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:k,86:T,87:C,88:_,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B,121:O,122:R,123:N,124:P,125:E},{10:kr,60:Gr,84:Xn,92:289,105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},{10:kr,60:Gr,84:Xn,92:290,105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},e(Bt,[2,62]),e(V,[2,33]),e(Ie,[2,124],{106:Jr}),e(Ie,[2,125],{106:Jr})],defaultActions:{},parseError:s(function(Ce,Ne){if(Ne.recoverable)this.trace(Ce);else{var je=new Error(Ce);throw je.hash=Ne,je}},"parseError"),parse:s(function(Ce){var Ne=this,je=[0],ie=[],li=[null],Z=[],jh=this.table,tt="",Zi=0,b$=0,k$=0,axt=2,T$=1,oxt=Z.slice.call(arguments,1),kn=Object.create(this.lexer),Uh={yy:{}};for(var Jv in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Jv)&&(Uh.yy[Jv]=this.yy[Jv]);kn.setInput(Ce,Uh.yy),Uh.yy.lexer=kn,Uh.yy.parser=this,typeof kn.yylloc>"u"&&(kn.yylloc={});var t3=kn.yylloc;Z.push(t3);var lxt=kn.options&&kn.options.ranges;typeof Uh.yy.parseError=="function"?this.parseError=Uh.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function wYt(fa){je.length=je.length-2*fa,li.length=li.length-fa,Z.length=Z.length-fa}s(wYt,"popStack");function cxt(){var fa;return fa=ie.pop()||kn.lex()||T$,typeof fa!="number"&&(fa instanceof Array&&(ie=fa,fa=ie.pop()),fa=Ne.symbols_[fa]||fa),fa}s(cxt,"lex");for(var ds,e3,Hh,Ma,_Yt,r3,up={},g2,nc,C$,y2;;){if(Hh=je[je.length-1],this.defaultActions[Hh]?Ma=this.defaultActions[Hh]:((ds===null||typeof ds>"u")&&(ds=cxt()),Ma=jh[Hh]&&jh[Hh][ds]),typeof Ma>"u"||!Ma.length||!Ma[0]){var i3="";y2=[];for(g2 in jh[Hh])this.terminals_[g2]&&g2>axt&&y2.push("'"+this.terminals_[g2]+"'");kn.showPosition?i3="Parse error on line "+(Zi+1)+`:
+`+kn.showPosition()+`
+Expecting `+y2.join(", ")+", got '"+(this.terminals_[ds]||ds)+"'":i3="Parse error on line "+(Zi+1)+": Unexpected "+(ds==T$?"end of input":"'"+(this.terminals_[ds]||ds)+"'"),this.parseError(i3,{text:kn.match,token:this.terminals_[ds]||ds,line:kn.yylineno,loc:t3,expected:y2})}if(Ma[0]instanceof Array&&Ma.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Hh+", token: "+ds);switch(Ma[0]){case 1:je.push(ds),li.push(kn.yytext),Z.push(kn.yylloc),je.push(Ma[1]),ds=null,e3?(ds=e3,e3=null):(b$=kn.yyleng,tt=kn.yytext,Zi=kn.yylineno,t3=kn.yylloc,k$>0&&k$--);break;case 2:if(nc=this.productions_[Ma[1]][1],up.$=li[li.length-nc],up._$={first_line:Z[Z.length-(nc||1)].first_line,last_line:Z[Z.length-1].last_line,first_column:Z[Z.length-(nc||1)].first_column,last_column:Z[Z.length-1].last_column},lxt&&(up._$.range=[Z[Z.length-(nc||1)].range[0],Z[Z.length-1].range[1]]),r3=this.performAction.apply(up,[tt,b$,Zi,Uh.yy,Ma[1],li,Z].concat(oxt)),typeof r3<"u")return r3;nc&&(je=je.slice(0,-1*nc*2),li=li.slice(0,-1*nc),Z=Z.slice(0,-1*nc)),je.push(this.productions_[Ma[1]][0]),li.push(up.$),Z.push(up._$),C$=jh[je[je.length-2]][je[je.length-1]],je.push(C$);break;case 3:return!0}}return!0},"parse")},ou=(function(){var oi={EOF:1,parseError:s(function(Ne,je){if(this.yy.parser)this.yy.parser.parseError(Ne,je);else throw new Error(Ne)},"parseError"),setInput:s(function(Ce,Ne){return this.yy=Ne||this.yy||{},this._input=Ce,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:s(function(){var Ce=this._input[0];this.yytext+=Ce,this.yyleng++,this.offset++,this.match+=Ce,this.matched+=Ce;var Ne=Ce.match(/(?:\r\n?|\n).*/g);return Ne?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ce},"input"),unput:s(function(Ce){var Ne=Ce.length,je=Ce.split(/(?:\r\n?|\n)/g);this._input=Ce+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ne),this.offset-=Ne;var ie=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),je.length-1&&(this.yylineno-=je.length-1);var li=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:je?(je.length===ie.length?this.yylloc.first_column:0)+ie[ie.length-je.length].length-je[0].length:this.yylloc.first_column-Ne},this.options.ranges&&(this.yylloc.range=[li[0],li[0]+this.yyleng-Ne]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(Ce){this.unput(this.match.slice(Ce))},"less"),pastInput:s(function(){var Ce=this.matched.substr(0,this.matched.length-this.match.length);return(Ce.length>20?"...":"")+Ce.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Ce=this.match;return Ce.length<20&&(Ce+=this._input.substr(0,20-Ce.length)),(Ce.substr(0,20)+(Ce.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Ce=this.pastInput(),Ne=new Array(Ce.length+1).join("-");return Ce+this.upcomingInput()+`
+`+Ne+"^"},"showPosition"),test_match:s(function(Ce,Ne){var je,ie,li;if(this.options.backtrack_lexer&&(li={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&&(li.yylloc.range=this.yylloc.range.slice(0))),ie=Ce[0].match(/(?:\r\n?|\n).*/g),ie&&(this.yylineno+=ie.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ie?ie[ie.length-1].length-ie[ie.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ce[0].length},this.yytext+=Ce[0],this.match+=Ce[0],this.matches=Ce,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(Ce[0].length),this.matched+=Ce[0],je=this.performAction.call(this,this.yy,this,Ne,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),je)return je;if(this._backtrack){for(var Z in li)this[Z]=li[Z];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ce,Ne,je,ie;this._more||(this.yytext="",this.match="");for(var li=this._currentRules(),Z=0;ZNe[0].length)){if(Ne=je,ie=Z,this.options.backtrack_lexer){if(Ce=this.test_match(je,li[Z]),Ce!==!1)return Ce;if(this._backtrack){Ne=!1;continue}else return!1}else if(!this.options.flex)break}return Ne?(Ce=this.test_match(Ne,li[ie]),Ce!==!1?Ce:!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:s(function(){var Ne=this.next();return Ne||this.lex()},"lex"),begin:s(function(Ne){this.conditionStack.push(Ne)},"begin"),popState:s(function(){var Ne=this.conditionStack.length-1;return Ne>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(Ne){return Ne=this.conditionStack.length-1-Math.abs(Ne||0),Ne>=0?this.conditionStack[Ne]:"INITIAL"},"topState"),pushState:s(function(Ne){this.begin(Ne)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(Ne,je,ie,li){var Z=li;switch(ie){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"),je.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let jh=/\n\s*/g;return je.yytext=je.yytext.replace(jh," "),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:return Ne.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return Ne.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return Ne.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;break;case 45:return this.popState(),14;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 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:return 111;case 63:return 46;case 64:return 60;case 65:return 44;case 66:return 8;case 67:return 106;case 68:return 115;case 69:return this.popState(),77;break;case 70:return this.pushState("edgeText"),75;break;case 71:return 119;case 72:return this.popState(),77;break;case 73:return this.pushState("thickEdgeText"),75;break;case 74:return 119;case 75:return this.popState(),77;break;case 76:return this.pushState("dottedEdgeText"),75;break;case 77:return 119;case 78:return 77;case 79:return this.popState(),53;break;case 80:return"TEXT";case 81:return this.pushState("ellipseText"),52;break;case 82:return this.popState(),55;break;case 83:return this.pushState("text"),54;break;case 84:return this.popState(),57;break;case 85:return this.pushState("text"),56;break;case 86:return 58;case 87:return this.pushState("text"),67;break;case 88:return this.popState(),64;break;case 89:return this.pushState("text"),63;break;case 90:return this.popState(),49;break;case 91:return this.pushState("text"),48;break;case 92:return this.popState(),69;break;case 93:return this.popState(),71;break;case 94:return 117;case 95:return this.pushState("trapText"),68;break;case 96:return this.pushState("trapText"),70;break;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 102:return 115;case 103:return 111;case 104:return 44;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;break;case 109:return this.pushState("text"),62;break;case 110:return this.popState(),51;break;case 111:return this.pushState("text"),50;break;case 112:return this.popState(),31;break;case 113:return this.pushState("text"),29;break;case 114:return this.popState(),66;break;case 115:return this.pushState("text"),65;break;case 116:return"TEXT";case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120: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)/,/^(?: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,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],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,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}};return oi})();da.lexer=ou;function qh(){this.yy={}}return s(qh,"Parser"),qh.prototype=da,da.Parser=qh,new qh})();P6.parser=P6;$6=P6});var dit,fit,pit=b(()=>{"use strict";hit();dit=Object.assign({},$6);dit.parse=e=>{let t=e.replace(/}\s*\n/g,`}
+`);return $6.parse(t)};fit=dit});var Pl,Gm=b(()=>{"use strict";Pl=s(()=>`
+ /* Font Awesome icon styling - consolidated */
+ .label-icon {
+ display: inline-block;
+ height: 1em;
+ overflow: visible;
+ vertical-align: -0.125em;
+ }
+
+ .node .label-icon path {
+ fill: currentColor;
+ stroke: revert;
+ stroke-width: revert;
+ }
+`,"getIconStyles")});var oMt,lMt,mit,git=b(()=>{"use strict";hn();Gm();oMt=s((e,t)=>{let r=Xh,i=r(e,"r"),n=r(e,"g"),a=r(e,"b");return qi(i,n,a,t)},"fade"),lMt=s(e=>`.label {
+ font-family: ${e.fontFamily};
+ color: ${e.nodeTextColor||e.textColor};
+ }
+ .cluster-label text {
+ fill: ${e.titleColor};
+ }
+ .cluster-label span {
+ color: ${e.titleColor};
+ }
+ .cluster-label span p {
+ background-color: transparent;
+ }
+
+ .label text,span {
+ fill: ${e.nodeTextColor||e.textColor};
+ color: ${e.nodeTextColor||e.textColor};
+ }
+
+ .node rect,
+ .node circle,
+ .node ellipse,
+ .node polygon,
+ .node path {
+ fill: ${e.mainBkg};
+ stroke: ${e.nodeBorder};
+ stroke-width: ${e.strokeWidth??1}px;
+ }
+ .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
+ text-anchor: middle;
+ }
+ // .flowchart-label .text-outer-tspan {
+ // text-anchor: middle;
+ // }
+ // .flowchart-label .text-inner-tspan {
+ // text-anchor: start;
+ // }
+
+ .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: ${e.lineColor} !important;
+ stroke-width: 0;
+ stroke: ${e.lineColor};
+ }
+
+ .arrowheadPath {
+ fill: ${e.arrowheadColor};
+ }
+
+ .edgePath .path {
+ stroke: ${e.lineColor};
+ stroke-width: ${e.strokeWidth??2}px;
+ }
+
+ .flowchart-link {
+ stroke: ${e.lineColor};
+ fill: none;
+ }
+
+ .edgeLabel {
+ background-color: ${e.edgeLabelBackground};
+ p {
+ background-color: ${e.edgeLabelBackground};
+ }
+ rect {
+ opacity: 0.5;
+ background-color: ${e.edgeLabelBackground};
+ fill: ${e.edgeLabelBackground};
+ }
+ text-align: center;
+ }
+
+ /* For html labels only */
+ .labelBkg {
+ background-color: ${oMt(e.edgeLabelBackground,.5)};
+ // background-color:
+ }
+
+ .cluster rect {
+ fill: ${e.clusterBkg};
+ stroke: ${e.clusterBorder};
+ stroke-width: 1px;
+ }
+
+ .cluster text {
+ fill: ${e.titleColor};
+ }
+
+ .cluster span {
+ color: ${e.titleColor};
+ }
+ /* .cluster div {
+ color: ${e.titleColor};
+ } */
+
+ div.mermaidTooltip {
+ position: absolute;
+ text-align: center;
+ max-width: 200px;
+ padding: 2px;
+ font-family: ${e.fontFamily};
+ font-size: 12px;
+ background: ${e.tertiaryColor};
+ border: 1px solid ${e.border2};
+ border-radius: 2px;
+ pointer-events: none;
+ z-index: 100;
+ }
+
+ .flowchartTitleText {
+ text-anchor: middle;
+ font-size: 18px;
+ fill: ${e.textColor};
+ }
+
+ rect.text {
+ fill: none;
+ stroke-width: 0;
+ }
+
+ .icon-shape, .image-shape {
+ background-color: ${e.edgeLabelBackground};
+ p {
+ background-color: ${e.edgeLabelBackground};
+ padding: 2px;
+ }
+ .label rect {
+ opacity: 0.5;
+ background-color: ${e.edgeLabelBackground};
+ fill: ${e.edgeLabelBackground};
+ }
+ text-align: center;
+ }
+ ${Pl()}
+`,"getStyles"),mit=lMt});var F6={};Fe(F6,{diagram:()=>cMt});var cMt,V6=b(()=>{"use strict";ye();dQ();uit();pit();git();cMt={parser:fit,get db(){return new uC},renderer:cit,styles:mit,init:s(e=>{e.flowchart||(e.flowchart={}),e.layout&&s1({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,s1({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}});var z6,Tit,Cit=b(()=>{"use strict";z6=(function(){var e=s(function(yt,Et,Ct,Bt){for(Ct=Ct||{},Bt=yt.length;Bt--;Ct[yt[Bt]]=Et);return Ct},"o"),t=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],n=[1,12],a=[1,13],o=[1,23],l=[1,24],u=[1,25],h=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],g=[1,20],y=[1,18],x=[1,21],k=[1,22],T=[1,36],C=[1,37],_=[1,38],S=[1,39],w=[1,40],A=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],v=[1,45],M=[1,46],$=[1,55],I=[40,48,50,51,52,70,71],F=[1,66],B=[1,64],O=[1,61],R=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],E=[65,66,67,68,69],D=[1,84],V=[1,83],L=[1,81],q=[1,82],H=[6,10,42,47],K=[6,10,13,41,42,47,48,49],U=[1,92],st=[1,91],X=[1,90],ut=[19,58],ot=[1,101],mt=[1,100],ht=[19,58,60,62],it={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:s(function(Et,Ct,Bt,Lt,ee,at,$e){var pt=at.length-1;switch(ee){case 1:break;case 2:this.$=[];break;case 3:at[pt-1].push(at[pt]),this.$=at[pt-1];break;case 4:case 5:this.$=at[pt];break;case 6:case 7:this.$=[];break;case 8:Lt.addEntity(at[pt-4]),Lt.addEntity(at[pt-2]),Lt.addRelationship(at[pt-4],at[pt],at[pt-2],at[pt-3]);break;case 9:Lt.addEntity(at[pt-8]),Lt.addEntity(at[pt-4]),Lt.addRelationship(at[pt-8],at[pt],at[pt-4],at[pt-5]),Lt.setClass([at[pt-8]],at[pt-6]),Lt.setClass([at[pt-4]],at[pt-2]);break;case 10:Lt.addEntity(at[pt-6]),Lt.addEntity(at[pt-2]),Lt.addRelationship(at[pt-6],at[pt],at[pt-2],at[pt-3]),Lt.setClass([at[pt-6]],at[pt-4]);break;case 11:Lt.addEntity(at[pt-6]),Lt.addEntity(at[pt-4]),Lt.addRelationship(at[pt-6],at[pt],at[pt-4],at[pt-5]),Lt.setClass([at[pt-4]],at[pt-2]);break;case 12:Lt.addEntity(at[pt-3]),Lt.addAttributes(at[pt-3],at[pt-1]);break;case 13:Lt.addEntity(at[pt-5]),Lt.addAttributes(at[pt-5],at[pt-1]),Lt.setClass([at[pt-5]],at[pt-3]);break;case 14:Lt.addEntity(at[pt-2]);break;case 15:Lt.addEntity(at[pt-4]),Lt.setClass([at[pt-4]],at[pt-2]);break;case 16:Lt.addEntity(at[pt]);break;case 17:Lt.addEntity(at[pt-2]),Lt.setClass([at[pt-2]],at[pt]);break;case 18:Lt.addEntity(at[pt-6],at[pt-4]),Lt.addAttributes(at[pt-6],at[pt-1]);break;case 19:Lt.addEntity(at[pt-8],at[pt-6]),Lt.addAttributes(at[pt-8],at[pt-1]),Lt.setClass([at[pt-8]],at[pt-3]);break;case 20:Lt.addEntity(at[pt-5],at[pt-3]);break;case 21:Lt.addEntity(at[pt-7],at[pt-5]),Lt.setClass([at[pt-7]],at[pt-2]);break;case 22:Lt.addEntity(at[pt-3],at[pt-1]);break;case 23:Lt.addEntity(at[pt-5],at[pt-3]),Lt.setClass([at[pt-5]],at[pt]);break;case 24:case 25:this.$=at[pt].trim(),Lt.setAccTitle(this.$);break;case 26:case 27:this.$=at[pt].trim(),Lt.setAccDescription(this.$);break;case 32:Lt.setDirection("TB");break;case 33:Lt.setDirection("BT");break;case 34:Lt.setDirection("RL");break;case 35:Lt.setDirection("LR");break;case 36:this.$=at[pt-3],Lt.addClass(at[pt-2],at[pt-1]);break;case 37:case 38:case 59:case 67:this.$=[at[pt]];break;case 39:case 40:this.$=at[pt-2].concat([at[pt]]);break;case 41:this.$=at[pt-2],Lt.setClass(at[pt-1],at[pt]);break;case 42:this.$=at[pt-3],Lt.addCssStyles(at[pt-2],at[pt-1]);break;case 43:this.$=[at[pt]];break;case 44:at[pt-2].push(at[pt]),this.$=at[pt-2];break;case 46:this.$=at[pt-1]+at[pt];break;case 54:case 79:case 80:this.$=at[pt].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=at[pt];break;case 60:at[pt].push(at[pt-1]),this.$=at[pt];break;case 61:this.$={type:at[pt-1],name:at[pt]};break;case 62:this.$={type:at[pt-2],name:at[pt-1],keys:at[pt]};break;case 63:this.$={type:at[pt-2],name:at[pt-1],comment:at[pt]};break;case 64:this.$={type:at[pt-3],name:at[pt-2],keys:at[pt-1],comment:at[pt]};break;case 65:case 66:case 69:this.$=at[pt];break;case 68:at[pt-2].push(at[pt]),this.$=at[pt-2];break;case 70:this.$=at[pt].replace(/"/g,"");break;case 71:this.$={cardA:at[pt],relType:at[pt-1],cardB:at[pt-2]};break;case 72:this.$=Lt.Cardinality.ZERO_OR_ONE;break;case 73:this.$=Lt.Cardinality.ZERO_OR_MORE;break;case 74:this.$=Lt.Cardinality.ONE_OR_MORE;break;case 75:this.$=Lt.Cardinality.ONLY_ONE;break;case 76:this.$=Lt.Cardinality.MD_PARENT;break;case 77:this.$=Lt.Identification.NON_IDENTIFYING;break;case 78:this.$=Lt.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:n,28:a,29:14,30:15,31:16,32:17,33:o,34:l,35:u,36:h,37:d,40:f,43:p,44:m,48:g,50:y,51:x,52:k},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:30,11:9,22:r,24:i,26:n,28:a,29:14,30:15,31:16,32:17,33:o,34:l,35:u,36:h,37:d,40:f,43:p,44:m,48:g,50:y,51:x,52:k},e(t,[2,5]),e(t,[2,6]),e(t,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:T,66:C,67:_,68:S,69:w}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(t,[2,27]),e(t,[2,28]),e(t,[2,29]),e(t,[2,30]),e(t,[2,31]),e(A,[2,54]),e(A,[2,55]),e(A,[2,56]),e(A,[2,57]),e(A,[2,58]),e(t,[2,32]),e(t,[2,33]),e(t,[2,34]),e(t,[2,35]),{16:44,40:v,41:M},{16:47,40:v,41:M},{16:48,40:v,41:M},e(t,[2,4]),{11:49,40:f,48:g,50:y,51:x,52:k},{16:50,40:v,41:M},{18:51,19:[1,52],53:53,54:54,58:$},{11:56,40:f,48:g,50:y,51:x,52:k},{64:57,70:[1,58],71:[1,59]},e(I,[2,72]),e(I,[2,73]),e(I,[2,74]),e(I,[2,75]),e(I,[2,76]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),{13:F,38:60,41:B,42:O,45:62,46:63,48:R,49:N},e(P,[2,37]),e(P,[2,38]),{16:68,40:v,41:M,42:O},{13:F,38:69,41:B,42:O,45:62,46:63,48:R,49:N},{13:[1,70],15:[1,71]},e(t,[2,17],{63:35,12:72,17:[1,73],42:O,65:T,66:C,67:_,68:S,69:w}),{19:[1,74]},e(t,[2,14]),{18:75,19:[2,59],53:53,54:54,58:$},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:T,66:C,67:_,68:S,69:w},e(E,[2,77]),e(E,[2,78]),{6:D,10:V,39:80,42:L,47:q},{40:[1,85],41:[1,86]},e(H,[2,43],{46:87,13:F,41:B,48:R,49:N}),e(K,[2,45]),e(K,[2,50]),e(K,[2,51]),e(K,[2,52]),e(K,[2,53]),e(t,[2,41],{42:O}),{6:D,10:V,39:88,42:L,47:q},{14:89,40:U,50:st,72:X},{16:93,40:v,41:M},{11:94,40:f,48:g,50:y,51:x,52:k},{18:95,19:[1,96],53:53,54:54,58:$},e(t,[2,12]),{19:[2,60]},e(ut,[2,61],{56:97,57:98,59:99,61:ot,62:mt}),e([19,58,61,62],[2,66]),e(t,[2,22],{15:[1,103],17:[1,102]}),e([40,48,50,51,52],[2,71]),e(t,[2,36]),{13:F,41:B,45:104,46:63,48:R,49:N},e(t,[2,47]),e(t,[2,48]),e(t,[2,49]),e(P,[2,39]),e(P,[2,40]),e(K,[2,46]),e(t,[2,42]),e(t,[2,8]),e(t,[2,79]),e(t,[2,80]),e(t,[2,81]),{13:[1,105],42:O},{13:[1,107],15:[1,106]},{19:[1,108]},e(t,[2,15]),e(ut,[2,62],{57:109,60:[1,110],62:mt}),e(ut,[2,63]),e(ht,[2,67]),e(ut,[2,70]),e(ht,[2,69]),{18:111,19:[1,112],53:53,54:54,58:$},{16:113,40:v,41:M},e(H,[2,44],{46:87,13:F,41:B,48:R,49:N}),{14:114,40:U,50:st,72:X},{16:115,40:v,41:M},{14:116,40:U,50:st,72:X},e(t,[2,13]),e(ut,[2,64]),{59:117,61:ot},{19:[1,118]},e(t,[2,20]),e(t,[2,23],{17:[1,119],42:O}),e(t,[2,11]),{13:[1,120],42:O},e(t,[2,10]),e(ht,[2,68]),e(t,[2,18]),{18:121,19:[1,122],53:53,54:54,58:$},{14:123,40:U,50:st,72:X},{19:[1,124]},e(t,[2,21]),e(t,[2,9]),e(t,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:s(function(Et,Ct){if(Ct.recoverable)this.trace(Et);else{var Bt=new Error(Et);throw Bt.hash=Ct,Bt}},"parseError"),parse:s(function(Et){var Ct=this,Bt=[0],Lt=[],ee=[null],at=[],$e=this.table,pt="",Wt=0,Ht=0,Dt=0,bt=2,Gt=1,G=at.slice.call(arguments,1),nt=Object.create(this.lexer),W={yy:{}};for(var Rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Rt)&&(W.yy[Rt]=this.yy[Rt]);nt.setInput(Et,W.yy),W.yy.lexer=nt,W.yy.parser=this,typeof nt.yylloc>"u"&&(nt.yylloc={});var Y=nt.yylloc;at.push(Y);var At=nt.options&&nt.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function xt(Sr){Bt.length=Bt.length-2*Sr,ee.length=ee.length-Sr,at.length=at.length-Sr}s(xt,"popStack");function Zt(){var Sr;return Sr=Lt.pop()||nt.lex()||Gt,typeof Sr!="number"&&(Sr instanceof Array&&(Lt=Sr,Sr=Lt.pop()),Sr=Ct.symbols_[Sr]||Sr),Sr}s(Zt,"lex");for(var Nt,wt,he,gt,te,ne,It={},ke,J,Xe,rt;;){if(he=Bt[Bt.length-1],this.defaultActions[he]?gt=this.defaultActions[he]:((Nt===null||typeof Nt>"u")&&(Nt=Zt()),gt=$e[he]&&$e[he][Nt]),typeof gt>"u"||!gt.length||!gt[0]){var or="";rt=[];for(ke in $e[he])this.terminals_[ke]&&ke>bt&&rt.push("'"+this.terminals_[ke]+"'");nt.showPosition?or="Parse error on line "+(Wt+1)+`:
+`+nt.showPosition()+`
+Expecting `+rt.join(", ")+", got '"+(this.terminals_[Nt]||Nt)+"'":or="Parse error on line "+(Wt+1)+": Unexpected "+(Nt==Gt?"end of input":"'"+(this.terminals_[Nt]||Nt)+"'"),this.parseError(or,{text:nt.match,token:this.terminals_[Nt]||Nt,line:nt.yylineno,loc:Y,expected:rt})}if(gt[0]instanceof Array&>.length>1)throw new Error("Parse Error: multiple actions possible at state: "+he+", token: "+Nt);switch(gt[0]){case 1:Bt.push(Nt),ee.push(nt.yytext),at.push(nt.yylloc),Bt.push(gt[1]),Nt=null,wt?(Nt=wt,wt=null):(Ht=nt.yyleng,pt=nt.yytext,Wt=nt.yylineno,Y=nt.yylloc,Dt>0&&Dt--);break;case 2:if(J=this.productions_[gt[1]][1],It.$=ee[ee.length-J],It._$={first_line:at[at.length-(J||1)].first_line,last_line:at[at.length-1].last_line,first_column:at[at.length-(J||1)].first_column,last_column:at[at.length-1].last_column},At&&(It._$.range=[at[at.length-(J||1)].range[0],at[at.length-1].range[1]]),ne=this.performAction.apply(It,[pt,Ht,Wt,W.yy,gt[1],ee,at].concat(G)),typeof ne<"u")return ne;J&&(Bt=Bt.slice(0,-1*J*2),ee=ee.slice(0,-1*J),at=at.slice(0,-1*J)),Bt.push(this.productions_[gt[1]][0]),ee.push(It.$),at.push(It._$),Xe=$e[Bt[Bt.length-2]][Bt[Bt.length-1]],Bt.push(Xe);break;case 3:return!0}}return!0},"parse")},Ot=(function(){var yt={EOF:1,parseError:s(function(Ct,Bt){if(this.yy.parser)this.yy.parser.parseError(Ct,Bt);else throw new Error(Ct)},"parseError"),setInput:s(function(Et,Ct){return this.yy=Ct||this.yy||{},this._input=Et,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:s(function(){var Et=this._input[0];this.yytext+=Et,this.yyleng++,this.offset++,this.match+=Et,this.matched+=Et;var Ct=Et.match(/(?:\r\n?|\n).*/g);return Ct?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Et},"input"),unput:s(function(Et){var Ct=Et.length,Bt=Et.split(/(?:\r\n?|\n)/g);this._input=Et+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ct),this.offset-=Ct;var Lt=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),Bt.length-1&&(this.yylineno-=Bt.length-1);var ee=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:Bt?(Bt.length===Lt.length?this.yylloc.first_column:0)+Lt[Lt.length-Bt.length].length-Bt[0].length:this.yylloc.first_column-Ct},this.options.ranges&&(this.yylloc.range=[ee[0],ee[0]+this.yyleng-Ct]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(Et){this.unput(this.match.slice(Et))},"less"),pastInput:s(function(){var Et=this.matched.substr(0,this.matched.length-this.match.length);return(Et.length>20?"...":"")+Et.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Et=this.match;return Et.length<20&&(Et+=this._input.substr(0,20-Et.length)),(Et.substr(0,20)+(Et.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Et=this.pastInput(),Ct=new Array(Et.length+1).join("-");return Et+this.upcomingInput()+`
+`+Ct+"^"},"showPosition"),test_match:s(function(Et,Ct){var Bt,Lt,ee;if(this.options.backtrack_lexer&&(ee={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&&(ee.yylloc.range=this.yylloc.range.slice(0))),Lt=Et[0].match(/(?:\r\n?|\n).*/g),Lt&&(this.yylineno+=Lt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Lt?Lt[Lt.length-1].length-Lt[Lt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Et[0].length},this.yytext+=Et[0],this.match+=Et[0],this.matches=Et,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(Et[0].length),this.matched+=Et[0],Bt=this.performAction.call(this,this.yy,this,Ct,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Bt)return Bt;if(this._backtrack){for(var at in ee)this[at]=ee[at];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Et,Ct,Bt,Lt;this._more||(this.yytext="",this.match="");for(var ee=this._currentRules(),at=0;atCt[0].length)){if(Ct=Bt,Lt=at,this.options.backtrack_lexer){if(Et=this.test_match(Bt,ee[at]),Et!==!1)return Et;if(this._backtrack){Ct=!1;continue}else return!1}else if(!this.options.flex)break}return Ct?(Et=this.test_match(Ct,ee[Lt]),Et!==!1?Et:!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:s(function(){var Ct=this.next();return Ct||this.lex()},"lex"),begin:s(function(Ct){this.conditionStack.push(Ct)},"begin"),popState:s(function(){var Ct=this.conditionStack.length-1;return Ct>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(Ct){return Ct=this.conditionStack.length-1-Math.abs(Ct||0),Ct>=0?this.conditionStack[Ct]:"INITIAL"},"topState"),pushState:s(function(Ct){this.begin(Ct)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(Ct,Bt,Lt,ee){var at=ee;switch(Lt){case 0:return this.begin("acc_title"),24;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),26;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 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 72;case 16:return 4;case 17:return this.begin("block"),17;break;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 61;case 25:return 58;case 26:return 58;case 27:return 62;case 28:break;case 29:return this.popState(),19;break;case 30:return Bt.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;break;case 34:return this.popState(),10;break;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;break;case 40:return 43;case 41:return 65;case 42:return 67;case 43:return 67;case 44:return 67;case 45:return 65;case 46:return 65;case 47:return 66;case 48:return 66;case 49:return 66;case 50:return 66;case 51:return 66;case 52:return 67;case 53:return 66;case 54:return 67;case 55:return 68;case 56:return 68;case 57:return 51;case 58:return 68;case 59:return 68;case 60:return 68;case 61:return 52;case 62:return 48;case 63:return 68;case 64:return 65;case 65:return 66;case 66:return 67;case 67:return 69;case 68:return 70;case 69:return 71;case 70:return 71;case 71:return 70;case 72:return 70;case 73:return 70;case 74:return 41;case 75:return 47;case 76:return 40;case 77:return Bt.yytext[0];case 78:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,74,75],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,76,77,78],inclusive:!0}}};return yt})();it.lexer=Ot;function St(){this.yy={}}return s(St,"Parser"),St.prototype=it,it.Parser=St,new St})();z6.parser=z6;Tit=z6});var _S,Sit=b(()=>{"use strict";Jt();ye();yi();Re();_S=class{constructor(){this.entities=new Map;this.relationships=[];this.classes=new Map;this.direction="TB";this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"};this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"};this.setAccTitle=Ye;this.getAccTitle=Ze;this.setAccDescription=Je;this.getAccDescription=tr;this.setDiagramTitle=sr;this.getDiagramTitle=er;this.getConfig=s(()=>Q().er,"getConfig");this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{s(this,"ErDB")}addEntity(t,r=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&r&&(this.entities.get(t).alias=r,z.info(`Add alias '${r}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:r,shape:"erBox",look:Q().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),z.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,r){let i=this.addEntity(t),n;for(n=r.length-1;n>=0;n--)r[n].keys||(r[n].keys=[]),r[n].comment||(r[n].comment=""),i.attributes.push(r[n]),z.debug("Added attribute ",r[n].name)}addRelationship(t,r,i,n){let a=this.entities.get(t),o=this.entities.get(i);if(!a||!o)return;let l={entityA:a.id,roleA:r,entityB:o.id,relSpec:n};this.relationships.push(l),z.debug("Added new relationship :",l)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let r=[];for(let i of t){let n=this.classes.get(i);n?.styles&&(r=[...r,...n.styles??[]].map(a=>a.trim())),n?.textStyles&&(r=[...r,...n.textStyles??[]].map(a=>a.trim()))}return r}addCssStyles(t,r){for(let i of t){let n=this.entities.get(i);if(!r||!n)return;for(let a of r)n.cssStyles.push(a)}}addClass(t,r){t.forEach(i=>{let n=this.classes.get(i);n===void 0&&(n={id:i,styles:[],textStyles:[]},this.classes.set(i,n)),r&&r.forEach(function(a){if(/color/.exec(a)){let o=a.replace("fill","bgFill");n.textStyles.push(o)}n.styles.push(a)})})}setClass(t,r){for(let i of t){let n=this.entities.get(i);if(n)for(let a of r)n.cssClasses+=" "+a}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],He()}getData(){let t=[],r=[],i=Q(),n=0;for(let o of this.entities.keys()){let l=this.entities.get(o);l&&(l.cssCompiledStyles=this.getCompiledStyles(l.cssClasses.split(" ")),l.colorIndex=n++,t.push(l))}let a=0;for(let o of this.relationships){let l={id:Nu(o.entityA,o.entityB,{prefix:"id",counter:a++}),type:"normal",curve:"basis",start:o.entityA,end:o.entityB,label:o.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:o.relSpec.cardB.toLowerCase(),arrowTypeEnd:o.relSpec.cardA.toLowerCase(),pattern:o.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:i.look,labelType:"markdown"};r.push(l)}return{nodes:t,edges:r,other:{},config:i,direction:"TB"}}}});var G6={};Fe(G6,{draw:()=>gMt});var gMt,wit=b(()=>{"use strict";ye();Jt();bm();Yd();Xd();Re();lr();gMt=s(async function(e,t,r,i){z.info("REF0:"),z.info("Drawing er diagram (unified)",t);let{securityLevel:n,er:a,layout:o}=Q(),l=i.db.getData(),u=vl(t,n);l.type=i.type,l.layoutAlgorithm=Zu(o),l.config.flowchart.nodeSpacing=a?.nodeSpacing||140,l.config.flowchart.rankSpacing=a?.rankSpacing||80,l.direction=i.db.getDirection();let{config:h}=l,{look:d}=h;d==="neo"?l.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:l.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],l.diagramId=t,await Bl(l,u),l.layoutAlgorithm==="elk"&&u.select(".edges").lower();let f=u.selectAll('[id*="-background"]');Array.from(f).length>0&&f.each(function(){let m=vt(this),y=m.attr("id").replace("-background",""),x=u.select(`#${CSS.escape(y)}`);if(!x.empty()){let k=x.attr("transform");m.attr("transform",k)}});let p=8;Te.insertTitle(u,"erDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),ro(u,p,"erDiagram",a?.useMaxWidth??!0)},"draw")});var _it,ES,yMt,xMt,Eit,vit=b(()=>{"use strict";hn();_it=s((e,t)=>{let r=Xh,i=r(e,"r"),n=r(e,"g"),a=r(e,"b");return qi(i,n,a,t)},"fade"),ES=new Set(["redux-color","redux-dark-color"]),yMt=s(e=>{let{theme:t,look:r,bkgColorArray:i,borderColorArray:n}=e;if(!ES.has(t))return"";let a=i?.length>0,o="";for(let l=0;l{let{look:t,theme:r,erEdgeLabelBackground:i,strokeWidth:n}=e;return`
+ ${yMt(e)}
+ .entityBox {
+ fill: ${e.mainBkg};
+ stroke: ${e.nodeBorder};
+ }
+
+ .relationshipLabelBox {
+ fill: ${e.tertiaryColor};
+ opacity: 0.7;
+ background-color: ${e.tertiaryColor};
+ rect {
+ opacity: 0.5;
+ }
+ }
+
+ .labelBkg {
+ background-color: ${ES.has(r)&&i?i:_it(e.tertiaryColor,.5)};
+ }
+
+ .edgeLabel {
+ background-color: ${ES.has(r)&&i?i:e.edgeLabelBackground};
+ }
+ .edgeLabel .label rect {
+ fill: ${ES.has(r)&&i?i:e.edgeLabelBackground};
+ }
+ .edgeLabel .label text {
+ fill: ${e.textColor};
+ }
+
+ .edgeLabel .label {
+ fill: ${e.nodeBorder};
+ font-size: 14px;
+ }
+
+ .label {
+ font-family: ${e.fontFamily};
+ color: ${e.nodeTextColor||e.textColor};
+ }
+
+ .edge-pattern-dashed {
+ stroke-dasharray: 8,8;
+ }
+
+ .node rect,
+ .node circle,
+ .node ellipse,
+ .node polygon
+ {
+ fill: ${e.mainBkg};
+ stroke: ${e.nodeBorder};
+ stroke-width: ${t==="neo"?n:"1px"};
+ }
+
+ .relationshipLine {
+ stroke: ${e.lineColor};
+ stroke-width: ${t==="neo"?n:"1px"};
+ fill: none;
+ }
+
+ .marker {
+ fill: none !important;
+ stroke: ${e.lineColor} !important;
+ stroke-width: 1;
+ }
+ [data-look=neo].labelBkg {
+ background-color: ${_it(e.tertiaryColor,.5)};
+ }
+`},"getStyles"),Eit=xMt});var Ait={};Fe(Ait,{diagram:()=>bMt});var bMt,Rit=b(()=>{"use strict";Cit();Sit();wit();vit();bMt={parser:Tit,get db(){return new _S},renderer:G6,styles:Eit}});function Mi(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}function pn(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"ref"in e}function Sa(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"items"in e}function W6(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}function Qd(e){return typeof e=="object"&&e!==null&&typeof e.info=="object"&&typeof e.message=="string"}function zo(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}function Ju(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}function Y0(e){return zo(e)&&typeof e.fullText=="string"}var Kd,Go=b(()=>{"use strict";s(Mi,"isAstNode");s(pn,"isReference");s(Sa,"isMultiReference");s(W6,"isAstNodeDescription");s(Qd,"isLinkingError");Kd=class{static{s(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(t){let r=this.types[t.container.$type];if(!r)throw new Error(`Type ${t.container.$type||"undefined"} not found.`);let i=r.properties[t.property]?.referenceType;if(!i)throw new Error(`Property ${t.property||"undefined"} of type ${t.container.$type} is not a reference.`);return i}getTypeMetaData(t){let r=this.types[t];return r||{name:t,properties:{},superTypes:[]}}isInstance(t,r){return Mi(t)&&this.isSubtype(t.$type,r)}isSubtype(t,r){if(t===r)return!0;let i=this.subtypes[t];i||(i=this.subtypes[t]={});let n=i[r];if(n!==void 0)return n;{let a=this.types[t],o=a?a.superTypes.some(l=>this.isSubtype(l,r)):!1;return i[r]=o,o}}getAllSubTypes(t){let r=this.allSubtypes[t];if(r)return r;{let i=this.getAllTypes(),n=[];for(let a of i)this.isSubtype(a,t)&&n.push(a);return this.allSubtypes[t]=n,n}}};s(zo,"isCompositeCstNode");s(Ju,"isLeafCstNode");s(Y0,"isRootCstNode")});function wMt(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}function vS(e){return!!e&&typeof e[Symbol.iterator]=="function"}function mr(...e){if(e.length===1){let t=e[0];if(t instanceof wa)return t;if(vS(t))return new wa(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new wa(()=>({index:0}),r=>r.index