37 lines
148 KiB
JavaScript
37 lines
148 KiB
JavaScript
|
|
import{a as tr}from"./chunk-4KE642ED.mjs";import{a as _e}from"./chunk-353K7GK5.mjs";import"./chunk-DY3L2I7V.mjs";import"./chunk-6DHVG6KC.mjs";import"./chunk-EOITJJC2.mjs";import"./chunk-TLYDTAVK.mjs";import"./chunk-JXEFGRG2.mjs";import"./chunk-6XQQT3RD.mjs";import{a as er}from"./chunk-ASAHGCDZ.mjs";import{a as Ne}from"./chunk-7SRKK4IT.mjs";import{a as He,b as We,c as ue,g as de}from"./chunk-GOL2OBWC.mjs";import{l as Ke,p as je}from"./chunk-EFRVIJHI.mjs";import"./chunk-THXVA4DE.mjs";import{M as Ve,O as Be,P as ze,Q as $e,R as ke,S as Ze,T as Je,U as qe,W as ge,i as Ye,q as Ue,w as Xe}from"./chunk-KXVH62NG.mjs";import{b as fe,h as Qe}from"./chunk-63GW7ZVL.mjs";import"./chunk-XW6ABFJP.mjs";import"./chunk-2XYWPRAO.mjs";import"./chunk-OMTJKCYW.mjs";import"./chunk-IQQE2MEC.mjs";import"./chunk-A4ITRWGT.mjs";import{a as L,b as Ae,e as mr}from"./chunk-GTKDMUJJ.mjs";var xe=Ae((se,we)=>{"use strict";L((function(C,T){typeof se=="object"&&typeof we=="object"?we.exports=T():typeof define=="function"&&define.amd?define([],T):typeof se=="object"?se.layoutBase=T():C.layoutBase=T()}),"webpackUniversalModuleDefinition")(se,function(){return(function(D){var C={};function T(g){if(C[g])return C[g].exports;var o=C[g]={i:g,l:!1,exports:{}};return D[g].call(o.exports,o,o.exports,T),o.l=!0,o.exports}return L(T,"__webpack_require__"),T.m=D,T.c=C,T.i=function(g){return g},T.d=function(g,o,n){T.o(g,o)||Object.defineProperty(g,o,{configurable:!1,enumerable:!0,get:n})},T.n=function(g){var o=g&&g.__esModule?L(function(){return g.default},"getDefault"):L(function(){return g},"getModuleExports");return T.d(o,"a",o),o},T.o=function(g,o){return Object.prototype.hasOwnProperty.call(g,o)},T.p="",T(T.s=28)})([(function(D,C,T){"use strict";function g(){}L(g,"LayoutConstants"),g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,D.exports=g}),(function(D,C,T){"use strict";var g=T(2),o=T(8),n=T(9);function r(c,t,u){g.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=c,this.target=t}L(r,"LEdge"),r.prototype=Object.create(g.prototype);for(var a in g)r[a]=g[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(c){if(this.source===c)return this.target;if(this.target===c)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(c,t){for(var u=this.getOtherEnd(c),i=t.getGraphManager().getRoot();;){if(u.getOwner()==t)return u;if(u.getOwner()==i)break;u=u.getOwner().getParent()}return null},r.prototype.updateLength=function(){var c=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),c),this.isOverlapingSourceAndTarget||(this.lengthX=c[0]-c[2],this.lengthY=c[1]-c[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.length
|
||
|
|
.edge {
|
||
|
|
stroke-width: ${D.archEdgeWidth};
|
||
|
|
stroke: ${D.archEdgeColor};
|
||
|
|
fill: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.arrow {
|
||
|
|
fill: ${D.archEdgeArrowColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.node-bkg {
|
||
|
|
fill: none;
|
||
|
|
stroke: ${D.archGroupBorderColor};
|
||
|
|
stroke-width: ${D.archGroupBorderWidth};
|
||
|
|
stroke-dasharray: 8;
|
||
|
|
}
|
||
|
|
.node-icon-text {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.node-icon-text > div {
|
||
|
|
color: #fff;
|
||
|
|
margin: 1px;
|
||
|
|
height: fit-content;
|
||
|
|
text-align: center;
|
||
|
|
overflow: hidden;
|
||
|
|
display: -webkit-box;
|
||
|
|
-webkit-box-orient: vertical;
|
||
|
|
}
|
||
|
|
`,"getStyles"),lr=Nr;var pr=mr(cr(),1);var ie=L(D=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${D}</g>`,"wrapIcon"),Kt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:ie('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:ie('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:ie('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit:
|
||
|
|
translate(${S}, ${M-p.height/2})
|
||
|
|
translate(${E*O.width/2}, ${d*O.height/2})
|
||
|
|
rotate(${-1*E*d*45}, 0, ${p.height/2})
|
||
|
|
`)}}}}}))},"drawEdges"),ur=L(async function(D,C,T){let o=T.getConfigField("padding")*.75,n=T.getConfigField("fontSize"),a=T.getConfigField("iconSize")/2;await Promise.all(C.nodes().map(async c=>{let t=Jt(c);if(t.type==="group"){let{h:u,w:i,x1:e,y1:h}=c.boundingBox(),f=D.append("rect");f.attr("id",`group-${t.id}`).attr("x",e+a).attr("y",h+a).attr("width",i).attr("height",u).attr("class","node-bkg");let l=D.append("g"),A=e,y=h;if(t.icon){let v=l.append("g");v.html(`<g>${await ue(t.icon,{height:o,width:o,fallbackPrefix:Kt.prefix})}</g>`),v.attr("transform","translate("+(A+a+1)+", "+(y+a+1)+")"),A+=o,y+=n/2-1-2}if(t.label){let v=l.append("g");await de(v,t.label,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},ge()),v.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),v.attr("transform","translate("+(A+a+4)+", "+(y+a+2)+")")}T.setElementForId(t.id,f)}}))},"drawGroups"),gr=L(async function(D,C,T){let g=ge();for(let o of T){let n=C.append("g"),r=D.getConfigField("iconSize");if(o.title){let u=n.append("g");await de(u,o.title,{useHtmlLabels:!1,width:r*1.5,classes:"architecture-service-label"},g),u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),u.attr("transform","translate("+r/2+", "+r+")")}let a=n.append("g");if(o.icon)a.html(`<g>${await ue(o.icon,{height:r,width:r,fallbackPrefix:Kt.prefix})}</g>`);else if(o.iconText){a.html(`<g>${await ue("blank",{height:r,width:r,fallbackPrefix:Kt.prefix})}</g>`);let e=a.append("g").append("foreignObject").attr("width",r).attr("height",r).append("div").attr("class","node-icon-text").attr("style",`height: ${r}px;`).append("div").html(Xe(o.iconText,g)),h=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;e.attr("style",`-webkit-line-clamp: ${Math.floor((r-2)/h)};`)}else a.append("path").attr("class","node-bkg").attr("id","node-"+o.id).attr("d",`M0 ${r} v${-r} q0,-5 5,-5 h${r} q5,0 5,5 v${r} H0 Z`);n.attr("id",`service-${o.id}`).attr("class","architecture-service");let{width:c,height:t}=n.node().getBBox();o.width=c,o.height=t,D.setElementForId(o.id,n)}return 0},"drawServices"),dr=L(function(D,C,T){T.forEach(g=>{let o=C.append("g"),n=D.getConfigField("iconSize");o.append("g").append("rect").attr("id","node-"+g.id).attr("fill-opacity","0").attr("width",n).attr("height",n),o.attr("class","architecture-junction");let{width:a,height:c}=o._groups[0][0].getBBox();o.width=a,o.height=c,D.setElementForId(g.id,o)})},"drawJunctions");We([{name:Kt.prefix,icons:Kt}]);Ne.use(pr.default);function Lr(D,C,T){D.forEach(g=>{C.add({group:"nodes",data:{type:"service",id:g.id,icon:g.icon,label:g.title,parent:g.in,width:T.getConfigField("iconSize"),height:T.getConfigField("iconSize")},classes:"node-service"})})}L(Lr,"addServices");function Dr(D,C,T){D.forEach(g=>{C.add({group:"nodes",data:{type:"junction",id:g.id,parent:g.in,width:T.getConfigField("iconSize"),height:T.getConfigField("iconSize")},classes:"node-junction"})})}L(Dr,"addJunctions");function Cr(D,C){C.nodes().map(T=>{let g=Jt(T);if(g.type==="group")return;g.x=T.position().x,g.y=T.position().y,D.getElementById(g.id).attr("transform","translate("+(g.x||0)+","+(g.y||0)+")")})}L(Cr,"positionNodes");function Mr(D,C){D.forEach(T=>{C.add({group:"nodes",data:{type:"group",id:T.id,icon:T.icon,label:T.title,parent:T.in},classes:"node-group"})})}L(Mr,"addGroups");function wr(D,C){D.forEach(T=>{let{lhsId:g,rhsId:o,lhsInto:n,lhsGroup:r,rhsInto:a,lhsDir:c,rhsDir:t,rhsGroup:u,title:i}=T,e=ae(T.lhsDir,T.rhsDir)?"segments":"straight",h={id:`${g}-${o}`,label:i,source:g,sourceDir:c,sourceArrow:n,sourceGroup:r,sourceEndpoint:c==="L"?"0 50%":c==="R"?"100% 50%":c==="T"?"50% 0":"50% 100%",target:o,targetDir:t,targetArrow:a,targetGroup:u,targetEndpoint:t==="L"?"0 50%":t==="R"?"100% 50%":t==="T"?"50% 0":"50% 100%"};C.add({group:"edges",data:h,classes:e})})}L(wr,"addEdges");function xr(D,C,T){let g=L((a,c)=>Object.entries(a).reduce((t,[u,i])=>{let e=0,h=Object.entries(i);if(
|