file-viewer3 1.0.26 → 2.0.1
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/README.en.md +7 -377
- package/README.md +8 -352
- package/dist/file-viewer3.css +1 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +27 -129
- package/dist/components/3MFLoader.js +0 -527
- package/dist/components/AMFLoader.js +0 -188
- package/dist/components/ArchiveViewer.js +0 -526
- package/dist/components/AudioViewer.js +0 -66
- package/dist/components/CadViewer.js +0 -9040
- package/dist/components/CodeViewer.js +0 -151
- package/dist/components/ColladaLoader.js +0 -2282
- package/dist/components/DrawingViewer.js +0 -295
- package/dist/components/EdaViewer.js +0 -630
- package/dist/components/EmailViewer.js +0 -276
- package/dist/components/EpubViewer.js +0 -172
- package/dist/components/FBXLoader.js +0 -1574
- package/dist/components/GLTFLoader.js +0 -1383
- package/dist/components/ImageViewer.js +0 -1519
- package/dist/components/KMZLoader.js +0 -45
- package/dist/components/MarkdownViewer.js +0 -1476
- package/dist/components/ModelViewer.js +0 -797
- package/dist/components/OBJLoader.js +0 -287
- package/dist/components/OfdViewer.js +0 -133
- package/dist/components/PCDLoader.js +0 -141
- package/dist/components/PLYLoader.js +0 -305
- package/dist/components/PdfView.js +0 -27667
- package/dist/components/PptxRender.js +0 -11217
- package/dist/components/STLLoader.js +0 -83
- package/dist/components/TDSLoader.js +0 -228
- package/dist/components/TypstViewer.js +0 -1697
- package/dist/components/USDLoader.js +0 -2526
- package/dist/components/UmdViewer.js +0 -1873
- package/dist/components/VRMLLoader.js +0 -6422
- package/dist/components/VTKLoader.js +0 -337
- package/dist/components/XYZLoader.js +0 -30
- package/dist/components/XlsxTable.js +0 -7879
- package/dist/components/__vite-browser-external.js +0 -7
- package/dist/components/_plugin-vue_export-helper.js +0 -8
- package/dist/components/ar-SA-G6X2FPQ2.js +0 -523
- package/dist/components/arc.js +0 -79
- package/dist/components/architecture-7EHR7CIX.js +0 -3
- package/dist/components/architectureDiagram-3BPJPVTR.js +0 -4096
- package/dist/components/archive.js +0 -24
- package/dist/components/asyncToGenerator.js +0 -29
- package/dist/components/audio.js +0 -19
- package/dist/components/az-AZ-76LH7QW2.js +0 -523
- package/dist/components/bash.js +0 -169
- package/dist/components/bg-BG-XCXSNQG7.js +0 -523
- package/dist/components/blockDiagram-GPEHLZMM.js +0 -3357
- package/dist/components/bn-BD-2XOGV67Q.js +0 -523
- package/dist/components/c4Diagram-AAUBKEIU.js +0 -2957
- package/dist/components/ca-ES-6MX7JW3Y.js +0 -523
- package/dist/components/cad.js +0 -23
- package/dist/components/cfb.js +0 -1174
- package/dist/components/channel.js +0 -5
- package/dist/components/chunk-2J33WTMH.js +0 -26
- package/dist/components/chunk-3OPIFGDE.js +0 -4167
- package/dist/components/chunk-4BX2VUAB.js +0 -19
- package/dist/components/chunk-55IACEB6.js +0 -9
- package/dist/components/chunk-5ZQYHXKU.js +0 -669
- package/dist/components/chunk-6U3AYISY.js +0 -624
- package/dist/components/chunk-727SXJPM.js +0 -3356
- package/dist/components/chunk-AGHRB4JF.js +0 -324
- package/dist/components/chunk-AQP2D5EJ.js +0 -2055
- package/dist/components/chunk-BSJP7CBP.js +0 -83
- package/dist/components/chunk-CSCIHK7Q.js +0 -3500
- package/dist/components/chunk-EIO257PC.js +0 -1836
- package/dist/components/chunk-FMBD7UC4.js +0 -5
- package/dist/components/chunk-K2UTITRG.js +0 -17627
- package/dist/components/chunk-KSCS5N6A.js +0 -572
- package/dist/components/chunk-L5ZTLDWV.js +0 -40
- package/dist/components/chunk-LZXEDZCA.js +0 -60
- package/dist/components/chunk-ND2GUHAM.js +0 -61
- package/dist/components/chunk-NNHCCRGN.js +0 -20425
- package/dist/components/chunk-NZK2D7GU.js +0 -68
- package/dist/components/chunk-O5CBEL6O.js +0 -1894
- package/dist/components/chunk-QZHKN3VN.js +0 -12
- package/dist/components/chunk-SRAX5OIU.js +0 -22
- package/dist/components/chunk-WU5MYG2G.js +0 -14
- package/dist/components/chunk-XPW4576I.js +0 -1146
- package/dist/components/chunk-Z3N5DIM6.js +0 -59
- package/dist/components/chunk-ZUYEQ4TG.js +0 -22
- package/dist/components/chunk.js +0 -23
- package/dist/components/classDiagram-4FO5ZUOK.js +0 -29
- package/dist/components/classDiagram-v2-Q7XG4LA2.js +0 -29
- package/dist/components/compiler.js +0 -2
- package/dist/components/core.js +0 -845
- package/dist/components/cose-bilkent-S5V4N54A.js +0 -2268
- package/dist/components/cpp.js +0 -225
- package/dist/components/cs-CZ-2BRQDIVT.js +0 -523
- package/dist/components/csharp.js +0 -260
- package/dist/components/css.js +0 -140
- package/dist/components/cytoscape.esm.js +0 -18114
- package/dist/components/da-DK-5WZEPLOC.js +0 -523
- package/dist/components/dagre-BM42HDAG.js +0 -325
- package/dist/components/dagre.js +0 -1936
- package/dist/components/de-DE-XR44H4JA.js +0 -523
- package/dist/components/defaultLocale.js +0 -201
- package/dist/components/defineProperty.js +0 -50
- package/dist/components/diagram-2AECGRRQ.js +0 -229
- package/dist/components/diagram-5GNKFQAL.js +0 -108
- package/dist/components/diagram-KO2AKTUF.js +0 -443
- package/dist/components/diagram-LMA3HP47.js +0 -139
- package/dist/components/diagram-OG6HWLK6.js +0 -541
- package/dist/components/diff.js +0 -39
- package/dist/components/directory-open-01563666.js +0 -26
- package/dist/components/directory-open-4ed118d0.js +0 -83
- package/dist/components/dist.js +0 -50
- package/dist/components/dist2.js +0 -3291
- package/dist/components/dist3.js +0 -1593
- package/dist/components/documentSearch.js +0 -378
- package/dist/components/docx-preview.js +0 -3113
- package/dist/components/drawing.js +0 -19
- package/dist/components/ebook.js +0 -16
- package/dist/components/eda.js +0 -20
- package/dist/components/el-GR-BZB4AONW.js +0 -523
- package/dist/components/email.js +0 -21
- package/dist/components/en-B4ZKOASM.js +0 -3
- package/dist/components/erDiagram-TEJ5UH35.js +0 -1719
- package/dist/components/es-ES-U4NZUMDT.js +0 -523
- package/dist/components/eu-ES-A7QVB2H4.js +0 -523
- package/dist/components/eventmodeling-FCH6USID.js +0 -3
- package/dist/components/fa-IR-HGAKTJCU.js +0 -523
- package/dist/components/fflate.module.js +0 -323
- package/dist/components/fi-FI-Z5N7JZ37.js +0 -523
- package/dist/components/file-open-002ab408.js +0 -38
- package/dist/components/file-open-7c801643.js +0 -24
- package/dist/components/file-save-3189631c.js +0 -40
- package/dist/components/file-save-745eba88.js +0 -36
- package/dist/components/flowDiagram-I6XJVG4X.js +0 -4181
- package/dist/components/fr-FR-RHASNOE6.js +0 -523
- package/dist/components/ganttDiagram-6RSMTGT7.js +0 -2182
- package/dist/components/gitGraph-WXDBUCRP.js +0 -3
- package/dist/components/gitGraphDiagram-PVQCEYII.js +0 -788
- package/dist/components/gl-ES-HMX3MZ6V.js +0 -523
- package/dist/components/global-compiler.js +0 -23
- package/dist/components/global-renderer.js +0 -23
- package/dist/components/go.js +0 -140
- package/dist/components/graphlib.js +0 -1267
- package/dist/components/he-IL-6SHJWFNN.js +0 -523
- package/dist/components/hi-IN-IWLTKZ5I.js +0 -523
- package/dist/components/hu-HU-A5ZG7DT2.js +0 -523
- package/dist/components/id-ID-SAP4L64H.js +0 -523
- package/dist/components/image-GAAHSSAO.js +0 -3
- package/dist/components/image-blob-reduce.esm.js +0 -1429
- package/dist/components/image.js +0 -17
- package/dist/components/info-J43DQDTF.js +0 -3
- package/dist/components/infoDiagram-5YYISTIA.js +0 -26
- package/dist/components/ini.js +0 -88
- package/dist/components/init.js +0 -15
- package/dist/components/ishikawaDiagram-YF4QCWOH.js +0 -718
- package/dist/components/it-IT-JPQ66NNP.js +0 -523
- package/dist/components/ja-JP-DBVTYXUO.js +0 -523
- package/dist/components/java.js +0 -169
- package/dist/components/javascript.js +0 -436
- package/dist/components/journeyDiagram-JHISSGLW.js +0 -885
- package/dist/components/json.js +0 -36
- package/dist/components/jszip.min.js +0 -3033
- package/dist/components/kaa-6HZHGXH3.js +0 -523
- package/dist/components/kab-KAB-ZGHBKWFO.js +0 -523
- package/dist/components/kanban-definition-UN3LZRKU.js +0 -986
- package/dist/components/katex.js +0 -21979
- package/dist/components/kk-KZ-P5N5QNE5.js +0 -523
- package/dist/components/km-KH-HSX4SM5Z.js +0 -523
- package/dist/components/ko-KR-MTYHY66A.js +0 -523
- package/dist/components/ku-TR-6OUDTVRD.js +0 -523
- package/dist/components/lib.js +0 -4877
- package/dist/components/libarchive.js +0 -360
- package/dist/components/linear.js +0 -289
- package/dist/components/lt-LT-XHIRWOB4.js +0 -523
- package/dist/components/lv-LV-5QDEKY6T.js +0 -523
- package/dist/components/markdown.js +0 -181
- package/dist/components/md.js +0 -17
- package/dist/components/mermaid-parser.core.js +0 -328
- package/dist/components/mindmap-definition-RKZ34NQL.js +0 -1016
- package/dist/components/model.js +0 -21
- package/dist/components/mp4.js +0 -12
- package/dist/components/mr-IN-CRQNXWMA.js +0 -523
- package/dist/components/my-MM-5M5IBNSE.js +0 -523
- package/dist/components/nb-NO-T6EIAALU.js +0 -523
- package/dist/components/nestedRender.js +0 -158
- package/dist/components/nl-NL-IS3SIHDZ.js +0 -523
- package/dist/components/nn-NO-6E72VCQL.js +0 -523
- package/dist/components/objectSpread2.js +0 -29
- package/dist/components/objectWithoutProperties.js +0 -28
- package/dist/components/oc-FR-POXYY2M6.js +0 -523
- package/dist/components/ofd.js +0 -5261
- package/dist/components/ofd2.js +0 -16
- package/dist/components/ordinal.js +0 -65
- package/dist/components/pa-IN-N4M65BXN.js +0 -523
- package/dist/components/packet-YPE3B663.js +0 -3
- package/dist/components/pdf.js +0 -24
- package/dist/components/percentages-BXMCSKIN.js +0 -3
- package/dist/components/php.js +0 -294
- package/dist/components/pica.js +0 -1009
- package/dist/components/pie-LRSECV5Y.js +0 -3
- package/dist/components/pie.js +0 -47
- package/dist/components/pieDiagram-4H26LBE5.js +0 -130
- package/dist/components/pl-PL-T2D74RX3.js +0 -523
- package/dist/components/postal-mime.js +0 -3146
- package/dist/components/pptx.js +0 -15
- package/dist/components/printLayout.js +0 -42
- package/dist/components/prod.js +0 -21770
- package/dist/components/pt-BR-5N22H2LF.js +0 -523
- package/dist/components/pt-PT-UZXXM6DQ.js +0 -523
- package/dist/components/python.js +0 -238
- package/dist/components/quadrantDiagram-W4KKPZXB.js +0 -1988
- package/dist/components/radar-GUYGQ44K.js +0 -3
- package/dist/components/renderer.js +0 -2
- package/dist/components/requirementDiagram-4Y6WPE33.js +0 -2230
- package/dist/components/ro-RO-JPDTUUEW.js +0 -523
- package/dist/components/rough.esm.js +0 -1355
- package/dist/components/roundRect.js +0 -90
- package/dist/components/ru-RU-B4JR7IUQ.js +0 -523
- package/dist/components/rust.js +0 -169
- package/dist/components/sankeyDiagram-5OEKKPKP.js +0 -972
- package/dist/components/sequenceDiagram-3UESZ5HK.js +0 -4255
- package/dist/components/shared.js +0 -175
- package/dist/components/shared2.js +0 -4
- package/dist/components/si-LK-N5RQ5JYF.js +0 -523
- package/dist/components/sk-SK-C5VTKIMK.js +0 -523
- package/dist/components/sl-SI-NN7IZMDC.js +0 -523
- package/dist/components/sourceLoading.js +0 -134
- package/dist/components/sql.js +0 -118
- package/dist/components/src.js +0 -2664
- package/dist/components/src2.js +0 -10722
- package/dist/components/stateDiagram-AJRCARHV.js +0 -217
- package/dist/components/stateDiagram-v2-BHNVJYJU.js +0 -27
- package/dist/components/subset-shared.chunk.js +0 -3
- package/dist/components/subset-worker.chunk.js +0 -21
- package/dist/components/sv-SE-XGPEYMSR.js +0 -523
- package/dist/components/ta-IN-2NMHFXQM.js +0 -523
- package/dist/components/text.js +0 -20
- package/dist/components/th-TH-HPSO5L25.js +0 -523
- package/dist/components/three.module.js +0 -13134
- package/dist/components/time.js +0 -910
- package/dist/components/timeline-definition-PNZ67QCA.js +0 -1084
- package/dist/components/tr-TR-DEFEU3FU.js +0 -523
- package/dist/components/treeView-BLDUP644.js +0 -3
- package/dist/components/treemap-LRROVOQU.js +0 -3
- package/dist/components/typescript.js +0 -521
- package/dist/components/typst.js +0 -25
- package/dist/components/uk-UA-QMV73CPH.js +0 -523
- package/dist/components/umd.js +0 -16
- package/dist/components/use.js +0 -422
- package/dist/components/util.js +0 -49
- package/dist/components/vennDiagram-CIIHVFJN.js +0 -1880
- package/dist/components/vi-VN-M7AON7JQ.js +0 -523
- package/dist/components/viewerZoom.js +0 -92
- package/dist/components/wardley-L42UT6IY.js +0 -3
- package/dist/components/wardleyDiagram-YWT4CUSO.js +0 -656
- package/dist/components/wasm-pack-shim.js +0 -1711
- package/dist/components/wasm-pack-shim2.js +0 -934
- package/dist/components/wasm.js +0 -97
- package/dist/components/word.js +0 -3055
- package/dist/components/worker-ref.js +0 -16
- package/dist/components/xlsx.js +0 -21
- package/dist/components/xml.js +0 -166
- package/dist/components/xychartDiagram-2RQKCTM6.js +0 -2015
- package/dist/components/yaml.js +0 -144
- package/dist/components/zh-CN-LNUGB5OW.js +0 -523
- package/dist/components/zh-HK-E62DVLB3.js +0 -523
- package/dist/components/zh-TW-RAJ6MFWO.js +0 -523
- package/dist/index.mjs +0 -3293
- package/dist/src/App.vue.d.ts +0 -3
- package/dist/src/compare/CompareApp.vue.d.ts +0 -3
- package/dist/src/compare/main.d.ts +0 -0
- package/dist/src/compare/useSynchronizedScroll.d.ts +0 -7
- package/dist/src/components/HelloWorld.vue.d.ts +0 -3
- package/dist/src/components/utils.d.ts +0 -4
- package/dist/src/main.d.ts +0 -0
- package/dist/src/package/common/printCapability.d.ts +0 -27
- package/dist/src/package/common/printLayout.d.ts +0 -16
- package/dist/src/package/common/sourceLoading.d.ts +0 -10
- package/dist/src/package/common/type.d.ts +0 -544
- package/dist/src/package/common/util.d.ts +0 -5
- package/dist/src/package/common/worker-ref.d.ts +0 -12
- package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +0 -75
- package/dist/src/package/components/FileViewer/exportDocumentTemplate.d.ts +0 -9
- package/dist/src/package/components/FileViewer/hooks/useViewerDocumentFeatures.d.ts +0 -29
- package/dist/src/package/components/FileViewer/hooks/useViewerExport.d.ts +0 -21
- package/dist/src/package/components/FileViewer/hooks/useViewerWatermark.d.ts +0 -8
- package/dist/src/package/components/FileViewer/hooks/useViewerZoom.d.ts +0 -34
- package/dist/src/package/components/FileViewer/index.d.ts +0 -2
- package/dist/src/package/components/FileViewer/util.d.ts +0 -3
- package/dist/src/package/index.d.ts +0 -22
- package/dist/src/package/use/documentLocation.d.ts +0 -15
- package/dist/src/package/use/documentSearch.d.ts +0 -234
- package/dist/src/package/use/index.d.ts +0 -5
- package/dist/src/package/use/loading.d.ts +0 -33
- package/dist/src/package/use/viewerZoom.d.ts +0 -42
- package/dist/src/package/use/worker.d.ts +0 -24
- package/dist/src/package/vendors/archive/ArchiveViewer.vue.d.ts +0 -9
- package/dist/src/package/vendors/archive/cache.d.ts +0 -10
- package/dist/src/package/vendors/archive/fallback.d.ts +0 -9
- package/dist/src/package/vendors/archive/index.d.ts +0 -3
- package/dist/src/package/vendors/archive/shared.d.ts +0 -24
- package/dist/src/package/vendors/audio/AudioViewer.vue.d.ts +0 -7
- package/dist/src/package/vendors/audio/index.d.ts +0 -7
- package/dist/src/package/vendors/cad/CadViewer.vue.d.ts +0 -9
- package/dist/src/package/vendors/cad/index.d.ts +0 -8
- package/dist/src/package/vendors/drawing/DrawingViewer.vue.d.ts +0 -15
- package/dist/src/package/vendors/drawing/index.d.ts +0 -7
- package/dist/src/package/vendors/ebook/EpubViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/ebook/index.d.ts +0 -7
- package/dist/src/package/vendors/eda/EdaViewer.vue.d.ts +0 -8
- package/dist/src/package/vendors/eda/index.d.ts +0 -2
- package/dist/src/package/vendors/eda/parser.d.ts +0 -77
- package/dist/src/package/vendors/email/EmailViewer.vue.d.ts +0 -10
- package/dist/src/package/vendors/email/index.d.ts +0 -2
- package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/image/index.d.ts +0 -4
- package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/md/index.d.ts +0 -4
- package/dist/src/package/vendors/model/ModelViewer.vue.d.ts +0 -8
- package/dist/src/package/vendors/model/index.d.ts +0 -3
- package/dist/src/package/vendors/model/shared.d.ts +0 -1
- package/dist/src/package/vendors/mp4/index.d.ts +0 -4
- package/dist/src/package/vendors/nestedRender.d.ts +0 -10
- package/dist/src/package/vendors/ofd/OfdViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/ofd/index.d.ts +0 -7
- package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +0 -10
- package/dist/src/package/vendors/pdf/index.d.ts +0 -2
- package/dist/src/package/vendors/pdf/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/pdf/worker/pdf.worker.d.ts +0 -0
- package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +0 -9
- package/dist/src/package/vendors/pptx/index.d.ts +0 -6
- package/dist/src/package/vendors/pptx/options.d.ts +0 -39
- package/dist/src/package/vendors/pptx/support/chart.d.ts +0 -4
- package/dist/src/package/vendors/pptx/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/renders.d.ts +0 -3
- package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +0 -7
- package/dist/src/package/vendors/text/index.d.ts +0 -10
- package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +0 -15
- package/dist/src/package/vendors/typst/index.d.ts +0 -8
- package/dist/src/package/vendors/umd/UmdViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/umd/index.d.ts +0 -7
- package/dist/src/package/vendors/umd/parser.d.ts +0 -30
- package/dist/src/package/vendors/word/doc.d.ts +0 -5
- package/dist/src/package/vendors/word/docx.d.ts +0 -5
- package/dist/src/package/vendors/word/docx.worker.d.ts +0 -1
- package/dist/src/package/vendors/word/index.d.ts +0 -3
- package/dist/src/package/vendors/xlsx/XlsxTable.state.d.ts +0 -80
- package/dist/src/package/vendors/xlsx/XlsxTable.view.d.ts +0 -25
- package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/index.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/util.d.ts +0 -3
- package/dist/src/package/vendors/xlsx/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/sheetjs/SheetJsModel.d.ts +0 -73
- package/dist/src/package/vendors/xlsx/worker/sheetjs/color.d.ts +0 -2
- package/dist/src/package/vendors/xlsx/worker/sheetjs/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/sheetjs/sheet.worker.d.ts +0 -1
- package/dist/style.css +0 -1
- package/dist/wasm/cad/dwfv-render.wasm +0 -0
- package/dist/wasm/cad/dwg-worker.js +0 -24
- package/dist/wasm/cad/libredwg-web.js +0 -15
- package/dist/wasm/cad/libredwg-web.wasm +0 -0
package/dist/components/dist2.js
DELETED
|
@@ -1,3291 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./chunk.js";
|
|
2
|
-
import { n as t, t as n } from "./objectSpread2.js";
|
|
3
|
-
import { n as r, t as i } from "./asyncToGenerator.js";
|
|
4
|
-
import { i as a, n as o, r as s } from "./chunk-AGHRB4JF.js";
|
|
5
|
-
import { $ as c, C as l, E as u, I as d, L as f, N as p, P as m, Q as h, S as g, T as _, V as v, W as y, X as b, Z as x, _ as S, b as C, c as w, g as ee, l as te, m as T, n as E, p as ne, q as re, r as ie, t as ae, u as oe } from "./chunk-CSCIHK7Q.js";
|
|
6
|
-
import { Q as D } from "./src.js";
|
|
7
|
-
import { G as se, a as O, b as ce, f as le, g as ue, h as de, i as fe, o as pe, v as me, y as he } from "./chunk-5ZQYHXKU.js";
|
|
8
|
-
import { t as ge } from "./chunk-WU5MYG2G.js";
|
|
9
|
-
import { n as _e, t as ve } from "./chunk-XPW4576I.js";
|
|
10
|
-
import "./chunk-BSJP7CBP.js";
|
|
11
|
-
import "./chunk-L5ZTLDWV.js";
|
|
12
|
-
import "./chunk-NZK2D7GU.js";
|
|
13
|
-
import { i as ye, o as be } from "./chunk-O5CBEL6O.js";
|
|
14
|
-
import "./chunk-3OPIFGDE.js";
|
|
15
|
-
import "./chunk-KSCS5N6A.js";
|
|
16
|
-
import { n as xe } from "./chunk-LZXEDZCA.js";
|
|
17
|
-
var Se = {
|
|
18
|
-
rect: "rectangle",
|
|
19
|
-
circle: "ellipse"
|
|
20
|
-
}, Ce = {
|
|
21
|
-
startOnLoad: !1,
|
|
22
|
-
flowchart: { curve: "linear" },
|
|
23
|
-
themeVariables: { fontSize: "20px" },
|
|
24
|
-
maxEdges: 500,
|
|
25
|
-
maxTextSize: 5e4
|
|
26
|
-
};
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region node_modules/.pnpm/@excalidraw+mermaid-to-excalidraw@2.2.2/node_modules/@excalidraw/mermaid-to-excalidraw/dist/converter/GraphConverter.js
|
|
29
|
-
t();
|
|
30
|
-
var we = class {
|
|
31
|
-
constructor({ converter: e }) {
|
|
32
|
-
this.convert = (e, t) => this.converter(e, n(n({}, t), {}, { fontSize: t.fontSize || 20 })), this.converter = e;
|
|
33
|
-
}
|
|
34
|
-
}, k;
|
|
35
|
-
(function(e) {
|
|
36
|
-
e.ROUND = "round", e.STADIUM = "stadium", e.DOUBLECIRCLE = "doublecircle", e.CIRCLE = "circle", e.DIAMOND = "diamond", e.CYLINDER = "cylinder";
|
|
37
|
-
})(k || (k = {}));
|
|
38
|
-
var A;
|
|
39
|
-
(function(e) {
|
|
40
|
-
e.COLOR = "color";
|
|
41
|
-
})(A || (A = {}));
|
|
42
|
-
var j;
|
|
43
|
-
(function(e) {
|
|
44
|
-
e.FILL = "fill", e.STROKE = "stroke", e.STROKE_WIDTH = "stroke-width", e.STROKE_DASHARRAY = "stroke-dasharray";
|
|
45
|
-
})(j || (j = {}));
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region node_modules/.pnpm/@excalidraw+mermaid-to-excalidraw@2.2.2/node_modules/@excalidraw/mermaid-to-excalidraw/dist/converter/helpers.js
|
|
48
|
-
var Te = (/* @__PURE__ */ e(((e) => {
|
|
49
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.removeMarkdown = void 0, e.removeMarkdown = function(e, t) {
|
|
50
|
-
t === void 0 && (t = { listUnicodeChar: "" }), t = t || {}, t.listUnicodeChar = t.hasOwnProperty("listUnicodeChar") ? t.listUnicodeChar : !1, t.stripListLeaders = t.hasOwnProperty("stripListLeaders") ? t.stripListLeaders : !0, t.gfm = t.hasOwnProperty("gfm") ? t.gfm : !0, t.useImgAltText = t.hasOwnProperty("useImgAltText") ? t.useImgAltText : !0, t.preserveLinks = t.hasOwnProperty("preserveLinks") ? t.preserveLinks : !1;
|
|
51
|
-
var n = e || "";
|
|
52
|
-
n = n.replace(/^(-\s*?|\*\s*?|_\s*?){3,}\s*$/gm, "");
|
|
53
|
-
try {
|
|
54
|
-
t.stripListLeaders && (n = t.listUnicodeChar ? n.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, t.listUnicodeChar + " $1") : n.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, "$1")), t.gfm && (n = n.replace(/\n={2,}/g, "\n").replace(/~{3}.*\n/g, "").replace(/~~/g, "").replace(/`{3}.*\n/g, "")), t.preserveLinks && (n = n.replace(/\[(.*?)\][\[\(](.*?)[\]\)]/g, "$1 ($2)")), n = n.replace(/<[^>]*>/g, "").replace(/^[=\-]{2,}\s*$/g, "").replace(/\[\^.+?\](\: .*?$)?/g, "").replace(/\s{0,2}\[.*?\]: .*?$/g, "").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, t.useImgAltText ? "$1" : "").replace(/\[(.*?)\][\[\(].*?[\]\)]/g, "$1").replace(/^\s{0,3}>\s?/g, "").replace(/(^|\n)\s{0,3}>\s?/g, "\n\n").replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, "").replace(/^(\n)?\s{0,}#{1,6}\s+| {0,}(\n)?\s{0,}#{0,} {0,}(\n)?\s{0,}$/gm, "$1$2$3").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g, "$2").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g, "$2").replace(/(`{3,})(.*?)\1/gm, "$2").replace(/`(.+?)`/g, "$1").replace(/\n{2,}/g, "\n\n");
|
|
55
|
-
} catch (t) {
|
|
56
|
-
return console.error(t), e;
|
|
57
|
-
}
|
|
58
|
-
return n;
|
|
59
|
-
};
|
|
60
|
-
})))(), Ee = {
|
|
61
|
-
arrow_circle: { endArrowhead: "circle" },
|
|
62
|
-
arrow_cross: { endArrowhead: "bar" },
|
|
63
|
-
arrow_open: {
|
|
64
|
-
endArrowhead: null,
|
|
65
|
-
startArrowhead: null
|
|
66
|
-
},
|
|
67
|
-
double_arrow_circle: {
|
|
68
|
-
endArrowhead: "circle",
|
|
69
|
-
startArrowhead: "circle"
|
|
70
|
-
},
|
|
71
|
-
double_arrow_cross: {
|
|
72
|
-
endArrowhead: "bar",
|
|
73
|
-
startArrowhead: "bar"
|
|
74
|
-
},
|
|
75
|
-
double_arrow_point: {
|
|
76
|
-
endArrowhead: "arrow",
|
|
77
|
-
startArrowhead: "arrow"
|
|
78
|
-
}
|
|
79
|
-
}, De = (e) => Ee[e], Oe = (e) => {
|
|
80
|
-
let t = e.text;
|
|
81
|
-
return e.labelType === "markdown" && (t = (0, Te.removeMarkdown)(e.text)), ke(t);
|
|
82
|
-
}, ke = (e) => e.replace(/\s?(fa|fab):[a-zA-Z0-9-]+/g, ""), Ae = (e) => {
|
|
83
|
-
let t = {};
|
|
84
|
-
return Object.keys(e).forEach((n) => {
|
|
85
|
-
switch (n) {
|
|
86
|
-
case j.FILL:
|
|
87
|
-
t.backgroundColor = e[n], t.fillStyle = "solid";
|
|
88
|
-
break;
|
|
89
|
-
case j.STROKE:
|
|
90
|
-
t.strokeColor = e[n];
|
|
91
|
-
break;
|
|
92
|
-
case j.STROKE_WIDTH:
|
|
93
|
-
var r;
|
|
94
|
-
t.strokeWidth = Number((r = e[n]) == null ? void 0 : r.split("px")[0]);
|
|
95
|
-
break;
|
|
96
|
-
case j.STROKE_DASHARRAY:
|
|
97
|
-
t.strokeStyle = "dashed";
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
}), t;
|
|
101
|
-
}, je = (e) => {
|
|
102
|
-
let t = {};
|
|
103
|
-
return Object.keys(e).forEach((n) => {
|
|
104
|
-
switch (n) {
|
|
105
|
-
case A.COLOR:
|
|
106
|
-
t.strokeColor = e[n];
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
}), t;
|
|
110
|
-
};
|
|
111
|
-
//#endregion
|
|
112
|
-
//#region node_modules/.pnpm/@excalidraw+mermaid-to-excalidraw@2.2.2/node_modules/@excalidraw/mermaid-to-excalidraw/dist/converter/types/flowchart.js
|
|
113
|
-
t();
|
|
114
|
-
var Me = (e, t) => [e, t], Ne = 32, Pe = .62, Fe = 12, Ie = 12, Le = (e, t) => Math.max(20, Math.ceil(e.length * t * Pe)), Re = (e, t, n, r) => {
|
|
115
|
-
let i = r || 20;
|
|
116
|
-
if (e !== k.CYLINDER || !t || t.includes("\n")) return i;
|
|
117
|
-
let a = Math.max(20, n - Fe);
|
|
118
|
-
return Le(t, i) <= a ? i : Math.max(Ie, Math.floor(a / (t.length * Pe)));
|
|
119
|
-
}, ze = (e) => {
|
|
120
|
-
let t = {};
|
|
121
|
-
e.subGraphs.map((n) => {
|
|
122
|
-
n.nodeIds.forEach((r) => {
|
|
123
|
-
t[n.id] = {
|
|
124
|
-
id: n.id,
|
|
125
|
-
parent: null,
|
|
126
|
-
isLeaf: !1
|
|
127
|
-
}, t[r] = {
|
|
128
|
-
id: r,
|
|
129
|
-
parent: n.id,
|
|
130
|
-
isLeaf: e.vertices[r] !== void 0
|
|
131
|
-
};
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
let n = {};
|
|
135
|
-
return [...Object.keys(e.vertices), ...e.subGraphs.map((e) => e.id)].forEach((e) => {
|
|
136
|
-
if (!t[e]) return;
|
|
137
|
-
let r = t[e], i = [];
|
|
138
|
-
for (r.isLeaf || i.push(`subgraph_group_${r.id}`); r.parent;) i.push(`subgraph_group_${r.parent}`), r = t[r.parent];
|
|
139
|
-
n[e] = i;
|
|
140
|
-
}), {
|
|
141
|
-
getGroupIds: (e) => n[e] || [],
|
|
142
|
-
getParentId: (e) => t[e] ? t[e].parent : null
|
|
143
|
-
};
|
|
144
|
-
}, Be = new we({ converter: (e, t) => {
|
|
145
|
-
let r = [], i = t.fontSize, { getGroupIds: a, getParentId: o } = ze(e);
|
|
146
|
-
return e.subGraphs.reverse().forEach((e) => {
|
|
147
|
-
let t = a(e.id), o = Oe(e), s = Le(o, i || 16) + Ne * 2, c = Math.max(e.width, s), l = e.x - (c - e.width) / 2, u = Ae(e.containerStyle), d = je(e.labelStyle), f = n({
|
|
148
|
-
id: e.id,
|
|
149
|
-
type: "rectangle",
|
|
150
|
-
groupIds: t,
|
|
151
|
-
x: l,
|
|
152
|
-
y: e.y,
|
|
153
|
-
width: c,
|
|
154
|
-
height: e.height,
|
|
155
|
-
label: n({
|
|
156
|
-
groupIds: t,
|
|
157
|
-
text: o,
|
|
158
|
-
fontSize: i,
|
|
159
|
-
verticalAlign: "top"
|
|
160
|
-
}, d)
|
|
161
|
-
}, u);
|
|
162
|
-
r.push(f);
|
|
163
|
-
}), Object.values(e.vertices).forEach((e) => {
|
|
164
|
-
if (!e) return;
|
|
165
|
-
let t = a(e.id), o = Oe(e), s = Re(e.type, o, e.width, i), c = Ae(e.containerStyle), l = je(e.labelStyle), u = n({
|
|
166
|
-
id: e.id,
|
|
167
|
-
type: "rectangle",
|
|
168
|
-
groupIds: t,
|
|
169
|
-
x: e.x,
|
|
170
|
-
y: e.y,
|
|
171
|
-
width: e.width,
|
|
172
|
-
height: e.height,
|
|
173
|
-
strokeWidth: 2,
|
|
174
|
-
label: n({
|
|
175
|
-
groupIds: t,
|
|
176
|
-
text: o,
|
|
177
|
-
fontSize: s
|
|
178
|
-
}, l),
|
|
179
|
-
link: e.link || null
|
|
180
|
-
}, c);
|
|
181
|
-
switch (e.type) {
|
|
182
|
-
case k.STADIUM:
|
|
183
|
-
u = n(n({}, u), {}, { roundness: { type: 3 } });
|
|
184
|
-
break;
|
|
185
|
-
case k.ROUND:
|
|
186
|
-
u = n(n({}, u), {}, { roundness: { type: 3 } });
|
|
187
|
-
break;
|
|
188
|
-
case k.DOUBLECIRCLE: {
|
|
189
|
-
t.push(`doublecircle_${e.id}}`);
|
|
190
|
-
let i = {
|
|
191
|
-
type: "ellipse",
|
|
192
|
-
groupIds: t,
|
|
193
|
-
x: e.x + 5,
|
|
194
|
-
y: e.y + 5,
|
|
195
|
-
width: e.width - 10,
|
|
196
|
-
height: e.height - 10,
|
|
197
|
-
strokeWidth: 2,
|
|
198
|
-
roundness: { type: 3 },
|
|
199
|
-
label: n({
|
|
200
|
-
groupIds: t,
|
|
201
|
-
text: o,
|
|
202
|
-
fontSize: s
|
|
203
|
-
}, l)
|
|
204
|
-
};
|
|
205
|
-
u = n(n({}, u), {}, {
|
|
206
|
-
groupIds: t,
|
|
207
|
-
type: "ellipse"
|
|
208
|
-
}), r.push(i);
|
|
209
|
-
break;
|
|
210
|
-
}
|
|
211
|
-
case k.CIRCLE:
|
|
212
|
-
u.type = "ellipse";
|
|
213
|
-
break;
|
|
214
|
-
case k.DIAMOND:
|
|
215
|
-
u.type = "diamond";
|
|
216
|
-
break;
|
|
217
|
-
}
|
|
218
|
-
r.push(u);
|
|
219
|
-
}), e.edges.forEach((e) => {
|
|
220
|
-
let t = [], s = o(e.start), c = o(e.end);
|
|
221
|
-
s && s === c && (t = a(s));
|
|
222
|
-
let { startX: l, startY: u, reflectionPoints: d } = e, f = d.map((e) => Me(e.x - d[0].x, e.y - d[0].y)), p = De(e.type || "arrow_point"), m = r.find((t) => t.id === e.start), h = r.find((t) => t.id === e.end);
|
|
223
|
-
if (!m || !h) return;
|
|
224
|
-
let g = n(n(n({
|
|
225
|
-
id: `${e.start}_${e.end}`,
|
|
226
|
-
type: "arrow",
|
|
227
|
-
groupIds: t,
|
|
228
|
-
x: l,
|
|
229
|
-
y: u,
|
|
230
|
-
strokeWidth: e.stroke === "thick" ? 4 : 2,
|
|
231
|
-
strokeStyle: e.stroke === "dotted" ? "dashed" : void 0,
|
|
232
|
-
points: f
|
|
233
|
-
}, e.text ? { label: {
|
|
234
|
-
text: Oe(e),
|
|
235
|
-
fontSize: i,
|
|
236
|
-
groupIds: t
|
|
237
|
-
} } : {}), {}, { roundness: { type: 2 } }, p), {}, {
|
|
238
|
-
start: { id: m.id || "" },
|
|
239
|
-
end: { id: h.id || "" }
|
|
240
|
-
});
|
|
241
|
-
r.push(g);
|
|
242
|
-
}), { elements: r };
|
|
243
|
-
} }), M = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((e, t) => (t &= 63, t < 36 ? e += t.toString(36) : t < 62 ? e += (t - 26).toString(36).toUpperCase() : t > 62 ? e += "-" : e += "_", e), ""), Ve = new we({ converter: (e) => {
|
|
244
|
-
let t = M(), { width: n, height: r } = e, i = {
|
|
245
|
-
type: "image",
|
|
246
|
-
x: 0,
|
|
247
|
-
y: 0,
|
|
248
|
-
width: n,
|
|
249
|
-
height: r,
|
|
250
|
-
status: "saved",
|
|
251
|
-
fileId: t
|
|
252
|
-
};
|
|
253
|
-
return {
|
|
254
|
-
files: { [t]: {
|
|
255
|
-
id: t,
|
|
256
|
-
mimeType: e.mimeType,
|
|
257
|
-
dataURL: e.dataURL
|
|
258
|
-
} },
|
|
259
|
-
elements: [i]
|
|
260
|
-
};
|
|
261
|
-
} });
|
|
262
|
-
//#endregion
|
|
263
|
-
//#region node_modules/.pnpm/@excalidraw+mermaid-to-excalidraw@2.2.2/node_modules/@excalidraw/mermaid-to-excalidraw/dist/converter/transformToExcalidrawSkeleton.js
|
|
264
|
-
t();
|
|
265
|
-
var He = (e, t) => [e, t], Ue = (e) => e.replace(/\\n/g, "\n"), N = (e) => {
|
|
266
|
-
let t = {
|
|
267
|
-
type: "line",
|
|
268
|
-
x: e.startX,
|
|
269
|
-
y: e.startY,
|
|
270
|
-
points: [He(0, 0), He(e.endX - e.startX, e.endY - e.startY)],
|
|
271
|
-
width: e.endX - e.startX,
|
|
272
|
-
height: e.endY - e.startY,
|
|
273
|
-
strokeStyle: e.strokeStyle || "solid",
|
|
274
|
-
strokeColor: e.strokeColor || "#000",
|
|
275
|
-
strokeWidth: e.strokeWidth || 1
|
|
276
|
-
};
|
|
277
|
-
return e.groupId && Object.assign(t, { groupIds: [e.groupId] }), e.id && Object.assign(t, { id: e.id }), t;
|
|
278
|
-
}, P = (e) => {
|
|
279
|
-
let t = {
|
|
280
|
-
type: "text",
|
|
281
|
-
x: e.x,
|
|
282
|
-
y: e.y,
|
|
283
|
-
width: e.width,
|
|
284
|
-
height: e.height,
|
|
285
|
-
text: Ue(e.text) || "",
|
|
286
|
-
fontSize: e.fontSize,
|
|
287
|
-
verticalAlign: "top",
|
|
288
|
-
strokeColor: e.color
|
|
289
|
-
};
|
|
290
|
-
return e.groupId && Object.assign(t, { groupIds: [e.groupId] }), e.id && Object.assign(t, { id: e.id }), t;
|
|
291
|
-
}, F = (e) => {
|
|
292
|
-
var t, r, i, a, o;
|
|
293
|
-
let s = n({
|
|
294
|
-
text: Ue((e == null || (t = e.label) == null ? void 0 : t.text) || ""),
|
|
295
|
-
fontSize: e == null || (r = e.label) == null ? void 0 : r.fontSize,
|
|
296
|
-
textAlign: (i = e.label) == null ? void 0 : i.textAlign,
|
|
297
|
-
verticalAlign: ((a = e.label) == null ? void 0 : a.verticalAlign) || "middle",
|
|
298
|
-
strokeColor: ((o = e.label) == null ? void 0 : o.color) || "#000"
|
|
299
|
-
}, e.groupId ? { groupIds: [e.groupId] } : {}), c = {};
|
|
300
|
-
e.type === "rectangle" && e.subtype === "activation" && (c = {
|
|
301
|
-
backgroundColor: "#e9ecef",
|
|
302
|
-
fillStyle: "solid"
|
|
303
|
-
});
|
|
304
|
-
let l = n({
|
|
305
|
-
id: e.id,
|
|
306
|
-
type: e.type,
|
|
307
|
-
x: e.x,
|
|
308
|
-
y: e.y,
|
|
309
|
-
width: e.width,
|
|
310
|
-
height: e.height,
|
|
311
|
-
label: s,
|
|
312
|
-
strokeStyle: e == null ? void 0 : e.strokeStyle,
|
|
313
|
-
strokeWidth: e == null ? void 0 : e.strokeWidth,
|
|
314
|
-
strokeColor: e == null ? void 0 : e.strokeColor,
|
|
315
|
-
backgroundColor: e == null ? void 0 : e.bgColor,
|
|
316
|
-
fillStyle: "solid"
|
|
317
|
-
}, c);
|
|
318
|
-
return e.groupId && Object.assign(l, { groupIds: [e.groupId] }), l;
|
|
319
|
-
}, We = (e) => {
|
|
320
|
-
var t, n, r, i;
|
|
321
|
-
let a = {
|
|
322
|
-
type: "arrow",
|
|
323
|
-
x: e.startX,
|
|
324
|
-
y: e.startY,
|
|
325
|
-
points: ((t = e.points) == null ? void 0 : t.map(([e, t]) => He(e, t))) || [He(0, 0), He(e.endX - e.startX, e.endY - e.startY)],
|
|
326
|
-
width: e.endX - e.startX,
|
|
327
|
-
height: e.endY - e.startY,
|
|
328
|
-
strokeStyle: (e == null ? void 0 : e.strokeStyle) || "solid",
|
|
329
|
-
endArrowhead: (e == null ? void 0 : e.endArrowhead) || null,
|
|
330
|
-
startArrowhead: (e == null ? void 0 : e.startArrowhead) || null,
|
|
331
|
-
label: {
|
|
332
|
-
text: Ue((e == null || (n = e.label) == null ? void 0 : n.text) || ""),
|
|
333
|
-
fontSize: 16,
|
|
334
|
-
textAlign: e == null || (r = e.label) == null ? void 0 : r.textAlign,
|
|
335
|
-
verticalAlign: e == null || (i = e.label) == null ? void 0 : i.verticalAlign
|
|
336
|
-
},
|
|
337
|
-
roundness: { type: 2 },
|
|
338
|
-
start: e.start,
|
|
339
|
-
end: e.end
|
|
340
|
-
};
|
|
341
|
-
return e.groupId && Object.assign(a, { groupIds: [e.groupId] }), a;
|
|
342
|
-
}, Ge = 10, Ke = 16, qe = 24, Je = 4, Ye = (e) => {
|
|
343
|
-
if (!e) return !0;
|
|
344
|
-
let t = e.trim().toLowerCase();
|
|
345
|
-
return t === "transparent" || t === "none" || t === "rgba(0,0,0,0)" || t === "rgba(0, 0, 0, 0)";
|
|
346
|
-
}, Xe = (e, t) => Math.max(20, Math.round(e.length * t * .6)), Ze = (e, t, n = !0) => {
|
|
347
|
-
var r, i;
|
|
348
|
-
let a = e, o = (r = a.groupIds) == null ? [] : r;
|
|
349
|
-
if (o.includes(t) || (a.groupIds = [...o, t]), !n || !a.label) return;
|
|
350
|
-
let s = (i = a.label.groupIds) == null ? [] : i;
|
|
351
|
-
s.includes(t) || (a.label.groupIds = [...s, t]);
|
|
352
|
-
}, Qe = new we({ converter: (e) => {
|
|
353
|
-
let t = [], n = [];
|
|
354
|
-
if (Object.values(e.nodes).forEach((e) => {
|
|
355
|
-
!e || !e.length || e.forEach((e) => {
|
|
356
|
-
let r;
|
|
357
|
-
switch (e.type) {
|
|
358
|
-
case "line":
|
|
359
|
-
r = N(e);
|
|
360
|
-
break;
|
|
361
|
-
case "rectangle":
|
|
362
|
-
case "ellipse":
|
|
363
|
-
r = F(e);
|
|
364
|
-
break;
|
|
365
|
-
case "text":
|
|
366
|
-
r = P(e);
|
|
367
|
-
break;
|
|
368
|
-
default: throw `unknown type ${e.type}`;
|
|
369
|
-
}
|
|
370
|
-
e.type === "rectangle" && (e == null ? void 0 : e.subtype) === "activation" ? n.push(r) : t.push(r);
|
|
371
|
-
});
|
|
372
|
-
}), Object.values(e.lines).forEach((e) => {
|
|
373
|
-
e && t.push(N(e));
|
|
374
|
-
}), Object.values(e.arrows).forEach((e) => {
|
|
375
|
-
e && (t.push(We(e)), e.sequenceNumber && t.push(F(e.sequenceNumber)));
|
|
376
|
-
}), t.push(...n), e.loops) {
|
|
377
|
-
let { lines: n, texts: r, nodes: i } = e.loops;
|
|
378
|
-
n.forEach((e) => {
|
|
379
|
-
t.push(N(e));
|
|
380
|
-
}), r.forEach((e) => {
|
|
381
|
-
t.push(P(e));
|
|
382
|
-
}), i.forEach((e) => {
|
|
383
|
-
t.push(F(e));
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
return e.groups && e.groups.forEach((e) => {
|
|
387
|
-
let { actorKeys: n, name: r } = e, i = Infinity, a = Infinity, o = 0, s = 0;
|
|
388
|
-
if (!n.length) return;
|
|
389
|
-
let c = t.filter((e) => {
|
|
390
|
-
if (e.id) {
|
|
391
|
-
let t = e.id.indexOf("-"), r = e.id.substring(0, t);
|
|
392
|
-
return n.includes(r);
|
|
393
|
-
}
|
|
394
|
-
return !1;
|
|
395
|
-
});
|
|
396
|
-
if (!c.length || (c.forEach((e) => {
|
|
397
|
-
e.x === void 0 || e.y === void 0 || e.width === void 0 || e.height === void 0 || (i = Math.min(i, e.x), a = Math.min(a, e.y), o = Math.max(o, e.x + e.width), s = Math.max(s, e.y + e.height));
|
|
398
|
-
}), !Number.isFinite(i) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(s))) return;
|
|
399
|
-
let l = i - Ge, u = a - Ge, d = o - i + Ge * 2, f = s - a + Ge * 2, p = M(), m = M(), h = F({
|
|
400
|
-
type: "rectangle",
|
|
401
|
-
x: l,
|
|
402
|
-
y: u,
|
|
403
|
-
width: d,
|
|
404
|
-
height: f,
|
|
405
|
-
bgColor: Ye(e.fill) ? void 0 : e.fill,
|
|
406
|
-
strokeColor: "#1f1f1f",
|
|
407
|
-
strokeWidth: 1,
|
|
408
|
-
id: p,
|
|
409
|
-
groupId: m
|
|
410
|
-
});
|
|
411
|
-
if (t.unshift(h), t.forEach((e) => {
|
|
412
|
-
e.id !== p && (e.x === void 0 || e.y === void 0 || e.width === void 0 || e.height === void 0 || e.x >= i && e.x + e.width <= o && e.y >= a && e.y + e.height <= s && Ze(e, m));
|
|
413
|
-
}), r) {
|
|
414
|
-
let e = P({
|
|
415
|
-
type: "text",
|
|
416
|
-
id: M(),
|
|
417
|
-
text: r,
|
|
418
|
-
x: l + Je,
|
|
419
|
-
y: u - qe,
|
|
420
|
-
width: Xe(r, Ke),
|
|
421
|
-
height: 24,
|
|
422
|
-
fontSize: Ke,
|
|
423
|
-
color: "#1f1f1f",
|
|
424
|
-
groupId: m
|
|
425
|
-
});
|
|
426
|
-
Ze(e, m, !1), t.push(e);
|
|
427
|
-
}
|
|
428
|
-
}), { elements: t };
|
|
429
|
-
} }), $e = new we({ converter: (e) => {
|
|
430
|
-
let t = [];
|
|
431
|
-
return e.nodes.forEach((e) => {
|
|
432
|
-
!e || !e.length || e.forEach((e) => {
|
|
433
|
-
let n;
|
|
434
|
-
switch (e.type) {
|
|
435
|
-
case "line":
|
|
436
|
-
n = N(e);
|
|
437
|
-
break;
|
|
438
|
-
case "rectangle":
|
|
439
|
-
case "ellipse":
|
|
440
|
-
n = F(e);
|
|
441
|
-
break;
|
|
442
|
-
case "text":
|
|
443
|
-
n = P(e);
|
|
444
|
-
break;
|
|
445
|
-
default: throw `unknown type ${e.type}`;
|
|
446
|
-
}
|
|
447
|
-
t.push(n);
|
|
448
|
-
});
|
|
449
|
-
}), Object.values(e.lines).forEach((e) => {
|
|
450
|
-
e && t.push(N(e));
|
|
451
|
-
}), Object.values(e.arrows).forEach((e) => {
|
|
452
|
-
if (!e) return;
|
|
453
|
-
let n = We(e);
|
|
454
|
-
t.push(n);
|
|
455
|
-
}), Object.values(e.text).forEach((e) => {
|
|
456
|
-
let n = P(e);
|
|
457
|
-
t.push(n);
|
|
458
|
-
}), Object.values(e.namespaces).forEach((n) => {
|
|
459
|
-
let r = Object.keys(n.classes), i = [...r], a = [
|
|
460
|
-
...e.lines,
|
|
461
|
-
...e.arrows,
|
|
462
|
-
...e.text
|
|
463
|
-
];
|
|
464
|
-
r.forEach((e) => {
|
|
465
|
-
let t = a.filter((t) => t.metadata && t.metadata.classId === e).map((e) => e.id);
|
|
466
|
-
t.length && i.push(...t);
|
|
467
|
-
});
|
|
468
|
-
let o = {
|
|
469
|
-
type: "frame",
|
|
470
|
-
id: M(),
|
|
471
|
-
name: n.id,
|
|
472
|
-
children: i
|
|
473
|
-
};
|
|
474
|
-
t.push(o);
|
|
475
|
-
}), { elements: t };
|
|
476
|
-
} }), et = new we({ converter: (e) => {
|
|
477
|
-
let t = [];
|
|
478
|
-
return e.nodes.forEach((e) => {
|
|
479
|
-
!e || !e.length || e.forEach((e) => {
|
|
480
|
-
let n;
|
|
481
|
-
switch (e.type) {
|
|
482
|
-
case "line":
|
|
483
|
-
n = N(e);
|
|
484
|
-
break;
|
|
485
|
-
case "rectangle":
|
|
486
|
-
case "ellipse":
|
|
487
|
-
n = F(e);
|
|
488
|
-
break;
|
|
489
|
-
case "text":
|
|
490
|
-
n = P(e);
|
|
491
|
-
break;
|
|
492
|
-
default: throw `unknown type ${e.type}`;
|
|
493
|
-
}
|
|
494
|
-
t.push(n);
|
|
495
|
-
});
|
|
496
|
-
}), e.lines.forEach((e) => {
|
|
497
|
-
t.push(N(e));
|
|
498
|
-
}), e.arrows.forEach((e) => {
|
|
499
|
-
t.push(We(e));
|
|
500
|
-
}), e.text.forEach((e) => {
|
|
501
|
-
t.push(P(e));
|
|
502
|
-
}), { elements: t };
|
|
503
|
-
} });
|
|
504
|
-
//#endregion
|
|
505
|
-
//#region node_modules/.pnpm/@excalidraw+mermaid-to-excalidraw@2.2.2/node_modules/@excalidraw/mermaid-to-excalidraw/dist/converter/types/state.js
|
|
506
|
-
t();
|
|
507
|
-
var tt = (e, t) => [e, t], nt = 16, rt = 14, it = 1, at = "#000000", ot = 5, st = ot * 2, ct = ot * 2, lt = 1.25, ut = new Set([
|
|
508
|
-
"choice",
|
|
509
|
-
"fork",
|
|
510
|
-
"join",
|
|
511
|
-
"stateStart",
|
|
512
|
-
"stateEnd",
|
|
513
|
-
"divider"
|
|
514
|
-
]), dt = (e) => e.shape === "stateEnd" ? [`state_end_group_${e.id}`] : void 0, ft = (e) => e.shape === "rectWithTitle" && e.description.length ? [e.text, ...e.description].join("\n") : e.text, I, pt = () => {
|
|
515
|
-
if (I !== void 0) return I;
|
|
516
|
-
if (typeof document > "u") return I = null, I;
|
|
517
|
-
try {
|
|
518
|
-
I = document.createElement("canvas").getContext("2d");
|
|
519
|
-
} catch (e) {
|
|
520
|
-
I = null;
|
|
521
|
-
}
|
|
522
|
-
return I;
|
|
523
|
-
}, L = (e, t) => {
|
|
524
|
-
let n = pt();
|
|
525
|
-
return n ? (n.font = `${t}px Excalifont, sans-serif`, n.measureText(e).width) : e.length * t * .6;
|
|
526
|
-
}, mt = (e, t, n) => {
|
|
527
|
-
if (L(e, t) <= n) return [e];
|
|
528
|
-
let r = [], i = "";
|
|
529
|
-
for (let a of e) {
|
|
530
|
-
let e = `${i}${a}`;
|
|
531
|
-
if (i && L(e, t) > n) {
|
|
532
|
-
r.push(i), i = a;
|
|
533
|
-
continue;
|
|
534
|
-
}
|
|
535
|
-
i = e;
|
|
536
|
-
}
|
|
537
|
-
return i && r.push(i), r;
|
|
538
|
-
}, ht = (e, t, n) => {
|
|
539
|
-
if (!e.trim() || L(e, t) <= n) return e;
|
|
540
|
-
let r = e.split(/\s+/).filter(Boolean), i = [], a = "";
|
|
541
|
-
for (let e of r) {
|
|
542
|
-
let r = mt(e, t, n);
|
|
543
|
-
for (let [e, o] of r.entries()) {
|
|
544
|
-
let r = a ? `${a}${a && e === 0 ? " " : ""}${o}` : o;
|
|
545
|
-
if (L(r, t) <= n) {
|
|
546
|
-
a = r;
|
|
547
|
-
continue;
|
|
548
|
-
}
|
|
549
|
-
a && i.push(a), a = o;
|
|
550
|
-
}
|
|
551
|
-
r.length;
|
|
552
|
-
}
|
|
553
|
-
return i.push(a), i.join("\n");
|
|
554
|
-
}, gt = (e, t, n) => {
|
|
555
|
-
let r = e.map((e) => ht(e, t, n)).join("\n").split("\n");
|
|
556
|
-
return {
|
|
557
|
-
width: Math.max(...r.map((e) => L(e, t))),
|
|
558
|
-
height: r.length * t * lt
|
|
559
|
-
};
|
|
560
|
-
}, _t = (e, t, n, r) => {
|
|
561
|
-
let i = e.split("\n");
|
|
562
|
-
for (let e = nt; e >= rt; e -= it) {
|
|
563
|
-
let { height: r } = gt(i, e, t);
|
|
564
|
-
if (r <= n) return e;
|
|
565
|
-
}
|
|
566
|
-
return r;
|
|
567
|
-
}, vt = (e) => {
|
|
568
|
-
let t = ft(e);
|
|
569
|
-
if (!t || ut.has(e.shape)) return nt;
|
|
570
|
-
let n = Math.max(1, e.width - st), r = Math.max(1, e.height - ct), i = t.split("\n");
|
|
571
|
-
return i.length > 1 && Math.max(...i.map((e) => L(e, nt))) <= n ? nt : _t(t, n, r, i.length === 1 ? nt : rt);
|
|
572
|
-
}, yt = (e) => {
|
|
573
|
-
if (ut.has(e.shape)) return;
|
|
574
|
-
let t = ft(e);
|
|
575
|
-
if (t) return n({
|
|
576
|
-
text: t,
|
|
577
|
-
fontSize: vt(e),
|
|
578
|
-
verticalAlign: e.shape === "rectWithTitle" || e.shape === "roundedWithTitle" ? "top" : "middle"
|
|
579
|
-
}, je(e.labelStyle));
|
|
580
|
-
}, bt = (e) => {
|
|
581
|
-
let t = Ae(e.containerStyle), r = yt(e), i = e.shape === "choice" ? "diamond" : e.shape === "stateStart" || e.shape === "stateEnd" ? "ellipse" : "rectangle", a = e.shape === "rect" || e.shape === "rectWithTitle" || e.shape === "roundedWithTitle", o = e.shape === "stateStart" || e.shape === "fork" || e.shape === "join", s = t.backgroundColor || t.strokeColor || at, c = t.strokeColor || t.backgroundColor || at;
|
|
582
|
-
return n(n(n(n(n({
|
|
583
|
-
id: e.id,
|
|
584
|
-
type: i
|
|
585
|
-
}, dt(e) ? { groupIds: dt(e) } : {}), {}, {
|
|
586
|
-
x: e.x,
|
|
587
|
-
y: e.y,
|
|
588
|
-
width: e.width,
|
|
589
|
-
height: e.height
|
|
590
|
-
}, r ? { label: r } : {}), t), a ? { roundness: { type: 3 } } : {}), o ? {
|
|
591
|
-
backgroundColor: s,
|
|
592
|
-
strokeColor: c,
|
|
593
|
-
fillStyle: "solid"
|
|
594
|
-
} : {});
|
|
595
|
-
}, xt = (e) => {
|
|
596
|
-
if (!e.dividerLine) return null;
|
|
597
|
-
let t = Ae(e.containerStyle);
|
|
598
|
-
return {
|
|
599
|
-
id: `${e.id}__divider`,
|
|
600
|
-
type: "line",
|
|
601
|
-
x: e.dividerLine.startX,
|
|
602
|
-
y: e.dividerLine.startY,
|
|
603
|
-
width: e.dividerLine.endX - e.dividerLine.startX,
|
|
604
|
-
height: e.dividerLine.endY - e.dividerLine.startY,
|
|
605
|
-
points: [tt(0, 0), tt(e.dividerLine.endX - e.dividerLine.startX, e.dividerLine.endY - e.dividerLine.startY)],
|
|
606
|
-
strokeColor: t.strokeColor || "#000",
|
|
607
|
-
strokeWidth: t.strokeWidth || 1
|
|
608
|
-
};
|
|
609
|
-
}, St = (e) => {
|
|
610
|
-
let t = Ae(e.containerStyle), n = Math.max(2, Math.min(e.width, e.height) * .32), r = e.endInnerColor || t.strokeColor || t.backgroundColor || at;
|
|
611
|
-
return {
|
|
612
|
-
id: `${e.id}__inner`,
|
|
613
|
-
type: "ellipse",
|
|
614
|
-
groupIds: dt(e),
|
|
615
|
-
x: e.x + n,
|
|
616
|
-
y: e.y + n,
|
|
617
|
-
width: Math.max(1, e.width - n * 2),
|
|
618
|
-
height: Math.max(1, e.height - n * 2),
|
|
619
|
-
backgroundColor: r,
|
|
620
|
-
strokeColor: r,
|
|
621
|
-
fillStyle: "solid",
|
|
622
|
-
strokeWidth: 1
|
|
623
|
-
};
|
|
624
|
-
}, Ct = (e) => {
|
|
625
|
-
let t = e.reflectionPoints.map((e, t, n) => {
|
|
626
|
-
let r = n[0];
|
|
627
|
-
return t === 0 ? tt(0, 0) : tt(e.x - r.x, e.y - r.y);
|
|
628
|
-
});
|
|
629
|
-
return n({
|
|
630
|
-
id: e.id,
|
|
631
|
-
type: "arrow",
|
|
632
|
-
x: e.startX,
|
|
633
|
-
y: e.startY,
|
|
634
|
-
width: e.endX - e.startX,
|
|
635
|
-
height: e.endY - e.startY,
|
|
636
|
-
points: t,
|
|
637
|
-
strokeColor: e.strokeColor || "#000",
|
|
638
|
-
strokeWidth: e.strokeWidth || 2,
|
|
639
|
-
strokeStyle: e.strokeStyle || "solid",
|
|
640
|
-
endArrowhead: e.isNoteEdge ? null : "triangle",
|
|
641
|
-
roundness: { type: 2 },
|
|
642
|
-
start: { id: e.start },
|
|
643
|
-
end: { id: e.end }
|
|
644
|
-
}, e.text ? { label: {
|
|
645
|
-
text: e.text,
|
|
646
|
-
fontSize: 16
|
|
647
|
-
} } : {});
|
|
648
|
-
}, wt = new we({ converter: (e) => {
|
|
649
|
-
let t = [];
|
|
650
|
-
return e.nodes.forEach((e) => {
|
|
651
|
-
if (!e.isRenderable) return;
|
|
652
|
-
let n = bt(e);
|
|
653
|
-
t.push(n);
|
|
654
|
-
let r = xt(e);
|
|
655
|
-
r && t.push(r), e.shape === "stateEnd" && t.push(St(e));
|
|
656
|
-
}), e.edges.forEach((e) => {
|
|
657
|
-
t.push(Ct(e));
|
|
658
|
-
}), { elements: t };
|
|
659
|
-
} }), R = (e) => {
|
|
660
|
-
e = Et(e);
|
|
661
|
-
let t = e.replace(/#(\d+);/g, "&#$1;").replace(/#([a-z]+);/g, "&$1;"), n = document.createElement("textarea");
|
|
662
|
-
return n.innerHTML = t, n.value;
|
|
663
|
-
}, z = (e) => {
|
|
664
|
-
let t = e.getAttribute("transform"), n = t == null ? void 0 : t.match(/translate\(([ \d.-]+),\s*([\d.-]+)\)/), r = 0, i = 0;
|
|
665
|
-
return n && (r = Number(n[1]), i = Number(n[2])), {
|
|
666
|
-
transformX: r,
|
|
667
|
-
transformY: i
|
|
668
|
-
};
|
|
669
|
-
}, Tt = (e) => {
|
|
670
|
-
let t = e;
|
|
671
|
-
return t = t.replace(/style.*:\S*#.*;/g, (e) => e.substring(0, e.length - 1)), t = t.replace(/classDef.*:\S*#.*;/g, (e) => e.substring(0, e.length - 1)), t = t.replace(/#\w+;/g, (e) => {
|
|
672
|
-
let t = e.substring(1, e.length - 1);
|
|
673
|
-
return /^\+?\d+$/.test(t) ? `fl°°${t}¶ß` : `fl°${t}¶ß`;
|
|
674
|
-
}), t;
|
|
675
|
-
}, Et = function(e) {
|
|
676
|
-
return e.replace(/fl°°/g, "#").replace(/fl°/g, "&").replace(/¶ß/g, ";");
|
|
677
|
-
}, Dt = .5, Ot = (e, t = Dt) => {
|
|
678
|
-
let n = [];
|
|
679
|
-
return e.forEach((e) => {
|
|
680
|
-
let r = n[n.length - 1];
|
|
681
|
-
if (!r) {
|
|
682
|
-
n.push(e);
|
|
683
|
-
return;
|
|
684
|
-
}
|
|
685
|
-
Math.hypot(e[0] - r[0], e[1] - r[1]) <= t || n.push(e);
|
|
686
|
-
}), n;
|
|
687
|
-
}, kt = (e) => {
|
|
688
|
-
let t = e.getAttribute("d");
|
|
689
|
-
if (!t) return null;
|
|
690
|
-
let n = Array.from(t.matchAll(/-?\d*\.?\d+(?:e[-+]?\d+)?/gi), (e) => Number(e[0]));
|
|
691
|
-
return n.length < 4 ? null : {
|
|
692
|
-
startX: n[0],
|
|
693
|
-
startY: n[1],
|
|
694
|
-
endX: n[n.length - 2],
|
|
695
|
-
endY: n[n.length - 1]
|
|
696
|
-
};
|
|
697
|
-
}, At = (e) => {
|
|
698
|
-
let t = e.getAttribute("data-points");
|
|
699
|
-
if (!t) {
|
|
700
|
-
let t = kt(e);
|
|
701
|
-
return t ? [{
|
|
702
|
-
x: t.startX,
|
|
703
|
-
y: t.startY
|
|
704
|
-
}, {
|
|
705
|
-
x: t.endX,
|
|
706
|
-
y: t.endY
|
|
707
|
-
}] : [];
|
|
708
|
-
}
|
|
709
|
-
try {
|
|
710
|
-
let e = atob(t), n = JSON.parse(e);
|
|
711
|
-
return Array.isArray(n) ? n.filter((e) => e && typeof e.x == "number" && typeof e.y == "number" && Number.isFinite(e.x) && Number.isFinite(e.y)) : [];
|
|
712
|
-
} catch (e) {
|
|
713
|
-
return [];
|
|
714
|
-
}
|
|
715
|
-
}, jt = (e, t = {
|
|
716
|
-
x: 0,
|
|
717
|
-
y: 0
|
|
718
|
-
}, n = "LM") => {
|
|
719
|
-
if (e.tagName.toLowerCase() !== "path") throw Error(`Invalid input: Expected an HTMLElement of tag "path", got ${e.tagName}`);
|
|
720
|
-
let r = e.getAttribute("d");
|
|
721
|
-
if (!r) throw Error("Path element does not contain a \"d\" attribute");
|
|
722
|
-
let i = r.split(RegExp(`(?=[${n}])`)), a = i[0].substring(1).split(",").map((e) => parseFloat(e)), o = i[i.length - 1].substring(1).split(",").map((e) => parseFloat(e)), s = i.map((e) => {
|
|
723
|
-
let t = e[0], n = e.substring(1).split(",").map((e) => parseFloat(e));
|
|
724
|
-
return t === "C" ? {
|
|
725
|
-
x: n[4],
|
|
726
|
-
y: n[5],
|
|
727
|
-
command: t
|
|
728
|
-
} : {
|
|
729
|
-
x: n[0],
|
|
730
|
-
y: n[1],
|
|
731
|
-
command: t
|
|
732
|
-
};
|
|
733
|
-
}).filter((e, t, n) => {
|
|
734
|
-
if (t === 0 || t === n.length - 1) return !0;
|
|
735
|
-
if (e.x === n[t - 1].x && e.y === n[t - 1].y || t === n.length - 2 && e.command === "C") return !1;
|
|
736
|
-
if (t === n.length - 2 && (n[t - 1].x === e.x || n[t - 1].y === e.y)) {
|
|
737
|
-
let t = n[n.length - 1];
|
|
738
|
-
return Math.hypot(t.x - e.x, t.y - e.y) > 20;
|
|
739
|
-
}
|
|
740
|
-
return e.x !== n[t - 1].x || e.y !== n[t - 1].y;
|
|
741
|
-
}).map((e) => ({
|
|
742
|
-
x: e.x + t.x,
|
|
743
|
-
y: e.y + t.y
|
|
744
|
-
}));
|
|
745
|
-
return {
|
|
746
|
-
startX: a[0] + t.x,
|
|
747
|
-
startY: a[1] + t.y,
|
|
748
|
-
endX: o[0] + t.x,
|
|
749
|
-
endY: o[1] + t.y,
|
|
750
|
-
reflectionPoints: s
|
|
751
|
-
};
|
|
752
|
-
};
|
|
753
|
-
//#endregion
|
|
754
|
-
//#region node_modules/.pnpm/@excalidraw+mermaid-to-excalidraw@2.2.2/node_modules/@excalidraw/mermaid-to-excalidraw/dist/graphToExcalidraw.js
|
|
755
|
-
t();
|
|
756
|
-
var Mt = (e) => n(n({}, e), {}, { elements: e.elements.map((e) => {
|
|
757
|
-
if (!("points" in e) || !Array.isArray(e.points)) return e;
|
|
758
|
-
let t = e.points;
|
|
759
|
-
if (t.length < 2) return e;
|
|
760
|
-
let r = Ot(t);
|
|
761
|
-
return r.length === t.length ? e : n(n({}, e), {}, { points: r });
|
|
762
|
-
}) }), Nt = (e, t = {}) => Mt((() => {
|
|
763
|
-
switch (e.type) {
|
|
764
|
-
case "graphImage": return Ve.convert(e, t);
|
|
765
|
-
case "flowchart": return Be.convert(e, t);
|
|
766
|
-
case "sequence": return Qe.convert(e, t);
|
|
767
|
-
case "class": return $e.convert(e, t);
|
|
768
|
-
case "erd": return et.convert(e, t);
|
|
769
|
-
case "state": return wt.convert(e, t);
|
|
770
|
-
default: throw Error(`graphToExcalidraw: unknown graph type "${e.type}, only flowcharts are supported!"`);
|
|
771
|
-
}
|
|
772
|
-
})());
|
|
773
|
-
//#endregion
|
|
774
|
-
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/isPrototype.mjs
|
|
775
|
-
function Pt(e) {
|
|
776
|
-
let t = e == null ? void 0 : e.constructor;
|
|
777
|
-
return e === (typeof t == "function" ? t.prototype : Object.prototype);
|
|
778
|
-
}
|
|
779
|
-
//#endregion
|
|
780
|
-
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isEmpty.mjs
|
|
781
|
-
function Ft(e) {
|
|
782
|
-
if (e == null) return !0;
|
|
783
|
-
if (se(e)) return typeof e.splice != "function" && typeof e != "string" && !ce(e) && !me(e) && !he(e) ? !1 : e.length === 0;
|
|
784
|
-
if (typeof e == "object") {
|
|
785
|
-
if (e instanceof Map || e instanceof Set) return e.size === 0;
|
|
786
|
-
let t = Object.keys(e);
|
|
787
|
-
return Pt(e) ? t.filter((e) => e !== "constructor").length === 0 : t.length === 0;
|
|
788
|
-
}
|
|
789
|
-
return !0;
|
|
790
|
-
}
|
|
791
|
-
//#endregion
|
|
792
|
-
//#region node_modules/.pnpm/stylis@4.4.0/node_modules/stylis/src/Enum.js
|
|
793
|
-
var It = "comm", Lt = "rule", Rt = "decl", zt = "@import", Bt = "@namespace", Vt = "@keyframes", Ht = "@layer", Ut = Math.abs, Wt = String.fromCharCode;
|
|
794
|
-
function Gt(e) {
|
|
795
|
-
return e.trim();
|
|
796
|
-
}
|
|
797
|
-
function Kt(e, t, n) {
|
|
798
|
-
return e.replace(t, n);
|
|
799
|
-
}
|
|
800
|
-
function B(e, t) {
|
|
801
|
-
return e.charCodeAt(t) | 0;
|
|
802
|
-
}
|
|
803
|
-
function qt(e, t, n) {
|
|
804
|
-
return e.slice(t, n);
|
|
805
|
-
}
|
|
806
|
-
function V(e) {
|
|
807
|
-
return e.length;
|
|
808
|
-
}
|
|
809
|
-
function Jt(e) {
|
|
810
|
-
return e.length;
|
|
811
|
-
}
|
|
812
|
-
function Yt(e, t) {
|
|
813
|
-
return t.push(e), e;
|
|
814
|
-
}
|
|
815
|
-
//#endregion
|
|
816
|
-
//#region node_modules/.pnpm/stylis@4.4.0/node_modules/stylis/src/Tokenizer.js
|
|
817
|
-
var Xt = 1, Zt = 1, Qt = 0, H = 0, U = 0, $t = "";
|
|
818
|
-
function en(e, t, n, r, i, a, o, s) {
|
|
819
|
-
return {
|
|
820
|
-
value: e,
|
|
821
|
-
root: t,
|
|
822
|
-
parent: n,
|
|
823
|
-
type: r,
|
|
824
|
-
props: i,
|
|
825
|
-
children: a,
|
|
826
|
-
line: Xt,
|
|
827
|
-
column: Zt,
|
|
828
|
-
length: o,
|
|
829
|
-
return: "",
|
|
830
|
-
siblings: s
|
|
831
|
-
};
|
|
832
|
-
}
|
|
833
|
-
function tn() {
|
|
834
|
-
return U;
|
|
835
|
-
}
|
|
836
|
-
function nn() {
|
|
837
|
-
return U = H > 0 ? B($t, --H) : 0, Zt--, U === 10 && (Zt = 1, Xt--), U;
|
|
838
|
-
}
|
|
839
|
-
function W() {
|
|
840
|
-
return U = H < Qt ? B($t, H++) : 0, Zt++, U === 10 && (Zt = 1, Xt++), U;
|
|
841
|
-
}
|
|
842
|
-
function G() {
|
|
843
|
-
return B($t, H);
|
|
844
|
-
}
|
|
845
|
-
function rn() {
|
|
846
|
-
return H;
|
|
847
|
-
}
|
|
848
|
-
function an(e, t) {
|
|
849
|
-
return qt($t, e, t);
|
|
850
|
-
}
|
|
851
|
-
function on(e) {
|
|
852
|
-
switch (e) {
|
|
853
|
-
case 0:
|
|
854
|
-
case 9:
|
|
855
|
-
case 10:
|
|
856
|
-
case 13:
|
|
857
|
-
case 32: return 5;
|
|
858
|
-
case 33:
|
|
859
|
-
case 43:
|
|
860
|
-
case 44:
|
|
861
|
-
case 47:
|
|
862
|
-
case 62:
|
|
863
|
-
case 64:
|
|
864
|
-
case 126:
|
|
865
|
-
case 59:
|
|
866
|
-
case 123:
|
|
867
|
-
case 125: return 4;
|
|
868
|
-
case 58: return 3;
|
|
869
|
-
case 34:
|
|
870
|
-
case 39:
|
|
871
|
-
case 40:
|
|
872
|
-
case 91: return 2;
|
|
873
|
-
case 41:
|
|
874
|
-
case 93: return 1;
|
|
875
|
-
}
|
|
876
|
-
return 0;
|
|
877
|
-
}
|
|
878
|
-
function sn(e) {
|
|
879
|
-
return Xt = Zt = 1, Qt = V($t = e), H = 0, [];
|
|
880
|
-
}
|
|
881
|
-
function cn(e) {
|
|
882
|
-
return $t = "", e;
|
|
883
|
-
}
|
|
884
|
-
function ln(e) {
|
|
885
|
-
return Gt(an(H - 1, fn(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
886
|
-
}
|
|
887
|
-
function un(e) {
|
|
888
|
-
for (; (U = G()) && U < 33;) W();
|
|
889
|
-
return on(e) > 2 || on(U) > 3 ? "" : " ";
|
|
890
|
-
}
|
|
891
|
-
function dn(e, t) {
|
|
892
|
-
for (; --t && W() && !(U < 48 || U > 102 || U > 57 && U < 65 || U > 70 && U < 97););
|
|
893
|
-
return an(e, rn() + (t < 6 && G() == 32 && W() == 32));
|
|
894
|
-
}
|
|
895
|
-
function fn(e) {
|
|
896
|
-
for (; W();) switch (U) {
|
|
897
|
-
case e: return H;
|
|
898
|
-
case 34:
|
|
899
|
-
case 39:
|
|
900
|
-
e !== 34 && e !== 39 && fn(U);
|
|
901
|
-
break;
|
|
902
|
-
case 40:
|
|
903
|
-
e === 41 && fn(e);
|
|
904
|
-
break;
|
|
905
|
-
case 92:
|
|
906
|
-
W();
|
|
907
|
-
break;
|
|
908
|
-
}
|
|
909
|
-
return H;
|
|
910
|
-
}
|
|
911
|
-
function pn(e, t) {
|
|
912
|
-
for (; W() && e + U !== 57 && !(e + U === 84 && G() === 47););
|
|
913
|
-
return "/*" + an(t, H - 1) + "*" + Wt(e === 47 ? e : W());
|
|
914
|
-
}
|
|
915
|
-
function mn(e) {
|
|
916
|
-
for (; !on(G());) W();
|
|
917
|
-
return an(e, H);
|
|
918
|
-
}
|
|
919
|
-
//#endregion
|
|
920
|
-
//#region node_modules/.pnpm/stylis@4.4.0/node_modules/stylis/src/Parser.js
|
|
921
|
-
function hn(e) {
|
|
922
|
-
return cn(gn("", null, null, null, [""], e = sn(e), 0, [0], e));
|
|
923
|
-
}
|
|
924
|
-
function gn(e, t, n, r, i, a, o, s, c) {
|
|
925
|
-
for (var l = 0, u = 0, d = o, f = 0, p = 0, m = 0, h = 1, g = 1, _ = 1, v = 0, y = 0, b = "", x = i, S = a, C = r, w = b; g;) switch (m = y, y = W()) {
|
|
926
|
-
case 40:
|
|
927
|
-
m != 108 && B(w, d - 1) == 58 ? (v++, w += "(") : w += ln(y);
|
|
928
|
-
break;
|
|
929
|
-
case 41:
|
|
930
|
-
v--, w += ")";
|
|
931
|
-
break;
|
|
932
|
-
case 34:
|
|
933
|
-
case 39:
|
|
934
|
-
case 91:
|
|
935
|
-
w += ln(y);
|
|
936
|
-
break;
|
|
937
|
-
case 9:
|
|
938
|
-
case 10:
|
|
939
|
-
case 13:
|
|
940
|
-
case 32:
|
|
941
|
-
if (v > 0) {
|
|
942
|
-
w += Wt(y);
|
|
943
|
-
break;
|
|
944
|
-
}
|
|
945
|
-
w += un(m);
|
|
946
|
-
break;
|
|
947
|
-
case 92:
|
|
948
|
-
w += dn(rn() - 1, 7);
|
|
949
|
-
continue;
|
|
950
|
-
case 47:
|
|
951
|
-
switch (G()) {
|
|
952
|
-
case 42:
|
|
953
|
-
case 47:
|
|
954
|
-
Yt(vn(pn(W(), rn()), t, n, c), c), (on(m || 1) == 5 || on(G() || 1) == 5) && V(w) && qt(w, -1, void 0) !== " " && (w += " ");
|
|
955
|
-
break;
|
|
956
|
-
default: w += "/";
|
|
957
|
-
}
|
|
958
|
-
break;
|
|
959
|
-
case 123 * h: s[l++] = V(w) * _;
|
|
960
|
-
case 125 * h:
|
|
961
|
-
case 59:
|
|
962
|
-
case 0:
|
|
963
|
-
if (v > 0 && y) {
|
|
964
|
-
w += Wt(y);
|
|
965
|
-
break;
|
|
966
|
-
}
|
|
967
|
-
switch (y) {
|
|
968
|
-
case 0:
|
|
969
|
-
case 125: g = 0;
|
|
970
|
-
case 59 + u:
|
|
971
|
-
_ == -1 && (w = Kt(w, /\f/g, "")), p > 0 && (V(w) - d || h === 0) && Yt(p > 32 ? yn(w + ";", r, n, d - 1, c) : yn(Kt(w, " ", "") + ";", r, n, d - 2, c), c);
|
|
972
|
-
break;
|
|
973
|
-
case 59: w += ";";
|
|
974
|
-
default: if (Yt(C = _n(w, t, n, l, u, i, s, b, x = [], S = [], d, a), a), y === 123) if (u === 0) gn(w, t, C, C, x, a, d, s, S);
|
|
975
|
-
else {
|
|
976
|
-
switch (f) {
|
|
977
|
-
case 99: if (B(w, 3) === 110) break;
|
|
978
|
-
case 108: if (B(w, 2) === 97) break;
|
|
979
|
-
default: u = 0;
|
|
980
|
-
case 100:
|
|
981
|
-
case 109:
|
|
982
|
-
case 115:
|
|
983
|
-
}
|
|
984
|
-
u ? gn(e, C, C, r && Yt(_n(e, C, C, 0, 0, i, s, b, i, x = [], d, S), S), i, S, d, s, r ? x : S) : gn(w, C, C, C, [""], S, 0, s, S);
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
l = u = p = 0, h = _ = 1, b = w = "", d = o;
|
|
988
|
-
break;
|
|
989
|
-
case 58: d = 1 + V(w), p = m;
|
|
990
|
-
default:
|
|
991
|
-
if (h < 1) {
|
|
992
|
-
if (y == 123) --h;
|
|
993
|
-
else if (y == 125 && h++ == 0 && nn() == 125) continue;
|
|
994
|
-
}
|
|
995
|
-
switch (w += Wt(y), y * h) {
|
|
996
|
-
case 38:
|
|
997
|
-
_ = u > 0 ? 1 : (w += "\f", -1);
|
|
998
|
-
break;
|
|
999
|
-
case 44:
|
|
1000
|
-
if (v > 0) break;
|
|
1001
|
-
s[l++] = (V(w) - 1) * _, _ = 1;
|
|
1002
|
-
break;
|
|
1003
|
-
case 64:
|
|
1004
|
-
G() === 45 && (w += ln(W())), f = G(), u = d = V(b = w += mn(rn())), y++;
|
|
1005
|
-
break;
|
|
1006
|
-
case 45: m === 45 && V(w) == 2 && (h = 0);
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
return a;
|
|
1010
|
-
}
|
|
1011
|
-
function _n(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
1012
|
-
for (var f = i - 1, p = i === 0 ? a : [""], m = Jt(p), h = 0, g = 0, _ = 0; h < r; ++h) for (var v = 0, y = qt(e, f + 1, f = Ut(g = o[h])), b = e; v < m; ++v) (b = Gt(g > 0 ? p[v] + " " + y : Kt(y, /&\f/g, p[v]))) && (c[_++] = b);
|
|
1013
|
-
return en(e, t, n, i === 0 ? Lt : s, c, l, u, d);
|
|
1014
|
-
}
|
|
1015
|
-
function vn(e, t, n, r) {
|
|
1016
|
-
return en(e, t, n, It, Wt(tn()), qt(e, 2, -2), 0, r);
|
|
1017
|
-
}
|
|
1018
|
-
function yn(e, t, n, r, i) {
|
|
1019
|
-
return en(e, t, n, Rt, qt(e, 0, r), qt(e, r + 1, -1), r, i);
|
|
1020
|
-
}
|
|
1021
|
-
//#endregion
|
|
1022
|
-
//#region node_modules/.pnpm/stylis@4.4.0/node_modules/stylis/src/Serializer.js
|
|
1023
|
-
function bn(e, t) {
|
|
1024
|
-
for (var n = "", r = 0; r < e.length; r++) n += t(e[r], r, e, t) || "";
|
|
1025
|
-
return n;
|
|
1026
|
-
}
|
|
1027
|
-
function xn(e, t, n, r) {
|
|
1028
|
-
switch (e.type) {
|
|
1029
|
-
case Ht: if (e.children.length) break;
|
|
1030
|
-
case zt:
|
|
1031
|
-
case Bt:
|
|
1032
|
-
case Rt: return e.return = e.return || e.value;
|
|
1033
|
-
case It: return "";
|
|
1034
|
-
case Vt: return e.return = e.value + "{" + bn(e.children, r) + "}";
|
|
1035
|
-
case Lt: if (!V(e.value = e.props.join(","))) return "";
|
|
1036
|
-
}
|
|
1037
|
-
return V(n = bn(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
|
|
1038
|
-
}
|
|
1039
|
-
//#endregion
|
|
1040
|
-
//#region node_modules/.pnpm/stylis@4.4.0/node_modules/stylis/src/Middleware.js
|
|
1041
|
-
function Sn(e) {
|
|
1042
|
-
var t = Jt(e);
|
|
1043
|
-
return function(n, r, i, a) {
|
|
1044
|
-
for (var o = "", s = 0; s < t; s++) o += e[s](n, r, i, a) || "";
|
|
1045
|
-
return o;
|
|
1046
|
-
};
|
|
1047
|
-
}
|
|
1048
|
-
r(), t();
|
|
1049
|
-
var Cn, wn = "c4", Tn = {
|
|
1050
|
-
id: wn,
|
|
1051
|
-
detector: /* @__PURE__ */ o((e) => /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e), "detector"),
|
|
1052
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1053
|
-
let { diagram: e } = yield import("./c4Diagram-AAUBKEIU.js");
|
|
1054
|
-
return {
|
|
1055
|
-
id: wn,
|
|
1056
|
-
diagram: e
|
|
1057
|
-
};
|
|
1058
|
-
}), "loader")
|
|
1059
|
-
}, En = "flowchart", Dn = {
|
|
1060
|
-
id: En,
|
|
1061
|
-
detector: /* @__PURE__ */ o((e, t) => {
|
|
1062
|
-
var n, r;
|
|
1063
|
-
return (t == null || (n = t.flowchart) == null ? void 0 : n.defaultRenderer) === "dagre-wrapper" || (t == null || (r = t.flowchart) == null ? void 0 : r.defaultRenderer) === "elk" ? !1 : /^\s*graph/.test(e);
|
|
1064
|
-
}, "detector"),
|
|
1065
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1066
|
-
let { diagram: e } = yield import("./flowDiagram-I6XJVG4X.js");
|
|
1067
|
-
return {
|
|
1068
|
-
id: En,
|
|
1069
|
-
diagram: e
|
|
1070
|
-
};
|
|
1071
|
-
}), "loader")
|
|
1072
|
-
}, On = "flowchart-v2", kn = {
|
|
1073
|
-
id: On,
|
|
1074
|
-
detector: /* @__PURE__ */ o((e, t) => {
|
|
1075
|
-
var n, r, i;
|
|
1076
|
-
return (t == null || (n = t.flowchart) == null ? void 0 : n.defaultRenderer) === "dagre-d3" ? !1 : ((t == null || (r = t.flowchart) == null ? void 0 : r.defaultRenderer) === "elk" && (t.layout = "elk"), /^\s*graph/.test(e) && (t == null || (i = t.flowchart) == null ? void 0 : i.defaultRenderer) === "dagre-wrapper" ? !0 : /^\s*flowchart/.test(e));
|
|
1077
|
-
}, "detector"),
|
|
1078
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1079
|
-
let { diagram: e } = yield import("./flowDiagram-I6XJVG4X.js");
|
|
1080
|
-
return {
|
|
1081
|
-
id: On,
|
|
1082
|
-
diagram: e
|
|
1083
|
-
};
|
|
1084
|
-
}), "loader")
|
|
1085
|
-
}, An = "er", jn = {
|
|
1086
|
-
id: An,
|
|
1087
|
-
detector: /* @__PURE__ */ o((e) => /^\s*erDiagram/.test(e), "detector"),
|
|
1088
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1089
|
-
let { diagram: e } = yield import("./erDiagram-TEJ5UH35.js");
|
|
1090
|
-
return {
|
|
1091
|
-
id: An,
|
|
1092
|
-
diagram: e
|
|
1093
|
-
};
|
|
1094
|
-
}), "loader")
|
|
1095
|
-
}, Mn = "gitGraph", Nn = {
|
|
1096
|
-
id: Mn,
|
|
1097
|
-
detector: /* @__PURE__ */ o((e) => /^\s*gitGraph/.test(e), "detector"),
|
|
1098
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1099
|
-
let { diagram: e } = yield import("./gitGraphDiagram-PVQCEYII.js");
|
|
1100
|
-
return {
|
|
1101
|
-
id: Mn,
|
|
1102
|
-
diagram: e
|
|
1103
|
-
};
|
|
1104
|
-
}), "loader")
|
|
1105
|
-
}, Pn = "gantt", Fn = {
|
|
1106
|
-
id: Pn,
|
|
1107
|
-
detector: /* @__PURE__ */ o((e) => /^\s*gantt/.test(e), "detector"),
|
|
1108
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1109
|
-
let { diagram: e } = yield import("./ganttDiagram-6RSMTGT7.js");
|
|
1110
|
-
return {
|
|
1111
|
-
id: Pn,
|
|
1112
|
-
diagram: e
|
|
1113
|
-
};
|
|
1114
|
-
}), "loader")
|
|
1115
|
-
}, In = "info", Ln = {
|
|
1116
|
-
id: In,
|
|
1117
|
-
detector: /* @__PURE__ */ o((e) => /^\s*info/.test(e), "detector"),
|
|
1118
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1119
|
-
let { diagram: e } = yield import("./infoDiagram-5YYISTIA.js");
|
|
1120
|
-
return {
|
|
1121
|
-
id: In,
|
|
1122
|
-
diagram: e
|
|
1123
|
-
};
|
|
1124
|
-
}), "loader")
|
|
1125
|
-
}, Rn = "pie", zn = {
|
|
1126
|
-
id: Rn,
|
|
1127
|
-
detector: /* @__PURE__ */ o((e) => /^\s*pie/.test(e), "detector"),
|
|
1128
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1129
|
-
let { diagram: e } = yield import("./pieDiagram-4H26LBE5.js");
|
|
1130
|
-
return {
|
|
1131
|
-
id: Rn,
|
|
1132
|
-
diagram: e
|
|
1133
|
-
};
|
|
1134
|
-
}), "loader")
|
|
1135
|
-
}, Bn = "quadrantChart", Vn = {
|
|
1136
|
-
id: Bn,
|
|
1137
|
-
detector: /* @__PURE__ */ o((e) => /^\s*quadrantChart/.test(e), "detector"),
|
|
1138
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1139
|
-
let { diagram: e } = yield import("./quadrantDiagram-W4KKPZXB.js");
|
|
1140
|
-
return {
|
|
1141
|
-
id: Bn,
|
|
1142
|
-
diagram: e
|
|
1143
|
-
};
|
|
1144
|
-
}), "loader")
|
|
1145
|
-
}, Hn = "xychart", Un = {
|
|
1146
|
-
id: Hn,
|
|
1147
|
-
detector: /* @__PURE__ */ o((e) => /^\s*xychart(-beta)?/.test(e), "detector"),
|
|
1148
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1149
|
-
let { diagram: e } = yield import("./xychartDiagram-2RQKCTM6.js");
|
|
1150
|
-
return {
|
|
1151
|
-
id: Hn,
|
|
1152
|
-
diagram: e
|
|
1153
|
-
};
|
|
1154
|
-
}), "loader")
|
|
1155
|
-
}, Wn = "requirement", Gn = {
|
|
1156
|
-
id: Wn,
|
|
1157
|
-
detector: /* @__PURE__ */ o((e) => /^\s*requirement(Diagram)?/.test(e), "detector"),
|
|
1158
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1159
|
-
let { diagram: e } = yield import("./requirementDiagram-4Y6WPE33.js");
|
|
1160
|
-
return {
|
|
1161
|
-
id: Wn,
|
|
1162
|
-
diagram: e
|
|
1163
|
-
};
|
|
1164
|
-
}), "loader")
|
|
1165
|
-
}, Kn = "sequence", qn = {
|
|
1166
|
-
id: Kn,
|
|
1167
|
-
detector: /* @__PURE__ */ o((e) => /^\s*sequenceDiagram/.test(e), "detector"),
|
|
1168
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1169
|
-
let { diagram: e } = yield import("./sequenceDiagram-3UESZ5HK.js");
|
|
1170
|
-
return {
|
|
1171
|
-
id: Kn,
|
|
1172
|
-
diagram: e
|
|
1173
|
-
};
|
|
1174
|
-
}), "loader")
|
|
1175
|
-
}, Jn = "class", Yn = {
|
|
1176
|
-
id: Jn,
|
|
1177
|
-
detector: /* @__PURE__ */ o((e, t) => {
|
|
1178
|
-
var n;
|
|
1179
|
-
return (t == null || (n = t.class) == null ? void 0 : n.defaultRenderer) === "dagre-wrapper" ? !1 : /^\s*classDiagram/.test(e);
|
|
1180
|
-
}, "detector"),
|
|
1181
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1182
|
-
let { diagram: e } = yield import("./classDiagram-4FO5ZUOK.js");
|
|
1183
|
-
return {
|
|
1184
|
-
id: Jn,
|
|
1185
|
-
diagram: e
|
|
1186
|
-
};
|
|
1187
|
-
}), "loader")
|
|
1188
|
-
}, Xn = "classDiagram", Zn = {
|
|
1189
|
-
id: Xn,
|
|
1190
|
-
detector: /* @__PURE__ */ o((e, t) => {
|
|
1191
|
-
var n;
|
|
1192
|
-
return /^\s*classDiagram/.test(e) && (t == null || (n = t.class) == null ? void 0 : n.defaultRenderer) === "dagre-wrapper" ? !0 : /^\s*classDiagram-v2/.test(e);
|
|
1193
|
-
}, "detector"),
|
|
1194
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1195
|
-
let { diagram: e } = yield import("./classDiagram-v2-Q7XG4LA2.js");
|
|
1196
|
-
return {
|
|
1197
|
-
id: Xn,
|
|
1198
|
-
diagram: e
|
|
1199
|
-
};
|
|
1200
|
-
}), "loader")
|
|
1201
|
-
}, Qn = "state", $n = {
|
|
1202
|
-
id: Qn,
|
|
1203
|
-
detector: /* @__PURE__ */ o((e, t) => {
|
|
1204
|
-
var n;
|
|
1205
|
-
return (t == null || (n = t.state) == null ? void 0 : n.defaultRenderer) === "dagre-wrapper" ? !1 : /^\s*stateDiagram/.test(e);
|
|
1206
|
-
}, "detector"),
|
|
1207
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1208
|
-
let { diagram: e } = yield import("./stateDiagram-AJRCARHV.js");
|
|
1209
|
-
return {
|
|
1210
|
-
id: Qn,
|
|
1211
|
-
diagram: e
|
|
1212
|
-
};
|
|
1213
|
-
}), "loader")
|
|
1214
|
-
}, er = "stateDiagram", tr = {
|
|
1215
|
-
id: er,
|
|
1216
|
-
detector: /* @__PURE__ */ o((e, t) => {
|
|
1217
|
-
var n;
|
|
1218
|
-
return !!(/^\s*stateDiagram-v2/.test(e) || /^\s*stateDiagram/.test(e) && (t == null || (n = t.state) == null ? void 0 : n.defaultRenderer) === "dagre-wrapper");
|
|
1219
|
-
}, "detector"),
|
|
1220
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1221
|
-
let { diagram: e } = yield import("./stateDiagram-v2-BHNVJYJU.js");
|
|
1222
|
-
return {
|
|
1223
|
-
id: er,
|
|
1224
|
-
diagram: e
|
|
1225
|
-
};
|
|
1226
|
-
}), "loader")
|
|
1227
|
-
}, nr = "journey", rr = {
|
|
1228
|
-
id: nr,
|
|
1229
|
-
detector: /* @__PURE__ */ o((e) => /^\s*journey/.test(e), "detector"),
|
|
1230
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1231
|
-
let { diagram: e } = yield import("./journeyDiagram-JHISSGLW.js");
|
|
1232
|
-
return {
|
|
1233
|
-
id: nr,
|
|
1234
|
-
diagram: e
|
|
1235
|
-
};
|
|
1236
|
-
}), "loader")
|
|
1237
|
-
}, ir = { draw: /* @__PURE__ */ o((e, t, n) => {
|
|
1238
|
-
s.debug("rendering svg for syntax error\n");
|
|
1239
|
-
let r = ge(t), i = r.append("g");
|
|
1240
|
-
r.attr("viewBox", "0 0 2412 512"), w(r, 100, 512, !0), i.append("path").attr("class", "error-icon").attr("d", "m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"), i.append("path").attr("class", "error-icon").attr("d", "m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"), i.append("path").attr("class", "error-icon").attr("d", "m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"), i.append("path").attr("class", "error-icon").attr("d", "m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"), i.append("path").attr("class", "error-icon").attr("d", "m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"), i.append("path").attr("class", "error-icon").attr("d", "m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"), i.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text"), i.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${n}`);
|
|
1241
|
-
}, "draw") }, ar = ir, or = {
|
|
1242
|
-
db: {},
|
|
1243
|
-
renderer: ir,
|
|
1244
|
-
parser: { parse: /* @__PURE__ */ o(() => {}, "parse") }
|
|
1245
|
-
}, sr = "flowchart-elk", cr = {
|
|
1246
|
-
id: sr,
|
|
1247
|
-
detector: /* @__PURE__ */ o((e, t = {}) => {
|
|
1248
|
-
var n;
|
|
1249
|
-
return /^\s*flowchart-elk/.test(e) || /^\s*(flowchart|graph)/.test(e) && (t == null || (n = t.flowchart) == null ? void 0 : n.defaultRenderer) === "elk" ? (t.layout = "elk", !0) : !1;
|
|
1250
|
-
}, "detector"),
|
|
1251
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1252
|
-
let { diagram: e } = yield import("./flowDiagram-I6XJVG4X.js");
|
|
1253
|
-
return {
|
|
1254
|
-
id: sr,
|
|
1255
|
-
diagram: e
|
|
1256
|
-
};
|
|
1257
|
-
}), "loader")
|
|
1258
|
-
}, lr = "timeline", ur = {
|
|
1259
|
-
id: lr,
|
|
1260
|
-
detector: /* @__PURE__ */ o((e) => /^\s*timeline/.test(e), "detector"),
|
|
1261
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1262
|
-
let { diagram: e } = yield import("./timeline-definition-PNZ67QCA.js");
|
|
1263
|
-
return {
|
|
1264
|
-
id: lr,
|
|
1265
|
-
diagram: e
|
|
1266
|
-
};
|
|
1267
|
-
}), "loader")
|
|
1268
|
-
}, dr = "mindmap", fr = {
|
|
1269
|
-
id: dr,
|
|
1270
|
-
detector: /* @__PURE__ */ o((e) => /^\s*mindmap/.test(e), "detector"),
|
|
1271
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1272
|
-
let { diagram: e } = yield import("./mindmap-definition-RKZ34NQL.js");
|
|
1273
|
-
return {
|
|
1274
|
-
id: dr,
|
|
1275
|
-
diagram: e
|
|
1276
|
-
};
|
|
1277
|
-
}), "loader")
|
|
1278
|
-
}, pr = "kanban", mr = {
|
|
1279
|
-
id: pr,
|
|
1280
|
-
detector: /* @__PURE__ */ o((e) => /^\s*kanban/.test(e), "detector"),
|
|
1281
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1282
|
-
let { diagram: e } = yield import("./kanban-definition-UN3LZRKU.js");
|
|
1283
|
-
return {
|
|
1284
|
-
id: pr,
|
|
1285
|
-
diagram: e
|
|
1286
|
-
};
|
|
1287
|
-
}), "loader")
|
|
1288
|
-
}, hr = "sankey", gr = {
|
|
1289
|
-
id: hr,
|
|
1290
|
-
detector: /* @__PURE__ */ o((e) => /^\s*sankey(-beta)?/.test(e), "detector"),
|
|
1291
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1292
|
-
let { diagram: e } = yield import("./sankeyDiagram-5OEKKPKP.js");
|
|
1293
|
-
return {
|
|
1294
|
-
id: hr,
|
|
1295
|
-
diagram: e
|
|
1296
|
-
};
|
|
1297
|
-
}), "loader")
|
|
1298
|
-
}, _r = "packet", vr = {
|
|
1299
|
-
id: _r,
|
|
1300
|
-
detector: /* @__PURE__ */ o((e) => /^\s*packet(-beta)?/.test(e), "detector"),
|
|
1301
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1302
|
-
let { diagram: e } = yield import("./diagram-LMA3HP47.js");
|
|
1303
|
-
return {
|
|
1304
|
-
id: _r,
|
|
1305
|
-
diagram: e
|
|
1306
|
-
};
|
|
1307
|
-
}), "loader")
|
|
1308
|
-
}, yr = "radar", br = {
|
|
1309
|
-
id: yr,
|
|
1310
|
-
detector: /* @__PURE__ */ o((e) => /^\s*radar-beta/.test(e), "detector"),
|
|
1311
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1312
|
-
let { diagram: e } = yield import("./diagram-2AECGRRQ.js");
|
|
1313
|
-
return {
|
|
1314
|
-
id: yr,
|
|
1315
|
-
diagram: e
|
|
1316
|
-
};
|
|
1317
|
-
}), "loader")
|
|
1318
|
-
}, xr = "block", Sr = {
|
|
1319
|
-
id: xr,
|
|
1320
|
-
detector: /* @__PURE__ */ o((e) => /^\s*block(-beta)?/.test(e), "detector"),
|
|
1321
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1322
|
-
let { diagram: e } = yield import("./blockDiagram-GPEHLZMM.js");
|
|
1323
|
-
return {
|
|
1324
|
-
id: xr,
|
|
1325
|
-
diagram: e
|
|
1326
|
-
};
|
|
1327
|
-
}), "loader")
|
|
1328
|
-
}, Cr = "treeView", wr = {
|
|
1329
|
-
id: Cr,
|
|
1330
|
-
detector: /* @__PURE__ */ o((e) => /^\s*treeView-beta/.test(e), "detector"),
|
|
1331
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1332
|
-
let { diagram: e } = yield import("./diagram-5GNKFQAL.js");
|
|
1333
|
-
return {
|
|
1334
|
-
id: Cr,
|
|
1335
|
-
diagram: e
|
|
1336
|
-
};
|
|
1337
|
-
}), "loader")
|
|
1338
|
-
}, Tr = "architecture", Er = {
|
|
1339
|
-
id: Tr,
|
|
1340
|
-
detector: /* @__PURE__ */ o((e) => /^\s*architecture/.test(e), "detector"),
|
|
1341
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1342
|
-
let { diagram: e } = yield import("./architectureDiagram-3BPJPVTR.js");
|
|
1343
|
-
return {
|
|
1344
|
-
id: Tr,
|
|
1345
|
-
diagram: e
|
|
1346
|
-
};
|
|
1347
|
-
}), "loader")
|
|
1348
|
-
}, Dr = "eventmodeling", Or = {
|
|
1349
|
-
id: Dr,
|
|
1350
|
-
detector: /* @__PURE__ */ o((e) => /^\s*eventmodeling/.test(e), "detector"),
|
|
1351
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1352
|
-
let { diagram: e } = yield import("./diagram-KO2AKTUF.js");
|
|
1353
|
-
return {
|
|
1354
|
-
id: Dr,
|
|
1355
|
-
diagram: e
|
|
1356
|
-
};
|
|
1357
|
-
}), "loader")
|
|
1358
|
-
}, kr = "ishikawa", Ar = {
|
|
1359
|
-
id: kr,
|
|
1360
|
-
detector: /* @__PURE__ */ o((e) => /^\s*ishikawa(-beta)?\b/i.test(e), "detector"),
|
|
1361
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1362
|
-
let { diagram: e } = yield import("./ishikawaDiagram-YF4QCWOH.js");
|
|
1363
|
-
return {
|
|
1364
|
-
id: kr,
|
|
1365
|
-
diagram: e
|
|
1366
|
-
};
|
|
1367
|
-
}), "loader")
|
|
1368
|
-
}, jr = "venn", Mr = {
|
|
1369
|
-
id: jr,
|
|
1370
|
-
detector: /* @__PURE__ */ o((e) => /^\s*venn-beta/.test(e), "detector"),
|
|
1371
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1372
|
-
let { diagram: e } = yield import("./vennDiagram-CIIHVFJN.js");
|
|
1373
|
-
return {
|
|
1374
|
-
id: jr,
|
|
1375
|
-
diagram: e
|
|
1376
|
-
};
|
|
1377
|
-
}), "loader")
|
|
1378
|
-
}, Nr = "treemap", Pr = {
|
|
1379
|
-
id: Nr,
|
|
1380
|
-
detector: /* @__PURE__ */ o((e) => /^\s*treemap/.test(e), "detector"),
|
|
1381
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1382
|
-
let { diagram: e } = yield import("./diagram-OG6HWLK6.js");
|
|
1383
|
-
return {
|
|
1384
|
-
id: Nr,
|
|
1385
|
-
diagram: e
|
|
1386
|
-
};
|
|
1387
|
-
}), "loader")
|
|
1388
|
-
}, Fr = "wardley-beta", Ir = {
|
|
1389
|
-
id: Fr,
|
|
1390
|
-
detector: /* @__PURE__ */ o((e) => /^\s*wardley-beta/i.test(e), "detector"),
|
|
1391
|
-
loader: /* @__PURE__ */ o(i(function* () {
|
|
1392
|
-
let { diagram: e } = yield import("./wardleyDiagram-YWT4CUSO.js");
|
|
1393
|
-
return {
|
|
1394
|
-
id: Fr,
|
|
1395
|
-
diagram: e
|
|
1396
|
-
};
|
|
1397
|
-
}), "loader")
|
|
1398
|
-
}, Lr = !1, Rr = /* @__PURE__ */ o(() => {
|
|
1399
|
-
Lr || (Lr = !0, p("error", or, (e) => e.toLowerCase().trim() === "error"), p("---", {
|
|
1400
|
-
db: { clear: /* @__PURE__ */ o(() => {}, "clear") },
|
|
1401
|
-
styles: {},
|
|
1402
|
-
renderer: { draw: /* @__PURE__ */ o(() => {}, "draw") },
|
|
1403
|
-
parser: { parse: /* @__PURE__ */ o(() => {
|
|
1404
|
-
throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks");
|
|
1405
|
-
}, "parse") },
|
|
1406
|
-
init: /* @__PURE__ */ o(() => null, "init")
|
|
1407
|
-
}, (e) => e.toLowerCase().trimStart().startsWith("---")), m(cr, fr, Er), m(Tn, mr, Zn, Yn, jn, Fn, Ln, zn, Gn, qn, kn, Dn, ur, Nn, tr, $n, rr, Vn, gr, vr, Un, Sr, Or, wr, br, Ar, Pr, Mr, Ir));
|
|
1408
|
-
}, "addDiagrams"), zr = /* @__PURE__ */ o(i(function* () {
|
|
1409
|
-
s.debug("Loading registered diagrams");
|
|
1410
|
-
let e = (yield Promise.allSettled(Object.entries(T).map(function() {
|
|
1411
|
-
var e = i(function* ([e, { detector: t, loader: n }]) {
|
|
1412
|
-
if (n) try {
|
|
1413
|
-
g(e);
|
|
1414
|
-
} catch (r) {
|
|
1415
|
-
try {
|
|
1416
|
-
let { diagram: e, id: r } = yield n();
|
|
1417
|
-
p(r, e, t);
|
|
1418
|
-
} catch (t) {
|
|
1419
|
-
throw s.error(`Failed to load external diagram with key ${e}. Removing from detectors.`), delete T[e], t;
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1422
|
-
});
|
|
1423
|
-
return function(t) {
|
|
1424
|
-
return e.apply(this, arguments);
|
|
1425
|
-
};
|
|
1426
|
-
}()))).filter((e) => e.status === "rejected");
|
|
1427
|
-
if (e.length > 0) {
|
|
1428
|
-
s.error(`Failed to load ${e.length} external diagrams`);
|
|
1429
|
-
for (let t of e) s.error(t);
|
|
1430
|
-
throw Error(`Failed to load ${e.length} external diagrams`);
|
|
1431
|
-
}
|
|
1432
|
-
}), "loadRegisteredDiagrams"), Br = "graphics-document document";
|
|
1433
|
-
function Vr(e, t) {
|
|
1434
|
-
e.attr("role", Br), t !== "" && e.attr("aria-roledescription", t);
|
|
1435
|
-
}
|
|
1436
|
-
o(Vr, "setA11yDiagramInfo");
|
|
1437
|
-
function Hr(e, t, n, r) {
|
|
1438
|
-
if (e.insert !== void 0) {
|
|
1439
|
-
if (n) {
|
|
1440
|
-
let t = `chart-desc-${r}`;
|
|
1441
|
-
e.attr("aria-describedby", t), e.insert("desc", ":first-child").attr("id", t).text(n);
|
|
1442
|
-
}
|
|
1443
|
-
if (t) {
|
|
1444
|
-
let n = `chart-title-${r}`;
|
|
1445
|
-
e.attr("aria-labelledby", n), e.insert("title", ":first-child").attr("id", n).text(t);
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
|
-
o(Hr, "addSVGa11yTitleDescription");
|
|
1450
|
-
var Ur = (Cn = class e {
|
|
1451
|
-
constructor(e, t, n, r, i) {
|
|
1452
|
-
this.type = e, this.text = t, this.db = n, this.parser = r, this.renderer = i;
|
|
1453
|
-
}
|
|
1454
|
-
static fromText(t) {
|
|
1455
|
-
return i(function* (t, n = {}) {
|
|
1456
|
-
var r;
|
|
1457
|
-
let i = C(), a = ne(t, i);
|
|
1458
|
-
t = pe(t) + "\n";
|
|
1459
|
-
try {
|
|
1460
|
-
g(a);
|
|
1461
|
-
} catch (e) {
|
|
1462
|
-
let t = l(a);
|
|
1463
|
-
if (!t) throw new ae(`Diagram ${a} not found.`);
|
|
1464
|
-
let { id: n, diagram: r } = yield t();
|
|
1465
|
-
p(n, r);
|
|
1466
|
-
}
|
|
1467
|
-
let { db: o, parser: s, renderer: c, init: u } = g(a);
|
|
1468
|
-
if (s.parser && (s.parser.yy = o), (r = o.clear) == null || r.call(o), u == null || u(i), n.title) {
|
|
1469
|
-
var d;
|
|
1470
|
-
(d = o.setDiagramTitle) == null || d.call(o, n.title);
|
|
1471
|
-
}
|
|
1472
|
-
return yield s.parse(t), new e(a, t, o, s, c);
|
|
1473
|
-
}).apply(this, arguments);
|
|
1474
|
-
}
|
|
1475
|
-
render(e, t) {
|
|
1476
|
-
var n = this;
|
|
1477
|
-
return i(function* () {
|
|
1478
|
-
yield n.renderer.draw(n.text, e, t, n);
|
|
1479
|
-
})();
|
|
1480
|
-
}
|
|
1481
|
-
getParser() {
|
|
1482
|
-
return this.parser;
|
|
1483
|
-
}
|
|
1484
|
-
getType() {
|
|
1485
|
-
return this.type;
|
|
1486
|
-
}
|
|
1487
|
-
}, o(Cn, "Diagram"), Cn), Wr = [], Gr = /* @__PURE__ */ o(() => {
|
|
1488
|
-
Wr.forEach((e) => {
|
|
1489
|
-
e();
|
|
1490
|
-
}), Wr = [];
|
|
1491
|
-
}, "attachFunctions"), Kr = /* @__PURE__ */ o((e) => e.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(), "cleanupComments");
|
|
1492
|
-
function qr(e) {
|
|
1493
|
-
var t;
|
|
1494
|
-
let n = e.match(S);
|
|
1495
|
-
if (!n) return {
|
|
1496
|
-
text: e,
|
|
1497
|
-
metadata: {}
|
|
1498
|
-
};
|
|
1499
|
-
let r = (t = _e(n[1], { schema: ve })) == null ? {} : t;
|
|
1500
|
-
r = typeof r == "object" && !Array.isArray(r) ? r : {};
|
|
1501
|
-
let i = {};
|
|
1502
|
-
return r.displayMode && (i.displayMode = r.displayMode.toString()), r.title && (i.title = r.title.toString()), r.config && (i.config = r.config), {
|
|
1503
|
-
text: e.slice(n[0].length),
|
|
1504
|
-
metadata: i
|
|
1505
|
-
};
|
|
1506
|
-
}
|
|
1507
|
-
o(qr, "extractFrontMatter");
|
|
1508
|
-
var Jr = /* @__PURE__ */ o((e) => e.replace(/\r\n?/g, "\n").replace(/<(\w+)([^>]*)>/g, (e, t, n) => "<" + t + n.replace(/="([^"]*)"/g, "='$1'") + ">"), "cleanupText"), Yr = /* @__PURE__ */ o((e) => {
|
|
1509
|
-
let { text: t, metadata: n } = qr(e), { displayMode: r, title: i, config: a = {} } = n;
|
|
1510
|
-
return r && (a.gantt || (a.gantt = {}), a.gantt.displayMode = r), {
|
|
1511
|
-
title: i,
|
|
1512
|
-
config: a,
|
|
1513
|
-
text: t
|
|
1514
|
-
};
|
|
1515
|
-
}, "processFrontmatter"), Xr = /* @__PURE__ */ o((e) => {
|
|
1516
|
-
var t;
|
|
1517
|
-
let n = (t = ue.detectInit(e)) == null ? {} : t, r = ue.detectDirective(e, "wrap");
|
|
1518
|
-
return Array.isArray(r) ? n.wrap = r.some(({ type: e }) => e === "wrap") : (r == null ? void 0 : r.type) === "wrap" && (n.wrap = !0), {
|
|
1519
|
-
text: de(e),
|
|
1520
|
-
directive: n
|
|
1521
|
-
};
|
|
1522
|
-
}, "processDirectives");
|
|
1523
|
-
function Zr(e) {
|
|
1524
|
-
let t = Yr(Jr(e)), n = Xr(t.text), r = fe(t.config, n.directive);
|
|
1525
|
-
return e = Kr(n.text), {
|
|
1526
|
-
code: e,
|
|
1527
|
-
title: t.title,
|
|
1528
|
-
config: r
|
|
1529
|
-
};
|
|
1530
|
-
}
|
|
1531
|
-
o(Zr, "preprocessDiagram");
|
|
1532
|
-
function Qr(e) {
|
|
1533
|
-
let t = new TextEncoder().encode(e), n = Array.from(t, (e) => String.fromCodePoint(e)).join("");
|
|
1534
|
-
return btoa(n);
|
|
1535
|
-
}
|
|
1536
|
-
o(Qr, "toBase64");
|
|
1537
|
-
var $r = 5e4, ei = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa", ti = "sandbox", ni = "loose", ri = "http://www.w3.org/2000/svg", ii = "http://www.w3.org/1999/xlink", ai = "http://www.w3.org/1999/xhtml", oi = "100%", si = "100%", ci = "border:0;margin:0;", li = "margin:0", ui = "allow-top-navigation-by-user-activation allow-popups", di = "The \"iframe\" tag is not supported by your browser.", fi = ["foreignobject"], pi = ["dominant-baseline"];
|
|
1538
|
-
function mi(e) {
|
|
1539
|
-
var t;
|
|
1540
|
-
let n = Zr(e);
|
|
1541
|
-
return d(), E((t = n.config) == null ? {} : t), n;
|
|
1542
|
-
}
|
|
1543
|
-
o(mi, "processAndSetConfigs");
|
|
1544
|
-
function hi(e, t) {
|
|
1545
|
-
return gi.apply(this, arguments);
|
|
1546
|
-
}
|
|
1547
|
-
function gi() {
|
|
1548
|
-
return gi = i(function* (e, t) {
|
|
1549
|
-
Rr();
|
|
1550
|
-
try {
|
|
1551
|
-
let { code: t, config: n } = mi(e);
|
|
1552
|
-
return {
|
|
1553
|
-
diagramType: (yield Oi(t)).type,
|
|
1554
|
-
config: n
|
|
1555
|
-
};
|
|
1556
|
-
} catch (e) {
|
|
1557
|
-
if (t != null && t.suppressErrors) return !1;
|
|
1558
|
-
throw e;
|
|
1559
|
-
}
|
|
1560
|
-
}), gi.apply(this, arguments);
|
|
1561
|
-
}
|
|
1562
|
-
o(hi, "parse");
|
|
1563
|
-
var _i = /* @__PURE__ */ o((e, t, n = []) => `.${e} ${t} ${f(`{ ${n.join(" !important; ")} !important; }`)}`, "cssImportantStyles"), vi = /* @__PURE__ */ o((e, t = /* @__PURE__ */ new Map()) => {
|
|
1564
|
-
let n = new CSSStyleSheet();
|
|
1565
|
-
if (e.fontFamily !== void 0 && n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`, n.cssRules.length), e.altFontFamily !== void 0 && n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`, n.cssRules.length), t instanceof Map) {
|
|
1566
|
-
let r = _(e) ? ["> *", "span"] : [
|
|
1567
|
-
"rect",
|
|
1568
|
-
"polygon",
|
|
1569
|
-
"ellipse",
|
|
1570
|
-
"circle",
|
|
1571
|
-
"path"
|
|
1572
|
-
];
|
|
1573
|
-
t.forEach((e) => {
|
|
1574
|
-
Ft(e.styles) || r.forEach((t) => {
|
|
1575
|
-
n.insertRule(_i(e.id, t, e.styles), n.cssRules.length);
|
|
1576
|
-
}), Ft(e.textStyles) || n.insertRule(_i(e.id, "tspan", ((e == null ? void 0 : e.textStyles) || []).map((e) => e.replace("color", "fill"))), n.cssRules.length);
|
|
1577
|
-
});
|
|
1578
|
-
}
|
|
1579
|
-
let r = "";
|
|
1580
|
-
if (e.themeCSS !== void 0) if (typeof n.replaceSync == "function") {
|
|
1581
|
-
let t = new CSSStyleSheet();
|
|
1582
|
-
t.replaceSync(e.themeCSS), r = te(t) + "\n";
|
|
1583
|
-
} else r += `${e.themeCSS}
|
|
1584
|
-
`;
|
|
1585
|
-
return r + te(n);
|
|
1586
|
-
}, "createCssStyles"), yi = /* @__PURE__ */ o((e, t) => bn(hn(`${e}{${t}}`), Sn([/* @__PURE__ */ o(function(t, n, r, i) {
|
|
1587
|
-
if (t.type === "rule" && Array.isArray(t.props)) {
|
|
1588
|
-
if (t.parent && t.parent.type === "@keyframes") return;
|
|
1589
|
-
t.props = t.props.map((t) => t.startsWith(e) ? t : `${e} ${t}`);
|
|
1590
|
-
} else t.type.startsWith("@") && ([
|
|
1591
|
-
"@media",
|
|
1592
|
-
"@supports",
|
|
1593
|
-
"@layer",
|
|
1594
|
-
"@scope",
|
|
1595
|
-
"@container",
|
|
1596
|
-
"@starting-style",
|
|
1597
|
-
"@keyframes"
|
|
1598
|
-
].includes(t.type) || (s.warn(`Removing unsupported at-rule ${t.type} from CSS`), t.type = It));
|
|
1599
|
-
}, "addNamespace"), xn])), "compileCSS"), bi = /* @__PURE__ */ o((e, t, r, i) => yi(i, b(t, vi(e, r), n(n({}, e.themeVariables), {}, {
|
|
1600
|
-
theme: e.theme,
|
|
1601
|
-
look: e.look
|
|
1602
|
-
}), i)), "createUserStyles"), xi = /* @__PURE__ */ o((e = "", t, n) => {
|
|
1603
|
-
let r = e;
|
|
1604
|
-
return !n && !t && (r = r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g, "marker-end=\"url(#")), r = O(r), r = r.replace(/<br>/g, "<br/>"), r;
|
|
1605
|
-
}, "cleanUpSvgCode"), Si = /* @__PURE__ */ o((e = "", t) => {
|
|
1606
|
-
var n;
|
|
1607
|
-
return `<iframe style="width:${oi};height:${!(t == null || (n = t.viewBox) == null || (n = n.baseVal) == null) && n.height ? t.viewBox.baseVal.height + "px" : si};${ci}" src="data:text/html;charset=UTF-8;base64,${Qr(`<body style="${li}">${e}</body>`)}" sandbox="${ui}">
|
|
1608
|
-
${di}
|
|
1609
|
-
</iframe>`;
|
|
1610
|
-
}, "putIntoIFrame"), Ci = /* @__PURE__ */ o((e, t, n, r, i) => {
|
|
1611
|
-
let a = e.append("div");
|
|
1612
|
-
a.attr("id", n), r && a.attr("style", r);
|
|
1613
|
-
let o = a.append("svg").attr("id", t).attr("width", "100%").attr("xmlns", ri);
|
|
1614
|
-
return i && o.attr("xmlns:xlink", i), o.append("g"), e;
|
|
1615
|
-
}, "appendDivSvgG");
|
|
1616
|
-
function wi(e, t) {
|
|
1617
|
-
return e.append("iframe").attr("id", t).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
|
|
1618
|
-
}
|
|
1619
|
-
o(wi, "sandboxedIframe");
|
|
1620
|
-
var Ti = /* @__PURE__ */ o((e, t, n, r) => {
|
|
1621
|
-
var i, a, o;
|
|
1622
|
-
(i = e.getElementById(t)) == null || i.remove(), (a = e.getElementById(n)) == null || a.remove(), (o = e.getElementById(r)) == null || o.remove();
|
|
1623
|
-
}, "removeExistingElements"), Ei = /* @__PURE__ */ o(/* @__PURE__ */ function() {
|
|
1624
|
-
var e = i(function* (e, t, n) {
|
|
1625
|
-
var r, i, a, l, u, d, f;
|
|
1626
|
-
Rr();
|
|
1627
|
-
let p = mi(t);
|
|
1628
|
-
t = p.code;
|
|
1629
|
-
let m = C();
|
|
1630
|
-
s.debug(m), t.length > ((r = m == null ? void 0 : m.maxTextSize) == null ? $r : r) && (t = ei);
|
|
1631
|
-
let h = `#${e}`, g = "i" + e, _ = "#" + g, v = "d" + e, y = "#" + v, b = /* @__PURE__ */ o(() => {
|
|
1632
|
-
let e = D(S ? _ : y).node();
|
|
1633
|
-
e && "remove" in e && e.remove();
|
|
1634
|
-
}, "removeTempElements"), x = D(document.body), S = m.securityLevel === ti, w = m.securityLevel === ni, te = m.fontFamily;
|
|
1635
|
-
n === void 0 ? (Ti(document, e, v, g), S ? (x = D(wi(D(document.body), g).nodes()[0].contentDocument.body), x.node().style.margin = "0") : x = D("body"), Ci(x, e, v)) : (n && (n.innerHTML = ""), S ? (x = D(wi(D(n), g).nodes()[0].contentDocument.body), x.node().style.margin = "0") : x = D(n), Ci(x, e, v, `font-family: ${te}`, ii));
|
|
1636
|
-
let T, E;
|
|
1637
|
-
try {
|
|
1638
|
-
T = yield Ur.fromText(t, { title: p.title });
|
|
1639
|
-
} catch (e) {
|
|
1640
|
-
if (m.suppressErrorRendering) throw b(), e;
|
|
1641
|
-
T = yield Ur.fromText("error"), E = e;
|
|
1642
|
-
}
|
|
1643
|
-
let ne = x.select(y).node(), re = T.type, ie = ne.firstChild, ae = ie.firstChild, oe = bi(m, re, (i = (a = T.renderer).getClasses) == null ? void 0 : i.call(a, t, T), h), se = document.createElement("style");
|
|
1644
|
-
se.innerHTML = oe, ie.insertBefore(se, ae);
|
|
1645
|
-
try {
|
|
1646
|
-
yield T.renderer.draw(t, e, "11.15.0", T);
|
|
1647
|
-
} catch (n) {
|
|
1648
|
-
throw m.suppressErrorRendering ? b() : ar.draw(t, e, "11.15.0"), n;
|
|
1649
|
-
}
|
|
1650
|
-
ki(re, x.select(`${y} svg`), (l = (u = T.db).getAccTitle) == null ? void 0 : l.call(u), (d = (f = T.db).getAccDescription) == null ? void 0 : d.call(f)), x.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns", ai);
|
|
1651
|
-
let O = x.select(y).node().innerHTML;
|
|
1652
|
-
if (s.debug("config.arrowMarkerAbsolute", m.arrowMarkerAbsolute), O = xi(O, S, ee(m.arrowMarkerAbsolute)), S) {
|
|
1653
|
-
let e = x.select(y + " svg").node();
|
|
1654
|
-
O = Si(O, e);
|
|
1655
|
-
} else w || (O = c.sanitize(O, {
|
|
1656
|
-
ADD_TAGS: fi,
|
|
1657
|
-
ADD_ATTR: pi,
|
|
1658
|
-
HTML_INTEGRATION_POINTS: { foreignobject: !0 }
|
|
1659
|
-
}));
|
|
1660
|
-
if (Gr(), E) throw E;
|
|
1661
|
-
return b(), {
|
|
1662
|
-
diagramType: re,
|
|
1663
|
-
svg: O,
|
|
1664
|
-
bindFunctions: T.db.bindFunctions
|
|
1665
|
-
};
|
|
1666
|
-
});
|
|
1667
|
-
return function(t, n, r) {
|
|
1668
|
-
return e.apply(this, arguments);
|
|
1669
|
-
};
|
|
1670
|
-
}(), "render");
|
|
1671
|
-
function Di(e = {}) {
|
|
1672
|
-
var t;
|
|
1673
|
-
let n = ie({}, e);
|
|
1674
|
-
n != null && n.fontFamily && !((t = n.themeVariables) != null && t.fontFamily) && (n.themeVariables || (n.themeVariables = {}), n.themeVariables.fontFamily = n.fontFamily), v(n), n != null && n.theme && n.theme in x ? n.themeVariables = x[n.theme].getThemeVariables(n.themeVariables) : n && (n.themeVariables = x.default.getThemeVariables(n.themeVariables)), a((typeof n == "object" ? re(n) : u()).logLevel), Rr();
|
|
1675
|
-
}
|
|
1676
|
-
o(Di, "initialize");
|
|
1677
|
-
var Oi = /* @__PURE__ */ o((e, t = {}) => {
|
|
1678
|
-
let { code: n } = Zr(e);
|
|
1679
|
-
return Ur.fromText(n, t);
|
|
1680
|
-
}, "getDiagramFromText");
|
|
1681
|
-
function ki(e, t, n, r) {
|
|
1682
|
-
Vr(t, e), Hr(t, n, r, t.attr("id"));
|
|
1683
|
-
}
|
|
1684
|
-
o(ki, "addA11yInfo");
|
|
1685
|
-
var K = Object.freeze({
|
|
1686
|
-
render: Ei,
|
|
1687
|
-
parse: hi,
|
|
1688
|
-
getDiagramFromText: Oi,
|
|
1689
|
-
initialize: Di,
|
|
1690
|
-
getConfig: C,
|
|
1691
|
-
setConfig: y,
|
|
1692
|
-
getSiteConfig: u,
|
|
1693
|
-
updateSiteConfig: h,
|
|
1694
|
-
reset: /* @__PURE__ */ o(() => {
|
|
1695
|
-
d();
|
|
1696
|
-
}, "reset"),
|
|
1697
|
-
globalReset: /* @__PURE__ */ o(() => {
|
|
1698
|
-
d(oe);
|
|
1699
|
-
}, "globalReset"),
|
|
1700
|
-
defaultConfig: oe
|
|
1701
|
-
});
|
|
1702
|
-
a(C().logLevel), d(C());
|
|
1703
|
-
var Ai = /* @__PURE__ */ o((e, t, r) => {
|
|
1704
|
-
s.warn(e), le(e) ? (r && r(e.str, e.hash), t.push(n(n({}, e), {}, {
|
|
1705
|
-
message: e.str,
|
|
1706
|
-
error: e
|
|
1707
|
-
}))) : (r && r(e), e instanceof Error && t.push({
|
|
1708
|
-
str: e.message,
|
|
1709
|
-
message: e.message,
|
|
1710
|
-
hash: e.name,
|
|
1711
|
-
error: e
|
|
1712
|
-
}));
|
|
1713
|
-
}, "handleError"), ji = /* @__PURE__ */ o(i(function* (e = { querySelector: ".mermaid" }) {
|
|
1714
|
-
try {
|
|
1715
|
-
yield Mi(e);
|
|
1716
|
-
} catch (t) {
|
|
1717
|
-
if (le(t) && s.error(t.str), q.parseError && q.parseError(t), !e.suppressErrors) throw s.error("Use the suppressErrors option to suppress these errors"), t;
|
|
1718
|
-
}
|
|
1719
|
-
}), "run"), Mi = /* @__PURE__ */ o(i(function* ({ postRenderCallback: e, querySelector: t, nodes: n } = { querySelector: ".mermaid" }) {
|
|
1720
|
-
let r = K.getConfig();
|
|
1721
|
-
s.debug(`${e ? "" : "No "}Callback function found`);
|
|
1722
|
-
let i;
|
|
1723
|
-
if (n) i = n;
|
|
1724
|
-
else if (t) i = document.querySelectorAll(t);
|
|
1725
|
-
else throw Error("Nodes and querySelector are both undefined");
|
|
1726
|
-
s.debug(`Found ${i.length} diagrams`), (r == null ? void 0 : r.startOnLoad) !== void 0 && (s.debug("Start On Load: " + (r == null ? void 0 : r.startOnLoad)), K.updateSiteConfig({ startOnLoad: r == null ? void 0 : r.startOnLoad }));
|
|
1727
|
-
let a = new ue.InitIDGenerator(r.deterministicIds, r.deterministicIDSeed), o, c = [];
|
|
1728
|
-
for (let t of Array.from(i)) {
|
|
1729
|
-
if (s.info("Rendering diagram: " + t.id), t.getAttribute("data-processed")) continue;
|
|
1730
|
-
t.setAttribute("data-processed", "true");
|
|
1731
|
-
let n = `mermaid-${a.next()}`;
|
|
1732
|
-
o = t.innerHTML, o = be(ue.entityDecode(o)).trim().replace(/<br\s*\/?>/gi, "<br/>");
|
|
1733
|
-
let r = ue.detectInit(o);
|
|
1734
|
-
r && s.debug("Detected early reinit: ", r);
|
|
1735
|
-
try {
|
|
1736
|
-
let { svg: r, bindFunctions: i } = yield Hi(n, o, t);
|
|
1737
|
-
t.innerHTML = r, e && (yield e(n)), i && i(t);
|
|
1738
|
-
} catch (e) {
|
|
1739
|
-
Ai(e, c, q.parseError);
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
if (c.length > 0) throw c[0];
|
|
1743
|
-
}), "runThrowsErrors"), Ni = /* @__PURE__ */ o(function(e) {
|
|
1744
|
-
K.initialize(e);
|
|
1745
|
-
}, "initialize"), Pi = /* @__PURE__ */ o(/* @__PURE__ */ function() {
|
|
1746
|
-
var e = i(function* (e, t, n) {
|
|
1747
|
-
s.warn("mermaid.init is deprecated. Please use run instead."), e && Ni(e);
|
|
1748
|
-
let r = {
|
|
1749
|
-
postRenderCallback: n,
|
|
1750
|
-
querySelector: ".mermaid"
|
|
1751
|
-
};
|
|
1752
|
-
typeof t == "string" ? r.querySelector = t : t && (t instanceof HTMLElement ? r.nodes = [t] : r.nodes = t), yield ji(r);
|
|
1753
|
-
});
|
|
1754
|
-
return function(t, n, r) {
|
|
1755
|
-
return e.apply(this, arguments);
|
|
1756
|
-
};
|
|
1757
|
-
}(), "init"), Fi = /* @__PURE__ */ o(function() {
|
|
1758
|
-
var e = i(function* (e, { lazyLoad: t = !0 } = {}) {
|
|
1759
|
-
Rr(), m(...e), t === !1 && (yield zr());
|
|
1760
|
-
});
|
|
1761
|
-
return function(t) {
|
|
1762
|
-
return e.apply(this, arguments);
|
|
1763
|
-
};
|
|
1764
|
-
}(), "registerExternalDiagrams"), Ii = /* @__PURE__ */ o(function() {
|
|
1765
|
-
if (q.startOnLoad) {
|
|
1766
|
-
let { startOnLoad: e } = K.getConfig();
|
|
1767
|
-
e && q.run().catch((e) => s.error("Mermaid failed to initialize", e));
|
|
1768
|
-
}
|
|
1769
|
-
}, "contentLoaded");
|
|
1770
|
-
typeof document < "u" && window.addEventListener("load", Ii, !1);
|
|
1771
|
-
var Li = /* @__PURE__ */ o(function(e) {
|
|
1772
|
-
q.parseError = e;
|
|
1773
|
-
}, "setParseErrorHandler"), Ri = [], zi = !1, Bi = /* @__PURE__ */ o(i(function* () {
|
|
1774
|
-
if (!zi) {
|
|
1775
|
-
for (zi = !0; Ri.length > 0;) {
|
|
1776
|
-
let e = Ri.shift();
|
|
1777
|
-
if (e) try {
|
|
1778
|
-
yield e();
|
|
1779
|
-
} catch (e) {
|
|
1780
|
-
s.error("Error executing queue", e);
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1783
|
-
zi = !1;
|
|
1784
|
-
}
|
|
1785
|
-
}), "executeQueue"), Vi = /* @__PURE__ */ o(function() {
|
|
1786
|
-
var e = i(function* (e, t) {
|
|
1787
|
-
return new Promise((n, r) => {
|
|
1788
|
-
let i = /* @__PURE__ */ o(() => new Promise((i, a) => {
|
|
1789
|
-
K.parse(e, t).then((e) => {
|
|
1790
|
-
i(e), n(e);
|
|
1791
|
-
}, (e) => {
|
|
1792
|
-
var t;
|
|
1793
|
-
s.error("Error parsing", e), (t = q.parseError) == null || t.call(q, e), a(e), r(e);
|
|
1794
|
-
});
|
|
1795
|
-
}), "performCall");
|
|
1796
|
-
Ri.push(i), Bi().catch(r);
|
|
1797
|
-
});
|
|
1798
|
-
});
|
|
1799
|
-
return function(t, n) {
|
|
1800
|
-
return e.apply(this, arguments);
|
|
1801
|
-
};
|
|
1802
|
-
}(), "parse"), Hi = /* @__PURE__ */ o((e, t, n) => new Promise((r, i) => {
|
|
1803
|
-
let a = /* @__PURE__ */ o(() => new Promise((a, o) => {
|
|
1804
|
-
K.render(e, t, n).then((e) => {
|
|
1805
|
-
a(e), r(e);
|
|
1806
|
-
}, (e) => {
|
|
1807
|
-
var t;
|
|
1808
|
-
s.error("Error parsing", e), (t = q.parseError) == null || t.call(q, e), o(e), i(e);
|
|
1809
|
-
});
|
|
1810
|
-
}), "performCall");
|
|
1811
|
-
Ri.push(a), Bi().catch(i);
|
|
1812
|
-
}), "render"), q = {
|
|
1813
|
-
startOnLoad: !0,
|
|
1814
|
-
mermaidAPI: K,
|
|
1815
|
-
parse: Vi,
|
|
1816
|
-
render: Hi,
|
|
1817
|
-
init: Pi,
|
|
1818
|
-
run: ji,
|
|
1819
|
-
registerExternalDiagrams: Fi,
|
|
1820
|
-
registerLayoutLoaders: xe,
|
|
1821
|
-
initialize: Ni,
|
|
1822
|
-
parseError: void 0,
|
|
1823
|
-
contentLoaded: Ii,
|
|
1824
|
-
setParseErrorHandler: Li,
|
|
1825
|
-
detectType: ne,
|
|
1826
|
-
registerIconPacks: ye,
|
|
1827
|
-
getRegisteredDiagramsMetadata: /* @__PURE__ */ o(() => Object.keys(T).map((e) => ({ id: e })), "getRegisteredDiagramsMetadata")
|
|
1828
|
-
}, Ui = q, J = (e) => e.replace(/\s*!important\s*$/i, "").trim(), Wi = (e, t) => {
|
|
1829
|
-
let n = t;
|
|
1830
|
-
for (; n < e.length && /\s/.test(e[n]);) n += 1;
|
|
1831
|
-
let r = n;
|
|
1832
|
-
for (; n < e.length && /[a-z-]/i.test(e[n]);) n += 1;
|
|
1833
|
-
if (n === r) return !1;
|
|
1834
|
-
for (; n < e.length && /\s/.test(e[n]);) n += 1;
|
|
1835
|
-
return e[n] === ":";
|
|
1836
|
-
}, Y = (e) => {
|
|
1837
|
-
let t = [], n = 0;
|
|
1838
|
-
for (; n < e.length;) {
|
|
1839
|
-
for (; n < e.length && /[\s;,]/.test(e[n]);) n += 1;
|
|
1840
|
-
if (n >= e.length) break;
|
|
1841
|
-
let r = n;
|
|
1842
|
-
for (; n < e.length && e[n] !== ":" && !(e[n] === ";" || e[n] === ",");) n += 1;
|
|
1843
|
-
if (n >= e.length || e[n] !== ":") break;
|
|
1844
|
-
let i = e.substring(r, n).trim().toLowerCase();
|
|
1845
|
-
n += 1;
|
|
1846
|
-
let a = n, o = 0, s = null;
|
|
1847
|
-
for (; n < e.length;) {
|
|
1848
|
-
let t = e[n];
|
|
1849
|
-
if (s) {
|
|
1850
|
-
t === s && e[n - 1] !== "\\" && (s = null), n += 1;
|
|
1851
|
-
continue;
|
|
1852
|
-
}
|
|
1853
|
-
if (t === "\"" || t === "'") {
|
|
1854
|
-
s = t, n += 1;
|
|
1855
|
-
continue;
|
|
1856
|
-
}
|
|
1857
|
-
if (t === "(") {
|
|
1858
|
-
o += 1, n += 1;
|
|
1859
|
-
continue;
|
|
1860
|
-
}
|
|
1861
|
-
if (t === ")") {
|
|
1862
|
-
o = Math.max(0, o - 1), n += 1;
|
|
1863
|
-
continue;
|
|
1864
|
-
}
|
|
1865
|
-
if (o === 0 && (t === ";" || t === "," || /\s/.test(t) && Wi(e, n))) break;
|
|
1866
|
-
n += 1;
|
|
1867
|
-
}
|
|
1868
|
-
let c = J(e.substring(a, n));
|
|
1869
|
-
i && c && t.push({
|
|
1870
|
-
property: i,
|
|
1871
|
-
value: c
|
|
1872
|
-
}), n < e.length && (e[n] === ";" || e[n] === ",") && (n += 1);
|
|
1873
|
-
}
|
|
1874
|
-
return t;
|
|
1875
|
-
}, X = (e) => {
|
|
1876
|
-
let t = J(e);
|
|
1877
|
-
if (!t) return !1;
|
|
1878
|
-
if (typeof CSS < "u" && typeof CSS.supports == "function") return CSS.supports("color", t);
|
|
1879
|
-
if (typeof document < "u") {
|
|
1880
|
-
let e = document.createElement("div");
|
|
1881
|
-
return e.style.color = "", e.style.color = t, e.style.color !== "";
|
|
1882
|
-
}
|
|
1883
|
-
return !1;
|
|
1884
|
-
}, Gi = (e, t) => {
|
|
1885
|
-
var n;
|
|
1886
|
-
let r = e.getAttribute("style");
|
|
1887
|
-
return r && ((n = Y(r).find((e) => e.property === t)) == null ? void 0 : n.value) || "";
|
|
1888
|
-
}, Ki = (...e) => {
|
|
1889
|
-
for (let t of e) {
|
|
1890
|
-
let e = J(t || "");
|
|
1891
|
-
if (X(e)) return e;
|
|
1892
|
-
}
|
|
1893
|
-
}, qi = (e, t) => {
|
|
1894
|
-
var n, r, i, a;
|
|
1895
|
-
let o = e.querySelector("text, foreignObject, div, span, p") || e, s = Ki((n = o.getAttribute) == null ? void 0 : n.call(o, "fill"), Gi(o, "fill"), (r = o.style) == null ? void 0 : r.fill);
|
|
1896
|
-
if (s) return s;
|
|
1897
|
-
let c = Ki((i = o.getAttribute) == null ? void 0 : i.call(o, "color"), Gi(o, "color"), (a = o.style) == null ? void 0 : a.color);
|
|
1898
|
-
if (c) return c;
|
|
1899
|
-
let l = Ki(t);
|
|
1900
|
-
if (l) return l;
|
|
1901
|
-
};
|
|
1902
|
-
//#endregion
|
|
1903
|
-
//#region node_modules/.pnpm/@excalidraw+mermaid-to-excalidraw@2.2.2/node_modules/@excalidraw/mermaid-to-excalidraw/dist/parser/flowchart.js
|
|
1904
|
-
t();
|
|
1905
|
-
var Ji = (e, t, n) => {
|
|
1906
|
-
switch (t) {
|
|
1907
|
-
case j.FILL:
|
|
1908
|
-
case j.STROKE:
|
|
1909
|
-
X(n) && (e[t] = n);
|
|
1910
|
-
break;
|
|
1911
|
-
case j.STROKE_WIDTH:
|
|
1912
|
-
case j.STROKE_DASHARRAY:
|
|
1913
|
-
e[t] = n;
|
|
1914
|
-
break;
|
|
1915
|
-
}
|
|
1916
|
-
}, Yi = (e, t, n) => {
|
|
1917
|
-
t === A.COLOR && X(n) && (e[A.COLOR] = n);
|
|
1918
|
-
}, Xi = (e, t, n) => {
|
|
1919
|
-
e && Y(e).forEach(({ property: e, value: r }) => {
|
|
1920
|
-
Ji(t, e, r), Yi(n, e, r);
|
|
1921
|
-
});
|
|
1922
|
-
}, Zi = (e, t) => {
|
|
1923
|
-
e && Y(e).forEach(({ property: e, value: n }) => {
|
|
1924
|
-
if (e === "fill" && X(n)) {
|
|
1925
|
-
t[A.COLOR] = n;
|
|
1926
|
-
return;
|
|
1927
|
-
}
|
|
1928
|
-
Yi(t, e, n);
|
|
1929
|
-
});
|
|
1930
|
-
}, Qi = (e, t) => {
|
|
1931
|
-
e && [
|
|
1932
|
-
[j.FILL, e.getAttribute("fill")],
|
|
1933
|
-
[j.STROKE, e.getAttribute("stroke")],
|
|
1934
|
-
[j.STROKE_WIDTH, e.getAttribute("stroke-width")],
|
|
1935
|
-
[j.STROKE_DASHARRAY, e.getAttribute("stroke-dasharray")]
|
|
1936
|
-
].forEach(([e, n]) => {
|
|
1937
|
-
let r = J(n || "");
|
|
1938
|
-
r && Ji(t, e, r);
|
|
1939
|
-
});
|
|
1940
|
-
}, $i = (e, t) => {
|
|
1941
|
-
if (!e) return;
|
|
1942
|
-
let n = J(e.getAttribute("fill") || e.getAttribute("color") || "");
|
|
1943
|
-
X(n) && (t[A.COLOR] = n);
|
|
1944
|
-
}, ea = (e, t, n, r) => {
|
|
1945
|
-
var i, a;
|
|
1946
|
-
if (!(t instanceof Map)) return;
|
|
1947
|
-
let o = t.get(e);
|
|
1948
|
-
o && ((i = o.styles) == null || i.forEach((e) => {
|
|
1949
|
-
Y(e).forEach(({ property: e, value: t }) => {
|
|
1950
|
-
Ji(n, e, t), Yi(r, e, t);
|
|
1951
|
-
});
|
|
1952
|
-
}), (a = o.textStyles) == null || a.forEach((e) => {
|
|
1953
|
-
Y(e).forEach(({ property: e, value: t }) => {
|
|
1954
|
-
Yi(r, e, t);
|
|
1955
|
-
});
|
|
1956
|
-
}));
|
|
1957
|
-
}, ta = (e, t, r) => {
|
|
1958
|
-
var i;
|
|
1959
|
-
let a = e.nodes.map((e) => e.startsWith("flowchart-") ? e.split("-")[1] : e), o = t.querySelector(`[id='${e.id}']`);
|
|
1960
|
-
if (!o) throw Error("SubGraph element not found");
|
|
1961
|
-
let s = ia(o, t), c = o.getBBox(), l = {
|
|
1962
|
-
width: c.width,
|
|
1963
|
-
height: c.height
|
|
1964
|
-
}, u = {}, d = {}, f = o.querySelector(":scope > rect, :scope > path, :scope > polygon, :scope > ellipse") || o.querySelector(".cluster > rect, .cluster > path, .cluster > polygon, .cluster > ellipse") || o.querySelector("rect, path, polygon, ellipse");
|
|
1965
|
-
Xi(o.getAttribute("style"), u, d), Xi(f == null ? void 0 : f.getAttribute("style"), u, d), Qi(f, u);
|
|
1966
|
-
let p = o.querySelector(".cluster-label text, .cluster-label tspan") || o.querySelector("text");
|
|
1967
|
-
return Zi(p == null ? void 0 : p.getAttribute("style"), d), $i(p, d), ea(e.id, r, u, d), (i = e.classes) == null || i.forEach((e) => {
|
|
1968
|
-
ea(e, r, u, d);
|
|
1969
|
-
}), n(n(n({
|
|
1970
|
-
id: e.id,
|
|
1971
|
-
nodeIds: a,
|
|
1972
|
-
text: R(e.title),
|
|
1973
|
-
labelType: "text"
|
|
1974
|
-
}, s), l), {}, {
|
|
1975
|
-
containerStyle: u,
|
|
1976
|
-
labelStyle: d
|
|
1977
|
-
});
|
|
1978
|
-
}, na = (e, t, r) => {
|
|
1979
|
-
var i, a;
|
|
1980
|
-
let o = t.querySelector(`[id*="${e.domId}"]`);
|
|
1981
|
-
if (!o) return;
|
|
1982
|
-
let s;
|
|
1983
|
-
((i = o.parentElement) == null ? void 0 : i.tagName.toLowerCase()) === "a" && (s = o.parentElement.getAttribute("xlink:href"));
|
|
1984
|
-
let c = ia(s ? o.parentElement : o, t), l = o.getBBox(), u = {
|
|
1985
|
-
width: l.width,
|
|
1986
|
-
height: l.height
|
|
1987
|
-
}, d = {}, f = {};
|
|
1988
|
-
e.classes && r instanceof Map && (Array.isArray(e.classes) ? e.classes : [e.classes]).forEach((e) => {
|
|
1989
|
-
ea(e, r, d, f);
|
|
1990
|
-
}), (a = e.styles) == null || a.forEach((e) => {
|
|
1991
|
-
Xi(e, d, f);
|
|
1992
|
-
});
|
|
1993
|
-
let p = o.querySelector(".label-container");
|
|
1994
|
-
return Xi(p == null ? void 0 : p.getAttribute("style"), d, f), Qi(p, d), Array.from(o.querySelectorAll(".label, .nodeLabel, .label text, .label tspan, .label span, .label div")).forEach((e) => {
|
|
1995
|
-
Zi(e.getAttribute("style"), f), $i(e, f);
|
|
1996
|
-
}), n(n(n({
|
|
1997
|
-
id: e.id,
|
|
1998
|
-
labelType: e.labelType,
|
|
1999
|
-
text: R(e.text || ""),
|
|
2000
|
-
type: e.type,
|
|
2001
|
-
link: s || void 0
|
|
2002
|
-
}, c), u), {}, {
|
|
2003
|
-
containerStyle: d,
|
|
2004
|
-
labelStyle: f
|
|
2005
|
-
});
|
|
2006
|
-
}, ra = (e, t, r) => {
|
|
2007
|
-
let i = r.querySelector(`[id*="${e.id}"]`);
|
|
2008
|
-
if (!i) throw Error("Edge element not found");
|
|
2009
|
-
let a = jt(i, ia(i, r));
|
|
2010
|
-
return e.length = void 0, n(n(n({}, e), a), {}, { text: R(e.text) });
|
|
2011
|
-
}, ia = (e, t) => {
|
|
2012
|
-
var n;
|
|
2013
|
-
if (!e) throw Error("Element not found");
|
|
2014
|
-
let r = (n = e.parentElement) == null ? void 0 : n.parentElement, i = e.childNodes[0], a = {
|
|
2015
|
-
x: 0,
|
|
2016
|
-
y: 0
|
|
2017
|
-
};
|
|
2018
|
-
if (i) {
|
|
2019
|
-
let { transformX: e, transformY: t } = z(i), n = i.getBBox();
|
|
2020
|
-
a = {
|
|
2021
|
-
x: Number(i.getAttribute("x")) || e + n.x || 0,
|
|
2022
|
-
y: Number(i.getAttribute("y")) || t + n.y || 0
|
|
2023
|
-
};
|
|
2024
|
-
}
|
|
2025
|
-
let { transformX: o, transformY: s } = z(e), c = {
|
|
2026
|
-
x: o + a.x,
|
|
2027
|
-
y: s + a.y
|
|
2028
|
-
};
|
|
2029
|
-
for (; r && r.id !== t.id;) {
|
|
2030
|
-
if (r.classList.value === "root" && r.hasAttribute("transform")) {
|
|
2031
|
-
let { transformX: e, transformY: t } = z(r);
|
|
2032
|
-
c.x += e, c.y += t;
|
|
2033
|
-
}
|
|
2034
|
-
r = r.parentElement;
|
|
2035
|
-
}
|
|
2036
|
-
return c;
|
|
2037
|
-
}, aa = (e, t) => {
|
|
2038
|
-
let n = e.getVertices(), r = e.getEdges(), i = e.getSubGraphs(), a = e.getClasses(), o = {}, s = a instanceof Map ? a : {};
|
|
2039
|
-
n instanceof Map ? n.forEach((e, n) => {
|
|
2040
|
-
o[n] = na(e, t, s);
|
|
2041
|
-
}) : typeof n == "object" && n && Object.entries(n).forEach(([e, n]) => {
|
|
2042
|
-
o[e] = na(n, t, s);
|
|
2043
|
-
});
|
|
2044
|
-
let c = /* @__PURE__ */ new Map(), l = (Array.isArray(r) ? r : []).map((e) => {
|
|
2045
|
-
if (!t.querySelector(`[id*="${e.id}"]`)) return null;
|
|
2046
|
-
let n = `${e.start}-${e.end}`, r = c.get(n) || 0;
|
|
2047
|
-
return c.set(n, r + 1), ra(e, r, t);
|
|
2048
|
-
}).filter((e) => e !== null && e.reflectionPoints.length > 1);
|
|
2049
|
-
return {
|
|
2050
|
-
type: "flowchart",
|
|
2051
|
-
subGraphs: (Array.isArray(i) ? i : []).map((e) => ta(e, t, s)),
|
|
2052
|
-
vertices: o,
|
|
2053
|
-
edges: l
|
|
2054
|
-
};
|
|
2055
|
-
};
|
|
2056
|
-
//#endregion
|
|
2057
|
-
//#region node_modules/.pnpm/@excalidraw+mermaid-to-excalidraw@2.2.2/node_modules/@excalidraw/mermaid-to-excalidraw/dist/elementSkeleton.js
|
|
2058
|
-
t();
|
|
2059
|
-
var oa = (e, t) => {
|
|
2060
|
-
let n = {};
|
|
2061
|
-
t != null && t.label && (n.label = {
|
|
2062
|
-
text: R(t.label),
|
|
2063
|
-
fontSize: 16
|
|
2064
|
-
});
|
|
2065
|
-
let r = e.tagName;
|
|
2066
|
-
if (r === "line") n.startX = Number(e.getAttribute("x1")), n.startY = Number(e.getAttribute("y1")), n.endX = Number(e.getAttribute("x2")), n.endY = Number(e.getAttribute("y2"));
|
|
2067
|
-
else if (r === "path") {
|
|
2068
|
-
let t = e.getAttribute("d");
|
|
2069
|
-
if (!t) throw Error("Path element does not contain a \"d\" attribute");
|
|
2070
|
-
let r = t.split(/(?=[LC])/), i = r[0].substring(1).split(",").map((e) => parseFloat(e)), a = [];
|
|
2071
|
-
r.forEach((e) => {
|
|
2072
|
-
let t = e.substring(1).trim().split(" ").map((e) => {
|
|
2073
|
-
let [t, n] = e.split(",");
|
|
2074
|
-
return [parseFloat(t) - i[0], parseFloat(n) - i[1]];
|
|
2075
|
-
});
|
|
2076
|
-
a.push(...t);
|
|
2077
|
-
});
|
|
2078
|
-
let o = a[a.length - 1];
|
|
2079
|
-
n.startX = i[0], n.startY = i[1], n.endX = o[0], n.endY = o[1], n.points = a;
|
|
2080
|
-
}
|
|
2081
|
-
t != null && t.label && (n.startY -= 10, n.endY -= 10);
|
|
2082
|
-
let i = e.getAttribute("stroke"), a = (i && i !== "none" ? i : "") || getComputedStyle(e).stroke || "";
|
|
2083
|
-
return n.strokeColor = a ? J(a) : null, n.strokeWidth = Number(e.getAttribute("stroke-width")), n.type = "arrow", n.strokeStyle = (t == null ? void 0 : t.strokeStyle) || "solid", n.startArrowhead = (t == null ? void 0 : t.startArrowhead) || null, n.endArrowhead = (t == null ? void 0 : t.endArrowhead) || null, n;
|
|
2084
|
-
}, sa = (e, t, r, i, a) => {
|
|
2085
|
-
let o = {};
|
|
2086
|
-
return o.type = "arrow", o.startX = e, o.startY = t, o.endX = r, o.endY = i, Object.assign(o, n({}, a)), o;
|
|
2087
|
-
}, ca = (e, t, n, r) => ({
|
|
2088
|
-
type: "text",
|
|
2089
|
-
x: e,
|
|
2090
|
-
y: t,
|
|
2091
|
-
text: n,
|
|
2092
|
-
width: (r == null ? void 0 : r.width) || 20,
|
|
2093
|
-
height: (r == null ? void 0 : r.height) || 20,
|
|
2094
|
-
fontSize: (r == null ? void 0 : r.fontSize) || 20,
|
|
2095
|
-
id: r == null ? void 0 : r.id,
|
|
2096
|
-
color: r == null ? void 0 : r.color,
|
|
2097
|
-
groupId: r == null ? void 0 : r.groupId,
|
|
2098
|
-
metadata: r == null ? void 0 : r.metadata
|
|
2099
|
-
}), la = (e, t, n) => {
|
|
2100
|
-
let r = {}, i = Number(e.getAttribute("x")), a = Number(e.getAttribute("y"));
|
|
2101
|
-
r.type = "text", r.text = R(t), n != null && n.id && (r.id = n.id), n != null && n.groupId && (r.groupId = n.groupId);
|
|
2102
|
-
let o = e.getBBox();
|
|
2103
|
-
return r.width = o.width, r.height = o.height, r.x = i - o.width / 2, r.y = a, r.fontSize = parseInt(getComputedStyle(e).fontSize), r.color = qi(e), r;
|
|
2104
|
-
}, Z = (e, t, n = {}) => {
|
|
2105
|
-
let r = {};
|
|
2106
|
-
r.type = t;
|
|
2107
|
-
let { label: i, subtype: a, id: o, groupId: s } = n;
|
|
2108
|
-
r.id = o, s && (r.groupId = s), i && (r.label = {
|
|
2109
|
-
text: R(i.text),
|
|
2110
|
-
fontSize: 16,
|
|
2111
|
-
textAlign: i == null ? void 0 : i.textAlign,
|
|
2112
|
-
verticalAlign: i == null ? void 0 : i.verticalAlign
|
|
2113
|
-
});
|
|
2114
|
-
let c = e.getBBox();
|
|
2115
|
-
switch (r.x = c.x, r.y = c.y, r.width = c.width, r.height = c.height, r.subtype = a, a) {
|
|
2116
|
-
case "highlight":
|
|
2117
|
-
let t = e.getAttribute("fill");
|
|
2118
|
-
t && (r.bgColor = J(t));
|
|
2119
|
-
break;
|
|
2120
|
-
case "note":
|
|
2121
|
-
r.strokeStyle = "dashed";
|
|
2122
|
-
break;
|
|
2123
|
-
}
|
|
2124
|
-
return r;
|
|
2125
|
-
}, ua = (e, t, n, r, i, a) => {
|
|
2126
|
-
let o = {};
|
|
2127
|
-
o.startX = t, o.startY = n, o.endX = r, a != null && a.groupId && (o.groupId = a.groupId), a != null && a.id && (o.id = a.id), o.endY = i;
|
|
2128
|
-
let s = e.getAttribute("stroke");
|
|
2129
|
-
return o.strokeColor = s ? J(s) : null, o.strokeWidth = Number(e.getAttribute("stroke-width")), o.type = "line", o;
|
|
2130
|
-
};
|
|
2131
|
-
//#endregion
|
|
2132
|
-
//#region node_modules/.pnpm/@excalidraw+mermaid-to-excalidraw@2.2.2/node_modules/@excalidraw/mermaid-to-excalidraw/dist/parser/sequence.js
|
|
2133
|
-
t();
|
|
2134
|
-
var da = {
|
|
2135
|
-
0: "SOLID",
|
|
2136
|
-
1: "DOTTED",
|
|
2137
|
-
3: "SOLID_CROSS",
|
|
2138
|
-
4: "DOTTED_CROSS",
|
|
2139
|
-
5: "SOLID_OPEN",
|
|
2140
|
-
6: "DOTTED_OPEN",
|
|
2141
|
-
24: "SOLID_POINT",
|
|
2142
|
-
25: "DOTTED_POINT"
|
|
2143
|
-
}, Q = {
|
|
2144
|
-
SOLID: 0,
|
|
2145
|
-
DOTTED: 1,
|
|
2146
|
-
NOTE: 2,
|
|
2147
|
-
SOLID_CROSS: 3,
|
|
2148
|
-
DOTTED_CROSS: 4,
|
|
2149
|
-
SOLID_OPEN: 5,
|
|
2150
|
-
DOTTED_OPEN: 6,
|
|
2151
|
-
LOOP_START: 10,
|
|
2152
|
-
LOOP_END: 11,
|
|
2153
|
-
ALT_START: 12,
|
|
2154
|
-
ALT_ELSE: 13,
|
|
2155
|
-
ALT_END: 14,
|
|
2156
|
-
OPT_START: 15,
|
|
2157
|
-
OPT_END: 16,
|
|
2158
|
-
ACTIVE_START: 17,
|
|
2159
|
-
ACTIVE_END: 18,
|
|
2160
|
-
PAR_START: 19,
|
|
2161
|
-
PAR_AND: 20,
|
|
2162
|
-
PAR_END: 21,
|
|
2163
|
-
RECT_START: 22,
|
|
2164
|
-
RECT_END: 23,
|
|
2165
|
-
SOLID_POINT: 24,
|
|
2166
|
-
DOTTED_POINT: 25,
|
|
2167
|
-
AUTONUMBER: 26,
|
|
2168
|
-
CRITICAL_START: 27,
|
|
2169
|
-
CRITICAL_OPTION: 28,
|
|
2170
|
-
CRITICAL_END: 29,
|
|
2171
|
-
BREAK_START: 30,
|
|
2172
|
-
BREAK_END: 31,
|
|
2173
|
-
PAR_OVER_START: 32
|
|
2174
|
-
}, fa = (e) => {
|
|
2175
|
-
let t;
|
|
2176
|
-
switch (e) {
|
|
2177
|
-
case Q.SOLID:
|
|
2178
|
-
case Q.SOLID_CROSS:
|
|
2179
|
-
case Q.SOLID_OPEN:
|
|
2180
|
-
case Q.SOLID_POINT:
|
|
2181
|
-
t = "solid";
|
|
2182
|
-
break;
|
|
2183
|
-
case Q.DOTTED:
|
|
2184
|
-
case Q.DOTTED_CROSS:
|
|
2185
|
-
case Q.DOTTED_OPEN:
|
|
2186
|
-
case Q.DOTTED_POINT:
|
|
2187
|
-
t = "dotted";
|
|
2188
|
-
break;
|
|
2189
|
-
default:
|
|
2190
|
-
t = "solid";
|
|
2191
|
-
break;
|
|
2192
|
-
}
|
|
2193
|
-
return t;
|
|
2194
|
-
}, pa = (e, t) => {
|
|
2195
|
-
var n;
|
|
2196
|
-
if ((n = e.nextElementSibling) != null && n.classList.contains("sequenceNumber")) {
|
|
2197
|
-
var r;
|
|
2198
|
-
let n = (r = e.nextElementSibling) == null ? void 0 : r.textContent;
|
|
2199
|
-
if (!n) throw Error("sequence number not present");
|
|
2200
|
-
let i = {
|
|
2201
|
-
type: "rectangle",
|
|
2202
|
-
x: t.startX - 10,
|
|
2203
|
-
y: t.startY - 15,
|
|
2204
|
-
label: {
|
|
2205
|
-
text: n,
|
|
2206
|
-
fontSize: 14
|
|
2207
|
-
},
|
|
2208
|
-
bgColor: "#e9ecef",
|
|
2209
|
-
height: 30,
|
|
2210
|
-
subtype: "sequence"
|
|
2211
|
-
};
|
|
2212
|
-
Object.assign(t, { sequenceNumber: i });
|
|
2213
|
-
}
|
|
2214
|
-
}, ma = (e, t, n) => {
|
|
2215
|
-
if (!e) throw "root node not found";
|
|
2216
|
-
let r = M(), i = Array.from(e.children), a = [];
|
|
2217
|
-
return i.forEach((e, i) => {
|
|
2218
|
-
let o = `${n == null ? void 0 : n.id}-${i}`, s;
|
|
2219
|
-
switch (e.tagName) {
|
|
2220
|
-
case "line":
|
|
2221
|
-
s = ua(e, Number(e.getAttribute("x1")), Number(e.getAttribute("y1")), Number(e.getAttribute("x2")), Number(e.getAttribute("y2")), {
|
|
2222
|
-
groupId: r,
|
|
2223
|
-
id: o
|
|
2224
|
-
});
|
|
2225
|
-
break;
|
|
2226
|
-
case "text":
|
|
2227
|
-
s = la(e, t, {
|
|
2228
|
-
groupId: r,
|
|
2229
|
-
id: o
|
|
2230
|
-
});
|
|
2231
|
-
break;
|
|
2232
|
-
case "circle": s = Z(e, "ellipse", {
|
|
2233
|
-
label: e.textContent ? { text: e.textContent } : void 0,
|
|
2234
|
-
groupId: r,
|
|
2235
|
-
id: o
|
|
2236
|
-
});
|
|
2237
|
-
default: s = Z(e, Se[e.tagName], {
|
|
2238
|
-
label: e.textContent ? { text: e.textContent } : void 0,
|
|
2239
|
-
groupId: r,
|
|
2240
|
-
id: o
|
|
2241
|
-
});
|
|
2242
|
-
}
|
|
2243
|
-
a.push(s);
|
|
2244
|
-
}), a;
|
|
2245
|
-
}, ha = (e, t) => {
|
|
2246
|
-
let n = t.getAttribute("fill"), r = t.getAttribute("stroke"), i = t.getAttribute("stroke-width"), a = t.getAttribute("stroke-dasharray");
|
|
2247
|
-
n && n !== "none" && (e.bgColor = J(n)), r && r !== "none" && (e.strokeColor = J(r)), i && (e.strokeWidth = Number(i)), a && a.trim() && (e.strokeStyle = "dashed");
|
|
2248
|
-
}, ga = (e, t) => {
|
|
2249
|
-
let n = Array.from(t.querySelectorAll(".actor-top")), r = Array.from(t.querySelectorAll(".actor-bottom")), i = [], a = [], o = {}, s = e instanceof Map ? Array.from(e.values()) : Object.values(e), c = Array.from(t.querySelectorAll(".actor-line")), l = (e, t) => {
|
|
2250
|
-
var n;
|
|
2251
|
-
let r = e.name, i = c.find((e) => e.getAttribute("name") === r);
|
|
2252
|
-
if (i) return i;
|
|
2253
|
-
let a = e.type === "participant" ? (n = t.parentElement) == null ? void 0 : n.previousElementSibling : t.previousElementSibling;
|
|
2254
|
-
return a ? a.tagName === "line" ? a : a.querySelector("line") : null;
|
|
2255
|
-
};
|
|
2256
|
-
return s.forEach((e) => {
|
|
2257
|
-
let t = n.find((t) => t.getAttribute("name") === e.name), s = r.find((t) => t.getAttribute("name") === e.name);
|
|
2258
|
-
if (!t || !s) throw "root not found";
|
|
2259
|
-
let c = e.description;
|
|
2260
|
-
if (e.type === "participant") {
|
|
2261
|
-
let n = Z(t, "rectangle", {
|
|
2262
|
-
id: `${e.name}-top`,
|
|
2263
|
-
label: { text: c },
|
|
2264
|
-
subtype: "actor"
|
|
2265
|
-
});
|
|
2266
|
-
if (ha(n, t), !n) throw "Top Node element not found!";
|
|
2267
|
-
i.push([n]);
|
|
2268
|
-
let r = Z(s, "rectangle", {
|
|
2269
|
-
id: `${e.name}-bottom`,
|
|
2270
|
-
label: { text: c },
|
|
2271
|
-
subtype: "actor"
|
|
2272
|
-
});
|
|
2273
|
-
o[e.name] = {
|
|
2274
|
-
topId: `${e.name}-top`,
|
|
2275
|
-
bottomId: `${e.name}-bottom`,
|
|
2276
|
-
bindType: "rectangle"
|
|
2277
|
-
}, ha(r, s), i.push([r]);
|
|
2278
|
-
let u = l(e, t);
|
|
2279
|
-
if ((u == null ? void 0 : u.tagName) !== "line") throw "Line not found";
|
|
2280
|
-
let d = Number(u.getAttribute("x1"));
|
|
2281
|
-
if (!n.height) throw "Top node element height is null";
|
|
2282
|
-
let f = n.y + n.height, p = r.y, m = ua(u, d, f, Number(u.getAttribute("x2")), p);
|
|
2283
|
-
a.push(m);
|
|
2284
|
-
} else if (e.type === "actor") {
|
|
2285
|
-
let n = ma(t, c, { id: `${e.name}-top` });
|
|
2286
|
-
i.push(n);
|
|
2287
|
-
let r = ma(s, c, { id: `${e.name}-bottom` });
|
|
2288
|
-
i.push(r);
|
|
2289
|
-
let u = l(e, t);
|
|
2290
|
-
if ((u == null ? void 0 : u.tagName) !== "line") throw "Line not found";
|
|
2291
|
-
let d = Number(u.getAttribute("x1")), f = Number(u.getAttribute("y1")), p = Number(u.getAttribute("x2")), m = r.find((e) => e.type === "ellipse");
|
|
2292
|
-
if (m) {
|
|
2293
|
-
let e = m.y, t = ua(u, d, f, p, e);
|
|
2294
|
-
a.push(t);
|
|
2295
|
-
}
|
|
2296
|
-
let h = n.find((e) => e.type === "ellipse"), g = r.find((e) => e.type === "ellipse");
|
|
2297
|
-
h != null && h.id && g != null && g.id && (o[e.name] = {
|
|
2298
|
-
topId: h.id,
|
|
2299
|
-
bottomId: g.id,
|
|
2300
|
-
bindType: "ellipse"
|
|
2301
|
-
});
|
|
2302
|
-
}
|
|
2303
|
-
}), {
|
|
2304
|
-
nodes: i,
|
|
2305
|
-
lines: a,
|
|
2306
|
-
actorMap: o
|
|
2307
|
-
};
|
|
2308
|
-
}, _a = (e, t, n) => {
|
|
2309
|
-
let r = [], i = Array.from(t.querySelectorAll("[class*=\"messageLine\"]")), a = Object.keys(da), o = e.filter((e) => a.includes(e.type.toString()));
|
|
2310
|
-
return i.forEach((e, t) => {
|
|
2311
|
-
let i = o[t], a = da[i.type], s = oa(e, {
|
|
2312
|
-
label: i == null ? void 0 : i.message,
|
|
2313
|
-
strokeStyle: fa(i.type),
|
|
2314
|
-
endArrowhead: a === "SOLID_OPEN" || a === "DOTTED_OPEN" ? null : "arrow"
|
|
2315
|
-
}), c = n[i.from], l = n[i.to];
|
|
2316
|
-
c != null && c.topId && l != null && l.topId && (s.start = {
|
|
2317
|
-
type: c.bindType || "rectangle",
|
|
2318
|
-
id: c.topId
|
|
2319
|
-
}, s.end = {
|
|
2320
|
-
type: l.bindType || "rectangle",
|
|
2321
|
-
id: l.topId
|
|
2322
|
-
}), pa(e, s), r.push(s);
|
|
2323
|
-
}), r;
|
|
2324
|
-
}, va = (e, t) => {
|
|
2325
|
-
let n = Array.from(t.querySelectorAll(".note")).map((e) => e.parentElement), r = e.filter((e) => e.type === Q.NOTE), i = [];
|
|
2326
|
-
return n.forEach((e, t) => {
|
|
2327
|
-
if (!e) return;
|
|
2328
|
-
let n = e.firstChild, a = r[t].message, o = Z(n, "rectangle", {
|
|
2329
|
-
label: { text: a },
|
|
2330
|
-
subtype: "note"
|
|
2331
|
-
}), s = n.getAttribute("fill"), c = n.getAttribute("stroke"), l = n.getAttribute("stroke-width"), u = n.getAttribute("stroke-dasharray");
|
|
2332
|
-
s && s !== "none" && (o.bgColor = J(s)), c && c !== "none" && (o.strokeColor = J(c)), l && (o.strokeWidth = Number(l)), u && u.trim() && (o.strokeStyle = "dashed"), i.push(o);
|
|
2333
|
-
}), i;
|
|
2334
|
-
}, ya = (e) => {
|
|
2335
|
-
let t = Array.from(e.querySelectorAll("[class*=activation]")), n = [];
|
|
2336
|
-
return t.forEach((e) => {
|
|
2337
|
-
let t = Z(e, "rectangle", {
|
|
2338
|
-
label: { text: "" },
|
|
2339
|
-
subtype: "activation"
|
|
2340
|
-
});
|
|
2341
|
-
(() => {
|
|
2342
|
-
let n = e.getAttribute("fill"), r = e.getAttribute("stroke"), i = e.getAttribute("stroke-width"), a = e.getAttribute("stroke-dasharray");
|
|
2343
|
-
n && n !== "none" && (t.bgColor = J(n)), r && r !== "none" && (t.strokeColor = J(r)), i && (t.strokeWidth = Number(i)), a && a.trim() && (t.strokeStyle = "dashed");
|
|
2344
|
-
})(), n.push(t);
|
|
2345
|
-
}), n;
|
|
2346
|
-
}, ba = (e, t) => {
|
|
2347
|
-
let n = Array.from(t.querySelectorAll(".loopLine")), r = [], i = [], a = [];
|
|
2348
|
-
n.forEach((e) => {
|
|
2349
|
-
let t = ua(e, Number(e.getAttribute("x1")), Number(e.getAttribute("y1")), Number(e.getAttribute("x2")), Number(e.getAttribute("y2")));
|
|
2350
|
-
t.strokeStyle = "dotted", t.strokeColor = "#adb5bd", t.strokeWidth = 2, r.push(t);
|
|
2351
|
-
});
|
|
2352
|
-
let o = Array.from(t.querySelectorAll(".loopText")), s = e.filter((e) => e.type === Q.CRITICAL_START).map((e) => e.message);
|
|
2353
|
-
o.forEach((e) => {
|
|
2354
|
-
var t;
|
|
2355
|
-
let n = e.textContent || "", r = la(e, n), a = ((t = n.match(/\[(.*?)\]/)) == null ? void 0 : t[1]) || "";
|
|
2356
|
-
s.includes(a) && (r.x += 16), i.push(r);
|
|
2357
|
-
});
|
|
2358
|
-
let c = Array.from(t == null ? void 0 : t.querySelectorAll(".labelBox")), l = Array.from(t == null ? void 0 : t.querySelectorAll(".labelText"));
|
|
2359
|
-
return c.forEach((e, t) => {
|
|
2360
|
-
var n;
|
|
2361
|
-
let r = Z(e, "rectangle", { label: { text: ((n = l[t]) == null ? void 0 : n.textContent) || "" } });
|
|
2362
|
-
r.strokeColor = "#adb5bd", r.bgColor = "#e9ecef", r.width = void 0, a.push(r);
|
|
2363
|
-
}), {
|
|
2364
|
-
lines: r,
|
|
2365
|
-
texts: i,
|
|
2366
|
-
nodes: a
|
|
2367
|
-
};
|
|
2368
|
-
}, xa = (e) => {
|
|
2369
|
-
let t = Array.from(e.querySelectorAll(".rect")).filter((e) => {
|
|
2370
|
-
var t;
|
|
2371
|
-
return ((t = e.parentElement) == null ? void 0 : t.tagName) !== "g";
|
|
2372
|
-
}), n = [];
|
|
2373
|
-
return t.forEach((e) => {
|
|
2374
|
-
let t = Z(e, "rectangle", {
|
|
2375
|
-
label: { text: "" },
|
|
2376
|
-
subtype: "highlight"
|
|
2377
|
-
});
|
|
2378
|
-
n.push(t);
|
|
2379
|
-
}), n;
|
|
2380
|
-
}, Sa = (e, t) => {
|
|
2381
|
-
let r = e.db, i = [], a = r.getBoxes().map((e) => n(n({}, e), {}, { fill: J(e.fill || "") })), o = xa(t), { nodes: s, lines: c, actorMap: l } = ga(r.getActors(), t), u = r.getMessages(), d = _a(u, t, l), f = va(u, t), p = ya(t), m = ba(u, t);
|
|
2382
|
-
return i.push(o), i.push(...s), i.push(f), i.push(p), {
|
|
2383
|
-
type: "sequence",
|
|
2384
|
-
lines: c,
|
|
2385
|
-
arrows: d,
|
|
2386
|
-
nodes: i,
|
|
2387
|
-
loops: m,
|
|
2388
|
-
groups: a
|
|
2389
|
-
};
|
|
2390
|
-
};
|
|
2391
|
-
//#endregion
|
|
2392
|
-
//#region node_modules/.pnpm/@excalidraw+mermaid-to-excalidraw@2.2.2/node_modules/@excalidraw/mermaid-to-excalidraw/dist/parser/class.js
|
|
2393
|
-
t();
|
|
2394
|
-
var Ca = (e) => {
|
|
2395
|
-
let t = {};
|
|
2396
|
-
return e && e.forEach((e) => {
|
|
2397
|
-
Y(e).forEach(({ property: e, value: n }) => {
|
|
2398
|
-
e && n && (t[e] = J(n));
|
|
2399
|
-
});
|
|
2400
|
-
}), t;
|
|
2401
|
-
}, wa = {
|
|
2402
|
-
AGGREGATION: 0,
|
|
2403
|
-
EXTENSION: 1,
|
|
2404
|
-
COMPOSITION: 2,
|
|
2405
|
-
DEPENDENCY: 3,
|
|
2406
|
-
LOLLIPOP: 4
|
|
2407
|
-
}, Ta = {
|
|
2408
|
-
LINE: 0,
|
|
2409
|
-
DOTTED_LINE: 1
|
|
2410
|
-
}, Ea = 16, Da = (e) => {
|
|
2411
|
-
let t;
|
|
2412
|
-
switch (e) {
|
|
2413
|
-
case Ta.LINE:
|
|
2414
|
-
t = "solid";
|
|
2415
|
-
break;
|
|
2416
|
-
case Ta.DOTTED_LINE:
|
|
2417
|
-
t = "dotted";
|
|
2418
|
-
break;
|
|
2419
|
-
default: t = "solid";
|
|
2420
|
-
}
|
|
2421
|
-
return t;
|
|
2422
|
-
}, Oa = (e) => {
|
|
2423
|
-
let t;
|
|
2424
|
-
switch (e) {
|
|
2425
|
-
case wa.AGGREGATION:
|
|
2426
|
-
t = "diamond_outline";
|
|
2427
|
-
break;
|
|
2428
|
-
case wa.COMPOSITION:
|
|
2429
|
-
t = "diamond";
|
|
2430
|
-
break;
|
|
2431
|
-
case wa.EXTENSION:
|
|
2432
|
-
t = "triangle_outline";
|
|
2433
|
-
break;
|
|
2434
|
-
case "none":
|
|
2435
|
-
t = null;
|
|
2436
|
-
break;
|
|
2437
|
-
case wa.DEPENDENCY:
|
|
2438
|
-
default:
|
|
2439
|
-
t = "arrow";
|
|
2440
|
-
break;
|
|
2441
|
-
}
|
|
2442
|
-
return t;
|
|
2443
|
-
}, ka = (e, t) => {
|
|
2444
|
-
let n = 0, r = 0, i = e;
|
|
2445
|
-
for (; i && i !== t;) {
|
|
2446
|
-
let { transformX: e, transformY: t } = z(i);
|
|
2447
|
-
n += e, r += t, i = i.parentElement;
|
|
2448
|
-
}
|
|
2449
|
-
return {
|
|
2450
|
-
tx: n,
|
|
2451
|
-
ty: r
|
|
2452
|
-
};
|
|
2453
|
-
}, Aa = new Set([
|
|
2454
|
-
"triangle_outline",
|
|
2455
|
-
"diamond",
|
|
2456
|
-
"diamond_outline"
|
|
2457
|
-
]), ja = (e, t = .5) => {
|
|
2458
|
-
if (e.length <= 2) return [...e];
|
|
2459
|
-
let n = [e[0]];
|
|
2460
|
-
for (let r = 1; r < e.length - 1; r++) {
|
|
2461
|
-
let i = n[n.length - 1], a = e[r], o = e[r + 1], s = o.x - i.x, c = o.y - i.y, l = Math.hypot(s, c);
|
|
2462
|
-
if (!l) continue;
|
|
2463
|
-
let u = Math.abs(s * (a.y - i.y) - c * (a.x - i.x)) / l, d = ((a.x - i.x) * s + (a.y - i.y) * c) / (l * l);
|
|
2464
|
-
u <= t && d >= -t && d <= 1 + t || n.push(a);
|
|
2465
|
-
}
|
|
2466
|
-
return n.push(e[e.length - 1]), n;
|
|
2467
|
-
}, Ma = (e) => {
|
|
2468
|
-
let t = Ot(At(e).map((e) => [e.x, e.y])).map(([e, t]) => ({
|
|
2469
|
-
x: e,
|
|
2470
|
-
y: t
|
|
2471
|
-
})), n = kt(e);
|
|
2472
|
-
return n && t.length >= 2 && (t[0] = {
|
|
2473
|
-
x: n.startX,
|
|
2474
|
-
y: n.startY
|
|
2475
|
-
}, t[t.length - 1] = {
|
|
2476
|
-
x: n.endX,
|
|
2477
|
-
y: n.endY
|
|
2478
|
-
}), ja(t);
|
|
2479
|
-
}, Na = (e, t, n) => {
|
|
2480
|
-
let r = e.x - t.x, i = e.y - t.y, a = Math.hypot(r, i);
|
|
2481
|
-
return a ? {
|
|
2482
|
-
x: e.x + r / a * n,
|
|
2483
|
-
y: e.y + i / a * n
|
|
2484
|
-
} : e;
|
|
2485
|
-
}, Pa = (e, t) => {
|
|
2486
|
-
let n = Ot(t.map((e) => [e.x, e.y])).map(([e, t]) => ({
|
|
2487
|
-
x: e,
|
|
2488
|
-
y: t
|
|
2489
|
-
}));
|
|
2490
|
-
if (n.length < 2) throw Error("Arrow route must contain at least two points");
|
|
2491
|
-
let r = n[0], i = n[n.length - 1];
|
|
2492
|
-
e.startX = r.x, e.startY = r.y, e.endX = i.x, e.endY = i.y, e.points = n.map((e) => [e.x - r.x, e.y - r.y]);
|
|
2493
|
-
}, Fa = (e) => {
|
|
2494
|
-
var t;
|
|
2495
|
-
let n = (t = e.points) == null ? void 0 : t.map(([t, n]) => ({
|
|
2496
|
-
x: e.startX + t,
|
|
2497
|
-
y: e.startY + n
|
|
2498
|
-
})).filter((e) => Number.isFinite(e.x) && Number.isFinite(e.y));
|
|
2499
|
-
if (!n || n.length < 2) return e;
|
|
2500
|
-
let r = [...n], i = !!e.startArrowhead && Aa.has(e.startArrowhead), a = !!e.endArrowhead && Aa.has(e.endArrowhead);
|
|
2501
|
-
if (!i && !a) return e;
|
|
2502
|
-
if (i && (r[0] = Na(r[0], r[1], Ea)), a) {
|
|
2503
|
-
let e = r.length - 1;
|
|
2504
|
-
r[e] = Na(r[e], r[e - 1], Ea);
|
|
2505
|
-
}
|
|
2506
|
-
return Pa(e, r), e;
|
|
2507
|
-
}, Ia = (e, t) => {
|
|
2508
|
-
let n = J(e.getAttribute("stroke") || getComputedStyle(e).stroke || ""), r = parseFloat(e.getAttribute("stroke-width") || getComputedStyle(e).strokeWidth || "1");
|
|
2509
|
-
X(n) && n !== "none" && (t.strokeColor = n), Number.isFinite(r) && r > 0 && (t.strokeWidth = r);
|
|
2510
|
-
}, La = (e) => {
|
|
2511
|
-
let t = [];
|
|
2512
|
-
return e.forEach((e) => {
|
|
2513
|
-
Ma(e).forEach((e) => {
|
|
2514
|
-
let n = t[t.length - 1];
|
|
2515
|
-
n && n.x === e.x && n.y === e.y || t.push(e);
|
|
2516
|
-
});
|
|
2517
|
-
}), ja(t);
|
|
2518
|
-
}, Ra = (e, t, r) => {
|
|
2519
|
-
if (e.length < 2) throw Error(`Class diagram edge ${(t == null ? void 0 : t.id) || "<unknown>"} is missing usable path points`);
|
|
2520
|
-
let i = e[0], a = e[e.length - 1], o = sa(i.x, i.y, a.x, a.y, n(n({ id: (t == null ? void 0 : t.getAttribute("data-id")) || (t == null ? void 0 : t.id) || void 0 }, r), {}, { points: e.map((e) => [e.x - i.x, e.y - i.y]) }));
|
|
2521
|
-
return t && Ia(t, o), Fa(o);
|
|
2522
|
-
}, za = (e, t) => Ra(La(e), e[0], t), Ba = (e, t) => {
|
|
2523
|
-
let n = Ma(e);
|
|
2524
|
-
return Ra([n[0], n[n.length - 1]], e, t);
|
|
2525
|
-
}, Va = (e, t) => za([e], t), Ha = (e, t) => [
|
|
2526
|
-
`${e}-cyclic-special-1`,
|
|
2527
|
-
`${e}-cyclic-special-mid`,
|
|
2528
|
-
`${e}-cyclic-special-2`
|
|
2529
|
-
].map((e) => t.querySelector(`path[id="${e}"][data-edge="true"]`)).filter((e) => e !== null), Ua = (e) => {
|
|
2530
|
-
var t;
|
|
2531
|
-
return ((t = e.points) == null ? void 0 : t.map(([t, n]) => ({
|
|
2532
|
-
x: e.startX + t,
|
|
2533
|
-
y: e.startY + n
|
|
2534
|
-
})).filter((e) => Number.isFinite(e.x) && Number.isFinite(e.y))) || [];
|
|
2535
|
-
}, Wa = (e, t) => {
|
|
2536
|
-
let n = Ua(e);
|
|
2537
|
-
if (n.length < 2) return null;
|
|
2538
|
-
let r = t === "start", i = r ? n[0] : n[n.length - 1], a = r ? n[1] : n[n.length - 2], o = a.x === i.x ? r ? -1 : 1 : Math.sign(a.x - i.x), s = a.y === i.y ? 1 : Math.sign(a.y - i.y);
|
|
2539
|
-
return {
|
|
2540
|
-
x: i.x + o * 20,
|
|
2541
|
-
y: i.y + (s >= 0 ? 12 : -28)
|
|
2542
|
-
};
|
|
2543
|
-
}, Ga = (e, t) => {
|
|
2544
|
-
let n = e;
|
|
2545
|
-
for (; n && n !== t;) {
|
|
2546
|
-
if (n.classList.contains("annotation-group") || n.classList.contains("label-group")) return "header";
|
|
2547
|
-
if (n.classList.contains("members-group")) return "members";
|
|
2548
|
-
if (n.classList.contains("methods-group")) return "methods";
|
|
2549
|
-
n = n.parentElement;
|
|
2550
|
-
}
|
|
2551
|
-
return "other";
|
|
2552
|
-
}, Ka = (e, t, n) => {
|
|
2553
|
-
let r = [], i = [], a = [];
|
|
2554
|
-
return Object.values(e).forEach((e) => {
|
|
2555
|
-
let { domId: o, id: s } = e, c = M(), l = Ca(e.styles || e.cssStyles), u;
|
|
2556
|
-
try {
|
|
2557
|
-
u = n ? n(s) : void 0;
|
|
2558
|
-
} catch (e) {
|
|
2559
|
-
u = void 0;
|
|
2560
|
-
}
|
|
2561
|
-
let d = u && t.querySelector(`#${u}`) || t.querySelector(`#${o}`) || t.querySelector(`[data-id='${s}']`) || ((e) => {
|
|
2562
|
-
let n = RegExp(`^classId-${e}(?:-|$)`);
|
|
2563
|
-
return Array.from(t.querySelectorAll("[id]")).filter((e) => n.test(e.id))[0];
|
|
2564
|
-
})(s);
|
|
2565
|
-
if (!d) throw Error(`DOM Node with id ${o} not found`);
|
|
2566
|
-
let f = d.querySelector("rect") || d, p = f.getBBox(), { tx: m, ty: h } = ka(f, t), g = {
|
|
2567
|
-
type: "rectangle",
|
|
2568
|
-
id: s,
|
|
2569
|
-
groupId: c,
|
|
2570
|
-
x: p.x + m,
|
|
2571
|
-
y: p.y + h,
|
|
2572
|
-
width: p.width,
|
|
2573
|
-
height: p.height,
|
|
2574
|
-
metadata: { classId: s }
|
|
2575
|
-
}, _ = f.getAttribute("fill"), v = f.getAttribute("stroke"), y = f.getAttribute("stroke-width"), b = f.getAttribute("stroke-dasharray"), x = getComputedStyle(f), S = J(_ || l.fill || (_ ? x.fill : "")), C = J(v || l.stroke || (v ? x.stroke : "")), w = y || l["stroke-width"] || (y ? x.strokeWidth : ""), ee = b || l["stroke-dasharray"] || (b ? x.strokeDasharray === "none" ? "" : x.strokeDasharray : ""), te = (e) => {
|
|
2576
|
-
if (!e || !X(e)) return !1;
|
|
2577
|
-
let t = e.toLowerCase();
|
|
2578
|
-
return !(t === "none" || t === "transparent" || t === "rgba(0, 0, 0, 0)" || t === "black" || t === "#000" || t === "#000000" || t === "rgb(0, 0, 0)" || t === "rgba(0, 0, 0, 1)");
|
|
2579
|
-
};
|
|
2580
|
-
te(S) ? g.bgColor = S : g.bgColor = void 0, te(C) ? g.strokeColor = C : g.strokeColor = void 0, w ? g.strokeWidth = Number(w) : g.strokeWidth = void 0, ee && ee.trim().length > 0 ? g.strokeStyle = "dashed" : g.strokeStyle = void 0, r.push(g), [...Array.from(d.querySelectorAll("line")), ...Array.from(d.querySelectorAll("g.divider path"))].forEach((e) => {
|
|
2581
|
-
let { tx: n, ty: r } = ka(e, t), a, o, l, u;
|
|
2582
|
-
if (e.tagName.toLowerCase() === "line") a = Number(e.getAttribute("x1")) + n, o = Number(e.getAttribute("y1")) + r, l = Number(e.getAttribute("x2")) + n, u = Number(e.getAttribute("y2")) + r;
|
|
2583
|
-
else {
|
|
2584
|
-
let t = e.getBBox();
|
|
2585
|
-
a = t.x + n, l = t.x + t.width + n;
|
|
2586
|
-
let i = t.y + t.height / 2 + r;
|
|
2587
|
-
o = i, u = i;
|
|
2588
|
-
}
|
|
2589
|
-
if (a === l && o === u) return;
|
|
2590
|
-
let d = ua(e, a, o, l, u, {
|
|
2591
|
-
groupId: c,
|
|
2592
|
-
id: M()
|
|
2593
|
-
});
|
|
2594
|
-
g.strokeColor ? d.strokeColor = g.strokeColor : d.strokeColor = void 0, g.strokeWidth === void 0 ? d.strokeWidth = void 0 : d.strokeWidth = g.strokeWidth, g.strokeStyle ? d.strokeStyle = g.strokeStyle : d.strokeStyle = void 0, d.metadata = { classId: s }, i.push(d);
|
|
2595
|
-
});
|
|
2596
|
-
let T = Array.from(d.querySelectorAll("text, foreignObject")), E = [];
|
|
2597
|
-
T.forEach((e) => {
|
|
2598
|
-
var n;
|
|
2599
|
-
let r = e.tagName.toLowerCase() === "foreignobject", i = r ? [] : Array.from(e.querySelectorAll("tspan")), a = i.length ? i.map((e) => {
|
|
2600
|
-
var t;
|
|
2601
|
-
return (t = e.textContent) == null ? void 0 : t.trim();
|
|
2602
|
-
}).filter(Boolean).join("\n") : ((n = e.textContent) == null ? void 0 : n.trim()) || "";
|
|
2603
|
-
if (!a) return;
|
|
2604
|
-
let o = e.getBBox(), { ty: s } = ka(e, t), c = parseFloat(getComputedStyle(e).fontSize || "");
|
|
2605
|
-
if (r && (!Number.isFinite(c) || !c)) {
|
|
2606
|
-
let t = e.querySelector("div, span, p");
|
|
2607
|
-
t && (c = parseFloat(getComputedStyle(t).fontSize || ""));
|
|
2608
|
-
}
|
|
2609
|
-
(!Number.isFinite(c) || c <= 0) && (c = Math.max(12, o.height * .6)), c *= .9;
|
|
2610
|
-
let u = qi(e, l.color);
|
|
2611
|
-
E.push({
|
|
2612
|
-
section: Ga(e, d),
|
|
2613
|
-
text: R(a),
|
|
2614
|
-
x: o.x,
|
|
2615
|
-
y: o.y + s,
|
|
2616
|
-
width: g && g.width ? Math.max(g.width - 8, o.width) : o.width,
|
|
2617
|
-
height: o.height,
|
|
2618
|
-
fontSize: c,
|
|
2619
|
-
color: u
|
|
2620
|
-
});
|
|
2621
|
-
});
|
|
2622
|
-
let ne = E.filter((e) => e.section === "header").sort((e, t) => e.y - t.y || e.x - t.x);
|
|
2623
|
-
if (!g.label) {
|
|
2624
|
-
let e = ne.length === 0 && E.length === 1 ? E : ne;
|
|
2625
|
-
if (e.length > 0) {
|
|
2626
|
-
var re;
|
|
2627
|
-
g.label = {
|
|
2628
|
-
text: e.map((e) => e.text).join("\n"),
|
|
2629
|
-
fontSize: Math.max(...e.map((e) => e.fontSize)),
|
|
2630
|
-
color: (re = e.find((e) => e.color)) == null ? void 0 : re.color,
|
|
2631
|
-
verticalAlign: "top"
|
|
2632
|
-
};
|
|
2633
|
-
}
|
|
2634
|
-
}
|
|
2635
|
-
E.filter((e) => ne.length > 0 ? e.section !== "header" : !(g.label && E.length === 1)).forEach((e) => {
|
|
2636
|
-
let t = ca(((g == null ? void 0 : g.x) || 0) + 4, e.y, e.text, {
|
|
2637
|
-
width: e.width,
|
|
2638
|
-
height: e.height,
|
|
2639
|
-
fontSize: e.fontSize,
|
|
2640
|
-
color: e.color,
|
|
2641
|
-
id: M(),
|
|
2642
|
-
groupId: c,
|
|
2643
|
-
metadata: { classId: s }
|
|
2644
|
-
});
|
|
2645
|
-
a.push(t);
|
|
2646
|
-
});
|
|
2647
|
-
}), {
|
|
2648
|
-
nodes: r,
|
|
2649
|
-
lines: i,
|
|
2650
|
-
text: a
|
|
2651
|
-
};
|
|
2652
|
-
}, qa = (e, t, n, r) => {
|
|
2653
|
-
let i = Array.from(n.querySelectorAll(".edgePaths path[data-edge=\"true\"]:not([id^=\"edgeNote\"]):not([id*=\"-cyclic-special-\"])"));
|
|
2654
|
-
if (e.length === 0) return {
|
|
2655
|
-
arrows: [],
|
|
2656
|
-
text: []
|
|
2657
|
-
};
|
|
2658
|
-
let a = [], o = [], s = 0;
|
|
2659
|
-
return e.forEach((e) => {
|
|
2660
|
-
let { id1: c, id2: l, relation: u } = e, d = t.find((e) => e.id === c), f = t.find((e) => e.id === l);
|
|
2661
|
-
if (!d) throw Error(`parseRelations: Cannot find node with id ${c}`);
|
|
2662
|
-
if (!f) throw Error(`parseRelations: Cannot find node with id ${l}`);
|
|
2663
|
-
let p = Da(u.lineType), m = Oa(u.type1), h = Oa(u.type2), g;
|
|
2664
|
-
if (c === l) {
|
|
2665
|
-
let t = Ha(c, n);
|
|
2666
|
-
if (!t.length) throw Error(`parseRelations: Cannot find rendered SVG edge for relation ${c} -> ${l}`);
|
|
2667
|
-
g = za(t, {
|
|
2668
|
-
strokeStyle: p,
|
|
2669
|
-
startArrowhead: m,
|
|
2670
|
-
endArrowhead: h,
|
|
2671
|
-
label: e.title ? { text: e.title } : void 0,
|
|
2672
|
-
start: {
|
|
2673
|
-
type: "rectangle",
|
|
2674
|
-
id: d.id
|
|
2675
|
-
},
|
|
2676
|
-
end: {
|
|
2677
|
-
type: "rectangle",
|
|
2678
|
-
id: f.id
|
|
2679
|
-
}
|
|
2680
|
-
});
|
|
2681
|
-
} else {
|
|
2682
|
-
let t = i[s];
|
|
2683
|
-
if (!t) throw Error(`parseRelations: Cannot find rendered SVG edge for relation ${c} -> ${l}`);
|
|
2684
|
-
s += 1, g = Ba(t, {
|
|
2685
|
-
strokeStyle: p,
|
|
2686
|
-
startArrowhead: m,
|
|
2687
|
-
endArrowhead: h,
|
|
2688
|
-
label: e.title ? { text: e.title } : void 0,
|
|
2689
|
-
start: {
|
|
2690
|
-
type: "rectangle",
|
|
2691
|
-
id: d.id
|
|
2692
|
-
},
|
|
2693
|
-
end: {
|
|
2694
|
-
type: "rectangle",
|
|
2695
|
-
id: f.id
|
|
2696
|
-
}
|
|
2697
|
-
});
|
|
2698
|
-
}
|
|
2699
|
-
a.push(g);
|
|
2700
|
-
let { relationTitle1: _, relationTitle2: v } = e, y = c === l, b, x;
|
|
2701
|
-
if (_ && _ !== "none") {
|
|
2702
|
-
if (y) {
|
|
2703
|
-
let e = Wa(g, "start");
|
|
2704
|
-
e && (b = e.x, x = e.y);
|
|
2705
|
-
} else switch (r) {
|
|
2706
|
-
case "TB":
|
|
2707
|
-
b = g.startX - 20, g.endX < g.startX && (b -= 15), x = g.startY + 15;
|
|
2708
|
-
break;
|
|
2709
|
-
case "BT":
|
|
2710
|
-
b = g.startX + 20, g.endX > g.startX && (b += 15), x = g.startY - 15;
|
|
2711
|
-
break;
|
|
2712
|
-
case "LR":
|
|
2713
|
-
b = g.startX + 20, x = g.startY + 15, g.endY > g.startY && (x += 15);
|
|
2714
|
-
break;
|
|
2715
|
-
case "RL":
|
|
2716
|
-
b = g.startX - 20, x = g.startY - 15, g.startY > g.endY && (x -= 15);
|
|
2717
|
-
break;
|
|
2718
|
-
default: b = g.startX - 20, x = g.startY + 15;
|
|
2719
|
-
}
|
|
2720
|
-
b != null || (b = g.startX - 20), x != null || (x = g.startY + 15);
|
|
2721
|
-
let e = ca(b, x, _, { fontSize: 16 });
|
|
2722
|
-
o.push(e);
|
|
2723
|
-
}
|
|
2724
|
-
if (v && v !== "none") {
|
|
2725
|
-
if (y) {
|
|
2726
|
-
let e = Wa(g, "end");
|
|
2727
|
-
e && (b = e.x, x = e.y);
|
|
2728
|
-
} else switch (r) {
|
|
2729
|
-
case "TB":
|
|
2730
|
-
b = g.endX + 20, g.endX < g.startX && (b += 15), x = g.endY - 15;
|
|
2731
|
-
break;
|
|
2732
|
-
case "BT":
|
|
2733
|
-
b = g.endX - 20, g.endX > g.startX && (b -= 15), x = g.endY + 15;
|
|
2734
|
-
break;
|
|
2735
|
-
case "LR":
|
|
2736
|
-
b = g.endX - 20, x = g.endY - 15, g.endY > g.startY && (x -= 15);
|
|
2737
|
-
break;
|
|
2738
|
-
case "RL":
|
|
2739
|
-
b = g.endX + 20, x = g.endY + 15, g.startY > g.endY && (x += 15);
|
|
2740
|
-
break;
|
|
2741
|
-
default: b = g.endX + 20, x = g.endY - 15;
|
|
2742
|
-
}
|
|
2743
|
-
b != null || (b = g.endX + 20), x != null || (x = g.endY + 15);
|
|
2744
|
-
let e = ca(b, x, v, { fontSize: 16 });
|
|
2745
|
-
o.push(e);
|
|
2746
|
-
}
|
|
2747
|
-
}), {
|
|
2748
|
-
arrows: a,
|
|
2749
|
-
text: o
|
|
2750
|
-
};
|
|
2751
|
-
}, Ja = (e, t, n) => {
|
|
2752
|
-
let r = [], i = [];
|
|
2753
|
-
return e.forEach((e, a) => {
|
|
2754
|
-
let { id: o, text: s, class: c } = e, l = t.querySelector(`#${o}`);
|
|
2755
|
-
if (!l) throw Error(`Node with id ${o} not found!`);
|
|
2756
|
-
let { transformX: u, transformY: d } = z(l), f = l.firstChild, p = Z(f, "rectangle", {
|
|
2757
|
-
id: o,
|
|
2758
|
-
subtype: "note",
|
|
2759
|
-
label: { text: s }
|
|
2760
|
-
});
|
|
2761
|
-
if (Object.assign(p, {
|
|
2762
|
-
x: p.x + u,
|
|
2763
|
-
y: p.y + d
|
|
2764
|
-
}), r.push(p), c) {
|
|
2765
|
-
let e = n.find((e) => e.id === c);
|
|
2766
|
-
if (!e) throw Error(`class node with id ${c} not found!`);
|
|
2767
|
-
let r = t.querySelector(`path[id="edgeNote${a + 1}"][data-edge="true"]`);
|
|
2768
|
-
if (r) {
|
|
2769
|
-
i.push(Va(r, {
|
|
2770
|
-
strokeStyle: "dotted",
|
|
2771
|
-
startArrowhead: null,
|
|
2772
|
-
endArrowhead: null,
|
|
2773
|
-
start: {
|
|
2774
|
-
id: p.id,
|
|
2775
|
-
type: "rectangle"
|
|
2776
|
-
},
|
|
2777
|
-
end: {
|
|
2778
|
-
id: e.id,
|
|
2779
|
-
type: "rectangle"
|
|
2780
|
-
}
|
|
2781
|
-
}));
|
|
2782
|
-
return;
|
|
2783
|
-
}
|
|
2784
|
-
let o = p.x + (p.width || 0) / 2, s = p.y + (p.height || 0), l = o, u = e.y, d = sa(o, s, l, u, {
|
|
2785
|
-
strokeStyle: "dotted",
|
|
2786
|
-
startArrowhead: null,
|
|
2787
|
-
endArrowhead: null,
|
|
2788
|
-
start: {
|
|
2789
|
-
id: p.id,
|
|
2790
|
-
type: "rectangle"
|
|
2791
|
-
},
|
|
2792
|
-
end: {
|
|
2793
|
-
id: e.id,
|
|
2794
|
-
type: "rectangle"
|
|
2795
|
-
}
|
|
2796
|
-
});
|
|
2797
|
-
i.push(d);
|
|
2798
|
-
}
|
|
2799
|
-
}), {
|
|
2800
|
-
notes: r,
|
|
2801
|
-
connectors: i
|
|
2802
|
-
};
|
|
2803
|
-
}, Ya = (e, t) => {
|
|
2804
|
-
var n, r, i, a, o;
|
|
2805
|
-
let s = e.db, c = ((n = s.getDirection) == null ? void 0 : n.call(s)) || "TB", l = [], u = [], d = [], f = [], p = ((r = s.getNamespaces) == null ? void 0 : r.call(s)) || [], m = ((i = s.getClasses) == null ? void 0 : i.call(s)) || {}, h = m instanceof Map ? Object.fromEntries(m) : m;
|
|
2806
|
-
if (h && Object.keys(h).length) {
|
|
2807
|
-
let e = Ka(h, t, typeof s.lookUpDomId == "function" ? s.lookUpDomId.bind(s) : void 0);
|
|
2808
|
-
l.push(e.nodes), u.push(...e.lines), d.push(...e.text), f.push(...e.nodes);
|
|
2809
|
-
}
|
|
2810
|
-
let { arrows: g, text: _ } = qa(((a = s.getRelations) == null ? void 0 : a.call(s)) || [], f, t, c), { notes: v, connectors: y } = Ja(((o = s.getNotes) == null ? void 0 : o.call(s)) || [], t, f);
|
|
2811
|
-
return l.push(v), g.push(...y), d.push(..._), {
|
|
2812
|
-
type: "class",
|
|
2813
|
-
nodes: l,
|
|
2814
|
-
lines: u,
|
|
2815
|
-
arrows: g,
|
|
2816
|
-
text: d,
|
|
2817
|
-
namespaces: p
|
|
2818
|
-
};
|
|
2819
|
-
}, Xa = 18, Za = (e) => {
|
|
2820
|
-
let t = {};
|
|
2821
|
-
return e && e.forEach((e) => {
|
|
2822
|
-
Y(e).forEach(({ property: e, value: n }) => {
|
|
2823
|
-
e && n && (t[e] = J(n));
|
|
2824
|
-
});
|
|
2825
|
-
}), t;
|
|
2826
|
-
}, Qa = (e) => {
|
|
2827
|
-
if (e == null || e === "") return;
|
|
2828
|
-
let t = typeof e == "number" ? e : parseFloat(J(e));
|
|
2829
|
-
if (!(!Number.isFinite(t) || t <= 0)) return t;
|
|
2830
|
-
}, $a = (e, t) => {
|
|
2831
|
-
let n = 0, r = 0, i = e;
|
|
2832
|
-
for (; i && i !== t;) {
|
|
2833
|
-
let { transformX: e, transformY: t } = z(i);
|
|
2834
|
-
n += e, r += t, i = i.parentElement;
|
|
2835
|
-
}
|
|
2836
|
-
return {
|
|
2837
|
-
tx: n,
|
|
2838
|
-
ty: r
|
|
2839
|
-
};
|
|
2840
|
-
}, eo = (e) => {
|
|
2841
|
-
var t;
|
|
2842
|
-
let n = Array.from(e.querySelectorAll("tspan"));
|
|
2843
|
-
return R(n.length ? n.map((e) => {
|
|
2844
|
-
var t;
|
|
2845
|
-
return (t = e.textContent) == null ? void 0 : t.trim();
|
|
2846
|
-
}).filter(Boolean).join("\n") : ((t = e.textContent) == null ? void 0 : t.trim()) || "");
|
|
2847
|
-
}, to = (e) => {
|
|
2848
|
-
let t = e.querySelector("text, foreignObject, div, span, p") || e, n = parseFloat(getComputedStyle(t).fontSize || "");
|
|
2849
|
-
return (!Number.isFinite(n) || n <= 0) && (n = Math.max(12, e.getBBox().height * .75)), n;
|
|
2850
|
-
}, no = (e, t, n) => {
|
|
2851
|
-
let r = eo(e);
|
|
2852
|
-
if (!r) return null;
|
|
2853
|
-
let i = e.getBBox(), { tx: a, ty: o } = $a(e, t);
|
|
2854
|
-
return {
|
|
2855
|
-
className: e.getAttribute("class") || "",
|
|
2856
|
-
text: r,
|
|
2857
|
-
x: i.x + a,
|
|
2858
|
-
y: i.y + o,
|
|
2859
|
-
width: i.width,
|
|
2860
|
-
height: i.height,
|
|
2861
|
-
fontSize: to(e),
|
|
2862
|
-
color: qi(e, n)
|
|
2863
|
-
};
|
|
2864
|
-
}, ro = (e, t, n, r, i, a, o) => {
|
|
2865
|
-
let { tx: s, ty: c } = $a(e, t), l = 0, u = 0, d = 0, f = 0;
|
|
2866
|
-
if (e.tagName.toLowerCase() === "line") l = Number(e.getAttribute("x1")) + s, u = Number(e.getAttribute("y1")) + c, d = Number(e.getAttribute("x2")) + s, f = Number(e.getAttribute("y2")) + c;
|
|
2867
|
-
else {
|
|
2868
|
-
let t = kt(e);
|
|
2869
|
-
if (!t) return null;
|
|
2870
|
-
l = t.startX + s, u = t.startY + c, d = t.endX + s, f = t.endY + c;
|
|
2871
|
-
}
|
|
2872
|
-
let p = {
|
|
2873
|
-
type: "line",
|
|
2874
|
-
id: M(),
|
|
2875
|
-
groupId: n,
|
|
2876
|
-
startX: l,
|
|
2877
|
-
startY: u,
|
|
2878
|
-
endX: d,
|
|
2879
|
-
endY: f,
|
|
2880
|
-
metadata: { entityId: r }
|
|
2881
|
-
};
|
|
2882
|
-
return i && X(i) && i !== "none" && (p.strokeColor = i), a !== void 0 && (p.strokeWidth = a), o && (p.strokeStyle = o), p;
|
|
2883
|
-
}, io = (e) => {
|
|
2884
|
-
switch (e == null ? void 0 : e.toLowerCase()) {
|
|
2885
|
-
case "one": return "cardinality_one";
|
|
2886
|
-
case "many": return "cardinality_many";
|
|
2887
|
-
case "only_one": return "cardinality_exactly_one";
|
|
2888
|
-
case "one_or_more": return "cardinality_one_or_many";
|
|
2889
|
-
case "zero_or_one": return "cardinality_zero_or_one";
|
|
2890
|
-
case "zero_or_more": return "cardinality_zero_or_many";
|
|
2891
|
-
default: return null;
|
|
2892
|
-
}
|
|
2893
|
-
}, ao = (e) => {
|
|
2894
|
-
switch (e) {
|
|
2895
|
-
case "dotted": return "dotted";
|
|
2896
|
-
case "dashed": return "dashed";
|
|
2897
|
-
default: return "solid";
|
|
2898
|
-
}
|
|
2899
|
-
}, oo = (e, t) => {
|
|
2900
|
-
let n = t.querySelector(`path[id="${e.id}"][data-edge="true"]`);
|
|
2901
|
-
return n ? [n] : e.start === e.end ? [
|
|
2902
|
-
`${e.start}-cyclic-special-1`,
|
|
2903
|
-
`${e.start}-cyclic-special-mid`,
|
|
2904
|
-
`${e.start}-cyclic-special-2`
|
|
2905
|
-
].map((e) => t.querySelector(`path[id="${e}"][data-edge="true"]`)).filter((e) => e !== null) : [];
|
|
2906
|
-
}, so = (e) => {
|
|
2907
|
-
let t = [];
|
|
2908
|
-
return e.forEach((e) => {
|
|
2909
|
-
At(e).forEach((e) => {
|
|
2910
|
-
let n = t[t.length - 1];
|
|
2911
|
-
n && n.x === e.x && n.y === e.y || t.push(e);
|
|
2912
|
-
});
|
|
2913
|
-
}), t;
|
|
2914
|
-
}, co = (e, t) => {
|
|
2915
|
-
let n = t.querySelector(`[id="${e.id}"]`);
|
|
2916
|
-
if (!n) throw Error(`ER entity ${e.id} not found in rendered SVG`);
|
|
2917
|
-
let r = e.attributes.length ? M() : void 0, i = n.getBBox(), { tx: a, ty: o } = $a(n, t), s = Za([...e.cssStyles || [], ...e.cssCompiledStyles || []]), c = J(s.fill || ""), l = J(s.stroke || ""), u = Qa(s["stroke-width"]), d = J(s["stroke-dasharray"] || ""), f = Array.from(n.querySelectorAll("g.label")).map((e) => no(e, t, s.color)).filter((e) => e !== null), p = f.find((e) => e.className.includes("name")) || f[0], m = f.filter((e) => e !== p), h = (p == null ? void 0 : p.text) || R(e.alias || e.label || ""), g = {
|
|
2918
|
-
type: "rectangle",
|
|
2919
|
-
id: e.id,
|
|
2920
|
-
groupId: r,
|
|
2921
|
-
x: i.x + a,
|
|
2922
|
-
y: i.y + o,
|
|
2923
|
-
width: i.width,
|
|
2924
|
-
height: i.height,
|
|
2925
|
-
label: {
|
|
2926
|
-
text: h,
|
|
2927
|
-
fontSize: e.attributes.length ? Xa : (p == null ? void 0 : p.fontSize) || 16,
|
|
2928
|
-
color: p == null ? void 0 : p.color,
|
|
2929
|
-
textAlign: "center",
|
|
2930
|
-
verticalAlign: e.attributes.length ? "top" : "middle"
|
|
2931
|
-
},
|
|
2932
|
-
metadata: {
|
|
2933
|
-
entityId: e.id,
|
|
2934
|
-
entityLabel: e.label,
|
|
2935
|
-
entityAlias: e.alias
|
|
2936
|
-
}
|
|
2937
|
-
};
|
|
2938
|
-
return X(c) && c !== "none" && (g.bgColor = c), X(l) && l !== "none" && (g.strokeColor = l), u && Number.isFinite(u) && u > 0 && (g.strokeWidth = u), d && d !== "none" && (g.strokeStyle = "dashed"), {
|
|
2939
|
-
container: g,
|
|
2940
|
-
lines: Array.from(n.querySelectorAll(".divider path, path.divider, line.divider")).map((n) => ro(n, t, r, e.id, g.strokeColor, g.strokeWidth, g.strokeStyle)).filter((e) => e !== null),
|
|
2941
|
-
text: m.map((t) => ca(t.x, t.y, t.text, {
|
|
2942
|
-
id: M(),
|
|
2943
|
-
groupId: r,
|
|
2944
|
-
width: t.width,
|
|
2945
|
-
height: t.height,
|
|
2946
|
-
fontSize: Xa,
|
|
2947
|
-
color: t.color,
|
|
2948
|
-
metadata: { entityId: e.id }
|
|
2949
|
-
}))
|
|
2950
|
-
};
|
|
2951
|
-
}, lo = (e, t) => {
|
|
2952
|
-
let n = oo(e, t);
|
|
2953
|
-
if (!n.length) throw Error(`ER relationship ${e.id} not found in rendered SVG`);
|
|
2954
|
-
let r = so(n);
|
|
2955
|
-
if (r.length < 2) throw Error(`ER relationship ${e.id} is missing usable path points`);
|
|
2956
|
-
let i = r[0], a = r[r.length - 1], o = n[0], s = J(o.getAttribute("stroke") || getComputedStyle(o).stroke || ""), c = Number(o.getAttribute("stroke-width") || getComputedStyle(o).strokeWidth || 1), l = sa(i.x, i.y, a.x, a.y, {
|
|
2957
|
-
id: e.id,
|
|
2958
|
-
label: e.label ? {
|
|
2959
|
-
text: R(e.label),
|
|
2960
|
-
fontSize: 16,
|
|
2961
|
-
textAlign: "center"
|
|
2962
|
-
} : void 0,
|
|
2963
|
-
strokeStyle: ao(e.pattern),
|
|
2964
|
-
startArrowhead: io(e.arrowTypeStart),
|
|
2965
|
-
endArrowhead: io(e.arrowTypeEnd),
|
|
2966
|
-
start: {
|
|
2967
|
-
type: "rectangle",
|
|
2968
|
-
id: e.start
|
|
2969
|
-
},
|
|
2970
|
-
end: {
|
|
2971
|
-
type: "rectangle",
|
|
2972
|
-
id: e.end
|
|
2973
|
-
},
|
|
2974
|
-
points: r.map((e) => [e.x - i.x, e.y - i.y])
|
|
2975
|
-
});
|
|
2976
|
-
return X(s) && s !== "none" && (l.strokeColor = s), Number.isFinite(c) && c > 0 && (l.strokeWidth = c), l;
|
|
2977
|
-
}, uo = (e, t) => {
|
|
2978
|
-
let n = e.getData(), r = n.nodes, i = n.edges, a = [], o = [], s = [];
|
|
2979
|
-
r.forEach((e) => {
|
|
2980
|
-
let n = co(e, t);
|
|
2981
|
-
a.push(n.container), o.push(...n.lines), s.push(...n.text);
|
|
2982
|
-
});
|
|
2983
|
-
let c = i.map((e) => lo(e, t));
|
|
2984
|
-
return {
|
|
2985
|
-
type: "erd",
|
|
2986
|
-
nodes: [a],
|
|
2987
|
-
lines: o,
|
|
2988
|
-
arrows: c,
|
|
2989
|
-
text: s
|
|
2990
|
-
};
|
|
2991
|
-
};
|
|
2992
|
-
//#endregion
|
|
2993
|
-
//#region node_modules/.pnpm/@excalidraw+mermaid-to-excalidraw@2.2.2/node_modules/@excalidraw/mermaid-to-excalidraw/dist/parser/state.js
|
|
2994
|
-
t();
|
|
2995
|
-
var $ = (e) => {
|
|
2996
|
-
let t = J(e || "");
|
|
2997
|
-
return !t || t === "none" || t === "transparent" || t === "rgba(0, 0, 0, 0)" || t === "rgba(0,0,0,0)" ? !1 : X(t);
|
|
2998
|
-
}, fo = (e, t, n) => {
|
|
2999
|
-
switch (t) {
|
|
3000
|
-
case j.FILL:
|
|
3001
|
-
case j.STROKE:
|
|
3002
|
-
$(n) && (e[t] = J(n));
|
|
3003
|
-
break;
|
|
3004
|
-
case j.STROKE_WIDTH:
|
|
3005
|
-
case j.STROKE_DASHARRAY:
|
|
3006
|
-
J(n) && (e[t] = J(n));
|
|
3007
|
-
break;
|
|
3008
|
-
}
|
|
3009
|
-
}, po = (e, t, n) => {
|
|
3010
|
-
t === A.COLOR && $(n) && (e[A.COLOR] = J(n));
|
|
3011
|
-
}, mo = (e, t, n) => {
|
|
3012
|
-
e && Y(e).forEach(({ property: e, value: r }) => {
|
|
3013
|
-
fo(t, e, r), po(n, e, r);
|
|
3014
|
-
});
|
|
3015
|
-
}, ho = (e, t) => {
|
|
3016
|
-
e && Y(e).forEach(({ property: e, value: n }) => {
|
|
3017
|
-
if (e === j.FILL && $(n)) {
|
|
3018
|
-
t[A.COLOR] = J(n);
|
|
3019
|
-
return;
|
|
3020
|
-
}
|
|
3021
|
-
po(t, e, n);
|
|
3022
|
-
});
|
|
3023
|
-
}, go = (e) => {
|
|
3024
|
-
let t = /* @__PURE__ */ new Set();
|
|
3025
|
-
return e.filter(Boolean).forEach((e) => {
|
|
3026
|
-
Y(e || "").forEach(({ property: e }) => {
|
|
3027
|
-
t.add(e);
|
|
3028
|
-
});
|
|
3029
|
-
}), t;
|
|
3030
|
-
}, _o = (e, t, n) => {
|
|
3031
|
-
e && [
|
|
3032
|
-
[j.FILL, e.getAttribute("fill")],
|
|
3033
|
-
[j.STROKE, e.getAttribute("stroke")],
|
|
3034
|
-
[j.STROKE_WIDTH, e.getAttribute("stroke-width")],
|
|
3035
|
-
[j.STROKE_DASHARRAY, e.getAttribute("stroke-dasharray")]
|
|
3036
|
-
].forEach(([e, r]) => {
|
|
3037
|
-
if (!n.has(e) || t[e]) return;
|
|
3038
|
-
let i = J(r || "");
|
|
3039
|
-
i && fo(t, e, i);
|
|
3040
|
-
});
|
|
3041
|
-
}, vo = (e, t, n) => {
|
|
3042
|
-
if (!e) return;
|
|
3043
|
-
let r = [e, ...Array.from(e.querySelectorAll("text, foreignObject, div, span, p"))];
|
|
3044
|
-
for (let e of r) {
|
|
3045
|
-
if (t[A.COLOR] || (n.has(A.COLOR) || n.has(j.FILL)) && (ho(e.getAttribute("style"), t), t[A.COLOR])) break;
|
|
3046
|
-
let r = J(e.getAttribute("fill") || e.getAttribute("color") || "");
|
|
3047
|
-
(n.has(A.COLOR) || n.has(j.FILL)) && $(r) && (t[A.COLOR] = r);
|
|
3048
|
-
}
|
|
3049
|
-
}, yo = (e, t) => {
|
|
3050
|
-
let n = 0, r = 0, i = e;
|
|
3051
|
-
for (; i && i !== t;) {
|
|
3052
|
-
let { transformX: e, transformY: t } = z(i);
|
|
3053
|
-
n += e, r += t, i = i.parentElement;
|
|
3054
|
-
}
|
|
3055
|
-
return {
|
|
3056
|
-
tx: n,
|
|
3057
|
-
ty: r
|
|
3058
|
-
};
|
|
3059
|
-
}, bo = (e, t) => {
|
|
3060
|
-
let n = e.getBBox(), { tx: r, ty: i } = yo(e, t);
|
|
3061
|
-
return {
|
|
3062
|
-
x: n.x + r,
|
|
3063
|
-
y: n.y + i,
|
|
3064
|
-
width: n.width,
|
|
3065
|
-
height: n.height
|
|
3066
|
-
};
|
|
3067
|
-
}, xo = (e, t) => {
|
|
3068
|
-
let n = e.querySelector("line.divider");
|
|
3069
|
-
if (!n) return;
|
|
3070
|
-
let { tx: r, ty: i } = yo(n, t);
|
|
3071
|
-
return {
|
|
3072
|
-
startX: Number(n.getAttribute("x1")) + r,
|
|
3073
|
-
startY: Number(n.getAttribute("y1")) + i,
|
|
3074
|
-
endX: Number(n.getAttribute("x2")) + r,
|
|
3075
|
-
endY: Number(n.getAttribute("y2")) + i
|
|
3076
|
-
};
|
|
3077
|
-
}, So = (e) => {
|
|
3078
|
-
let t = e.getBBox();
|
|
3079
|
-
return Math.abs(t.width * t.height);
|
|
3080
|
-
}, Co = (e, t) => {
|
|
3081
|
-
let n = e.getAttribute("style");
|
|
3082
|
-
if (!n) return;
|
|
3083
|
-
let r = Y(n).find((e) => e.property === t);
|
|
3084
|
-
if (r) return J(r.value);
|
|
3085
|
-
}, wo = (e, t) => {
|
|
3086
|
-
let n = e.map((e) => ({
|
|
3087
|
-
element: e,
|
|
3088
|
-
area: So(e)
|
|
3089
|
-
})).filter(({ area: e }) => Number.isFinite(e) && e > 0);
|
|
3090
|
-
return n.length === 0 ? null : n.sort((e, n) => t === "largest" ? n.area - e.area : e.area - n.area)[0].element;
|
|
3091
|
-
}, To = (e, t) => {
|
|
3092
|
-
if (!e || !t.has(j.FILL) && !t.has(j.STROKE)) return;
|
|
3093
|
-
let n = J(e.getAttribute("fill") || Co(e, j.FILL) || ""), r = J(e.getAttribute("stroke") || Co(e, j.STROKE) || "");
|
|
3094
|
-
if ($(n)) return n;
|
|
3095
|
-
if ($(r)) return r;
|
|
3096
|
-
}, Eo = (e, t) => To(wo(Array.from(e.querySelectorAll("circle, ellipse, path")), "smallest"), t), Do = (e) => {
|
|
3097
|
-
if (e.length < 2) return e;
|
|
3098
|
-
let t = e.slice(1), n = t.filter((e) => e.trim().length > 0).reduce((e, t) => {
|
|
3099
|
-
var n, r;
|
|
3100
|
-
let i = (n = (r = t.match(/^\s*/)) == null ? void 0 : r[0].length) == null ? 0 : n;
|
|
3101
|
-
return Math.min(e, i);
|
|
3102
|
-
}, Infinity);
|
|
3103
|
-
return !Number.isFinite(n) || n <= 0 ? e.map((e) => e.trimEnd()) : [e[0].trimEnd(), ...t.map((e) => e.replace(RegExp(`^\\s{0,${n}}`), "").trimEnd())];
|
|
3104
|
-
}, Oo = (e) => Do(Array.isArray(e.label) ? e.label.map((e) => R(e)) : R(e.label || "").split("\n")).join("\n"), ko = (e) => e.description ? (Array.isArray(e.description) ? e.description : [e.description]).map((e) => R(e)).filter((e) => e.length > 0) : [], Ao = (e) => {
|
|
3105
|
-
let t = /* @__PURE__ */ new Set(), n = (e) => (e && t.add(e), e), r = (e) => n(e.find((e) => !t.has(e)) || null);
|
|
3106
|
-
return (t) => {
|
|
3107
|
-
let i = [
|
|
3108
|
-
`[id='${t.domId}']`,
|
|
3109
|
-
`[id='${t.id}']`,
|
|
3110
|
-
`[data-id='${t.id}']`
|
|
3111
|
-
];
|
|
3112
|
-
for (let t of i) {
|
|
3113
|
-
let r = e.querySelector(t);
|
|
3114
|
-
if (r) return n(r);
|
|
3115
|
-
}
|
|
3116
|
-
switch (t.shape) {
|
|
3117
|
-
case "divider": return r(Array.from(e.querySelectorAll("g.statediagram-cluster-alt")));
|
|
3118
|
-
case "stateStart": return r(Array.from(e.querySelectorAll("g.node.default")).filter((e) => e.querySelector("circle.state-start")));
|
|
3119
|
-
case "stateEnd": return r(Array.from(e.querySelectorAll("g.node.default")).filter((e) => !e.querySelector("circle.state-start")));
|
|
3120
|
-
default: return null;
|
|
3121
|
-
}
|
|
3122
|
-
};
|
|
3123
|
-
}, jo = (e, t) => {
|
|
3124
|
-
switch (t) {
|
|
3125
|
-
case "roundedWithTitle": return e.querySelector("rect.outer") || e.querySelector("rect") || e;
|
|
3126
|
-
case "divider": return e.querySelector("rect.divider") || e.querySelector("rect") || e;
|
|
3127
|
-
case "rectWithTitle": return e.querySelector("rect.outer") || e.querySelector("rect") || e;
|
|
3128
|
-
case "stateStart": return wo(Array.from(e.querySelectorAll("circle, ellipse, path")), "largest") || e;
|
|
3129
|
-
case "stateEnd": return wo(Array.from(e.querySelectorAll("circle, ellipse, path")), "largest") || e;
|
|
3130
|
-
default: return e.querySelector("rect, path, circle, ellipse, polygon") || e;
|
|
3131
|
-
}
|
|
3132
|
-
}, Mo = (e, t, n) => {
|
|
3133
|
-
let r = n(e);
|
|
3134
|
-
if (!r) throw Error(`State node element not found for "${e.id}"`);
|
|
3135
|
-
let i = jo(r, e.shape), a = {}, o = {}, s = [
|
|
3136
|
-
e.labelStyle,
|
|
3137
|
-
...e.cssCompiledStyles || [],
|
|
3138
|
-
...e.cssStyles || []
|
|
3139
|
-
], c = go(s);
|
|
3140
|
-
s.filter(Boolean).forEach((e) => {
|
|
3141
|
-
mo(e, a, o);
|
|
3142
|
-
}), _o(i, a, c), vo(r, o, c);
|
|
3143
|
-
let l = bo(i, t);
|
|
3144
|
-
return {
|
|
3145
|
-
id: e.id,
|
|
3146
|
-
shape: e.shape,
|
|
3147
|
-
text: Oo(e),
|
|
3148
|
-
description: ko(e),
|
|
3149
|
-
x: l.x,
|
|
3150
|
-
y: l.y,
|
|
3151
|
-
width: l.width,
|
|
3152
|
-
height: l.height,
|
|
3153
|
-
parentId: e.parentId,
|
|
3154
|
-
position: e.position,
|
|
3155
|
-
containerStyle: a,
|
|
3156
|
-
labelStyle: o,
|
|
3157
|
-
dividerLine: e.shape === "rectWithTitle" ? xo(r, t) : void 0,
|
|
3158
|
-
endInnerColor: e.shape === "stateEnd" ? Eo(r, c) : void 0,
|
|
3159
|
-
isRenderable: e.shape !== "noteGroup"
|
|
3160
|
-
};
|
|
3161
|
-
}, No = (e, t) => {
|
|
3162
|
-
var r;
|
|
3163
|
-
let i = t.querySelector(`[id='${e.id}']`);
|
|
3164
|
-
if (!i) return null;
|
|
3165
|
-
let { tx: a, ty: o } = yo(i, t), s = jt(i, {
|
|
3166
|
-
x: a,
|
|
3167
|
-
y: o
|
|
3168
|
-
}, "MCL");
|
|
3169
|
-
if (s.reflectionPoints.length < 2) return null;
|
|
3170
|
-
let c = {}, l = (e, t) => {
|
|
3171
|
-
switch (e) {
|
|
3172
|
-
case j.STROKE:
|
|
3173
|
-
$(t) && (c.strokeColor = J(t));
|
|
3174
|
-
break;
|
|
3175
|
-
case j.STROKE_WIDTH: {
|
|
3176
|
-
let e = parseFloat(J(t));
|
|
3177
|
-
Number.isFinite(e) && e > 0 && (c.strokeWidth = e);
|
|
3178
|
-
break;
|
|
3179
|
-
}
|
|
3180
|
-
case j.STROKE_DASHARRAY:
|
|
3181
|
-
J(t) && (c.strokeStyle = "dashed");
|
|
3182
|
-
break;
|
|
3183
|
-
}
|
|
3184
|
-
};
|
|
3185
|
-
[e.style].filter(Boolean).forEach((e) => {
|
|
3186
|
-
Y(e || "").forEach(({ property: e, value: t }) => {
|
|
3187
|
-
l(e, t);
|
|
3188
|
-
});
|
|
3189
|
-
});
|
|
3190
|
-
let u = e.arrowhead === "none" || ((r = e.classes) == null ? void 0 : r.includes("note-edge"));
|
|
3191
|
-
return n(n({
|
|
3192
|
-
id: e.id,
|
|
3193
|
-
start: e.start,
|
|
3194
|
-
end: e.end,
|
|
3195
|
-
text: R(e.label || "")
|
|
3196
|
-
}, s), {}, {
|
|
3197
|
-
strokeColor: c.strokeColor,
|
|
3198
|
-
strokeWidth: c.strokeWidth,
|
|
3199
|
-
strokeStyle: u ? "dashed" : c.strokeStyle,
|
|
3200
|
-
isNoteEdge: u
|
|
3201
|
-
});
|
|
3202
|
-
}, Po = (e, t) => {
|
|
3203
|
-
let { nodes: n, edges: r } = e.getData(), i = Ao(t);
|
|
3204
|
-
return {
|
|
3205
|
-
type: "state",
|
|
3206
|
-
nodes: n.map((e) => Mo(e, t, i)),
|
|
3207
|
-
edges: r.map((e) => No(e, t)).filter((e) => e !== null)
|
|
3208
|
-
};
|
|
3209
|
-
}, Fo = Promise.resolve(), Io = (e) => {
|
|
3210
|
-
let t = Fo.then(e, e);
|
|
3211
|
-
return Fo = t.then(() => void 0, () => void 0), t;
|
|
3212
|
-
};
|
|
3213
|
-
t(), r();
|
|
3214
|
-
var Lo = null, Ro = 0, zo = (e) => JSON.stringify(e), Bo = (e) => {
|
|
3215
|
-
let t = e.querySelector("svg");
|
|
3216
|
-
if (!t) throw Error("SVG element not found");
|
|
3217
|
-
let n = t.getBoundingClientRect(), r = n.width, i = n.height;
|
|
3218
|
-
t.setAttribute("width", `${r}`), t.setAttribute("height", `${i}`);
|
|
3219
|
-
let a = unescape(encodeURIComponent(t.outerHTML));
|
|
3220
|
-
return {
|
|
3221
|
-
type: "graphImage",
|
|
3222
|
-
mimeType: "image/svg+xml",
|
|
3223
|
-
dataURL: `data:image/svg+xml;base64,${btoa(a)}`,
|
|
3224
|
-
width: r,
|
|
3225
|
-
height: i
|
|
3226
|
-
};
|
|
3227
|
-
}, Vo = function() {
|
|
3228
|
-
var e = i(function* (e, t = Ce) {
|
|
3229
|
-
return Io(i(function* () {
|
|
3230
|
-
var r, i, a;
|
|
3231
|
-
let o = (r = (i = t.themeVariables) == null ? void 0 : i.fontSize) == null ? Ce.themeVariables.fontSize : r, s = n(n(n({}, Ce), t), {}, {
|
|
3232
|
-
fontSize: o,
|
|
3233
|
-
themeVariables: n(n(n({}, Ce.themeVariables), t.themeVariables), {}, { fontSize: o })
|
|
3234
|
-
}), c = zo(s);
|
|
3235
|
-
c !== Lo && (Ui.initialize(s), Lo = c);
|
|
3236
|
-
let l = yield Ui.mermaidAPI.getDiagramFromText(Tt(e)), u = `mermaid-to-excalidraw-${Ro++}`, d = document.createElement("div");
|
|
3237
|
-
d.setAttribute("style", "opacity: 0; position: fixed; z-index: -1; left: -99999px; top: -99999px;");
|
|
3238
|
-
let f = `${u}-container`;
|
|
3239
|
-
d.id = f, (a = document.getElementById(f)) == null || a.remove(), document.body.appendChild(d);
|
|
3240
|
-
try {
|
|
3241
|
-
let { svg: t } = yield Ui.render(u, e, d);
|
|
3242
|
-
d.innerHTML = t;
|
|
3243
|
-
let n;
|
|
3244
|
-
try {
|
|
3245
|
-
switch (l.type) {
|
|
3246
|
-
case "flowchart-v2":
|
|
3247
|
-
case "graph":
|
|
3248
|
-
n = aa(l.db, d);
|
|
3249
|
-
break;
|
|
3250
|
-
case "sequence":
|
|
3251
|
-
n = Sa(l, d);
|
|
3252
|
-
break;
|
|
3253
|
-
case "class":
|
|
3254
|
-
case "classDiagram":
|
|
3255
|
-
n = Ya(l, d);
|
|
3256
|
-
break;
|
|
3257
|
-
case "er":
|
|
3258
|
-
n = uo(l.db, d);
|
|
3259
|
-
break;
|
|
3260
|
-
case "state":
|
|
3261
|
-
case "stateDiagram":
|
|
3262
|
-
n = Po(l.db, d);
|
|
3263
|
-
break;
|
|
3264
|
-
default: n = Bo(d);
|
|
3265
|
-
}
|
|
3266
|
-
} catch (e) {
|
|
3267
|
-
console.error("Error processing Mermaid diagram:", e), n = Bo(d);
|
|
3268
|
-
}
|
|
3269
|
-
return n;
|
|
3270
|
-
} finally {
|
|
3271
|
-
d.remove();
|
|
3272
|
-
}
|
|
3273
|
-
}));
|
|
3274
|
-
});
|
|
3275
|
-
return function(t) {
|
|
3276
|
-
return e.apply(this, arguments);
|
|
3277
|
-
};
|
|
3278
|
-
}();
|
|
3279
|
-
t(), r();
|
|
3280
|
-
var Ho = function() {
|
|
3281
|
-
var e = i(function* (e, t) {
|
|
3282
|
-
var r, i;
|
|
3283
|
-
let a = t || {}, o = parseInt((r = (i = a.themeVariables) == null ? void 0 : i.fontSize) == null ? "" : r) || 20;
|
|
3284
|
-
return Nt(yield Vo(e, n(n({}, a), {}, { themeVariables: n({}, a.themeVariables) })), { fontSize: o });
|
|
3285
|
-
});
|
|
3286
|
-
return function(t, n) {
|
|
3287
|
-
return e.apply(this, arguments);
|
|
3288
|
-
};
|
|
3289
|
-
}();
|
|
3290
|
-
//#endregion
|
|
3291
|
-
export { Ho as parseMermaidToExcalidraw };
|