@leanspec/ui 0.2.28 → 0.3.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 (194) hide show
  1. package/dist/{_baseUniq-BtJuknnJ.js → _baseUniq-Cfpafgc0.js} +1 -1
  2. package/dist/{arc-O-rE7YCB.js → arc-Ch9WDeqx.js} +1 -1
  3. package/dist/{architecture-U656AL7Q-BeYqAAo7.js → architecture-U656AL7Q-BMkAcamw.js} +1 -1
  4. package/dist/{architectureDiagram-VXUJARFQ-DlDB9-tN.js → architectureDiagram-VXUJARFQ-B2kiuB6l.js} +3 -3
  5. package/dist/assets/ChatSettingsPage-BNkUWXD7.js +1 -0
  6. package/dist/assets/ContextPage-BXFBa390.js +14 -0
  7. package/dist/assets/{DashboardPage-DQH28Es5.js → DashboardPage-DG3o4y5K.js} +1 -1
  8. package/dist/assets/DependenciesPage-CAJX6zmQ.js +2 -0
  9. package/dist/assets/{FilesPage-BBVU37eW.js → FilesPage-E9VTXi3O.js} +3 -3
  10. package/dist/assets/SessionDetailPage-DsFv3UaN.js +4 -0
  11. package/dist/assets/SessionsPage-BJQkApgV.js +1 -0
  12. package/dist/assets/SpecDetailPage-NxlrFJ3X.js +3 -0
  13. package/dist/assets/SpecsPage-D7dH4bxd.js +1 -0
  14. package/dist/assets/StatsPage-DcDN3p4C.js +36 -0
  15. package/dist/assets/{_baseUniq-Dacov6Rp.js → _baseUniq-BLwGRN9T.js} +1 -1
  16. package/dist/assets/{arc-C1vHYpyW.js → arc-D46jVWXL.js} +1 -1
  17. package/dist/assets/architectureDiagram-VXUJARFQ-GKb1fnPC.js +36 -0
  18. package/dist/assets/blockDiagram-VD42YOAC-BAeW8TcZ.js +122 -0
  19. package/dist/assets/c4Diagram-YG6GDRKO-DsCDxNEY.js +10 -0
  20. package/dist/assets/channel-BCohFlQD.js +1 -0
  21. package/dist/assets/chunk-4BX2VUAB--jRtR2Gx.js +1 -0
  22. package/dist/assets/{chunk-55IACEB6-CEO6q7uK.js → chunk-55IACEB6-CK4VujpY.js} +1 -1
  23. package/dist/assets/{chunk-B4BG7PRW-DeXdKUh1.js → chunk-B4BG7PRW-CpmnmzRV.js} +6 -6
  24. package/dist/assets/chunk-DI55MBZ5-g0bpnDBm.js +220 -0
  25. package/dist/assets/{chunk-FMBD7UC4-D6UFHN61.js → chunk-FMBD7UC4-DrlucdFf.js} +1 -1
  26. package/dist/assets/chunk-QN33PNHL-Di9WxIWk.js +1 -0
  27. package/dist/assets/{chunk-QZHKN3VN-XfElTSSy.js → chunk-QZHKN3VN-DQ-Hq4Ek.js} +1 -1
  28. package/dist/assets/{chunk-TZMSLE5B-DAIUJ9YL.js → chunk-TZMSLE5B-Cdg6dOwb.js} +1 -1
  29. package/dist/assets/classDiagram-2ON5EDUG-BB3bs3WS.js +1 -0
  30. package/dist/assets/classDiagram-v2-WZHVMYZB-BB3bs3WS.js +1 -0
  31. package/dist/assets/clone-BFGeeEUV.js +1 -0
  32. package/dist/assets/{code-block-37QAKDTI-B3a0lz6t.js → code-block-37QAKDTI-B_yBCn5T.js} +1 -1
  33. package/dist/assets/cose-bilkent-S5V4N54A-BMhRWD7P.js +1 -0
  34. package/dist/assets/cytoscape.esm-Boq4YasU.js +321 -0
  35. package/dist/assets/dagre-6UL2VRFP-BI8xXpYB.js +4 -0
  36. package/dist/assets/diagram-PSM6KHXK-DqSGGlhJ.js +24 -0
  37. package/dist/assets/diagram-QEK2KX5R-CIjtZbdl.js +43 -0
  38. package/dist/assets/diagram-S2PKOQOG-CKt9XoCU.js +24 -0
  39. package/dist/assets/{erDiagram-Q2GNP2WA-BqqB9yVU.js → erDiagram-Q2GNP2WA-BRSo0yH7.js} +4 -4
  40. package/dist/assets/flowDiagram-NV44I4VS-BthSoz_o.js +162 -0
  41. package/dist/assets/{funnel-x-DD5BpUpW.js → funnel-x-B9PkB_Ch.js} +1 -1
  42. package/dist/assets/{ganttDiagram-JELNMOA3-DXHyY80Y.js → ganttDiagram-JELNMOA3-CNwbRK5k.js} +1 -1
  43. package/dist/assets/gitGraphDiagram-NY62KEGX-BNGeVHTR.js +65 -0
  44. package/dist/assets/{graph-0GUv5NSb.js → graph-DadEESFe.js} +1 -1
  45. package/dist/assets/index-CENAb10b.js +2187 -0
  46. package/dist/assets/index-Dw2Hz3j4.css +1 -0
  47. package/dist/assets/{info-BoE52mzX.js → info-DW259gfi.js} +1 -1
  48. package/dist/assets/{infoDiagram-WHAUD3N6-C_TEtQdE.js → infoDiagram-WHAUD3N6-CeJF3upx.js} +1 -1
  49. package/dist/assets/{journeyDiagram-XKPGCS4Q-JFcsNaoS.js → journeyDiagram-XKPGCS4Q-Dr67Preg.js} +1 -1
  50. package/dist/assets/kanban-definition-3W4ZIXB7-DpwQotp4.js +89 -0
  51. package/dist/assets/{layout-DlGkdPxn.js → layout-4MguctiF.js} +1 -1
  52. package/dist/assets/{linear-DMzKEHWt.js → linear-IgIsApJd.js} +1 -1
  53. package/dist/assets/{min-D9GrKucE.js → min-s8C1gLFb.js} +1 -1
  54. package/dist/assets/mindmap-definition-VGOIOE7T-DFKUH7eJ.js +68 -0
  55. package/dist/assets/{page-transition-BMYHE1EG.js → page-transition-2ToPXqzU.js} +1 -1
  56. package/dist/assets/pieDiagram-ADFJNKIX-BpyrOtAX.js +30 -0
  57. package/dist/assets/quadrantDiagram-AYHSOK5B-CAuPRVrk.js +7 -0
  58. package/dist/assets/{refresh-ccw-CqpLwlfM.js → refresh-ccw-A4xr5yc-.js} +1 -1
  59. package/dist/assets/{requirementDiagram-UZGBJVZJ-DQ1RBDeF.js → requirementDiagram-UZGBJVZJ-eokL0bzi.js} +7 -7
  60. package/dist/assets/sankeyDiagram-TZEHDZUN-B2hHsE_f.js +10 -0
  61. package/dist/assets/{sequenceDiagram-WL72ISMW-ClnYRNdC.js → sequenceDiagram-WL72ISMW-Clj8c0qS.js} +16 -16
  62. package/dist/assets/{session-mode-badge-auIgZbxq.js → session-mode-badge-C89NgahF.js} +1 -1
  63. package/dist/assets/{stat-card-BdyKZs20.js → stat-card-DV-CrlHv.js} +1 -1
  64. package/dist/assets/{stateDiagram-FKZM4ZOC-xdSWJeM-.js → stateDiagram-FKZM4ZOC-B4OFkmnx.js} +1 -1
  65. package/dist/assets/stateDiagram-v2-4FDKWEC3-XElvWSPn.js +1 -0
  66. package/dist/assets/{table-of-contents-B56zI3O0.js → table-of-contents-DXTiOsyr.js} +1 -1
  67. package/dist/assets/{time-BvMRJTpu.js → time-D3zosL_G.js} +1 -1
  68. package/dist/assets/timeline-definition-IT6M3QCI-Y7w9Ot5X.js +61 -0
  69. package/dist/assets/treemap-KMMF4GRG-DS1ewDz-.js +128 -0
  70. package/dist/assets/{trending-up-qrMVjIzR.js → trending-up-D4zFB2hx.js} +1 -1
  71. package/dist/assets/{validation-badge-DKLDRlSe.js → validation-badge-BPbTJ9B4.js} +1 -1
  72. package/dist/assets/{xychartDiagram-PRI3JC2R-LmjJ6LwN.js → xychartDiagram-PRI3JC2R-DTRIkv2x.js} +1 -1
  73. package/dist/{blockDiagram-VD42YOAC-Cvqa8noV.js → blockDiagram-VD42YOAC-BJR0FCnk.js} +5 -5
  74. package/dist/{c4Diagram-YG6GDRKO-D4hwame5.js → c4Diagram-YG6GDRKO-Bt0Epxwp.js} +2 -2
  75. package/dist/{channel-C59vLj3i.js → channel-Dk7mWM0A.js} +1 -1
  76. package/dist/{chunk-4BX2VUAB-BwnJRlDR.js → chunk-4BX2VUAB-ByHqqe_a.js} +1 -1
  77. package/dist/{chunk-55IACEB6-CUvZDifa.js → chunk-55IACEB6-C6Rm-yNH.js} +1 -1
  78. package/dist/{chunk-B4BG7PRW-0lyBGfGe.js → chunk-B4BG7PRW-B7fIUqxs.js} +4 -4
  79. package/dist/{chunk-DI55MBZ5-DzuHPqVn.js → chunk-DI55MBZ5-qLuPk8Gl.js} +3 -3
  80. package/dist/{chunk-FMBD7UC4-CXI1mAvv.js → chunk-FMBD7UC4-Bgxdan8l.js} +1 -1
  81. package/dist/{chunk-QN33PNHL-BX4buhkI.js → chunk-QN33PNHL-BkO_Xn3V.js} +1 -1
  82. package/dist/{chunk-QZHKN3VN-p7skz8XQ.js → chunk-QZHKN3VN-m08GnZpm.js} +1 -1
  83. package/dist/{chunk-TZMSLE5B-BaJuPr6J.js → chunk-TZMSLE5B-DvK9Nkqp.js} +1 -1
  84. package/dist/{classDiagram-v2-WZHVMYZB-Be0dkyy-.js → classDiagram-2ON5EDUG-DCzOVBP6.js} +2 -2
  85. package/dist/{classDiagram-2ON5EDUG-Be0dkyy-.js → classDiagram-v2-WZHVMYZB-DCzOVBP6.js} +2 -2
  86. package/dist/{clone-DDo6Ol2x.js → clone-BpfNWUZj.js} +1 -1
  87. package/dist/{cose-bilkent-S5V4N54A-Bt2GyPMu.js → cose-bilkent-S5V4N54A-BpjQClp_.js} +1 -1
  88. package/dist/{dagre-6UL2VRFP-B4GNvmUo.js → dagre-6UL2VRFP-Br_w0Y4b.js} +5 -5
  89. package/dist/{diagram-PSM6KHXK-CXpX_sN2.js → diagram-PSM6KHXK-reYm7V8l.js} +4 -4
  90. package/dist/{diagram-QEK2KX5R-BTpahbEj.js → diagram-QEK2KX5R-DrEPfuxO.js} +3 -3
  91. package/dist/{diagram-S2PKOQOG-BAp1IJGB.js → diagram-S2PKOQOG-vRL82AgB.js} +3 -3
  92. package/dist/{erDiagram-Q2GNP2WA-RpXtWNOz.js → erDiagram-Q2GNP2WA-DrANUeXv.js} +4 -4
  93. package/dist/{flowDiagram-NV44I4VS-DVAeihFU.js → flowDiagram-NV44I4VS-lzqrgi2-.js} +5 -5
  94. package/dist/{ganttDiagram-JELNMOA3-NnFNN967.js → ganttDiagram-JELNMOA3-Box6Sn7f.js} +2 -2
  95. package/dist/{gitGraph-F6HP7TQM-BA0p69BL.js → gitGraph-F6HP7TQM-ww-U1ysL.js} +1 -1
  96. package/dist/{gitGraphDiagram-NY62KEGX-STAanBwe.js → gitGraphDiagram-NY62KEGX-CtgGW6L9.js} +4 -4
  97. package/dist/{graph-Cl7g8mJo.js → graph-Csrlu3OG.js} +2 -2
  98. package/dist/{index-OMQgmcXQ.js → index-DSZdQoC5.js} +34 -34
  99. package/dist/index.html +13 -3
  100. package/dist/info-NVLQJR56-DdSoNNwK.js +5 -0
  101. package/dist/{infoDiagram-WHAUD3N6-Ch5c_x3A.js → infoDiagram-WHAUD3N6-B4cHYKqw.js} +2 -2
  102. package/dist/{journeyDiagram-XKPGCS4Q-BT3WQmRa.js → journeyDiagram-XKPGCS4Q-CNZRK4ng.js} +4 -4
  103. package/dist/{kanban-definition-3W4ZIXB7-CiJoVHr_.js → kanban-definition-3W4ZIXB7-DVYPrMkR.js} +2 -2
  104. package/dist/{layout-BsDPuqRL.js → layout-qhjDJGCt.js} +4 -4
  105. package/dist/lib/components/projects/create-project-dialog.d.ts +2 -1
  106. package/dist/lib/components/projects/git-import-dialog.d.ts +6 -0
  107. package/dist/lib/components/projects/git-import-form.d.ts +6 -0
  108. package/dist/lib/components/root-redirect.d.ts +1 -1
  109. package/dist/lib/hooks/useCapabilities.d.ts +180 -0
  110. package/dist/lib/index.js +1 -1
  111. package/dist/lib/lib/api.d.ts +4 -6
  112. package/dist/lib/lib/backend-adapter/core.d.ts +6 -8
  113. package/dist/lib/lib/backend-adapter/http.d.ts +5 -7
  114. package/dist/lib/lib/backend-adapter/tauri.d.ts +5 -7
  115. package/dist/lib/locales/en/common.json.d.ts +2 -2
  116. package/dist/lib/locales/zh-CN/common.json.d.ts +2 -2
  117. package/dist/lib/types/api.d.ts +7 -15
  118. package/dist/lib/types/generated/AdapterCapabilities.d.ts +18 -0
  119. package/dist/lib/types/generated/CompletableItem.d.ts +15 -0
  120. package/dist/lib/types/generated/EnumOption.d.ts +16 -0
  121. package/dist/lib/types/generated/FieldDef.d.ts +28 -0
  122. package/dist/lib/types/generated/FieldDisplay.d.ts +4 -0
  123. package/dist/lib/types/generated/FieldKind.d.ts +46 -0
  124. package/dist/lib/types/generated/FieldValue.d.ts +32 -0
  125. package/dist/lib/types/generated/ItemLink.d.ts +17 -0
  126. package/dist/lib/types/generated/LinkTypeDef.d.ts +11 -0
  127. package/dist/lib/types/generated/MetadataFieldSpec.d.ts +28 -0
  128. package/dist/lib/types/generated/MetadataKind.d.ts +17 -0
  129. package/dist/lib/types/generated/MetadataValue.d.ts +26 -0
  130. package/dist/lib/types/generated/Reference.d.ts +8 -0
  131. package/dist/lib/types/generated/SearchHit.d.ts +8 -0
  132. package/dist/lib/types/generated/SemanticHint.d.ts +4 -0
  133. package/dist/lib/types/generated/SpecDoc.d.ts +30 -0
  134. package/dist/lib/types/generated/SpecItem.d.ts +48 -0
  135. package/dist/lib/types/generated/SpecSchema.d.ts +25 -0
  136. package/dist/{linear-mOFrDt-p.js → linear-BEsG2XDl.js} +1 -1
  137. package/dist/{mermaid-parser.core-BKozsbnK.js → mermaid-parser.core-DI0P4xje.js} +10 -10
  138. package/dist/{min-BiKl7Djw.js → min-BrWJCoG9.js} +2 -2
  139. package/dist/{mindmap-definition-VGOIOE7T-BD-DdVQV.js → mindmap-definition-VGOIOE7T-BG1ZbSXN.js} +3 -3
  140. package/dist/{packet-BFZMPI3H-BCwLzQdp.js → packet-BFZMPI3H-0R4cyXFa.js} +1 -1
  141. package/dist/pie-7BOR55EZ-CBC6Vnp9.js +5 -0
  142. package/dist/{pieDiagram-ADFJNKIX-Bu8RN200.js → pieDiagram-ADFJNKIX-Bq3pEiUt.js} +4 -4
  143. package/dist/{quadrantDiagram-AYHSOK5B-DI1Je7Nn.js → quadrantDiagram-AYHSOK5B-CJCCPwac.js} +2 -2
  144. package/dist/radar-NHE76QYJ-R7FbU2R0.js +5 -0
  145. package/dist/{requirementDiagram-UZGBJVZJ-Ddx_vMRb.js → requirementDiagram-UZGBJVZJ-CEFnCGpg.js} +3 -3
  146. package/dist/{sankeyDiagram-TZEHDZUN-iAFyjtkY.js → sankeyDiagram-TZEHDZUN-vRgejrr7.js} +1 -1
  147. package/dist/{sequenceDiagram-WL72ISMW-NRQcqxnw.js → sequenceDiagram-WL72ISMW-Bn_-xqGS.js} +3 -3
  148. package/dist/{stateDiagram-FKZM4ZOC-3S1hbbmf.js → stateDiagram-FKZM4ZOC-D1wpTHL-.js} +4 -4
  149. package/dist/{stateDiagram-v2-4FDKWEC3-E5a40kZz.js → stateDiagram-v2-4FDKWEC3-DZ6_hPx3.js} +2 -2
  150. package/dist/{timeline-definition-IT6M3QCI-BCFa3ZrF.js → timeline-definition-IT6M3QCI-sxhKRCeY.js} +2 -2
  151. package/dist/{treemap-KMMF4GRG-BGlzeb2l.js → treemap-KMMF4GRG-BAGKypyB.js} +1 -1
  152. package/dist/ui.css +1 -1
  153. package/dist/{xychartDiagram-PRI3JC2R-CopvajdE.js → xychartDiagram-PRI3JC2R-BvZs2fIv.js} +2 -2
  154. package/package.json +2 -2
  155. package/dist/assets/ChatSettingsPage-DftRMMtU.js +0 -1
  156. package/dist/assets/ContextPage-CbK7ew6E.js +0 -14
  157. package/dist/assets/DependenciesPage-E93gHx4A.js +0 -2
  158. package/dist/assets/SessionDetailPage-7Nyk2Vvu.js +0 -4
  159. package/dist/assets/SessionsPage-aHydkWMy.js +0 -1
  160. package/dist/assets/SpecDetailPage-C2P-OlXI.js +0 -3
  161. package/dist/assets/SpecsPage-CYIBmjhJ.js +0 -1
  162. package/dist/assets/StatsPage-BE2SnGB_.js +0 -36
  163. package/dist/assets/architectureDiagram-VXUJARFQ-CJuppwvY.js +0 -36
  164. package/dist/assets/blockDiagram-VD42YOAC-JKuFC2tB.js +0 -122
  165. package/dist/assets/c4Diagram-YG6GDRKO-BGNHTjgV.js +0 -10
  166. package/dist/assets/channel-BBhsr-rR.js +0 -1
  167. package/dist/assets/chunk-4BX2VUAB-Dn9K_Ir6.js +0 -1
  168. package/dist/assets/chunk-DI55MBZ5-CoaAvDwo.js +0 -220
  169. package/dist/assets/chunk-QN33PNHL-BhFNOvzX.js +0 -1
  170. package/dist/assets/classDiagram-2ON5EDUG-DWsZgeAJ.js +0 -1
  171. package/dist/assets/classDiagram-v2-WZHVMYZB-DWsZgeAJ.js +0 -1
  172. package/dist/assets/clone-C2afIJUs.js +0 -1
  173. package/dist/assets/cose-bilkent-S5V4N54A-BMI_fEV7.js +0 -1
  174. package/dist/assets/cytoscape.esm-5J0xJHOV.js +0 -321
  175. package/dist/assets/dagre-6UL2VRFP-Llr-yTYV.js +0 -4
  176. package/dist/assets/diagram-PSM6KHXK-DwgNF44T.js +0 -24
  177. package/dist/assets/diagram-QEK2KX5R-ITZ8Vmt3.js +0 -43
  178. package/dist/assets/diagram-S2PKOQOG-BIRpYLio.js +0 -24
  179. package/dist/assets/flowDiagram-NV44I4VS-BNAcE_z4.js +0 -162
  180. package/dist/assets/gitGraphDiagram-NY62KEGX-BgdesX0s.js +0 -65
  181. package/dist/assets/index-C5tD8lpO.css +0 -1
  182. package/dist/assets/index-DSWQaVP_.js +0 -2187
  183. package/dist/assets/kanban-definition-3W4ZIXB7-D74EewjL.js +0 -89
  184. package/dist/assets/mindmap-definition-VGOIOE7T-bEmI6QdX.js +0 -68
  185. package/dist/assets/pieDiagram-ADFJNKIX-LrgsuoFm.js +0 -30
  186. package/dist/assets/quadrantDiagram-AYHSOK5B-XAEnrTcF.js +0 -7
  187. package/dist/assets/sankeyDiagram-TZEHDZUN-4LprtsUC.js +0 -10
  188. package/dist/assets/stateDiagram-v2-4FDKWEC3-DyupCcgD.js +0 -1
  189. package/dist/assets/timeline-definition-IT6M3QCI-BMCplyxv.js +0 -61
  190. package/dist/assets/treemap-KMMF4GRG-DXswoz8b.js +0 -128
  191. package/dist/info-NVLQJR56-iVvUDnHs.js +0 -5
  192. package/dist/lib/components/projects/github-import-dialog.d.ts +0 -6
  193. package/dist/pie-7BOR55EZ-0JoXf6-u.js +0 -5
  194. package/dist/radar-NHE76QYJ-FdQK6UPP.js +0 -5
