@peaske7/readit 0.1.4 → 0.1.5
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/.agents/skills/remotion-best-practices/SKILL.md +61 -0
- package/.agents/skills/remotion-best-practices/rules/3d.md +86 -0
- package/.agents/skills/remotion-best-practices/rules/animations.md +27 -0
- package/.agents/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +178 -0
- package/.agents/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/.agents/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/.agents/skills/remotion-best-practices/rules/assets.md +78 -0
- package/.agents/skills/remotion-best-practices/rules/audio-visualization.md +198 -0
- package/.agents/skills/remotion-best-practices/rules/audio.md +169 -0
- package/.agents/skills/remotion-best-practices/rules/calculate-metadata.md +134 -0
- package/.agents/skills/remotion-best-practices/rules/can-decode.md +75 -0
- package/.agents/skills/remotion-best-practices/rules/charts.md +120 -0
- package/.agents/skills/remotion-best-practices/rules/compositions.md +154 -0
- package/.agents/skills/remotion-best-practices/rules/display-captions.md +184 -0
- package/.agents/skills/remotion-best-practices/rules/extract-frames.md +229 -0
- package/.agents/skills/remotion-best-practices/rules/ffmpeg.md +38 -0
- package/.agents/skills/remotion-best-practices/rules/fonts.md +152 -0
- package/.agents/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/.agents/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/.agents/skills/remotion-best-practices/rules/get-video-duration.md +60 -0
- package/.agents/skills/remotion-best-practices/rules/gifs.md +141 -0
- package/.agents/skills/remotion-best-practices/rules/images.md +134 -0
- package/.agents/skills/remotion-best-practices/rules/import-srt-captions.md +69 -0
- package/.agents/skills/remotion-best-practices/rules/light-leaks.md +73 -0
- package/.agents/skills/remotion-best-practices/rules/lottie.md +70 -0
- package/.agents/skills/remotion-best-practices/rules/maps.md +412 -0
- package/.agents/skills/remotion-best-practices/rules/measuring-dom-nodes.md +34 -0
- package/.agents/skills/remotion-best-practices/rules/measuring-text.md +140 -0
- package/.agents/skills/remotion-best-practices/rules/parameters.md +109 -0
- package/.agents/skills/remotion-best-practices/rules/sequencing.md +118 -0
- package/.agents/skills/remotion-best-practices/rules/sfx.md +26 -0
- package/.agents/skills/remotion-best-practices/rules/subtitles.md +36 -0
- package/.agents/skills/remotion-best-practices/rules/tailwind.md +11 -0
- package/.agents/skills/remotion-best-practices/rules/text-animations.md +20 -0
- package/.agents/skills/remotion-best-practices/rules/timing.md +179 -0
- package/.agents/skills/remotion-best-practices/rules/transcribe-captions.md +70 -0
- package/.agents/skills/remotion-best-practices/rules/transitions.md +197 -0
- package/.agents/skills/remotion-best-practices/rules/transparent-videos.md +106 -0
- package/.agents/skills/remotion-best-practices/rules/trimming.md +51 -0
- package/.agents/skills/remotion-best-practices/rules/videos.md +171 -0
- package/.agents/skills/remotion-best-practices/rules/voiceover.md +99 -0
- package/.agents/skills/simple/SKILL.md +52 -0
- package/.agents/skills/vercel-react-best-practices/AGENTS.md +3254 -0
- package/.agents/skills/vercel-react-best-practices/README.md +123 -0
- package/.agents/skills/vercel-react-best-practices/SKILL.md +141 -0
- package/.agents/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/.agents/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
- package/.agents/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/.agents/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/.agents/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
- package/.agents/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
- package/.agents/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/.agents/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/.agents/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/.agents/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/.agents/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/.agents/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/.agents/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/.agents/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/.agents/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/.agents/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/.agents/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-flatmap-filter.md +60 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/.agents/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/.agents/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/.agents/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/.agents/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/.agents/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/.agents/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/.agents/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/.agents/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/.agents/skills/vercel-react-best-practices/rules/rendering-resource-hints.md +85 -0
- package/.agents/skills/vercel-react-best-practices/rules/rendering-script-defer-async.md +68 -0
- package/.agents/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/.agents/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-no-inline-components.md +82 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/.agents/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/.agents/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/.agents/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/.agents/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/.agents/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/.agents/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/.agents/skills/vercel-react-best-practices/rules/server-hoist-static-io.md +142 -0
- package/.agents/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/.agents/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/.claude/CLAUDE.md +142 -0
- package/.claude/commands/review.md +120 -0
- package/.claude/commands/sync-docs.md +71 -0
- package/.claude/roadmap.md +98 -0
- package/.claude/rules/style-guide.md +830 -0
- package/.claude/settings.json +18 -0
- package/.claude/user-stories.md +248 -0
- package/AGENTS.md +64 -0
- package/README.md +7 -7
- package/biome.json +69 -0
- package/bun.lock +1124 -0
- package/docs/design.md +563 -0
- package/docs/plans/2026-03-13-keyboard-shortcuts-design.md +129 -0
- package/docs/plans/2026-03-13-keyboard-shortcuts-plan.md +1471 -0
- package/docs/plans/2026-03-13-multi-document-design.md +183 -0
- package/docs/plans/2026-03-13-performance-benchmarks-design.md +121 -0
- package/e2e/comments.spec.ts +125 -0
- package/e2e/document-load.spec.ts +54 -0
- package/e2e/export.spec.ts +58 -0
- package/e2e/fixtures/sample.html +13 -0
- package/e2e/fixtures/sample.md +7 -0
- package/e2e/persistence-file.spec.ts +342 -0
- package/e2e/utils/cli.ts +84 -0
- package/e2e/utils/selection.ts +135 -0
- package/{dist/index.html → index.html} +8 -2
- package/lefthook.yml +8 -0
- package/package.json +17 -39
- package/playwright.config.ts +22 -0
- package/skills-lock.json +20 -0
- package/src/App.tsx +396 -0
- package/src/cli/index.ts +328 -0
- package/src/components/ActionsMenu.tsx +110 -0
- package/src/components/DocumentViewer/CodeBlock.tsx +83 -0
- package/src/components/DocumentViewer/DocumentViewer.tsx +257 -0
- package/src/components/DocumentViewer/IframeContainer.tsx +251 -0
- package/src/components/DocumentViewer/MermaidDiagram.tsx +137 -0
- package/src/components/DocumentViewer/index.ts +1 -0
- package/src/components/FloatingTOC.tsx +59 -0
- package/src/components/Header.tsx +63 -0
- package/src/components/InlineEditor.tsx +72 -0
- package/src/components/MarginNote.tsx +198 -0
- package/src/components/MarginNotes.tsx +50 -0
- package/src/components/RawModal.tsx +141 -0
- package/src/components/ReanchorConfirm.tsx +33 -0
- package/src/components/SettingsModal.tsx +221 -0
- package/src/components/ShortcutCapture.tsx +45 -0
- package/src/components/ShortcutList.tsx +157 -0
- package/src/components/TabBar.tsx +60 -0
- package/src/components/TableOfContents.tsx +108 -0
- package/src/components/comments/CommentBadge.tsx +43 -0
- package/src/components/comments/CommentInput.tsx +119 -0
- package/src/components/comments/CommentListItem.tsx +82 -0
- package/src/components/comments/CommentManager.tsx +106 -0
- package/src/components/comments/CommentMinimap.tsx +62 -0
- package/src/components/comments/CommentNav.tsx +104 -0
- package/src/components/ui/ActionBar.tsx +16 -0
- package/src/components/ui/ActionLink.tsx +32 -0
- package/src/components/ui/Button.tsx +55 -0
- package/src/components/ui/Dialog.tsx +156 -0
- package/src/components/ui/DropdownMenu.tsx +114 -0
- package/src/components/ui/SeparatorDot.tsx +9 -0
- package/src/components/ui/Text.tsx +54 -0
- package/src/contexts/CommentContext.tsx +222 -0
- package/src/contexts/LayoutContext.tsx +76 -0
- package/src/hooks/useClickOutside.ts +35 -0
- package/src/hooks/useClipboard.ts +79 -0
- package/src/hooks/useCommentNavigation.ts +130 -0
- package/src/hooks/useComments.ts +323 -0
- package/src/hooks/useDocument.ts +131 -0
- package/src/hooks/useFontPreference.ts +76 -0
- package/src/hooks/useHeadings.test.ts +159 -0
- package/src/hooks/useHeadings.ts +129 -0
- package/src/hooks/useKeybindings.ts +120 -0
- package/src/hooks/useKeyboardShortcuts.ts +63 -0
- package/src/hooks/useLayoutMode.ts +44 -0
- package/src/hooks/useReanchorMode.ts +33 -0
- package/src/hooks/useScrollMetrics.ts +56 -0
- package/src/hooks/useScrollSpy.ts +81 -0
- package/src/hooks/useTextSelection.ts +123 -0
- package/src/hooks/useThemePreference.ts +66 -0
- package/src/index.css +823 -0
- package/src/lib/__fixtures__/bench-data.ts +167 -0
- package/src/lib/anchor.bench.ts +112 -0
- package/src/lib/anchor.test.ts +531 -0
- package/src/lib/anchor.ts +465 -0
- package/src/lib/comment-storage.bench.ts +63 -0
- package/src/lib/comment-storage.test.ts +624 -0
- package/src/lib/comment-storage.ts +263 -0
- package/src/lib/context.bench.ts +41 -0
- package/src/lib/context.test.ts +224 -0
- package/src/lib/context.ts +193 -0
- package/src/lib/export.bench.ts +35 -0
- package/src/lib/export.ts +43 -0
- package/src/lib/highlight/colors.ts +37 -0
- package/src/lib/highlight/core.test.ts +98 -0
- package/src/lib/highlight/core.ts +54 -0
- package/src/lib/highlight/dom.ts +342 -0
- package/src/lib/highlight/highlighter.ts +427 -0
- package/src/lib/highlight/index.ts +23 -0
- package/src/lib/highlight/script-builder.ts +485 -0
- package/src/lib/highlight/types.ts +57 -0
- package/src/lib/html-processor.test.tsx +170 -0
- package/src/lib/html-processor.tsx +95 -0
- package/src/lib/layout-constants.ts +12 -0
- package/src/lib/margin-layout.bench.ts +28 -0
- package/src/lib/margin-layout.ts +100 -0
- package/src/lib/scroll.test.ts +118 -0
- package/src/lib/scroll.ts +47 -0
- package/src/lib/shortcut-registry.test.ts +173 -0
- package/src/lib/shortcut-registry.ts +209 -0
- package/src/lib/utils.test.ts +110 -0
- package/src/lib/utils.ts +50 -0
- package/src/main.tsx +10 -0
- package/src/server/index.ts +766 -0
- package/src/store/index.test.ts +220 -0
- package/src/store/index.ts +234 -0
- package/src/test-setup.ts +1 -0
- package/src/types/index.ts +115 -0
- package/test.md +74 -0
- package/tsconfig.cli.json +12 -0
- package/tsconfig.json +20 -0
- package/vite.config.ts +19 -0
- package/vitest.config.ts +15 -0
- package/dist/assets/_basePickBy-hOr-yGsE.js +0 -1
- package/dist/assets/_baseUniq-b7bzdUSn.js +0 -1
- package/dist/assets/arc-D65wG9gm.js +0 -1
- package/dist/assets/architecture-PBZL5I3N-DBa6CAv_.js +0 -1
- package/dist/assets/architectureDiagram-2XIMDMQ5-Djwpsh98.js +0 -36
- package/dist/assets/array-DOVTz2Mq.js +0 -1
- package/dist/assets/blockDiagram-WCTKOSBZ-BdW5TTxj.js +0 -132
- package/dist/assets/c4Diagram-IC4MRINW-DTmkHEXu.js +0 -10
- package/dist/assets/channel-B3MUFipN.js +0 -1
- package/dist/assets/chunk-4BX2VUAB-DEqzsvDc.js +0 -1
- package/dist/assets/chunk-55IACEB6-BzVuSUV8.js +0 -1
- package/dist/assets/chunk-7E7YKBS2-CZ8IcA4c.js +0 -1
- package/dist/assets/chunk-7R4GIKGN-CWVVC8HX.js +0 -79
- package/dist/assets/chunk-C72U2L5F-B1Tso5TH.js +0 -1
- package/dist/assets/chunk-EGIJ26TM-Cx_7CFik.js +0 -1
- package/dist/assets/chunk-FMBD7UC4-Cfk_iGhv.js +0 -15
- package/dist/assets/chunk-GEFDOKGD-C_5hRbJt.js +0 -2
- package/dist/assets/chunk-GLR3WWYH-CkY7IyBj.js +0 -2
- package/dist/assets/chunk-HHEYEP7N-B0I4X5cr.js +0 -1
- package/dist/assets/chunk-JSJVCQXG-CAjwlVLg.js +0 -1
- package/dist/assets/chunk-KX2RTZJC-DWqnZZ02.js +0 -1
- package/dist/assets/chunk-KYZI473N-gjRVhJgJ.js +0 -53
- package/dist/assets/chunk-L3YUKLVL-D7C9GuxL.js +0 -1
- package/dist/assets/chunk-MX3YWQON-i-77iuVj.js +0 -1
- package/dist/assets/chunk-NQ4KR5QH-B22Pvemm.js +0 -220
- package/dist/assets/chunk-O4XLMI2P-ZQd5L6ZD.js +0 -7
- package/dist/assets/chunk-OZEHJAEY-BaPKTELw.js +0 -1
- package/dist/assets/chunk-PQ6SQG4A-DqE1eupT.js +0 -1
- package/dist/assets/chunk-PU5JKC2W-BTqWqedh.js +0 -70
- package/dist/assets/chunk-QZHKN3VN-Nm9TvMss.js +0 -1
- package/dist/assets/chunk-R5LLSJPH-DkiNs1dN.js +0 -1
- package/dist/assets/chunk-WL4C6EOR-CioD2fv2.js +0 -189
- package/dist/assets/chunk-XIRO2GV7-B4GGQONY.js +0 -1
- package/dist/assets/chunk-XPW4576I-C0IbbQos.js +0 -32
- package/dist/assets/chunk-XZSTWKYB-DMOqFWmT.js +0 -94
- package/dist/assets/chunk-YBOYWFTD-CoeQgeVY.js +0 -1
- package/dist/assets/classDiagram-VBA2DB6C-DV9ltQ7h.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-C6nD9wmM.js +0 -1
- package/dist/assets/clone-DuY6BQEm.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-B6FexK6p.js +0 -1
- package/dist/assets/cytoscape.esm-DoTFyJaN.js +0 -321
- package/dist/assets/dagre-CCcocoCU.js +0 -1
- package/dist/assets/dagre-KLK3FWXG-DIELowj9.js +0 -4
- package/dist/assets/defaultLocale-Ck2Xxk-C.js +0 -1
- package/dist/assets/diagram-E7M64L7V-D1mm0PoO.js +0 -24
- package/dist/assets/diagram-IFDJBPK2-7DVjly8y.js +0 -43
- package/dist/assets/diagram-P4PSJMXO-jO7pfyMb.js +0 -24
- package/dist/assets/dist-BywRdrPx.js +0 -1
- package/dist/assets/erDiagram-INFDFZHY-DSRxlRFy.js +0 -70
- package/dist/assets/flowDiagram-PKNHOUZH-CgKzzNdR.js +0 -162
- package/dist/assets/ganttDiagram-A5KZAMGK-CtsE7Y4E.js +0 -292
- package/dist/assets/gitGraph-HDMCJU4V-BU9uhwtz.js +0 -1
- package/dist/assets/gitGraphDiagram-K3NZZRJ6-DOU8RGdw.js +0 -65
- package/dist/assets/graphlib-WkJoBgka.js +0 -1
- package/dist/assets/index-CKVArt9D.js +0 -562
- package/dist/assets/index-DzRKJazf.css +0 -2
- package/dist/assets/info-3K5VOQVL-CPpvM-SG.js +0 -1
- package/dist/assets/infoDiagram-LFFYTUFH-VKLs5DsF.js +0 -2
- package/dist/assets/init-Bft5Ffpj.js +0 -1
- package/dist/assets/isArrayLikeObject-icl0H0jo.js +0 -1
- package/dist/assets/isEmpty-Du8sNmkE.js +0 -1
- package/dist/assets/ishikawaDiagram-PHBUUO56-CsWvEjux.js +0 -70
- package/dist/assets/journeyDiagram-4ABVD52K-BzJGTdIT.js +0 -139
- package/dist/assets/kanban-definition-K7BYSVSG-B_9ClJ1A.js +0 -89
- package/dist/assets/katex-BJrMXEjr.js +0 -261
- package/dist/assets/line-CC_tDGId.js +0 -1
- package/dist/assets/linear-Cts_d04Y.js +0 -1
- package/dist/assets/math-CNhlSIO3.js +0 -1
- package/dist/assets/mermaid-parser.core-Vb9KKv1R.js +0 -4
- package/dist/assets/mermaid.core-C_7xsp3d.js +0 -11
- package/dist/assets/mindmap-definition-YRQLILUH-BWmfy5wB.js +0 -68
- package/dist/assets/ordinal-DIg8h6NI.js +0 -1
- package/dist/assets/packet-RMMSAZCW-Q-WG6o3b.js +0 -1
- package/dist/assets/path-DfRbCp9y.js +0 -1
- package/dist/assets/pie-UPGHQEXC-Cwi2tLlt.js +0 -1
- package/dist/assets/pieDiagram-SKSYHLDU-Dyf3X_in.js +0 -30
- package/dist/assets/quadrantDiagram-337W2JSQ-B5_5m61Q.js +0 -7
- package/dist/assets/radar-KQ55EAFF-Dtw2VzxY.js +0 -1
- package/dist/assets/requirementDiagram-Z7DCOOCP-BSERBnlW.js +0 -73
- package/dist/assets/rough.esm-KjoEK0it.js +0 -1
- package/dist/assets/sankeyDiagram-WA2Y5GQK-CMcEY8Cz.js +0 -10
- package/dist/assets/sequenceDiagram-2WXFIKYE-D28qcXwC.js +0 -145
- package/dist/assets/src-C8kkzlHX.js +0 -1
- package/dist/assets/stateDiagram-RAJIS63D-7oVrCmRl.js +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-DtFptQAd.js +0 -1
- package/dist/assets/timeline-definition-YZTLITO2-rbCfBEvG.js +0 -61
- package/dist/assets/treemap-KZPCXAKY-BlRvF0um.js +0 -1
- package/dist/assets/vennDiagram-LZ73GAT5-DBit3zWa.js +0 -34
- package/dist/assets/xychartDiagram-JWTSCODW-BVYXv51y.js +0 -7
- package/dist/index.js +0 -1040
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as e}from"./chunk-GEFDOKGD-C_5hRbJt.js";import{n as t,t as n}from"./path-DfRbCp9y.js";import{t as r}from"./array-DOVTz2Mq.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=t(!0),l=null,u=e,d=null,f=n(p);o=typeof o==`function`?o:o===void 0?i:t(o),s=typeof s==`function`?s:s===void 0?a:t(s);function p(e){var t,n=(e=r(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=n;++t)!(t<n&&c(i=e[t],t,e))===a&&((a=!a)?d.lineStart():d.lineEnd()),a&&d.point(+o(i,t,e),+s(i,t,e));if(p)return d=null,p+``||null}return p.x=function(e){return arguments.length?(o=typeof e==`function`?e:t(+e),p):o},p.y=function(e){return arguments.length?(s=typeof e==`function`?e:t(+e),p):s},p.defined=function(e){return arguments.length?(c=typeof e==`function`?e:t(!!e),p):c},p.curve=function(e){return arguments.length?(u=e,l!=null&&(d=u(l)),p):u},p.context=function(e){return arguments.length?(e==null?l=d=null:d=u(l=e),p):l},p}export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as e,n as t,o as n,r,t as i}from"./src-C8kkzlHX.js";import{i as a,n as o,r as s,t as c}from"./defaultLocale-Ck2Xxk-C.js";import{t as l}from"./init-Bft5Ffpj.js";function u(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function d(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function f(e){let t,n,r;e.length===2?(t=e===u||e===d?e:p,n=e,r=e):(t=u,n=(t,n)=>u(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function p(){return 0}function m(e){return e===null?NaN:+e}var h=f(u),g=h.right;h.left,f(m).center;var _=Math.sqrt(50),v=Math.sqrt(10),y=Math.sqrt(2);function b(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=_?10:a>=v?5:a>=y?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?b(e,t,n*2):[s,c,l]}function x(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?b(t,e,n):b(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function S(e,t,n){return t=+t,e=+e,n=+n,b(e,t,n)[2]}function C(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?S(t,e,n):S(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function w(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function T(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=k(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function D(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function O(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=k(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function k(a,o){var s=typeof o,c;return o==null||s===`boolean`?n(o):(s===`number`?t:s===`string`?(c=e(o))?(o=c,r):i:o instanceof e?r:o instanceof Date?D:T(o)?w:Array.isArray(o)?E:typeof o.valueOf!=`function`&&typeof o.toString!=`function`||isNaN(o)?O:t)(a,o)}function A(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function j(e){return Math.max(0,-a(Math.abs(e)))}function M(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(t)/3)))*3-a(Math.abs(e)))}function N(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,a(t)-a(e))+1}function P(e){return function(){return e}}function F(e){return+e}var I=[0,1];function L(e){return e}function R(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:P(isNaN(t)?NaN:.5)}function z(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function B(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=R(i,r),a=n(o,a)):(r=R(r,i),a=n(a,o)),function(e){return a(r(e))}}function V(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=R(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=g(e,t,1,r)-1;return a[n](i[n](t))}}function H(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function U(){var e=I,n=I,r=k,i,a,o,s=L,c,l,u;function d(){var t=Math.min(e.length,n.length);return s!==L&&(s=z(e[0],e[t-1])),c=t>2?V:B,l=u=null,f}function f(t){return t==null||isNaN(t=+t)?o:(l||=c(e.map(i),n,r))(i(s(t)))}return f.invert=function(r){return s(a((u||=c(n,e.map(i),t))(r)))},f.domain=function(t){return arguments.length?(e=Array.from(t,F),d()):e.slice()},f.range=function(e){return arguments.length?(n=Array.from(e),d()):n.slice()},f.rangeRound=function(e){return n=Array.from(e),r=A,d()},f.clamp=function(e){return arguments.length?(s=e?!0:L,d()):s!==L},f.interpolate=function(e){return arguments.length?(r=e,d()):r},f.unknown=function(e){return arguments.length?(o=e,f):o},function(e,t){return i=e,a=t,d()}}function W(){return U()(L,L)}function G(e,t,n,r){var i=C(e,t,n),a;switch(r=s(r??`,f`),r.type){case`s`:var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=M(i,l))&&(r.precision=a),o(r,l);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=N(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=j(i))&&(r.precision=a-(r.type===`%`)*2);break}return c(r)}function K(e){var t=e.domain;return e.ticks=function(e){var n=t();return x(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return G(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=S(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function q(){var e=W();return e.copy=function(){return H(e,q())},l.apply(e,arguments),K(e)}export{f as a,C as i,W as n,H as r,q as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Math.abs,t=Math.atan2,n=Math.cos,r=Math.max,i=Math.min,a=Math.sin,o=Math.sqrt,s=1e-12,c=Math.PI,l=c/2,u=2*c;function d(e){return e>1?0:e<-1?c:Math.acos(e)}function f(e){return e>=1?l:e<=-1?-l:Math.asin(e)}export{n as a,r as c,a as d,o as f,t as i,i as l,d as n,s as o,u as p,f as r,l as s,e as t,c as u};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/info-3K5VOQVL-CPpvM-SG.js","assets/chunk-XZSTWKYB-DMOqFWmT.js","assets/index-CKVArt9D.js","assets/index-DzRKJazf.css","assets/isEmpty-Du8sNmkE.js","assets/isArrayLikeObject-icl0H0jo.js","assets/_baseUniq-b7bzdUSn.js","assets/_basePickBy-hOr-yGsE.js","assets/clone-DuY6BQEm.js","assets/chunk-EGIJ26TM-Cx_7CFik.js","assets/packet-RMMSAZCW-Q-WG6o3b.js","assets/chunk-C72U2L5F-B1Tso5TH.js","assets/pie-UPGHQEXC-Cwi2tLlt.js","assets/chunk-XIRO2GV7-B4GGQONY.js","assets/architecture-PBZL5I3N-DBa6CAv_.js","assets/chunk-R5LLSJPH-DkiNs1dN.js","assets/gitGraph-HDMCJU4V-BU9uhwtz.js","assets/chunk-7E7YKBS2-CZ8IcA4c.js","assets/radar-KQ55EAFF-Dtw2VzxY.js","assets/chunk-L3YUKLVL-D7C9GuxL.js","assets/treemap-KZPCXAKY-BlRvF0um.js","assets/chunk-OZEHJAEY-BaPKTELw.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e}from"./index-CKVArt9D.js";import{f as t}from"./chunk-XZSTWKYB-DMOqFWmT.js";var n={},r={info:t(async()=>{let{createInfoServices:t}=await e(async()=>{let{createInfoServices:e}=await import(`./info-3K5VOQVL-CPpvM-SG.js`);return{createInfoServices:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));n.info=t().Info.parser.LangiumParser},`info`),packet:t(async()=>{let{createPacketServices:t}=await e(async()=>{let{createPacketServices:e}=await import(`./packet-RMMSAZCW-Q-WG6o3b.js`);return{createPacketServices:e}},__vite__mapDeps([10,1,2,3,4,5,6,7,8,11]));n.packet=t().Packet.parser.LangiumParser},`packet`),pie:t(async()=>{let{createPieServices:t}=await e(async()=>{let{createPieServices:e}=await import(`./pie-UPGHQEXC-Cwi2tLlt.js`);return{createPieServices:e}},__vite__mapDeps([12,1,2,3,4,5,6,7,8,13]));n.pie=t().Pie.parser.LangiumParser},`pie`),architecture:t(async()=>{let{createArchitectureServices:t}=await e(async()=>{let{createArchitectureServices:e}=await import(`./architecture-PBZL5I3N-DBa6CAv_.js`);return{createArchitectureServices:e}},__vite__mapDeps([14,1,2,3,4,5,6,7,8,15]));n.architecture=t().Architecture.parser.LangiumParser},`architecture`),gitGraph:t(async()=>{let{createGitGraphServices:t}=await e(async()=>{let{createGitGraphServices:e}=await import(`./gitGraph-HDMCJU4V-BU9uhwtz.js`);return{createGitGraphServices:e}},__vite__mapDeps([16,1,2,3,4,5,6,7,8,17]));n.gitGraph=t().GitGraph.parser.LangiumParser},`gitGraph`),radar:t(async()=>{let{createRadarServices:t}=await e(async()=>{let{createRadarServices:e}=await import(`./radar-KQ55EAFF-Dtw2VzxY.js`);return{createRadarServices:e}},__vite__mapDeps([18,1,2,3,4,5,6,7,8,19]));n.radar=t().Radar.parser.LangiumParser},`radar`),treemap:t(async()=>{let{createTreemapServices:t}=await e(async()=>{let{createTreemapServices:e}=await import(`./treemap-KZPCXAKY-BlRvF0um.js`);return{createTreemapServices:e}},__vite__mapDeps([20,1,2,3,4,5,6,7,8,21]));n.treemap=t().Treemap.parser.LangiumParser},`treemap`)};async function i(e,t){let i=r[e];if(!i)throw Error(`Unknown diagram type: ${e}`);n[e]||await i();let o=n[e].parse(t);if(o.lexerErrors.length>0||o.parserErrors.length>0)throw new a(o);return o.value}t(i,`parse`);var a=class extends Error{constructor(e){let t=e.lexerErrors.map(e=>`Lexer error on line ${e.line!==void 0&&!isNaN(e.line)?e.line:`?`}, column ${e.column!==void 0&&!isNaN(e.column)?e.column:`?`}: ${e.message}`).join(`
|
|
3
|
-
`),n=e.parserErrors.map(e=>`Parse error on line ${e.token.startLine!==void 0&&!isNaN(e.token.startLine)?e.token.startLine:`?`}, column ${e.token.startColumn!==void 0&&!isNaN(e.token.startColumn)?e.token.startColumn:`?`}: ${e.message}`).join(`
|
|
4
|
-
`);super(`Parsing failed: ${t} ${n}`),this.result=e}static{t(this,`MermaidParseError`)}};export{i as t};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/c4Diagram-IC4MRINW-DTmkHEXu.js","assets/dist-BywRdrPx.js","assets/index-CKVArt9D.js","assets/index-DzRKJazf.css","assets/src-C8kkzlHX.js","assets/chunk-GEFDOKGD-C_5hRbJt.js","assets/math-CNhlSIO3.js","assets/chunk-7R4GIKGN-CWVVC8HX.js","assets/isArrayLikeObject-icl0H0jo.js","assets/chunk-JSJVCQXG-CAjwlVLg.js","assets/flowDiagram-PKNHOUZH-CgKzzNdR.js","assets/chunk-PU5JKC2W-BTqWqedh.js","assets/channel-B3MUFipN.js","assets/chunk-55IACEB6-BzVuSUV8.js","assets/chunk-FMBD7UC4-Cfk_iGhv.js","assets/chunk-GLR3WWYH-CkY7IyBj.js","assets/chunk-KYZI473N-gjRVhJgJ.js","assets/chunk-PQ6SQG4A-DqE1eupT.js","assets/chunk-YBOYWFTD-CoeQgeVY.js","assets/rough.esm-KjoEK0it.js","assets/chunk-O4XLMI2P-ZQd5L6ZD.js","assets/line-CC_tDGId.js","assets/path-DfRbCp9y.js","assets/array-DOVTz2Mq.js","assets/chunk-MX3YWQON-i-77iuVj.js","assets/chunk-KX2RTZJC-DWqnZZ02.js","assets/chunk-XPW4576I-C0IbbQos.js","assets/erDiagram-INFDFZHY-DSRxlRFy.js","assets/gitGraphDiagram-K3NZZRJ6-DOU8RGdw.js","assets/chunk-XZSTWKYB-DMOqFWmT.js","assets/isEmpty-Du8sNmkE.js","assets/_baseUniq-b7bzdUSn.js","assets/_basePickBy-hOr-yGsE.js","assets/clone-DuY6BQEm.js","assets/chunk-7E7YKBS2-CZ8IcA4c.js","assets/chunk-C72U2L5F-B1Tso5TH.js","assets/chunk-EGIJ26TM-Cx_7CFik.js","assets/chunk-L3YUKLVL-D7C9GuxL.js","assets/chunk-OZEHJAEY-BaPKTELw.js","assets/chunk-R5LLSJPH-DkiNs1dN.js","assets/chunk-XIRO2GV7-B4GGQONY.js","assets/mermaid-parser.core-Vb9KKv1R.js","assets/chunk-4BX2VUAB-DEqzsvDc.js","assets/chunk-QZHKN3VN-Nm9TvMss.js","assets/ganttDiagram-A5KZAMGK-CtsE7Y4E.js","assets/linear-Cts_d04Y.js","assets/defaultLocale-Ck2Xxk-C.js","assets/init-Bft5Ffpj.js","assets/infoDiagram-LFFYTUFH-VKLs5DsF.js","assets/chunk-HHEYEP7N-B0I4X5cr.js","assets/pieDiagram-SKSYHLDU-Dyf3X_in.js","assets/ordinal-DIg8h6NI.js","assets/arc-D65wG9gm.js","assets/quadrantDiagram-337W2JSQ-B5_5m61Q.js","assets/xychartDiagram-JWTSCODW-BVYXv51y.js","assets/requirementDiagram-Z7DCOOCP-BSERBnlW.js","assets/sequenceDiagram-2WXFIKYE-D28qcXwC.js","assets/classDiagram-VBA2DB6C-DV9ltQ7h.js","assets/chunk-WL4C6EOR-CioD2fv2.js","assets/classDiagram-v2-RAHNMMFH-C6nD9wmM.js","assets/stateDiagram-RAJIS63D-7oVrCmRl.js","assets/dagre-CCcocoCU.js","assets/graphlib-WkJoBgka.js","assets/chunk-NQ4KR5QH-B22Pvemm.js","assets/stateDiagram-v2-FVOUBMTO-DtFptQAd.js","assets/journeyDiagram-4ABVD52K-BzJGTdIT.js","assets/timeline-definition-YZTLITO2-rbCfBEvG.js","assets/mindmap-definition-YRQLILUH-BWmfy5wB.js","assets/kanban-definition-K7BYSVSG-B_9ClJ1A.js","assets/sankeyDiagram-WA2Y5GQK-CMcEY8Cz.js","assets/diagram-P4PSJMXO-jO7pfyMb.js","assets/diagram-IFDJBPK2-7DVjly8y.js","assets/blockDiagram-WCTKOSBZ-BdW5TTxj.js","assets/architectureDiagram-2XIMDMQ5-Djwpsh98.js","assets/cytoscape.esm-DoTFyJaN.js","assets/ishikawaDiagram-PHBUUO56-CsWvEjux.js","assets/vennDiagram-LZ73GAT5-DBit3zWa.js","assets/diagram-E7M64L7V-D1mm0PoO.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,t}from"./index-CKVArt9D.js";import{t as n}from"./isEmpty-Du8sNmkE.js";import{a as r,d as i,h as a,i as o,m as s,r as c}from"./chunk-GEFDOKGD-C_5hRbJt.js";import{_ as l,g as u,h as d,p as f}from"./src-C8kkzlHX.js";import{F as p,G as m,H as h,J as g,M as _,N as v,S as y,T as b,X as x,Y as S,c as C,f as w,g as ee,h as te,l as T,n as E,p as D,r as ne,t as re,w as O,x as k,y as A,z as ie}from"./chunk-7R4GIKGN-CWVVC8HX.js";import{t as ae}from"./chunk-HHEYEP7N-B0I4X5cr.js";import"./dist-BywRdrPx.js";import{i as oe,o as se}from"./chunk-PU5JKC2W-BTqWqedh.js";import"./chunk-MX3YWQON-i-77iuVj.js";import"./chunk-YBOYWFTD-CoeQgeVY.js";import"./chunk-PQ6SQG4A-DqE1eupT.js";import"./chunk-KYZI473N-gjRVhJgJ.js";import"./chunk-O4XLMI2P-ZQd5L6ZD.js";import{n as ce}from"./chunk-GLR3WWYH-CkY7IyBj.js";import{n as le,t as ue}from"./chunk-XPW4576I-C0IbbQos.js";var de=`comm`,fe=`rule`,pe=`decl`,me=`@import`,he=`@namespace`,ge=`@keyframes`,_e=`@layer`,ve=Math.abs,j=String.fromCharCode;function ye(e){return e.trim()}function M(e,t,n){return e.replace(t,n)}function be(e,t,n){return e.indexOf(t,n)}function N(e,t){return e.charCodeAt(t)|0}function P(e,t,n){return e.slice(t,n)}function F(e){return e.length}function xe(e){return e.length}function I(e,t){return t.push(e),e}var L=1,R=1,Se=0,z=0,B=0,V=``;function H(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:L,column:R,length:o,return:``,siblings:s}}function Ce(){return B}function we(){return B=z>0?N(V,--z):0,R--,B===10&&(R=1,L--),B}function U(){return B=z<Se?N(V,z++):0,R++,B===10&&(R=1,L++),B}function W(){return N(V,z)}function G(){return z}function K(e,t){return P(V,e,t)}function q(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Te(e){return L=R=1,Se=F(V=e),z=0,[]}function Ee(e){return V=``,e}function De(e){return ye(K(z-1,Ae(e===91?e+2:e===40?e+1:e)))}function Oe(e){for(;(B=W())&&B<33;)U();return q(e)>2||q(B)>3?``:` `}function ke(e,t){for(;--t&&U()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return K(e,G()+(t<6&&W()==32&&U()==32))}function Ae(e){for(;U();)switch(B){case e:return z;case 34:case 39:e!==34&&e!==39&&Ae(B);break;case 40:e===41&&Ae(e);break;case 92:U();break}return z}function je(e,t){for(;U()&&e+B!==57&&!(e+B===84&&W()===47););return`/*`+K(t,z-1)+`*`+j(e===47?e:U())}function Me(e){for(;!q(W());)U();return K(e,z)}function Ne(e){return Ee(J(``,null,null,null,[``],e=Te(e),0,[0],e))}function J(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=U()){case 40:if(m!=108&&N(C,d-1)==58){be(C+=M(De(v),`&`,`&\f`),`&\f`,ve(l?s[l-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:C+=De(v);break;case 9:case 10:case 13:case 32:C+=Oe(m);break;case 92:C+=ke(G()-1,7);continue;case 47:switch(W()){case 42:case 47:I(Fe(je(U(),G()),t,n,c),c),(q(m||1)==5||q(W()||1)==5)&&F(C)&&P(C,-1,void 0)!==` `&&(C+=` `);break;default:C+=`/`}break;case 123*h:s[l++]=F(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=M(C,/\f/g,``)),p>0&&(F(C)-d||h===0&&m===47)&&I(p>32?Ie(C+`;`,r,n,d-1,c):Ie(M(C,` `,``)+`;`,r,n,d-2,c),c);break;case 59:C+=`;`;default:if(I(S=Pe(C,t,n,l,u,i,s,y,b=[],x=[],d,a),a),v===123)if(u===0)J(C,t,S,S,b,a,d,s,x);else{switch(f){case 99:if(N(C,3)===110)break;case 108:if(N(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?J(e,S,S,r&&I(Pe(e,S,S,0,0,i,s,y,i,b=[],d,x),x),i,x,d,s,r?b:x):J(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+F(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&we()==125)continue}switch(C+=j(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(F(C)-1)*_,_=1;break;case 64:W()===45&&(C+=De(U())),f=W(),u=d=F(y=C+=Me(G())),v++;break;case 45:m===45&&F(C)==2&&(h=0)}}return a}function Pe(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=xe(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=P(e,f+1,f=ve(g=o[h])),b=e;v<m;++v)(b=ye(g>0?p[v]+` `+y:M(y,/&\f/g,p[v])))&&(c[_++]=b);return H(e,t,n,i===0?fe:s,c,l,u,d)}function Fe(e,t,n,r){return H(e,t,n,de,j(Ce()),P(e,2,-2),0,r)}function Ie(e,t,n,r,i){return H(e,t,n,pe,P(e,0,r),P(e,r+1,-1),r,i)}function Le(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function Re(e,t,n,r){switch(e.type){case _e:if(e.children.length)break;case me:case he:case pe:return e.return=e.return||e.value;case de:return``;case ge:return e.return=e.value+`{`+Le(e.children,r)+`}`;case fe:if(!F(e.value=e.props.join(`,`)))return``}return F(n=Le(e.children,r))?e.return=e.value+`{`+n+`}`:``}var ze=`c4`,Be={id:ze,detector:d(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./c4Diagram-IC4MRINW-DTmkHEXu.js`);return{diagram:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));return{id:ze,diagram:t}},`loader`)},Ve=`flowchart`,He={id:Ve,detector:d((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-PKNHOUZH-CgKzzNdR.js`);return{diagram:e}},__vite__mapDeps([10,2,3,1,11,4,5,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,9,25,26]));return{id:Ve,diagram:t}},`loader`)},Ue=`flowchart-v2`,We={id:Ue,detector:d((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-PKNHOUZH-CgKzzNdR.js`);return{diagram:e}},__vite__mapDeps([10,2,3,1,11,4,5,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,9,25,26]));return{id:Ue,diagram:t}},`loader`)},Ge=`er`,Ke={id:Ge,detector:d(e=>/^\s*erDiagram/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./erDiagram-INFDFZHY-DSRxlRFy.js`);return{diagram:e}},__vite__mapDeps([27,1,2,3,11,4,5,6,7,8,12,13,15,16,17,18,19,20,21,22,23,24,25]));return{id:Ge,diagram:t}},`loader`)},qe=`gitGraph`,Je={id:qe,detector:d(e=>/^\s*gitGraph/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-K3NZZRJ6-DOU8RGdw.js`);return{diagram:e}},__vite__mapDeps([28,1,2,3,29,30,8,31,32,33,34,35,36,37,38,39,40,41,4,5,6,7,42,43]));return{id:qe,diagram:t}},`loader`)},Ye=`gantt`,Xe={id:Ye,detector:d(e=>/^\s*gantt/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./ganttDiagram-A5KZAMGK-CtsE7Y4E.js`);return{diagram:e}},__vite__mapDeps([44,2,3,1,45,4,46,47,5,6,7,8]));return{id:Ye,diagram:t}},`loader`)},Ze=`info`,Qe={id:Ze,detector:d(e=>/^\s*info/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./infoDiagram-LFFYTUFH-VKLs5DsF.js`);return{diagram:e}},__vite__mapDeps([48,29,2,3,30,8,31,32,33,34,35,36,37,38,39,40,41,4,7,49]));return{id:Ze,diagram:t}},`loader`)},$e=`pie`,et={id:$e,detector:d(e=>/^\s*pie/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./pieDiagram-SKSYHLDU-Dyf3X_in.js`);return{diagram:e}},__vite__mapDeps([50,1,2,3,29,30,8,31,32,33,34,35,36,37,38,39,40,41,51,47,4,22,52,6,23,5,7,42,49]));return{id:$e,diagram:t}},`loader`)},tt=`quadrantChart`,nt={id:tt,detector:d(e=>/^\s*quadrantChart/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./quadrantDiagram-337W2JSQ-B5_5m61Q.js`);return{diagram:e}},__vite__mapDeps([53,45,4,2,3,46,47,7]));return{id:tt,diagram:t}},`loader`)},rt=`xychart`,it={id:rt,detector:d(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./xychartDiagram-JWTSCODW-BVYXv51y.js`);return{diagram:e}},__vite__mapDeps([54,1,2,3,11,4,5,6,7,8,51,47,45,46,21,22,23,49]));return{id:rt,diagram:t}},`loader`)},at=`requirement`,ot={id:at,detector:d(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./requirementDiagram-Z7DCOOCP-BSERBnlW.js`);return{diagram:e}},__vite__mapDeps([55,1,2,3,11,4,5,6,7,8,13,15,16,17,18,19,20,21,22,23,24,25]));return{id:at,diagram:t}},`loader`)},st=`sequence`,ct={id:st,detector:d(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./sequenceDiagram-2WXFIKYE-D28qcXwC.js`);return{diagram:e}},__vite__mapDeps([56,1,2,3,4,5,6,7,8,9,43,26]));return{id:st,diagram:t}},`loader`)},lt=`class`,ut={id:lt,detector:d((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./classDiagram-VBA2DB6C-DV9ltQ7h.js`);return{diagram:e}},__vite__mapDeps([57,1,2,3,11,4,5,6,7,8,13,14,15,16,17,18,19,20,21,22,23,24,9,25,58]));return{id:lt,diagram:t}},`loader`)},dt=`classDiagram`,ft={id:dt,detector:d((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./classDiagram-v2-RAHNMMFH-C6nD9wmM.js`);return{diagram:e}},__vite__mapDeps([59,1,2,3,11,4,5,6,7,8,13,14,15,16,17,18,19,20,21,22,23,24,9,25,58]));return{id:dt,diagram:t}},`loader`)},pt=`state`,mt={id:pt,detector:d((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./stateDiagram-RAJIS63D-7oVrCmRl.js`);return{diagram:e}},__vite__mapDeps([60,1,2,3,11,4,5,6,7,8,21,22,23,61,62,30,31,32,13,15,16,17,18,19,20,24,25,63]));return{id:pt,diagram:t}},`loader`)},ht=`stateDiagram`,gt={id:ht,detector:d((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-FVOUBMTO-DtFptQAd.js`);return{diagram:e}},__vite__mapDeps([64,1,2,3,11,4,5,6,7,8,13,15,16,17,18,19,20,21,22,23,24,25,63]));return{id:ht,diagram:t}},`loader`)},_t=`journey`,vt={id:_t,detector:d(e=>/^\s*journey/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./journeyDiagram-4ABVD52K-BzJGTdIT.js`);return{diagram:e}},__vite__mapDeps([65,1,2,3,4,52,22,6,7,14,9]));return{id:_t,diagram:t}},`loader`)},yt={draw:d((e,t,n)=>{u.debug(`rendering svg for syntax error
|
|
3
|
-
`);let r=ae(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),C(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},bt=yt,xt={db:{},renderer:yt,parser:{parse:d(()=>{},`parse`)}},St=`flowchart-elk`,Ct={id:St,detector:d((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-PKNHOUZH-CgKzzNdR.js`);return{diagram:e}},__vite__mapDeps([10,2,3,1,11,4,5,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,9,25,26]));return{id:St,diagram:t}},`loader`)},wt=`timeline`,Tt={id:wt,detector:d(e=>/^\s*timeline/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./timeline-definition-YZTLITO2-rbCfBEvG.js`);return{diagram:e}},__vite__mapDeps([66,4,2,3,52,22,6,7]));return{id:wt,diagram:t}},`loader`)},Et=`mindmap`,Dt={id:Et,detector:d(e=>/^\s*mindmap/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./mindmap-definition-YRQLILUH-BWmfy5wB.js`);return{diagram:e}},__vite__mapDeps([67,1,2,3,11,4,5,6,7,8,13,15,16,17,18,19,20,21,22,23,24,25]));return{id:Et,diagram:t}},`loader`)},Ot=`kanban`,kt={id:Ot,detector:d(e=>/^\s*kanban/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./kanban-definition-K7BYSVSG-B_9ClJ1A.js`);return{diagram:e}},__vite__mapDeps([68,1,2,3,11,4,5,6,7,8,14,49,16,17,18,19,26]));return{id:Ot,diagram:t}},`loader`)},At=`sankey`,jt={id:At,detector:d(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./sankeyDiagram-WA2Y5GQK-CMcEY8Cz.js`);return{diagram:e}},__vite__mapDeps([69,51,47,4,2,3,7]));return{id:At,diagram:t}},`loader`)},Mt=`packet`,Nt={id:Mt,detector:d(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-P4PSJMXO-jO7pfyMb.js`);return{diagram:e}},__vite__mapDeps([70,1,2,3,29,30,8,31,32,33,34,35,36,37,38,39,40,41,4,5,6,7,42,49]));return{id:Mt,diagram:t}},`loader`)},Pt=`radar`,Ft={id:Pt,detector:d(e=>/^\s*radar-beta/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-IFDJBPK2-7DVjly8y.js`);return{diagram:e}},__vite__mapDeps([71,1,2,3,29,30,8,31,32,33,34,35,36,37,38,39,40,41,4,5,6,7,42,49]));return{id:Pt,diagram:t}},`loader`)},It=`block`,Lt={id:It,detector:d(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./blockDiagram-WCTKOSBZ-BdW5TTxj.js`);return{diagram:e}},__vite__mapDeps([72,1,2,3,11,4,5,6,7,8,21,22,23,62,30,31,12,33,14,24,18]));return{id:It,diagram:t}},`loader`)},Rt=`architecture`,zt={id:Rt,detector:d(e=>/^\s*architecture/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./architectureDiagram-2XIMDMQ5-Djwpsh98.js`);return{diagram:e}},__vite__mapDeps([73,2,3,1,29,30,8,31,32,33,11,4,5,6,7,34,35,36,37,38,39,40,41,74,42,49]));return{id:Rt,diagram:t}},`loader`)},Bt=`ishikawa`,Vt={id:Bt,detector:d(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-PHBUUO56-CsWvEjux.js`);return{diagram:e}},__vite__mapDeps([75,1,2,3,4,5,6,7,8,49,19]));return{id:Bt,diagram:t}},`loader`)},Ht=`venn`,Ut={id:Ht,detector:d(e=>/^\s*venn-beta/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./vennDiagram-LZ73GAT5-DBit3zWa.js`);return{diagram:e}},__vite__mapDeps([76,1,2,3,4,5,6,7,8,49,19]));return{id:Ht,diagram:t}},`loader`)},Wt=`treemap`,Gt={id:Wt,detector:d(e=>/^\s*treemap/.test(e),`detector`),loader:d(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-E7M64L7V-D1mm0PoO.js`);return{diagram:e}},__vite__mapDeps([77,1,2,3,29,30,8,31,32,33,34,35,36,37,38,39,40,41,51,47,4,46,5,6,7,42,49,25,17]));return{id:Wt,diagram:t}},`loader`)},Kt=!1,Y=d(()=>{Kt||(Kt=!0,_(`error`,xt,e=>e.toLowerCase().trim()===`error`),_(`---`,{db:{clear:d(()=>{},`clear`)},styles:{},renderer:{draw:d(()=>{},`draw`)},parser:{parse:d(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:d(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),v(Ct,Dt,zt),v(Be,kt,ft,ut,Ke,Xe,Qe,et,ot,ct,We,He,Tt,Je,gt,mt,vt,nt,jt,Nt,it,Lt,Ft,Vt,Gt,Ut))},`addDiagrams`),qt=d(async()=>{u.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(D).map(async([e,{detector:t,loader:n}])=>{if(n)try{k(e)}catch{try{let{diagram:e,id:r}=await n();_(r,e,t)}catch(t){throw u.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete D[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){u.error(`Failed to load ${e.length} external diagrams`);for(let t of e)u.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),Jt=`graphics-document document`;function Yt(e,t){e.attr(`role`,Jt),t!==``&&e.attr(`aria-roledescription`,t)}d(Yt,`setA11yDiagramInfo`);function Xt(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}d(Xt,`addSVGa11yTitleDescription`);var Zt=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{d(this,`Diagram`)}static async fromText(t,n={}){let i=A(),a=w(t,i);t=r(t)+`
|
|
4
|
-
`;try{k(a)}catch{let e=y(a);if(!e)throw new re(`Diagram ${a} not found.`);let{id:t,diagram:n}=await e();_(t,n)}let{db:o,parser:s,renderer:c,init:l}=k(a);return s.parser&&(s.parser.yy=o),o.clear?.(),l?.(i),n.title&&o.setDiagramTitle?.(n.title),await s.parse(t),new e(a,t,o,s,c)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},Qt=[],$t=d(()=>{Qt.forEach(e=>{e()}),Qt=[]},`attachFunctions`),en=d(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function tn(e){let t=e.match(ee);if(!t)return{text:e,metadata:{}};let n=le(t[1],{schema:ue})??{};n=typeof n==`object`&&!Array.isArray(n)?n:{};let r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:e.slice(t[0].length),metadata:r}}d(tn,`extractFrontMatter`);var nn=d(e=>e.replace(/\r\n?/g,`
|
|
5
|
-
`).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),rn=d(e=>{let{text:t,metadata:n}=tn(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),an=d(e=>{let t=a.detectInit(e)??{},n=a.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:s(e),directive:t}},`processDirectives`);function on(e){let t=rn(nn(e)),n=an(t.text),r=c(t.config,n.directive);return e=en(n.text),{code:e,title:t.title,config:r}}d(on,`preprocessDiagram`);function sn(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}d(sn,`toBase64`);var cn=5e4,ln=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,un=`sandbox`,dn=`loose`,fn=`http://www.w3.org/2000/svg`,pn=`http://www.w3.org/1999/xlink`,mn=`http://www.w3.org/1999/xhtml`,hn=`100%`,gn=`100%`,_n=`border:0;margin:0;`,vn=`margin:0`,yn=`allow-top-navigation-by-user-activation allow-popups`,bn=`The "iframe" tag is not supported by your browser.`,xn=[`foreignobject`],Sn=[`dominant-baseline`];function Cn(e){let t=on(e);return p(),E(t.config??{}),t}d(Cn,`processAndSetConfigs`);async function wn(e,t){Y();try{let{code:t,config:n}=Cn(e);return{diagramType:(await Fn(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}d(wn,`parse`);var Tn=d((e,t,n=[])=>`
|
|
6
|
-
.${e} ${t} { ${n.join(` !important; `)} !important; }`,`cssImportantStyles`),En=d((e,t=new Map)=>{let r=``;if(e.themeCSS!==void 0&&(r+=`
|
|
7
|
-
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
8
|
-
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
9
|
-
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){let i=O(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{n(e.styles)||i.forEach(t=>{r+=Tn(e.id,t,e.styles)}),n(e.textStyles)||(r+=Tn(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))))})}return r},`createCssStyles`),Dn=d((e,t,n,r)=>Le(Ne(`${r}{${g(t,En(e,n),e.themeVariables)}}`),Re),`createUserStyles`),On=d((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=o(r),r=r.replace(/<br>/g,`<br/>`),r},`cleanUpSvgCode`),kn=d((e=``,t)=>`<iframe style="width:${hn};height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+`px`:gn};${_n}" src="data:text/html;charset=UTF-8;base64,${sn(`<body style="${vn}">${e}</body>`)}" sandbox="${yn}">
|
|
10
|
-
${bn}
|
|
11
|
-
</iframe>`,`putIntoIFrame`),An=d((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,fn);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function jn(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}d(jn,`sandboxedIframe`);var Mn=d((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),Nn=d(async function(e,n,r){Y();let i=Cn(n);n=i.code;let a=A();u.debug(a),n.length>(a?.maxTextSize??cn)&&(n=ln);let o=`#`+e,s=`i`+e,c=`#`+s,l=`d`+e,p=`#`+l,m=d(()=>{let e=f(g?c:p).node();e&&`remove`in e&&e.remove()},`removeTempElements`),h=f(`body`),g=a.securityLevel===un,_=a.securityLevel===dn,v=a.fontFamily;r===void 0?(Mn(document,e,l,s),g?(h=f(jn(f(`body`),s).nodes()[0].contentDocument.body),h.node().style.margin=0):h=f(`body`),An(h,e,l)):(r&&(r.innerHTML=``),g?(h=f(jn(f(r),s).nodes()[0].contentDocument.body),h.node().style.margin=0):h=f(r),An(h,e,l,`font-family: ${v}`,pn));let y,b;try{y=await Zt.fromText(n,{title:i.title})}catch(e){if(a.suppressErrorRendering)throw m(),e;y=await Zt.fromText(`error`),b=e}let x=h.select(p).node(),S=y.type,C=x.firstChild,w=C.firstChild,ee=y.renderer.getClasses?.(n,y),T=Dn(a,S,ee,o),E=document.createElement(`style`);E.innerHTML=T,C.insertBefore(E,w);try{await y.renderer.draw(n,e,`11.13.0`,y)}catch(t){throw a.suppressErrorRendering?m():bt.draw(n,e,`11.13.0`),t}let D=h.select(`${p} svg`),ne=y.db.getAccTitle?.(),re=y.db.getAccDescription?.();In(S,D,ne,re),h.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,mn);let O=h.select(p).node().innerHTML;if(u.debug(`config.arrowMarkerAbsolute`,a.arrowMarkerAbsolute),O=On(O,g,te(a.arrowMarkerAbsolute)),g){let e=h.select(p+` svg`).node();O=kn(O,e)}else _||(O=t.sanitize(O,{ADD_TAGS:xn,ADD_ATTR:Sn,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if($t(),b)throw b;return m(),{diagramType:S,svg:O,bindFunctions:y.db.bindFunctions}},`render`);function Pn(e={}){let t=ne({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),ie(t),t?.theme&&t.theme in S?t.themeVariables=S[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=S.default.getThemeVariables(t.themeVariables)),l((typeof t==`object`?m(t):b()).logLevel),Y()}d(Pn,`initialize`);var Fn=d((e,t={})=>{let{code:n}=on(e);return Zt.fromText(n,t)},`getDiagramFromText`);function In(e,t,n,r){Yt(t,e),Xt(t,n,r,t.attr(`id`))}d(In,`addA11yInfo`);var X=Object.freeze({render:Nn,parse:wn,getDiagramFromText:Fn,initialize:Pn,getConfig:A,setConfig:h,getSiteConfig:b,updateSiteConfig:x,reset:d(()=>{p()},`reset`),globalReset:d(()=>{p(T)},`globalReset`),defaultConfig:T});l(A().logLevel),p(A());var Ln=d((e,t,n)=>{u.warn(e),i(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),Rn=d(async function(e={querySelector:`.mermaid`}){try{await zn(e)}catch(t){if(i(t)&&u.error(t.str),$.parseError&&$.parseError(t),!e.suppressErrors)throw u.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),zn=d(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=X.getConfig();u.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);u.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(u.debug(`Start On Load: `+r?.startOnLoad),X.updateSiteConfig({startOnLoad:r?.startOnLoad}));let o=new a.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),s,c=[];for(let t of Array.from(i)){if(u.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${o.next()}`;s=t.innerHTML,s=se(a.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,`<br/>`);let r=a.detectInit(s);r&&u.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await qn(n,s,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){Ln(e,c,$.parseError)}}if(c.length>0)throw c[0]},`runThrowsErrors`),Bn=d(function(e){X.initialize(e)},`initialize`),Vn=d(async function(e,t,n){u.warn(`mermaid.init is deprecated. Please use run instead.`),e&&Bn(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(t instanceof HTMLElement?r.nodes=[t]:r.nodes=t),await Rn(r)},`init`),Hn=d(async(e,{lazyLoad:t=!0}={})=>{Y(),v(...e),t===!1&&await qt()},`registerExternalDiagrams`),Un=d(function(){if($.startOnLoad){let{startOnLoad:e}=X.getConfig();e&&$.run().catch(e=>u.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,Un,!1);var Wn=d(function(e){$.parseError=e},`setParseErrorHandler`),Z=[],Q=!1,Gn=d(async()=>{if(!Q){for(Q=!0;Z.length>0;){let e=Z.shift();if(e)try{await e()}catch(e){u.error(`Error executing queue`,e)}}Q=!1}},`executeQueue`),Kn=d(async(e,t)=>new Promise((n,r)=>{let i=d(()=>new Promise((i,a)=>{X.parse(e,t).then(e=>{i(e),n(e)},e=>{u.error(`Error parsing`,e),$.parseError?.(e),a(e),r(e)})}),`performCall`);Z.push(i),Gn().catch(r)}),`parse`),qn=d((e,t,n)=>new Promise((r,i)=>{let a=d(()=>new Promise((a,o)=>{X.render(e,t,n).then(e=>{a(e),r(e)},e=>{u.error(`Error parsing`,e),$.parseError?.(e),o(e),i(e)})}),`performCall`);Z.push(a),Gn().catch(i)}),`render`),$={startOnLoad:!0,mermaidAPI:X,parse:Kn,render:qn,init:Vn,run:Rn,registerExternalDiagrams:Hn,registerLayoutLoaders:ce,initialize:Bn,parseError:void 0,contentLoaded:Un,setParseErrorHandler:Wn,detectType:w,registerIconPacks:oe,getRegisteredDiagramsMetadata:d(()=>Object.keys(D).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},Jn=$;export{Jn as default};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import"./chunk-GEFDOKGD-C_5hRbJt.js";import{g as e,h as t}from"./src-C8kkzlHX.js";import{L as n,O as r,Q as i,Z as a,b as o,d as s,et as c}from"./chunk-7R4GIKGN-CWVVC8HX.js";import"./dist-BywRdrPx.js";import"./chunk-PU5JKC2W-BTqWqedh.js";import"./chunk-MX3YWQON-i-77iuVj.js";import"./chunk-YBOYWFTD-CoeQgeVY.js";import{t as l}from"./chunk-55IACEB6-BzVuSUV8.js";import{t as u}from"./chunk-KX2RTZJC-DWqnZZ02.js";import"./chunk-PQ6SQG4A-DqE1eupT.js";import"./chunk-KYZI473N-gjRVhJgJ.js";import"./chunk-O4XLMI2P-ZQd5L6ZD.js";import{r as d,t as f}from"./chunk-GLR3WWYH-CkY7IyBj.js";var p=[];for(let e=0;e<256;++e)p.push((e+256).toString(16).slice(1));function m(e,t=0){return(p[e[t+0]]+p[e[t+1]]+p[e[t+2]]+p[e[t+3]]+`-`+p[e[t+4]]+p[e[t+5]]+`-`+p[e[t+6]]+p[e[t+7]]+`-`+p[e[t+8]]+p[e[t+9]]+`-`+p[e[t+10]]+p[e[t+11]]+p[e[t+12]]+p[e[t+13]]+p[e[t+14]]+p[e[t+15]]).toLowerCase()}var h,g=new Uint8Array(16);function _(){if(!h){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);h=crypto.getRandomValues.bind(crypto)}return h(g)}var v={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function y(e,t,n){if(v.randomUUID&&!t&&!e)return v.randomUUID();e||={};let r=e.random??e.rng?.()??_();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return m(r)}var b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],h=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],v={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`MINDMAP`,11:`EOF`,13:`SPACELIST`,15:`ICON`,16:`CLASS`,19:`NODE_DSTART`,20:`NODE_DESCR`,21:`NODE_DEND`,22:`NODE_ID`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace(`SPACELIST`);break;case 19:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:r,9:22,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:u,7:d,10:23,11:f},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:c}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:f},{1:[2,7],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},e(m,[2,14],{7:h,11:g}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(m,[2,13],{7:h,11:g}),e(_,[2,11]),e(_,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
-
`+h.showPosition()+`
|
|
3
|
-
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};v.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:return e.getLogger().trace(`Found comment`,t.yytext),6;case 1:return 8;case 2:this.begin(`CLASS`);break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 6:return e.getLogger().trace(`SPACELINE`),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace(`end icon`),this.popState();break;case 10:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),19;case 11:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),19;case 12:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),19;case 13:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),19;case 14:return this.begin(`NODE`),19;case 15:return this.begin(`NODE`),19;case 16:return this.begin(`NODE`),19;case 17:return this.begin(`NODE`),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin(`NSTR2`);break;case 22:return`NODE_DESCR`;case 23:this.popState();break;case 24:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 25:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 26:this.popState();break;case 27:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 28:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 29:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 30:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 31:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 32:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 33:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 35:return e.getLogger().trace(`Long description:`,t.yytext),20;case 36:return e.getLogger().trace(`Long description:`,t.yytext),20}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}})();function y(){this.yy={}}return t(y,`Parser`),y.prototype=v,v.Parser=y,new y})();b.parser=b;var x=b,S=12,C={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},w=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=C,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{t(this,`MindmapDB`)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level<e)return this.nodes[t];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(t,r,i,a){e.info(`addNode`,t,r,i,a);let c=!1;this.nodes.length===0?(this.baseLevel=t,t=0,c=!0):this.baseLevel!==void 0&&(t-=this.baseLevel,c=!1);let l=o(),u=l.mindmap?.padding??s.mindmap.padding;switch(a){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:u*=2;break}let d={id:this.count++,nodeId:n(r,l),level:t,descr:n(i,l),type:a,children:[],width:l.mindmap?.maxNodeWidth??s.mindmap.maxNodeWidth,padding:u,isRoot:c},f=this.getParent(t);if(f)f.children.push(d),this.nodes.push(d);else if(c)this.nodes.push(d);else throw Error(`There can be only one root. No parent could be found for ("${d.descr}")`)}getType(t,n){switch(e.debug(`In get type`,t,n),t){case`[`:return this.nodeType.RECT;case`(`:return n===`)`?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case`((`:return this.nodeType.CIRCLE;case`)`:return this.nodeType.CLOUD;case`))`:return this.nodeType.BANG;case`{{`:return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let t=o(),r=this.nodes[this.nodes.length-1];e.icon&&(r.icon=n(e.icon,t)),e.class&&(r.class=n(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return`no-border`;case this.nodeType.RECT:return`rect`;case this.nodeType.ROUNDED_RECT:return`rounded-rect`;case this.nodeType.CIRCLE:return`circle`;case this.nodeType.CLOUD:return`cloud`;case this.nodeType.BANG:return`bang`;case this.nodeType.HEXAGON:return`hexgon`;default:return`no-border`}}assignSections(e,t){if(e.level===0?e.section=void 0:e.section=t,e.children)for(let[n,r]of e.children.entries()){let i=e.level===0?n%(S-1):t;this.assignSections(r,i)}}flattenNodes(e,n){let r=[`mindmap-node`];e.isRoot===!0?r.push(`section-root`,`section--1`):e.section!==void 0&&r.push(`section-${e.section}`),e.class&&r.push(e.class);let i=r.join(` `),a=t(e=>{switch(e){case C.CIRCLE:return`mindmapCircle`;case C.RECT:return`rect`;case C.ROUNDED_RECT:return`rounded`;case C.CLOUD:return`cloud`;case C.BANG:return`bang`;case C.HEXAGON:return`hexagon`;case C.DEFAULT:return`defaultMindmapNode`;case C.NO_BORDER:default:return`rect`}},`getShapeFromType`),o={id:e.id.toString(),domId:`node_`+e.id.toString(),label:e.descr,labelType:`markdown`,isGroup:!1,shape:a(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:i,cssStyles:[],look:`default`,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(n.push(o),e.children)for(let t of e.children)this.flattenNodes(t,n)}generateEdges(e,t){if(e.children)for(let n of e.children){let r=`edge`;n.section!==void 0&&(r+=` section-edge-${n.section}`);let i=e.level+1;r+=` edge-depth-${i}`;let a={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:`normal`,curve:`basis`,thickness:`normal`,look:`default`,classes:r,depth:e.level,section:n.section};t.push(a),this.generateEdges(n,t)}}getData(){let t=this.getMindmap(),n=o(),i=r().layout!==void 0,a=n;if(i||(a.layout=`cose-bilkent`),!t)return{nodes:[],edges:[],config:a};e.debug(`getData: mindmapRoot`,t,n),this.assignSections(t);let s=[],c=[];this.flattenNodes(t,s),this.generateEdges(t,c),e.debug(`getData: processed ${s.length} nodes and ${c.length} edges`);let l=new Map;for(let e of s)l.set(e.id,{shape:e.shape,width:e.width,height:e.height,padding:e.padding});return{nodes:s,edges:c,config:a,rootNode:t,markers:[`point`],direction:`TB`,nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(l),type:`mindmap`,diagramId:`mindmap-`+y()}}getLogger(){return e}},T={draw:t(async(t,n,r,i)=>{e.debug(`Rendering mindmap diagram
|
|
7
|
-
`+t);let a=i.db,o=a.getData(),c=l(n,o.config.securityLevel);o.type=i.type,o.layoutAlgorithm=f(o.config.layout,{fallback:`cose-bilkent`}),o.diagramId=n,a.getMindmap()&&(o.nodes.forEach(e=>{e.shape===`rounded`?(e.radius=15,e.taper=15,e.stroke=`none`,e.width=0,e.padding=15):e.shape===`circle`?e.padding=10:e.shape===`rect`&&(e.width=0,e.padding=10)}),await d(o,c),u(c,o.config.mindmap?.padding??s.mindmap.padding,`mindmapDiagram`,o.config.mindmap?.useMaxWidth??s.mindmap.useMaxWidth))},`draw`)},E=t(e=>{let t=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e[`lineColor`+t]=e[`lineColor`+t]||e[`cScaleInv`+t],c(e[`lineColor`+t])?e[`lineColor`+t]=i(e[`lineColor`+t],20):e[`lineColor`+t]=a(e[`lineColor`+t],20);for(let n=0;n<e.THEME_COLOR_LIMIT;n++){let r=``+(17-3*n);t+=`
|
|
8
|
-
.section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
|
|
9
|
-
fill: ${e[`cScale`+n]};
|
|
10
|
-
}
|
|
11
|
-
.section-${n-1} text {
|
|
12
|
-
fill: ${e[`cScaleLabel`+n]};
|
|
13
|
-
}
|
|
14
|
-
.node-icon-${n-1} {
|
|
15
|
-
font-size: 40px;
|
|
16
|
-
color: ${e[`cScaleLabel`+n]};
|
|
17
|
-
}
|
|
18
|
-
.section-edge-${n-1}{
|
|
19
|
-
stroke: ${e[`cScale`+n]};
|
|
20
|
-
}
|
|
21
|
-
.edge-depth-${n-1}{
|
|
22
|
-
stroke-width: ${r};
|
|
23
|
-
}
|
|
24
|
-
.section-${n-1} line {
|
|
25
|
-
stroke: ${e[`cScaleInv`+n]} ;
|
|
26
|
-
stroke-width: 3;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.disabled, .disabled circle, .disabled text {
|
|
30
|
-
fill: lightgray;
|
|
31
|
-
}
|
|
32
|
-
.disabled text {
|
|
33
|
-
fill: #efefef;
|
|
34
|
-
}
|
|
35
|
-
`}return t},`genSections`),D={get db(){return new w},renderer:T,parser:x,styles:t(e=>`
|
|
36
|
-
.edge {
|
|
37
|
-
stroke-width: 3;
|
|
38
|
-
}
|
|
39
|
-
${E(e)}
|
|
40
|
-
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
41
|
-
fill: ${e.git0};
|
|
42
|
-
}
|
|
43
|
-
.section-root text {
|
|
44
|
-
fill: ${e.gitBranchLabel0};
|
|
45
|
-
}
|
|
46
|
-
.section-root span {
|
|
47
|
-
color: ${e.gitBranchLabel0};
|
|
48
|
-
}
|
|
49
|
-
.section-2 span {
|
|
50
|
-
color: ${e.gitBranchLabel0};
|
|
51
|
-
}
|
|
52
|
-
.icon-container {
|
|
53
|
-
height:100%;
|
|
54
|
-
display: flex;
|
|
55
|
-
justify-content: center;
|
|
56
|
-
align-items: center;
|
|
57
|
-
}
|
|
58
|
-
.edge {
|
|
59
|
-
fill: none;
|
|
60
|
-
}
|
|
61
|
-
.mindmap-node-label {
|
|
62
|
-
dy: 1em;
|
|
63
|
-
alignment-baseline: middle;
|
|
64
|
-
text-anchor: middle;
|
|
65
|
-
dominant-baseline: middle;
|
|
66
|
-
text-align: center;
|
|
67
|
-
}
|
|
68
|
-
`,`getStyles`)};export{D as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./init-Bft5Ffpj.js";var t=class extends Map{constructor(e,t=a){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(n(this,e))}has(e){return super.has(n(this,e))}set(e,t){return super.set(r(this,e),t)}delete(e){return super.delete(i(this,e))}};function n({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function r({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function i({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function a(e){return typeof e==`object`&&e?e.valueOf():e}var o=Symbol(`implicit`);function s(){var n=new t,r=[],i=[],a=o;function c(e){let t=n.get(e);if(t===void 0){if(a!==o)return a;n.set(e,t=r.push(e)-1)}return i[t%i.length]}return c.domain=function(e){if(!arguments.length)return r.slice();r=[],n=new t;for(let t of e)n.has(t)||n.set(t,r.push(t)-1);return c},c.range=function(e){return arguments.length?(i=Array.from(e),c):i.slice()},c.unknown=function(e){return arguments.length?(a=e,c):a},c.copy=function(){return s(r,i).unknown(a)},e.apply(c,arguments),c}export{s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-XZSTWKYB-DMOqFWmT.js";import{n as e}from"./chunk-C72U2L5F-B1Tso5TH.js";export{e as createPacketServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Math.PI,t=2*e,n=1e-6,r=t-n;function i(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function a(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return i;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var o=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?i:a(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,r,i,a,o){if(t=+t,r=+r,i=+i,a=+a,o=+o,o<0)throw Error(`negative radius: ${o}`);let s=this._x1,c=this._y1,l=i-t,u=a-r,d=s-t,f=c-r,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>n)if(!(Math.abs(f*l-u*d)>n)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let m=i-s,h=a-c,g=l*l+u*u,_=m*m+h*h,v=Math.sqrt(g),y=Math.sqrt(p),b=o*Math.tan((e-Math.acos((g+p-_)/(2*v*y)))/2),x=b/y,S=b/v;Math.abs(x-1)>n&&this._append`L${t+x*d},${r+x*f}`,this._append`A${o},${o},0,0,${+(f*m>d*h)},${this._x1=t+S*l},${this._y1=r+S*u}`}}arc(i,a,o,s,c,l){if(i=+i,a=+a,o=+o,l=!!l,o<0)throw Error(`negative radius: ${o}`);let u=o*Math.cos(s),d=o*Math.sin(s),f=i+u,p=a+d,m=1^l,h=l?s-c:c-s;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>n||Math.abs(this._y1-p)>n)&&this._append`L${f},${p}`,o&&(h<0&&(h=h%t+t),h>r?this._append`A${o},${o},0,1,${m},${i-u},${a-d}A${o},${o},0,1,${m},${this._x1=f},${this._y1=p}`:h>n&&this._append`A${o},${o},0,${+(h>=e)},${m},${this._x1=i+o*Math.cos(c)},${this._y1=a+o*Math.sin(c)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function s(){return new o}s.prototype=o.prototype;function c(e){return function(){return e}}function l(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new o(t)}export{c as n,l as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-XZSTWKYB-DMOqFWmT.js";import{n as e}from"./chunk-XIRO2GV7-B4GGQONY.js";export{e as createPieServices};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import"./chunk-XZSTWKYB-DMOqFWmT.js";import{f as e,r as t}from"./chunk-GEFDOKGD-C_5hRbJt.js";import"./chunk-R5LLSJPH-DkiNs1dN.js";import"./chunk-7E7YKBS2-CZ8IcA4c.js";import"./chunk-EGIJ26TM-Cx_7CFik.js";import"./chunk-C72U2L5F-B1Tso5TH.js";import"./chunk-XIRO2GV7-B4GGQONY.js";import"./chunk-L3YUKLVL-D7C9GuxL.js";import"./chunk-OZEHJAEY-BaPKTELw.js";import{g as n,h as r}from"./src-C8kkzlHX.js";import{B as i,C as a,V as o,W as s,_ as c,a as l,b as u,c as d,d as f,v as p}from"./chunk-7R4GIKGN-CWVVC8HX.js";import{t as m}from"./ordinal-DIg8h6NI.js";import{n as h}from"./path-DfRbCp9y.js";import{p as g}from"./math-CNhlSIO3.js";import{t as _}from"./arc-D65wG9gm.js";import{t as v}from"./array-DOVTz2Mq.js";import{t as y}from"./chunk-HHEYEP7N-B0I4X5cr.js";import"./dist-BywRdrPx.js";import{t as b}from"./chunk-4BX2VUAB-DEqzsvDc.js";import{t as x}from"./mermaid-parser.core-Vb9KKv1R.js";function S(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function C(e){return e}function w(){var e=C,t=S,n=null,r=h(0),i=h(g),a=h(0);function o(o){var s,c=(o=v(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),h=Math.min(g,Math.max(-g,i.apply(this,arguments)-m)),_,y=Math.min(Math.abs(h)/c,a.apply(this,arguments)),b=y*(h<0?-1:1),x;for(s=0;s<c;++s)(x=p[f[s]=s]=+e(o[s],s,o))>0&&(d+=x);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(h-c*b)/d:0;s<c;++s,m=_)l=f[s],x=p[l],_=m+(x>0?x*u:0)+b,p[l]={data:o[l],index:s,value:x,startAngle:m,endAngle:_,padAngle:y};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:h(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:h(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:h(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:h(+e),o):a},o}var T=f.pie,E={sections:new Map,showData:!1,config:T},D=E.sections,O=E.showData,k=structuredClone(T),A={getConfig:r(()=>structuredClone(k),`getConfig`),clear:r(()=>{D=new Map,O=E.showData,l()},`clear`),setDiagramTitle:s,getDiagramTitle:a,setAccTitle:o,getAccTitle:p,setAccDescription:i,getAccDescription:c,addSection:r(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(e)||(D.set(e,t),n.debug(`added new section: ${e}, with value: ${t}`))},`addSection`),getSections:r(()=>D,`getSections`),setShowData:r(e=>{O=e},`setShowData`),getShowData:r(()=>O,`getShowData`)},j=r((e,t)=>{b(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),M={parse:r(async e=>{let t=await x(`pie`,e);n.debug(t),j(t,A)},`parse`)},N=r(e=>`
|
|
2
|
-
.pieCircle{
|
|
3
|
-
stroke: ${e.pieStrokeColor};
|
|
4
|
-
stroke-width : ${e.pieStrokeWidth};
|
|
5
|
-
opacity : ${e.pieOpacity};
|
|
6
|
-
}
|
|
7
|
-
.pieOuterCircle{
|
|
8
|
-
stroke: ${e.pieOuterStrokeColor};
|
|
9
|
-
stroke-width: ${e.pieOuterStrokeWidth};
|
|
10
|
-
fill: none;
|
|
11
|
-
}
|
|
12
|
-
.pieTitleText {
|
|
13
|
-
text-anchor: middle;
|
|
14
|
-
font-size: ${e.pieTitleTextSize};
|
|
15
|
-
fill: ${e.pieTitleTextColor};
|
|
16
|
-
font-family: ${e.fontFamily};
|
|
17
|
-
}
|
|
18
|
-
.slice {
|
|
19
|
-
font-family: ${e.fontFamily};
|
|
20
|
-
fill: ${e.pieSectionTextColor};
|
|
21
|
-
font-size:${e.pieSectionTextSize};
|
|
22
|
-
// fill: white;
|
|
23
|
-
}
|
|
24
|
-
.legend text {
|
|
25
|
-
fill: ${e.pieLegendTextColor};
|
|
26
|
-
font-family: ${e.fontFamily};
|
|
27
|
-
font-size: ${e.pieLegendTextSize};
|
|
28
|
-
}
|
|
29
|
-
`,`getStyles`),P=r(e=>{let t=[...e.values()].reduce((e,t)=>e+t,0),n=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>e.value/t*100>=1).sort((e,t)=>t.value-e.value);return w().value(e=>e.value)(n)},`createPieArcs`),F={parser:M,db:A,renderer:{draw:r((r,i,a,o)=>{n.debug(`rendering pie chart
|
|
30
|
-
`+r);let s=o.db,c=u(),l=t(s.getConfig(),c.pie),f=y(i),p=f.append(`g`);p.attr(`transform`,`translate(225,225)`);let{themeVariables:h}=c,[g]=e(h.pieOuterStrokeWidth);g??=2;let v=l.textPosition,b=_().innerRadius(0).outerRadius(185),x=_().innerRadius(185*v).outerRadius(185*v);p.append(`circle`).attr(`cx`,0).attr(`cy`,0).attr(`r`,185+g/2).attr(`class`,`pieOuterCircle`);let S=s.getSections(),C=P(S),w=[h.pie1,h.pie2,h.pie3,h.pie4,h.pie5,h.pie6,h.pie7,h.pie8,h.pie9,h.pie10,h.pie11,h.pie12],T=0;S.forEach(e=>{T+=e});let E=C.filter(e=>(e.data.value/T*100).toFixed(0)!==`0`),D=m(w);p.selectAll(`mySlices`).data(E).enter().append(`path`).attr(`d`,b).attr(`fill`,e=>D(e.data.label)).attr(`class`,`pieCircle`),p.selectAll(`mySlices`).data(E).enter().append(`text`).text(e=>(e.data.value/T*100).toFixed(0)+`%`).attr(`transform`,e=>`translate(`+x.centroid(e)+`)`).style(`text-anchor`,`middle`).attr(`class`,`slice`),p.append(`text`).text(s.getDiagramTitle()).attr(`x`,0).attr(`y`,-400/2).attr(`class`,`pieTitleText`);let O=[...S.entries()].map(([e,t])=>({label:e,value:t})),k=p.selectAll(`.legend`).data(O).enter().append(`g`).attr(`class`,`legend`).attr(`transform`,(e,t)=>{let n=22*O.length/2;return`translate(216,`+(t*22-n)+`)`});k.append(`rect`).attr(`width`,18).attr(`height`,18).style(`fill`,e=>D(e.label)).style(`stroke`,e=>D(e.label)),k.append(`text`).attr(`x`,22).attr(`y`,14).text(e=>s.getShowData()?`${e.label} [${e.value}]`:e.label);let A=512+Math.max(...k.selectAll(`text`).nodes().map(e=>e?.getBoundingClientRect().width??0));f.attr(`viewBox`,`0 0 ${A} 450`),d(f,450,A,l.useMaxWidth)},`draw`)},styles:N};export{F as diagram};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{g as e,h as t,p as n}from"./src-C8kkzlHX.js";import{B as r,C as i,E as a,L as o,V as s,W as c,_ as l,a as u,b as d,c as f,d as p,v as m}from"./chunk-7R4GIKGN-CWVVC8HX.js";import{t as h}from"./linear-Cts_d04Y.js";import"./defaultLocale-Ck2Xxk-C.js";var g=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,14],v=[1,23],y=[1,18],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,24],T=[1,25],E=[1,26],D=[1,27],O=[1,28],k=[1,29],A=[1,32],j=[1,33],M=[1,34],N=[1,39],P=[1,40],F=[1,42],I=[1,44],L=[1,62],R=[1,61],z=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],B=[1,65],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,90],U=[1,91],W=[1,92],G=[1,99],K=[1,93],q=[1,96],J=[1,94],Y=[1,95],X=[1,97],Z=[1,98],de=[1,102],fe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],pe={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[{18:n,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:n,26:8,27:2,28:r,55:i,56:a,57:o},{18:n,26:9,27:2,28:r,55:i,56:a,57:o},e(s,[2,33],{29:10}),e(c,[2,61]),e(c,[2,62]),e(c,[2,63]),{1:[2,30]},{1:[2,31]},e(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,18:_,25:v,35:y,37:b,39:x,41:S,42:C,48:w,50:T,51:E,52:D,53:O,54:k,60:A,61:j,63:M,64:N,65:P,66:F,67:I}),e(s,[2,34]),{27:45,55:i,56:a,57:o},e(l,[2,37]),e(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:f,10:p,12:m,13:h,14:g,18:_,25:v,35:y,37:b,39:x,41:S,42:C,48:w,50:T,51:E,52:D,53:O,54:k,60:A,61:j,63:M,64:N,65:P,66:F,67:I}),e(l,[2,39]),e(l,[2,40]),e(l,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(l,[2,45]),e(l,[2,46]),{18:[1,50]},{4:d,5:f,10:p,12:m,13:h,14:g,43:51,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,10:p,12:m,13:h,14:g,43:52,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,10:p,12:m,13:h,14:g,43:53,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,10:p,12:m,13:h,14:g,43:54,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,10:p,12:m,13:h,14:g,43:55,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,10:p,12:m,13:h,14:g,43:56,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,44:[1,57],47:[1,58],58:60,59:59,63:M,64:N,65:P,66:F,67:I},e(z,[2,64]),e(z,[2,66]),e(z,[2,67]),e(z,[2,70]),e(z,[2,71]),e(z,[2,72]),e(z,[2,73]),e(z,[2,74]),e(z,[2,75]),e(z,[2,76]),e(z,[2,77]),e(z,[2,78]),e(z,[2,79]),e(z,[2,80]),e(s,[2,35]),e(l,[2,38]),e(l,[2,42]),e(l,[2,43]),e(l,[2,44]),{3:64,4:B,5:ee,6:te,7:ne,8:re,9:ie,10:ae,11:oe,12:se,13:ce,14:le,15:ue,21:63},e(l,[2,53],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,49:[1,77],63:M,64:N,65:P,66:F,67:I}),e(l,[2,56],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,49:[1,78],63:M,64:N,65:P,66:F,67:I}),e(l,[2,57],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),e(l,[2,58],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),e(l,[2,59],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),e(l,[2,60],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),{45:[1,79]},{44:[1,80]},e(z,[2,65]),e(z,[2,81]),e(z,[2,82]),e(z,[2,83]),{3:82,4:B,5:ee,6:te,7:ne,8:re,9:ie,10:ae,11:oe,12:se,13:ce,14:le,15:ue,18:[1,81]},e(V,[2,23]),e(V,[2,1]),e(V,[2,2]),e(V,[2,3]),e(V,[2,4]),e(V,[2,5]),e(V,[2,6]),e(V,[2,7]),e(V,[2,8]),e(V,[2,9]),e(V,[2,10]),e(V,[2,11]),e(V,[2,12]),e(l,[2,52],{58:31,43:83,4:d,5:f,10:p,12:m,13:h,14:g,60:A,61:j,63:M,64:N,65:P,66:F,67:I}),e(l,[2,55],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,60:A,61:j,63:M,64:N,65:P,66:F,67:I}),{46:[1,85]},{45:[1,86]},{4:H,5:U,6:W,8:G,11:K,13:q,16:89,17:J,18:Y,19:X,20:Z,22:88,23:87},e(V,[2,24]),e(l,[2,51],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),e(l,[2,54],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),e(l,[2,47],{22:88,16:89,23:100,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,101]},e(l,[2,29],{10:de}),e(fe,[2,27],{16:103,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),e(Q,[2,25]),e(Q,[2,13]),e(Q,[2,14]),e(Q,[2,15]),e(Q,[2,16]),e(Q,[2,17]),e(Q,[2,18]),e(Q,[2,19]),e(Q,[2,20]),e(Q,[2,21]),e(Q,[2,22]),e(l,[2,49],{10:de}),e(l,[2,48],{22:88,16:89,23:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:89,17:J,18:Y,19:X,20:Z,22:105},e(Q,[2,26]),e(l,[2,50],{10:de}),e(fe,[2,28],{16:103,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
-
`+h.showPosition()+`
|
|
3
|
-
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};pe.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin(`title`),35;case 5:return this.popState(),`title_value`;case 6:return this.begin(`acc_title`),37;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),39;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin(`md_string`);break;case 22:return`MD_STR`;case 23:this.popState();break;case 24:this.begin(`string`);break;case 25:this.popState();break;case 26:return`STR`;case 27:this.begin(`class_name`);break;case 28:return this.popState(),47;case 29:return this.begin(`point_start`),44;case 30:return this.begin(`point_x`),45;case 31:this.popState();break;case 32:this.popState(),this.begin(`point_y`);break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}})();function $(){this.yy={}}return t($,`Parser`),$.prototype=pe,pe.Parser=$,new $})();g.parser=g;var _=g,v=a(),y=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{t(this,`QuadrantBuilder`)}getDefaultData(){return{titleText:``,quadrant1Text:``,quadrant2Text:``,quadrant3Text:``,quadrant4Text:``,xAxisLeftText:``,xAxisRightText:``,yAxisBottomText:``,yAxisTopText:``,points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:p.quadrantChart?.chartWidth||500,chartWidth:p.quadrantChart?.chartHeight||500,titlePadding:p.quadrantChart?.titlePadding||10,titleFontSize:p.quadrantChart?.titleFontSize||20,quadrantPadding:p.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:p.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:p.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:p.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:p.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:p.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:p.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:p.quadrantChart?.pointTextPadding||5,pointLabelFontSize:p.quadrantChart?.pointLabelFontSize||12,pointRadius:p.quadrantChart?.pointRadius||5,xAxisPosition:p.quadrantChart?.xAxisPosition||`top`,yAxisPosition:p.quadrantChart?.yAxisPosition||`left`,quadrantInternalBorderStrokeWidth:p.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:p.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:v.quadrant1Fill,quadrant2Fill:v.quadrant2Fill,quadrant3Fill:v.quadrant3Fill,quadrant4Fill:v.quadrant4Fill,quadrant1TextFill:v.quadrant1TextFill,quadrant2TextFill:v.quadrant2TextFill,quadrant3TextFill:v.quadrant3TextFill,quadrant4TextFill:v.quadrant4TextFill,quadrantPointFill:v.quadrantPointFill,quadrantPointTextFill:v.quadrantPointTextFill,quadrantXAxisTextFill:v.quadrantXAxisTextFill,quadrantYAxisTextFill:v.quadrantYAxisTextFill,quadrantTitleFill:v.quadrantTitleFill,quadrantInternalBorderStrokeFill:v.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:v.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,e.info(`clear called`)}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(t){e.trace(`setConfig called with: `,t),this.config={...this.config,...t}}setThemeConfig(t){e.trace(`setThemeConfig called with: `,t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(e,t,n,r){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:e===`top`&&t?i:0,bottom:e===`bottom`&&t?i:0},o=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,s={left:this.config.yAxisPosition===`left`&&n?o:0,right:this.config.yAxisPosition===`right`&&n?o:0},c=this.config.titleFontSize+this.config.titlePadding*2,l={top:r?c:0},u=this.config.quadrantPadding+s.left,d=this.config.quadrantPadding+a.top+l.top,f=this.config.chartWidth-this.config.quadrantPadding*2-s.left-s.right,p=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-l.top;return{xAxisSpace:a,yAxisSpace:s,titleSpace:l,quadrantSpace:{quadrantLeft:u,quadrantTop:d,quadrantWidth:f,quadrantHalfWidth:f/2,quadrantHeight:p,quadrantHalfHeight:p/2}}}getAxisLabels(e,t,n,r){let{quadrantSpace:i,titleSpace:a}=r,{quadrantHalfHeight:o,quadrantHeight:s,quadrantLeft:c,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:d}=i,f=!!this.data.xAxisRightText,p=!!this.data.yAxisTopText,m=[];return this.data.xAxisLeftText&&t&&m.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.xAxisRightText&&t&&m.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+l+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.yAxisBottomText&&n&&m.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+s-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),this.data.yAxisTopText&&n&&m.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+o-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),m}getQuadrants(e){let{quadrantSpace:t}=e,{quadrantHalfHeight:n,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:a}=t,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(let e of o)e.text.x=e.x+e.width/2,this.data.points.length===0?(e.text.y=e.y+e.height/2,e.text.horizontalPos=`middle`):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos=`top`);return o}getQuadrantPoints(e){let{quadrantSpace:t}=e,{quadrantHeight:n,quadrantLeft:r,quadrantTop:i,quadrantWidth:a}=t,o=h().domain([0,1]).range([r,a+r]),s=h().domain([0,1]).range([n+i,i]);return this.data.points.map(e=>{let t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:o(e.x),y:s(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:o(e.x),y:s(e.y)+this.config.pointTextPadding,verticalPos:`center`,horizontalPos:`top`,fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??`0px`}})}getBorders(e){let t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:r,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:o,quadrantTop:s,quadrantWidth:c}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s,x2:a+c+t,y2:s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+c,y1:s+t,x2:a+c,y2:s+i-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s+i,x2:a+c+t,y2:s+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:s+t,x2:a,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+o,y1:s+t,x2:a+o,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+t,y1:s+r,x2:a+c-t,y2:s+r}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:`top`,verticalPos:`center`,rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),t=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,r=this.data.points.length>0?`bottom`:this.config.xAxisPosition,i=this.calculateSpace(r,e,t,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(r,e,t,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},b=class extends Error{static{t(this,`InvalidStyleError`)}constructor(e,t,n){super(`value for ${e} ${t} is invalid, please use a valid ${n}`),this.name=`InvalidStyleError`}};function x(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}t(x,`validateHexCode`);function S(e){return!/^\d+$/.test(e)}t(S,`validateNumber`);function C(e){return!/^\d+px$/.test(e)}t(C,`validateSizeInPixels`);var w=d();function T(e){return o(e.trim(),w)}t(T,`textSanitizer`);var E=new y;function D(e){E.setData({quadrant1Text:T(e.text)})}t(D,`setQuadrant1Text`);function O(e){E.setData({quadrant2Text:T(e.text)})}t(O,`setQuadrant2Text`);function k(e){E.setData({quadrant3Text:T(e.text)})}t(k,`setQuadrant3Text`);function A(e){E.setData({quadrant4Text:T(e.text)})}t(A,`setQuadrant4Text`);function j(e){E.setData({xAxisLeftText:T(e.text)})}t(j,`setXAxisLeftText`);function M(e){E.setData({xAxisRightText:T(e.text)})}t(M,`setXAxisRightText`);function N(e){E.setData({yAxisTopText:T(e.text)})}t(N,`setYAxisTopText`);function P(e){E.setData({yAxisBottomText:T(e.text)})}t(P,`setYAxisBottomText`);function F(e){let t={};for(let n of e){let[e,r]=n.trim().split(/\s*:\s*/);if(e===`radius`){if(S(r))throw new b(e,r,`number`);t.radius=parseInt(r)}else if(e===`color`){if(x(r))throw new b(e,r,`hex code`);t.color=r}else if(e===`stroke-color`){if(x(r))throw new b(e,r,`hex code`);t.strokeColor=r}else if(e===`stroke-width`){if(C(r))throw new b(e,r,`number of pixels (eg. 10px)`);t.strokeWidth=r}else throw Error(`style named ${e} is not supported.`)}return t}t(F,`parseStyles`);function I(e,t,n,r,i){let a=F(i);E.addPoints([{x:n,y:r,text:T(e.text),className:t,...a}])}t(I,`addPoint`);function L(e,t){E.addClass(e,F(t))}t(L,`addClass`);function R(e){E.setConfig({chartWidth:e})}t(R,`setWidth`);function z(e){E.setConfig({chartHeight:e})}t(z,`setHeight`);function B(){let{themeVariables:e,quadrantChart:t}=d();return t&&E.setConfig(t),E.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),E.setData({titleText:i()}),E.build()}t(B,`getQuadrantData`);var ee={parser:_,db:{setWidth:R,setHeight:z,setQuadrant1Text:D,setQuadrant2Text:O,setQuadrant3Text:k,setQuadrant4Text:A,setXAxisLeftText:j,setXAxisRightText:M,setYAxisTopText:N,setYAxisBottomText:P,parseStyles:F,addPoint:I,addClass:L,getQuadrantData:B,clear:t(function(){E.clear(),u()},`clear`),setAccTitle:s,getAccTitle:m,setDiagramTitle:c,getDiagramTitle:i,getAccDescription:l,setAccDescription:r},renderer:{draw:t((r,i,a,o)=>{function s(e){return e===`top`?`hanging`:`middle`}t(s,`getDominantBaseLine`);function c(e){return e===`left`?`start`:`middle`}t(c,`getTextAnchor`);function l(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}t(l,`getTransformation`);let u=d();e.debug(`Rendering quadrant chart
|
|
7
|
-
`+r);let p=u.securityLevel,m;p===`sandbox`&&(m=n(`#i`+i));let h=n(p===`sandbox`?m.nodes()[0].contentDocument.body:`body`).select(`[id="${i}"]`),g=h.append(`g`).attr(`class`,`main`),_=u.quadrantChart?.chartWidth??500,v=u.quadrantChart?.chartHeight??500;f(h,v,_,u.quadrantChart?.useMaxWidth??!0),h.attr(`viewBox`,`0 0 `+_+` `+v),o.db.setHeight(v),o.db.setWidth(_);let y=o.db.getQuadrantData(),b=g.append(`g`).attr(`class`,`quadrants`),x=g.append(`g`).attr(`class`,`border`),S=g.append(`g`).attr(`class`,`data-points`),C=g.append(`g`).attr(`class`,`labels`),w=g.append(`g`).attr(`class`,`title`);y.title&&w.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,y.title.fill).attr(`font-size`,y.title.fontSize).attr(`dominant-baseline`,s(y.title.horizontalPos)).attr(`text-anchor`,c(y.title.verticalPos)).attr(`transform`,l(y.title)).text(y.title.text),y.borderLines&&x.selectAll(`line`).data(y.borderLines).enter().append(`line`).attr(`x1`,e=>e.x1).attr(`y1`,e=>e.y1).attr(`x2`,e=>e.x2).attr(`y2`,e=>e.y2).style(`stroke`,e=>e.strokeFill).style(`stroke-width`,e=>e.strokeWidth);let T=b.selectAll(`g.quadrant`).data(y.quadrants).enter().append(`g`).attr(`class`,`quadrant`);T.append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill),T.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>s(e.text.horizontalPos)).attr(`text-anchor`,e=>c(e.text.verticalPos)).attr(`transform`,e=>l(e.text)).text(e=>e.text.text),C.selectAll(`g.label`).data(y.axisLabels).enter().append(`g`).attr(`class`,`label`).append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>s(e.horizontalPos)).attr(`text-anchor`,e=>c(e.verticalPos)).attr(`transform`,e=>l(e));let E=S.selectAll(`g.data-point`).data(y.points).enter().append(`g`).attr(`class`,`data-point`);E.append(`circle`).attr(`cx`,e=>e.x).attr(`cy`,e=>e.y).attr(`r`,e=>e.radius).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeColor).attr(`stroke-width`,e=>e.strokeWidth),E.append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text.text).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>s(e.text.horizontalPos)).attr(`text-anchor`,e=>c(e.text.verticalPos)).attr(`transform`,e=>l(e.text))},`draw`)},styles:t(()=>``,`styles`)};export{ee as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-XZSTWKYB-DMOqFWmT.js";import{n as e}from"./chunk-L3YUKLVL-D7C9GuxL.js";export{e as createRadarServices};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./chunk-GEFDOKGD-C_5hRbJt.js";import{g as t,h as n,m as r}from"./src-C8kkzlHX.js";import{B as i,C as a,V as o,W as s,_ as c,a as l,b as u,v as d}from"./chunk-7R4GIKGN-CWVVC8HX.js";import"./dist-BywRdrPx.js";import"./chunk-PU5JKC2W-BTqWqedh.js";import"./chunk-MX3YWQON-i-77iuVj.js";import"./chunk-YBOYWFTD-CoeQgeVY.js";import{t as f}from"./chunk-55IACEB6-BzVuSUV8.js";import{t as p}from"./chunk-KX2RTZJC-DWqnZZ02.js";import"./chunk-PQ6SQG4A-DqE1eupT.js";import"./chunk-KYZI473N-gjRVhJgJ.js";import"./chunk-O4XLMI2P-ZQd5L6ZD.js";import{r as m,t as h}from"./chunk-GLR3WWYH-CkY7IyBj.js";var g=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,6:t,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(o,[2,6]),{3:12,4:2,6:t,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},e(o,[2,4]),e(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(T,[2,17]),e(T,[2,18]),e(T,[2,19]),e(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},e(D,[2,29]),e(D,[2,30]),e(D,[2,31]),e(D,[2,32]),e(D,[2,33]),e(D,[2,34]),e(O,[2,81]),e(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(k,[2,79]),e(k,[2,80]),{27:[1,67],29:[1,68]},e(k,[2,85]),e(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,60]),e(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},e(H,[2,50]),e(H,[2,51]),e(H,[2,52]),e(H,[2,53]),e(H,[2,54]),e(H,[2,55]),e(H,[2,56]),{64:[1,100]},e(T,[2,59],{76:M}),e(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},e(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),e(U,[2,67]),e(U,[2,69]),e(U,[2,70]),e(U,[2,71]),e(U,[2,72]),e(U,[2,73]),e(U,[2,74]),e(U,[2,75]),e(U,[2,76]),e(U,[2,77]),e(U,[2,78]),e(T,[2,57],{76:se}),e(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,61]),e(oe,[2,63]),e(U,[2,68]),e(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},e(T,[2,28]),{5:[1,127]},e(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},e(T,[2,47]),{5:[1,131]},e(T,[2,48]),e(T,[2,49]),e(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},e(T,[2,23]),e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,44]),e(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
-
`+h.showPosition()+`
|
|
3
|
-
Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};le.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:n(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:n(function(){return this.next()||this.lex()},`lex`),begin:n(function(e){this.conditionStack.push(e)},`begin`),popState:n(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:n(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:n(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:n(function(e){this.begin(e)},`pushState`),stateStackSize:n(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:n(function(e,t,n,r){switch(n){case 0:return`title`;case 1:return this.begin(`acc_title`),9;case 2:return this.popState(),`acc_title_value`;case 3:return this.begin(`acc_descr`),11;case 4:return this.popState(),`acc_descr_value`;case 5:this.begin(`acc_descr_multiline`);break;case 6:this.popState();break;case 7:return`acc_descr_multiline_value`;case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin(`style`),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return`PERCENT`;case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin(`string`);break;case 58:this.popState();break;case 59:return this.begin(`style`),72;case 60:return this.begin(`style`),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin(`string`);break;case 65:this.popState();break;case 66:return`qString`;case 67:return t.yytext=t.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},`anonymous`),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}})();function ue(){this.yy={}}return n(ue,`Parser`),ue.prototype=le,le.Parser=ue,new ue})();g.parser=g;var _=g,v=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction=`TB`,this.RequirementType={REQUIREMENT:`Requirement`,FUNCTIONAL_REQUIREMENT:`Functional Requirement`,INTERFACE_REQUIREMENT:`Interface Requirement`,PERFORMANCE_REQUIREMENT:`Performance Requirement`,PHYSICAL_REQUIREMENT:`Physical Requirement`,DESIGN_CONSTRAINT:`Design Constraint`},this.RiskLevel={LOW_RISK:`Low`,MED_RISK:`Medium`,HIGH_RISK:`High`},this.VerifyType={VERIFY_ANALYSIS:`Analysis`,VERIFY_DEMONSTRATION:`Demonstration`,VERIFY_INSPECTION:`Inspection`,VERIFY_TEST:`Test`},this.Relationships={CONTAINS:`contains`,COPIES:`copies`,DERIVES:`derives`,SATISFIES:`satisfies`,VERIFIES:`verifies`,REFINES:`refines`,TRACES:`traces`},this.setAccTitle=o,this.getAccTitle=d,this.setAccDescription=i,this.getAccDescription=c,this.setDiagramTitle=s,this.getDiagramTitle=a,this.getConfig=n(()=>u().requirement,`getConfig`),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{n(this,`RequirementDB`)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:``,text:``,risk:``,verifyMethod:``,name:``,type:``,cssStyles:[],classes:[`default`]}}getInitialElement(){return{name:``,type:``,docRef:``,cssStyles:[],classes:[`default`]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:[`default`]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:[`default`]}),t.info(`Added new element: `,e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,t,n){this.relations.push({type:e,src:t,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,l()}setCssStyle(e,t){for(let n of e){let e=this.requirements.get(n)??this.elements.get(n);if(!t||!e)return;for(let n of t)n.includes(`,`)?e.cssStyles.push(...n.split(`,`)):e.cssStyles.push(n)}}setClass(e,t){for(let n of e){let e=this.requirements.get(n)??this.elements.get(n);if(e)for(let n of t){e.classes.push(n);let t=this.classes.get(n)?.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(let n of e){let e=this.classes.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.classes.set(n,e)),t&&t.forEach(function(t){if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.requirements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))}),this.elements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))})}}getClasses(){return this.classes}getData(){let e=u(),t=[],n=[];for(let n of this.requirements.values()){let r=n;r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),r.shape=`requirementBox`,r.look=e.look,t.push(r)}for(let n of this.elements.values()){let r=n;r.shape=`requirementBox`,r.look=e.look,r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),t.push(r)}for(let t of this.relations){let r=0,i=t.type===this.Relationships.CONTAINS,a={id:`${t.src}-${t.dst}-${r}`,start:this.requirements.get(t.src)?.name??this.elements.get(t.src)?.name,end:this.requirements.get(t.dst)?.name??this.elements.get(t.dst)?.name,label:`\xAB${t.type}\xBB`,classes:`relationshipLine`,style:[`fill:none`,i?``:`stroke-dasharray: 10,7`],labelpos:`c`,thickness:`normal`,type:`normal`,pattern:i?`normal`:`dashed`,arrowTypeStart:i?`requirement_contains`:``,arrowTypeEnd:i?``:`requirement_arrow`,look:e.look,labelType:`markdown`};n.push(a),r++}return{nodes:t,edges:n,other:{},config:e,direction:this.getDirection()}}},y=n(e=>`
|
|
7
|
-
|
|
8
|
-
marker {
|
|
9
|
-
fill: ${e.relationColor};
|
|
10
|
-
stroke: ${e.relationColor};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
marker.cross {
|
|
14
|
-
stroke: ${e.lineColor};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
svg {
|
|
18
|
-
font-family: ${e.fontFamily};
|
|
19
|
-
font-size: ${e.fontSize};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.reqBox {
|
|
23
|
-
fill: ${e.requirementBackground};
|
|
24
|
-
fill-opacity: 1.0;
|
|
25
|
-
stroke: ${e.requirementBorderColor};
|
|
26
|
-
stroke-width: ${e.requirementBorderSize};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.reqTitle, .reqLabel{
|
|
30
|
-
fill: ${e.requirementTextColor};
|
|
31
|
-
}
|
|
32
|
-
.reqLabelBox {
|
|
33
|
-
fill: ${e.relationLabelBackground};
|
|
34
|
-
fill-opacity: 1.0;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.req-title-line {
|
|
38
|
-
stroke: ${e.requirementBorderColor};
|
|
39
|
-
stroke-width: ${e.requirementBorderSize};
|
|
40
|
-
}
|
|
41
|
-
.relationshipLine {
|
|
42
|
-
stroke: ${e.relationColor};
|
|
43
|
-
stroke-width: 1;
|
|
44
|
-
}
|
|
45
|
-
.relationshipLabel {
|
|
46
|
-
fill: ${e.relationLabelColor};
|
|
47
|
-
}
|
|
48
|
-
.edgeLabel {
|
|
49
|
-
background-color: ${e.edgeLabelBackground};
|
|
50
|
-
}
|
|
51
|
-
.edgeLabel .label rect {
|
|
52
|
-
fill: ${e.edgeLabelBackground};
|
|
53
|
-
}
|
|
54
|
-
.edgeLabel .label text {
|
|
55
|
-
fill: ${e.relationLabelColor};
|
|
56
|
-
}
|
|
57
|
-
.divider {
|
|
58
|
-
stroke: ${e.nodeBorder};
|
|
59
|
-
stroke-width: 1;
|
|
60
|
-
}
|
|
61
|
-
.label {
|
|
62
|
-
font-family: ${e.fontFamily};
|
|
63
|
-
color: ${e.nodeTextColor||e.textColor};
|
|
64
|
-
}
|
|
65
|
-
.label text,span {
|
|
66
|
-
fill: ${e.nodeTextColor||e.textColor};
|
|
67
|
-
color: ${e.nodeTextColor||e.textColor};
|
|
68
|
-
}
|
|
69
|
-
.labelBkg {
|
|
70
|
-
background-color: ${e.edgeLabelBackground};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
`,`getStyles`),b={};r(b,{draw:()=>x});var x=n(async function(n,r,i,a){t.info(`REF0:`),t.info(`Drawing requirement diagram (unified)`,r);let{securityLevel:o,state:s,layout:c}=u(),l=a.db.getData(),d=f(r,o);l.type=a.type,l.layoutAlgorithm=h(c),l.nodeSpacing=s?.nodeSpacing??50,l.rankSpacing=s?.rankSpacing??50,l.markers=[`requirement_contains`,`requirement_arrow`],l.diagramId=r,await m(l,d),e.insertTitle(d,`requirementDiagramTitleText`,s?.titleTopMargin??25,a.db.getDiagramTitle()),p(d,8,`requirementDiagram`,s?.useMaxWidth??!0)},`draw`),S={parser:_,get db(){return new v},renderer:b,styles:y};export{S as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function t(e,t){return e[0]===t[0]&&e[1]===t[1]}function n(n,r,i,a=1){let o=i,s=Math.max(r,.1),c=n[0]&&n[0][0]&&typeof n[0][0]==`number`?[n]:n,l=[0,0];if(o)for(let t of c)e(t,l,o);let u=function(e,n,r){let i=[];for(let n of e){let e=[...n];t(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&i.push(e)}let a=[];n=Math.max(n,.1);let o=[];for(let e of i)for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n[1]!==r[1]){let e=Math.min(n[1],r[1]);o.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(o.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!o.length)return a;let s=[],c=o[0].ymin,l=0;for(;s.length||o.length;){if(o.length){let e=-1;for(let t=0;t<o.length&&!(o[t].ymin>c);t++)e=t;o.splice(0,e+1).forEach((e=>{s.push({s:c,edge:e})}))}if(s=s.filter((e=>!(e.edge.ymax<=c))),s.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(r!==1||l%n==0)&&s.length>1)for(let e=0;e<s.length;e+=2){let t=e+1;if(t>=s.length)break;let n=s[e].edge,r=s[t].edge;a.push([[Math.round(n.x),c],[Math.round(r.x),c]])}c+=r,s.forEach((e=>{e.edge.x=e.edge.x+r*e.edge.islope})),l++}return a}(c,s,a);if(o){for(let t of c)e(t,l,-o);(function(t,n,r){let i=[];t.forEach((e=>i.push(...e))),e(i,n,r)})(u,l,-o)}return u}function r(e,t){let r=t.hachureAngle+90,i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(a=i),n(e,i,r,a||1)}var i=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=r(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function a(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var o=class extends i{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let i=r(e,Object.assign({},t,{hachureGap:n})),o=Math.PI/180*t.hachureAngle,s=[],c=.5*n*Math.cos(o),l=.5*n*Math.sin(o);for(let[e,t]of i)a([e,t])&&s.push([[e[0]-c,e[1]+l],[...t]],[[e[0]+c,e[1]-l],[...t]]);return{type:`fillSketch`,ops:this.renderLines(s,t)}}},s=class extends i{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},c=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=r(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let o=r/4;for(let s of e){let e=a(s),c=e/r,l=Math.ceil(c)-1,u=e-l*r,d=(s[0][0]+s[1][0])/2-r/4,f=Math.min(s[0][1],s[1][1]);for(let e=0;e<l;e++){let a=f+u+e*r,s=d-o+2*Math.random()*o,c=a-o+2*Math.random()*o,l=this.helper.ellipse(s,c,i,i,t);n.push(...l.ops)}}return{type:`fillSketch`,ops:n}}},l=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=r(e,t);return{type:`fillSketch`,ops:this.dashedLine(n,t)}}dashedLine(e,t){let n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((e=>{let o=a(e),s=Math.floor(o/(n+r)),c=(o+r-s*(n+r))/2,l=e[0],u=e[1];l[0]>u[0]&&(l=e[1],u=e[0]);let d=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let e=0;e<s;e++){let a=e*(n+r),o=a+n,s=[l[0]+a*Math.cos(d)+c*Math.cos(d),l[1]+a*Math.sin(d)+c*Math.sin(d)],u=[l[0]+o*Math.cos(d)+c*Math.cos(d),l[1]+o*Math.sin(d)+c*Math.sin(d)];i.push(...this.helper.doubleLineOps(s[0],s[1],u[0],u[1],t))}})),i}},u=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,i=t.zigzagOffset<0?n:t.zigzagOffset,a=r(e,t=Object.assign({},t,{hachureGap:n+i}));return{type:`fillSketch`,ops:this.zigzagLines(a,i,t)}}zigzagLines(e,t,n){let r=[];return e.forEach((e=>{let i=a(e),o=Math.round(i/(2*t)),s=e[0],c=e[1];s[0]>c[0]&&(s=e[1],c=e[0]);let l=Math.atan((c[1]-s[1])/(c[0]-s[0]));for(let e=0;e<o;e++){let i=2*e*t,a=2*(e+1)*t,o=Math.sqrt(2*t**2),c=[s[0]+i*Math.cos(l),s[1]+i*Math.sin(l)],u=[s[0]+a*Math.cos(l),s[1]+a*Math.sin(l)],d=[c[0]+o*Math.cos(l+Math.PI/4),c[1]+o*Math.sin(l+Math.PI/4)];r.push(...this.helper.doubleLineOps(c[0],c[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}})),r}},d={},f=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},p=0,m=1,h=2,g={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function _(e,t){return e.type===t}function v(e){let t=[],n=function(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:p,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:m,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:h,text:``},t}(e),r=`BOD`,i=0,a=n[i];for(;!_(a,h);){let o=0,s=[];if(r===`BOD`){if(a.text!==`M`&&a.text!==`m`)return v(`M0,0`+e);i++,o=g[a.text],r=a.text}else _(a,m)?o=g[r]:(i++,o=g[a.text],r=a.text);if(!(i+o<n.length))throw Error(`Path data ended short`);for(let e=i;e<i+o;e++){let t=n[e];if(!_(t,m))throw Error(`Param not a number: `+r+`,`+t.text);s[s.length]=+t.text}if(typeof g[r]!=`number`)throw Error(`Bad segment: `+r);{let e={key:r,data:s};t.push(e),i+=o,a=n[i],r===`M`&&(r=`L`),r===`m`&&(r=`l`)}}return t}function y(e){let t=0,n=0,r=0,i=0,a=[];for(let{key:o,data:s}of e)switch(o){case`M`:a.push({key:`M`,data:[...s]}),[t,n]=s,[r,i]=s;break;case`m`:t+=s[0],n+=s[1],a.push({key:`M`,data:[t,n]}),r=t,i=n;break;case`L`:a.push({key:`L`,data:[...s]}),[t,n]=s;break;case`l`:t+=s[0],n+=s[1],a.push({key:`L`,data:[t,n]});break;case`C`:a.push({key:`C`,data:[...s]}),t=s[4],n=s[5];break;case`c`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function b(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(S(r,i,c,l,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function x(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function S(e,t,n,r,i,a,o,s,c,l){let u=(d=o,Math.PI*d/180);var d;let f=[],p=0,m=0,h=0,g=0;if(l)[p,m,h,g]=l;else{[e,t]=x(e,t,-u),[n,r]=x(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i*=d,a*=d);let f=i*i,_=a*a,v=f*_-f*l*l-_*o*o,y=f*l*l+_*o*o,b=(s===c?-1:1)*Math.sqrt(Math.abs(v/y));h=b*i*l/a+(e+n)/2,g=b*-a*o/i+(t+r)/2,p=Math.asin(parseFloat(((t-g)/a).toFixed(9))),m=Math.asin(parseFloat(((r-g)/a).toFixed(9))),e<h&&(p=Math.PI-p),n<h&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),c&&p>m&&(p-=2*Math.PI),!c&&m>p&&(m-=2*Math.PI)}let _=m-p;if(Math.abs(_)>120*Math.PI/180){let e=m,t=n,s=r;m=c&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=S(n=h+i*Math.cos(m),r=g+a*Math.sin(m),t,s,i,a,o,0,c,[m,e,h,g])}_=m-p;let v=Math.cos(p),y=Math.sin(p),b=Math.cos(m),C=Math.sin(m),w=Math.tan(_/4),T=4/3*i*w,E=4/3*a*w,D=[e,t],O=[e+T*y,t-E*v],k=[n+T*C,r-E*b],A=[n,r];if(O[0]=2*D[0]-O[0],O[1]=2*D[1]-O[1],l)return[O,k,A].concat(f);{f=[O,k,A].concat(f);let e=[];for(let t=0;t<f.length;t+=3){let n=x(f[t][0],f[t][1],u),r=x(f[t+1][0],f[t+1][1],u),i=x(f[t+2][0],f[t+2][1],u);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}var C={randOffset:function(e,t){return L(e,t)},randOffsetWithRange:function(e,t,n){return I(e,t,n)},ellipse:function(e,t,n,r,i){return k(e,t,i,O(n,r,i)).opset},doubleLineOps:function(e,t,n,r,i){return R(e,t,n,r,i,!0)}};function w(e,t,n,r,i){return{type:`path`,ops:R(e,t,n,r,i)}}function T(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let t=0;t<r-1;t++)i.push(...R(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(...R(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:`path`,ops:i}}return r===2?w(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:`path`,ops:[]}}function E(e,t,n,r,i){return function(e,t){return T(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function D(e,t){if(e.length){let n=typeof e[0][0]==`number`?[e]:e,r=B(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:B(n[0],1.5*(1+.22*t.roughness),P(t));for(let e=1;e<n.length;e++){let a=n[e];if(a.length){let e=B(a,1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:B(a,1.5*(1+.22*t.roughness),P(t));for(let t of e)t.op!==`move`&&r.push(t);for(let e of n)e.op!==`move`&&i.push(e)}}return{type:`path`,ops:r.concat(i)}}return{type:`path`,ops:[]}}function O(e,t,n){let r=Math.sqrt(2*Math.PI*Math.sqrt(((e/2)**2+(t/2)**2)/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i,o=Math.abs(e/2),s=Math.abs(t/2),c=1-n.curveFitting;return o+=L(o*c,n),s+=L(s*c,n),{increment:a,rx:o,ry:s}}function k(e,t,n,r){let[i,a]=H(r.increment,e,t,r.rx,r.ry,1,r.increment*I(.1,I(.4,1,n),n),n),o=V(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[i]=H(r.increment,e,t,r.rx,r.ry,1.5,0,n),a=V(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:`path`,ops:o}}}function A(e,t,n,r,i,a,o,s,c){let l=e,u=t,d=Math.abs(n/2),f=Math.abs(r/2);d+=L(.01*d,c),f+=L(.01*f,c);let p=i,m=a;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);let h=2*Math.PI/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=U(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=U(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...R(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...R(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function j(e,t){let n=b(y(v(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...R(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...ee(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...R(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function M(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+L(e,t),r[0][1]+L(e,t)]});for(let a=1;a<i;a++)n.push({op:`lineTo`,data:[r[a][0]+L(e,t),r[a][1]+L(e,t)]})}}return{type:`fillPath`,ops:n}}function N(e,t){return function(e,t){let n=e.fillStyle||`hachure`;if(!d[n])switch(n){case`zigzag`:d[n]||(d[n]=new o(t));break;case`cross-hatch`:d[n]||(d[n]=new s(t));break;case`dots`:d[n]||(d[n]=new c(t));break;case`dashed`:d[n]||(d[n]=new l(t));break;case`zigzag-line`:d[n]||(d[n]=new u(t));break;default:n=`hachure`,d[n]||(d[n]=new i(t))}return d[n]}(t,C).fillPolygons(e,t)}function P(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function F(e){return e.randomizer||=new f(e.seed||0),e.randomizer.next()}function I(e,t,n,r=1){return n.roughness*r*(F(n)*(t-e)+e)}function L(e,t,n=1){return I(-e,e,t,n)}function R(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=z(e,t,n,r,i,!0,!1);if(o)return s;let c=z(e,t,n,r,i,!0,!0);return s.concat(c)}function z(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+.2*F(i),p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=L(p,i,l),m=L(m,i,l);let h=[],g=()=>L(d,i,l),_=()=>L(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:L(u,i,l)),t+(v?0:L(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function B(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+L(t,n),e[0][1]+L(t,n)]),r.push([e[0][0]+L(t,n),e[0][1]+L(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+L(t,n),e[i][1]+L(t,n)]),i===e.length-1&&r.push([e[i][0]+L(t,n),e[i][1]+L(t,n)]);return V(r,null,n)}function V(e,t,n){let r=e.length,i=[];if(r>3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],a[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],a[3]=[e[t+1][0],e[t+1][1]],i.push({op:`bcurveTo`,data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){let e=n.maxRandomnessOffset;i.push({op:`lineTo`,data:[t[0]+L(e,n),t[1]+L(e,n)]})}}else r===3?(i.push({op:`move`,data:[e[1][0],e[1][1]]}),i.push({op:`bcurveTo`,data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...z(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function H(e,t,n,r,i,a,o,s){let c=[],l=[];if(s.roughness===0){e/=4,l.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let a=0;a<=2*Math.PI;a+=e){let e=[t+r*Math.cos(a),n+i*Math.sin(a)];c.push(e),l.push(e)}l.push([t+r*Math.cos(0),n+i*Math.sin(0)]),l.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let u=L(.5,s)-Math.PI/2;l.push([L(a,s)+t+.9*r*Math.cos(u-e),L(a,s)+n+.9*i*Math.sin(u-e)]);let d=2*Math.PI+u-.01;for(let o=u;o<d;o+=e){let e=[L(a,s)+t+r*Math.cos(o),L(a,s)+n+i*Math.sin(o)];c.push(e),l.push(e)}l.push([L(a,s)+t+r*Math.cos(u+2*Math.PI+.5*o),L(a,s)+n+i*Math.sin(u+2*Math.PI+.5*o)]),l.push([L(a,s)+t+.98*r*Math.cos(u+o),L(a,s)+n+.98*i*Math.sin(u+o)]),l.push([L(a,s)+t+.9*r*Math.cos(u+.5*o),L(a,s)+n+.9*i*Math.sin(u+.5*o)])}return[l,c]}function U(e,t,n,r,i,a,o,s,c){let l=a+L(.1,c),u=[];u.push([L(s,c)+t+.9*r*Math.cos(l-e),L(s,c)+n+.9*i*Math.sin(l-e)]);for(let a=l;a<=o;a+=e)u.push([L(s,c)+t+r*Math.cos(a),L(s,c)+n+i*Math.sin(a)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),V(u,null,c)}function ee(e,t,n,r,i,a,o,s){let c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],u=[0,0],d=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let p=0;p<d;p++)p===0?c.push({op:`move`,data:[o[0],o[1]]}):c.push({op:`move`,data:[o[0]+(f?0:L(l[0],s)),o[1]+(f?0:L(l[0],s))]}),u=f?[i,a]:[i+L(l[p],s),a+L(l[p],s)],c.push({op:`bcurveTo`,data:[e+L(l[p],s),t+L(l[p],s),n+L(l[p],s),r+L(l[p],s),u[0],u[1]]});return c}function W(e){return[...e]}function G(e,t=0){let n=e.length;if(n<3)throw Error(`A curve must have at least three points.`);let r=[];if(n===3)r.push(W(e[0]),W(e[1]),W(e[2]),W(e[2]));else{let n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);let i=[],a=1-t;r.push(W(n[0]));for(let e=1;e+2<n.length;e++){let t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(a*n[e+1][0]-a*n[e-1][0])/6,t[1]+(a*n[e+1][1]-a*n[e-1][1])/6],i[2]=[n[e+1][0]+(a*n[e][0]-a*n[e+2][0])/6,n[e+1][1]+(a*n[e][1]-a*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}function K(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2}function te(e,t,n){let r=K(t,n);if(r===0)return K(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),K(e,q(t,n,i))}function q(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function J(e,t,n,r){let i=r||[];if(function(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3],o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let c=3*i[0]-2*a[0]-n[0];c*=c;let l=3*i[1]-2*a[1]-n[1];return l*=l,o<c&&(o=c),s<l&&(s=l),o+s}(e,t)<n){let n=e[t+0];i.length?(a=i[i.length-1],o=n,Math.sqrt(K(a,o)))>1&&i.push(n):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=q(a,o,r),u=q(o,s,r),d=q(s,c,r),f=q(l,u,r),p=q(u,d,r),m=q(f,p,r);J([a,l,f,m],0,n,i),J([m,p,d,c],0,n,i)}var a,o;return i}function ne(e,t){return Y(e,0,e.length,t)}function Y(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;r<n-1;++r){let t=te(e[r],o,s);t>c&&(c=t,l=r)}return Math.sqrt(c)>r?(Y(e,t,l+1,r,a),Y(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function X(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n<i;n++)J(e,3*n,t,r);return n&&n>0?Y(r,0,r.length,n):r}var Z=`none`,Q=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[w(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=E(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(M([i],a)):o.push(N([i],a))}return a.stroke!==Z&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=O(n,r,a),c=k(e,t,a,s);if(a.fill)if(a.fillStyle===`solid`){let n=k(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(N([c.estimatedPoints],a));return a.stroke!==Z&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[T(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=A(e,t,n,r,i,a,o,!0,c);if(o&&c.fill)if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=A(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(function(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=L(.01*l,o),u+=L(.01*u,o);let d=i,f=a;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),N([m],o)}(e,t,n,r,i,a,c));return c.stroke!==Z&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=D(e,n);if(n.fill&&n.fill!==Z)if(n.fillStyle===`solid`){let t=D(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...X(G([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...X(G(r),10,(1+n.roughness)/2))}t.length&&r.push(N([t],n))}return n.stroke!==Z&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=T(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(M([e],n)):r.push(N([e],n))),n.stroke!==Z&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==Z,a=n.stroke!==Z,o=!!(n.simplification&&n.simplification<1),s=function(e,t,n){let r=b(y(v(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...X(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=ne(e,n);t.length&&u.push(t)}return u}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=j(e,n);if(i)if(n.fillStyle===`solid`)if(s.length===1){let t=j(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(M(s,n));else r.push(N(s,n));return a&&(o?s.forEach((e=>{r.push(T(e,!1,n))})):r.push(c)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Z};break;case`fillPath`:t={d:this.opsToPath(e),stroke:Z,strokeWidth:0,fill:n.fill||Z};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||Z,strokeWidth:n,fill:Z}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},re=class{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new Q(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c),c}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},$=`http://www.w3.org/2000/svg`,ie=class{constructor(e,t){this.svg=e,this.gen=new Q(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS($,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS($,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS($,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS($,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},ae={canvas:(e,t)=>new re(e,t),svg:(e,t)=>new ie(e,t),generator:e=>new Q(e),newSeed:()=>Q.newSeed()};export{ae as t};
|