UNPKG

code-server

Version:

Run VS Code on a remote server.

2 lines (1 loc) • 2.53 kB
import{a as c}from"./chunk-MZ3V5LZE.js";import{f as h,g as u,h as y,i as w}from"./chunk-DJCKKX6W.js";import{b as f}from"./chunk-WPKM2ZGX.js";import{a as g}from"./chunk-YUYBSA4E.js";import{e as m}from"./chunk-N5VMO4QT.js";import{N as p,u as l}from"./chunk-5Z3D3SW5.js";import{b as i}from"./chunk-SNB7PWCV.js";import{a as o}from"./chunk-5ZAMBDF5.js";var I={common:p,getConfig:l,insertCluster:c,insertEdge:y,insertEdgeLabel:h,insertMarkers:w,insertNode:f,interpolateToCurve:m,labelHelper:g,log:i,positionEdgeLabel:u},a={},L=o(t=>{for(let r of t)a[r.name]=r},"registerLayoutLoaders"),E=o(()=>{L([{name:"dagre",loader:o(async()=>await import("./dagre-3AP2YEHR-YKOCG4JM.js"),"loader")},{name:"swimlane",loader:o(async()=>await import("./swimlanes-XN3QIQJK-FQC4AQ6U.js"),"loader")},{name:"cose-bilkent",loader:o(async()=>await import("./cose-bilkent-JH36ORCC-2NCHXNL7.js"),"loader")}])},"registerDefaultLayoutLoaders");E();var G=o(async(t,r)=>{if(!(t.layoutAlgorithm in a))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let e of t.nodes){let A=e.domId||e.id;e.domId=`${t.diagramId}-${A}`}let n=a[t.layoutAlgorithm],F=await n.loader(),{theme:d,themeVariables:$}=t.config,{useGradient:D,gradientStart:v,gradientStop:x}=$,s=r.attr("id");if(r.append("defs").append("filter").attr("id",`${s}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),r.append("defs").append("filter").attr("id",`${s}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),D){let e=r.append("linearGradient").attr("id",r.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("svg:stop").attr("offset","0%").attr("stop-color",v).attr("stop-opacity",1),e.append("svg:stop").attr("offset","100%").attr("stop-color",x).attr("stop-opacity",1)}return F.render(t,r,I,{algorithm:n.algorithm})},"render"),H=o((t="",{fallback:r="dagre"}={})=>{if(t in a)return t;if(r in a)return i.warn(`Layout algorithm ${t} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${t} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm");export{L as a,G as b,H as c};