diff --git a/assets/lib/mermaid/mermaid.min.js b/assets/lib/mermaid/mermaid.min.js index 5040706e..e232f04d 100644 --- a/assets/lib/mermaid/mermaid.min.js +++ b/assets/lib/mermaid/mermaid.min.js @@ -73,13 +73,13 @@ `)},up=function(){return q1t},Kb=function(i){lW=H1t(i)},O2=function(){return lW},uIt=Object.freeze(Object.defineProperty({__proto__:null,clear:cg,default:{getAccTitle:op,setAccTitle:ug,getDiagramTitle:O2,setDiagramTitle:Kb,getAccDescription:up,setAccDescription:cp,clear:cg},getAccDescription:up,getAccTitle:op,getDiagramTitle:O2,setAccDescription:cp,setAccTitle:ug,setDiagramTitle:Kb},Symbol.toStringTag,{value:"Module"}));let J9={};const V1t=function(i,a,f,p){zt.debug("parseDirective is being called",a,f,p);try{if(a!==void 0)switch(a=a.trim(),f){case"open_directive":J9={};break;case"type_directive":if(!J9)throw new Error("currentDirective is undefined");J9.type=a.toLowerCase();break;case"arg_directive":if(!J9)throw new Error("currentDirective is undefined");J9.args=JSON.parse(a);break;case"close_directive":s_e(i,J9,p),J9=void 0;break}}catch(v){zt.error(`Error while rendering sequenceDiagram directive: ${a} jison context: ${f}`),zt.error(v.message)}},s_e=function(i,a,f){switch(zt.info(`Directive type=${a.type} with args:`,a.args),a.type){case"init":case"initialize":{["config"].forEach(p=>{a.args[p]!==void 0&&(f==="flowchart-v2"&&(f="flowchart"),a.args[f]=a.args[p],delete a.args[p])}),zt.info("sanitize in handleDirective",a.args),jA(a.args),zt.info("sanitize in handleDirective (done)",a.args),sIt(a.args);break}case"wrap":case"nowrap":i&&i.setWrap&&i.setWrap(a.type==="wrap");break;case"themeCss":zt.warn("themeCss encountered");break;default:zt.warn(`Unhandled directive: source: '%%{${a.type}: ${JSON.stringify(a.args?a.args:{})}}%%`,a);break}},a_e=zt,o_e=Aft,zN=Oe,c_e=i=>sg(i,zN()),lIt=Z9,u_e=()=>uIt,l_e=(i,a,f,p)=>V1t(i,a,f,p),hW={},fW=(i,a,f)=>{if(hW[i])throw new Error(`Diagram ${i} already registered.`);hW[i]=a,f&&dIt(i,f),r_e(i,a.styles),a.injectUtils&&a.injectUtils(a_e,o_e,zN,c_e,lIt,u_e(),l_e)},G1t=i=>{if(i in hW)return hW[i];throw new Error(`Diagram ${i} not found.`)};class hIt extends Error{constructor(a){super(a),this.name="UnknownDiagramError"}}const h_e=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,f_e=/\s*%%.*\n/gm,PA={},dW=function(i,a){i=i.replace(tIt,"").replace(h_e,"").replace(f_e,` `);for(const[f,{detector:p}]of Object.entries(PA))if(p(i,a))return f;throw new hIt(`No diagram type detected matching given configuration for text: ${i}`)},fIt=(...i)=>{for(const{id:a,detector:f,loader:p}of i)dIt(a,f,p)},d_e=async()=>{zt.debug("Loading registered diagrams");const a=(await Promise.allSettled(Object.entries(PA).map(async([f,{detector:p,loader:v}])=>{if(v)try{G1t(f)}catch{try{const{diagram:b,id:E}=await v();fW(E,b,p)}catch(b){throw zt.error(`Failed to load external diagram with key ${f}. Removing from detectors.`),delete PA[f],b}}}))).filter(f=>f.status==="rejected");if(a.length>0){zt.error(`Failed to load ${a.length} external diagrams`);for(const f of a)zt.error(f);throw new Error(`Failed to load ${a.length} external diagrams`)}},dIt=(i,a,f)=>{PA[i]?zt.error(`Detector with key ${i} already exists`):PA[i]={detector:a,loader:f},zt.debug(`Detector with key ${i} added${f?" with loader":""}`)},g_e=i=>PA[i].loader;var p_e=typeof global=="object"&&global&&global.Object===Object&&global;const gIt=p_e;var b_e=typeof self=="object"&&self&&self.Object===Object&&self,v_e=gIt||b_e||Function("return this")();const Xw=v_e;var w_e=Xw.Symbol;const Yb=w_e;var pIt=Object.prototype,m_e=pIt.hasOwnProperty,y_e=pIt.toString,qN=Yb?Yb.toStringTag:void 0;function x_e(i){var a=m_e.call(i,qN),f=i[qN];try{i[qN]=void 0;var p=!0}catch{}var v=y_e.call(i);return p&&(a?i[qN]=f:delete i[qN]),v}var k_e=Object.prototype,E_e=k_e.toString;function T_e(i){return E_e.call(i)}var __e="[object Null]",C_e="[object Undefined]",bIt=Yb?Yb.toStringTag:void 0;function tE(i){return i==null?i===void 0?C_e:__e:bIt&&bIt in Object(i)?x_e(i):T_e(i)}function N2(i){var a=typeof i;return i!=null&&(a=="object"||a=="function")}var S_e="[object AsyncFunction]",A_e="[object Function]",L_e="[object GeneratorFunction]",M_e="[object Proxy]";function FA(i){if(!N2(i))return!1;var a=tE(i);return a==A_e||a==L_e||a==S_e||a==M_e}var D_e=Xw["__core-js_shared__"];const U1t=D_e;var vIt=function(){var i=/[^.]+$/.exec(U1t&&U1t.keys&&U1t.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function I_e(i){return!!vIt&&vIt in i}var O_e=Function.prototype,N_e=O_e.toString;function eE(i){if(i!=null){try{return N_e.call(i)}catch{}try{return i+""}catch{}}return""}var P_e=/[\\^$.*+?()[\]{}|]/g,F_e=/^\[object .+?Constructor\]$/,B_e=Function.prototype,R_e=Object.prototype,j_e=B_e.toString,$_e=R_e.hasOwnProperty,z_e=RegExp("^"+j_e.call($_e).replace(P_e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function q_e(i){if(!N2(i)||I_e(i))return!1;var a=FA(i)?z_e:F_e;return a.test(eE(i))}function H_e(i,a){return i==null?void 0:i[a]}function nE(i,a){var f=H_e(i,a);return q_e(f)?f:void 0}var V_e=nE(Object,"create");const HN=V_e;function G_e(){this.__data__=HN?HN(null):{},this.size=0}function U_e(i){var a=this.has(i)&&delete this.__data__[i];return this.size-=a?1:0,a}var W_e="__lodash_hash_undefined__",K_e=Object.prototype,Y_e=K_e.hasOwnProperty;function X_e(i){var a=this.__data__;if(HN){var f=a[i];return f===W_e?void 0:f}return Y_e.call(a,i)?a[i]:void 0}var Q_e=Object.prototype,Z_e=Q_e.hasOwnProperty;function J_e(i){var a=this.__data__;return HN?a[i]!==void 0:Z_e.call(a,i)}var tCe="__lodash_hash_undefined__";function eCe(i,a){var f=this.__data__;return this.size+=this.has(i)?0:1,f[i]=HN&&a===void 0?tCe:a,this}function rE(i){var a=-1,f=i==null?0:i.length;for(this.clear();++a-1}function cCe(i,a){var f=this.__data__,p=gW(f,i);return p<0?(++this.size,f.push([i,a])):f[p][1]=a,this}function y5(i){var a=-1,f=i==null?0:i.length;for(this.clear();++am.args);jA(v),p=rd(p,[...v])}else p=f.args;if(p){let v=dW(i,a);["config"].forEach(m=>{p[m]!==void 0&&(v==="flowchart-v2"&&(v="flowchart"),p[v]=p[m],delete p[m])})}return p},wIt=function(i,a=null){try{const f=new RegExp(`[%]{2}(?![{]${wCe.source})(?=[}][%]{2}).* `,"ig");i=i.trim().replace(f,"").replace(/'/gm,'"'),zt.debug(`Detecting diagram directive${a!==null?" type:"+a:""} based on the text:${i}`);let p;const v=[];for(;(p=W1t.exec(i))!==null;)if(p.index===W1t.lastIndex&&W1t.lastIndex++,p&&!a||a&&p[1]&&p[1].match(a)||a&&p[2]&&p[2].match(a)){const m=p[1]?p[1]:p[2],b=p[3]?p[3].trim():p[4]?JSON.parse(p[4].trim()):null;v.push({type:m,args:b})}return v.length===0&&v.push({type:i,args:null}),v.length===1?v[0]:v}catch(f){return zt.error(`ERROR: ${f.message} - Unable to parse directive - ${a!==null?" type:"+a:""} based on the text:${i}`),{type:null,args:null}}},yCe=function(i,a){for(const[f,p]of a.entries())if(p.match(i))return f;return-1};function Xb(i,a){if(!i)return a;const f=`curve${i.charAt(0).toUpperCase()+i.slice(1)}`;return vCe[f]||a}function xCe(i,a){const f=i.trim();if(f)return a.securityLevel!=="loose"?Xx(f):f}const kCe=(i,...a)=>{const f=i.split("."),p=f.length-1,v=f[p];let m=window;for(let b=0;b{f+=bW(m,a),a=m});let p=f/2,v;return a=void 0,i.forEach(m=>{if(a&&!v){const b=bW(m,a);if(b=1&&(v={x:m.x,y:m.y}),E>0&&E<1&&(v={x:(1-E)*a.x+E*m.x,y:(1-E)*a.y+E*m.y})}}a=m}),v}function TCe(i){return i.length===1?i[0]:ECe(i)}const _Ce=(i,a,f)=>{let p;zt.info(`our points ${JSON.stringify(a)}`),a[0]!==f&&(a=a.reverse());let m=25,b;p=void 0,a.forEach(P=>{if(p&&!b){const B=bW(P,p);if(B=1&&(b={x:P.x,y:P.y}),j>0&&j<1&&(b={x:(1-j)*p.x+j*P.x,y:(1-j)*p.y+j*P.y})}}p=P});const E=i?10:5,C=Math.atan2(a[0].y-b.y,a[0].x-b.x),D={x:0,y:0};return D.x=Math.sin(C)*E+(a[0].x+b.x)/2,D.y=-Math.cos(C)*E+(a[0].y+b.y)/2,D};function CCe(i,a,f){let p=JSON.parse(JSON.stringify(f)),v;zt.info("our points",p),a!=="start_left"&&a!=="start_right"&&(p=p.reverse()),p.forEach(B=>{v=B});let b=25+i,E;v=void 0,p.forEach(B=>{if(v&&!E){const j=bW(B,v);if(j=1&&(E={x:B.x,y:B.y}),R>0&&R<1&&(E={x:(1-R)*v.x+R*B.x,y:(1-R)*v.y+R*B.y})}}v=B});const C=10+i*.5,D=Math.atan2(p[0].y-E.y,p[0].x-E.x),P={x:0,y:0};return P.x=Math.sin(D)*C+(p[0].x+E.x)/2,P.y=-Math.cos(D)*C+(p[0].y+E.y)/2,a==="start_left"&&(P.x=Math.sin(D+Math.PI)*C+(p[0].x+E.x)/2,P.y=-Math.cos(D+Math.PI)*C+(p[0].y+E.y)/2),a==="end_right"&&(P.x=Math.sin(D-Math.PI)*C+(p[0].x+E.x)/2-5,P.y=-Math.cos(D-Math.PI)*C+(p[0].y+E.y)/2-5),a==="end_left"&&(P.x=Math.sin(D)*C+(p[0].x+E.x)/2-5,P.y=-Math.cos(D)*C+(p[0].y+E.y)/2-5),P}function Qw(i){let a="",f="";for(const p of i)p!==void 0&&(p.startsWith("color:")||p.startsWith("text-align:")?f=f+p+";":a=a+p+";");return{style:a,labelStyle:f}}let mIt=0;const yIt=()=>(mIt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+mIt);function SCe(i){let a="";const f="0123456789abcdef",p=f.length;for(let v=0;vSCe(i.length),ACe=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},LCe=function(i,a){const f=a.text.replace(yi.lineBreakRegex," "),[,p]=$A(a.fontSize),v=i.append("text");v.attr("x",a.x),v.attr("y",a.y),v.style("text-anchor",a.anchor),v.style("font-family",a.fontFamily),v.style("font-size",p),v.style("font-weight",a.fontWeight),v.attr("fill",a.fill),a.class!==void 0&&v.attr("class",a.class);const m=v.append("tspan");return m.attr("x",a.x+a.textMargin*2),m.attr("fill",a.fill),m.text(f),v},kIt=RA((i,a,f)=>{if(!i||(f=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},f),yi.lineBreakRegex.test(i)))return i;const p=i.split(" "),v=[];let m="";return p.forEach((b,E)=>{const C=u3(`${b} `,f),D=u3(m,f);if(C>a){const{hyphenatedStrings:j,remainingWord:R}=MCe(b,a,"-",f);v.push(m,...j),m=R}else D+C>=a?(v.push(m),m=b):m=[m,b].filter(Boolean).join(" ");E+1===p.length&&v.push(m)}),v.filter(b=>b!=="").join(f.joinWith)},(i,a,f)=>`${i}${a}${f.fontSize}${f.fontWeight}${f.fontFamily}${f.joinWith}`),MCe=RA((i,a,f="-",p)=>{p=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},p);const v=[...i],m=[];let b="";return v.forEach((E,C)=>{const D=`${b}${E}`;if(u3(D,p)>=a){const B=C+1,j=v.length===B,R=`${D}${f}`;m.push(j?D:R),b=""}else b=D}),{hyphenatedStrings:m,remainingWord:b}},(i,a,f="-",p)=>`${i}${a}${f}${p.fontSize}${p.fontWeight}${p.fontFamily}`);function K1t(i,a){return a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},a),Y1t(i,a).height}function u3(i,a){return a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},a),Y1t(i,a).width}const Y1t=RA((i,a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},a);const{fontSize:f,fontFamily:p,fontWeight:v}=a;if(!i)return{width:0,height:0};const[,m]=$A(f),b=["sans-serif",p],E=i.split(yi.lineBreakRegex),C=[],D=Mr("body");if(!D.remove)return{width:0,height:0,lineHeight:0};const P=D.append("svg");for(const j of b){let R=0;const H={width:0,height:0,lineHeight:0};for(const X of E){const it=ACe();it.text=X;const nt=LCe(P,it).style("font-size",m).style("font-weight",v).style("font-family",j),st=(nt._groups||nt)[0][0].getBBox();if(st.width===0&&st.height===0)throw new Error("svg element not in render tree");H.width=Math.round(Math.max(H.width,st.width)),R=Math.round(st.height),H.height+=R,H.lineHeight=Math.round(Math.max(H.lineHeight,R))}C.push(H)}P.remove();const B=isNaN(C[1].height)||isNaN(C[1].width)||isNaN(C[1].lineHeight)||C[0].height>C[1].height&&C[0].width>C[1].width&&C[0].lineHeight>C[1].lineHeight?0:1;return C[B]},(i,a)=>`${i}${a.fontSize}${a.fontWeight}${a.fontFamily}`),DCe=class{constructor(a,f){this.deterministic=a,this.seed=f,this.count=f?f.length:0}next(){return this.deterministic?this.count++:Date.now()}};let vW;const ICe=function(i){return vW=vW||document.createElement("div"),i=escape(i).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),vW.innerHTML=i,unescape(vW.textContent)},jA=i=>{if(zt.debug("directiveSanitizer called with",i),typeof i=="object"&&(i.length?i.forEach(a=>jA(a)):Object.keys(i).forEach(a=>{zt.debug("Checking key",a),a.startsWith("__")&&(zt.debug("sanitize deleting __ option",a),delete i[a]),a.includes("proto")&&(zt.debug("sanitize deleting proto option",a),delete i[a]),a.includes("constr")&&(zt.debug("sanitize deleting constr option",a),delete i[a]),a.includes("themeCSS")&&(zt.debug("sanitizing themeCss option"),i[a]=wW(i[a])),a.includes("fontFamily")&&(zt.debug("sanitizing fontFamily option"),i[a]=wW(i[a])),a.includes("altFontFamily")&&(zt.debug("sanitizing altFontFamily option"),i[a]=wW(i[a])),sEe.includes(a)?typeof i[a]=="object"&&(zt.debug("sanitize deleting object",a),jA(i[a])):(zt.debug("sanitize deleting option",a),delete i[a])})),i.themeVariables){const a=Object.keys(i.themeVariables);for(const f of a){const p=i.themeVariables[f];p&&p.match&&!p.match(/^[\d "#%(),.;A-Za-z]+$/)&&(i.themeVariables[f]="")}}zt.debug("After sanitization",i)},wW=i=>{let a=0,f=0;for(const p of i){if(a{if(!p)return;const v=i.node().getBBox();i.append("text").text(p).attr("x",v.x+v.width/2).attr("y",-f).attr("class",a)},$A=i=>{if(typeof i=="number")return[i,i+"px"];const a=parseInt(i,10);return Number.isNaN(a)?[void 0,void 0]:i===String(a)?[a,i+"px"]:[a,i]},lo={assignWithDepth:rd,wrapLabel:kIt,calculateTextHeight:K1t,calculateTextWidth:u3,calculateTextDimensions:Y1t,detectInit:mCe,detectDirective:wIt,isSubstringInArray:yCe,interpolateToCurve:Xb,calcLabelPosition:TCe,calcCardinalityPosition:_Ce,calcTerminalLabelPosition:CCe,formatUrl:xCe,getStylesFromArray:Qw,generateId:yIt,random:xIt,runFunc:kCe,entityDecode:ICe,initIdGenerator:DCe,directiveSanitizer:jA,sanitizeCss:wW,insertTitle:NCe,parseFontSize:$A};var TIt="comm",_It="rule",CIt="decl",PCe="@import",FCe="@keyframes",BCe=Math.abs,X1t=String.fromCharCode;function SIt(i){return i.trim()}function Q1t(i,a,f){return i.replace(a,f)}function RCe(i,a){return i.indexOf(a)}function GN(i,a){return i.charCodeAt(a)|0}function UN(i,a,f){return i.slice(a,f)}function nk(i){return i.length}function AIt(i){return i.length}function mW(i,a){return a.push(i),i}var yW=1,zA=1,LIt=0,Qb=0,Ff=0,qA="";function Z1t(i,a,f,p,v,m,b){return{value:i,root:a,parent:f,type:p,props:v,children:m,line:yW,column:zA,length:b,return:""}}function jCe(){return Ff}function $Ce(){return Ff=Qb>0?GN(qA,--Qb):0,zA--,Ff===10&&(zA=1,yW--),Ff}function Zw(){return Ff=Qb2||J1t(Ff)>3?"":" "}function VCe(i,a){for(;--a&&Zw()&&!(Ff<48||Ff>102||Ff>57&&Ff<65||Ff>70&&Ff<97););return kW(i,xW()+(a<6&&iE()==32&&Zw()==32))}function edt(i){for(;Zw();)switch(Ff){case i:return Qb;case 34:case 39:i!==34&&i!==39&&edt(Ff);break;case 40:i===41&&edt(i);break;case 92:Zw();break}return Qb}function GCe(i,a){for(;Zw()&&i+Ff!==47+10;)if(i+Ff===42+42&&iE()===47)break;return"/*"+kW(a,Qb-1)+"*"+X1t(i===47?i:Zw())}function UCe(i){for(;!J1t(iE());)Zw();return kW(i,Qb)}function WCe(i){return qCe(EW("",null,null,null,[""],i=zCe(i),0,[0],i))}function EW(i,a,f,p,v,m,b,E,C){for(var D=0,P=0,B=b,j=0,R=0,H=0,X=1,it=1,nt=1,st=0,pt="",Tt=v,kt=m,yt=p,ht=pt;it;)switch(H=st,st=Zw()){case 40:if(H!=108&&GN(ht,B-1)==58){RCe(ht+=Q1t(tdt(st),"&","&\f"),"&\f")!=-1&&(nt=-1);break}case 34:case 39:case 91:ht+=tdt(st);break;case 9:case 10:case 13:case 32:ht+=HCe(H);break;case 92:ht+=VCe(xW()-1,7);continue;case 47:switch(iE()){case 42:case 47:mW(KCe(GCe(Zw(),xW()),a,f),C);break;default:ht+="/"}break;case 123*X:E[D++]=nk(ht)*nt;case 125*X:case 59:case 0:switch(st){case 0:case 125:it=0;case 59+P:R>0&&nk(ht)-B&&mW(R>32?DIt(ht+";",p,f,B-1):DIt(Q1t(ht," ","")+";",p,f,B-2),C);break;case 59:ht+=";";default:if(mW(yt=MIt(ht,a,f,D,P,v,E,pt,Tt=[],kt=[],B),m),st===123)if(P===0)EW(ht,a,yt,yt,Tt,m,B,E,kt);else switch(j===99&&GN(ht,3)===110?100:j){case 100:case 109:case 115:EW(i,yt,yt,p&&mW(MIt(i,yt,yt,0,0,v,E,pt,v,Tt=[],B),kt),v,kt,B,E,p?Tt:kt);break;default:EW(ht,yt,yt,yt,[""],kt,0,E,kt)}}D=P=R=0,X=nt=1,pt=ht="",B=b;break;case 58:B=1+nk(ht),R=H;default:if(X<1){if(st==123)--X;else if(st==125&&X++==0&&$Ce()==125)continue}switch(ht+=X1t(st),st*X){case 38:nt=P>0?1:(ht+="\f",-1);break;case 44:E[D++]=(nk(ht)-1)*nt,nt=1;break;case 64:iE()===45&&(ht+=tdt(Zw())),j=iE(),P=B=nk(pt=ht+=UCe(xW())),st++;break;case 45:H===45&&nk(ht)==2&&(X=0)}}return m}function MIt(i,a,f,p,v,m,b,E,C,D,P){for(var B=v-1,j=v===0?m:[""],R=AIt(j),H=0,X=0,it=0;H0?j[nt]+" "+st:Q1t(st,/&\f/g,j[nt])))&&(C[it++]=pt);return Z1t(i,a,f,v===0?_It:E,C,D,P)}function KCe(i,a,f){return Z1t(i,a,f,TIt,X1t(jCe()),UN(i,2,-2),0)}function DIt(i,a,f,p){return Z1t(i,a,f,CIt,UN(i,0,p),UN(i,p+1,-1),p)}function ndt(i,a){for(var f="",p=AIt(i),v=0;vi.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>ULe);return{id:OIt,diagram:i}}},NIt="flowchart",QCe={id:NIt,detector:(i,a)=>{var f,p;return((f=a==null?void 0:a.flowchart)==null?void 0:f.defaultRenderer)==="dagre-wrapper"||((p=a==null?void 0:a.flowchart)==null?void 0:p.defaultRenderer)==="elk"?!1:i.match(/^\s*graph/)!==null},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Nje);return{id:NIt,diagram:i}}},PIt="flowchart-v2",ZCe={id:PIt,detector:(i,a)=>{var f,p,v;return((f=a==null?void 0:a.flowchart)==null?void 0:f.defaultRenderer)==="dagre-d3"||((p=a==null?void 0:a.flowchart)==null?void 0:p.defaultRenderer)==="elk"?!1:i.match(/^\s*graph/)!==null&&((v=a==null?void 0:a.flowchart)==null?void 0:v.defaultRenderer)==="dagre-wrapper"?!0:i.match(/^\s*flowchart/)!==null},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Pje);return{id:PIt,diagram:i}}},FIt="er",JCe={id:FIt,detector:i=>i.match(/^\s*erDiagram/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>c$e);return{id:FIt,diagram:i}}},BIt="gitGraph",tSe={id:BIt,detector:i=>i.match(/^\s*gitGraph/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>P$e);return{id:BIt,diagram:i}}},RIt="gantt",eSe={id:RIt,detector:i=>i.match(/^\s*gantt/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Eze);return{id:RIt,diagram:i}}},jIt="info",nSe={id:jIt,detector:i=>i.match(/^\s*info/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>_ze);return{id:jIt,diagram:i}}},$It="pie",rSe={id:$It,detector:i=>i.match(/^\s*pie/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Lze);return{id:$It,diagram:i}}},zIt="quadrantChart",iSe={id:zIt,detector:i=>i.match(/^\s*quadrantChart/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Gze);return{id:zIt,diagram:i}}},qIt="requirement",sSe={id:qIt,detector:i=>i.match(/^\s*requirement(Diagram)?/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>eqe);return{id:qIt,diagram:i}}},HIt="sequence",aSe={id:HIt,detector:i=>i.match(/^\s*sequenceDiagram/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>iHe);return{id:HIt,diagram:i}}},VIt="class",oSe={id:VIt,detector:(i,a)=>{var f;return((f=a==null?void 0:a.class)==null?void 0:f.defaultRenderer)==="dagre-wrapper"?!1:i.match(/^\s*classDiagram/)!==null},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>CHe);return{id:VIt,diagram:i}}},GIt="classDiagram",cSe={id:GIt,detector:(i,a)=>{var f;return i.match(/^\s*classDiagram/)!==null&&((f=a==null?void 0:a.class)==null?void 0:f.defaultRenderer)==="dagre-wrapper"?!0:i.match(/^\s*classDiagram-v2/)!==null},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>IHe);return{id:GIt,diagram:i}}},UIt="state",uSe={id:UIt,detector:(i,a)=>{var f;return((f=a==null?void 0:a.state)==null?void 0:f.defaultRenderer)==="dagre-wrapper"?!1:i.match(/^\s*stateDiagram/)!==null},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>yVe);return{id:UIt,diagram:i}}},WIt="stateDiagram",lSe={id:WIt,detector:(i,a)=>{var f,p;return!!(i.match(/^\s*stateDiagram-v2/)!==null||i.match(/^\s*stateDiagram/)&&((f=a==null?void 0:a.state)==null?void 0:f.defaultRenderer)==="dagre-wrapper"||i.match(/^\s*stateDiagram/)&&((p=a==null?void 0:a.state)==null?void 0:p.defaultRenderer)==="dagre-wrapper")},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>jVe);return{id:WIt,diagram:i}}},KIt="journey",hSe={id:KIt,detector:i=>i.match(/^\s*journey/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>sGe);return{id:KIt,diagram:i}}},fSe=()=>"",YIt={setConf:function(){},draw:(i,a,f)=>{try{zt.debug(`Renering svg for syntax error + ${a!==null?" type:"+a:""} based on the text:${i}`),{type:null,args:null}}},yCe=function(i,a){for(const[f,p]of a.entries())if(p.match(i))return f;return-1};function Xb(i,a){if(!i)return a;const f=`curve${i.charAt(0).toUpperCase()+i.slice(1)}`;return vCe[f]||a}function xCe(i,a){const f=i.trim();if(f)return a.securityLevel!=="loose"?Xx(f):f}const kCe=(i,...a)=>{const f=i.split("."),p=f.length-1,v=f[p];let m=window;for(let b=0;b{f+=bW(m,a),a=m});let p=f/2,v;return a=void 0,i.forEach(m=>{if(a&&!v){const b=bW(m,a);if(b=1&&(v={x:m.x,y:m.y}),E>0&&E<1&&(v={x:(1-E)*a.x+E*m.x,y:(1-E)*a.y+E*m.y})}}a=m}),v}function TCe(i){return i.length===1?i[0]:ECe(i)}const _Ce=(i,a,f)=>{let p;zt.info(`our points ${JSON.stringify(a)}`),a[0]!==f&&(a=a.reverse());let m=25,b;p=void 0,a.forEach(P=>{if(p&&!b){const B=bW(P,p);if(B=1&&(b={x:P.x,y:P.y}),j>0&&j<1&&(b={x:(1-j)*p.x+j*P.x,y:(1-j)*p.y+j*P.y})}}p=P});const E=i?10:5,C=Math.atan2(a[0].y-b.y,a[0].x-b.x),D={x:0,y:0};return D.x=Math.sin(C)*E+(a[0].x+b.x)/2,D.y=-Math.cos(C)*E+(a[0].y+b.y)/2,D};function CCe(i,a,f){let p=JSON.parse(JSON.stringify(f)),v;zt.info("our points",p),a!=="start_left"&&a!=="start_right"&&(p=p.reverse()),p.forEach(B=>{v=B});let b=25+i,E;v=void 0,p.forEach(B=>{if(v&&!E){const j=bW(B,v);if(j=1&&(E={x:B.x,y:B.y}),R>0&&R<1&&(E={x:(1-R)*v.x+R*B.x,y:(1-R)*v.y+R*B.y})}}v=B});const C=10+i*.5,D=Math.atan2(p[0].y-E.y,p[0].x-E.x),P={x:0,y:0};return P.x=Math.sin(D)*C+(p[0].x+E.x)/2,P.y=-Math.cos(D)*C+(p[0].y+E.y)/2,a==="start_left"&&(P.x=Math.sin(D+Math.PI)*C+(p[0].x+E.x)/2,P.y=-Math.cos(D+Math.PI)*C+(p[0].y+E.y)/2),a==="end_right"&&(P.x=Math.sin(D-Math.PI)*C+(p[0].x+E.x)/2-5,P.y=-Math.cos(D-Math.PI)*C+(p[0].y+E.y)/2-5),a==="end_left"&&(P.x=Math.sin(D)*C+(p[0].x+E.x)/2-5,P.y=-Math.cos(D)*C+(p[0].y+E.y)/2-5),P}function Qw(i){let a="",f="";for(const p of i)p!==void 0&&(p.startsWith("color:")||p.startsWith("text-align:")?f=f+p+";":a=a+p+";");return{style:a,labelStyle:f}}let mIt=0;const yIt=()=>(mIt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+mIt);function SCe(i){let a="";const f="0123456789abcdef",p=f.length;for(let v=0;vSCe(i.length),ACe=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},LCe=function(i,a){const f=a.text.replace(yi.lineBreakRegex," "),[,p]=$A(a.fontSize),v=i.append("text");v.attr("x",a.x),v.attr("y",a.y),v.style("text-anchor",a.anchor),v.style("font-family",a.fontFamily),v.style("font-size",p),v.style("font-weight",a.fontWeight),v.attr("fill",a.fill),a.class!==void 0&&v.attr("class",a.class);const m=v.append("tspan");return m.attr("x",a.x+a.textMargin*2),m.attr("fill",a.fill),m.text(f),v},kIt=RA((i,a,f)=>{if(!i||(f=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},f),yi.lineBreakRegex.test(i)))return i;const p=i.split(" "),v=[];let m="";return p.forEach((b,E)=>{const C=u3(`${b} `,f),D=u3(m,f);if(C>a){const{hyphenatedStrings:j,remainingWord:R}=MCe(b,a,"-",f);v.push(m,...j),m=R}else D+C>=a?(v.push(m),m=b):m=[m,b].filter(Boolean).join(" ");E+1===p.length&&v.push(m)}),v.filter(b=>b!=="").join(f.joinWith)},(i,a,f)=>`${i}${a}${f.fontSize}${f.fontWeight}${f.fontFamily}${f.joinWith}`),MCe=RA((i,a,f="-",p)=>{p=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},p);const v=[...i],m=[];let b="";return v.forEach((E,C)=>{const D=`${b}${E}`;if(u3(D,p)>=a){const B=C+1,j=v.length===B,R=`${D}${f}`;m.push(j?D:R),b=""}else b=D}),{hyphenatedStrings:m,remainingWord:b}},(i,a,f="-",p)=>`${i}${a}${f}${p.fontSize}${p.fontWeight}${p.fontFamily}`);function K1t(i,a){return a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},a),Y1t(i,a).height}function u3(i,a){return a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},a),Y1t(i,a).width}const Y1t=RA((i,a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},a);const{fontSize:f,fontFamily:p,fontWeight:v}=a;if(!i)return{width:0,height:0};const[,m]=$A(f),b=["sans-serif",p],E=i.split(yi.lineBreakRegex),C=[],D=Mr("body");if(!D.remove)return{width:0,height:0,lineHeight:0};const P=D.append("svg");for(const j of b){let R=0;const H={width:0,height:0,lineHeight:0};for(const X of E){const it=ACe();it.text=X;const nt=LCe(P,it).style("font-size",m).style("font-weight",v).style("font-family",j),st=(nt._groups||nt)[0][0].getBBox();if(st.width===0&&st.height===0)throw new Error("svg element not in render tree");H.width=Math.round(Math.max(H.width,st.width)),R=Math.round(st.height),H.height+=R,H.lineHeight=Math.round(Math.max(H.lineHeight,R))}C.push(H)}P.remove();const B=isNaN(C[1].height)||isNaN(C[1].width)||isNaN(C[1].lineHeight)||C[0].height>C[1].height&&C[0].width>C[1].width&&C[0].lineHeight>C[1].lineHeight?0:1;return C[B]},(i,a)=>`${i}${a.fontSize}${a.fontWeight}${a.fontFamily}`),DCe=class{constructor(a,f){this.deterministic=a,this.seed=f,this.count=f?f.length:0}next(){return this.deterministic?this.count++:Date.now()}};let vW;const ICe=function(i){return vW=vW||document.createElement("div"),i=escape(i).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),vW.innerHTML=i,unescape(vW.textContent)},jA=i=>{if(zt.debug("directiveSanitizer called with",i),typeof i=="object"&&(i.length?i.forEach(a=>jA(a)):Object.keys(i).forEach(a=>{zt.debug("Checking key",a),a.startsWith("__")&&(zt.debug("sanitize deleting __ option",a),delete i[a]),a.includes("proto")&&(zt.debug("sanitize deleting proto option",a),delete i[a]),a.includes("constr")&&(zt.debug("sanitize deleting constr option",a),delete i[a]),a.includes("themeCSS")&&(zt.debug("sanitizing themeCss option"),i[a]=wW(i[a])),a.includes("fontFamily")&&(zt.debug("sanitizing fontFamily option"),i[a]=wW(i[a])),a.includes("altFontFamily")&&(zt.debug("sanitizing altFontFamily option"),i[a]=wW(i[a])),sEe.includes(a)?typeof i[a]=="object"&&(zt.debug("sanitize deleting object",a),jA(i[a])):(zt.debug("sanitize deleting option",a),delete i[a])})),i.themeVariables){const a=Object.keys(i.themeVariables);for(const f of a){const p=i.themeVariables[f];p&&p.match&&!p.match(/^[\d "#%(),.;A-Za-z]+$/)&&(i.themeVariables[f]="")}}zt.debug("After sanitization",i)},wW=i=>{let a=0,f=0;for(const p of i){if(a{if(!p)return;const v=i.node().getBBox();i.append("text").text(p).attr("x",v.x+v.width/2).attr("y",-f).attr("class",a)},$A=i=>{if(typeof i=="number")return[i,i+"px"];const a=parseInt(i,10);return Number.isNaN(a)?[void 0,void 0]:i===String(a)?[a,i+"px"]:[a,i]},lo={assignWithDepth:rd,wrapLabel:kIt,calculateTextHeight:K1t,calculateTextWidth:u3,calculateTextDimensions:Y1t,detectInit:mCe,detectDirective:wIt,isSubstringInArray:yCe,interpolateToCurve:Xb,calcLabelPosition:TCe,calcCardinalityPosition:_Ce,calcTerminalLabelPosition:CCe,formatUrl:xCe,getStylesFromArray:Qw,generateId:yIt,random:xIt,runFunc:kCe,entityDecode:ICe,initIdGenerator:DCe,directiveSanitizer:jA,sanitizeCss:wW,insertTitle:NCe,parseFontSize:$A};var TIt="comm",_It="rule",CIt="decl",PCe="@import",FCe="@keyframes",BCe=Math.abs,X1t=String.fromCharCode;function SIt(i){return i.trim()}function Q1t(i,a,f){return i.replace(a,f)}function RCe(i,a){return i.indexOf(a)}function GN(i,a){return i.charCodeAt(a)|0}function UN(i,a,f){return i.slice(a,f)}function nk(i){return i.length}function AIt(i){return i.length}function mW(i,a){return a.push(i),i}var yW=1,zA=1,LIt=0,Qb=0,Ff=0,qA="";function Z1t(i,a,f,p,v,m,b){return{value:i,root:a,parent:f,type:p,props:v,children:m,line:yW,column:zA,length:b,return:""}}function jCe(){return Ff}function $Ce(){return Ff=Qb>0?GN(qA,--Qb):0,zA--,Ff===10&&(zA=1,yW--),Ff}function Zw(){return Ff=Qb2||J1t(Ff)>3?"":" "}function VCe(i,a){for(;--a&&Zw()&&!(Ff<48||Ff>102||Ff>57&&Ff<65||Ff>70&&Ff<97););return kW(i,xW()+(a<6&&iE()==32&&Zw()==32))}function edt(i){for(;Zw();)switch(Ff){case i:return Qb;case 34:case 39:i!==34&&i!==39&&edt(Ff);break;case 40:i===41&&edt(i);break;case 92:Zw();break}return Qb}function GCe(i,a){for(;Zw()&&i+Ff!==47+10;)if(i+Ff===42+42&&iE()===47)break;return"/*"+kW(a,Qb-1)+"*"+X1t(i===47?i:Zw())}function UCe(i){for(;!J1t(iE());)Zw();return kW(i,Qb)}function WCe(i){return qCe(EW("",null,null,null,[""],i=zCe(i),0,[0],i))}function EW(i,a,f,p,v,m,b,E,C){for(var D=0,P=0,B=b,j=0,R=0,H=0,X=1,it=1,nt=1,st=0,pt="",Tt=v,kt=m,yt=p,ht=pt;it;)switch(H=st,st=Zw()){case 40:if(H!=108&&GN(ht,B-1)==58){RCe(ht+=Q1t(tdt(st),"&","&\f"),"&\f")!=-1&&(nt=-1);break}case 34:case 39:case 91:ht+=tdt(st);break;case 9:case 10:case 13:case 32:ht+=HCe(H);break;case 92:ht+=VCe(xW()-1,7);continue;case 47:switch(iE()){case 42:case 47:mW(KCe(GCe(Zw(),xW()),a,f),C);break;default:ht+="/"}break;case 123*X:E[D++]=nk(ht)*nt;case 125*X:case 59:case 0:switch(st){case 0:case 125:it=0;case 59+P:R>0&&nk(ht)-B&&mW(R>32?DIt(ht+";",p,f,B-1):DIt(Q1t(ht," ","")+";",p,f,B-2),C);break;case 59:ht+=";";default:if(mW(yt=MIt(ht,a,f,D,P,v,E,pt,Tt=[],kt=[],B),m),st===123)if(P===0)EW(ht,a,yt,yt,Tt,m,B,E,kt);else switch(j===99&&GN(ht,3)===110?100:j){case 100:case 109:case 115:EW(i,yt,yt,p&&mW(MIt(i,yt,yt,0,0,v,E,pt,v,Tt=[],B),kt),v,kt,B,E,p?Tt:kt);break;default:EW(ht,yt,yt,yt,[""],kt,0,E,kt)}}D=P=R=0,X=nt=1,pt=ht="",B=b;break;case 58:B=1+nk(ht),R=H;default:if(X<1){if(st==123)--X;else if(st==125&&X++==0&&$Ce()==125)continue}switch(ht+=X1t(st),st*X){case 38:nt=P>0?1:(ht+="\f",-1);break;case 44:E[D++]=(nk(ht)-1)*nt,nt=1;break;case 64:iE()===45&&(ht+=tdt(Zw())),j=iE(),P=B=nk(pt=ht+=UCe(xW())),st++;break;case 45:H===45&&nk(ht)==2&&(X=0)}}return m}function MIt(i,a,f,p,v,m,b,E,C,D,P){for(var B=v-1,j=v===0?m:[""],R=AIt(j),H=0,X=0,it=0;H0?j[nt]+" "+st:Q1t(st,/&\f/g,j[nt])))&&(C[it++]=pt);return Z1t(i,a,f,v===0?_It:E,C,D,P)}function KCe(i,a,f){return Z1t(i,a,f,TIt,X1t(jCe()),UN(i,2,-2),0)}function DIt(i,a,f,p){return Z1t(i,a,f,CIt,UN(i,0,p),UN(i,p+1,-1),p)}function ndt(i,a){for(var f="",p=AIt(i),v=0;vi.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>ULe);return{id:OIt,diagram:i}}},NIt="flowchart",QCe={id:NIt,detector:(i,a)=>{var f,p;return((f=a==null?void 0:a.flowchart)==null?void 0:f.defaultRenderer)==="dagre-wrapper"||((p=a==null?void 0:a.flowchart)==null?void 0:p.defaultRenderer)==="elk"?!1:i.match(/^\s*graph/)!==null},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Nje);return{id:NIt,diagram:i}}},PIt="flowchart-v2",ZCe={id:PIt,detector:(i,a)=>{var f,p,v;return((f=a==null?void 0:a.flowchart)==null?void 0:f.defaultRenderer)==="dagre-d3"||((p=a==null?void 0:a.flowchart)==null?void 0:p.defaultRenderer)==="elk"?!1:i.match(/^\s*graph/)!==null&&((v=a==null?void 0:a.flowchart)==null?void 0:v.defaultRenderer)==="dagre-wrapper"?!0:i.match(/^\s*flowchart/)!==null},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Pje);return{id:PIt,diagram:i}}},FIt="er",JCe={id:FIt,detector:i=>i.match(/^\s*erDiagram/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>c$e);return{id:FIt,diagram:i}}},BIt="gitGraph",tSe={id:BIt,detector:i=>i.match(/^\s*gitGraph/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>P$e);return{id:BIt,diagram:i}}},RIt="gantt",eSe={id:RIt,detector:i=>i.match(/^\s*gantt/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Eze);return{id:RIt,diagram:i}}},jIt="info",nSe={id:jIt,detector:i=>i.match(/^\s*info/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>_ze);return{id:jIt,diagram:i}}},$It="pie",rSe={id:$It,detector:i=>i.match(/^\s*pie/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Lze);return{id:$It,diagram:i}}},zIt="quadrantChart",iSe={id:zIt,detector:i=>i.match(/^\s*quadrantChart/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Gze);return{id:zIt,diagram:i}}},qIt="requirement",sSe={id:qIt,detector:i=>i.match(/^\s*requirement(Diagram)?/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>eqe);return{id:qIt,diagram:i}}},HIt="sequence",aSe={id:HIt,detector:i=>i.match(/^\s*sequenceDiagram/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>iHe);return{id:HIt,diagram:i}}},VIt="class",oSe={id:VIt,detector:(i,a)=>{var f;return((f=a==null?void 0:a.class)==null?void 0:f.defaultRenderer)==="dagre-wrapper"?!1:i.match(/^\s*classDiagram/)!==null},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>CHe);return{id:VIt,diagram:i}}},GIt="classDiagram",cSe={id:GIt,detector:(i,a)=>{var f;return i.match(/^\s*classDiagram/)!==null&&((f=a==null?void 0:a.class)==null?void 0:f.defaultRenderer)==="dagre-wrapper"?!0:i.match(/^\s*classDiagram-v2/)!==null},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>IHe);return{id:GIt,diagram:i}}},UIt="state",uSe={id:UIt,detector:(i,a)=>{var f;return((f=a==null?void 0:a.state)==null?void 0:f.defaultRenderer)==="dagre-wrapper"?!1:i.match(/^\s*stateDiagram/)!==null},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>yVe);return{id:UIt,diagram:i}}},WIt="stateDiagram",lSe={id:WIt,detector:(i,a)=>{var f,p;return!!(i.match(/^\s*stateDiagram-v2/)!==null||i.match(/^\s*stateDiagram/)&&((f=a==null?void 0:a.state)==null?void 0:f.defaultRenderer)==="dagre-wrapper"||i.match(/^\s*stateDiagram/)&&((p=a==null?void 0:a.state)==null?void 0:p.defaultRenderer)==="dagre-wrapper")},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>jVe);return{id:WIt,diagram:i}}},KIt="journey",hSe={id:KIt,detector:i=>i.match(/^\s*journey/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>sGe);return{id:KIt,diagram:i}}},fSe=()=>"",YIt={setConf:function(){},draw:(i,a,f)=>{try{zt.debug(`Renering svg for syntax error `);const p=Mr("#"+a),v=p.append("g");v.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),v.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),v.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),v.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),v.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),v.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),v.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),v.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+f),p.attr("height",100),p.attr("width",500),p.attr("viewBox","768 0 912 512")}catch(p){zt.error("Error while rendering info diagram"),zt.error(OCe(p))}}},dSe={db:{clear:()=>{}},styles:fSe,renderer:YIt,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},XIt="flowchart-elk",gSe={id:XIt,detector:(i,a)=>{var f;return!!(i.match(/^\s*flowchart-elk/)||i.match(/^\s*flowchart|graph/)&&((f=a==null?void 0:a.flowchart)==null?void 0:f.defaultRenderer)==="elk")},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>xGe);return{id:XIt,diagram:i}}},QIt="timeline",pSe={id:QIt,detector:i=>i.match(/^\s*timeline/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>$Ge);return{id:QIt,diagram:i}}},ZIt="mindmap",bSe={id:ZIt,detector:i=>i.match(/^\s*mindmap/)!==null,loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>wUe);return{id:ZIt,diagram:i}}};let JIt=!1;const rdt=()=>{JIt||(JIt=!0,fW("error",dSe,i=>i.toLowerCase().trim()==="error"),fW("---",{db:{clear:()=>{}},styles:{},renderer:{},parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}},init:()=>null},i=>i.toLowerCase().trimStart().startsWith("---")),fIt(XCe,cSe,oSe,JCe,eSe,nSe,rSe,sSe,aSe,gSe,ZCe,QCe,bSe,pSe,tSe,lSe,uSe,hSe,iSe))},vSe=i=>i.trimStart().replace(/^\s*%%(?!{)[^\n]+\n?/gm,"");class tOt{constructor(a){var m,b;this.text=a,this.type="graph",this.text+=` `;const f=Oe();try{this.type=dW(a,f)}catch(E){this.type="error",this.detectError=E}const p=G1t(this.type);zt.debug("Type "+this.type),this.db=p.db,(b=(m=this.db).clear)==null||b.call(m),this.renderer=p.renderer,this.parser=p.parser;const v=this.parser.parse.bind(this.parser);this.parser.parse=E=>v(vSe(YTe(E,this.db))),this.parser.parser.yy=this.db,p.init&&(p.init(f),zt.info("Initialized diagram "+this.type,f)),this.parse()}parse(){var a,f;if(this.detectError)throw this.detectError;(f=(a=this.db).clear)==null||f.call(a),this.parser.parse(this.text)}async render(a,f){await this.renderer.draw(this.text,a,f,this)}getParser(){return this.parser}getType(){return this.type}}const idt=async i=>{const a=dW(i,Oe());try{G1t(a)}catch{const p=g_e(a);if(!p)throw new hIt(`Diagram ${a} not found.`);const{id:v,diagram:m}=await p();fW(v,m)}return new tOt(i)};let sdt=[];const wSe=i=>{sdt.push(i)},mSe=()=>{sdt.forEach(i=>{i()}),sdt=[]};var ySe=Object.prototype;function TW(i){var a=i&&i.constructor,f=typeof a=="function"&&a.prototype||ySe;return i===f}function eOt(i,a){return function(f){return i(a(f))}}var xSe=eOt(Object.keys,Object);const kSe=xSe;var ESe=Object.prototype,TSe=ESe.hasOwnProperty;function nOt(i){if(!TW(i))return kSe(i);var a=[];for(var f in Object(i))TSe.call(i,f)&&f!="constructor"&&a.push(f);return a}var _Se=nE(Xw,"DataView");const adt=_Se;var CSe=nE(Xw,"Promise");const odt=CSe;var SSe=nE(Xw,"Set");const HA=SSe;var ASe=nE(Xw,"WeakMap");const cdt=ASe;var rOt="[object Map]",LSe="[object Object]",iOt="[object Promise]",sOt="[object Set]",aOt="[object WeakMap]",oOt="[object DataView]",MSe=eE(adt),DSe=eE(VN),ISe=eE(odt),OSe=eE(HA),NSe=eE(cdt),sE=tE;(adt&&sE(new adt(new ArrayBuffer(1)))!=oOt||VN&&sE(new VN)!=rOt||odt&&sE(odt.resolve())!=iOt||HA&&sE(new HA)!=sOt||cdt&&sE(new cdt)!=aOt)&&(sE=function(i){var a=tE(i),f=a==LSe?i.constructor:void 0,p=f?eE(f):"";if(p)switch(p){case MSe:return oOt;case DSe:return rOt;case ISe:return iOt;case OSe:return sOt;case NSe:return aOt}return a});const VA=sE;function l3(i){return i!=null&&typeof i=="object"}var PSe="[object Arguments]";function cOt(i){return l3(i)&&tE(i)==PSe}var uOt=Object.prototype,FSe=uOt.hasOwnProperty,BSe=uOt.propertyIsEnumerable,RSe=cOt(function(){return arguments}())?cOt:function(i){return l3(i)&&FSe.call(i,"callee")&&!BSe.call(i,"callee")};const GA=RSe;var jSe=Array.isArray;const Bf=jSe;var $Se=9007199254740991;function udt(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=$Se}function rk(i){return i!=null&&udt(i.length)&&!FA(i)}function zSe(){return!1}var lOt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hOt=lOt&&typeof module=="object"&&module&&!module.nodeType&&module,qSe=hOt&&hOt.exports===lOt,fOt=qSe?Xw.Buffer:void 0,HSe=fOt?fOt.isBuffer:void 0,VSe=HSe||zSe;const UA=VSe;var GSe="[object Arguments]",USe="[object Array]",WSe="[object Boolean]",KSe="[object Date]",YSe="[object Error]",XSe="[object Function]",QSe="[object Map]",ZSe="[object Number]",JSe="[object Object]",tAe="[object RegExp]",eAe="[object Set]",nAe="[object String]",rAe="[object WeakMap]",iAe="[object ArrayBuffer]",sAe="[object DataView]",aAe="[object Float32Array]",oAe="[object Float64Array]",cAe="[object Int8Array]",uAe="[object Int16Array]",lAe="[object Int32Array]",hAe="[object Uint8Array]",fAe="[object Uint8ClampedArray]",dAe="[object Uint16Array]",gAe="[object Uint32Array]",_l={};_l[aAe]=_l[oAe]=_l[cAe]=_l[uAe]=_l[lAe]=_l[hAe]=_l[fAe]=_l[dAe]=_l[gAe]=!0,_l[GSe]=_l[USe]=_l[iAe]=_l[WSe]=_l[sAe]=_l[KSe]=_l[YSe]=_l[XSe]=_l[QSe]=_l[ZSe]=_l[JSe]=_l[tAe]=_l[eAe]=_l[nAe]=_l[rAe]=!1;function pAe(i){return l3(i)&&udt(i.length)&&!!_l[tE(i)]}function _W(i){return function(a){return i(a)}}var dOt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,WN=dOt&&typeof module=="object"&&module&&!module.nodeType&&module,bAe=WN&&WN.exports===dOt,ldt=bAe&&gIt.process,vAe=function(){try{var i=WN&&WN.require&&WN.require("util").types;return i||ldt&&ldt.binding&&ldt.binding("util")}catch{}}();const WA=vAe;var gOt=WA&&WA.isTypedArray,wAe=gOt?_W(gOt):pAe;const CW=wAe;var mAe="[object Map]",yAe="[object Set]",xAe=Object.prototype,kAe=xAe.hasOwnProperty;function KA(i){if(i==null)return!0;if(rk(i)&&(Bf(i)||typeof i=="string"||typeof i.splice=="function"||UA(i)||CW(i)||GA(i)))return!i.length;var a=VA(i);if(a==mAe||a==yAe)return!i.size;if(TW(i))return!nOt(i).length;for(var f in i)if(kAe.call(i,f))return!1;return!0}const EAe="graphics-document document";function TAe(i,a){i.attr("role",EAe),KA(a)||i.attr("aria-roledescription",a)}function _Ae(i,a,f,p){if(i.insert!==void 0)if(a||f){if(f){const v="chart-desc-"+p;i.attr("aria-describedby",v),i.insert("desc",":first-child").attr("id",v).text(f)}if(a){const v="chart-title-"+p;i.attr("aria-labelledby",v),i.insert("title",":first-child").attr("id",v).text(a)}}else return}const pOt=["graph","flowchart","flowchart-v2","flowchart-elk","stateDiagram","stateDiagram-v2"],CAe=5e4,SAe="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",AAe="sandbox",LAe="loose",MAe="http://www.w3.org/2000/svg",DAe="http://www.w3.org/1999/xlink",IAe="http://www.w3.org/1999/xhtml",OAe="100%",NAe="100%",PAe="border:0;margin:0;",FAe="margin:0",BAe="allow-top-navigation-by-user-activation allow-popups",RAe='The "iframe" tag is not supported by your browser.',jAe=["foreignobject"],$Ae=["dominant-baseline"];async function zAe(i,a){rdt();try{(await idt(i)).parse()}catch(f){if(a!=null&&a.suppressErrors)return!1;throw f}return!0}const qAe=function(i){let a=i;return a=a.replace(/style.*:\S*#.*;/g,function(f){return f.substring(0,f.length-1)}),a=a.replace(/classDef.*:\S*#.*;/g,function(f){return f.substring(0,f.length-1)}),a=a.replace(/#\w+;/g,function(f){const p=f.substring(1,f.length-1);return/^\+?\d+$/.test(p)?"fl°°"+p+"¶ß":"fl°"+p+"¶ß"}),a},KN=function(i){return i.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},bOt=(i,a,f=[])=>` .${i} ${a} { ${f.join(" !important; ")} !important; }`,HAe=(i,a,f={})=>{var v;let p="";if(i.themeCSS!==void 0&&(p+=` ${i.themeCSS}`),i.fontFamily!==void 0&&(p+=` :root { --mermaid-font-family: ${i.fontFamily}}`),i.altFontFamily!==void 0&&(p+=` -:root { --mermaid-alt-font-family: ${i.altFontFamily}}`),!KA(f)&&pOt.includes(a)){const C=i.htmlLabels||((v=i.flowchart)==null?void 0:v.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const D in f){const P=f[D];KA(P.styles)||C.forEach(B=>{p+=bOt(P.id,B,P.styles)}),KA(P.textStyles)||(p+=bOt(P.id,"tspan",P.textStyles))}}return p},VAe=(i,a,f,p)=>{const v=HAe(i,a,f),m=i_e(a,v,i.themeVariables);return ndt(WCe(`${p}{${m}}`),YCe)},GAe=(i="",a,f)=>{let p=i;return!f&&!a&&(p=p.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),p=KN(p),p=p.replace(/
/g,"
"),p},UAe=(i="",a)=>{const f=a?a.viewBox.baseVal.height+"px":NAe,p=btoa(''+i+"");return``},vOt=(i,a,f,p,v)=>{const m=i.append("div");m.attr("id",f),p&&m.attr("style",p);const b=m.append("svg").attr("id",a).attr("width","100%").attr("xmlns",MAe);return v&&b.attr("xmlns:xlink",v),b.append("g"),i};function wOt(i,a){return i.append("iframe").attr("id",a).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const WAe=(i,a,f,p)=>{var v,m,b;(v=i.getElementById(a))==null||v.remove(),(m=i.getElementById(f))==null||m.remove(),(b=i.getElementById(p))==null||b.remove()},KAe=async function(i,a,f){var _t,Y,Rt,ft;rdt(),cW();const p=lo.detectInit(a);p&&(jA(p),sIt(p));const v=Oe();zt.debug(v),a.length>((v==null?void 0:v.maxTextSize)??CAe)&&(a=SAe),a=a.replace(/\r\n?/g,` `),a=a.replace(/<(\w+)([^>]*)>/g,(de,J,ae)=>"<"+J+ae.replace(/="([^"]*)"/g,"='$1'")+">");const m="#"+i,b="i"+i,E="#"+b,C="d"+i,D="#"+C;let P=Mr("body");const B=v.securityLevel===AAe,j=v.securityLevel===LAe,R=v.fontFamily;if(f!==void 0){if(f&&(f.innerHTML=""),B){const de=wOt(Mr(f),b);P=Mr(de.nodes()[0].contentDocument.body),P.node().style.margin=0}else P=Mr(f);vOt(P,i,C,`font-family: ${R}`,DAe)}else{if(WAe(document,i,C,b),B){const de=wOt(Mr("body"),b);P=Mr(de.nodes()[0].contentDocument.body),P.node().style.margin=0}else P=Mr("body");vOt(P,i,C)}a=qAe(a);let H,X;try{H=await idt(a)}catch(de){H=new tOt("error"),X=de}const it=P.select(D).node(),nt=H.type,st=it.firstChild,pt=st.firstChild,Tt=pOt.includes(nt)?H.renderer.getClasses(a,H):{},kt=VAe(v,nt,Tt,m),yt=document.createElement("style");yt.innerHTML=kt,st.insertBefore(yt,pt);try{await H.renderer.draw(a,i,IIt,H)}catch(de){throw YIt.draw(a,i,IIt),de}const ht=P.select(`${D} svg`),mt=(Y=(_t=H.db).getAccTitle)==null?void 0:Y.call(_t),rt=(ft=(Rt=H.db).getAccDescription)==null?void 0:ft.call(Rt);XAe(nt,ht,mt,rt),P.select(`[id="${i}"]`).selectAll("foreignobject > *").attr("xmlns",IAe);let wt=P.select(D).node().innerHTML;if(zt.debug("config.arrowMarkerAbsolute",v.arrowMarkerAbsolute),wt=GAe(wt,B,h1(v.arrowMarkerAbsolute)),B){const de=P.select(D+" svg").node();wt=UAe(wt,de)}else j||(wt=WU.sanitize(wt,{ADD_TAGS:jAe,ADD_ATTR:$Ae}));if(mSe(),X)throw X;const lt=Mr(B?E:D).node();return lt&&"remove"in lt&<.remove(),{svg:wt,bindFunctions:H.db.bindFunctions}};function YAe(i={}){var f;i!=null&&i.fontFamily&&!((f=i.themeVariables)!=null&&f.fontFamily)&&(i.themeVariables||(i.themeVariables={}),i.themeVariables.fontFamily=i.fontFamily),QTe(i),i!=null&&i.theme&&i.theme in w5?i.themeVariables=w5[i.theme].getThemeVariables(i.themeVariables):i&&(i.themeVariables=w5.default.getThemeVariables(i.themeVariables));const a=typeof i=="object"?XTe(i):nIt();Aft(a.logLevel),rdt()}function XAe(i,a,f,p){TAe(a,i),_Ae(a,f,p,a.attr("id"))}const d1=Object.freeze({render:KAe,parse:zAe,parseDirective:V1t,getDiagramFromText:idt,initialize:YAe,getConfig:Oe,setConfig:rIt,getSiteConfig:nIt,updateSiteConfig:ZTe,reset:()=>{cW()},globalReset:()=>{cW(OA)},defaultConfig:OA});Aft(Oe().logLevel),cW(Oe());const QAe=(i,a,f)=>{zt.warn(i),EIt(i)?(f&&f(i.str,i.hash),a.push({...i,message:i.str,error:i})):(f&&f(i),i instanceof Error&&a.push({str:i.message,message:i.message,hash:i.name,error:i}))},mOt=async function(i={querySelector:".mermaid"}){try{await ZAe(i)}catch(a){if(EIt(a)&&zt.error(a.str),P2.parseError&&P2.parseError(a),!i.suppressErrors)throw zt.error("Use the suppressErrors option to suppress these errors"),a}},ZAe=async function({postRenderCallback:i,querySelector:a,nodes:f}={querySelector:".mermaid"}){const p=d1.getConfig();zt.debug(`${i?"":"No "}Callback function found`);let v;if(f)v=f;else if(a)v=document.querySelectorAll(a);else throw new Error("Nodes and querySelector are both undefined");zt.debug(`Found ${v.length} diagrams`),(p==null?void 0:p.startOnLoad)!==void 0&&(zt.debug("Start On Load: "+(p==null?void 0:p.startOnLoad)),d1.updateSiteConfig({startOnLoad:p==null?void 0:p.startOnLoad}));const m=new lo.initIdGenerator(p.deterministicIds,p.deterministicIDSeed);let b;const E=[];for(const C of Array.from(v)){zt.info("Rendering diagram: "+C.id);/*! Check if previously processed */if(C.getAttribute("data-processed"))continue;C.setAttribute("data-processed","true");const D=`mermaid-${m.next()}`;b=C.innerHTML,b=fA(lo.entityDecode(b)).trim().replace(//gi,"
");const P=lo.detectInit(b);P&&zt.debug("Detected early reinit: ",P);try{const{svg:B,bindFunctions:j}=await EOt(D,b,C);C.innerHTML=B,i&&await i(D),j&&j(C)}catch(B){QAe(B,E,P2.parseError)}}if(E.length>0)throw E[0]},yOt=function(i){d1.initialize(i)},JAe=async function(i,a,f){zt.warn("mermaid.init is deprecated. Please use run instead."),i&&yOt(i);const p={postRenderCallback:f,querySelector:".mermaid"};typeof a=="string"?p.querySelector=a:a&&(a instanceof HTMLElement?p.nodes=[a]:p.nodes=a),await mOt(p)},tLe=async(i,{lazyLoad:a=!0}={})=>{fIt(...i),a===!1&&await d_e()},xOt=function(){if(P2.startOnLoad){const{startOnLoad:i}=d1.getConfig();i&&P2.run().catch(a=>zt.error("Mermaid failed to initialize",a))}};if(typeof document<"u"){/*!