37 lines
149 KiB
JavaScript
37 lines
149 KiB
JavaScript
|
|
import{a as tr}from"./chunk-JQRUD6KW.mjs";import{a as _e}from"./chunk-2T2R6R2M.mjs";import"./chunk-UP6H54XL.mjs";import"./chunk-UXSXWOXI.mjs";import"./chunk-C62D2QBJ.mjs";import"./chunk-CEXFNPSA.mjs";import"./chunk-RERM46MO.mjs";import"./chunk-J5EP6P6S.mjs";import"./chunk-RLI5ZMPA.mjs";import"./chunk-2UTLFMKG.mjs";import"./chunk-RKZBBQEN.mjs";import{a as er}from"./chunk-LRIF4GLE.mjs";import{a as Ne}from"./chunk-3SSMPTDK.mjs";import{a as He,b as We,c as ue,f as de}from"./chunk-INKRHTLW.mjs";import{o as Ke,s as je}from"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import{A as Xe,P as Ve,S as ze,T as Be,U as $e,V as ke,W as Ze,X as Je,Y as qe,_ as ge,j as Ye,t as Ue}from"./chunk-67TQ5CYL.mjs";import{b as fe,h as Qe}from"./chunk-7W6UQGC5.mjs";import"./chunk-KGYTTC2M.mjs";import"./chunk-4R4BOZG6.mjs";import{a as L,b as Ae,d as mr}from"./chunk-AQ6EADP3.mjs";var xe=Ae((se,Me)=>{"use strict";L((function(C,T){typeof se=="object"&&typeof Me=="object"?Me.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(u){if(C[u])return C[u].exports;var h=C[u]={i:u,l:!1,exports:{}};return D[u].call(h.exports,h,h.exports,T),h.l=!0,h.exports}return L(T,"__webpack_require__"),T.m=D,T.c=C,T.i=function(u){return u},T.d=function(u,h,a){T.o(u,h)||Object.defineProperty(u,h,{configurable:!1,enumerable:!0,get:a})},T.n=function(u){var h=u&&u.__esModule?L(function(){return u.default},"getDefault"):L(function(){return u},"getModuleExports");return T.d(h,"a",h),h},T.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},T.p="",T(T.s=28)})([(function(D,C,T){"use strict";function u(){}L(u,"LayoutConstants"),u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,D.exports=u}),(function(D,C,T){"use strict";var u=T(2),h=T(8),a=T(9);function i(c,t,f){u.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=c,this.target=t}L(i,"LEdge"),i.prototype=Object.create(u.prototype);for(var n in u)i[n]=u[n];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.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"},i.prototype.getOtherEndInGraph=function(c,t){for(var f=this.getOtherEnd(c),e=t.getGraphManager().getRoot();;){if(f.getOwner()==t)return f;if(f.getOwner()==e)break;f=f.getOwner().getParent()}return null},i.prototype.updateLength=function(){var c=new Array(4);this.isOverlapingSourceAndTarget=h.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.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(${w}, ${P-E.height/2})
|
||
|
|
translate(${p*x.width/2}, ${O*x.height/2})
|
||
|
|
rotate(${-1*p*O*45}, 0, ${E.height/2})
|
||
|
|
`)}}}}}))},"drawEdges"),ur=L(async function(D,C,T,u){let a=T.getConfigField("padding")*.75,i=T.getConfigField("fontSize"),c=T.getConfigField("iconSize")/2;await Promise.all(C.nodes().map(async t=>{let f=Jt(t);if(f.type==="group"){let{h:e,w:r,x1:l,y1:g}=t.boundingBox(),s=D.append("rect");s.attr("id",`${u}-group-${f.id}`).attr("x",l+c).attr("y",g+c).attr("width",r).attr("height",e).attr("class","node-bkg");let A=D.append("g"),y=l,v=g;if(f.icon){let N=A.append("g");N.html(`<g>${await ue(f.icon,{height:a,width:a,fallbackPrefix:Kt.prefix})}</g>`),N.attr("transform","translate("+(y+c+1)+", "+(v+c+1)+")"),y+=a,v+=i/2-1-2}if(f.label){let N=A.append("g");await de(N,f.label,{useHtmlLabels:!1,width:r,classes:"architecture-service-label"},ge()),N.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),N.attr("transform","translate("+(y+c+4)+", "+(v+c+2)+")")}T.setElementForId(f.id,s)}}))},"drawGroups"),gr=L(async function(D,C,T,u){let h=ge();for(let a of T){let i=C.append("g"),n=D.getConfigField("iconSize");if(a.title){let e=i.append("g");await de(e,a.title,{useHtmlLabels:!1,width:n*1.5,classes:"architecture-service-label"},h),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+n/2+", "+n+")")}let c=i.append("g");if(a.icon)c.html(`<g>${await ue(a.icon,{height:n,width:n,fallbackPrefix:Kt.prefix})}</g>`);else if(a.iconText){c.html(`<g>${await ue("blank",{height:n,width:n,fallbackPrefix:Kt.prefix})}</g>`);let l=c.append("g").append("foreignObject").attr("width",n).attr("height",n).append("div").attr("class","node-icon-text").attr("style",`height: ${n}px;`).append("div").html(Xe(a.iconText,h)),g=parseInt(window.getComputedStyle(l.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;l.attr("style",`-webkit-line-clamp: ${Math.floor((n-2)/g)};`)}else c.append("path").attr("class","node-bkg").attr("id",`${u}-node-${a.id}`).attr("d",`M0,${n} V5 Q0,0 5,0 H${n-5} Q${n},0 ${n},5 V${n} Z`);i.attr("id",`${u}-service-${a.id}`).attr("class","architecture-service");let{width:t,height:f}=i.node().getBBox();a.width=t,a.height=f,D.setElementForId(a.id,i)}return 0},"drawServices"),dr=L(function(D,C,T,u){T.forEach(h=>{let a=C.append("g"),i=D.getConfigField("iconSize");a.append("g").append("rect").attr("id",`${u}-node-${h.id}`).attr("fill-opacity","0").attr("width",i).attr("height",i),a.attr("class","architecture-junction");let{width:c,height:t}=a._groups[0][0].getBBox();a.width=c,a.height=t,D.setElementForId(h.id,a)})},"drawJunctions");We([{name:Kt.prefix,icons:Kt}]);Ne.use(pr.default);function Lr(D,C,T){D.forEach(u=>{C.add({group:"nodes",data:{type:"service",id:u.id,icon:u.icon,label:u.title,parent:u.in,width:T.getConfigField("iconSize"),height:T.getConfigField("iconSize")},classes:"node-service"})})}L(Lr,"addServices");function Dr(D,C,T){D.forEach(u=>{C.add({group:"nodes",data:{type:"junction",id:u.id,parent:u.in,width:T.getConfigField("iconSize"),height:T.getConfigField("iconSize")},classes:"node-junction"})})}L(Dr,"addJunctions");function Cr(D,C){C.nodes().map(T=>{let u=Jt(T);if(u.type==="group")return;u.x=T.position().x,u.y=T.position().y,D.getElementById(u.id).attr("transform","translate("+(u.x||0)+","+(u.y||0)+")")})}L(Cr,"positionNodes");function wr(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(wr,"addGroups");function Mr(D,C){D.forEach(T=>{let{lhsId:u,rhsId:h,lhsInto:a,lhsGroup:i,rhsInto:n,lhsDir:c,rhsDir:t,rhsGroup:f,title:e}=T,r=ae(T.lhsDir,T.rhsDir)?"segments":"straight",l={id:`${u}-${h}`,label:e,source:u,sourceDir:c,sourceArrow:a,sourceGroup:i,sourceEndpoint:c==="L"?"0 50%":c==="R"?"100% 50%":c==="T"?"50% 0":"50% 100%",target:h,targetDir:t,targetArrow:n,targetGroup:f,targetEndpoint:t==="L"?"0 50%":t==="R"?"100% 50%":t==="T"?"50% 0":"50% 100%"};C.add({group:"edges",data:l,classes:r})})}L(Mr,"addEdges");function xr(D,C,T){let u=L((n,c)=>Object.entries(n).reduce((t,[f,e])=>{le
|