@fudanda/admin-antd 0.0.0-stage → 2.20261024.1-beta.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/LICENSE +21 -0
- package/README.md +58 -3
- package/THIRD_PARTY_NOTICES.md +55 -0
- package/dist/assets/libarchive-DxGirPmi.wasm +0 -0
- package/dist/assets/pdfium-BJ2Yip8Q.wasm +0 -0
- package/dist/assets/ppt-font-cjk-DxgKpThH.otf +0 -0
- package/dist/assets/ppt-native-Cz5DBbag.wasm +0 -0
- package/dist/assets/pptx.worker-CtaL8LO_.js +30 -0
- package/dist/assets/worker-C5LZNsKY.mjs +1650 -0
- package/dist/assets/worker-CDeo9jS-.js +40 -0
- package/dist/assets/worker-bundle-Dx5mKZOL.js +6 -0
- package/dist/automation.d.ts +3 -0
- package/dist/automation.js +15 -0
- package/dist/chunks/App-DNjXLysb.js +79 -0
- package/dist/chunks/AppModal-DJzQA6FR.js +1 -0
- package/dist/chunks/ArcBaseAdmin-BZrHGq2f.js +1 -0
- package/dist/chunks/ConfigurableTable-DzmZDd8F.js +55 -0
- package/dist/chunks/DashboardPage-BohGodSl.js +22 -0
- package/dist/chunks/DataScopePanel-B2-x8Jcz.js +1 -0
- package/dist/chunks/DateTimeText-CIt0Qy45.js +1 -0
- package/dist/chunks/DepartmentsPage-DMWY__Y_.js +1 -0
- package/dist/chunks/DictTag-2-adKbYg.js +1 -0
- package/dist/chunks/DictsPage-DILDyHi-.js +15 -0
- package/dist/chunks/EditFormModal-DNHOZHxM.js +1 -0
- package/dist/chunks/EmptyIllustration-DUC3RZmF.js +1 -0
- package/dist/chunks/EntityContextRuntime-DMklAv-k.js +1 -0
- package/dist/chunks/EntityContextRuntime-sslBZqYD.js +1 -0
- package/dist/chunks/EntityRelationButton-DWn1rC2J.js +8 -0
- package/dist/chunks/ExportButton-AzH4D0oW.js +1 -0
- package/dist/chunks/FileNameCell-DPyi64Rv.js +1 -0
- package/dist/chunks/FileStorageConfigsPage-CzuOgeK0.js +15 -0
- package/dist/chunks/FileTypeIcon-DIih3XQG.js +1 -0
- package/dist/chunks/FileViewerPreviewPanel-CMqVtGCr.js +41 -0
- package/dist/chunks/FilesPage-BaEBCOCs.js +43 -0
- package/dist/chunks/IdentitySecurityPage-BO7nY8id.js +1 -0
- package/dist/chunks/JsonPreviewPanel-Dhbza-Uu.js +1 -0
- package/dist/chunks/LogStatsScaffold-CLycj3da.js +1 -0
- package/dist/chunks/LoginLogsPage-DTmHi8u0.js +1 -0
- package/dist/chunks/LoginLogsTable-DVmHnC6V.js +1 -0
- package/dist/chunks/MarkdownPreviewPanel-DoiaAeRv.js +51 -0
- package/dist/chunks/MasterDetailLayout-sjPWw8BI.js +8 -0
- package/dist/chunks/MemberAssignmentSheet-Czbt6_zv.js +1 -0
- package/dist/chunks/MenuCommandPalette-BCOzf-Kq.js +8 -0
- package/dist/chunks/MenusPage-DN8DTGB1.js +1 -0
- package/dist/chunks/ModalFooter-RMlvqrO9.js +1 -0
- package/dist/chunks/MonacoPreviewPanel-Dnz7xpWP.js +1 -0
- package/dist/chunks/NavListPanel-vjIOIqK0.js +1 -0
- package/dist/chunks/OnlineSessionsPage-FoHYZKlR.js +1 -0
- package/dist/chunks/OperationLogsPage-BeRnGcBJ.js +1 -0
- package/dist/chunks/OperationLogsTable-COI-Lp-y.js +1 -0
- package/dist/chunks/PDFPreviewPanel-BIQuBnZZ.js +37 -0
- package/dist/chunks/PasswordInput-DGEJO9yx.js +1 -0
- package/dist/chunks/PositionsPage-DohI0luX.js +1 -0
- package/dist/chunks/PreferencesSheetBody-B9niQABW.js +43 -0
- package/dist/chunks/ProfilePage-CVTRv7xb.js +15 -0
- package/dist/chunks/RelationPanel-B1X6AVaM.js +36 -0
- package/dist/chunks/ResponsiveTableActions-y54aSdhs.js +1 -0
- package/dist/chunks/RolesPage-CtUw93L8.js +1 -0
- package/dist/chunks/ScrollArea-DqjJmHDN.js +11 -0
- package/dist/chunks/SearchToolbar-CvgYKUjr.js +1 -0
- package/dist/chunks/SessionClientTag-DIwnYodW.js +22 -0
- package/dist/chunks/SessionConflictModal-BLNuDsN_.js +1 -0
- package/dist/chunks/SettingRow-DVNmTJWC.js +1 -0
- package/dist/chunks/SettingsPage-BRnCxYQm.js +26 -0
- package/dist/chunks/StatCard-Czjfs0fa.js +4 -0
- package/dist/chunks/UTIF-QUtClmQd.js +1 -0
- package/dist/chunks/UserAvatar-B8CFnTCn.js +1 -0
- package/dist/chunks/UserDisplay-J0Re8z-7.js +1 -0
- package/dist/chunks/UserGroupsPage-CNwbejx-.js +1 -0
- package/dist/chunks/UserLogsPanels-BHeSxWrk.js +36 -0
- package/dist/chunks/UserTransferSelect-CAeyxdor.js +22 -0
- package/dist/chunks/UsersPage-BXt9fOru.js +36 -0
- package/dist/chunks/abnfDiagram-VCTEODGH-Z6OhNjoW.js +1 -0
- package/dist/chunks/activity-DBu4axwF.js +8 -0
- package/dist/chunks/arc-B3K1fDeF.js +1 -0
- package/dist/chunks/architecture-7GRP2DOG-CMtoOwin.js +1 -0
- package/dist/chunks/architectureDiagram-5GKGNRK7-V5A7S5fY.js +36 -0
- package/dist/chunks/archive-B_IKvysI.js +72 -0
- package/dist/chunks/array-BrHhzP_A.js +1 -0
- package/dist/chunks/arrow-left-CsxBMzKY.js +8 -0
- package/dist/chunks/avsc-C0VoJRmm.js +160 -0
- package/dist/chunks/blockDiagram-I7D4REHJ-CFKGJkc_.js +129 -0
- package/dist/chunks/browser-BKLM0ThC-mnGPrtB_.js +1 -0
- package/dist/chunks/browser-index-JqxD-45S.js +1 -0
- package/dist/chunks/builtin_esm-external-require-react-BsBndGeN.js +1 -0
- package/dist/chunks/bundle-DbfUnEV1.js +29 -0
- package/dist/chunks/c4Diagram-7LVT6UL2-BqYYoXPe.js +38 -0
- package/dist/chunks/channel-C9Dr7Z-W.js +1 -0
- package/dist/chunks/chart-data-DImT_Mzn.js +5 -0
- package/dist/chunks/chart-renderer-k-Rd8vdL.js +7 -0
- package/dist/chunks/chevron-down-mn2tSKQd.js +8 -0
- package/dist/chunks/chevron-right-EBApfX6q.js +15 -0
- package/dist/chunks/chevrons-up-down-2M6hY6wt.js +15 -0
- package/dist/chunks/chunk-2E4U76K2-DNbbdpCx.js +1 -0
- package/dist/chunks/chunk-2Q5K7J3B-CmAE3Vs0.js +1 -0
- package/dist/chunks/chunk-2ZTRR5NV-BjsSRgBv.js +2 -0
- package/dist/chunks/chunk-3Z5EZCMW-uYiqz-6y.js +1 -0
- package/dist/chunks/chunk-4HAMMTFA-Aw59LwS3.js +62 -0
- package/dist/chunks/chunk-5V3GS4D5-B_CVcJic.js +1 -0
- package/dist/chunks/chunk-5VM5RSS4-DMlsEAcl.js +15 -0
- package/dist/chunks/chunk-6AZGARVD-CgAiC5mV.js +1 -0
- package/dist/chunks/chunk-6EIED4P4-CXz5D9B0.js +1 -0
- package/dist/chunks/chunk-6K3QC6MW-DtaQ52mY.js +1 -0
- package/dist/chunks/chunk-6TQVIW2G-D0YDxefI.js +1 -0
- package/dist/chunks/chunk-747NJXEK-DGoElbDa.js +2 -0
- package/dist/chunks/chunk-75Z2AOVW-IO9R6faP.js +2 -0
- package/dist/chunks/chunk-CLGD4ZFX-tRS89bnq.js +1 -0
- package/dist/chunks/chunk-DU6HZSFF-Bx48E1rg.js +125 -0
- package/dist/chunks/chunk-F27PBJKO-DtLva7y0.js +1 -0
- package/dist/chunks/chunk-FOHPRMQF-B8MMrnxV.js +255 -0
- package/dist/chunks/chunk-GMAD6QVW-D41KnniX.js +72 -0
- package/dist/chunks/chunk-GVQU2GXP-CVzgM_ui.js +1 -0
- package/dist/chunks/chunk-I5DQTOEV-CoecQT42.js +1 -0
- package/dist/chunks/chunk-ICYGCRZG-lH3opfCY.js +1 -0
- package/dist/chunks/chunk-IH6LHLGP-tD-j3Rsy.js +1 -0
- package/dist/chunks/chunk-IMKFNOWR-CL9pLQhV.js +231 -0
- package/dist/chunks/chunk-JWPE2WC7-Wk0BVLn5.js +1 -0
- package/dist/chunks/chunk-KI3K4JFJ-C-3Y_9er.js +1 -0
- package/dist/chunks/chunk-L3NEJ4N5-CmvrS7Dt.js +1 -0
- package/dist/chunks/chunk-LNGE3PJU-BP1fsJRz.js +34 -0
- package/dist/chunks/chunk-OSK3NFVY-C9uWOXTC.js +10 -0
- package/dist/chunks/chunk-OUJLGHUK-Cm55l9bx.js +2 -0
- package/dist/chunks/chunk-P2QGCYS3-C9bc1yiM.js +1 -0
- package/dist/chunks/chunk-POPQ4Y6H-P1s5xaxM.js +1 -0
- package/dist/chunks/chunk-PWAF6VOD-IORmPx9D.js +1 -0
- package/dist/chunks/chunk-SHT3W25Y-Bip4melZ.js +168 -0
- package/dist/chunks/chunk-SVP7TREG-BKCgUOuy.js +88 -0
- package/dist/chunks/chunk-TICWLB2K-12W2EmSx.js +206 -0
- package/dist/chunks/chunk-TLUHSLCS-DsqF476v.js +1 -0
- package/dist/chunks/chunk-UY3FDG6J-71d_M6t3.js +1 -0
- package/dist/chunks/chunk-XHIXRSVI-C2X1-xC6.js +1 -0
- package/dist/chunks/chunk-XXDRQBXY-Bl6AoSZF.js +1 -0
- package/dist/chunks/chunk-Y2CYZVJY-DjEHBC-3.js +1 -0
- package/dist/chunks/circle-check-RKAno__V.js +8 -0
- package/dist/chunks/circle-x-BB5x-D-8.js +8 -0
- package/dist/chunks/classDiagram-ZZMXUADV-CZrpYcfK.js +1 -0
- package/dist/chunks/classDiagram-v2-VYDZK3BY-CZrpYcfK.js +1 -0
- package/dist/chunks/clipboard-ERcMSMRH.js +1 -0
- package/dist/chunks/clock-CniP1gZS.js +8 -0
- package/dist/chunks/confirm-BtBBEqk8.js +1 -0
- package/dist/chunks/controls-C5dPckUT.js +1 -0
- package/dist/chunks/copy-ofLPH1I0.js +8 -0
- package/dist/chunks/cose-bilkent-JH36ORCC-D9OUqkk5.js +1 -0
- package/dist/chunks/createLucideIcon-BtwfYE6A.js +83 -0
- package/dist/chunks/cynefin-OW5HDTMX-B8_kUynj.js +1 -0
- package/dist/chunks/cynefinDiagram-5FMLGOSQ-DhQChnCg.js +62 -0
- package/dist/chunks/cytoscape.esm-wDUnleWx.js +339 -0
- package/dist/chunks/dagre-GXQ25YYZ-CfbwC_a5.js +4 -0
- package/dist/chunks/dagre-ZVAWSfFw.js +1 -0
- package/dist/chunks/data-B05HzECj.js +28 -0
- package/dist/chunks/date-picker-CPUxgHVv.js +1 -0
- package/dist/chunks/defaultLocale-BvxIcb9Y.js +1 -0
- package/dist/chunks/deleteAction-CCocr5uV.js +1 -0
- package/dist/chunks/diagram-D9cwc7QH.js +5 -0
- package/dist/chunks/diagram-S7CK7UJ4-DVPbdtMm.js +30 -0
- package/dist/chunks/diagram-UQ7AKVKN-D_ZBhGLL.js +41 -0
- package/dist/chunks/diagram-VSXAHHWV-Dqypp-OX.js +3 -0
- package/dist/chunks/diagram-VX7I27RA-CbWJVJ_L.js +24 -0
- package/dist/chunks/diagram-Z3DM3KII-CUyP4-RY.js +24 -0
- package/dist/chunks/direct-engine-thps0u7R.js +5 -0
- package/dist/chunks/dist-Bauqz5on.js +1 -0
- package/dist/chunks/dist-CWj_XYki.js +1 -0
- package/dist/chunks/dist-D_KGQS7-.js +11 -0
- package/dist/chunks/dist-DdW4yNBK.js +1 -0
- package/dist/chunks/docx-preview-CPN81HCr.js +11 -0
- package/dist/chunks/download--5IybXxz.js +8 -0
- package/dist/chunks/drawing-D2Qrun-P.js +48 -0
- package/dist/chunks/ebnfDiagram-PWID7BFC-C5NMigjm.js +1 -0
- package/dist/chunks/ellipsis-Dux1Nxa5.js +8 -0
- package/dist/chunks/email-ByshRsFv.js +61 -0
- package/dist/chunks/emailHtml-BAKcRhSm.js +1 -0
- package/dist/chunks/erDiagram-RLTQ6QDP-B5rUHJPJ.js +99 -0
- package/dist/chunks/eventmodeling-NTZA5JFV-C74no5BH.js +1 -0
- package/dist/chunks/export-BkwewH6Q.js +1 -0
- package/dist/chunks/export-DlTz5dc2.js +341 -0
- package/dist/chunks/eye-off-BtJoIT5n.js +8 -0
- package/dist/chunks/feedback-BnjMKZpz.js +1 -0
- package/dist/chunks/file-utils-DyvnVEoH.js +1 -0
- package/dist/chunks/fit-CsnhEncA.js +1 -0
- package/dist/chunks/flowDiagram-HODETNUW-BuMvaSeo.js +1 -0
- package/dist/chunks/form-CQutQFiD.js +1 -0
- package/dist/chunks/funnel-BwQjQI4Y.js +8 -0
- package/dist/chunks/ganttDiagram-EL5Y4UJY-DIAlbvVg.js +292 -0
- package/dist/chunks/geo-DR0fL7r2.js +38 -0
- package/dist/chunks/gitGraph-4MIJSDKK-Ce5mOfp1.js +1 -0
- package/dist/chunks/gitGraphDiagram-WWUBYQGX-DN3G9xiQ.js +106 -0
- package/dist/chunks/graphlib-CYBMTUbW.js +1 -0
- package/dist/chunks/icons-CbRx5Om7.js +1 -0
- package/dist/chunks/illustrations-DT1eq6jI.js +1 -0
- package/dist/chunks/image-ez9hvzKT.js +17 -0
- package/dist/chunks/index.es-OAWlVkoK.js +16 -0
- package/dist/chunks/info-A6RAGUB7-BP6lMBIR.js +1 -0
- package/dist/chunks/info-BQa8C31Y.js +8 -0
- package/dist/chunks/infoDiagram-27XIBGKW-BhQtr_Ti.js +2 -0
- package/dist/chunks/init-Ca_Ibf4y.js +1 -0
- package/dist/chunks/ishikawaDiagram-5VMMS53U-CLR6CAi4.js +70 -0
- package/dist/chunks/journeyDiagram-3NMN7TZE-_-Q7sjsP.js +139 -0
- package/dist/chunks/json-viewer-DHYRjY8I.js +1 -0
- package/dist/chunks/jszip.min-hNOoGCeG.js +14 -0
- package/dist/chunks/kanban-definition-UXKFOSKX-D97mHeUZ.js +89 -0
- package/dist/chunks/katex-D5qu7EYh.js +257 -0
- package/dist/chunks/layout-grid-Bp9bwiQZ.js +8 -0
- package/dist/chunks/lib-BlRm3nk1.js +15 -0
- package/dist/chunks/lib-C1nFUu19.js +4 -0
- package/dist/chunks/lib-CqYXBtHb.js +1 -0
- package/dist/chunks/libarchive-DRzzJvQl.js +7 -0
- package/dist/chunks/line-BV7qVRkM.js +1 -0
- package/dist/chunks/line-qVHaOdPp.js +1 -0
- package/dist/chunks/linear-DXABSWHW.js +1 -0
- package/dist/chunks/list-0CbyOlT9.js +1 -0
- package/dist/chunks/list-DCcWnjUg.js +8 -0
- package/dist/chunks/listTableProps-DDynsnLF.js +1 -0
- package/dist/chunks/log-in-OzbNes8i.js +8 -0
- package/dist/chunks/lucide-react-VfAPsQQ5.js +8 -0
- package/dist/chunks/maplibre-gl-Bxi83GUP.js +819 -0
- package/dist/chunks/maplibre-shared-Oo0L8Lll.js +6 -0
- package/dist/chunks/maximize-CnmQ11E7.js +8 -0
- package/dist/chunks/media-DoGe_p4O.js +1 -0
- package/dist/chunks/menu-mQgsexFx.js +15 -0
- package/dist/chunks/mermaid-parser.core-DvCAQkzY.js +3 -0
- package/dist/chunks/mermaid.core-CxOC6yPr.js +15 -0
- package/dist/chunks/messages-CFyOVxEM.js +1 -0
- package/dist/chunks/mindmap-definition-YA3MSWOX-A2UgnMwx.js +96 -0
- package/dist/chunks/minimize-Bpau_zCe.js +8 -0
- package/dist/chunks/msg-BzZbudMm.js +7 -0
- package/dist/chunks/ofd-C7DKqJ6Z.js +33 -0
- package/dist/chunks/ofd-DrJyXIpS.js +14 -0
- package/dist/chunks/openDocument-DGzqlyJg.js +12 -0
- package/dist/chunks/options-B65xkxOY.js +1 -0
- package/dist/chunks/ordinal-NuFkISw7.js +1 -0
- package/dist/chunks/packet-AYTQ26CC-DS6h3a5l.js +1 -0
- package/dist/chunks/panzoom.es-DnuzxUQi.js +1 -0
- package/dist/chunks/parse-6ZQGx714.js +1 -0
- package/dist/chunks/parser-DC3PvpL4.js +72 -0
- package/dist/chunks/path-VUNELGFR.js +1 -0
- package/dist/chunks/pegDiagram-XKGWAZYB-DxQqpKfh.js +1 -0
- package/dist/chunks/pie-WAS4IAKB-BsaegmNA.js +1 -0
- package/dist/chunks/pieDiagram-E7YTZNPT-BUsnkTkJ.js +39 -0
- package/dist/chunks/postal-mime-DMcA5b7k.js +28 -0
- package/dist/chunks/ppt-B0WY5Gks.js +30 -0
- package/dist/chunks/ppt-BIiNnCyj.js +1 -0
- package/dist/chunks/pptx-DX5KDFZ7.js +109 -0
- package/dist/chunks/preload-helper-C-73SErw.js +1 -0
- package/dist/chunks/print-mask-Dguzv0rv.js +17 -0
- package/dist/chunks/printLayout-oeudvFkr.js +34 -0
- package/dist/chunks/printMask-LefOTJqk.js +8 -0
- package/dist/chunks/psd-hjeNFQZ-.js +36 -0
- package/dist/chunks/purify.es-BsWMI_aG.js +5 -0
- package/dist/chunks/quadrantDiagram-AXDQQJYC-BmQNSzhY.js +7 -0
- package/dist/chunks/radar-RG4KPBEZ-BoHdw2h7.js +1 -0
- package/dist/chunks/railroad-74A4TZTK-BifJffb4.js +1 -0
- package/dist/chunks/railroad-abnf-HS5TGJTU-CMEPumRO.js +1 -0
- package/dist/chunks/railroad-ebnf-LZEXJU2U-B06BgAeN.js +1 -0
- package/dist/chunks/railroad-peg-WCYAUIDC-CMjriUEs.js +1 -0
- package/dist/chunks/railroadDiagram-O6MQD6OU-B2t5KY26.js +1 -0
- package/dist/chunks/react-runtime-x2lFbSKq.js +11 -0
- package/dist/chunks/refresh-cw-Dz8O9-Hp.js +8 -0
- package/dist/chunks/rendered-slot-YhfmcMJr.js +1 -0
- package/dist/chunks/requirementDiagram-BXWQKSXE-CBBfNOAp.js +84 -0
- package/dist/chunks/rolldown-runtime-BKuNeK48.js +1 -0
- package/dist/chunks/rotate-ccw-D2__Zisi.js +8 -0
- package/dist/chunks/rotate-cw-BSTVLlWY.js +8 -0
- package/dist/chunks/rough.esm-CVrpq1dW.js +1 -0
- package/dist/chunks/sankeyDiagram-P5KCCOFB-Cp8SrFyb.js +40 -0
- package/dist/chunks/save-w-NwiMMY.js +8 -0
- package/dist/chunks/search-DYZU68h1.js +8 -0
- package/dist/chunks/search-filters-CRIhZ0gL.js +1 -0
- package/dist/chunks/sequenceDiagram-WJ2MYXX4-PDtVfEoj.js +162 -0
- package/dist/chunks/shield-alert-De_Hx56I.js +8 -0
- package/dist/chunks/sizeCapture-INFHLROL-DA-kAaXB.js +1 -0
- package/dist/chunks/skeleton-CrjMjJNr.js +1 -0
- package/dist/chunks/spreadsheet-BzbBEhmY.js +1 -0
- package/dist/chunks/spreadsheet-LR3SOG-x.js +58 -0
- package/dist/chunks/sql-wasm-browser-CFddXd9f.js +2 -0
- package/dist/chunks/src-C1iDJpBK.js +1 -0
- package/dist/chunks/src-vLpLkuQx.js +1 -0
- package/dist/chunks/stateDiagram-D77RDMKH-C1Sx8KUD.js +1 -0
- package/dist/chunks/stateDiagram-v2-MP3YSRHH-7wYLSzBX.js +1 -0
- package/dist/chunks/swimlanes-42K2YHIH-BmybX9eL.js +1 -0
- package/dist/chunks/swimlanesDiagram-VR7AAH4N-DxhXklfm.js +8 -0
- package/dist/chunks/tabs-BobA_IcO.js +1 -0
- package/dist/chunks/theme-controller-D-ATwFal.js +1 -0
- package/dist/chunks/timeline-definition-24CTP7MA-QS9QNm2i.js +120 -0
- package/dist/chunks/tinycolor-CG1wnM-U.js +1 -0
- package/dist/chunks/togeojson.es-BE8iM7U6.js +1 -0
- package/dist/chunks/toolbar-controls-CThS0xuP.js +15 -0
- package/dist/chunks/trash-tHBT8Mpw.js +8 -0
- package/dist/chunks/treeView-Q6P3EWNA-CN0l7whJ.js +1 -0
- package/dist/chunks/treemap-WGGIJYW6-C4P1fQxS.js +1 -0
- package/dist/chunks/typography-DKK_iHcj.js +1 -0
- package/dist/chunks/ui-BFsHoY7a.js +1 -0
- package/dist/chunks/ui-utils-ClxYogUQ.js +1 -0
- package/dist/chunks/upload-M-n6woFv.js +8 -0
- package/dist/chunks/useCrudOperationColumn-D935tixd.js +1 -0
- package/dist/chunks/useListPage-CbcOQG4m.js +1 -0
- package/dist/chunks/useModalViewport-HF7te75S.js +1 -0
- package/dist/chunks/useRowSelection-4GOMFmjG.js +1 -0
- package/dist/chunks/useStatusToggle-B2qZaoc-.js +1 -0
- package/dist/chunks/user-round-kYfBkPNu.js +15 -0
- package/dist/chunks/users-BXZLb4TY.js +8 -0
- package/dist/chunks/vennDiagram-4TSXK5OY-CVd73ycc.js +34 -0
- package/dist/chunks/view-B8ZvC8z3.js +1 -0
- package/dist/chunks/viewer-Ct88ypIL.js +24 -0
- package/dist/chunks/wardley-WFR3VGLG-cG9pRFwD.js +1 -0
- package/dist/chunks/wardleyDiagram-VM6X3IG4-B42d0Gqz.js +78 -0
- package/dist/chunks/wordDoc-BZY3ZnxN.js +152 -0
- package/dist/chunks/wordDocx-Bt2mlB3C.js +77 -0
- package/dist/chunks/wordMl-Y_ghyTZ8.js +1 -0
- package/dist/chunks/worker-engine-B4e92GsN.js +17369 -0
- package/dist/chunks/x-Ak9hw1R9.js +8 -0
- package/dist/chunks/xmind-CF9YwkOD.js +58 -0
- package/dist/chunks/xychartDiagram-S5SC5T6Z-B_Owv9Ho.js +7 -0
- package/dist/file-viewer/flyfish-viewer-assets.json +46 -0
- package/dist/file-viewer/vendor/docx/docx.worker.js +5 -0
- package/dist/file-viewer/vendor/docx/jszip.min.js +13 -0
- package/dist/file-viewer/vendor/xlsx/sheet.worker.js +107 -0
- package/dist/file-viewer/wasm/data/sql-wasm.wasm +0 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -0
- package/dist/public/avatars/avatar-01.svg +1 -0
- package/dist/public/avatars/avatar-02.svg +1 -0
- package/dist/public/avatars/avatar-03.svg +1 -0
- package/dist/public/avatars/avatar-04.svg +1 -0
- package/dist/public/avatars/avatar-05.svg +1 -0
- package/dist/public/avatars/avatar-06.svg +1 -0
- package/dist/public/avatars/avatar-07.svg +1 -0
- package/dist/public/avatars/avatar-08.svg +1 -0
- package/dist/public/avatars/avatar-09.svg +1 -0
- package/dist/public/avatars/avatar-10.svg +1 -0
- package/dist/public/avatars/avatar-11.svg +1 -0
- package/dist/public/avatars/avatar-12.svg +1 -0
- package/dist/public/monaco/vs/abap-D-t0cyap.js +1 -0
- package/dist/public/monaco/vs/apex-CcIm7xu6.js +1 -0
- package/dist/public/monaco/vs/assets/css.worker-URu8fCFR.js +97 -0
- package/dist/public/monaco/vs/assets/editor.worker-lj3bdIIn.js +30 -0
- package/dist/public/monaco/vs/assets/editorWebWorkerMain-CA_vMoUU.js +30 -0
- package/dist/public/monaco/vs/assets/html.worker-D1SL3iM8.js +474 -0
- package/dist/public/monaco/vs/assets/json.worker-CoJx_OPf.js +62 -0
- package/dist/public/monaco/vs/assets/ts.worker-BWKtMYOk.js +67722 -0
- package/dist/public/monaco/vs/azcli-BA0tQDCg.js +1 -0
- package/dist/public/monaco/vs/basic-languages/monaco.contribution.js +1 -0
- package/dist/public/monaco/vs/bat-C397hTD6.js +1 -0
- package/dist/public/monaco/vs/bicep-DF5aW17k.js +2 -0
- package/dist/public/monaco/vs/cameligo-plsz8qhj.js +1 -0
- package/dist/public/monaco/vs/clojure-Y2auQMzK.js +1 -0
- package/dist/public/monaco/vs/coffee-Bu45yuWE.js +1 -0
- package/dist/public/monaco/vs/cpp-CkKPQIni.js +1 -0
- package/dist/public/monaco/vs/csharp-CX28MZyh.js +1 -0
- package/dist/public/monaco/vs/csp-D8uWnyxW.js +1 -0
- package/dist/public/monaco/vs/css-CaeNmE3S.js +3 -0
- package/dist/public/monaco/vs/css.worker-CyhWkhHo.js +1 -0
- package/dist/public/monaco/vs/cssMode-CV6Ay48H.js +1 -0
- package/dist/public/monaco/vs/cypher-DVThT8BS.js +1 -0
- package/dist/public/monaco/vs/dart-CmGfCvrO.js +1 -0
- package/dist/public/monaco/vs/dockerfile-CZqqYdch.js +1 -0
- package/dist/public/monaco/vs/ecl-30fUercY.js +1 -0
- package/dist/public/monaco/vs/editor/editor.main.css +1 -0
- package/dist/public/monaco/vs/editor/editor.main.js +1 -0
- package/dist/public/monaco/vs/editor-KLE6jdfb.js +831 -0
- package/dist/public/monaco/vs/editor.js +1 -0
- package/dist/public/monaco/vs/editorWorkerHost-fVE1cjcC.js +35 -0
- package/dist/public/monaco/vs/elixir-xjPaIfzF.js +1 -0
- package/dist/public/monaco/vs/flow9-DqtmStfK.js +1 -0
- package/dist/public/monaco/vs/freemarker2-FWreY7v7.js +3 -0
- package/dist/public/monaco/vs/fsharp-BOMdg4U1.js +1 -0
- package/dist/public/monaco/vs/go-D_hbi-Jt.js +1 -0
- package/dist/public/monaco/vs/graphql-CKUU4kLG.js +1 -0
- package/dist/public/monaco/vs/handlebars-CZi4pHCH.js +1 -0
- package/dist/public/monaco/vs/hcl-DTaboeZW.js +1 -0
- package/dist/public/monaco/vs/html-j_7ZTNRU.js +1 -0
- package/dist/public/monaco/vs/html.worker-CA3iAimZ.js +1 -0
- package/dist/public/monaco/vs/htmlMode-27by_KM4.js +1 -0
- package/dist/public/monaco/vs/index-049xrXrp.js +1 -0
- package/dist/public/monaco/vs/index-CBVt3dzv.js +5 -0
- package/dist/public/monaco/vs/index.js +1 -0
- package/dist/public/monaco/vs/ini-CsNwO04R.js +1 -0
- package/dist/public/monaco/vs/initialize-DL0l1TGY.js +1 -0
- package/dist/public/monaco/vs/java-CI4ZMsH9.js +1 -0
- package/dist/public/monaco/vs/javascript-DTJl4Jn1.js +1 -0
- package/dist/public/monaco/vs/json.worker-BizpAl9O.js +1 -0
- package/dist/public/monaco/vs/jsonMode-DLUiMUrI.js +1 -0
- package/dist/public/monaco/vs/julia-BwzEvaQw.js +1 -0
- package/dist/public/monaco/vs/kotlin-IUYPiTV8.js +1 -0
- package/dist/public/monaco/vs/language/css/monaco.contribution.js +1 -0
- package/dist/public/monaco/vs/language/html/monaco.contribution.js +1 -0
- package/dist/public/monaco/vs/language/json/monaco.contribution.js +1 -0
- package/dist/public/monaco/vs/language/typescript/monaco.contribution.js +1 -0
- package/dist/public/monaco/vs/less-C0eDYdqa.js +2 -0
- package/dist/public/monaco/vs/lexon-iON-Kj97.js +1 -0
- package/dist/public/monaco/vs/liquid-CLJYelW6.js +1 -0
- package/dist/public/monaco/vs/loader.js +1368 -0
- package/dist/public/monaco/vs/lspLanguageFeatures-BIkJOWLw.js +2 -0
- package/dist/public/monaco/vs/lua-DtygF91M.js +1 -0
- package/dist/public/monaco/vs/m3-CsR4AuFi.js +1 -0
- package/dist/public/monaco/vs/main-BEx-Fmlo.js +15 -0
- package/dist/public/monaco/vs/main-DsK8pnKg.js +3 -0
- package/dist/public/monaco/vs/markdown-C_rD0bIw.js +1 -0
- package/dist/public/monaco/vs/mdx-CpzZIPHF.js +1 -0
- package/dist/public/monaco/vs/mips-CiYP61RB.js +1 -0
- package/dist/public/monaco/vs/monaco.contribution-9cKT3C7t.js +1 -0
- package/dist/public/monaco/vs/monaco.contribution-BE88ZNGY.js +1 -0
- package/dist/public/monaco/vs/monaco.contribution-BPhsneLd.js +1 -0
- package/dist/public/monaco/vs/monaco.contribution-BgRy6xDf.js +1 -0
- package/dist/public/monaco/vs/msdax-C38-sJlp.js +1 -0
- package/dist/public/monaco/vs/mysql-CdtbpvbG.js +1 -0
- package/dist/public/monaco/vs/nls/lang/cs.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/cs.js +9 -0
- package/dist/public/monaco/vs/nls/lang/de.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/de.js +9 -0
- package/dist/public/monaco/vs/nls/lang/es.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/es.js +9 -0
- package/dist/public/monaco/vs/nls/lang/fr.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/fr.js +9 -0
- package/dist/public/monaco/vs/nls/lang/it.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/it.js +9 -0
- package/dist/public/monaco/vs/nls/lang/ja.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/ja.js +9 -0
- package/dist/public/monaco/vs/nls/lang/ko.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/ko.js +9 -0
- package/dist/public/monaco/vs/nls/lang/pl.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/pl.js +9 -0
- package/dist/public/monaco/vs/nls/lang/pt-br.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/pt-br.js +9 -0
- package/dist/public/monaco/vs/nls/lang/ru.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/ru.js +9 -0
- package/dist/public/monaco/vs/nls/lang/tr.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/tr.js +9 -0
- package/dist/public/monaco/vs/nls/lang/zh-cn.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/zh-cn.js +9 -0
- package/dist/public/monaco/vs/nls/lang/zh-tw.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/zh-tw.js +9 -0
- package/dist/public/monaco/vs/nls.messages-loader.js +1 -0
- package/dist/public/monaco/vs/objective-c-CntZFaHX.js +1 -0
- package/dist/public/monaco/vs/pascal-r6kuqfl_.js +1 -0
- package/dist/public/monaco/vs/pascaligo-BiXoTmXh.js +1 -0
- package/dist/public/monaco/vs/perl-DABw_TcH.js +1 -0
- package/dist/public/monaco/vs/pgsql-me_jFXeX.js +1 -0
- package/dist/public/monaco/vs/php-D_kh-9LK.js +1 -0
- package/dist/public/monaco/vs/pla-VfZjczW0.js +1 -0
- package/dist/public/monaco/vs/postiats-BBSzz8Pk.js +1 -0
- package/dist/public/monaco/vs/powerquery-Dt-g_2cc.js +1 -0
- package/dist/public/monaco/vs/powershell-B-7ap1zc.js +1 -0
- package/dist/public/monaco/vs/protobuf-BmtuEB1A.js +2 -0
- package/dist/public/monaco/vs/pug-BRpRNeEb.js +1 -0
- package/dist/public/monaco/vs/python-CqWUUgfu.js +1 -0
- package/dist/public/monaco/vs/qsharp-BzsFaUU9.js +1 -0
- package/dist/public/monaco/vs/r-f8dDdrp4.js +1 -0
- package/dist/public/monaco/vs/razor-hok5y9Km.js +1 -0
- package/dist/public/monaco/vs/redis-fvZQY4PI.js +1 -0
- package/dist/public/monaco/vs/redshift-45Et0LQi.js +1 -0
- package/dist/public/monaco/vs/restructuredtext-C7UUFKFD.js +1 -0
- package/dist/public/monaco/vs/ruby-CZO8zYTz.js +1 -0
- package/dist/public/monaco/vs/rust-Bfetafyc.js +1 -0
- package/dist/public/monaco/vs/sb-3GYllVck.js +1 -0
- package/dist/public/monaco/vs/scala-foMgrKo1.js +1 -0
- package/dist/public/monaco/vs/scheme-CHdMtr7p.js +1 -0
- package/dist/public/monaco/vs/scss-C1cmLt9V.js +3 -0
- package/dist/public/monaco/vs/shell-ClXCKCEW.js +1 -0
- package/dist/public/monaco/vs/solidity-MZ6ExpPy.js +1 -0
- package/dist/public/monaco/vs/sophia-DWkuSsPQ.js +1 -0
- package/dist/public/monaco/vs/sparql-AUGFYSyk.js +1 -0
- package/dist/public/monaco/vs/sql-32GpJSV2.js +1 -0
- package/dist/public/monaco/vs/st-CuDFIVZ_.js +1 -0
- package/dist/public/monaco/vs/swift-t-PfMj7W.js +1 -0
- package/dist/public/monaco/vs/systemverilog-Ch4vA8Yt.js +1 -0
- package/dist/public/monaco/vs/tcl-D74tq1nH.js +1 -0
- package/dist/public/monaco/vs/toggleHighContrast-qGX7E9o7.js +61 -0
- package/dist/public/monaco/vs/ts.worker-2QLmBukE.js +1 -0
- package/dist/public/monaco/vs/tsMode-B0S_kp2q.js +11 -0
- package/dist/public/monaco/vs/twig-C6taOxMV.js +1 -0
- package/dist/public/monaco/vs/typescript-_2t_511t.js +1 -0
- package/dist/public/monaco/vs/typespec-8OfoLt6R.js +1 -0
- package/dist/public/monaco/vs/vb-Dyb2648j.js +1 -0
- package/dist/public/monaco/vs/wgsl-BhLXMOR0.js +298 -0
- package/dist/public/monaco/vs/workers-BBttULjf.js +1 -0
- package/dist/public/monaco/vs/xml-cZjNDqDT.js +1 -0
- package/dist/public/monaco/vs/yaml-A1fOIdH6.js +1 -0
- package/dist/src-LbWcrSWe.js +3 -0
- package/dist/styles.css +2 -0
- package/dist/styles.d.ts +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +113 -4
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,t as n}from"./createLucideIcon-BtwfYE6A.js";var r,i;function a(){return(a=e((()=>{
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.53.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
t(),r={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]},r.node,i=n(r)})))()}export{a as n,i as t};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,t as n}from"./preload-helper-C-73SErw.js";import{J as r,ft as i,t as a,ut as o}from"./dist-Bauqz5on.js";import{a as s,h as c,v as l}from"./fit-CsnhEncA.js";import{t as u}from"./messages-CFyOVxEM.js";var d,f;function p(){return(p=e((()=>{d=!1,f=()=>d})))()}async function m(e,t,i=`drawio`,a){let o=t.ownerDocument||document,d=S(i),f=u(a?.options),p=s(),m=`loading`,h=``,g=1,_=!1,v=null,x=b(o,`div`,`drawing-viewer`);x.dataset.viewerZoomProvider=`drawing`;let T=b(o,`div`,`drawing-toolbar`),E=b(o,`div`,`drawing-title`);E.append(b(o,`span`,void 0,C(i)),b(o,`strong`,void 0,f(d===`excalidraw`?`drawing.title.excalidraw`:d===`mermaid`?`drawing.title.mermaid`:d===`plantuml`?`drawing.title.plantuml`:`drawing.title.drawio`)));let D=b(o,`div`,`drawing-actions`),O=b(o,`button`,void 0,`-`),k=b(o,`span`),A=b(o,`button`,void 0,`+`),j=b(o,`button`,void 0,f(`drawing.toolbar.fit`));[O,A,j].forEach(e=>{e.type=`button`}),O.title=f(`drawing.toolbar.zoomOut`),A.title=f(`drawing.toolbar.zoomIn`),j.title=f(`drawing.toolbar.fitWidth`),D.append(O,k,A,j),T.append(E,D);let M=b(o,`div`,`drawing-stage`),N=b(o,`div`,`drawing-state`),P=b(o,`div`,`drawing-scroll`),F=b(o,`div`,`drawing-canvas`);P.append(F),M.append(N,P),x.append(T,M),t.replaceChildren(y(o),x);let I=()=>{v?.destroy(),v=null,delete F.dataset.drawingRendered,F.replaceChildren()},L=()=>({scale:g,label:`${Math.round(g*100)}%`,canZoomIn:g<3,canZoomOut:g>.5,canReset:g!==1,minScale:.5,maxScale:3}),R=()=>{v?(v.setZoom(g),k.textContent=`${Math.round(g*100)}%`):(d===`excalidraw`?(F.style.transform=`scale(${g})`,F.style.transformOrigin=`top center`,F.style.zoom=``):(F.style.transform=``,F.style.transformOrigin=``,F.style.zoom=String(g)),k.textContent=`${Math.round(g*100)}%`)},z=e=>(g=w(e),R(),p.emit(),L()),B=()=>{N.hidden=m===`ready`,N.classList.toggle(`error`,m===`error`),N.textContent=m===`error`?h:f(`drawing.state.loading`),R()};return c(x,{zoomIn:()=>z(g+.15),zoomOut:()=>z(g-.15),resetZoom:()=>z(1),setZoom:z,getState:L,subscribe:p.subscribe}),O.addEventListener(`click`,()=>z(g-.15)),A.addEventListener(`click`,()=>z(g+.15)),j.addEventListener(`click`,()=>z(1)),B(),(async()=>{m=`loading`,h=``,g=1,I(),B();try{let t=await r(e);if(_)return;if(d===`excalidraw`)await re(o,t,F,f);else if(d===`mermaid`||d===`plantuml`){let{renderDiagram:e}=await n(async()=>{let{renderDiagram:e}=await import(`./diagram-D9cwc7QH.js`).then(e=>(e.n(),e.t));return{renderDiagram:e}},[],import.meta.url);v=await e({documentRef:o,text:t,target:F,kind:d,options:a?.options?.drawing,theme:a?.options?.theme,viewerOptions:a?.options})}else await me(o,t,F,a?.options?.drawing,f);if(_)return;m=`ready`,B()}catch(e){if(_)return;console.error(e),h=e instanceof Error?e.message:String(e),m=`error`,B()}})(),{$el:x,unmount(){_=!0,v?.destroy(),l(x),t.replaceChildren()}}}var h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,ee,te,ne,re,ie,K,q,J,ae,oe,Y,se,ce,X,Z,Q,le,ue,de,fe,$,pe,me;function he(){return(he=e((()=>{a(),p(),t(),h=`http://www.w3.org/2000/svg`,g=6e3,_=6e3,v=`
|
|
2
|
+
.drawing-viewer{display:flex;height:100%;min-height:360px;flex-direction:column;background:#edf2f7;color:#172033}
|
|
3
|
+
.drawing-toolbar{position:sticky;top:0;z-index:2;display:flex;min-height:46px;align-items:center;justify-content:space-between;gap:16px;padding:8px 14px;border-bottom:1px solid rgba(148,163,184,.35);background:rgba(248,250,252,.92);backdrop-filter:blur(12px)}
|
|
4
|
+
.drawing-title{display:flex;min-width:0;align-items:center;gap:10px}
|
|
5
|
+
.drawing-title span{display:inline-flex;height:24px;align-items:center;justify-content:center;border-radius:6px;padding:0 8px;background:#0f766e;color:#fff;font-size:11px;font-weight:800;letter-spacing:0}
|
|
6
|
+
.drawing-title strong{overflow:hidden;color:#172033;font-size:13px;font-weight:800;text-overflow:ellipsis;white-space:nowrap}
|
|
7
|
+
.drawing-actions{display:flex;flex-shrink:0;align-items:center;gap:6px}
|
|
8
|
+
.drawing-actions button{min-width:32px;height:28px;border:1px solid rgba(100,116,139,.28);border-radius:6px;background:#fff;color:#0f172a;cursor:pointer;font-size:12px;font-weight:800}
|
|
9
|
+
.drawing-actions button:hover{border-color:rgba(15,118,110,.5);color:#0f766e}
|
|
10
|
+
.drawing-actions span{min-width:48px;color:#64748b;font-size:12px;font-weight:800;text-align:center}
|
|
11
|
+
.drawing-stage{position:relative;min-height:0;flex:1;overflow:hidden}
|
|
12
|
+
.drawing-scroll{height:100%;overflow:auto;padding:22px}
|
|
13
|
+
.drawing-canvas{width:100%;min-height:420px;transition:transform .18s ease,zoom .18s ease}
|
|
14
|
+
.drawing-canvas .drawing-svg,.drawing-canvas svg{display:block;max-width:100%;height:auto;margin:0 auto;border-radius:10px;background:#fff;box-shadow:0 18px 42px rgba(15,23,42,.12)}
|
|
15
|
+
.drawing-canvas .drawing-mxgraph{display:block;width:100%;min-height:420px;overflow:hidden;border:0;border-radius:10px;background:#fff;box-shadow:0 18px 42px rgba(15,23,42,.12)}
|
|
16
|
+
.drawing-diagram-shell{display:flex;min-height:100%;align-items:center;justify-content:center;overflow:hidden;border-radius:10px;background:linear-gradient(135deg,#f8fafc,#eef6f4);box-shadow:0 18px 42px rgba(15,23,42,.12)}
|
|
17
|
+
.drawing-diagram-pan{display:inline-flex;min-width:240px;min-height:180px;align-items:center;justify-content:center;padding:32px;cursor:grab;touch-action:none}
|
|
18
|
+
.drawing-diagram-pan:active{cursor:grabbing}
|
|
19
|
+
.drawing-diagram-pan .drawing-diagram-svg{margin:0;box-shadow:none}
|
|
20
|
+
[data-viewer-theme='dark'] .drawing-diagram-shell{background:linear-gradient(135deg,#111827,#0f172a)}
|
|
21
|
+
@media (prefers-color-scheme:dark){[data-viewer-theme='system'] .drawing-diagram-shell{background:linear-gradient(135deg,#111827,#0f172a)}}
|
|
22
|
+
.drawing-state{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;padding:24px;color:#64748b;font-size:14px;font-weight:700;text-align:center}
|
|
23
|
+
.drawing-state[hidden]{display:none!important}
|
|
24
|
+
.drawing-state.error{color:#b42318}
|
|
25
|
+
@media (max-width:720px){.drawing-toolbar{align-items:flex-start;flex-direction:column}.drawing-actions{width:100%;justify-content:space-between}.drawing-scroll{padding:12px}}
|
|
26
|
+
`,y=e=>{let t=e.createElement(`style`);return t.textContent=v,t},b=(e,t,n,r)=>{let i=e.createElement(t);return n&&(i.className=n),r!==void 0&&(i.textContent=r),i},x=(e,t)=>e.createElementNS(h,t),S=e=>{let t=e?.toLowerCase();return t===`excalidraw`?`excalidraw`:t===`mermaid`||t===`mmd`?`mermaid`:t===`plantuml`||t===`puml`?`plantuml`:`drawio`},C=e=>{let t=(e||`drawio`).toLowerCase();return t===`dio`?`DRAWIO`:t.toUpperCase()},w=e=>Math.min(3,Math.max(.5,Number(e.toFixed(2)))),T=(e,t=0)=>{let n=Number(e);return Number.isFinite(n)?n:t},E=e=>!e||e===`transparent`||e===`rgba(0, 0, 0, 0)`,D=(e,t)=>o(e,t?i(t):void 0),O=e=>{try{return new URL(`.`,e).href}catch{let t=e.lastIndexOf(`/`);return t>=0?e.slice(0,t+1):``}},k=e=>e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`),A=e=>{let t=/* @__PURE__ */ new Uint8Array(18);return e.crypto.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)},j=(e,t)=>{let n=new URL(t,e.baseURI),r=new URL(e.baseURI);if(!/^https?:$/.test(n.protocol)||n.origin!==r.origin)throw Error(`The diagrams.net viewer script must use a same-origin HTTP(S) URL.`);return n},M=(e,t,n,r)=>{let i=O(t.href),a=i.replace(/\/$/,``),o={PROXY_URL:`${i}proxy`,STYLE_PATH:`${i}styles`,SHAPES_PATH:`${i}shapes`,STENCIL_PATH:`${i}stencils`,DRAW_MATH_URL:`${i}math4/es5`,GRAPH_IMAGE_PATH:`${i}img`,mxImageBasePath:`${i}mxgraph/images`,mxBasePath:`${i}mxgraph/`,mxLoadStylesheets:!1,DRAWIO_BASE_URL:a,DRAWIO_LIGHTBOX_URL:a,DRAWIO_SERVER_URL:i,DRAWIO_VIEWER_URL:t.href,DRAWIO_LOG_URL:``,EXPORT_URL:`${i}export`,PLANT_URL:`${i}plant`,VSS_CONVERT_URL:`${i}VsdConverter/api/converter`,DRAWIO_GITLAB_URL:i,DRAWIO_GITHUB_URL:i,DRAWIO_GITHUB_API_URL:i,RT_WEBSOCKET_URL:`${i}rt`,NOTIFICATIONS_URL:`${i}notifications`},s={xml:e,toolbar:`zoom layers lightbox`,nav:!0,resize:!0,"auto-fit":!0,"auto-crop":!0,"auto-origin":!0,"allow-zoom-in":!0,"allow-zoom-out":!0,border:16,highlight:`#0f766e`},c=[`default-src 'none'`,`script-src 'nonce-${n}' ${i}`,`style-src 'unsafe-inline' ${i}`,`img-src data: blob: ${i}`,`font-src data: ${i}`,`media-src data: blob:`,`connect-src 'none'`,`object-src 'none'`,`base-uri 'none'`,`form-action 'none'`].join(`; `),l=`
|
|
27
|
+
Object.assign(window, ${JSON.stringify(o)});
|
|
28
|
+
window.__fileViewerDrawioSentinel = 0;
|
|
29
|
+
window.onDrawioViewerLoad = function () {
|
|
30
|
+
try {
|
|
31
|
+
GraphViewer.createViewerForElement(document.getElementById('graph'));
|
|
32
|
+
parent.postMessage({ fileViewerDrawio: ${JSON.stringify(r)}, ok: true }, '*');
|
|
33
|
+
} catch (error) {
|
|
34
|
+
parent.postMessage({ fileViewerDrawio: ${JSON.stringify(r)}, ok: false, message: String(error && error.message || error) }, '*');
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
`;return`<!doctype html>
|
|
38
|
+
<html><head>
|
|
39
|
+
<meta charset="utf-8">
|
|
40
|
+
<meta http-equiv="Content-Security-Policy" content="${k(c)}">
|
|
41
|
+
<meta name="referrer" content="no-referrer">
|
|
42
|
+
<style>html,body{margin:0;min-height:100%;background:#fff}#graph{max-width:100%;min-height:420px;border:1px solid transparent}</style>
|
|
43
|
+
<script nonce="${n}">${l}<\/script>
|
|
44
|
+
</head><body>
|
|
45
|
+
<div id="graph" class="mxgraph" data-mxgraph="${k(JSON.stringify(s))}"></div>
|
|
46
|
+
<script src="${k(t.href)}"><\/script>
|
|
47
|
+
</body></html>`},N=async(e,t,n)=>{let r;try{return await Promise.race([e,new Promise((e,i)=>{r=setTimeout(()=>i(Error(n)),t)})])}finally{r&&clearTimeout(r)}},P=(e,t)=>!e.dataset.drawingRendered&&(e.dataset.drawingRendered=t,!0),F=(e,t,n)=>{P(e,n)&&(t.classList.add(`drawing-svg`),e.appendChild(t))},I=async()=>Function(`specifier`,`return import(specifier)`)(`@excalidraw/excalidraw`),L=e=>{let t=e instanceof Error?e.message:String(e);return t.includes(`@excalidraw/excalidraw`)&&/(?:resolve|find|module|specifier)/i.test(t)},R=()=>{let e=console.error,t=(...t)=>{let n=t.map(e=>String(e)).join(` `);n.includes(`Failed to use workers for subsetting`)||n.includes(`Failed to fetch font family`)||e(...t)};return console.error=t,()=>{console.error===t&&(console.error=e)}},z=e=>Array.isArray(e.points)&&e.points.length?e.points.map(t=>[T(e.x)+T(t[0]),T(e.y)+T(t[1])]):[[T(e.x),T(e.y)],[T(e.x)+T(e.width),T(e.y)+T(e.height)]],B=e=>{let t=z(e),n=t.map(e=>e[0]),r=t.map(e=>e[1]);return Array.isArray(e.points)||(n.push(T(e.x)+T(e.width)),r.push(T(e.y)+T(e.height))),{minX:Math.min(...n),minY:Math.min(...r),maxX:Math.max(...n),maxY:Math.max(...r)}},V=e=>{let t=e.reduce((e,t)=>{let n=B(t);return{minX:Math.min(e.minX,n.minX),minY:Math.min(e.minY,n.minY),maxX:Math.max(e.maxX,n.maxX),maxY:Math.max(e.maxY,n.maxY)}},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return Number.isFinite(t.minX)?t:{minX:0,minY:0,maxX:800,maxY:480}},H=e=>{let t=E(e.backgroundColor)?void 0:e.backgroundColor;return{stroke:e.strokeColor||`#1e1e1e`,strokeWidth:Math.max(1,T(e.strokeWidth,1)),roughness:Math.max(0,T(e.roughness,1)),fill:t,fillStyle:e.fillStyle||`hachure`,seed:T(e.seed,1),strokeLineDash:e.strokeStyle===`dashed`?[10,8]:e.strokeStyle===`dotted`?[2,6]:void 0}},U=(e,t,n)=>{let r=T(t.opacity,100)/100;r<1&&n.setAttribute(`opacity`,String(r)),e.appendChild(n)},W=(e,t)=>{let n=x(e,`g`),r=T(t.angle);if(r){let e=T(t.x)+T(t.width)/2,i=T(t.y)+T(t.height)/2;n.setAttribute(`transform`,`rotate(${r*180/Math.PI} ${e} ${i})`)}return n},G=(e,t,n)=>{let r=String(n.text||``);if(!r.trim())return;let i=x(e,`text`),a=Math.max(8,T(n.fontSize,20)),o=a*1.25,s=r.split(/\r?\n/),c={1:`Virgil, Segoe Print, Comic Sans MS, sans-serif`,2:`Helvetica, Arial, sans-serif`,3:`Cascadia Mono, Menlo, Consolas, monospace`};i.setAttribute(`x`,String(T(n.x))),i.setAttribute(`y`,String(T(n.y)+a)),i.setAttribute(`fill`,n.strokeColor||`#1e1e1e`),i.setAttribute(`font-size`,String(a)),i.setAttribute(`font-family`,c[T(n.fontFamily,1)]||c[1]),i.setAttribute(`font-weight`,String(n.fontWeight||400)),i.setAttribute(`text-anchor`,n.textAlign===`center`?`middle`:n.textAlign===`right`?`end`:`start`),n.textAlign===`center`?i.setAttribute(`x`,String(T(n.x)+T(n.width)/2)):n.textAlign===`right`&&i.setAttribute(`x`,String(T(n.x)+T(n.width))),s.forEach((t,r)=>{let a=x(e,`tspan`);a.setAttribute(`x`,i.getAttribute(`x`)||String(T(n.x))),a.setAttribute(`dy`,r===0?`0`:String(o)),a.textContent=t,i.appendChild(a)}),U(t,n,i)},ee=(e,t,n,r)=>{if(!(n.endArrowhead||n.startArrowhead)||r.length<2)return;let i=r[r.length-1],a=r[r.length-2],o=Math.atan2(i[1]-a[1],i[0]-a[0]),s=Math.max(10,T(n.strokeWidth,1)*7),c=[i[0]-s*Math.cos(o-Math.PI/7),i[1]-s*Math.sin(o-Math.PI/7)],l=[i[0]-s*Math.cos(o+Math.PI/7),i[1]-s*Math.sin(o+Math.PI/7)],u=x(e,`polygon`);u.setAttribute(`points`,`${i.join(`,`)} ${c.join(`,`)} ${l.join(`,`)}`),u.setAttribute(`fill`,n.strokeColor||`#1e1e1e`),u.setAttribute(`stroke`,n.strokeColor||`#1e1e1e`),U(t,n,u)},te=async(e,t,r,i)=>{let{default:a}=await n(async()=>{let{default:e}=await import(`./rough.esm-CVrpq1dW.js`).then(e=>(e.n(),e.r));return{default:e}},[],import.meta.url),o=V(r),s=Math.max(320,o.maxX-o.minX+160),c=Math.max(220,o.maxY-o.minY+160),l=x(e,`svg`),u=x(e,`g`),d=a.svg(l);l.setAttribute(`viewBox`,`${o.minX-80} ${o.minY-80} ${s} ${c}`),l.setAttribute(`width`,String(s)),l.setAttribute(`height`,String(c)),l.setAttribute(`role`,`img`),l.setAttribute(`aria-label`,`Excalidraw rough.js preview`);let f=x(e,`rect`);f.setAttribute(`x`,String(o.minX-80)),f.setAttribute(`y`,String(o.minY-80)),f.setAttribute(`width`,String(s)),f.setAttribute(`height`,String(c)),f.setAttribute(`fill`,t.appState?.viewBackgroundColor||`#ffffff`),l.appendChild(f),l.appendChild(u),r.forEach(t=>{let n=W(e,t),r=H(t),i=T(t.x),a=T(t.y),o=T(t.width),s=T(t.height);if(t.type===`text`)G(e,n,t);else if(t.type===`rectangle`)U(n,t,d.rectangle(i,a,o,s,r));else if(t.type===`diamond`)U(n,t,d.polygon([[i+o/2,a],[i+o,a+s/2],[i+o/2,a+s],[i,a+s/2]],r));else if(t.type===`ellipse`)U(n,t,d.ellipse(i+o/2,a+s/2,Math.abs(o),Math.abs(s),r));else if(t.type===`line`||t.type===`arrow`||t.type===`freedraw`){let i=z(t);U(n,t,d.linearPath(i,r)),t.type===`arrow`&&ee(e,n,t,i)}n.childNodes.length&&u.appendChild(n)}),F(i,l,`rough`)},ne=async(e,t,n)=>{let r=R(),i=setTimeout(r,7e3),{exportToSvg:a,restore:o}=await I();try{let r=o({elements:t,appState:e.appState||{},files:e.files||{}},null,null,{repairBindings:!0,refreshDimensions:!0}),i=await a({elements:r.elements.filter(e=>!e.isDeleted),appState:{...r.appState,exportBackground:!0,viewBackgroundColor:r.appState.viewBackgroundColor||`#ffffff`},files:r.files||{}});F(n,i,`official`)}finally{clearTimeout(i),setTimeout(r,3e3)}},re=async(e,t,n,r)=>{let i=JSON.parse(t),a=Array.isArray(i.elements)?i.elements.filter(e=>!e.isDeleted):[];if(!a.length)throw Error(r(`drawing.error.excalidrawEmpty`));try{await N(ne(i,a,n),g,r(`drawing.error.excalidrawTimeout`))}catch(t){L(t)||console.warn(t),await te(e,i,a,n)}},ie=(e,t)=>Array.from(e.children).find(e=>e.localName===t)||null,K=e=>{let t=/* @__PURE__ */ new Map;for(let n of(e||``).split(`;`)){if(!n)continue;let[e,...r]=n.split(`=`);t.set(e,r.join(`=`)||`1`)}return t},q=(e,t,n)=>{let r=e.get(t);return r&&r!==`none`?r:n},J=e=>{let t=ie(e,`mxGeometry`);return t?{x:T(t.getAttribute(`x`)),y:T(t.getAttribute(`y`)),width:Math.max(1,T(t.getAttribute(`width`),80)),height:Math.max(1,T(t.getAttribute(`height`),40)),points:Array.from(t.querySelectorAll(`mxPoint`)).map(e=>({x:T(e.getAttribute(`x`)),y:T(e.getAttribute(`y`))}))}:null},ae=(e,t)=>{let n=e.defaultView?.DOMParser||globalThis.DOMParser;return n?new n().parseFromString(t.replace(/</g,`<`),`text/html`).documentElement.textContent||``:t},oe=e=>{let t=``,n=0;for(;n<e.length;){if(e[n]!==`<`){t+=e[n],n+=1;continue}let r=``,i=n+1;for(;i<e.length;i+=1){let t=e[i];if(r)t===r&&(r=``);else if(t===`"`||t===`'`)r=t;else if(t===`>`)break}if(i>=e.length){t+=`<`,n+=1;continue}let a=e.slice(n+1,i).trim().toLowerCase();/^\/?br(?:\s|\/|$)/.test(a)&&(t+=`
|
|
48
|
+
`),n=i+1}return t},Y=(e,t)=>t?oe(ae(e,t)).replace(/\u00a0/g,` `).replace(/[ \t]+/g,` `).trim():``,se=/* @__PURE__ */ new Set([`script`,`style`,`foreignobject`,`iframe`,`object`,`embed`,`form`,`link`]),ce=/* @__PURE__ */ new Set([`href`,`xlink:href`,`url`,`link`,`image`,`icon`,`src`,`srcset`]),X=e=>{let t=e.charCodeAt(0);return t<=31||t>=127&&t<=159},Z=(e,t=``)=>{let n=``;for(let r of e)n+=X(r)?t:r;return n},Q=e=>{let t=Z(e).replace(/\s+/g,``).toLowerCase();return/(?:javascript|vbscript|data|file|blob|https?):|(?:^|[=("'])\/\/|\\\\/.test(t)},le=e=>{let t=[];for(let[n,r]of K(e)){let e=n.trim(),i=r.trim();/^[A-Za-z][A-Za-z0-9_.-]*$/.test(e)&&(/(?:html|image|icon|link|href|url)/i.test(e)||Q(i)||[...i].some(X)||/[<>"'`\\]/.test(i)||/url\s*\(/i.test(i)||t.push(`${e}=${i}`))}return t.push(`html=0`),`${t.join(`;`)};`},ue=(e,t)=>Y(e,t).replace(/[<>&"'`]/g,` `).split(``).map(e=>X(e)?` `:e).join(``).replace(/\s+/g,` `).trim(),de=(e,t,n=`This Draw.io file has no safely renderable mxGraphModel.`)=>{if(/<!\s*(?:doctype|entity)\b/i.test(t))throw Error(n);let r=e.defaultView?.DOMParser||globalThis.DOMParser,i=e.defaultView?.XMLSerializer||globalThis.XMLSerializer;if(!r||!i)throw Error(n);let a=new r().parseFromString(t,`application/xml`);if(a.querySelector(`parsererror`)||!a.querySelector(`mxGraphModel`))throw Error(n);for(let t of Array.from(a.querySelectorAll(`*`))){let n=t.localName.toLowerCase();if(se.has(n))t.remove();else for(let n of Array.from(t.attributes)){let r=n.name.toLowerCase();if(r.startsWith(`on`)||ce.has(r)){t.removeAttribute(n.name);continue}if(r===`style`){t.setAttribute(n.name,le(n.value));continue}if(r===`value`||r===`label`||r===`tooltip`||r===`title`){t.setAttribute(n.name,ue(e,n.value));continue}if(Q(n.value)){t.removeAttribute(n.name);continue}let i=Z(n.value).replace(/[<>&"'`]/g,``).trim();t.setAttribute(n.name,i)}}return new i().serializeToString(a)},fe=(e,t,n,r,i,a,o,s,c)=>{if(!n)return;let l=x(e,`text`),u=Math.max(4,Math.floor(a/Math.max(7,s*.55))),d=n.includes(` `)?n.split(/\s+/):n.match(RegExp(`.{1,${u}}`,`g`))||[n],f=[],p=``;for(let e of d){let t=p?`${p} ${e}`:e;t.length>u&&p?(f.push(p),p=e):p=t}p&&f.push(p);let m=s*1.24,h=m*f.length;l.setAttribute(`x`,String(r+a/2)),l.setAttribute(`y`,String(i+o/2-h/2+s)),l.setAttribute(`fill`,c),l.setAttribute(`font-size`,String(s)),l.setAttribute(`font-family`,`Inter, Segoe UI, Arial, sans-serif`),l.setAttribute(`font-weight`,`600`),l.setAttribute(`text-anchor`,`middle`),l.setAttribute(`pointer-events`,`none`),f.slice(0,5).forEach((t,n)=>{let i=x(e,`tspan`);i.setAttribute(`x`,String(r+a/2)),i.setAttribute(`dy`,n===0?`0`:String(m)),i.textContent=t,l.appendChild(i)}),t.appendChild(l)},$=(e,t,n,r)=>{let i=new DOMParser().parseFromString(t,`text/xml`),a=i.querySelector(`parsererror`);if(a)throw Error(r(`drawing.error.drawioParseFailed`,{message:a.textContent||`invalid xml`}));let o=i.querySelector(`diagram`),s=o?.querySelector(`mxGraphModel`)||i.querySelector(`mxGraphModel`);if(!s)throw Error(r(`drawing.error.drawioNoModel`));let c=Array.from(s.querySelectorAll(`mxCell`)),l=c.filter(e=>e.getAttribute(`vertex`)===`1`&&e.getAttribute(`connectable`)!==`0`).map(t=>({cell:t,id:t.getAttribute(`id`)||``,geometry:J(t),style:K(t.getAttribute(`style`)),text:Y(e,t.getAttribute(`value`))})).filter(e=>e.id&&e.geometry);if(!l.length)throw Error(r(`drawing.error.drawioNoElements`));let u=new Map(l.map(e=>[e.id,e])),d=l.flatMap(e=>[e.geometry.x,e.geometry.x+e.geometry.width]),f=l.flatMap(e=>[e.geometry.y,e.geometry.y+e.geometry.height]),p=[],m=c.filter(e=>e.getAttribute(`edge`)===`1`);for(let e of m){let t=u.get(e.getAttribute(`source`)||``),n=u.get(e.getAttribute(`target`)||``),r=J(e);t?.geometry&&p.push({x:t.geometry.x+t.geometry.width/2,y:t.geometry.y+t.geometry.height/2}),r?.points.forEach(e=>p.push(e)),n?.geometry&&p.push({x:n.geometry.x+n.geometry.width/2,y:n.geometry.y+n.geometry.height/2})}d.push(...p.map(e=>e.x)),f.push(...p.map(e=>e.y));let h=Math.min(...d)-96,g=Math.min(...f)-96,_=Math.max(480,Math.max(...d)-Math.min(...d)+192),v=Math.max(320,Math.max(...f)-Math.min(...f)+192),y=x(e,`svg`);y.setAttribute(`viewBox`,`${h} ${g} ${_} ${v}`),y.setAttribute(`width`,String(Math.ceil(_))),y.setAttribute(`height`,String(Math.ceil(v))),y.setAttribute(`role`,`img`),y.setAttribute(`aria-label`,o?.getAttribute(`name`)||`Draw.io local SVG preview`);let b=x(e,`defs`),S=x(e,`marker`);S.setAttribute(`id`,`drawio-arrow`),S.setAttribute(`viewBox`,`0 0 10 10`),S.setAttribute(`refX`,`9`),S.setAttribute(`refY`,`5`),S.setAttribute(`markerWidth`,`7`),S.setAttribute(`markerHeight`,`7`),S.setAttribute(`orient`,`auto-start-reverse`);let C=x(e,`path`);C.setAttribute(`d`,`M 0 0 L 10 5 L 0 10 z`),C.setAttribute(`fill`,`#64748b`),S.appendChild(C),b.appendChild(S),y.appendChild(b);let w=x(e,`rect`);w.setAttribute(`x`,String(h)),w.setAttribute(`y`,String(g)),w.setAttribute(`width`,String(_)),w.setAttribute(`height`,String(v)),w.setAttribute(`fill`,`#ffffff`),y.appendChild(w);for(let t of m){let n=u.get(t.getAttribute(`source`)||``),r=u.get(t.getAttribute(`target`)||``);if(!n?.geometry||!r?.geometry)continue;let i=K(t.getAttribute(`style`)),a=q(i,`strokeColor`,`#64748b`),o=[{x:n.geometry.x+n.geometry.width/2,y:n.geometry.y+n.geometry.height/2},...J(t)?.points||[],{x:r.geometry.x+r.geometry.width/2,y:r.geometry.y+r.geometry.height/2}],s=x(e,`polyline`);s.setAttribute(`points`,o.map(e=>`${e.x},${e.y}`).join(` `)),s.setAttribute(`fill`,`none`),s.setAttribute(`stroke`,a),s.setAttribute(`stroke-width`,`2`),i.get(`dashed`)===`1`&&s.setAttribute(`stroke-dasharray`,`8 7`),i.get(`endArrow`)!==`none`&&s.setAttribute(`marker-end`,`url(#drawio-arrow)`),y.appendChild(s)}for(let t of l){let n=t.geometry,r=q(t.style,`fillColor`,`#f8fafc`),i=q(t.style,`strokeColor`,`#64748b`),a=Math.max(10,T(t.style.get(`fontSize`),14)),o=t.style.has(`ellipse`)?`ellipse`:t.style.get(`shape`)===`rhombus`?`diamond`:`rect`;if(o===`ellipse`){let t=x(e,`ellipse`);t.setAttribute(`cx`,String(n.x+n.width/2)),t.setAttribute(`cy`,String(n.y+n.height/2)),t.setAttribute(`rx`,String(n.width/2)),t.setAttribute(`ry`,String(n.height/2)),t.setAttribute(`fill`,r),t.setAttribute(`stroke`,i),t.setAttribute(`stroke-width`,`2`),y.appendChild(t)}else if(o===`diamond`){let t=x(e,`polygon`);t.setAttribute(`points`,[`${n.x+n.width/2},${n.y}`,`${n.x+n.width},${n.y+n.height/2}`,`${n.x+n.width/2},${n.y+n.height}`,`${n.x},${n.y+n.height/2}`].join(` `)),t.setAttribute(`fill`,r),t.setAttribute(`stroke`,i),t.setAttribute(`stroke-width`,`2`),y.appendChild(t)}else{let a=x(e,`rect`);a.setAttribute(`x`,String(n.x)),a.setAttribute(`y`,String(n.y)),a.setAttribute(`width`,String(n.width)),a.setAttribute(`height`,String(n.height)),a.setAttribute(`rx`,t.style.get(`rounded`)===`1`?`10`:`2`),a.setAttribute(`fill`,r),a.setAttribute(`stroke`,i),a.setAttribute(`stroke-width`,`2`),y.appendChild(a)}fe(e,y,t.text,n.x,n.y,n.width,n.height,a,q(t.style,`fontColor`,`#172033`))}F(n,y,`rough`)},pe=async(e,t,n,r,i)=>{let a=e.defaultView||(typeof window<`u`?window:void 0);if(!a)throw Error(i(`drawing.error.viewerInitFailed`));let o=j(e,r),s=de(e,t,i(`drawing.error.drawioNoModel`)),c=A(a),l=`file-viewer-drawio-${c}`,u=b(e,`iframe`,`drawing-mxgraph`);u.title=`diagrams.net preview`,u.referrerPolicy=`no-referrer`,u.sandbox.add(`allow-scripts`),u.srcdoc=M(s,o,c,l),await new Promise((e,t)=>{let r=setTimeout(()=>s(i(`drawing.error.drawioTimeout`)),_),o=()=>{a.removeEventListener(`message`,c),clearTimeout(r)},s=e=>{o(),t(Error(e))},c=t=>{t.source===u.contentWindow&&t.data?.fileViewerDrawio===l&&(t.data?.ok===!0?(o(),e()):s(t.data?.message||i(`drawing.error.viewerInitFailed`)))};a.addEventListener(`message`,c),u.addEventListener(`error`,()=>s(i(`drawing.error.viewerLoadFailed`)),{once:!0}),n.appendChild(u)}),P(n,`official`)},me=async(e,t,n,r,i)=>{if(!(r?.preferOfficial??f())){$(e,t,n,i);return}let a=D(r,e);try{await pe(e,t,n,a,i)}catch(r){console.warn(r),delete n.dataset.drawingRendered,n.replaceChildren(),$(e,t,n,i)}}})))()}he();export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t}from"./chunk-2ZTRR5NV-BjsSRgBv.js";import{n,r}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as i,w as a}from"./src-C1iDJpBK.js";import{j as o}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{t as s}from"./chunk-CLGD4ZFX-tRS89bnq.js";import{i as c,n as l,r as u,t as d}from"./chunk-SVP7TREG-BKCgUOuy.js";import{n as f,t as p}from"./chunk-JWPE2WC7-Wk0BVLn5.js";import{n as m,t as h}from"./mermaid-parser.core-DvCAQkzY.js";var g,_,v,y,b,x,S,C,w;function T(){return(T=e((()=>{u(),p(),s(),o(),i(),r(),m(),g=t().RailroadEbnf.parser.LangiumParser,_=/* @__PURE__ */ n(e=>{let t=e.alternatives.map(v);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),v=/* @__PURE__ */ n(e=>{let t=e.elements.map(x);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),y=/* @__PURE__ */ n(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return _(e.element);case`EbnfOptional`:return{type:`optional`,element:_(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:_(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),b=/* @__PURE__ */ n((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},y(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),x=/* @__PURE__ */ n(e=>e.postfixes.reduce((e,t)=>b(e,t),y(e.base)),`transformTerm`),S=/* @__PURE__ */ n(e=>({name:e.name,definition:_(e.definition)}),`transformRule`),C=/* @__PURE__ */ n(e=>{f(e,d),e.title&&d.setTitle(e.title),e.rules.map(e=>d.addRule(S(e)))},`populateDb`),w={parser:{parse:/* @__PURE__ */ n(e=>{d.clear(),a.debug(`[EBNF Parser] Starting Langium parse`);let t=g.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new h(t);let n=t.value;a.debug(`[EBNF Parser] Parsed rules:`,n.rules.length),C(n),a.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:d}},db:d,renderer:c,styles:l}})))()}T();export{w as diagram};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,t as n}from"./createLucideIcon-BtwfYE6A.js";var r,i;function a(){return(a=e((()=>{
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.53.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
t(),r={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]},r.node,i=n(r)})))()}export{a as n,i as t};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,t as n}from"./preload-helper-C-73SErw.js";import{d as r,t as i}from"./dist-Bauqz5on.js";import{r as a,t as o}from"./messages-CFyOVxEM.js";import{i as s}from"./options-B65xkxOY.js";import{n as c,r as l,t as u}from"./emailHtml-BAKcRhSm.js";var d,f;function p(){return(p=e((()=>{i(),d={"en-US":{bcc:`Bcc`,sender:`Sender`,close:`Close attachment preview`,"email.msg.rtfUnavailable":`Rich-text rendering is unavailable. The readable plain-text body is shown when available. Install the RTF capability to render RTF-only messages.`,"email.msg.inlineUnavailable":`An inline image could not be displayed. The original attachment remains available.`,"email.msg.noBody":`This Outlook item has no readable email body. Its metadata and embedded attachments are shown.`,"email.msg.protected":`This message is protected or signed. Decryption and signature verification are not performed by this viewer.`},"zh-CN":{bcc:`密送`,sender:`代发人`,close:`关闭附件预览`,"email.msg.rtfUnavailable":`富文本正文暂不可渲染,已尽可能显示纯文本正文。仅含 RTF 的邮件需要安装 RTF 预览能力。`,"email.msg.inlineUnavailable":`部分内嵌图片无法显示,原始附件仍保留。`,"email.msg.noBody":`此 Outlook 项目不含可读邮件正文,已展示元数据及内嵌附件。`,"email.msg.protected":`此邮件包含加密或签名内容,本预览器不进行解密或签名验证。`},"ja-JP":{bcc:`Bcc`,sender:`送信者`,close:`添付ファイルのプレビューを閉じる`,"email.msg.rtfUnavailable":`リッチテキストを表示できません。可能な場合はプレーンテキストを表示します。RTF 形式の本文には RTF プレビュー機能が必要です。`,"email.msg.inlineUnavailable":`一部の埋め込み画像を表示できません。元の添付ファイルは保持されています。`,"email.msg.noBody":`この Outlook アイテムには表示可能なメール本文がありません。メタデータと添付ファイルを表示します。`,"email.msg.protected":`このメールには保護または署名が含まれます。復号と署名検証は行いません。`},"de-DE":{bcc:`Bcc`,sender:`Absender`,close:`Anhangvorschau schließen`,"email.msg.rtfUnavailable":`Die Rich-Text-Darstellung ist nicht verfügbar. Wenn möglich, wird Klartext angezeigt. Für RTF-Nachrichten ist die RTF-Vorschaufunktion erforderlich.`,"email.msg.inlineUnavailable":`Ein eingebettetes Bild konnte nicht angezeigt werden. Der Originalanhang bleibt verfügbar.`,"email.msg.noBody":`Dieses Outlook-Element enthält keinen lesbaren Nachrichtentext. Metadaten und eingebettete Anhänge werden angezeigt.`,"email.msg.protected":`Diese Nachricht ist geschützt oder signiert. Entschlüsselung und Signaturprüfung werden nicht durchgeführt.`}},f=e=>d[a(e)]})))()}async function m(e,t,n=`eml`,i){var a,c;n=n.toLowerCase().replace(/^\./,``);let l=n===`msg`?`msg`:n===`mbox`?`mbox`:`eml`,d=i?.filename||`message.${l}`,p=[],m=/* @__PURE__ */ new Map,h=o(i?.options),_=f(i?.options),y=new AbortController,b=()=>y.abort(i?.signal?.reason);i?.signal?.aborted?b():(a=i?.signal)==null||a.addEventListener(`abort`,b,{once:!0});let x=y.signal,S=((c=t.ownerDocument.defaultView)?.matchMedia)?.call(c,`(prefers-color-scheme: dark)`).matches??!1,C=s(i?.options?.theme,S)===`dark`,k=[],A,j,M=0,N,P=0,F,I=!1,L=null,R=null,z=E(`section`,`email-viewer`),B=T();t.replaceChildren(B,z);let V=(e,t,n)=>{e.addEventListener(t,n),k.push(()=>e.removeEventListener(t,n))},H=e=>{if(!L){L=E(`div`,`email-state`),L.append(E(`span`),E(`strong`,void 0,e)),z.append(L);return}let t=L.querySelector(`strong`);t&&(t.textContent=e)},U=()=>{L?.remove(),L=null},W=e=>{R?.remove(),R=E(`div`,`email-error`),R.append(E(`strong`,void 0,h(`email.error.title`))),R.append(E(`p`,void 0,e)),z.append(R)},G=async()=>{let e=A;A=void 0,await r(e)},K=async()=>{let e=j;j=void 0,await r(e)},q=async()=>{var e;if(!I){I=!0,y.abort(),M+=1,P+=1,N?.abort(),F?.abort(),(e=i?.signal)==null||e.removeEventListener(`abort`,b),k.splice(0).forEach(e=>e());try{await Promise.allSettled([G(),K()])}finally{p.splice(0).forEach(e=>URL.revokeObjectURL(e)),m.clear(),z.parentNode===t&&t.replaceChildren()}}},ee=async e=>{x.throwIfAborted();let t=await e.load();if(I)return;x.throwIfAborted();let n=URL.createObjectURL(new Blob([t],{type:e.mimeType||`application/octet-stream`}));p.push(n);let r=document.createElement(`a`);r.href=n,r.download=e.name,document.body.append(r),r.click(),r.remove()},J=async e=>{let n=e.html?`html`:e.rtf&&i?.renderNestedBuffer?`rtf`:e.text?`text`:`headers`,a=null,o=[],s=[];z.replaceChildren();let c=E(`header`,`email-header`);c.append(E(`span`,void 0,e.kind.toUpperCase())),c.append(E(`h2`,void 0,e.subject||d));let l=E(`div`,`email-meta`);O(l,h(`email.meta.from`),v(e.from)),e.sender?.length&&O(l,_.sender,v(e.sender)),O(l,h(`email.meta.to`),v(e.to)),e.cc.length&&O(l,h(`email.meta.cc`),v(e.cc)),e.bcc?.length&&O(l,_.bcc,v(e.bcc)),O(l,h(`email.meta.date`),e.date||`-`),c.append(l);let f=E(`div`,`email-body`),p=E(`aside`,`email-sidebar`),y=E(`div`,`body-tabs`),b=E(`main`,`message-panel`),S=E(`div`,`email-message-content`),w=E(`section`,`attachment-preview`);w.hidden=!0;let T=E(`div`,`attachment-preview-head`),k=E(`strong`),L=E(`button`,void 0,h(`email.attachments.download`));L.type=`button`;let B=E(`div`,`attachment-target`),q=E(`button`,void 0,`×`);q.type=`button`,q.setAttribute(`aria-label`,_.close),q.title=_.close;let J=E(`div`,`attachment-preview-actions`);J.append(L,q),T.append(k,J),w.append(T,B);let Y=E(`div`,`email-notices`);Y.setAttribute(`role`,`status`);let X=new Set(e.warnings||[]),Z=()=>{Y.replaceChildren(),X.forEach(e=>Y.append(E(`p`,void 0,_[e]))),Y.hidden=!X.size};e.rtf&&!e.html&&!i?.renderNestedBuffer&&X.add(`email.msg.rtfUnavailable`),Z();let Q=t=>{let n=E(`pre`,`email-text`);n.textContent=t===`text`?e.text||``:e.headers||``,S.replaceChildren(n)},te=async()=>{let a=++M;N?.abort();let o=new AbortController;N=o;let s=()=>o.abort(x.reason);x.aborted?s():x.addEventListener(`abort`,s,{once:!0});let c=()=>I||a!==M||o.signal.aborted;try{if(await K(),c())return;if(S.replaceChildren(),n===`html`&&e.html){let n=E(`iframe`,`email-html`);n.title=e.subject||d,n.setAttribute(`sandbox`,``),n.referrerPolicy=`no-referrer`,n.srcdoc=u(e.html,m,C,t.ownerDocument),S.append(n)}else if(n===`rtf`&&e.rtf&&i?.renderNestedBuffer){let t=E(`div`,`email-rtf`);S.append(t);let n=await i.renderNestedBuffer(e.rtf,`rtf`,t,{...i,filename:`${d}.rtf`,signal:o.signal,options:{...i.options,docx:{...i.options?.docx,externalResourcePolicy:`block`,externalLinkPolicy:`block`}}});if(c()){await r(n);return}j=n}else Q(n===`headers`?`headers`:`text`)}catch(t){if(c())return;if(n===`rtf`)X.add(`email.msg.rtfUnavailable`),Z(),Q(e.text?`text`:`headers`);else throw t}finally{x.removeEventListener(`abort`,s)}},ne=()=>{o.forEach(({mode:e,button:t})=>{t.classList.toggle(`active`,e===n),t.setAttribute(`aria-pressed`,String(e===n))})};[{key:`html`,label:`HTML`,disabled:!e.html},...e.rtf?[{key:`rtf`,label:`RTF`,disabled:!i?.renderNestedBuffer}]:[],{key:`text`,label:h(`email.tabs.text`),disabled:!e.text},{key:`headers`,label:h(`email.tabs.headers`),disabled:!e.headers}].forEach(e=>{let t=E(`button`,void 0,e.label);t.type=`button`,t.disabled=e.disabled,V(t,`click`,()=>{t.disabled||(n=e.key,ne(),te().catch(e=>{!I&&!x.aborted&&W(e instanceof Error?e.message:String(e))}))}),o.push({mode:e.key,button:t}),y.append(t)}),ne();let $=E(`section`,`attachment-panel`),re=E(`div`,`attachment-title`);re.append(E(`strong`,void 0,h(`email.attachments.title`)),E(`span`,void 0,String(e.attachments.length))),$.append(re),e.attachments.length||$.append(E(`p`,`attachment-empty`,h(`email.attachments.empty`)));let ie=()=>{s.forEach(({id:e,button:t})=>{t.classList.toggle(`active`,e===a?.id)})},ae=async e=>{let t=++P;F?.abort();let n=new AbortController;F=n;let o=()=>n.abort(x.reason);x.aborted?o():x.addEventListener(`abort`,o,{once:!0});let c=()=>I||t!==P||n.signal.aborted;a=e,ie(),w.hidden=!1,b.classList.add(`has-attachment-preview`),R?.remove(),R=null,k.textContent=e.name,H(h(`email.attachments.opening`,{name:e.name}));try{if(await G(),c())return;B.replaceChildren();let t=await e.load();if(c())return;let a=s.find(t=>t.id===e.id)?.button.querySelector(`em`);a&&(a.textContent=g(t.byteLength));let o=E(`div`,`email-attachment-render`);B.append(o);let l=D(e.name);if(i?.renderNestedBuffer){let a=await i.renderNestedBuffer(t,l,o,{...i,filename:e.name,options:i.options,signal:n.signal});if(c()){await r(a);return}A=a}else o.append(E(`div`,void 0,h(`email.attachments.nestedUnavailable`,{name:e.name})))}catch(e){if(c())return;console.error(e),W(e instanceof Error?e.message:String(e))}finally{x.removeEventListener(`abort`,o),F===n&&(F=void 0),!I&&t===P&&U()}};e.attachments.forEach(e=>{let t=E(`button`,`attachment-item`);t.type=`button`;let n=E(`span`,void 0,D(e.name).toUpperCase()||`FILE`),r=E(`strong`,void 0,e.name),i=E(`em`,void 0,g(e.size));t.append(n,r,i),V(t,`click`,()=>{ae(e)}),s.push({id:e.id,button:t}),$.append(t)}),V(q,`click`,()=>{var e;P+=1,F?.abort(),F=void 0;let t=a;a=null,ie(),w.hidden=!0,b.classList.remove(`has-attachment-preview`),U(),G().catch(()=>{}),B.replaceChildren(),(e=s.find(e=>e.id===t?.id))==null||e.button.focus()}),V(L,`click`,()=>{a&&ee(a).catch(e=>{!I&&!x.aborted&&W(e instanceof Error?e.message:String(e))})}),p.append(y,$),b.append(S,w),f.append(p,b),z.append(c,Y,f),await te()};H(h(`email.loading.parsing`));try{x.throwIfAborted();let t=await w(e,l,d,p,m,h,x);x.throwIfAborted(),await J(t),x.throwIfAborted()}catch(e){throw await q(),e}finally{U()}return{$el:z,unmount:q}}var h,g,_,v,y,b,x,S,C,w,T,E,D,O;function k(){return(k=e((()=>{i(),l(),p(),t(),h=`
|
|
2
|
+
.email-viewer{position:relative;height:100%;min-height:0;display:flex;flex-direction:column;background:#f3f6f8;color:#172033;box-sizing:border-box}
|
|
3
|
+
.email-viewer *{box-sizing:border-box}
|
|
4
|
+
.email-header{max-height:35%;overflow:auto;flex:0 0 auto;padding:18px 22px;border-bottom:1px solid rgba(23,32,51,.08);background:#fff}
|
|
5
|
+
.email-header>span{color:#1f7a58;font-size:12px;font-weight:900}
|
|
6
|
+
.email-header h2{margin:4px 0 12px;font-size:22px;line-height:1.25}
|
|
7
|
+
.email-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px}
|
|
8
|
+
.email-meta p{margin:0;color:#526275;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
9
|
+
.email-meta strong{margin-right:8px;color:#172033}
|
|
10
|
+
.email-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(240px,300px) minmax(0,1fr)}
|
|
11
|
+
.email-sidebar{min-height:0;display:flex;flex-direction:column;gap:14px;padding:14px;border-right:1px solid rgba(23,32,51,.08);background:rgba(255,255,255,.7)}
|
|
12
|
+
.body-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(52px,1fr));gap:6px;padding:4px;border-radius:12px;background:rgba(23,32,51,.06)}
|
|
13
|
+
.body-tabs button,.attachment-item,.attachment-preview-head button{font:inherit;cursor:pointer}
|
|
14
|
+
.body-tabs button{height:34px;border:0;border-radius:9px;background:transparent;color:#64748b;font-size:12px;font-weight:800}
|
|
15
|
+
.body-tabs button.active{background:#fff;color:#172033}
|
|
16
|
+
.body-tabs button:disabled{opacity:.4;cursor:not-allowed}
|
|
17
|
+
.attachment-panel{min-height:0;overflow:auto}
|
|
18
|
+
.attachment-title{display:flex;justify-content:space-between;color:#172033;font-size:14px;margin-bottom:8px}
|
|
19
|
+
.attachment-title span{color:#64748b}
|
|
20
|
+
.attachment-empty{margin:8px 0 0;color:#64748b;font-size:12px}
|
|
21
|
+
.attachment-item{width:100%;min-height:62px;display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;align-items:center;margin-bottom:8px;padding:9px;border:1px solid rgba(23,32,51,.08);border-radius:12px;background:#fff;text-align:left}
|
|
22
|
+
.attachment-item:hover,.attachment-item.active{border-color:rgba(31,122,88,.28);box-shadow:0 10px 22px rgba(23,32,51,.08)}
|
|
23
|
+
.attachment-item span{grid-row:span 2;height:38px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:rgba(31,122,88,.12);color:#1f7a58;font-size:11px;font-weight:900}
|
|
24
|
+
.attachment-item strong,.attachment-item em{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
25
|
+
.attachment-item em{color:#64748b;font-size:12px;font-style:normal}
|
|
26
|
+
.message-panel{min-width:0;min-height:0;display:grid;grid-template-rows:minmax(0,1fr)}
|
|
27
|
+
.message-panel.has-attachment-preview{grid-template-rows:minmax(160px,46%) minmax(0,1fr)}
|
|
28
|
+
.email-rtf{height:100%;overflow:auto}
|
|
29
|
+
.email-notices{max-height:25%;overflow:auto;margin:0;padding:10px 22px;background:#fff7e8;color:#714700;font-size:13px;line-height:1.5}
|
|
30
|
+
.email-notices p{margin:4px 0}
|
|
31
|
+
.attachment-preview-actions{display:flex;gap:8px;align-items:center}
|
|
32
|
+
[data-viewer-theme='dark'] .email-notices{background:#332711;color:#f8daa0}
|
|
33
|
+
.email-message-content{min-height:0}
|
|
34
|
+
.email-html,.email-text{width:100%;height:100%;border:0;background:#fff}
|
|
35
|
+
.email-text{margin:0;overflow:auto;padding:20px;white-space:pre-wrap;word-break:break-word;line-height:1.65}
|
|
36
|
+
.attachment-preview{min-height:0;display:flex;flex-direction:column;border-top:1px solid rgba(23,32,51,.08)}
|
|
37
|
+
.attachment-preview[hidden]{display:none}
|
|
38
|
+
.attachment-preview-head{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 14px;background:rgba(255,255,255,.78)}
|
|
39
|
+
.attachment-preview-head button{height:32px;padding:0 12px;border:0;border-radius:9px;background:#1f7a58;color:#fff;font-weight:800}
|
|
40
|
+
.attachment-target{flex:1;min-height:0;overflow:auto}
|
|
41
|
+
.email-attachment-render{width:100%;height:100%;min-height:320px}
|
|
42
|
+
.email-state{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:14px;background:rgba(243,246,248,.86);z-index:2}
|
|
43
|
+
.email-state span{width:34px;height:34px;border-radius:999px;border:3px solid rgba(31,122,88,.16);border-top-color:#1f7a58;animation:email-spin .9s linear infinite}
|
|
44
|
+
.email-error{position:absolute;right:18px;bottom:18px;width:min(460px,calc(100% - 36px));padding:14px;border-radius:14px;background:#fff7e8;color:#8a4b00;box-shadow:0 16px 36px rgba(23,32,51,.14);z-index:3}
|
|
45
|
+
.email-error p{margin:6px 0 0}
|
|
46
|
+
@keyframes email-spin{to{transform:rotate(360deg)}}
|
|
47
|
+
[data-viewer-theme='dark'] .email-viewer{background:#172033;color:#e5eef8}
|
|
48
|
+
[data-viewer-theme='dark'] .email-header,[data-viewer-theme='dark'] .email-sidebar,[data-viewer-theme='dark'] .attachment-item,[data-viewer-theme='dark'] .email-text,[data-viewer-theme='dark'] .attachment-preview-head{border-color:rgba(139,148,158,.2);background:#111827;color:#e5eef8}
|
|
49
|
+
[data-viewer-theme='dark'] .email-meta p,[data-viewer-theme='dark'] .attachment-item em,[data-viewer-theme='dark'] .attachment-title span,[data-viewer-theme='dark'] .attachment-empty{color:#94a3b8}
|
|
50
|
+
[data-viewer-theme='dark'] .email-meta strong,[data-viewer-theme='dark'] .attachment-title,[data-viewer-theme='dark'] .attachment-item strong{color:#f8fafc}
|
|
51
|
+
[data-viewer-theme='dark'] .body-tabs{background:rgba(139,148,158,.12)}[data-viewer-theme='dark'] .body-tabs button{color:#94a3b8}[data-viewer-theme='dark'] .body-tabs button.active{background:#1f2937;color:#f8fafc}
|
|
52
|
+
[data-viewer-theme='dark'] .email-html{background:#111827;color-scheme:dark}
|
|
53
|
+
[data-viewer-theme='dark'] .email-state{background:rgba(13,17,23,.9);color:#cbd5e1}
|
|
54
|
+
@media (prefers-color-scheme:dark){[data-viewer-theme='system'] .email-viewer{background:#172033;color:#e5eef8}[data-viewer-theme='system'] .email-header,[data-viewer-theme='system'] .email-sidebar,[data-viewer-theme='system'] .attachment-item,[data-viewer-theme='system'] .email-text,[data-viewer-theme='system'] .attachment-preview-head{border-color:rgba(139,148,158,.2);background:#111827;color:#e5eef8}[data-viewer-theme='system'] .email-meta p,[data-viewer-theme='system'] .attachment-item em,[data-viewer-theme='system'] .attachment-title span,[data-viewer-theme='system'] .attachment-empty{color:#94a3b8}[data-viewer-theme='system'] .email-meta strong,[data-viewer-theme='system'] .attachment-title,[data-viewer-theme='system'] .attachment-item strong{color:#f8fafc}[data-viewer-theme='system'] .body-tabs{background:rgba(139,148,158,.12)}[data-viewer-theme='system'] .body-tabs button{color:#94a3b8}[data-viewer-theme='system'] .body-tabs button.active{background:#1f2937;color:#f8fafc}[data-viewer-theme='system'] .email-html{background:#111827;color-scheme:dark}[data-viewer-theme='system'] .email-state{background:rgba(13,17,23,.9);color:#cbd5e1}}
|
|
55
|
+
@media (prefers-reduced-motion:reduce){.email-state span{animation:none}}
|
|
56
|
+
@media (max-width:860px){.email-sidebar{max-height:220px;overflow:auto}.email-meta,.email-body{grid-template-columns:1fr}.email-body{grid-template-rows:auto minmax(0,1fr)}.email-sidebar{border-right:0;border-bottom:1px solid rgba(23,32,51,.08)}}
|
|
57
|
+
`,g=e=>{if(!Number.isFinite(e)||e<0)return`-`;if(e<1024)return`${e} B`;let t=e/1024/1024;return t>=1?`${t.toFixed(+(t<10))} MB`:`${(e/1024).toFixed(+(e<10240))} KB`},_=e=>e?(Array.isArray(e)?e:[e]).flatMap(e=>{let t=e;return t.group?_(t.group):[{name:t.name||``,address:t.address||t.email||``}]}):[],v=e=>e.map(e=>e.name&&e.address?`${e.name} <${e.address}>`:e.address||e.name||``).filter(Boolean).join(`, `),y=async e=>{if(e instanceof ArrayBuffer)return e;if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t.buffer}return y(new TextEncoder().encode(e))},b=e=>(e||``).replace(/[<>]/g,``),x=(e,t,n)=>{let r=(e.attachments||[]).map((e,t)=>{let n=typeof e.content==`string`?e.content.length:e.content?.byteLength||0,r=e.filename||`attachment-${t+1}`;return{id:`${t}-${r}`,name:r,mimeType:e.mimeType,size:n,contentId:e.contentId,load:()=>y(e.content)}});return Promise.all(r.map(async e=>{if(!e.contentId||!e.mimeType?.startsWith(`image/`))return;let r=await e.load(),i=c(r,e.mimeType,t);n.set(b(e.contentId),i)})).then(()=>r)},S=async(e,t,r,i)=>{let a=await(await n(async()=>{let{default:e}=await import(`./postal-mime-DMcA5b7k.js`);return{default:e}},[],import.meta.url)).default.parse(e,{attachmentEncoding:`arraybuffer`,maxNestingDepth:24,maxHeadersSize:2097152}),o=await x(a,r,i);return{kind:`eml`,subject:a.subject||t,from:_(a.from),to:_(a.to),cc:_(a.cc),date:a.date,text:a.text,html:a.html,headers:a.headerLines?.map(e=>e.line).join(`
|
|
58
|
+
`)||a.headers?.map(e=>`${e.originalKey}: ${e.value}`).join(`
|
|
59
|
+
`),attachments:o}},C=async(e,t,r,i,a)=>{let o=new TextDecoder(`utf-8`,{fatal:!1}).decode(e),s=[...o.matchAll(/^From .*$\n/gm)].map(e=>e.index||0),c=s[0]??0,l=s[1]??o.length,u=o.slice(c,l).replace(/^From .*$\n/,``),d=new TextEncoder().encode(u).buffer,f=await(await n(async()=>{let{default:e}=await import(`./postal-mime-DMcA5b7k.js`);return{default:e}},[],import.meta.url)).default.parse(d,{attachmentEncoding:`arraybuffer`,maxNestingDepth:24,maxHeadersSize:2097152}),p=await x(f,r,i);return{kind:`mbox`,subject:f.subject||a(`email.mbox.subject`,{filename:t}),from:_(f.from),to:_(f.to),cc:_(f.cc),date:f.date,text:`${a(`email.mbox.summary`,{count:Math.max(1,s.length)})}\n\n${f.text||``}`,html:f.html,headers:f.headerLines?.map(e=>e.line).join(`
|
|
60
|
+
`)||f.headers?.map(e=>`${e.originalKey}: ${e.value}`).join(`
|
|
61
|
+
`),attachments:p}},w=(e,t,r,i,a,o,s)=>t===`msg`?n(async()=>{let{parseMsg:e}=await import(`./msg-BzZbudMm.js`);return{parseMsg:e}},[],import.meta.url).then(({parseMsg:t})=>t(e,r,i,a,s)):t===`mbox`?C(e,r,i,a,o):S(e,r,i,a),T=()=>{let e=document.createElement(`style`);return e.textContent=h,e},E=(e,t,n)=>{let r=document.createElement(e);return t&&(r.className=t),n!==void 0&&(r.textContent=n),r},D=e=>{let t=e.lastIndexOf(`.`);return t>=0?e.slice(t+1).toLowerCase():`bin`},O=(e,t,n)=>{let r=document.createElement(`p`),i=document.createElement(`strong`);i.textContent=t,r.title=n||`-`,r.append(i,document.createTextNode(n||`-`)),e.append(r)}})))()}k();export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";function t(e,t,n){if(typeof URL.createObjectURL==`function`){let r=URL.createObjectURL(new Blob([e],{type:t}));if(!r.startsWith(`blob:null/`))return n.push(r),r;URL.revokeObjectURL(r)}let r=new Uint8Array(e),i=[];for(let e=0;e<r.length;e+=24576)i.push(btoa(String.fromCharCode(...r.subarray(e,e+24576))));return`data:${t};base64,${i.join(``)}`}function n(e,t,n=!1,c=document){if(e.length>33554432)throw Error(`Email HTML exceeds the safety limit.`);let l=c.createElement(`template`).content.ownerDocument;if(l.defaultView)throw Error(`Email parsing requires an inert template document.`);let u=l.createElement(`html`);u.innerHTML=e;let d=/^\s*(?:<!doctype[^>]*>\s*)?<html\b((?:[^>"']|"[^"]*"|'[^']*')*)>/i.exec(e.slice(0,16384))?.[1];if(d){let e=l.createElement(`div`);e.innerHTML=`<div${d}></div>`;for(let t of[`lang`,`dir`]){let n=e.firstElementChild?.getAttribute(t);n&&u.setAttribute(t,n)}}let f=u.querySelector(`head`)||l.createElement(`head`),p=u.querySelector(`body`)||l.createElement(`body`),m=new Set(t.values()),h=e=>{let n=e.trim();if(m.has(n)&&/^blob:/.test(n)||s.test(n))return n;let i=r(n),a=t.get(i);if(!a&&!/^cid:/i.test(n))try{a=t.get(decodeURIComponent(i))}catch{}if(a&&(/^blob:/.test(a)||s.test(a)))return a;if(/^cid:/i.test(n)){let e=[...t].filter(([e])=>e.toLowerCase()===i.toLowerCase());if(e.length===1&&(/^blob:/.test(e[0][1])||s.test(e[0][1])))return e[0][1]}},g=0,_=e=>{let t=h(e);if(t&&(g+=t.length,g>50331648))throw Error(`Email inline resource expansion limit exceeded.`);return t},v=e=>e.replace(/@import\s+(?:url\([^)]*\)|[^;]*);?/gi,``).replace(/url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/gi,(e,t,n,r)=>{let i=_(String(t??n??r??``));return i?`url("${i.replace(/["\\\r\n]/g,``)}")`:`none`}),y=e=>{let t=e.localName.toLowerCase();for(let n of Array.from(e.attributes)){let r=n.name.toLowerCase();if(t===`img`&&r===`src`){let t=_(n.value);t?e.setAttribute(`src`,t):e.removeAttribute(n.name)}else if(r===`background`){let t=_(n.value);t?e.setAttribute(`background`,t):e.removeAttribute(n.name)}else t===`a`&&r===`href`?/^#[a-z0-9_:.\-]+$/i.test(n.value)||e.removeAttribute(n.name):r===`style`?e.setAttribute(`style`,v(n.value)):o.has(r)||e.removeAttribute(n.name)}},b=0,x=e=>{let t=[...e.children];for(;t.length;){let e=t.pop();if(++b>1e5)throw Error(`Email HTML node limit exceeded.`);let n=e.localName.toLowerCase();if(a.has(n))e.remove();else if(i.has(n))y(e),n===`style`&&(e.textContent=v(e.textContent||``)),t.push(...e.children);else{let n=[...e.children];e.replaceWith(...Array.from(e.childNodes)),t.push(...n)}}};x(f),x(p),y(u),y(p),p.getAttribute(`bgcolor`)&&!p.style.backgroundColor&&(p.style.backgroundColor=p.getAttribute(`bgcolor`)),p.getAttribute(`text`)&&!p.style.color&&(p.style.color=p.getAttribute(`text`)),p.getAttribute(`background`)&&!p.style.backgroundImage&&(p.style.backgroundImage=`url("${p.getAttribute(`background`).replace(/["\\\r\n]/g,``)}")`);let S=(e,t=!1)=>{let n=e.length;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i===38?n+=4:i===60||i===62?n+=3:t&&i===34&&(n+=5)}return n},C=[u],w=0;for(;C.length;){let e=C.pop();if(e.nodeType===3)w+=S(e.nodeValue||``);else if(e.nodeType===1){w+=32;for(let t of Array.from(e.attributes))w+=t.name.length+S(t.value,!0)+8}if(w>67108864)throw Error(`Email HTML serialization limit exceeded.`);C.push(...Array.from(e.childNodes))}let T=e=>e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`),E=e=>Array.from(e.attributes).map(e=>` ${e.name}="${T(e.value)}"`).join(``),D=n?`#111827`:`#fff`,O=n?`#e5e7eb`:`#172033`;return`<!doctype html><html${E(u)}><head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'none'; connect-src 'none'; img-src blob: data:; style-src 'unsafe-inline'; font-src 'none'; media-src 'none'; object-src 'none'; frame-src 'none'; base-uri 'none'; form-action 'none'"><meta name="referrer" content="no-referrer"><style>:root{color-scheme:${n?`dark`:`light`}}body{margin:0;padding:18px;font-family:Aptos,"Segoe UI",sans-serif;line-height:1.6;overflow-wrap:anywhere;background:${D};color:${O}}img{max-width:100%;height:auto}table{max-width:100%}</style>${f.innerHTML}</head><body${E(p)}>${p.innerHTML}</body></html>`}var r,i,a,o,s;function c(){return(c=e((()=>{r=e=>{let t=/^cid:/i.test(e.trim()),n=e.trim().replace(/^cid:/i,``).replace(/^<|>$/g,``);if(t)try{n=decodeURIComponent(n)}catch{}return n},i=new Set(`a abbr address article aside b bdi bdo big blockquote br caption center cite code col colgroup dd del details div dl dt em figcaption figure font footer h1 h2 h3 h4 h5 h6 header hr i img ins kbd label li main mark ol p pre q rp rt ruby s samp section small span strike strong style sub summary sup table tbody td tfoot th thead time title tr tt u ul var wbr`.split(` `)),a=new Set(`script iframe frame frameset object embed applet svg math template noscript audio video source track input link meta base`.split(` `)),o=new Set(`alt title class id style width height align valign bgcolor color face size border cellpadding cellspacing colspan rowspan dir lang role aria-label scope start type value open name text`.split(` `)),s=/^data:image\/(?:png|jpeg|gif|webp|avif|bmp);base64,[a-z0-9+/=\r\n]+$/i})))()}export{r as i,t as n,c as r,n as t};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n,t as r}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as i,S as a,t as o,w as s}from"./src-C1iDJpBK.js";import{U as c,W as l,a as u,ct as d,j as f,lt as p,q as m,s as h,v as g,w as _,x as v,y}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{n as b,t as x}from"./channel-C9Dr7Z-W.js";import{_ as S,c as C,d as w}from"./chunk-75Z2AOVW-IO9R6faP.js";import{n as T}from"./chunk-PWAF6VOD-IORmPx9D.js";import{i as E}from"./chunk-GMAD6QVW-D41KnniX.js";import{n as D}from"./chunk-P2QGCYS3-C9bc1yiM.js";import{r as O}from"./chunk-4HAMMTFA-Aw59LwS3.js";import{r as k}from"./chunk-GVQU2GXP-CVzgM_ui.js";import{i as A}from"./chunk-OSK3NFVY-C9uWOXTC.js";import{n as j,t as M}from"./chunk-XXDRQBXY-Bl6AoSZF.js";import{n as N,t as P}from"./chunk-POPQ4Y6H-P1s5xaxM.js";import{n as F}from"./chunk-L3NEJ4N5-CmvrS7Dt.js";import{i as I,n as L,t as R}from"./chunk-TLUHSLCS-DsqF476v.js";var z,B,V,H,U,W,G,K,q;function J(){return(J=e((()=>{j(),P(),L(),F(),A(),k(),O(),D(),E(),T(),w(),f(),i(),n(),o(),b(),d(),z=(function(){var e=/* @__PURE__ */ t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],r=[2,2],i=[1,7],a=[1,9],o=[1,10],s=[1,11],c=[1,12],l=[1,30],u=[1,23],d=[1,24],f=[1,25],p=[1,26],m=[1,27],h=[1,19],g=[1,28],_=[1,29],v=[1,20],y=[1,18],b=[1,21],x=[1,22],S=[2,6],C=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],w=[1,36],T=[1,37],E=[1,38],D=[1,39],O=[1,40],k=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],A=[1,46],j=[1,47],M=[1,57],N=[43,51,53,54,55,74,75],P=[1,70],F=[1,68],I=[1,65],L=[1,69],R=[1,71],z=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],B=[1,78],V=[1,77],H=[1,76],U=[69,70,71,72,73],W=[1,91],G=[6,9,45,50],K=[6,9,12,44,45,50,51,52],q=[1,101],J=[1,100],Y=[1,99],X=[18,61],ee=[1,110],te=[1,109],ne=[20,43,51,53,54,55],Z=[18,61,64,66],Q={trace:/* @__PURE__ */ t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,9:`NEWLINE`,12:`COLON`,14:`STYLE_SEPARATOR`,16:`BLOCK_START`,18:`BLOCK_STOP`,19:`SQS`,20:`SQE`,21:`title`,22:`title_value`,23:`acc_title`,24:`acc_title_value`,25:`acc_descr`,26:`acc_descr_value`,27:`acc_descr_multiline_value`,33:`END`,34:`SUBGRAPH`,37:`direction_tb`,38:`direction_bt`,39:`direction_rl`,40:`direction_lr`,41:`CLASSDEF`,43:`UNICODE_TEXT`,44:`STYLE_TEXT`,45:`COMMA`,46:`CLASS`,47:`STYLE`,50:`SEMI`,51:`NUM`,52:`BRKT`,53:`ENTITY_NAME`,54:`DECIMAL_NUM`,55:`ENTITY_ONE`,61:`ATTRIBUTE_WORD`,62:`?`,64:`,`,65:`ATTRIBUTE_KEY`,66:`COMMENT`,69:`ZERO_OR_ONE`,70:`ZERO_OR_MORE`,71:`ONE_OR_MORE`,72:`ONLY_ONE`,73:`MD_PARENT`,74:`NON_IDENTIFYING`,75:`IDENTIFYING`,76:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:/* @__PURE__ */ t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:this.$=a[s-1].concat(a[s]);break;case 4:this.$=a[s];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]),this.$=[a[s-4],a[s-2]];break;case 8:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-8],a[s-4]];break;case 9:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]),this.$=[a[s-6],a[s-2]];break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-6],a[s-4]];break;case 11:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]),this.$=[a[s-3]];break;case 12:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]),this.$=[a[s-5]];break;case 13:r.addEntity(a[s-2]),this.$=[a[s-2]];break;case 14:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-4]];break;case 15:r.addEntity(a[s]),this.$=[a[s]];break;case 16:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]),this.$=[a[s-2]];break;case 17:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]),this.$=[a[s-6]];break;case 18:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]),this.$=[a[s-8]];break;case 19:r.addEntity(a[s-5],a[s-3]),this.$=[a[s-5]];break;case 20:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]),this.$=[a[s-7]];break;case 21:r.addEntity(a[s-3],a[s-1]);break;case 22:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 23:case 24:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 27:r.subgraphDepth?this.$=a[s]:(r.setDirection(a[s].value),this.$=[]);break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:a[s-2].id},a[s-1],{text:a[s-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-1],text:a[s-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-4],text:a[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=a[s];break;case 35:this.$=a[s-1]+` `+a[s];break;case 36:this.$={stmt:`dir`,value:`TB`};break;case 37:this.$={stmt:`dir`,value:`BT`};break;case 38:this.$={stmt:`dir`,value:`RL`};break;case 39:this.$={stmt:`dir`,value:`LR`};break;case 40:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 41:case 42:case 63:case 72:this.$=[a[s]];break;case 43:case 44:this.$=a[s-2].concat([a[s]]);break;case 45:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 46:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 47:this.$=[a[s]];break;case 48:a[s-2].push(a[s]),this.$=a[s-2];break;case 50:this.$=a[s-1]+a[s];break;case 58:case 84:case 85:this.$=a[s].replace(/"/g,``);break;case 64:a[s].push(a[s-1]),this.$=a[s];break;case 65:this.$={type:a[s-1],name:a[s]};break;case 66:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 67:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 68:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 69:case 71:case 74:this.$=a[s];break;case 70:this.$=a[s-1]+a[s];break;case 73:a[s-2].push(a[s]),this.$=a[s-2];break;case 75:this.$=a[s].replace(/"/g,``);break;case 76:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},e(n,S,{1:[2,1]}),e(C,[2,3]),e(C,[2,4]),e(C,[2,5]),e(C,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:w,70:T,71:E,72:D,73:O}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),e(C,r,{5:44}),e(k,[2,58]),e(k,[2,59]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),e(C,[2,39]),{15:45,43:A,44:j},{15:48,43:A,44:j},{15:49,43:A,44:j},{10:50,43:h,51:v,53:y,54:b,55:x},{10:51,43:h,51:v,53:y,54:b,55:x},{15:52,43:A,44:j},{17:53,18:[1,54],56:55,57:56,61:M},{10:58,43:h,51:v,53:y,54:b,55:x},{68:59,74:[1,60],75:[1,61]},e(N,[2,77]),e(N,[2,78]),e(N,[2,79]),e(N,[2,80]),e(N,[2,81]),e(C,[2,23]),e(C,[2,24]),e(C,[2,25]),{6:[1,63],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},{12:P,42:64,44:F,45:I,48:66,49:67,51:L,52:R},e(z,[2,41]),e(z,[2,42]),{15:72,43:A,44:j,45:I},{12:P,42:73,44:F,45:I,48:66,49:67,51:L,52:R},{6:B,9:V,19:[1,75],35:74,50:H},{12:[1,79],14:[1,80]},e(C,[2,16],{67:35,11:81,16:[1,82],45:I,69:w,70:T,71:E,72:D,73:O}),{18:[1,83]},e(C,[2,13]),{17:84,18:[2,63],56:55,57:56,61:M},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:w,70:T,71:E,72:D,73:O},e(U,[2,82]),e(U,[2,83]),e(C,[2,31]),e(C,S),{6:B,9:V,35:90,45:W,50:H},{43:[1,92],44:[1,93]},e(G,[2,47],{49:94,12:P,44:F,51:L,52:R}),e(K,[2,49]),e(K,[2,54]),e(K,[2,55]),e(K,[2,56]),e(K,[2,57]),e(C,[2,45],{45:I}),{6:B,9:V,35:95,45:W,50:H},e(C,[2,32]),{10:97,36:96,43:h,51:v,53:y,54:b,55:x},e(C,[2,51]),e(C,[2,52]),e(C,[2,53]),{13:98,43:q,53:J,76:Y},{15:102,43:A,44:j},{10:103,43:h,51:v,53:y,54:b,55:x},{17:104,18:[1,105],56:55,57:56,61:M},e(C,[2,11]),{18:[2,64]},e(X,[2,65],{59:106,60:107,63:108,65:ee,66:te}),e([18,61,65,66],[2,71]),{61:[2,70]},e(C,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(C,[2,40]),{12:P,44:F,48:113,49:67,51:L,52:R},e(z,[2,43]),e(z,[2,44]),e(K,[2,50]),e(C,[2,46]),{10:115,20:[1,114],43:h,51:v,53:y,54:b,55:x},e(ne,[2,34]),e(C,[2,7]),e(C,[2,84]),e(C,[2,85]),e(C,[2,86]),{12:[1,116],45:I},{12:[1,118],14:[1,117]},{18:[1,119]},e(C,[2,14]),e(X,[2,66],{60:120,64:[1,121],66:te}),e(X,[2,67]),e(Z,[2,72]),e(X,[2,75]),e(Z,[2,74]),{17:122,18:[1,123],56:55,57:56,61:M},{15:124,43:A,44:j},e(G,[2,48],{49:94,12:P,44:F,51:L,52:R}),{6:B,9:V,35:125,50:H},e(ne,[2,35]),{13:126,43:q,53:J,76:Y},{15:127,43:A,44:j},{13:128,43:q,53:J,76:Y},e(C,[2,12]),e(X,[2,68]),{63:129,65:ee},{18:[1,130]},e(C,[2,19]),e(C,[2,22],{16:[1,131],45:I}),e(C,[2,33]),e(C,[2,10]),{12:[1,132],45:I},e(C,[2,9]),e(Z,[2,73]),e(C,[2,17]),{17:133,18:[1,134],56:55,57:56,61:M},{13:135,43:q,53:J,76:Y},{18:[1,136]},e(C,[2,20]),e(C,[2,8]),e(C,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:/* @__PURE__ */ t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:/* @__PURE__ */ t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
+
`+h.showPosition()+`
|
|
3
|
+
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Q.lexer=/* @__PURE__ */ (function(){return{EOF:1,parseError:/* @__PURE__ */ t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:/* @__PURE__ */ t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:/* @__PURE__ */ t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:/* @__PURE__ */ t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:/* @__PURE__ */ t(function(){return this._more=!0,this},`more`),reject:/* @__PURE__ */ t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:/* @__PURE__ */ t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:/* @__PURE__ */ t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:/* @__PURE__ */ t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:/* @__PURE__ */ t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:/* @__PURE__ */ t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:/* @__PURE__ */ t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:/* @__PURE__ */ t(function(){return this.next()||this.lex()},`lex`),begin:/* @__PURE__ */ t(function(e){this.conditionStack.push(e)},`begin`),popState:/* @__PURE__ */ t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:/* @__PURE__ */ t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:/* @__PURE__ */ t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:/* @__PURE__ */ t(function(e){this.begin(e)},`pushState`),stateStackSize:/* @__PURE__ */ t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:/* @__PURE__ */ t(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),23;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),25;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin(`block`),16;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin(`block_bq`);break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;case 32:return t.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin(`style`),47;case 36:return this.popState(),9;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin(`style`),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return t.yytext[0];case 82:return 6}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}}})();function $(){this.yy={}}return t($,`Parser`),$.prototype=Q,Q.Parser=$,new $})(),z.parser=z,B=z,V=class{constructor(){this.entities=/* @__PURE__ */ new Map,this.relationships=[],this.classes=/* @__PURE__ */ new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=/* @__PURE__ */ new Map,this.subCount=0,this.direction=`TB`,this.Cardinality={ZERO_OR_ONE:`ZERO_OR_ONE`,ZERO_OR_MORE:`ZERO_OR_MORE`,ONE_OR_MORE:`ONE_OR_MORE`,ONLY_ONE:`ONLY_ONE`,MD_PARENT:`MD_PARENT`},this.Identification={NON_IDENTIFYING:`NON_IDENTIFYING`,IDENTIFYING:`IDENTIFYING`},this.setAccTitle=l,this.getAccTitle=y,this.setAccDescription=c,this.getAccDescription=g,this.setDiagramTitle=m,this.getDiagramTitle=_,this.getConfig=/* @__PURE__ */ t(()=>v().er,`getConfig`),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{t(this,`ErDB`)}addEntity(e,t=``){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,s.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:t,shape:`erBox`,look:v().look??`default`,cssClasses:`default`,cssStyles:[],labelType:`markdown`}),s.info(`Added new entity :`,e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let n=this.addEntity(e),r;for(r=t.length-1;r>=0;r--)t[r].keys||(t[r].keys=[]),t[r].comment||(t[r].comment=``),n.attributes.push(t[r]),s.debug(`Added attribute `,t[r].name)}addRelationship(e,t,n,r){let i;if(this.subGraphLookup.has(e))i=e;else{let t=this.addEntity(e);if(!t)return;i=t.id}let a;if(this.subGraphLookup.has(n))a=n;else{let e=this.addEntity(n);if(!e)return;a=e.id}let o={entityA:i,roleA:t,entityB:a,relSpec:r};this.relationships.push(o),s.debug(`Added new relationship :`,o)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e?.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e?.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}addCssStyles(e,t){for(let n of e){let e=this.entities.get(n),r=this.subGraphLookup.get(n);if(t){if(e)for(let n of t)e.cssStyles.push(n);if(r){r.cssStyles||=[];for(let e of t)r.cssStyles.push(e)}}}}addClass(e,t){e.forEach(e=>{let n=this.classes.get(e);n===void 0&&(n={id:e,styles:[],textStyles:[]},this.classes.set(e,n)),t&&t.forEach(function(e){if(/color/.exec(e)){let t=e.replace(`fill`,`bgFill`);n.textStyles.push(t)}n.styles.push(e)})})}addSubGraph(e,n,r){let i=e.text.trim(),a=r.text,o=(/* @__PURE__ */ t(e=>{let t=/* @__PURE__ */ new Set,n;return{nodeList:e.filter(e=>{if(e?.stmt)return e.stmt===`dir`&&(n=e.value),!1;if(typeof e!=`string`)return!1;let r=e.trim();return!r||t.has(r)?!1:(t.add(r),!0)}),dir:n}},`uniq`))(n.flat()),c=o.nodeList,l=o.dir;i??=`subGraph`+this.subCount,a||=``,a=this.sanitizeText(a),this.subCount+=1;let u={id:i,nodes:c,title:a.trim(),classes:[],cssStyles:[],dir:l,labelType:this.sanitizeNodeLabelType(r?.type)};return s.info(`Adding`,u.id,u.nodes,u.dir),u.nodes=this.makeUniq(u,this.subGraphs).nodes,this.subGraphs.push(u),this.subGraphLookup.set(i,u),i}getSubGraphs(){return this.subGraphs}setClass(e,t){for(let n of e){let e=this.entities.get(n);if(e)for(let n of t)e.cssClasses+=` `+n;let r=this.subGraphLookup.get(n);if(r)for(let e of t)r.classes.push(e)}}subgraphNodeCache(e){let t=/* @__PURE__ */ new Set;for(let n of e)for(let e of n.nodes)t.add(e);return t}makeUniq(e,t){let n=this.subgraphNodeCache(t),r=[];return e.nodes.forEach((t,i)=>{n.has(t)?s.warn(`Entity '${t}' already belongs to another subgraph and will be ignored`):r.push(e.nodes[i])}),{nodes:r}}sanitizeText(e){return h.sanitizeText(e,v())}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}clear(){this.entities=/* @__PURE__ */ new Map,this.classes=/* @__PURE__ */ new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=/* @__PURE__ */ new Map,this.subCount=0,this.subgraphDepth=0,u()}getData(){let e=[],t=[],n=v(),r=this.getSubGraphs(),i=/* @__PURE__ */ new Map,a=/* @__PURE__ */ new Map;for(let e=r.length-1;e>=0;e--){let t=r[e];t.nodes.length>0&&a.set(t.id,!0);for(let e of t.nodes)i.set(e,t.id)}for(let t=r.length-1;t>=0;t--){let a=r[t];e.push({id:a.id,label:a.title,labelStyle:``,labelType:a.labelType,parentId:i.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssStyles:a.cssStyles,cssClasses:a.classes.join(` `),shape:`rect`,dir:a.dir,isGroup:!0,look:n.look})}let o=new Set(r.map(e=>e.id)),s=0;for(let t of this.entities.keys()){if(o.has(t))continue;let n=this.entities.get(t);n&&(n.cssCompiledStyles=this.getCompiledStyles(n.cssClasses.split(` `)),n.colorIndex=s++,e.push({...n,parentId:i.get(t),isGroup:!1}))}let c=0;for(let e of this.relationships){let r={id:C(e.entityA,e.entityB,{prefix:`id`,counter:c++}),type:`normal`,curve:`basis`,start:e.entityA,end:e.entityB,label:e.roleA,labelpos:`c`,thickness:`normal`,classes:`relationshipLine`,arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:e.relSpec.relType==`IDENTIFYING`?`solid`:`dashed`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:this.direction}}},H={},r(H,{draw:()=>U}),U=/* @__PURE__ */ t(async function(e,t,n,r){s.info(`REF0:`),s.info(`Drawing er diagram (unified)`,t);let{securityLevel:i,er:o,layout:c}=v(),l=r.db.getData(),u=M(t,i);l.type=r.type,l.layoutAlgorithm=R(c),l.config.flowchart.nodeSpacing=o?.nodeSpacing||140,l.config.flowchart.rankSpacing=o?.rankSpacing||80,l.direction=r.db.getDirection();let{config:d}=l,{look:f}=d;l.markers=f===`neo`?[`only_one_neo`,`zero_or_one_neo`,`one_or_more_neo`,`zero_or_more_neo`]:[`only_one`,`zero_or_one`,`one_or_more`,`zero_or_more`],l.diagramId=t,await I(l,u),l.layoutAlgorithm===`elk`&&u.select(`.edges`).lower();let p=u.selectAll(`[id*="-background"]`);Array.from(p).length>0&&p.each(function(){let e=a(this),t=e.attr(`id`).replace(`-background`,``),n=u.select(`#${CSS.escape(t)}`);if(!n.empty()){let t=n.attr(`transform`);e.attr(`transform`,t)}}),S.insertTitle(u,`erDiagramTitleText`,o?.titleTopMargin??25,r.db.getDiagramTitle()),N(u,8,`erDiagram`,o?.useMaxWidth??!0)},`draw`),W=/* @__PURE__ */ t((e,t)=>{let n=x,r=n(e,`r`),i=n(e,`g`),a=n(e,`b`);return p(r,i,a,t)},`fade`),G=/* @__PURE__ */ new Set([`redux-color`,`redux-dark-color`]),K=/* @__PURE__ */ t(e=>{let{theme:t,look:n,bkgColorArray:r,borderColorArray:i}=e;if(!G.has(t))return``;let a=r?.length>0,o=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)o+=`
|
|
7
|
+
|
|
8
|
+
[data-look="${n}"][data-color-id="color-${t}"].node path {
|
|
9
|
+
stroke: ${i[t]};
|
|
10
|
+
${a?`fill: ${r[t]};`:``}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-look="${n}"][data-color-id="color-${t}"].node rect {
|
|
14
|
+
stroke: ${i[t]};
|
|
15
|
+
${a?`fill: ${r[t]};`:``}
|
|
16
|
+
}
|
|
17
|
+
`;return o},`genColor`),q={parser:B,get db(){return new V},renderer:H,styles:/* @__PURE__ */ t(e=>{let{look:t,theme:n,erEdgeLabelBackground:r,strokeWidth:i}=e;return`
|
|
18
|
+
${K(e)}
|
|
19
|
+
.entityBox {
|
|
20
|
+
fill: ${e.mainBkg};
|
|
21
|
+
stroke: ${e.nodeBorder};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.relationshipLabelBox {
|
|
25
|
+
fill: ${e.tertiaryColor};
|
|
26
|
+
opacity: 0.7;
|
|
27
|
+
background-color: ${e.tertiaryColor};
|
|
28
|
+
rect {
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.labelBkg {
|
|
34
|
+
background-color: ${G.has(n)&&r?r:W(e.tertiaryColor,.5)};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.edgeLabel {
|
|
38
|
+
background-color: ${G.has(n)&&r?r:e.edgeLabelBackground};
|
|
39
|
+
}
|
|
40
|
+
.edgeLabel .label rect {
|
|
41
|
+
fill: ${G.has(n)&&r?r:e.edgeLabelBackground};
|
|
42
|
+
}
|
|
43
|
+
.edgeLabel .label text {
|
|
44
|
+
fill: ${e.textColor};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.edgeLabel .label {
|
|
48
|
+
fill: ${e.nodeBorder};
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.label {
|
|
53
|
+
font-family: ${e.fontFamily};
|
|
54
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.edge-pattern-dashed {
|
|
58
|
+
stroke-dasharray: 8,8;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.node rect,
|
|
62
|
+
.node circle,
|
|
63
|
+
.node ellipse,
|
|
64
|
+
.node polygon
|
|
65
|
+
{
|
|
66
|
+
fill: ${e.mainBkg};
|
|
67
|
+
stroke: ${e.nodeBorder};
|
|
68
|
+
stroke-width: ${t===`neo`?i:`1px`};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.relationshipLine {
|
|
72
|
+
stroke: ${e.lineColor};
|
|
73
|
+
stroke-width: ${t===`neo`?i:`1px`};
|
|
74
|
+
fill: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.marker {
|
|
78
|
+
fill: none !important;
|
|
79
|
+
stroke: ${e.lineColor} !important;
|
|
80
|
+
stroke-width: 1;
|
|
81
|
+
}
|
|
82
|
+
[data-look=neo].labelBkg {
|
|
83
|
+
background-color: ${W(e.tertiaryColor,.5)};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cluster rect {
|
|
87
|
+
fill: ${e.clusterBkg??e.mainBkg};
|
|
88
|
+
stroke: ${e.clusterBorder??e.nodeBorder};
|
|
89
|
+
stroke-width: 1px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.cluster text {
|
|
93
|
+
fill: ${e.titleColor??e.textColor};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.cluster-label text {
|
|
97
|
+
fill: ${e.titleColor??e.textColor};
|
|
98
|
+
}
|
|
99
|
+
`},`getStyles`)}})))()}J();export{q as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{w as t}from"./chunk-FOHPRMQF-B8MMrnxV.js";import{n,r}from"./chunk-6EIED4P4-CXz5D9B0.js";function i(){return(i=e((()=>{r(),t()})))()}i();export{n as createEventModelingServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";var t,n,r,i,a,o,s,c,l,u,d,f;function p(){return(p=e((()=>{t=(e,t)=>{let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,r.rel=`noopener`,document.body.appendChild(r),r.click(),r.remove(),window.setTimeout(()=>URL.revokeObjectURL(n),4e3)},n=(e,t)=>{let n=document.createElement(`a`);n.href=e,n.download=t,n.rel=`noopener`,n.target=`_blank`,document.body.appendChild(n),n.click(),n.remove()},r=(e,t)=>{let n=Array.from(e.querySelectorAll(`canvas`));Array.from(t.querySelectorAll(`canvas`)).forEach((t,r)=>{let i=n[r];if(i)try{let n=e.ownerDocument.createElement(`img`);n.src=i.toDataURL(`image/png`),n.alt=`rendered canvas`,n.style.maxWidth=`100%`,n.style.display=`block`,n.style.margin=`0 auto`,t.replaceWith(n)}catch{}})},i=e=>new Promise(t=>{let n=e||globalThis.window;if(!n||typeof n.requestAnimationFrame!=`function`){(n?.setTimeout?n.setTimeout.bind(n):globalThis.setTimeout.bind(globalThis))(()=>t(),0);return}let r=n.requestAnimationFrame.bind(n);r(()=>{r(()=>t())})}),a=async e=>{if(!e||typeof e.querySelectorAll!=`function`)return;let t=Array.from(e.querySelectorAll(`img`));await Promise.all(t.map(async e=>{if(!e.complete){if(`decode`in e)try{await e.decode();return}catch{}await new Promise(t=>{e.addEventListener(`load`,()=>t(),{once:!0}),e.addEventListener(`error`,()=>t(),{once:!0})})}}))},o=(e,t)=>{let n=t||`application/octet-stream`,r=globalThis.Buffer;if(r)return`data:${n};base64,${r.from(e).toString(`base64`)}`;let i=``,a=new Uint8Array(e);for(let e=0;e<a.length;e+=1)i+=String.fromCharCode(a[e]);return`data:${n};base64,${btoa(i)}`},s=async e=>{if(typeof FileReader==`function`)try{return await new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result||``)),r.onerror=()=>n(r.error||/* @__PURE__ */ Error(`Failed to read blob`)),r.readAsDataURL(e)})}catch{}return o(await e.arrayBuffer(),e.type||`application/octet-stream`)},c=e=>{let t=e.match(/blob:[^\s"'<>)\\]+/g)||[];return Array.from(new Set(t))},l=async e=>{if(!e.includes(`blob:`)||typeof fetch!=`function`)return e;let t=c(e);if(!t.length)return e;let n=await Promise.all(t.map(async e=>{try{let t=await fetch(e);if(!t.ok)return null;let n=await t.blob(),r=await s(n);return r?[e,r]:null}catch{return null}})),r=e;for(let e of n){if(!e)continue;let[t,n]=e;r=r.split(t).join(n)}return r},u=async e=>{let{document:t}=e;t.readyState!==`complete`&&await new Promise(t=>{e.addEventListener(`load`,()=>t(),{once:!0}),e.setTimeout(()=>t(),1200)}),await Promise.all(Array.from(t.images).map(async t=>{if(!t.complete){if(`decode`in t)try{await t.decode();return}catch{}await new Promise(n=>{t.addEventListener(`load`,()=>n(),{once:!0}),t.addEventListener(`error`,()=>n(),{once:!0}),e.setTimeout(()=>n(),1500)})}})),await new Promise(t=>{let n=!1,r,i=()=>{n||(n=!0,r!==void 0&&e.clearTimeout(r),t())};r=e.setTimeout(i,250);try{e.requestAnimationFrame(()=>{e.requestAnimationFrame(i)})}catch{i()}})},d=async(e,t)=>t.mode!==`print`||!e?.printStyle?``:typeof e.printStyle==`function`?await e.printStyle(t):e.printStyle,f=async(e,t)=>{await(t?.beforeSnapshot)?.call(t),await i(e.ownerDocument.defaultView||void 0),await a(e)}})))()}export{d as a,a as c,r as i,i as l,l as n,t as o,f as r,n as s,p as t,u};
|