@loopstack/loopstack-studio 0.25.0 → 0.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ai-elements/message.js +2 -2
- package/dist/components/ai-elements/reasoning.js +9 -9
- package/dist/loopstack-studio.css +1 -1
- package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +2 -5
- package/dist/node_modules/@chevrotain/gast/lib/src/model.js +69 -72
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{architecture-7HQA4BMR.js → architecture-YZFGNWBL.js} +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-TQ3KTPDO.js → chunk-2KRD3SAO.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-4F5CHEZ2.js → chunk-67CJDMHE.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-UMXZTB3W.js → chunk-7N4EOEYR.js} +5 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-PL6DKKU2.js → chunk-AA7GKIK3.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +23 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-SJTYNZTY.js → chunk-FOC6F5B3.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +1197 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-FRFDVMJY.js → chunk-KGLVRYIC.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-B2363JML.js → chunk-LIHQZDEY.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +29 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{gitGraph-G5XIXVHT.js → gitGraph-7Q5UKJZL.js} +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +27 -17
- package/dist/node_modules/@upsetjs/venn.js/build/venn.esm.js +903 -0
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +76 -75
- package/dist/node_modules/@xyflow/system/dist/esm/index.js +30 -28
- package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +31 -40
- package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +23 -26
- package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +12 -13
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +181 -205
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +11 -13
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +12 -13
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +8 -9
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +176 -183
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +17 -19
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +153 -160
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +10 -12
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +36 -38
- package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +37 -45
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +12 -14
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +80 -86
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +6 -2
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +39 -41
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +7 -8
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +69 -70
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +215 -205
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +76 -76
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +29 -39
- package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +252 -274
- package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +93 -106
- package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +61 -61
- package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +31 -41
- package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +15 -18
- package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +226 -226
- package/dist/node_modules/chevrotain-allstar/lib/atn.js +17 -17
- package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +17 -14
- package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +19 -19
- package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +48 -48
- package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +9 -9
- package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +3 -3
- package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +11 -11
- package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +4 -4
- package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +4 -4
- package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +8 -8
- package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +5 -5
- package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +61 -61
- package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +1 -1
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +25 -25
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +8 -8
- package/dist/node_modules/dagre-d3-es/src/dagre/util.js +48 -48
- package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +109 -109
- package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +17 -17
- package/dist/node_modules/dompurify/dist/purify.es.js +67 -67
- package/dist/node_modules/katex/dist/katex.js +1256 -1209
- package/dist/node_modules/khroma/dist/methods/transparentize.js +3 -0
- package/dist/node_modules/lodash-es/_baseClone.js +2 -2
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +6 -6
- package/dist/node_modules/lodash-es/_baseToString.js +1 -1
- package/dist/node_modules/lodash-es/_baseUniq.js +1 -1
- package/dist/node_modules/lodash-es/_createSet.js +1 -1
- package/dist/node_modules/lodash-es/_getAllKeys.js +2 -2
- package/dist/node_modules/lodash-es/_getAllKeysIn.js +1 -1
- package/dist/node_modules/lodash-es/findIndex.js +2 -2
- package/dist/node_modules/lodash-es/flatMap.js +1 -1
- package/dist/node_modules/lodash-es/forEach.js +1 -1
- package/dist/node_modules/lodash-es/max.js +1 -1
- package/dist/node_modules/lodash-es/min.js +1 -1
- package/dist/node_modules/lodash-es/minBy.js +1 -1
- package/dist/node_modules/lodash-es/reduce.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-Q4EWVU46.js +691 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{blockDiagram-VD42YOAC.js → blockDiagram-DXYQGD6D.js} +183 -157
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{c4Diagram-YG6GDRKO.js → c4Diagram-AHTNJAMY.js} +65 -63
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-336JU56O.js +47 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-EXTU4WIE.js → chunk-426QAEUC.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-B4BG7PRW.js → chunk-4TB4RGXK.js} +533 -393
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.js +3638 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-S3R3BYOJ.js → chunk-5PVQY5BW.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-HN2XXSSU.js → chunk-BSJP7CBP.js} +20 -14
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-QN33PNHL.js → chunk-EDXVE4YY.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ENJZ2VHE.js +568 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.js +2320 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-DI55MBZ5.js → chunk-OYMX7WX6.js} +35 -21
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U2HBQHQK.js +272 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-ATLVNIR6.js → chunk-X2U36JSP.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-MI3HLSF2.js → chunk-XPW4576I.js} +11 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-YZCP3GAM.js +60 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.js +30 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-2ON5EDUG.js → classDiagram-6PBFFD2Q.js} +12 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-v2-WZHVMYZB.js → classDiagram-v2-HSJHXN6E.js} +12 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{dagre-6UL2VRFP.js → dagre-KV5264BT.js} +8 -8
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5BDNPKRD.js +99 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-PSM6KHXK.js → diagram-G4DWMVQ6.js} +20 -23
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-MMDJMWI5.js +211 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-S2PKOQOG.js → diagram-TYMM5635.js} +4 -4
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{erDiagram-Q2GNP2WA.js → erDiagram-SMLLAGMA.js} +486 -386
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{flowDiagram-NV44I4VS.js → flowDiagram-DWJPFMVM.js} +915 -898
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{ganttDiagram-JELNMOA3.js → ganttDiagram-T4ZO3ILL.js} +59 -29
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-UUTBAWPF.js +728 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-42DDH7IO.js +17 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-UXIWVN3A.js +714 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{journeyDiagram-XKPGCS4Q.js → journeyDiagram-VCZTEJTY.js} +32 -32
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{kanban-definition-3W4ZIXB7.js → kanban-definition-6JOO6SKY.js} +13 -9
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{mindmap-definition-VGOIOE7T.js → mindmap-definition-QFDTVHPH.js} +105 -59
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-DEJITSTG.js +117 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{quadrantDiagram-AYHSOK5B.js → quadrantDiagram-34T5L4WZ.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{requirementDiagram-UZGBJVZJ.js → requirementDiagram-MS252O5E.js} +49 -19
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{sankeyDiagram-TZEHDZUN.js → sankeyDiagram-XADWPNL6.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-FGHM5R23.js +4155 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-FKZM4ZOC.js → stateDiagram-FHFEXIEX.js} +12 -12
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-v2-4FDKWEC3.js → stateDiagram-v2-QKLJ7IA2.js} +11 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.js +1071 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.js +959 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.js +574 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{xychartDiagram-PRI3JC2R.js → xychartDiagram-5P7HB3ND.js} +38 -35
- package/dist/node_modules/mermaid/dist/mermaid.core.js +235 -192
- package/dist/node_modules/nanoid/url-alphabet/index.js +1 -1
- package/dist/node_modules/remend/dist/index.js +333 -264
- package/dist/node_modules/streamdown/dist/chunk-BO2N2NFS.js +2498 -0
- package/dist/node_modules/streamdown/dist/highlighted-body-OFNGDK62.js +35 -0
- package/dist/node_modules/streamdown/dist/index.js +1 -1
- package/dist/node_modules/streamdown/dist/mermaid-GHXKKRXX.js +3 -0
- package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +672 -667
- package/dist/pages/DashboardPage.js +3 -3
- package/package.json +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-TCCFYFTB.js +0 -787
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-VBDWY6EO.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-DYOGHKS2.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-VRWISCQL.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-ZZBFDIW7.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-GDKQZRPO.js +0 -3
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js +0 -16
- package/dist/node_modules/lodash-es/_arrayAggregator.js +0 -9
- package/dist/node_modules/lodash-es/_arrayEvery.js +0 -6
- package/dist/node_modules/lodash-es/_baseAggregator.js +0 -8
- package/dist/node_modules/lodash-es/_baseDifference.js +0 -22
- package/dist/node_modules/lodash-es/_baseEvery.js +0 -9
- package/dist/node_modules/lodash-es/_baseIsRegExp.js +0 -8
- package/dist/node_modules/lodash-es/_baseSlice.js +0 -8
- package/dist/node_modules/lodash-es/_baseSome.js +0 -9
- package/dist/node_modules/lodash-es/_createAggregator.js +0 -12
- package/dist/node_modules/lodash-es/assign.js +0 -14
- package/dist/node_modules/lodash-es/compact.js +0 -9
- package/dist/node_modules/lodash-es/difference.js +0 -8
- package/dist/node_modules/lodash-es/drop.js +0 -8
- package/dist/node_modules/lodash-es/dropRight.js +0 -8
- package/dist/node_modules/lodash-es/every.js +0 -11
- package/dist/node_modules/lodash-es/groupBy.js +0 -6
- package/dist/node_modules/lodash-es/head.js +0 -5
- package/dist/node_modules/lodash-es/includes.js +0 -13
- package/dist/node_modules/lodash-es/indexOf.js +0 -11
- package/dist/node_modules/lodash-es/isRegExp.js +0 -5
- package/dist/node_modules/lodash-es/negate.js +0 -16
- package/dist/node_modules/lodash-es/pickBy.js +0 -15
- package/dist/node_modules/lodash-es/reject.js +0 -10
- package/dist/node_modules/lodash-es/some.js +0 -11
- package/dist/node_modules/lodash-es/uniq.js +0 -6
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-VXUJARFQ.js +0 -673
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.js +0 -1547
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.js +0 -10
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DR5Q36YT.js +0 -135
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.js +0 -247
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.js +0 -3516
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.js +0 -39
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.js +0 -497
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js +0 -55
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.js +0 -211
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-V2S2FVAM.js +0 -621
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-HS3SLOUP.js +0 -18
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.js +0 -117
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js +0 -3560
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-IT6M3QCI.js +0 -833
- package/dist/node_modules/streamdown/dist/chunk-RLXIAIE6.js +0 -2189
- package/dist/node_modules/streamdown/dist/highlighted-body-B3W2YXNL.js +0 -33
- package/dist/node_modules/streamdown/dist/mermaid-3ZIDBTTL.js +0 -3
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { __name, log } from "./chunk-AGHRB4JF.js";
|
|
2
|
-
import { common_default, getConfig } from "./chunk-ABZYJK2D.js";
|
|
3
|
-
import { interpolateToCurve } from "./chunk-S3R3BYOJ.js";
|
|
4
|
-
import { insertCluster, insertNode, labelHelper } from "./chunk-JZLCHNYA.js";
|
|
5
|
-
import { insertEdge, insertEdgeLabel, markers_default, positionEdgeLabel } from "./chunk-QXUST7PY.js";
|
|
6
|
-
var internalHelpers = {
|
|
7
|
-
common: common_default,
|
|
8
|
-
getConfig,
|
|
9
|
-
insertCluster,
|
|
10
|
-
insertEdge,
|
|
11
|
-
insertEdgeLabel,
|
|
12
|
-
insertMarkers: markers_default,
|
|
13
|
-
insertNode,
|
|
14
|
-
interpolateToCurve,
|
|
15
|
-
labelHelper,
|
|
16
|
-
log,
|
|
17
|
-
positionEdgeLabel
|
|
18
|
-
}, layoutAlgorithms = {}, registerLayoutLoaders = /* @__PURE__ */ __name((e) => {
|
|
19
|
-
for (let h of e) layoutAlgorithms[h.name] = h;
|
|
20
|
-
}, "registerLayoutLoaders");
|
|
21
|
-
(/* @__PURE__ */ __name(() => {
|
|
22
|
-
registerLayoutLoaders([{
|
|
23
|
-
name: "dagre",
|
|
24
|
-
loader: /* @__PURE__ */ __name(async () => await import("./dagre-6UL2VRFP.js"), "loader")
|
|
25
|
-
}, ...[{
|
|
26
|
-
name: "cose-bilkent",
|
|
27
|
-
loader: /* @__PURE__ */ __name(async () => await import("./cose-bilkent-S5V4N54A.js"), "loader")
|
|
28
|
-
}]]);
|
|
29
|
-
}, "registerDefaultLayoutLoaders"))();
|
|
30
|
-
var render = /* @__PURE__ */ __name(async (e, h) => {
|
|
31
|
-
if (!(e.layoutAlgorithm in layoutAlgorithms)) throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);
|
|
32
|
-
let g = layoutAlgorithms[e.layoutAlgorithm];
|
|
33
|
-
return (await g.loader()).render(e, h, internalHelpers, { algorithm: g.algorithm });
|
|
34
|
-
}, "render"), getRegisteredLayoutAlgorithm = /* @__PURE__ */ __name((e = "", { fallback: g = "dagre" } = {}) => {
|
|
35
|
-
if (e in layoutAlgorithms) return e;
|
|
36
|
-
if (g in layoutAlgorithms) return log.warn(`Layout algorithm ${e} is not registered. Using ${g} as fallback.`), g;
|
|
37
|
-
throw Error(`Both layout algorithms ${e} and ${g} are not registered.`);
|
|
38
|
-
}, "getRegisteredLayoutAlgorithm");
|
|
39
|
-
export { getRegisteredLayoutAlgorithm, registerLayoutLoaders, render };
|
|
@@ -1,497 +0,0 @@
|
|
|
1
|
-
import { __name, log } from "./chunk-AGHRB4JF.js";
|
|
2
|
-
import { evaluate, getConfig2 } from "./chunk-ABZYJK2D.js";
|
|
3
|
-
import select_default from "../../../../d3-selection/src/select.js";
|
|
4
|
-
import linear_default from "../../../../d3-shape/src/curve/linear.js";
|
|
5
|
-
import line_default from "../../../../d3-shape/src/line.js";
|
|
6
|
-
import { bumpX, bumpY } from "../../../../d3-shape/src/curve/bump.js";
|
|
7
|
-
import basis_default from "../../../../d3-shape/src/curve/basis.js";
|
|
8
|
-
import cardinal_default from "../../../../d3-shape/src/curve/cardinal.js";
|
|
9
|
-
import catmullRom_default from "../../../../d3-shape/src/curve/catmullRom.js";
|
|
10
|
-
import { monotoneX, monotoneY } from "../../../../d3-shape/src/curve/monotone.js";
|
|
11
|
-
import natural_default from "../../../../d3-shape/src/curve/natural.js";
|
|
12
|
-
import step_default, { stepAfter, stepBefore } from "../../../../d3-shape/src/curve/step.js";
|
|
13
|
-
import "../../../../d3/src/index.js";
|
|
14
|
-
import { getLineFunctionsWithOffset, markerOffsets, markerOffsets2 } from "./chunk-HN2XXSSU.js";
|
|
15
|
-
import { getSubGraphTitleMargins } from "./chunk-CVBHYZKI.js";
|
|
16
|
-
import { isLabelStyle, styles2String } from "./chunk-ATLVNIR6.js";
|
|
17
|
-
import { utils_default } from "./chunk-S3R3BYOJ.js";
|
|
18
|
-
import { createText } from "./chunk-JA3XYJ7Z.js";
|
|
19
|
-
import { at } from "../../../../roughjs/bundled/rough.esm.js";
|
|
20
|
-
import { createLabel_default } from "./chunk-JZLCHNYA.js";
|
|
21
|
-
var addEdgeMarkers = /* @__PURE__ */ __name((e, o, s, c, l, u) => {
|
|
22
|
-
o.arrowTypeStart && addEdgeMarker(e, "start", o.arrowTypeStart, s, c, l, u), o.arrowTypeEnd && addEdgeMarker(e, "end", o.arrowTypeEnd, s, c, l, u);
|
|
23
|
-
}, "addEdgeMarkers"), arrowTypesMap = {
|
|
24
|
-
arrow_cross: {
|
|
25
|
-
type: "cross",
|
|
26
|
-
fill: !1
|
|
27
|
-
},
|
|
28
|
-
arrow_point: {
|
|
29
|
-
type: "point",
|
|
30
|
-
fill: !0
|
|
31
|
-
},
|
|
32
|
-
arrow_barb: {
|
|
33
|
-
type: "barb",
|
|
34
|
-
fill: !0
|
|
35
|
-
},
|
|
36
|
-
arrow_circle: {
|
|
37
|
-
type: "circle",
|
|
38
|
-
fill: !1
|
|
39
|
-
},
|
|
40
|
-
aggregation: {
|
|
41
|
-
type: "aggregation",
|
|
42
|
-
fill: !1
|
|
43
|
-
},
|
|
44
|
-
extension: {
|
|
45
|
-
type: "extension",
|
|
46
|
-
fill: !1
|
|
47
|
-
},
|
|
48
|
-
composition: {
|
|
49
|
-
type: "composition",
|
|
50
|
-
fill: !0
|
|
51
|
-
},
|
|
52
|
-
dependency: {
|
|
53
|
-
type: "dependency",
|
|
54
|
-
fill: !0
|
|
55
|
-
},
|
|
56
|
-
lollipop: {
|
|
57
|
-
type: "lollipop",
|
|
58
|
-
fill: !1
|
|
59
|
-
},
|
|
60
|
-
only_one: {
|
|
61
|
-
type: "onlyOne",
|
|
62
|
-
fill: !1
|
|
63
|
-
},
|
|
64
|
-
zero_or_one: {
|
|
65
|
-
type: "zeroOrOne",
|
|
66
|
-
fill: !1
|
|
67
|
-
},
|
|
68
|
-
one_or_more: {
|
|
69
|
-
type: "oneOrMore",
|
|
70
|
-
fill: !1
|
|
71
|
-
},
|
|
72
|
-
zero_or_more: {
|
|
73
|
-
type: "zeroOrMore",
|
|
74
|
-
fill: !1
|
|
75
|
-
},
|
|
76
|
-
requirement_arrow: {
|
|
77
|
-
type: "requirement_arrow",
|
|
78
|
-
fill: !1
|
|
79
|
-
},
|
|
80
|
-
requirement_contains: {
|
|
81
|
-
type: "requirement_contains",
|
|
82
|
-
fill: !1
|
|
83
|
-
}
|
|
84
|
-
}, addEdgeMarker = /* @__PURE__ */ __name((e, s, c, l, u, d, f) => {
|
|
85
|
-
let p = arrowTypesMap[c];
|
|
86
|
-
if (!p) {
|
|
87
|
-
log.warn(`Unknown arrow type: ${c}`);
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
let m = `${u}_${d}-${p.type}${s === "start" ? "Start" : "End"}`;
|
|
91
|
-
if (f && f.trim() !== "") {
|
|
92
|
-
let o = `${m}_${f.replace(/[^\dA-Za-z]/g, "_")}`;
|
|
93
|
-
if (!document.getElementById(o)) {
|
|
94
|
-
let e = document.getElementById(m);
|
|
95
|
-
if (e) {
|
|
96
|
-
let s = e.cloneNode(!0);
|
|
97
|
-
s.id = o, s.querySelectorAll("path, circle, line").forEach((e) => {
|
|
98
|
-
e.setAttribute("stroke", f), p.fill && e.setAttribute("fill", f);
|
|
99
|
-
}), e.parentNode?.appendChild(s);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
e.attr(`marker-${s}`, `url(${l}#${o})`);
|
|
103
|
-
} else e.attr(`marker-${s}`, `url(${l}#${m})`);
|
|
104
|
-
}, "addEdgeMarker"), edgeLabels = /* @__PURE__ */ new Map(), terminalLabels = /* @__PURE__ */ new Map(), clear = /* @__PURE__ */ __name(() => {
|
|
105
|
-
edgeLabels.clear(), terminalLabels.clear();
|
|
106
|
-
}, "clear"), getLabelStyles = /* @__PURE__ */ __name((e) => e ? e.reduce((e, o) => e + ";" + o, "") : "", "getLabelStyles"), insertEdgeLabel = /* @__PURE__ */ __name(async (e, u) => {
|
|
107
|
-
let d = evaluate(getConfig2().flowchart.htmlLabels), { labelStyles: f } = styles2String(u);
|
|
108
|
-
u.labelStyle = f;
|
|
109
|
-
let p = await createText(e, u.label, {
|
|
110
|
-
style: u.labelStyle,
|
|
111
|
-
useHtmlLabels: d,
|
|
112
|
-
addSvgBackground: !0,
|
|
113
|
-
isNode: !1
|
|
114
|
-
});
|
|
115
|
-
log.info("abc82", u, u.labelType);
|
|
116
|
-
let m = e.insert("g").attr("class", "edgeLabel"), h = m.insert("g").attr("class", "label").attr("data-id", u.id);
|
|
117
|
-
h.node().appendChild(p);
|
|
118
|
-
let g = p.getBBox();
|
|
119
|
-
if (d) {
|
|
120
|
-
let e = p.children[0], o = select_default(p);
|
|
121
|
-
g = e.getBoundingClientRect(), o.attr("width", g.width), o.attr("height", g.height);
|
|
122
|
-
}
|
|
123
|
-
h.attr("transform", "translate(" + -g.width / 2 + ", " + -g.height / 2 + ")"), edgeLabels.set(u.id, m), u.width = g.width, u.height = g.height;
|
|
124
|
-
let _;
|
|
125
|
-
if (u.startLabelLeft) {
|
|
126
|
-
let o = await createLabel_default(u.startLabelLeft, getLabelStyles(u.labelStyle)), s = e.insert("g").attr("class", "edgeTerminals"), c = s.insert("g").attr("class", "inner");
|
|
127
|
-
_ = c.node().appendChild(o);
|
|
128
|
-
let l = o.getBBox();
|
|
129
|
-
c.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), terminalLabels.get(u.id) || terminalLabels.set(u.id, {}), terminalLabels.get(u.id).startLeft = s, setTerminalWidth(_, u.startLabelLeft);
|
|
130
|
-
}
|
|
131
|
-
if (u.startLabelRight) {
|
|
132
|
-
let o = await createLabel_default(u.startLabelRight, getLabelStyles(u.labelStyle)), s = e.insert("g").attr("class", "edgeTerminals"), c = s.insert("g").attr("class", "inner");
|
|
133
|
-
_ = s.node().appendChild(o), c.node().appendChild(o);
|
|
134
|
-
let l = o.getBBox();
|
|
135
|
-
c.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), terminalLabels.get(u.id) || terminalLabels.set(u.id, {}), terminalLabels.get(u.id).startRight = s, setTerminalWidth(_, u.startLabelRight);
|
|
136
|
-
}
|
|
137
|
-
if (u.endLabelLeft) {
|
|
138
|
-
let o = await createLabel_default(u.endLabelLeft, getLabelStyles(u.labelStyle)), s = e.insert("g").attr("class", "edgeTerminals"), c = s.insert("g").attr("class", "inner");
|
|
139
|
-
_ = c.node().appendChild(o);
|
|
140
|
-
let l = o.getBBox();
|
|
141
|
-
c.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), s.node().appendChild(o), terminalLabels.get(u.id) || terminalLabels.set(u.id, {}), terminalLabels.get(u.id).endLeft = s, setTerminalWidth(_, u.endLabelLeft);
|
|
142
|
-
}
|
|
143
|
-
if (u.endLabelRight) {
|
|
144
|
-
let o = await createLabel_default(u.endLabelRight, getLabelStyles(u.labelStyle)), s = e.insert("g").attr("class", "edgeTerminals"), c = s.insert("g").attr("class", "inner");
|
|
145
|
-
_ = c.node().appendChild(o);
|
|
146
|
-
let l = o.getBBox();
|
|
147
|
-
c.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), s.node().appendChild(o), terminalLabels.get(u.id) || terminalLabels.set(u.id, {}), terminalLabels.get(u.id).endRight = s, setTerminalWidth(_, u.endLabelRight);
|
|
148
|
-
}
|
|
149
|
-
return p;
|
|
150
|
-
}, "insertEdgeLabel");
|
|
151
|
-
function setTerminalWidth(e, o) {
|
|
152
|
-
getConfig2().flowchart.htmlLabels && e && (e.style.width = o.length * 9 + "px", e.style.height = "12px");
|
|
153
|
-
}
|
|
154
|
-
__name(setTerminalWidth, "setTerminalWidth");
|
|
155
|
-
var positionEdgeLabel = /* @__PURE__ */ __name((e, s) => {
|
|
156
|
-
log.debug("Moving label abc88 ", e.id, e.label, edgeLabels.get(e.id), s);
|
|
157
|
-
let l = s.updatedPath ? s.updatedPath : s.originalPath, { subGraphTitleTotalMargin: u } = getSubGraphTitleMargins(getConfig2());
|
|
158
|
-
if (e.label) {
|
|
159
|
-
let c = edgeLabels.get(e.id), d = e.x, f = e.y;
|
|
160
|
-
if (l) {
|
|
161
|
-
let c = utils_default.calcLabelPosition(l);
|
|
162
|
-
log.debug("Moving label " + e.label + " from (", d, ",", f, ") to (", c.x, ",", c.y, ") abc88"), s.updatedPath && (d = c.x, f = c.y);
|
|
163
|
-
}
|
|
164
|
-
c.attr("transform", `translate(${d}, ${f + u / 2})`);
|
|
165
|
-
}
|
|
166
|
-
if (e.startLabelLeft) {
|
|
167
|
-
let o = terminalLabels.get(e.id).startLeft, s = e.x, c = e.y;
|
|
168
|
-
if (l) {
|
|
169
|
-
let o = utils_default.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", l);
|
|
170
|
-
s = o.x, c = o.y;
|
|
171
|
-
}
|
|
172
|
-
o.attr("transform", `translate(${s}, ${c})`);
|
|
173
|
-
}
|
|
174
|
-
if (e.startLabelRight) {
|
|
175
|
-
let o = terminalLabels.get(e.id).startRight, s = e.x, c = e.y;
|
|
176
|
-
if (l) {
|
|
177
|
-
let o = utils_default.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", l);
|
|
178
|
-
s = o.x, c = o.y;
|
|
179
|
-
}
|
|
180
|
-
o.attr("transform", `translate(${s}, ${c})`);
|
|
181
|
-
}
|
|
182
|
-
if (e.endLabelLeft) {
|
|
183
|
-
let o = terminalLabels.get(e.id).endLeft, s = e.x, c = e.y;
|
|
184
|
-
if (l) {
|
|
185
|
-
let o = utils_default.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", l);
|
|
186
|
-
s = o.x, c = o.y;
|
|
187
|
-
}
|
|
188
|
-
o.attr("transform", `translate(${s}, ${c})`);
|
|
189
|
-
}
|
|
190
|
-
if (e.endLabelRight) {
|
|
191
|
-
let o = terminalLabels.get(e.id).endRight, s = e.x, c = e.y;
|
|
192
|
-
if (l) {
|
|
193
|
-
let o = utils_default.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", l);
|
|
194
|
-
s = o.x, c = o.y;
|
|
195
|
-
}
|
|
196
|
-
o.attr("transform", `translate(${s}, ${c})`);
|
|
197
|
-
}
|
|
198
|
-
}, "positionEdgeLabel"), outsideNode = /* @__PURE__ */ __name((e, o) => {
|
|
199
|
-
let s = e.x, c = e.y, l = Math.abs(o.x - s), u = Math.abs(o.y - c), d = e.width / 2, f = e.height / 2;
|
|
200
|
-
return l >= d || u >= f;
|
|
201
|
-
}, "outsideNode"), intersection = /* @__PURE__ */ __name((e, s, c) => {
|
|
202
|
-
log.debug(`intersection calc abc89:
|
|
203
|
-
outsidePoint: ${JSON.stringify(s)}
|
|
204
|
-
insidePoint : ${JSON.stringify(c)}
|
|
205
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
206
|
-
let l = e.x, u = e.y, d = Math.abs(l - c.x), f = e.width / 2, p = c.x < s.x ? f - d : f + d, m = e.height / 2, h = Math.abs(s.y - c.y), g = Math.abs(s.x - c.x);
|
|
207
|
-
if (Math.abs(u - s.y) * f > Math.abs(l - s.x) * m) {
|
|
208
|
-
let e = c.y < s.y ? s.y - m - u : u - m - s.y;
|
|
209
|
-
p = g * e / h;
|
|
210
|
-
let l = {
|
|
211
|
-
x: c.x < s.x ? c.x + p : c.x - g + p,
|
|
212
|
-
y: c.y < s.y ? c.y + h - e : c.y - h + e
|
|
213
|
-
};
|
|
214
|
-
return p === 0 && (l.x = s.x, l.y = s.y), g === 0 && (l.x = s.x), h === 0 && (l.y = s.y), log.debug(`abc89 top/bottom calc, Q ${h}, q ${e}, R ${g}, r ${p}`, l), l;
|
|
215
|
-
} else {
|
|
216
|
-
p = c.x < s.x ? s.x - f - l : l - f - s.x;
|
|
217
|
-
let e = h * p / g, u = c.x < s.x ? c.x + g - p : c.x - g + p, d = c.y < s.y ? c.y + e : c.y - e;
|
|
218
|
-
return log.debug(`sides calc abc89, Q ${h}, q ${e}, R ${g}, r ${p}`, {
|
|
219
|
-
_x: u,
|
|
220
|
-
_y: d
|
|
221
|
-
}), p === 0 && (u = s.x, d = s.y), g === 0 && (u = s.x), h === 0 && (d = s.y), {
|
|
222
|
-
x: u,
|
|
223
|
-
y: d
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
}, "intersection"), cutPathAtIntersect = /* @__PURE__ */ __name((e, s) => {
|
|
227
|
-
log.warn("abc88 cutPathAtIntersect", e, s);
|
|
228
|
-
let c = [], l = e[0], u = !1;
|
|
229
|
-
return e.forEach((e) => {
|
|
230
|
-
if (log.info("abc88 checking point", e, s), !outsideNode(s, e) && !u) {
|
|
231
|
-
let d = intersection(s, l, e);
|
|
232
|
-
log.debug("abc88 inside", e, l, d), log.debug("abc88 intersection", d, s);
|
|
233
|
-
let f = !1;
|
|
234
|
-
c.forEach((e) => {
|
|
235
|
-
f ||= e.x === d.x && e.y === d.y;
|
|
236
|
-
}), c.some((e) => e.x === d.x && e.y === d.y) ? log.warn("abc88 no intersect", d, c) : c.push(d), u = !0;
|
|
237
|
-
} else log.warn("abc88 outside", e, l), l = e, u || c.push(e);
|
|
238
|
-
}), log.debug("returning points", c), c;
|
|
239
|
-
}, "cutPathAtIntersect");
|
|
240
|
-
function extractCornerPoints(e) {
|
|
241
|
-
let o = [], s = [];
|
|
242
|
-
for (let c = 1; c < e.length - 1; c++) {
|
|
243
|
-
let l = e[c - 1], u = e[c], d = e[c + 1];
|
|
244
|
-
(l.x === u.x && u.y === d.y && Math.abs(u.x - d.x) > 5 && Math.abs(u.y - l.y) > 5 || l.y === u.y && u.x === d.x && Math.abs(u.x - l.x) > 5 && Math.abs(u.y - d.y) > 5) && (o.push(u), s.push(c));
|
|
245
|
-
}
|
|
246
|
-
return {
|
|
247
|
-
cornerPoints: o,
|
|
248
|
-
cornerPointPositions: s
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
__name(extractCornerPoints, "extractCornerPoints");
|
|
252
|
-
var findAdjacentPoint = /* @__PURE__ */ __name(function(e, o, s) {
|
|
253
|
-
let c = o.x - e.x, l = o.y - e.y, u = s / Math.sqrt(c * c + l * l);
|
|
254
|
-
return {
|
|
255
|
-
x: o.x - u * c,
|
|
256
|
-
y: o.y - u * l
|
|
257
|
-
};
|
|
258
|
-
}, "findAdjacentPoint"), fixCorners = /* @__PURE__ */ __name(function(e) {
|
|
259
|
-
let { cornerPointPositions: s } = extractCornerPoints(e), c = [];
|
|
260
|
-
for (let l = 0; l < e.length; l++) if (s.includes(l)) {
|
|
261
|
-
let s = e[l - 1], u = e[l + 1], d = e[l], f = findAdjacentPoint(s, d, 5), p = findAdjacentPoint(u, d, 5), m = p.x - f.x, h = p.y - f.y;
|
|
262
|
-
c.push(f);
|
|
263
|
-
let g = Math.sqrt(2) * 2, _ = {
|
|
264
|
-
x: d.x,
|
|
265
|
-
y: d.y
|
|
266
|
-
};
|
|
267
|
-
Math.abs(u.x - s.x) > 10 && Math.abs(u.y - s.y) >= 10 ? (log.debug("Corner point fixing", Math.abs(u.x - s.x), Math.abs(u.y - s.y)), _ = d.x === f.x ? {
|
|
268
|
-
x: m < 0 ? f.x - 5 + g : f.x + 5 - g,
|
|
269
|
-
y: h < 0 ? f.y - g : f.y + g
|
|
270
|
-
} : {
|
|
271
|
-
x: m < 0 ? f.x - g : f.x + g,
|
|
272
|
-
y: h < 0 ? f.y - 5 + g : f.y + 5 - g
|
|
273
|
-
}) : log.debug("Corner point skipping fixing", Math.abs(u.x - s.x), Math.abs(u.y - s.y)), c.push(_, p);
|
|
274
|
-
} else c.push(e[l]);
|
|
275
|
-
return c;
|
|
276
|
-
}, "fixCorners"), generateDashArray = /* @__PURE__ */ __name((e, o, s) => {
|
|
277
|
-
let c = e - o - s, l = Math.floor(c / 4);
|
|
278
|
-
return `0 ${o} ${Array(l).fill("2 2").join(" ")} ${s}`;
|
|
279
|
-
}, "generateDashArray"), insertEdge = /* @__PURE__ */ __name(function(e, s, w, E, O, k, A, j = !1) {
|
|
280
|
-
let { handDrawnSeed: M } = getConfig2(), N = s.points, P = !1, F = O;
|
|
281
|
-
var I = k;
|
|
282
|
-
let L = [];
|
|
283
|
-
for (let e in s.cssCompiledStyles) isLabelStyle(e) || L.push(s.cssCompiledStyles[e]);
|
|
284
|
-
log.debug("UIO intersect check", s.points, I.x, F.x), I.intersect && F.intersect && !j && (N = N.slice(1, s.points.length - 1), N.unshift(F.intersect(N[0])), log.debug("Last point UIO", s.start, "-->", s.end, N[N.length - 1], I, I.intersect(N[N.length - 1])), N.push(I.intersect(N[N.length - 1])));
|
|
285
|
-
let R = btoa(JSON.stringify(N));
|
|
286
|
-
s.toCluster && (log.info("to cluster abc88", w.get(s.toCluster)), N = cutPathAtIntersect(s.points, w.get(s.toCluster).node), P = !0), s.fromCluster && (log.debug("from cluster abc88", w.get(s.fromCluster), JSON.stringify(N, null, 2)), N = cutPathAtIntersect(N.reverse(), w.get(s.fromCluster).node).reverse(), P = !0);
|
|
287
|
-
let z = N.filter((e) => !Number.isNaN(e.y));
|
|
288
|
-
z = fixCorners(z);
|
|
289
|
-
let B = basis_default;
|
|
290
|
-
switch (B = linear_default, s.curve) {
|
|
291
|
-
case "linear":
|
|
292
|
-
B = linear_default;
|
|
293
|
-
break;
|
|
294
|
-
case "basis":
|
|
295
|
-
B = basis_default;
|
|
296
|
-
break;
|
|
297
|
-
case "cardinal":
|
|
298
|
-
B = cardinal_default;
|
|
299
|
-
break;
|
|
300
|
-
case "bumpX":
|
|
301
|
-
B = bumpX;
|
|
302
|
-
break;
|
|
303
|
-
case "bumpY":
|
|
304
|
-
B = bumpY;
|
|
305
|
-
break;
|
|
306
|
-
case "catmullRom":
|
|
307
|
-
B = catmullRom_default;
|
|
308
|
-
break;
|
|
309
|
-
case "monotoneX":
|
|
310
|
-
B = monotoneX;
|
|
311
|
-
break;
|
|
312
|
-
case "monotoneY":
|
|
313
|
-
B = monotoneY;
|
|
314
|
-
break;
|
|
315
|
-
case "natural":
|
|
316
|
-
B = natural_default;
|
|
317
|
-
break;
|
|
318
|
-
case "step":
|
|
319
|
-
B = step_default;
|
|
320
|
-
break;
|
|
321
|
-
case "stepAfter":
|
|
322
|
-
B = stepAfter;
|
|
323
|
-
break;
|
|
324
|
-
case "stepBefore":
|
|
325
|
-
B = stepBefore;
|
|
326
|
-
break;
|
|
327
|
-
default: B = basis_default;
|
|
328
|
-
}
|
|
329
|
-
let { x: V, y: H } = getLineFunctionsWithOffset(s), U = line_default().x(V).y(H).curve(B), W;
|
|
330
|
-
switch (s.thickness) {
|
|
331
|
-
case "normal":
|
|
332
|
-
W = "edge-thickness-normal";
|
|
333
|
-
break;
|
|
334
|
-
case "thick":
|
|
335
|
-
W = "edge-thickness-thick";
|
|
336
|
-
break;
|
|
337
|
-
case "invisible":
|
|
338
|
-
W = "edge-thickness-invisible";
|
|
339
|
-
break;
|
|
340
|
-
default: W = "edge-thickness-normal";
|
|
341
|
-
}
|
|
342
|
-
switch (s.pattern) {
|
|
343
|
-
case "solid":
|
|
344
|
-
W += " edge-pattern-solid";
|
|
345
|
-
break;
|
|
346
|
-
case "dotted":
|
|
347
|
-
W += " edge-pattern-dotted";
|
|
348
|
-
break;
|
|
349
|
-
case "dashed":
|
|
350
|
-
W += " edge-pattern-dashed";
|
|
351
|
-
break;
|
|
352
|
-
default: W += " edge-pattern-solid";
|
|
353
|
-
}
|
|
354
|
-
let G, K = s.curve === "rounded" ? generateRoundedPath(applyMarkerOffsetsToPoints(z, s), 5) : U(z), q = Array.isArray(s.style) ? s.style : [s.style], J = q.find((e) => e?.startsWith("stroke:")), Y = !1;
|
|
355
|
-
if (s.look === "handDrawn") {
|
|
356
|
-
let o = at.svg(e);
|
|
357
|
-
Object.assign([], z);
|
|
358
|
-
let c = o.path(K, {
|
|
359
|
-
roughness: .3,
|
|
360
|
-
seed: M
|
|
361
|
-
});
|
|
362
|
-
W += " transition", G = select_default(c).select("path").attr("id", s.id).attr("class", " " + W + (s.classes ? " " + s.classes : "")).attr("style", q ? q.reduce((e, o) => e + ";" + o, "") : "");
|
|
363
|
-
let u = G.attr("d");
|
|
364
|
-
G.attr("d", u), e.node().appendChild(G.node());
|
|
365
|
-
} else {
|
|
366
|
-
let o = L.join(";"), c = q ? q.reduce((e, o) => e + o + ";", "") : "", l = "";
|
|
367
|
-
s.animate && (l = " edge-animation-fast"), s.animation && (l = " edge-animation-" + s.animation);
|
|
368
|
-
let u = (o ? o + ";" + c + ";" : c) + ";" + (q ? q.reduce((e, o) => e + ";" + o, "") : "");
|
|
369
|
-
G = e.append("path").attr("d", K).attr("id", s.id).attr("class", " " + W + (s.classes ? " " + s.classes : "") + (l ?? "")).attr("style", u), J = u.match(/stroke:([^;]+)/)?.[1], Y = s.animate === !0 || !!s.animation || o.includes("animation");
|
|
370
|
-
let d = G.node(), f = typeof d.getTotalLength == "function" ? d.getTotalLength() : 0, p = markerOffsets2[s.arrowTypeStart] || 0, m = markerOffsets2[s.arrowTypeEnd] || 0;
|
|
371
|
-
if (s.look === "neo" && !Y) {
|
|
372
|
-
let e = `stroke-dasharray: ${s.pattern === "dotted" || s.pattern === "dashed" ? generateDashArray(f, p, m) : `0 ${p} ${f - p - m} ${m}`}; stroke-dashoffset: 0;`;
|
|
373
|
-
G.attr("style", e + G.attr("style"));
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
G.attr("data-edge", !0), G.attr("data-et", "edge"), G.attr("data-id", s.id), G.attr("data-points", R), s.showPoints && z.forEach((o) => {
|
|
377
|
-
e.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", o.x).attr("cy", o.y);
|
|
378
|
-
});
|
|
379
|
-
let X = "";
|
|
380
|
-
(getConfig2().flowchart.arrowMarkerAbsolute || getConfig2().state.arrowMarkerAbsolute) && (X = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, X = X.replace(/\(/g, "\\(").replace(/\)/g, "\\)")), log.info("arrowTypeStart", s.arrowTypeStart), log.info("arrowTypeEnd", s.arrowTypeEnd), addEdgeMarkers(G, s, X, A, E, J);
|
|
381
|
-
let Z = Math.floor(N.length / 2), Q = N[Z];
|
|
382
|
-
utils_default.isLabelCoordinateInPath(Q, G.attr("d")) || (P = !0);
|
|
383
|
-
let $ = {};
|
|
384
|
-
return P && ($.updatedPath = N), $.originalPath = s.points, $;
|
|
385
|
-
}, "insertEdge");
|
|
386
|
-
function generateRoundedPath(e, o) {
|
|
387
|
-
if (e.length < 2) return "";
|
|
388
|
-
let s = "", c = e.length, l = 1e-5;
|
|
389
|
-
for (let u = 0; u < c; u++) {
|
|
390
|
-
let d = e[u], f = e[u - 1], p = e[u + 1];
|
|
391
|
-
if (u === 0) s += `M${d.x},${d.y}`;
|
|
392
|
-
else if (u === c - 1) s += `L${d.x},${d.y}`;
|
|
393
|
-
else {
|
|
394
|
-
let e = d.x - f.x, c = d.y - f.y, u = p.x - d.x, m = p.y - d.y, h = Math.hypot(e, c), g = Math.hypot(u, m);
|
|
395
|
-
if (h < l || g < l) {
|
|
396
|
-
s += `L${d.x},${d.y}`;
|
|
397
|
-
continue;
|
|
398
|
-
}
|
|
399
|
-
let _ = e / h, v = c / h, y = u / g, b = m / g, x = _ * y + v * b, S = Math.max(-1, Math.min(1, x)), C = Math.acos(S);
|
|
400
|
-
if (C < l || Math.abs(Math.PI - C) < l) {
|
|
401
|
-
s += `L${d.x},${d.y}`;
|
|
402
|
-
continue;
|
|
403
|
-
}
|
|
404
|
-
let w = Math.min(o / Math.sin(C / 2), h / 2, g / 2), T = d.x - _ * w, E = d.y - v * w, D = d.x + y * w, O = d.y + b * w;
|
|
405
|
-
s += `L${T},${E}`, s += `Q${d.x},${d.y} ${D},${O}`;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
return s;
|
|
409
|
-
}
|
|
410
|
-
__name(generateRoundedPath, "generateRoundedPath");
|
|
411
|
-
function calculateDeltaAndAngle(e, o) {
|
|
412
|
-
if (!e || !o) return {
|
|
413
|
-
angle: 0,
|
|
414
|
-
deltaX: 0,
|
|
415
|
-
deltaY: 0
|
|
416
|
-
};
|
|
417
|
-
let s = o.x - e.x, c = o.y - e.y;
|
|
418
|
-
return {
|
|
419
|
-
angle: Math.atan2(c, s),
|
|
420
|
-
deltaX: s,
|
|
421
|
-
deltaY: c
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
__name(calculateDeltaAndAngle, "calculateDeltaAndAngle");
|
|
425
|
-
function applyMarkerOffsetsToPoints(e, o) {
|
|
426
|
-
let s = e.map((e) => ({ ...e }));
|
|
427
|
-
if (e.length >= 2 && markerOffsets[o.arrowTypeStart]) {
|
|
428
|
-
let c = markerOffsets[o.arrowTypeStart], l = e[0], u = e[1], { angle: d } = calculateDeltaAndAngle(l, u), f = c * Math.cos(d), p = c * Math.sin(d);
|
|
429
|
-
s[0].x = l.x + f, s[0].y = l.y + p;
|
|
430
|
-
}
|
|
431
|
-
let c = e.length;
|
|
432
|
-
if (c >= 2 && markerOffsets[o.arrowTypeEnd]) {
|
|
433
|
-
let l = markerOffsets[o.arrowTypeEnd], u = e[c - 1], d = e[c - 2], { angle: f } = calculateDeltaAndAngle(d, u), p = l * Math.cos(f), m = l * Math.sin(f);
|
|
434
|
-
s[c - 1].x = u.x - p, s[c - 1].y = u.y - m;
|
|
435
|
-
}
|
|
436
|
-
return s;
|
|
437
|
-
}
|
|
438
|
-
__name(applyMarkerOffsetsToPoints, "applyMarkerOffsetsToPoints");
|
|
439
|
-
var insertMarkers = /* @__PURE__ */ __name((e, o, s, c) => {
|
|
440
|
-
o.forEach((o) => {
|
|
441
|
-
markers[o](e, s, c);
|
|
442
|
-
});
|
|
443
|
-
}, "insertMarkers"), markers = {
|
|
444
|
-
extension: /* @__PURE__ */ __name((e, s, c) => {
|
|
445
|
-
log.trace("Making markers for ", c), e.append("defs").append("marker").attr("id", c + "_" + s + "-extensionStart").attr("class", "marker extension " + s).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", c + "_" + s + "-extensionEnd").attr("class", "marker extension " + s).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
446
|
-
}, "extension"),
|
|
447
|
-
composition: /* @__PURE__ */ __name((e, o, s) => {
|
|
448
|
-
e.append("defs").append("marker").attr("id", s + "_" + o + "-compositionStart").attr("class", "marker composition " + o).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", s + "_" + o + "-compositionEnd").attr("class", "marker composition " + o).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
449
|
-
}, "composition"),
|
|
450
|
-
aggregation: /* @__PURE__ */ __name((e, o, s) => {
|
|
451
|
-
e.append("defs").append("marker").attr("id", s + "_" + o + "-aggregationStart").attr("class", "marker aggregation " + o).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", s + "_" + o + "-aggregationEnd").attr("class", "marker aggregation " + o).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
452
|
-
}, "aggregation"),
|
|
453
|
-
dependency: /* @__PURE__ */ __name((e, o, s) => {
|
|
454
|
-
e.append("defs").append("marker").attr("id", s + "_" + o + "-dependencyStart").attr("class", "marker dependency " + o).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", s + "_" + o + "-dependencyEnd").attr("class", "marker dependency " + o).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
455
|
-
}, "dependency"),
|
|
456
|
-
lollipop: /* @__PURE__ */ __name((e, o, s) => {
|
|
457
|
-
e.append("defs").append("marker").attr("id", s + "_" + o + "-lollipopStart").attr("class", "marker lollipop " + o).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", s + "_" + o + "-lollipopEnd").attr("class", "marker lollipop " + o).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
458
|
-
}, "lollipop"),
|
|
459
|
-
point: /* @__PURE__ */ __name((e, o, s) => {
|
|
460
|
-
e.append("marker").attr("id", s + "_" + o + "-pointEnd").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", 5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + o + "-pointStart").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
461
|
-
}, "point"),
|
|
462
|
-
circle: /* @__PURE__ */ __name((e, o, s) => {
|
|
463
|
-
e.append("marker").attr("id", s + "_" + o + "-circleEnd").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + o + "-circleStart").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
464
|
-
}, "circle"),
|
|
465
|
-
cross: /* @__PURE__ */ __name((e, o, s) => {
|
|
466
|
-
e.append("marker").attr("id", s + "_" + o + "-crossEnd").attr("class", "marker cross " + o).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + o + "-crossStart").attr("class", "marker cross " + o).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
467
|
-
}, "cross"),
|
|
468
|
-
barb: /* @__PURE__ */ __name((e, o, s) => {
|
|
469
|
-
e.append("defs").append("marker").attr("id", s + "_" + o + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
470
|
-
}, "barb"),
|
|
471
|
-
only_one: /* @__PURE__ */ __name((e, o, s) => {
|
|
472
|
-
e.append("defs").append("marker").attr("id", s + "_" + o + "-onlyOneStart").attr("class", "marker onlyOne " + o).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18"), e.append("defs").append("marker").attr("id", s + "_" + o + "-onlyOneEnd").attr("class", "marker onlyOne " + o).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18");
|
|
473
|
-
}, "only_one"),
|
|
474
|
-
zero_or_one: /* @__PURE__ */ __name((e, o, s) => {
|
|
475
|
-
let c = e.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + o).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
476
|
-
c.append("circle").attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), c.append("path").attr("d", "M9,0 L9,18");
|
|
477
|
-
let l = e.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + o).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
478
|
-
l.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), l.append("path").attr("d", "M21,0 L21,18");
|
|
479
|
-
}, "zero_or_one"),
|
|
480
|
-
one_or_more: /* @__PURE__ */ __name((e, o, s) => {
|
|
481
|
-
e.append("defs").append("marker").attr("id", s + "_" + o + "-oneOrMoreStart").attr("class", "marker oneOrMore " + o).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), e.append("defs").append("marker").attr("id", s + "_" + o + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + o).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18");
|
|
482
|
-
}, "one_or_more"),
|
|
483
|
-
zero_or_more: /* @__PURE__ */ __name((e, o, s) => {
|
|
484
|
-
let c = e.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + o).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
485
|
-
c.append("circle").attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), c.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18");
|
|
486
|
-
let l = e.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + o).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
487
|
-
l.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), l.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
|
|
488
|
-
}, "zero_or_more"),
|
|
489
|
-
requirement_arrow: /* @__PURE__ */ __name((e, o, s) => {
|
|
490
|
-
e.append("defs").append("marker").attr("id", s + "_" + o + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("path").attr("d", "M0,0\n L20,10\n M20,10\n L0,20");
|
|
491
|
-
}, "requirement_arrow"),
|
|
492
|
-
requirement_contains: /* @__PURE__ */ __name((e, o, s) => {
|
|
493
|
-
let c = e.append("defs").append("marker").attr("id", s + "_" + o + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("g");
|
|
494
|
-
c.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none"), c.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10), c.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10);
|
|
495
|
-
}, "requirement_contains")
|
|
496
|
-
}, markers_default = insertMarkers;
|
|
497
|
-
export { clear, insertEdge, insertEdgeLabel, markers_default, positionEdgeLabel };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { __name } from "./chunk-AGHRB4JF.js";
|
|
2
|
-
import { lineBreakRegex } from "./chunk-ABZYJK2D.js";
|
|
3
|
-
import { require_dist } from "../../../../@braintree/sanitize-url/dist/index.js";
|
|
4
|
-
var import_dist = require_dist(), drawRect = /* @__PURE__ */ __name((e, a) => {
|
|
5
|
-
let o = e.append("rect");
|
|
6
|
-
if (o.attr("x", a.x), o.attr("y", a.y), o.attr("fill", a.fill), o.attr("stroke", a.stroke), o.attr("width", a.width), o.attr("height", a.height), a.name && o.attr("name", a.name), a.rx && o.attr("rx", a.rx), a.ry && o.attr("ry", a.ry), a.attrs !== void 0) for (let e in a.attrs) o.attr(e, a.attrs[e]);
|
|
7
|
-
return a.class && o.attr("class", a.class), o;
|
|
8
|
-
}, "drawRect"), drawBackgroundRect = /* @__PURE__ */ __name((e, a) => {
|
|
9
|
-
drawRect(e, {
|
|
10
|
-
x: a.startx,
|
|
11
|
-
y: a.starty,
|
|
12
|
-
width: a.stopx - a.startx,
|
|
13
|
-
height: a.stopy - a.starty,
|
|
14
|
-
fill: a.fill,
|
|
15
|
-
stroke: a.stroke,
|
|
16
|
-
class: "rect"
|
|
17
|
-
}).lower();
|
|
18
|
-
}, "drawBackgroundRect"), drawText = /* @__PURE__ */ __name((e, o) => {
|
|
19
|
-
let s = o.text.replace(lineBreakRegex, " "), c = e.append("text");
|
|
20
|
-
c.attr("x", o.x), c.attr("y", o.y), c.attr("class", "legend"), c.style("text-anchor", o.anchor), o.class && c.attr("class", o.class);
|
|
21
|
-
let l = c.append("tspan");
|
|
22
|
-
return l.attr("x", o.x + o.textMargin * 2), l.text(s), c;
|
|
23
|
-
}, "drawText"), drawImage = /* @__PURE__ */ __name((e, a, o, c) => {
|
|
24
|
-
let l = e.append("image");
|
|
25
|
-
l.attr("x", a), l.attr("y", o);
|
|
26
|
-
let u = (0, import_dist.sanitizeUrl)(c);
|
|
27
|
-
l.attr("xlink:href", u);
|
|
28
|
-
}, "drawImage"), drawEmbeddedImage = /* @__PURE__ */ __name((e, a, o, c) => {
|
|
29
|
-
let l = e.append("use");
|
|
30
|
-
l.attr("x", a), l.attr("y", o);
|
|
31
|
-
let u = (0, import_dist.sanitizeUrl)(c);
|
|
32
|
-
l.attr("xlink:href", `#${u}`);
|
|
33
|
-
}, "drawEmbeddedImage"), getNoteRect = /* @__PURE__ */ __name(() => ({
|
|
34
|
-
x: 0,
|
|
35
|
-
y: 0,
|
|
36
|
-
width: 100,
|
|
37
|
-
height: 100,
|
|
38
|
-
fill: "#EDF2AE",
|
|
39
|
-
stroke: "#666",
|
|
40
|
-
anchor: "start",
|
|
41
|
-
rx: 0,
|
|
42
|
-
ry: 0
|
|
43
|
-
}), "getNoteRect"), getTextObj = /* @__PURE__ */ __name(() => ({
|
|
44
|
-
x: 0,
|
|
45
|
-
y: 0,
|
|
46
|
-
width: 100,
|
|
47
|
-
height: 100,
|
|
48
|
-
"text-anchor": "start",
|
|
49
|
-
style: "#666",
|
|
50
|
-
textMargin: 0,
|
|
51
|
-
rx: 0,
|
|
52
|
-
ry: 0,
|
|
53
|
-
tspan: !0
|
|
54
|
-
}), "getTextObj");
|
|
55
|
-
export { drawBackgroundRect, drawEmbeddedImage, drawImage, drawRect, drawText, getNoteRect, getTextObj };
|