package.dist.chunks.mermaid.core.chunk-F2XFN3BY.mjs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mermaid Show documentation
Show all versions of mermaid Show documentation
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
import {
__name,
getConfig2 as getConfig
} from "./chunk-IIKMQLIC.mjs";
// src/rendering-util/selectSvgElement.ts
import { select } from "d3";
var selectSvgElement = /* @__PURE__ */ __name((id) => {
const { securityLevel } = getConfig();
let root = select("body");
if (securityLevel === "sandbox") {
const sandboxElement = select(`#i${id}`);
const doc = sandboxElement.node()?.contentDocument ?? document;
root = select(doc.body);
}
const svg = root.select(`#${id}`);
return svg;
}, "selectSvgElement");
export {
selectSvgElement
};