@@ -1 +1 @@
1
- import{s as R,a as W,S as N}from"./chunk-DI55MBZ5-CoaAvDwo.js";import{_ as f,w as t,x as H,y as S,z as P,I as z,aq as _,ay as U,av as C,Q as F}from"./index-DSWQaVP_.js";import{G as O}from"./graph-0GUv5NSb.js";import{l as J}from"./layout-DlGkdPxn.js";import"./chunk-55IACEB6-CEO6q7uK.js";import"./chunk-QN33PNHL-BhFNOvzX.js";import"./_baseUniq-Dacov6Rp.js";import"./min-D9GrKucE.js";var X=f(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"),D=f(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"),I=f((e,i)=>{const d=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(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),Y=f((e,i)=>{const d=f(function(g,B,m){const E=g.append("tspan").attr("x",2*t().state.padding).text(B);m||E.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(g){a||(d(x,g,s),s=!1),a=!1});const w=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),o=Math.max(p.width,n.width);return w.attr("x2",o+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o+2*t().state.padding).attr("height",p.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),x=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let o=Math.max(p,x);o===x&&(o=o+n);let g;const B=e.node().getBBox();i.doc,g=a-c,p>x&&(g=(x-o)/2+c),Math.abs(a-B.x)<c&&p>x&&(g=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",o).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",g+c),p<=x&&s.attr("x",a+(o-n)/2-p/2+c),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const w of a){const p=w.trim();if(p.length>0){const o=l.append("tspan");if(o.text(p),s===0){const g=o.node().getBBox();s+=g.height}n+=s,o.attr("x",i+t().state.noteMargin),o.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),j=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Q(n,i),i.type==="note"&&j(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&I(n,i),i.type==="default"&&i.descriptions.length>0&&Y(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,K=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),x=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),x.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:w,y:p}=F.calcLabelPosition(i.points),o=z.getRows(d.title);let g=0;const B=[];let m=0,E=0;for(let u=0;u<=o.length;u++){const h=s.append("text").attr("text-anchor","middle").text(o[u]).attr("x",w).attr("y",p+g),y=h.node().getBBox();m=Math.max(m,y.width),E=Math.min(E,y.x),S.info(y.x,w,p+g),g===0&&(g=h.node().getBBox().height,S.info("Title height",g,p)),B.push(h)}let k=g*o.length;if(o.length>1){const u=(o.length-1)*g*.5;B.forEach((h,y)=>h.attr("y",p+y*g-u)),k=g*o.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",w-m/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const x=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);tt(s);const w=c.db.getRootDoc();G(w,s,void 0,!1,x,a,c);const p=b.padding,o=s.node().getBBox(),g=o.width+p*2,B=o.height+p*2,m=g*1.75;P(s,B,m,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+g+" "+B)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,x)=>{const a=new O({compound:!0,multigraph:!0});let s,w=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){w=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),o=x.db.getRelations(),g=Object.keys(p);for(const r of g){const u=p[r];d&&(u.parentId=d);let h;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,y,u.id,!c,n,l,x);{y=$(y,u,c);let v=y.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const y={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},v=L(i,y,a);u.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;o.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const y=h.parentElement;let v=0,M=0;y&&(y.parentElement&&(v=y.parentElement.getBBox().width),M=parseInt(y.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),K(i,a.edge(r),a.edge(r).relation))}),E=m.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=E.width+2*b.padding,k.height=E.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ht={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ht as diagram};
1
+ import{s as R,a as W,S as N}from"./chunk-DI55MBZ5-g0bpnDBm.js";import{_ as f,w as t,x as H,y as S,z as P,I as z,aq as _,ay as U,av as C,Q as F}from"./index-CENAb10b.js";import{G as O}from"./graph-DadEESFe.js";import{l as J}from"./layout-4MguctiF.js";import"./chunk-55IACEB6-CK4VujpY.js";import"./chunk-QN33PNHL-Di9WxIWk.js";import"./_baseUniq-BLwGRN9T.js";import"./min-s8C1gLFb.js";var X=f(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"),D=f(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"),I=f((e,i)=>{const d=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(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),Y=f((e,i)=>{const d=f(function(g,B,m){const E=g.append("tspan").attr("x",2*t().state.padding).text(B);m||E.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(g){a||(d(x,g,s),s=!1),a=!1});const w=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),o=Math.max(p.width,n.width);return w.attr("x2",o+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o+2*t().state.padding).attr("height",p.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),x=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let o=Math.max(p,x);o===x&&(o=o+n);let g;const B=e.node().getBBox();i.doc,g=a-c,p>x&&(g=(x-o)/2+c),Math.abs(a-B.x)<c&&p>x&&(g=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",o).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",g+c),p<=x&&s.attr("x",a+(o-n)/2-p/2+c),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const w of a){const p=w.trim();if(p.length>0){const o=l.append("tspan");if(o.text(p),s===0){const g=o.node().getBBox();s+=g.height}n+=s,o.attr("x",i+t().state.noteMargin),o.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),j=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Q(n,i),i.type==="note"&&j(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&I(n,i),i.type==="default"&&i.descriptions.length>0&&Y(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,K=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),x=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),x.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:w,y:p}=F.calcLabelPosition(i.points),o=z.getRows(d.title);let g=0;const B=[];let m=0,E=0;for(let u=0;u<=o.length;u++){const h=s.append("text").attr("text-anchor","middle").text(o[u]).attr("x",w).attr("y",p+g),y=h.node().getBBox();m=Math.max(m,y.width),E=Math.min(E,y.x),S.info(y.x,w,p+g),g===0&&(g=h.node().getBBox().height,S.info("Title height",g,p)),B.push(h)}let k=g*o.length;if(o.length>1){const u=(o.length-1)*g*.5;B.forEach((h,y)=>h.attr("y",p+y*g-u)),k=g*o.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",w-m/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const x=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);tt(s);const w=c.db.getRootDoc();G(w,s,void 0,!1,x,a,c);const p=b.padding,o=s.node().getBBox(),g=o.width+p*2,B=o.height+p*2,m=g*1.75;P(s,B,m,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+g+" "+B)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,x)=>{const a=new O({compound:!0,multigraph:!0});let s,w=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){w=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),o=x.db.getRelations(),g=Object.keys(p);for(const r of g){const u=p[r];d&&(u.parentId=d);let h;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,y,u.id,!c,n,l,x);{y=$(y,u,c);let v=y.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const y={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},v=L(i,y,a);u.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;o.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const y=h.parentElement;let v=0,M=0;y&&(y.parentElement&&(v=y.parentElement.getBBox().width),M=parseInt(y.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),K(i,a.edge(r),a.edge(r).relation))}),E=m.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=E.width+2*b.padding,k.height=E.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ht={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ht as diagram};
@@ -0,0 +1 @@
1
+ import{s as t,b as r,a,S as s}from"./chunk-DI55MBZ5-g0bpnDBm.js";import{_ as i}from"./index-CENAb10b.js";import"./chunk-55IACEB6-CK4VujpY.js";import"./chunk-QN33PNHL-Di9WxIWk.js";var l={parser:a,get db(){return new s(2)},renderer:r,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{l as diagram};
@@ -1,2 +1,2 @@
1
- import{u,r,j as n,D as p,a as g,L as b,b as j,c as v,d as C,e as w,f as T}from"./index-DSWQaVP_.js";function d(t){if(!t)return[];const s=[],e=t.split(`
1
+ import{u,r,j as n,D as p,a as g,L as b,b as j,c as v,d as C,e as w,f as T}from"./index-CENAb10b.js";function d(t){if(!t)return[];const s=[],e=t.split(`
2
2
  `);let o=!1;const a=new w;for(const i of e){if(i.trim().startsWith("```")){o=!o;continue}if(o)continue;const l=i.match(/^(#{2,6})\s+(.+)$/);if(l){const h=l[1].length,c=l[2].trim(),x=a.slug(c);s.push({id:x,text:c,level:h})}}return s}function m(t){const s=document.getElementById(t);s&&(s.scrollIntoView({behavior:"smooth",block:"start"}),window.history.replaceState?window.history.replaceState(null,"",`#${t}`):window.location.hash=t)}function f({headings:t,onHeadingClick:s}){return n.jsx("nav",{className:"space-y-1",children:t.map((e,o)=>n.jsx("button",{onClick:()=>s(e.id),className:T("w-full text-left px-2 py-1.5 text-sm rounded-md hover:bg-muted transition-colors flex items-start gap-2 group text-muted-foreground hover:text-foreground",e.level===2&&"font-medium text-foreground",e.level===3&&"pl-6",e.level===4&&"pl-10",e.level===5&&"pl-14",e.level===6&&"pl-18"),children:n.jsx("span",{className:"flex-1 truncate",children:e.text})},`${e.id}-${o}`))})}function O({content:t}){const{t:s}=u("common"),e=r.useMemo(()=>d(t),[t]);return e.length===0?null:n.jsxs("div",{className:"py-2",children:[n.jsx("h4",{className:"mb-4 text-sm font-semibold leading-none tracking-tight px-2",children:s("tableOfContents.onThisPage")}),n.jsx(f,{headings:e,onHeadingClick:m})]})}function k({content:t}){const{t:s}=u("common"),[e,o]=r.useState(!1),a=r.useMemo(()=>d(t),[t]);if(a.length===0)return null;const i=l=>{o(!1),setTimeout(()=>{m(l)},100)};return n.jsxs(p,{open:e,onOpenChange:o,children:[n.jsx(g,{size:"icon","aria-haspopup":"dialog","aria-expanded":e,onClick:()=>o(!0),className:"fixed bottom-24 right-6 h-12 w-12 rounded-full shadow-lg z-40 hover:scale-110 transition-transform","aria-label":s("tableOfContents.open"),children:n.jsx(b,{className:"h-5 w-5"})}),n.jsxs(j,{className:"max-w-md max-h-[80vh] overflow-y-auto",children:[n.jsx(v,{children:n.jsx(C,{children:s("tableOfContents.title")})}),n.jsx(f,{headings:a,onHeadingClick:i})]})]})}export{O as T,k as a};
@@ -1 +1 @@
1
- import{b as un,t as Te,c as on,a as an}from"./linear-DMzKEHWt.js";import{i as cn}from"./init-Dmth1JHB.js";function Yt(e,n){let t;if(n===void 0)for(const r of e)r!=null&&(t<r||t===void 0&&r>=r)&&(t=r);else{let r=-1;for(let c of e)(c=n(c,++r,e))!=null&&(t<c||t===void 0&&c>=c)&&(t=c)}return t}function xt(e,n){let t;if(n===void 0)for(const r of e)r!=null&&(t>r||t===void 0&&r>=r)&&(t=r);else{let r=-1;for(let c of e)(c=n(c,++r,e))!=null&&(t>c||t===void 0&&c>=c)&&(t=c)}return t}function sn(e,n){e=e.slice();var t=0,r=e.length-1,c=e[t],o=e[r],i;return o<c&&(i=t,t=r,r=i,i=c,c=o,o=i),e[t]=n.floor(c),e[r]=n.ceil(o),e}const re=new Date,ue=new Date;function M(e,n,t,r){function c(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return c.floor=o=>(e(o=new Date(+o)),o),c.ceil=o=>(e(o=new Date(o-1)),n(o,1),e(o),o),c.round=o=>{const i=c(o),y=c.ceil(o);return o-i<y-o?i:y},c.offset=(o,i)=>(n(o=new Date(+o),i==null?1:Math.floor(i)),o),c.range=(o,i,y)=>{const C=[];if(o=c.ceil(o),y=y==null?1:Math.floor(y),!(o<i)||!(y>0))return C;let h;do C.push(h=new Date(+o)),n(o,y),e(o);while(h<o&&o<i);return C},c.filter=o=>M(i=>{if(i>=i)for(;e(i),!o(i);)i.setTime(i-1)},(i,y)=>{if(i>=i)if(y<0)for(;++y<=0;)for(;n(i,-1),!o(i););else for(;--y>=0;)for(;n(i,1),!o(i););}),t&&(c.count=(o,i)=>(re.setTime(+o),ue.setTime(+i),e(re),e(ue),Math.floor(t(re,ue))),c.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?c.filter(r?i=>r(i)%o===0:i=>c.count(0,i)%o===0):c)),c}const G=M(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);G.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?M(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):G);G.range;const b=1e3,x=b*60,L=x*60,k=L*24,ie=k*7,ye=k*30,oe=k*365,q=M(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*b)},(e,n)=>(n-e)/b,e=>e.getUTCSeconds());q.range;const se=M(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*b)},(e,n)=>{e.setTime(+e+n*x)},(e,n)=>(n-e)/x,e=>e.getMinutes());se.range;const xe=M(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*x)},(e,n)=>(n-e)/x,e=>e.getUTCMinutes());xe.range;const fe=M(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*b-e.getMinutes()*x)},(e,n)=>{e.setTime(+e+n*L)},(e,n)=>(n-e)/L,e=>e.getHours());fe.range;const He=M(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*L)},(e,n)=>(n-e)/L,e=>e.getUTCHours());He.range;const B=M(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*x)/k,e=>e.getDate()-1);B.range;const le=M(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/k,e=>e.getUTCDate()-1);le.range;const We=M(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/k,e=>Math.floor(e/k));We.range;function Z(e){return M(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,t)=>{n.setDate(n.getDate()+t*7)},(n,t)=>(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*x)/ie)}const K=Z(0),$=Z(1),fn=Z(2),ln=Z(3),P=Z(4),gn=Z(5),mn=Z(6);K.range;$.range;fn.range;ln.range;P.range;gn.range;mn.range;function d(e){return M(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCDate(n.getUTCDate()+t*7)},(n,t)=>(t-n)/ie)}const ge=d(0),E=d(1),hn=d(2),Tn=d(3),Q=d(4),yn=d(5),Mn=d(6);ge.range;E.range;hn.range;Tn.range;Q.range;yn.range;Mn.range;const me=M(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());me.range;const be=M(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());be.range;const O=M(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());O.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:M(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,t)=>{n.setFullYear(n.getFullYear()+t*e)});O.range;const I=M(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());I.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:M(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCFullYear(n.getUTCFullYear()+t*e)});I.range;function Le(e,n,t,r,c,o){const i=[[q,1,b],[q,5,5*b],[q,15,15*b],[q,30,30*b],[o,1,x],[o,5,5*x],[o,15,15*x],[o,30,30*x],[c,1,L],[c,3,3*L],[c,6,6*L],[c,12,12*L],[r,1,k],[r,2,2*k],[t,1,ie],[n,1,ye],[n,3,3*ye],[e,1,oe]];function y(h,T,Y){const D=T<h;D&&([h,T]=[T,h]);const w=Y&&typeof Y.range=="function"?Y:C(h,T,Y),N=w?w.range(h,+T+1):[];return D?N.reverse():N}function C(h,T,Y){const D=Math.abs(T-h)/Y,w=un(([,,_])=>_).right(i,D);if(w===i.length)return e.every(Te(h/oe,T/oe,Y));if(w===0)return G.every(Math.max(Te(h,T,Y),1));const[N,V]=i[D/i[w-1][2]<i[w][2]/D?w-1:w];return N.every(V)}return[y,C]}const[Ht,Wt]=Le(I,be,ge,We,He,xe),[Un,Cn]=Le(O,me,K,B,fe,se);function ae(e){if(0<=e.y&&e.y<100){var n=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return n.setFullYear(e.y),n}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ce(e){if(0<=e.y&&e.y<100){var n=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return n.setUTCFullYear(e.y),n}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function z(e,n,t){return{y:e,m:n,d:t,H:0,M:0,S:0,L:0}}function Dn(e){var n=e.dateTime,t=e.date,r=e.time,c=e.periods,o=e.days,i=e.shortDays,y=e.months,C=e.shortMonths,h=J(c),T=X(c),Y=J(o),D=X(o),w=J(i),N=X(i),V=J(y),_=X(y),ee=J(C),ne=X(C),H={a:Je,A:Xe,b:Be,B:je,c:null,d:Se,e:Se,f:Vn,g:Kn,G:nt,H:qn,I:Pn,j:Qn,L:ke,m:_n,M:zn,p:Ge,q:$e,Q:Fe,s:Ye,S:Jn,u:Xn,U:Bn,V:jn,w:Gn,W:$n,x:null,X:null,y:En,Y:et,Z:tt,"%":pe},W={a:Ee,A:Ke,b:en,B:nn,c:null,d:we,e:we,f:at,g:yt,G:Ut,H:rt,I:ut,j:ot,L:Ne,m:ct,M:it,p:tn,q:rn,Q:Fe,s:Ye,S:st,u:ft,U:lt,V:gt,w:mt,W:ht,x:null,X:null,y:Tt,Y:Mt,Z:Ct,"%":pe},te={a:Re,A:qe,b:Pe,B:Qe,c:Ve,d:De,e:De,f:An,g:Ce,G:Ue,H:ve,I:ve,j:kn,L:In,m:Ln,M:On,p:de,q:bn,Q:dn,s:Rn,S:Nn,u:Fn,U:Yn,V:xn,w:pn,W:Hn,x:_e,X:ze,y:Ce,Y:Ue,Z:Wn,"%":Zn};H.x=s(t,H),H.X=s(r,H),H.c=s(n,H),W.x=s(t,W),W.X=s(r,W),W.c=s(n,W);function s(a,f){return function(l){var u=[],S=-1,m=0,p=a.length,F,A,he;for(l instanceof Date||(l=new Date(+l));++S<p;)a.charCodeAt(S)===37&&(u.push(a.slice(m,S)),(A=Me[F=a.charAt(++S)])!=null?F=a.charAt(++S):A=F==="e"?" ":"0",(he=f[F])&&(F=he(l,A)),u.push(F),m=S+1);return u.push(a.slice(m,S)),u.join("")}}function v(a,f){return function(l){var u=z(1900,void 0,1),S=j(u,a,l+="",0),m,p;if(S!=l.length)return null;if("Q"in u)return new Date(u.Q);if("s"in u)return new Date(u.s*1e3+("L"in u?u.L:0));if(f&&!("Z"in u)&&(u.Z=0),"p"in u&&(u.H=u.H%12+u.p*12),u.m===void 0&&(u.m="q"in u?u.q:0),"V"in u){if(u.V<1||u.V>53)return null;"w"in u||(u.w=1),"Z"in u?(m=ce(z(u.y,0,1)),p=m.getUTCDay(),m=p>4||p===0?E.ceil(m):E(m),m=le.offset(m,(u.V-1)*7),u.y=m.getUTCFullYear(),u.m=m.getUTCMonth(),u.d=m.getUTCDate()+(u.w+6)%7):(m=ae(z(u.y,0,1)),p=m.getDay(),m=p>4||p===0?$.ceil(m):$(m),m=B.offset(m,(u.V-1)*7),u.y=m.getFullYear(),u.m=m.getMonth(),u.d=m.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),p="Z"in u?ce(z(u.y,0,1)).getUTCDay():ae(z(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+u.W*7-(p+5)%7:u.w+u.U*7-(p+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,ce(u)):ae(u)}}function j(a,f,l,u){for(var S=0,m=f.length,p=l.length,F,A;S<m;){if(u>=p)return-1;if(F=f.charCodeAt(S++),F===37){if(F=f.charAt(S++),A=te[F in Me?f.charAt(S++):F],!A||(u=A(a,l,u))<0)return-1}else if(F!=l.charCodeAt(u++))return-1}return u}function de(a,f,l){var u=h.exec(f.slice(l));return u?(a.p=T.get(u[0].toLowerCase()),l+u[0].length):-1}function Re(a,f,l){var u=w.exec(f.slice(l));return u?(a.w=N.get(u[0].toLowerCase()),l+u[0].length):-1}function qe(a,f,l){var u=Y.exec(f.slice(l));return u?(a.w=D.get(u[0].toLowerCase()),l+u[0].length):-1}function Pe(a,f,l){var u=ee.exec(f.slice(l));return u?(a.m=ne.get(u[0].toLowerCase()),l+u[0].length):-1}function Qe(a,f,l){var u=V.exec(f.slice(l));return u?(a.m=_.get(u[0].toLowerCase()),l+u[0].length):-1}function Ve(a,f,l){return j(a,n,f,l)}function _e(a,f,l){return j(a,t,f,l)}function ze(a,f,l){return j(a,r,f,l)}function Je(a){return i[a.getDay()]}function Xe(a){return o[a.getDay()]}function Be(a){return C[a.getMonth()]}function je(a){return y[a.getMonth()]}function Ge(a){return c[+(a.getHours()>=12)]}function $e(a){return 1+~~(a.getMonth()/3)}function Ee(a){return i[a.getUTCDay()]}function Ke(a){return o[a.getUTCDay()]}function en(a){return C[a.getUTCMonth()]}function nn(a){return y[a.getUTCMonth()]}function tn(a){return c[+(a.getUTCHours()>=12)]}function rn(a){return 1+~~(a.getUTCMonth()/3)}return{format:function(a){var f=s(a+="",H);return f.toString=function(){return a},f},parse:function(a){var f=v(a+="",!1);return f.toString=function(){return a},f},utcFormat:function(a){var f=s(a+="",W);return f.toString=function(){return a},f},utcParse:function(a){var f=v(a+="",!0);return f.toString=function(){return a},f}}}var Me={"-":"",_:" ",0:"0"},U=/^\s*\d+/,vn=/^%/,Sn=/[\\^$*+?|[\]().{}]/g;function g(e,n,t){var r=e<0?"-":"",c=(r?-e:e)+"",o=c.length;return r+(o<t?new Array(t-o+1).join(n)+c:c)}function wn(e){return e.replace(Sn,"\\$&")}function J(e){return new RegExp("^(?:"+e.map(wn).join("|")+")","i")}function X(e){return new Map(e.map((n,t)=>[n.toLowerCase(),t]))}function pn(e,n,t){var r=U.exec(n.slice(t,t+1));return r?(e.w=+r[0],t+r[0].length):-1}function Fn(e,n,t){var r=U.exec(n.slice(t,t+1));return r?(e.u=+r[0],t+r[0].length):-1}function Yn(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.U=+r[0],t+r[0].length):-1}function xn(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.V=+r[0],t+r[0].length):-1}function Hn(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.W=+r[0],t+r[0].length):-1}function Ue(e,n,t){var r=U.exec(n.slice(t,t+4));return r?(e.y=+r[0],t+r[0].length):-1}function Ce(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),t+r[0].length):-1}function Wn(e,n,t){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(t,t+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),t+r[0].length):-1}function bn(e,n,t){var r=U.exec(n.slice(t,t+1));return r?(e.q=r[0]*3-3,t+r[0].length):-1}function Ln(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.m=r[0]-1,t+r[0].length):-1}function De(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.d=+r[0],t+r[0].length):-1}function kn(e,n,t){var r=U.exec(n.slice(t,t+3));return r?(e.m=0,e.d=+r[0],t+r[0].length):-1}function ve(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.H=+r[0],t+r[0].length):-1}function On(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.M=+r[0],t+r[0].length):-1}function Nn(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.S=+r[0],t+r[0].length):-1}function In(e,n,t){var r=U.exec(n.slice(t,t+3));return r?(e.L=+r[0],t+r[0].length):-1}function An(e,n,t){var r=U.exec(n.slice(t,t+6));return r?(e.L=Math.floor(r[0]/1e3),t+r[0].length):-1}function Zn(e,n,t){var r=vn.exec(n.slice(t,t+1));return r?t+r[0].length:-1}function dn(e,n,t){var r=U.exec(n.slice(t));return r?(e.Q=+r[0],t+r[0].length):-1}function Rn(e,n,t){var r=U.exec(n.slice(t));return r?(e.s=+r[0],t+r[0].length):-1}function Se(e,n){return g(e.getDate(),n,2)}function qn(e,n){return g(e.getHours(),n,2)}function Pn(e,n){return g(e.getHours()%12||12,n,2)}function Qn(e,n){return g(1+B.count(O(e),e),n,3)}function ke(e,n){return g(e.getMilliseconds(),n,3)}function Vn(e,n){return ke(e,n)+"000"}function _n(e,n){return g(e.getMonth()+1,n,2)}function zn(e,n){return g(e.getMinutes(),n,2)}function Jn(e,n){return g(e.getSeconds(),n,2)}function Xn(e){var n=e.getDay();return n===0?7:n}function Bn(e,n){return g(K.count(O(e)-1,e),n,2)}function Oe(e){var n=e.getDay();return n>=4||n===0?P(e):P.ceil(e)}function jn(e,n){return e=Oe(e),g(P.count(O(e),e)+(O(e).getDay()===4),n,2)}function Gn(e){return e.getDay()}function $n(e,n){return g($.count(O(e)-1,e),n,2)}function En(e,n){return g(e.getFullYear()%100,n,2)}function Kn(e,n){return e=Oe(e),g(e.getFullYear()%100,n,2)}function et(e,n){return g(e.getFullYear()%1e4,n,4)}function nt(e,n){var t=e.getDay();return e=t>=4||t===0?P(e):P.ceil(e),g(e.getFullYear()%1e4,n,4)}function tt(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+g(n/60|0,"0",2)+g(n%60,"0",2)}function we(e,n){return g(e.getUTCDate(),n,2)}function rt(e,n){return g(e.getUTCHours(),n,2)}function ut(e,n){return g(e.getUTCHours()%12||12,n,2)}function ot(e,n){return g(1+le.count(I(e),e),n,3)}function Ne(e,n){return g(e.getUTCMilliseconds(),n,3)}function at(e,n){return Ne(e,n)+"000"}function ct(e,n){return g(e.getUTCMonth()+1,n,2)}function it(e,n){return g(e.getUTCMinutes(),n,2)}function st(e,n){return g(e.getUTCSeconds(),n,2)}function ft(e){var n=e.getUTCDay();return n===0?7:n}function lt(e,n){return g(ge.count(I(e)-1,e),n,2)}function Ie(e){var n=e.getUTCDay();return n>=4||n===0?Q(e):Q.ceil(e)}function gt(e,n){return e=Ie(e),g(Q.count(I(e),e)+(I(e).getUTCDay()===4),n,2)}function mt(e){return e.getUTCDay()}function ht(e,n){return g(E.count(I(e)-1,e),n,2)}function Tt(e,n){return g(e.getUTCFullYear()%100,n,2)}function yt(e,n){return e=Ie(e),g(e.getUTCFullYear()%100,n,2)}function Mt(e,n){return g(e.getUTCFullYear()%1e4,n,4)}function Ut(e,n){var t=e.getUTCDay();return e=t>=4||t===0?Q(e):Q.ceil(e),g(e.getUTCFullYear()%1e4,n,4)}function Ct(){return"+0000"}function pe(){return"%"}function Fe(e){return+e}function Ye(e){return Math.floor(+e/1e3)}var R,Ae,Dt;vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vt(e){return R=Dn(e),Ae=R.format,R.parse,Dt=R.utcFormat,R.utcParse,R}function St(e){return new Date(e)}function wt(e){return e instanceof Date?+e:+new Date(+e)}function Ze(e,n,t,r,c,o,i,y,C,h){var T=on(),Y=T.invert,D=T.domain,w=h(".%L"),N=h(":%S"),V=h("%I:%M"),_=h("%I %p"),ee=h("%a %d"),ne=h("%b %d"),H=h("%B"),W=h("%Y");function te(s){return(C(s)<s?w:y(s)<s?N:i(s)<s?V:o(s)<s?_:r(s)<s?c(s)<s?ee:ne:t(s)<s?H:W)(s)}return T.invert=function(s){return new Date(Y(s))},T.domain=function(s){return arguments.length?D(Array.from(s,wt)):D().map(St)},T.ticks=function(s){var v=D();return e(v[0],v[v.length-1],s??10)},T.tickFormat=function(s,v){return v==null?te:h(v)},T.nice=function(s){var v=D();return(!s||typeof s.range!="function")&&(s=n(v[0],v[v.length-1],s??10)),s?D(sn(v,s)):T},T.copy=function(){return an(T,Ze(e,n,t,r,c,o,i,y,C,h))},T}function bt(){return cn.apply(Ze(Un,Cn,O,me,K,B,fe,se,q,Ae).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{Wt as A,Ht as B,Yt as a,Ae as b,me as c,K as d,mn as e,gn as f,P as g,ln as h,fn as i,$ as j,B as k,fe as l,xt as m,se as n,G as o,sn as p,Ze as q,xe as r,q as s,bt as t,Dt as u,He as v,le as w,ge as x,be as y,I as z};
1
+ import{b as un,t as Te,c as on,a as an}from"./linear-IgIsApJd.js";import{i as cn}from"./init-Dmth1JHB.js";function Yt(e,n){let t;if(n===void 0)for(const r of e)r!=null&&(t<r||t===void 0&&r>=r)&&(t=r);else{let r=-1;for(let c of e)(c=n(c,++r,e))!=null&&(t<c||t===void 0&&c>=c)&&(t=c)}return t}function xt(e,n){let t;if(n===void 0)for(const r of e)r!=null&&(t>r||t===void 0&&r>=r)&&(t=r);else{let r=-1;for(let c of e)(c=n(c,++r,e))!=null&&(t>c||t===void 0&&c>=c)&&(t=c)}return t}function sn(e,n){e=e.slice();var t=0,r=e.length-1,c=e[t],o=e[r],i;return o<c&&(i=t,t=r,r=i,i=c,c=o,o=i),e[t]=n.floor(c),e[r]=n.ceil(o),e}const re=new Date,ue=new Date;function M(e,n,t,r){function c(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return c.floor=o=>(e(o=new Date(+o)),o),c.ceil=o=>(e(o=new Date(o-1)),n(o,1),e(o),o),c.round=o=>{const i=c(o),y=c.ceil(o);return o-i<y-o?i:y},c.offset=(o,i)=>(n(o=new Date(+o),i==null?1:Math.floor(i)),o),c.range=(o,i,y)=>{const C=[];if(o=c.ceil(o),y=y==null?1:Math.floor(y),!(o<i)||!(y>0))return C;let h;do C.push(h=new Date(+o)),n(o,y),e(o);while(h<o&&o<i);return C},c.filter=o=>M(i=>{if(i>=i)for(;e(i),!o(i);)i.setTime(i-1)},(i,y)=>{if(i>=i)if(y<0)for(;++y<=0;)for(;n(i,-1),!o(i););else for(;--y>=0;)for(;n(i,1),!o(i););}),t&&(c.count=(o,i)=>(re.setTime(+o),ue.setTime(+i),e(re),e(ue),Math.floor(t(re,ue))),c.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?c.filter(r?i=>r(i)%o===0:i=>c.count(0,i)%o===0):c)),c}const G=M(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);G.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?M(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):G);G.range;const b=1e3,x=b*60,L=x*60,k=L*24,ie=k*7,ye=k*30,oe=k*365,q=M(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*b)},(e,n)=>(n-e)/b,e=>e.getUTCSeconds());q.range;const se=M(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*b)},(e,n)=>{e.setTime(+e+n*x)},(e,n)=>(n-e)/x,e=>e.getMinutes());se.range;const xe=M(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*x)},(e,n)=>(n-e)/x,e=>e.getUTCMinutes());xe.range;const fe=M(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*b-e.getMinutes()*x)},(e,n)=>{e.setTime(+e+n*L)},(e,n)=>(n-e)/L,e=>e.getHours());fe.range;const He=M(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*L)},(e,n)=>(n-e)/L,e=>e.getUTCHours());He.range;const B=M(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*x)/k,e=>e.getDate()-1);B.range;const le=M(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/k,e=>e.getUTCDate()-1);le.range;const We=M(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/k,e=>Math.floor(e/k));We.range;function Z(e){return M(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,t)=>{n.setDate(n.getDate()+t*7)},(n,t)=>(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*x)/ie)}const K=Z(0),$=Z(1),fn=Z(2),ln=Z(3),P=Z(4),gn=Z(5),mn=Z(6);K.range;$.range;fn.range;ln.range;P.range;gn.range;mn.range;function d(e){return M(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCDate(n.getUTCDate()+t*7)},(n,t)=>(t-n)/ie)}const ge=d(0),E=d(1),hn=d(2),Tn=d(3),Q=d(4),yn=d(5),Mn=d(6);ge.range;E.range;hn.range;Tn.range;Q.range;yn.range;Mn.range;const me=M(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());me.range;const be=M(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());be.range;const O=M(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());O.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:M(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,t)=>{n.setFullYear(n.getFullYear()+t*e)});O.range;const I=M(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());I.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:M(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCFullYear(n.getUTCFullYear()+t*e)});I.range;function Le(e,n,t,r,c,o){const i=[[q,1,b],[q,5,5*b],[q,15,15*b],[q,30,30*b],[o,1,x],[o,5,5*x],[o,15,15*x],[o,30,30*x],[c,1,L],[c,3,3*L],[c,6,6*L],[c,12,12*L],[r,1,k],[r,2,2*k],[t,1,ie],[n,1,ye],[n,3,3*ye],[e,1,oe]];function y(h,T,Y){const D=T<h;D&&([h,T]=[T,h]);const w=Y&&typeof Y.range=="function"?Y:C(h,T,Y),N=w?w.range(h,+T+1):[];return D?N.reverse():N}function C(h,T,Y){const D=Math.abs(T-h)/Y,w=un(([,,_])=>_).right(i,D);if(w===i.length)return e.every(Te(h/oe,T/oe,Y));if(w===0)return G.every(Math.max(Te(h,T,Y),1));const[N,V]=i[D/i[w-1][2]<i[w][2]/D?w-1:w];return N.every(V)}return[y,C]}const[Ht,Wt]=Le(I,be,ge,We,He,xe),[Un,Cn]=Le(O,me,K,B,fe,se);function ae(e){if(0<=e.y&&e.y<100){var n=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return n.setFullYear(e.y),n}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ce(e){if(0<=e.y&&e.y<100){var n=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return n.setUTCFullYear(e.y),n}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function z(e,n,t){return{y:e,m:n,d:t,H:0,M:0,S:0,L:0}}function Dn(e){var n=e.dateTime,t=e.date,r=e.time,c=e.periods,o=e.days,i=e.shortDays,y=e.months,C=e.shortMonths,h=J(c),T=X(c),Y=J(o),D=X(o),w=J(i),N=X(i),V=J(y),_=X(y),ee=J(C),ne=X(C),H={a:Je,A:Xe,b:Be,B:je,c:null,d:Se,e:Se,f:Vn,g:Kn,G:nt,H:qn,I:Pn,j:Qn,L:ke,m:_n,M:zn,p:Ge,q:$e,Q:Fe,s:Ye,S:Jn,u:Xn,U:Bn,V:jn,w:Gn,W:$n,x:null,X:null,y:En,Y:et,Z:tt,"%":pe},W={a:Ee,A:Ke,b:en,B:nn,c:null,d:we,e:we,f:at,g:yt,G:Ut,H:rt,I:ut,j:ot,L:Ne,m:ct,M:it,p:tn,q:rn,Q:Fe,s:Ye,S:st,u:ft,U:lt,V:gt,w:mt,W:ht,x:null,X:null,y:Tt,Y:Mt,Z:Ct,"%":pe},te={a:Re,A:qe,b:Pe,B:Qe,c:Ve,d:De,e:De,f:An,g:Ce,G:Ue,H:ve,I:ve,j:kn,L:In,m:Ln,M:On,p:de,q:bn,Q:dn,s:Rn,S:Nn,u:Fn,U:Yn,V:xn,w:pn,W:Hn,x:_e,X:ze,y:Ce,Y:Ue,Z:Wn,"%":Zn};H.x=s(t,H),H.X=s(r,H),H.c=s(n,H),W.x=s(t,W),W.X=s(r,W),W.c=s(n,W);function s(a,f){return function(l){var u=[],S=-1,m=0,p=a.length,F,A,he;for(l instanceof Date||(l=new Date(+l));++S<p;)a.charCodeAt(S)===37&&(u.push(a.slice(m,S)),(A=Me[F=a.charAt(++S)])!=null?F=a.charAt(++S):A=F==="e"?" ":"0",(he=f[F])&&(F=he(l,A)),u.push(F),m=S+1);return u.push(a.slice(m,S)),u.join("")}}function v(a,f){return function(l){var u=z(1900,void 0,1),S=j(u,a,l+="",0),m,p;if(S!=l.length)return null;if("Q"in u)return new Date(u.Q);if("s"in u)return new Date(u.s*1e3+("L"in u?u.L:0));if(f&&!("Z"in u)&&(u.Z=0),"p"in u&&(u.H=u.H%12+u.p*12),u.m===void 0&&(u.m="q"in u?u.q:0),"V"in u){if(u.V<1||u.V>53)return null;"w"in u||(u.w=1),"Z"in u?(m=ce(z(u.y,0,1)),p=m.getUTCDay(),m=p>4||p===0?E.ceil(m):E(m),m=le.offset(m,(u.V-1)*7),u.y=m.getUTCFullYear(),u.m=m.getUTCMonth(),u.d=m.getUTCDate()+(u.w+6)%7):(m=ae(z(u.y,0,1)),p=m.getDay(),m=p>4||p===0?$.ceil(m):$(m),m=B.offset(m,(u.V-1)*7),u.y=m.getFullYear(),u.m=m.getMonth(),u.d=m.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),p="Z"in u?ce(z(u.y,0,1)).getUTCDay():ae(z(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+u.W*7-(p+5)%7:u.w+u.U*7-(p+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,ce(u)):ae(u)}}function j(a,f,l,u){for(var S=0,m=f.length,p=l.length,F,A;S<m;){if(u>=p)return-1;if(F=f.charCodeAt(S++),F===37){if(F=f.charAt(S++),A=te[F in Me?f.charAt(S++):F],!A||(u=A(a,l,u))<0)return-1}else if(F!=l.charCodeAt(u++))return-1}return u}function de(a,f,l){var u=h.exec(f.slice(l));return u?(a.p=T.get(u[0].toLowerCase()),l+u[0].length):-1}function Re(a,f,l){var u=w.exec(f.slice(l));return u?(a.w=N.get(u[0].toLowerCase()),l+u[0].length):-1}function qe(a,f,l){var u=Y.exec(f.slice(l));return u?(a.w=D.get(u[0].toLowerCase()),l+u[0].length):-1}function Pe(a,f,l){var u=ee.exec(f.slice(l));return u?(a.m=ne.get(u[0].toLowerCase()),l+u[0].length):-1}function Qe(a,f,l){var u=V.exec(f.slice(l));return u?(a.m=_.get(u[0].toLowerCase()),l+u[0].length):-1}function Ve(a,f,l){return j(a,n,f,l)}function _e(a,f,l){return j(a,t,f,l)}function ze(a,f,l){return j(a,r,f,l)}function Je(a){return i[a.getDay()]}function Xe(a){return o[a.getDay()]}function Be(a){return C[a.getMonth()]}function je(a){return y[a.getMonth()]}function Ge(a){return c[+(a.getHours()>=12)]}function $e(a){return 1+~~(a.getMonth()/3)}function Ee(a){return i[a.getUTCDay()]}function Ke(a){return o[a.getUTCDay()]}function en(a){return C[a.getUTCMonth()]}function nn(a){return y[a.getUTCMonth()]}function tn(a){return c[+(a.getUTCHours()>=12)]}function rn(a){return 1+~~(a.getUTCMonth()/3)}return{format:function(a){var f=s(a+="",H);return f.toString=function(){return a},f},parse:function(a){var f=v(a+="",!1);return f.toString=function(){return a},f},utcFormat:function(a){var f=s(a+="",W);return f.toString=function(){return a},f},utcParse:function(a){var f=v(a+="",!0);return f.toString=function(){return a},f}}}var Me={"-":"",_:" ",0:"0"},U=/^\s*\d+/,vn=/^%/,Sn=/[\\^$*+?|[\]().{}]/g;function g(e,n,t){var r=e<0?"-":"",c=(r?-e:e)+"",o=c.length;return r+(o<t?new Array(t-o+1).join(n)+c:c)}function wn(e){return e.replace(Sn,"\\$&")}function J(e){return new RegExp("^(?:"+e.map(wn).join("|")+")","i")}function X(e){return new Map(e.map((n,t)=>[n.toLowerCase(),t]))}function pn(e,n,t){var r=U.exec(n.slice(t,t+1));return r?(e.w=+r[0],t+r[0].length):-1}function Fn(e,n,t){var r=U.exec(n.slice(t,t+1));return r?(e.u=+r[0],t+r[0].length):-1}function Yn(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.U=+r[0],t+r[0].length):-1}function xn(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.V=+r[0],t+r[0].length):-1}function Hn(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.W=+r[0],t+r[0].length):-1}function Ue(e,n,t){var r=U.exec(n.slice(t,t+4));return r?(e.y=+r[0],t+r[0].length):-1}function Ce(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),t+r[0].length):-1}function Wn(e,n,t){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(t,t+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),t+r[0].length):-1}function bn(e,n,t){var r=U.exec(n.slice(t,t+1));return r?(e.q=r[0]*3-3,t+r[0].length):-1}function Ln(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.m=r[0]-1,t+r[0].length):-1}function De(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.d=+r[0],t+r[0].length):-1}function kn(e,n,t){var r=U.exec(n.slice(t,t+3));return r?(e.m=0,e.d=+r[0],t+r[0].length):-1}function ve(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.H=+r[0],t+r[0].length):-1}function On(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.M=+r[0],t+r[0].length):-1}function Nn(e,n,t){var r=U.exec(n.slice(t,t+2));return r?(e.S=+r[0],t+r[0].length):-1}function In(e,n,t){var r=U.exec(n.slice(t,t+3));return r?(e.L=+r[0],t+r[0].length):-1}function An(e,n,t){var r=U.exec(n.slice(t,t+6));return r?(e.L=Math.floor(r[0]/1e3),t+r[0].length):-1}function Zn(e,n,t){var r=vn.exec(n.slice(t,t+1));return r?t+r[0].length:-1}function dn(e,n,t){var r=U.exec(n.slice(t));return r?(e.Q=+r[0],t+r[0].length):-1}function Rn(e,n,t){var r=U.exec(n.slice(t));return r?(e.s=+r[0],t+r[0].length):-1}function Se(e,n){return g(e.getDate(),n,2)}function qn(e,n){return g(e.getHours(),n,2)}function Pn(e,n){return g(e.getHours()%12||12,n,2)}function Qn(e,n){return g(1+B.count(O(e),e),n,3)}function ke(e,n){return g(e.getMilliseconds(),n,3)}function Vn(e,n){return ke(e,n)+"000"}function _n(e,n){return g(e.getMonth()+1,n,2)}function zn(e,n){return g(e.getMinutes(),n,2)}function Jn(e,n){return g(e.getSeconds(),n,2)}function Xn(e){var n=e.getDay();return n===0?7:n}function Bn(e,n){return g(K.count(O(e)-1,e),n,2)}function Oe(e){var n=e.getDay();return n>=4||n===0?P(e):P.ceil(e)}function jn(e,n){return e=Oe(e),g(P.count(O(e),e)+(O(e).getDay()===4),n,2)}function Gn(e){return e.getDay()}function $n(e,n){return g($.count(O(e)-1,e),n,2)}function En(e,n){return g(e.getFullYear()%100,n,2)}function Kn(e,n){return e=Oe(e),g(e.getFullYear()%100,n,2)}function et(e,n){return g(e.getFullYear()%1e4,n,4)}function nt(e,n){var t=e.getDay();return e=t>=4||t===0?P(e):P.ceil(e),g(e.getFullYear()%1e4,n,4)}function tt(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+g(n/60|0,"0",2)+g(n%60,"0",2)}function we(e,n){return g(e.getUTCDate(),n,2)}function rt(e,n){return g(e.getUTCHours(),n,2)}function ut(e,n){return g(e.getUTCHours()%12||12,n,2)}function ot(e,n){return g(1+le.count(I(e),e),n,3)}function Ne(e,n){return g(e.getUTCMilliseconds(),n,3)}function at(e,n){return Ne(e,n)+"000"}function ct(e,n){return g(e.getUTCMonth()+1,n,2)}function it(e,n){return g(e.getUTCMinutes(),n,2)}function st(e,n){return g(e.getUTCSeconds(),n,2)}function ft(e){var n=e.getUTCDay();return n===0?7:n}function lt(e,n){return g(ge.count(I(e)-1,e),n,2)}function Ie(e){var n=e.getUTCDay();return n>=4||n===0?Q(e):Q.ceil(e)}function gt(e,n){return e=Ie(e),g(Q.count(I(e),e)+(I(e).getUTCDay()===4),n,2)}function mt(e){return e.getUTCDay()}function ht(e,n){return g(E.count(I(e)-1,e),n,2)}function Tt(e,n){return g(e.getUTCFullYear()%100,n,2)}function yt(e,n){return e=Ie(e),g(e.getUTCFullYear()%100,n,2)}function Mt(e,n){return g(e.getUTCFullYear()%1e4,n,4)}function Ut(e,n){var t=e.getUTCDay();return e=t>=4||t===0?Q(e):Q.ceil(e),g(e.getUTCFullYear()%1e4,n,4)}function Ct(){return"+0000"}function pe(){return"%"}function Fe(e){return+e}function Ye(e){return Math.floor(+e/1e3)}var R,Ae,Dt;vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vt(e){return R=Dn(e),Ae=R.format,R.parse,Dt=R.utcFormat,R.utcParse,R}function St(e){return new Date(e)}function wt(e){return e instanceof Date?+e:+new Date(+e)}function Ze(e,n,t,r,c,o,i,y,C,h){var T=on(),Y=T.invert,D=T.domain,w=h(".%L"),N=h(":%S"),V=h("%I:%M"),_=h("%I %p"),ee=h("%a %d"),ne=h("%b %d"),H=h("%B"),W=h("%Y");function te(s){return(C(s)<s?w:y(s)<s?N:i(s)<s?V:o(s)<s?_:r(s)<s?c(s)<s?ee:ne:t(s)<s?H:W)(s)}return T.invert=function(s){return new Date(Y(s))},T.domain=function(s){return arguments.length?D(Array.from(s,wt)):D().map(St)},T.ticks=function(s){var v=D();return e(v[0],v[v.length-1],s??10)},T.tickFormat=function(s,v){return v==null?te:h(v)},T.nice=function(s){var v=D();return(!s||typeof s.range!="function")&&(s=n(v[0],v[v.length-1],s??10)),s?D(sn(v,s)):T},T.copy=function(){return an(T,Ze(e,n,t,r,c,o,i,y,C,h))},T}function bt(){return cn.apply(Ze(Un,Cn,O,me,K,B,fe,se,q,Ae).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{Wt as A,Ht as B,Yt as a,Ae as b,me as c,K as d,mn as e,gn as f,P as g,ln as h,fn as i,$ as j,B as k,fe as l,xt as m,se as n,G as o,sn as p,Ze as q,xe as r,q as s,bt as t,Dt as u,He as v,le as w,ge as x,be as y,I as z};
@@ -0,0 +1,61 @@
1
+ import{_ as s,w as xt,y as E,x as q,aA as kt,aB as vt,aC as _t,aD as bt,a1 as wt,aE as St,X as Et}from"./index-CENAb10b.js";import{d as nt}from"./arc-D46jVWXL.js";var X=(function(){var n=s(function(f,r,a,h){for(a=a||{},h=f.length;h--;a[f[h]]=r);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],c=[1,13],g=[1,16],m=[1,17],p={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(r,a,h,u,y,o,S){var k=o.length-1;switch(y){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:g,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:g,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(r,a){if(a.recoverable)this.trace(r);else{var h=new Error(r);throw h.hash=a,h}},"parseError"),parse:s(function(r){var a=this,h=[0],u=[],y=[null],o=[],S=this.table,k="",M=0,C=0,B=2,J=1,O=o.slice.call(arguments,1),v=Object.create(this.lexer),N={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(N.yy[L]=this.yy[L]);v.setInput(r,N.yy),N.yy.lexer=v,N.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var b=v.yylloc;o.push(b);var $=v.options&&v.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(T){h.length=h.length-2*T,y.length=y.length-T,o.length=o.length-T}s(R,"popStack");function P(){var T;return T=u.pop()||v.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=a.symbols_[T]||T),T}s(P,"lex");for(var w,H,I,K,z={},j,A,et,G;;){if(H=h[h.length-1],this.defaultActions[H]?I=this.defaultActions[H]:((w===null||typeof w>"u")&&(w=P()),I=S[H]&&S[H][w]),typeof I>"u"||!I.length||!I[0]){var Q="";G=[];for(j in S[H])this.terminals_[j]&&j>B&&G.push("'"+this.terminals_[j]+"'");v.showPosition?Q="Parse error on line "+(M+1)+`:
2
+ `+v.showPosition()+`
3
+ Expecting `+G.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Q="Parse error on line "+(M+1)+": Unexpected "+(w==J?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Q,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:b,expected:G})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+w);switch(I[0]){case 1:h.push(w),y.push(v.yytext),o.push(v.yylloc),h.push(I[1]),w=null,C=v.yyleng,k=v.yytext,M=v.yylineno,b=v.yylloc;break;case 2:if(A=this.productions_[I[1]][1],z.$=y[y.length-A],z._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},$&&(z._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),K=this.performAction.apply(z,[k,C,M,N.yy,I[1],y,o].concat(O)),typeof K<"u")return K;A&&(h=h.slice(0,-1*A*2),y=y.slice(0,-1*A),o=o.slice(0,-1*A)),h.push(this.productions_[I[1]][0]),y.push(z.$),o.push(z._$),et=S[h[h.length-2]][h[h.length-1]],h.push(et);break;case 3:return!0}}return!0},"parse")},x=(function(){var f={EOF:1,parseError:s(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:s(function(r,a){return this.yy=a||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={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var a=r.length,h=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===u.length?this.yylloc.first_column:0)+u[u.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
+ `+a+"^"},"showPosition"),test_match:s(function(r,a){var h,u,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),u=r[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},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],h=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var o in y)this[o]=y[o];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,a,h,u;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),o=0;o<y.length;o++)if(h=this._input.match(this.rules[y[o]]),h&&(!a||h[0].length>a[0].length)){if(a=h,u=o,this.options.backtrack_lexer){if(r=this.test_match(h,y[o]),r!==!1)return r;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(r=this.test_match(a,y[u]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var a=this.next();return a||this.lex()},"lex"),begin:s(function(a){this.conditionStack.push(a)},"begin"),popState:s(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:s(function(a){this.begin(a)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(a,h,u,y){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return f})();p.lexer=x;function _(){this.yy={}}return s(_,"Parser"),_.prototype=p,p.Parser=_,new _})();X.parser=X;var Tt=X,at={};wt(at,{addEvent:()=>yt,addSection:()=>ht,addTask:()=>pt,addTaskOrg:()=>gt,clear:()=>ct,default:()=>It,getCommonDb:()=>ot,getSections:()=>dt,getTasks:()=>ut});var V="",lt=0,Y=[],U=[],W=[],ot=s(()=>St,"getCommonDb"),ct=s(function(){Y.length=0,U.length=0,V="",W.length=0,Et()},"clear"),ht=s(function(n){V=n,Y.push(n)},"addSection"),dt=s(function(){return Y},"getSections"),ut=s(function(){let n=it();const t=100;let e=0;for(;!n&&e<t;)n=it(),e++;return U.push(...W),U},"getTasks"),pt=s(function(n,t,e){const l={id:lt++,section:V,type:V,task:n,score:t||0,events:e?[e]:[]};W.push(l)},"addTask"),yt=s(function(n){W.find(e=>e.id===lt-1).events.push(n)},"addEvent"),gt=s(function(n){const t={section:V,type:V,description:n,task:n,classes:[]};U.push(t)},"addTaskOrg"),it=s(function(){const n=s(function(e){return W[e].processed},"compileTask");let t=!0;for(const[e,l]of W.entries())n(e),t=t&&l.processed;return t},"compileTasks"),It={clear:ct,getCommonDb:ot,addSection:ht,getSections:dt,getTasks:ut,addTask:pt,addTaskOrg:gt,addEvent:yt},Nt=12,Z=s(function(n,t){const e=n.append("rect");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},"drawRect"),Lt=s(function(n,t){const l=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=n.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function d(m){const p=nt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(d,"smile");function c(m){const p=nt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(c,"sad");function g(m){m.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")}return s(g,"ambivalent"),t.score>3?d(i):t.score<3?c(i):g(i),l},"drawFace"),Mt=s(function(n,t){const e=n.append("circle");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},"drawCircle"),ft=s(function(n,t){const e=t.text.replace(/<br\s*\/?>/gi," "),l=n.append("text");l.attr("x",t.x),l.attr("y",t.y),l.attr("class","legend"),l.style("text-anchor",t.anchor),t.class!==void 0&&l.attr("class",t.class);const i=l.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(e),l},"drawText"),$t=s(function(n,t){function e(i,d,c,g,m){return i+","+d+" "+(i+c)+","+d+" "+(i+c)+","+(d+g-m)+" "+(i+c-m*1.2)+","+(d+g)+" "+i+","+(d+g)}s(e,"genPoints");const l=n.append("polygon");l.attr("points",e(t.x,t.y,50,20,7)),l.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,ft(n,t)},"drawLabel"),Ht=s(function(n,t,e){const l=n.append("g"),i=D();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(l,i),mt(e)(t.text,l,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),rt=-1,At=s(function(n,t,e){const l=t.x+e.width/2,i=n.append("g");rt++,i.append("line").attr("id","task"+rt).attr("x1",l).attr("y1",t.y).attr("x2",l).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Lt(i,{cx:l,cy:300+(5-t.score)*30,score:t.score});const c=D();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=e.width,c.height=e.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,Z(i,c),mt(e)(t.task,i,c.x,c.y,c.width,c.height,{class:"task"},e,t.colour)},"drawTask"),Pt=s(function(n,t){Z(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Ct=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),D=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt=(function(){function n(i,d,c,g,m,p,x,_){const f=d.append("text").attr("x",c+m/2).attr("y",g+p/2+5).style("font-color",_).style("text-anchor","middle").text(i);l(f,x)}s(n,"byText");function t(i,d,c,g,m,p,x,_,f){const{taskFontSize:r,taskFontFamily:a}=_,h=i.split(/<br\s*\/?>/gi);for(let u=0;u<h.length;u++){const y=u*r-r*(h.length-1)/2,o=d.append("text").attr("x",c+m/2).attr("y",g).attr("fill",f).style("text-anchor","middle").style("font-size",r).style("font-family",a);o.append("tspan").attr("x",c+m/2).attr("dy",y).text(h[u]),o.attr("y",g+p/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(o,x)}}s(t,"byTspan");function e(i,d,c,g,m,p,x,_){const f=d.append("switch"),a=f.append("foreignObject").attr("x",c).attr("y",g).attr("width",m).attr("height",p).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");a.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,f,c,g,m,p,x,_),l(a,x)}s(e,"byFo");function l(i,d){for(const c in d)c in d&&i.attr(c,d[c])}return s(l,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?e:i.textPlacement==="old"?n:t}})(),Rt=s(function(n){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")},"initGraphics");function tt(n,t){n.each(function(){var e=q(this),l=e.text().split(/(\s+|<br>)/).reverse(),i,d=[],c=1.1,g=e.attr("y"),m=parseFloat(e.attr("dy")),p=e.text(null).append("tspan").attr("x",0).attr("y",g).attr("dy",m+"em");for(let x=0;x<l.length;x++)i=l[l.length-1-x],d.push(i),p.text(d.join(" ").trim()),(p.node().getComputedTextLength()>t||i==="<br>")&&(d.pop(),p.text(d.join(" ").trim()),i==="<br>"?d=[""]:d=[i],p=e.append("tspan").attr("x",0).attr("y",g).attr("dy",c+"em").text(i))})}s(tt,"wrap");var Ft=s(function(n,t,e,l){var _;const i=e%Nt-1,d=n.append("g");t.section=i,d.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+i));const c=d.append("g"),g=d.append("g"),p=g.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(tt,t.width).node().getBBox(),x=(_=l.fontSize)!=null&&_.replace?l.fontSize.replace("px",""):l.fontSize;return t.height=p.height+x*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,g.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),Vt(c,t,i,l),t},"drawNode"),zt=s(function(n,t,e){var g;const l=n.append("g"),d=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(tt,t.width).node().getBBox(),c=(g=e.fontSize)!=null&&g.replace?e.fontSize.replace("px",""):e.fontSize;return l.remove(),d.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),Vt=s(function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`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`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),F={drawRect:Z,drawCircle:Mt,drawSection:Ht,drawText:ft,drawLabel:$t,drawTask:At,drawBackgroundRect:Pt,getTextObj:Ct,getNoteRect:D,initGraphics:Rt,drawNode:Ft,getVirtualNodeHeight:zt},Wt=s(function(n,t,e,l){var O,v,N;const i=xt(),d=((O=i.timeline)==null?void 0:O.leftMargin)??50;E.debug("timeline",l.db);const c=i.securityLevel;let g;c==="sandbox"&&(g=q("#i"+t));const p=(c==="sandbox"?q(g.nodes()[0].contentDocument.body):q("body")).select("#"+t);p.append("g");const x=l.db.getTasks(),_=l.db.getCommonDb().getDiagramTitle();E.debug("task",x),F.initGraphics(p);const f=l.db.getSections();E.debug("sections",f);let r=0,a=0,h=0,u=0,y=50+d,o=50;u=50;let S=0,k=!0;f.forEach(function(L){const b={number:S,descr:L,section:S,width:150,padding:20,maxHeight:r},$=F.getVirtualNodeHeight(p,b,i);E.debug("sectionHeight before draw",$),r=Math.max(r,$+20)});let M=0,C=0;E.debug("tasks.length",x.length);for(const[L,b]of x.entries()){const $={number:L,descr:b,section:b.section,width:150,padding:20,maxHeight:a},R=F.getVirtualNodeHeight(p,$,i);E.debug("taskHeight before draw",R),a=Math.max(a,R+20),M=Math.max(M,b.events.length);let P=0;for(const w of b.events){const H={descr:w,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};P+=F.getVirtualNodeHeight(p,H,i)}b.events.length>0&&(P+=(b.events.length-1)*10),C=Math.max(C,P)}E.debug("maxSectionHeight before draw",r),E.debug("maxTaskHeight before draw",a),f&&f.length>0?f.forEach(L=>{const b=x.filter(w=>w.section===L),$={number:S,descr:L,section:S,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:r};E.debug("sectionNode",$);const R=p.append("g"),P=F.drawNode(R,$,S,i);E.debug("sectionNode output",P),R.attr("transform",`translate(${y}, ${u})`),o+=r+50,b.length>0&&st(p,b,S,y,o,a,i,M,C,r,!1),y+=200*Math.max(b.length,1),o=u,S++}):(k=!1,st(p,x,S,y,o,a,i,M,C,r,!0));const B=p.node().getBBox();E.debug("bounds",B),_&&p.append("text").text(_).attr("x",B.width/2-d).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),h=k?r+a+150:a+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",d).attr("y1",h).attr("x2",B.width+3*d).attr("y2",h).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),kt(void 0,p,((v=i.timeline)==null?void 0:v.padding)??50,((N=i.timeline)==null?void 0:N.useMaxWidth)??!1)},"draw"),st=s(function(n,t,e,l,i,d,c,g,m,p,x){var _;for(const f of t){const r={descr:f.task,section:e,number:e,width:150,padding:20,maxHeight:d};E.debug("taskNode",r);const a=n.append("g").attr("class","taskWrapper"),u=F.drawNode(a,r,e,c).height;if(E.debug("taskHeight after draw",u),a.attr("transform",`translate(${l}, ${i})`),d=Math.max(d,u),f.events){const y=n.append("g").attr("class","lineWrapper");let o=d;i+=100,o=o+Bt(n,f.events,e,l,i,c),i-=100,y.append("line").attr("x1",l+190/2).attr("y1",i+d).attr("x2",l+190/2).attr("y2",i+d+100+m+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}l=l+200,x&&!((_=c.timeline)!=null&&_.disableMulticolor)&&e++}i=i-10},"drawTasks"),Bt=s(function(n,t,e,l,i,d){let c=0;const g=i;i=i+100;for(const m of t){const p={descr:m,section:e,number:e,width:150,padding:20,maxHeight:50};E.debug("eventNode",p);const x=n.append("g").attr("class","eventWrapper"),f=F.drawNode(x,p,e,d).height;c=c+f,x.attr("transform",`translate(${l}, ${i})`),i=i+10+f}return i=g,c},"drawEvents"),Ot={setConf:s(()=>{},"setConf"),draw:Wt},jt=s(n=>{let t="";for(let e=0;e<n.THEME_COLOR_LIMIT;e++)n["lineColor"+e]=n["lineColor"+e]||n["cScaleInv"+e],vt(n["lineColor"+e])?n["lineColor"+e]=_t(n["lineColor"+e],20):n["lineColor"+e]=bt(n["lineColor"+e],20);for(let e=0;e<n.THEME_COLOR_LIMIT;e++){const l=""+(17-3*e);t+=`
7
+ .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
8
+ fill: ${n["cScale"+e]};
9
+ }
10
+ .section-${e-1} text {
11
+ fill: ${n["cScaleLabel"+e]};
12
+ }
13
+ .node-icon-${e-1} {
14
+ font-size: 40px;
15
+ color: ${n["cScaleLabel"+e]};
16
+ }
17
+ .section-edge-${e-1}{
18
+ stroke: ${n["cScale"+e]};
19
+ }
20
+ .edge-depth-${e-1}{
21
+ stroke-width: ${l};
22
+ }
23
+ .section-${e-1} line {
24
+ stroke: ${n["cScaleInv"+e]} ;
25
+ stroke-width: 3;
26
+ }
27
+
28
+ .lineWrapper line{
29
+ stroke: ${n["cScaleLabel"+e]} ;
30
+ }
31
+
32
+ .disabled, .disabled circle, .disabled text {
33
+ fill: lightgray;
34
+ }
35
+ .disabled text {
36
+ fill: #efefef;
37
+ }
38
+ `}return t},"genSections"),Gt=s(n=>`
39
+ .edge {
40
+ stroke-width: 3;
41
+ }
42
+ ${jt(n)}
43
+ .section-root rect, .section-root path, .section-root circle {
44
+ fill: ${n.git0};
45
+ }
46
+ .section-root text {
47
+ fill: ${n.gitBranchLabel0};
48
+ }
49
+ .icon-container {
50
+ height:100%;
51
+ display: flex;
52
+ justify-content: center;
53
+ align-items: center;
54
+ }
55
+ .edge {
56
+ fill: none;
57
+ }
58
+ .eventWrapper {
59
+ filter: brightness(120%);
60
+ }
61
+ `,"getStyles"),qt=Gt,Jt={db:at,renderer:Ot,parser:Tt,styles:qt};export{Jt as diagram};