@spteck/react-controls-v2 2.3.5 → 2.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LocalizationProvider-B6NxHbu2.cjs +2 -0
- package/dist/LocalizationProvider-te5iu_6z.js +363 -0
- package/dist/_arrayEach-BuSFKyFt.js +54 -0
- package/dist/_arrayEach-ChR-TejB.cjs +2 -0
- package/dist/_getTag-BRuLtYrv.js +28 -0
- package/dist/_getTag-D6VVyrEu.cjs +2 -0
- package/dist/abstractions/IApplicationContext.d.ts +0 -1
- package/dist/abstractions/IAuthenticationProvider.d.ts +0 -1
- package/dist/abstractions/ILocalizationProvider.d.ts +0 -1
- package/dist/abstractions/providers/ConsoleLoggingProvider.d.ts +0 -1
- package/dist/abstractions/providers/DefaultGraphClient.d.ts +0 -1
- package/dist/abstractions/providers/DefaultLocalizationProvider.d.ts +0 -1
- package/dist/abstractions/providers/LocalStorageProvider.d.ts +0 -1
- package/dist/abstractions/providers/LocalizationProvider.d.ts +0 -1
- package/dist/ar-Blifx2MN.js +210 -0
- package/dist/ar-ip3bGOX3.cjs +2 -0
- package/dist/arc-4yb49ncY.js +82 -0
- package/dist/arc-djsA8IT0.cjs +2 -0
- package/dist/architecture-PBZL5I3N-CvTfVLFi.js +3 -0
- package/dist/architecture-PBZL5I3N-wZIE3ggH.cjs +1 -0
- package/dist/architectureDiagram-2XIMDMQ5-DFEvJNx1.cjs +37 -0
- package/dist/architectureDiagram-2XIMDMQ5-g-HotzpG.js +4047 -0
- package/dist/array-BNB_vRFv.cjs +2 -0
- package/dist/array-DP0duYiO.js +8 -0
- package/dist/az-CMhDjtnj.js +210 -0
- package/dist/az-CyVLdUDz.cjs +2 -0
- package/dist/bg-Bexoz3hL.cjs +2 -0
- package/dist/bg-C96WirSv.js +210 -0
- package/dist/blockDiagram-WCTKOSBZ-DWgb5Ghz.js +3165 -0
- package/dist/blockDiagram-WCTKOSBZ-Dl04FBAy.cjs +133 -0
- package/dist/bs-MMcvhwLv.cjs +2 -0
- package/dist/bs-_St1wBE_.js +210 -0
- package/dist/c4Diagram-IC4MRINW-ClZvialQ.js +2966 -0
- package/dist/c4Diagram-IC4MRINW-ZFE2cGZP.cjs +11 -0
- package/dist/ca-BspMSeHN.cjs +2 -0
- package/dist/ca-QlLcV4wf.js +210 -0
- package/dist/channel-2Bqnb1FY.js +7 -0
- package/dist/channel-5_aP1EVB.cjs +2 -0
- package/dist/chunk-4BX2VUAB-B5Va_oZz.js +10 -0
- package/dist/chunk-4BX2VUAB-BWDW-gYk.cjs +2 -0
- package/dist/chunk-55IACEB6-4ind_ByS.cjs +2 -0
- package/dist/chunk-55IACEB6-Pcyz_aR_.js +10 -0
- package/dist/chunk-7E7YKBS2-Sw9_w4gt.cjs +2 -0
- package/dist/chunk-7E7YKBS2-VHdgsed6.js +25 -0
- package/dist/chunk-7R4GIKGN-BKoqTTU_.cjs +81 -0
- package/dist/chunk-7R4GIKGN-CaQJ0QBF.js +2598 -0
- package/dist/chunk-C72U2L5F-CCvi6jiy.cjs +2 -0
- package/dist/chunk-C72U2L5F-MjJQTOMh.js +25 -0
- package/dist/chunk-D-IZpNpi.cjs +1 -0
- package/dist/chunk-EGIJ26TM-Bffl84Wq.cjs +2 -0
- package/dist/chunk-EGIJ26TM-DLMAfvpZ.js +25 -0
- package/dist/{chunk-FMBD7UC4-B7ANnE_H.js → chunk-FMBD7UC4-BvqqU04Z.cjs} +3 -7
- package/dist/chunk-FMBD7UC4-xjRtkFXe.js +7 -0
- package/dist/chunk-GEFDOKGD-BNgT40Ex.js +1302 -0
- package/dist/chunk-GEFDOKGD-BOwd6Jqp.cjs +3 -0
- package/dist/chunk-GLR3WWYH-DdNAJNRC.cjs +2 -0
- package/dist/chunk-GLR3WWYH-kyo6BUtq.js +43 -0
- package/dist/chunk-HHEYEP7N-DO1AYIZw.js +11 -0
- package/dist/chunk-HHEYEP7N-pdmgQZzP.cjs +2 -0
- package/dist/chunk-JSJVCQXG-Ci0seBb4.cjs +2 -0
- package/dist/chunk-JSJVCQXG-DowfYWcD.js +62 -0
- package/dist/chunk-KX2RTZJC-BJeOHReu.cjs +2 -0
- package/dist/chunk-KX2RTZJC-D-bUTSNy.js +27 -0
- package/dist/chunk-KYZI473N-DEPuSXaW.js +3436 -0
- package/dist/chunk-KYZI473N-DzBMFOER.cjs +54 -0
- package/dist/chunk-L3YUKLVL-BDGCTzmy.js +25 -0
- package/dist/chunk-L3YUKLVL-BZ17sqh5.cjs +2 -0
- package/dist/chunk-MX3YWQON-CAsnAj2e.js +82 -0
- package/dist/chunk-MX3YWQON-DulrBJdn.cjs +2 -0
- package/dist/chunk-NBPlniwU.js +23 -0
- package/dist/chunk-NQ4KR5QH-BJBAT2kM.cjs +221 -0
- package/dist/chunk-NQ4KR5QH-DFem-ORD.js +2004 -0
- package/dist/chunk-O4XLMI2P-BQF7MAo7.cjs +8 -0
- package/dist/chunk-O4XLMI2P-DA4TPzPG.js +513 -0
- package/dist/chunk-OZEHJAEY-CAiiXJUP.cjs +2 -0
- package/dist/chunk-OZEHJAEY-D7SX2SbR.js +66 -0
- package/dist/chunk-PQ6SQG4A-BZnW4-Sd.cjs +2 -0
- package/dist/chunk-PQ6SQG4A-ObFGkauo.js +69 -0
- package/dist/chunk-PU5JKC2W-BM5NPS-q.js +1887 -0
- package/dist/chunk-PU5JKC2W-eRU8wnTH.cjs +71 -0
- package/dist/chunk-QZHKN3VN-Dhli_tM0.cjs +2 -0
- package/dist/chunk-QZHKN3VN-x258g6EH.js +17 -0
- package/dist/chunk-R5LLSJPH-CNTEucEd.cjs +2 -0
- package/dist/chunk-R5LLSJPH-Gt27ml2m.js +37 -0
- package/dist/chunk-WL4C6EOR-CQXw6d0l.cjs +190 -0
- package/dist/chunk-WL4C6EOR-DuM6QmqM.js +3196 -0
- package/dist/chunk-XIRO2GV7-CswC9CO8.cjs +2 -0
- package/dist/chunk-XIRO2GV7-DXlO8X82.js +32 -0
- package/dist/chunk-XPW4576I-Bpsr4SZJ.js +1148 -0
- package/dist/chunk-XPW4576I-C68T-WIW.cjs +33 -0
- package/dist/chunk-XZSTWKYB-DJv9rEVU.cjs +95 -0
- package/dist/chunk-XZSTWKYB-jD9M1izK.js +16132 -0
- package/dist/chunk-YBOYWFTD-B6CeuteH.js +34 -0
- package/dist/chunk-YBOYWFTD-CiLW6HW_.cjs +2 -0
- package/dist/classDiagram-VBA2DB6C-Us0kuDfz.cjs +2 -0
- package/dist/classDiagram-VBA2DB6C-VOsE3gN0.js +31 -0
- package/dist/classDiagram-v2-RAHNMMFH-BWsm3ea6.cjs +2 -0
- package/dist/classDiagram-v2-RAHNMMFH-DPqMNfOz.js +31 -0
- package/dist/components/AISearchControl/useAISearchControlStyles.d.ts +0 -1
- package/dist/components/AspectRatio/AspectRatio.d.ts +0 -1
- package/dist/components/AspectRatio/IAspectRationProps.d.ts +0 -1
- package/dist/components/Card/ICardProps.d.ts +0 -1
- package/dist/components/Carousel/ICarouselProps.d.ts +0 -1
- package/dist/components/Carousel/useCarouselButton.d.ts +0 -1
- package/dist/components/Carousel/useCarouselStyles.d.ts +0 -1
- package/dist/components/Center/ICenterProps.d.ts +0 -1
- package/dist/components/ContentRenderer/IContentRendererProps.d.ts +0 -1
- package/dist/components/DataGridV2/DataGridV2.d.ts +2 -1
- package/dist/components/DataGridV2/IDataGridV2ExtraProps.d.ts +0 -1
- package/dist/components/Grid/IGridProps.d.ts +0 -1
- package/dist/components/ItemPicker/IItemPickerProps.d.ts +0 -1
- package/dist/components/KPIControl/IKpiCardProps.d.ts +0 -1
- package/dist/components/ListItemActivityMessage/IActivity.d.ts +0 -1
- package/dist/components/ListItemActivityMessage/IActivityMessageProps.d.ts +0 -1
- package/dist/components/ListItemActivityMessage/IActor.d.ts +0 -1
- package/dist/components/ListItemActivityMessage/useSharePointActivities.d.ts +0 -1
- package/dist/components/ListToolbar/FlatItem.d.ts +0 -1
- package/dist/components/ListToolbar/IListToolbarProps.d.ts +0 -1
- package/dist/components/ListToolbar/IToolbarItem.d.ts +0 -1
- package/dist/components/ListToolbar/IToolbarItemRendererProps.d.ts +0 -1
- package/dist/components/ListToolbar/helpers.d.ts +0 -1
- package/dist/components/MermaidDiagram/useMermaidDiagramStyles.d.ts +0 -1
- package/dist/components/Navigation/Navigation.d.ts +0 -1
- package/dist/components/Popup/Popup.d.ts +0 -1
- package/dist/components/Provider/UniversalProvider.d.ts +0 -1
- package/dist/components/Space/ISpaceProps.d.ts +0 -1
- package/dist/components/SplitPane/ISplitPaneProps.d.ts +0 -1
- package/dist/components/SplitPane/useSplitPaneStyles.d.ts +0 -1
- package/dist/components/Stack/IStackProps.d.ts +0 -1
- package/dist/components/StackedUsers/IStackedUsersProps.d.ts +0 -1
- package/dist/components/StackedUsers/StackedUsers.d.ts +0 -1
- package/dist/components/adaptiveCardHost/AdaptiveCardHost.HostConfig.d.ts +0 -1
- package/dist/components/adaptiveCardHost/AdaptiveCardHost.Utilities.d.ts +0 -1
- package/dist/components/adaptiveCardHost/AdaptiveCardHost.d.ts +0 -1
- package/dist/components/adaptiveCardHost/IAdaptiveCardHostProps.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/Elements.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUIChoiceSetInput.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUIDateInput.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUINumberInput.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUITextInput.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUIToggleInput.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/HostCapability.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/HostConfig.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/Styles.d.ts +0 -1
- package/dist/components/adaptiveCardHost/models/IAdaptiveCardHostConfigResult.d.ts +0 -1
- package/dist/components/adaptiveCardHost/models/IAdaptiveCardHostEvaluationContext.d.ts +0 -1
- package/dist/components/aiAssistant/ChatAction.d.ts +0 -1
- package/dist/components/aiAssistant/ChatInputProps.d.ts +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensions.d.ts +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensionsProps.d.ts +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensionsV1.d.ts +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensionsV2.d.ts +0 -1
- package/dist/components/aiAssistant/ChatState.d.ts +0 -1
- package/dist/components/aiAssistant/IAIAssistantProps.d.ts +0 -1
- package/dist/components/aiAssistant/chatReducer.d.ts +0 -1
- package/dist/components/aiAssistant/useChatInputStyles.d.ts +0 -1
- package/dist/components/aiAssistant/useChatInputWithMensionsStyles.d.ts +0 -1
- package/dist/components/aiAssistant/useStyles.d.ts +0 -1
- package/dist/components/appDashboard/AppDashboard.d.ts +0 -1
- package/dist/components/appDashboard/IAppDashboardProps.d.ts +0 -1
- package/dist/components/baseComponentProps/IBaseProps.d.ts +0 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts +0 -1
- package/dist/components/breadcrumb/IBreadcrumProps.d.ts +0 -1
- package/dist/components/breadcrumb/OverflowMenu.d.ts +0 -1
- package/dist/components/breadcrumb/useBreadcrumStyles.d.ts +0 -1
- package/dist/components/calendarControl/hooks/useCalendar.d.ts +0 -1
- package/dist/components/calendarControl/hooks/useUtils.d.ts +0 -1
- package/dist/components/calendarControl/models/ICalendarControlProps.d.ts +0 -1
- package/dist/components/calendarControl/models/IEvents.d.ts +0 -1
- package/dist/components/customControlBar/ICustomControlBarProps.d.ts +0 -1
- package/dist/components/dataGrid/DataGrid.d.ts +0 -1
- package/dist/components/dataGrid/IDataGridProps.d.ts +0 -1
- package/dist/components/dataGrid/ISortState.d.ts +0 -1
- package/dist/components/dataGrid/stack/IStackProps.d.ts +0 -1
- package/dist/components/dataGrid/stack/Stack.d.ts +0 -1
- package/dist/components/dataGrid/useDataGridStyles.d.ts +0 -1
- package/dist/components/dropDownField/IDropDownFieldProps.d.ts +0 -1
- package/dist/components/fluentUIProvider/FluentUIProvider.d.ts +0 -1
- package/dist/components/iconButton/IconButton.d.ts +0 -1
- package/dist/components/iconButton/IconButtonProps.d.ts +0 -1
- package/dist/components/mensions/IMensionsProps.d.ts +0 -1
- package/dist/components/mensions/Mensions.d.ts +0 -1
- package/dist/components/mensions/MensionsExample.d.ts +0 -1
- package/dist/components/renderAdaptiveCard/RenderAdaptiveCard.d.ts +0 -1
- package/dist/components/searchControl/useSearchControlStyles.d.ts +0 -1
- package/dist/components/selectView/SelectView.d.ts +0 -1
- package/dist/components/showError/ShowError.d.ts +0 -1
- package/dist/components/stackv2/IStackV2Props.d.ts +0 -1
- package/dist/components/stackv2/StackV2.d.ts +0 -1
- package/dist/components/userCard/IUserCardProps.d.ts +0 -1
- package/dist/components/userCard/IUserInfo.d.ts +0 -1
- package/dist/components/userCard/UserCard.d.ts +0 -1
- package/dist/components/userCard/constants.d.ts +0 -1
- package/dist/components/userCard/useUserProfile.d.ts +0 -1
- package/dist/components/videoPlayer/VideoPlayer.d.ts +0 -1
- package/dist/components/videoPlayer/useVideoStyles.d.ts +0 -1
- package/dist/components/worldMap/IWorldMapProps.d.ts +0 -1
- package/dist/components/worldMap/MaplibreWorldMapProps.d.ts +0 -1
- package/dist/components/worldMap/WorldMap.d.ts +0 -1
- package/dist/components/worldMap/WorldMapControl.d.ts +0 -1
- package/dist/components/worldMap/useCleanMapStyle.d.ts +0 -1
- package/dist/components/worldMap/useGeocodedCountries.d.ts +0 -1
- package/dist/cose-bilkent-S5V4N54A-CKhwzobJ.js +2252 -0
- package/dist/cose-bilkent-S5V4N54A-DmyaRQ6l.cjs +2 -0
- package/dist/cs-FZSeHYld.cjs +2 -0
- package/dist/cs-MrS2bH7F.js +210 -0
- package/dist/cy-BX97Tgwk.js +210 -0
- package/dist/cy-CzQmM2lQ.cjs +2 -0
- package/dist/cytoscape.esm-CcJAI0wG.cjs +322 -0
- package/dist/cytoscape.esm-D9EjU25_.js +18102 -0
- package/dist/da-BnewPPrh.js +210 -0
- package/dist/da-CexFt-Oj.cjs +2 -0
- package/dist/dagre-CpEPaL3r.cjs +2 -0
- package/dist/dagre-Dd8wCGc6.js +1305 -0
- package/dist/dagre-KLK3FWXG-BpxkjvB3.js +294 -0
- package/dist/dagre-KLK3FWXG-DIznPQl_.cjs +5 -0
- package/dist/de-B68HwuYu.cjs +2 -0
- package/dist/de-BSZuzGTL.js +210 -0
- package/dist/defaultLocale-CYOzCjwh.js +203 -0
- package/dist/defaultLocale-DSgylVA1.cjs +2 -0
- package/dist/diagram-E7M64L7V-dXqTi77U.cjs +25 -0
- package/dist/diagram-E7M64L7V-oX07GVAD.js +529 -0
- package/dist/diagram-IFDJBPK2-CriVAAmI.cjs +44 -0
- package/dist/diagram-IFDJBPK2-lCNF06_S.js +215 -0
- package/dist/diagram-P4PSJMXO-TfwVJh4S.js +135 -0
- package/dist/diagram-P4PSJMXO-k7F0lH6Q.cjs +25 -0
- package/dist/dist-CV9Ez7cn.js +52 -0
- package/dist/dist-DVthN7lF.cjs +2 -0
- package/dist/el-DQc4jSMd.cjs +2 -0
- package/dist/el-DrOk3N7-.js +210 -0
- package/dist/erDiagram-INFDFZHY-CDt3mOSU.cjs +71 -0
- package/dist/erDiagram-INFDFZHY-Ds_R2Ds4.js +1668 -0
- package/dist/es-CGqzubZ2.js +210 -0
- package/dist/es-DI8Y4Bv1.cjs +2 -0
- package/dist/et-DGqkocuq.js +210 -0
- package/dist/et-DfaryKvp.cjs +2 -0
- package/dist/eu-BVOSXciF.cjs +2 -0
- package/dist/eu-DEo7fdTW.js +210 -0
- package/dist/fi-C5L-OzaI.cjs +2 -0
- package/dist/fi-DxErwnd5.js +210 -0
- package/dist/flowDiagram-PKNHOUZH-7XJG07fo.cjs +163 -0
- package/dist/flowDiagram-PKNHOUZH-CkeYebJ5.js +4163 -0
- package/dist/fr-yFvjqx8B.cjs +2 -0
- package/dist/fr-zrtSZX0o.js +210 -0
- package/dist/ga-6mVQhlWi.cjs +2 -0
- package/dist/ga-CbHxGc9_.js +210 -0
- package/dist/ganttDiagram-A5KZAMGK-Bbck1pyM.cjs +293 -0
- package/dist/ganttDiagram-A5KZAMGK-CFT3Xn_r.js +3074 -0
- package/dist/gitGraph-HDMCJU4V-BKE04oIl.js +3 -0
- package/dist/gitGraph-HDMCJU4V-C9GYfOYb.cjs +1 -0
- package/dist/gitGraphDiagram-K3NZZRJ6-CXz9SHBX.js +627 -0
- package/dist/gitGraphDiagram-K3NZZRJ6-Dt4D-ig1.cjs +66 -0
- package/dist/gl--w0P3RY4.js +210 -0
- package/dist/gl-BJzJe1sq.cjs +2 -0
- package/dist/graphlib-CPo7oIsu.js +223 -0
- package/dist/graphlib-CmUS4Qin.cjs +2 -0
- package/dist/he-B3Bw3qr0.cjs +2 -0
- package/dist/he-DY19lzWp.js +210 -0
- package/dist/hi-CFSsoO_8.js +210 -0
- package/dist/hi-kofL-mD8.cjs +2 -0
- package/dist/hooks/useBrandCenterFonts.d.ts +0 -1
- package/dist/hooks/useGraphAPI.d.ts +0 -1
- package/dist/hooks/useLocalizationStrings.d.ts +0 -1
- package/dist/hooks/useLogging.d.ts +0 -1
- package/dist/hr-CDxqA9Jm.cjs +2 -0
- package/dist/hr-DIRJ1Z8e.js +210 -0
- package/dist/hu-Defen_75.cjs +2 -0
- package/dist/hu-DqYPRWZh.js +210 -0
- package/dist/id-DcwMRgmX.cjs +2 -0
- package/dist/id-Dgj7SUCi.js +210 -0
- package/dist/identity-6JlhFhuM.cjs +2 -0
- package/dist/identity-C1jKsMoW.js +395 -0
- package/dist/index.cjs +453 -2
- package/dist/index.js +22827 -168
- package/dist/info-3K5VOQVL-DfN_3mKd.js +3 -0
- package/dist/info-3K5VOQVL-d6J9FY0_.cjs +1 -0
- package/dist/infoDiagram-LFFYTUFH-Bp9btqnA.cjs +3 -0
- package/dist/infoDiagram-LFFYTUFH-DnvgRFnx.js +21 -0
- package/dist/init-BAFZAp9S.cjs +2 -0
- package/dist/init-m0TwgR4W.js +17 -0
- package/dist/isEmpty-BTp1uKIj.cjs +2 -0
- package/dist/isEmpty-uXVYZZYe.js +17 -0
- package/dist/ishikawaDiagram-PHBUUO56-DLaOkz38.js +719 -0
- package/dist/ishikawaDiagram-PHBUUO56-DmqObwMZ.cjs +71 -0
- package/dist/it-D5nM6KCi.cjs +2 -0
- package/dist/it-QdChHqVN.js +210 -0
- package/dist/ja-BNS0BbY-.js +210 -0
- package/dist/ja-BtuHirv7.cjs +2 -0
- package/dist/journeyDiagram-4ABVD52K-Cv0DbLMi.cjs +140 -0
- package/dist/journeyDiagram-4ABVD52K-DYmmcNK4.js +885 -0
- package/dist/kanban-definition-K7BYSVSG-BdQLAMeB.cjs +90 -0
- package/dist/kanban-definition-K7BYSVSG-CLEYqSz5.js +973 -0
- package/dist/katex-B-Nju2J8.js +22002 -0
- package/dist/katex-WY67Rp7A.cjs +266 -0
- package/dist/kk-BSl8IqgQ.cjs +2 -0
- package/dist/kk-Dhkax68h.js +210 -0
- package/dist/ko-eplb1GD0.cjs +2 -0
- package/dist/ko-heRMHZWp.js +210 -0
- package/dist/line-CbEBKCYr.js +36 -0
- package/dist/line-DqSdvtRR.cjs +2 -0
- package/dist/linear-DvLDpS6A.cjs +2 -0
- package/dist/linear-Eb79THx6.js +291 -0
- package/dist/localization/ILibraryStrings.d.ts +0 -1
- package/dist/localization/defaults/ar.d.ts +0 -1
- package/dist/localization/defaults/az.d.ts +0 -1
- package/dist/localization/defaults/bg.d.ts +0 -1
- package/dist/localization/defaults/bs.d.ts +0 -1
- package/dist/localization/defaults/ca.d.ts +0 -1
- package/dist/localization/defaults/cs.d.ts +0 -1
- package/dist/localization/defaults/cy.d.ts +0 -1
- package/dist/localization/defaults/da.d.ts +0 -1
- package/dist/localization/defaults/de.d.ts +0 -1
- package/dist/localization/defaults/el.d.ts +0 -1
- package/dist/localization/defaults/en.d.ts +0 -1
- package/dist/localization/defaults/es.d.ts +0 -1
- package/dist/localization/defaults/et.d.ts +0 -1
- package/dist/localization/defaults/eu.d.ts +0 -1
- package/dist/localization/defaults/fi.d.ts +0 -1
- package/dist/localization/defaults/fr.d.ts +0 -1
- package/dist/localization/defaults/ga.d.ts +0 -1
- package/dist/localization/defaults/gl.d.ts +0 -1
- package/dist/localization/defaults/he.d.ts +0 -1
- package/dist/localization/defaults/hi.d.ts +0 -1
- package/dist/localization/defaults/hr.d.ts +0 -1
- package/dist/localization/defaults/hu.d.ts +0 -1
- package/dist/localization/defaults/id.d.ts +0 -1
- package/dist/localization/defaults/it.d.ts +0 -1
- package/dist/localization/defaults/ja.d.ts +0 -1
- package/dist/localization/defaults/kk.d.ts +0 -1
- package/dist/localization/defaults/ko.d.ts +0 -1
- package/dist/localization/defaults/lt.d.ts +0 -1
- package/dist/localization/defaults/lv.d.ts +0 -1
- package/dist/localization/defaults/mk.d.ts +0 -1
- package/dist/localization/defaults/ms.d.ts +0 -1
- package/dist/localization/defaults/nb.d.ts +0 -1
- package/dist/localization/defaults/nl.d.ts +0 -1
- package/dist/localization/defaults/pl.d.ts +0 -1
- package/dist/localization/defaults/pt.d.ts +0 -1
- package/dist/localization/defaults/ro.d.ts +0 -1
- package/dist/localization/defaults/ru.d.ts +0 -1
- package/dist/localization/defaults/sk.d.ts +0 -1
- package/dist/localization/defaults/sl.d.ts +0 -1
- package/dist/localization/defaults/sr.d.ts +0 -1
- package/dist/localization/defaults/sv.d.ts +0 -1
- package/dist/localization/defaults/th.d.ts +0 -1
- package/dist/localization/defaults/tr.d.ts +0 -1
- package/dist/localization/defaults/uk.d.ts +0 -1
- package/dist/localization/defaults/vi.d.ts +0 -1
- package/dist/localization/defaults/zh.d.ts +0 -1
- package/dist/lt-Decqbo8S.js +210 -0
- package/dist/lt-DsYAWFbF.cjs +2 -0
- package/dist/lv-DHmTjCb8.cjs +2 -0
- package/dist/lv-wZASv0Lw.js +210 -0
- package/dist/maplibre-gl-qSrG75fp.js +33003 -0
- package/dist/maplibre-gl-tm_pVdmb.cjs +757 -0
- package/dist/math-DR9t6ixc.cjs +2 -0
- package/dist/math-DyURnvXC.js +12 -0
- package/dist/mermaid-parser.core-BdTB9qx-.js +61 -0
- package/dist/mermaid-parser.core-BlzF5RRD.cjs +4 -0
- package/dist/mindmap-definition-YRQLILUH-CzcVgr-U.js +966 -0
- package/dist/mindmap-definition-YRQLILUH-zWN_YXC3.cjs +69 -0
- package/dist/mk-BTsLGTJT.js +210 -0
- package/dist/mk-CCV_308U.cjs +2 -0
- package/dist/ms-C0cVNwky.js +210 -0
- package/dist/ms-CH83xVYN.cjs +2 -0
- package/dist/nb-DGX4q4tS.js +210 -0
- package/dist/nb-DZ-DlwcL.cjs +2 -0
- package/dist/nl-CnXZa8tZ.js +210 -0
- package/dist/nl-Xdf-A19i.cjs +2 -0
- package/dist/ordinal-BAWGEQkf.js +67 -0
- package/dist/ordinal-CL2X4e2C.cjs +2 -0
- package/dist/packet-RMMSAZCW-Bek1stRX.cjs +1 -0
- package/dist/packet-RMMSAZCW-DUN6t9lN.js +3 -0
- package/dist/path-Bt6guLtL.cjs +2 -0
- package/dist/path-DSzKK8fH.js +87 -0
- package/dist/pie-UPGHQEXC-DjqNO54R.js +3 -0
- package/dist/pie-UPGHQEXC-pJq6_YgE.cjs +1 -0
- package/dist/pieDiagram-SKSYHLDU-Ba-c0fRA.cjs +31 -0
- package/dist/pieDiagram-SKSYHLDU-ya07MTY-.js +167 -0
- package/dist/pl-BStql1S-.cjs +2 -0
- package/dist/pl-DbIdTNpg.js +210 -0
- package/dist/providers.cjs +2 -2
- package/dist/providers.d.ts +1 -0
- package/dist/providers.js +188 -252
- package/dist/pt-CcKYweQk.js +210 -0
- package/dist/pt-Dk4jELuZ.cjs +2 -0
- package/dist/quadrantDiagram-337W2JSQ-CQQEVC49.cjs +8 -0
- package/dist/quadrantDiagram-337W2JSQ-Dp_QyIEO.js +1976 -0
- package/dist/radar-KQ55EAFF-Bid2hXXI.cjs +1 -0
- package/dist/radar-KQ55EAFF-C6zhEkCz.js +3 -0
- package/dist/requirementDiagram-Z7DCOOCP-CRl2914V.js +2203 -0
- package/dist/requirementDiagram-Z7DCOOCP-CeMYhXEm.cjs +74 -0
- package/dist/ro-BvhMyTKh.cjs +2 -0
- package/dist/ro-C-8tiqgA.js +210 -0
- package/dist/rough.esm-BjJ_weyP.cjs +2 -0
- package/dist/rough.esm-DBHP55VQ.js +1354 -0
- package/dist/ru-BQosng8l.cjs +2 -0
- package/dist/ru-Dhnz96q2.js +210 -0
- package/dist/sankeyDiagram-WA2Y5GQK-BFrF47Iv.js +922 -0
- package/dist/sankeyDiagram-WA2Y5GQK-DDfjtQ4G.cjs +11 -0
- package/dist/sequenceDiagram-2WXFIKYE-B-zWyr9f.cjs +146 -0
- package/dist/sequenceDiagram-2WXFIKYE-BAd8OVlz.js +4111 -0
- package/dist/sk-BU-Z5EsC.js +210 -0
- package/dist/sk-BhA7UeAk.cjs +2 -0
- package/dist/sl-6Mczv4jG.cjs +2 -0
- package/dist/sl-CcfjJFxo.js +210 -0
- package/dist/sr-CxObZdu0.cjs +2 -0
- package/dist/sr-S53unrLA.js +210 -0
- package/dist/src-DFxq-N5I.cjs +2 -0
- package/dist/src-Dm6r9c7l.js +2148 -0
- package/dist/stateDiagram-RAJIS63D-C-tfqeC-.js +219 -0
- package/dist/stateDiagram-RAJIS63D-C1Aj8vJQ.cjs +2 -0
- package/dist/stateDiagram-v2-FVOUBMTO-C-w53gXL.js +29 -0
- package/dist/stateDiagram-v2-FVOUBMTO-VoIE_KVn.cjs +2 -0
- package/dist/sv-BfiunVuX.cjs +2 -0
- package/dist/sv-BiJrVfZr.js +210 -0
- package/dist/th-BqLGltZi.cjs +2 -0
- package/dist/th-vQ7LQ7nD.js +210 -0
- package/dist/timeline-definition-YZTLITO2-CE1y2S_r.js +832 -0
- package/dist/timeline-definition-YZTLITO2-D8aFfnYE.cjs +62 -0
- package/dist/tr-Brwl4o_Z.cjs +2 -0
- package/dist/tr-C5RrNGLz.js +210 -0
- package/dist/treemap-KZPCXAKY-D2v0uStP.cjs +1 -0
- package/dist/treemap-KZPCXAKY-DLE_f1Bk.js +3 -0
- package/dist/types/THorizontalSpacing.d.ts +0 -1
- package/dist/types/THorizontalSpacingBreakPoints.d.ts +0 -1
- package/dist/types/TPaddingBreakPoints.d.ts +0 -1
- package/dist/types/TPading.d.ts +0 -1
- package/dist/types/TVerticalSpacing.d.ts +0 -1
- package/dist/types/TVerticalSpacingBreakPoints.d.ts +0 -1
- package/dist/uk-CV49TRvS.cjs +2 -0
- package/dist/uk-WGCFH0fY.js +210 -0
- package/dist/vennDiagram-LZ73GAT5-BSpVMORX.js +1860 -0
- package/dist/vennDiagram-LZ73GAT5-DvnB0e7u.cjs +35 -0
- package/dist/vi-JzM7bjn_.cjs +2 -0
- package/dist/vi-Waa7HkXq.js +210 -0
- package/dist/xychartDiagram-JWTSCODW-0qbVGrDs.cjs +8 -0
- package/dist/xychartDiagram-JWTSCODW-DpIry-th.js +2043 -0
- package/dist/zh-BmUS7Wn_.js +210 -0
- package/dist/zh-DEm0SGzZ.cjs +2 -0
- package/package.json +7 -7
- package/dist/LocalizationProvider-BLjmybBa.cjs +0 -2
- package/dist/LocalizationProvider-BSlUf0tp.js +0 -497
- package/dist/_arrayEach-DEUflJGE.cjs +0 -2
- package/dist/_arrayEach-tusrzNIw.js +0 -61
- package/dist/ar-C1pLt8fa.js +0 -219
- package/dist/ar-Jzw7PLrc.cjs +0 -2
- package/dist/arc-CDaXffrF.cjs +0 -2
- package/dist/arc-DfZkgffF.js +0 -132
- package/dist/architecture-7HQA4BMR-BwNHkZOR.cjs +0 -2
- package/dist/architecture-7HQA4BMR-ZD14yPTj.js +0 -6
- package/dist/architectureDiagram-VXUJARFQ-C2ZHmMwH.cjs +0 -2
- package/dist/architectureDiagram-VXUJARFQ-ZqTwLC_K.js +0 -8680
- package/dist/az-C0Ow5Hxa.cjs +0 -2
- package/dist/az-C3-F9ybX.js +0 -219
- package/dist/bg-YB0TmpRF.cjs +0 -2
- package/dist/bg-w2e_udiK.js +0 -219
- package/dist/blockDiagram-VD42YOAC-De0hLG3f.cjs +0 -2
- package/dist/blockDiagram-VD42YOAC-Dik4nU5R.js +0 -3756
- package/dist/bs-BoW04lRb.cjs +0 -2
- package/dist/bs-CEe_gjEx.js +0 -219
- package/dist/c4Diagram-YG6GDRKO-B97gU-WH.cjs +0 -2
- package/dist/c4Diagram-YG6GDRKO-BG0ZffB9.js +0 -2483
- package/dist/ca-Bsy2Y5pS.cjs +0 -2
- package/dist/ca-CKpd72XI.js +0 -219
- package/dist/channel-D35vM90y.cjs +0 -2
- package/dist/channel-DjCO9_Le.js +0 -8
- package/dist/chunk-4BX2VUAB-BOD7DqfU.cjs +0 -2
- package/dist/chunk-4BX2VUAB-ahGWfN9s.js +0 -18
- package/dist/chunk-55IACEB6-BE4LiqRj.js +0 -14
- package/dist/chunk-55IACEB6-aYtTY_gp.cjs +0 -2
- package/dist/chunk-B4BG7PRW-D7Ivw3g-.cjs +0 -2
- package/dist/chunk-B4BG7PRW-l_C90AO9.js +0 -1828
- package/dist/chunk-DI55MBZ5-CML-bpvH.cjs +0 -2
- package/dist/chunk-DI55MBZ5-CkzP_mAJ.js +0 -1928
- package/dist/chunk-FMBD7UC4-up_42EsF.cjs +0 -2
- package/dist/chunk-QN33PNHL-BQktMy72.js +0 -26
- package/dist/chunk-QN33PNHL-D3tw3Y1o.cjs +0 -2
- package/dist/chunk-QZHKN3VN-OgubCPUl.cjs +0 -2
- package/dist/chunk-QZHKN3VN-VbliCc4p.js +0 -18
- package/dist/chunk-TZMSLE5B-B2adgZpn.cjs +0 -2
- package/dist/chunk-TZMSLE5B-ogHnlNAL.js +0 -109
- package/dist/classDiagram-2ON5EDUG-DV3kGCmC.cjs +0 -2
- package/dist/classDiagram-2ON5EDUG-NFuoveOc.js +0 -20
- package/dist/classDiagram-v2-WZHVMYZB-DV3kGCmC.cjs +0 -2
- package/dist/classDiagram-v2-WZHVMYZB-NFuoveOc.js +0 -20
- package/dist/cose-bilkent-S5V4N54A-C1H2cJER.cjs +0 -2
- package/dist/cose-bilkent-S5V4N54A-CFFp3u42.js +0 -4934
- package/dist/cs-D-801PIR.cjs +0 -2
- package/dist/cs-DQvRPciB.js +0 -219
- package/dist/cy-BxyJCM05.js +0 -219
- package/dist/cy-aUPUcn-S.cjs +0 -2
- package/dist/cytoscape.esm-BS1owLay.js +0 -30250
- package/dist/cytoscape.esm-BxB3woZB.cjs +0 -10
- package/dist/da-B05ad5Iq.js +0 -219
- package/dist/da-CTiLOqut.cjs +0 -2
- package/dist/dagre-6UL2VRFP-BbRK6OVd.js +0 -696
- package/dist/dagre-6UL2VRFP-DceBzHY0.cjs +0 -2
- package/dist/de-DJ5iwpd7.js +0 -219
- package/dist/de-Dm204UMA.cjs +0 -2
- package/dist/defaultLocale-7NeEK7SF.cjs +0 -2
- package/dist/defaultLocale-DVr69WTU.js +0 -207
- package/dist/diagram-PSM6KHXK-CCRrPaN5.js +0 -848
- package/dist/diagram-PSM6KHXK-Dap3wmh3.cjs +0 -2
- package/dist/diagram-QEK2KX5R-CwkM4da6.js +0 -305
- package/dist/diagram-QEK2KX5R-CycnDjjr.cjs +0 -2
- package/dist/diagram-S2PKOQOG-BjWuQflk.js +0 -212
- package/dist/diagram-S2PKOQOG-C8bvmCRh.cjs +0 -2
- package/dist/el-CBS9mHS3.js +0 -219
- package/dist/el-DbtZj-ph.cjs +0 -2
- package/dist/erDiagram-Q2GNP2WA-CVwE6kCH.cjs +0 -2
- package/dist/erDiagram-Q2GNP2WA-DK_cVUc0.js +0 -1160
- package/dist/es-Bo08apQr.js +0 -219
- package/dist/es-Cc-4Vqf7.cjs +0 -2
- package/dist/et-D5pQ66eY.cjs +0 -2
- package/dist/et-pRL0Tmle.js +0 -219
- package/dist/eu-Br68gaf7.js +0 -219
- package/dist/eu-RZ-27koK.cjs +0 -2
- package/dist/fi-BCXB-k_X.js +0 -219
- package/dist/fi-Dqa9mgnW.cjs +0 -2
- package/dist/flowDiagram-NV44I4VS-BC9ZXfqx.js +0 -2339
- package/dist/flowDiagram-NV44I4VS-BmvwN_Qr.cjs +0 -2
- package/dist/fr-B7fhkle4.cjs +0 -2
- package/dist/fr-gKE1SSIF.js +0 -219
- package/dist/ga-4Hf7vKvr.cjs +0 -2
- package/dist/ga-C1SpITZy.js +0 -219
- package/dist/ganttDiagram-JELNMOA3-Cxvs4xUM.cjs +0 -2
- package/dist/ganttDiagram-JELNMOA3-DCPYcGQ7.js +0 -3652
- package/dist/gitGraph-G5XIXVHT-CGc4Dw_9.cjs +0 -2
- package/dist/gitGraph-G5XIXVHT-D2TpybaV.js +0 -6
- package/dist/gitGraphDiagram-V2S2FVAM-BLwOtAPI.js +0 -1215
- package/dist/gitGraphDiagram-V2S2FVAM-CxKeCiX6.cjs +0 -2
- package/dist/gl-COSpsMSK.cjs +0 -2
- package/dist/gl-CSzCeu2L.js +0 -219
- package/dist/graph-C7xixGrW.cjs +0 -2
- package/dist/graph-DH3cnEko.js +0 -421
- package/dist/he-BrkfqoIm.js +0 -219
- package/dist/he-C7Wi6-EL.cjs +0 -2
- package/dist/hi-C1RGDPzn.js +0 -219
- package/dist/hi-ojklJj-a.cjs +0 -2
- package/dist/hr-CsO_h2VT.js +0 -219
- package/dist/hr-DkEwOCGU.cjs +0 -2
- package/dist/hu-CVtbM-V2.js +0 -219
- package/dist/hu-D8uAAzvN.cjs +0 -2
- package/dist/id-18yPGK2f.cjs +0 -2
- package/dist/id-CARSN0W8.js +0 -219
- package/dist/index-Bo3Feswn.js +0 -55587
- package/dist/index-C6Yk2BjU.cjs +0 -428
- package/dist/info-VBDWY6EO-Bp4BP7Eb.js +0 -6
- package/dist/info-VBDWY6EO-dcVOFyXm.cjs +0 -2
- package/dist/infoDiagram-HS3SLOUP-BH_AfMqs.js +0 -32
- package/dist/infoDiagram-HS3SLOUP-BZqbkXM8.cjs +0 -2
- package/dist/init-DZ96s0AS.cjs +0 -2
- package/dist/init-ZxktEp_H.js +0 -17
- package/dist/it-BVq911RW.cjs +0 -2
- package/dist/it-ClWGK7XT.js +0 -219
- package/dist/ja-BgcKuKZ4.cjs +0 -2
- package/dist/ja-DGL12HwE.js +0 -219
- package/dist/journeyDiagram-XKPGCS4Q-B6LA5FxS.js +0 -1255
- package/dist/journeyDiagram-XKPGCS4Q-D738Gof9.cjs +0 -2
- package/dist/kanban-definition-3W4ZIXB7-BiudWCGQ.js +0 -1049
- package/dist/kanban-definition-3W4ZIXB7-CYpFGeof.cjs +0 -2
- package/dist/katex-DPu4QpBP.cjs +0 -2
- package/dist/katex-Dd1-wdX2.js +0 -14523
- package/dist/kk-CkKXbKso.js +0 -219
- package/dist/kk-Dn3FBkOR.cjs +0 -2
- package/dist/ko-CKAbV25b.cjs +0 -2
- package/dist/ko-QYvDV2aw.js +0 -219
- package/dist/layout-D6yO7DzL.cjs +0 -2
- package/dist/layout-bxkZz7Cm.js +0 -1919
- package/dist/linear-CsAdQFhD.js +0 -341
- package/dist/linear-Cu3RCqOH.cjs +0 -2
- package/dist/lt-BKnFyiLV.js +0 -219
- package/dist/lt-BnGNEsIS.cjs +0 -2
- package/dist/lv-Clqo0Ogm.js +0 -219
- package/dist/lv-D3rJQRhc.cjs +0 -2
- package/dist/maplibre-gl-Bu4KbMVz.js +0 -23511
- package/dist/maplibre-gl-oIss86aW.cjs +0 -6
- package/dist/mermaid-parser.core-BeAFxlhX.cjs +0 -2
- package/dist/mermaid-parser.core-EaBMrmE0.js +0 -23731
- package/dist/mindmap-definition-VGOIOE7T-BdPsEBSQ.cjs +0 -2
- package/dist/mindmap-definition-VGOIOE7T-CV_iinaV.js +0 -1129
- package/dist/mk-EhcD0RzW.js +0 -219
- package/dist/mk-hVxJgrE0.cjs +0 -2
- package/dist/ms-CJACwjo7.js +0 -219
- package/dist/ms-D0txYckK.cjs +0 -2
- package/dist/nb-BfKRl99z.cjs +0 -2
- package/dist/nb-NCgnP0Pu.js +0 -219
- package/dist/nl-EgsNCunP.js +0 -219
- package/dist/nl-ZXiLkBj_.cjs +0 -2
- package/dist/ordinal-BZdahNih.cjs +0 -2
- package/dist/ordinal-DSZU4PqD.js +0 -77
- package/dist/packet-DYOGHKS2-CxyBgIUF.js +0 -6
- package/dist/packet-DYOGHKS2-lB1ZNdq9.cjs +0 -2
- package/dist/pie-VRWISCQL-CvTcddz_.cjs +0 -2
- package/dist/pie-VRWISCQL-yxV8OJyl.js +0 -6
- package/dist/pieDiagram-ADFJNKIX-B0W0v6lo.cjs +0 -2
- package/dist/pieDiagram-ADFJNKIX-CkAS8Z8i.js +0 -238
- package/dist/pl-H28GVtiG.js +0 -219
- package/dist/pl-tVjdYTB9.cjs +0 -2
- package/dist/pt-1k62N9F3.cjs +0 -2
- package/dist/pt-BSPZhWKl.js +0 -211
- package/dist/quadrantDiagram-AYHSOK5B-Bzqn0a-l.js +0 -1338
- package/dist/quadrantDiagram-AYHSOK5B-SWF7EmO_.cjs +0 -2
- package/dist/radar-ZZBFDIW7-Cx_1gtna.js +0 -6
- package/dist/radar-ZZBFDIW7-Dt6yDSJ-.cjs +0 -2
- package/dist/requirementDiagram-UZGBJVZJ-CG-2-gxk.cjs +0 -2
- package/dist/requirementDiagram-UZGBJVZJ-DYGD-StR.js +0 -1164
- package/dist/ro-9Qt1qDDA.cjs +0 -2
- package/dist/ro-BpaZLre_.js +0 -219
- package/dist/ru-4WxRouIU.cjs +0 -2
- package/dist/ru-CUZzD-Tx.js +0 -219
- package/dist/sankeyDiagram-TZEHDZUN-DhUxbYSw.js +0 -1194
- package/dist/sankeyDiagram-TZEHDZUN-sLCJH1s2.cjs +0 -2
- package/dist/sequenceDiagram-WL72ISMW--4TVFyeB.js +0 -3882
- package/dist/sequenceDiagram-WL72ISMW-CFPZgLxH.cjs +0 -2
- package/dist/sk-CoQ6XiCY.js +0 -219
- package/dist/sk-uWukDQab.cjs +0 -2
- package/dist/sl-B6DVbKg6.cjs +0 -2
- package/dist/sl-CHW-ZGol.js +0 -219
- package/dist/sr-BOD8Tc-D.cjs +0 -2
- package/dist/sr-EQGjIBJE.js +0 -219
- package/dist/stateDiagram-FKZM4ZOC-CF_Lwk8j.js +0 -449
- package/dist/stateDiagram-FKZM4ZOC-D8CSpH_U.cjs +0 -2
- package/dist/stateDiagram-v2-4FDKWEC3-BDRDUNPf.cjs +0 -2
- package/dist/stateDiagram-v2-4FDKWEC3-BavZNkxV.js +0 -20
- package/dist/sv-B6nLuQr7.cjs +0 -2
- package/dist/sv-DTxWN6ED.js +0 -219
- package/dist/th-BVPzHvBf.js +0 -219
- package/dist/th-DmULV6uT.cjs +0 -2
- package/dist/timeline-definition-IT6M3QCI-DVBW6O_2.cjs +0 -2
- package/dist/timeline-definition-IT6M3QCI-Du5tfms8.js +0 -1227
- package/dist/tr-BE5geTUC.cjs +0 -2
- package/dist/tr-BHR1QA-D.js +0 -219
- package/dist/treemap-GDKQZRPO-7BeIVnJ2.cjs +0 -2
- package/dist/treemap-GDKQZRPO-Dc6Nwpnf.js +0 -6
- package/dist/uk-Bc5TwelE.js +0 -219
- package/dist/uk-DS5ukB_-.cjs +0 -2
- package/dist/vi-D9FF4kkG.cjs +0 -2
- package/dist/vi-DC0eQZb7.js +0 -219
- package/dist/xychartDiagram-PRI3JC2R-BMoq4LTz.js +0 -1887
- package/dist/xychartDiagram-PRI3JC2R-BbGEetiQ.cjs +0 -2
- package/dist/zh-CGcOiJ3s.cjs +0 -2
- package/dist/zh-GsCLn8OE.js +0 -219
|
@@ -0,0 +1,3436 @@
|
|
|
1
|
+
import { g as e, h as t, p as n } from "./src-Dm6r9c7l.js";
|
|
2
|
+
import { L as r, R as i, b as a, h as o, j as s, k as c, w as l, y as u } from "./chunk-7R4GIKGN-CaQJ0QBF.js";
|
|
3
|
+
import { i as d, l as f, n as p } from "./chunk-GEFDOKGD-BNgT40Ex.js";
|
|
4
|
+
import { n as m, t as h } from "./chunk-YBOYWFTD-B6CeuteH.js";
|
|
5
|
+
import { a as g, i as _, r as v, t as y } from "./chunk-PQ6SQG4A-ObFGkauo.js";
|
|
6
|
+
import { n as b, r as x } from "./chunk-PU5JKC2W-BM5NPS-q.js";
|
|
7
|
+
import { t as S } from "./rough.esm-DBHP55VQ.js";
|
|
8
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-KYZI473N.mjs
|
|
9
|
+
var C = /* @__PURE__ */ t(async (e, t, i) => {
|
|
10
|
+
let s, c = t.useHtmlLabels || o(a()?.htmlLabels);
|
|
11
|
+
s = i || "node default";
|
|
12
|
+
let l = e.insert("g").attr("class", s).attr("id", t.domId || t.id), u = l.insert("g").attr("class", "label").attr("style", f(t.labelStyle)), p;
|
|
13
|
+
p = t.label === void 0 ? "" : typeof t.label == "string" ? t.label : t.label[0];
|
|
14
|
+
let m = !!t.icon || !!t.img, g = t.labelType === "markdown", _ = await b(u, r(d(p), a()), {
|
|
15
|
+
useHtmlLabels: c,
|
|
16
|
+
width: t.width || a().flowchart?.wrappingWidth,
|
|
17
|
+
cssClasses: g ? "markdown-node-label" : void 0,
|
|
18
|
+
style: t.labelStyle,
|
|
19
|
+
addSvgBackground: m,
|
|
20
|
+
markdown: g
|
|
21
|
+
}, a()), v = _.getBBox(), y = (t?.padding ?? 0) / 2;
|
|
22
|
+
if (c) {
|
|
23
|
+
let e = _.children[0], t = n(_);
|
|
24
|
+
await h(e, p), v = e.getBoundingClientRect(), t.attr("width", v.width), t.attr("height", v.height);
|
|
25
|
+
}
|
|
26
|
+
return c ? u.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")") : u.attr("transform", "translate(0, " + -v.height / 2 + ")"), t.centerLabel && u.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")"), u.insert("rect", ":first-child"), {
|
|
27
|
+
shapeSvg: l,
|
|
28
|
+
bbox: v,
|
|
29
|
+
halfPadding: y,
|
|
30
|
+
label: u
|
|
31
|
+
};
|
|
32
|
+
}, "labelHelper"), w = /* @__PURE__ */ t(async (e, t, i) => {
|
|
33
|
+
let o = i.useHtmlLabels ?? l(a()), s = e.insert("g").attr("class", "label").attr("style", i.labelStyle || ""), c = await b(s, r(d(t), a()), {
|
|
34
|
+
useHtmlLabels: o,
|
|
35
|
+
width: i.width || a()?.flowchart?.wrappingWidth,
|
|
36
|
+
style: i.labelStyle,
|
|
37
|
+
addSvgBackground: !!i.icon || !!i.img
|
|
38
|
+
}), u = c.getBBox(), f = i.padding / 2;
|
|
39
|
+
if (l(a())) {
|
|
40
|
+
let e = c.children[0], t = n(c);
|
|
41
|
+
u = e.getBoundingClientRect(), t.attr("width", u.width), t.attr("height", u.height);
|
|
42
|
+
}
|
|
43
|
+
return o ? s.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")") : s.attr("transform", "translate(0, " + -u.height / 2 + ")"), i.centerLabel && s.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), s.insert("rect", ":first-child"), {
|
|
44
|
+
shapeSvg: e,
|
|
45
|
+
bbox: u,
|
|
46
|
+
halfPadding: f,
|
|
47
|
+
label: s
|
|
48
|
+
};
|
|
49
|
+
}, "insertLabel"), T = /* @__PURE__ */ t((e, t) => {
|
|
50
|
+
let n = t.node().getBBox();
|
|
51
|
+
e.width = n.width, e.height = n.height;
|
|
52
|
+
}, "updateNodeBounds"), E = /* @__PURE__ */ t((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
|
|
53
|
+
function D(e) {
|
|
54
|
+
let t = e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x},${e.y}`);
|
|
55
|
+
return t.push("Z"), t.join(" ");
|
|
56
|
+
}
|
|
57
|
+
t(D, "createPathFromPoints");
|
|
58
|
+
function O(e, t, n, r, i, a) {
|
|
59
|
+
let o = [], s = n - e, c = r - t, l = s / a, u = 2 * Math.PI / l, d = t + c / 2;
|
|
60
|
+
for (let t = 0; t <= 50; t++) {
|
|
61
|
+
let n = e + t / 50 * s, r = d + i * Math.sin(u * (n - e));
|
|
62
|
+
o.push({
|
|
63
|
+
x: n,
|
|
64
|
+
y: r
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return o;
|
|
68
|
+
}
|
|
69
|
+
t(O, "generateFullSineWavePoints");
|
|
70
|
+
function k(e, t, n, r, i, a) {
|
|
71
|
+
let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
|
|
72
|
+
for (let i = 0; i < r; i++) {
|
|
73
|
+
let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
|
|
74
|
+
o.push({
|
|
75
|
+
x: -a,
|
|
76
|
+
y: -l
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return o;
|
|
80
|
+
}
|
|
81
|
+
t(k, "generateCirclePoints");
|
|
82
|
+
var A = /* @__PURE__ */ t((e, t) => {
|
|
83
|
+
var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
|
|
84
|
+
return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
|
|
85
|
+
x: n + c,
|
|
86
|
+
y: r + l
|
|
87
|
+
};
|
|
88
|
+
}, "intersectRect"), j = /* @__PURE__ */ t(async (e, t, n, r = !1, i = !1) => {
|
|
89
|
+
let o = t || "";
|
|
90
|
+
typeof o == "object" && (o = o[0]);
|
|
91
|
+
let s = a(), c = l(s);
|
|
92
|
+
return await b(e, o, {
|
|
93
|
+
style: n,
|
|
94
|
+
isTitle: r,
|
|
95
|
+
useHtmlLabels: c,
|
|
96
|
+
markdown: !1,
|
|
97
|
+
isNode: i,
|
|
98
|
+
width: Infinity
|
|
99
|
+
}, s);
|
|
100
|
+
}, "createLabel"), M = /* @__PURE__ */ t((e, t, n, r, i) => [
|
|
101
|
+
"M",
|
|
102
|
+
e + i,
|
|
103
|
+
t,
|
|
104
|
+
"H",
|
|
105
|
+
e + n - i,
|
|
106
|
+
"A",
|
|
107
|
+
i,
|
|
108
|
+
i,
|
|
109
|
+
0,
|
|
110
|
+
0,
|
|
111
|
+
1,
|
|
112
|
+
e + n,
|
|
113
|
+
t + i,
|
|
114
|
+
"V",
|
|
115
|
+
t + r - i,
|
|
116
|
+
"A",
|
|
117
|
+
i,
|
|
118
|
+
i,
|
|
119
|
+
0,
|
|
120
|
+
0,
|
|
121
|
+
1,
|
|
122
|
+
e + n - i,
|
|
123
|
+
t + r,
|
|
124
|
+
"H",
|
|
125
|
+
e + i,
|
|
126
|
+
"A",
|
|
127
|
+
i,
|
|
128
|
+
i,
|
|
129
|
+
0,
|
|
130
|
+
0,
|
|
131
|
+
1,
|
|
132
|
+
e,
|
|
133
|
+
t + r - i,
|
|
134
|
+
"V",
|
|
135
|
+
t + i,
|
|
136
|
+
"A",
|
|
137
|
+
i,
|
|
138
|
+
i,
|
|
139
|
+
0,
|
|
140
|
+
0,
|
|
141
|
+
1,
|
|
142
|
+
e + i,
|
|
143
|
+
t,
|
|
144
|
+
"Z"
|
|
145
|
+
].join(" "), "createRoundedRectPathD"), N = /* @__PURE__ */ t(async (t, r) => {
|
|
146
|
+
e.info("Creating subgraph rect for ", r.id, r);
|
|
147
|
+
let i = a(), { themeVariables: o, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: u } = o, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: h } = _(r), v = t.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.id).attr("data-look", r.look), y = l(i), x = v.insert("g").attr("class", "cluster-label "), C;
|
|
148
|
+
C = r.labelType === "markdown" ? await b(x, r.label, {
|
|
149
|
+
style: r.labelStyle,
|
|
150
|
+
useHtmlLabels: y,
|
|
151
|
+
isNode: !0,
|
|
152
|
+
width: r.width
|
|
153
|
+
}) : await j(x, r.label, r.labelStyle || "", !1, !0);
|
|
154
|
+
let w = C.getBBox();
|
|
155
|
+
if (l(i)) {
|
|
156
|
+
let e = C.children[0], t = n(C);
|
|
157
|
+
w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
|
|
158
|
+
}
|
|
159
|
+
let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
|
|
160
|
+
r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
|
|
161
|
+
let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
|
|
162
|
+
e.trace("Data ", r, JSON.stringify(r));
|
|
163
|
+
let k;
|
|
164
|
+
if (r.look === "handDrawn") {
|
|
165
|
+
let t = S.svg(v), n = g(r, {
|
|
166
|
+
roughness: .7,
|
|
167
|
+
fill: c,
|
|
168
|
+
stroke: u,
|
|
169
|
+
fillWeight: 3,
|
|
170
|
+
seed: s
|
|
171
|
+
}), i = t.path(M(D, O, T, E, 0), n);
|
|
172
|
+
k = v.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
|
|
173
|
+
} else k = v.insert("rect", ":first-child"), k.attr("style", f).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
|
|
174
|
+
let { subGraphTitleTopMargin: N } = m(i);
|
|
175
|
+
if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + N})`), d) {
|
|
176
|
+
let e = x.select("span");
|
|
177
|
+
e && e.attr("style", d);
|
|
178
|
+
}
|
|
179
|
+
let P = k.node().getBBox();
|
|
180
|
+
return r.offsetX = 0, r.width = P.width, r.height = P.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
|
|
181
|
+
return A(r, e);
|
|
182
|
+
}, {
|
|
183
|
+
cluster: v,
|
|
184
|
+
labelBBox: w
|
|
185
|
+
};
|
|
186
|
+
}, "rect"), P = {
|
|
187
|
+
rect: N,
|
|
188
|
+
squareRect: N,
|
|
189
|
+
roundedWithTitle: /* @__PURE__ */ t(async (e, t) => {
|
|
190
|
+
let r = a(), { themeVariables: i, handDrawnSeed: o } = r, { altBackground: s, compositeBackground: c, compositeTitleBackground: u, nodeBorder: d } = i, f = e.insert("g").attr("class", t.cssClasses).attr("id", t.id).attr("data-id", t.id).attr("data-look", t.look), p = f.insert("g", ":first-child"), m = f.insert("g").attr("class", "cluster-label"), h = f.append("rect"), g = await j(m, t.label, t.labelStyle, void 0, !0), _ = g.getBBox();
|
|
191
|
+
if (l(r)) {
|
|
192
|
+
let e = g.children[0], t = n(g);
|
|
193
|
+
_ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
|
|
194
|
+
}
|
|
195
|
+
let v = 0 * t.padding, y = v / 2, b = (t.width <= _.width + t.padding ? _.width + t.padding : t.width) + v;
|
|
196
|
+
t.width <= _.width + t.padding ? t.diff = (b - t.width) / 2 - t.padding : t.diff = -t.padding;
|
|
197
|
+
let x = t.height + v, C = t.height + v - _.height - 6, w = t.x - b / 2, T = t.y - x / 2;
|
|
198
|
+
t.width = b;
|
|
199
|
+
let E = t.y - t.height / 2 - y + _.height + 2, D;
|
|
200
|
+
if (t.look === "handDrawn") {
|
|
201
|
+
let e = t.cssClasses.includes("statediagram-cluster-alt"), n = S.svg(f), r = t.rx || t.ry ? n.path(M(w, T, b, x, 10), {
|
|
202
|
+
roughness: .7,
|
|
203
|
+
fill: u,
|
|
204
|
+
fillStyle: "solid",
|
|
205
|
+
stroke: d,
|
|
206
|
+
seed: o
|
|
207
|
+
}) : n.rectangle(w, T, b, x, { seed: o });
|
|
208
|
+
D = f.insert(() => r, ":first-child");
|
|
209
|
+
let i = n.rectangle(w, E, b, C, {
|
|
210
|
+
fill: e ? s : c,
|
|
211
|
+
fillStyle: e ? "hachure" : "solid",
|
|
212
|
+
stroke: d,
|
|
213
|
+
seed: o
|
|
214
|
+
});
|
|
215
|
+
D = f.insert(() => r, ":first-child"), h = f.insert(() => i);
|
|
216
|
+
} else D = p.insert("rect", ":first-child"), D.attr("class", "outer").attr("x", w).attr("y", T).attr("width", b).attr("height", x).attr("data-look", t.look), h.attr("class", "inner").attr("x", w).attr("y", E).attr("width", b).attr("height", C);
|
|
217
|
+
return m.attr("transform", `translate(${t.x - _.width / 2}, ${T + 1 - (l(r) ? 0 : 3)})`), t.height = D.node().getBBox().height, t.offsetX = 0, t.offsetY = _.height - t.padding / 2, t.labelBBox = _, t.intersect = function(e) {
|
|
218
|
+
return A(t, e);
|
|
219
|
+
}, {
|
|
220
|
+
cluster: f,
|
|
221
|
+
labelBBox: _
|
|
222
|
+
};
|
|
223
|
+
}, "roundedWithTitle"),
|
|
224
|
+
noteGroup: /* @__PURE__ */ t((e, t) => {
|
|
225
|
+
let n = e.insert("g").attr("class", "note-cluster").attr("id", t.id), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
|
|
226
|
+
r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
|
|
227
|
+
let o = r.node().getBBox();
|
|
228
|
+
return t.width = o.width, t.height = o.height, t.intersect = function(e) {
|
|
229
|
+
return A(t, e);
|
|
230
|
+
}, {
|
|
231
|
+
cluster: n,
|
|
232
|
+
labelBBox: {
|
|
233
|
+
width: 0,
|
|
234
|
+
height: 0
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
}, "noteGroup"),
|
|
238
|
+
divider: /* @__PURE__ */ t((e, t) => {
|
|
239
|
+
let { themeVariables: n, handDrawnSeed: r } = a(), { nodeBorder: i } = n, o = e.insert("g").attr("class", t.cssClasses).attr("id", t.id).attr("data-look", t.look), s = o.insert("g", ":first-child"), c = 0 * t.padding, l = t.width + c;
|
|
240
|
+
t.diff = -t.padding;
|
|
241
|
+
let u = t.height + c, d = t.x - l / 2, f = t.y - u / 2;
|
|
242
|
+
t.width = l;
|
|
243
|
+
let p;
|
|
244
|
+
if (t.look === "handDrawn") {
|
|
245
|
+
let e = S.svg(o).rectangle(d, f, l, u, {
|
|
246
|
+
fill: "lightgrey",
|
|
247
|
+
roughness: .5,
|
|
248
|
+
strokeLineDash: [5],
|
|
249
|
+
stroke: i,
|
|
250
|
+
seed: r
|
|
251
|
+
});
|
|
252
|
+
p = o.insert(() => e, ":first-child");
|
|
253
|
+
} else p = s.insert("rect", ":first-child"), p.attr("class", "divider").attr("x", d).attr("y", f).attr("width", l).attr("height", u).attr("data-look", t.look);
|
|
254
|
+
return t.height = p.node().getBBox().height, t.offsetX = 0, t.offsetY = 0, t.intersect = function(e) {
|
|
255
|
+
return A(t, e);
|
|
256
|
+
}, {
|
|
257
|
+
cluster: o,
|
|
258
|
+
labelBBox: {}
|
|
259
|
+
};
|
|
260
|
+
}, "divider"),
|
|
261
|
+
kanbanSection: /* @__PURE__ */ t(async (t, r) => {
|
|
262
|
+
e.info("Creating subgraph rect for ", r.id, r);
|
|
263
|
+
let i = a(), { themeVariables: o, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: u } = o, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: h } = _(r), v = t.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.id).attr("data-look", r.look), y = l(i), x = v.insert("g").attr("class", "cluster-label "), C = await b(x, r.label, {
|
|
264
|
+
style: r.labelStyle,
|
|
265
|
+
useHtmlLabels: y,
|
|
266
|
+
isNode: !0,
|
|
267
|
+
width: r.width
|
|
268
|
+
}), w = C.getBBox();
|
|
269
|
+
if (l(i)) {
|
|
270
|
+
let e = C.children[0], t = n(C);
|
|
271
|
+
w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
|
|
272
|
+
}
|
|
273
|
+
let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
|
|
274
|
+
r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
|
|
275
|
+
let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
|
|
276
|
+
e.trace("Data ", r, JSON.stringify(r));
|
|
277
|
+
let k;
|
|
278
|
+
if (r.look === "handDrawn") {
|
|
279
|
+
let t = S.svg(v), n = g(r, {
|
|
280
|
+
roughness: .7,
|
|
281
|
+
fill: c,
|
|
282
|
+
stroke: u,
|
|
283
|
+
fillWeight: 4,
|
|
284
|
+
seed: s
|
|
285
|
+
}), i = t.path(M(D, O, T, E, r.rx), n);
|
|
286
|
+
k = v.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
|
|
287
|
+
} else k = v.insert("rect", ":first-child"), k.attr("style", f).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
|
|
288
|
+
let { subGraphTitleTopMargin: j } = m(i);
|
|
289
|
+
if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + j})`), d) {
|
|
290
|
+
let e = x.select("span");
|
|
291
|
+
e && e.attr("style", d);
|
|
292
|
+
}
|
|
293
|
+
let N = k.node().getBBox();
|
|
294
|
+
return r.offsetX = 0, r.width = N.width, r.height = N.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
|
|
295
|
+
return A(r, e);
|
|
296
|
+
}, {
|
|
297
|
+
cluster: v,
|
|
298
|
+
labelBBox: w
|
|
299
|
+
};
|
|
300
|
+
}, "kanbanSection")
|
|
301
|
+
}, F = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ t(async (e, t) => {
|
|
302
|
+
let n = await P[t.shape || "rect"](e, t);
|
|
303
|
+
return F.set(t.id, n), n;
|
|
304
|
+
}, "insertCluster"), L = /* @__PURE__ */ t(() => {
|
|
305
|
+
F = /* @__PURE__ */ new Map();
|
|
306
|
+
}, "clear");
|
|
307
|
+
function R(e, t) {
|
|
308
|
+
return e.intersect(t);
|
|
309
|
+
}
|
|
310
|
+
t(R, "intersectNode");
|
|
311
|
+
var z = R;
|
|
312
|
+
function B(e, t, n, r) {
|
|
313
|
+
var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
|
|
314
|
+
r.x < i && (l = -l);
|
|
315
|
+
var u = Math.abs(t * n * s / c);
|
|
316
|
+
return r.y < a && (u = -u), {
|
|
317
|
+
x: i + l,
|
|
318
|
+
y: a + u
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
t(B, "intersectEllipse");
|
|
322
|
+
var V = B;
|
|
323
|
+
function ee(e, t, n) {
|
|
324
|
+
return V(e, t, t, n);
|
|
325
|
+
}
|
|
326
|
+
t(ee, "intersectCircle");
|
|
327
|
+
var te = ee;
|
|
328
|
+
function ne(e, t, n, r) {
|
|
329
|
+
{
|
|
330
|
+
let i = t.y - e.y, a = e.x - t.x, o = t.x * e.y - e.x * t.y, s = i * n.x + a * n.y + o, c = i * r.x + a * r.y + o, l = 1e-6;
|
|
331
|
+
if (s !== 0 && c !== 0 && H(s, c)) return;
|
|
332
|
+
let u = r.y - n.y, d = n.x - r.x, f = r.x * n.y - n.x * r.y, p = u * e.x + d * e.y + f, m = u * t.x + d * t.y + f;
|
|
333
|
+
if (Math.abs(p) < l && Math.abs(m) < l && H(p, m)) return;
|
|
334
|
+
let h = i * d - u * a;
|
|
335
|
+
if (h === 0) return;
|
|
336
|
+
let g = Math.abs(h / 2), _ = a * f - d * o, v = _ < 0 ? (_ - g) / h : (_ + g) / h;
|
|
337
|
+
return _ = u * o - i * f, {
|
|
338
|
+
x: v,
|
|
339
|
+
y: _ < 0 ? (_ - g) / h : (_ + g) / h
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
t(ne, "intersectLine");
|
|
344
|
+
function H(e, t) {
|
|
345
|
+
return e * t > 0;
|
|
346
|
+
}
|
|
347
|
+
t(H, "sameSign");
|
|
348
|
+
var U = ne;
|
|
349
|
+
function re(e, t, n) {
|
|
350
|
+
let r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
|
|
351
|
+
typeof t.forEach == "function" ? t.forEach(function(e) {
|
|
352
|
+
o = Math.min(o, e.x), s = Math.min(s, e.y);
|
|
353
|
+
}) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
|
|
354
|
+
let c = r - e.width / 2 - o, l = i - e.height / 2 - s;
|
|
355
|
+
for (let r = 0; r < t.length; r++) {
|
|
356
|
+
let i = t[r], o = t[r < t.length - 1 ? r + 1 : 0], s = U(e, n, {
|
|
357
|
+
x: c + i.x,
|
|
358
|
+
y: l + i.y
|
|
359
|
+
}, {
|
|
360
|
+
x: c + o.x,
|
|
361
|
+
y: l + o.y
|
|
362
|
+
});
|
|
363
|
+
s && a.push(s);
|
|
364
|
+
}
|
|
365
|
+
return a.length ? (a.length > 1 && a.sort(function(e, t) {
|
|
366
|
+
let r = e.x - n.x, i = e.y - n.y, a = Math.sqrt(r * r + i * i), o = t.x - n.x, s = t.y - n.y, c = Math.sqrt(o * o + s * s);
|
|
367
|
+
return a < c ? -1 : a === c ? 0 : 1;
|
|
368
|
+
}), a[0]) : e;
|
|
369
|
+
}
|
|
370
|
+
t(re, "intersectPolygon");
|
|
371
|
+
var W = {
|
|
372
|
+
node: z,
|
|
373
|
+
circle: te,
|
|
374
|
+
ellipse: V,
|
|
375
|
+
polygon: re,
|
|
376
|
+
rect: A
|
|
377
|
+
};
|
|
378
|
+
function ie(t, n) {
|
|
379
|
+
let { labelStyles: r } = _(n);
|
|
380
|
+
n.labelStyle = r;
|
|
381
|
+
let i = E(n), a = i;
|
|
382
|
+
i || (a = "anchor");
|
|
383
|
+
let o = t.insert("g").attr("class", a).attr("id", n.domId || n.id), { cssStyles: s } = n, c = S.svg(o), l = g(n, {
|
|
384
|
+
fill: "black",
|
|
385
|
+
stroke: "none",
|
|
386
|
+
fillStyle: "solid"
|
|
387
|
+
});
|
|
388
|
+
n.look !== "handDrawn" && (l.roughness = 0);
|
|
389
|
+
let u = c.circle(0, 0, 2, l), d = o.insert(() => u, ":first-child");
|
|
390
|
+
return d.attr("class", "anchor").attr("style", f(s)), T(n, d), n.intersect = function(t) {
|
|
391
|
+
return e.info("Circle intersect", n, 1, t), W.circle(n, 1, t);
|
|
392
|
+
}, o;
|
|
393
|
+
}
|
|
394
|
+
t(ie, "anchor");
|
|
395
|
+
function ae(e, t, n, r, i, a, o) {
|
|
396
|
+
let s = (e + n) / 2, c = (t + r) / 2, l = Math.atan2(r - t, n - e), u = (n - e) / 2, d = (r - t) / 2, f = u / i, p = d / a, m = Math.sqrt(f ** 2 + p ** 2);
|
|
397
|
+
if (m > 1) throw Error("The given radii are too small to create an arc between the points.");
|
|
398
|
+
let h = Math.sqrt(1 - m ** 2), g = s + h * a * Math.sin(l) * (o ? -1 : 1), _ = c - h * i * Math.cos(l) * (o ? -1 : 1), v = Math.atan2((t - _) / a, (e - g) / i), y = Math.atan2((r - _) / a, (n - g) / i) - v;
|
|
399
|
+
o && y < 0 && (y += 2 * Math.PI), !o && y > 0 && (y -= 2 * Math.PI);
|
|
400
|
+
let b = [];
|
|
401
|
+
for (let e = 0; e < 20; e++) {
|
|
402
|
+
let t = v + e / 19 * y, n = g + i * Math.cos(t), r = _ + a * Math.sin(t);
|
|
403
|
+
b.push({
|
|
404
|
+
x: n,
|
|
405
|
+
y: r
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
return b;
|
|
409
|
+
}
|
|
410
|
+
t(ae, "generateArcPoints");
|
|
411
|
+
async function oe(e, t) {
|
|
412
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
413
|
+
t.labelStyle = n;
|
|
414
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = a.width + t.padding + 20, s = a.height + t.padding, c = s / 2, l = c / (2.5 + s / 50), { cssStyles: u } = t, d = [
|
|
415
|
+
{
|
|
416
|
+
x: o / 2,
|
|
417
|
+
y: -s / 2
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
x: -o / 2,
|
|
421
|
+
y: -s / 2
|
|
422
|
+
},
|
|
423
|
+
...ae(-o / 2, -s / 2, -o / 2, s / 2, l, c, !1),
|
|
424
|
+
{
|
|
425
|
+
x: o / 2,
|
|
426
|
+
y: s / 2
|
|
427
|
+
},
|
|
428
|
+
...ae(o / 2, s / 2, o / 2, -s / 2, l, c, !0)
|
|
429
|
+
], f = S.svg(i), p = g(t, {});
|
|
430
|
+
t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
|
|
431
|
+
let m = D(d), h = f.path(m, p), v = i.insert(() => h, ":first-child");
|
|
432
|
+
return v.attr("class", "basic label-container"), u && t.look !== "handDrawn" && v.selectAll("path").attr("style", u), r && t.look !== "handDrawn" && v.selectAll("path").attr("style", r), v.attr("transform", `translate(${l / 2}, 0)`), T(t, v), t.intersect = function(e) {
|
|
433
|
+
return W.polygon(t, d, e);
|
|
434
|
+
}, i;
|
|
435
|
+
}
|
|
436
|
+
t(oe, "bowTieRect");
|
|
437
|
+
function G(e, t, n, r) {
|
|
438
|
+
return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
|
|
439
|
+
return e.x + "," + e.y;
|
|
440
|
+
}).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
|
|
441
|
+
}
|
|
442
|
+
t(G, "insertPolygonShape");
|
|
443
|
+
async function se(e, t) {
|
|
444
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
445
|
+
t.labelStyle = n;
|
|
446
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = a.height + t.padding, s = a.width + t.padding + 12, c = s, l = -o, u = [
|
|
447
|
+
{
|
|
448
|
+
x: 12,
|
|
449
|
+
y: l
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
x: c,
|
|
453
|
+
y: l
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
x: c,
|
|
457
|
+
y: 0
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
x: 0,
|
|
461
|
+
y: 0
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
x: 0,
|
|
465
|
+
y: l + 12
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
x: 12,
|
|
469
|
+
y: l
|
|
470
|
+
}
|
|
471
|
+
], d, { cssStyles: f } = t;
|
|
472
|
+
if (t.look === "handDrawn") {
|
|
473
|
+
let e = S.svg(i), n = g(t, {}), r = D(u), a = e.path(r, n);
|
|
474
|
+
d = i.insert(() => a, ":first-child").attr("transform", `translate(${-s / 2}, ${o / 2})`), f && d.attr("style", f);
|
|
475
|
+
} else d = G(i, s, o, u);
|
|
476
|
+
return r && d.attr("style", r), T(t, d), t.intersect = function(e) {
|
|
477
|
+
return W.polygon(t, u, e);
|
|
478
|
+
}, i;
|
|
479
|
+
}
|
|
480
|
+
t(se, "card");
|
|
481
|
+
function ce(e, t) {
|
|
482
|
+
let { nodeStyles: n } = _(t);
|
|
483
|
+
t.label = "";
|
|
484
|
+
let r = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: i } = t, a = Math.max(28, t.width ?? 0), o = [
|
|
485
|
+
{
|
|
486
|
+
x: 0,
|
|
487
|
+
y: a / 2
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
x: a / 2,
|
|
491
|
+
y: 0
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
x: 0,
|
|
495
|
+
y: -a / 2
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
x: -a / 2,
|
|
499
|
+
y: 0
|
|
500
|
+
}
|
|
501
|
+
], s = S.svg(r), c = g(t, {});
|
|
502
|
+
t.look !== "handDrawn" && (c.roughness = 0, c.fillStyle = "solid");
|
|
503
|
+
let l = D(o), u = s.path(l, c), d = r.insert(() => u, ":first-child");
|
|
504
|
+
return i && t.look !== "handDrawn" && d.selectAll("path").attr("style", i), n && t.look !== "handDrawn" && d.selectAll("path").attr("style", n), t.width = 28, t.height = 28, t.intersect = function(e) {
|
|
505
|
+
return W.polygon(t, o, e);
|
|
506
|
+
}, r;
|
|
507
|
+
}
|
|
508
|
+
t(ce, "choice");
|
|
509
|
+
async function le(t, n, r) {
|
|
510
|
+
let { labelStyles: i, nodeStyles: a } = _(n);
|
|
511
|
+
n.labelStyle = i;
|
|
512
|
+
let { shapeSvg: o, bbox: s, halfPadding: c } = await C(t, n, E(n)), l = r?.padding ?? c, u = s.width / 2 + l, d, { cssStyles: p } = n;
|
|
513
|
+
if (n.look === "handDrawn") {
|
|
514
|
+
let e = S.svg(o), t = g(n, {}), r = e.circle(0, 0, u * 2, t);
|
|
515
|
+
d = o.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", f(p));
|
|
516
|
+
} else d = o.insert("circle", ":first-child").attr("class", "basic label-container").attr("style", a).attr("r", u).attr("cx", 0).attr("cy", 0);
|
|
517
|
+
return T(n, d), n.calcIntersect = function(e, t) {
|
|
518
|
+
let n = e.width / 2;
|
|
519
|
+
return W.circle(e, n, t);
|
|
520
|
+
}, n.intersect = function(t) {
|
|
521
|
+
return e.info("Circle intersect", n, u, t), W.circle(n, u, t);
|
|
522
|
+
}, o;
|
|
523
|
+
}
|
|
524
|
+
t(le, "circle");
|
|
525
|
+
function ue(e) {
|
|
526
|
+
let t = Math.cos(Math.PI / 4), n = Math.sin(Math.PI / 4), r = e * 2, i = {
|
|
527
|
+
x: r / 2 * t,
|
|
528
|
+
y: r / 2 * n
|
|
529
|
+
}, a = {
|
|
530
|
+
x: -(r / 2) * t,
|
|
531
|
+
y: r / 2 * n
|
|
532
|
+
}, o = {
|
|
533
|
+
x: -(r / 2) * t,
|
|
534
|
+
y: -(r / 2) * n
|
|
535
|
+
}, s = {
|
|
536
|
+
x: r / 2 * t,
|
|
537
|
+
y: -(r / 2) * n
|
|
538
|
+
};
|
|
539
|
+
return `M ${a.x},${a.y} L ${s.x},${s.y}
|
|
540
|
+
M ${i.x},${i.y} L ${o.x},${o.y}`;
|
|
541
|
+
}
|
|
542
|
+
t(ue, "createLine");
|
|
543
|
+
function de(t, n) {
|
|
544
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
545
|
+
n.labelStyle = r, n.label = "";
|
|
546
|
+
let a = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), o = Math.max(30, n?.width ?? 0), { cssStyles: s } = n, c = S.svg(a), l = g(n, {});
|
|
547
|
+
n.look !== "handDrawn" && (l.roughness = 0, l.fillStyle = "solid");
|
|
548
|
+
let u = c.circle(0, 0, o * 2, l), d = ue(o), f = c.path(d, l), p = a.insert(() => u, ":first-child");
|
|
549
|
+
return p.insert(() => f), s && n.look !== "handDrawn" && p.selectAll("path").attr("style", s), i && n.look !== "handDrawn" && p.selectAll("path").attr("style", i), T(n, p), n.intersect = function(t) {
|
|
550
|
+
return e.info("crossedCircle intersect", n, {
|
|
551
|
+
radius: o,
|
|
552
|
+
point: t
|
|
553
|
+
}), W.circle(n, o, t);
|
|
554
|
+
}, a;
|
|
555
|
+
}
|
|
556
|
+
t(de, "crossedCircle");
|
|
557
|
+
function K(e, t, n, r = 100, i = 0, a = 180) {
|
|
558
|
+
let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
|
|
559
|
+
for (let i = 0; i < r; i++) {
|
|
560
|
+
let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
|
|
561
|
+
o.push({
|
|
562
|
+
x: -a,
|
|
563
|
+
y: -l
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
return o;
|
|
567
|
+
}
|
|
568
|
+
t(K, "generateCirclePoints");
|
|
569
|
+
async function fe(e, t) {
|
|
570
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
571
|
+
t.labelStyle = n;
|
|
572
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = a.width + (t.padding ?? 0), c = a.height + (t.padding ?? 0), l = Math.max(5, c * .1), { cssStyles: u } = t, d = [
|
|
573
|
+
...K(s / 2, -c / 2, l, 30, -90, 0),
|
|
574
|
+
{
|
|
575
|
+
x: -s / 2 - l,
|
|
576
|
+
y: l
|
|
577
|
+
},
|
|
578
|
+
...K(s / 2 + l * 2, -l, l, 20, -180, -270),
|
|
579
|
+
...K(s / 2 + l * 2, l, l, 20, -90, -180),
|
|
580
|
+
{
|
|
581
|
+
x: -s / 2 - l,
|
|
582
|
+
y: -c / 2
|
|
583
|
+
},
|
|
584
|
+
...K(s / 2, c / 2, l, 20, 0, 90)
|
|
585
|
+
], f = [
|
|
586
|
+
{
|
|
587
|
+
x: s / 2,
|
|
588
|
+
y: -c / 2 - l
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
x: -s / 2,
|
|
592
|
+
y: -c / 2 - l
|
|
593
|
+
},
|
|
594
|
+
...K(s / 2, -c / 2, l, 20, -90, 0),
|
|
595
|
+
{
|
|
596
|
+
x: -s / 2 - l,
|
|
597
|
+
y: -l
|
|
598
|
+
},
|
|
599
|
+
...K(s / 2 + s * .1, -l, l, 20, -180, -270),
|
|
600
|
+
...K(s / 2 + s * .1, l, l, 20, -90, -180),
|
|
601
|
+
{
|
|
602
|
+
x: -s / 2 - l,
|
|
603
|
+
y: c / 2
|
|
604
|
+
},
|
|
605
|
+
...K(s / 2, c / 2, l, 20, 0, 90),
|
|
606
|
+
{
|
|
607
|
+
x: -s / 2,
|
|
608
|
+
y: c / 2 + l
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
x: s / 2,
|
|
612
|
+
y: c / 2 + l
|
|
613
|
+
}
|
|
614
|
+
], p = S.svg(i), m = g(t, { fill: "none" });
|
|
615
|
+
t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
|
|
616
|
+
let h = D(d).replace("Z", ""), v = p.path(h, m), y = D(f), b = p.path(y, { ...m }), x = i.insert("g", ":first-child");
|
|
617
|
+
return x.insert(() => b, ":first-child").attr("stroke-opacity", 0), x.insert(() => v, ":first-child"), x.attr("class", "text"), u && t.look !== "handDrawn" && x.selectAll("path").attr("style", u), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), x.attr("transform", `translate(${l}, 0)`), o.attr("transform", `translate(${-s / 2 + l - (a.x - (a.left ?? 0))},${-c / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, x), t.intersect = function(e) {
|
|
618
|
+
return W.polygon(t, f, e);
|
|
619
|
+
}, i;
|
|
620
|
+
}
|
|
621
|
+
t(fe, "curlyBraceLeft");
|
|
622
|
+
function q(e, t, n, r = 100, i = 0, a = 180) {
|
|
623
|
+
let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
|
|
624
|
+
for (let i = 0; i < r; i++) {
|
|
625
|
+
let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
|
|
626
|
+
o.push({
|
|
627
|
+
x: a,
|
|
628
|
+
y: l
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
return o;
|
|
632
|
+
}
|
|
633
|
+
t(q, "generateCirclePoints");
|
|
634
|
+
async function pe(e, t) {
|
|
635
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
636
|
+
t.labelStyle = n;
|
|
637
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = a.width + (t.padding ?? 0), c = a.height + (t.padding ?? 0), l = Math.max(5, c * .1), { cssStyles: u } = t, d = [
|
|
638
|
+
...q(s / 2, -c / 2, l, 20, -90, 0),
|
|
639
|
+
{
|
|
640
|
+
x: s / 2 + l,
|
|
641
|
+
y: -l
|
|
642
|
+
},
|
|
643
|
+
...q(s / 2 + l * 2, -l, l, 20, -180, -270),
|
|
644
|
+
...q(s / 2 + l * 2, l, l, 20, -90, -180),
|
|
645
|
+
{
|
|
646
|
+
x: s / 2 + l,
|
|
647
|
+
y: c / 2
|
|
648
|
+
},
|
|
649
|
+
...q(s / 2, c / 2, l, 20, 0, 90)
|
|
650
|
+
], f = [
|
|
651
|
+
{
|
|
652
|
+
x: -s / 2,
|
|
653
|
+
y: -c / 2 - l
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
x: s / 2,
|
|
657
|
+
y: -c / 2 - l
|
|
658
|
+
},
|
|
659
|
+
...q(s / 2, -c / 2, l, 20, -90, 0),
|
|
660
|
+
{
|
|
661
|
+
x: s / 2 + l,
|
|
662
|
+
y: -l
|
|
663
|
+
},
|
|
664
|
+
...q(s / 2 + l * 2, -l, l, 20, -180, -270),
|
|
665
|
+
...q(s / 2 + l * 2, l, l, 20, -90, -180),
|
|
666
|
+
{
|
|
667
|
+
x: s / 2 + l,
|
|
668
|
+
y: c / 2
|
|
669
|
+
},
|
|
670
|
+
...q(s / 2, c / 2, l, 20, 0, 90),
|
|
671
|
+
{
|
|
672
|
+
x: s / 2,
|
|
673
|
+
y: c / 2 + l
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
x: -s / 2,
|
|
677
|
+
y: c / 2 + l
|
|
678
|
+
}
|
|
679
|
+
], p = S.svg(i), m = g(t, { fill: "none" });
|
|
680
|
+
t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
|
|
681
|
+
let h = D(d).replace("Z", ""), v = p.path(h, m), y = D(f), b = p.path(y, { ...m }), x = i.insert("g", ":first-child");
|
|
682
|
+
return x.insert(() => b, ":first-child").attr("stroke-opacity", 0), x.insert(() => v, ":first-child"), x.attr("class", "text"), u && t.look !== "handDrawn" && x.selectAll("path").attr("style", u), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), x.attr("transform", `translate(${-l}, 0)`), o.attr("transform", `translate(${-s / 2 + (t.padding ?? 0) / 2 - (a.x - (a.left ?? 0))},${-c / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, x), t.intersect = function(e) {
|
|
683
|
+
return W.polygon(t, f, e);
|
|
684
|
+
}, i;
|
|
685
|
+
}
|
|
686
|
+
t(pe, "curlyBraceRight");
|
|
687
|
+
function J(e, t, n, r = 100, i = 0, a = 180) {
|
|
688
|
+
let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
|
|
689
|
+
for (let i = 0; i < r; i++) {
|
|
690
|
+
let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
|
|
691
|
+
o.push({
|
|
692
|
+
x: -a,
|
|
693
|
+
y: -l
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
return o;
|
|
697
|
+
}
|
|
698
|
+
t(J, "generateCirclePoints");
|
|
699
|
+
async function me(e, t) {
|
|
700
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
701
|
+
t.labelStyle = n;
|
|
702
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = a.width + (t.padding ?? 0), c = a.height + (t.padding ?? 0), l = Math.max(5, c * .1), { cssStyles: u } = t, d = [
|
|
703
|
+
...J(s / 2, -c / 2, l, 30, -90, 0),
|
|
704
|
+
{
|
|
705
|
+
x: -s / 2 - l,
|
|
706
|
+
y: l
|
|
707
|
+
},
|
|
708
|
+
...J(s / 2 + l * 2, -l, l, 20, -180, -270),
|
|
709
|
+
...J(s / 2 + l * 2, l, l, 20, -90, -180),
|
|
710
|
+
{
|
|
711
|
+
x: -s / 2 - l,
|
|
712
|
+
y: -c / 2
|
|
713
|
+
},
|
|
714
|
+
...J(s / 2, c / 2, l, 20, 0, 90)
|
|
715
|
+
], f = [
|
|
716
|
+
...J(-s / 2 + l + l / 2, -c / 2, l, 20, -90, -180),
|
|
717
|
+
{
|
|
718
|
+
x: s / 2 - l / 2,
|
|
719
|
+
y: l
|
|
720
|
+
},
|
|
721
|
+
...J(-s / 2 - l / 2, -l, l, 20, 0, 90),
|
|
722
|
+
...J(-s / 2 - l / 2, l, l, 20, -90, 0),
|
|
723
|
+
{
|
|
724
|
+
x: s / 2 - l / 2,
|
|
725
|
+
y: -l
|
|
726
|
+
},
|
|
727
|
+
...J(-s / 2 + l + l / 2, c / 2, l, 30, -180, -270)
|
|
728
|
+
], p = [
|
|
729
|
+
{
|
|
730
|
+
x: s / 2,
|
|
731
|
+
y: -c / 2 - l
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
x: -s / 2,
|
|
735
|
+
y: -c / 2 - l
|
|
736
|
+
},
|
|
737
|
+
...J(s / 2, -c / 2, l, 20, -90, 0),
|
|
738
|
+
{
|
|
739
|
+
x: -s / 2 - l,
|
|
740
|
+
y: -l
|
|
741
|
+
},
|
|
742
|
+
...J(s / 2 + l * 2, -l, l, 20, -180, -270),
|
|
743
|
+
...J(s / 2 + l * 2, l, l, 20, -90, -180),
|
|
744
|
+
{
|
|
745
|
+
x: -s / 2 - l,
|
|
746
|
+
y: c / 2
|
|
747
|
+
},
|
|
748
|
+
...J(s / 2, c / 2, l, 20, 0, 90),
|
|
749
|
+
{
|
|
750
|
+
x: -s / 2,
|
|
751
|
+
y: c / 2 + l
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
x: s / 2 - l - l / 2,
|
|
755
|
+
y: c / 2 + l
|
|
756
|
+
},
|
|
757
|
+
...J(-s / 2 + l + l / 2, -c / 2, l, 20, -90, -180),
|
|
758
|
+
{
|
|
759
|
+
x: s / 2 - l / 2,
|
|
760
|
+
y: l
|
|
761
|
+
},
|
|
762
|
+
...J(-s / 2 - l / 2, -l, l, 20, 0, 90),
|
|
763
|
+
...J(-s / 2 - l / 2, l, l, 20, -90, 0),
|
|
764
|
+
{
|
|
765
|
+
x: s / 2 - l / 2,
|
|
766
|
+
y: -l
|
|
767
|
+
},
|
|
768
|
+
...J(-s / 2 + l + l / 2, c / 2, l, 30, -180, -270)
|
|
769
|
+
], m = S.svg(i), h = g(t, { fill: "none" });
|
|
770
|
+
t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
|
|
771
|
+
let v = D(d).replace("Z", ""), y = m.path(v, h), b = D(f).replace("Z", ""), x = m.path(b, h), w = D(p), O = m.path(w, { ...h }), k = i.insert("g", ":first-child");
|
|
772
|
+
return k.insert(() => O, ":first-child").attr("stroke-opacity", 0), k.insert(() => y, ":first-child"), k.insert(() => x, ":first-child"), k.attr("class", "text"), u && t.look !== "handDrawn" && k.selectAll("path").attr("style", u), r && t.look !== "handDrawn" && k.selectAll("path").attr("style", r), k.attr("transform", `translate(${l - l / 4}, 0)`), o.attr("transform", `translate(${-s / 2 + (t.padding ?? 0) / 2 - (a.x - (a.left ?? 0))},${-c / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, k), t.intersect = function(e) {
|
|
773
|
+
return W.polygon(t, p, e);
|
|
774
|
+
}, i;
|
|
775
|
+
}
|
|
776
|
+
t(me, "curlyBraces");
|
|
777
|
+
async function he(e, t) {
|
|
778
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
779
|
+
t.labelStyle = n;
|
|
780
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(80, (a.width + (t.padding ?? 0) * 2) * 1.25, t?.width ?? 0), s = Math.max(20, a.height + (t.padding ?? 0) * 2, t?.height ?? 0), c = s / 2, { cssStyles: l } = t, u = S.svg(i), d = g(t, {});
|
|
781
|
+
t.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
|
|
782
|
+
let f = o, p = s, m = f - c, h = p / 4, v = [
|
|
783
|
+
{
|
|
784
|
+
x: m,
|
|
785
|
+
y: 0
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
x: h,
|
|
789
|
+
y: 0
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
x: 0,
|
|
793
|
+
y: p / 2
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
x: h,
|
|
797
|
+
y: p
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
x: m,
|
|
801
|
+
y: p
|
|
802
|
+
},
|
|
803
|
+
...k(-m, -p / 2, c, 50, 270, 90)
|
|
804
|
+
], y = D(v), b = u.path(y, d), x = i.insert(() => b, ":first-child");
|
|
805
|
+
return x.attr("class", "basic label-container"), l && t.look !== "handDrawn" && x.selectChildren("path").attr("style", l), r && t.look !== "handDrawn" && x.selectChildren("path").attr("style", r), x.attr("transform", `translate(${-o / 2}, ${-s / 2})`), T(t, x), t.intersect = function(e) {
|
|
806
|
+
return W.polygon(t, v, e);
|
|
807
|
+
}, i;
|
|
808
|
+
}
|
|
809
|
+
t(he, "curvedTrapezoid");
|
|
810
|
+
var ge = /* @__PURE__ */ t((e, t, n, r, i, a) => [
|
|
811
|
+
`M${e},${t + a}`,
|
|
812
|
+
`a${i},${a} 0,0,0 ${n},0`,
|
|
813
|
+
`a${i},${a} 0,0,0 ${-n},0`,
|
|
814
|
+
`l0,${r}`,
|
|
815
|
+
`a${i},${a} 0,0,0 ${n},0`,
|
|
816
|
+
`l0,${-r}`
|
|
817
|
+
].join(" "), "createCylinderPathD"), _e = /* @__PURE__ */ t((e, t, n, r, i, a) => [
|
|
818
|
+
`M${e},${t + a}`,
|
|
819
|
+
`M${e + n},${t + a}`,
|
|
820
|
+
`a${i},${a} 0,0,0 ${-n},0`,
|
|
821
|
+
`l0,${r}`,
|
|
822
|
+
`a${i},${a} 0,0,0 ${n},0`,
|
|
823
|
+
`l0,${-r}`
|
|
824
|
+
].join(" "), "createOuterCylinderPathD"), ve = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD");
|
|
825
|
+
async function ye(e, t) {
|
|
826
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
827
|
+
t.labelStyle = n;
|
|
828
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + t.padding, t.width ?? 0), c = s / 2, l = c / (2.5 + s / 50), u = Math.max(a.height + l + t.padding, t.height ?? 0), d, { cssStyles: p } = t;
|
|
829
|
+
if (t.look === "handDrawn") {
|
|
830
|
+
let e = S.svg(i), n = _e(0, 0, s, u, c, l), r = ve(0, l, s, u, c, l), a = e.path(n, g(t, {})), o = e.path(r, g(t, { fill: "none" }));
|
|
831
|
+
d = i.insert(() => o, ":first-child"), d = i.insert(() => a, ":first-child"), d.attr("class", "basic label-container"), p && d.attr("style", p);
|
|
832
|
+
} else {
|
|
833
|
+
let e = ge(0, 0, s, u, c, l);
|
|
834
|
+
d = i.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", f(p)).attr("style", r);
|
|
835
|
+
}
|
|
836
|
+
return d.attr("label-offset-y", l), d.attr("transform", `translate(${-s / 2}, ${-(u / 2 + l)})`), T(t, d), o.attr("transform", `translate(${-(a.width / 2) - (a.x - (a.left ?? 0))}, ${-(a.height / 2) + (t.padding ?? 0) / 1.5 - (a.y - (a.top ?? 0))})`), t.intersect = function(e) {
|
|
837
|
+
let n = W.rect(t, e), r = n.x - (t.x ?? 0);
|
|
838
|
+
if (c != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - l)) {
|
|
839
|
+
let i = l * l * (1 - r * r / (c * c));
|
|
840
|
+
i > 0 && (i = Math.sqrt(i)), i = l - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
|
|
841
|
+
}
|
|
842
|
+
return n;
|
|
843
|
+
}, i;
|
|
844
|
+
}
|
|
845
|
+
t(ye, "cylinder");
|
|
846
|
+
async function be(e, t) {
|
|
847
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
848
|
+
t.labelStyle = n;
|
|
849
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = a.width + t.padding, c = a.height + t.padding, l = c * .2, u = -s / 2, d = -c / 2 - l / 2, { cssStyles: f } = t, p = S.svg(i), m = g(t, {});
|
|
850
|
+
t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
|
|
851
|
+
let h = [
|
|
852
|
+
{
|
|
853
|
+
x: u,
|
|
854
|
+
y: d + l
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
x: -u,
|
|
858
|
+
y: d + l
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
x: -u,
|
|
862
|
+
y: -d
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
x: u,
|
|
866
|
+
y: -d
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
x: u,
|
|
870
|
+
y: d
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
x: -u,
|
|
874
|
+
y: d
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
x: -u,
|
|
878
|
+
y: d + l
|
|
879
|
+
}
|
|
880
|
+
], v = p.polygon(h.map((e) => [e.x, e.y]), m), y = i.insert(() => v, ":first-child");
|
|
881
|
+
return y.attr("class", "basic label-container"), f && t.look !== "handDrawn" && y.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && y.selectAll("path").attr("style", r), o.attr("transform", `translate(${u + (t.padding ?? 0) / 2 - (a.x - (a.left ?? 0))}, ${d + l + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, y), t.intersect = function(e) {
|
|
882
|
+
return W.rect(t, e);
|
|
883
|
+
}, i;
|
|
884
|
+
}
|
|
885
|
+
t(be, "dividedRectangle");
|
|
886
|
+
async function xe(t, n) {
|
|
887
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
888
|
+
n.labelStyle = r;
|
|
889
|
+
let { shapeSvg: a, bbox: o, halfPadding: s } = await C(t, n, E(n)), c = o.width / 2 + s + 5, l = o.width / 2 + s, u, { cssStyles: d } = n;
|
|
890
|
+
if (n.look === "handDrawn") {
|
|
891
|
+
let e = S.svg(a), t = g(n, {
|
|
892
|
+
roughness: .2,
|
|
893
|
+
strokeWidth: 2.5
|
|
894
|
+
}), r = g(n, {
|
|
895
|
+
roughness: .2,
|
|
896
|
+
strokeWidth: 1.5
|
|
897
|
+
}), i = e.circle(0, 0, c * 2, t), o = e.circle(0, 0, l * 2, r);
|
|
898
|
+
u = a.insert("g", ":first-child"), u.attr("class", f(n.cssClasses)).attr("style", f(d)), u.node()?.appendChild(i), u.node()?.appendChild(o);
|
|
899
|
+
} else {
|
|
900
|
+
u = a.insert("g", ":first-child");
|
|
901
|
+
let e = u.insert("circle", ":first-child"), t = u.insert("circle");
|
|
902
|
+
u.attr("class", "basic label-container").attr("style", i), e.attr("class", "outer-circle").attr("style", i).attr("r", c).attr("cx", 0).attr("cy", 0), t.attr("class", "inner-circle").attr("style", i).attr("r", l).attr("cx", 0).attr("cy", 0);
|
|
903
|
+
}
|
|
904
|
+
return T(n, u), n.intersect = function(t) {
|
|
905
|
+
return e.info("DoubleCircle intersect", n, c, t), W.circle(n, c, t);
|
|
906
|
+
}, a;
|
|
907
|
+
}
|
|
908
|
+
t(xe, "doublecircle");
|
|
909
|
+
function Se(t, n, { config: { themeVariables: r } }) {
|
|
910
|
+
let { labelStyles: i, nodeStyles: a } = _(n);
|
|
911
|
+
n.label = "", n.labelStyle = i;
|
|
912
|
+
let o = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), { cssStyles: s } = n, c = S.svg(o), { nodeBorder: l } = r, u = g(n, { fillStyle: "solid" });
|
|
913
|
+
n.look !== "handDrawn" && (u.roughness = 0);
|
|
914
|
+
let d = c.circle(0, 0, 14, u), f = o.insert(() => d, ":first-child");
|
|
915
|
+
return f.selectAll("path").attr("style", `fill: ${l} !important;`), s && s.length > 0 && n.look !== "handDrawn" && f.selectAll("path").attr("style", s), a && n.look !== "handDrawn" && f.selectAll("path").attr("style", a), T(n, f), n.intersect = function(t) {
|
|
916
|
+
return e.info("filledCircle intersect", n, {
|
|
917
|
+
radius: 7,
|
|
918
|
+
point: t
|
|
919
|
+
}), W.circle(n, 7, t);
|
|
920
|
+
}, o;
|
|
921
|
+
}
|
|
922
|
+
t(Se, "filledCircle");
|
|
923
|
+
async function Ce(t, n) {
|
|
924
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
925
|
+
n.labelStyle = r;
|
|
926
|
+
let { shapeSvg: a, bbox: o, label: s } = await C(t, n, E(n)), c = o.width + (n.padding ?? 0), l = c + o.height, u = c + o.height, d = [
|
|
927
|
+
{
|
|
928
|
+
x: 0,
|
|
929
|
+
y: -l
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
x: u,
|
|
933
|
+
y: -l
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
x: u / 2,
|
|
937
|
+
y: 0
|
|
938
|
+
}
|
|
939
|
+
], { cssStyles: f } = n, p = S.svg(a), m = g(n, {});
|
|
940
|
+
n.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
|
|
941
|
+
let h = D(d), v = p.path(h, m), y = a.insert(() => v, ":first-child").attr("transform", `translate(${-l / 2}, ${l / 2})`);
|
|
942
|
+
return f && n.look !== "handDrawn" && y.selectChildren("path").attr("style", f), i && n.look !== "handDrawn" && y.selectChildren("path").attr("style", i), n.width = c, n.height = l, T(n, y), s.attr("transform", `translate(${-o.width / 2 - (o.x - (o.left ?? 0))}, ${-l / 2 + (n.padding ?? 0) / 2 + (o.y - (o.top ?? 0))})`), n.intersect = function(t) {
|
|
943
|
+
return e.info("Triangle intersect", n, d, t), W.polygon(n, d, t);
|
|
944
|
+
}, a;
|
|
945
|
+
}
|
|
946
|
+
t(Ce, "flippedTriangle");
|
|
947
|
+
function we(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
|
|
948
|
+
let { nodeStyles: a } = _(t);
|
|
949
|
+
t.label = "";
|
|
950
|
+
let o = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: s } = t, c = Math.max(70, t?.width ?? 0), l = Math.max(10, t?.height ?? 0);
|
|
951
|
+
n === "LR" && (c = Math.max(10, t?.width ?? 0), l = Math.max(70, t?.height ?? 0));
|
|
952
|
+
let u = -1 * c / 2, d = -1 * l / 2, f = S.svg(o), p = g(t, {
|
|
953
|
+
stroke: i.lineColor,
|
|
954
|
+
fill: i.lineColor
|
|
955
|
+
});
|
|
956
|
+
t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
|
|
957
|
+
let m = f.rectangle(u, d, c, l, p), h = o.insert(() => m, ":first-child");
|
|
958
|
+
s && t.look !== "handDrawn" && h.selectAll("path").attr("style", s), a && t.look !== "handDrawn" && h.selectAll("path").attr("style", a), T(t, h);
|
|
959
|
+
let v = r?.padding ?? 0;
|
|
960
|
+
return t.width && t.height && (t.width += v / 2 || 0, t.height += v / 2 || 0), t.intersect = function(e) {
|
|
961
|
+
return W.rect(t, e);
|
|
962
|
+
}, o;
|
|
963
|
+
}
|
|
964
|
+
t(we, "forkJoin");
|
|
965
|
+
async function Te(t, n) {
|
|
966
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
967
|
+
n.labelStyle = r;
|
|
968
|
+
let { shapeSvg: a, bbox: o } = await C(t, n, E(n)), s = Math.max(80, o.width + (n.padding ?? 0) * 2, n?.width ?? 0), c = Math.max(50, o.height + (n.padding ?? 0) * 2, n?.height ?? 0), l = c / 2, { cssStyles: u } = n, d = S.svg(a), f = g(n, {});
|
|
969
|
+
n.look !== "handDrawn" && (f.roughness = 0, f.fillStyle = "solid");
|
|
970
|
+
let p = [
|
|
971
|
+
{
|
|
972
|
+
x: -s / 2,
|
|
973
|
+
y: -c / 2
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
x: s / 2 - l,
|
|
977
|
+
y: -c / 2
|
|
978
|
+
},
|
|
979
|
+
...k(-s / 2 + l, 0, l, 50, 90, 270),
|
|
980
|
+
{
|
|
981
|
+
x: s / 2 - l,
|
|
982
|
+
y: c / 2
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
x: -s / 2,
|
|
986
|
+
y: c / 2
|
|
987
|
+
}
|
|
988
|
+
], m = D(p), h = d.path(m, f), v = a.insert(() => h, ":first-child");
|
|
989
|
+
return v.attr("class", "basic label-container"), u && n.look !== "handDrawn" && v.selectChildren("path").attr("style", u), i && n.look !== "handDrawn" && v.selectChildren("path").attr("style", i), T(n, v), n.intersect = function(t) {
|
|
990
|
+
return e.info("Pill intersect", n, {
|
|
991
|
+
radius: l,
|
|
992
|
+
point: t
|
|
993
|
+
}), W.polygon(n, p, t);
|
|
994
|
+
}, a;
|
|
995
|
+
}
|
|
996
|
+
t(Te, "halfRoundedRectangle");
|
|
997
|
+
var Ee = /* @__PURE__ */ t((e, t, n, r, i) => [
|
|
998
|
+
`M${e + i},${t}`,
|
|
999
|
+
`L${e + n - i},${t}`,
|
|
1000
|
+
`L${e + n},${t - r / 2}`,
|
|
1001
|
+
`L${e + n - i},${t - r}`,
|
|
1002
|
+
`L${e + i},${t - r}`,
|
|
1003
|
+
`L${e},${t - r / 2}`,
|
|
1004
|
+
"Z"
|
|
1005
|
+
].join(" "), "createHexagonPathD");
|
|
1006
|
+
async function De(e, t) {
|
|
1007
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1008
|
+
t.labelStyle = n;
|
|
1009
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = a.height + t.padding, s = o / 4, c = a.width + 2 * s + t.padding, l = [
|
|
1010
|
+
{
|
|
1011
|
+
x: s,
|
|
1012
|
+
y: 0
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
x: c - s,
|
|
1016
|
+
y: 0
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
x: c,
|
|
1020
|
+
y: -o / 2
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
x: c - s,
|
|
1024
|
+
y: -o
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
x: s,
|
|
1028
|
+
y: -o
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
x: 0,
|
|
1032
|
+
y: -o / 2
|
|
1033
|
+
}
|
|
1034
|
+
], u, { cssStyles: d } = t;
|
|
1035
|
+
if (t.look === "handDrawn") {
|
|
1036
|
+
let e = S.svg(i), n = g(t, {}), r = Ee(0, 0, c, o, s), a = e.path(r, n);
|
|
1037
|
+
u = i.insert(() => a, ":first-child").attr("transform", `translate(${-c / 2}, ${o / 2})`), d && u.attr("style", d);
|
|
1038
|
+
} else u = G(i, c, o, l);
|
|
1039
|
+
return r && u.attr("style", r), t.width = c, t.height = o, T(t, u), t.intersect = function(e) {
|
|
1040
|
+
return W.polygon(t, l, e);
|
|
1041
|
+
}, i;
|
|
1042
|
+
}
|
|
1043
|
+
t(De, "hexagon");
|
|
1044
|
+
async function Oe(t, n) {
|
|
1045
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
1046
|
+
n.label = "", n.labelStyle = r;
|
|
1047
|
+
let { shapeSvg: a } = await C(t, n, E(n)), o = Math.max(30, n?.width ?? 0), s = Math.max(30, n?.height ?? 0), { cssStyles: c } = n, l = S.svg(a), u = g(n, {});
|
|
1048
|
+
n.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
|
|
1049
|
+
let d = [
|
|
1050
|
+
{
|
|
1051
|
+
x: 0,
|
|
1052
|
+
y: 0
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
x: o,
|
|
1056
|
+
y: 0
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
x: 0,
|
|
1060
|
+
y: s
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
x: o,
|
|
1064
|
+
y: s
|
|
1065
|
+
}
|
|
1066
|
+
], f = D(d), p = l.path(f, u), m = a.insert(() => p, ":first-child");
|
|
1067
|
+
return m.attr("class", "basic label-container"), c && n.look !== "handDrawn" && m.selectChildren("path").attr("style", c), i && n.look !== "handDrawn" && m.selectChildren("path").attr("style", i), m.attr("transform", `translate(${-o / 2}, ${-s / 2})`), T(n, m), n.intersect = function(t) {
|
|
1068
|
+
return e.info("Pill intersect", n, { points: d }), W.polygon(n, d, t);
|
|
1069
|
+
}, a;
|
|
1070
|
+
}
|
|
1071
|
+
t(Oe, "hourglass");
|
|
1072
|
+
async function ke(t, n, { config: { themeVariables: r, flowchart: i } }) {
|
|
1073
|
+
let { labelStyles: a } = _(n);
|
|
1074
|
+
n.labelStyle = a;
|
|
1075
|
+
let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
|
|
1076
|
+
n.width = Math.max(c, l ?? 0);
|
|
1077
|
+
let { shapeSvg: u, bbox: d, label: f } = await C(t, n, "icon-shape default"), p = n.pos === "t", m = c, h = c, { nodeBorder: v } = r, { stylesMap: b } = y(n), w = -h / 2, E = -m / 2, D = n.label ? 8 : 0, O = S.svg(u), k = g(n, {
|
|
1078
|
+
stroke: "none",
|
|
1079
|
+
fill: "none"
|
|
1080
|
+
});
|
|
1081
|
+
n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
|
|
1082
|
+
let A = O.rectangle(w, E, h, m, k), j = Math.max(h, d.width), M = m + d.height + D, N = O.rectangle(-j / 2, -M / 2, j, M, {
|
|
1083
|
+
...k,
|
|
1084
|
+
fill: "transparent",
|
|
1085
|
+
stroke: "none"
|
|
1086
|
+
}), P = u.insert(() => A, ":first-child"), F = u.insert(() => N);
|
|
1087
|
+
if (n.icon) {
|
|
1088
|
+
let e = u.append("g");
|
|
1089
|
+
e.html(`<g>${await x(n.icon, {
|
|
1090
|
+
height: c,
|
|
1091
|
+
width: c,
|
|
1092
|
+
fallbackPrefix: ""
|
|
1093
|
+
})}</g>`);
|
|
1094
|
+
let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
|
|
1095
|
+
e.attr("transform", `translate(${-r / 2 - a},${p ? d.height / 2 + D / 2 - i / 2 - o : -d.height / 2 - D / 2 - i / 2 - o})`), e.attr("style", `color: ${b.get("stroke") ?? v};`);
|
|
1096
|
+
}
|
|
1097
|
+
return f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${p ? -M / 2 : M / 2 - d.height})`), P.attr("transform", `translate(0,${p ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), T(n, F), n.intersect = function(t) {
|
|
1098
|
+
if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
|
|
1099
|
+
let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
|
|
1100
|
+
return o = p ? [
|
|
1101
|
+
{
|
|
1102
|
+
x: r - d.width / 2,
|
|
1103
|
+
y: i - a / 2
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
x: r + d.width / 2,
|
|
1107
|
+
y: i - a / 2
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
x: r + d.width / 2,
|
|
1111
|
+
y: i - a / 2 + d.height + D
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
x: r + h / 2,
|
|
1115
|
+
y: i - a / 2 + d.height + D
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
x: r + h / 2,
|
|
1119
|
+
y: i + a / 2
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
x: r - h / 2,
|
|
1123
|
+
y: i + a / 2
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
x: r - h / 2,
|
|
1127
|
+
y: i - a / 2 + d.height + D
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
x: r - d.width / 2,
|
|
1131
|
+
y: i - a / 2 + d.height + D
|
|
1132
|
+
}
|
|
1133
|
+
] : [
|
|
1134
|
+
{
|
|
1135
|
+
x: r - h / 2,
|
|
1136
|
+
y: i - a / 2
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
x: r + h / 2,
|
|
1140
|
+
y: i - a / 2
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
x: r + h / 2,
|
|
1144
|
+
y: i - a / 2 + m
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
x: r + d.width / 2,
|
|
1148
|
+
y: i - a / 2 + m
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
x: r + d.width / 2 / 2,
|
|
1152
|
+
y: i + a / 2
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
x: r - d.width / 2,
|
|
1156
|
+
y: i + a / 2
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
x: r - d.width / 2,
|
|
1160
|
+
y: i - a / 2 + m
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
x: r - h / 2,
|
|
1164
|
+
y: i - a / 2 + m
|
|
1165
|
+
}
|
|
1166
|
+
], W.polygon(n, o, t);
|
|
1167
|
+
}, u;
|
|
1168
|
+
}
|
|
1169
|
+
t(ke, "icon");
|
|
1170
|
+
async function Ae(t, n, { config: { themeVariables: r, flowchart: i } }) {
|
|
1171
|
+
let { labelStyles: a } = _(n);
|
|
1172
|
+
n.labelStyle = a;
|
|
1173
|
+
let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
|
|
1174
|
+
n.width = Math.max(c, l ?? 0);
|
|
1175
|
+
let { shapeSvg: u, bbox: d, label: f } = await C(t, n, "icon-shape default"), p = n.label ? 8 : 0, m = n.pos === "t", { nodeBorder: h, mainBkg: v } = r, { stylesMap: b } = y(n), w = S.svg(u), E = g(n, {});
|
|
1176
|
+
n.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid"), E.stroke = b.get("fill") ?? v;
|
|
1177
|
+
let D = u.append("g");
|
|
1178
|
+
n.icon && D.html(`<g>${await x(n.icon, {
|
|
1179
|
+
height: c,
|
|
1180
|
+
width: c,
|
|
1181
|
+
fallbackPrefix: ""
|
|
1182
|
+
})}</g>`);
|
|
1183
|
+
let O = D.node().getBBox(), k = O.width, A = O.height, j = O.x, M = O.y, N = Math.max(k, A) * Math.SQRT2 + 40, P = w.circle(0, 0, N, E), F = Math.max(N, d.width), I = N + d.height + p, L = w.rectangle(-F / 2, -I / 2, F, I, {
|
|
1184
|
+
...E,
|
|
1185
|
+
fill: "transparent",
|
|
1186
|
+
stroke: "none"
|
|
1187
|
+
}), R = u.insert(() => P, ":first-child"), z = u.insert(() => L);
|
|
1188
|
+
return D.attr("transform", `translate(${-k / 2 - j},${m ? d.height / 2 + p / 2 - A / 2 - M : -d.height / 2 - p / 2 - A / 2 - M})`), D.attr("style", `color: ${b.get("stroke") ?? h};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -I / 2 : I / 2 - d.height})`), R.attr("transform", `translate(0,${m ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), T(n, z), n.intersect = function(t) {
|
|
1189
|
+
return e.info("iconSquare intersect", n, t), W.rect(n, t);
|
|
1190
|
+
}, u;
|
|
1191
|
+
}
|
|
1192
|
+
t(Ae, "iconCircle");
|
|
1193
|
+
async function je(t, n, { config: { themeVariables: r, flowchart: i } }) {
|
|
1194
|
+
let { labelStyles: a } = _(n);
|
|
1195
|
+
n.labelStyle = a;
|
|
1196
|
+
let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
|
|
1197
|
+
n.width = Math.max(c, l ?? 0);
|
|
1198
|
+
let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(t, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, v = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = y(n), D = -v / 2, O = -h / 2, k = n.label ? 8 : 0, A = S.svg(u), j = g(n, {});
|
|
1199
|
+
n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
|
|
1200
|
+
let N = A.path(M(D, O, v, h, 5), j), P = Math.max(v, d.width), F = h + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
|
|
1201
|
+
...j,
|
|
1202
|
+
fill: "transparent",
|
|
1203
|
+
stroke: "none"
|
|
1204
|
+
}), L = u.insert(() => N, ":first-child").attr("class", "icon-shape2"), R = u.insert(() => I);
|
|
1205
|
+
if (n.icon) {
|
|
1206
|
+
let e = u.append("g");
|
|
1207
|
+
e.html(`<g>${await x(n.icon, {
|
|
1208
|
+
height: c,
|
|
1209
|
+
width: c,
|
|
1210
|
+
fallbackPrefix: ""
|
|
1211
|
+
})}</g>`);
|
|
1212
|
+
let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
|
|
1213
|
+
e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
|
|
1214
|
+
}
|
|
1215
|
+
return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), L.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(n, R), n.intersect = function(t) {
|
|
1216
|
+
if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
|
|
1217
|
+
let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
|
|
1218
|
+
return o = m ? [
|
|
1219
|
+
{
|
|
1220
|
+
x: r - d.width / 2,
|
|
1221
|
+
y: i - a / 2
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
x: r + d.width / 2,
|
|
1225
|
+
y: i - a / 2
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
x: r + d.width / 2,
|
|
1229
|
+
y: i - a / 2 + d.height + k
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
x: r + v / 2,
|
|
1233
|
+
y: i - a / 2 + d.height + k
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
x: r + v / 2,
|
|
1237
|
+
y: i + a / 2
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
x: r - v / 2,
|
|
1241
|
+
y: i + a / 2
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
x: r - v / 2,
|
|
1245
|
+
y: i - a / 2 + d.height + k
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
x: r - d.width / 2,
|
|
1249
|
+
y: i - a / 2 + d.height + k
|
|
1250
|
+
}
|
|
1251
|
+
] : [
|
|
1252
|
+
{
|
|
1253
|
+
x: r - v / 2,
|
|
1254
|
+
y: i - a / 2
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
x: r + v / 2,
|
|
1258
|
+
y: i - a / 2
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
x: r + v / 2,
|
|
1262
|
+
y: i - a / 2 + h
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
x: r + d.width / 2,
|
|
1266
|
+
y: i - a / 2 + h
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
x: r + d.width / 2 / 2,
|
|
1270
|
+
y: i + a / 2
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
x: r - d.width / 2,
|
|
1274
|
+
y: i + a / 2
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
x: r - d.width / 2,
|
|
1278
|
+
y: i - a / 2 + h
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
x: r - v / 2,
|
|
1282
|
+
y: i - a / 2 + h
|
|
1283
|
+
}
|
|
1284
|
+
], W.polygon(n, o, t);
|
|
1285
|
+
}, u;
|
|
1286
|
+
}
|
|
1287
|
+
t(je, "iconRounded");
|
|
1288
|
+
async function Me(t, n, { config: { themeVariables: r, flowchart: i } }) {
|
|
1289
|
+
let { labelStyles: a } = _(n);
|
|
1290
|
+
n.labelStyle = a;
|
|
1291
|
+
let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
|
|
1292
|
+
n.width = Math.max(c, l ?? 0);
|
|
1293
|
+
let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(t, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, v = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = y(n), D = -v / 2, O = -h / 2, k = n.label ? 8 : 0, A = S.svg(u), j = g(n, {});
|
|
1294
|
+
n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
|
|
1295
|
+
let N = A.path(M(D, O, v, h, .1), j), P = Math.max(v, d.width), F = h + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
|
|
1296
|
+
...j,
|
|
1297
|
+
fill: "transparent",
|
|
1298
|
+
stroke: "none"
|
|
1299
|
+
}), L = u.insert(() => N, ":first-child"), R = u.insert(() => I);
|
|
1300
|
+
if (n.icon) {
|
|
1301
|
+
let e = u.append("g");
|
|
1302
|
+
e.html(`<g>${await x(n.icon, {
|
|
1303
|
+
height: c,
|
|
1304
|
+
width: c,
|
|
1305
|
+
fallbackPrefix: ""
|
|
1306
|
+
})}</g>`);
|
|
1307
|
+
let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
|
|
1308
|
+
e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
|
|
1309
|
+
}
|
|
1310
|
+
return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), L.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(n, R), n.intersect = function(t) {
|
|
1311
|
+
if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
|
|
1312
|
+
let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
|
|
1313
|
+
return o = m ? [
|
|
1314
|
+
{
|
|
1315
|
+
x: r - d.width / 2,
|
|
1316
|
+
y: i - a / 2
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
x: r + d.width / 2,
|
|
1320
|
+
y: i - a / 2
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
x: r + d.width / 2,
|
|
1324
|
+
y: i - a / 2 + d.height + k
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
x: r + v / 2,
|
|
1328
|
+
y: i - a / 2 + d.height + k
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
x: r + v / 2,
|
|
1332
|
+
y: i + a / 2
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
x: r - v / 2,
|
|
1336
|
+
y: i + a / 2
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
x: r - v / 2,
|
|
1340
|
+
y: i - a / 2 + d.height + k
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
x: r - d.width / 2,
|
|
1344
|
+
y: i - a / 2 + d.height + k
|
|
1345
|
+
}
|
|
1346
|
+
] : [
|
|
1347
|
+
{
|
|
1348
|
+
x: r - v / 2,
|
|
1349
|
+
y: i - a / 2
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
x: r + v / 2,
|
|
1353
|
+
y: i - a / 2
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
x: r + v / 2,
|
|
1357
|
+
y: i - a / 2 + h
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
x: r + d.width / 2,
|
|
1361
|
+
y: i - a / 2 + h
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
x: r + d.width / 2 / 2,
|
|
1365
|
+
y: i + a / 2
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
x: r - d.width / 2,
|
|
1369
|
+
y: i + a / 2
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
x: r - d.width / 2,
|
|
1373
|
+
y: i - a / 2 + h
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
x: r - v / 2,
|
|
1377
|
+
y: i - a / 2 + h
|
|
1378
|
+
}
|
|
1379
|
+
], W.polygon(n, o, t);
|
|
1380
|
+
}, u;
|
|
1381
|
+
}
|
|
1382
|
+
t(Me, "iconSquare");
|
|
1383
|
+
async function Ne(t, n, { config: { flowchart: r } }) {
|
|
1384
|
+
let i = new Image();
|
|
1385
|
+
i.src = n?.img ?? "", await i.decode();
|
|
1386
|
+
let a = Number(i.naturalWidth.toString().replace("px", "")), o = Number(i.naturalHeight.toString().replace("px", ""));
|
|
1387
|
+
n.imageAspectRatio = a / o;
|
|
1388
|
+
let { labelStyles: s } = _(n);
|
|
1389
|
+
n.labelStyle = s;
|
|
1390
|
+
let c = r?.wrappingWidth;
|
|
1391
|
+
n.defaultWidth = r?.wrappingWidth;
|
|
1392
|
+
let l = Math.max(n.label ? c ?? 0 : 0, n?.assetWidth ?? a), u = n.constraint === "on" && n?.assetHeight ? n.assetHeight * n.imageAspectRatio : l, d = n.constraint === "on" ? u / n.imageAspectRatio : n?.assetHeight ?? o;
|
|
1393
|
+
n.width = Math.max(u, c ?? 0);
|
|
1394
|
+
let { shapeSvg: f, bbox: p, label: m } = await C(t, n, "image-shape default"), h = n.pos === "t", v = -u / 2, y = -d / 2, b = n.label ? 8 : 0, x = S.svg(f), w = g(n, {});
|
|
1395
|
+
n.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
|
|
1396
|
+
let E = x.rectangle(v, y, u, d, w), D = Math.max(u, p.width), O = d + p.height + b, k = x.rectangle(-D / 2, -O / 2, D, O, {
|
|
1397
|
+
...w,
|
|
1398
|
+
fill: "none",
|
|
1399
|
+
stroke: "none"
|
|
1400
|
+
}), A = f.insert(() => E, ":first-child"), j = f.insert(() => k);
|
|
1401
|
+
if (n.img) {
|
|
1402
|
+
let e = f.append("image");
|
|
1403
|
+
e.attr("href", n.img), e.attr("width", u), e.attr("height", d), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-u / 2},${h ? O / 2 - d : -O / 2})`);
|
|
1404
|
+
}
|
|
1405
|
+
return m.attr("transform", `translate(${-p.width / 2 - (p.x - (p.left ?? 0))},${h ? -d / 2 - p.height / 2 - b / 2 : d / 2 - p.height / 2 + b / 2})`), A.attr("transform", `translate(0,${h ? p.height / 2 + b / 2 : -p.height / 2 - b / 2})`), T(n, j), n.intersect = function(t) {
|
|
1406
|
+
if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
|
|
1407
|
+
let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
|
|
1408
|
+
return o = h ? [
|
|
1409
|
+
{
|
|
1410
|
+
x: r - p.width / 2,
|
|
1411
|
+
y: i - a / 2
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
x: r + p.width / 2,
|
|
1415
|
+
y: i - a / 2
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
x: r + p.width / 2,
|
|
1419
|
+
y: i - a / 2 + p.height + b
|
|
1420
|
+
},
|
|
1421
|
+
{
|
|
1422
|
+
x: r + u / 2,
|
|
1423
|
+
y: i - a / 2 + p.height + b
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
x: r + u / 2,
|
|
1427
|
+
y: i + a / 2
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
x: r - u / 2,
|
|
1431
|
+
y: i + a / 2
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
x: r - u / 2,
|
|
1435
|
+
y: i - a / 2 + p.height + b
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
x: r - p.width / 2,
|
|
1439
|
+
y: i - a / 2 + p.height + b
|
|
1440
|
+
}
|
|
1441
|
+
] : [
|
|
1442
|
+
{
|
|
1443
|
+
x: r - u / 2,
|
|
1444
|
+
y: i - a / 2
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
x: r + u / 2,
|
|
1448
|
+
y: i - a / 2
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
x: r + u / 2,
|
|
1452
|
+
y: i - a / 2 + d
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
x: r + p.width / 2,
|
|
1456
|
+
y: i - a / 2 + d
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
x: r + p.width / 2 / 2,
|
|
1460
|
+
y: i + a / 2
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
x: r - p.width / 2,
|
|
1464
|
+
y: i + a / 2
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
x: r - p.width / 2,
|
|
1468
|
+
y: i - a / 2 + d
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
x: r - u / 2,
|
|
1472
|
+
y: i - a / 2 + d
|
|
1473
|
+
}
|
|
1474
|
+
], W.polygon(n, o, t);
|
|
1475
|
+
}, f;
|
|
1476
|
+
}
|
|
1477
|
+
t(Ne, "imageSquare");
|
|
1478
|
+
async function Pe(e, t) {
|
|
1479
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1480
|
+
t.labelStyle = n;
|
|
1481
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), s = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), c = [
|
|
1482
|
+
{
|
|
1483
|
+
x: 0,
|
|
1484
|
+
y: 0
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
x: o,
|
|
1488
|
+
y: 0
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
x: o + 3 * s / 6,
|
|
1492
|
+
y: -s
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
x: -3 * s / 6,
|
|
1496
|
+
y: -s
|
|
1497
|
+
}
|
|
1498
|
+
], l, { cssStyles: u } = t;
|
|
1499
|
+
if (t.look === "handDrawn") {
|
|
1500
|
+
let e = S.svg(i), n = g(t, {}), r = D(c), a = e.path(r, n);
|
|
1501
|
+
l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2}, ${s / 2})`), u && l.attr("style", u);
|
|
1502
|
+
} else l = G(i, o, s, c);
|
|
1503
|
+
return r && l.attr("style", r), t.width = o, t.height = s, T(t, l), t.intersect = function(e) {
|
|
1504
|
+
return W.polygon(t, c, e);
|
|
1505
|
+
}, i;
|
|
1506
|
+
}
|
|
1507
|
+
t(Pe, "inv_trapezoid");
|
|
1508
|
+
async function Y(e, t, n) {
|
|
1509
|
+
let { labelStyles: r, nodeStyles: i } = _(t);
|
|
1510
|
+
t.labelStyle = r;
|
|
1511
|
+
let { shapeSvg: a, bbox: o } = await C(e, t, E(t)), s = Math.max(o.width + n.labelPaddingX * 2, t?.width || 0), c = Math.max(o.height + n.labelPaddingY * 2, t?.height || 0), l = -s / 2, u = -c / 2, d, { rx: p, ry: m } = t, { cssStyles: h } = t;
|
|
1512
|
+
if (n?.rx && n.ry && (p = n.rx, m = n.ry), t.look === "handDrawn") {
|
|
1513
|
+
let e = S.svg(a), n = g(t, {}), r = p || m ? e.path(M(l, u, s, c, p || 0), n) : e.rectangle(l, u, s, c, n);
|
|
1514
|
+
d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", f(h));
|
|
1515
|
+
} else d = a.insert("rect", ":first-child"), d.attr("class", "basic label-container").attr("style", i).attr("rx", f(p)).attr("ry", f(m)).attr("x", l).attr("y", u).attr("width", s).attr("height", c);
|
|
1516
|
+
return T(t, d), t.calcIntersect = function(e, t) {
|
|
1517
|
+
return W.rect(e, t);
|
|
1518
|
+
}, t.intersect = function(e) {
|
|
1519
|
+
return W.rect(t, e);
|
|
1520
|
+
}, a;
|
|
1521
|
+
}
|
|
1522
|
+
t(Y, "drawRect");
|
|
1523
|
+
async function Fe(e, t) {
|
|
1524
|
+
let { shapeSvg: n, bbox: r, label: i } = await C(e, t, "label"), a = n.insert("rect", ":first-child");
|
|
1525
|
+
return a.attr("width", .1).attr("height", .1), n.attr("class", "label edgeLabel"), i.attr("transform", `translate(${-(r.width / 2) - (r.x - (r.left ?? 0))}, ${-(r.height / 2) - (r.y - (r.top ?? 0))})`), T(t, a), t.intersect = function(e) {
|
|
1526
|
+
return W.rect(t, e);
|
|
1527
|
+
}, n;
|
|
1528
|
+
}
|
|
1529
|
+
t(Fe, "labelRect");
|
|
1530
|
+
async function Ie(e, t) {
|
|
1531
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1532
|
+
t.labelStyle = n;
|
|
1533
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(a.width + (t.padding ?? 0), t?.width ?? 0), s = Math.max(a.height + (t.padding ?? 0), t?.height ?? 0), c = [
|
|
1534
|
+
{
|
|
1535
|
+
x: 0,
|
|
1536
|
+
y: 0
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
x: o + 3 * s / 6,
|
|
1540
|
+
y: 0
|
|
1541
|
+
},
|
|
1542
|
+
{
|
|
1543
|
+
x: o,
|
|
1544
|
+
y: -s
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
x: -(3 * s) / 6,
|
|
1548
|
+
y: -s
|
|
1549
|
+
}
|
|
1550
|
+
], l, { cssStyles: u } = t;
|
|
1551
|
+
if (t.look === "handDrawn") {
|
|
1552
|
+
let e = S.svg(i), n = g(t, {}), r = D(c), a = e.path(r, n);
|
|
1553
|
+
l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2}, ${s / 2})`), u && l.attr("style", u);
|
|
1554
|
+
} else l = G(i, o, s, c);
|
|
1555
|
+
return r && l.attr("style", r), t.width = o, t.height = s, T(t, l), t.intersect = function(e) {
|
|
1556
|
+
return W.polygon(t, c, e);
|
|
1557
|
+
}, i;
|
|
1558
|
+
}
|
|
1559
|
+
t(Ie, "lean_left");
|
|
1560
|
+
async function Le(e, t) {
|
|
1561
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1562
|
+
t.labelStyle = n;
|
|
1563
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(a.width + (t.padding ?? 0), t?.width ?? 0), s = Math.max(a.height + (t.padding ?? 0), t?.height ?? 0), c = [
|
|
1564
|
+
{
|
|
1565
|
+
x: -3 * s / 6,
|
|
1566
|
+
y: 0
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
x: o,
|
|
1570
|
+
y: 0
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
x: o + 3 * s / 6,
|
|
1574
|
+
y: -s
|
|
1575
|
+
},
|
|
1576
|
+
{
|
|
1577
|
+
x: 0,
|
|
1578
|
+
y: -s
|
|
1579
|
+
}
|
|
1580
|
+
], l, { cssStyles: u } = t;
|
|
1581
|
+
if (t.look === "handDrawn") {
|
|
1582
|
+
let e = S.svg(i), n = g(t, {}), r = D(c), a = e.path(r, n);
|
|
1583
|
+
l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2}, ${s / 2})`), u && l.attr("style", u);
|
|
1584
|
+
} else l = G(i, o, s, c);
|
|
1585
|
+
return r && l.attr("style", r), t.width = o, t.height = s, T(t, l), t.intersect = function(e) {
|
|
1586
|
+
return W.polygon(t, c, e);
|
|
1587
|
+
}, i;
|
|
1588
|
+
}
|
|
1589
|
+
t(Le, "lean_right");
|
|
1590
|
+
function Re(t, n) {
|
|
1591
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
1592
|
+
n.label = "", n.labelStyle = r;
|
|
1593
|
+
let a = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), { cssStyles: o } = n, s = Math.max(35, n?.width ?? 0), c = Math.max(35, n?.height ?? 0), l = [
|
|
1594
|
+
{
|
|
1595
|
+
x: s,
|
|
1596
|
+
y: 0
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
x: 0,
|
|
1600
|
+
y: c + 7 / 2
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
x: s - 14,
|
|
1604
|
+
y: c + 7 / 2
|
|
1605
|
+
},
|
|
1606
|
+
{
|
|
1607
|
+
x: 0,
|
|
1608
|
+
y: 2 * c
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
x: s,
|
|
1612
|
+
y: c - 7 / 2
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
x: 14,
|
|
1616
|
+
y: c - 7 / 2
|
|
1617
|
+
}
|
|
1618
|
+
], u = S.svg(a), d = g(n, {});
|
|
1619
|
+
n.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
|
|
1620
|
+
let f = D(l), p = u.path(f, d), m = a.insert(() => p, ":first-child");
|
|
1621
|
+
return o && n.look !== "handDrawn" && m.selectAll("path").attr("style", o), i && n.look !== "handDrawn" && m.selectAll("path").attr("style", i), m.attr("transform", `translate(-${s / 2},${-c})`), T(n, m), n.intersect = function(t) {
|
|
1622
|
+
return e.info("lightningBolt intersect", n, t), W.polygon(n, l, t);
|
|
1623
|
+
}, a;
|
|
1624
|
+
}
|
|
1625
|
+
t(Re, "lightningBolt");
|
|
1626
|
+
var ze = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
|
|
1627
|
+
`M${e},${t + a}`,
|
|
1628
|
+
`a${i},${a} 0,0,0 ${n},0`,
|
|
1629
|
+
`a${i},${a} 0,0,0 ${-n},0`,
|
|
1630
|
+
`l0,${r}`,
|
|
1631
|
+
`a${i},${a} 0,0,0 ${n},0`,
|
|
1632
|
+
`l0,${-r}`,
|
|
1633
|
+
`M${e},${t + a + o}`,
|
|
1634
|
+
`a${i},${a} 0,0,0 ${n},0`
|
|
1635
|
+
].join(" "), "createCylinderPathD"), Be = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
|
|
1636
|
+
`M${e},${t + a}`,
|
|
1637
|
+
`M${e + n},${t + a}`,
|
|
1638
|
+
`a${i},${a} 0,0,0 ${-n},0`,
|
|
1639
|
+
`l0,${r}`,
|
|
1640
|
+
`a${i},${a} 0,0,0 ${n},0`,
|
|
1641
|
+
`l0,${-r}`,
|
|
1642
|
+
`M${e},${t + a + o}`,
|
|
1643
|
+
`a${i},${a} 0,0,0 ${n},0`
|
|
1644
|
+
].join(" "), "createOuterCylinderPathD"), Ve = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD");
|
|
1645
|
+
async function He(e, t) {
|
|
1646
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1647
|
+
t.labelStyle = n;
|
|
1648
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0), t.width ?? 0), c = s / 2, l = c / (2.5 + s / 50), u = Math.max(a.height + l + (t.padding ?? 0), t.height ?? 0), d = u * .1, p, { cssStyles: m } = t;
|
|
1649
|
+
if (t.look === "handDrawn") {
|
|
1650
|
+
let e = S.svg(i), n = Be(0, 0, s, u, c, l, d), r = Ve(0, l, s, u, c, l), a = g(t, {}), o = e.path(n, a), f = e.path(r, a);
|
|
1651
|
+
i.insert(() => f, ":first-child").attr("class", "line"), p = i.insert(() => o, ":first-child"), p.attr("class", "basic label-container"), m && p.attr("style", m);
|
|
1652
|
+
} else {
|
|
1653
|
+
let e = ze(0, 0, s, u, c, l, d);
|
|
1654
|
+
p = i.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", f(m)).attr("style", r);
|
|
1655
|
+
}
|
|
1656
|
+
return p.attr("label-offset-y", l), p.attr("transform", `translate(${-s / 2}, ${-(u / 2 + l)})`), T(t, p), o.attr("transform", `translate(${-(a.width / 2) - (a.x - (a.left ?? 0))}, ${-(a.height / 2) + l - (a.y - (a.top ?? 0))})`), t.intersect = function(e) {
|
|
1657
|
+
let n = W.rect(t, e), r = n.x - (t.x ?? 0);
|
|
1658
|
+
if (c != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - l)) {
|
|
1659
|
+
let i = l * l * (1 - r * r / (c * c));
|
|
1660
|
+
i > 0 && (i = Math.sqrt(i)), i = l - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
|
|
1661
|
+
}
|
|
1662
|
+
return n;
|
|
1663
|
+
}, i;
|
|
1664
|
+
}
|
|
1665
|
+
t(He, "linedCylinder");
|
|
1666
|
+
async function Ue(e, t) {
|
|
1667
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1668
|
+
t.labelStyle = n;
|
|
1669
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = c / 4, u = c + l, { cssStyles: d } = t, f = S.svg(i), p = g(t, {});
|
|
1670
|
+
t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
|
|
1671
|
+
let m = [
|
|
1672
|
+
{
|
|
1673
|
+
x: -s / 2 - s / 2 * .1,
|
|
1674
|
+
y: -u / 2
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
x: -s / 2 - s / 2 * .1,
|
|
1678
|
+
y: u / 2
|
|
1679
|
+
},
|
|
1680
|
+
...O(-s / 2 - s / 2 * .1, u / 2, s / 2 + s / 2 * .1, u / 2, l, .8),
|
|
1681
|
+
{
|
|
1682
|
+
x: s / 2 + s / 2 * .1,
|
|
1683
|
+
y: -u / 2
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
x: -s / 2 - s / 2 * .1,
|
|
1687
|
+
y: -u / 2
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
x: -s / 2,
|
|
1691
|
+
y: -u / 2
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
x: -s / 2,
|
|
1695
|
+
y: u / 2 * 1.1
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
x: -s / 2,
|
|
1699
|
+
y: -u / 2
|
|
1700
|
+
}
|
|
1701
|
+
], h = f.polygon(m.map((e) => [e.x, e.y]), p), v = i.insert(() => h, ":first-child");
|
|
1702
|
+
return v.attr("class", "basic label-container"), d && t.look !== "handDrawn" && v.selectAll("path").attr("style", d), r && t.look !== "handDrawn" && v.selectAll("path").attr("style", r), v.attr("transform", `translate(0,${-l / 2})`), o.attr("transform", `translate(${-s / 2 + (t.padding ?? 0) + s / 2 * .1 / 2 - (a.x - (a.left ?? 0))},${-c / 2 + (t.padding ?? 0) - l / 2 - (a.y - (a.top ?? 0))})`), T(t, v), t.intersect = function(e) {
|
|
1703
|
+
return W.polygon(t, m, e);
|
|
1704
|
+
}, i;
|
|
1705
|
+
}
|
|
1706
|
+
t(Ue, "linedWaveEdgedRect");
|
|
1707
|
+
async function We(e, t) {
|
|
1708
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1709
|
+
t.labelStyle = n;
|
|
1710
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = -s / 2, u = -c / 2, { cssStyles: d } = t, f = S.svg(i), p = g(t, {}), m = [
|
|
1711
|
+
{
|
|
1712
|
+
x: l - 5,
|
|
1713
|
+
y: u + 5
|
|
1714
|
+
},
|
|
1715
|
+
{
|
|
1716
|
+
x: l - 5,
|
|
1717
|
+
y: u + c + 5
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
x: l + s - 5,
|
|
1721
|
+
y: u + c + 5
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
x: l + s - 5,
|
|
1725
|
+
y: u + c
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
x: l + s,
|
|
1729
|
+
y: u + c
|
|
1730
|
+
},
|
|
1731
|
+
{
|
|
1732
|
+
x: l + s,
|
|
1733
|
+
y: u + c - 5
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
x: l + s + 5,
|
|
1737
|
+
y: u + c - 5
|
|
1738
|
+
},
|
|
1739
|
+
{
|
|
1740
|
+
x: l + s + 5,
|
|
1741
|
+
y: u - 5
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
x: l + 5,
|
|
1745
|
+
y: u - 5
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
x: l + 5,
|
|
1749
|
+
y: u
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
x: l,
|
|
1753
|
+
y: u
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
x: l,
|
|
1757
|
+
y: u + 5
|
|
1758
|
+
}
|
|
1759
|
+
], h = [
|
|
1760
|
+
{
|
|
1761
|
+
x: l,
|
|
1762
|
+
y: u + 5
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
x: l + s - 5,
|
|
1766
|
+
y: u + 5
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
x: l + s - 5,
|
|
1770
|
+
y: u + c
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
x: l + s,
|
|
1774
|
+
y: u + c
|
|
1775
|
+
},
|
|
1776
|
+
{
|
|
1777
|
+
x: l + s,
|
|
1778
|
+
y: u
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
x: l,
|
|
1782
|
+
y: u
|
|
1783
|
+
}
|
|
1784
|
+
];
|
|
1785
|
+
t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
|
|
1786
|
+
let v = D(m), y = f.path(v, p), b = D(h), x = f.path(b, {
|
|
1787
|
+
...p,
|
|
1788
|
+
fill: "none"
|
|
1789
|
+
}), w = i.insert(() => x, ":first-child");
|
|
1790
|
+
return w.insert(() => y, ":first-child"), w.attr("class", "basic label-container"), d && t.look !== "handDrawn" && w.selectAll("path").attr("style", d), r && t.look !== "handDrawn" && w.selectAll("path").attr("style", r), o.attr("transform", `translate(${-(a.width / 2) - 5 - (a.x - (a.left ?? 0))}, ${-(a.height / 2) + 5 - (a.y - (a.top ?? 0))})`), T(t, w), t.intersect = function(e) {
|
|
1791
|
+
return W.polygon(t, m, e);
|
|
1792
|
+
}, i;
|
|
1793
|
+
}
|
|
1794
|
+
t(We, "multiRect");
|
|
1795
|
+
async function Ge(e, t) {
|
|
1796
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1797
|
+
t.labelStyle = n;
|
|
1798
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = c / 4, u = c + l, d = -s / 2, f = -u / 2, { cssStyles: p } = t, m = O(d - 5, f + u + 5, d + s - 5, f + u + 5, l, .8), h = m?.[m.length - 1], v = [
|
|
1799
|
+
{
|
|
1800
|
+
x: d - 5,
|
|
1801
|
+
y: f + 5
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
x: d - 5,
|
|
1805
|
+
y: f + u + 5
|
|
1806
|
+
},
|
|
1807
|
+
...m,
|
|
1808
|
+
{
|
|
1809
|
+
x: d + s - 5,
|
|
1810
|
+
y: h.y - 5
|
|
1811
|
+
},
|
|
1812
|
+
{
|
|
1813
|
+
x: d + s,
|
|
1814
|
+
y: h.y - 5
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
x: d + s,
|
|
1818
|
+
y: h.y - 10
|
|
1819
|
+
},
|
|
1820
|
+
{
|
|
1821
|
+
x: d + s + 5,
|
|
1822
|
+
y: h.y - 10
|
|
1823
|
+
},
|
|
1824
|
+
{
|
|
1825
|
+
x: d + s + 5,
|
|
1826
|
+
y: f - 5
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
x: d + 5,
|
|
1830
|
+
y: f - 5
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
x: d + 5,
|
|
1834
|
+
y: f
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
x: d,
|
|
1838
|
+
y: f
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
x: d,
|
|
1842
|
+
y: f + 5
|
|
1843
|
+
}
|
|
1844
|
+
], y = [
|
|
1845
|
+
{
|
|
1846
|
+
x: d,
|
|
1847
|
+
y: f + 5
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
x: d + s - 5,
|
|
1851
|
+
y: f + 5
|
|
1852
|
+
},
|
|
1853
|
+
{
|
|
1854
|
+
x: d + s - 5,
|
|
1855
|
+
y: h.y - 5
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
x: d + s,
|
|
1859
|
+
y: h.y - 5
|
|
1860
|
+
},
|
|
1861
|
+
{
|
|
1862
|
+
x: d + s,
|
|
1863
|
+
y: f
|
|
1864
|
+
},
|
|
1865
|
+
{
|
|
1866
|
+
x: d,
|
|
1867
|
+
y: f
|
|
1868
|
+
}
|
|
1869
|
+
], b = S.svg(i), x = g(t, {});
|
|
1870
|
+
t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
|
|
1871
|
+
let w = D(v), k = b.path(w, x), A = D(y), j = b.path(A, x), M = i.insert(() => k, ":first-child");
|
|
1872
|
+
return M.insert(() => j), M.attr("class", "basic label-container"), p && t.look !== "handDrawn" && M.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && M.selectAll("path").attr("style", r), M.attr("transform", `translate(0,${-l / 2})`), o.attr("transform", `translate(${-(a.width / 2) - 5 - (a.x - (a.left ?? 0))}, ${-(a.height / 2) + 5 - l / 2 - (a.y - (a.top ?? 0))})`), T(t, M), t.intersect = function(e) {
|
|
1873
|
+
return W.polygon(t, v, e);
|
|
1874
|
+
}, i;
|
|
1875
|
+
}
|
|
1876
|
+
t(Ge, "multiWaveEdgedRectangle");
|
|
1877
|
+
async function Ke(e, t, { config: { themeVariables: n } }) {
|
|
1878
|
+
let { labelStyles: r, nodeStyles: i } = _(t);
|
|
1879
|
+
t.labelStyle = r, t.useHtmlLabels || l(u()) || (t.centerLabel = !0);
|
|
1880
|
+
let { shapeSvg: a, bbox: o, label: s } = await C(e, t, E(t)), c = Math.max(o.width + (t.padding ?? 0) * 2, t?.width ?? 0), d = Math.max(o.height + (t.padding ?? 0) * 2, t?.height ?? 0), f = -c / 2, p = -d / 2, { cssStyles: m } = t, h = S.svg(a), v = g(t, {
|
|
1881
|
+
fill: n.noteBkgColor,
|
|
1882
|
+
stroke: n.noteBorderColor
|
|
1883
|
+
});
|
|
1884
|
+
t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
|
|
1885
|
+
let y = h.rectangle(f, p, c, d, v), b = a.insert(() => y, ":first-child");
|
|
1886
|
+
return b.attr("class", "basic label-container"), m && t.look !== "handDrawn" && b.selectAll("path").attr("style", m), i && t.look !== "handDrawn" && b.selectAll("path").attr("style", i), s.attr("transform", `translate(${-o.width / 2 - (o.x - (o.left ?? 0))}, ${-(o.height / 2) - (o.y - (o.top ?? 0))})`), T(t, b), t.intersect = function(e) {
|
|
1887
|
+
return W.rect(t, e);
|
|
1888
|
+
}, a;
|
|
1889
|
+
}
|
|
1890
|
+
t(Ke, "note");
|
|
1891
|
+
var qe = /* @__PURE__ */ t((e, t, n) => [
|
|
1892
|
+
`M${e + n / 2},${t}`,
|
|
1893
|
+
`L${e + n},${t - n / 2}`,
|
|
1894
|
+
`L${e + n / 2},${t - n}`,
|
|
1895
|
+
`L${e},${t - n / 2}`,
|
|
1896
|
+
"Z"
|
|
1897
|
+
].join(" "), "createDecisionBoxPathD");
|
|
1898
|
+
async function Je(e, t) {
|
|
1899
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1900
|
+
t.labelStyle = n;
|
|
1901
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = a.width + t.padding + (a.height + t.padding), s = .5, c = [
|
|
1902
|
+
{
|
|
1903
|
+
x: o / 2,
|
|
1904
|
+
y: 0
|
|
1905
|
+
},
|
|
1906
|
+
{
|
|
1907
|
+
x: o,
|
|
1908
|
+
y: -o / 2
|
|
1909
|
+
},
|
|
1910
|
+
{
|
|
1911
|
+
x: o / 2,
|
|
1912
|
+
y: -o
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
x: 0,
|
|
1916
|
+
y: -o / 2
|
|
1917
|
+
}
|
|
1918
|
+
], l, { cssStyles: u } = t;
|
|
1919
|
+
if (t.look === "handDrawn") {
|
|
1920
|
+
let e = S.svg(i), n = g(t, {}), r = qe(0, 0, o), a = e.path(r, n);
|
|
1921
|
+
l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2 + s}, ${o / 2})`), u && l.attr("style", u);
|
|
1922
|
+
} else l = G(i, o, o, c), l.attr("transform", `translate(${-o / 2 + s}, ${o / 2})`);
|
|
1923
|
+
return r && l.attr("style", r), T(t, l), t.calcIntersect = function(e, t) {
|
|
1924
|
+
let n = e.width, r = [
|
|
1925
|
+
{
|
|
1926
|
+
x: n / 2,
|
|
1927
|
+
y: 0
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
x: n,
|
|
1931
|
+
y: -n / 2
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
x: n / 2,
|
|
1935
|
+
y: -n
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
x: 0,
|
|
1939
|
+
y: -n / 2
|
|
1940
|
+
}
|
|
1941
|
+
], i = W.polygon(e, r, t);
|
|
1942
|
+
return {
|
|
1943
|
+
x: i.x - .5,
|
|
1944
|
+
y: i.y - .5
|
|
1945
|
+
};
|
|
1946
|
+
}, t.intersect = function(e) {
|
|
1947
|
+
return this.calcIntersect(t, e);
|
|
1948
|
+
}, i;
|
|
1949
|
+
}
|
|
1950
|
+
t(Je, "question");
|
|
1951
|
+
async function Ye(e, t) {
|
|
1952
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1953
|
+
t.labelStyle = n;
|
|
1954
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0), t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0), t?.height ?? 0), l = -s / 2, u = -c / 2, d = u / 2, f = [
|
|
1955
|
+
{
|
|
1956
|
+
x: l + d,
|
|
1957
|
+
y: u
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
x: l,
|
|
1961
|
+
y: 0
|
|
1962
|
+
},
|
|
1963
|
+
{
|
|
1964
|
+
x: l + d,
|
|
1965
|
+
y: -u
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
x: -l,
|
|
1969
|
+
y: -u
|
|
1970
|
+
},
|
|
1971
|
+
{
|
|
1972
|
+
x: -l,
|
|
1973
|
+
y: u
|
|
1974
|
+
}
|
|
1975
|
+
], { cssStyles: p } = t, m = S.svg(i), h = g(t, {});
|
|
1976
|
+
t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
|
|
1977
|
+
let v = D(f), y = m.path(v, h), b = i.insert(() => y, ":first-child");
|
|
1978
|
+
return b.attr("class", "basic label-container"), p && t.look !== "handDrawn" && b.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && b.selectAll("path").attr("style", r), b.attr("transform", `translate(${-d / 2},0)`), o.attr("transform", `translate(${-d / 2 - a.width / 2 - (a.x - (a.left ?? 0))}, ${-(a.height / 2) - (a.y - (a.top ?? 0))})`), T(t, b), t.intersect = function(e) {
|
|
1979
|
+
return W.polygon(t, f, e);
|
|
1980
|
+
}, i;
|
|
1981
|
+
}
|
|
1982
|
+
t(Ye, "rect_left_inv_arrow");
|
|
1983
|
+
async function Xe(t, r) {
|
|
1984
|
+
let { labelStyles: i, nodeStyles: o } = _(r);
|
|
1985
|
+
r.labelStyle = i;
|
|
1986
|
+
let s;
|
|
1987
|
+
s = r.cssClasses ? "node " + r.cssClasses : "node default";
|
|
1988
|
+
let c = t.insert("g").attr("class", s).attr("id", r.domId || r.id), u = c.insert("g"), d = c.insert("g").attr("class", "label").attr("style", o), f = r.description, p = r.label, m = await j(d, p, r.labelStyle, !0, !0), h = {
|
|
1989
|
+
width: 0,
|
|
1990
|
+
height: 0
|
|
1991
|
+
};
|
|
1992
|
+
if (l(a())) {
|
|
1993
|
+
let e = m.children[0], t = n(m);
|
|
1994
|
+
h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
|
|
1995
|
+
}
|
|
1996
|
+
e.info("Text 2", f);
|
|
1997
|
+
let v = f || [], y = m.getBBox(), b = await j(d, Array.isArray(v) ? v.join("<br/>") : v, r.labelStyle, !0, !0), x = b.children[0], C = n(b);
|
|
1998
|
+
h = x.getBoundingClientRect(), C.attr("width", h.width), C.attr("height", h.height);
|
|
1999
|
+
let w = (r.padding || 0) / 2;
|
|
2000
|
+
n(b).attr("transform", "translate( " + (h.width > y.width ? 0 : (y.width - h.width) / 2) + ", " + (y.height + w + 5) + ")"), n(m).attr("transform", "translate( " + (h.width < y.width ? 0 : -(y.width - h.width) / 2) + ", 0)"), h = d.node().getBBox(), d.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - w + 3) + ")");
|
|
2001
|
+
let E = h.width + (r.padding || 0), D = h.height + (r.padding || 0), O = -h.width / 2 - w, k = -h.height / 2 - w, A, N;
|
|
2002
|
+
if (r.look === "handDrawn") {
|
|
2003
|
+
let t = S.svg(c), n = g(r, {}), i = t.path(M(O, k, E, D, r.rx || 0), n), a = t.line(-h.width / 2 - w, -h.height / 2 - w + y.height + w, h.width / 2 + w, -h.height / 2 - w + y.height + w, n);
|
|
2004
|
+
N = c.insert(() => (e.debug("Rough node insert CXC", i), a), ":first-child"), A = c.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child");
|
|
2005
|
+
} else A = u.insert("rect", ":first-child"), N = u.insert("line"), A.attr("class", "outer title-state").attr("style", o).attr("x", -h.width / 2 - w).attr("y", -h.height / 2 - w).attr("width", h.width + (r.padding || 0)).attr("height", h.height + (r.padding || 0)), N.attr("class", "divider").attr("x1", -h.width / 2 - w).attr("x2", h.width / 2 + w).attr("y1", -h.height / 2 - w + y.height + w).attr("y2", -h.height / 2 - w + y.height + w);
|
|
2006
|
+
return T(r, A), r.intersect = function(e) {
|
|
2007
|
+
return W.rect(r, e);
|
|
2008
|
+
}, c;
|
|
2009
|
+
}
|
|
2010
|
+
t(Xe, "rectWithTitle");
|
|
2011
|
+
async function Ze(e, t) {
|
|
2012
|
+
return Y(e, t, {
|
|
2013
|
+
rx: 5,
|
|
2014
|
+
ry: 5,
|
|
2015
|
+
classes: "",
|
|
2016
|
+
labelPaddingX: (t?.padding || 0) * 1,
|
|
2017
|
+
labelPaddingY: (t?.padding || 0) * 1
|
|
2018
|
+
});
|
|
2019
|
+
}
|
|
2020
|
+
t(Ze, "roundedRect");
|
|
2021
|
+
async function Qe(e, t) {
|
|
2022
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2023
|
+
t.labelStyle = n;
|
|
2024
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t?.padding ?? 0, c = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), l = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), u = -a.width / 2 - s, d = -a.height / 2 - s, { cssStyles: p } = t, m = S.svg(i), h = g(t, {});
|
|
2025
|
+
t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
|
|
2026
|
+
let v = [
|
|
2027
|
+
{
|
|
2028
|
+
x: u,
|
|
2029
|
+
y: d
|
|
2030
|
+
},
|
|
2031
|
+
{
|
|
2032
|
+
x: u + c + 8,
|
|
2033
|
+
y: d
|
|
2034
|
+
},
|
|
2035
|
+
{
|
|
2036
|
+
x: u + c + 8,
|
|
2037
|
+
y: d + l
|
|
2038
|
+
},
|
|
2039
|
+
{
|
|
2040
|
+
x: u - 8,
|
|
2041
|
+
y: d + l
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
x: u - 8,
|
|
2045
|
+
y: d
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
x: u,
|
|
2049
|
+
y: d
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
x: u,
|
|
2053
|
+
y: d + l
|
|
2054
|
+
}
|
|
2055
|
+
], y = m.polygon(v.map((e) => [e.x, e.y]), h), b = i.insert(() => y, ":first-child");
|
|
2056
|
+
return b.attr("class", "basic label-container").attr("style", f(p)), r && t.look !== "handDrawn" && b.selectAll("path").attr("style", r), p && t.look !== "handDrawn" && b.selectAll("path").attr("style", r), o.attr("transform", `translate(${-c / 2 + 4 + (t.padding ?? 0) - (a.x - (a.left ?? 0))},${-l / 2 + (t.padding ?? 0) - (a.y - (a.top ?? 0))})`), T(t, b), t.intersect = function(e) {
|
|
2057
|
+
return W.rect(t, e);
|
|
2058
|
+
}, i;
|
|
2059
|
+
}
|
|
2060
|
+
t(Qe, "shadedProcess");
|
|
2061
|
+
async function $e(e, t) {
|
|
2062
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2063
|
+
t.labelStyle = n;
|
|
2064
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = -s / 2, u = -c / 2, { cssStyles: d } = t, f = S.svg(i), p = g(t, {});
|
|
2065
|
+
t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
|
|
2066
|
+
let m = [
|
|
2067
|
+
{
|
|
2068
|
+
x: l,
|
|
2069
|
+
y: u
|
|
2070
|
+
},
|
|
2071
|
+
{
|
|
2072
|
+
x: l,
|
|
2073
|
+
y: u + c
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
x: l + s,
|
|
2077
|
+
y: u + c
|
|
2078
|
+
},
|
|
2079
|
+
{
|
|
2080
|
+
x: l + s,
|
|
2081
|
+
y: u - c / 2
|
|
2082
|
+
}
|
|
2083
|
+
], h = D(m), v = f.path(h, p), y = i.insert(() => v, ":first-child");
|
|
2084
|
+
return y.attr("class", "basic label-container"), d && t.look !== "handDrawn" && y.selectChildren("path").attr("style", d), r && t.look !== "handDrawn" && y.selectChildren("path").attr("style", r), y.attr("transform", `translate(0, ${c / 4})`), o.attr("transform", `translate(${-s / 2 + (t.padding ?? 0) - (a.x - (a.left ?? 0))}, ${-c / 4 + (t.padding ?? 0) - (a.y - (a.top ?? 0))})`), T(t, y), t.intersect = function(e) {
|
|
2085
|
+
return W.polygon(t, m, e);
|
|
2086
|
+
}, i;
|
|
2087
|
+
}
|
|
2088
|
+
t($e, "slopedRect");
|
|
2089
|
+
async function et(e, t) {
|
|
2090
|
+
return Y(e, t, {
|
|
2091
|
+
rx: 0,
|
|
2092
|
+
ry: 0,
|
|
2093
|
+
classes: "",
|
|
2094
|
+
labelPaddingX: t.labelPaddingX ?? (t?.padding || 0) * 2,
|
|
2095
|
+
labelPaddingY: (t?.padding || 0) * 1
|
|
2096
|
+
});
|
|
2097
|
+
}
|
|
2098
|
+
t(et, "squareRect");
|
|
2099
|
+
async function tt(e, t) {
|
|
2100
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2101
|
+
t.labelStyle = n;
|
|
2102
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = a.height + t.padding, s = a.width + o / 4 + t.padding, c = o / 2, { cssStyles: l } = t, u = S.svg(i), d = g(t, {});
|
|
2103
|
+
t.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
|
|
2104
|
+
let f = [
|
|
2105
|
+
{
|
|
2106
|
+
x: -s / 2 + c,
|
|
2107
|
+
y: -o / 2
|
|
2108
|
+
},
|
|
2109
|
+
{
|
|
2110
|
+
x: s / 2 - c,
|
|
2111
|
+
y: -o / 2
|
|
2112
|
+
},
|
|
2113
|
+
...k(-s / 2 + c, 0, c, 50, 90, 270),
|
|
2114
|
+
{
|
|
2115
|
+
x: s / 2 - c,
|
|
2116
|
+
y: o / 2
|
|
2117
|
+
},
|
|
2118
|
+
...k(s / 2 - c, 0, c, 50, 270, 450)
|
|
2119
|
+
], p = D(f), m = u.path(p, d), h = i.insert(() => m, ":first-child");
|
|
2120
|
+
return h.attr("class", "basic label-container outer-path"), l && t.look !== "handDrawn" && h.selectChildren("path").attr("style", l), r && t.look !== "handDrawn" && h.selectChildren("path").attr("style", r), T(t, h), t.intersect = function(e) {
|
|
2121
|
+
return W.polygon(t, f, e);
|
|
2122
|
+
}, i;
|
|
2123
|
+
}
|
|
2124
|
+
t(tt, "stadium");
|
|
2125
|
+
async function nt(e, t) {
|
|
2126
|
+
return Y(e, t, {
|
|
2127
|
+
rx: 5,
|
|
2128
|
+
ry: 5,
|
|
2129
|
+
classes: "flowchart-node"
|
|
2130
|
+
});
|
|
2131
|
+
}
|
|
2132
|
+
t(nt, "state");
|
|
2133
|
+
function rt(e, t, { config: { themeVariables: n } }) {
|
|
2134
|
+
let { labelStyles: r, nodeStyles: i } = _(t);
|
|
2135
|
+
t.labelStyle = r;
|
|
2136
|
+
let { cssStyles: a } = t, { lineColor: o, stateBorder: s, nodeBorder: c } = n, l = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), u = S.svg(l), d = g(t, {});
|
|
2137
|
+
t.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
|
|
2138
|
+
let f = u.circle(0, 0, 14, {
|
|
2139
|
+
...d,
|
|
2140
|
+
stroke: o,
|
|
2141
|
+
strokeWidth: 2
|
|
2142
|
+
}), p = s ?? c, m = u.circle(0, 0, 5, {
|
|
2143
|
+
...d,
|
|
2144
|
+
fill: p,
|
|
2145
|
+
stroke: p,
|
|
2146
|
+
strokeWidth: 2,
|
|
2147
|
+
fillStyle: "solid"
|
|
2148
|
+
}), h = l.insert(() => f, ":first-child");
|
|
2149
|
+
return h.insert(() => m), a && h.selectAll("path").attr("style", a), i && h.selectAll("path").attr("style", i), T(t, h), t.intersect = function(e) {
|
|
2150
|
+
return W.circle(t, 7, e);
|
|
2151
|
+
}, l;
|
|
2152
|
+
}
|
|
2153
|
+
t(rt, "stateEnd");
|
|
2154
|
+
function it(e, t, { config: { themeVariables: n } }) {
|
|
2155
|
+
let { lineColor: r } = n, i = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), a;
|
|
2156
|
+
if (t.look === "handDrawn") {
|
|
2157
|
+
let e = S.svg(i).circle(0, 0, 14, v(r));
|
|
2158
|
+
a = i.insert(() => e), a.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
|
|
2159
|
+
} else a = i.insert("circle", ":first-child"), a.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
|
|
2160
|
+
return T(t, a), t.intersect = function(e) {
|
|
2161
|
+
return W.circle(t, 7, e);
|
|
2162
|
+
}, i;
|
|
2163
|
+
}
|
|
2164
|
+
t(it, "stateStart");
|
|
2165
|
+
async function at(e, t) {
|
|
2166
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2167
|
+
t.labelStyle = n;
|
|
2168
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = (t?.padding || 0) / 2, s = a.width + t.padding, c = a.height + t.padding, l = -a.width / 2 - o, u = -a.height / 2 - o, d = [
|
|
2169
|
+
{
|
|
2170
|
+
x: 0,
|
|
2171
|
+
y: 0
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
x: s,
|
|
2175
|
+
y: 0
|
|
2176
|
+
},
|
|
2177
|
+
{
|
|
2178
|
+
x: s,
|
|
2179
|
+
y: -c
|
|
2180
|
+
},
|
|
2181
|
+
{
|
|
2182
|
+
x: 0,
|
|
2183
|
+
y: -c
|
|
2184
|
+
},
|
|
2185
|
+
{
|
|
2186
|
+
x: 0,
|
|
2187
|
+
y: 0
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
x: -8,
|
|
2191
|
+
y: 0
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
x: s + 8,
|
|
2195
|
+
y: 0
|
|
2196
|
+
},
|
|
2197
|
+
{
|
|
2198
|
+
x: s + 8,
|
|
2199
|
+
y: -c
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
x: -8,
|
|
2203
|
+
y: -c
|
|
2204
|
+
},
|
|
2205
|
+
{
|
|
2206
|
+
x: -8,
|
|
2207
|
+
y: 0
|
|
2208
|
+
}
|
|
2209
|
+
];
|
|
2210
|
+
if (t.look === "handDrawn") {
|
|
2211
|
+
let e = S.svg(i), n = g(t, {}), r = e.rectangle(l - 8, u, s + 16, c, n), a = e.line(l, u, l, u + c, n), o = e.line(l + s, u, l + s, u + c, n);
|
|
2212
|
+
i.insert(() => a, ":first-child"), i.insert(() => o, ":first-child");
|
|
2213
|
+
let d = i.insert(() => r, ":first-child"), { cssStyles: p } = t;
|
|
2214
|
+
d.attr("class", "basic label-container").attr("style", f(p)), T(t, d);
|
|
2215
|
+
} else {
|
|
2216
|
+
let e = G(i, s, c, d);
|
|
2217
|
+
r && e.attr("style", r), T(t, e);
|
|
2218
|
+
}
|
|
2219
|
+
return t.intersect = function(e) {
|
|
2220
|
+
return W.polygon(t, d, e);
|
|
2221
|
+
}, i;
|
|
2222
|
+
}
|
|
2223
|
+
t(at, "subroutine");
|
|
2224
|
+
async function ot(e, t) {
|
|
2225
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2226
|
+
t.labelStyle = n;
|
|
2227
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), s = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), c = -o / 2, l = -s / 2, u = .2 * s, d = .2 * s, { cssStyles: f } = t, p = S.svg(i), m = g(t, {}), h = [
|
|
2228
|
+
{
|
|
2229
|
+
x: c - u / 2,
|
|
2230
|
+
y: l
|
|
2231
|
+
},
|
|
2232
|
+
{
|
|
2233
|
+
x: c + o + u / 2,
|
|
2234
|
+
y: l
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
x: c + o + u / 2,
|
|
2238
|
+
y: l + s
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
x: c - u / 2,
|
|
2242
|
+
y: l + s
|
|
2243
|
+
}
|
|
2244
|
+
], v = [
|
|
2245
|
+
{
|
|
2246
|
+
x: c + o - u / 2,
|
|
2247
|
+
y: l + s
|
|
2248
|
+
},
|
|
2249
|
+
{
|
|
2250
|
+
x: c + o + u / 2,
|
|
2251
|
+
y: l + s
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
x: c + o + u / 2,
|
|
2255
|
+
y: l + s - d
|
|
2256
|
+
}
|
|
2257
|
+
];
|
|
2258
|
+
t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
|
|
2259
|
+
let y = D(h), b = p.path(y, m), x = D(v), w = p.path(x, {
|
|
2260
|
+
...m,
|
|
2261
|
+
fillStyle: "solid"
|
|
2262
|
+
}), O = i.insert(() => w, ":first-child");
|
|
2263
|
+
return O.insert(() => b, ":first-child"), O.attr("class", "basic label-container"), f && t.look !== "handDrawn" && O.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), T(t, O), t.intersect = function(e) {
|
|
2264
|
+
return W.polygon(t, h, e);
|
|
2265
|
+
}, i;
|
|
2266
|
+
}
|
|
2267
|
+
t(ot, "taggedRect");
|
|
2268
|
+
async function st(e, t) {
|
|
2269
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2270
|
+
t.labelStyle = n;
|
|
2271
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = c / 4, u = .2 * s, d = .2 * c, f = c + l, { cssStyles: p } = t, m = S.svg(i), h = g(t, {});
|
|
2272
|
+
t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
|
|
2273
|
+
let v = [
|
|
2274
|
+
{
|
|
2275
|
+
x: -s / 2 - s / 2 * .1,
|
|
2276
|
+
y: f / 2
|
|
2277
|
+
},
|
|
2278
|
+
...O(-s / 2 - s / 2 * .1, f / 2, s / 2 + s / 2 * .1, f / 2, l, .8),
|
|
2279
|
+
{
|
|
2280
|
+
x: s / 2 + s / 2 * .1,
|
|
2281
|
+
y: -f / 2
|
|
2282
|
+
},
|
|
2283
|
+
{
|
|
2284
|
+
x: -s / 2 - s / 2 * .1,
|
|
2285
|
+
y: -f / 2
|
|
2286
|
+
}
|
|
2287
|
+
], y = -s / 2 + s / 2 * .1, b = -f / 2 - d * .4, x = [
|
|
2288
|
+
{
|
|
2289
|
+
x: y + s - u,
|
|
2290
|
+
y: (b + c) * 1.4
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
x: y + s,
|
|
2294
|
+
y: b + c - d
|
|
2295
|
+
},
|
|
2296
|
+
{
|
|
2297
|
+
x: y + s,
|
|
2298
|
+
y: (b + c) * .9
|
|
2299
|
+
},
|
|
2300
|
+
...O(y + s, (b + c) * 1.3, y + s - u, (b + c) * 1.5, -c * .03, .5)
|
|
2301
|
+
], w = D(v), k = m.path(w, h), A = D(x), j = m.path(A, {
|
|
2302
|
+
...h,
|
|
2303
|
+
fillStyle: "solid"
|
|
2304
|
+
}), M = i.insert(() => j, ":first-child");
|
|
2305
|
+
return M.insert(() => k, ":first-child"), M.attr("class", "basic label-container"), p && t.look !== "handDrawn" && M.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && M.selectAll("path").attr("style", r), M.attr("transform", `translate(0,${-l / 2})`), o.attr("transform", `translate(${-s / 2 + (t.padding ?? 0) - (a.x - (a.left ?? 0))},${-c / 2 + (t.padding ?? 0) - l / 2 - (a.y - (a.top ?? 0))})`), T(t, M), t.intersect = function(e) {
|
|
2306
|
+
return W.polygon(t, v, e);
|
|
2307
|
+
}, i;
|
|
2308
|
+
}
|
|
2309
|
+
t(st, "taggedWaveEdgedRectangle");
|
|
2310
|
+
async function ct(e, t) {
|
|
2311
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2312
|
+
t.labelStyle = n;
|
|
2313
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(a.width + t.padding, t?.width || 0), s = Math.max(a.height + t.padding, t?.height || 0), c = -o / 2, l = -s / 2, u = i.insert("rect", ":first-child");
|
|
2314
|
+
return u.attr("class", "text").attr("style", r).attr("rx", 0).attr("ry", 0).attr("x", c).attr("y", l).attr("width", o).attr("height", s), T(t, u), t.intersect = function(e) {
|
|
2315
|
+
return W.rect(t, e);
|
|
2316
|
+
}, i;
|
|
2317
|
+
}
|
|
2318
|
+
t(ct, "text");
|
|
2319
|
+
var lt = /* @__PURE__ */ t((e, t, n, r, i, a) => `M${e},${t}
|
|
2320
|
+
a${i},${a} 0,0,1 0,${-r}
|
|
2321
|
+
l${n},0
|
|
2322
|
+
a${i},${a} 0,0,1 0,${r}
|
|
2323
|
+
M${n},${-r}
|
|
2324
|
+
a${i},${a} 0,0,0 0,${r}
|
|
2325
|
+
l${-n},0`, "createCylinderPathD"), ut = /* @__PURE__ */ t((e, t, n, r, i, a) => [
|
|
2326
|
+
`M${e},${t}`,
|
|
2327
|
+
`M${e + n},${t}`,
|
|
2328
|
+
`a${i},${a} 0,0,0 0,${-r}`,
|
|
2329
|
+
`l${-n},0`,
|
|
2330
|
+
`a${i},${a} 0,0,0 0,${r}`,
|
|
2331
|
+
`l${n},0`
|
|
2332
|
+
].join(" "), "createOuterCylinderPathD"), dt = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD");
|
|
2333
|
+
async function ft(e, t) {
|
|
2334
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2335
|
+
t.labelStyle = n;
|
|
2336
|
+
let { shapeSvg: i, bbox: a, label: o, halfPadding: s } = await C(e, t, E(t)), c = t.look === "neo" ? s * 2 : s, l = a.height + c, u = l / 2, d = u / (2.5 + l / 50), p = a.width + d + c, { cssStyles: m } = t, h;
|
|
2337
|
+
if (t.look === "handDrawn") {
|
|
2338
|
+
let e = S.svg(i), n = ut(0, 0, p, l, d, u), r = dt(0, 0, p, l, d, u), a = e.path(n, g(t, {})), o = e.path(r, g(t, { fill: "none" }));
|
|
2339
|
+
h = i.insert(() => o, ":first-child"), h = i.insert(() => a, ":first-child"), h.attr("class", "basic label-container"), m && h.attr("style", m);
|
|
2340
|
+
} else {
|
|
2341
|
+
let e = lt(0, 0, p, l, d, u);
|
|
2342
|
+
h = i.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", f(m)).attr("style", r), h.attr("class", "basic label-container"), m && h.selectAll("path").attr("style", m), r && h.selectAll("path").attr("style", r);
|
|
2343
|
+
}
|
|
2344
|
+
return h.attr("label-offset-x", d), h.attr("transform", `translate(${-p / 2}, ${l / 2} )`), o.attr("transform", `translate(${-(a.width / 2) - d - (a.x - (a.left ?? 0))}, ${-(a.height / 2) - (a.y - (a.top ?? 0))})`), T(t, h), t.intersect = function(e) {
|
|
2345
|
+
let n = W.rect(t, e), r = n.y - (t.y ?? 0);
|
|
2346
|
+
if (u != 0 && (Math.abs(r) < (t.height ?? 0) / 2 || Math.abs(r) == (t.height ?? 0) / 2 && Math.abs(n.x - (t.x ?? 0)) > (t.width ?? 0) / 2 - d)) {
|
|
2347
|
+
let i = d * d * (1 - r * r / (u * u));
|
|
2348
|
+
i != 0 && (i = Math.sqrt(Math.abs(i))), i = d - i, e.x - (t.x ?? 0) > 0 && (i = -i), n.x += i;
|
|
2349
|
+
}
|
|
2350
|
+
return n;
|
|
2351
|
+
}, i;
|
|
2352
|
+
}
|
|
2353
|
+
t(ft, "tiltedCylinder");
|
|
2354
|
+
async function pt(e, t) {
|
|
2355
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2356
|
+
t.labelStyle = n;
|
|
2357
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = a.width + t.padding, s = a.height + t.padding, c = [
|
|
2358
|
+
{
|
|
2359
|
+
x: -3 * s / 6,
|
|
2360
|
+
y: 0
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
x: o + 3 * s / 6,
|
|
2364
|
+
y: 0
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
x: o,
|
|
2368
|
+
y: -s
|
|
2369
|
+
},
|
|
2370
|
+
{
|
|
2371
|
+
x: 0,
|
|
2372
|
+
y: -s
|
|
2373
|
+
}
|
|
2374
|
+
], l, { cssStyles: u } = t;
|
|
2375
|
+
if (t.look === "handDrawn") {
|
|
2376
|
+
let e = S.svg(i), n = g(t, {}), r = D(c), a = e.path(r, n);
|
|
2377
|
+
l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2}, ${s / 2})`), u && l.attr("style", u);
|
|
2378
|
+
} else l = G(i, o, s, c);
|
|
2379
|
+
return r && l.attr("style", r), t.width = o, t.height = s, T(t, l), t.intersect = function(e) {
|
|
2380
|
+
return W.polygon(t, c, e);
|
|
2381
|
+
}, i;
|
|
2382
|
+
}
|
|
2383
|
+
t(pt, "trapezoid");
|
|
2384
|
+
async function mt(e, t) {
|
|
2385
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2386
|
+
t.labelStyle = n;
|
|
2387
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(60, a.width + (t.padding ?? 0) * 2, t?.width ?? 0), s = Math.max(20, a.height + (t.padding ?? 0) * 2, t?.height ?? 0), { cssStyles: c } = t, l = S.svg(i), u = g(t, {});
|
|
2388
|
+
t.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
|
|
2389
|
+
let d = [
|
|
2390
|
+
{
|
|
2391
|
+
x: -o / 2 * .8,
|
|
2392
|
+
y: -s / 2
|
|
2393
|
+
},
|
|
2394
|
+
{
|
|
2395
|
+
x: o / 2 * .8,
|
|
2396
|
+
y: -s / 2
|
|
2397
|
+
},
|
|
2398
|
+
{
|
|
2399
|
+
x: o / 2,
|
|
2400
|
+
y: -s / 2 * .6
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
x: o / 2,
|
|
2404
|
+
y: s / 2
|
|
2405
|
+
},
|
|
2406
|
+
{
|
|
2407
|
+
x: -o / 2,
|
|
2408
|
+
y: s / 2
|
|
2409
|
+
},
|
|
2410
|
+
{
|
|
2411
|
+
x: -o / 2,
|
|
2412
|
+
y: -s / 2 * .6
|
|
2413
|
+
}
|
|
2414
|
+
], f = D(d), p = l.path(f, u), m = i.insert(() => p, ":first-child");
|
|
2415
|
+
return m.attr("class", "basic label-container"), c && t.look !== "handDrawn" && m.selectChildren("path").attr("style", c), r && t.look !== "handDrawn" && m.selectChildren("path").attr("style", r), T(t, m), t.intersect = function(e) {
|
|
2416
|
+
return W.polygon(t, d, e);
|
|
2417
|
+
}, i;
|
|
2418
|
+
}
|
|
2419
|
+
t(mt, "trapezoidalPentagon");
|
|
2420
|
+
async function ht(t, n) {
|
|
2421
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
2422
|
+
n.labelStyle = r;
|
|
2423
|
+
let { shapeSvg: o, bbox: s, label: c } = await C(t, n, E(n)), u = n.useHtmlLabels || l(a()), d = s.width + (n.padding ?? 0), f = d + s.height, p = d + s.height, m = [
|
|
2424
|
+
{
|
|
2425
|
+
x: 0,
|
|
2426
|
+
y: 0
|
|
2427
|
+
},
|
|
2428
|
+
{
|
|
2429
|
+
x: p,
|
|
2430
|
+
y: 0
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
x: p / 2,
|
|
2434
|
+
y: -f
|
|
2435
|
+
}
|
|
2436
|
+
], { cssStyles: h } = n, v = S.svg(o), y = g(n, {});
|
|
2437
|
+
n.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
|
|
2438
|
+
let b = D(m), x = v.path(b, y), w = o.insert(() => x, ":first-child").attr("transform", `translate(${-f / 2}, ${f / 2})`);
|
|
2439
|
+
return h && n.look !== "handDrawn" && w.selectChildren("path").attr("style", h), i && n.look !== "handDrawn" && w.selectChildren("path").attr("style", i), n.width = d, n.height = f, T(n, w), c.attr("transform", `translate(${-s.width / 2 - (s.x - (s.left ?? 0))}, ${f / 2 - (s.height + (n.padding ?? 0) / (u ? 2 : 1) - (s.y - (s.top ?? 0)))})`), n.intersect = function(t) {
|
|
2440
|
+
return e.info("Triangle intersect", n, m, t), W.polygon(n, m, t);
|
|
2441
|
+
}, o;
|
|
2442
|
+
}
|
|
2443
|
+
t(ht, "triangle");
|
|
2444
|
+
async function gt(e, t) {
|
|
2445
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2446
|
+
t.labelStyle = n;
|
|
2447
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = c / 8, u = c + l, { cssStyles: d } = t, f = 70 - s, p = f > 0 ? f / 2 : 0, m = S.svg(i), h = g(t, {});
|
|
2448
|
+
t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
|
|
2449
|
+
let v = [
|
|
2450
|
+
{
|
|
2451
|
+
x: -s / 2 - p,
|
|
2452
|
+
y: u / 2
|
|
2453
|
+
},
|
|
2454
|
+
...O(-s / 2 - p, u / 2, s / 2 + p, u / 2, l, .8),
|
|
2455
|
+
{
|
|
2456
|
+
x: s / 2 + p,
|
|
2457
|
+
y: -u / 2
|
|
2458
|
+
},
|
|
2459
|
+
{
|
|
2460
|
+
x: -s / 2 - p,
|
|
2461
|
+
y: -u / 2
|
|
2462
|
+
}
|
|
2463
|
+
], y = D(v), b = m.path(y, h), x = i.insert(() => b, ":first-child");
|
|
2464
|
+
return x.attr("class", "basic label-container"), d && t.look !== "handDrawn" && x.selectAll("path").attr("style", d), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), x.attr("transform", `translate(0,${-l / 2})`), o.attr("transform", `translate(${-s / 2 + (t.padding ?? 0) - (a.x - (a.left ?? 0))},${-c / 2 + (t.padding ?? 0) - l - (a.y - (a.top ?? 0))})`), T(t, x), t.intersect = function(e) {
|
|
2465
|
+
return W.polygon(t, v, e);
|
|
2466
|
+
}, i;
|
|
2467
|
+
}
|
|
2468
|
+
t(gt, "waveEdgedRectangle");
|
|
2469
|
+
async function _t(e, t) {
|
|
2470
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2471
|
+
t.labelStyle = n;
|
|
2472
|
+
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), s = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), c = o / s, l = o, u = s;
|
|
2473
|
+
l > u * c ? u = l / c : l = u * c, l = Math.max(l, 100), u = Math.max(u, 50);
|
|
2474
|
+
let d = Math.min(u * .2, u / 4), f = u + d * 2, { cssStyles: p } = t, m = S.svg(i), h = g(t, {});
|
|
2475
|
+
t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
|
|
2476
|
+
let v = [
|
|
2477
|
+
{
|
|
2478
|
+
x: -l / 2,
|
|
2479
|
+
y: f / 2
|
|
2480
|
+
},
|
|
2481
|
+
...O(-l / 2, f / 2, l / 2, f / 2, d, 1),
|
|
2482
|
+
{
|
|
2483
|
+
x: l / 2,
|
|
2484
|
+
y: -f / 2
|
|
2485
|
+
},
|
|
2486
|
+
...O(l / 2, -f / 2, -l / 2, -f / 2, d, -1)
|
|
2487
|
+
], y = D(v), b = m.path(y, h), x = i.insert(() => b, ":first-child");
|
|
2488
|
+
return x.attr("class", "basic label-container"), p && t.look !== "handDrawn" && x.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), T(t, x), t.intersect = function(e) {
|
|
2489
|
+
return W.polygon(t, v, e);
|
|
2490
|
+
}, i;
|
|
2491
|
+
}
|
|
2492
|
+
t(_t, "waveRectangle");
|
|
2493
|
+
async function vt(e, t) {
|
|
2494
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2495
|
+
t.labelStyle = n;
|
|
2496
|
+
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = -s / 2, u = -c / 2, { cssStyles: d } = t, f = S.svg(i), p = g(t, {}), m = [
|
|
2497
|
+
{
|
|
2498
|
+
x: l - 5,
|
|
2499
|
+
y: u - 5
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
x: l - 5,
|
|
2503
|
+
y: u + c
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
x: l + s,
|
|
2507
|
+
y: u + c
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
x: l + s,
|
|
2511
|
+
y: u - 5
|
|
2512
|
+
}
|
|
2513
|
+
], h = `M${l - 5},${u - 5} L${l + s},${u - 5} L${l + s},${u + c} L${l - 5},${u + c} L${l - 5},${u - 5}
|
|
2514
|
+
M${l - 5},${u} L${l + s},${u}
|
|
2515
|
+
M${l},${u - 5} L${l},${u + c}`;
|
|
2516
|
+
t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
|
|
2517
|
+
let v = f.path(h, p), y = i.insert(() => v, ":first-child");
|
|
2518
|
+
return y.attr("transform", `translate(${5 / 2}, ${5 / 2})`), y.attr("class", "basic label-container"), d && t.look !== "handDrawn" && y.selectAll("path").attr("style", d), r && t.look !== "handDrawn" && y.selectAll("path").attr("style", r), o.attr("transform", `translate(${-(a.width / 2) + 5 / 2 - (a.x - (a.left ?? 0))}, ${-(a.height / 2) + 5 / 2 - (a.y - (a.top ?? 0))})`), T(t, y), t.intersect = function(e) {
|
|
2519
|
+
return W.polygon(t, m, e);
|
|
2520
|
+
}, i;
|
|
2521
|
+
}
|
|
2522
|
+
t(vt, "windowPane");
|
|
2523
|
+
async function yt(e, t) {
|
|
2524
|
+
let r = t;
|
|
2525
|
+
if (r.alias && (t.label = r.alias), t.look === "handDrawn") {
|
|
2526
|
+
let { themeVariables: n } = u(), { background: r } = n;
|
|
2527
|
+
await yt(e, {
|
|
2528
|
+
...t,
|
|
2529
|
+
id: t.id + "-background",
|
|
2530
|
+
look: "default",
|
|
2531
|
+
cssStyles: ["stroke: none", `fill: ${r}`]
|
|
2532
|
+
});
|
|
2533
|
+
}
|
|
2534
|
+
let i = u();
|
|
2535
|
+
t.useHtmlLabels = i.htmlLabels;
|
|
2536
|
+
let a = i.er?.diagramPadding ?? 10, s = i.er?.entityPadding ?? 6, { cssStyles: c } = t, { labelStyles: l, nodeStyles: d } = _(t);
|
|
2537
|
+
if (r.attributes.length === 0 && t.label) {
|
|
2538
|
+
let n = {
|
|
2539
|
+
rx: 0,
|
|
2540
|
+
ry: 0,
|
|
2541
|
+
labelPaddingX: a,
|
|
2542
|
+
labelPaddingY: a * 1.5,
|
|
2543
|
+
classes: ""
|
|
2544
|
+
};
|
|
2545
|
+
p(t.label, i) + n.labelPaddingX * 2 < i.er.minEntityWidth && (t.width = i.er.minEntityWidth);
|
|
2546
|
+
let r = await Y(e, t, n);
|
|
2547
|
+
if (!o(i.htmlLabels)) {
|
|
2548
|
+
let e = r.select("text"), t = e.node()?.getBBox();
|
|
2549
|
+
e.attr("transform", `translate(${-t.width / 2}, 0)`);
|
|
2550
|
+
}
|
|
2551
|
+
return r;
|
|
2552
|
+
}
|
|
2553
|
+
i.htmlLabels || (a *= 1.25, s *= 1.25);
|
|
2554
|
+
let f = E(t);
|
|
2555
|
+
f ||= "node default";
|
|
2556
|
+
let m = e.insert("g").attr("class", f).attr("id", t.domId || t.id), h = await X(m, t.label ?? "", i, 0, 0, ["name"], l);
|
|
2557
|
+
h.height += s;
|
|
2558
|
+
let v = 0, y = [], b = [], x = 0, C = 0, w = 0, D = 0, O = !0, k = !0;
|
|
2559
|
+
for (let e of r.attributes) {
|
|
2560
|
+
let t = await X(m, e.type, i, 0, v, ["attribute-type"], l);
|
|
2561
|
+
x = Math.max(x, t.width + a);
|
|
2562
|
+
let n = await X(m, e.name, i, 0, v, ["attribute-name"], l);
|
|
2563
|
+
C = Math.max(C, n.width + a);
|
|
2564
|
+
let r = await X(m, e.keys.join(), i, 0, v, ["attribute-keys"], l);
|
|
2565
|
+
w = Math.max(w, r.width + a);
|
|
2566
|
+
let o = await X(m, e.comment, i, 0, v, ["attribute-comment"], l);
|
|
2567
|
+
D = Math.max(D, o.width + a);
|
|
2568
|
+
let c = Math.max(t.height, n.height, r.height, o.height) + s;
|
|
2569
|
+
b.push({
|
|
2570
|
+
yOffset: v,
|
|
2571
|
+
rowHeight: c
|
|
2572
|
+
}), v += c;
|
|
2573
|
+
}
|
|
2574
|
+
let A = 4;
|
|
2575
|
+
w <= a && (O = !1, w = 0, A--), D <= a && (k = !1, D = 0, A--);
|
|
2576
|
+
let j = m.node().getBBox();
|
|
2577
|
+
if (h.width + a * 2 - (x + C + w + D) > 0) {
|
|
2578
|
+
let e = h.width + a * 2 - (x + C + w + D);
|
|
2579
|
+
x += e / A, C += e / A, w > 0 && (w += e / A), D > 0 && (D += e / A);
|
|
2580
|
+
}
|
|
2581
|
+
let M = x + C + w + D, N = S.svg(m), P = g(t, {});
|
|
2582
|
+
t.look !== "handDrawn" && (P.roughness = 0, P.fillStyle = "solid");
|
|
2583
|
+
let F = 0;
|
|
2584
|
+
b.length > 0 && (F = b.reduce((e, t) => e + (t?.rowHeight ?? 0), 0));
|
|
2585
|
+
let I = Math.max(j.width + a * 2, t?.width || 0, M), L = Math.max((F ?? 0) + h.height, t?.height || 0), R = -I / 2, z = -L / 2;
|
|
2586
|
+
m.selectAll("g:not(:first-child)").each((e, t, r) => {
|
|
2587
|
+
let i = n(r[t]), o = i.attr("transform"), c = 0, l = 0;
|
|
2588
|
+
if (o) {
|
|
2589
|
+
let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);
|
|
2590
|
+
e && (c = parseFloat(e[1]), l = parseFloat(e[2]), i.attr("class").includes("attribute-name") ? c += x : i.attr("class").includes("attribute-keys") ? c += x + C : i.attr("class").includes("attribute-comment") && (c += x + C + w));
|
|
2591
|
+
}
|
|
2592
|
+
i.attr("transform", `translate(${R + a / 2 + c}, ${l + z + h.height + s / 2})`);
|
|
2593
|
+
}), m.select(".name").attr("transform", "translate(" + -h.width / 2 + ", " + (z + s / 2) + ")");
|
|
2594
|
+
let B = N.rectangle(R, z, I, L, P), V = m.insert(() => B, ":first-child").attr("style", c.join("")), { themeVariables: ee } = u(), { rowEven: te, rowOdd: ne, nodeBorder: H } = ee;
|
|
2595
|
+
y.push(0);
|
|
2596
|
+
for (let [e, t] of b.entries()) {
|
|
2597
|
+
let n = (e + 1) % 2 == 0 && t.yOffset !== 0, r = N.rectangle(R, h.height + z + t?.yOffset, I, t?.rowHeight, {
|
|
2598
|
+
...P,
|
|
2599
|
+
fill: n ? te : ne,
|
|
2600
|
+
stroke: H
|
|
2601
|
+
});
|
|
2602
|
+
m.insert(() => r, "g.label").attr("style", c.join("")).attr("class", `row-rect-${n ? "even" : "odd"}`);
|
|
2603
|
+
}
|
|
2604
|
+
let U = N.line(R, h.height + z, I + R, h.height + z, P);
|
|
2605
|
+
m.insert(() => U).attr("class", "divider"), U = N.line(x + R, h.height + z, x + R, L + z, P), m.insert(() => U).attr("class", "divider"), O && (U = N.line(x + C + R, h.height + z, x + C + R, L + z, P), m.insert(() => U).attr("class", "divider")), k && (U = N.line(x + C + w + R, h.height + z, x + C + w + R, L + z, P), m.insert(() => U).attr("class", "divider"));
|
|
2606
|
+
for (let e of y) U = N.line(R, h.height + z + e, I + R, h.height + z + e, P), m.insert(() => U).attr("class", "divider");
|
|
2607
|
+
if (T(t, V), d && t.look !== "handDrawn") {
|
|
2608
|
+
let e = d.split(";")?.filter((e) => e.includes("stroke"))?.map((e) => `${e}`).join("; ");
|
|
2609
|
+
m.selectAll("path").attr("style", e ?? ""), m.selectAll(".row-rect-even path").attr("style", d);
|
|
2610
|
+
}
|
|
2611
|
+
return t.intersect = function(e) {
|
|
2612
|
+
return W.rect(t, e);
|
|
2613
|
+
}, m;
|
|
2614
|
+
}
|
|
2615
|
+
t(yt, "erBox");
|
|
2616
|
+
async function X(e, t, r, i = 0, a = 0, c = [], l = "") {
|
|
2617
|
+
let u = e.insert("g").attr("class", `label ${c.join(" ")}`).attr("transform", `translate(${i}, ${a})`).attr("style", l);
|
|
2618
|
+
t !== s(t) && (t = s(t), t = t.replaceAll("<", "<").replaceAll(">", ">"));
|
|
2619
|
+
let d = u.node().appendChild(await b(u, t, {
|
|
2620
|
+
width: p(t, r) + 100,
|
|
2621
|
+
style: l,
|
|
2622
|
+
useHtmlLabels: r.htmlLabels
|
|
2623
|
+
}, r));
|
|
2624
|
+
if (t.includes("<") || t.includes(">")) {
|
|
2625
|
+
let e = d.children[0];
|
|
2626
|
+
for (e.textContent = e.textContent.replaceAll("<", "<").replaceAll(">", ">"); e.childNodes[0];) e = e.childNodes[0], e.textContent = e.textContent.replaceAll("<", "<").replaceAll(">", ">");
|
|
2627
|
+
}
|
|
2628
|
+
let f = d.getBBox();
|
|
2629
|
+
if (o(r.htmlLabels)) {
|
|
2630
|
+
let e = d.children[0];
|
|
2631
|
+
e.style.textAlign = "start";
|
|
2632
|
+
let t = n(d);
|
|
2633
|
+
f = e.getBoundingClientRect(), t.attr("width", f.width), t.attr("height", f.height);
|
|
2634
|
+
}
|
|
2635
|
+
return f;
|
|
2636
|
+
}
|
|
2637
|
+
t(X, "addText");
|
|
2638
|
+
async function bt(e, t, n, r, i = n.class.padding ?? 12) {
|
|
2639
|
+
let a = r ? 0 : 3, o = e.insert("g").attr("class", E(t)).attr("id", t.domId || t.id), s = null, c = null, l = null, u = null, d = 0, f = 0, p = 0;
|
|
2640
|
+
if (s = o.insert("g").attr("class", "annotation-group text"), t.annotations.length > 0) {
|
|
2641
|
+
let e = t.annotations[0];
|
|
2642
|
+
await Z(s, { text: `\xAB${e}\xBB` }, 0), d = s.node().getBBox().height;
|
|
2643
|
+
}
|
|
2644
|
+
c = o.insert("g").attr("class", "label-group text"), await Z(c, t, 0, ["font-weight: bolder"]);
|
|
2645
|
+
let m = c.node().getBBox();
|
|
2646
|
+
f = m.height, l = o.insert("g").attr("class", "members-group text");
|
|
2647
|
+
let h = 0;
|
|
2648
|
+
for (let e of t.members) {
|
|
2649
|
+
let t = await Z(l, e, h, [e.parseClassifier()]);
|
|
2650
|
+
h += t + a;
|
|
2651
|
+
}
|
|
2652
|
+
p = l.node().getBBox().height, p <= 0 && (p = i / 2), u = o.insert("g").attr("class", "methods-group text");
|
|
2653
|
+
let g = 0;
|
|
2654
|
+
for (let e of t.methods) {
|
|
2655
|
+
let t = await Z(u, e, g, [e.parseClassifier()]);
|
|
2656
|
+
g += t + a;
|
|
2657
|
+
}
|
|
2658
|
+
let _ = o.node().getBBox();
|
|
2659
|
+
if (s !== null) {
|
|
2660
|
+
let e = s.node().getBBox();
|
|
2661
|
+
s.attr("transform", `translate(${-e.width / 2})`);
|
|
2662
|
+
}
|
|
2663
|
+
return c.attr("transform", `translate(${-m.width / 2}, ${d})`), _ = o.node().getBBox(), l.attr("transform", `translate(0, ${d + f + i * 2})`), _ = o.node().getBBox(), u.attr("transform", `translate(0, ${d + f + (p ? p + i * 4 : i * 2)})`), _ = o.node().getBBox(), {
|
|
2664
|
+
shapeSvg: o,
|
|
2665
|
+
bbox: _
|
|
2666
|
+
};
|
|
2667
|
+
}
|
|
2668
|
+
t(bt, "textHelper");
|
|
2669
|
+
async function Z(e, r, a, s = []) {
|
|
2670
|
+
let l = e.insert("g").attr("class", "label").attr("style", s.join("; ")), f = u(), m = "useHtmlLabels" in r ? r.useHtmlLabels : o(f.htmlLabels) ?? !0, h = "";
|
|
2671
|
+
h = "text" in r ? r.text : r.label, !m && h.startsWith("\\") && (h = h.substring(1)), c(h) && (m = !0);
|
|
2672
|
+
let g = await b(l, i(d(h)), {
|
|
2673
|
+
width: p(h, f) + 50,
|
|
2674
|
+
classes: "markdown-node-label",
|
|
2675
|
+
useHtmlLabels: m
|
|
2676
|
+
}, f), _, v = 1;
|
|
2677
|
+
if (m) {
|
|
2678
|
+
let e = g.children[0], r = n(g);
|
|
2679
|
+
v = e.innerHTML.split("<br>").length, e.innerHTML.includes("</math>") && (v += e.innerHTML.split("<mrow>").length - 1);
|
|
2680
|
+
let i = e.getElementsByTagName("img");
|
|
2681
|
+
if (i) {
|
|
2682
|
+
let e = h.replace(/<img[^>]*>/g, "").trim() === "";
|
|
2683
|
+
await Promise.all([...i].map((n) => new Promise((r) => {
|
|
2684
|
+
function i() {
|
|
2685
|
+
if (n.style.display = "flex", n.style.flexDirection = "column", e) {
|
|
2686
|
+
let e = f.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize, t = parseInt(e, 10) * 5 + "px";
|
|
2687
|
+
n.style.minWidth = t, n.style.maxWidth = t;
|
|
2688
|
+
} else n.style.width = "100%";
|
|
2689
|
+
r(n);
|
|
2690
|
+
}
|
|
2691
|
+
t(i, "setupImage"), setTimeout(() => {
|
|
2692
|
+
n.complete && i();
|
|
2693
|
+
}), n.addEventListener("error", i), n.addEventListener("load", i);
|
|
2694
|
+
})));
|
|
2695
|
+
}
|
|
2696
|
+
_ = e.getBoundingClientRect(), r.attr("width", _.width), r.attr("height", _.height);
|
|
2697
|
+
} else {
|
|
2698
|
+
s.includes("font-weight: bolder") && n(g).selectAll("tspan").attr("font-weight", ""), v = g.children.length;
|
|
2699
|
+
let e = g.children[0];
|
|
2700
|
+
(g.textContent === "" || g.textContent.includes(">")) && (e.textContent = h[0] + h.substring(1).replaceAll(">", ">").replaceAll("<", "<").trim(), h[1] === " " && (e.textContent = e.textContent[0] + " " + e.textContent.substring(1))), e.textContent === "undefined" && (e.textContent = ""), _ = g.getBBox();
|
|
2701
|
+
}
|
|
2702
|
+
return l.attr("transform", "translate(0," + (-_.height / (2 * v) + a) + ")"), _.height;
|
|
2703
|
+
}
|
|
2704
|
+
t(Z, "addText");
|
|
2705
|
+
async function xt(e, t) {
|
|
2706
|
+
let r = a(), i = r.class.padding ?? 12, s = i, c = t.useHtmlLabels ?? o(r.htmlLabels) ?? !0, l = t;
|
|
2707
|
+
l.annotations = l.annotations ?? [], l.members = l.members ?? [], l.methods = l.methods ?? [];
|
|
2708
|
+
let { shapeSvg: u, bbox: d } = await bt(e, t, r, c, s), { labelStyles: f, nodeStyles: p } = _(t);
|
|
2709
|
+
t.labelStyle = f, t.cssStyles = l.styles || "";
|
|
2710
|
+
let m = l.styles?.join(";") || p || "";
|
|
2711
|
+
t.cssStyles ||= m.replaceAll("!important", "").split(";");
|
|
2712
|
+
let h = l.members.length === 0 && l.methods.length === 0 && !r.class?.hideEmptyMembersBox, v = S.svg(u), y = g(t, {});
|
|
2713
|
+
t.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
|
|
2714
|
+
let b = d.width, x = d.height;
|
|
2715
|
+
l.members.length === 0 && l.methods.length === 0 ? x += s : l.members.length > 0 && l.methods.length === 0 && (x += s * 2);
|
|
2716
|
+
let C = -b / 2, w = -x / 2, E = v.rectangle(C - i, w - i - (h ? i : l.members.length === 0 && l.methods.length === 0 ? -i / 2 : 0), b + 2 * i, x + 2 * i + (h ? i * 2 : l.members.length === 0 && l.methods.length === 0 ? -i : 0), y), D = u.insert(() => E, ":first-child");
|
|
2717
|
+
D.attr("class", "basic label-container");
|
|
2718
|
+
let O = D.node().getBBox();
|
|
2719
|
+
u.selectAll(".text").each((e, t, r) => {
|
|
2720
|
+
let a = n(r[t]), o = a.attr("transform"), s = 0;
|
|
2721
|
+
if (o) {
|
|
2722
|
+
let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);
|
|
2723
|
+
e && (s = parseFloat(e[2]));
|
|
2724
|
+
}
|
|
2725
|
+
let d = s + w + i - (h ? i : l.members.length === 0 && l.methods.length === 0 ? -i / 2 : 0);
|
|
2726
|
+
c || (d -= 4);
|
|
2727
|
+
let f = C;
|
|
2728
|
+
(a.attr("class").includes("label-group") || a.attr("class").includes("annotation-group")) && (f = -a.node()?.getBBox().width / 2 || 0, u.selectAll("text").each(function(e, t, n) {
|
|
2729
|
+
window.getComputedStyle(n[t]).textAnchor === "middle" && (f = 0);
|
|
2730
|
+
})), a.attr("transform", `translate(${f}, ${d})`);
|
|
2731
|
+
});
|
|
2732
|
+
let k = u.select(".annotation-group").node().getBBox().height - (h ? i / 2 : 0) || 0, A = u.select(".label-group").node().getBBox().height - (h ? i / 2 : 0) || 0, j = u.select(".members-group").node().getBBox().height - (h ? i / 2 : 0) || 0;
|
|
2733
|
+
if (l.members.length > 0 || l.methods.length > 0 || h) {
|
|
2734
|
+
let e = v.line(O.x, k + A + w + i, O.x + O.width, k + A + w + i, y);
|
|
2735
|
+
u.insert(() => e).attr("class", "divider").attr("style", m);
|
|
2736
|
+
}
|
|
2737
|
+
if (h || l.members.length > 0 || l.methods.length > 0) {
|
|
2738
|
+
let e = v.line(O.x, k + A + j + w + s * 2 + i, O.x + O.width, k + A + j + w + i + s * 2, y);
|
|
2739
|
+
u.insert(() => e).attr("class", "divider").attr("style", m);
|
|
2740
|
+
}
|
|
2741
|
+
if (l.look !== "handDrawn" && u.selectAll("path").attr("style", m), D.select(":nth-child(2)").attr("style", m), u.selectAll(".divider").select("path").attr("style", m), t.labelStyle ? u.selectAll("span").attr("style", t.labelStyle) : u.selectAll("span").attr("style", m), !c) {
|
|
2742
|
+
let e = RegExp(/color\s*:\s*([^;]*)/), t = e.exec(m);
|
|
2743
|
+
if (t) {
|
|
2744
|
+
let e = t[0].replace("color", "fill");
|
|
2745
|
+
u.selectAll("tspan").attr("style", e);
|
|
2746
|
+
} else if (f) {
|
|
2747
|
+
let t = e.exec(f);
|
|
2748
|
+
if (t) {
|
|
2749
|
+
let e = t[0].replace("color", "fill");
|
|
2750
|
+
u.selectAll("tspan").attr("style", e);
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
}
|
|
2754
|
+
return T(t, D), t.intersect = function(e) {
|
|
2755
|
+
return W.rect(t, e);
|
|
2756
|
+
}, u;
|
|
2757
|
+
}
|
|
2758
|
+
t(xt, "classBox");
|
|
2759
|
+
async function St(e, t) {
|
|
2760
|
+
let { labelStyles: r, nodeStyles: i } = _(t);
|
|
2761
|
+
t.labelStyle = r;
|
|
2762
|
+
let a = t, o = t, s = "verifyMethod" in t, c = E(t), l = e.insert("g").attr("class", c).attr("id", t.domId ?? t.id), u;
|
|
2763
|
+
u = s ? await Q(l, `<<${a.type}>>`, 0, t.labelStyle) : await Q(l, "<<Element>>", 0, t.labelStyle);
|
|
2764
|
+
let d = u, f = await Q(l, a.name, d, t.labelStyle + "; font-weight: bold;");
|
|
2765
|
+
if (d += f + 20, s) {
|
|
2766
|
+
let e = await Q(l, `${a.requirementId ? `ID: ${a.requirementId}` : ""}`, d, t.labelStyle);
|
|
2767
|
+
d += e;
|
|
2768
|
+
let n = await Q(l, `${a.text ? `Text: ${a.text}` : ""}`, d, t.labelStyle);
|
|
2769
|
+
d += n;
|
|
2770
|
+
let r = await Q(l, `${a.risk ? `Risk: ${a.risk}` : ""}`, d, t.labelStyle);
|
|
2771
|
+
d += r, await Q(l, `${a.verifyMethod ? `Verification: ${a.verifyMethod}` : ""}`, d, t.labelStyle);
|
|
2772
|
+
} else {
|
|
2773
|
+
let e = await Q(l, `${o.type ? `Type: ${o.type}` : ""}`, d, t.labelStyle);
|
|
2774
|
+
d += e, await Q(l, `${o.docRef ? `Doc Ref: ${o.docRef}` : ""}`, d, t.labelStyle);
|
|
2775
|
+
}
|
|
2776
|
+
let p = (l.node()?.getBBox().width ?? 200) + 20, m = (l.node()?.getBBox().height ?? 200) + 20, h = -p / 2, v = -m / 2, y = S.svg(l), b = g(t, {});
|
|
2777
|
+
t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
|
|
2778
|
+
let x = y.rectangle(h, v, p, m, b), C = l.insert(() => x, ":first-child");
|
|
2779
|
+
if (C.attr("class", "basic label-container").attr("style", i), l.selectAll(".label").each((e, t, r) => {
|
|
2780
|
+
let i = n(r[t]), a = i.attr("transform"), o = 0, s = 0;
|
|
2781
|
+
if (a) {
|
|
2782
|
+
let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
|
|
2783
|
+
e && (o = parseFloat(e[1]), s = parseFloat(e[2]));
|
|
2784
|
+
}
|
|
2785
|
+
let c = s - m / 2, l = h + 20 / 2;
|
|
2786
|
+
(t === 0 || t === 1) && (l = o), i.attr("transform", `translate(${l}, ${c + 20})`);
|
|
2787
|
+
}), d > u + f + 20) {
|
|
2788
|
+
let e = y.line(h, v + u + f + 20, h + p, v + u + f + 20, b);
|
|
2789
|
+
l.insert(() => e).attr("style", i);
|
|
2790
|
+
}
|
|
2791
|
+
return T(t, C), t.intersect = function(e) {
|
|
2792
|
+
return W.rect(t, e);
|
|
2793
|
+
}, l;
|
|
2794
|
+
}
|
|
2795
|
+
t(St, "requirementBox");
|
|
2796
|
+
async function Q(e, t, r, o = "") {
|
|
2797
|
+
if (t === "") return 0;
|
|
2798
|
+
let s = e.insert("g").attr("class", "label").attr("style", o), c = a(), l = c.htmlLabels ?? !0, u = await b(s, i(d(t)), {
|
|
2799
|
+
width: p(t, c) + 50,
|
|
2800
|
+
classes: "markdown-node-label",
|
|
2801
|
+
useHtmlLabels: l,
|
|
2802
|
+
style: o
|
|
2803
|
+
}, c), f;
|
|
2804
|
+
if (l) {
|
|
2805
|
+
let e = u.children[0], t = n(u);
|
|
2806
|
+
f = e.getBoundingClientRect(), t.attr("width", f.width), t.attr("height", f.height);
|
|
2807
|
+
} else {
|
|
2808
|
+
let e = u.children[0];
|
|
2809
|
+
for (let t of e.children) t.textContent = t.textContent.replaceAll(">", ">").replaceAll("<", "<"), o && t.setAttribute("style", o);
|
|
2810
|
+
f = u.getBBox(), f.height += 6;
|
|
2811
|
+
}
|
|
2812
|
+
return s.attr("transform", `translate(${-f.width / 2},${-f.height / 2 + r})`), f.height;
|
|
2813
|
+
}
|
|
2814
|
+
t(Q, "addText");
|
|
2815
|
+
var Ct = /* @__PURE__ */ t((e) => {
|
|
2816
|
+
switch (e) {
|
|
2817
|
+
case "Very High": return "red";
|
|
2818
|
+
case "High": return "orange";
|
|
2819
|
+
case "Medium": return null;
|
|
2820
|
+
case "Low": return "blue";
|
|
2821
|
+
case "Very Low": return "lightblue";
|
|
2822
|
+
}
|
|
2823
|
+
}, "colorFromPriority");
|
|
2824
|
+
async function wt(e, t, { config: n }) {
|
|
2825
|
+
let { labelStyles: r, nodeStyles: i } = _(t);
|
|
2826
|
+
t.labelStyle = r || "";
|
|
2827
|
+
let a = t.width;
|
|
2828
|
+
t.width = (t.width ?? 200) - 10;
|
|
2829
|
+
let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = t.padding || 10, u = "", d;
|
|
2830
|
+
"ticket" in t && t.ticket && n?.kanban?.ticketBaseUrl && (u = n?.kanban?.ticketBaseUrl.replace("#TICKET#", t.ticket), d = o.insert("svg:a", ":first-child").attr("class", "kanban-ticket-link").attr("xlink:href", u).attr("target", "_blank"));
|
|
2831
|
+
let f = {
|
|
2832
|
+
useHtmlLabels: t.useHtmlLabels,
|
|
2833
|
+
labelStyle: t.labelStyle || "",
|
|
2834
|
+
width: t.width,
|
|
2835
|
+
img: t.img,
|
|
2836
|
+
padding: t.padding || 8,
|
|
2837
|
+
centerLabel: !1
|
|
2838
|
+
}, p, m;
|
|
2839
|
+
d ? {label: p, bbox: m} = await w(d, "ticket" in t && t.ticket || "", f) : {label: p, bbox: m} = await w(o, "ticket" in t && t.ticket || "", f);
|
|
2840
|
+
let { label: h, bbox: v } = await w(o, "assigned" in t && t.assigned || "", f);
|
|
2841
|
+
t.width = a;
|
|
2842
|
+
let y = t?.width || 0, b = Math.max(m.height, v.height) / 2, x = Math.max(s.height + 20, t?.height || 0) + b, D = -y / 2, O = -x / 2;
|
|
2843
|
+
c.attr("transform", "translate(" + (l - y / 2) + ", " + (-b - s.height / 2) + ")"), p.attr("transform", "translate(" + (l - y / 2) + ", " + (-b + s.height / 2) + ")"), h.attr("transform", "translate(" + (l + y / 2 - v.width - 20) + ", " + (-b + s.height / 2) + ")");
|
|
2844
|
+
let k, { rx: A, ry: j } = t, { cssStyles: N } = t;
|
|
2845
|
+
if (t.look === "handDrawn") {
|
|
2846
|
+
let e = S.svg(o), n = g(t, {}), r = A || j ? e.path(M(D, O, y, x, A || 0), n) : e.rectangle(D, O, y, x, n);
|
|
2847
|
+
k = o.insert(() => r, ":first-child"), k.attr("class", "basic label-container").attr("style", N || null);
|
|
2848
|
+
} else {
|
|
2849
|
+
k = o.insert("rect", ":first-child"), k.attr("class", "basic label-container __APA__").attr("style", i).attr("rx", A ?? 5).attr("ry", j ?? 5).attr("x", D).attr("y", O).attr("width", y).attr("height", x);
|
|
2850
|
+
let e = "priority" in t && t.priority;
|
|
2851
|
+
if (e) {
|
|
2852
|
+
let t = o.append("line"), n = D + 2, r = O + Math.floor((A ?? 0) / 2), i = O + x - Math.floor((A ?? 0) / 2);
|
|
2853
|
+
t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke", Ct(e));
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2856
|
+
return T(t, k), t.height = x, t.intersect = function(e) {
|
|
2857
|
+
return W.rect(t, e);
|
|
2858
|
+
}, o;
|
|
2859
|
+
}
|
|
2860
|
+
t(wt, "kanbanItem");
|
|
2861
|
+
async function Tt(t, n) {
|
|
2862
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
2863
|
+
n.labelStyle = r;
|
|
2864
|
+
let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await C(t, n, E(n)), l = o.width + 10 * s, u = o.height + 8 * s, d = .15 * l, { cssStyles: p } = n, m = o.width + 20, h = o.height + 20, v = Math.max(l, m), y = Math.max(u, h);
|
|
2865
|
+
c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`);
|
|
2866
|
+
let b, x = `M0 0
|
|
2867
|
+
a${d},${d} 1 0,0 ${v * .25},${-1 * y * .1}
|
|
2868
|
+
a${d},${d} 1 0,0 ${v * .25},0
|
|
2869
|
+
a${d},${d} 1 0,0 ${v * .25},0
|
|
2870
|
+
a${d},${d} 1 0,0 ${v * .25},${y * .1}
|
|
2871
|
+
|
|
2872
|
+
a${d},${d} 1 0,0 ${v * .15},${y * .33}
|
|
2873
|
+
a${d * .8},${d * .8} 1 0,0 0,${y * .34}
|
|
2874
|
+
a${d},${d} 1 0,0 ${-1 * v * .15},${y * .33}
|
|
2875
|
+
|
|
2876
|
+
a${d},${d} 1 0,0 ${-1 * v * .25},${y * .15}
|
|
2877
|
+
a${d},${d} 1 0,0 ${-1 * v * .25},0
|
|
2878
|
+
a${d},${d} 1 0,0 ${-1 * v * .25},0
|
|
2879
|
+
a${d},${d} 1 0,0 ${-1 * v * .25},${-1 * y * .15}
|
|
2880
|
+
|
|
2881
|
+
a${d},${d} 1 0,0 ${-1 * v * .1},${-1 * y * .33}
|
|
2882
|
+
a${d * .8},${d * .8} 1 0,0 0,${-1 * y * .34}
|
|
2883
|
+
a${d},${d} 1 0,0 ${v * .1},${-1 * y * .33}
|
|
2884
|
+
H0 V0 Z`;
|
|
2885
|
+
if (n.look === "handDrawn") {
|
|
2886
|
+
let e = S.svg(a), t = g(n, {}), r = e.path(x, t);
|
|
2887
|
+
b = a.insert(() => r, ":first-child"), b.attr("class", "basic label-container").attr("style", f(p));
|
|
2888
|
+
} else b = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", x);
|
|
2889
|
+
return b.attr("transform", `translate(${-v / 2}, ${-y / 2})`), T(n, b), n.calcIntersect = function(e, t) {
|
|
2890
|
+
return W.rect(e, t);
|
|
2891
|
+
}, n.intersect = function(t) {
|
|
2892
|
+
return e.info("Bang intersect", n, t), W.rect(n, t);
|
|
2893
|
+
}, a;
|
|
2894
|
+
}
|
|
2895
|
+
t(Tt, "bang");
|
|
2896
|
+
async function Et(t, n) {
|
|
2897
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
2898
|
+
n.labelStyle = r;
|
|
2899
|
+
let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await C(t, n, E(n)), l = o.width + 2 * s, u = o.height + 2 * s, d = .15 * l, p = .25 * l, m = .35 * l, h = .2 * l, { cssStyles: v } = n, y, b = `M0 0
|
|
2900
|
+
a${d},${d} 0 0,1 ${l * .25},${-1 * l * .1}
|
|
2901
|
+
a${m},${m} 1 0,1 ${l * .4},${-1 * l * .1}
|
|
2902
|
+
a${p},${p} 1 0,1 ${l * .35},${l * .2}
|
|
2903
|
+
|
|
2904
|
+
a${d},${d} 1 0,1 ${l * .15},${u * .35}
|
|
2905
|
+
a${h},${h} 1 0,1 ${-1 * l * .15},${u * .65}
|
|
2906
|
+
|
|
2907
|
+
a${p},${d} 1 0,1 ${-1 * l * .25},${l * .15}
|
|
2908
|
+
a${m},${m} 1 0,1 ${-1 * l * .5},0
|
|
2909
|
+
a${d},${d} 1 0,1 ${-1 * l * .25},${-1 * l * .15}
|
|
2910
|
+
|
|
2911
|
+
a${d},${d} 1 0,1 ${-1 * l * .1},${-1 * u * .35}
|
|
2912
|
+
a${h},${h} 1 0,1 ${l * .1},${-1 * u * .65}
|
|
2913
|
+
H0 V0 Z`;
|
|
2914
|
+
if (n.look === "handDrawn") {
|
|
2915
|
+
let e = S.svg(a), t = g(n, {}), r = e.path(b, t);
|
|
2916
|
+
y = a.insert(() => r, ":first-child"), y.attr("class", "basic label-container").attr("style", f(v));
|
|
2917
|
+
} else y = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", b);
|
|
2918
|
+
return c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`), y.attr("transform", `translate(${-l / 2}, ${-u / 2})`), T(n, y), n.calcIntersect = function(e, t) {
|
|
2919
|
+
return W.rect(e, t);
|
|
2920
|
+
}, n.intersect = function(t) {
|
|
2921
|
+
return e.info("Cloud intersect", n, t), W.rect(n, t);
|
|
2922
|
+
}, a;
|
|
2923
|
+
}
|
|
2924
|
+
t(Et, "cloud");
|
|
2925
|
+
async function Dt(e, t) {
|
|
2926
|
+
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2927
|
+
t.labelStyle = n;
|
|
2928
|
+
let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = await C(e, t, E(t)), c = a.width + 8 * o, l = a.height + 2 * o, u = `
|
|
2929
|
+
M${-c / 2} ${l / 2 - 5}
|
|
2930
|
+
v${-l + 10}
|
|
2931
|
+
q0,-5 5,-5
|
|
2932
|
+
h${c - 10}
|
|
2933
|
+
q5,0 5,5
|
|
2934
|
+
v${l - 10}
|
|
2935
|
+
q0,5 -5,5
|
|
2936
|
+
h${-c + 10}
|
|
2937
|
+
q-5,0 -5,-5
|
|
2938
|
+
Z
|
|
2939
|
+
`, d = i.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr("style", r).attr("d", u);
|
|
2940
|
+
return i.append("line").attr("class", "node-line-").attr("x1", -c / 2).attr("y1", l / 2).attr("x2", c / 2).attr("y2", l / 2), s.attr("transform", `translate(${-a.width / 2}, ${-a.height / 2})`), i.append(() => s.node()), T(t, d), t.calcIntersect = function(e, t) {
|
|
2941
|
+
return W.rect(e, t);
|
|
2942
|
+
}, t.intersect = function(e) {
|
|
2943
|
+
return W.rect(t, e);
|
|
2944
|
+
}, i;
|
|
2945
|
+
}
|
|
2946
|
+
t(Dt, "defaultMindmapNode");
|
|
2947
|
+
async function Ot(e, t) {
|
|
2948
|
+
return le(e, t, { padding: t.padding ?? 0 });
|
|
2949
|
+
}
|
|
2950
|
+
t(Ot, "mindmapCircle");
|
|
2951
|
+
var kt = [
|
|
2952
|
+
{
|
|
2953
|
+
semanticName: "Process",
|
|
2954
|
+
name: "Rectangle",
|
|
2955
|
+
shortName: "rect",
|
|
2956
|
+
description: "Standard process shape",
|
|
2957
|
+
aliases: [
|
|
2958
|
+
"proc",
|
|
2959
|
+
"process",
|
|
2960
|
+
"rectangle"
|
|
2961
|
+
],
|
|
2962
|
+
internalAliases: ["squareRect"],
|
|
2963
|
+
handler: et
|
|
2964
|
+
},
|
|
2965
|
+
{
|
|
2966
|
+
semanticName: "Event",
|
|
2967
|
+
name: "Rounded Rectangle",
|
|
2968
|
+
shortName: "rounded",
|
|
2969
|
+
description: "Represents an event",
|
|
2970
|
+
aliases: ["event"],
|
|
2971
|
+
internalAliases: ["roundedRect"],
|
|
2972
|
+
handler: Ze
|
|
2973
|
+
},
|
|
2974
|
+
{
|
|
2975
|
+
semanticName: "Terminal Point",
|
|
2976
|
+
name: "Stadium",
|
|
2977
|
+
shortName: "stadium",
|
|
2978
|
+
description: "Terminal point",
|
|
2979
|
+
aliases: ["terminal", "pill"],
|
|
2980
|
+
handler: tt
|
|
2981
|
+
},
|
|
2982
|
+
{
|
|
2983
|
+
semanticName: "Subprocess",
|
|
2984
|
+
name: "Framed Rectangle",
|
|
2985
|
+
shortName: "fr-rect",
|
|
2986
|
+
description: "Subprocess",
|
|
2987
|
+
aliases: [
|
|
2988
|
+
"subprocess",
|
|
2989
|
+
"subproc",
|
|
2990
|
+
"framed-rectangle",
|
|
2991
|
+
"subroutine"
|
|
2992
|
+
],
|
|
2993
|
+
handler: at
|
|
2994
|
+
},
|
|
2995
|
+
{
|
|
2996
|
+
semanticName: "Database",
|
|
2997
|
+
name: "Cylinder",
|
|
2998
|
+
shortName: "cyl",
|
|
2999
|
+
description: "Database storage",
|
|
3000
|
+
aliases: [
|
|
3001
|
+
"db",
|
|
3002
|
+
"database",
|
|
3003
|
+
"cylinder"
|
|
3004
|
+
],
|
|
3005
|
+
handler: ye
|
|
3006
|
+
},
|
|
3007
|
+
{
|
|
3008
|
+
semanticName: "Start",
|
|
3009
|
+
name: "Circle",
|
|
3010
|
+
shortName: "circle",
|
|
3011
|
+
description: "Starting point",
|
|
3012
|
+
aliases: ["circ"],
|
|
3013
|
+
handler: le
|
|
3014
|
+
},
|
|
3015
|
+
{
|
|
3016
|
+
semanticName: "Bang",
|
|
3017
|
+
name: "Bang",
|
|
3018
|
+
shortName: "bang",
|
|
3019
|
+
description: "Bang",
|
|
3020
|
+
aliases: ["bang"],
|
|
3021
|
+
handler: Tt
|
|
3022
|
+
},
|
|
3023
|
+
{
|
|
3024
|
+
semanticName: "Cloud",
|
|
3025
|
+
name: "Cloud",
|
|
3026
|
+
shortName: "cloud",
|
|
3027
|
+
description: "cloud",
|
|
3028
|
+
aliases: ["cloud"],
|
|
3029
|
+
handler: Et
|
|
3030
|
+
},
|
|
3031
|
+
{
|
|
3032
|
+
semanticName: "Decision",
|
|
3033
|
+
name: "Diamond",
|
|
3034
|
+
shortName: "diam",
|
|
3035
|
+
description: "Decision-making step",
|
|
3036
|
+
aliases: [
|
|
3037
|
+
"decision",
|
|
3038
|
+
"diamond",
|
|
3039
|
+
"question"
|
|
3040
|
+
],
|
|
3041
|
+
handler: Je
|
|
3042
|
+
},
|
|
3043
|
+
{
|
|
3044
|
+
semanticName: "Prepare Conditional",
|
|
3045
|
+
name: "Hexagon",
|
|
3046
|
+
shortName: "hex",
|
|
3047
|
+
description: "Preparation or condition step",
|
|
3048
|
+
aliases: ["hexagon", "prepare"],
|
|
3049
|
+
handler: De
|
|
3050
|
+
},
|
|
3051
|
+
{
|
|
3052
|
+
semanticName: "Data Input/Output",
|
|
3053
|
+
name: "Lean Right",
|
|
3054
|
+
shortName: "lean-r",
|
|
3055
|
+
description: "Represents input or output",
|
|
3056
|
+
aliases: ["lean-right", "in-out"],
|
|
3057
|
+
internalAliases: ["lean_right"],
|
|
3058
|
+
handler: Le
|
|
3059
|
+
},
|
|
3060
|
+
{
|
|
3061
|
+
semanticName: "Data Input/Output",
|
|
3062
|
+
name: "Lean Left",
|
|
3063
|
+
shortName: "lean-l",
|
|
3064
|
+
description: "Represents output or input",
|
|
3065
|
+
aliases: ["lean-left", "out-in"],
|
|
3066
|
+
internalAliases: ["lean_left"],
|
|
3067
|
+
handler: Ie
|
|
3068
|
+
},
|
|
3069
|
+
{
|
|
3070
|
+
semanticName: "Priority Action",
|
|
3071
|
+
name: "Trapezoid Base Bottom",
|
|
3072
|
+
shortName: "trap-b",
|
|
3073
|
+
description: "Priority action",
|
|
3074
|
+
aliases: [
|
|
3075
|
+
"priority",
|
|
3076
|
+
"trapezoid-bottom",
|
|
3077
|
+
"trapezoid"
|
|
3078
|
+
],
|
|
3079
|
+
handler: pt
|
|
3080
|
+
},
|
|
3081
|
+
{
|
|
3082
|
+
semanticName: "Manual Operation",
|
|
3083
|
+
name: "Trapezoid Base Top",
|
|
3084
|
+
shortName: "trap-t",
|
|
3085
|
+
description: "Represents a manual task",
|
|
3086
|
+
aliases: [
|
|
3087
|
+
"manual",
|
|
3088
|
+
"trapezoid-top",
|
|
3089
|
+
"inv-trapezoid"
|
|
3090
|
+
],
|
|
3091
|
+
internalAliases: ["inv_trapezoid"],
|
|
3092
|
+
handler: Pe
|
|
3093
|
+
},
|
|
3094
|
+
{
|
|
3095
|
+
semanticName: "Stop",
|
|
3096
|
+
name: "Double Circle",
|
|
3097
|
+
shortName: "dbl-circ",
|
|
3098
|
+
description: "Represents a stop point",
|
|
3099
|
+
aliases: ["double-circle"],
|
|
3100
|
+
internalAliases: ["doublecircle"],
|
|
3101
|
+
handler: xe
|
|
3102
|
+
},
|
|
3103
|
+
{
|
|
3104
|
+
semanticName: "Text Block",
|
|
3105
|
+
name: "Text Block",
|
|
3106
|
+
shortName: "text",
|
|
3107
|
+
description: "Text block",
|
|
3108
|
+
handler: ct
|
|
3109
|
+
},
|
|
3110
|
+
{
|
|
3111
|
+
semanticName: "Card",
|
|
3112
|
+
name: "Notched Rectangle",
|
|
3113
|
+
shortName: "notch-rect",
|
|
3114
|
+
description: "Represents a card",
|
|
3115
|
+
aliases: ["card", "notched-rectangle"],
|
|
3116
|
+
handler: se
|
|
3117
|
+
},
|
|
3118
|
+
{
|
|
3119
|
+
semanticName: "Lined/Shaded Process",
|
|
3120
|
+
name: "Lined Rectangle",
|
|
3121
|
+
shortName: "lin-rect",
|
|
3122
|
+
description: "Lined process shape",
|
|
3123
|
+
aliases: [
|
|
3124
|
+
"lined-rectangle",
|
|
3125
|
+
"lined-process",
|
|
3126
|
+
"lin-proc",
|
|
3127
|
+
"shaded-process"
|
|
3128
|
+
],
|
|
3129
|
+
handler: Qe
|
|
3130
|
+
},
|
|
3131
|
+
{
|
|
3132
|
+
semanticName: "Start",
|
|
3133
|
+
name: "Small Circle",
|
|
3134
|
+
shortName: "sm-circ",
|
|
3135
|
+
description: "Small starting point",
|
|
3136
|
+
aliases: ["start", "small-circle"],
|
|
3137
|
+
internalAliases: ["stateStart"],
|
|
3138
|
+
handler: it
|
|
3139
|
+
},
|
|
3140
|
+
{
|
|
3141
|
+
semanticName: "Stop",
|
|
3142
|
+
name: "Framed Circle",
|
|
3143
|
+
shortName: "fr-circ",
|
|
3144
|
+
description: "Stop point",
|
|
3145
|
+
aliases: ["stop", "framed-circle"],
|
|
3146
|
+
internalAliases: ["stateEnd"],
|
|
3147
|
+
handler: rt
|
|
3148
|
+
},
|
|
3149
|
+
{
|
|
3150
|
+
semanticName: "Fork/Join",
|
|
3151
|
+
name: "Filled Rectangle",
|
|
3152
|
+
shortName: "fork",
|
|
3153
|
+
description: "Fork or join in process flow",
|
|
3154
|
+
aliases: ["join"],
|
|
3155
|
+
internalAliases: ["forkJoin"],
|
|
3156
|
+
handler: we
|
|
3157
|
+
},
|
|
3158
|
+
{
|
|
3159
|
+
semanticName: "Collate",
|
|
3160
|
+
name: "Hourglass",
|
|
3161
|
+
shortName: "hourglass",
|
|
3162
|
+
description: "Represents a collate operation",
|
|
3163
|
+
aliases: ["hourglass", "collate"],
|
|
3164
|
+
handler: Oe
|
|
3165
|
+
},
|
|
3166
|
+
{
|
|
3167
|
+
semanticName: "Comment",
|
|
3168
|
+
name: "Curly Brace",
|
|
3169
|
+
shortName: "brace",
|
|
3170
|
+
description: "Adds a comment",
|
|
3171
|
+
aliases: ["comment", "brace-l"],
|
|
3172
|
+
handler: fe
|
|
3173
|
+
},
|
|
3174
|
+
{
|
|
3175
|
+
semanticName: "Comment Right",
|
|
3176
|
+
name: "Curly Brace",
|
|
3177
|
+
shortName: "brace-r",
|
|
3178
|
+
description: "Adds a comment",
|
|
3179
|
+
handler: pe
|
|
3180
|
+
},
|
|
3181
|
+
{
|
|
3182
|
+
semanticName: "Comment with braces on both sides",
|
|
3183
|
+
name: "Curly Braces",
|
|
3184
|
+
shortName: "braces",
|
|
3185
|
+
description: "Adds a comment",
|
|
3186
|
+
handler: me
|
|
3187
|
+
},
|
|
3188
|
+
{
|
|
3189
|
+
semanticName: "Com Link",
|
|
3190
|
+
name: "Lightning Bolt",
|
|
3191
|
+
shortName: "bolt",
|
|
3192
|
+
description: "Communication link",
|
|
3193
|
+
aliases: ["com-link", "lightning-bolt"],
|
|
3194
|
+
handler: Re
|
|
3195
|
+
},
|
|
3196
|
+
{
|
|
3197
|
+
semanticName: "Document",
|
|
3198
|
+
name: "Document",
|
|
3199
|
+
shortName: "doc",
|
|
3200
|
+
description: "Represents a document",
|
|
3201
|
+
aliases: ["doc", "document"],
|
|
3202
|
+
handler: gt
|
|
3203
|
+
},
|
|
3204
|
+
{
|
|
3205
|
+
semanticName: "Delay",
|
|
3206
|
+
name: "Half-Rounded Rectangle",
|
|
3207
|
+
shortName: "delay",
|
|
3208
|
+
description: "Represents a delay",
|
|
3209
|
+
aliases: ["half-rounded-rectangle"],
|
|
3210
|
+
handler: Te
|
|
3211
|
+
},
|
|
3212
|
+
{
|
|
3213
|
+
semanticName: "Direct Access Storage",
|
|
3214
|
+
name: "Horizontal Cylinder",
|
|
3215
|
+
shortName: "h-cyl",
|
|
3216
|
+
description: "Direct access storage",
|
|
3217
|
+
aliases: ["das", "horizontal-cylinder"],
|
|
3218
|
+
handler: ft
|
|
3219
|
+
},
|
|
3220
|
+
{
|
|
3221
|
+
semanticName: "Disk Storage",
|
|
3222
|
+
name: "Lined Cylinder",
|
|
3223
|
+
shortName: "lin-cyl",
|
|
3224
|
+
description: "Disk storage",
|
|
3225
|
+
aliases: ["disk", "lined-cylinder"],
|
|
3226
|
+
handler: He
|
|
3227
|
+
},
|
|
3228
|
+
{
|
|
3229
|
+
semanticName: "Display",
|
|
3230
|
+
name: "Curved Trapezoid",
|
|
3231
|
+
shortName: "curv-trap",
|
|
3232
|
+
description: "Represents a display",
|
|
3233
|
+
aliases: ["curved-trapezoid", "display"],
|
|
3234
|
+
handler: he
|
|
3235
|
+
},
|
|
3236
|
+
{
|
|
3237
|
+
semanticName: "Divided Process",
|
|
3238
|
+
name: "Divided Rectangle",
|
|
3239
|
+
shortName: "div-rect",
|
|
3240
|
+
description: "Divided process shape",
|
|
3241
|
+
aliases: [
|
|
3242
|
+
"div-proc",
|
|
3243
|
+
"divided-rectangle",
|
|
3244
|
+
"divided-process"
|
|
3245
|
+
],
|
|
3246
|
+
handler: be
|
|
3247
|
+
},
|
|
3248
|
+
{
|
|
3249
|
+
semanticName: "Extract",
|
|
3250
|
+
name: "Triangle",
|
|
3251
|
+
shortName: "tri",
|
|
3252
|
+
description: "Extraction process",
|
|
3253
|
+
aliases: ["extract", "triangle"],
|
|
3254
|
+
handler: ht
|
|
3255
|
+
},
|
|
3256
|
+
{
|
|
3257
|
+
semanticName: "Internal Storage",
|
|
3258
|
+
name: "Window Pane",
|
|
3259
|
+
shortName: "win-pane",
|
|
3260
|
+
description: "Internal storage",
|
|
3261
|
+
aliases: ["internal-storage", "window-pane"],
|
|
3262
|
+
handler: vt
|
|
3263
|
+
},
|
|
3264
|
+
{
|
|
3265
|
+
semanticName: "Junction",
|
|
3266
|
+
name: "Filled Circle",
|
|
3267
|
+
shortName: "f-circ",
|
|
3268
|
+
description: "Junction point",
|
|
3269
|
+
aliases: ["junction", "filled-circle"],
|
|
3270
|
+
handler: Se
|
|
3271
|
+
},
|
|
3272
|
+
{
|
|
3273
|
+
semanticName: "Loop Limit",
|
|
3274
|
+
name: "Trapezoidal Pentagon",
|
|
3275
|
+
shortName: "notch-pent",
|
|
3276
|
+
description: "Loop limit step",
|
|
3277
|
+
aliases: ["loop-limit", "notched-pentagon"],
|
|
3278
|
+
handler: mt
|
|
3279
|
+
},
|
|
3280
|
+
{
|
|
3281
|
+
semanticName: "Manual File",
|
|
3282
|
+
name: "Flipped Triangle",
|
|
3283
|
+
shortName: "flip-tri",
|
|
3284
|
+
description: "Manual file operation",
|
|
3285
|
+
aliases: ["manual-file", "flipped-triangle"],
|
|
3286
|
+
handler: Ce
|
|
3287
|
+
},
|
|
3288
|
+
{
|
|
3289
|
+
semanticName: "Manual Input",
|
|
3290
|
+
name: "Sloped Rectangle",
|
|
3291
|
+
shortName: "sl-rect",
|
|
3292
|
+
description: "Manual input step",
|
|
3293
|
+
aliases: ["manual-input", "sloped-rectangle"],
|
|
3294
|
+
handler: $e
|
|
3295
|
+
},
|
|
3296
|
+
{
|
|
3297
|
+
semanticName: "Multi-Document",
|
|
3298
|
+
name: "Stacked Document",
|
|
3299
|
+
shortName: "docs",
|
|
3300
|
+
description: "Multiple documents",
|
|
3301
|
+
aliases: [
|
|
3302
|
+
"documents",
|
|
3303
|
+
"st-doc",
|
|
3304
|
+
"stacked-document"
|
|
3305
|
+
],
|
|
3306
|
+
handler: Ge
|
|
3307
|
+
},
|
|
3308
|
+
{
|
|
3309
|
+
semanticName: "Multi-Process",
|
|
3310
|
+
name: "Stacked Rectangle",
|
|
3311
|
+
shortName: "st-rect",
|
|
3312
|
+
description: "Multiple processes",
|
|
3313
|
+
aliases: [
|
|
3314
|
+
"procs",
|
|
3315
|
+
"processes",
|
|
3316
|
+
"stacked-rectangle"
|
|
3317
|
+
],
|
|
3318
|
+
handler: We
|
|
3319
|
+
},
|
|
3320
|
+
{
|
|
3321
|
+
semanticName: "Stored Data",
|
|
3322
|
+
name: "Bow Tie Rectangle",
|
|
3323
|
+
shortName: "bow-rect",
|
|
3324
|
+
description: "Stored data",
|
|
3325
|
+
aliases: ["stored-data", "bow-tie-rectangle"],
|
|
3326
|
+
handler: oe
|
|
3327
|
+
},
|
|
3328
|
+
{
|
|
3329
|
+
semanticName: "Summary",
|
|
3330
|
+
name: "Crossed Circle",
|
|
3331
|
+
shortName: "cross-circ",
|
|
3332
|
+
description: "Summary",
|
|
3333
|
+
aliases: ["summary", "crossed-circle"],
|
|
3334
|
+
handler: de
|
|
3335
|
+
},
|
|
3336
|
+
{
|
|
3337
|
+
semanticName: "Tagged Document",
|
|
3338
|
+
name: "Tagged Document",
|
|
3339
|
+
shortName: "tag-doc",
|
|
3340
|
+
description: "Tagged document",
|
|
3341
|
+
aliases: ["tag-doc", "tagged-document"],
|
|
3342
|
+
handler: st
|
|
3343
|
+
},
|
|
3344
|
+
{
|
|
3345
|
+
semanticName: "Tagged Process",
|
|
3346
|
+
name: "Tagged Rectangle",
|
|
3347
|
+
shortName: "tag-rect",
|
|
3348
|
+
description: "Tagged process",
|
|
3349
|
+
aliases: [
|
|
3350
|
+
"tagged-rectangle",
|
|
3351
|
+
"tag-proc",
|
|
3352
|
+
"tagged-process"
|
|
3353
|
+
],
|
|
3354
|
+
handler: ot
|
|
3355
|
+
},
|
|
3356
|
+
{
|
|
3357
|
+
semanticName: "Paper Tape",
|
|
3358
|
+
name: "Flag",
|
|
3359
|
+
shortName: "flag",
|
|
3360
|
+
description: "Paper tape",
|
|
3361
|
+
aliases: ["paper-tape"],
|
|
3362
|
+
handler: _t
|
|
3363
|
+
},
|
|
3364
|
+
{
|
|
3365
|
+
semanticName: "Odd",
|
|
3366
|
+
name: "Odd",
|
|
3367
|
+
shortName: "odd",
|
|
3368
|
+
description: "Odd shape",
|
|
3369
|
+
internalAliases: ["rect_left_inv_arrow"],
|
|
3370
|
+
handler: Ye
|
|
3371
|
+
},
|
|
3372
|
+
{
|
|
3373
|
+
semanticName: "Lined Document",
|
|
3374
|
+
name: "Lined Document",
|
|
3375
|
+
shortName: "lin-doc",
|
|
3376
|
+
description: "Lined document",
|
|
3377
|
+
aliases: ["lined-document"],
|
|
3378
|
+
handler: Ue
|
|
3379
|
+
}
|
|
3380
|
+
], At = (/* @__PURE__ */ t(() => {
|
|
3381
|
+
let e = [...Object.entries({
|
|
3382
|
+
state: nt,
|
|
3383
|
+
choice: ce,
|
|
3384
|
+
note: Ke,
|
|
3385
|
+
rectWithTitle: Xe,
|
|
3386
|
+
labelRect: Fe,
|
|
3387
|
+
iconSquare: Me,
|
|
3388
|
+
iconCircle: Ae,
|
|
3389
|
+
icon: ke,
|
|
3390
|
+
iconRounded: je,
|
|
3391
|
+
imageSquare: Ne,
|
|
3392
|
+
anchor: ie,
|
|
3393
|
+
kanbanItem: wt,
|
|
3394
|
+
mindmapCircle: Ot,
|
|
3395
|
+
defaultMindmapNode: Dt,
|
|
3396
|
+
classBox: xt,
|
|
3397
|
+
erBox: yt,
|
|
3398
|
+
requirementBox: St
|
|
3399
|
+
}), ...kt.flatMap((e) => [
|
|
3400
|
+
e.shortName,
|
|
3401
|
+
..."aliases" in e ? e.aliases : [],
|
|
3402
|
+
..."internalAliases" in e ? e.internalAliases : []
|
|
3403
|
+
].map((t) => [t, e.handler]))];
|
|
3404
|
+
return Object.fromEntries(e);
|
|
3405
|
+
}, "generateShapeMap"))();
|
|
3406
|
+
function jt(e) {
|
|
3407
|
+
return e in At;
|
|
3408
|
+
}
|
|
3409
|
+
t(jt, "isValidShape");
|
|
3410
|
+
var $ = /* @__PURE__ */ new Map();
|
|
3411
|
+
async function Mt(e, t, n) {
|
|
3412
|
+
let r, i;
|
|
3413
|
+
t.shape === "rect" && (t.rx && t.ry ? t.shape = "roundedRect" : t.shape = "squareRect");
|
|
3414
|
+
let a = t.shape ? At[t.shape] : void 0;
|
|
3415
|
+
if (!a) throw Error(`No such shape: ${t.shape}. Please check your syntax.`);
|
|
3416
|
+
if (t.link) {
|
|
3417
|
+
let o;
|
|
3418
|
+
n.config.securityLevel === "sandbox" ? o = "_top" : t.linkTarget && (o = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", o ?? null), i = await a(r, t, n);
|
|
3419
|
+
} else i = await a(e, t, n), r = i;
|
|
3420
|
+
return t.tooltip && i.attr("title", t.tooltip), $.set(t.id, r), t.haveCallback && r.attr("class", r.attr("class") + " clickable"), r;
|
|
3421
|
+
}
|
|
3422
|
+
t(Mt, "insertNode");
|
|
3423
|
+
var Nt = /* @__PURE__ */ t((e, t) => {
|
|
3424
|
+
$.set(t.id, e);
|
|
3425
|
+
}, "setNodeElem"), Pt = /* @__PURE__ */ t(() => {
|
|
3426
|
+
$.clear();
|
|
3427
|
+
}, "clear"), Ft = /* @__PURE__ */ t((t) => {
|
|
3428
|
+
let n = $.get(t.id);
|
|
3429
|
+
e.trace("Transforming node", t.diff, t, "translate(" + (t.x - t.width / 2 - 5) + ", " + t.width / 2 + ")");
|
|
3430
|
+
let r = t.diff || 0;
|
|
3431
|
+
return t.clusterNode ? n.attr("transform", "translate(" + (t.x + r - t.width / 2) + ", " + (t.y - t.height / 2 - 8) + ")") : n.attr("transform", "translate(" + t.x + ", " + t.y + ")"), r;
|
|
3432
|
+
}, "positionNode");
|
|
3433
|
+
//#endregion
|
|
3434
|
+
export { Mt as a, Ft as c, I as i, Nt as l, Pt as n, jt as o, j as r, C as s, L as t, T as u };
|
|
3435
|
+
|
|
3436
|
+
//# sourceMappingURL=chunk-KYZI473N-DEPuSXaW.js.map
|