@scalar/agent-chat 0.2.3 → 0.2.6

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 (270) hide show
  1. package/LICENSE +21 -0
  2. package/dist/App.vue.d.ts +3 -2
  3. package/dist/App.vue.d.ts.map +1 -1
  4. package/dist/App.vue.js +32 -0
  5. package/dist/App.vue2.js +4 -0
  6. package/dist/Chat.vue.d.ts.map +1 -1
  7. package/dist/Chat.vue.js +23 -0
  8. package/dist/Chat.vue2.js +4 -0
  9. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  10. package/dist/api.d.ts +50 -0
  11. package/dist/api.d.ts.map +1 -0
  12. package/dist/api.js +68 -0
  13. package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
  14. package/dist/components/ApprovalSection.vue.js +7 -0
  15. package/dist/components/ApprovalSection.vue2.js +42 -0
  16. package/dist/components/AuthenticationProvided.vue.d.ts +3 -0
  17. package/dist/components/AuthenticationProvided.vue.d.ts.map +1 -0
  18. package/dist/components/AuthenticationProvided.vue.js +13 -0
  19. package/dist/components/AuthenticationRequired.vue.d.ts +3 -0
  20. package/dist/components/AuthenticationRequired.vue.d.ts.map +1 -0
  21. package/dist/components/AuthenticationRequired.vue.js +13 -0
  22. package/dist/components/AutosendPaused.vue.d.ts.map +1 -1
  23. package/dist/components/AutosendPaused.vue.js +13 -0
  24. package/dist/components/ContextItem.vue.d.ts.map +1 -1
  25. package/dist/components/ContextItem.vue.js +7 -0
  26. package/dist/components/ContextItem.vue2.js +19 -0
  27. package/dist/components/ErrorMessage.vue.d.ts +2 -1
  28. package/dist/components/ErrorMessage.vue.d.ts.map +1 -1
  29. package/dist/components/ErrorMessage.vue.js +7 -0
  30. package/dist/components/ErrorMessage.vue2.js +22 -0
  31. package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts.map +1 -1
  32. package/dist/components/LoadingMiniOpenAPIDoc.vue.js +14 -0
  33. package/dist/components/LoadingOpenAPISpecsSummary.vue.d.ts.map +1 -1
  34. package/dist/components/LoadingOpenAPISpecsSummary.vue.js +14 -0
  35. package/dist/components/Logo.vue.d.ts.map +1 -1
  36. package/dist/components/Logo.vue.js +23 -0
  37. package/dist/components/PaymentSection.vue.d.ts.map +1 -1
  38. package/dist/components/PaymentSection.vue.js +7 -0
  39. package/dist/components/PaymentSection.vue2.js +34 -0
  40. package/dist/components/RequestApproved.vue.d.ts.map +1 -1
  41. package/dist/components/RequestApproved.vue.js +13 -0
  42. package/dist/components/RequestFailed.vue.d.ts.map +1 -1
  43. package/dist/components/RequestFailed.vue.js +24 -0
  44. package/dist/components/RequestPreview.vue.d.ts +1 -1
  45. package/dist/components/RequestPreview.vue.d.ts.map +1 -1
  46. package/dist/components/RequestPreview.vue.js +7 -0
  47. package/dist/components/RequestPreview.vue2.js +123 -0
  48. package/dist/components/RequestRejected.vue.d.ts.map +1 -1
  49. package/dist/components/RequestRejected.vue.js +22 -0
  50. package/dist/components/RequestSuccess.vue.d.ts.map +1 -1
  51. package/dist/components/RequestSuccess.vue.js +13 -0
  52. package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
  53. package/dist/components/ResponseBody/ResponseBody.vue.d.ts.map +1 -1
  54. package/dist/components/ResponseBody/ResponseBody.vue.js +41 -0
  55. package/dist/components/ResponseBody/ResponseBody.vue2.js +4 -0
  56. package/dist/components/ResponseBody/ResponseBodyInfo.vue.d.ts.map +1 -1
  57. package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +14 -0
  58. package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
  59. package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts.map +1 -1
  60. package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +7 -0
  61. package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +65 -0
  62. package/dist/components/ResponseBody/ResponseBodyRaw.vue.d.ts.map +1 -1
  63. package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +20 -0
  64. package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +4 -0
  65. package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts +2 -2
  66. package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts.map +1 -1
  67. package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +26 -0
  68. package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +4 -0
  69. package/dist/components/ResponseBody/helpers/media-types.js +130 -0
  70. package/dist/components/ResponseBody/helpers/process-response-body.d.ts +1 -1
  71. package/dist/components/ResponseBody/helpers/process-response-body.d.ts.map +1 -1
  72. package/dist/components/ResponseBody/helpers/process-response-body.js +33 -0
  73. package/dist/components/SearchPopover.vue.d.ts +2 -2
  74. package/dist/components/SearchPopover.vue.d.ts.map +1 -1
  75. package/dist/components/SearchPopover.vue.js +7 -0
  76. package/dist/components/SearchPopover.vue2.js +67 -0
  77. package/dist/components/Selector.vue.d.ts +24 -0
  78. package/dist/components/Selector.vue.d.ts.map +1 -0
  79. package/dist/components/Selector.vue.js +67 -0
  80. package/dist/components/Selector.vue2.js +4 -0
  81. package/dist/components/SendingRequest.vue.d.ts.map +1 -1
  82. package/dist/components/SendingRequest.vue.js +24 -0
  83. package/dist/components/ServerSelector.vue.d.ts +22 -0
  84. package/dist/components/ServerSelector.vue.d.ts.map +1 -0
  85. package/dist/components/ServerSelector.vue.js +57 -0
  86. package/dist/components/ServerSelector.vue2.js +4 -0
  87. package/dist/components/Suggestion.vue.d.ts.map +1 -1
  88. package/dist/components/TestRequestButton.vue.d.ts.map +1 -1
  89. package/dist/components/{Endpoint.vue.d.ts → UploadSection.vue.d.ts} +3 -5
  90. package/dist/components/UploadSection.vue.d.ts.map +1 -0
  91. package/dist/components/UploadSection.vue.js +7 -0
  92. package/dist/components/UploadSection.vue2.js +62 -0
  93. package/dist/entities/prompt/constants.d.ts +2 -0
  94. package/dist/entities/prompt/constants.d.ts.map +1 -0
  95. package/dist/entities/prompt/constants.js +4 -0
  96. package/dist/entities/registry/document.d.ts +21 -0
  97. package/dist/entities/registry/document.d.ts.map +1 -0
  98. package/dist/entities/registry/document.js +12 -0
  99. package/dist/entities/tools/ask-for-authentication.d.ts +7 -0
  100. package/dist/entities/tools/ask-for-authentication.d.ts.map +1 -0
  101. package/dist/entities/tools/ask-for-authentication.js +8 -0
  102. package/dist/entities/tools/constants.d.ts +2 -0
  103. package/dist/entities/tools/constants.d.ts.map +1 -0
  104. package/dist/entities/tools/constants.js +4 -0
  105. package/dist/entities/tools/execute-request.d.ts +42 -0
  106. package/dist/entities/tools/execute-request.d.ts.map +1 -0
  107. package/dist/entities/tools/execute-request.js +11 -0
  108. package/dist/entities/tools/get-mini-openapi-spec.d.ts +12 -0
  109. package/dist/entities/tools/get-mini-openapi-spec.d.ts.map +1 -0
  110. package/dist/entities/tools/get-mini-openapi-spec.js +8 -0
  111. package/dist/entities/tools/get-openapi-spec-summary.d.ts +10 -0
  112. package/dist/entities/tools/get-openapi-spec-summary.d.ts.map +1 -0
  113. package/dist/entities/tools/get-openapi-spec-summary.js +4 -0
  114. package/dist/helpers.d.ts +20 -12
  115. package/dist/helpers.d.ts.map +1 -1
  116. package/dist/helpers.js +122 -0
  117. package/dist/hooks/{useChatApprovals.d.ts → use-chat-approvals.d.ts} +1 -1
  118. package/dist/hooks/use-chat-approvals.d.ts.map +1 -0
  119. package/dist/hooks/use-chat-approvals.js +21 -0
  120. package/dist/hooks/use-chat-error.d.ts +14 -0
  121. package/dist/hooks/use-chat-error.d.ts.map +1 -0
  122. package/dist/hooks/use-chat-error.js +23 -0
  123. package/dist/hooks/use-chat-pending-client-tool-parts.d.ts +19 -0
  124. package/dist/hooks/use-chat-pending-client-tool-parts.d.ts.map +1 -0
  125. package/dist/hooks/use-chat-pending-client-tool-parts.js +12 -0
  126. package/dist/hooks/{useChatScroll.d.ts → use-chat-scroll.d.ts} +1 -1
  127. package/dist/hooks/use-chat-scroll.d.ts.map +1 -0
  128. package/dist/hooks/use-chat-scroll.js +16 -0
  129. package/dist/hooks/{useSearch.d.ts → use-search.d.ts} +11 -11
  130. package/dist/hooks/use-search.d.ts.map +1 -0
  131. package/dist/hooks/use-search.js +25 -0
  132. package/dist/hooks/use-term-and-conditions.d.ts +6 -0
  133. package/dist/hooks/use-term-and-conditions.d.ts.map +1 -0
  134. package/dist/hooks/use-term-and-conditions.js +16 -0
  135. package/dist/hooks/use-upload-tmp-document.d.ts +19 -0
  136. package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -0
  137. package/dist/hooks/use-upload-tmp-document.js +64 -0
  138. package/dist/index.d.ts +2 -1
  139. package/dist/index.d.ts.map +1 -1
  140. package/dist/index.js +2 -1
  141. package/dist/package.json +34 -23
  142. package/dist/registry/add-documents-to-store.d.ts +6 -6
  143. package/dist/registry/add-documents-to-store.d.ts.map +1 -1
  144. package/dist/registry/add-documents-to-store.js +40 -0
  145. package/dist/registry/create-document-name.d.ts +2 -0
  146. package/dist/registry/create-document-name.d.ts.map +1 -0
  147. package/dist/registry/create-document-name.js +6 -0
  148. package/dist/state/state.d.ts +20 -8
  149. package/dist/state/state.d.ts.map +1 -1
  150. package/dist/state/state.js +110 -0
  151. package/dist/style.css +1 -1
  152. package/dist/types.d.ts +2 -0
  153. package/dist/types.d.ts.map +1 -0
  154. package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
  155. package/dist/views/Chat/Chat.vue.js +7 -0
  156. package/dist/views/Chat/Chat.vue2.js +77 -0
  157. package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts +10 -0
  158. package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -0
  159. package/dist/views/Chat/Messages/AskForAuthentication.vue.js +7 -0
  160. package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +93 -0
  161. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
  162. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
  163. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +7 -0
  164. package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +23 -0
  165. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +2 -2
  166. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts.map +1 -1
  167. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +7 -0
  168. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +56 -0
  169. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
  170. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts.map +1 -1
  171. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +26 -0
  172. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +4 -0
  173. package/dist/views/Chat/Messages/Text.vue.d.ts.map +1 -1
  174. package/dist/views/Chat/Messages/Text.vue.js +16 -0
  175. package/dist/views/Chat/Messages/Text.vue2.js +4 -0
  176. package/dist/views/Layout.vue.d.ts.map +1 -1
  177. package/dist/views/Layout.vue.js +7 -0
  178. package/dist/views/Layout.vue2.js +23 -0
  179. package/dist/views/PromptForm.vue.d.ts.map +1 -1
  180. package/dist/views/PromptForm.vue.js +7 -0
  181. package/dist/views/PromptForm.vue2.js +212 -0
  182. package/dist/views/Settings/Auth.vue.d.ts.map +1 -1
  183. package/dist/views/Settings/Auth.vue.js +67 -0
  184. package/dist/views/Settings/Auth.vue2.js +4 -0
  185. package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
  186. package/dist/views/Settings/DocSettings.vue.js +7 -0
  187. package/dist/views/Settings/DocSettings.vue2.js +48 -0
  188. package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
  189. package/dist/views/Settings/Settings.vue.js +8 -0
  190. package/dist/views/Settings/Settings.vue2.js +67 -0
  191. package/dist/views/Start.vue.d.ts.map +1 -1
  192. package/dist/views/Start.vue.js +7 -0
  193. package/dist/views/Start.vue2.js +41 -0
  194. package/package.json +52 -7
  195. package/dist/Tooltip-Cm82QgNj.js +0 -575
  196. package/dist/__vite-optional-peer-dep_stream-markdown_markstream-vue_false-sdjmOmXd.js +0 -5
  197. package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +0 -5
  198. package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +0 -5
  199. package/dist/_basePickBy-hHD8tMGb.js +0 -151
  200. package/dist/_baseUniq-DTF1wuF6.js +0 -614
  201. package/dist/arc-Dw2RQerU.js +0 -83
  202. package/dist/architecture-U656AL7Q-B00Z9eXr.js +0 -36
  203. package/dist/architectureDiagram-VXUJARFQ-BtOffFaM.js +0 -4662
  204. package/dist/blockDiagram-VD42YOAC-BUqFMMQe.js +0 -2261
  205. package/dist/c4Diagram-YG6GDRKO-NrM1YcpG.js +0 -1579
  206. package/dist/channel-105myCGU.js +0 -5
  207. package/dist/chunk-4BX2VUAB-TAxJli7C.js +0 -8
  208. package/dist/chunk-55IACEB6-VXFJ4bz5.js +0 -8
  209. package/dist/chunk-B4BG7PRW-CZDQpfj5.js +0 -1375
  210. package/dist/chunk-DI55MBZ5-D3l7TA-E.js +0 -1370
  211. package/dist/chunk-FMBD7UC4-BMXFm8I3.js +0 -19
  212. package/dist/chunk-QN33PNHL-BOUpbpWp.js +0 -19
  213. package/dist/chunk-QZHKN3VN-C-TEEx05.js +0 -15
  214. package/dist/chunk-TZMSLE5B-BUiROKNR.js +0 -64
  215. package/dist/classDiagram-2ON5EDUG-HQET4ybK.js +0 -16
  216. package/dist/classDiagram-v2-WZHVMYZB-HQET4ybK.js +0 -16
  217. package/dist/clone-CIIO71O9.js +0 -8
  218. package/dist/components/Endpoint.vue.d.ts.map +0 -1
  219. package/dist/cose-bilkent-S5V4N54A-CMsF4n-5.js +0 -2609
  220. package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
  221. package/dist/dagre-6UL2VRFP-DqzdQ6Qg.js +0 -444
  222. package/dist/defaultLocale-BEa-49Qz.js +0 -171
  223. package/dist/diagram-PSM6KHXK-1xyGntw2.js +0 -531
  224. package/dist/diagram-QEK2KX5R-DdZdlAm1.js +0 -217
  225. package/dist/diagram-S2PKOQOG-C80Eo2jp.js +0 -142
  226. package/dist/erDiagram-Q2GNP2WA-DFVRrMXT.js +0 -841
  227. package/dist/flowDiagram-NV44I4VS-D9QK_qqB.js +0 -1620
  228. package/dist/ganttDiagram-LVOFAZNH-Bo1NTkeQ.js +0 -2506
  229. package/dist/gitGraph-F6HP7TQM-C5hdgcgO.js +0 -27
  230. package/dist/gitGraphDiagram-NY62KEGX-BZqnqZh6.js +0 -699
  231. package/dist/graph-Dth4IhEK.js +0 -247
  232. package/dist/hooks/useChatApprovals.d.ts.map +0 -1
  233. package/dist/hooks/useChatOperationBlocks.d.ts +0 -3
  234. package/dist/hooks/useChatOperationBlocks.d.ts.map +0 -1
  235. package/dist/hooks/useChatScroll.d.ts.map +0 -1
  236. package/dist/hooks/useSearch.d.ts.map +0 -1
  237. package/dist/index-BOvT43H8.js +0 -111780
  238. package/dist/index2-B36B-gt0.js +0 -69
  239. package/dist/index3-CtIyYUnG.js +0 -70
  240. package/dist/index4-Dzz91Ao2.js +0 -537
  241. package/dist/index5-Bmz0gMSP.js +0 -590
  242. package/dist/index6-DMB3qTSV.js +0 -196
  243. package/dist/info-NVLQJR56-azt5obk5.js +0 -27
  244. package/dist/infoDiagram-ER5ION4S-DD4Jtctm.js +0 -24
  245. package/dist/infographic_markstream-vue_false-BfsmcXxk.js +0 -5
  246. package/dist/init-DjUOC4st.js +0 -16
  247. package/dist/journeyDiagram-XKPGCS4Q-CXL6UO0r.js +0 -834
  248. package/dist/kanban-definition-3W4ZIXB7-B57do5Wg.js +0 -719
  249. package/dist/katex-SsTUIUTC.js +0 -11688
  250. package/dist/layout-7TCY8eA2.js +0 -1332
  251. package/dist/linear-DSm5i91N.js +0 -625
  252. package/dist/mermaid-parser.core-CUQWpAMM.js +0 -12746
  253. package/dist/mermaid.core-QjuzH7xx.js +0 -14164
  254. package/dist/mhchem-XHl7cef5.js +0 -2306
  255. package/dist/mindmap-definition-VGOIOE7T-DAQyGNAM.js +0 -784
  256. package/dist/ordinal-DfAQgscy.js +0 -61
  257. package/dist/packet-BFZMPI3H-CixuxAEA.js +0 -27
  258. package/dist/pie-7BOR55EZ-D3cgnzR1.js +0 -32
  259. package/dist/pieDiagram-ADFJNKIX-BqxgYwrL.js +0 -161
  260. package/dist/quadrantDiagram-AYHSOK5B-CQ4v-9Hh.js +0 -1022
  261. package/dist/radar-NHE76QYJ-DhV0Od_M.js +0 -27
  262. package/dist/requirementDiagram-UZGBJVZJ-ncWNAgFi.js +0 -850
  263. package/dist/safeRaf-I3a3-dyJ.js +0 -10
  264. package/dist/sankeyDiagram-TZEHDZUN-yCR2_cH5.js +0 -810
  265. package/dist/sequenceDiagram-WL72ISMW-DZ7wqFyd.js +0 -2511
  266. package/dist/stateDiagram-FKZM4ZOC-Dra68Tzi.js +0 -263
  267. package/dist/stateDiagram-v2-4FDKWEC3-CARbPECD.js +0 -16
  268. package/dist/timeline-definition-IT6M3QCI-DEbG9QIM.js +0 -795
  269. package/dist/treemap-KMMF4GRG-CQbPsyWe.js +0 -81
  270. package/dist/xychartDiagram-PRI3JC2R-C94Pu8hL.js +0 -1340
