PageSourceSearch

https://app.pulumi.com/chunk-SUZYKWKW.js

js pulumi.com collected 2026-09-24 08:29:06 UTC 28,158 bytes, 40 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d79b29b0-e1ec-5d1f-89a9-c845c64cb81a")}catch(e){}}();
3import{a as me}from"./chunk-6MRZZVFL.js";import{a as we}from"./chunk-JFTDZTFV.js";import"./chunk-NLV7VSO3.js";import{a as he}from"./chunk-WYGYBMWR.js";import"./chunk-CB7EZ5JL.js";import"./chunk-RO3T7V4S.js";import"./chunk-JDZDMVNY.js";import"./chunk-NI3WHUNF.js";import"./chunk-BCURNYD7.js";import"./chunk-OZBAEEG3.js";import"./chunk-KFSQEYMX.js";import"./chunk-D5VZV23O.js";import"./chunk-47DTPZVN.js";import"./chunk-FGY6DL73.js";import"./chunk-LHWM6OY6.js";import"./chunk-GVZ5IDJC.js";import"./chunk-PGSG5M2D.js";import"./chunk-KUX5NN3Y.js";import"./chunk-7BBWNLDG.js";import{a as Fe}from"./chunk-6K6IYOI2.js";import{a as V}from"./chunk-S73N6Y4Q.js";import{d as _}from"./chunk-25LEHWSQ.js";import{a as fe,b as ge,d as N}from"./chunk-2QHQZFF7.js";import{o as ue,s as pe}from"./chunk-VKLUYLAJ.js";import"./chunk-UYY2SUBL.js";import{G as te,O as re,S as ie,T as se,U as ne,V as oe,W as ae,X as ce,Y as le,Z as Y,j as U,t as ee}from"./chunk-DQGO7NZ2.js";import"./chunk-DZAP62TN.js";import{a as Z}from"./chunk-YM3IBQ2Y.js";import{j as de}from"./chunk-D3IISWFN.js";import"./chunk-LWC2IYO2.js";import{a as c}from"./chunk-4PJLQSXC.js";import{a as j,b as O,g as ze,j as z}from"./chunk-LQBRM3ES.js";var Se=ze(Fe(),1);var ye={L:"left",R:"right",T:"top",B:"bottom"},ke={L:c(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:c(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:c(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:c(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},H={L:c((e,t)=>e-t+2,"L"),R:c((e,t)=>e-2,"R"),T:c((e,t)=>e-t+2,"T"),B:c((e,t)=>e-2,"B")},Pe=c(function(e){return M(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),xe=c(function(e){let t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),M=c(function(e){let t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),F=c(function(e){let t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),K=c(function(e,t){let r=M(e)&&F(t),s=F(e)&&M(t);return r||s},"isArchitectureDirectionXY"),Ge=c(function(e){let t=e[0],r=e[1],s=M(t)&&F(r),i=F(t)&&M(r);return s||i},"isArchitecturePairXY"),Re=c(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),q=c(function(e,t){let r=`${e}${t}`;return Re(r)?r:void 0},"getArchitectureDirectionPair"),je=c(function([e,t],r){let s=r[0],i=r[1];return M(s)?F(i)?[e+(s==="L"?-1:1),t+(i==="T"?1:-1)]:[e+(s==="L"?-1:1),t]:M(i)?[e+(i==="L"?1:-1),t+(s==="T"?1:-1)]:[e,t+(s==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Xe=c(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ye=c(function(e,t){return K(e,t)?"bend":M(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Ne=c(function(e){return e.type==="service"},"isArchitectureService"),_e=c(function(e){return e.type==="junction"},"isArchitectureJunction"),ve=c((e,t)=>{let[r,s]=[e,t].sort();return`${JSON.stringify(r)}-${JSON.stringify(s)}`},"architectureGroupAlignmentKey"),$e=c(e=>e.data(),"edgeData"),R=c(e=>e.data(),"nodeData"),He=U.architecture,Ee=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=se,this.getAccTitle=ne,this.setDiagramTitle=ce,this.getDiagramTitle=le,this.getAccDescription=ae,this.setAccDescription=oe,this.clear()}static{c(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",ie()}addService({id:e,icon:t,in:r,title:s,iconText:i}){if(this.registeredIds.has(e))throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);
vendor: 5,875 bytes, lines 3-21
3if(r!==void 0){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(r)==="node")throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:t,iconText:i,title:s,edges:[],in:r})}getServices(){return[...this.nodes.values()].filter(Ne)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)==="node")throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(_e)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:r,title:s}){if(this.registeredIds.has(e))throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(r)==="node")throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:t,title:s,in:r})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:s,lhsInto:i,rhsInto:f,lhsGroup:g,rhsGroup:d,title:h}){if(!xe(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!xe(s))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(s)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let n=this.nodes.get(e).in,l=this.nodes.get(t).in;if(g&&n&&l&&n==l)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(d&&n&&l&&n==l)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let a={lhsId:e,lhsDir:r,lhsInto:i,lhsGroup:g,rhsId:t,rhsDir:s,rhsInto:f,rhsGroup:d,title:h};this.edges.push(a);let o=this.nodes.get(e),u=this.nodes.get(t);o&&u&&(o.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(r=>{if(this.registeredIds.get(r)!=="node")throw new Error(`align ${e.direction} references [${r}], which is not a service or junction`);if(t.has(r))throw new Error(`align ${e.direction} lists [${r}] more than once`);t.add(r)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,t=new Map;for(let[g,d]of this.nodes.entries()){let h=new Map;for(let n of d.edges){let l=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(l&&a&&l!==a){let o=Ye(n.lhsDir,n.rhsDir);o!=="bend"&&e.set(ve(l,a),o)}if(n.lhsId===g){let o=q(n.lhsDir,n.rhsDir);o&&h.set(o,n.rhsId)}else{let o=q(n.rhsDir,n.lhsDir);o&&h.set(o,n.lhsId)}}t.set(g,h)}let r=new Set,s=new Set(t.keys()),i=c(g=>{let d=new Map([[g,[0,0]]]),h=[g];for(;h.length>0;){let n=h.shift();if(n){r.add(n),s.delete(n);let l=t.get(n);if(!l)throw new Error(`BFS error: adjacency list for id ${n} not found. Please report this as a bug.`);let a=d.get(n);if(!a)throw new Error(`BFS error: position for id ${n} not found in spatial map. Please report this as a bug.`);let[o,u]=a;l.forEach((w,m)=>{r.has(w)||(d.set(w,je([o,u],m)),h.push(w))})}}return d},"BFS"),f=[];for(;s.size>0;){let g=s.values().next().value;f.push(i(g))}this.dataStructures={adjList:t,spatialMaps:f,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return ue(j(j({},He),ee().architecture))}getConfigField(e){return this.getConfig()[e]}},Je=c((e,t)=>{me(e,t),e.groups.map(r=>t.addGroup(r)),e.services.map(r=>t.addService(O(j({},r),{type:"service"}))),e.junctions.map(r=>t.addJunction(O(j({},r),{type:"junction"}))),e.edges.map(r=>t.addEdge(r)),e.alignments?.map(r=>t.addLayoutHint({direction:r.direction,members:[...r.members]}))},"populateDb"),be={parser:{yy:void 0},parse:c(e=>z(null,null,function*(){let t=yield we("architecture",e);Z.debug(t);let r=be.parser?.yy;if(!(r instanceof Ee))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Je(t,r)}),"parse")},Oe=c(e=>`
4  .edge {
5    stroke-width: ${e.archEdgeWidth};
6    stroke: ${e.archEdgeColor};
7    fill: none;
8  }
9
10  .arrow {
11    fill: ${e.archEdgeArrowColor};
12  }
13
14  .node-bkg {
15    fill: none;
16    stroke: ${e.archGroupBorderColor};
17    stroke-width: ${e.archGroupBorderWidth};
18    stroke-dasharray: 8;
19  }
20  .node-icon-text {
21    display: flex; 
22    align-items: center;
23  }
24  
25  .node-icon-text > div {
26    color: #fff;
27    margin: 1px;
28    height: fit-content;
29    text-align: center;
30    overflow: hidden;
31    display: -webkit-box;
32    -webkit-box-orient: vertical;
33  }
34`,"getStyles"),Ze=Oe;function W(e,t){if(e===0)return t();let r=Math.random,s=e>>>0;Math.random=function(){s=s+1831565813>>>0;let i=s;return i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61),((i^i>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=r}}c(W,"withSeededRandom");var G=c(e=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),X={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:G('<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:G('<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:G('<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: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:G('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:G('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:fe,blank:{body:G("")}}},Ve=c(function(e,t,r,s){return z(this,null,function*(){let i=r.getConfigField("padding"),f=r.getConfigField("iconSize"),g=f/2,d=f/6,h=d/2;yield Promise.all(t.edges().map(n=>z(null,null,function*(){let{source:l,sourceDir:a,sourceArrow:o,sourceGroup:u,target:w,targetDir:m,targetArrow:D,targetGroup:x,label:S}=$e(n),{x:p,y}=n[0].sourceEndpoint(),{x:k,y:b}=n[0].midpoint(),{x:$,y:T}=n[0].targetEndpoint(),E=i+4;if(u&&(M(a)?p+=a==="L"?-E:E:y+=a==="T"?-E:E+18),x&&(M(m)?$+=m==="L"?-E:E:T+=m==="T"?-E:E+18),!u&&r.getNode(l)?.type==="junction"&&(M(a)?p+=a==="L"?g:-g:y+=a==="T"?g:-g),!x&&r.getNode(w)?.type==="junction"&&(M(m)?$+=m==="L"?g:-g:T+=m==="T"?g:-g),n[0]._private.rscratch){let A=e.insert("g");if(A.insert("path").attr("d",`M ${p},${y} L ${k},${b} L${$},${T} `).attr("class","edge").attr("id",`${s}-${pe(l,w,{prefix:"L"})}`),o){let v=M(a)?H[a](p,d):p-h,I=F(a)?H[a](y,d):y-h;A.insert("polygon").attr("points",ke[a](d)).attr("transform",`translate(${v},${I})`).attr("class","arrow")}if(D){let v=M(m)?H[m]($,d):$-h,I=F(m)?H[m](T,d):T-h;A.insert("polygon").attr("points",ke[m](d)).attr("transform",`translate(${v},${I})`).attr("class","arrow")}if(S){let v=K(a,m)?"XY":M(a)?"X":"Y",I=0;v==="X"?I=Math.abs(p-$):v==="Y"?I=Math.abs(y-T)/1.5:I=Math.abs(p-$)/2;let C=A.append("g");if(yield _(C,S,{useHtmlLabels:!1,width:I,classes:"architecture-service-label"},Y()),C.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),v==="X")C.attr("transform","translate("+k+", "+b+")");else if(v==="Y")C.attr("transform","translate("+k+", "+b+") rotate(-90)");else if(v==="XY"){let P=q(a,m);if(P&&Ge(P)){let B=C.node().getBoundingClientRect(),[L,J]=Xe(P);C.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*L*J*45})`);let Q=C.node().getBoundingClientRect();C.attr("transform",`
35                translate(${k}, ${b-B.height/2})
36                translate(${L*Q.width/2}, ${J*Q.height/2})
37                rotate(${-1*L*J*45}, 0, ${B.height/2})
38              `)}}}}})))})},"drawEdges"),qe=c(function(e,t,r,s){return z(this,null,function*(){let f=r.getConfigField("padding")*.75,g=r.getConfigField("fontSize"),h=r.getConfigField("iconSize")/2;
vendor: 8,937 bytes, line 38
38yield Promise.all(t.nodes().map(n=>z(null,null,function*(){let l=R(n);if(l.type==="group"){let{h:a,w:o,x1:u,y1:w}=n.boundingBox(),m=e.append("rect");m.attr("id",`${s}-group-${l.id}`).attr("x",u+h).attr("y",w+h).attr("width",o).attr("height",a).attr("class","node-bkg");let D=e.append("g"),x=u,S=w;if(l.icon){let p=D.append("g");p.html(`<g>${yield N(l.icon,{height:f,width:f,fallbackPrefix:X.prefix})}</g>`),p.attr("transform","translate("+(x+h+1)+", "+(S+h+1)+")"),x+=f,S+=g/2-1-2}if(l.label){let p=D.append("g");yield _(p,l.label,{useHtmlLabels:!1,width:o,classes:"architecture-service-label"},Y()),p.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),p.attr("transform","translate("+(x+h+4)+", "+(S+h+2)+")")}r.setElementForId(l.id,m)}})))})},"drawGroups"),We=c(function(e,t,r,s){return z(this,null,function*(){let i=Y();for(let f of r){let g=t.append("g"),d=e.getConfigField("iconSize");if(f.title){let a=g.append("g");yield _(a,f.title,{useHtmlLabels:!1,width:d*1.5,classes:"architecture-service-label"},i),a.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),a.attr("transform","translate("+d/2+", "+d+")")}let h=g.append("g");if(f.icon)h.html(`<g>${yield N(f.icon,{height:d,width:d,fallbackPrefix:X.prefix})}</g>`);else if(f.iconText){h.html(`<g>${yield N("blank",{height:d,width:d,fallbackPrefix:X.prefix})}</g>`);let u=h.append("g").append("foreignObject").attr("width",d).attr("height",d).append("div").attr("class","node-icon-text").attr("style",`height: ${d}px;`).append("div").html(te(f.iconText,i)),w=parseInt(window.getComputedStyle(u.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;u.attr("style",`-webkit-line-clamp: ${Math.floor((d-2)/w)};`)}else h.append("path").attr("class","node-bkg").attr("id",`${s}-node-${f.id}`).attr("d",`M0,${d} V5 Q0,0 5,0 H${d-5} Q${d},0 ${d},5 V${d} Z`);g.attr("id",`${s}-service-${f.id}`).attr("class","architecture-service");let{width:n,height:l}=g.node().getBBox();f.width=n,f.height=l,e.setElementForId(f.id,g)}return 0})},"drawServices"),Ke=c(function(e,t,r,s){r.forEach(i=>{let f=t.append("g"),g=e.getConfigField("iconSize");f.append("g").append("rect").attr("id",`${s}-node-${i.id}`).attr("fill-opacity","0").attr("width",g).attr("height",g),f.attr("class","architecture-junction");let{width:h,height:n}=f._groups[0][0].getBBox();f.width=h,f.height=n,e.setElementForId(i.id,f)})},"drawJunctions");ge([{name:X.prefix,icons:X}]);V.use(Se.default);function Ae(e,t,r){e.forEach(s=>{t.add({group:"nodes",data:{type:"service",id:s.id,icon:s.icon,label:s.title,parent:s.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}c(Ae,"addServices");function De(e,t,r){e.forEach(s=>{t.add({group:"nodes",data:{type:"junction",id:s.id,parent:s.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}c(De,"addJunctions");function Te(e,t){t.nodes().map(r=>{let s=R(r);if(s.type==="group")return;s.x=r.position().x,s.y=r.position().y,e.getElementById(s.id).attr("transform","translate("+(s.x||0)+","+(s.y||0)+")")})}c(Te,"positionNodes");function Ie(e,t){e.forEach(r=>{t.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}c(Ie,"addGroups");function Ce(e,t){e.forEach(r=>{let{lhsId:s,rhsId:i,lhsInto:f,lhsGroup:g,rhsInto:d,lhsDir:h,rhsDir:n,rhsGroup:l,title:a}=r,o=K(r.lhsDir,r.rhsDir)?"segments":"straight",u={id:`${s}-${i}`,label:a,source:s,sourceDir:h,sourceArrow:f,sourceGroup:g,sourceEndpoint:h==="L"?"0 50%":h==="R"?"100% 50%":h==="T"?"50% 0":"50% 100%",target:i,targetDir:n,targetArrow:d,targetGroup:l,targetEndpoint:n==="L"?"0 50%":n==="R"?"100% 50%":n==="T"?"50% 0":"50% 100%"};t.add({group:"edges",data:u,classes:o})})}c(Ce,"addEdges");function Me(e,t,r,s=[]){let i=c((o,u)=>{let w=new Map;for(let[m,D]of o.entries()){let x=`${m}`,S=0,p=[...D.entries()];if(p.length===1){w.set(x,p[0][1]);continue}for(let y=0;y<p.length-1;y++)for(let k=y+1;k<p.length;k++){let[b,$]=p[y],[T,E]=p[k];if(r.get(ve(b,T))===u)w.set(x,[...w.get(x)??[],...$,...E]);else if(b==="default"||T==="default")w.set(x,[...w.get(x)??[],...$,...E]);else{let v=`${x}-${S++}`;w.set(v,$);let I=`${x}-${S++}`;w.set(I,E)}}}return w},"flattenAlignments"),f=t.map(o=>{let u=new Map,w=new Map;return o.forEach(([m,D],x)=>{let S=e.getNode(x)?.in??"default",p=u.get(D)??new Map;u.has(D)||u.set(D,p);let y=w.get(m)??new Map;w.has(m)||w.set(m,y);for(let k of[p,y]){let b=k.get(S)??[];k.has(S)||k.set(S,b),b.push(x)}}),{horiz:[...i(u,"horizontal").values()].filter(m=>m.length>1),vert:[...i(w,"vertical").values()].filter(m=>m.length>1)}}),[g,d]=f.reduce(([o,u],{horiz:w,vert:m})=>[[...o,...w],[...u,...m]],[[],[]]),h=new Set;s.forEach(o=>o.members.forEach(u=>h.add(u)));let n=c(o=>o.filter(u=>!u.some(w=>h.has(w))),"dropOverlapping"),l=n(g),a=n(d);return s.forEach(o=>{o.members.length<2||(o.direction==="row"?l.push([...o.members]):a.push([...o.members]))}),{horizontal:l,vertical:a}}c(Me,"getAlignments");function Be(e,t,r=[]){let s=[],i=t.getConfigField("iconSize"),f=t.getConfigField("idealEdgeLengthMultiplier"),g=f*i,d=new Set;r.forEach(l=>{for(let a=0;a<l.members.length-1;a++){let o=l.members[a],u=l.members[a+1];d.add(`${o}|${u}`),d.add(`${u}|${o}`),l.direction==="row"?s.push({left:o,right:u,gap:g}):s.push({top:o,bottom:u,gap:g})}});let h=c(l=>`${l[0]},${l[1]}`,"posToStr"),n=c(l=>l.split(",").map(a=>parseInt(a)),"strToPos");return e.forEach(l=>{let a=new Map([...l.entries()].map(([m,D])=>[h(D),m])),o=[h([0,0])],u={},w={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;o.length>0;){let m=o.shift();if(m){u[m]=1;let D=a.get(m);if(D){let x=n(m);Object.entries(w).forEach(([S,p])=>{let y=h([x[0]+p[0],x[1]+p[1]]),k=a.get(y);if(k&&!u[y]){if(o.push(y),d.has(`${D}|${k}`))return;s.push({[ye[S]]:k,[ye[Pe(S)]]:D,gap:f*i})}})}}}}),s}c(Be,"getRelativeConstraints");function Le(e,t,r,s,i,{spatialMaps:f,groupAlignments:g}){return new Promise(d=>{let h=de("body").append("div").attr("id","cy").attr("style","display:none"),n=V({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${i.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${i.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});h.remove(),Ie(r,n),Ae(e,n,i),De(t,n,i),Ce(s,n);let l=i.getLayoutHints(),a=Me(i,f,g,l),o=Be(f,i,l),u=i.getConfigField("iconSize"),w=i.getConfigField("idealEdgeLengthMultiplier")*u,m=.5*u,D=i.getConfigField("edgeElasticity"),x=i.getConfigField("seed"),S=n.layout({name:"fcose",quality:"proof",randomize:i.getConfigField("randomize"),nodeSeparation:i.getConfigField("nodeSeparation"),numIter:i.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(p){let[y,k]=p.connectedNodes(),{parent:b}=R(y),{parent:$}=R(k);return b===$?w:m},edgeElasticity(p){let[y,k]=p.connectedNodes(),{parent:b}=R(y),{parent:$}=R(k);return b===$?D:.001},alignmentConstraint:a,relativePlacementConstraint:o});S.one("layoutstop",()=>{function p(y,k,b,$){let T,E,{x:A,y:v}=y,{x:I,y:C}=k;E=($-v+(A-b)*(v-C)/(A-I))/Math.sqrt(1+Math.pow((v-C)/(A-I),2)),T=Math.sqrt(Math.pow($-v,2)+Math.pow(b-A,2)-Math.pow(E,2));let P=Math.sqrt(Math.pow(I-A,2)+Math.pow(C-v,2));T=T/P;let B=(I-A)*($-v)-(C-v)*(b-A);switch(!0){case B>=0:B=1;break;case B<0:B=-1;break}let L=(I-A)*(b-A)+(C-v)*($-v);switch(!0){case L>=0:L=1;break;case L<0:L=-1;break}return E=Math.abs(E)*B,T=T*L,{distances:E,weights:T}}c(p,"getSegmentWeights"),n.startBatch();for(let y of Object.values(n.edges()))if(y.data?.()){let{x:k,y:b}=y.source().position(),{x:$,y:T}=y.target().position();if(k!==$&&b!==T){let E=y.sourceEndpoint(),A=y.targetEndpoint(),{sourceDir:v}=$e(y),[I,C]=F(v)?[E.x,A.y]:[A.x,E.y],{weights:P,distances:B}=p(E,A,I,C);y.style("segment-distances",B),y.style("segment-weights",P)}}n.endBatch(),W(x,()=>S.run())});try{W(x,()=>S.run())}catch(p){throw p instanceof RangeError&&p.message.includes("Invalid array length")?new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a 
38shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):p}n.ready(p=>{Z.info("Ready",p),d(n)})})}c(Le,"layoutArchitecture");var Qe=c((e,t,r,s)=>z(null,null,function*(){let i=s.db;i.setDiagramId(t);let f=i.getServices(),g=i.getJunctions(),d=i.getGroups(),h=i.getEdges(),n=i.getDataStructures(),l=he(t),a=l.append("g");a.attr("class","architecture-edges");let o=l.append("g");o.attr("class","architecture-services");let u=l.append("g");u.attr("class","architecture-groups"),yield We(i,o,f,t),Ke(i,o,g,t);let w=yield Le(f,g,d,h,i,n);yield Ve(a,w,i,t),yield qe(u,w,i,t),Te(i,w),re(void 0,l,i.getConfigField("padding"),i.getConfigField("useMaxWidth"))}),"draw"),Ue={draw:Qe},ht={parser:be,get db(){return new Ee},renderer:Ue,styles:Ze};export{ht as diagram};
39
40//# debugId=d79b29b0-e1ec-5d1f-89a9-c845c64cb81a

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.