From a8124581c4e8c3f3e462f13ffe63228d7a631b79 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Tue, 10 Dec 2024 01:04:33 +0300 Subject: Auto-commit 2024-12-10 --- assets/css/main.css | 12 ++++++++++++ content/posts/2024-11-17-obsidian/index.md | 18 +++++++++++++++++- layouts/partials/head/js.html | 4 ++++ layouts/shortcodes/graph.html | 3 +++ static/js/mermaid.esm.min.mjs | 14 ++++++++++++++ 5 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 layouts/shortcodes/graph.html create mode 100644 static/js/mermaid.esm.min.mjs diff --git a/assets/css/main.css b/assets/css/main.css index 2ef42ce..002573b 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -79,4 +79,16 @@ canvas { .square_hack { width:0; padding-bottom: 100%; +} + +.labelBkg { + background: none !important; +} + +.edgeLabel { + background: none !important; +} + +.edgeLabel p { + background: none !important; } \ No newline at end of file diff --git a/content/posts/2024-11-17-obsidian/index.md b/content/posts/2024-11-17-obsidian/index.md index c3aea82..07fd259 100644 --- a/content/posts/2024-11-17-obsidian/index.md +++ b/content/posts/2024-11-17-obsidian/index.md @@ -179,7 +179,23 @@ ___ «Но Hugo это же генератор статичных сайтов, куда ты ему будешь отправлять заметку для публикации?» — можешь спросить меня ты. А я отвечу что у меня вот такой план: -{{< figure src="/posts/2024-11-17-obsidian/publish.png" title="план-кабан" >}} +{{< graph >}} +graph TB +b1["Заметка в Obsidian"] +b2["Плагин obsidian-micropub"] +b3["micropub сервер на моем сервере"] +b4["вызов hugo"] +b5["Загрузка или копирование результата на веб сервер"] +b1 --> |Publish в контекстном меню| b2 +b2 --> |POST neonxp.ru/micropub| b3 +b3 --> |Запись в директорию content блога| b4 +b4 --> |hugo рендерит markdown -> html| b5 +style b1 fill:#28252e, stroke:#754fcc +style b2 fill:#2e2121, stroke:#c81319 +style b3 fill:#2e2121, stroke:#c81319 +style b4 fill:#222c2c, stroke:#20acaa +style b5 fill:#222c2c, stroke:#20acaa +{{< /graph >}} То что выделено красным — ещё не существует в природе. diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html index 18fe842..7e1c81d 100644 --- a/layouts/partials/head/js.html +++ b/layouts/partials/head/js.html @@ -10,3 +10,7 @@ {{- end }} {{- end }} {{- end }} + \ No newline at end of file diff --git a/layouts/shortcodes/graph.html b/layouts/shortcodes/graph.html new file mode 100644 index 0000000..f914677 --- /dev/null +++ b/layouts/shortcodes/graph.html @@ -0,0 +1,3 @@ +
+    {{ .Inner }}
+
\ No newline at end of file diff --git a/static/js/mermaid.esm.min.mjs b/static/js/mermaid.esm.min.mjs new file mode 100644 index 0000000..17d866a --- /dev/null +++ b/static/js/mermaid.esm.min.mjs @@ -0,0 +1,14 @@ +import{a as ht}from"./chunks/mermaid.esm.min/chunk-6CAUGOKZ.mjs";import{a as Yt}from"./chunks/mermaid.esm.min/chunk-3YFHLAX3.mjs";import{a as Ut,b as qt}from"./chunks/mermaid.esm.min/chunk-7LIB5WBN.mjs";import{a as Bt}from"./chunks/mermaid.esm.min/chunk-54VS5GG6.mjs";import"./chunks/mermaid.esm.min/chunk-ZUCAP7FR.mjs";import"./chunks/mermaid.esm.min/chunk-E7A2AWYO.mjs";import"./chunks/mermaid.esm.min/chunk-S67DUUA5.mjs";import"./chunks/mermaid.esm.min/chunk-LM6QDVU5.mjs";import{b as St}from"./chunks/mermaid.esm.min/chunk-D4BOYBYT.mjs";import{a as Mt}from"./chunks/mermaid.esm.min/chunk-AFC6EC46.mjs";import{b as Vt,j as yt,l as $t,m as z,n as Nt,o as Ht}from"./chunks/mermaid.esm.min/chunk-UENA7NWE.mjs";import"./chunks/mermaid.esm.min/chunk-TI4EEUUG.mjs";import{A as _,B as It,C as Y,D as Ft,G as _t,M as Gt,O as zt,aa as G,b as l,ba as X,c as lt,d as At,f as Tt,g as gt,ga as k,h as Z,i as J,j as Ct,k as Rt,r as tt,u as ut,v as kt,w as Ot,x as Pt,y as Dt,z as jt}from"./chunks/mermaid.esm.min/chunk-OR2G2HG5.mjs";import{d as xt}from"./chunks/mermaid.esm.min/chunk-YPUTD6PB.mjs";import"./chunks/mermaid.esm.min/chunk-6BY5RJGC.mjs";import{a as e}from"./chunks/mermaid.esm.min/chunk-GTKDMUJJ.mjs";var Xt="c4",Oe=e(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),Pe=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/c4Diagram-ET6I6IV7.mjs");return{id:Xt,diagram:t}},"loader"),je={id:Xt,detector:Oe,loader:Pe},Wt=je;var Kt="flowchart",Ie=e((t,r)=>r?.flowchart?.defaultRenderer==="dagre-wrapper"||r?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),Fe=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-7QVFXBRT.mjs");return{id:Kt,diagram:t}},"loader"),_e={id:Kt,detector:Ie,loader:Fe},Qt=_e;var Zt="flowchart-v2",Ge=e((t,r)=>r?.flowchart?.defaultRenderer==="dagre-d3"?!1:(r?.flowchart?.defaultRenderer==="elk"&&(r.layout="elk"),/^\s*graph/.test(t)&&r?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),ze=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-7QVFXBRT.mjs");return{id:Zt,diagram:t}},"loader"),Ve={id:Zt,detector:Ge,loader:ze},Jt=Ve;var tr="er",$e=e(t=>/^\s*erDiagram/.test(t),"detector"),Ne=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/erDiagram-YH7IYH2C.mjs");return{id:tr,diagram:t}},"loader"),He={id:tr,detector:$e,loader:Ne},rr=He;var er="gitGraph",Ue=e(t=>/^\s*gitGraph/.test(t),"detector"),qe=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/gitGraphDiagram-H7KF5RUN.mjs");return{id:er,diagram:t}},"loader"),Be={id:er,detector:Ue,loader:qe},ar=Be;var ir="gantt",Ye=e(t=>/^\s*gantt/.test(t),"detector"),Xe=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/ganttDiagram-7KUJEIIK.mjs");return{id:ir,diagram:t}},"loader"),We={id:ir,detector:Ye,loader:Xe},or=We;var nr="info",Ke=e(t=>/^\s*info/.test(t),"detector"),Qe=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/infoDiagram-FIZOUH6F.mjs");return{id:nr,diagram:t}},"loader"),sr={id:nr,detector:Ke,loader:Qe};var cr="pie",Ze=e(t=>/^\s*pie/.test(t),"detector"),Je=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/pieDiagram-AYPHHONI.mjs");return{id:cr,diagram:t}},"loader"),mr={id:cr,detector:Ze,loader:Je};var pr="quadrantChart",ta=e(t=>/^\s*quadrantChart/.test(t),"detector"),ra=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/quadrantDiagram-QXTGSWY2.mjs");return{id:pr,diagram:t}},"loader"),ea={id:pr,detector:ta,loader:ra},dr=ea;var fr="xychart",aa=e(t=>/^\s*xychart-beta/.test(t),"detector"),ia=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/xychartDiagram-A2DIST7P.mjs");return{id:fr,diagram:t}},"loader"),oa={id:fr,detector:aa,loader:ia},lr=oa;var gr="requirement",na=e(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),sa=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/requirementDiagram-5YXTYXBB.mjs");return{id:gr,diagram:t}},"loader"),ca={id:gr,detector:na,loader:sa},ur=ca;var Dr="sequence",ma=e(t=>/^\s*sequenceDiagram/.test(t),"detector"),pa=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/sequenceDiagram-EUUTCHHZ.mjs");return{id:Dr,diagram:t}},"loader"),da={id:Dr,detector:ma,loader:pa},yr=da;var xr="class",fa=e((t,r)=>r?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),la=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/classDiagram-QKCJ6K63.mjs");return{id:xr,diagram:t}},"loader"),ga={id:xr,detector:fa,loader:la},hr=ga;var Er="classDiagram",ua=e((t,r)=>/^\s*classDiagram/.test(t)&&r?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),Da=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/classDiagram-v2-2JHJIACG.mjs");return{id:Er,diagram:t}},"loader"),ya={id:Er,detector:ua,loader:Da},wr=ya;var br="state",xa=e((t,r)=>r?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),ha=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/stateDiagram-U67EPTRE.mjs");return{id:br,diagram:t}},"loader"),Ea={id:br,detector:xa,loader:ha},Lr=Ea;var vr="stateDiagram",wa=e((t,r)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&r?.state?.defaultRenderer==="dagre-wrapper"),"detector"),ba=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/stateDiagram-v2-HMOQ2HEA.mjs");return{id:vr,diagram:t}},"loader"),La={id:vr,detector:wa,loader:ba},Sr=La;var Mr="journey",va=e(t=>/^\s*journey/.test(t),"detector"),Sa=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/journeyDiagram-CDK7QRCM.mjs");return{id:Mr,diagram:t}},"loader"),Ma={id:Mr,detector:va,loader:Sa},Ar=Ma;var Aa=e((t,r,a)=>{l.debug(`rendering svg for syntax error +`);let i=Yt(r),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Gt(i,100,512,!0),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${a}`)},"draw"),Et={draw:Aa},Tr=Et;var Ta={db:{},renderer:Et,parser:{parse:e(()=>{},"parse")}},Cr=Ta;var Rr="flowchart-elk",Ca=e((t,r={})=>/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&r?.flowchart?.defaultRenderer==="elk"?(r.layout="elk",!0):!1,"detector"),Ra=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-7QVFXBRT.mjs");return{id:Rr,diagram:t}},"loader"),ka={id:Rr,detector:Ca,loader:Ra},kr=ka;var Or="timeline",Oa=e(t=>/^\s*timeline/.test(t),"detector"),Pa=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/timeline-definition-2YBW2SKD.mjs");return{id:Or,diagram:t}},"loader"),ja={id:Or,detector:Oa,loader:Pa},Pr=ja;var jr="mindmap",Ia=e(t=>/^\s*mindmap/.test(t),"detector"),Fa=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/mindmap-definition-55KDPWGP.mjs");return{id:jr,diagram:t}},"loader"),_a={id:jr,detector:Ia,loader:Fa},Ir=_a;var Fr="kanban",Ga=e(t=>/^\s*kanban/.test(t),"detector"),za=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/kanban-definition-NEOEHSGR.mjs");return{id:Fr,diagram:t}},"loader"),Va={id:Fr,detector:Ga,loader:za},_r=Va;var Gr="sankey",$a=e(t=>/^\s*sankey-beta/.test(t),"detector"),Na=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/sankeyDiagram-T6MWQN27.mjs");return{id:Gr,diagram:t}},"loader"),Ha={id:Gr,detector:$a,loader:Na},zr=Ha;var Vr="packet",Ua=e(t=>/^\s*packet-beta/.test(t),"detector"),qa=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-D46ISNHH.mjs");return{id:Vr,diagram:t}},"loader"),$r={id:Vr,detector:Ua,loader:qa};var Nr="block",Ba=e(t=>/^\s*block-beta/.test(t),"detector"),Ya=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/blockDiagram-56QMO3LT.mjs");return{id:Nr,diagram:t}},"loader"),Xa={id:Nr,detector:Ba,loader:Ya},Hr=Xa;var Ur="architecture",Wa=e(t=>/^\s*architecture/.test(t),"detector"),Ka=e(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/architectureDiagram-MJF3Q7TB.mjs");return{id:Ur,diagram:t}},"loader"),Qa={id:Ur,detector:Wa,loader:Ka},qr=Qa;var Br=!1,$=e(()=>{Br||(Br=!0,G("error",Cr,t=>t.toLowerCase().trim()==="error"),G("---",{db:{clear:e(()=>{},"clear")},styles:{},renderer:{draw:e(()=>{},"draw")},parser:{parse:e(()=>{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")},"parse")},init:e(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),J(Wt,_r,wr,hr,rr,or,sr,mr,ur,yr,kr,Jt,Qt,Ir,Pr,ar,Sr,Lr,Ar,dr,zr,$r,lr,Hr,qr))},"addDiagrams");var Yr=e(async()=>{l.debug("Loading registered diagrams");let r=(await Promise.allSettled(Object.entries(gt).map(async([a,{detector:i,loader:o}])=>{if(o)try{X(a)}catch{try{let{diagram:n,id:m}=await o();G(m,n,i)}catch(n){throw l.error(`Failed to load external diagram with key ${a}. Removing from detectors.`),delete gt[a],n}}}))).filter(a=>a.status==="rejected");if(r.length>0){l.error(`Failed to load ${r.length} external diagrams`);for(let a of r)l.error(a);throw new Error(`Failed to load ${r.length} external diagrams`)}},"loadRegisteredDiagrams");var rt="comm",et="rule",at="decl";var Xr="@import";var Wr="@keyframes";var Kr="@layer";var wt=Math.abs,W=String.fromCharCode;function it(t){return t.trim()}e(it,"trim");function K(t,r,a){return t.replace(r,a)}e(K,"replace");function Qr(t,r,a){return t.indexOf(r,a)}e(Qr,"indexof");function V(t,r){return t.charCodeAt(r)|0}e(V,"charat");function j(t,r,a){return t.slice(r,a)}e(j,"substr");function h(t){return t.length}e(h,"strlen");function Zr(t){return t.length}e(Zr,"sizeof");function N(t,r){return r.push(t),t}e(N,"append");var ot=1,H=1,Jr=0,w=0,D=0,q="";function nt(t,r,a,i,o,n,m,s){return{value:t,root:r,parent:a,type:i,props:o,children:n,line:ot,column:H,length:m,return:"",siblings:s}}e(nt,"node");function te(){return D}e(te,"char");function re(){return D=w>0?V(q,--w):0,H--,D===10&&(H=1,ot--),D}e(re,"prev");function b(){return D=w2||U(D)>3?"":" "}e(ie,"whitespace");function oe(t,r){for(;--r&&b()&&!(D<48||D>102||D>57&&D<65||D>70&&D<97););return st(t,Q()+(r<6&&O()==32&&b()==32))}e(oe,"escaping");function bt(t){for(;b();)switch(D){case t:return w;case 34:case 39:t!==34&&t!==39&&bt(D);break;case 40:t===41&&bt(t);break;case 92:b();break}return w}e(bt,"delimiter");function ne(t,r){for(;b()&&t+D!==57;)if(t+D===84&&O()===47)break;return"/*"+st(r,w-1)+"*"+W(t===47?t:b())}e(ne,"commenter");function se(t){for(;!U(O());)b();return st(t,w)}e(se,"identifier");function pe(t){return ae(mt("",null,null,null,[""],t=ee(t),0,[0],t))}e(pe,"compile");function mt(t,r,a,i,o,n,m,s,c){for(var g=0,y=0,p=m,x=0,A=0,L=0,f=1,C=1,v=1,u=0,S="",R=o,T=n,E=i,d=S;C;)switch(L=u,u=b()){case 40:if(L!=108&&V(d,p-1)==58){Qr(d+=K(ct(u),"&","&\f"),"&\f",wt(g?s[g-1]:0))!=-1&&(v=-1);break}case 34:case 39:case 91:d+=ct(u);break;case 9:case 10:case 13:case 32:d+=ie(L);break;case 92:d+=oe(Q()-1,7);continue;case 47:switch(O()){case 42:case 47:N(Za(ne(b(),Q()),r,a,c),c),(U(L||1)==5||U(O()||1)==5)&&h(d)&&j(d,-1,void 0)!==" "&&(d+=" ");break;default:d+="/"}break;case 123*f:s[g++]=h(d)*v;case 125*f:case 59:case 0:switch(u){case 0:case 125:C=0;case 59+y:v==-1&&(d=K(d,/\f/g,"")),A>0&&(h(d)-p||f===0&&L===47)&&N(A>32?me(d+";",i,a,p-1,c):me(K(d," ","")+";",i,a,p-2,c),c);break;case 59:d+=";";default:if(N(E=ce(d,r,a,g,y,o,s,S,R=[],T=[],p,n),n),u===123)if(y===0)mt(d,r,E,E,R,n,p,s,T);else switch(x===99&&V(d,3)===110?100:x){case 100:case 108:case 109:case 115:mt(t,E,E,i&&N(ce(t,E,E,0,0,o,s,S,o,R=[],p,T),T),o,T,p,s,i?R:T);break;default:mt(d,E,E,E,[""],T,0,s,T)}}g=y=A=0,f=v=1,S=d="",p=m;break;case 58:p=1+h(d),A=L;default:if(f<1){if(u==123)--f;else if(u==125&&f++==0&&re()==125)continue}switch(d+=W(u),u*f){case 38:v=y>0?1:(d+="\f",-1);break;case 44:s[g++]=(h(d)-1)*v,v=1;break;case 64:O()===45&&(d+=ct(b())),x=O(),y=p=h(S=d+=se(Q())),u++;break;case 45:L===45&&h(d)==2&&(f=0)}}return n}e(mt,"parse");function ce(t,r,a,i,o,n,m,s,c,g,y,p){for(var x=o-1,A=o===0?n:[""],L=Zr(A),f=0,C=0,v=0;f0?A[u]+" "+S:K(S,/&\f/g,A[u])))&&(c[v++]=R);return nt(t,r,a,o===0?et:s,c,g,y,p)}e(ce,"ruleset");function Za(t,r,a,i){return nt(t,r,a,rt,W(te()),j(t,2,-2),0,i)}e(Za,"comment");function me(t,r,a,i,o){return nt(t,r,a,at,j(t,0,i),j(t,i+1,-1),i,o)}e(me,"declaration");function pt(t,r){for(var a="",i=0;i{ge.forEach(t=>{t()}),ge=[]},"attachFunctions");var De=e(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function ye(t){let r=t.match(At);if(!r)return{text:t,metadata:{}};let a=qt(r[1],{schema:Ut})??{};a=typeof a=="object"&&!Array.isArray(a)?a:{};let i={};return a.displayMode&&(i.displayMode=a.displayMode.toString()),a.title&&(i.title=a.title.toString()),a.config&&(i.config=a.config),{text:t.slice(r[0].length),metadata:i}}e(ye,"extractFrontMatter");var ri=e(t=>t.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(r,a,i)=>"<"+a+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ei=e(t=>{let{text:r,metadata:a}=ye(t),{displayMode:i,title:o,config:n={}}=a;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:o,config:n,text:r}},"processFrontmatter"),ai=e(t=>{let r=z.detectInit(t)??{},a=z.detectDirective(t,"wrap");return Array.isArray(a)?r.wrap=a.some(({type:i})=>i==="wrap"):a?.type==="wrap"&&(r.wrap=!0),{text:Vt(t),directive:r}},"processDirectives");function Lt(t){let r=ri(t),a=ei(r),i=ai(a.text),o=$t(a.config,i.directive);return t=De(i.text),{code:t,title:a.title,config:o}}e(Lt,"preprocessDiagram");function xe(t){let r=new TextEncoder().encode(t),a=Array.from(r,i=>String.fromCodePoint(i)).join("");return btoa(a)}e(xe,"toBase64");var ii=5e4,oi="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",ni="sandbox",si="loose",ci="http://www.w3.org/2000/svg",mi="http://www.w3.org/1999/xlink",pi="http://www.w3.org/1999/xhtml",di="100%",fi="100%",li="border:0;margin:0;",gi="margin:0",ui="allow-top-navigation-by-user-activation allow-popups",Di='The "iframe" tag is not supported by your browser.',yi=["foreignobject"],xi=["dominant-baseline"];function be(t){let r=Lt(t);return Y(),It(r.config??{}),r}e(be,"processAndSetConfigs");async function hi(t,r){$();try{let{code:a,config:i}=be(t);return{diagramType:(await Le(a)).type,config:i}}catch(a){if(r?.suppressErrors)return!1;throw a}}e(hi,"parse");var he=e((t,r,a=[])=>` +.${t} ${r} { ${a.join(" !important; ")} !important; }`,"cssImportantStyles"),Ei=e((t,r=new Map)=>{let a="";if(t.themeCSS!==void 0&&(a+=` +${t.themeCSS}`),t.fontFamily!==void 0&&(a+=` +:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(a+=` +:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),r instanceof Map){let m=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(s=>{xt(s.styles)||m.forEach(c=>{a+=he(s.id,c,s.styles)}),xt(s.textStyles)||(a+=he(s.id,"tspan",(s?.textStyles||[]).map(c=>c.replace("color","fill"))))})}return a},"createCssStyles"),wi=e((t,r,a,i)=>{let o=Ei(t,a),n=zt(r,o,t.themeVariables);return pt(pe(`${i}{${n}}`),de)},"createUserStyles"),bi=e((t="",r,a)=>{let i=t;return!a&&!r&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ht(i),i=i.replace(/
/g,"
"),i},"cleanUpSvgCode"),Li=e((t="",r)=>{let a=r?.viewBox?.baseVal?.height?r.viewBox.baseVal.height+"px":fi,i=xe(`${t}`);return``},"putIntoIFrame"),Ee=e((t,r,a,i,o)=>{let n=t.append("div");n.attr("id",a),i&&n.attr("style",i);let m=n.append("svg").attr("id",r).attr("width","100%").attr("xmlns",ci);return o&&m.attr("xmlns:xlink",o),m.append("g"),t},"appendDivSvgG");function we(t,r){return t.append("iframe").attr("id",r).attr("style","width: 100%; height: 100%;").attr("sandbox","")}e(we,"sandboxedIframe");var vi=e((t,r,a,i)=>{t.getElementById(r)?.remove(),t.getElementById(a)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),Si=e(async function(t,r,a){$();let i=be(r);r=i.code;let o=_();l.debug(o),r.length>(o?.maxTextSize??ii)&&(r=oi);let n="#"+t,m="i"+t,s="#"+m,c="d"+t,g="#"+c,y=e(()=>{let ft=k(x?s:g).node();ft&&"remove"in ft&&ft.remove()},"removeTempElements"),p=k("body"),x=o.securityLevel===ni,A=o.securityLevel===si,L=o.fontFamily;if(a!==void 0){if(a&&(a.innerHTML=""),x){let M=we(k(a),m);p=k(M.nodes()[0].contentDocument.body),p.node().style.margin=0}else p=k(a);Ee(p,t,c,`font-family: ${L}`,mi)}else{if(vi(document,t,c,m),x){let M=we(k("body"),m);p=k(M.nodes()[0].contentDocument.body),p.node().style.margin=0}else p=k("body");Ee(p,t,c)}let f,C;try{f=await B.fromText(r,{title:i.title})}catch(M){if(o.suppressErrorRendering)throw y(),M;f=await B.fromText("error"),C=M}let v=p.select(g).node(),u=f.type,S=v.firstChild,R=S.firstChild,T=f.renderer.getClasses?.(r,f),E=wi(o,u,T,n),d=document.createElement("style");d.innerHTML=E,S.insertBefore(d,R);try{await f.renderer.draw(r,t,ht,f)}catch(M){throw o.suppressErrorRendering?y():Tr.draw(r,t,ht),M}let Ce=p.select(`${g} svg`),Re=f.db.getAccTitle?.(),ke=f.db.getAccDescription?.();Ai(u,Ce,Re,ke),p.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",pi);let F=p.select(g).node().innerHTML;if(l.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),F=bi(F,x,_t(o.arrowMarkerAbsolute)),x){let M=p.select(g+" svg").node();F=Li(F,M)}else A||(F=Ft.sanitize(F,{ADD_TAGS:yi,ADD_ATTR:xi,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(ue(),C)throw C;return y(),{diagramType:u,svg:F,bindFunctions:f.db.bindFunctions}},"render");function Mi(t={}){let r=Rt({},t);r?.fontFamily&&!r.themeVariables?.fontFamily&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),Ot(r),r?.theme&&r.theme in tt?r.themeVariables=tt[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=tt.default.getThemeVariables(r.themeVariables));let a=typeof r=="object"?kt(r):Dt();lt(a.logLevel),$()}e(Mi,"initialize");var Le=e((t,r={})=>{let{code:a}=Lt(t);return B.fromText(a,r)},"getDiagramFromText");function Ai(t,r,a,i){fe(r,t),le(r,a,i,r.attr("id"))}e(Ai,"addA11yInfo");var I=Object.freeze({render:Si,parse:hi,getDiagramFromText:Le,initialize:Mi,getConfig:_,setConfig:jt,getSiteConfig:Dt,updateSiteConfig:Pt,reset:e(()=>{Y()},"reset"),globalReset:e(()=>{Y(ut)},"globalReset"),defaultConfig:ut});lt(_().logLevel);Y(_());var Ti=e((t,r,a)=>{l.warn(t),yt(t)?(a&&a(t.str,t.hash),r.push({...t,message:t.str,error:t})):(a&&a(t),t instanceof Error&&r.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),ve=e(async function(t={querySelector:".mermaid"}){try{await Ci(t)}catch(r){if(yt(r)&&l.error(r.str),P.parseError&&P.parseError(r),!t.suppressErrors)throw l.error("Use the suppressErrors option to suppress these errors"),r}},"run"),Ci=e(async function({postRenderCallback:t,querySelector:r,nodes:a}={querySelector:".mermaid"}){let i=I.getConfig();l.debug(`${t?"":"No "}Callback function found`);let o;if(a)o=a;else if(r)o=document.querySelectorAll(r);else throw new Error("Nodes and querySelector are both undefined");l.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(l.debug("Start On Load: "+i?.startOnLoad),I.updateSiteConfig({startOnLoad:i?.startOnLoad}));let n=new z.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),m,s=[];for(let c of Array.from(o)){l.info("Rendering diagram: "+c.id);if(c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");let g=`mermaid-${n.next()}`;m=c.innerHTML,m=Mt(z.entityDecode(m)).trim().replace(//gi,"
");let y=z.detectInit(m);y&&l.debug("Detected early reinit: ",y);try{let{svg:p,bindFunctions:x}=await Te(g,m,c);c.innerHTML=p,t&&await t(g),x&&x(c)}catch(p){Ti(p,s,P.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Se=e(function(t){I.initialize(t)},"initialize"),Ri=e(async function(t,r,a){l.warn("mermaid.init is deprecated. Please use run instead."),t&&Se(t);let i={postRenderCallback:a,querySelector:".mermaid"};typeof r=="string"?i.querySelector=r:r&&(r instanceof HTMLElement?i.nodes=[r]:i.nodes=r),await ve(i)},"init"),ki=e(async(t,{lazyLoad:r=!0}={})=>{$(),J(...t),r===!1&&await Yr()},"registerExternalDiagrams"),Me=e(function(){if(P.startOnLoad){let{startOnLoad:t}=I.getConfig();t&&P.run().catch(r=>l.error("Mermaid failed to initialize",r))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",Me,!1)}var Oi=e(function(t){P.parseError=t},"setParseErrorHandler"),dt=[],vt=!1,Ae=e(async()=>{if(!vt){for(vt=!0;dt.length>0;){let t=dt.shift();if(t)try{await t()}catch(r){l.error("Error executing queue",r)}}vt=!1}},"executeQueue"),Pi=e(async(t,r)=>new Promise((a,i)=>{let o=e(()=>new Promise((n,m)=>{I.parse(t,r).then(s=>{n(s),a(s)},s=>{l.error("Error parsing",s),P.parseError?.(s),m(s),i(s)})}),"performCall");dt.push(o),Ae().catch(i)}),"parse"),Te=e((t,r,a)=>new Promise((i,o)=>{let n=e(()=>new Promise((m,s)=>{I.render(t,r,a).then(c=>{m(c),i(c)},c=>{l.error("Error parsing",c),P.parseError?.(c),s(c),o(c)})}),"performCall");dt.push(n),Ae().catch(o)}),"render"),P={startOnLoad:!0,mermaidAPI:I,parse:Pi,render:Te,init:Ri,run:ve,registerExternalDiagrams:ki,registerLayoutLoaders:Bt,initialize:Se,parseError:void 0,contentLoaded:Me,setParseErrorHandler:Oi,detectType:Z,registerIconPacks:St},Is=P;export{Is as default}; +/*! Check if previously processed */ +/*! + * Wait for document loaded before starting the execution + */ -- cgit v1.2.3