@@ -1,1022 +0,0 @@
1
- import { _ as o, s as _e, g as Ae, q as ie, p as ke, a as Fe, b as Pe, c as zt, l as bt, d as Lt, e as ve, y as Ce, F as D, K as Le, i as Ee } from "./mermaid.core-QjuzH7xx.js";
2
- import { l as ee } from "./linear-DSm5i91N.js";
3
- var Et = (function() {
4
- var t = /* @__PURE__ */ o(function(M, r, l, x) {
5
- for (l = l || {}, x = M.length; x--; l[M[x]] = r) ;
6
- return l;
7
- }, "o"), n = [1, 3], f = [1, 4], d = [1, 5], h = [1, 6], p = [1, 7], y = [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], _ = [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], a = [55, 56, 57], A = [2, 36], u = [1, 37], T = [1, 36], q = [1, 38], m = [1, 35], b = [1, 43], g = [1, 41], G = [1, 14], ht = [1, 23], xt = [1, 18], ft = [1, 19], gt = [1, 20], ct = [1, 21], _t = [1, 22], dt = [1, 24], i = [1, 25], Vt = [1, 26], It = [1, 27], wt = [1, 28], Bt = [1, 29], W = [1, 32], U = [1, 33], k = [1, 34], F = [1, 39], P = [1, 40], v = [1, 42], C = [1, 44], O = [1, 62], H = [1, 61], L = [4, 5, 8, 10, 12, 13, 14, 18, 44, 47, 49, 55, 56, 57, 63, 64, 65, 66, 67], Rt = [1, 65], Nt = [1, 66], Wt = [1, 67], Ut = [1, 68], Qt = [1, 69], Ot = [1, 70], Ht = [1, 71], Xt = [1, 72], Mt = [1, 73], Yt = [1, 74], jt = [1, 75], Gt = [1, 76], I = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], K = [1, 90], Z = [1, 91], J = [1, 92], $ = [1, 99], tt = [1, 93], et = [1, 96], it = [1, 94], at = [1, 95], nt = [1, 97], st = [1, 98], At = [1, 102], Kt = [10, 55, 56, 57], R = [4, 5, 6, 8, 10, 11, 13, 17, 18, 19, 20, 55, 56, 57], kt = {
8
- trace: /* @__PURE__ */ o(function() {
9
- }, "trace"),
10
- yy: {},
11
- 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 },
12
- 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" },
13
- 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]],
14
- performAction: /* @__PURE__ */ o(function(r, l, x, c, S, e, ut) {
15
- var s = e.length - 1;
16
- switch (S) {
17
- case 23:
18
- this.$ = e[s];
19
- break;
20
- case 24:
21
- this.$ = e[s - 1] + "" + e[s];
22
- break;
23
- case 26:
24
- this.$ = e[s - 1] + e[s];
25
- break;
26
- case 27:
27
- this.$ = [e[s].trim()];
28
- break;
29
- case 28:
30
- e[s - 2].push(e[s].trim()), this.$ = e[s - 2];
31
- break;
32
- case 29:
33
- this.$ = e[s - 4], c.addClass(e[s - 2], e[s]);
34
- break;
35
- case 37:
36
- this.$ = [];
37
- break;
38
- case 42:
39
- this.$ = e[s].trim(), c.setDiagramTitle(this.$);
40
- break;
41
- case 43:
42
- this.$ = e[s].trim(), c.setAccTitle(this.$);
43
- break;
44
- case 44:
45
- case 45:
46
- this.$ = e[s].trim(), c.setAccDescription(this.$);
47
- break;
48
- case 46:
49
- c.addSection(e[s].substr(8)), this.$ = e[s].substr(8);
50
- break;
51
- case 47:
52
- c.addPoint(e[s - 3], "", e[s - 1], e[s], []);
53
- break;
54
- case 48:
55
- c.addPoint(e[s - 4], e[s - 3], e[s - 1], e[s], []);
56
- break;
57
- case 49:
58
- c.addPoint(e[s - 4], "", e[s - 2], e[s - 1], e[s]);
59
- break;
60
- case 50:
61
- c.addPoint(e[s - 5], e[s - 4], e[s - 2], e[s - 1], e[s]);
62
- break;
63
- case 51:
64
- c.setXAxisLeftText(e[s - 2]), c.setXAxisRightText(e[s]);
65
- break;
66
- case 52:
67
- e[s - 1].text += " ⟶ ", c.setXAxisLeftText(e[s - 1]);
68
- break;
69
- case 53:
70
- c.setXAxisLeftText(e[s]);
71
- break;
72
- case 54:
73
- c.setYAxisBottomText(e[s - 2]), c.setYAxisTopText(e[s]);
74
- break;
75
- case 55:
76
- e[s - 1].text += " ⟶ ", c.setYAxisBottomText(e[s - 1]);
77
- break;
78
- case 56:
79
- c.setYAxisBottomText(e[s]);
80
- break;
81
- case 57:
82
- c.setQuadrant1Text(e[s]);
83
- break;
84
- case 58:
85
- c.setQuadrant2Text(e[s]);
86
- break;
87
- case 59:
88
- c.setQuadrant3Text(e[s]);
89
- break;
90
- case 60:
91
- c.setQuadrant4Text(e[s]);
92
- break;
93
- case 64:
94
- this.$ = { text: e[s], type: "text" };
95
- break;
96
- case 65:
97
- this.$ = { text: e[s - 1].text + "" + e[s], type: e[s - 1].type };
98
- break;
99
- case 66:
100
- this.$ = { text: e[s], type: "text" };
101
- break;
102
- case 67:
103
- this.$ = { text: e[s], type: "markdown" };
104
- break;
105
- case 68:
106
- this.$ = e[s];
107
- break;
108
- case 69:
109
- this.$ = e[s - 1] + "" + e[s];
110
- break;
111
- }
112
- }, "anonymous"),
113
- table: [{ 18: n, 26: 1, 27: 2, 28: f, 55: d, 56: h, 57: p }, { 1: [3] }, { 18: n, 26: 8, 27: 2, 28: f, 55: d, 56: h, 57: p }, { 18: n, 26: 9, 27: 2, 28: f, 55: d, 56: h, 57: p }, t(y, [2, 33], { 29: 10 }), t(_, [2, 61]), t(_, [2, 62]), t(_, [2, 63]), { 1: [2, 30] }, { 1: [2, 31] }, t(a, A, { 30: 11, 31: 12, 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 1: [2, 32], 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 18: G, 25: ht, 35: xt, 37: ft, 39: gt, 41: ct, 42: _t, 48: dt, 50: i, 51: Vt, 52: It, 53: wt, 54: Bt, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(y, [2, 34]), { 27: 45, 55: d, 56: h, 57: p }, t(a, [2, 37]), t(a, A, { 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 31: 46, 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 18: G, 25: ht, 35: xt, 37: ft, 39: gt, 41: ct, 42: _t, 48: dt, 50: i, 51: Vt, 52: It, 53: wt, 54: Bt, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 39]), t(a, [2, 40]), t(a, [2, 41]), { 36: [1, 47] }, { 38: [1, 48] }, { 40: [1, 49] }, t(a, [2, 45]), t(a, [2, 46]), { 18: [1, 50] }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 43: 51, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 43: 52, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 43: 53, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 43: 54, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 43: 55, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 43: 56, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: u, 5: T, 8: O, 10: q, 12: m, 13: b, 14: g, 18: H, 44: [1, 57], 47: [1, 58], 58: 60, 59: 59, 63: k, 64: F, 65: P, 66: v, 67: C }, t(L, [2, 64]), t(L, [2, 66]), t(L, [2, 67]), t(L, [2, 70]), t(L, [2, 71]), t(L, [2, 72]), t(L, [2, 73]), t(L, [2, 74]), t(L, [2, 75]), t(L, [2, 76]), t(L, [2, 77]), t(L, [2, 78]), t(L, [2, 79]), t(L, [2, 80]), t(y, [2, 35]), t(a, [2, 38]), t(a, [2, 42]), t(a, [2, 43]), t(a, [2, 44]), { 3: 64, 4: Rt, 5: Nt, 6: Wt, 7: Ut, 8: Qt, 9: Ot, 10: Ht, 11: Xt, 12: Mt, 13: Yt, 14: jt, 15: Gt, 21: 63 }, t(a, [2, 53], { 59: 59, 58: 60, 4: u, 5: T, 8: O, 10: q, 12: m, 13: b, 14: g, 18: H, 49: [1, 77], 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 56], { 59: 59, 58: 60, 4: u, 5: T, 8: O, 10: q, 12: m, 13: b, 14: g, 18: H, 49: [1, 78], 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 57], { 59: 59, 58: 60, 4: u, 5: T, 8: O, 10: q, 12: m, 13: b, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 58], { 59: 59, 58: 60, 4: u, 5: T, 8: O, 10: q, 12: m, 13: b, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 59], { 59: 59, 58: 60, 4: u, 5: T, 8: O, 10: q, 12: m, 13: b, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 60], { 59: 59, 58: 60, 4: u, 5: T, 8: O, 10: q, 12: m, 13: b, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), { 45: [1, 79] }, { 44: [1, 80] }, t(L, [2, 65]), t(L, [2, 81]), t(L, [2, 82]), t(L, [2, 83]), { 3: 82, 4: Rt, 5: Nt, 6: Wt, 7: Ut, 8: Qt, 9: Ot, 10: Ht, 11: Xt, 12: Mt, 13: Yt, 14: jt, 15: Gt, 18: [1, 81] }, t(I, [2, 23]), t(I, [2, 1]), t(I, [2, 2]), t(I, [2, 3]), t(I, [2, 4]), t(I, [2, 5]), t(I, [2, 6]), t(I, [2, 7]), t(I, [2, 8]), t(I, [2, 9]), t(I, [2, 10]), t(I, [2, 11]), t(I, [2, 12]), t(a, [2, 52], { 58: 31, 43: 83, 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 55], { 58: 31, 43: 84, 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), { 46: [1, 85] }, { 45: [1, 86] }, { 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 16: 89, 17: it, 18: at, 19: nt, 20: st, 22: 88, 23: 87 }, t(I, [2, 24]), t(a, [2, 51], { 59: 59, 58: 60, 4: u, 5: T, 8: O, 10: q, 12: m, 13: b, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 54], { 59: 59, 58: 60, 4: u, 5: T, 8: O, 10: q, 12: m, 13: b, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 47], { 22: 88, 16: 89, 23: 100, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st }), { 46: [1, 101] }, t(a, [2, 29], { 10: At }), t(Kt, [2, 27], { 16: 103, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st }), t(R, [2, 25]), t(R, [2, 13]), t(R, [2, 14]), t(R, [2, 15]), t(R, [2, 16]), t(R, [2, 17]), t(R, [2, 18]), t(R, [2, 19]), t(R, [2, 20]), t(R, [2, 21]), t(R, [2, 22]), t(a, [2, 49], { 10: At }), t(a, [2, 48], { 22: 88, 16: 89, 23: 104, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st }), { 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 16: 89, 17: it, 18: at, 19: nt, 20: st, 22: 105 }, t(R, [2, 26]), t(a, [2, 50], { 10: At }), t(Kt, [2, 28], { 16: 103, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st })],
114
- defaultActions: { 8: [2, 30], 9: [2, 31] },
115
- parseError: /* @__PURE__ */ o(function(r, l) {
116
- if (l.recoverable)
117
- this.trace(r);
118
- else {
119
- var x = new Error(r);
120
- throw x.hash = l, x;
121
- }
122
- }, "parseError"),
123
- parse: /* @__PURE__ */ o(function(r) {
124
- var l = this, x = [0], c = [], S = [null], e = [], ut = this.table, s = "", yt = 0, Zt = 0, qe = 2, Jt = 1, me = e.slice.call(arguments, 1), E = Object.create(this.lexer), Y = { yy: {} };
125
- for (var Ft in this.yy)
126
- Object.prototype.hasOwnProperty.call(this.yy, Ft) && (Y.yy[Ft] = this.yy[Ft]);
127
- E.setInput(r, Y.yy), Y.yy.lexer = E, Y.yy.parser = this, typeof E.yylloc > "u" && (E.yylloc = {});
128
- var Pt = E.yylloc;
129
- e.push(Pt);
130
- var be = E.options && E.options.ranges;
131
- typeof Y.yy.parseError == "function" ? this.parseError = Y.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
132
- function Se(B) {
133
- x.length = x.length - 2 * B, S.length = S.length - B, e.length = e.length - B;
134
- }
135
- o(Se, "popStack");
136
- function $t() {
137
- var B;
138
- return B = c.pop() || E.lex() || Jt, typeof B != "number" && (B instanceof Array && (c = B, B = c.pop()), B = l.symbols_[B] || B), B;
139
- }
140
- o($t, "lex");
141
- for (var w, j, N, vt, rt = {}, Tt, X, te, qt; ; ) {
142
- if (j = x[x.length - 1], this.defaultActions[j] ? N = this.defaultActions[j] : ((w === null || typeof w > "u") && (w = $t()), N = ut[j] && ut[j][w]), typeof N > "u" || !N.length || !N[0]) {
143
- var Ct = "";
144
- qt = [];
145
- for (Tt in ut[j])
146
- this.terminals_[Tt] && Tt > qe && qt.push("'" + this.terminals_[Tt] + "'");
147
- E.showPosition ? Ct = "Parse error on line " + (yt + 1) + `:
148
- ` + E.showPosition() + `
149
- Expecting ` + qt.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Ct = "Parse error on line " + (yt + 1) + ": Unexpected " + (w == Jt ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(Ct, {
150
- text: E.match,
151
- token: this.terminals_[w] || w,
152
- line: E.yylineno,
153
- loc: Pt,
154
- expected: qt
155
- });
156
- }
157
- if (N[0] instanceof Array && N.length > 1)
158
- throw new Error("Parse Error: multiple actions possible at state: " + j + ", token: " + w);
159
- switch (N[0]) {
160
- case 1:
161
- x.push(w), S.push(E.yytext), e.push(E.yylloc), x.push(N[1]), w = null, Zt = E.yyleng, s = E.yytext, yt = E.yylineno, Pt = E.yylloc;
162
- break;
163
- case 2:
164
- if (X = this.productions_[N[1]][1], rt.$ = S[S.length - X], rt._$ = {
165
- first_line: e[e.length - (X || 1)].first_line,
166
- last_line: e[e.length - 1].last_line,
167
- first_column: e[e.length - (X || 1)].first_column,
168
- last_column: e[e.length - 1].last_column
169
- }, be && (rt._$.range = [
170
- e[e.length - (X || 1)].range[0],
171
- e[e.length - 1].range[1]
172
- ]), vt = this.performAction.apply(rt, [
173
- s,
174
- Zt,
175
- yt,
176
- Y.yy,
177
- N[1],
178
- S,
179
- e
180
- ].concat(me)), typeof vt < "u")
181
- return vt;
182
- X && (x = x.slice(0, -1 * X * 2), S = S.slice(0, -1 * X), e = e.slice(0, -1 * X)), x.push(this.productions_[N[1]][0]), S.push(rt.$), e.push(rt._$), te = ut[x[x.length - 2]][x[x.length - 1]], x.push(te);
183
- break;
184
- case 3:
185
- return !0;
186
- }
187
- }
188
- return !0;
189
- }, "parse")
190
- }, Te = /* @__PURE__ */ (function() {
191
- var M = {
192
- EOF: 1,
193
- parseError: /* @__PURE__ */ o(function(l, x) {
194
- if (this.yy.parser)
195
- this.yy.parser.parseError(l, x);
196
- else
197
- throw new Error(l);
198
- }, "parseError"),
199
- // resets the lexer, sets new input
200
- setInput: /* @__PURE__ */ o(function(r, l) {
201
- return this.yy = l || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
202
- first_line: 1,
203
- first_column: 0,
204
- last_line: 1,
205
- last_column: 0
206
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
207
- }, "setInput"),
208
- // consumes and returns one char from the input
209
- input: /* @__PURE__ */ o(function() {
210
- var r = this._input[0];
211
- this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
212
- var l = r.match(/(?:\r\n?|\n).*/g);
213
- return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
214
- }, "input"),
215
- // unshifts one char (or a string) into the input
216
- unput: /* @__PURE__ */ o(function(r) {
217
- var l = r.length, x = r.split(/(?:\r\n?|\n)/g);
218
- this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
219
- var c = this.match.split(/(?:\r\n?|\n)/g);
220
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), x.length - 1 && (this.yylineno -= x.length - 1);
221
- var S = this.yylloc.range;
222
- return this.yylloc = {
223
- first_line: this.yylloc.first_line,
224
- last_line: this.yylineno + 1,
225
- first_column: this.yylloc.first_column,
226
- last_column: x ? (x.length === c.length ? this.yylloc.first_column : 0) + c[c.length - x.length].length - x[0].length : this.yylloc.first_column - l
227
- }, this.options.ranges && (this.yylloc.range = [S[0], S[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
228
- }, "unput"),
229
- // When called from action, caches matched text and appends it on next action
230
- more: /* @__PURE__ */ o(function() {
231
- return this._more = !0, this;
232
- }, "more"),
233
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
234
- reject: /* @__PURE__ */ o(function() {
235
- if (this.options.backtrack_lexer)
236
- this._backtrack = !0;
237
- else
238
- 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).
239
- ` + this.showPosition(), {
240
- text: "",
241
- token: null,
242
- line: this.yylineno
243
- });
244
- return this;
245
- }, "reject"),
246
- // retain first n characters of the match
247
- less: /* @__PURE__ */ o(function(r) {
248
- this.unput(this.match.slice(r));
249
- }, "less"),
250
- // displays already matched input, i.e. for error messages
251
- pastInput: /* @__PURE__ */ o(function() {
252
- var r = this.matched.substr(0, this.matched.length - this.match.length);
253
- return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
254
- }, "pastInput"),
255
- // displays upcoming input, i.e. for error messages
256
- upcomingInput: /* @__PURE__ */ o(function() {
257
- var r = this.match;
258
- return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
259
- }, "upcomingInput"),
260
- // displays the character position where the lexing error occurred, i.e. for error messages
261
- showPosition: /* @__PURE__ */ o(function() {
262
- var r = this.pastInput(), l = new Array(r.length + 1).join("-");
263
- return r + this.upcomingInput() + `
264
- ` + l + "^";
265
- }, "showPosition"),
266
- // test the lexed token: return FALSE when not a match, otherwise return token
267
- test_match: /* @__PURE__ */ o(function(r, l) {
268
- var x, c, S;
269
- if (this.options.backtrack_lexer && (S = {
270
- yylineno: this.yylineno,
271
- yylloc: {
272
- first_line: this.yylloc.first_line,
273
- last_line: this.last_line,
274
- first_column: this.yylloc.first_column,
275
- last_column: this.yylloc.last_column
276
- },
277
- yytext: this.yytext,
278
- match: this.match,
279
- matches: this.matches,
280
- matched: this.matched,
281
- yyleng: this.yyleng,
282
- offset: this.offset,
283
- _more: this._more,
284
- _input: this._input,
285
- yy: this.yy,
286
- conditionStack: this.conditionStack.slice(0),
287
- done: this.done
288
- }, this.options.ranges && (S.yylloc.range = this.yylloc.range.slice(0))), c = r[0].match(/(?:\r\n?|\n).*/g), c && (this.yylineno += c.length), this.yylloc = {
289
- first_line: this.yylloc.last_line,
290
- last_line: this.yylineno + 1,
291
- first_column: this.yylloc.last_column,
292
- last_column: c ? c[c.length - 1].length - c[c.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
293
- }, this.yytext += r[0], this.match += r[0], this.matches = r, 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(r[0].length), this.matched += r[0], x = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), x)
294
- return x;
295
- if (this._backtrack) {
296
- for (var e in S)
297
- this[e] = S[e];
298
- return !1;
299
- }
300
- return !1;
301
- }, "test_match"),
302
- // return next match in input
303
- next: /* @__PURE__ */ o(function() {
304
- if (this.done)
305
- return this.EOF;
306
- this._input || (this.done = !0);
307
- var r, l, x, c;
308
- this._more || (this.yytext = "", this.match = "");
309
- for (var S = this._currentRules(), e = 0; e < S.length; e++)
310
- if (x = this._input.match(this.rules[S[e]]), x && (!l || x[0].length > l[0].length)) {
311
- if (l = x, c = e, this.options.backtrack_lexer) {
312
- if (r = this.test_match(x, S[e]), r !== !1)
313
- return r;
314
- if (this._backtrack) {
315
- l = !1;
316
- continue;
317
- } else
318
- return !1;
319
- } else if (!this.options.flex)
320
- break;
321
- }
322
- return l ? (r = this.test_match(l, S[c]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
323
- ` + this.showPosition(), {
324
- text: "",
325
- token: null,
326
- line: this.yylineno
327
- });
328
- }, "next"),
329
- // return next match that has a token
330
- lex: /* @__PURE__ */ o(function() {
331
- var l = this.next();
332
- return l || this.lex();
333
- }, "lex"),
334
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
335
- begin: /* @__PURE__ */ o(function(l) {
336
- this.conditionStack.push(l);
337
- }, "begin"),
338
- // pop the previously active lexer condition state off the condition stack
339
- popState: /* @__PURE__ */ o(function() {
340
- var l = this.conditionStack.length - 1;
341
- return l > 0 ? this.conditionStack.pop() : this.conditionStack[0];
342
- }, "popState"),
343
- // produce the lexer rule set which is active for the currently active lexer condition state
344
- _currentRules: /* @__PURE__ */ o(function() {
345
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
346
- }, "_currentRules"),
347
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
348
- topState: /* @__PURE__ */ o(function(l) {
349
- return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL";
350
- }, "topState"),
351
- // alias for begin(condition)
352
- pushState: /* @__PURE__ */ o(function(l) {
353
- this.begin(l);
354
- }, "pushState"),
355
- // return the number of states currently on the stack
356
- stateStackSize: /* @__PURE__ */ o(function() {
357
- return this.conditionStack.length;
358
- }, "stateStackSize"),
359
- options: { "case-insensitive": !0 },
360
- performAction: /* @__PURE__ */ o(function(l, x, c, S) {
361
- switch (c) {
362
- case 0:
363
- break;
364
- case 1:
365
- break;
366
- case 2:
367
- return 55;
368
- case 3:
369
- break;
370
- case 4:
371
- return this.begin("title"), 35;
372
- case 5:
373
- return this.popState(), "title_value";
374
- case 6:
375
- return this.begin("acc_title"), 37;
376
- case 7:
377
- return this.popState(), "acc_title_value";
378
- case 8:
379
- return this.begin("acc_descr"), 39;
380
- case 9:
381
- return this.popState(), "acc_descr_value";
382
- case 10:
383
- this.begin("acc_descr_multiline");
384
- break;
385
- case 11:
386
- this.popState();
387
- break;
388
- case 12:
389
- return "acc_descr_multiline_value";
390
- case 13:
391
- return 48;
392
- case 14:
393
- return 50;
394
- case 15:
395
- return 49;
396
- case 16:
397
- return 51;
398
- case 17:
399
- return 52;
400
- case 18:
401
- return 53;
402
- case 19:
403
- return 54;
404
- case 20:
405
- return 25;
406
- case 21:
407
- this.begin("md_string");
408
- break;
409
- case 22:
410
- return "MD_STR";
411
- case 23:
412
- this.popState();
413
- break;
414
- case 24:
415
- this.begin("string");
416
- break;
417
- case 25:
418
- this.popState();
419
- break;
420
- case 26:
421
- return "STR";
422
- case 27:
423
- this.begin("class_name");
424
- break;
425
- case 28:
426
- return this.popState(), 47;
427
- case 29:
428
- return this.begin("point_start"), 44;
429
- case 30:
430
- return this.begin("point_x"), 45;
431
- case 31:
432
- this.popState();
433
- break;
434
- case 32:
435
- this.popState(), this.begin("point_y");
436
- break;
437
- case 33:
438
- return this.popState(), 46;
439
- case 34:
440
- return 28;
441
- case 35:
442
- return 4;
443
- case 36:
444
- return 11;
445
- case 37:
446
- return 64;
447
- case 38:
448
- return 10;
449
- case 39:
450
- return 65;
451
- case 40:
452
- return 65;
453
- case 41:
454
- return 14;
455
- case 42:
456
- return 13;
457
- case 43:
458
- return 67;
459
- case 44:
460
- return 66;
461
- case 45:
462
- return 12;
463
- case 46:
464
- return 8;
465
- case 47:
466
- return 5;
467
- case 48:
468
- return 18;
469
- case 49:
470
- return 56;
471
- case 50:
472
- return 63;
473
- case 51:
474
- return 57;
475
- }
476
- }, "anonymous"),
477
- 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],
478
- 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 } }
479
- };
480
- return M;
481
- })();
482
- kt.lexer = Te;
483
- function pt() {
484
- this.yy = {};
485
- }
486
- return o(pt, "Parser"), pt.prototype = kt, kt.Parser = pt, new pt();
487
- })();
488
- Et.parser = Et;
489
- var De = Et, V = Le(), ot, ze = (ot = class {
490
- constructor() {
491
- this.classes = /* @__PURE__ */ new Map(), this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData();
492
- }
493
- getDefaultData() {
494
- return {
495
- titleText: "",
496
- quadrant1Text: "",
497
- quadrant2Text: "",
498
- quadrant3Text: "",
499
- quadrant4Text: "",
500
- xAxisLeftText: "",
501
- xAxisRightText: "",
502
- yAxisBottomText: "",
503
- yAxisTopText: "",
504
- points: []
505
- };
506
- }
507
- getDefaultConfig() {
508
- return {
509
- showXAxis: !0,
510
- showYAxis: !0,
511
- showTitle: !0,
512
- chartHeight: D.quadrantChart?.chartWidth || 500,
513
- chartWidth: D.quadrantChart?.chartHeight || 500,
514
- titlePadding: D.quadrantChart?.titlePadding || 10,
515
- titleFontSize: D.quadrantChart?.titleFontSize || 20,
516
- quadrantPadding: D.quadrantChart?.quadrantPadding || 5,
517
- xAxisLabelPadding: D.quadrantChart?.xAxisLabelPadding || 5,
518
- yAxisLabelPadding: D.quadrantChart?.yAxisLabelPadding || 5,
519
- xAxisLabelFontSize: D.quadrantChart?.xAxisLabelFontSize || 16,
520
- yAxisLabelFontSize: D.quadrantChart?.yAxisLabelFontSize || 16,
521
- quadrantLabelFontSize: D.quadrantChart?.quadrantLabelFontSize || 16,
522
- quadrantTextTopPadding: D.quadrantChart?.quadrantTextTopPadding || 5,
523
- pointTextPadding: D.quadrantChart?.pointTextPadding || 5,
524
- pointLabelFontSize: D.quadrantChart?.pointLabelFontSize || 12,
525
- pointRadius: D.quadrantChart?.pointRadius || 5,
526
- xAxisPosition: D.quadrantChart?.xAxisPosition || "top",
527
- yAxisPosition: D.quadrantChart?.yAxisPosition || "left",
528
- quadrantInternalBorderStrokeWidth: D.quadrantChart?.quadrantInternalBorderStrokeWidth || 1,
529
- quadrantExternalBorderStrokeWidth: D.quadrantChart?.quadrantExternalBorderStrokeWidth || 2
530
- };
531
- }
532
- getDefaultThemeConfig() {
533
- return {
534
- quadrant1Fill: V.quadrant1Fill,
535
- quadrant2Fill: V.quadrant2Fill,
536
- quadrant3Fill: V.quadrant3Fill,
537
- quadrant4Fill: V.quadrant4Fill,
538
- quadrant1TextFill: V.quadrant1TextFill,
539
- quadrant2TextFill: V.quadrant2TextFill,
540
- quadrant3TextFill: V.quadrant3TextFill,
541
- quadrant4TextFill: V.quadrant4TextFill,
542
- quadrantPointFill: V.quadrantPointFill,
543
- quadrantPointTextFill: V.quadrantPointTextFill,
544
- quadrantXAxisTextFill: V.quadrantXAxisTextFill,
545
- quadrantYAxisTextFill: V.quadrantYAxisTextFill,
546
- quadrantTitleFill: V.quadrantTitleFill,
547
- quadrantInternalBorderStrokeFill: V.quadrantInternalBorderStrokeFill,
548
- quadrantExternalBorderStrokeFill: V.quadrantExternalBorderStrokeFill
549
- };
550
- }
551
- clear() {
552
- this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData(), this.classes = /* @__PURE__ */ new Map(), bt.info("clear called");
553
- }
554
- setData(n) {
555
- this.data = { ...this.data, ...n };
556
- }
557
- addPoints(n) {
558
- this.data.points = [...n, ...this.data.points];
559
- }
560
- addClass(n, f) {
561
- this.classes.set(n, f);
562
- }
563
- setConfig(n) {
564
- bt.trace("setConfig called with: ", n), this.config = { ...this.config, ...n };
565
- }
566
- setThemeConfig(n) {
567
- bt.trace("setThemeConfig called with: ", n), this.themeConfig = { ...this.themeConfig, ...n };
568
- }
569
- calculateSpace(n, f, d, h) {
570
- const p = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize, y = {
571
- top: n === "top" && f ? p : 0,
572
- bottom: n === "bottom" && f ? p : 0
573
- }, _ = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize, a = {
574
- left: this.config.yAxisPosition === "left" && d ? _ : 0,
575
- right: this.config.yAxisPosition === "right" && d ? _ : 0
576
- }, A = this.config.titleFontSize + this.config.titlePadding * 2, u = {
577
- top: h ? A : 0
578
- }, T = this.config.quadrantPadding + a.left, q = this.config.quadrantPadding + y.top + u.top, m = this.config.chartWidth - this.config.quadrantPadding * 2 - a.left - a.right, b = this.config.chartHeight - this.config.quadrantPadding * 2 - y.top - y.bottom - u.top, g = m / 2, G = b / 2;
579
- return {
580
- xAxisSpace: y,
581
- yAxisSpace: a,
582
- titleSpace: u,
583
- quadrantSpace: {
584
- quadrantLeft: T,
585
- quadrantTop: q,
586
- quadrantWidth: m,
587
- quadrantHalfWidth: g,
588
- quadrantHeight: b,
589
- quadrantHalfHeight: G
590
- }
591
- };
592
- }
593
- getAxisLabels(n, f, d, h) {
594
- const { quadrantSpace: p, titleSpace: y } = h, {
595
- quadrantHalfHeight: _,
596
- quadrantHeight: a,
597
- quadrantLeft: A,
598
- quadrantHalfWidth: u,
599
- quadrantTop: T,
600
- quadrantWidth: q
601
- } = p, m = !!this.data.xAxisRightText, b = !!this.data.yAxisTopText, g = [];
602
- return this.data.xAxisLeftText && f && g.push({
603
- text: this.data.xAxisLeftText,
604
- fill: this.themeConfig.quadrantXAxisTextFill,
605
- x: A + (m ? u / 2 : 0),
606
- y: n === "top" ? this.config.xAxisLabelPadding + y.top : this.config.xAxisLabelPadding + T + a + this.config.quadrantPadding,
607
- fontSize: this.config.xAxisLabelFontSize,
608
- verticalPos: m ? "center" : "left",
609
- horizontalPos: "top",
610
- rotation: 0
611
- }), this.data.xAxisRightText && f && g.push({
612
- text: this.data.xAxisRightText,
613
- fill: this.themeConfig.quadrantXAxisTextFill,
614
- x: A + u + (m ? u / 2 : 0),
615
- y: n === "top" ? this.config.xAxisLabelPadding + y.top : this.config.xAxisLabelPadding + T + a + this.config.quadrantPadding,
616
- fontSize: this.config.xAxisLabelFontSize,
617
- verticalPos: m ? "center" : "left",
618
- horizontalPos: "top",
619
- rotation: 0
620
- }), this.data.yAxisBottomText && d && g.push({
621
- text: this.data.yAxisBottomText,
622
- fill: this.themeConfig.quadrantYAxisTextFill,
623
- x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + A + q + this.config.quadrantPadding,
624
- y: T + a - (b ? _ / 2 : 0),
625
- fontSize: this.config.yAxisLabelFontSize,
626
- verticalPos: b ? "center" : "left",
627
- horizontalPos: "top",
628
- rotation: -90
629
- }), this.data.yAxisTopText && d && g.push({
630
- text: this.data.yAxisTopText,
631
- fill: this.themeConfig.quadrantYAxisTextFill,
632
- x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + A + q + this.config.quadrantPadding,
633
- y: T + _ - (b ? _ / 2 : 0),
634
- fontSize: this.config.yAxisLabelFontSize,
635
- verticalPos: b ? "center" : "left",
636
- horizontalPos: "top",
637
- rotation: -90
638
- }), g;
639
- }
640
- getQuadrants(n) {
641
- const { quadrantSpace: f } = n, { quadrantHalfHeight: d, quadrantLeft: h, quadrantHalfWidth: p, quadrantTop: y } = f, _ = [
642
- {
643
- text: {
644
- text: this.data.quadrant1Text,
645
- fill: this.themeConfig.quadrant1TextFill,
646
- x: 0,
647
- y: 0,
648
- fontSize: this.config.quadrantLabelFontSize,
649
- verticalPos: "center",
650
- horizontalPos: "middle",
651
- rotation: 0
652
- },
653
- x: h + p,
654
- y,
655
- width: p,
656
- height: d,
657
- fill: this.themeConfig.quadrant1Fill
658
- },
659
- {
660
- text: {
661
- text: this.data.quadrant2Text,
662
- fill: this.themeConfig.quadrant2TextFill,
663
- x: 0,
664
- y: 0,
665
- fontSize: this.config.quadrantLabelFontSize,
666
- verticalPos: "center",
667
- horizontalPos: "middle",
668
- rotation: 0
669
- },
670
- x: h,
671
- y,
672
- width: p,
673
- height: d,
674
- fill: this.themeConfig.quadrant2Fill
675
- },
676
- {
677
- text: {
678
- text: this.data.quadrant3Text,
679
- fill: this.themeConfig.quadrant3TextFill,
680
- x: 0,
681
- y: 0,
682
- fontSize: this.config.quadrantLabelFontSize,
683
- verticalPos: "center",
684
- horizontalPos: "middle",
685
- rotation: 0
686
- },
687
- x: h,
688
- y: y + d,
689
- width: p,
690
- height: d,
691
- fill: this.themeConfig.quadrant3Fill
692
- },
693
- {
694
- text: {
695
- text: this.data.quadrant4Text,
696
- fill: this.themeConfig.quadrant4TextFill,
697
- x: 0,
698
- y: 0,
699
- fontSize: this.config.quadrantLabelFontSize,
700
- verticalPos: "center",
701
- horizontalPos: "middle",
702
- rotation: 0
703
- },
704
- x: h + p,
705
- y: y + d,
706
- width: p,
707
- height: d,
708
- fill: this.themeConfig.quadrant4Fill
709
- }
710
- ];
711
- for (const a of _)
712
- a.text.x = a.x + a.width / 2, this.data.points.length === 0 ? (a.text.y = a.y + a.height / 2, a.text.horizontalPos = "middle") : (a.text.y = a.y + this.config.quadrantTextTopPadding, a.text.horizontalPos = "top");
713
- return _;
714
- }
715
- getQuadrantPoints(n) {
716
- const { quadrantSpace: f } = n, { quadrantHeight: d, quadrantLeft: h, quadrantTop: p, quadrantWidth: y } = f, _ = ee().domain([0, 1]).range([h, y + h]), a = ee().domain([0, 1]).range([d + p, p]);
717
- return this.data.points.map((u) => {
718
- const T = this.classes.get(u.className);
719
- return T && (u = { ...T, ...u }), {
720
- x: _(u.x),
721
- y: a(u.y),
722
- fill: u.color ?? this.themeConfig.quadrantPointFill,
723
- radius: u.radius ?? this.config.pointRadius,
724
- text: {
725
- text: u.text,
726
- fill: this.themeConfig.quadrantPointTextFill,
727
- x: _(u.x),
728
- y: a(u.y) + this.config.pointTextPadding,
729
- verticalPos: "center",
730
- horizontalPos: "top",
731
- fontSize: this.config.pointLabelFontSize,
732
- rotation: 0
733
- },
734
- strokeColor: u.strokeColor ?? this.themeConfig.quadrantPointFill,
735
- strokeWidth: u.strokeWidth ?? "0px"
736
- };
737
- });
738
- }
739
- getBorders(n) {
740
- const f = this.config.quadrantExternalBorderStrokeWidth / 2, { quadrantSpace: d } = n, {
741
- quadrantHalfHeight: h,
742
- quadrantHeight: p,
743
- quadrantLeft: y,
744
- quadrantHalfWidth: _,
745
- quadrantTop: a,
746
- quadrantWidth: A
747
- } = d;
748
- return [
749
- // top border
750
- {
751
- strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
752
- strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
753
- x1: y - f,
754
- y1: a,
755
- x2: y + A + f,
756
- y2: a
757
- },
758
- // right border
759
- {
760
- strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
761
- strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
762
- x1: y + A,
763
- y1: a + f,
764
- x2: y + A,
765
- y2: a + p - f
766
- },
767
- // bottom border
768
- {
769
- strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
770
- strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
771
- x1: y - f,
772
- y1: a + p,
773
- x2: y + A + f,
774
- y2: a + p
775
- },
776
- // left border
777
- {
778
- strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
779
- strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
780
- x1: y,
781
- y1: a + f,
782
- x2: y,
783
- y2: a + p - f
784
- },
785
- // vertical inner border
786
- {
787
- strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
788
- strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
789
- x1: y + _,
790
- y1: a + f,
791
- x2: y + _,
792
- y2: a + p - f
793
- },
794
- // horizontal inner border
795
- {
796
- strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
797
- strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
798
- x1: y + f,
799
- y1: a + h,
800
- x2: y + A - f,
801
- y2: a + h
802
- }
803
- ];
804
- }
805
- getTitle(n) {
806
- if (n)
807
- return {
808
- text: this.data.titleText,
809
- fill: this.themeConfig.quadrantTitleFill,
810
- fontSize: this.config.titleFontSize,
811
- horizontalPos: "top",
812
- verticalPos: "center",
813
- rotation: 0,
814
- y: this.config.titlePadding,
815
- x: this.config.chartWidth / 2
816
- };
817
- }
818
- build() {
819
- const n = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText), f = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText), d = this.config.showTitle && !!this.data.titleText, h = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition, p = this.calculateSpace(h, n, f, d);
820
- return {
821
- points: this.getQuadrantPoints(p),
822
- quadrants: this.getQuadrants(p),
823
- axisLabels: this.getAxisLabels(h, n, f, p),
824
- borderLines: this.getBorders(p),
825
- title: this.getTitle(d)
826
- };
827
- }
828
- }, o(ot, "QuadrantBuilder"), ot), lt, mt = (lt = class extends Error {
829
- constructor(n, f, d) {
830
- super(`value for ${n} ${f} is invalid, please use a valid ${d}`), this.name = "InvalidStyleError";
831
- }
832
- }, o(lt, "InvalidStyleError"), lt);
833
- function Dt(t) {
834
- return !/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t);
835
- }
836
- o(Dt, "validateHexCode");
837
- function ae(t) {
838
- return !/^\d+$/.test(t);
839
- }
840
- o(ae, "validateNumber");
841
- function ne(t) {
842
- return !/^\d+px$/.test(t);
843
- }
844
- o(ne, "validateSizeInPixels");
845
- var Ve = zt();
846
- function Q(t) {
847
- return Ee(t.trim(), Ve);
848
- }
849
- o(Q, "textSanitizer");
850
- var z = new ze();
851
- function se(t) {
852
- z.setData({ quadrant1Text: Q(t.text) });
853
- }
854
- o(se, "setQuadrant1Text");
855
- function re(t) {
856
- z.setData({ quadrant2Text: Q(t.text) });
857
- }
858
- o(re, "setQuadrant2Text");
859
- function oe(t) {
860
- z.setData({ quadrant3Text: Q(t.text) });
861
- }
862
- o(oe, "setQuadrant3Text");
863
- function le(t) {
864
- z.setData({ quadrant4Text: Q(t.text) });
865
- }
866
- o(le, "setQuadrant4Text");
867
- function he(t) {
868
- z.setData({ xAxisLeftText: Q(t.text) });
869
- }
870
- o(he, "setXAxisLeftText");
871
- function ce(t) {
872
- z.setData({ xAxisRightText: Q(t.text) });
873
- }
874
- o(ce, "setXAxisRightText");
875
- function de(t) {
876
- z.setData({ yAxisTopText: Q(t.text) });
877
- }
878
- o(de, "setYAxisTopText");
879
- function ue(t) {
880
- z.setData({ yAxisBottomText: Q(t.text) });
881
- }
882
- o(ue, "setYAxisBottomText");
883
- function St(t) {
884
- const n = {};
885
- for (const f of t) {
886
- const [d, h] = f.trim().split(/\s*:\s*/);
887
- if (d === "radius") {
888
- if (ae(h))
889
- throw new mt(d, h, "number");
890
- n.radius = parseInt(h);
891
- } else if (d === "color") {
892
- if (Dt(h))
893
- throw new mt(d, h, "hex code");
894
- n.color = h;
895
- } else if (d === "stroke-color") {
896
- if (Dt(h))
897
- throw new mt(d, h, "hex code");
898
- n.strokeColor = h;
899
- } else if (d === "stroke-width") {
900
- if (ne(h))
901
- throw new mt(d, h, "number of pixels (eg. 10px)");
902
- n.strokeWidth = h;
903
- } else
904
- throw new Error(`style named ${d} is not supported.`);
905
- }
906
- return n;
907
- }
908
- o(St, "parseStyles");
909
- function xe(t, n, f, d, h) {
910
- const p = St(h);
911
- z.addPoints([
912
- {
913
- x: f,
914
- y: d,
915
- text: Q(t.text),
916
- className: n,
917
- ...p
918
- }
919
- ]);
920
- }
921
- o(xe, "addPoint");
922
- function fe(t, n) {
923
- z.addClass(t, St(n));
924
- }
925
- o(fe, "addClass");
926
- function ge(t) {
927
- z.setConfig({ chartWidth: t });
928
- }
929
- o(ge, "setWidth");
930
- function pe(t) {
931
- z.setConfig({ chartHeight: t });
932
- }
933
- o(pe, "setHeight");
934
- function ye() {
935
- const t = zt(), { themeVariables: n, quadrantChart: f } = t;
936
- return f && z.setConfig(f), z.setThemeConfig({
937
- quadrant1Fill: n.quadrant1Fill,
938
- quadrant2Fill: n.quadrant2Fill,
939
- quadrant3Fill: n.quadrant3Fill,
940
- quadrant4Fill: n.quadrant4Fill,
941
- quadrant1TextFill: n.quadrant1TextFill,
942
- quadrant2TextFill: n.quadrant2TextFill,
943
- quadrant3TextFill: n.quadrant3TextFill,
944
- quadrant4TextFill: n.quadrant4TextFill,
945
- quadrantPointFill: n.quadrantPointFill,
946
- quadrantPointTextFill: n.quadrantPointTextFill,
947
- quadrantXAxisTextFill: n.quadrantXAxisTextFill,
948
- quadrantYAxisTextFill: n.quadrantYAxisTextFill,
949
- quadrantExternalBorderStrokeFill: n.quadrantExternalBorderStrokeFill,
950
- quadrantInternalBorderStrokeFill: n.quadrantInternalBorderStrokeFill,
951
- quadrantTitleFill: n.quadrantTitleFill
952
- }), z.setData({ titleText: ie() }), z.build();
953
- }
954
- o(ye, "getQuadrantData");
955
- var Ie = /* @__PURE__ */ o(function() {
956
- z.clear(), Ce();
957
- }, "clear"), we = {
958
- setWidth: ge,
959
- setHeight: pe,
960
- setQuadrant1Text: se,
961
- setQuadrant2Text: re,
962
- setQuadrant3Text: oe,
963
- setQuadrant4Text: le,
964
- setXAxisLeftText: he,
965
- setXAxisRightText: ce,
966
- setYAxisTopText: de,
967
- setYAxisBottomText: ue,
968
- parseStyles: St,
969
- addPoint: xe,
970
- addClass: fe,
971
- getQuadrantData: ye,
972
- clear: Ie,
973
- setAccTitle: Pe,
974
- getAccTitle: Fe,
975
- setDiagramTitle: ke,
976
- getDiagramTitle: ie,
977
- getAccDescription: Ae,
978
- setAccDescription: _e
979
- }, Be = /* @__PURE__ */ o((t, n, f, d) => {
980
- function h(i) {
981
- return i === "top" ? "hanging" : "middle";
982
- }
983
- o(h, "getDominantBaseLine");
984
- function p(i) {
985
- return i === "left" ? "start" : "middle";
986
- }
987
- o(p, "getTextAnchor");
988
- function y(i) {
989
- return `translate(${i.x}, ${i.y}) rotate(${i.rotation || 0})`;
990
- }
991
- o(y, "getTransformation");
992
- const _ = zt();
993
- bt.debug(`Rendering quadrant chart
994
- ` + t);
995
- const a = _.securityLevel;
996
- let A;
997
- a === "sandbox" && (A = Lt("#i" + n));
998
- const T = (a === "sandbox" ? Lt(A.nodes()[0].contentDocument.body) : Lt("body")).select(`[id="${n}"]`), q = T.append("g").attr("class", "main"), m = _.quadrantChart?.chartWidth ?? 500, b = _.quadrantChart?.chartHeight ?? 500;
999
- ve(T, b, m, _.quadrantChart?.useMaxWidth ?? !0), T.attr("viewBox", "0 0 " + m + " " + b), d.db.setHeight(b), d.db.setWidth(m);
1000
- const g = d.db.getQuadrantData(), G = q.append("g").attr("class", "quadrants"), ht = q.append("g").attr("class", "border"), xt = q.append("g").attr("class", "data-points"), ft = q.append("g").attr("class", "labels"), gt = q.append("g").attr("class", "title");
1001
- g.title && gt.append("text").attr("x", 0).attr("y", 0).attr("fill", g.title.fill).attr("font-size", g.title.fontSize).attr("dominant-baseline", h(g.title.horizontalPos)).attr("text-anchor", p(g.title.verticalPos)).attr("transform", y(g.title)).text(g.title.text), g.borderLines && ht.selectAll("line").data(g.borderLines).enter().append("line").attr("x1", (i) => i.x1).attr("y1", (i) => i.y1).attr("x2", (i) => i.x2).attr("y2", (i) => i.y2).style("stroke", (i) => i.strokeFill).style("stroke-width", (i) => i.strokeWidth);
1002
- const ct = G.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class", "quadrant");
1003
- ct.append("rect").attr("x", (i) => i.x).attr("y", (i) => i.y).attr("width", (i) => i.width).attr("height", (i) => i.height).attr("fill", (i) => i.fill), ct.append("text").attr("x", 0).attr("y", 0).attr("fill", (i) => i.text.fill).attr("font-size", (i) => i.text.fontSize).attr(
1004
- "dominant-baseline",
1005
- (i) => h(i.text.horizontalPos)
1006
- ).attr("text-anchor", (i) => p(i.text.verticalPos)).attr("transform", (i) => y(i.text)).text((i) => i.text.text), ft.selectAll("g.label").data(g.axisLabels).enter().append("g").attr("class", "label").append("text").attr("x", 0).attr("y", 0).text((i) => i.text).attr("fill", (i) => i.fill).attr("font-size", (i) => i.fontSize).attr("dominant-baseline", (i) => h(i.horizontalPos)).attr("text-anchor", (i) => p(i.verticalPos)).attr("transform", (i) => y(i));
1007
- const dt = xt.selectAll("g.data-point").data(g.points).enter().append("g").attr("class", "data-point");
1008
- dt.append("circle").attr("cx", (i) => i.x).attr("cy", (i) => i.y).attr("r", (i) => i.radius).attr("fill", (i) => i.fill).attr("stroke", (i) => i.strokeColor).attr("stroke-width", (i) => i.strokeWidth), dt.append("text").attr("x", 0).attr("y", 0).text((i) => i.text.text).attr("fill", (i) => i.text.fill).attr("font-size", (i) => i.text.fontSize).attr(
1009
- "dominant-baseline",
1010
- (i) => h(i.text.horizontalPos)
1011
- ).attr("text-anchor", (i) => p(i.text.verticalPos)).attr("transform", (i) => y(i.text));
1012
- }, "draw"), Re = {
1013
- draw: Be
1014
- }, Ue = {
1015
- parser: De,
1016
- db: we,
1017
- renderer: Re,
1018
- styles: /* @__PURE__ */ o(() => "", "styles")
1019
- };
1020
- export {
1021
- Ue as diagram
1022
- };