@schmitech/chatbot-widget 0.6.3 → 0.7.0

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.
Files changed (82) hide show
  1. package/dist/ChatWidget.d.ts +11 -0
  2. package/dist/{_baseUniq-BPMphbq5-xiRWQlDn.js → _baseUniq-BRKsqoH--HqBVqMpT.js} +126 -126
  3. package/dist/arc-pab_su9s-DkImmxyv.js +84 -0
  4. package/dist/architecture-U656AL7Q-CRlU-eNB-vFayp_Gk.js +7 -0
  5. package/dist/{architectureDiagram-VXUJARFQ-BiqZtsDe-rYpYn0Hz.js → architectureDiagram-VXUJARFQ-DqQ8r_6g-DTzMoAeY.js} +5 -5
  6. package/dist/{blockDiagram-VD42YOAC-zcRIdFTD-B54KiQJD.js → blockDiagram-VD42YOAC-B-dKfcH3-DKPGmrNb.js} +50 -50
  7. package/dist/{c4Diagram-YG6GDRKO-DYXNcDX4-B9fXQAMg.js → c4Diagram-YG6GDRKO-DMUPaBEl-CXjiCiKq.js} +63 -63
  8. package/dist/channel-HKsfPa5q-B30_3C0d.js +6 -0
  9. package/dist/chatbot-widget.bundle.js +11596 -0
  10. package/dist/chatbot-widget.es.js +1 -1
  11. package/dist/chatbot-widget.umd.js +4342 -3550
  12. package/dist/{chunk-4BX2VUAB-DAh9ktmY-CF6YTNXg.js → chunk-4BX2VUAB-CX67kh_B-JdLaNmBY.js} +1 -1
  13. package/dist/chunk-55IACEB6-BocSyyvr--btUJ1po.js +9 -0
  14. package/dist/{chunk-B4BG7PRW-BTUSpeKy-CXaYsx4a.js → chunk-B4BG7PRW-CO8QAyfE-p5mLBzD4.js} +30 -30
  15. package/dist/{chunk-DI55MBZ5-DKt4WII7-CjsnNRFb.js → chunk-DI55MBZ5-Dw1L6Eos-zQC2oI_e.js} +149 -149
  16. package/dist/{chunk-FMBD7UC4-DdcCR8w3-BbYkKjQZ.js → chunk-FMBD7UC4-dPK7Boav-C-fxYlU9.js} +1 -1
  17. package/dist/{chunk-QN33PNHL-v6AkzOl1-DrzKpDUJ.js → chunk-QN33PNHL-vP2PqfVG-ByquTp49.js} +5 -5
  18. package/dist/{chunk-QZHKN3VN-DVJOrqBZ-BQORk0pj.js → chunk-QZHKN3VN-Bcidzu63-ukwvi4Mt.js} +1 -1
  19. package/dist/{chunk-TZMSLE5B-G2jJHqli-B_BRSOS0.js → chunk-TZMSLE5B-BtljMjlg-DP4v1MME.js} +1 -1
  20. package/dist/{classDiagram-v2-WZHVMYZB-CxmgTanh-ByLirDpd.js → classDiagram-2ON5EDUG-C7cYN9hv-CtX4c_16.js} +2 -2
  21. package/dist/{classDiagram-2ON5EDUG-CxmgTanh-ByLirDpd.js → classDiagram-v2-WZHVMYZB-C7cYN9hv-CtX4c_16.js} +2 -2
  22. package/dist/{clone-CsNB4mMi-B2bGL_Hr.js → clone-DoPb9X13-BkFPVisk.js} +1 -1
  23. package/dist/config/index.d.ts +81 -0
  24. package/dist/{cose-bilkent-S5V4N54A-BRr2Y6dg-C4O3AMLV.js → cose-bilkent-S5V4N54A-BGzO4EsH-BNoSF82N.js} +1 -1
  25. package/dist/{dagre-6UL2VRFP-DX8gNHmJ-BSzSR8Xh.js → dagre-6UL2VRFP-TzNvXCds-Dnr2OGZv.js} +45 -45
  26. package/dist/{diagram-PSM6KHXK-DNX818To-D60Hp_rL.js → diagram-PSM6KHXK-BqY4RpUg-BAHxSfLA.js} +119 -119
  27. package/dist/{diagram-QEK2KX5R-BDO6hKtm-BHvRInjZ.js → diagram-QEK2KX5R-CTjgBsne-D-9APhrR.js} +74 -74
  28. package/dist/{diagram-S2PKOQOG-IEqaDwzi-CZZkmLuc.js → diagram-S2PKOQOG-BqrhTIpA-DvsAaFEx.js} +21 -21
  29. package/dist/{erDiagram-Q2GNP2WA-DbLpN8Jp-902zC-_U.js → erDiagram-Q2GNP2WA-B2hsi_Tl-CQQl2KTS.js} +24 -24
  30. package/dist/{flowDiagram-NV44I4VS-pJlHae8Y-hM8e9jah.js → flowDiagram-NV44I4VS-C03vtt_F-Ds5DxRz1.js} +37 -37
  31. package/dist/{ganttDiagram-JELNMOA3-J0Tkq5TR-C8n0Mtt1.js → ganttDiagram-JELNMOA3-B3hAg964-D9cHQTuZ.js} +110 -110
  32. package/dist/gitGraph-F6HP7TQM-B-XXB6PA-CXOJho2m.js +7 -0
  33. package/dist/{gitGraphDiagram-NY62KEGX-DgYonpsZ-CAVA4-Vo.js → gitGraphDiagram-NY62KEGX-ByhMH0yZ-DTWIR_Gp.js} +238 -238
  34. package/dist/{graph-BpcfrHXY-Dllj_YdG.js → graph-BmNkcFEM-CTJN7Ty_.js} +67 -67
  35. package/dist/hooks/useAnimationManagement.d.ts +16 -0
  36. package/dist/hooks/useInputManagement.d.ts +21 -0
  37. package/dist/hooks/useScrollManagement.d.ts +17 -0
  38. package/dist/index-BXexqYFc-Bn0M0HQB.js +13693 -0
  39. package/dist/{index-DlxA4QQ9.js → index-DU3Jqd59.js} +80142 -50172
  40. package/dist/index.d.ts +19 -0
  41. package/dist/info-NVLQJR56-BJV_yXNb-CH_hMh0K.js +7 -0
  42. package/dist/infoDiagram-WHAUD3N6-is6Ho4-T-E3qEjHYs.js +25 -0
  43. package/dist/{journeyDiagram-XKPGCS4Q-CfjB2Qdf-nD3bX36U.js → journeyDiagram-XKPGCS4Q-CRTOL26C-VvuJ7JPc.js} +71 -71
  44. package/dist/{kanban-definition-3W4ZIXB7-CrW8yVmd-C_Okjmcp.js → kanban-definition-3W4ZIXB7-CNnO_t6O-BsqhwZAY.js} +88 -88
  45. package/dist/{layout-bsfAhWjc-fb3F3QBs.js → layout-C0kZPebx-CrIgKtBd.js} +109 -109
  46. package/dist/{mermaid-parser.core-3GIbpcw--KxsyRnD0.js → mermaid-parser.core-C88_DDui-CHG6v5qB.js} +10 -10
  47. package/dist/min-7Gb0pNxh-Cd_K7Lpk.js +39 -0
  48. package/dist/{mindmap-definition-VGOIOE7T-Dj37RkY_-BXffQH_4.js → mindmap-definition-VGOIOE7T-CJZ2wTTa-D4yK-MK1.js} +40 -40
  49. package/dist/packet-BFZMPI3H-DPt2EftX-Bgsdgnv-.js +7 -0
  50. package/dist/pie-7BOR55EZ-aEOtXZZV-CT0TLfil.js +7 -0
  51. package/dist/{pieDiagram-ADFJNKIX-BiQvDx8I-DnApOdvY.js → pieDiagram-ADFJNKIX-C9OSknjr-DguaGmOm.js} +49 -49
  52. package/dist/{quadrantDiagram-AYHSOK5B-D4b-YFzI-DrTslixM.js → quadrantDiagram-AYHSOK5B-CW8yuAqv-Dp9c_xnT.js} +54 -54
  53. package/dist/radar-NHE76QYJ-Dv7iPziq-DzohugO5.js +7 -0
  54. package/dist/{requirementDiagram-UZGBJVZJ-km07nlVd-C-mMa1KG.js → requirementDiagram-UZGBJVZJ-nGPhruO1-DINXeP9u.js} +5 -5
  55. package/dist/{sankeyDiagram-TZEHDZUN-LfuSRRbf-4X6kl_ss.js → sankeyDiagram-TZEHDZUN-CmL90u-m-YTiy7xgb.js} +146 -146
  56. package/dist/{sequenceDiagram-WL72ISMW-CQ4J-0_7-CEQiE3WJ.js → sequenceDiagram-WL72ISMW-B02VRcnM-B0n6W8Zi.js} +3 -3
  57. package/dist/shared/styles.d.ts +76 -0
  58. package/dist/{stateDiagram-FKZM4ZOC-JtogJwt6-YmKguJGd.js → stateDiagram-FKZM4ZOC-DjoyLUdz-BEUNa8-U.js} +14 -14
  59. package/dist/{stateDiagram-v2-4FDKWEC3-DuQ7UaeU-D6r92VaJ.js → stateDiagram-v2-4FDKWEC3-Bq76BTB7-DJxNsvnB.js} +2 -2
  60. package/dist/store/chatStore.d.ts +19 -0
  61. package/dist/{timeline-definition-IT6M3QCI-Cs3NnF2M-BigQwSNM.js → timeline-definition-IT6M3QCI-CTn0Gm3T-sHrk-A3B.js} +78 -78
  62. package/dist/treemap-KMMF4GRG-BjgLKKyi-CXHyJ_sr.js +7 -0
  63. package/dist/ui/ChatInput.d.ts +17 -0
  64. package/dist/ui/Message.d.ts +22 -0
  65. package/dist/ui/MessagesList.d.ts +32 -0
  66. package/dist/utils/contentFiltering.d.ts +12 -0
  67. package/dist/utils/sessionManager.d.ts +2 -0
  68. package/dist/{xychartDiagram-PRI3JC2R-JzAaXa5z-k94imfkQ.js → xychartDiagram-PRI3JC2R-Cgg6Uija-BysdxdV7.js} +79 -79
  69. package/package.json +9 -9
  70. package/dist/arc-D9rhTKV0-3XdW6Lry.js +0 -84
  71. package/dist/architecture-U656AL7Q-BFNI3st4-ChEUjpe5.js +0 -6
  72. package/dist/channel-CUIutAfm-COC3Ib4R.js +0 -6
  73. package/dist/chunk-55IACEB6-Cza7pcpr-C1E53ZSc.js +0 -9
  74. package/dist/gitGraph-F6HP7TQM-CD3YuciB-WOZqeAgY.js +0 -6
  75. package/dist/index-DvNpGWs7-CTu7Fgm8.js +0 -13251
  76. package/dist/info-NVLQJR56-yPC6AWqF-CQWIUnLc.js +0 -6
  77. package/dist/infoDiagram-WHAUD3N6-C3JLOAnb-o3ipZ1gK.js +0 -25
  78. package/dist/min-C2aDz5ZK-NndI1eE7.js +0 -39
  79. package/dist/packet-BFZMPI3H-3ROFuof--C96yO55O.js +0 -6
  80. package/dist/pie-7BOR55EZ-BZ_QeD6P-Bs0c_r6N.js +0 -6
  81. package/dist/radar-NHE76QYJ-BkSncUeS-jHSdaVBc.js +0 -6
  82. package/dist/treemap-KMMF4GRG-CkW25-tn-CkfndsG5.js +0 -6
