agentroam-runtime-darwin-arm64 0.2.0-preview.83 → 0.2.0-preview.84

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 (266) hide show
  1. package/manifest.json +2 -2
  2. package/package.json +1 -1
  3. package/runtime/.next/BUILD_ID +1 -1
  4. package/runtime/.next/app-build-manifest.json +14 -14
  5. package/runtime/.next/app-path-routes-manifest.json +1 -1
  6. package/runtime/.next/build-manifest.json +4 -4
  7. package/runtime/.next/prerender-manifest.json +1 -1
  8. package/runtime/.next/required-server-files.json +1 -1
  9. package/runtime/.next/server/app/_not-found/page.js +1 -1
  10. package/runtime/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/runtime/.next/server/app/_not-found.html +1 -1
  12. package/runtime/.next/server/app/_not-found.rsc +1 -1
  13. package/runtime/.next/server/app/api/agent/abort/route.js +1 -1
  14. package/runtime/.next/server/app/api/agent/answer/route.js +1 -1
  15. package/runtime/.next/server/app/api/agent/codex-sharing/route.js +1 -1
  16. package/runtime/.next/server/app/api/agent/composer/route.js +1 -1
  17. package/runtime/.next/server/app/api/agent/harness/status/route.js +1 -1
  18. package/runtime/.next/server/app/api/agent/model/route.js +1 -1
  19. package/runtime/.next/server/app/api/agent/models/route.js +1 -1
  20. package/runtime/.next/server/app/api/agent/run/route.js +1 -1
  21. package/runtime/.next/server/app/api/agent/runtime-health/route.js +1 -1
  22. package/runtime/.next/server/app/api/agent/steer/route.js +1 -1
  23. package/runtime/.next/server/app/api/agent/stream/route.js +3 -3
  24. package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js +1 -1
  25. package/runtime/.next/server/app/api/agent-workspaces/route.js +1 -1
  26. package/runtime/.next/server/app/api/auth/verify/route.js +1 -1
  27. package/runtime/.next/server/app/api/business/route.js +1 -1
  28. package/runtime/.next/server/app/api/calendar/route.js +2 -2
  29. package/runtime/.next/server/app/api/client-logs/route.js +1 -1
  30. package/runtime/.next/server/app/api/collaboration/route.js +2 -2
  31. package/runtime/.next/server/app/api/engine-threads/route.js +1 -1
  32. package/runtime/.next/server/app/api/flow/v1/catalog/route.js +1 -1
  33. package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js +1 -1
  34. package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js +2 -2
  35. package/runtime/.next/server/app/api/flow/v1/runs/route.js +1 -1
  36. package/runtime/.next/server/app/api/flow-studio/config/route.js +1 -1
  37. package/runtime/.next/server/app/api/internal/todo-bootstrap/route.js +1 -1
  38. package/runtime/.next/server/app/api/internal/todo-mcp/route.js +1 -1
  39. package/runtime/.next/server/app/api/mcp/connect/route.js +1 -1
  40. package/runtime/.next/server/app/api/mcp/disconnect/route.js +1 -1
  41. package/runtime/.next/server/app/api/mcp/servers/route.js +1 -1
  42. package/runtime/.next/server/app/api/mcp/servers.body +1 -1
  43. package/runtime/.next/server/app/api/memory/[key]/route.js +1 -1
  44. package/runtime/.next/server/app/api/memory/route.js +1 -1
  45. package/runtime/.next/server/app/api/messaging/route.js +1 -1
  46. package/runtime/.next/server/app/api/notifications/[id]/ack/route.js +1 -1
  47. package/runtime/.next/server/app/api/notifications/[id]/route.js +1 -1
  48. package/runtime/.next/server/app/api/notifications/route.js +1 -1
  49. package/runtime/.next/server/app/api/notifications/stream/route.js +2 -2
  50. package/runtime/.next/server/app/api/plugins/load/route.js +1 -1
  51. package/runtime/.next/server/app/api/projects/[id]/route.js +1 -1
  52. package/runtime/.next/server/app/api/projects/check/route.js +1 -1
  53. package/runtime/.next/server/app/api/projects/directories/route.js +1 -1
  54. package/runtime/.next/server/app/api/projects/roots/route.js +1 -1
  55. package/runtime/.next/server/app/api/projects/route.js +1 -1
  56. package/runtime/.next/server/app/api/push/subscribe/route.js +2 -2
  57. package/runtime/.next/server/app/api/push/unsubscribe/route.js +3 -3
  58. package/runtime/.next/server/app/api/push/vapid/route.js +2 -2
  59. package/runtime/.next/server/app/api/push/vapid.body +1 -1
  60. package/runtime/.next/server/app/api/remote-tools/register/route.js +1 -1
  61. package/runtime/.next/server/app/api/session-images/[id]/route.js +1 -1
  62. package/runtime/.next/server/app/api/session-views/route.js +1 -1
  63. package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/route.js +1 -1
  64. package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/stop/route.js +1 -1
  65. package/runtime/.next/server/app/api/sessions/[id]/background-jobs/route.js +1 -1
  66. package/runtime/.next/server/app/api/sessions/[id]/changes/route.js +2 -2
  67. package/runtime/.next/server/app/api/sessions/[id]/engine-switches/route.js +1 -1
  68. package/runtime/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
  69. package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js +1 -1
  70. package/runtime/.next/server/app/api/sessions/[id]/goals/route.js +1 -1
  71. package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js +1 -1
  72. package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js +1 -1
  73. package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js +1 -1
  74. package/runtime/.next/server/app/api/sessions/[id]/release/route.js +1 -1
  75. package/runtime/.next/server/app/api/sessions/[id]/route.js +1 -1
  76. package/runtime/.next/server/app/api/sessions/[id]/switch-engine/route.js +1 -1
  77. package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js +1 -1
  78. package/runtime/.next/server/app/api/sessions/[id]/thread-history/route.js +1 -1
  79. package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js +1 -1
  80. package/runtime/.next/server/app/api/sessions/parallel/route.js +1 -1
  81. package/runtime/.next/server/app/api/sessions/route.js +1 -1
  82. package/runtime/.next/server/app/api/settings/route.js +1 -1
  83. package/runtime/.next/server/app/api/skills/route.js +1 -1
  84. package/runtime/.next/server/app/api/todos/[id]/commands/route.js +1 -1
  85. package/runtime/.next/server/app/api/todos/[id]/executions/route.js +1 -1
  86. package/runtime/.next/server/app/api/todos/[id]/route.js +1 -1
  87. package/runtime/.next/server/app/api/todos/route.js +1 -1
  88. package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js +1 -1
  89. package/runtime/.next/server/app/api/tool-policies/route.js +1 -1
  90. package/runtime/.next/server/app/api/tools/route.js +1 -1
  91. package/runtime/.next/server/app/api/update/check/route.js +1 -1
  92. package/runtime/.next/server/app/api/update/install/route.js +1 -1
  93. package/runtime/.next/server/app/api/update/status/route.js +1 -1
  94. package/runtime/.next/server/app/api/web-auth/login/route.js +1 -1
  95. package/runtime/.next/server/app/api/web-auth/logout/route.js +1 -1
  96. package/runtime/.next/server/app/api/web-auth/revoke-all/route.js +1 -1
  97. package/runtime/.next/server/app/api/web-auth/setup/route.js +1 -1
  98. package/runtime/.next/server/app/api/web-auth/status/route.js +1 -1
  99. package/runtime/.next/server/app/api/web-console/bootstrap/route.js +1 -1
  100. package/runtime/.next/server/app/api/web-console/computer-settings/route.js +1 -1
  101. package/runtime/.next/server/app/api/web-console/computers/route.js +1 -1
  102. package/runtime/.next/server/app/api/web-console/device-state/route.js +1 -1
  103. package/runtime/.next/server/app/api/web-console/history/route.js +1 -1
  104. package/runtime/.next/server/app/api/web-console/preferences/route.js +1 -1
  105. package/runtime/.next/server/app/api/workspace-changes/route.js +1 -1
  106. package/runtime/.next/server/app/web/page.js +4 -4
  107. package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
  108. package/runtime/.next/server/app-paths-manifest.json +45 -45
  109. package/runtime/.next/server/chunks/5303.js +2 -2
  110. package/runtime/.next/server/middleware-build-manifest.js +1 -1
  111. package/runtime/.next/server/pages/404.html +1 -1
  112. package/runtime/.next/server/pages/500.html +1 -1
  113. package/runtime/.next/server/pages-manifest.json +1 -1
  114. package/runtime/.next/server/server-reference-manifest.json +1 -1
  115. package/runtime/.next/static/chunks/{183-5019797f0b42210b.js → 183-9f47bd28d757e44e.js} +1 -1
  116. package/runtime/.next/static/chunks/app/web/{error-828d278147a0619d.js → error-6ca9afc69e38a945.js} +1 -1
  117. package/runtime/.next/static/chunks/app/web/layout-b1d0dc229e4be45a.js +1 -0
  118. package/runtime/.next/static/chunks/app/web/{page-8adf166584b0088e.js → page-36f160284a0d79fc.js} +1 -1
  119. package/runtime/.next/static/chunks/main-app-9e9b12e00c3ae35e.js +1 -0
  120. package/runtime/.next/static/css/0e673318adedd54a.css +1 -0
  121. package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/MacOS/agentroam-remote-desktop +0 -0
  122. package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/Resources/agentroam-component.json +1 -1
  123. package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/_CodeSignature/CodeResources +2 -2
  124. package/runtime/node_modules/.package-lock.json +118 -118
  125. package/runtime/node_modules/@agent/native-runtime/dist/index.js +147 -32
  126. package/runtime/node_modules/sanitize-html/node_modules/postcss/README.md +1 -1
  127. package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/css-syntax-error.js +1 -3
  128. package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/parser.js +7 -3
  129. package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/processor.js +1 -1
  130. package/runtime/node_modules/sanitize-html/node_modules/postcss/package.json +2 -2
  131. package/runtime/package-lock.json +135 -135
  132. package/runtime/server.js +1 -1
  133. package/runtime/webapp/dist/assets/{AIHubView-HV2FIroL.js → AIHubView-DKUDkftP.js} +1 -1
  134. package/runtime/webapp/dist/assets/{AgentManager-C4zPGI-Y.js → AgentManager-DBsl9Tc-.js} +1 -1
  135. package/runtime/webapp/dist/assets/{AiHubPane-CEjQjdqT.js → AiHubPane-Cq9jov_Y.js} +1 -1
  136. package/runtime/webapp/dist/assets/{App-CS2wVlfV.js → App-Cw_UxB1o.js} +4 -4
  137. package/runtime/webapp/dist/assets/{BrowserLivePanel-BwtEM-IV.js → BrowserLivePanel-D4-GJ_9P.js} +1 -1
  138. package/runtime/webapp/dist/assets/{CalendarPage-DY8pZK7d.js → CalendarPage-X9TGiQFj.js} +1 -1
  139. package/runtime/webapp/dist/assets/{CalendarView-CuBzp-g8.js → CalendarView-HvfBGuRx.js} +1 -1
  140. package/runtime/webapp/dist/assets/{CollaborationCreateDialog-DsXkxAd1.js → CollaborationCreateDialog-jp-Nu0XU.js} +1 -1
  141. package/runtime/webapp/dist/assets/{CollaborationDashboard-CvE5vaOh.js → CollaborationDashboard-olO_GjsT.js} +1 -1
  142. package/runtime/webapp/dist/assets/{CollaborationPage-Cjeo60S0.js → CollaborationPage-W8naHk0B.js} +1 -1
  143. package/runtime/webapp/dist/assets/{FilePreview-CyXKv1Cu.js → FilePreview-DI0rubgD.js} +3 -3
  144. package/runtime/webapp/dist/assets/{FileTree-DNI9VhEp.js → FileTree-rE46D8RD.js} +1 -1
  145. package/runtime/webapp/dist/assets/{FileWorkspaceDrawer-DRluuYWn.js → FileWorkspaceDrawer-wPD_Fs04.js} +1 -1
  146. package/runtime/webapp/dist/assets/{FlowStudioPane-CKlzxza_.js → FlowStudioPane-BILTrSF5.js} +1 -1
  147. package/runtime/webapp/dist/assets/{HostProjectPicker-CjlxN2ct.js → HostProjectPicker-0CHU4mlN.js} +1 -1
  148. package/runtime/webapp/dist/assets/{LSPServerList-BbAS_sm-.js → LSPServerList-T8zw5SN-.js} +1 -1
  149. package/runtime/webapp/dist/assets/{MCPServerList-DkVUlKEJ.js → MCPServerList-CQNCdDdm.js} +1 -1
  150. package/runtime/webapp/dist/assets/{MemoryViewer-Ywl80xth.js → MemoryViewer-mQsBEa17.js} +1 -1
  151. package/runtime/webapp/dist/assets/{NewSessionWindow-B4H26X5c.js → NewSessionWindow-CCQJHuTO.js} +1 -1
  152. package/runtime/webapp/dist/assets/NewSessionWindow-aaPt6Fto.css +1 -0
  153. package/runtime/webapp/dist/assets/{RemoteDesktopPage-B4q2I23i.js → RemoteDesktopPage-CSrZ5Ftv.js} +1 -1
  154. package/runtime/webapp/dist/assets/{RemoteDesktopTabBridge-B_cCKi7K.js → RemoteDesktopTabBridge-jgSmDncq.js} +1 -1
  155. package/runtime/webapp/dist/assets/{RunningSessionsIcon-Cz8_524L.js → RunningSessionsIcon-Dj0GAkqr.js} +1 -1
  156. package/runtime/webapp/dist/assets/{SessionDashboard-DXPSvNsY.js → SessionDashboard-kC_8_Bza.js} +1 -1
  157. package/runtime/webapp/dist/assets/{SessionDashboardBridge-7BjKdfN8.js → SessionDashboardBridge-BqLN9MBj.js} +1 -1
  158. package/runtime/webapp/dist/assets/{SettingsPanel-C78O9_ho.js → SettingsPanel-CqQv2eK-.js} +1 -1
  159. package/runtime/webapp/dist/assets/{SkillManager-BdkBUxhH.js → SkillManager-Bu2BSH0G.js} +1 -1
  160. package/runtime/webapp/dist/assets/{TaskPaneTerminal-B2WKBysj.js → TaskPaneTerminal-BdxQYNc6.js} +1 -1
  161. package/runtime/webapp/dist/assets/{TerminalPane-CxGcN85G.js → TerminalPane-BvhhLZN1.js} +1 -1
  162. package/runtime/webapp/dist/assets/TodoPage-hbsap1E8.js +1 -0
  163. package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-DFIXyU71.js → abnfDiagram-VCTEODGH-C_PdiEVZ.js} +1 -1
  164. package/runtime/webapp/dist/assets/agentroam-welcome-DTi8uo_x.webp +0 -0
  165. package/runtime/webapp/dist/assets/agentroam-welcome-speaking-Bjq6llMN.webp +0 -0
  166. package/runtime/webapp/dist/assets/{arc-CLpaLEla.js → arc-CWNpomsA.js} +1 -1
  167. package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-Df8T0lx0.js → architectureDiagram-5GKGNRK7-BoOjl_r_.js} +1 -1
  168. package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-jCoyPZhV.js → blockDiagram-I7D4REHJ-vJ_8Ek3u.js} +1 -1
  169. package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-DsZuTCuo.js → c4Diagram-7LVT6UL2-DNA4gWKh.js} +1 -1
  170. package/runtime/webapp/dist/assets/{calendar-days-BIRmYMrW.js → calendar-days-D6jkCzJk.js} +1 -1
  171. package/runtime/webapp/dist/assets/channel-ComjzpL-.js +1 -0
  172. package/runtime/webapp/dist/assets/{check-DCU8YHqr.js → check-Dg_LqC82.js} +1 -1
  173. package/runtime/webapp/dist/assets/{chevron-down-BUEiUZA7.js → chevron-down-BEj7mlHA.js} +1 -1
  174. package/runtime/webapp/dist/assets/{chevron-right-B_ITnckH.js → chevron-right-BJjvR4c0.js} +1 -1
  175. package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-BEZp3wuG.js → chunk-2Q5K7J3B-CZDhxDbY.js} +1 -1
  176. package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-BGGDhFwD.js → chunk-5VM5RSS4-BnlDM5br.js} +1 -1
  177. package/runtime/webapp/dist/assets/{chunk-F27PBJKO-Mqzm4ODE.js → chunk-F27PBJKO-CB7O8_6v.js} +1 -1
  178. package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-DtnGgUQJ.js → chunk-IMKFNOWR-Bu3AW8DR.js} +1 -1
  179. package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-By3kXE4y.js → chunk-JWPE2WC7-CBQw1xgF.js} +1 -1
  180. package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-BTHuMHN1.js → chunk-POPQ4Y6H-Bun3CGx_.js} +1 -1
  181. package/runtime/webapp/dist/assets/{chunk-SVP7TREG-BeWH1pvB.js → chunk-SVP7TREG-XwWHVyss.js} +1 -1
  182. package/runtime/webapp/dist/assets/{chunk-TICWLB2K-oiekJTZh.js → chunk-TICWLB2K-B7j4XyQE.js} +1 -1
  183. package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-B7CKqUBs.js → chunk-XXDRQBXY-C4ccrA1p.js} +1 -1
  184. package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-CfdRqn0-.js +1 -0
  185. package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-CfdRqn0-.js +1 -0
  186. package/runtime/webapp/dist/assets/{client-BpqlZTm2.js → client-dnf9nxPX.js} +1 -1
  187. package/runtime/webapp/dist/assets/{codeSyntax-GjP28nDI.js → codeSyntax-BLQm8ta3.js} +1 -1
  188. package/runtime/webapp/dist/assets/{collaboration-CYS2Soeh.js → collaboration-CJnVMp4H.js} +1 -1
  189. package/runtime/webapp/dist/assets/{composer-file-routing-DHdpFYk8.js → composer-file-routing-DX7AUQpe.js} +1 -1
  190. package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-BmhhO76e.js → cose-bilkent-JH36ORCC-610OTEmf.js} +1 -1
  191. package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-BesIxLGS.js → cynefin-OW5HDTMX-CM8PeVI5.js} +1 -1
  192. package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-DdF6XhwX.js → cynefinDiagram-5FMLGOSQ-BY4mC_Y_.js} +1 -1
  193. package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-CxUfRr5w.js → dagre-GXQ25YYZ-CW6OZxKS.js} +1 -1
  194. package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-zSD7nygh.js → diagram-S7CK7UJ4-BaPMOaHo.js} +1 -1
  195. package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-CgirUu7t.js → diagram-UQ7AKVKN-BWIQcSBB.js} +1 -1
  196. package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-CkI9kDpP.js → diagram-VSXAHHWV-BwkS6jsR.js} +1 -1
  197. package/runtime/webapp/dist/assets/{diagram-VX7I27RA-ZfbGJBGR.js → diagram-VX7I27RA-B7rXbpbO.js} +1 -1
  198. package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-CA44IJP4.js → diagram-Z3DM3KII-CrWfyJCt.js} +1 -1
  199. package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-CVwSxyot.js → ebnfDiagram-PWID7BFC-DrpyBRGI.js} +1 -1
  200. package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-DwjlVHEs.js → erDiagram-RLTQ6QDP-D0lubMB8.js} +1 -1
  201. package/runtime/webapp/dist/assets/{file-types-Dj25tuty.js → file-types-ovF7t8nV.js} +1 -1
  202. package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-CEt0pwA8.js → flowDiagram-HODETNUW-mXqeEtep.js} +1 -1
  203. package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-CNsj7gWS.js → ganttDiagram-EL5Y4UJY-DgaN-2yI.js} +1 -1
  204. package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-ERbll1_Q.js → gitGraphDiagram-WWUBYQGX-DadHzOkE.js} +1 -1
  205. package/runtime/webapp/dist/assets/{history-DTS97eAH.js → history-2RoN6nWx.js} +1 -1
  206. package/runtime/webapp/dist/assets/{image-plus-BmlwMe18.js → image-plus-CXCEGNi1.js} +1 -1
  207. package/runtime/webapp/dist/assets/{index-C30NoLsn.js → index-CpGyXlyq.js} +55 -55
  208. package/runtime/webapp/dist/assets/index-DVbDWmLY.css +1 -0
  209. package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-BiMEmJW5.js → infoDiagram-27XIBGKW-BPI3rG8e.js} +1 -1
  210. package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-CPlJXmF2.js → ishikawaDiagram-5VMMS53U-Cwhwp05P.js} +1 -1
  211. package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-DJJ-qvlw.js → journeyDiagram-3NMN7TZE-QeAIq98x.js} +1 -1
  212. package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-PHmavvDJ.js → kanban-definition-UXKFOSKX-BIV4KQ7w.js} +1 -1
  213. package/runtime/webapp/dist/assets/{layout-DH5OfcVL.js → layout-DKTcc92n.js} +1 -1
  214. package/runtime/webapp/dist/assets/{linear-DQek-QDQ.js → linear-CpgQ-vzl.js} +1 -1
  215. package/runtime/webapp/dist/assets/{list-todo-DULblcsU.js → list-todo-D0DdvDdC.js} +1 -1
  216. package/runtime/webapp/dist/assets/{locate-fixed-B3zScPI-.js → locate-fixed-PoSWErYt.js} +1 -1
  217. package/runtime/webapp/dist/assets/{mermaid.core-D6eHnLLU.js → mermaid.core-DPgekxsA.js} +5 -5
  218. package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-D0TkZusX.js → mindmap-definition-YA3MSWOX-DScKRrns.js} +1 -1
  219. package/runtime/webapp/dist/assets/{mobileViewport-BhIxH-zP.js → mobileViewport-DoX18BIb.js} +1 -1
  220. package/runtime/webapp/dist/assets/{new-session-window-bxVA-U3Y.js → new-session-window-DUUfKFZL.js} +6 -6
  221. package/runtime/webapp/dist/assets/{page-DyPXAvyj.js → page-DLgrc2Gr.js} +3 -3
  222. package/runtime/webapp/dist/assets/{pause-C793N3J1.js → pause-MzDWMIVk.js} +1 -1
  223. package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-DMIjPBzH.js → pegDiagram-XKGWAZYB-CqPnfn9Z.js} +1 -1
  224. package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-DctF47JZ.js → pieDiagram-E7YTZNPT-Dj4dMQpn.js} +1 -1
  225. package/runtime/webapp/dist/assets/{pin-BLVakDSL.js → pin-eP6N3HGu.js} +1 -1
  226. package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-JnwbWWwT.js → quadrantDiagram-AXDQQJYC-C0OXtsjw.js} +1 -1
  227. package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-DcpHMNVP.js → railroadDiagram-O6MQD6OU-CxmJTI75.js} +1 -1
  228. package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-C-fRbIOI.js → requirementDiagram-BXWQKSXE-D27ZD0hS.js} +1 -1
  229. package/runtime/webapp/dist/assets/{rotate-ccw-CyZK_Om1.js → rotate-ccw-Dd67-fEX.js} +1 -1
  230. package/runtime/webapp/dist/assets/{rotate-cw-ChAt9mcI.js → rotate-cw-bCvV5qtp.js} +1 -1
  231. package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-Sb34Y9Ep.js → sankeyDiagram-P5KCCOFB-BYXYPMbk.js} +1 -1
  232. package/runtime/webapp/dist/assets/{send-DlrISC4K.js → send-C3-_dAtW.js} +1 -1
  233. package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-BeHoOpkJ.js → sequenceDiagram-WJ2MYXX4-DjCzHsAJ.js} +1 -1
  234. package/runtime/webapp/dist/assets/{session-dashboard-D1JY1ka0.js → session-dashboard-B5GjyN-j.js} +1 -1
  235. package/runtime/webapp/dist/assets/{session-tree-Q-jABJNB.js → session-tree-gH5384IE.js} +1 -1
  236. package/runtime/webapp/dist/assets/{shield-check-Bzd1i1OQ.js → shield-check-BH6xSJDa.js} +1 -1
  237. package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-DspvE2eQ.js → sizeCapture-INFHLROL-C3V_IQDa.js} +1 -1
  238. package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-oBIvmRy9.js → stateDiagram-D77RDMKH-SIlV9QsN.js} +1 -1
  239. package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-DBVpokaR.js +1 -0
  240. package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-CAdrbVmI.js → swimlanes-42K2YHIH-B_lgpM0k.js} +1 -1
  241. package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-CBmcZlgw.js +8 -0
  242. package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-BtWjc4KI.js → timeline-definition-24CTP7MA-CTMVRkSU.js} +1 -1
  243. package/runtime/webapp/dist/assets/{trash-2-DwFoTvHX.js → trash-2-BjV9I5RI.js} +1 -1
  244. package/runtime/webapp/dist/assets/{types-COzZsLPY.js → types-BB9G1ZRH.js} +1 -1
  245. package/runtime/webapp/dist/assets/{use-session-activity-BRhj0V5U.js → use-session-activity-CXZ-jSdd.js} +1 -1
  246. package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-Be4H6PYr.js → vennDiagram-4TSXK5OY-CGMGxBWQ.js} +1 -1
  247. package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-COVxCAu8.js → wardleyDiagram-VM6X3IG4-B9lm4S79.js} +1 -1
  248. package/runtime/webapp/dist/assets/{web-Qg6ZVe1T.js → web-BZLTjbMF.js} +1 -1
  249. package/runtime/webapp/dist/assets/{web-BdMHTzmo.js → web-DBwe40Mg.js} +1 -1
  250. package/runtime/webapp/dist/assets/{x-CoIXF2eL.js → x-C0vSZPZg.js} +1 -1
  251. package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-J_S9eMK9.js → xychartDiagram-S5SC5T6Z-D4dVIGis.js} +1 -1
  252. package/runtime/webapp/dist/assets/{zoom-out-C10hb0zX.js → zoom-out-CwT1ni3i.js} +1 -1
  253. package/runtime/webapp/dist/index.html +2 -2
  254. package/runtime/.next/static/chunks/app/web/layout-1127176e7e88e395.js +0 -1
  255. package/runtime/.next/static/chunks/main-app-07d67f2d4e96ecb8.js +0 -1
  256. package/runtime/.next/static/css/645d4c94ea111811.css +0 -1
  257. package/runtime/webapp/dist/assets/NewSessionWindow-DOLG1XEp.css +0 -1
  258. package/runtime/webapp/dist/assets/TodoPage-CdzjZR2O.js +0 -1
  259. package/runtime/webapp/dist/assets/channel-0IyV-PVi.js +0 -1
  260. package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-Dm5zwUmQ.js +0 -1
  261. package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-Dm5zwUmQ.js +0 -1
  262. package/runtime/webapp/dist/assets/index-COFV-DUC.css +0 -1
  263. package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-DXD2F0in.js +0 -1
  264. package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-CXpNu-5Z.js +0 -8
  265. /package/runtime/.next/static/{XwGGZtJQeU5VoGqV-1dyI → edQT7mZJvA1tWdwiMLtSI}/_buildManifest.js +0 -0
  266. /package/runtime/.next/static/{XwGGZtJQeU5VoGqV-1dyI → edQT7mZJvA1tWdwiMLtSI}/_ssgManifest.js +0 -0
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./TerminalPane-CxGcN85G.js","./index-C30NoLsn.js","./index-COFV-DUC.css","./mobileViewport-BhIxH-zP.js","./RemoteDesktopTabBridge-B_cCKi7K.js","./TerminalPane-6GBZ9nXN.css","./FileTree-DNI9VhEp.js","./file-types-Dj25tuty.js","./locate-fixed-B3zScPI-.js","./x-CoIXF2eL.js","./chevron-down-BUEiUZA7.js","./chevron-right-B_ITnckH.js","./trash-2-DwFoTvHX.js","./FilePreview-CyXKv1Cu.js","./rotate-ccw-CyZK_Om1.js","./check-DCU8YHqr.js","./FilePreview-B7Ab2X_E.css","./AiHubPane-CEjQjdqT.js","./image-plus-BmlwMe18.js","./send-DlrISC4K.js","./FlowStudioPane-CKlzxza_.js","./rotate-cw-ChAt9mcI.js","./RunningSessionsIcon-Cz8_524L.js","./calendar-days-BIRmYMrW.js","./pin-BLVakDSL.js","./CollaborationTabBridge-Dxq4G1Uk.js","./SessionDashboardBridge-7BjKdfN8.js"])))=>i.map(i=>d[i]);
2
- import{c as wr,r,j as e,h as Je,a as Ae,R as ye,G as xr,I as yr,J as De,K as Fn,O as vr,e as Me,Q as xe,U as vt,F as dt,P as Bn,S as kr,T as $n,V as kt,X as jr,Y as Er,Z as hn,x as Sr,_ as Cr,$ as Tr,a0 as Nr,a1 as gn,a2 as Rr,a3 as Lr,a4 as Pr,a5 as Ir,a6 as ut,a7 as Ar,a8 as Ge,a9 as _r,aa as Dr,ab as Mr,ac as zr,d as pt,ad as Or,ae as lt,af as Wr,ag as Fr,ah as Br,ai as $r,aj as Ur,ak as Hr,y as qr,al as Vr,am as bn,an as ze,o as wn}from"./index-C30NoLsn.js";import{S as Un,R as Hn,M as xn,a as Yr,G as mt,b as Kr,c as Gr,C as Xr}from"./RunningSessionsIcon-Cz8_524L.js";import{X as Te}from"./x-CoIXF2eL.js";import{C as qn}from"./calendar-days-BIRmYMrW.js";import{C as Jr}from"./chevron-down-BUEiUZA7.js";import{C as ft}from"./check-DCU8YHqr.js";import{T as jt,P as ht,A as Qr,F as Zr}from"./trash-2-DwFoTvHX.js";import{E as Et,c as eo,e as to,f as yn,R as no,b as ro}from"./RemoteDesktopTabBridge-B_cCKi7K.js";import{C as oo}from"./chevron-right-B_ITnckH.js";import{u as io,r as ao,a as so}from"./mobileViewport-BhIxH-zP.js";import{P as lo}from"./pin-BLVakDSL.js";import{r as co,d as uo,e as po}from"./CollaborationTabBridge-Dxq4G1Uk.js";import{b as mo,r as fo,c as vn}from"./SessionDashboardBridge-7BjKdfN8.js";/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./TerminalPane-BvhhLZN1.js","./index-CpGyXlyq.js","./index-DVbDWmLY.css","./mobileViewport-DoX18BIb.js","./RemoteDesktopTabBridge-jgSmDncq.js","./TerminalPane-6GBZ9nXN.css","./FileTree-rE46D8RD.js","./file-types-ovF7t8nV.js","./locate-fixed-PoSWErYt.js","./x-C0vSZPZg.js","./chevron-down-BEj7mlHA.js","./chevron-right-BJjvR4c0.js","./trash-2-BjV9I5RI.js","./FilePreview-DI0rubgD.js","./rotate-ccw-Dd67-fEX.js","./check-Dg_LqC82.js","./FilePreview-B7Ab2X_E.css","./AiHubPane-Cq9jov_Y.js","./image-plus-CXCEGNi1.js","./send-C3-_dAtW.js","./FlowStudioPane-BILTrSF5.js","./rotate-cw-bCvV5qtp.js","./RunningSessionsIcon-Dj0GAkqr.js","./calendar-days-D6jkCzJk.js","./pin-eP6N3HGu.js","./CollaborationTabBridge-Dxq4G1Uk.js","./SessionDashboardBridge-BqLN9MBj.js"])))=>i.map(i=>d[i]);
2
+ import{c as wr,r,j as e,h as Je,a as Ae,R as ye,G as xr,I as yr,J as De,K as Fn,O as vr,e as Me,Q as xe,U as vt,F as dt,P as Bn,S as kr,T as $n,V as kt,X as jr,Y as Er,Z as hn,x as Sr,_ as Cr,$ as Tr,a0 as Nr,a1 as gn,a2 as Rr,a3 as Lr,a4 as Pr,a5 as Ir,a6 as ut,a7 as Ar,a8 as Ge,a9 as _r,aa as Dr,ab as Mr,ac as zr,d as pt,ad as Or,ae as lt,af as Wr,ag as Fr,ah as Br,ai as $r,aj as Ur,ak as Hr,y as qr,al as Vr,am as bn,an as ze,o as wn}from"./index-CpGyXlyq.js";import{S as Un,R as Hn,M as xn,a as Yr,G as mt,b as Kr,c as Gr,C as Xr}from"./RunningSessionsIcon-Dj0GAkqr.js";import{X as Te}from"./x-C0vSZPZg.js";import{C as qn}from"./calendar-days-D6jkCzJk.js";import{C as Jr}from"./chevron-down-BEj7mlHA.js";import{C as ft}from"./check-Dg_LqC82.js";import{T as jt,P as ht,A as Qr,F as Zr}from"./trash-2-BjV9I5RI.js";import{E as Et,c as eo,e as to,f as yn,R as no,b as ro}from"./RemoteDesktopTabBridge-jgSmDncq.js";import{C as oo}from"./chevron-right-BJjvR4c0.js";import{u as io,r as ao,a as so}from"./mobileViewport-DoX18BIb.js";import{P as lo}from"./pin-eP6N3HGu.js";import{r as co,d as uo,e as po}from"./CollaborationTabBridge-Dxq4G1Uk.js";import{b as mo,r as fo,c as vn}from"./SessionDashboardBridge-BqLN9MBj.js";/**
3
3
  * @license lucide-react v0.468.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
@@ -83,4 +83,4 @@ import{c as wr,r,j as e,h as Je,a as Ae,R as ye,G as xr,I as yr,J as De,K as Fn,
83
83
  .collaboration-load-error button:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
84
84
  @keyframes collaboration-appear { from { opacity:0; } to { opacity:1; } }
85
85
  @media (prefers-reduced-motion:reduce) { .collaboration-frame.is-ready { animation:none; } }
86
- `})]})}function ti({active:t,children:o}){const[a,s]=r.useState(t);return r.useEffect(()=>{t&&s(!0)},[t]),t||a?o:null}function An(t){try{const o=JSON.parse(t||"null");if(!o||!Array.isArray(o.tabs))return null;const a=new Set,s=new Set(["webapp","aihub","flowstudio","remote-desktop","collaboration","collaboration-dashboard","session-dashboard","calendar"]),l=[];for(const d of o.tabs.slice(0,100))!d||typeof d.id!="string"||typeof d.title!="string"||a.has(d.id)||d.kind!==void 0&&!s.has(d.kind)||d.kind==="collaboration"&&typeof d.groupId!="string"||(a.add(d.id),l.push({id:d.id,title:d.title,...d.kind?{kind:d.kind}:{},...typeof d.groupId=="string"?{groupId:d.groupId}:{},...typeof d.discussionId=="string"&&/^[\w-]{1,200}$/.test(d.discussionId)?{discussionId:d.discussionId}:{}}));return{tabs:l,activeTerminalId:typeof o.activeTerminalId=="string"&&o.activeTerminalId!=="messaging"?o.activeTerminalId:null}}catch{return null}}function ni(t,o,a){const s=new Map(o.filter(u=>u.status==="active"||u.status==="detached").map(u=>[u.id,{id:u.id,title:u.title}])),l=[],d=new Set;for(const u of[...(t==null?void 0:t.tabs)??[],...a,...s.values()])d.has(u.id)||!u.kind&&!s.has(u.id)||(d.add(u.id),l.push(u.kind?u:s.get(u.id)));return l}const Ce={id:"remote-desktop",title:"远程桌面",kind:"remote-desktop"};function _n(t){const o=t.find(a=>a.kind==="remote-desktop");return o?t.map(a=>a===o?{...Ce}:a):[...t,{...Ce}]}const _e={id:"collaboration-dashboard",title:"群聊列表",kind:"collaboration-dashboard"};function Dn(t){return t.some(o=>o.id===_e.id)?t:[...t,{..._e}]}const Qe={id:"session-dashboard",title:"Dashboard",kind:"session-dashboard"};function Mn(t){return t.some(o=>o.id===Qe.id)?t:[...t,{...Qe}]}const yt={id:"calendar",title:"日历",kind:"calendar"};function ri(t){return t.some(o=>o.id===yt.id)?t:[...t,{...yt}]}const oi=Oe(()=>ze(()=>import("./TerminalPane-CxGcN85G.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),{ssr:!1}),ii=Oe(()=>ze(()=>import("./FileTree-DNI9VhEp.js"),__vite__mapDeps([6,1,2,7,8,9,10,11,12]),import.meta.url),{ssr:!1}),ai=Oe(()=>ze(()=>import("./FilePreview-CyXKv1Cu.js").then(t=>t.b),__vite__mapDeps([13,1,2,14,12,15,9,16]),import.meta.url),{ssr:!1}),si=Oe(()=>ze(()=>import("./AiHubPane-CEjQjdqT.js"),__vite__mapDeps([17,1,2,9,10,18,19]),import.meta.url),{ssr:!1}),li=Oe(()=>ze(()=>import("./FlowStudioPane-CKlzxza_.js"),__vite__mapDeps([20,1,2,21,22,9,23,10,15,12,4,11,3,24,25,26]),import.meta.url),{ssr:!1,loading:()=>e.jsx(Ze,{})}),ci=Dr(new Mr);function di(){return e.jsx(Ho,{children:(t,o)=>xe()?e.jsx(Wn,{auth:t,onWorkspaceReady:o}):e.jsx(_r,{api:ci,product:"电脑上的 AgentRoam CLI",scope:"cli",hint:"更新期间当前连接的电脑服务会短暂重启。此页面会继续检查更新结果。",installLabel:"更新这台电脑",children:e.jsx(Wn,{auth:t,onWorkspaceReady:o})})})}const oe={id:"webapp-agent",title:"智能助手",kind:"webapp"},zn={id:"ai-hub",title:"AI Hub",kind:"aihub"},On={id:"flow-studio",title:"Flow Studio",kind:"flowstudio"};function ui(){var t;return typeof document>"u"?$r:pt((t=document.getElementById("web-theme-root"))==null?void 0:t.dataset.webTheme).id}const pi="agent-web-shell:skin:v1";function Wn({auth:t,onWorkspaceReady:o}){var Ht,qt,Vt,Yt;const[a,s]=r.useState(null),l=r.useRef(null),[d,u]=r.useState(0),h=r.useCallback(n=>{if((n==null?void 0:n.openMode)==="new-tab"){window.open(n.url,"_blank","noopener,noreferrer");return}s(n)},[]),S=r.useCallback(n=>s((n==null?void 0:n.openMode)==="current"?n:null),[]),g=r.useRef(null),j=r.useRef(null),c=r.useRef(null),y=r.useRef(null),E=r.useRef(null),T=r.useRef(!1),[m,v]=r.useState({}),x=r.useRef(new Map),[b,C]=r.useState(0),[N,L]=r.useState(!1),[D,Z]=r.useState(!1),[te,K]=r.useState(!1),ne=r.useRef(()=>{}),M=r.useCallback(n=>{var f;const i=Bo(n);if(!(!i||i.type!==xt.watcherFrame)){ne.current(i.channelId,i.sequence);for(const w of[g,j]){if(!((f=w.current)!=null&&f.contentWindow))continue;const k=i.payload.slice().buffer;w.current.contentWindow.postMessage({type:zr,channelId:i.channelId,sequence:i.sequence,data:k},window.location.origin,[k])}}},[]),{state:O,epoch:Y,rpc:W,onEvent:Q,onTerminalData:G,onTerminalReset:H,sendTerminalInput:ie}=io(M,t.getWsNonce,t.refresh),fe=r.useMemo(()=>({request:(n,i,f)=>W(n,i,f),subscribe:(n,i)=>Q("fs:event",i)}),[Q,W]);ne.current=(n,i)=>{W("browser:frame-ack",{channelId:n,sequence:i}).catch(()=>{})};const[A,$]=r.useState([{...oe}]),Ne=r.useRef(A);Ne.current=A;const[P,p]=r.useState(oe.id),R=r.useCallback(()=>{if(A.length>=8)return;const n=`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;$(i=>i.length>=8?i:[...i,{id:n,title:`Terminal ${i.length+1}`}]),p(n)},[A.length]);$o(l,P,!a);const[q,z]=r.useState({}),F=r.useRef(!1),[B,ve]=r.useState(!1),[We,Fe]=r.useState(0),Be=`agentroam:workspace:${typeof window>"u"?"":Me()}:${((Ht=t.user)==null?void 0:Ht.id)??""}`,St=r.useRef(null),ke=r.useRef(new Map),$e=r.useRef(new Map),Jn=r.useCallback((n,i)=>{ke.current.set(n,i);const f=window.setTimeout(()=>{if(ke.current.get(n)!==i)return;const w=$e.current.get(n);w&&($e.current.delete(n),i(w,!0))},180);return()=>{window.clearTimeout(f),ke.current.get(n)===i&&ke.current.delete(n)}},[]),Qn=r.useCallback(n=>{var f;if(!P||(f=A.find(w=>w.id===P))!=null&&f.kind)return;const i=ke.current.get(P);i?i(n):W("term:input",{id:P,data:`${n}`}).catch(()=>{}),ce(!1)},[P,W,A]),[je,Zn]=r.useState(!1),[Re,et]=r.useState({}),[de,Ue]=r.useState(null),[le,ce]=r.useState(!1),[he,He]=r.useState("files"),[Le,Ct]=r.useState(null),[Pe,Tt]=r.useState(!0),[qe,Nt]=r.useState(null),[tt,Rt]=r.useState(!1),[nt,Lt]=r.useState([]),[rt,Pt]=r.useState(Mo()),[Ee,It]=r.useState(ui),[At,er]=r.useState(ut),[_t,tr]=r.useState(!1);r.useEffect(()=>{const n=()=>{try{er(Xo(window.localStorage))}catch{}tr(!0)},i=f=>{(f.key===Xn||f.key===null)&&n()};return n(),window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[]);const[Dt,nr]=r.useState(!1),ue=_o(t.csrfToken),[Mt,rr]=r.useState(!1),ee=pt(Ee),Se=r.useRef(null),[or,ot]=r.useState(0),[ir,it]=r.useState(!1),at=r.useRef(null),zt=r.useRef(null),Ot=r.useCallback(n=>{var f;const i=[g.current,j.current,c.current,y.current,...x.current.values()];for(const w of i)(f=w==null?void 0:w.contentWindow)==null||f.postMessage({type:pi,skin:n},window.location.origin)},[]),re=r.useCallback(()=>{var i;if(Ot(Ee),!_t)return;const n=[g.current,j.current,c.current,y.current,...x.current.values()];for(const f of n)(i=f==null?void 0:f.contentWindow)==null||i.postMessage({type:Or,navigationLayout:At},window.location.origin)},[Ee,At,_t,Ot]);r.useEffect(()=>{re()},[re]),r.useEffect(()=>{const n=ee.cssVars["--ui-root-bg"],i=ee.cssVars["--ui-color-scheme"],f=document.getElementById("web-theme-root");for(const[k,_]of Object.entries(ee.cssVars))f==null||f.style.setProperty(k,_);f&&(f.dataset.webTheme=ee.id),document.documentElement.style.background=n,document.documentElement.style.colorScheme=i,document.body.style.background=n,document.body.style.colorScheme=i;let w=document.querySelector('meta[name="theme-color"]');w||(w=document.createElement("meta"),w.name="theme-color",document.head.append(w)),w.content=ee.cssVars["--ui-tabbar-bg"]},[ee]),r.useEffect(()=>{const n=i=>{var Kt,Gt,Xt,Jt,Qt,Zt,en,tn,nn,rn,on,an,sn,ln,cn,dn,un,pn,mn,fn;const f=((Kt=c.current)==null?void 0:Kt.contentWindow)??null,w=[(Gt=g.current)==null?void 0:Gt.contentWindow,f,(Xt=y.current)==null?void 0:Xt.contentWindow,...[...x.current.values()].map(I=>I.contentWindow)].find(I=>I&&I===i.source)??null,k=fo(i,window.location.origin,w);if(k){if(s(null),k.kind==="dashboard")$(Mn),p(Qe.id);else if(k.kind==="groups")$(Dn),p(_e.id);else if(k.kind==="group"){const I=`collaboration-${k.groupId}`,V={id:I,title:k.title,kind:"collaboration",groupId:k.groupId,discussionId:k.discussionId};$(me=>me.some(Ke=>Ke.id===I)?me.map(Ke=>Ke.id===I?V:Ke):[...me,V]),p(I)}else T.current?(Qt=(Jt=g.current)==null?void 0:Jt.contentWindow)==null||Qt.postMessage({type:vn,intent:k},window.location.origin):E.current=k,p(oe.id);return}const _=uo(i,window.location.origin,f);if(_){$(I=>_.deleted?I.filter(V=>V.groupId!==_.groupId):I.map(V=>V.groupId===_.groupId?{...V,title:_.title}:V)),_.deleted?p(I=>I===`collaboration-${_.groupId}`?_e.id:I):v(I=>({...I,[_.groupId]:(I[_.groupId]||0)+1}));return}const U=po(i,window.location.origin,i.source===f?f:((Zt=g.current)==null?void 0:Zt.contentWindow)??null);if(U){const I=`collaboration-${U.groupId}`;$(V=>V.some(me=>me.id===I)?V:[...V,{id:I,title:U.title,kind:"collaboration",groupId:U.groupId}]),p(I);return}if(Wo(i,window.location.origin,((en=g.current)==null?void 0:en.contentWindow)??null)){s(null),R();return}const X=((tn=j.current)==null?void 0:tn.contentWindow)??null,J=yn(i,window.location.origin,X);if(J!==null){L(J);return}const ae=yn(i,window.location.origin,((nn=g.current)==null?void 0:nn.contentWindow)??null);if(ae!==null){Z(ae);return}if(In(i,window.location.origin,X)){L(!1),C(I=>I+1),K(!1),re();return}if(X&&i.origin===window.location.origin&&i.source===X&&((rn=i.data)==null?void 0:rn.type)===no){K(!0);return}if(i.origin===window.location.origin&&i.source===X&&X&&((on=i.data)==null?void 0:on.type)===ro){L(!1),W("browser:unwatch").catch(()=>{}),$(I=>I.filter(V=>V.kind!=="remote-desktop")),C(0),K(!1),p(oe.id);return}if(Ur(i,window.location.origin,((an=g.current)==null?void 0:an.contentWindow)??null)){$(_n),p(Ce.id);return}if(In(i,window.location.origin,((sn=g.current)==null?void 0:sn.contentWindow)??null)){Z(!1),T.current=!0,rr(!0),re(),o(),E.current&&((cn=(ln=g.current)==null?void 0:ln.contentWindow)==null||cn.postMessage({type:vn,intent:E.current},window.location.origin),E.current=null);return}const br=(dn=[...x.current.values()].find(I=>I.contentWindow===i.source))==null?void 0:dn.contentWindow,ge=Hr(i,window.location.origin,br??((un=g.current)==null?void 0:un.contentWindow)??null);if(ge){const I=V=>{He("files"),ce(!wn(V)),Ue(ge.revealOnly?null:V),Nt(wn(V)?null:{path:V,requestId:ge.requestId,rootAtParent:ge.revealOnly})};ge.path.startsWith("~/")?W("hello").then(({home:V})=>{const me=qr(ge.path,null,V);me&&I(me)}).catch(()=>{}):I(ge.path);return}const be=i.source===X&&X?X:((pn=g.current)==null?void 0:pn.contentWindow)??null,we=Vr(i,window.location.origin,be);if(we){W(we.method,{...we.payload,...we.method==="browser:watch"||we.method==="browser:desktop-watch"?{frameAck:!0}:{}}).then(I=>{be==null||be.postMessage({type:bn,id:we.id,ok:!0,result:I},window.location.origin)},I=>{be==null||be.postMessage({type:bn,id:we.id,ok:!1,error:I.message||"浏览器操作失败",code:I.code},window.location.origin)});return}zo(i,window.location.origin,[((mn=g.current)==null?void 0:mn.contentWindow)??null,f,((fn=y.current)==null?void 0:fn.contentWindow)??null,...[...x.current.values()].map(I=>I.contentWindow)],W)};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[R,o,W,re]),r.useEffect(()=>{const n=w=>{var k,_;for(const U of[g,j])(_=(k=U.current)==null?void 0:k.contentWindow)==null||_.postMessage({type:lt,event:w},window.location.origin)},f=["browser:session","browser:frame","browser:state","browser:closed","browser:webrtc","browser:desktop-activity"].map(w=>Q(w,n));return()=>f.forEach(w=>w())},[Q]),r.useEffect(()=>{var n,i;Mt&&((i=(n=g.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:lt,event:{type:"browser:connection",connected:O.connected,epoch:Y}},window.location.origin))},[O.connected,Y,Mt]),r.useEffect(()=>{var n,i;b&&((i=(n=j.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:to,visible:P===Ce.id},window.location.origin))},[P,b]),r.useEffect(()=>{var n,i;b&&((i=(n=j.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:lt,event:{type:"browser:connection",connected:O.connected,epoch:Y}},window.location.origin))},[O.connected,Y,b]);const Wt=r.useRef(0),Ft=P?q[P]??null:null;r.useEffect(()=>{const n=window.visualViewport;let i=null,f="";const w=()=>{const k=so(n,{height:window.innerHeight,width:window.innerWidth}),_=`${k.width}x${k.height}+${k.top}+${k.left}`;_!==f&&(f=_,document.documentElement.style.setProperty("--vv-height",`${k.height}px`),document.documentElement.style.setProperty("--vv-width",`${k.width}px`),document.documentElement.style.setProperty("--vv-top",`${k.top}px`),document.documentElement.style.setProperty("--vv-left",`${k.left}px`),i&&window.clearTimeout(i),i=window.setTimeout(w,250))};return w(),n==null||n.addEventListener("resize",w),n==null||n.addEventListener("scroll",w),window.addEventListener("orientationchange",w),window.addEventListener("resize",w),document.addEventListener("visibilitychange",w),window.addEventListener("pageshow",w),()=>{n==null||n.removeEventListener("resize",w),n==null||n.removeEventListener("scroll",w),window.removeEventListener("orientationchange",w),window.removeEventListener("resize",w),document.removeEventListener("visibilitychange",w),window.removeEventListener("pageshow",w),i&&window.clearTimeout(i),document.documentElement.style.removeProperty("--vv-height"),document.documentElement.style.removeProperty("--vv-width"),document.documentElement.style.removeProperty("--vv-top"),document.documentElement.style.removeProperty("--vv-left")}},[]),r.useEffect(()=>{fetch("/api/web-console/preferences",{credentials:"same-origin"}).then(n=>n.json()).then(n=>{var i,f,w,k;typeof((i=n.preferences)==null?void 0:i.keybarHidden)=="boolean"&&Rt(n.preferences.keybarHidden),Array.isArray((f=n.preferences)==null?void 0:f.keyOrder)&&Lt(n.preferences.keyOrder),Array.isArray((w=n.preferences)==null?void 0:w.pinnedCommands)&&Pt(n.preferences.pinnedCommands),(k=n.preferences)!=null&&k.theme&&It(pt(n.preferences.theme).id)}).catch(()=>{}).finally(()=>nr(!0)),fetch("/api/web-console/device-state",{credentials:"same-origin"}).then(n=>n.json()).then(n=>{const i=n.deviceState;i!=null&&i.drawerTab&&He(i.drawerTab),i!=null&&i.activeTerminalId&&(St.current=i.activeTerminalId),typeof(i==null?void 0:i.drawerOpen)=="boolean"&&ce(i.drawerOpen),i!=null&&i.fileTreeRoot&&Ct(i.fileTreeRoot),typeof(i==null?void 0:i.fileTreeFollowMode)=="boolean"&&Tt(i.fileTreeFollowMode),i!=null&&i.selectedFile&&Ue(i.selectedFile),i!=null&&i.terminalScroll&&typeof i.terminalScroll=="object"&&et(i.terminalScroll)}).catch(()=>{}).finally(()=>Zn(!0))},[]);const Bt=r.useCallback(n=>{fetch("/api/web-console/preferences",{method:"PATCH",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":t.csrfToken},body:JSON.stringify(n)}).catch(()=>{})},[t.csrfToken]);r.useEffect(()=>{if(!Dt)return;const n=setTimeout(()=>Bt({keybarHidden:tt,keyOrder:nt,pinnedCommands:rt,theme:Ee}),500);return()=>clearTimeout(n)},[tt,nt,rt,Ee,Dt,Bt]);const Ve=r.useCallback(n=>{t.csrfToken&&fetch("/api/web-console/device-state",{method:"PUT",credentials:"same-origin",keepalive:!0,headers:{"content-type":"application/json","x-csrf-token":t.csrfToken},body:JSON.stringify(n)}).catch(()=>{})},[t.csrfToken]);r.useEffect(()=>{if(!t.csrfToken||!B||!je)return;const n=setTimeout(()=>Ve({activeTerminalId:P,drawerOpen:le,drawerTab:he,fileTreeRoot:Le,fileTreeFollowMode:Pe,selectedFile:de,terminalScroll:Re}),500);return()=>clearTimeout(n)},[P,le,he,Le,Pe,de,Re,t.csrfToken,Ve,B,je]),r.useEffect(()=>{if(!t.csrfToken||!B||!je)return;const n=()=>Ve({activeTerminalId:P,drawerOpen:le,drawerTab:he,fileTreeRoot:Le,fileTreeFollowMode:Pe,selectedFile:de,terminalScroll:Re});return window.addEventListener("pagehide",n),()=>window.removeEventListener("pagehide",n)},[P,le,he,Le,Pe,de,Re,t.csrfToken,Ve,B,je]);const ar=r.useCallback(n=>{Nt(null),Ue(n),ce(!1)},[]),sr=r.useCallback(n=>{const i=A.find(k=>k.id===P);if(i!=null&&i.kind&&i.kind!=="webapp")return;if(i&&!i.kind){const k=ke.current.get(i.id);k?k(n,!0):$e.current.set(i.id,n),ce(!1);return}const f=A.length>=8?A.find(k=>!k.kind):null,w=(f==null?void 0:f.id)??`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;f?$e.current.set(w,n):$(k=>[...k,{id:w,title:`Terminal ${k.length+1}`,initialCommand:n}]),p(w),ce(!1)},[P,A]);r.useEffect(()=>{if(!O.connected||!je||F.current)return;F.current=!0;let n=!1,i=!1,f;return W("term:list").then(w=>{if(n)return;let k=null;try{k=An(localStorage.getItem(Be))}catch{}const _=ni(k,w.tabs,Ne.current);$(_),p(U=>{const X=Ne.current.find(ae=>ae.id===U&&ae.kind&&ae.kind!=="webapp");if(X)return X.id;const J=(k==null?void 0:k.activeTerminalId)||St.current||U||oe.id;return J===oe.id?oe.id:_.some(ae=>ae.id===J)?J:oe.id}),i=!0,ve(!0)}).catch(()=>{n||(F.current=!1,f=setTimeout(()=>Fe(w=>w+1),2e3))}),()=>{n=!0,clearTimeout(f),i||(F.current=!1)}},[O.connected,je,W,Be,We]),r.useEffect(()=>{if(!B||window.location.hash!==Oo)return;const n=new URL(window.location.href);n.hash="",window.history.replaceState(window.history.state,"",n),R()},[B,R]),r.useLayoutEffect(()=>{if(B)try{const n=An(JSON.stringify({tabs:A,activeTerminalId:P}));localStorage.setItem(Be,JSON.stringify(n))}catch{}},[A,P,B,Be]);const lr=n=>{var f;if(n===oe.id)return;const i=(f=A.find(w=>w.id===n))==null?void 0:f.kind;i==="remote-desktop"&&(C(0),K(!1),W("browser:unwatch").catch(()=>{})),!(!i&&!window.confirm("关闭页签会终止该终端进程,确认关闭?"))&&($(w=>{var _;const k=w.filter(U=>U.id!==n);return P===n&&p(((_=k[0])==null?void 0:_.id)??null),k}),i||W("term:kill",{id:n}).catch(()=>{}))},cr=r.useCallback(()=>{$(n=>{const i=n.find(f=>f.kind==="aihub");return i?(p(i.id),n):(p(zn.id),[...n,{...zn}])})},[]),dr=r.useCallback(()=>{$(n=>{const i=n.find(f=>f.kind==="flowstudio");return i?(p(i.id),n):(p(On.id),[...n,{...On}])})},[]),ur=r.useCallback(()=>{$(_n),p(Ce.id)},[]),pr=r.useCallback(()=>{$(ri),p(yt.id)},[]);r.useEffect(()=>{const n=Q("term:exited",i=>{const f=i==null?void 0:i.id;f&&($(w=>{const k=w.filter(_=>_.id!==f);return p(_=>{var U;return _===f?((U=k[0])==null?void 0:U.id)??null:_}),k}),et(w=>{if(!(f in w))return w;const k={...w};return delete k[f],k}))});return()=>{n()}},[Q]);const $t=r.useCallback(n=>{if(!P||A.length<2)return;const f=(A.findIndex(w=>w.id===P)+n+A.length)%A.length;p(A[f].id)},[P,A]),Ut=Math.max(0,A.findIndex(n=>n.id===P)),mr=((qt=A[Ut])==null?void 0:qt.kind)==="webapp"?ee.cssVars["--ui-term-col-bg"]:ee.termHostBg,fr={...se.root,...ee.cssVars,"--ui-active-content-bg":mr,"--ui-terminal-bg":ee.termHostBg,"--ui-primary-text":ee.keybar.accentText,background:"var(--ui-root-bg)",color:"var(--ui-text)"},pe=r.useCallback(()=>{Se.current=null,ot(0),it(!1)},[]),st=r.useCallback(n=>{Math.abs(n)>=64&&A.length>1&&$t(n<0?1:-1),pe()},[A.length,$t,pe]),hr=n=>n instanceof Element&&!!n.closest(".terminal-screen");r.useEffect(()=>{const n=i=>{var w;if(P!==oe.id)return;const f=Zo(i,window.location.origin,((w=g.current)==null?void 0:w.contentWindow)??null);f&&(f.phase==="move"?(it(!0),ot(f.deltaX)):f.phase==="end"?st(f.deltaX):pe())};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[P,st,pe]);const Ye=r.useCallback((n="smooth")=>{const i=zt.current;if(!i||!P)return;const f=i.querySelector(`[data-terminal-id="${P}"]`);if(!f)return;if(f===i.querySelector("[data-terminal-id]")){ao(i);return}const w=i.querySelector(".terminal-connection"),k=(w==null?void 0:w.offsetWidth)??0,_=8,U=f.offsetLeft,X=U+f.offsetWidth,J=i.scrollLeft,ae=J+i.clientWidth-k;U<J+_?i.scrollTo({left:Math.max(0,U-_),behavior:n}):X>ae-_&&i.scrollTo({left:X-i.clientWidth+k+_,behavior:n})},[P]);r.useLayoutEffect(()=>{if(!P)return;const n=A.length>Wt.current;Wt.current=A.length,Ye(n?"auto":"smooth")},[P,A.length,Ye]),r.useEffect(()=>{const n=()=>requestAnimationFrame(()=>Ye("auto"));return window.addEventListener("pageshow",n),()=>window.removeEventListener("pageshow",n)},[Ye]);const gr=!a&&(N&&P===Ce.id||D&&P===oe.id);return e.jsxs("div",{className:`web-root ${gr?"is-remote-fullscreen":""}`,style:fr,children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:Wr}}),e.jsxs("div",{className:"terminal-tabs",children:[a&&e.jsxs("div",{className:"computer-page-heading",children:[e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"返回电脑会话",title:"返回电脑会话",onClick:()=>s(null),children:e.jsx(Qr,{size:18})}),e.jsx("span",{children:a.name}),e.jsx("a",{className:"file-drawer-toggle",href:a.url,target:"_blank",rel:"noopener noreferrer","aria-label":"在新页面打开当前页面",title:"打开原页面",children:e.jsx(Et,{size:16})})]}),e.jsx("div",{className:"terminal-tab-list",ref:zt,hidden:!!a,children:A.map(n=>e.jsxs("div",{"data-terminal-id":n.id,draggable:!0,className:`terminal-tab ${n.id===P?"active":""}`,onDragStart:()=>{at.current=n.id},onDragOver:i=>i.preventDefault(),onDrop:i=>{i.preventDefault();const f=at.current;at.current=null,!(!f||f===n.id)&&$(w=>{const k=w.findIndex(J=>J.id===f),_=w.findIndex(J=>J.id===n.id);if(k<0||_<0)return w;const U=[...w],[X]=U.splice(k,1);return U.splice(_,0,X),W("term:reorder",{ids:U.filter(J=>!J.kind).map(J=>J.id)}).catch(()=>{}),U})},onClick:()=>p(n.id),onDoubleClick:()=>{var f;if(n.kind)return;const i=(f=window.prompt("页签名称",n.title))==null?void 0:f.trim();i&&W("term:rename",{id:n.id,title:i}).then(()=>$(w=>w.map(k=>k.id===n.id?{...k,title:i}:k))).catch(()=>{})},children:[e.jsx("span",{children:n.title}),n.kind!=="webapp"&&e.jsx("button",{tabIndex:-1,onClick:i=>{i.stopPropagation(),lr(n.id)},children:"×"})]},n.id))}),e.jsx("button",{className:"terminal-add","aria-label":"新建终端页签",hidden:!!a,disabled:A.length>=8,onClick:R,children:"+"}),e.jsxs("div",{className:"terminal-connection",children:[e.jsx(Fr,{iconOnly:!xe()}),e.jsx(Br,{sortingDisabled:!ue.loaded||ue.saving,onReorder:(n,i)=>{const f=ue.settings.visibleTools;return ue.setVisibleTools(Po(f,n,i))},avatar:e.jsx(Co,{username:((Vt=t.user)==null?void 0:Vt.username)??"?",connected:O.connected,accent:ee.keybar.accent,accentText:ee.keybar.accentText,selectedPageId:a==null?void 0:a.id,onSelectPage:h,onUpdatePage:S,configuration:ue,csrfToken:t.csrfToken}),items:[{id:"refresh",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"刷新页面",title:"刷新页面",onClick:()=>a?u(n=>n+1):window.location.reload(),children:e.jsx(ye,{size:17,"aria-hidden":"true"})})},{id:"dashboard",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开进行中的 Agent 会话",title:"进行中的 Agent 会话",onClick:()=>{s(null),$(Mn),p(Qe.id)},children:e.jsx(Hn,{size:17,"aria-hidden":"true"})})},{id:"collaboration",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开群聊列表",title:"群聊列表",onClick:()=>{s(null),$(Dn),p(_e.id)},children:e.jsx(vt,{size:17,"aria-hidden":"true"})})},{id:"install",content:e.jsx(bo,{})},{id:"remote",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开远程桌面",title:"远程桌面 · 浏览器直播",onClick:()=>{s(null),ur()},children:e.jsx(dt,{size:17,"aria-hidden":"true"})})},{id:"ai-hub",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开 AI Hub",title:"AI Hub · 多模型对比",onClick:()=>{s(null),cr()},children:e.jsx($n,{size:17,"aria-hidden":"true"})})},{id:"flow",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开数字人",title:"数字人 · Flow Studio",onClick:()=>{s(null),dr()},children:e.jsx(kt,{size:17,"aria-hidden":"true"})})},{id:"theme",content:e.jsx(Go,{themeId:Ee,onThemeChange:It})},{id:"files",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":le?"关闭我的文件":"打开我的文件",title:"我的文件","aria-expanded":le,onClick:()=>{s(null),ce(n=>!n)},children:e.jsx(Zr,{size:17,"aria-hidden":"true"})})},{id:"calendar",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开智能体日历",title:"日历 · 定时任务与待办",onClick:()=>{s(null),pr()},children:e.jsx(qn,{size:17,"aria-hidden":"true"})})}].filter(n=>ue.settings.visibleTools.some(i=>i===n.id)).sort((n,i)=>ue.settings.visibleTools.findIndex(f=>f===n.id)-ue.settings.visibleTools.findIndex(f=>f===i.id))})]})]}),e.jsxs("main",{className:`workspace ${le?"show-tree":""} ${de?"has-preview":""}`,hidden:!!a,style:se.workspace,children:[e.jsx("section",{className:"term-col",style:se.termCol,onPointerDownCapture:n=>{n.pointerType!=="touch"||!hr(n.target)||(pe(),Se.current={x:n.clientX,y:n.clientY,axis:"pending",pointerId:n.pointerId})},onPointerMoveCapture:n=>{const i=Se.current;if(!i||n.pointerId!==i.pointerId||n.pointerType!=="touch")return;const f=n.clientX-i.x,w=n.clientY-i.y;if(i.axis==="pending"){if(Math.max(Math.abs(f),Math.abs(w))<=8)return;if(Math.abs(w)>=Math.abs(f)*1.2){Se.current=null;return}i.axis="horizontal",it(!0);const k=_=>{window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),Se.current===i&&pe()};window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k)}i.axis==="horizontal"&&(n.preventDefault(),ot(f))},onPointerUpCapture:n=>{const i=Se.current;if(!i||n.pointerId!==i.pointerId)return;const f=n.clientX-i.x;i.axis==="horizontal"&&Math.abs(f)>=64?st(f):pe()},onPointerCancelCapture:pe,children:e.jsx("div",{ref:l,className:"terminal-track",style:{transform:`translate3d(calc(${-Ut*100}% + ${or}px),0,0)`,transition:ir?"none":"transform 260ms cubic-bezier(.22,.8,.32,1)"},children:A.map(n=>e.jsx("div",{className:"terminal-slide","data-console-tab":n.id,style:{position:"relative"},children:e.jsx(ti,{active:n.kind==="webapp"||!n.kind||n.id===P,children:n.kind==="webapp"?e.jsx("iframe",{ref:g,className:"webapp-frame",src:Ge("/app/"),title:n.title,onLoad:re}):n.kind==="session-dashboard"?e.jsx(ct,{view:"sessions",title:"会话 Dashboard",onFrame:i=>{y.current=i},onLoad:re}):n.kind==="collaboration-dashboard"?e.jsx(ct,{title:"群聊列表",onFrame:i=>{c.current=i},onLoad:re}):n.kind==="collaboration"?e.jsx(ct,{groupId:n.groupId||"",discussionId:n.discussionId,title:n.title,onFrame:i=>{i?x.current.set(n.id,i):x.current.delete(n.id)},onLoad:re},`${n.id}-${n.discussionId??""}-${m[n.groupId||""]||0}`):n.kind==="remote-desktop"?e.jsxs("div",{style:{height:"100%",background:"var(--ui-term-col-bg, #101014)"},"aria-busy":!te,children:[e.jsx("iframe",{ref:j,className:"webapp-frame",style:{visibility:te?"visible":"hidden"},src:Ge("/app/?view=remote-desktop"),title:"远程桌面",onLoad:re}),!te&&e.jsx(Ze,{label:"REMOTE DESKTOP",title:"正在打开远程桌面",caption:"正在准备桌面与连接",icon:e.jsx(dt,{size:36,strokeWidth:1.5})})]}):n.kind==="calendar"?e.jsx("iframe",{className:"webapp-frame",src:Ge("/app/?view=calendar"),title:"智能体日历",onLoad:re}):n.kind==="aihub"?e.jsx(si,{visible:n.id===P,rpc:W}):n.kind==="flowstudio"?e.jsx(li,{visible:n.id===P}):e.jsx(oi,{terminalId:n.id,title:n.title,initialCommand:n.initialCommand,visible:n.id===P,state:O,rpc:W,onEvent:Q,onTerminalData:G,onTerminalReset:H,sendTerminalInput:ie,keyOrder:nt,keybarHidden:tt,onKeyOrderChange:Lt,onKeybarHiddenChange:Rt,terminalTheme:ee,initialScrollLine:Re[n.id]??null,onScrollLineChange:i=>et(f=>f[n.id]===i?f:{...f,[n.id]:i}),onRegisterFill:i=>Jn(n.id,i),onCwdChange:i=>i&&z(f=>({...f,[n.id]:i}))})})},n.id))})}),le&&e.jsx("div",{className:"drawer-mask",onClick:()=>ce(!1)}),e.jsxs("aside",{className:`tree-col ${le?"tree-col-open":""}`,style:se.treeCol,children:[e.jsxs("div",{className:"tree-head",style:se.treeHead,children:[e.jsx("button",{className:he==="files"?"drawer-tab-active":"",onClick:()=>He("files"),children:"文件"}),e.jsx("button",{className:he==="history"?"drawer-tab-active":"",onClick:()=>He("history"),children:"历史"}),e.jsx("span",{className:"tree-cwd",style:se.treeCwd,children:Ft??""}),e.jsx("button",{style:{...se.iconBtn,marginLeft:"auto",flexShrink:0},onClick:()=>ce(!1),"aria-label":"close drawer",children:e.jsx(Te,{size:15,"aria-hidden":"true"})})]}),he==="files"?e.jsx(ii,{ready:Y>0,followCwd:!0,cwd:Ft,gateway:fe,onOpenFile:ar,selectedPath:de??(qe==null?void 0:qe.path)??null,initialRoot:Le,initialFollow:Pe,revealRequest:qe,onTreeStateChange:(n,i)=>{Ct(n),Tt(i)}}):e.jsx(Yo,{csrfToken:t.csrfToken,terminalId:((Yt=A.find(n=>n.id===P))==null?void 0:Yt.kind)==="webapp"?null:P,pinnedCommands:rt,onPinnedCommandsChange:Pt,onFill:Qn,onExecute:sr}),e.jsxs("div",{className:"tree-foot",style:se.treeFoot,children:[e.jsx("span",{style:se.treeFootDot}),e.jsx("span",{children:"实时同步"})]})]}),de&&e.jsx("section",{className:"preview-col",style:se.previewCol,children:e.jsx(ai,{path:de,gateway:fe,onClose:()=>Ue(null)})})]}),a&&e.jsx(Lo,{page:a,reloadKey:d},a.id)]})}const se={root:{height:"100dvh",display:"flex",flexDirection:"column",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif',overflow:"hidden"},iconBtn:{minWidth:28,height:28,borderRadius:7,border:"1px solid var(--ui-tabbar-border, #303442)",background:"var(--ui-tab-bg, #202029)",color:"var(--ui-tab-text, #aaaab8)",fontSize:13},workspace:{flex:1,minHeight:0,display:"grid",position:"relative"},treeCol:{background:"var(--ui-tree-bg, #121218)",minHeight:0,flexDirection:"column"},treeHead:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px 4px",fontSize:11,textTransform:"uppercase",letterSpacing:1,color:"#778",flexShrink:0},treeCwd:{fontSize:10,color:"#556",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:150,textTransform:"none",letterSpacing:0},treeFoot:{display:"flex",alignItems:"center",gap:7,minHeight:31,padding:"6px 11px calc(env(safe-area-inset-bottom) + 6px)",borderTop:"1px solid var(--ui-tabbar-border, #282832)",boxShadow:"0 -5px 16px rgba(0,0,0,.22)",background:"var(--ui-tab-bg, #15151c)",color:"var(--ui-connection-text, #777789)",fontSize:10.5,flexShrink:0},treeFootDot:{width:6,height:6,borderRadius:99,background:"var(--ui-success, #9ece6a)",boxShadow:"0 0 0 2px color-mix(in srgb, var(--ui-success, #9ece6a) 12%, transparent)",flexShrink:0},termCol:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",background:"var(--ui-term-col-bg, #101014)",gridColumn:1,overflow:"hidden"},previewCol:{minWidth:0,minHeight:0}},Ti=Object.freeze(Object.defineProperty({__proto__:null,default:di},Symbol.toStringTag,{value:"Module"}));export{Ze as F,Ti as p};
86
+ `})]})}function ti({active:t,children:o}){const[a,s]=r.useState(t);return r.useEffect(()=>{t&&s(!0)},[t]),t||a?o:null}function An(t){try{const o=JSON.parse(t||"null");if(!o||!Array.isArray(o.tabs))return null;const a=new Set,s=new Set(["webapp","aihub","flowstudio","remote-desktop","collaboration","collaboration-dashboard","session-dashboard","calendar"]),l=[];for(const d of o.tabs.slice(0,100))!d||typeof d.id!="string"||typeof d.title!="string"||a.has(d.id)||d.kind!==void 0&&!s.has(d.kind)||d.kind==="collaboration"&&typeof d.groupId!="string"||(a.add(d.id),l.push({id:d.id,title:d.title,...d.kind?{kind:d.kind}:{},...typeof d.groupId=="string"?{groupId:d.groupId}:{},...typeof d.discussionId=="string"&&/^[\w-]{1,200}$/.test(d.discussionId)?{discussionId:d.discussionId}:{}}));return{tabs:l,activeTerminalId:typeof o.activeTerminalId=="string"&&o.activeTerminalId!=="messaging"?o.activeTerminalId:null}}catch{return null}}function ni(t,o,a){const s=new Map(o.filter(u=>u.status==="active"||u.status==="detached").map(u=>[u.id,{id:u.id,title:u.title}])),l=[],d=new Set;for(const u of[...(t==null?void 0:t.tabs)??[],...a,...s.values()])d.has(u.id)||!u.kind&&!s.has(u.id)||(d.add(u.id),l.push(u.kind?u:s.get(u.id)));return l}const Ce={id:"remote-desktop",title:"远程桌面",kind:"remote-desktop"};function _n(t){const o=t.find(a=>a.kind==="remote-desktop");return o?t.map(a=>a===o?{...Ce}:a):[...t,{...Ce}]}const _e={id:"collaboration-dashboard",title:"群聊列表",kind:"collaboration-dashboard"};function Dn(t){return t.some(o=>o.id===_e.id)?t:[...t,{..._e}]}const Qe={id:"session-dashboard",title:"Dashboard",kind:"session-dashboard"};function Mn(t){return t.some(o=>o.id===Qe.id)?t:[...t,{...Qe}]}const yt={id:"calendar",title:"日历",kind:"calendar"};function ri(t){return t.some(o=>o.id===yt.id)?t:[...t,{...yt}]}const oi=Oe(()=>ze(()=>import("./TerminalPane-BvhhLZN1.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),{ssr:!1}),ii=Oe(()=>ze(()=>import("./FileTree-rE46D8RD.js"),__vite__mapDeps([6,1,2,7,8,9,10,11,12]),import.meta.url),{ssr:!1}),ai=Oe(()=>ze(()=>import("./FilePreview-DI0rubgD.js").then(t=>t.b),__vite__mapDeps([13,1,2,14,12,15,9,16]),import.meta.url),{ssr:!1}),si=Oe(()=>ze(()=>import("./AiHubPane-Cq9jov_Y.js"),__vite__mapDeps([17,1,2,9,10,18,19]),import.meta.url),{ssr:!1}),li=Oe(()=>ze(()=>import("./FlowStudioPane-BILTrSF5.js"),__vite__mapDeps([20,1,2,21,22,9,23,10,15,12,4,11,3,24,25,26]),import.meta.url),{ssr:!1,loading:()=>e.jsx(Ze,{})}),ci=Dr(new Mr);function di(){return e.jsx(Ho,{children:(t,o)=>xe()?e.jsx(Wn,{auth:t,onWorkspaceReady:o}):e.jsx(_r,{api:ci,product:"电脑上的 AgentRoam CLI",scope:"cli",hint:"更新期间当前连接的电脑服务会短暂重启。此页面会继续检查更新结果。",installLabel:"更新这台电脑",children:e.jsx(Wn,{auth:t,onWorkspaceReady:o})})})}const oe={id:"webapp-agent",title:"智能助手",kind:"webapp"},zn={id:"ai-hub",title:"AI Hub",kind:"aihub"},On={id:"flow-studio",title:"Flow Studio",kind:"flowstudio"};function ui(){var t;return typeof document>"u"?$r:pt((t=document.getElementById("web-theme-root"))==null?void 0:t.dataset.webTheme).id}const pi="agent-web-shell:skin:v1";function Wn({auth:t,onWorkspaceReady:o}){var Ht,qt,Vt,Yt;const[a,s]=r.useState(null),l=r.useRef(null),[d,u]=r.useState(0),h=r.useCallback(n=>{if((n==null?void 0:n.openMode)==="new-tab"){window.open(n.url,"_blank","noopener,noreferrer");return}s(n)},[]),S=r.useCallback(n=>s((n==null?void 0:n.openMode)==="current"?n:null),[]),g=r.useRef(null),j=r.useRef(null),c=r.useRef(null),y=r.useRef(null),E=r.useRef(null),T=r.useRef(!1),[m,v]=r.useState({}),x=r.useRef(new Map),[b,C]=r.useState(0),[N,L]=r.useState(!1),[D,Z]=r.useState(!1),[te,K]=r.useState(!1),ne=r.useRef(()=>{}),M=r.useCallback(n=>{var f;const i=Bo(n);if(!(!i||i.type!==xt.watcherFrame)){ne.current(i.channelId,i.sequence);for(const w of[g,j]){if(!((f=w.current)!=null&&f.contentWindow))continue;const k=i.payload.slice().buffer;w.current.contentWindow.postMessage({type:zr,channelId:i.channelId,sequence:i.sequence,data:k},window.location.origin,[k])}}},[]),{state:O,epoch:Y,rpc:W,onEvent:Q,onTerminalData:G,onTerminalReset:H,sendTerminalInput:ie}=io(M,t.getWsNonce,t.refresh),fe=r.useMemo(()=>({request:(n,i,f)=>W(n,i,f),subscribe:(n,i)=>Q("fs:event",i)}),[Q,W]);ne.current=(n,i)=>{W("browser:frame-ack",{channelId:n,sequence:i}).catch(()=>{})};const[A,$]=r.useState([{...oe}]),Ne=r.useRef(A);Ne.current=A;const[P,p]=r.useState(oe.id),R=r.useCallback(()=>{if(A.length>=8)return;const n=`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;$(i=>i.length>=8?i:[...i,{id:n,title:`Terminal ${i.length+1}`}]),p(n)},[A.length]);$o(l,P,!a);const[q,z]=r.useState({}),F=r.useRef(!1),[B,ve]=r.useState(!1),[We,Fe]=r.useState(0),Be=`agentroam:workspace:${typeof window>"u"?"":Me()}:${((Ht=t.user)==null?void 0:Ht.id)??""}`,St=r.useRef(null),ke=r.useRef(new Map),$e=r.useRef(new Map),Jn=r.useCallback((n,i)=>{ke.current.set(n,i);const f=window.setTimeout(()=>{if(ke.current.get(n)!==i)return;const w=$e.current.get(n);w&&($e.current.delete(n),i(w,!0))},180);return()=>{window.clearTimeout(f),ke.current.get(n)===i&&ke.current.delete(n)}},[]),Qn=r.useCallback(n=>{var f;if(!P||(f=A.find(w=>w.id===P))!=null&&f.kind)return;const i=ke.current.get(P);i?i(n):W("term:input",{id:P,data:`${n}`}).catch(()=>{}),ce(!1)},[P,W,A]),[je,Zn]=r.useState(!1),[Re,et]=r.useState({}),[de,Ue]=r.useState(null),[le,ce]=r.useState(!1),[he,He]=r.useState("files"),[Le,Ct]=r.useState(null),[Pe,Tt]=r.useState(!0),[qe,Nt]=r.useState(null),[tt,Rt]=r.useState(!1),[nt,Lt]=r.useState([]),[rt,Pt]=r.useState(Mo()),[Ee,It]=r.useState(ui),[At,er]=r.useState(ut),[_t,tr]=r.useState(!1);r.useEffect(()=>{const n=()=>{try{er(Xo(window.localStorage))}catch{}tr(!0)},i=f=>{(f.key===Xn||f.key===null)&&n()};return n(),window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[]);const[Dt,nr]=r.useState(!1),ue=_o(t.csrfToken),[Mt,rr]=r.useState(!1),ee=pt(Ee),Se=r.useRef(null),[or,ot]=r.useState(0),[ir,it]=r.useState(!1),at=r.useRef(null),zt=r.useRef(null),Ot=r.useCallback(n=>{var f;const i=[g.current,j.current,c.current,y.current,...x.current.values()];for(const w of i)(f=w==null?void 0:w.contentWindow)==null||f.postMessage({type:pi,skin:n},window.location.origin)},[]),re=r.useCallback(()=>{var i;if(Ot(Ee),!_t)return;const n=[g.current,j.current,c.current,y.current,...x.current.values()];for(const f of n)(i=f==null?void 0:f.contentWindow)==null||i.postMessage({type:Or,navigationLayout:At},window.location.origin)},[Ee,At,_t,Ot]);r.useEffect(()=>{re()},[re]),r.useEffect(()=>{const n=ee.cssVars["--ui-root-bg"],i=ee.cssVars["--ui-color-scheme"],f=document.getElementById("web-theme-root");for(const[k,_]of Object.entries(ee.cssVars))f==null||f.style.setProperty(k,_);f&&(f.dataset.webTheme=ee.id),document.documentElement.style.background=n,document.documentElement.style.colorScheme=i,document.body.style.background=n,document.body.style.colorScheme=i;let w=document.querySelector('meta[name="theme-color"]');w||(w=document.createElement("meta"),w.name="theme-color",document.head.append(w)),w.content=ee.cssVars["--ui-tabbar-bg"]},[ee]),r.useEffect(()=>{const n=i=>{var Kt,Gt,Xt,Jt,Qt,Zt,en,tn,nn,rn,on,an,sn,ln,cn,dn,un,pn,mn,fn;const f=((Kt=c.current)==null?void 0:Kt.contentWindow)??null,w=[(Gt=g.current)==null?void 0:Gt.contentWindow,f,(Xt=y.current)==null?void 0:Xt.contentWindow,...[...x.current.values()].map(I=>I.contentWindow)].find(I=>I&&I===i.source)??null,k=fo(i,window.location.origin,w);if(k){if(s(null),k.kind==="dashboard")$(Mn),p(Qe.id);else if(k.kind==="groups")$(Dn),p(_e.id);else if(k.kind==="group"){const I=`collaboration-${k.groupId}`,V={id:I,title:k.title,kind:"collaboration",groupId:k.groupId,discussionId:k.discussionId};$(me=>me.some(Ke=>Ke.id===I)?me.map(Ke=>Ke.id===I?V:Ke):[...me,V]),p(I)}else T.current?(Qt=(Jt=g.current)==null?void 0:Jt.contentWindow)==null||Qt.postMessage({type:vn,intent:k},window.location.origin):E.current=k,p(oe.id);return}const _=uo(i,window.location.origin,f);if(_){$(I=>_.deleted?I.filter(V=>V.groupId!==_.groupId):I.map(V=>V.groupId===_.groupId?{...V,title:_.title}:V)),_.deleted?p(I=>I===`collaboration-${_.groupId}`?_e.id:I):v(I=>({...I,[_.groupId]:(I[_.groupId]||0)+1}));return}const U=po(i,window.location.origin,i.source===f?f:((Zt=g.current)==null?void 0:Zt.contentWindow)??null);if(U){const I=`collaboration-${U.groupId}`;$(V=>V.some(me=>me.id===I)?V:[...V,{id:I,title:U.title,kind:"collaboration",groupId:U.groupId}]),p(I);return}if(Wo(i,window.location.origin,((en=g.current)==null?void 0:en.contentWindow)??null)){s(null),R();return}const X=((tn=j.current)==null?void 0:tn.contentWindow)??null,J=yn(i,window.location.origin,X);if(J!==null){L(J);return}const ae=yn(i,window.location.origin,((nn=g.current)==null?void 0:nn.contentWindow)??null);if(ae!==null){Z(ae);return}if(In(i,window.location.origin,X)){L(!1),C(I=>I+1),K(!1),re();return}if(X&&i.origin===window.location.origin&&i.source===X&&((rn=i.data)==null?void 0:rn.type)===no){K(!0);return}if(i.origin===window.location.origin&&i.source===X&&X&&((on=i.data)==null?void 0:on.type)===ro){L(!1),W("browser:unwatch").catch(()=>{}),$(I=>I.filter(V=>V.kind!=="remote-desktop")),C(0),K(!1),p(oe.id);return}if(Ur(i,window.location.origin,((an=g.current)==null?void 0:an.contentWindow)??null)){$(_n),p(Ce.id);return}if(In(i,window.location.origin,((sn=g.current)==null?void 0:sn.contentWindow)??null)){Z(!1),T.current=!0,rr(!0),re(),o(),E.current&&((cn=(ln=g.current)==null?void 0:ln.contentWindow)==null||cn.postMessage({type:vn,intent:E.current},window.location.origin),E.current=null);return}const br=(dn=[...x.current.values()].find(I=>I.contentWindow===i.source))==null?void 0:dn.contentWindow,ge=Hr(i,window.location.origin,br??((un=g.current)==null?void 0:un.contentWindow)??null);if(ge){const I=V=>{He("files"),ce(!wn(V)),Ue(ge.revealOnly?null:V),Nt(wn(V)?null:{path:V,requestId:ge.requestId,rootAtParent:ge.revealOnly})};ge.path.startsWith("~/")?W("hello").then(({home:V})=>{const me=qr(ge.path,null,V);me&&I(me)}).catch(()=>{}):I(ge.path);return}const be=i.source===X&&X?X:((pn=g.current)==null?void 0:pn.contentWindow)??null,we=Vr(i,window.location.origin,be);if(we){W(we.method,{...we.payload,...we.method==="browser:watch"||we.method==="browser:desktop-watch"?{frameAck:!0}:{}}).then(I=>{be==null||be.postMessage({type:bn,id:we.id,ok:!0,result:I},window.location.origin)},I=>{be==null||be.postMessage({type:bn,id:we.id,ok:!1,error:I.message||"浏览器操作失败",code:I.code},window.location.origin)});return}zo(i,window.location.origin,[((mn=g.current)==null?void 0:mn.contentWindow)??null,f,((fn=y.current)==null?void 0:fn.contentWindow)??null,...[...x.current.values()].map(I=>I.contentWindow)],W)};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[R,o,W,re]),r.useEffect(()=>{const n=w=>{var k,_;for(const U of[g,j])(_=(k=U.current)==null?void 0:k.contentWindow)==null||_.postMessage({type:lt,event:w},window.location.origin)},f=["browser:session","browser:frame","browser:state","browser:closed","browser:webrtc","browser:desktop-activity"].map(w=>Q(w,n));return()=>f.forEach(w=>w())},[Q]),r.useEffect(()=>{var n,i;Mt&&((i=(n=g.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:lt,event:{type:"browser:connection",connected:O.connected,epoch:Y}},window.location.origin))},[O.connected,Y,Mt]),r.useEffect(()=>{var n,i;b&&((i=(n=j.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:to,visible:P===Ce.id},window.location.origin))},[P,b]),r.useEffect(()=>{var n,i;b&&((i=(n=j.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:lt,event:{type:"browser:connection",connected:O.connected,epoch:Y}},window.location.origin))},[O.connected,Y,b]);const Wt=r.useRef(0),Ft=P?q[P]??null:null;r.useEffect(()=>{const n=window.visualViewport;let i=null,f="";const w=()=>{const k=so(n,{height:window.innerHeight,width:window.innerWidth}),_=`${k.width}x${k.height}+${k.top}+${k.left}`;_!==f&&(f=_,document.documentElement.style.setProperty("--vv-height",`${k.height}px`),document.documentElement.style.setProperty("--vv-width",`${k.width}px`),document.documentElement.style.setProperty("--vv-top",`${k.top}px`),document.documentElement.style.setProperty("--vv-left",`${k.left}px`),i&&window.clearTimeout(i),i=window.setTimeout(w,250))};return w(),n==null||n.addEventListener("resize",w),n==null||n.addEventListener("scroll",w),window.addEventListener("orientationchange",w),window.addEventListener("resize",w),document.addEventListener("visibilitychange",w),window.addEventListener("pageshow",w),()=>{n==null||n.removeEventListener("resize",w),n==null||n.removeEventListener("scroll",w),window.removeEventListener("orientationchange",w),window.removeEventListener("resize",w),document.removeEventListener("visibilitychange",w),window.removeEventListener("pageshow",w),i&&window.clearTimeout(i),document.documentElement.style.removeProperty("--vv-height"),document.documentElement.style.removeProperty("--vv-width"),document.documentElement.style.removeProperty("--vv-top"),document.documentElement.style.removeProperty("--vv-left")}},[]),r.useEffect(()=>{fetch("/api/web-console/preferences",{credentials:"same-origin"}).then(n=>n.json()).then(n=>{var i,f,w,k;typeof((i=n.preferences)==null?void 0:i.keybarHidden)=="boolean"&&Rt(n.preferences.keybarHidden),Array.isArray((f=n.preferences)==null?void 0:f.keyOrder)&&Lt(n.preferences.keyOrder),Array.isArray((w=n.preferences)==null?void 0:w.pinnedCommands)&&Pt(n.preferences.pinnedCommands),(k=n.preferences)!=null&&k.theme&&It(pt(n.preferences.theme).id)}).catch(()=>{}).finally(()=>nr(!0)),fetch("/api/web-console/device-state",{credentials:"same-origin"}).then(n=>n.json()).then(n=>{const i=n.deviceState;i!=null&&i.drawerTab&&He(i.drawerTab),i!=null&&i.activeTerminalId&&(St.current=i.activeTerminalId),typeof(i==null?void 0:i.drawerOpen)=="boolean"&&ce(i.drawerOpen),i!=null&&i.fileTreeRoot&&Ct(i.fileTreeRoot),typeof(i==null?void 0:i.fileTreeFollowMode)=="boolean"&&Tt(i.fileTreeFollowMode),i!=null&&i.selectedFile&&Ue(i.selectedFile),i!=null&&i.terminalScroll&&typeof i.terminalScroll=="object"&&et(i.terminalScroll)}).catch(()=>{}).finally(()=>Zn(!0))},[]);const Bt=r.useCallback(n=>{fetch("/api/web-console/preferences",{method:"PATCH",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":t.csrfToken},body:JSON.stringify(n)}).catch(()=>{})},[t.csrfToken]);r.useEffect(()=>{if(!Dt)return;const n=setTimeout(()=>Bt({keybarHidden:tt,keyOrder:nt,pinnedCommands:rt,theme:Ee}),500);return()=>clearTimeout(n)},[tt,nt,rt,Ee,Dt,Bt]);const Ve=r.useCallback(n=>{t.csrfToken&&fetch("/api/web-console/device-state",{method:"PUT",credentials:"same-origin",keepalive:!0,headers:{"content-type":"application/json","x-csrf-token":t.csrfToken},body:JSON.stringify(n)}).catch(()=>{})},[t.csrfToken]);r.useEffect(()=>{if(!t.csrfToken||!B||!je)return;const n=setTimeout(()=>Ve({activeTerminalId:P,drawerOpen:le,drawerTab:he,fileTreeRoot:Le,fileTreeFollowMode:Pe,selectedFile:de,terminalScroll:Re}),500);return()=>clearTimeout(n)},[P,le,he,Le,Pe,de,Re,t.csrfToken,Ve,B,je]),r.useEffect(()=>{if(!t.csrfToken||!B||!je)return;const n=()=>Ve({activeTerminalId:P,drawerOpen:le,drawerTab:he,fileTreeRoot:Le,fileTreeFollowMode:Pe,selectedFile:de,terminalScroll:Re});return window.addEventListener("pagehide",n),()=>window.removeEventListener("pagehide",n)},[P,le,he,Le,Pe,de,Re,t.csrfToken,Ve,B,je]);const ar=r.useCallback(n=>{Nt(null),Ue(n),ce(!1)},[]),sr=r.useCallback(n=>{const i=A.find(k=>k.id===P);if(i!=null&&i.kind&&i.kind!=="webapp")return;if(i&&!i.kind){const k=ke.current.get(i.id);k?k(n,!0):$e.current.set(i.id,n),ce(!1);return}const f=A.length>=8?A.find(k=>!k.kind):null,w=(f==null?void 0:f.id)??`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;f?$e.current.set(w,n):$(k=>[...k,{id:w,title:`Terminal ${k.length+1}`,initialCommand:n}]),p(w),ce(!1)},[P,A]);r.useEffect(()=>{if(!O.connected||!je||F.current)return;F.current=!0;let n=!1,i=!1,f;return W("term:list").then(w=>{if(n)return;let k=null;try{k=An(localStorage.getItem(Be))}catch{}const _=ni(k,w.tabs,Ne.current);$(_),p(U=>{const X=Ne.current.find(ae=>ae.id===U&&ae.kind&&ae.kind!=="webapp");if(X)return X.id;const J=(k==null?void 0:k.activeTerminalId)||St.current||U||oe.id;return J===oe.id?oe.id:_.some(ae=>ae.id===J)?J:oe.id}),i=!0,ve(!0)}).catch(()=>{n||(F.current=!1,f=setTimeout(()=>Fe(w=>w+1),2e3))}),()=>{n=!0,clearTimeout(f),i||(F.current=!1)}},[O.connected,je,W,Be,We]),r.useEffect(()=>{if(!B||window.location.hash!==Oo)return;const n=new URL(window.location.href);n.hash="",window.history.replaceState(window.history.state,"",n),R()},[B,R]),r.useLayoutEffect(()=>{if(B)try{const n=An(JSON.stringify({tabs:A,activeTerminalId:P}));localStorage.setItem(Be,JSON.stringify(n))}catch{}},[A,P,B,Be]);const lr=n=>{var f;if(n===oe.id)return;const i=(f=A.find(w=>w.id===n))==null?void 0:f.kind;i==="remote-desktop"&&(C(0),K(!1),W("browser:unwatch").catch(()=>{})),!(!i&&!window.confirm("关闭页签会终止该终端进程,确认关闭?"))&&($(w=>{var _;const k=w.filter(U=>U.id!==n);return P===n&&p(((_=k[0])==null?void 0:_.id)??null),k}),i||W("term:kill",{id:n}).catch(()=>{}))},cr=r.useCallback(()=>{$(n=>{const i=n.find(f=>f.kind==="aihub");return i?(p(i.id),n):(p(zn.id),[...n,{...zn}])})},[]),dr=r.useCallback(()=>{$(n=>{const i=n.find(f=>f.kind==="flowstudio");return i?(p(i.id),n):(p(On.id),[...n,{...On}])})},[]),ur=r.useCallback(()=>{$(_n),p(Ce.id)},[]),pr=r.useCallback(()=>{$(ri),p(yt.id)},[]);r.useEffect(()=>{const n=Q("term:exited",i=>{const f=i==null?void 0:i.id;f&&($(w=>{const k=w.filter(_=>_.id!==f);return p(_=>{var U;return _===f?((U=k[0])==null?void 0:U.id)??null:_}),k}),et(w=>{if(!(f in w))return w;const k={...w};return delete k[f],k}))});return()=>{n()}},[Q]);const $t=r.useCallback(n=>{if(!P||A.length<2)return;const f=(A.findIndex(w=>w.id===P)+n+A.length)%A.length;p(A[f].id)},[P,A]),Ut=Math.max(0,A.findIndex(n=>n.id===P)),mr=((qt=A[Ut])==null?void 0:qt.kind)==="webapp"?ee.cssVars["--ui-term-col-bg"]:ee.termHostBg,fr={...se.root,...ee.cssVars,"--ui-active-content-bg":mr,"--ui-terminal-bg":ee.termHostBg,"--ui-primary-text":ee.keybar.accentText,background:"var(--ui-root-bg)",color:"var(--ui-text)"},pe=r.useCallback(()=>{Se.current=null,ot(0),it(!1)},[]),st=r.useCallback(n=>{Math.abs(n)>=64&&A.length>1&&$t(n<0?1:-1),pe()},[A.length,$t,pe]),hr=n=>n instanceof Element&&!!n.closest(".terminal-screen");r.useEffect(()=>{const n=i=>{var w;if(P!==oe.id)return;const f=Zo(i,window.location.origin,((w=g.current)==null?void 0:w.contentWindow)??null);f&&(f.phase==="move"?(it(!0),ot(f.deltaX)):f.phase==="end"?st(f.deltaX):pe())};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[P,st,pe]);const Ye=r.useCallback((n="smooth")=>{const i=zt.current;if(!i||!P)return;const f=i.querySelector(`[data-terminal-id="${P}"]`);if(!f)return;if(f===i.querySelector("[data-terminal-id]")){ao(i);return}const w=i.querySelector(".terminal-connection"),k=(w==null?void 0:w.offsetWidth)??0,_=8,U=f.offsetLeft,X=U+f.offsetWidth,J=i.scrollLeft,ae=J+i.clientWidth-k;U<J+_?i.scrollTo({left:Math.max(0,U-_),behavior:n}):X>ae-_&&i.scrollTo({left:X-i.clientWidth+k+_,behavior:n})},[P]);r.useLayoutEffect(()=>{if(!P)return;const n=A.length>Wt.current;Wt.current=A.length,Ye(n?"auto":"smooth")},[P,A.length,Ye]),r.useEffect(()=>{const n=()=>requestAnimationFrame(()=>Ye("auto"));return window.addEventListener("pageshow",n),()=>window.removeEventListener("pageshow",n)},[Ye]);const gr=!a&&(N&&P===Ce.id||D&&P===oe.id);return e.jsxs("div",{className:`web-root ${gr?"is-remote-fullscreen":""}`,style:fr,children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:Wr}}),e.jsxs("div",{className:"terminal-tabs",children:[a&&e.jsxs("div",{className:"computer-page-heading",children:[e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"返回电脑会话",title:"返回电脑会话",onClick:()=>s(null),children:e.jsx(Qr,{size:18})}),e.jsx("span",{children:a.name}),e.jsx("a",{className:"file-drawer-toggle",href:a.url,target:"_blank",rel:"noopener noreferrer","aria-label":"在新页面打开当前页面",title:"打开原页面",children:e.jsx(Et,{size:16})})]}),e.jsx("div",{className:"terminal-tab-list",ref:zt,hidden:!!a,children:A.map(n=>e.jsxs("div",{"data-terminal-id":n.id,draggable:!0,className:`terminal-tab ${n.id===P?"active":""}`,onDragStart:()=>{at.current=n.id},onDragOver:i=>i.preventDefault(),onDrop:i=>{i.preventDefault();const f=at.current;at.current=null,!(!f||f===n.id)&&$(w=>{const k=w.findIndex(J=>J.id===f),_=w.findIndex(J=>J.id===n.id);if(k<0||_<0)return w;const U=[...w],[X]=U.splice(k,1);return U.splice(_,0,X),W("term:reorder",{ids:U.filter(J=>!J.kind).map(J=>J.id)}).catch(()=>{}),U})},onClick:()=>p(n.id),onDoubleClick:()=>{var f;if(n.kind)return;const i=(f=window.prompt("页签名称",n.title))==null?void 0:f.trim();i&&W("term:rename",{id:n.id,title:i}).then(()=>$(w=>w.map(k=>k.id===n.id?{...k,title:i}:k))).catch(()=>{})},children:[e.jsx("span",{children:n.title}),n.kind!=="webapp"&&e.jsx("button",{tabIndex:-1,onClick:i=>{i.stopPropagation(),lr(n.id)},children:"×"})]},n.id))}),e.jsx("button",{className:"terminal-add","aria-label":"新建终端页签",hidden:!!a,disabled:A.length>=8,onClick:R,children:"+"}),e.jsxs("div",{className:"terminal-connection",children:[e.jsx(Fr,{iconOnly:!xe()}),e.jsx(Br,{sortingDisabled:!ue.loaded||ue.saving,onReorder:(n,i)=>{const f=ue.settings.visibleTools;return ue.setVisibleTools(Po(f,n,i))},avatar:e.jsx(Co,{username:((Vt=t.user)==null?void 0:Vt.username)??"?",connected:O.connected,accent:ee.keybar.accent,accentText:ee.keybar.accentText,selectedPageId:a==null?void 0:a.id,onSelectPage:h,onUpdatePage:S,configuration:ue,csrfToken:t.csrfToken}),items:[{id:"refresh",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"刷新页面",title:"刷新页面",onClick:()=>a?u(n=>n+1):window.location.reload(),children:e.jsx(ye,{size:17,"aria-hidden":"true"})})},{id:"dashboard",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开进行中的 Agent 会话",title:"进行中的 Agent 会话",onClick:()=>{s(null),$(Mn),p(Qe.id)},children:e.jsx(Hn,{size:17,"aria-hidden":"true"})})},{id:"collaboration",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开群聊列表",title:"群聊列表",onClick:()=>{s(null),$(Dn),p(_e.id)},children:e.jsx(vt,{size:17,"aria-hidden":"true"})})},{id:"install",content:e.jsx(bo,{})},{id:"remote",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开远程桌面",title:"远程桌面 · 浏览器直播",onClick:()=>{s(null),ur()},children:e.jsx(dt,{size:17,"aria-hidden":"true"})})},{id:"ai-hub",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开 AI Hub",title:"AI Hub · 多模型对比",onClick:()=>{s(null),cr()},children:e.jsx($n,{size:17,"aria-hidden":"true"})})},{id:"flow",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开数字人",title:"数字人 · Flow Studio",onClick:()=>{s(null),dr()},children:e.jsx(kt,{size:17,"aria-hidden":"true"})})},{id:"theme",content:e.jsx(Go,{themeId:Ee,onThemeChange:It})},{id:"files",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":le?"关闭我的文件":"打开我的文件",title:"我的文件","aria-expanded":le,onClick:()=>{s(null),ce(n=>!n)},children:e.jsx(Zr,{size:17,"aria-hidden":"true"})})},{id:"calendar",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开智能体日历",title:"日历 · 定时任务与待办",onClick:()=>{s(null),pr()},children:e.jsx(qn,{size:17,"aria-hidden":"true"})})}].filter(n=>ue.settings.visibleTools.some(i=>i===n.id)).sort((n,i)=>ue.settings.visibleTools.findIndex(f=>f===n.id)-ue.settings.visibleTools.findIndex(f=>f===i.id))})]})]}),e.jsxs("main",{className:`workspace ${le?"show-tree":""} ${de?"has-preview":""}`,hidden:!!a,style:se.workspace,children:[e.jsx("section",{className:"term-col",style:se.termCol,onPointerDownCapture:n=>{n.pointerType!=="touch"||!hr(n.target)||(pe(),Se.current={x:n.clientX,y:n.clientY,axis:"pending",pointerId:n.pointerId})},onPointerMoveCapture:n=>{const i=Se.current;if(!i||n.pointerId!==i.pointerId||n.pointerType!=="touch")return;const f=n.clientX-i.x,w=n.clientY-i.y;if(i.axis==="pending"){if(Math.max(Math.abs(f),Math.abs(w))<=8)return;if(Math.abs(w)>=Math.abs(f)*1.2){Se.current=null;return}i.axis="horizontal",it(!0);const k=_=>{window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),Se.current===i&&pe()};window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k)}i.axis==="horizontal"&&(n.preventDefault(),ot(f))},onPointerUpCapture:n=>{const i=Se.current;if(!i||n.pointerId!==i.pointerId)return;const f=n.clientX-i.x;i.axis==="horizontal"&&Math.abs(f)>=64?st(f):pe()},onPointerCancelCapture:pe,children:e.jsx("div",{ref:l,className:"terminal-track",style:{transform:`translate3d(calc(${-Ut*100}% + ${or}px),0,0)`,transition:ir?"none":"transform 260ms cubic-bezier(.22,.8,.32,1)"},children:A.map(n=>e.jsx("div",{className:"terminal-slide","data-console-tab":n.id,style:{position:"relative"},children:e.jsx(ti,{active:n.kind==="webapp"||!n.kind||n.id===P,children:n.kind==="webapp"?e.jsx("iframe",{ref:g,className:"webapp-frame",src:Ge("/app/"),title:n.title,onLoad:re}):n.kind==="session-dashboard"?e.jsx(ct,{view:"sessions",title:"会话 Dashboard",onFrame:i=>{y.current=i},onLoad:re}):n.kind==="collaboration-dashboard"?e.jsx(ct,{title:"群聊列表",onFrame:i=>{c.current=i},onLoad:re}):n.kind==="collaboration"?e.jsx(ct,{groupId:n.groupId||"",discussionId:n.discussionId,title:n.title,onFrame:i=>{i?x.current.set(n.id,i):x.current.delete(n.id)},onLoad:re},`${n.id}-${n.discussionId??""}-${m[n.groupId||""]||0}`):n.kind==="remote-desktop"?e.jsxs("div",{style:{height:"100%",background:"var(--ui-term-col-bg, #101014)"},"aria-busy":!te,children:[e.jsx("iframe",{ref:j,className:"webapp-frame",style:{visibility:te?"visible":"hidden"},src:Ge("/app/?view=remote-desktop"),title:"远程桌面",onLoad:re}),!te&&e.jsx(Ze,{label:"REMOTE DESKTOP",title:"正在打开远程桌面",caption:"正在准备桌面与连接",icon:e.jsx(dt,{size:36,strokeWidth:1.5})})]}):n.kind==="calendar"?e.jsx("iframe",{className:"webapp-frame",src:Ge("/app/?view=calendar"),title:"智能体日历",onLoad:re}):n.kind==="aihub"?e.jsx(si,{visible:n.id===P,rpc:W}):n.kind==="flowstudio"?e.jsx(li,{visible:n.id===P}):e.jsx(oi,{terminalId:n.id,title:n.title,initialCommand:n.initialCommand,visible:n.id===P,state:O,rpc:W,onEvent:Q,onTerminalData:G,onTerminalReset:H,sendTerminalInput:ie,keyOrder:nt,keybarHidden:tt,onKeyOrderChange:Lt,onKeybarHiddenChange:Rt,terminalTheme:ee,initialScrollLine:Re[n.id]??null,onScrollLineChange:i=>et(f=>f[n.id]===i?f:{...f,[n.id]:i}),onRegisterFill:i=>Jn(n.id,i),onCwdChange:i=>i&&z(f=>({...f,[n.id]:i}))})})},n.id))})}),le&&e.jsx("div",{className:"drawer-mask",onClick:()=>ce(!1)}),e.jsxs("aside",{className:`tree-col ${le?"tree-col-open":""}`,style:se.treeCol,children:[e.jsxs("div",{className:"tree-head",style:se.treeHead,children:[e.jsx("button",{className:he==="files"?"drawer-tab-active":"",onClick:()=>He("files"),children:"文件"}),e.jsx("button",{className:he==="history"?"drawer-tab-active":"",onClick:()=>He("history"),children:"历史"}),e.jsx("span",{className:"tree-cwd",style:se.treeCwd,children:Ft??""}),e.jsx("button",{style:{...se.iconBtn,marginLeft:"auto",flexShrink:0},onClick:()=>ce(!1),"aria-label":"close drawer",children:e.jsx(Te,{size:15,"aria-hidden":"true"})})]}),he==="files"?e.jsx(ii,{ready:Y>0,followCwd:!0,cwd:Ft,gateway:fe,onOpenFile:ar,selectedPath:de??(qe==null?void 0:qe.path)??null,initialRoot:Le,initialFollow:Pe,revealRequest:qe,onTreeStateChange:(n,i)=>{Ct(n),Tt(i)}}):e.jsx(Yo,{csrfToken:t.csrfToken,terminalId:((Yt=A.find(n=>n.id===P))==null?void 0:Yt.kind)==="webapp"?null:P,pinnedCommands:rt,onPinnedCommandsChange:Pt,onFill:Qn,onExecute:sr}),e.jsxs("div",{className:"tree-foot",style:se.treeFoot,children:[e.jsx("span",{style:se.treeFootDot}),e.jsx("span",{children:"实时同步"})]})]}),de&&e.jsx("section",{className:"preview-col",style:se.previewCol,children:e.jsx(ai,{path:de,gateway:fe,onClose:()=>Ue(null)})})]}),a&&e.jsx(Lo,{page:a,reloadKey:d},a.id)]})}const se={root:{height:"100dvh",display:"flex",flexDirection:"column",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif',overflow:"hidden"},iconBtn:{minWidth:28,height:28,borderRadius:7,border:"1px solid var(--ui-tabbar-border, #303442)",background:"var(--ui-tab-bg, #202029)",color:"var(--ui-tab-text, #aaaab8)",fontSize:13},workspace:{flex:1,minHeight:0,display:"grid",position:"relative"},treeCol:{background:"var(--ui-tree-bg, #121218)",minHeight:0,flexDirection:"column"},treeHead:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px 4px",fontSize:11,textTransform:"uppercase",letterSpacing:1,color:"#778",flexShrink:0},treeCwd:{fontSize:10,color:"#556",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:150,textTransform:"none",letterSpacing:0},treeFoot:{display:"flex",alignItems:"center",gap:7,minHeight:31,padding:"6px 11px calc(env(safe-area-inset-bottom) + 6px)",borderTop:"1px solid var(--ui-tabbar-border, #282832)",boxShadow:"0 -5px 16px rgba(0,0,0,.22)",background:"var(--ui-tab-bg, #15151c)",color:"var(--ui-connection-text, #777789)",fontSize:10.5,flexShrink:0},treeFootDot:{width:6,height:6,borderRadius:99,background:"var(--ui-success, #9ece6a)",boxShadow:"0 0 0 2px color-mix(in srgb, var(--ui-success, #9ece6a) 12%, transparent)",flexShrink:0},termCol:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",background:"var(--ui-term-col-bg, #101014)",gridColumn:1,overflow:"hidden"},previewCol:{minWidth:0,minHeight:0}},Ti=Object.freeze(Object.defineProperty({__proto__:null,default:di},Symbol.toStringTag,{value:"Module"}));export{Ze as F,Ti as p};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-C30NoLsn.js";/**
1
+ import{c as e}from"./index-CpGyXlyq.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{g as l,r as m,d as a}from"./chunk-SVP7TREG-BeWH1pvB.js";import{p}from"./chunk-JWPE2WC7-By3kXE4y.js";import{_ as t,l as o}from"./mermaid.core-D6eHnLLU.js";import{M as u,d as c}from"./cynefin-OW5HDTMX-BesIxLGS.js";import"./index-C30NoLsn.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},G={parser:b,db:a,renderer:m,styles:l};export{G as diagram};
1
+ import{g as l,r as m,d as a}from"./chunk-SVP7TREG-XwWHVyss.js";import{p}from"./chunk-JWPE2WC7-CBQw1xgF.js";import{_ as t,l as o}from"./mermaid.core-DPgekxsA.js";import{M as u,d as c}from"./cynefin-OW5HDTMX-CM8PeVI5.js";import"./index-CpGyXlyq.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},G={parser:b,db:a,renderer:m,styles:l};export{G as diagram};
@@ -1,4 +1,4 @@
1
- import{p as rt}from"./chunk-JWPE2WC7-By3kXE4y.js";import{L as T,O as P,b3 as nt,g as it,s as st,a as ot,b as lt,q as ct,p as ut,_ as d,l as B,c as gt,D as dt,G as pt,a2 as ht,d as ft,r as mt,E as vt}from"./mermaid.core-D6eHnLLU.js";import{p as xt}from"./cynefin-OW5HDTMX-BesIxLGS.js";import{d as J}from"./arc-CLpaLEla.js";import{o as St}from"./ordinal-BENe2yWM.js";import"./index-C30NoLsn.js";import"./init-Gi6I4Gst.js";function yt(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function wt(t){return t}function At(){var t=wt,n=yt,y=null,b=T(0),l=T(P),p=T(0);function i(e){var r,o=(e=nt(e)).length,h,w,$=0,f=new Array(o),s=new Array(o),D=+b.apply(this,arguments),z=Math.min(P,Math.max(-P,l.apply(this,arguments)-D)),k,R=Math.min(Math.abs(z)/o,p.apply(this,arguments)),u=R*(z<0?-1:1),A;for(r=0;r<o;++r)(A=s[f[r]=r]=+t(e[r],r,e))>0&&($+=A);for(n!=null?f.sort(function(M,m){return n(s[M],s[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(z-o*u)/$:0;r<o;++r,D=k)h=f[r],A=s[h],k=D+(A>0?A*w:0)+u,s[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:R};return s}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var Ct=vt.pie,I={sections:new Map,showData:!1},_=I.sections,V=I.showData,$t=structuredClone(Ct),Dt=d(()=>structuredClone($t),"getConfig"),Tt=d(()=>{_=new Map,V=I.showData,mt()},"clear"),bt=d(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);_.has(t)||(_.set(t,n),B.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),kt=d(()=>_,"getSections"),Et=d(t=>{V=t},"setShowData"),zt=d(()=>V,"getShowData"),K={getConfig:Dt,clear:Tt,setDiagramTitle:ut,getDiagramTitle:ct,setAccTitle:lt,getAccTitle:ot,setAccDescription:st,getAccDescription:it,addSection:bt,getSections:kt,setShowData:Et,getShowData:zt},Mt=d((t,n)=>{rt(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Lt={parse:d(async t=>{const n=await xt("pie",t);B.debug(n),Mt(n,K)},"parse")},Rt=d(t=>`
1
+ import{p as rt}from"./chunk-JWPE2WC7-CBQw1xgF.js";import{L as T,O as P,b3 as nt,g as it,s as st,a as ot,b as lt,q as ct,p as ut,_ as d,l as B,c as gt,D as dt,G as pt,a2 as ht,d as ft,r as mt,E as vt}from"./mermaid.core-DPgekxsA.js";import{p as xt}from"./cynefin-OW5HDTMX-CM8PeVI5.js";import{d as J}from"./arc-CWNpomsA.js";import{o as St}from"./ordinal-BENe2yWM.js";import"./index-CpGyXlyq.js";import"./init-Gi6I4Gst.js";function yt(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function wt(t){return t}function At(){var t=wt,n=yt,y=null,b=T(0),l=T(P),p=T(0);function i(e){var r,o=(e=nt(e)).length,h,w,$=0,f=new Array(o),s=new Array(o),D=+b.apply(this,arguments),z=Math.min(P,Math.max(-P,l.apply(this,arguments)-D)),k,R=Math.min(Math.abs(z)/o,p.apply(this,arguments)),u=R*(z<0?-1:1),A;for(r=0;r<o;++r)(A=s[f[r]=r]=+t(e[r],r,e))>0&&($+=A);for(n!=null?f.sort(function(M,m){return n(s[M],s[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(z-o*u)/$:0;r<o;++r,D=k)h=f[r],A=s[h],k=D+(A>0?A*w:0)+u,s[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:R};return s}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var Ct=vt.pie,I={sections:new Map,showData:!1},_=I.sections,V=I.showData,$t=structuredClone(Ct),Dt=d(()=>structuredClone($t),"getConfig"),Tt=d(()=>{_=new Map,V=I.showData,mt()},"clear"),bt=d(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);_.has(t)||(_.set(t,n),B.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),kt=d(()=>_,"getSections"),Et=d(t=>{V=t},"setShowData"),zt=d(()=>V,"getShowData"),K={getConfig:Dt,clear:Tt,setDiagramTitle:ut,getDiagramTitle:ct,setAccTitle:lt,getAccTitle:ot,setAccDescription:st,getAccDescription:it,addSection:bt,getSections:kt,setShowData:Et,getShowData:zt},Mt=d((t,n)=>{rt(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Lt={parse:d(async t=>{const n=await xt("pie",t);B.debug(n),Mt(n,K)},"parse")},Rt=d(t=>`
2
2
  .pieCircle{
3
3
  stroke: ${t.pieStrokeColor};
4
4
  stroke-width : ${t.pieStrokeWidth};
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-C30NoLsn.js";/**
1
+ import{c as a}from"./index-CpGyXlyq.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{s as Ae,g as ke,q as ae,p as Fe,a as Pe,b as ve,_ as o,c as wt,l as At,j as zt,d as Ce,r as Le,E as z,i as Ee,X as De}from"./mermaid.core-D6eHnLLU.js";import{l as ie}from"./linear-DQek-QDQ.js";import"./index-C30NoLsn.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Vt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,15,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],k=[2,36],d=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],x=[1,41],_=[1,45],Y=[1,14],G=[1,23],yt=[1,18],Tt=[1,19],dt=[1,20],Ft=[1,21],ut=[1,22],xt=[1,24],ft=[1,25],gt=[1,26],i=[1,27],Bt=[1,28],Rt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],X=[1,63],H=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Xt=[1,71],Ht=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,91],$=[1,92],tt=[1,93],et=[1,100],it=[1,94],at=[1,97],nt=[1,95],st=[1,96],rt=[1,98],ot=[1,99],Pt=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,g,f,A,e,pt){var s=e.length-1;switch(A){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:q,12:m,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:c,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:T,10:q,12:m,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:d,5:T,10:q,12:m,13:b,14:x,15:_,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:d,5:T,10:q,12:m,13:b,14:x,15:_,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,102]},t(a,[2,29],{10:Pt}),t(Zt,[2,27],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:89,16:90,23:105,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:106},t(N,[2,26]),t(a,[2,50],{10:Pt}),t(Zt,[2,28],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],A=[null],e=[],pt=this.table,s="",mt=0,Jt=0,me=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);D.setInput(r,K.yy),K.yy.lexer=D,K.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Lt=D.yylloc;e.push(Lt);var Se=D.options&&D.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){g.length=g.length-2*R,A.length=A.length-R,e.length=e.length-R}o(_e,"popStack");function te(){var R;return R=f.pop()||D.lex()||$t,typeof R!="number"&&(R instanceof Array&&(f=R,R=f.pop()),R=l.symbols_[R]||R),R}o(te,"lex");for(var B,Z,W,Et,lt={},bt,M,ee,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?W=this.defaultActions[Z]:((B===null||typeof B>"u")&&(B=te()),W=pt[Z]&&pt[Z][B]),typeof W>"u"||!W.length||!W[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>me&&St.push("'"+this.terminals_[bt]+"'");D.showPosition?Dt="Parse error on line "+(mt+1)+`:
1
+ import{s as Ae,g as ke,q as ae,p as Fe,a as Pe,b as ve,_ as o,c as wt,l as At,j as zt,d as Ce,r as Le,E as z,i as Ee,X as De}from"./mermaid.core-DPgekxsA.js";import{l as ie}from"./linear-CpgQ-vzl.js";import"./index-CpGyXlyq.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Vt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,15,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],k=[2,36],d=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],x=[1,41],_=[1,45],Y=[1,14],G=[1,23],yt=[1,18],Tt=[1,19],dt=[1,20],Ft=[1,21],ut=[1,22],xt=[1,24],ft=[1,25],gt=[1,26],i=[1,27],Bt=[1,28],Rt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],X=[1,63],H=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Xt=[1,71],Ht=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,91],$=[1,92],tt=[1,93],et=[1,100],it=[1,94],at=[1,97],nt=[1,95],st=[1,96],rt=[1,98],ot=[1,99],Pt=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,g,f,A,e,pt){var s=e.length-1;switch(A){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:q,12:m,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:c,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:T,10:q,12:m,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:d,5:T,10:q,12:m,13:b,14:x,15:_,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:d,5:T,10:q,12:m,13:b,14:x,15:_,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,102]},t(a,[2,29],{10:Pt}),t(Zt,[2,27],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:89,16:90,23:105,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:106},t(N,[2,26]),t(a,[2,50],{10:Pt}),t(Zt,[2,28],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],A=[null],e=[],pt=this.table,s="",mt=0,Jt=0,me=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);D.setInput(r,K.yy),K.yy.lexer=D,K.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Lt=D.yylloc;e.push(Lt);var Se=D.options&&D.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){g.length=g.length-2*R,A.length=A.length-R,e.length=e.length-R}o(_e,"popStack");function te(){var R;return R=f.pop()||D.lex()||$t,typeof R!="number"&&(R instanceof Array&&(f=R,R=f.pop()),R=l.symbols_[R]||R),R}o(te,"lex");for(var B,Z,W,Et,lt={},bt,M,ee,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?W=this.defaultActions[Z]:((B===null||typeof B>"u")&&(B=te()),W=pt[Z]&&pt[Z][B]),typeof W>"u"||!W.length||!W[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>me&&St.push("'"+this.terminals_[bt]+"'");D.showPosition?Dt="Parse error on line "+(mt+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+St.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Dt="Parse error on line "+(mt+1)+": Unexpected "+(B==$t?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Dt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Lt,expected:St})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+B);switch(W[0]){case 1:g.push(B),A.push(D.yytext),e.push(D.yylloc),g.push(W[1]),B=null,Jt=D.yyleng,s=D.yytext,mt=D.yylineno,Lt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],lt.$=A[A.length-M],lt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Se&&(lt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Et=this.performAction.apply(lt,[s,Jt,mt,K.yy,W[1],A,e].concat(be)),typeof Et<"u")return Et;M&&(g=g.slice(0,-1*M*2),A=A.slice(0,-1*M),e=e.slice(0,-1*M)),g.push(this.productions_[W[1]][0]),A.push(lt.$),e.push(lt._$),ee=pt[g[g.length-2]][g[g.length-1]],g.push(ee);break;case 3:return!0}}return!0},"parse")},qe=function(){var j={EOF:1,parseError:o(function(l,g){if(this.yy.parser)this.yy.parser.parseError(l,g);else throw new Error(l)},"parseError"),setInput:o(function(r,l){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={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:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);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},"input"),unput:o(function(r){var l=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var f=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),g.length-1&&(this.yylineno-=g.length-1);var A=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:g?(g.length===f.length?this.yylloc.first_column:0)+f[f.length-g.length].length-g[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(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:o(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:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{g as s,r as l,d as t}from"./chunk-SVP7TREG-BeWH1pvB.js";import{p as m}from"./chunk-JWPE2WC7-By3kXE4y.js";import{_ as n,l as i}from"./mermaid.core-D6eHnLLU.js";import{M as p,c as u}from"./cynefin-OW5HDTMX-BesIxLGS.js";import"./index-C30NoLsn.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},x={parser:y,db:t,renderer:l,styles:s};export{x as diagram};
1
+ import{g as s,r as l,d as t}from"./chunk-SVP7TREG-XwWHVyss.js";import{p as m}from"./chunk-JWPE2WC7-CBQw1xgF.js";import{_ as n,l as i}from"./mermaid.core-DPgekxsA.js";import{M as p,c as u}from"./cynefin-OW5HDTMX-CM8PeVI5.js";import"./index-CpGyXlyq.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},x={parser:y,db:t,renderer:l,styles:s};export{x as diagram};
@@ -1,4 +1,4 @@
1
- import{g as Ge}from"./chunk-XXDRQBXY-B7CKqUBs.js";import{s as Xe}from"./chunk-POPQ4Y6H-BTHuMHN1.js";import{_ as d,A as Be,b as Je,a as Ze,s as et,g as tt,p as st,q as it,c as Ne,l as qe,r as rt,v as nt,x as at,y as lt,z as ct}from"./mermaid.core-D6eHnLLU.js";import"./index-C30NoLsn.js";var Ce=function(){var e=d(function($,i,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],o=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],p=[2,7],y=[1,26],f=[1,27],m=[1,28],k=[1,29],C=[1,33],V=[1,34],A=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],_=[1,39],S=[1,40],g=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ve=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ae=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],we=[1,75],De=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],N=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:d(function(i,n,l,s,R,t,de){var a=t.length-1;switch(R){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:o},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:o},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:o},{1:[2,2]},{4:17,5:E,7:13,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:43,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:44,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:45,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:46,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:47,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:48,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:49,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:50,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),{30:60,33:62,75:P,89:_,90:S},{30:63,33:62,75:P,89:_,90:S},{30:64,33:62,75:P,89:_,90:S},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ve,[2,81]),e(Ve,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{62:77,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{30:78,33:62,75:P,89:_,90:S},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:_,90:S},{5:[1,95]},{30:96,33:62,75:P,89:_,90:S},{5:[1,97]},{30:98,33:62,75:P,89:_,90:S},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(g,[2,59],{76:U}),e(g,[2,64],{76:Me}),{33:103,75:[1,102],89:_,90:S},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(N,[2,67]),e(N,[2,69]),e(N,[2,70]),e(N,[2,71]),e(N,[2,72]),e(N,[2,73]),e(N,[2,74]),e(N,[2,75]),e(N,[2,76]),e(N,[2,77]),e(N,[2,78]),e(g,[2,57],{76:Me}),e(g,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:_,90:S},{33:120,89:_,90:S},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(N,[2,68]),e(g,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(g,[2,28]),{5:[1,127]},e(g,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(g,[2,47]),{5:[1,131]},e(g,[2,48]),e(g,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:_,90:S},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(g,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(g,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(g,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(g,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,44]),e(g,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:d(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:d(function(i){var n=this,l=[0],s=[],R=[null],t=[],de=this.table,a="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),b=Object.create(this.lexer),z={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(z.yy[be]=this.yy[be]);b.setInput(i,z.yy),z.yy.lexer=b,z.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Ie=b.yylloc;t.push(Ie);var je=b.options&&b.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ze(T){l.length=l.length-2*T,R.length=R.length-T,t.length=t.length-T}d(ze,"popStack");function Ue(){var T;return T=s.pop()||b.lex()||Pe,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=n.symbols_[T]||T),T}d(Ue,"lex");for(var I,G,q,Te,J={},ye,F,Ye,_e;;){if(G=l[l.length-1],this.defaultActions[G]?q=this.defaultActions[G]:((I===null||typeof I>"u")&&(I=Ue()),q=de[G]&&de[G][I]),typeof q>"u"||!q.length||!q[0]){var ke="";_e=[];for(ye in de[G])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");b.showPosition?ke="Parse error on line "+(ge+1)+`:
1
+ import{g as Ge}from"./chunk-XXDRQBXY-C4ccrA1p.js";import{s as Xe}from"./chunk-POPQ4Y6H-Bun3CGx_.js";import{_ as d,A as Be,b as Je,a as Ze,s as et,g as tt,p as st,q as it,c as Ne,l as qe,r as rt,v as nt,x as at,y as lt,z as ct}from"./mermaid.core-DPgekxsA.js";import"./index-CpGyXlyq.js";var Ce=function(){var e=d(function($,i,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],o=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],p=[2,7],y=[1,26],f=[1,27],m=[1,28],k=[1,29],C=[1,33],V=[1,34],A=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],_=[1,39],S=[1,40],g=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ve=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ae=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],we=[1,75],De=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],N=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:d(function(i,n,l,s,R,t,de){var a=t.length-1;switch(R){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:o},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:o},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:o},{1:[2,2]},{4:17,5:E,7:13,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:43,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:44,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:45,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:46,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:47,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:48,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:49,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:50,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),{30:60,33:62,75:P,89:_,90:S},{30:63,33:62,75:P,89:_,90:S},{30:64,33:62,75:P,89:_,90:S},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ve,[2,81]),e(Ve,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{62:77,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{30:78,33:62,75:P,89:_,90:S},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:_,90:S},{5:[1,95]},{30:96,33:62,75:P,89:_,90:S},{5:[1,97]},{30:98,33:62,75:P,89:_,90:S},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(g,[2,59],{76:U}),e(g,[2,64],{76:Me}),{33:103,75:[1,102],89:_,90:S},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(N,[2,67]),e(N,[2,69]),e(N,[2,70]),e(N,[2,71]),e(N,[2,72]),e(N,[2,73]),e(N,[2,74]),e(N,[2,75]),e(N,[2,76]),e(N,[2,77]),e(N,[2,78]),e(g,[2,57],{76:Me}),e(g,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:_,90:S},{33:120,89:_,90:S},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(N,[2,68]),e(g,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(g,[2,28]),{5:[1,127]},e(g,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(g,[2,47]),{5:[1,131]},e(g,[2,48]),e(g,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:_,90:S},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(g,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(g,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(g,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(g,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,44]),e(g,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:d(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:d(function(i){var n=this,l=[0],s=[],R=[null],t=[],de=this.table,a="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),b=Object.create(this.lexer),z={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(z.yy[be]=this.yy[be]);b.setInput(i,z.yy),z.yy.lexer=b,z.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Ie=b.yylloc;t.push(Ie);var je=b.options&&b.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ze(T){l.length=l.length-2*T,R.length=R.length-T,t.length=t.length-T}d(ze,"popStack");function Ue(){var T;return T=s.pop()||b.lex()||Pe,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=n.symbols_[T]||T),T}d(Ue,"lex");for(var I,G,q,Te,J={},ye,F,Ye,_e;;){if(G=l[l.length-1],this.defaultActions[G]?q=this.defaultActions[G]:((I===null||typeof I>"u")&&(I=Ue()),q=de[G]&&de[G][I]),typeof q>"u"||!q.length||!q[0]){var ke="";_e=[];for(ye in de[G])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");b.showPosition?ke="Parse error on line "+(ge+1)+`:
2
2
  `+b.showPosition()+`
3
3
  Expecting `+_e.join(", ")+", got '"+(this.terminals_[I]||I)+"'":ke="Parse error on line "+(ge+1)+": Unexpected "+(I==Pe?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(ke,{text:b.match,token:this.terminals_[I]||I,line:b.yylineno,loc:Ie,expected:_e})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+I);switch(q[0]){case 1:l.push(I),R.push(b.yytext),t.push(b.yylloc),l.push(q[1]),I=null,$e=b.yyleng,a=b.yytext,ge=b.yylineno,Ie=b.yylloc;break;case 2:if(F=this.productions_[q[1]][1],J.$=R[R.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},je&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(J,[a,$e,ge,z.yy,q[1],R,t].concat(We)),typeof Te<"u")return Te;F&&(l=l.slice(0,-1*F*2),R=R.slice(0,-1*F),t=t.slice(0,-1*F)),l.push(this.productions_[q[1]][0]),R.push(J.$),t.push(J._$),Ye=de[l[l.length-2]][l[l.length-1]],l.push(Ye);break;case 3:return!0}}return!0},"parse")},He=function(){var $={EOF:1,parseError:d(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:d(function(i,n){return this.yy=n||this.yy||{},this._input=i,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:d(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:d(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var s=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),l.length-1&&(this.yylineno-=l.length-1);var R=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:l?(l.length===s.length?this.yylloc.first_column:0)+s[s.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(i){this.unput(this.match.slice(i))},"less"),pastInput:d(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{c as t}from"./index-C30NoLsn.js";/**
1
+ import{c as t}from"./index-CpGyXlyq.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as t}from"./index-C30NoLsn.js";/**
1
+ import{c as t}from"./index-CpGyXlyq.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{p as xt,q as _t,s as vt,g as bt,b as St,a as wt,_ as d,c as lt,b7 as Lt,j as H,af as Et,r as At,k as Tt}from"./mermaid.core-D6eHnLLU.js";import{o as Mt}from"./ordinal-BENe2yWM.js";import"./index-C30NoLsn.js";import"./init-Gi6I4Gst.js";function Nt(t){for(var n=t.length/6|0,s=new Array(n),a=0;a<n;)s[a]="#"+t.slice(a*6,++a*6);return s}const Ct=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function pt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,n){return n-1-t.height}function kt(t,n){return t.sourceLinks.length?t.depth:n-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,n){return Q(t.source,n.source)||t.index-n.index}function ht(t,n){return Q(t.target,n.target)||t.index-n.index}function Q(t,n){return t.y0-n.y0}function it(t){return t.value}function jt(t){return t.index}function Dt(t){return t.nodes}function zt(t){return t.links}function ft(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function yt({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Bt(){let t=0,n=0,s=1,a=1,u=24,y=8,p,m=jt,o=kt,l,h,x=Dt,_=zt,g=6;function v(){const i={nodes:x.apply(null,arguments),links:_.apply(null,arguments)};return T(i),A(i),M(i),I(i),S(i),yt(i),i}v.update=function(i){return yt(i),i},v.nodeId=function(i){return arguments.length?(m=typeof i=="function"?i:X(i),v):m},v.nodeAlign=function(i){return arguments.length?(o=typeof i=="function"?i:X(i),v):o},v.nodeSort=function(i){return arguments.length?(l=i,v):l},v.nodeWidth=function(i){return arguments.length?(u=+i,v):u},v.nodePadding=function(i){return arguments.length?(y=p=+i,v):y},v.nodes=function(i){return arguments.length?(x=typeof i=="function"?i:X(i),v):x},v.links=function(i){return arguments.length?(_=typeof i=="function"?i:X(i),v):_},v.linkSort=function(i){return arguments.length?(h=i,v):h},v.size=function(i){return arguments.length?(t=n=0,s=+i[0],a=+i[1],v):[s-t,a-n]},v.extent=function(i){return arguments.length?(t=+i[0][0],s=+i[1][0],n=+i[0][1],a=+i[1][1],v):[[t,n],[s,a]]},v.iterations=function(i){return arguments.length?(g=+i,v):g};function T({nodes:i,links:f}){for(const[e,r]of i.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(i.map((e,r)=>[m(e,r,i),e]));for(const[e,r]of f.entries()){r.index=e;let{source:k,target:b}=r;typeof k!="object"&&(k=r.source=ft(c,k)),typeof b!="object"&&(b=r.target=ft(c,b)),k.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of i)e.sort(h),r.sort(h)}function A({nodes:i}){for(const f of i)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.depth=r;for(const{target:b}of k.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.height=r;for(const{source:b}of k.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:i}){const f=ct(i,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of i){const k=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=k,r.x0=t+k*c,r.x1=r.x0+u,e[k]?e[k].push(r):e[k]=[r]}if(l)for(const r of e)r.sort(l);return e}function j(i){const f=pt(i,c=>(a-n-(c.length-1)*p)/nt(c,it));for(const c of i){let e=n;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}e=(a-e+p)/(c.length+1);for(let r=0;r<c.length;++r){const k=c[r];k.y0+=e*(r+1),k.y1+=e*(r+1)}w(c)}}function S(i){const f=N(i);p=Math.min(y,(a-n)/(ct(f,c=>c.length)-1)),j(f);for(let c=0;c<g;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/g);R(f,e,r),C(f,e,r)}}function C(i,f,c){for(let e=1,r=i.length;e<r;++e){const k=i[e];for(const b of k){let L=0,B=0;for(const{source:Y,value:et}of b.targetLinks){let q=et*(b.layer-Y.layer);L+=P(Y,b)*q,B+=q}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(Q),D(k,c)}}function R(i,f,c){for(let e=i.length,r=e-2;r>=0;--r){const k=i[r];for(const b of k){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let q=et*(Y.layer-b.layer);L+=E(b,Y)*q,B+=q}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(Q),D(k,c)}}function D(i,f){const c=i.length>>1,e=i[c];O(i,e.y0-p,c-1,f),V(i,e.y1+p,c+1,f),O(i,a,i.length-1,f),V(i,n,0,f)}function V(i,f,c,e){for(;c<i.length;++c){const r=i[c],k=(f-r.y0)*e;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function O(i,f,c,e){for(;c>=0;--c){const r=i[c],k=(r.y1-f)*e;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function z({sourceLinks:i,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of i)c.sort(ut)}}function w(i){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of i)f.sort(ht),c.sort(ut)}function P(i,f){let c=i.y0-(i.sourceLinks.length-1)*p/2;for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c+=r+p}for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c-=r}return c}function E(i,f){let c=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c+=r+p}for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function mt(){return new ot}ot.prototype=mt.prototype={constructor:ot,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,y){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+y)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var y=this._x1,p=this._y1,m=s-t,o=a-n,l=y-t,h=p-n,x=l*l+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(x>F)if(!(Math.abs(h*m-o*l)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var _=s-y,g=a-p,v=m*m+o*o,T=_*_+g*g,A=Math.sqrt(v),M=Math.sqrt(x),I=u*Math.tan((rt-Math.acos((v+x-T)/(2*A*M)))/2),N=I/M,j=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*l)+","+(n+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>l*g)+","+(this._x1=t+j*m)+","+(this._y1=n+j*o)}},arc:function(t,n,s,a,u,y){t=+t,n=+n,s=+s,y=!!y;var p=s*Math.cos(a),m=s*Math.sin(a),o=t+p,l=n+m,h=1^y,x=y?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+l:(Math.abs(this._x1-o)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+o+","+l),s&&(x<0&&(x=x%st+st),x>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-p)+","+(n-m)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=l):x>F&&(this._+="A"+s+","+s+",0,"+ +(x>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Rt(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var n=Gt,s=Ut,a=Rt,u=Vt,y=null;function p(){var m,o=Wt.call(arguments),l=n.apply(this,o),h=s.apply(this,o);if(y||(y=m=mt()),t(y,+a.apply(this,(o[0]=l,o)),+u.apply(this,o),+a.apply(this,(o[0]=h,o)),+u.apply(this,o)),m)return y=null,m+""||null}return p.source=function(m){return arguments.length?(n=m,p):n},p.target=function(m){return arguments.length?(s=m,p):s},p.x=function(m){return arguments.length?(a=typeof m=="function"?m:dt(+m),p):a},p.y=function(m){return arguments.length?(u=typeof m=="function"?m:dt(+m),p):u},p.context=function(m){return arguments.length?(y=m??null,p):y},p}function qt(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=d(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:d(function(o,l,h,x,_,g,v){var T=g.length-1;switch(_){case 7:const A=x.findOrCreateNode(g[T-4].trim().replaceAll('""','"')),M=x.findOrCreateNode(g[T-2].trim().replaceAll('""','"')),I=parseFloat(g[T].trim());x.addLink(A,M,I);break;case 8:case 9:case 11:this.$=g[T];break;case 10:this.$=g[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:d(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:d(function(o){var l=this,h=[0],x=[],_=[null],g=[],v=this.table,T="",A=0,M=0,I=2,N=1,j=g.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(C.yy[R]=this.yy[R]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;g.push(D);var V=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,g.length=g.length-L}d(O,"popStack");function z(){var L;return L=x.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=l.symbols_[L]||L),L}d(z,"lex");for(var w,P,E,i,f={},c,e,r,k;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=z()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";k=[];for(c in v[P])this.terminals_[c]&&c>I&&k.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`:
1
+ import{p as xt,q as _t,s as vt,g as bt,b as St,a as wt,_ as d,c as lt,b7 as Lt,j as H,af as Et,r as At,k as Tt}from"./mermaid.core-DPgekxsA.js";import{o as Mt}from"./ordinal-BENe2yWM.js";import"./index-CpGyXlyq.js";import"./init-Gi6I4Gst.js";function Nt(t){for(var n=t.length/6|0,s=new Array(n),a=0;a<n;)s[a]="#"+t.slice(a*6,++a*6);return s}const Ct=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function pt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,n){return n-1-t.height}function kt(t,n){return t.sourceLinks.length?t.depth:n-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,n){return Q(t.source,n.source)||t.index-n.index}function ht(t,n){return Q(t.target,n.target)||t.index-n.index}function Q(t,n){return t.y0-n.y0}function it(t){return t.value}function jt(t){return t.index}function Dt(t){return t.nodes}function zt(t){return t.links}function ft(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function yt({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Bt(){let t=0,n=0,s=1,a=1,u=24,y=8,p,m=jt,o=kt,l,h,x=Dt,_=zt,g=6;function v(){const i={nodes:x.apply(null,arguments),links:_.apply(null,arguments)};return T(i),A(i),M(i),I(i),S(i),yt(i),i}v.update=function(i){return yt(i),i},v.nodeId=function(i){return arguments.length?(m=typeof i=="function"?i:X(i),v):m},v.nodeAlign=function(i){return arguments.length?(o=typeof i=="function"?i:X(i),v):o},v.nodeSort=function(i){return arguments.length?(l=i,v):l},v.nodeWidth=function(i){return arguments.length?(u=+i,v):u},v.nodePadding=function(i){return arguments.length?(y=p=+i,v):y},v.nodes=function(i){return arguments.length?(x=typeof i=="function"?i:X(i),v):x},v.links=function(i){return arguments.length?(_=typeof i=="function"?i:X(i),v):_},v.linkSort=function(i){return arguments.length?(h=i,v):h},v.size=function(i){return arguments.length?(t=n=0,s=+i[0],a=+i[1],v):[s-t,a-n]},v.extent=function(i){return arguments.length?(t=+i[0][0],s=+i[1][0],n=+i[0][1],a=+i[1][1],v):[[t,n],[s,a]]},v.iterations=function(i){return arguments.length?(g=+i,v):g};function T({nodes:i,links:f}){for(const[e,r]of i.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(i.map((e,r)=>[m(e,r,i),e]));for(const[e,r]of f.entries()){r.index=e;let{source:k,target:b}=r;typeof k!="object"&&(k=r.source=ft(c,k)),typeof b!="object"&&(b=r.target=ft(c,b)),k.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of i)e.sort(h),r.sort(h)}function A({nodes:i}){for(const f of i)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.depth=r;for(const{target:b}of k.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.height=r;for(const{source:b}of k.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:i}){const f=ct(i,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of i){const k=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=k,r.x0=t+k*c,r.x1=r.x0+u,e[k]?e[k].push(r):e[k]=[r]}if(l)for(const r of e)r.sort(l);return e}function j(i){const f=pt(i,c=>(a-n-(c.length-1)*p)/nt(c,it));for(const c of i){let e=n;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}e=(a-e+p)/(c.length+1);for(let r=0;r<c.length;++r){const k=c[r];k.y0+=e*(r+1),k.y1+=e*(r+1)}w(c)}}function S(i){const f=N(i);p=Math.min(y,(a-n)/(ct(f,c=>c.length)-1)),j(f);for(let c=0;c<g;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/g);R(f,e,r),C(f,e,r)}}function C(i,f,c){for(let e=1,r=i.length;e<r;++e){const k=i[e];for(const b of k){let L=0,B=0;for(const{source:Y,value:et}of b.targetLinks){let q=et*(b.layer-Y.layer);L+=P(Y,b)*q,B+=q}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(Q),D(k,c)}}function R(i,f,c){for(let e=i.length,r=e-2;r>=0;--r){const k=i[r];for(const b of k){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let q=et*(Y.layer-b.layer);L+=E(b,Y)*q,B+=q}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(Q),D(k,c)}}function D(i,f){const c=i.length>>1,e=i[c];O(i,e.y0-p,c-1,f),V(i,e.y1+p,c+1,f),O(i,a,i.length-1,f),V(i,n,0,f)}function V(i,f,c,e){for(;c<i.length;++c){const r=i[c],k=(f-r.y0)*e;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function O(i,f,c,e){for(;c>=0;--c){const r=i[c],k=(r.y1-f)*e;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function z({sourceLinks:i,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of i)c.sort(ut)}}function w(i){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of i)f.sort(ht),c.sort(ut)}function P(i,f){let c=i.y0-(i.sourceLinks.length-1)*p/2;for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c+=r+p}for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c-=r}return c}function E(i,f){let c=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c+=r+p}for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function mt(){return new ot}ot.prototype=mt.prototype={constructor:ot,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,y){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+y)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var y=this._x1,p=this._y1,m=s-t,o=a-n,l=y-t,h=p-n,x=l*l+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(x>F)if(!(Math.abs(h*m-o*l)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var _=s-y,g=a-p,v=m*m+o*o,T=_*_+g*g,A=Math.sqrt(v),M=Math.sqrt(x),I=u*Math.tan((rt-Math.acos((v+x-T)/(2*A*M)))/2),N=I/M,j=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*l)+","+(n+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>l*g)+","+(this._x1=t+j*m)+","+(this._y1=n+j*o)}},arc:function(t,n,s,a,u,y){t=+t,n=+n,s=+s,y=!!y;var p=s*Math.cos(a),m=s*Math.sin(a),o=t+p,l=n+m,h=1^y,x=y?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+l:(Math.abs(this._x1-o)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+o+","+l),s&&(x<0&&(x=x%st+st),x>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-p)+","+(n-m)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=l):x>F&&(this._+="A"+s+","+s+",0,"+ +(x>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Rt(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var n=Gt,s=Ut,a=Rt,u=Vt,y=null;function p(){var m,o=Wt.call(arguments),l=n.apply(this,o),h=s.apply(this,o);if(y||(y=m=mt()),t(y,+a.apply(this,(o[0]=l,o)),+u.apply(this,o),+a.apply(this,(o[0]=h,o)),+u.apply(this,o)),m)return y=null,m+""||null}return p.source=function(m){return arguments.length?(n=m,p):n},p.target=function(m){return arguments.length?(s=m,p):s},p.x=function(m){return arguments.length?(a=typeof m=="function"?m:dt(+m),p):a},p.y=function(m){return arguments.length?(u=typeof m=="function"?m:dt(+m),p):u},p.context=function(m){return arguments.length?(y=m??null,p):y},p}function qt(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=d(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:d(function(o,l,h,x,_,g,v){var T=g.length-1;switch(_){case 7:const A=x.findOrCreateNode(g[T-4].trim().replaceAll('""','"')),M=x.findOrCreateNode(g[T-2].trim().replaceAll('""','"')),I=parseFloat(g[T].trim());x.addLink(A,M,I);break;case 8:case 9:case 11:this.$=g[T];break;case 10:this.$=g[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:d(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:d(function(o){var l=this,h=[0],x=[],_=[null],g=[],v=this.table,T="",A=0,M=0,I=2,N=1,j=g.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(C.yy[R]=this.yy[R]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;g.push(D);var V=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,g.length=g.length-L}d(O,"popStack");function z(){var L;return L=x.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=l.symbols_[L]||L),L}d(z,"lex");for(var w,P,E,i,f={},c,e,r,k;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=z()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";k=[];for(c in v[P])this.terminals_[c]&&c>I&&k.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`:
2
2
  `+S.showPosition()+`
3
3
  Expecting `+k.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:D,expected:k})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),g.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,D=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:g[g.length-(e||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(e||1)].first_column,last_column:g[g.length-1].last_column},V&&(f._$.range=[g[g.length-(e||1)].range[0],g[g.length-1].range[1]]),i=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,g].concat(j)),typeof i<"u")return i;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),g=g.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),g.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},y=function(){var m={EOF:1,parseError:d(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);else throw new Error(l)},"parseError"),setInput:d(function(o,l){return this.yy=l||this.yy||{},this._input=o,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:d(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);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),o},"input"),unput:d(function(o){var l=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var x=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 _=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===x.length?this.yylloc.first_column:0)+x[x.length-h.length].length-h[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(o){this.unput(this.match.slice(o))},"less"),pastInput:d(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-C30NoLsn.js";/**
1
+ import{c as a}from"./index-CpGyXlyq.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.