@cagent/chat-embedding-core 0.0.13 → 0.0.17
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/.env +6 -0
- package/README.md +213 -213
- package/bun.lock +1548 -1548
- package/dist/abnfDiagram-VRR7QNED-3cfb3856.js +1 -0
- package/dist/abnfDiagram-VRR7QNED-686410b0.js +1 -0
- package/dist/abnfDiagram-VRR7QNED-fb22812d.js +1 -0
- package/dist/api/chatRoom.d.ts.map +1 -0
- package/dist/arc-24dd4755.js +1 -0
- package/dist/arc-5d6257cf.js +1 -0
- package/dist/arc-90e71e7e.js +1 -0
- package/dist/architecture-TIHT7OUA-a997f441.js +1 -0
- package/dist/architecture-TIHT7OUA-faa1f9b3.js +1 -0
- package/dist/architectureDiagram-ZJ3FMSHR-87443299.js +1 -0
- package/dist/architectureDiagram-ZJ3FMSHR-93988e41.js +1 -0
- package/dist/architectureDiagram-ZJ3FMSHR-bde2dd21.js +1 -0
- package/dist/blockDiagram-677ZJIJ3-25a94a47.js +1 -0
- package/dist/blockDiagram-677ZJIJ3-88bd543c.js +1 -0
- package/dist/blockDiagram-677ZJIJ3-c769a3c8.js +1 -0
- package/dist/c4Diagram-LMCZKHZV-763880d7.js +1 -0
- package/dist/c4Diagram-LMCZKHZV-d7fc839e.js +1 -0
- package/dist/c4Diagram-LMCZKHZV-da04a76e.js +1 -0
- package/dist/channel-11d3f4bc.js +1 -0
- package/dist/channel-534c2e17.js +1 -0
- package/dist/channel-c3cf6060.js +1 -0
- package/dist/chunk-2Q5K7J3B-2892df89.js +1 -0
- package/dist/chunk-2Q5K7J3B-7960ff8e.js +1 -0
- package/dist/chunk-2Q5K7J3B-9497bf31.js +1 -0
- package/dist/chunk-32BRIVSS-10123eba.js +1 -0
- package/dist/chunk-32BRIVSS-10ac68f7.js +1 -0
- package/dist/chunk-32BRIVSS-8a8507a2.js +1 -0
- package/dist/chunk-5VM5RSS4-36b32f6e.js +1 -0
- package/dist/chunk-5VM5RSS4-4b2efd20.js +1 -0
- package/dist/chunk-5VM5RSS4-5fc85a49.js +1 -0
- package/dist/chunk-EX3LRPZG-36494b87.js +1 -0
- package/dist/chunk-EX3LRPZG-6cd1f2fa.js +1 -0
- package/dist/chunk-EX3LRPZG-7ac6d0d7.js +1 -0
- package/dist/chunk-JWPE2WC7-15a55950.js +1 -0
- package/dist/chunk-JWPE2WC7-84faee3d.js +1 -0
- package/dist/chunk-JWPE2WC7-e2521b1e.js +1 -0
- package/dist/chunk-MOJQB5TN-47f0392f.js +1 -0
- package/dist/chunk-MOJQB5TN-5cc2e61b.js +1 -0
- package/dist/chunk-MOJQB5TN-ea88675c.js +1 -0
- package/dist/chunk-PUDLZKDR-057ec46a.js +1 -0
- package/dist/chunk-PUDLZKDR-53309be9.js +1 -0
- package/dist/chunk-PUDLZKDR-6de50ada.js +1 -0
- package/dist/chunk-RYQCIY6F-06b096c5.js +1 -0
- package/dist/chunk-RYQCIY6F-453400cd.js +1 -0
- package/dist/chunk-RYQCIY6F-8de649c8.js +1 -0
- package/dist/chunk-V7JOEXUC-4083766f.js +1 -0
- package/dist/chunk-V7JOEXUC-4e8d7729.js +1 -0
- package/dist/chunk-V7JOEXUC-bb2df9b0.js +1 -0
- package/dist/chunk-VR4S4FIN-5feb7571.js +1 -0
- package/dist/chunk-VR4S4FIN-9df47127.js +1 -0
- package/dist/chunk-VR4S4FIN-c4f2681d.js +1 -0
- package/dist/chunk-XXDRQBXY-3c9d8bf9.js +1 -0
- package/dist/chunk-XXDRQBXY-de00e988.js +1 -0
- package/dist/chunk-XXDRQBXY-f923ffed.js +1 -0
- package/dist/classDiagram-OUVF2IWQ-5cdf5fe6.js +1 -0
- package/dist/classDiagram-OUVF2IWQ-d51bd736.js +1 -0
- package/dist/classDiagram-OUVF2IWQ-fc2b54d6.js +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-5cdf5fe6.js +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-d51bd736.js +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-fc2b54d6.js +1 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Bot.d.ts.map +1 -0
- package/dist/components/FeedbackContentDialog.d.ts.map +1 -0
- package/dist/components/RoomReconnectAlert.d.ts.map +1 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/TypingBubble.d.ts.map +1 -0
- package/dist/components/avatars/Avatar.d.ts.map +1 -0
- package/dist/components/avatars/DefaultAvatar.d.ts.map +1 -0
- package/dist/components/bubbles/AgentReasoningBubble.d.ts.map +1 -0
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -0
- package/dist/components/bubbles/ChartBubble.d.ts.map +1 -0
- package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPopupModal.d.ts.map +1 -0
- package/dist/components/bubbles/FollowUpPromptBubble.d.ts.map +1 -0
- package/dist/components/bubbles/GuestBubble.d.ts.map +1 -0
- package/dist/components/bubbles/LeadCaptureBubble.d.ts.map +1 -0
- package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -0
- package/dist/components/bubbles/SourceBubble.d.ts.map +1 -0
- package/dist/components/bubbles/StableChartWrapper.d.ts.map +1 -0
- package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -0
- package/dist/components/buttons/AttachmentUploadButton.d.ts.map +1 -0
- package/dist/components/buttons/CancelButton.d.ts.map +1 -0
- package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/FeedbackButtons.d.ts.map +1 -0
- package/dist/components/buttons/ImageUploadButton.d.ts.map +1 -0
- package/dist/components/buttons/LeadCaptureButtons.d.ts.map +1 -0
- package/dist/components/buttons/PopupToast.d.ts.map +1 -0
- package/dist/components/buttons/RecordAudioButton.d.ts.map +1 -0
- package/dist/components/buttons/SendButton.d.ts.map +1 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
- package/dist/components/icons/AddImageIcon.d.ts.map +1 -0
- package/dist/components/icons/AttachmentIcon.d.ts.map +1 -0
- package/dist/components/icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/icons/CircleDotIcon.d.ts.map +1 -0
- package/dist/components/icons/ClipboardIcon.d.ts.map +1 -0
- package/dist/components/icons/CopyIcon.d.ts.map +1 -0
- package/dist/components/icons/DeleteIcon.d.ts.map +1 -0
- package/dist/components/icons/EditIcon.d.ts.map +1 -0
- package/dist/components/icons/FullScreenIcon.d.ts.map +1 -0
- package/dist/components/icons/RecordIcon.d.ts.map +1 -0
- package/dist/components/icons/ResetZoomIcon.d.ts.map +1 -0
- package/dist/components/icons/SendIcon.d.ts.map +1 -0
- package/dist/components/icons/SparklesIcon.d.ts.map +1 -0
- package/dist/components/icons/StopIcon.d.ts.map +1 -0
- package/dist/components/icons/ThumbsDownIcon.d.ts.map +1 -0
- package/dist/components/icons/ThumbsUpIcon.d.ts.map +1 -0
- package/dist/components/icons/TickIcon.d.ts.map +1 -0
- package/dist/components/icons/TrashIcon.d.ts.map +1 -0
- package/dist/components/icons/XIcon.d.ts.map +1 -0
- package/dist/components/icons/ZoomInIcon.d.ts.map +1 -0
- package/dist/components/icons/ZoomOutIcon.d.ts.map +1 -0
- package/dist/components/icons/index.d.ts.map +1 -0
- package/dist/components/image/PreviewImage.d.ts.map +1 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/FilePreview.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -0
- package/dist/components/inputs/textInput/index.d.ts.map +1 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/cose-bilkent-JH36ORCC-ac4d2e28.js +1 -0
- package/dist/cose-bilkent-JH36ORCC-c3560feb.js +1 -0
- package/dist/cose-bilkent-JH36ORCC-f0ddc3e7.js +1 -0
- package/dist/cynefin-VYW2F7L2-2458ad91.js +1 -0
- package/dist/cynefin-VYW2F7L2-a8648cf6.js +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-62a29383.js +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-910b3dfd.js +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-deb0bb2c.js +1 -0
- package/dist/cytoscape.esm-56d2239f.js +1 -0
- package/dist/cytoscape.esm-c9352dc8.js +1 -0
- package/dist/dagre-VKFMJZFB-1467d0af.js +1 -0
- package/dist/dagre-VKFMJZFB-35daad97.js +1 -0
- package/dist/dagre-VKFMJZFB-c5b9a4a0.js +1 -0
- package/dist/defaultLocale-b4977250.js +1 -0
- package/dist/defaultLocale-e35a4def.js +1 -0
- package/dist/diagram-FQU43EPY-41eed431.js +1 -0
- package/dist/diagram-FQU43EPY-613e9e4e.js +1 -0
- package/dist/diagram-FQU43EPY-d256050e.js +1 -0
- package/dist/diagram-G47NLZAW-813bbb70.js +1 -0
- package/dist/diagram-G47NLZAW-8ef917d1.js +1 -0
- package/dist/diagram-G47NLZAW-aa02607c.js +1 -0
- package/dist/diagram-NH7WQ7WH-0af7a921.js +1 -0
- package/dist/diagram-NH7WQ7WH-0e4f7f17.js +1 -0
- package/dist/diagram-NH7WQ7WH-6f91f6aa.js +1 -0
- package/dist/diagram-OA4YK3LP-0fba2475.js +1 -0
- package/dist/diagram-OA4YK3LP-587273f4.js +1 -0
- package/dist/diagram-OA4YK3LP-6cbfc7a5.js +1 -0
- package/dist/diagram-WEI45ONY-0241463f.js +1 -0
- package/dist/diagram-WEI45ONY-dd634033.js +1 -0
- package/dist/diagram-WEI45ONY-e002e844.js +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-20ac4ba3.js +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-e9974165.js +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-ead44055.js +1 -0
- package/dist/erDiagram-Q63AITRT-1febb8fc.js +1 -0
- package/dist/erDiagram-Q63AITRT-4ea4b93d.js +1 -0
- package/dist/erDiagram-Q63AITRT-bcb00855.js +1 -0
- package/dist/eventmodeling-45OFAUF4-a82f1f18.js +1 -0
- package/dist/eventmodeling-45OFAUF4-dcf667fc.js +1 -0
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -0
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -0
- package/dist/features/bubble/components/Tooltip.d.ts.map +1 -0
- package/dist/features/bubble/components/index.d.ts.map +1 -0
- package/dist/features/bubble/index.d.ts.map +1 -0
- package/dist/features/bubble/types.d.ts.map +1 -0
- package/dist/features/full/components/Full.d.ts.map +1 -0
- package/dist/features/full/components/index.d.ts.map +1 -0
- package/dist/features/full/index.d.ts.map +1 -0
- package/dist/features/popup/components/DisclaimerPopup.d.ts.map +1 -0
- package/dist/features/popup/components/Popup.d.ts.map +1 -0
- package/dist/features/popup/components/index.d.ts.map +1 -0
- package/dist/features/popup/index.d.ts.map +1 -0
- package/dist/features/popup/types.d.ts.map +1 -0
- package/dist/flowDiagram-23GEKE2U-14ee2b3c.js +1 -0
- package/dist/flowDiagram-23GEKE2U-7ab9c2e4.js +1 -0
- package/dist/flowDiagram-23GEKE2U-f7309569.js +1 -0
- package/dist/ganttDiagram-NO4QXBWP-249a167d.js +1 -0
- package/dist/ganttDiagram-NO4QXBWP-bd530d12.js +1 -0
- package/dist/ganttDiagram-NO4QXBWP-e5e495d6.js +1 -0
- package/dist/gitGraph-TEB2WS4Q-72ba3362.js +1 -0
- package/dist/gitGraph-TEB2WS4Q-d07b15b3.js +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-2964ff91.js +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-4d9324ad.js +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-97bf868b.js +1 -0
- package/dist/graph-0df36b9d.js +1 -0
- package/dist/graph-c6801890.js +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/info-DKCQHKI2-d8e8a901.js +1 -0
- package/dist/info-DKCQHKI2-dd69502c.js +1 -0
- package/dist/infoDiagram-FWYZ7A6U-1267309e.js +1 -0
- package/dist/infoDiagram-FWYZ7A6U-5b9d28af.js +1 -0
- package/dist/infoDiagram-FWYZ7A6U-cc33afe4.js +1 -0
- package/dist/init-b029a625.js +1 -0
- package/dist/init-cf76ae07.js +1 -0
- package/dist/ishikawaDiagram-FXEZZL3T-3f0977e8.js +1 -0
- package/dist/ishikawaDiagram-FXEZZL3T-89c1b2f4.js +1 -0
- package/dist/ishikawaDiagram-FXEZZL3T-9fef4653.js +1 -0
- package/dist/journeyDiagram-5HDEW3XC-563a68ff.js +1 -0
- package/dist/journeyDiagram-5HDEW3XC-c8c8d701.js +1 -0
- package/dist/journeyDiagram-5HDEW3XC-e6c5e84b.js +1 -0
- package/dist/kanban-definition-HUTT4EX6-3719e367.js +1 -0
- package/dist/kanban-definition-HUTT4EX6-7bc0cd1e.js +1 -0
- package/dist/kanban-definition-HUTT4EX6-d8b002e3.js +1 -0
- package/dist/katex-67456a45.js +1 -0
- package/dist/katex-b134d23c.js +1 -0
- package/dist/layout-e44354bf.js +1 -0
- package/dist/layout-ff5d33a1.js +1 -0
- package/dist/linear-7b1a23f3.js +1 -0
- package/dist/linear-d7ad6d25.js +1 -0
- package/dist/linear-e5c99c88.js +1 -0
- package/dist/map-05f0ff95.js +1 -0
- package/dist/map-d3292a5b.js +1 -0
- package/dist/mermaid-parser.core-6df0beec.js +1 -0
- package/dist/mermaid-parser.core-d8d1c2b9.js +1 -0
- package/dist/mermaid.core-2d237a1e.js +1 -0
- package/dist/mermaid.core-70d5aead.js +1 -0
- package/dist/mermaid.core-8797d6a9.js +1 -0
- package/dist/mindmap-definition-LN4V7U3C-04a12a88.js +1 -0
- package/dist/mindmap-definition-LN4V7U3C-86a890ce.js +1 -0
- package/dist/mindmap-definition-LN4V7U3C-f495948c.js +1 -0
- package/dist/ordinal-221e41d7.js +1 -0
- package/dist/ordinal-4a51e46c.js +1 -0
- package/dist/packet-7NZHBO7P-b4586e10.js +1 -0
- package/dist/packet-7NZHBO7P-f62750ff.js +1 -0
- package/dist/pegDiagram-2B236MQR-234fe6d1.js +1 -0
- package/dist/pegDiagram-2B236MQR-2826e278.js +1 -0
- package/dist/pegDiagram-2B236MQR-64eeb662.js +1 -0
- package/dist/pie-RZYD4A2V-106ba3d7.js +1 -0
- package/dist/pie-RZYD4A2V-752eda00.js +1 -0
- package/dist/pieDiagram-ENE6RG2P-0c3b09b8.js +1 -0
- package/dist/pieDiagram-ENE6RG2P-3fb5f734.js +1 -0
- package/dist/pieDiagram-ENE6RG2P-af928526.js +1 -0
- package/dist/quadrantDiagram-ABIIQ3AL-1a55c0f5.js +1 -0
- package/dist/quadrantDiagram-ABIIQ3AL-3d15c26d.js +1 -0
- package/dist/quadrantDiagram-ABIIQ3AL-9110fa9c.js +1 -0
- package/dist/queries/sendMessageQuery.d.ts.map +1 -0
- package/dist/radar-I7S5WNFK-53bde9ff.js +1 -0
- package/dist/radar-I7S5WNFK-87e8c5ba.js +1 -0
- package/dist/railroad-3IZDKUUU-99427b9f.js +1 -0
- package/dist/railroad-3IZDKUUU-9e29587d.js +1 -0
- package/dist/railroad-abnf-AHOZXSZD-1d11cb5b.js +1 -0
- package/dist/railroad-abnf-AHOZXSZD-c27db0bc.js +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-38dff87c.js +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-6bb5de0c.js +1 -0
- package/dist/railroad-peg-LSFZ7HO6-c9f0aa71.js +1 -0
- package/dist/railroad-peg-LSFZ7HO6-efcb0a43.js +1 -0
- package/dist/railroadDiagram-RFXS5EU6-14373a87.js +1 -0
- package/dist/railroadDiagram-RFXS5EU6-ec9e696e.js +1 -0
- package/dist/railroadDiagram-RFXS5EU6-effa5611.js +1 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/requirementDiagram-TGXJPOKE-3d199581.js +1 -0
- package/dist/requirementDiagram-TGXJPOKE-5a337f1a.js +1 -0
- package/dist/requirementDiagram-TGXJPOKE-a7960859.js +1 -0
- package/dist/sankeyDiagram-HTMAVEWB-209eac30.js +1 -0
- package/dist/sankeyDiagram-HTMAVEWB-3c852fda.js +1 -0
- package/dist/sankeyDiagram-HTMAVEWB-46aa1eb1.js +1 -0
- package/dist/sequenceDiagram-DBY2YBRQ-4121f7c2.js +1 -0
- package/dist/sequenceDiagram-DBY2YBRQ-7bad18e4.js +1 -0
- package/dist/sequenceDiagram-DBY2YBRQ-af96f48e.js +1 -0
- package/dist/sizeCapture-X5ZJPWSS-13826306.js +1 -0
- package/dist/sizeCapture-X5ZJPWSS-32e2eec7.js +1 -0
- package/dist/sizeCapture-X5ZJPWSS-a078176f.js +1 -0
- package/dist/stateDiagram-2N3HPSRC-527374a2.js +1 -0
- package/dist/stateDiagram-2N3HPSRC-8047e124.js +1 -0
- package/dist/stateDiagram-2N3HPSRC-ba344b5d.js +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-7580bf69.js +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-d4c58fd3.js +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-e5921044.js +1 -0
- package/dist/store/constant.d.ts.map +1 -0
- package/dist/swimlanes-5IMT3BWC-5834b232.js +1 -0
- package/dist/swimlanes-5IMT3BWC-791a3547.js +1 -0
- package/dist/swimlanes-5IMT3BWC-db2c593a.js +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-36c30eec.js +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-89220ddd.js +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-b621330d.js +1 -0
- package/dist/timeline-definition-FHXFAJF6-0482a67a.js +1 -0
- package/dist/timeline-definition-FHXFAJF6-1d165a67.js +1 -0
- package/dist/timeline-definition-FHXFAJF6-f9600b97.js +1 -0
- package/dist/treeView-QDETBFTQ-0ecf20cd.js +1 -0
- package/dist/treeView-QDETBFTQ-96ed8e2f.js +1 -0
- package/dist/treemap-6X3UGDF4-0a7f19ca.js +1 -0
- package/dist/treemap-6X3UGDF4-9f498e0c.js +1 -0
- package/dist/types/chart.d.ts.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/audioRecording.d.ts.map +1 -0
- package/dist/utils/chartInstanceManager.d.ts.map +1 -0
- package/dist/utils/chartTagParser.d.ts.map +1 -0
- package/dist/utils/chatInputHistory.d.ts.map +1 -0
- package/dist/utils/chatStreamHelper.d.ts.map +1 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/isMobileSignal.d.ts.map +1 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -0
- package/dist/utils/ultimateJsonParser.d.ts.map +1 -0
- package/dist/vennDiagram-L72KCM5P-05176193.js +1 -0
- package/dist/vennDiagram-L72KCM5P-25a48393.js +1 -0
- package/dist/vennDiagram-L72KCM5P-28cffef7.js +1 -0
- package/dist/wardley-OPB4EBWU-08c5f013.js +1 -0
- package/dist/wardley-OPB4EBWU-9803a1d9.js +1 -0
- package/dist/wardleyDiagram-EHGQE667-052e6de9.js +1 -0
- package/dist/wardleyDiagram-EHGQE667-6a614fd9.js +1 -0
- package/dist/wardleyDiagram-EHGQE667-d11fe904.js +1 -0
- package/dist/web-25bb78b9.js +1 -0
- package/dist/web-753300e1.js +1 -0
- package/dist/web-c3ed22c4.js +1 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js +1 -1
- package/dist/window.d.ts.map +1 -0
- package/dist/xychartDiagram-FW5EYKEG-43118b83.js +1 -0
- package/dist/xychartDiagram-FW5EYKEG-d77187fe.js +1 -0
- package/dist/xychartDiagram-FW5EYKEG-f2fac492.js +1 -0
- package/package.json +86 -86
- package/public/index.html +4 -1
- package/public/popup.html +20 -0
- package/server.js +477 -477
- package/.idea/flowise-chatbox.iml +0 -10
- package/.idea/modules.xml +0 -8
- package/.idea/workspace.xml +0 -4
- package/docs/embedding-style-guide.md +0 -417
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t,e;(t=self.document)&&!t.getElementById("livereloadscript")&&((e=t.createElement("script")).async=1,e.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",e.id="livereloadscript",t.getElementsByTagName("head")[0].appendChild(e));import{p as a}from"./chunk-JWPE2WC7-84faee3d.js";import{_ as r,l as n,d as o,v as i,s as l,g as s,n as d,o as c,b as p,c as h,L as x,G as y,F as g,K as f,k as u}from"./mermaid.core-2d237a1e.js";import{v as m}from"./mermaid-parser.core-6df0beec.js";import"./web-753300e1.js";var w=r((t,e)=>{var a=t<=1?100*t:t;if(a<0||100<a)throw new Error(e+" must be between 0-1 (decimal) or 0-100 (percentage). Received: "+t);return a},"toPercent"),k=r((t,e,a)=>({x:w(e,a+" evolution"),y:w(t,a+" visibility")}),"toCoordinates"),b=r(t=>{if(t)return"+<>"===t?"bidirectional":"+<"===t?"backward":"+>"===t?"forward":void 0},"getFlowFromPort"),v=r(t=>{var e;return t?.startsWith("+")?(e=/^\+'([^']*)'/.exec(t)?.[1],t.includes("<>")?{flow:"bidirectional",label:e}:t.includes("<")?{flow:"backward",label:e}:t.includes(">")?{flow:"forward",label:e}:{label:e}):{}},"extractFlowFromArrow"),$=r((t,e)=>{var r,n;a(t,e),t.size&&e.setSize(t.size.width,t.size.height),t.evolution&&(r=t.evolution.stages.map(t=>t.secondName?t.name.trim()+" / "+t.secondName.trim():t.name.trim()),n=t.evolution.stages.filter(t=>void 0!==t.boundary).map(t=>t.boundary),e.updateAxes({stages:r,stageBoundaries:n})),t.anchors.forEach(t=>{var a=k(t.visibility,t.evolution,`Anchor "${t.name}"`);e.addNode(t.name,t.name,a.x,a.y,"anchor")}),t.components.forEach(t=>{var a=k(t.visibility,t.evolution,`Component "${t.name}"`),r=t.label?(t.label.negX?-1:1)*t.label.offsetX:void 0,n=t.label?(t.label.negY?-1:1)*t.label.offsetY:void 0,o=t.decorator?.strategy;e.addNode(t.name,t.name,a.x,a.y,"component",r,n,t.inertia,o)}),t.notes.forEach(t=>{var a=k(t.visibility,t.evolution,`Note "${t.text}"`);e.addNote(t.text,a.x,a.y)}),t.pipelines.forEach(t=>{var a=e.getNode(t.parent);if(!a||"number"!=typeof a.y)throw new Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);let r=a.y;e.startPipeline(t.parent),t.components.forEach(a=>{var n=t.parent+"_"+a.name,o=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,i=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,l=w(a.evolution,`Pipeline component "${a.name}" evolution`);e.addNode(n,a.name,l,r,"pipeline-component",o,i),e.addPipelineComponent(t.parent,n)})}),t.links.forEach(t=>{var a=!!t.arrow&&(t.arrow.includes("-.->")||t.arrow.includes(".-."));let r=b(t.fromPort)??b(t.toPort);var{flow:n,label:o}=v(t.arrow),n=(!r&&n&&(r=n),t.linkLabel),o=o??n;e.addLink(e.resolveNodeId(t.from),e.resolveNodeId(t.to),a,o,r)}),t.evolves.forEach(t=>{var a,r=e.getNode(t.component);void 0!==r?.y&&(a=w(t.target,`Evolve target for "${t.component}"`),e.addTrend(t.component,a,r.y))}),0<t.annotations.length&&(r=t.annotations[0],n=k(r.x,r.y,"Annotations box"),e.setAnnotationsBox(n.x,n.y)),t.annotation.forEach(t=>{var a=k(t.x,t.y,"Annotation "+t.number);e.addAnnotation(t.number,[{x:a.x,y:a.y}],t.text)}),t.accelerators.forEach(t=>{var a=k(t.x,t.y,`Accelerator "${t.name}"`);e.addAccelerator(t.name,a.x,a.y)}),t.deaccelerators.forEach(t=>{var a=k(t.x,t.y,`Deaccelerator "${t.name}"`);e.addDeaccelerator(t.name,a.x,a.y)})},"populateDb"),S={parser:{yy:void 0},parse:r(async t=>{t=await m("wardley",t);var e=(n.debug(t),S.parser?.yy);if(!e||"function"!=typeof e.addNode)throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");$(t,e)},"parse")},C=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{r(this,"WardleyBuilder")}addNode(t){var e=this.nodes.get(t.id)??{id:t.id,label:t.label};e={...e,...t,className:t.className??e.className,labelOffsetX:t.labelOffsetX??e.labelOffsetX,labelOffsetY:t.labelOffsetY??e.labelOffsetY};this.nodes.set(t.id,e)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]}),(t=this.nodes.get(t))&&(t.isPipelineParent=!0)}addPipelineComponent(t,e){(t=this.pipelines.get(t))&&t.componentIds.push(e),(t=this.nodes.get(e))&&(t.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,e){this.annotationsBox={x:t,y:e}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,e){this.size={width:t,height:e}}getNode(t){return this.nodes.get(t)}resolveNodeId(t){if(!this.nodes.has(t))for(var[e,a]of this.nodes)if(a.label===t)return e;return t}build(){var t,e=[];for(t of this.nodes.values()){if("number"!=typeof t.x||"number"!=typeof t.y)throw new Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},M=new C;function P(){return o()["wardley-beta"]}function N(t,e,a,r,n,o,i,l,s){M.addNode({id:t,label:e,x:a,y:r,className:n,labelOffsetX:o,labelOffsetY:i,inertia:l,sourceStrategy:s})}function z(t,e,a=!1,r,n){M.addLink({source:t,target:e,dashed:a,label:r,flow:n})}function T(t,e,a){M.addTrend({nodeId:t,targetX:e,targetY:a})}function L(t,e,a){M.addAnnotation({number:t,coordinates:e,text:a})}function E(t,e,a){M.addNote({text:t,x:e,y:a})}function A(t,e,a){M.addAccelerator({name:t,x:e,y:a})}function I(t,e,a){M.addDeaccelerator({name:t,x:e,y:a})}function B(t,e){M.setAnnotationsBox(t,e)}function F(t,e){M.setSize(t,e)}function R(t){M.startPipeline(t)}function X(t,e){M.addPipelineComponent(t,e)}function Y(t){M.setAxes(t)}function O(t){return M.getNode(t)}function D(t){return M.resolveNodeId(t)}function W(){return M.build()}function j(){M.clear(),i()}r(P,"getConfig"),r(N,"addNode"),r(z,"addLink"),r(T,"addTrend"),r(L,"addAnnotation"),r(E,"addNote"),r(A,"addAccelerator"),r(I,"addDeaccelerator"),r(B,"setAnnotationsBox"),r(F,"setSize"),r(R,"startPipeline"),r(X,"addPipelineComponent"),r(Y,"updateAxes"),r(O,"getNode"),r(D,"resolveNodeId"),r(W,"getWardleyData"),r(j,"clear");var q={getConfig:P,addNode:N,addLink:z,addTrend:T,addAnnotation:L,addNote:E,addAccelerator:A,addDeaccelerator:I,setAnnotationsBox:B,setSize:F,startPipeline:R,addPipelineComponent:X,updateAxes:Y,getNode:O,resolveNodeId:D,getWardleyData:W,clear:j,setAccTitle:l,getAccTitle:s,setDiagramTitle:d,getDiagramTitle:c,getAccDescription:p,setAccDescription:h},G=["Genesis","Custom Built","Product","Commodity"],V=r(()=>{var t=o().themeVariables;return{backgroundColor:t.wardley?.backgroundColor??t.background??"#fff",axisColor:t.wardley?.axisColor??"#000",axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??"#222",gridColor:t.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:t.wardley?.componentFill??"#fff",componentStroke:t.wardley?.componentStroke??"#000",componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??"#222",linkStroke:t.wardley?.linkStroke??"#000",evolutionStroke:t.wardley?.evolutionStroke??"#dc3545",annotationStroke:t.wardley?.annotationStroke??"#000",annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??"#222",annotationFill:t.wardley?.annotationFill??t.background??"#fff"}},"getTheme"),H=r(()=>{var t=o()["wardley-beta"];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},"getConfigValues"),Z=r((t,e,a,o)=>{n.debug("Rendering Wardley map\n"+t);let i=H(),l=V(),s=1.6*i.nodeRadius,d=(t=o.db).getWardleyData();o=t.getDiagramTitle();var c=d.size?.width??i.width;let p=d.size?.height??i.height;var h=((t=f(e)).selectAll("*").remove(),u(t,p,c,i.useMaxWidth),t.attr("viewBox",`0 0 ${c} `+p),t.append("g").attr("class","wardley-map"));(t=t.append("defs")).append("marker").attr("id","arrow-"+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",l.evolutionStroke).attr("stroke","none"),t.append("marker").attr("id","link-arrow-end-"+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",l.linkStroke).attr("stroke","none"),t.append("marker").attr("id","link-arrow-start-"+e).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",l.linkStroke).attr("stroke","none"),h.append("rect").attr("class","wardley-background").attr("width",c).attr("height",p).attr("fill",l.backgroundColor);let x=c-2*i.padding,y=p-2*i.padding,g=(o&&h.append("text").attr("class","wardley-title").attr("x",c/2).attr("y",i.padding/2).attr("fill",l.axisTextColor).attr("font-size",1.05*i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(o),r(t=>i.padding+t/100*x,"projectX")),m=r(t=>p-i.padding-t/100*y,"projectY");(t=h.append("g").attr("class","wardley-axes")).append("line").attr("x1",i.padding).attr("x2",c-i.padding).attr("y1",p-i.padding).attr("y2",p-i.padding).attr("stroke",l.axisColor).attr("stroke-width",1),t.append("line").attr("x1",i.padding).attr("x2",i.padding).attr("y1",i.padding).attr("y2",p-i.padding).attr("stroke",l.axisColor).attr("stroke-width",1),o=d.axes.xLabel??"Evolution";var w=d.axes.yLabel??"Visibility";if(0<(o=(t.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",i.padding+x/2).attr("y",p-i.padding/4).attr("fill",l.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(o),t.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",i.padding/3).attr("y",i.padding+y/2).attr("fill",l.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${i.padding/3} ${i.padding+y/2})`).text(w),d.axes.stages&&0<d.axes.stages.length?d.axes.stages:G)).length){let e=h.append("g").attr("class","wardley-stages");t=d.axes.stageBoundaries;let a=[];if(t&&t.length===o.length){let e=0;t.forEach(t=>{a.push({start:e,end:t}),e=t})}else{let t=1/o.length;o.forEach((e,r)=>{a.push({start:r*t,end:(r+1)*t})})}o.forEach((t,r)=>{var n=a[r],o=i.padding+n.start*x;n=(o+(i.padding+n.end*x))/2;0<r&&e.append("line").attr("x1",o).attr("x2",o).attr("y1",i.padding).attr("y2",p-i.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),e.append("text").attr("class","wardley-stage-label").attr("x",n).attr("y",p-i.padding/1.5).attr("fill",l.axisTextColor).attr("font-size",i.axisFontSize-2).attr("text-anchor","middle").text(t)})}if(i.showGrid){var k=h.append("g").attr("class","wardley-grid");for(let t=1;t<4;t++){var b=t/4,v=i.padding+x*b;k.append("line").attr("x1",v).attr("x2",v).attr("y1",i.padding).attr("y2",p-i.padding).attr("stroke",l.gridColor).attr("stroke-dasharray","2 6"),k.append("line").attr("x1",i.padding).attr("x2",c-i.padding).attr("y1",p-i.padding-y*b).attr("y2",p-i.padding-y*b).attr("stroke",l.gridColor).attr("stroke-dasharray","2 6")}}let $=new Map;if(d.nodes.forEach(t=>{$.set(t.id,{x:g(t.x),y:m(t.y),node:t})}),0<d.pipelines.length){let t=h.append("g").attr("class","wardley-pipelines"),e=h.append("g").attr("class","wardley-pipeline-links");d.pipelines.forEach(a=>{if(0!==a.componentIds.length){var r,n,o,c=a.componentIds.map(t=>({id:t,pos:$.get(t),node:d.nodes.find(e=>e.id===t)})).filter(t=>t.pos&&t.node).sort((t,e)=>t.node.x-e.node.x);for(let t=0;t<c.length-1;t++){var p=c[t],h=c[t+1];e.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",p.pos.x).attr("y1",p.pos.y).attr("x2",h.pos.x).attr("y2",h.pos.y).attr("stroke",l.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let x=1/0,y=-1/0,g=0;a.componentIds.forEach(t=>{(t=$.get(t))&&(x=Math.min(x,t.x),y=Math.max(y,t.x),g=t.y)}),x!==1/0&&y!==-1/0&&(r=4*i.nodeRadius,n=g-r/2,(a=$.get(a.nodeId))&&(o=(x+y)/2,a.x=o,a.y=n-s/6),t.append("rect").attr("class","wardley-pipeline-box").attr("x",x-15).attr("y",n).attr("width",y-x+30).attr("height",r).attr("fill","none").attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4))}})}w=h.append("g").attr("class","wardley-links");let S=new Map;d.pipelines.forEach(t=>{S.set(t.nodeId,new Set(t.componentIds))}),t=d.links.filter(t=>!(!$.has(t.source)||!$.has(t.target)||S.get(t.target)?.has(t.source))),w.selectAll("line").data(t).enter().append("line").attr("class",t=>"wardley-link"+(t.dashed?" wardley-link--dashed":"")).attr("x1",t=>{var e=$.get(t.source),a=$.get(t.target),r=d.nodes.find(e=>e.id===t.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,n=a.x-e.x;a=a.y-e.y,a=Math.sqrt(n*n+a*a);return e.x+n/a*r}).attr("y1",t=>{var e=$.get(t.source),a=$.get(t.target),r=d.nodes.find(e=>e.id===t.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,n=a.x-e.x;a=a.y-e.y,n=Math.sqrt(n*n+a*a);return e.y+a/n*r}).attr("x2",t=>{var e=$.get(t.source),a=$.get(t.target),r=d.nodes.find(e=>e.id===t.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,n=e.x-a.x;e=e.y-a.y,e=Math.sqrt(n*n+e*e);return a.x+n/e*r}).attr("y2",t=>{var e=$.get(t.source),a=$.get(t.target),r=d.nodes.find(e=>e.id===t.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,n=e.x-a.x;e=e.y-a.y,n=Math.sqrt(n*n+e*e);return a.y+e/n*r}).attr("stroke",l.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>"forward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-end-${e})`:null).attr("marker-start",t=>"backward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-start-${e})`:null),w.selectAll("text").data(t.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{var e=$.get(t.source),a=(t=$.get(t.target),(e.x+t.x)/2),r=t.y-e.y;t=t.x-e.x;return a+r/Math.sqrt(t*t+r*r)*8}).attr("y",t=>{var e=$.get(t.source),a=(t=$.get(t.target),(e.y+t.y)/2),r=t.x-e.x;t=t.y-e.y;return a+-r/Math.sqrt(r*r+t*t)*8}).attr("fill",l.axisTextColor).attr("font-size",i.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{var e=$.get(t.source),a=(t=$.get(t.target),(e.x+t.x)/2),r=(e.y+t.y)/2,n=t.x-e.x;a+=(t=t.y-e.y)/(e=Math.sqrt(n*n+t*t))*8,r+=-n/e*8;let o=180*Math.atan2(t,n)/Math.PI;return(90<o||o<-90)&&(o+=180),`rotate(${o} ${a} ${r})`}).text(t=>t.label),o=h.append("g").attr("class","wardley-trends"),w=d.trends.map(t=>{var e,a,r,n,o=$.get(t.nodeId);return o?(e=g(t.targetX),t=m(t.targetY),a=e-o.x,r=t-o.y,n=Math.sqrt(a*a+r*r),{origin:o,targetX:e,targetY:t,adjustedX2:(o=i.nodeRadius+2)<n?e-a/n*o:e,adjustedY2:o<n?t-r/n*o:t}):null}).filter(t=>null!==t),o.selectAll("line").data(w).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",l.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`),(t=h.append("g").attr("class","wardley-nodes").selectAll("g").data(d.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?"wardley-node--"+t.className:""].filter(Boolean).join(" "))).filter(t=>"outsource"===t.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>$.get(t.id).x).attr("cy",t=>$.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#666").attr("stroke",l.componentStroke).attr("stroke-width",1),t.filter(t=>"buy"===t.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>$.get(t.id).x).attr("cy",t=>$.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#ccc").attr("stroke",l.componentStroke).attr("stroke-width",1),t.filter(t=>"build"===t.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",t=>$.get(t.id).x).attr("cy",t=>$.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1),(o=t.filter(t=>"market"===t.sourceStrategy)).append("circle").attr("class","wardley-market-overlay").attr("cx",t=>$.get(t.id).x).attr("cy",t=>$.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),t.filter(t=>!t.isPipelineParent&&"market"!==t.sourceStrategy&&"anchor"!==t.className).append("circle").attr("cx",t=>$.get(t.id).x).attr("cy",t=>$.get(t.id).y).attr("r",i.nodeRadius).attr("fill",l.componentFill).attr("stroke",l.componentStroke).attr("stroke-width",1),w=.7*i.nodeRadius;let C=1.2*i.nodeRadius;if(o.append("line").attr("class","wardley-market-line").attr("x1",t=>$.get(t.id).x).attr("y1",t=>$.get(t.id).y-C).attr("x2",t=>$.get(t.id).x-C*Math.cos(Math.PI/6)).attr("y2",t=>$.get(t.id).y+C*Math.sin(Math.PI/6)).attr("stroke",l.componentStroke).attr("stroke-width",1),o.append("line").attr("class","wardley-market-line").attr("x1",t=>$.get(t.id).x-C*Math.cos(Math.PI/6)).attr("y1",t=>$.get(t.id).y+C*Math.sin(Math.PI/6)).attr("x2",t=>$.get(t.id).x+C*Math.cos(Math.PI/6)).attr("y2",t=>$.get(t.id).y+C*Math.sin(Math.PI/6)).attr("stroke",l.componentStroke).attr("stroke-width",1),o.append("line").attr("class","wardley-market-line").attr("x1",t=>$.get(t.id).x+C*Math.cos(Math.PI/6)).attr("y1",t=>$.get(t.id).y+C*Math.sin(Math.PI/6)).attr("x2",t=>$.get(t.id).x).attr("y2",t=>$.get(t.id).y-C).attr("stroke",l.componentStroke).attr("stroke-width",1),o.append("circle").attr("class","wardley-market-dot").attr("cx",t=>$.get(t.id).x).attr("cy",t=>$.get(t.id).y-C).attr("r",w).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),o.append("circle").attr("class","wardley-market-dot").attr("cx",t=>$.get(t.id).x-C*Math.cos(Math.PI/6)).attr("cy",t=>$.get(t.id).y+C*Math.sin(Math.PI/6)).attr("r",w).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),o.append("circle").attr("class","wardley-market-dot").attr("cx",t=>$.get(t.id).x+C*Math.cos(Math.PI/6)).attr("cy",t=>$.get(t.id).y+C*Math.sin(Math.PI/6)).attr("r",w).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),t.filter(t=>!0===t.isPipelineParent).append("rect").attr("x",t=>$.get(t.id).x-s/2).attr("y",t=>$.get(t.id).y-s/2).attr("width",s).attr("height",s).attr("fill",l.componentFill).attr("stroke",l.componentStroke).attr("stroke-width",1),t.filter(t=>!0===t.inertia).append("line").attr("class","wardley-inertia").attr("x1",t=>{var e=$.get(t.id);let a=t.isPipelineParent?s/2+15:i.nodeRadius+15;return t.sourceStrategy&&(a+=i.nodeRadius+10),e.x+a}).attr("y1",t=>{var e=$.get(t.id);t=t.isPipelineParent?s:2*i.nodeRadius;return e.y-t/2}).attr("x2",t=>{var e=$.get(t.id);let a=t.isPipelineParent?s/2+15:i.nodeRadius+15;return t.sourceStrategy&&(a+=i.nodeRadius+10),e.x+a}).attr("y2",t=>{var e=$.get(t.id);t=t.isPipelineParent?s:2*i.nodeRadius;return e.y+t/2}).attr("stroke",l.componentStroke).attr("stroke-width",6),t.append("text").attr("x",t=>{var e=$.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetX?e.x+t.labelOffsetX:e.x;let a=i.nodeLabelOffset;return t.sourceStrategy&&void 0===t.labelOffsetX&&(a+=10),t=t.labelOffsetX??a,e.x+t}).attr("y",t=>{var e=$.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetY?e.y+t.labelOffsetY:e.y-3;let a=-i.nodeLabelOffset;return t.sourceStrategy&&void 0===t.labelOffsetY&&(a-=10),t=t.labelOffsetY??a,e.y+t}).attr("class","wardley-node-label").attr("fill",t=>"evolved"===t.className?l.evolutionStroke:"anchor"===t.className?"#000":l.componentLabelColor).attr("font-size",i.labelFontSize).attr("font-weight",t=>"anchor"===t.className?"bold":"normal").attr("text-anchor",t=>"anchor"===t.className?"middle":"start").attr("dominant-baseline",t=>"anchor"===t.className?"middle":"auto").text(t=>t.label),0<d.annotations.length){let e=h.append("g").attr("class","wardley-annotations");if(d.annotations.forEach(t=>{var a=t.coordinates.map(t=>({x:g(t.x),y:m(t.y)}));if(1<a.length)for(let t=0;t<a.length-1;t++)e.append("line").attr("class","wardley-annotation-line").attr("x1",a[t].x).attr("y1",a[t].y).attr("x2",a[t+1].x).attr("y2",a[t+1].y).attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");a.forEach(a=>{var r=e.append("g").attr("class","wardley-annotation");r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("fill","white").attr("stroke",l.axisColor).attr("stroke-width",1.5),r.append("text").attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(t.number)})}),d.annotationsBox){let a=g(d.annotationsBox.x),r=m(d.annotationsBox.y),n=e.append("g").attr("class","wardley-annotations-box");o=[...d.annotations].filter(t=>t.text).sort((t,e)=>t.number-e.number);let s=[];if(o.forEach((t,e)=>{e=n.append("text").attr("x",a+10).attr("y",r+10+16*(e+1)).attr("font-size",11).attr("fill",l.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(t.number+". "+t.text),s.push(e)}),0<s.length){let e=0,d=0;s.forEach(t=>{var a=(t=t.node()).getComputedTextLength();e=Math.max(e,a),a=t.getBBox();d=Math.max(d,a.height)});w=e+20+105,t=16*o.length+20+d/2,o=i.padding;var M=c-i.padding-w,P=i.padding,N=p-i.padding-t;a=Math.max(o,Math.min(a,M)),r=Math.max(P,Math.min(r,N)),s.forEach((t,e)=>{t.attr("x",a+10).attr("y",r+10+16*(e+1))}),n.insert("rect","text").attr("x",a).attr("y",r).attr("width",w).attr("height",t).attr("fill","white").attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(0<d.notes.length){let t=h.append("g").attr("class","wardley-notes");d.notes.forEach(e=>{var a=g(e.x),r=m(e.y);t.append("text").attr("x",a).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",l.axisTextColor).attr("font-weight","bold").text(e.text)})}if(0<d.accelerators.length){let t=h.append("g").attr("class","wardley-accelerators");d.accelerators.forEach(e=>{var a=g(e.x),r=m(e.y),n=`\n M ${a} ${r-15}\n L ${a+60-20} ${r-15}\n L ${a+60-20} ${r-15-8}\n L ${a+60} ${r}\n L ${a+60-20} ${r+15+8}\n L ${a+60-20} ${r+15}\n L ${a} ${r+15}\n Z\n `;t.append("path").attr("d",n).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(e.name)})}if(0<d.deaccelerators.length){let t=h.append("g").attr("class","wardley-deaccelerators");d.deaccelerators.forEach(e=>{var a=g(e.x),r=m(e.y),n=`\n M ${a+60} ${r-15}\n L ${a+20} ${r-15}\n L ${a+20} ${r-15-8}\n L ${a} ${r}\n L ${a+20} ${r+15+8}\n L ${a+20} ${r+15}\n L ${a+60} ${r+15}\n Z\n `;t.append("path").attr("d",n).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw"),_={draw:Z},J=r(({wardley:t}={})=>{var e=x(),a=y();e=g(e,a.themeVariables);return`\n .wardley-background {\n fill: ${(a=g(e.wardley,t)).backgroundColor};\n }\n .wardley-axes line, .wardley-axes path {\n stroke: ${a.axisColor};\n }\n .wardley-axis-label {\n fill: ${a.axisTextColor};\n }\n .wardley-stage-label {\n fill: ${a.axisTextColor};\n }\n .wardley-grid line {\n stroke: ${a.gridColor};\n }\n .wardley-node circle {\n fill: ${a.componentFill};\n stroke: ${a.componentStroke};\n }\n .wardley-node-label {\n fill: ${a.componentLabelColor};\n }\n .wardley-link {\n stroke: ${a.linkStroke};\n }\n .wardley-link--dashed {\n stroke-dasharray: 4 4;\n }\n .wardley-link-label {\n fill: ${a.axisTextColor};\n }\n .wardley-trend line {\n stroke: ${a.evolutionStroke};\n }\n .wardley-annotation-line {\n stroke: ${a.annotationStroke};\n }\n .wardley-annotation circle {\n fill: ${a.annotationFill};\n stroke: ${a.annotationStroke};\n }\n .wardley-annotation text {\n fill: ${a.annotationTextColor};\n }\n .wardley-annotations-box rect {\n fill: ${a.annotationFill};\n stroke: ${a.annotationStroke};\n }\n .wardley-annotations-box text {\n fill: ${a.annotationTextColor};\n }\n .wardley-pipeline-box {\n stroke: ${a.componentStroke};\n }\n .wardley-notes text {\n fill: ${a.axisTextColor};\n }\n `},"styles"),K={parser:S,db:q,renderer:_,styles:J};export{K as diagram};
|