@@ -0,0 +1,76 @@
1
+ export declare const DEFAULT_MAX_SUGGESTED_QUESTION_LENGTH = 120;
2
+ export declare const DEFAULT_MAX_SUGGESTED_QUESTION_QUERY_LENGTH = 200;
3
+ export declare let CHAT_CONSTANTS: {
4
+ MAX_MESSAGE_LENGTH: number;
5
+ MAX_SUGGESTED_QUESTION_LENGTH: number;
6
+ MAX_SUGGESTED_QUESTION_QUERY_LENGTH: number;
7
+ WINDOW_DIMENSIONS: {
8
+ readonly HEIGHT: "600px";
9
+ readonly MAX_HEIGHT: "calc(100vh - 80px)";
10
+ readonly BREAKPOINTS: {
11
+ readonly SM: 640;
12
+ readonly MD: 768;
13
+ readonly LG: 1024;
14
+ };
15
+ readonly WIDTHS: {
16
+ readonly SM: "480px";
17
+ readonly MD: "600px";
18
+ readonly LG: "700px";
19
+ };
20
+ };
21
+ SCROLL_THRESHOLDS: {
22
+ readonly BOTTOM_THRESHOLD: 10;
23
+ readonly TOP_THRESHOLD: 10;
24
+ readonly SHOW_SCROLL_TOP_OFFSET: 200;
25
+ };
26
+ ANIMATIONS: {
27
+ readonly SCROLL_TIMEOUT: 300;
28
+ readonly TOGGLE_DELAY: 100;
29
+ readonly ANIMATION_SCROLL_INTERVAL: 100;
30
+ readonly COPY_FEEDBACK_DURATION: 2000;
31
+ readonly VISIBILITY_SKIP_THRESHOLD: 1000;
32
+ };
33
+ BUTTON_SIZES: {
34
+ readonly CHAT_BUTTON: {
35
+ readonly width: "68px";
36
+ readonly height: "68px";
37
+ };
38
+ readonly SEND_BUTTON: {
39
+ readonly width: "52px";
40
+ readonly height: "52px";
41
+ };
42
+ readonly ICON_SIZES: {
43
+ readonly HEADER: 28;
44
+ readonly WELCOME: 56;
45
+ readonly BUTTON: 20;
46
+ readonly SEND: 24;
47
+ readonly MINIMIZE: 28;
48
+ };
49
+ };
50
+ };
51
+ /**
52
+ * Global CSS styles for the ChatWidget component
53
+ */
54
+ export declare const CHAT_WIDGET_STYLES = "\n body, button, input, textarea {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n }\n \n /* Complete focus ring removal - covers all browsers and scenarios */\n textarea,\n textarea:focus,\n textarea:focus-visible,\n input,\n input:focus,\n input:focus-visible {\n outline: none !important;\n box-shadow: none !important;\n border-color: inherit !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n -webkit-tap-highlight-color: transparent !important;\n }\n \n /* Alternative: Uncomment for subtle light focus ring instead of complete removal */\n /*\n textarea:focus,\n textarea:focus-visible {\n outline: 2px solid rgba(203, 213, 225, 0.4) !important;\n outline-offset: -1px !important;\n box-shadow: 0 0 0 1px rgba(203, 213, 225, 0.2) !important;\n }\n */\n \n /* Remove webkit/safari specific styling */\n textarea::-webkit-input-placeholder,\n input::-webkit-input-placeholder {\n -webkit-appearance: none;\n }\n \n /* Ensure buttons also don't show focus rings */\n button:focus,\n button:focus-visible {\n outline: none !important;\n box-shadow: none !important;\n }\n\n /* Enhanced animations for modern feel */\n @keyframes slideInUp {\n 0% { \n opacity: 0; \n transform: translateY(20px) scale(0.95); \n }\n 100% { \n opacity: 1; \n transform: translateY(0) scale(1); \n }\n }\n\n @keyframes slideOutDown {\n 0% { \n opacity: 1; \n transform: translateY(0) scale(1); \n }\n 100% { \n opacity: 0; \n transform: translateY(20px) scale(0.95); \n }\n }\n\n .animate-slide-in-up {\n animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;\n }\n\n .animate-slide-out-down {\n animation: slideOutDown 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;\n }\n\n @keyframes pulseGlow {\n 0%, 100% { \n box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);\n }\n 50% { \n box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);\n }\n }\n\n .animate-pulse-glow {\n animation: pulseGlow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n }\n\n @keyframes messageEntry {\n 0% { \n opacity: 0; \n transform: translateY(10px) scale(0.98);\n }\n 100% { \n opacity: 1; \n transform: translateY(0) scale(1);\n }\n }\n\n .animate-message-entry {\n animation: messageEntry 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;\n }\n\n @keyframes buttonHover {\n 0% { transform: translateY(0) scale(1); }\n 100% { transform: translateY(-2px) scale(1.05); }\n }\n\n .animate-button-hover:hover {\n animation: buttonHover 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;\n }\n \n @keyframes fadeInOut {\n 0% { opacity: 0; transform: translateY(4px); }\n 20% { opacity: 1; transform: translateY(0); }\n 80% { opacity: 1; transform: translateY(0); }\n 100% { opacity: 0; transform: translateY(-4px); }\n }\n .animate-fade-in-out {\n animation: fadeInOut 2s ease-in-out forwards;\n }\n \n @keyframes bounce-gentle {\n 0%, 100% { transform: translateY(0); }\n 50% { transform: translateY(-8px); }\n }\n .animate-bounce-gentle {\n animation: bounce-gentle 3s ease-in-out infinite;\n animation-delay: 2s;\n }\n\n @keyframes float {\n 0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }\n 25% { transform: translateY(-8px) rotate(2deg) scale(1.02); }\n 50% { transform: translateY(-4px) rotate(-1deg) scale(1); }\n 75% { transform: translateY(-6px) rotate(1deg) scale(1.01); }\n }\n .animate-float {\n animation: float 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n }\n \n /* Modern typing dots animation */\n @keyframes dotWave {\n 0%, 60%, 100% {\n transform: translateY(0) scale(1);\n background-color: #9ca3af;\n }\n 30% {\n transform: translateY(-10px) scale(1.1);\n background-color: #6b7280;\n }\n }\n \n .typing-dots-container {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 2px 0;\n }\n \n .typing-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background-color: #9ca3af;\n animation: dotWave 1.4s ease-in-out infinite;\n }\n \n .typing-dot:nth-child(1) {\n animation-delay: 0s;\n }\n \n .typing-dot:nth-child(2) {\n animation-delay: 0.2s;\n }\n \n .typing-dot:nth-child(3) {\n animation-delay: 0.4s;\n }\n\n /* Glassmorphism effects */\n .glass-effect {\n backdrop-filter: blur(20px);\n -webkit-backdrop-filter: blur(20px);\n background: rgba(255, 255, 255, 0.8);\n border: 1px solid rgba(255, 255, 255, 0.3);\n }\n\n .glass-effect-dark {\n backdrop-filter: blur(20px);\n -webkit-backdrop-filter: blur(20px);\n background: rgba(30, 41, 59, 0.8);\n border: 1px solid rgba(255, 255, 255, 0.1);\n }\n\n /* Custom scrollbar */\n .custom-scrollbar::-webkit-scrollbar {\n width: 6px;\n }\n\n .custom-scrollbar::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n }\n\n .custom-scrollbar::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.2);\n border-radius: 3px;\n transition: background 0.2s ease;\n }\n\n .custom-scrollbar::-webkit-scrollbar-thumb:hover {\n background: rgba(0, 0, 0, 0.3);\n }\n\n /* Horizontal scrollbar for markdown content (tables, code blocks, etc.) */\n .markdown-content-wrapper {\n overflow-x: scroll !important; /* Use 'scroll' to always show scrollbar when content overflows */\n overflow-y: visible !important;\n -webkit-overflow-scrolling: touch;\n /* Force scrollbar to always be visible when content overflows */\n scrollbar-width: thin;\n scrollbar-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.15);\n }\n\n /* WebKit scrollbar - always visible when overflow */\n .markdown-content-wrapper::-webkit-scrollbar {\n height: 12px;\n width: 12px;\n /* Force scrollbar to always display */\n display: block;\n -webkit-appearance: none;\n }\n\n .markdown-content-wrapper::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.15);\n border-radius: 6px;\n margin: 4px;\n /* Make track always visible */\n -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);\n }\n\n .markdown-content-wrapper::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.4);\n border-radius: 6px;\n border: 2px solid transparent;\n background-clip: padding-box;\n transition: background 0.2s ease;\n /* Ensure thumb is always visible */\n min-height: 20px;\n }\n\n .markdown-content-wrapper::-webkit-scrollbar-thumb:hover {\n background: rgba(0, 0, 0, 0.6);\n background-clip: padding-box;\n }\n\n .markdown-content-wrapper::-webkit-scrollbar-thumb:active {\n background: rgba(0, 0, 0, 0.7);\n }\n\n .markdown-content-wrapper::-webkit-scrollbar-corner {\n background: rgba(0, 0, 0, 0.1);\n }\n\n /* Ensure scrollbar styling is consistent across browsers */\n @supports (-webkit-appearance: none) {\n .markdown-content-wrapper::-webkit-scrollbar {\n -webkit-appearance: none;\n }\n }\n\n /* Force scrollbar to always be visible when content overflows (macOS workaround) */\n .markdown-content-wrapper.has-horizontal-scroll {\n /* Reserve space for scrollbar */\n scrollbar-gutter: stable;\n }\n\n .markdown-content-wrapper.has-horizontal-scroll::-webkit-scrollbar {\n /* Force scrollbar to always be visible */\n display: block !important;\n opacity: 1 !important;\n visibility: visible !important;\n }\n\n .markdown-content-wrapper.has-horizontal-scroll::-webkit-scrollbar-track {\n /* Make track more visible */\n background: rgba(0, 0, 0, 0.2) !important;\n opacity: 1 !important;\n visibility: visible !important;\n }\n\n .markdown-content-wrapper.has-horizontal-scroll::-webkit-scrollbar-thumb {\n /* Make thumb more visible */\n background: rgba(0, 0, 0, 0.5) !important;\n opacity: 1 !important;\n visibility: visible !important;\n }\n\n /* Enhanced shadows */\n .shadow-elegant {\n box-shadow: \n 0 10px 25px -5px rgba(0, 0, 0, 0.1),\n 0 8px 10px -6px rgba(0, 0, 0, 0.1),\n 0 0 0 1px rgba(255, 255, 255, 0.05);\n }\n\n .shadow-soft {\n box-shadow: \n 0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n }\n\n .shadow-floating {\n box-shadow: \n 0 20px 25px -5px rgba(0, 0, 0, 0.1),\n 0 10px 10px -5px rgba(0, 0, 0, 0.04);\n }\n \n .prose {\n max-width: 100%;\n }\n \n .prose > * {\n margin-top: 0 !important;\n margin-bottom: 0.5em !important;\n }\n \n .prose p {\n margin: 0 0 0.5em 0 !important;\n padding: 0;\n line-height: 1.6;\n }\n \n .prose p:last-child {\n margin-bottom: 0 !important;\n }\n \n .prose ul,\n .prose ol {\n margin-top: 0.5em !important;\n margin-bottom: 0.5em !important;\n padding-left: 1.5em !important;\n }\n \n .prose li {\n margin-bottom: 0.25em !important;\n padding-left: 0.25em !important;\n line-height: 1.5;\n }\n \n .prose li p {\n margin: 0 !important;\n }\n \n .prose li + li {\n margin-top: 0.1em !important;\n }\n \n .prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {\n margin-top: 1em !important;\n margin-bottom: 0.5em !important;\n font-weight: 600;\n }\n\n /* Button enhancements */\n .btn-modern {\n position: relative;\n overflow: hidden;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .btn-modern::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));\n opacity: 0;\n transition: opacity 0.3s ease;\n }\n\n .btn-modern:hover::before {\n opacity: 1;\n }\n\n /* Input enhancements */\n .input-modern {\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .input-modern:focus {\n transform: translateY(-1px);\n }\n ";
55
+ /**
56
+ * Helper functions for responsive window dimensions
57
+ */
58
+ export declare const getResponsiveWidth: (windowWidth: number) => string;
59
+ export declare const getResponsiveMinWidth: (windowWidth: number) => string;
60
+ /**
61
+ * Font family constant for consistent typography
62
+ */
63
+ export declare const FONT_FAMILY = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif";
64
+ /**
65
+ * Character count styling helper
66
+ */
67
+ export declare const getCharacterCountStyle: (length: number, maxLength: number) => {
68
+ color: string;
69
+ backgroundColor: string;
70
+ fontSize: string;
71
+ };
72
+ export declare function setChatConstants(config: Partial<{
73
+ MAX_MESSAGE_LENGTH?: number;
74
+ MAX_SUGGESTED_QUESTION_LENGTH?: number;
75
+ MAX_SUGGESTED_QUESTION_QUERY_LENGTH?: number;
76
+ }>): void;
@@ -1,12 +1,12 @@
1
- import { U as A, B as G, M } from "./chunk-DI55MBZ5-DKt4WII7-CjsnNRFb.js";
2
- import { Q as y, k as t, w as v, s as E, f as O, l as H, av as U, aC as P, az as R, O as C } from "./index-DlxA4QQ9.js";
3
- import { Q as I } from "./graph-BpcfrHXY-Dllj_YdG.js";
4
- import { B as W } from "./layout-bsfAhWjc-fb3F3QBs.js";
1
+ import { U as A, B as C, M } from "./chunk-DI55MBZ5-Dw1L6Eos-zQC2oI_e.js";
2
+ import { M as y, C as t, d as v, a as E, i as G, m as H, av as U, aC as O, az as P, r as R } from "./index-DU3Jqd59.js";
3
+ import { Q as I } from "./graph-BmNkcFEM-CTJN7Ty_.js";
4
+ import { B as W } from "./layout-C0kZPebx-CrIgKtBd.js";
5
5
  typeof window < "u" && (window.global = window);
6
6
  var $ = /* @__PURE__ */ y((e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), "drawStartState"), F = /* @__PURE__ */ y((e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider"), J = /* @__PURE__ */ y((e, n) => {
7
7
  const g = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(n.id), s = g.node().getBBox();
8
8
  return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", s.width + 2 * t().state.padding).attr("height", s.height + 2 * t().state.padding).attr("rx", t().state.radius), g;
9
- }, "drawSimpleState"), Q = /* @__PURE__ */ y((e, n) => {
9
+ }, "drawSimpleState"), Y = /* @__PURE__ */ y((e, n) => {
10
10
  const g = /* @__PURE__ */ y(function(o, u, b) {
11
11
  const m = o.append("tspan").attr("x", 2 * t().state.padding).text(u);
12
12
  b || m.attr("dy", t().state.textHeight);
@@ -20,7 +20,7 @@ var $ = /* @__PURE__ */ y((e) => e.append("circle").attr("class", "start-state")
20
20
  });
21
21
  const r = e.append("line").attr("x1", t().state.padding).attr("y1", t().state.padding + d + t().state.dividerMargin / 2).attr("y2", t().state.padding + d + t().state.dividerMargin / 2).attr("class", "descr-divider"), x = c.node().getBBox(), h = Math.max(x.width, s.width);
22
22
  return r.attr("x2", h + 3 * t().state.padding), e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", h + 2 * t().state.padding).attr("height", x.height + d + 2 * t().state.padding).attr("rx", t().state.radius), e;
23
- }, "drawDescrState"), Y = /* @__PURE__ */ y((e, n, g) => {
23
+ }, "drawDescrState"), j = /* @__PURE__ */ y((e, n, g) => {
24
24
  const s = t().state.padding, d = 2 * t().state.padding, c = e.node().getBBox(), l = c.width, a = c.x, r = e.append("text").attr("x", 0).attr("y", t().state.titleShift).attr("font-size", t().state.fontSize).attr("class", "state-title").text(n.id), x = r.node().getBBox().width + d;
25
25
  let h = Math.max(x, l);
26
26
  h === l && (h = h + d);
@@ -38,7 +38,7 @@ var $ = /* @__PURE__ */ y((e) => e.append("circle").attr("class", "start-state")
38
38
  "y",
39
39
  t().state.titleShift - t().state.textHeight - t().state.padding
40
40
  ).attr("width", h).attr("height", u.height + 3 + 2 * t().state.textHeight).attr("rx", t().state.radius), e;
41
- }, "addTitleAndBox"), j = /* @__PURE__ */ y((e) => (e.append("circle").attr("class", "end-state-outer").attr("r", t().state.sizeUnit + t().state.miniPadding).attr(
41
+ }, "addTitleAndBox"), Q = /* @__PURE__ */ y((e) => (e.append("circle").attr("class", "end-state-outer").attr("r", t().state.sizeUnit + t().state.miniPadding).attr(
42
42
  "cx",
43
43
  t().state.padding + t().state.sizeUnit + t().state.miniPadding
44
44
  ).attr(
@@ -82,7 +82,7 @@ var $ = /* @__PURE__ */ y((e) => e.append("circle").attr("class", "start-state")
82
82
  width: 0,
83
83
  height: 0
84
84
  }, d = e.append("g").attr("id", g).attr("class", "stateGroup");
85
- n.type === "start" && $(d), n.type === "end" && j(d), (n.type === "fork" || n.type === "join") && X(d, n), n.type === "note" && Z(n.note.text, d), n.type === "divider" && F(d), n.type === "default" && n.descriptions.length === 0 && J(d, n), n.type === "default" && n.descriptions.length > 0 && Q(d, n);
85
+ n.type === "start" && $(d), n.type === "end" && Q(d), (n.type === "fork" || n.type === "join") && X(d, n), n.type === "note" && Z(n.note.text, d), n.type === "divider" && F(d), n.type === "default" && n.descriptions.length === 0 && J(d, n), n.type === "default" && n.descriptions.length > 0 && Y(d, n);
86
86
  const c = d.node().getBBox();
87
87
  return s.width = c.width + 2 * t().state.padding, s.height = c.height + 2 * t().state.padding, s;
88
88
  }, "drawState"), D = 0, K = /* @__PURE__ */ y(function(e, n, g) {
@@ -103,13 +103,13 @@ var $ = /* @__PURE__ */ y((e) => e.append("circle").attr("class", "start-state")
103
103
  return r.x;
104
104
  }).y(function(r) {
105
105
  return r.y;
106
- }).curve(P), l = e.append("path").attr("d", c(d)).attr("id", "edge" + D).attr("class", "transition");
106
+ }).curve(O), l = e.append("path").attr("d", c(d)).attr("id", "edge" + D).attr("class", "transition");
107
107
  let a = "";
108
- if (t().state.arrowMarkerAbsolute && (a = R(!0)), l.attr(
108
+ if (t().state.arrowMarkerAbsolute && (a = P(!0)), l.attr(
109
109
  "marker-end",
110
110
  "url(" + a + "#" + s(M.relationType.DEPENDENCY) + "End)"
111
111
  ), g.title !== void 0) {
112
- const r = e.append("g").attr("class", "stateLabel"), { x, y: h } = C.calcLabelPosition(n.points), o = H.getRows(g.title);
112
+ const r = e.append("g").attr("class", "stateLabel"), { x, y: h } = R.calcLabelPosition(n.points), o = H.getRows(g.title);
113
113
  let u = 0;
114
114
  const b = [];
115
115
  let m = 0, S = 0;
@@ -141,7 +141,7 @@ var $ = /* @__PURE__ */ y((e) => e.append("circle").attr("class", "start-state")
141
141
  const x = s.db.getRootDoc();
142
142
  L(x, r, void 0, !1, l, a, s);
143
143
  const h = B.padding, o = r.node().getBBox(), u = o.width + h * 2, b = o.height + h * 2, m = u * 1.75;
144
- O(r, b, m, B.useMaxWidth), r.attr(
144
+ G(r, b, m, B.useMaxWidth), r.attr(
145
145
  "viewBox",
146
146
  `${o.x - B.padding} ${o.y - B.padding} ` + u + " " + b
147
147
  );
@@ -191,7 +191,7 @@ var $ = /* @__PURE__ */ y((e) => e.append("circle").attr("class", "start-state")
191
191
  let w = n.append("g").attr("id", f.id).attr("class", "stateGroup");
192
192
  p = L(f.doc, w, f.id, !s, d, c, l);
193
193
  {
194
- w = Y(w, f, s);
194
+ w = j(w, f, s);
195
195
  let k = w.node().getBBox();
196
196
  p.width = k.width, p.height = k.height + B.padding / 2, z[f.id] = { y: B.compositTitleSize };
197
197
  }
@@ -249,7 +249,7 @@ var $ = /* @__PURE__ */ y((e) => e.append("circle").attr("class", "start-state")
249
249
  setConf: V,
250
250
  draw: tt
251
251
  }, st = {
252
- parser: G,
252
+ parser: C,
253
253
  get db() {
254
254
  return new M(1);
255
255
  },
@@ -1,5 +1,5 @@
1
- import { U as e, V as a, B as t, M as o } from "./chunk-DI55MBZ5-DKt4WII7-CjsnNRFb.js";
2
- import { Q as s } from "./index-DlxA4QQ9.js";
1
+ import { U as e, V as a, B as t, M as o } from "./chunk-DI55MBZ5-Dw1L6Eos-zQC2oI_e.js";
2
+ import { M as s } from "./index-DU3Jqd59.js";
3
3
  typeof window < "u" && (window.global = window);
4
4
  var w = {
5
5
  parser: t,
@@ -0,0 +1,19 @@
1
+ export type MessageRole = 'user' | 'assistant' | 'system';
2
+ export interface Message {
3
+ id: string;
4
+ role: MessageRole;
5
+ content: string;
6
+ }
7
+ interface ChatState {
8
+ messages: Message[];
9
+ isLoading: boolean;
10
+ error: string | null;
11
+ sessionId: string;
12
+ sendMessage: (content: string) => Promise<void>;
13
+ appendToLastMessage: (content: string) => void;
14
+ deleteConversation: () => Promise<void>;
15
+ clearMessages: () => void;
16
+ getSessionId: () => string;
17
+ }
18
+ export declare const useChatStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ChatState>>;
19
+ export {};
@@ -1,5 +1,5 @@
1
- import { Q as r, k as mt, s as $, w as U, aW as xt, aX as bt, aY as kt, aZ as _t, $ as vt, a_ as wt, F as St } from "./index-DlxA4QQ9.js";
2
- import { h as et } from "./arc-D9rhTKV0-3XdW6Lry.js";
1
+ import { M as r, C as mt, a as $, d as Y, aW as xt, aX as bt, aY as kt, aZ as _t, J as vt, a_ as wt, N as St } from "./index-DU3Jqd59.js";
2
+ import { h as et } from "./arc-pab_su9s-DkImmxyv.js";
3
3
  typeof window < "u" && (window.global = window);
4
4
  var X = function() {
5
5
  var n = /* @__PURE__ */ r(function(f, s, l, h) {
@@ -63,36 +63,36 @@ var X = function() {
63
63
  }
64
64
  }, "parseError"),
65
65
  parse: /* @__PURE__ */ r(function(f) {
66
- var s = this, l = [0], h = [], d = [null], c = [], k = this.table, x = "", N = 0, M = 0, W = 2, I = 1, D = c.slice.call(arguments, 1), _ = Object.create(this.lexer), S = { yy: {} };
66
+ var s = this, l = [0], h = [], d = [null], c = [], k = this.table, x = "", A = 0, M = 0, W = 2, I = 1, B = c.slice.call(arguments, 1), _ = Object.create(this.lexer), S = { yy: {} };
67
67
  for (var v in this.yy)
68
68
  Object.prototype.hasOwnProperty.call(this.yy, v) && (S.yy[v] = this.yy[v]);
69
69
  _.setInput(f, S.yy), S.yy.lexer = _, S.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
70
- var A = _.yylloc;
71
- c.push(A);
70
+ var N = _.yylloc;
71
+ c.push(N);
72
72
  var O = _.options && _.options.ranges;
73
73
  typeof S.yy.parseError == "function" ? this.parseError = S.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
74
74
  function L(E) {
75
75
  l.length = l.length - 2 * E, d.length = d.length - E, c.length = c.length - E;
76
76
  }
77
77
  r(L, "popStack");
78
- function P() {
78
+ function D() {
79
79
  var E;
80
80
  return E = h.pop() || _.lex() || I, typeof E != "number" && (E instanceof Array && (h = E, E = h.pop()), E = s.symbols_[E] || E), E;
81
81
  }
82
- r(P, "lex");
83
- for (var w, R, T, q, j = {}, z, C, tt, V; ; ) {
84
- if (R = l[l.length - 1], this.defaultActions[R] ? T = this.defaultActions[R] : ((w === null || typeof w > "u") && (w = P()), T = k[R] && k[R][w]), typeof T > "u" || !T.length || !T[0]) {
85
- var J = "";
82
+ r(D, "lex");
83
+ for (var w, R, T, J, P = {}, z, C, tt, V; ; ) {
84
+ if (R = l[l.length - 1], this.defaultActions[R] ? T = this.defaultActions[R] : ((w === null || typeof w > "u") && (w = D()), T = k[R] && k[R][w]), typeof T > "u" || !T.length || !T[0]) {
85
+ var U = "";
86
86
  V = [];
87
87
  for (z in k[R])
88
88
  this.terminals_[z] && z > W && V.push("'" + this.terminals_[z] + "'");
89
- _.showPosition ? J = "Parse error on line " + (N + 1) + `:
89
+ _.showPosition ? U = "Parse error on line " + (A + 1) + `:
90
90
  ` + _.showPosition() + `
91
- Expecting ` + V.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : J = "Parse error on line " + (N + 1) + ": Unexpected " + (w == I ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(J, {
91
+ Expecting ` + V.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : U = "Parse error on line " + (A + 1) + ": Unexpected " + (w == I ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(U, {
92
92
  text: _.match,
93
93
  token: this.terminals_[w] || w,
94
94
  line: _.yylineno,
95
- loc: A,
95
+ loc: N,
96
96
  expected: V
97
97
  });
98
98
  }
@@ -100,28 +100,28 @@ Expecting ` + V.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : J = "
100
100
  throw new Error("Parse Error: multiple actions possible at state: " + R + ", token: " + w);
101
101
  switch (T[0]) {
102
102
  case 1:
103
- l.push(w), d.push(_.yytext), c.push(_.yylloc), l.push(T[1]), w = null, M = _.yyleng, x = _.yytext, N = _.yylineno, A = _.yylloc;
103
+ l.push(w), d.push(_.yytext), c.push(_.yylloc), l.push(T[1]), w = null, M = _.yyleng, x = _.yytext, A = _.yylineno, N = _.yylloc;
104
104
  break;
105
105
  case 2:
106
- if (C = this.productions_[T[1]][1], j.$ = d[d.length - C], j._$ = {
106
+ if (C = this.productions_[T[1]][1], P.$ = d[d.length - C], P._$ = {
107
107
  first_line: c[c.length - (C || 1)].first_line,
108
108
  last_line: c[c.length - 1].last_line,
109
109
  first_column: c[c.length - (C || 1)].first_column,
110
110
  last_column: c[c.length - 1].last_column
111
- }, O && (j._$.range = [
111
+ }, O && (P._$.range = [
112
112
  c[c.length - (C || 1)].range[0],
113
113
  c[c.length - 1].range[1]
114
- ]), q = this.performAction.apply(j, [
114
+ ]), J = this.performAction.apply(P, [
115
115
  x,
116
116
  M,
117
- N,
117
+ A,
118
118
  S.yy,
119
119
  T[1],
120
120
  d,
121
121
  c
122
- ].concat(D)), typeof q < "u")
123
- return q;
124
- C && (l = l.slice(0, -1 * C * 2), d = d.slice(0, -1 * C), c = c.slice(0, -1 * C)), l.push(this.productions_[T[1]][0]), d.push(j.$), c.push(j._$), tt = k[l[l.length - 2]][l[l.length - 1]], l.push(tt);
122
+ ].concat(B)), typeof J < "u")
123
+ return J;
124
+ C && (l = l.slice(0, -1 * C * 2), d = d.slice(0, -1 * C), c = c.slice(0, -1 * C)), l.push(this.productions_[T[1]][0]), d.push(P.$), c.push(P._$), tt = k[l[l.length - 2]][l[l.length - 1]], l.push(tt);
125
125
  break;
126
126
  case 3:
127
127
  return !0;
@@ -367,10 +367,10 @@ vt(rt, {
367
367
  getSections: () => ht,
368
368
  getTasks: () => dt
369
369
  });
370
- var B = "", at = 0, G = [], Y = [], F = [], ot = /* @__PURE__ */ r(() => wt, "getCommonDb"), ct = /* @__PURE__ */ r(function() {
371
- G.length = 0, Y.length = 0, B = "", F.length = 0, St();
370
+ var j = "", at = 0, G = [], Z = [], F = [], ot = /* @__PURE__ */ r(() => wt, "getCommonDb"), ct = /* @__PURE__ */ r(function() {
371
+ G.length = 0, Z.length = 0, j = "", F.length = 0, St();
372
372
  }, "clear"), lt = /* @__PURE__ */ r(function(n) {
373
- B = n, G.push(n);
373
+ j = n, G.push(n);
374
374
  }, "addSection"), ht = /* @__PURE__ */ r(function() {
375
375
  return G;
376
376
  }, "getSections"), dt = /* @__PURE__ */ r(function() {
@@ -379,12 +379,12 @@ var B = "", at = 0, G = [], Y = [], F = [], ot = /* @__PURE__ */ r(() => wt, "ge
379
379
  let e = 0;
380
380
  for (; !n && e < t; )
381
381
  n = nt(), e++;
382
- return Y.push(...F), Y;
382
+ return Z.push(...F), Z;
383
383
  }, "getTasks"), ut = /* @__PURE__ */ r(function(n, t, e) {
384
384
  const a = {
385
385
  id: at++,
386
- section: B,
387
- type: B,
386
+ section: j,
387
+ type: j,
388
388
  task: n,
389
389
  score: t || 0,
390
390
  //if event is defined, then add it the events array
@@ -395,13 +395,13 @@ var B = "", at = 0, G = [], Y = [], F = [], ot = /* @__PURE__ */ r(() => wt, "ge
395
395
  F.find((t) => t.id === at - 1).events.push(n);
396
396
  }, "addEvent"), yt = /* @__PURE__ */ r(function(n) {
397
397
  const t = {
398
- section: B,
399
- type: B,
398
+ section: j,
399
+ type: j,
400
400
  description: n,
401
401
  task: n,
402
402
  classes: []
403
403
  };
404
- Y.push(t);
404
+ Z.push(t);
405
405
  }, "addTaskOrg"), nt = /* @__PURE__ */ r(function() {
406
406
  const n = /* @__PURE__ */ r(function(e) {
407
407
  return F[e].processed;
@@ -419,7 +419,7 @@ var B = "", at = 0, G = [], Y = [], F = [], ot = /* @__PURE__ */ r(() => wt, "ge
419
419
  addTask: ut,
420
420
  addTaskOrg: yt,
421
421
  addEvent: pt
422
- }, Tt = 12, Z = /* @__PURE__ */ r(function(n, t) {
422
+ }, Tt = 12, q = /* @__PURE__ */ r(function(n, t) {
423
423
  const e = n.append("rect");
424
424
  return e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), e.attr("rx", t.rx), e.attr("ry", t.ry), t.class !== void 0 && e.attr("class", t.class), e;
425
425
  }, "drawRect"), Mt = /* @__PURE__ */ r(function(n, t) {
@@ -439,7 +439,7 @@ var B = "", at = 0, G = [], Y = [], F = [], ot = /* @__PURE__ */ r(() => wt, "ge
439
439
  p.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", t.cx - 5).attr("y1", t.cy + 7).attr("x2", t.cx + 5).attr("y2", t.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
440
440
  }
441
441
  return r(u, "ambivalent"), t.score > 3 ? i(a) : t.score < 3 ? o(a) : u(a), e;
442
- }, "drawFace"), At = /* @__PURE__ */ r(function(n, t) {
442
+ }, "drawFace"), Nt = /* @__PURE__ */ r(function(n, t) {
443
443
  const e = n.append("circle");
444
444
  return e.attr("cx", t.cx), e.attr("cy", t.cy), e.attr("class", "actor-" + t.pos), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("r", t.r), e.class !== void 0 && e.attr("class", e.class), t.title !== void 0 && e.append("title").text(t.title), e;
445
445
  }, "drawCircle"), gt = /* @__PURE__ */ r(function(n, t) {
@@ -447,7 +447,7 @@ var B = "", at = 0, G = [], Y = [], F = [], ot = /* @__PURE__ */ r(() => wt, "ge
447
447
  a.attr("x", t.x), a.attr("y", t.y), a.attr("class", "legend"), a.style("text-anchor", t.anchor), t.class !== void 0 && a.attr("class", t.class);
448
448
  const i = a.append("tspan");
449
449
  return i.attr("x", t.x + t.textMargin * 2), i.text(e), a;
450
- }, "drawText"), Nt = /* @__PURE__ */ r(function(n, t) {
450
+ }, "drawText"), At = /* @__PURE__ */ r(function(n, t) {
451
451
  function e(i, o, u, p, y) {
452
452
  return i + "," + o + " " + (i + u) + "," + o + " " + (i + u) + "," + (o + p - y) + " " + (i + u - y * 1.2) + "," + (o + p) + " " + i + "," + (o + p);
453
453
  }
@@ -455,8 +455,8 @@ var B = "", at = 0, G = [], Y = [], F = [], ot = /* @__PURE__ */ r(() => wt, "ge
455
455
  const a = n.append("polygon");
456
456
  a.attr("points", e(t.x, t.y, 50, 20, 7)), a.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, gt(n, t);
457
457
  }, "drawLabel"), Ct = /* @__PURE__ */ r(function(n, t, e) {
458
- const a = n.append("g"), i = K();
459
- i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = e.width, i.height = e.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, Z(a, i), ft(e)(
458
+ const a = n.append("g"), i = Q();
459
+ i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = e.width, i.height = e.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, q(a, i), ft(e)(
460
460
  t.text,
461
461
  a,
462
462
  i.x,
@@ -474,8 +474,8 @@ var B = "", at = 0, G = [], Y = [], F = [], ot = /* @__PURE__ */ r(() => wt, "ge
474
474
  cy: 300 + (5 - t.score) * 30,
475
475
  score: t.score
476
476
  });
477
- const o = K();
478
- o.x = t.x, o.y = t.y, o.fill = t.fill, o.width = e.width, o.height = e.height, o.class = "task task-type-" + t.num, o.rx = 3, o.ry = 3, Z(i, o), ft(e)(
477
+ const o = Q();
478
+ o.x = t.x, o.y = t.y, o.fill = t.fill, o.width = e.width, o.height = e.height, o.class = "task task-type-" + t.num, o.rx = 3, o.ry = 3, q(i, o), ft(e)(
479
479
  t.task,
480
480
  i,
481
481
  o.x,
@@ -487,7 +487,7 @@ var B = "", at = 0, G = [], Y = [], F = [], ot = /* @__PURE__ */ r(() => wt, "ge
487
487
  t.colour
488
488
  );
489
489
  }, "drawTask"), Ot = /* @__PURE__ */ r(function(n, t) {
490
- Z(n, {
490
+ q(n, {
491
491
  x: t.startx,
492
492
  y: t.starty,
493
493
  width: t.stopx - t.startx,
@@ -507,7 +507,7 @@ var B = "", at = 0, G = [], Y = [], F = [], ot = /* @__PURE__ */ r(() => wt, "ge
507
507
  rx: 0,
508
508
  ry: 0
509
509
  };
510
- }, "getTextObj"), K = /* @__PURE__ */ r(function() {
510
+ }, "getTextObj"), Q = /* @__PURE__ */ r(function() {
511
511
  return {
512
512
  x: 0,
513
513
  y: 0,
@@ -546,14 +546,14 @@ var B = "", at = 0, G = [], Y = [], F = [], ot = /* @__PURE__ */ r(() => wt, "ge
546
546
  }(), Rt = /* @__PURE__ */ r(function(n) {
547
547
  n.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
548
548
  }, "initGraphics");
549
- function Q(n, t) {
549
+ function K(n, t) {
550
550
  n.each(function() {
551
- var e = U(this), a = e.text().split(/(\s+|<br>)/).reverse(), i, o = [], u = 1.1, p = e.attr("y"), y = parseFloat(e.attr("dy")), m = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", y + "em");
551
+ var e = Y(this), a = e.text().split(/(\s+|<br>)/).reverse(), i, o = [], u = 1.1, p = e.attr("y"), y = parseFloat(e.attr("dy")), m = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", y + "em");
552
552
  for (let b = 0; b < a.length; b++)
553
553
  i = a[a.length - 1 - b], o.push(i), m.text(o.join(" ").trim()), (m.node().getComputedTextLength() > t || i === "<br>") && (o.pop(), m.text(o.join(" ").trim()), i === "<br>" ? o = [""] : o = [i], m = e.append("tspan").attr("x", 0).attr("y", p).attr("dy", u + "em").text(i));
554
554
  });
555
555
  }
556
- r(Q, "wrap");
556
+ r(K, "wrap");
557
557
  var Ht = /* @__PURE__ */ r(function(n, t, e, a) {
558
558
  var i;
559
559
  const o = e % Tt - 1, u = n.append("g");
@@ -561,44 +561,44 @@ var Ht = /* @__PURE__ */ r(function(n, t, e, a) {
561
561
  "class",
562
562
  (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + o)
563
563
  );
564
- const p = u.append("g"), y = u.append("g"), m = y.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(Q, t.width).node().getBBox(), b = (i = a.fontSize) != null && i.replace ? a.fontSize.replace("px", "") : a.fontSize;
565
- return t.height = m.height + b * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, y.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), Pt(p, t, o, a), t;
566
- }, "drawNode"), Dt = /* @__PURE__ */ r(function(n, t, e) {
564
+ const p = u.append("g"), y = u.append("g"), m = y.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(K, t.width).node().getBBox(), b = (i = a.fontSize) != null && i.replace ? a.fontSize.replace("px", "") : a.fontSize;
565
+ return t.height = m.height + b * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, y.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), Dt(p, t, o, a), t;
566
+ }, "drawNode"), Bt = /* @__PURE__ */ r(function(n, t, e) {
567
567
  var a;
568
- const i = n.append("g"), o = i.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(Q, t.width).node().getBBox(), u = (a = e.fontSize) != null && a.replace ? e.fontSize.replace("px", "") : e.fontSize;
568
+ const i = n.append("g"), o = i.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(K, t.width).node().getBBox(), u = (a = e.fontSize) != null && a.replace ? e.fontSize.replace("px", "") : e.fontSize;
569
569
  return i.remove(), o.height + u * 1.1 * 0.5 + t.padding;
570
- }, "getVirtualNodeHeight"), Pt = /* @__PURE__ */ r(function(n, t, e) {
570
+ }, "getVirtualNodeHeight"), Dt = /* @__PURE__ */ r(function(n, t, e) {
571
571
  n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
572
572
  "d",
573
573
  `M0 ${t.height - 5} v${-t.height + 10} q0,-5 5,-5 h${t.width - 10} q5,0 5,5 v${t.height - 5} H0 Z`
574
574
  ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
575
575
  }, "defaultBkg"), H = {
576
- drawRect: Z,
577
- drawCircle: At,
576
+ drawRect: q,
577
+ drawCircle: Nt,
578
578
  drawSection: Ct,
579
579
  drawText: gt,
580
- drawLabel: Nt,
580
+ drawLabel: At,
581
581
  drawTask: It,
582
582
  drawBackgroundRect: Ot,
583
583
  getTextObj: Lt,
584
- getNoteRect: K,
584
+ getNoteRect: Q,
585
585
  initGraphics: Rt,
586
586
  drawNode: Ht,
587
- getVirtualNodeHeight: Dt
588
- }, jt = /* @__PURE__ */ r(function(n, t, e, a) {
587
+ getVirtualNodeHeight: Bt
588
+ }, Pt = /* @__PURE__ */ r(function(n, t, e, a) {
589
589
  var i, o, u;
590
590
  const p = mt(), y = ((i = p.timeline) == null ? void 0 : i.leftMargin) ?? 50;
591
591
  $.debug("timeline", a.db);
592
592
  const m = p.securityLevel;
593
593
  let b;
594
- m === "sandbox" && (b = U("#i" + t));
595
- const g = (m === "sandbox" ? U(b.nodes()[0].contentDocument.body) : U("body")).select("#" + t);
594
+ m === "sandbox" && (b = Y("#i" + t));
595
+ const g = (m === "sandbox" ? Y(b.nodes()[0].contentDocument.body) : Y("body")).select("#" + t);
596
596
  g.append("g");
597
597
  const f = a.db.getTasks(), s = a.db.getCommonDb().getDiagramTitle();
598
598
  $.debug("task", f), H.initGraphics(g);
599
599
  const l = a.db.getSections();
600
600
  $.debug("sections", l);
601
- let h = 0, d = 0, c = 0, k = 0, x = 50 + y, N = 50;
601
+ let h = 0, d = 0, c = 0, k = 0, x = 50 + y, A = 50;
602
602
  k = 50;
603
603
  let M = 0, W = !0;
604
604
  l.forEach(function(S) {
@@ -609,25 +609,25 @@ var Ht = /* @__PURE__ */ r(function(n, t, e, a) {
609
609
  width: 150,
610
610
  padding: 20,
611
611
  maxHeight: h
612
- }, A = H.getVirtualNodeHeight(g, v, p);
613
- $.debug("sectionHeight before draw", A), h = Math.max(h, A + 20);
612
+ }, N = H.getVirtualNodeHeight(g, v, p);
613
+ $.debug("sectionHeight before draw", N), h = Math.max(h, N + 20);
614
614
  });
615
- let I = 0, D = 0;
615
+ let I = 0, B = 0;
616
616
  $.debug("tasks.length", f.length);
617
617
  for (const [S, v] of f.entries()) {
618
- const A = {
618
+ const N = {
619
619
  number: S,
620
620
  descr: v,
621
621
  section: v.section,
622
622
  width: 150,
623
623
  padding: 20,
624
624
  maxHeight: d
625
- }, O = H.getVirtualNodeHeight(g, A, p);
625
+ }, O = H.getVirtualNodeHeight(g, N, p);
626
626
  $.debug("taskHeight before draw", O), d = Math.max(d, O + 20), I = Math.max(I, v.events.length);
627
627
  let L = 0;
628
- for (const P of v.events) {
628
+ for (const D of v.events) {
629
629
  const w = {
630
- descr: P,
630
+ descr: D,
631
631
  section: v.section,
632
632
  number: v.section,
633
633
  width: 150,
@@ -636,10 +636,10 @@ var Ht = /* @__PURE__ */ r(function(n, t, e, a) {
636
636
  };
637
637
  L += H.getVirtualNodeHeight(g, w, p);
638
638
  }
639
- v.events.length > 0 && (L += (v.events.length - 1) * 10), D = Math.max(D, L);
639
+ v.events.length > 0 && (L += (v.events.length - 1) * 10), B = Math.max(B, L);
640
640
  }
641
641
  $.debug("maxSectionHeight before draw", h), $.debug("maxTaskHeight before draw", d), l && l.length > 0 ? l.forEach((S) => {
642
- const v = f.filter((P) => P.section === S), A = {
642
+ const v = f.filter((D) => D.section === S), N = {
643
643
  number: M,
644
644
  descr: S,
645
645
  section: M,
@@ -647,31 +647,31 @@ var Ht = /* @__PURE__ */ r(function(n, t, e, a) {
647
647
  padding: 20,
648
648
  maxHeight: h
649
649
  };
650
- $.debug("sectionNode", A);
651
- const O = g.append("g"), L = H.drawNode(O, A, M, p);
652
- $.debug("sectionNode output", L), O.attr("transform", `translate(${x}, ${k})`), N += h + 50, v.length > 0 && st(
650
+ $.debug("sectionNode", N);
651
+ const O = g.append("g"), L = H.drawNode(O, N, M, p);
652
+ $.debug("sectionNode output", L), O.attr("transform", `translate(${x}, ${k})`), A += h + 50, v.length > 0 && st(
653
653
  g,
654
654
  v,
655
655
  M,
656
656
  x,
657
- N,
657
+ A,
658
658
  d,
659
659
  p,
660
660
  I,
661
- D,
661
+ B,
662
662
  h,
663
663
  !1
664
- ), x += 200 * Math.max(v.length, 1), N = k, M++;
664
+ ), x += 200 * Math.max(v.length, 1), A = k, M++;
665
665
  }) : (W = !1, st(
666
666
  g,
667
667
  f,
668
668
  M,
669
669
  x,
670
- N,
670
+ A,
671
671
  d,
672
672
  p,
673
673
  I,
674
- D,
674
+ B,
675
675
  h,
676
676
  !0
677
677
  ));
@@ -698,12 +698,12 @@ var Ht = /* @__PURE__ */ r(function(n, t, e, a) {
698
698
  if ($.debug("taskHeight after draw", h), l.attr("transform", `translate(${a}, ${i})`), o = Math.max(o, h), f.events) {
699
699
  const d = n.append("g").attr("class", "lineWrapper");
700
700
  let c = o;
701
- i += 100, c = c + Bt(n, f.events, e, a, i, u), i -= 100, d.append("line").attr("x1", a + 190 / 2).attr("y1", i + o).attr("x2", a + 190 / 2).attr("y2", i + o + 100 + y + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
701
+ i += 100, c = c + jt(n, f.events, e, a, i, u), i -= 100, d.append("line").attr("x1", a + 190 / 2).attr("y1", i + o).attr("x2", a + 190 / 2).attr("y2", i + o + 100 + y + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
702
702
  }
703
703
  a = a + 200, b && !((g = u.timeline) != null && g.disableMulticolor) && e++;
704
704
  }
705
705
  i = i - 10;
706
- }, "drawTasks"), Bt = /* @__PURE__ */ r(function(n, t, e, a, i, o) {
706
+ }, "drawTasks"), jt = /* @__PURE__ */ r(function(n, t, e, a, i, o) {
707
707
  let u = 0;
708
708
  const p = i;
709
709
  i = i + 100;
@@ -724,7 +724,7 @@ var Ht = /* @__PURE__ */ r(function(n, t, e, a) {
724
724
  }, "drawEvents"), Ft = {
725
725
  setConf: /* @__PURE__ */ r(() => {
726
726
  }, "setConf"),
727
- draw: jt
727
+ draw: Pt
728
728
  }, Wt = /* @__PURE__ */ r((n) => {
729
729
  let t = "";
730
730
  for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
@@ -789,12 +789,12 @@ var Ht = /* @__PURE__ */ r(function(n, t, e, a) {
789
789
  .eventWrapper {
790
790
  filter: brightness(120%);
791
791
  }
792
- `, "getStyles"), Vt = zt, Zt = {
792
+ `, "getStyles"), Vt = zt, qt = {
793
793
  db: rt,
794
794
  renderer: Ft,
795
795
  parser: $t,
796
796
  styles: Vt
797
797
  };
798
798
  export {
799
- Zt as diagram
799
+ qt as diagram
800
800
  };
@@ -0,0 +1,7 @@
1
+ import { U as o } from "./mermaid-parser.core-C88_DDui-CHG6v5qB.js";
2
+ import { G as i } from "./mermaid-parser.core-C88_DDui-CHG6v5qB.js";
3
+ typeof window < "u" && (window.global = window);
4
+ export {
5
+ i as TreemapModule,
6
+ o as createTreemapServices
7
+ };