agentroam-runtime-darwin-arm64 0.2.0-preview.76 → 0.2.0-preview.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/manifest.json +2 -2
- package/package.json +1 -1
- package/runtime/.next/BUILD_ID +1 -1
- package/runtime/.next/app-path-routes-manifest.json +1 -1
- package/runtime/.next/build-manifest.json +2 -2
- package/runtime/.next/prerender-manifest.json +1 -1
- package/runtime/.next/server/app/_not-found.html +1 -1
- package/runtime/.next/server/app/_not-found.rsc +1 -1
- package/runtime/.next/server/app/api/agent/abort/route.js +1 -1
- package/runtime/.next/server/app/api/agent/abort/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/answer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/answer/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/codex-sharing/route.js +1 -1
- package/runtime/.next/server/app/api/agent/harness/status/route.js +1 -1
- package/runtime/.next/server/app/api/agent/harness/status/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/model/route.js +1 -1
- package/runtime/.next/server/app/api/agent/model/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/models/route.js +1 -1
- package/runtime/.next/server/app/api/agent/run/route.js +1 -1
- package/runtime/.next/server/app/api/agent/run/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/runtime-health/route.js +1 -1
- package/runtime/.next/server/app/api/agent/steer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/steer/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/stream/route.js +3 -3
- package/runtime/.next/server/app/api/agent/stream/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/route.js +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/business/route.js +1 -1
- package/runtime/.next/server/app/api/business/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/calendar/route.js +2 -2
- package/runtime/.next/server/app/api/client-logs/route.js +1 -1
- package/runtime/.next/server/app/api/collaboration/route.js +4 -4
- package/runtime/.next/server/app/api/collaboration/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/engine-threads/route.js +1 -1
- package/runtime/.next/server/app/api/engine-threads.body +1 -1
- package/runtime/.next/server/app/api/flow/v1/catalog/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/catalog/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/internal/todo-bootstrap/route.js +1 -4
- package/runtime/.next/server/app/api/internal/todo-bootstrap/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/internal/todo-mcp/route.js +1 -1
- package/runtime/.next/server/app/api/internal/todo-mcp/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/notifications/[id]/ack/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/[id]/ack/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/notifications/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/[id]/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/notifications/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/notifications/stream/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/stream/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/plugins/load/route.js +1 -1
- package/runtime/.next/server/app/api/plugins/load/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/push/subscribe/route.js +2 -2
- package/runtime/.next/server/app/api/push/subscribe/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/push/vapid/route.js +3 -3
- package/runtime/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/remote-tools/register/route.js +1 -1
- package/runtime/.next/server/app/api/remote-tools/register/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/stop/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/changes/route.js +3 -3
- package/runtime/.next/server/app/api/sessions/[id]/engine-switches/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/goals/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/goals/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/release/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/switch-engine/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-history/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/parallel/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/parallel/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/todos/[id]/commands/route.js +1 -1
- package/runtime/.next/server/app/api/todos/[id]/commands/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/todos/[id]/executions/route.js +1 -1
- package/runtime/.next/server/app/api/todos/[id]/executions/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/todos/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/todos/[id]/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/todos/route.js +1 -1
- package/runtime/.next/server/app/api/todos/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/tool-policies/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/tools/route.js +1 -1
- package/runtime/.next/server/app/api/tools/route.js.nft.json +1 -1
- package/runtime/.next/server/app-paths-manifest.json +36 -36
- package/runtime/.next/server/chunks/535.js +1 -0
- package/runtime/.next/server/chunks/5762.js +3 -3
- package/runtime/.next/server/chunks/5801.js +1 -1
- package/runtime/.next/server/chunks/5812.js +1 -0
- package/runtime/.next/server/chunks/685.js +1 -0
- package/runtime/.next/server/chunks/9119.js +4 -4
- package/runtime/.next/server/chunks/9457.js +1 -4
- package/runtime/.next/server/pages/404.html +1 -1
- package/runtime/.next/server/pages/500.html +1 -1
- package/runtime/.next/server/server-reference-manifest.json +1 -1
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/MacOS/agentroam-remote-desktop +0 -0
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/Resources/agentroam-component.json +1 -1
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/_CodeSignature/CodeResources +2 -2
- package/runtime/node_modules/.package-lock.json +17 -17
- package/runtime/node_modules/@agent/core/dist/index.js +9 -4
- package/runtime/node_modules/@agent/native-runtime/dist/index.js +439 -90
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +81 -85
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +65 -65
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-0vfvgmex.mjs +39 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-k19jejpn.mjs → core-3h0s3zzg.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-a8ty0dnc.mjs → core-6w7w19rc.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-8fprsbvz.mjs +42 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-avz7wgsg.mjs +23 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-b9ebje8h.mjs +20 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-kag24kjr.mjs → core-e1h3fbg3.mjs} +3 -3
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-ae73vzp2.mjs → core-ge6en8c9.mjs} +4 -4
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-e93r8awg.mjs → core-htcq9qj1.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-v6sp3qjw.mjs → core-nv0a4kre.mjs} +4 -4
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-y4qk5bdp.mjs +17 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-nfa6p2rw.mjs → core-yrdmz7je.mjs} +3 -3
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-z276fcqp.mjs +28 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core.mjs +12 -12
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +21 -21
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +25 -25
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +23 -25
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +85 -85
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.cjs +72 -45
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.cjs +13 -13
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.mjs +13 -13
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.mjs +72 -45
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs +72 -45
- package/runtime/node_modules/mediabunny/dist/modules/src/input.js +6 -0
- package/runtime/node_modules/mediabunny/dist/modules/src/media-sink.js +52 -35
- package/runtime/node_modules/mediabunny/dist/modules/src/media-source.js +2 -0
- package/runtime/node_modules/mediabunny/dist/modules/src/mpeg-ts/mpeg-ts-demuxer.js +7 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/source.js +7 -4
- package/runtime/node_modules/mediabunny/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/version.js +1 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/wave/wave-demuxer.js +6 -6
- package/runtime/node_modules/mediabunny/package.json +1 -1
- package/runtime/node_modules/mediabunny/src/input.ts +7 -0
- package/runtime/node_modules/mediabunny/src/media-sink.ts +56 -37
- package/runtime/node_modules/mediabunny/src/media-source.ts +3 -0
- package/runtime/node_modules/mediabunny/src/mpeg-ts/mpeg-ts-demuxer.ts +6 -1
- package/runtime/node_modules/mediabunny/src/source.ts +7 -4
- package/runtime/node_modules/mediabunny/src/version.ts +1 -1
- package/runtime/node_modules/mediabunny/src/wave/wave-demuxer.ts +6 -6
- package/runtime/node_modules/source-map-js/lib/quick-sort.js +92 -22
- package/runtime/node_modules/source-map-js/package.json +1 -1
- package/runtime/package-lock.json +41 -65
- package/runtime/webapp/dist/assets/{AIHubView-DF0D5qd2.js → AIHubView-CrtJMKfW.js} +1 -1
- package/runtime/webapp/dist/assets/{AgentManager-Ccj6ZefC.js → AgentManager-C2O-Dacy.js} +1 -1
- package/runtime/webapp/dist/assets/{AiHubPane-3PRSxzO0.js → AiHubPane-D2XWxc9R.js} +1 -1
- package/runtime/webapp/dist/assets/App-Bum2L4_E.js +63 -0
- package/runtime/webapp/dist/assets/{BrowserLivePanel-BZDtF0ne.js → BrowserLivePanel-DkBugqrH.js} +13 -18
- package/runtime/webapp/dist/assets/{CalendarPage-B8Jo-3Da.js → CalendarPage-DzYWlqoZ.js} +1 -1
- package/runtime/webapp/dist/assets/CalendarView-BjjC_t12.css +1 -0
- package/runtime/webapp/dist/assets/CalendarView-HQls5G-1.js +31 -0
- package/runtime/webapp/dist/assets/{CollaborationCreateDialog-CU1t0iYL.js → CollaborationCreateDialog-BwiSJbjb.js} +1 -1
- package/runtime/webapp/dist/assets/{CollaborationDashboard-BZhWQXzn.js → CollaborationDashboard-CNHt31kl.js} +1 -1
- package/runtime/webapp/dist/assets/{CollaborationPage-BwRJN55v.js → CollaborationPage-C4l-tTvn.js} +2 -2
- package/runtime/webapp/dist/assets/{FilePreview-Oo8sZH0t.js → FilePreview-EGUAbGpH.js} +3 -3
- package/runtime/webapp/dist/assets/{FileTree-qJTRdDPQ.js → FileTree-aJGl1V0W.js} +1 -1
- package/runtime/webapp/dist/assets/{FileWorkspaceDrawer-D40WNAqC.js → FileWorkspaceDrawer-zpD91eB6.js} +1 -1
- package/runtime/webapp/dist/assets/{FlowStudioPane-C1tgSbGo.js → FlowStudioPane-K1o4pSkZ.js} +1 -1
- package/runtime/webapp/dist/assets/{HostProjectPicker-BEfXuqxT.js → HostProjectPicker-BvboCQ0a.js} +1 -1
- package/runtime/webapp/dist/assets/{LSPServerList-DQRv04aP.js → LSPServerList-BSLzGLtW.js} +1 -1
- package/runtime/webapp/dist/assets/{MCPServerList-BmsejJC9.js → MCPServerList-CeWTI1-m.js} +1 -1
- package/runtime/webapp/dist/assets/{MemoryViewer-qZMdVrli.js → MemoryViewer-YcceFawC.js} +1 -1
- package/runtime/webapp/dist/assets/NewSessionWindow-C_HCQQnW.js +1 -0
- package/runtime/webapp/dist/assets/NewSessionWindow-DOLG1XEp.css +1 -0
- package/runtime/webapp/dist/assets/{RemoteDesktopPage-Dz_6-rOL.js → RemoteDesktopPage-Cpzv8zH0.js} +1 -1
- package/runtime/webapp/dist/assets/{RunningSessionsIcon-DJxTmxZn.js → RunningSessionsIcon-DmCYwIYD.js} +1 -1
- package/runtime/webapp/dist/assets/{SessionDashboard-DuR9r_ZP.js → SessionDashboard-C58Mke8a.js} +1 -1
- package/runtime/webapp/dist/assets/{SessionDashboardBridge-BHVjvDHa.js → SessionDashboardBridge-BPsNDY5Y.js} +1 -1
- package/runtime/webapp/dist/assets/{SettingsPanel-B-g919uV.js → SettingsPanel-CPBIPT-Z.js} +1 -1
- package/runtime/webapp/dist/assets/{SkillManager-nrWIOtEO.js → SkillManager-_qaGEuOE.js} +1 -1
- package/runtime/webapp/dist/assets/{TerminalPane-C4HiD2IC.js → TerminalPane-mYe76Pgb.js} +1 -1
- package/runtime/webapp/dist/assets/TodoPage-DdF5_SkL.js +1 -0
- package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-BXRYzdBT.js → abnfDiagram-VCTEODGH-DLd8EeCY.js} +1 -1
- package/runtime/webapp/dist/assets/{arc-BeG7yjCw.js → arc-D4smlqs5.js} +1 -1
- package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-DIQbpqn7.js → architectureDiagram-5GKGNRK7-ByE3DRU4.js} +1 -1
- package/runtime/webapp/dist/assets/{arrow-right-B03zMFiC.js → arrow-right-BtIv2jiq.js} +1 -1
- package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-DvgKV01C.js → blockDiagram-I7D4REHJ-BvTUm5vA.js} +1 -1
- package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-DIr7nDIg.js → c4Diagram-7LVT6UL2-XKwj5RmQ.js} +1 -1
- package/runtime/webapp/dist/assets/{calendar-days-D1OJEOKr.js → calendar-days-BeI09qof.js} +1 -1
- package/runtime/webapp/dist/assets/channel-wxCRUEc2.js +1 -0
- package/runtime/webapp/dist/assets/{check-BDiCDSY5.js → check-BdadwkYj.js} +1 -1
- package/runtime/webapp/dist/assets/{chevron-down-DIt_NscV.js → chevron-down-DwzPFeq8.js} +1 -1
- package/runtime/webapp/dist/assets/{chevron-right-DVhYkZeF.js → chevron-right-kcIXzCMb.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-Cykdc4to.js → chunk-2Q5K7J3B-7A6CDWIw.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-DL-gBU30.js → chunk-5VM5RSS4-mkNEWbY6.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-F27PBJKO-z0F9O96j.js → chunk-F27PBJKO-DKG-1HL0.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-DcSgatN1.js → chunk-IMKFNOWR-kiJDyKM7.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-BmG1ozp9.js → chunk-JWPE2WC7-DS7C5_M7.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-BK2jifSN.js → chunk-POPQ4Y6H-DvgeK_lX.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-SVP7TREG-DtInGjiG.js → chunk-SVP7TREG-BLo_2ua-.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-TICWLB2K-DWdiL4Y6.js → chunk-TICWLB2K-CJT6Qkz4.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-w8UYxZUB.js → chunk-XXDRQBXY-D1OLqjNu.js} +1 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-Ct3Cgqrl.js +1 -0
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-Ct3Cgqrl.js +1 -0
- package/runtime/webapp/dist/assets/{codeSyntax-Cprr1Nm9.js → codeSyntax-Dd0hAazb.js} +1 -1
- package/runtime/webapp/dist/assets/collaboration-CAgt9AiV.js +6 -0
- package/runtime/webapp/dist/assets/composer-file-routing-DSC2Eojr.js +6 -0
- package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-BJgwy7Y5.js → cose-bilkent-JH36ORCC-CI6EKHP8.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-BssWa1kU.js → cynefin-OW5HDTMX-CJTXYieX.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-Bv_-fuG_.js → cynefinDiagram-5FMLGOSQ-CPl1UVhy.js} +1 -1
- package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-BjA5n2Zi.js → dagre-GXQ25YYZ-Dq3ZQGTN.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-CCT38L0E.js → diagram-S7CK7UJ4-DJyU-2Di.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-4fLw8kje.js → diagram-UQ7AKVKN-Csg8hC8m.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-43_Qj0Se.js → diagram-VSXAHHWV-B14uLH_N.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VX7I27RA-BHEXgMDZ.js → diagram-VX7I27RA-D2Ww2nHe.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-BRTSiXVr.js → diagram-Z3DM3KII-D_YC6AVP.js} +1 -1
- package/runtime/webapp/dist/assets/{download-CuYS63Ny.js → download-COWHIKec.js} +1 -1
- package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-B4GImY-o.js → ebnfDiagram-PWID7BFC-s66xVEGY.js} +1 -1
- package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-EmEsAxWS.js → erDiagram-RLTQ6QDP-CgZh5cEn.js} +1 -1
- package/runtime/webapp/dist/assets/{external-link-Baeyco26.js → external-link-T3kil1jt.js} +1 -1
- package/runtime/webapp/dist/assets/{file-types-CykGmGsd.js → file-types-0e-tNIVd.js} +1 -1
- package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-sky_wmbX.js → flowDiagram-HODETNUW-BISMKynN.js} +1 -1
- package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-Cc71xV1j.js → ganttDiagram-EL5Y4UJY-Cbyu0NcF.js} +1 -1
- package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-z7uQ8-8z.js → gitGraphDiagram-WWUBYQGX-Cs6IQGBz.js} +1 -1
- package/runtime/webapp/dist/assets/{history-C7WUwl_W.js → history-Df4LXw6L.js} +1 -1
- package/runtime/webapp/dist/assets/{image-plus-B2RK1ogI.js → image-plus-COHCHOpI.js} +1 -1
- package/runtime/webapp/dist/assets/index-CQTDnt74.css +1 -0
- package/runtime/webapp/dist/assets/{index-d8fS3JdV.js → index-CTJNAMck.js} +52 -52
- package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-DXLEePz0.js → infoDiagram-27XIBGKW-4f3bFqNV.js} +1 -1
- package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-DCFXm_zQ.js → ishikawaDiagram-5VMMS53U-D-cJ9vio.js} +1 -1
- package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-DHWCpvY6.js → journeyDiagram-3NMN7TZE-CeToS0Qx.js} +1 -1
- package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-D_uP81aw.js → kanban-definition-UXKFOSKX-DStbIUk1.js} +1 -1
- package/runtime/webapp/dist/assets/{layout-Bcu83-1p.js → layout-i2D4wlYd.js} +1 -1
- package/runtime/webapp/dist/assets/{linear-CPim5SQa.js → linear-BcJhiCv3.js} +1 -1
- package/runtime/webapp/dist/assets/{list-todo-F1W4yBLx.js → list-todo-7yETOqQe.js} +1 -1
- package/runtime/webapp/dist/assets/{loader-circle-DesEGpVH.js → loader-circle-CZdAfU-D.js} +1 -1
- package/runtime/webapp/dist/assets/{locate-fixed-UXM91vCS.js → locate-fixed-ByJuEKxC.js} +1 -1
- package/runtime/webapp/dist/assets/{mermaid.core-CyzKk3O2.js → mermaid.core-BjNFAB9I.js} +5 -5
- package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-0MHQpQro.js → mindmap-definition-YA3MSWOX-BUIHHUVG.js} +1 -1
- package/runtime/webapp/dist/assets/new-session-window-C7R76XMp.css +1 -0
- package/runtime/webapp/dist/assets/new-session-window-DwtkwFBQ.js +190 -0
- package/runtime/webapp/dist/assets/{page-C2e368Dx.js → page-9-9EC7QM.js} +3 -3
- package/runtime/webapp/dist/assets/{pause-_h6c8qPD.js → pause-DXyBDZlg.js} +1 -1
- package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-BNinoE-7.js → pegDiagram-XKGWAZYB-BY5Bio5e.js} +1 -1
- package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-CfPzV9yb.js → pieDiagram-E7YTZNPT-CF8DVW3F.js} +1 -1
- package/runtime/webapp/dist/assets/{pin-BcXr5230.js → pin-2YlrlSJv.js} +1 -1
- package/runtime/webapp/dist/assets/{play-BdB0D0rZ.js → play-BxEpdvoI.js} +1 -1
- package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-0qLb33lM.js → quadrantDiagram-AXDQQJYC-CXWHO3a-.js} +1 -1
- package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-DNU4eRJt.js → railroadDiagram-O6MQD6OU-C20JeJZ-.js} +1 -1
- package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-BWJRwKX8.js → requirementDiagram-BXWQKSXE-IYd9UrO9.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-ccw-BdZpOTYP.js → rotate-ccw-CFIRtbUD.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-cw-D-zPMe4i.js → rotate-cw-B_vFqNsz.js} +1 -1
- package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-CGW9pvun.js → sankeyDiagram-P5KCCOFB-ysBhpblA.js} +1 -1
- package/runtime/webapp/dist/assets/{send-DCVOqOap.js → send-DUE2vBoK.js} +1 -1
- package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-CeVAD519.js → sequenceDiagram-WJ2MYXX4-CQMmk6cu.js} +1 -1
- package/runtime/webapp/dist/assets/session-dashboard-DnFhQhBN.js +1 -0
- package/runtime/webapp/dist/assets/{shield-check-DrxVJwVC.js → shield-check-Btyos6Iv.js} +1 -1
- package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-Dj5SukiO.js → sizeCapture-INFHLROL-DekvKUn1.js} +1 -1
- package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-UtRSslyd.js → stateDiagram-D77RDMKH-Ds_FEmbr.js} +1 -1
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-DxJ1ks_8.js +1 -0
- package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-DKbrz8SF.js → swimlanes-42K2YHIH-cjPcEO_T.js} +1 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-JGHIAQXy.js +8 -0
- package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-mtVdMOBL.js → timeline-definition-24CTP7MA-CEOprVt5.js} +1 -1
- package/runtime/webapp/dist/assets/{trash-2-Bbhd8-xd.js → trash-2-DLDxY6J7.js} +1 -1
- package/runtime/webapp/dist/assets/{types-CMhUwzwJ.js → types-CFAnlTif.js} +1 -1
- package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-ZcuGEhJx.js → vennDiagram-4TSXK5OY-D82uxYY9.js} +1 -1
- package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-CnAYI2ZE.js → wardleyDiagram-VM6X3IG4-JFt7Izt0.js} +1 -1
- package/runtime/webapp/dist/assets/{web-BH9JgWsL.js → web-BMqaP0jw.js} +1 -1
- package/runtime/webapp/dist/assets/{web-CBiaPgEe.js → web-Q9VPRftY.js} +1 -1
- package/runtime/webapp/dist/assets/{x-1GQMVfza.js → x-CeSbythI.js} +1 -1
- package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-B_uJt0Bg.js → xychartDiagram-S5SC5T6Z-1WCa4SfL.js} +1 -1
- package/runtime/webapp/dist/assets/{zoom-out-BNKdrTFD.js → zoom-out-CRr_o1NV.js} +8 -3
- package/runtime/webapp/dist/index.html +2 -2
- package/runtime/ws-server.mjs +11 -0
- package/runtime/.next/server/chunks/2480.js +0 -4
- package/runtime/.next/server/chunks/3604.js +0 -4
- package/runtime/.next/server/chunks/732.js +0 -1
- package/runtime/.next/server/chunks/7788.js +0 -1
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-25bstexa.mjs +0 -17
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-4ps8vwh1.mjs +0 -42
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-9a7zb9bm.mjs +0 -53
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-dsa3p77h.mjs +0 -18
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-eqz9ara6.mjs +0 -18
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-esw7xtkz.mjs +0 -17
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ey906mbk.mjs +0 -20
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-mhczx7zp.mjs +0 -18
- package/runtime/webapp/dist/assets/App-HomcUet2.js +0 -63
- package/runtime/webapp/dist/assets/CalendarView-BD7GhA0i.js +0 -36
- package/runtime/webapp/dist/assets/CalendarView-DHi-mzjY.css +0 -1
- package/runtime/webapp/dist/assets/NewSessionWindow-BOCZ0mXT.css +0 -1
- package/runtime/webapp/dist/assets/NewSessionWindow-uzVK5LVS.js +0 -1
- package/runtime/webapp/dist/assets/TodoPage-Bn6j6kR6.js +0 -1
- package/runtime/webapp/dist/assets/channel-Cchxg6Fx.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-BGv4sK1I.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-BGv4sK1I.js +0 -1
- package/runtime/webapp/dist/assets/collaboration-acdqOxaY.js +0 -6
- package/runtime/webapp/dist/assets/composer-file-routing-BsSxfxUa.js +0 -6
- package/runtime/webapp/dist/assets/index-B_fTpc5K.css +0 -1
- package/runtime/webapp/dist/assets/new-session-window-B4BJYrds.css +0 -1
- package/runtime/webapp/dist/assets/new-session-window-fsYu53Ht.js +0 -188
- package/runtime/webapp/dist/assets/session-dashboard-BAYi5acZ.js +0 -1
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-Se3lznH6.js +0 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-C-Zsmae7.js +0 -8
- /package/runtime/.next/static/{q4ez_w8bVMUW1e57Cd7GC → alt-ud1W2PlWW6FLlkBcB}/_buildManifest.js +0 -0
- /package/runtime/.next/static/{q4ez_w8bVMUW1e57Cd7GC → alt-ud1W2PlWW6FLlkBcB}/_ssgManifest.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./TerminalPane-
|
|
2
|
-
import{c as cr,r as n,j as e,e as Ke,a as Ae,R as we,
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./TerminalPane-mYe76Pgb.js","./index-CTJNAMck.js","./index-CQTDnt74.css","./clipboard-BvwmdR4z.js","./RunningSessionsIcon-DmCYwIYD.js","./x-CeSbythI.js","./chevron-down-DwzPFeq8.js","./check-BdadwkYj.js","./trash-2-DLDxY6J7.js","./external-link-T3kil1jt.js","./chevron-right-kcIXzCMb.js","./calendar-days-BeI09qof.js","./artifact-links-4m1A00GO.js","./pin-2YlrlSJv.js","./CollaborationTabBridge-Dxq4G1Uk.js","./SessionDashboardBridge-BPsNDY5Y.js","./RemoteDesktopTabBridge-Cp9mLtcY.js","./TerminalPane-6GBZ9nXN.css","./FileTree-aJGl1V0W.js","./file-types-0e-tNIVd.js","./locate-fixed-ByJuEKxC.js","./loader-circle-CZdAfU-D.js","./FilePreview-EGUAbGpH.js","./rotate-ccw-CFIRtbUD.js","./download-COWHIKec.js","./FilePreview-B7Ab2X_E.css","./AiHubPane-D2XWxc9R.js","./image-plus-COHCHOpI.js","./send-DUE2vBoK.js","./FlowStudioPane-K1o4pSkZ.js","./rotate-cw-B_vFqNsz.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as cr,r as n,j as e,e as Ke,a as Ae,R as we,v as lr,w as dr,x as Me,y as Rn,z as ur,d as Oe,D as He,E as pr,F as mr,G as sn,p as fr,I as hr,U as bt,t as at,P as Nn,J as gr,L as Ln,K as wt,O as br,Q as wr,S as cn,T as xr,V as yr,X as vr,Y as kr,Z as Er,_ as jr,$ as st,a0 as Sr,a1 as Ve,a2 as Cr,a3 as ct,a4 as Tr,a5 as ot,a6 as Rr,a7 as Nr,a8 as Lr,a9 as Pr,aa as Ir,ab as ln,ac as _e}from"./index-CTJNAMck.js";import{S as Pn,M as dn,a as Ar,G as lt,b as Dr,R as In,c as Mr,C as Or}from"./RunningSessionsIcon-DmCYwIYD.js";import{X as Ce}from"./x-CeSbythI.js";import{C as _r}from"./chevron-down-DwzPFeq8.js";import{C as dt}from"./check-BdadwkYj.js";import{T as xt,P as ut,A as zr,F as Wr}from"./trash-2-DLDxY6J7.js";import{E as yt}from"./external-link-T3kil1jt.js";import{C as Fr}from"./chevron-right-kcIXzCMb.js";import{C as An}from"./calendar-days-BeI09qof.js";import{a as $r,r as Ur,i as un}from"./artifact-links-4m1A00GO.js";import{c as Br}from"./clipboard-BvwmdR4z.js";import{P as qr}from"./pin-2YlrlSJv.js";import{r as Hr,d as Vr,e as Kr}from"./CollaborationTabBridge-Dxq4G1Uk.js";import{b as Yr,r as Gr,c as pn}from"./SessionDashboardBridge-BPsNDY5Y.js";import{c as Jr,d as Xr,R as Qr,b as Zr}from"./RemoteDesktopTabBridge-Cp9mLtcY.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 cr,r as n,j as e,e as Ke,a as Ae,R as we,q as lr,s as dr,t as Me,v a
|
|
|
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 qo({active:t,children:o}){const[a,s]=n.useState(t);return n.useEffect(()=>{t&&s(!0)},[t]),t||a?o:null}function kn(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"]),c=[];for(const u of o.tabs.slice(0,100))!u||typeof u.id!="string"||typeof u.title!="string"||a.has(u.id)||u.kind!==void 0&&!s.has(u.kind)||u.kind==="collaboration"&&typeof u.groupId!="string"||(a.add(u.id),c.push({id:u.id,title:u.title,...u.kind?{kind:u.kind}:{},...typeof u.groupId=="string"?{groupId:u.groupId}:{},...typeof u.discussionId=="string"&&/^[\w-]{1,200}$/.test(u.discussionId)?{discussionId:u.discussionId}:{}}));return{tabs:c,activeTerminalId:typeof o.activeTerminalId=="string"&&o.activeTerminalId!=="messaging"?o.activeTerminalId:null}}catch{return null}}function Ho(t,o,a){const s=new Map(o.filter(p=>p.status==="active"||p.status==="detached").map(p=>[p.id,{id:p.id,title:p.title}])),c=[],u=new Set;for(const p of[...(t==null?void 0:t.tabs)??[],...a,...s.values()])u.has(p.id)||!p.kind&&!s.has(p.id)||(u.add(p.id),c.push(p.kind?p:s.get(p.id)));return c}const Se={id:"remote-desktop",title:"远程桌面",kind:"remote-desktop"};function En(t){const o=t.find(a=>a.kind==="remote-desktop");return o?t.map(a=>a===o?{...Se}:a):[...t,{...Se}]}const De={id:"collaboration-dashboard",title:"群聊列表",kind:"collaboration-dashboard"};function jn(t){return t.some(o=>o.id===De.id)?t:[...t,{...De}]}const Ye={id:"session-dashboard",title:"Dashboard",kind:"session-dashboard"};function Sn(t){return t.some(o=>o.id===Ye.id)?t:[...t,{...Ye}]}const gt={id:"calendar",title:"日历",kind:"calendar"};function Vo(t){return t.some(o=>o.id===gt.id)?t:[...t,{...gt}]}const Ko=ze(()=>_e(()=>import("./TerminalPane-C4HiD2IC.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url),{ssr:!1}),Yo=ze(()=>_e(()=>import("./FileTree-qJTRdDPQ.js"),__vite__mapDeps([18,1,2,19,20,5,21,6,10,8]),import.meta.url),{ssr:!1}),Go=ze(()=>_e(()=>import("./FilePreview-Oo8sZH0t.js").then(t=>t.b),__vite__mapDeps([22,1,2,12,23,21,8,7,24,5,25]),import.meta.url),{ssr:!1}),Jo=ze(()=>_e(()=>import("./AiHubPane-3PRSxzO0.js"),__vite__mapDeps([26,1,2,5,6,27,21,28]),import.meta.url),{ssr:!1}),Xo=ze(()=>_e(()=>import("./FlowStudioPane-C1tgSbGo.js"),__vite__mapDeps([29,1,2,30,4,5,6,7,8,9,10,11,12,3,13,14,15,16]),import.meta.url),{ssr:!1,loading:()=>e.jsx(Ge,{})});function Qo(){return e.jsx(Po,{children:(t,o)=>e.jsx(ti,{auth:t,onWorkspaceReady:o})})}const ae={id:"webapp-agent",title:"智能助手",kind:"webapp"},Cn={id:"ai-hub",title:"AI Hub",kind:"aihub"},Tn={id:"flow-studio",title:"Flow Studio",kind:"flowstudio"};function Zo(){var t;return typeof document>"u"?Lr:ct((t=document.getElementById("web-theme-root"))==null?void 0:t.dataset.webTheme).id}const ei="agent-web-shell:skin:v1";function ti({auth:t,onWorkspaceReady:o}){var zt,Wt,Ft,$t;const[a,s]=n.useState(null),c=n.useRef(null),[u,p]=n.useState(0),d=n.useCallback(r=>{if((r==null?void 0:r.openMode)==="new-tab"){window.open(r.url,"_blank","noopener,noreferrer");return}s(r)},[]),C=n.useCallback(r=>s((r==null?void 0:r.openMode)==="current"?r:null),[]),g=n.useRef(null),T=n.useRef(null),l=n.useRef(null),v=n.useRef(null),E=n.useRef(null),L=n.useRef(!1),[f,x]=n.useState({}),h=n.useRef(new Map),[w,R]=n.useState(0),[N,D]=n.useState(!1),[F,Q]=n.useState(!1),ne=n.useRef(()=>{}),J=n.useCallback(r=>{var m;const i=Co(r);if(!(!i||i.type!==ht.watcherFrame)){ne.current(i.channelId,i.sequence);for(const y of[g,T]){if(!((m=y.current)!=null&&m.contentWindow))continue;const S=i.payload.slice().buffer;y.current.contentWindow.postMessage({type:Cr,channelId:i.channelId,sequence:i.sequence,data:S},window.location.origin,[S])}}},[]),{state:X,epoch:_,rpc:k,onEvent:A,onTerminalData:U,onTerminalReset:q,sendTerminalInput:O}=Ro(J,t.getWsNonce,t.refresh),P=n.useMemo(()=>({request:(r,i,m)=>k(r,i,m),subscribe:(r,i)=>A("fs:event",i)}),[A,k]);ne.current=(r,i)=>{k("browser:frame-ack",{channelId:r,sequence:i}).catch(()=>{})};const[I,M]=n.useState([{...ae}]),oe=n.useRef(I);oe.current=I;const[j,H]=n.useState(ae.id);No(c,j,!a);const[b,z]=n.useState({}),V=n.useRef(!1),[B,Y]=n.useState(!1),[Z,xe]=n.useState(0),he=`agentroam:workspace:${typeof window>"u"?"":Oe()}:${((zt=t.user)==null?void 0:zt.id)??""}`,Te=n.useRef(null),ye=n.useRef(new Map),We=n.useRef(new Map),Wn=n.useCallback((r,i)=>{ye.current.set(r,i);const m=window.setTimeout(()=>{if(ye.current.get(r)!==i)return;const y=We.current.get(r);y&&(We.current.delete(r),i(y,!0))},180);return()=>{window.clearTimeout(m),ye.current.get(r)===i&&ye.current.delete(r)}},[]),Fn=n.useCallback(r=>{var m;if(!j||(m=I.find(y=>y.id===j))!=null&&m.kind)return;const i=ye.current.get(j);i?i(r):k("term:input",{id:j,data:`${r}`}).catch(()=>{}),le(!1)},[j,k,I]),[ve,$n]=n.useState(!1),[Re,Je]=n.useState({}),[de,Fe]=n.useState(null),[ce,le]=n.useState(!1),[ge,$e]=n.useState("files"),[Ne,vt]=n.useState(null),[Le,kt]=n.useState(!0),[Un,Bn]=n.useState(null),[Xe,Et]=n.useState(!1),[Qe,jt]=n.useState([]),[Ze,St]=n.useState(Eo()),[ke,Ct]=n.useState(Zo),[Tt,qn]=n.useState(st),[Rt,Hn]=n.useState(!1);n.useEffect(()=>{const r=()=>{try{qn(_o(window.localStorage))}catch{}Hn(!0)},i=m=>{(m.key===zn||m.key===null)&&r()};return r(),window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[]);const[Nt,Vn]=n.useState(!1),ue=vo(t.csrfToken),[Lt,Kn]=n.useState(!1),re=ct(ke),Ee=n.useRef(null),[Yn,et]=n.useState(0),[Gn,tt]=n.useState(!1),nt=n.useRef(null),Pt=n.useRef(null),It=n.useCallback(r=>{var m;const i=[g.current,T.current,l.current,v.current,...h.current.values()];for(const y of i)(m=y==null?void 0:y.contentWindow)==null||m.postMessage({type:ei,skin:r},window.location.origin)},[]),ie=n.useCallback(()=>{var i;if(It(ke),!Rt)return;const r=[g.current,T.current,l.current,v.current,...h.current.values()];for(const m of r)(i=m==null?void 0:m.contentWindow)==null||i.postMessage({type:Tr,navigationLayout:Tt},window.location.origin)},[ke,Tt,Rt,It]);n.useEffect(()=>{ie()},[ie]),n.useEffect(()=>{const r=re.cssVars["--ui-root-bg"],i=re.cssVars["--ui-color-scheme"],m=document.getElementById("web-theme-root");for(const[S,$]of Object.entries(re.cssVars))m==null||m.style.setProperty(S,$);m&&(m.dataset.webTheme=re.id),document.documentElement.style.background=r,document.documentElement.style.colorScheme=i,document.body.style.background=r,document.body.style.colorScheme=i;let y=document.querySelector('meta[name="theme-color"]');y||(y=document.createElement("meta"),y.name="theme-color",document.head.append(y)),y.content=re.cssVars["--ui-tabbar-bg"]},[re]),n.useEffect(()=>{const r=i=>{var Ut,Bt,qt,Ht,Vt,Kt,Yt,Gt,Jt,Xt,Qt,Zt,en,tn,nn,rn,on,an;const m=((Ut=l.current)==null?void 0:Ut.contentWindow)??null,y=[(Bt=g.current)==null?void 0:Bt.contentWindow,m,(qt=v.current)==null?void 0:qt.contentWindow,...[...h.current.values()].map(W=>W.contentWindow)].find(W=>W&&W===i.source)??null,S=Gr(i,window.location.origin,y);if(S){if(s(null),S.kind==="dashboard")M(Sn),H(Ye.id);else if(S.kind==="groups")M(jn),H(De.id);else if(S.kind==="group"){const W=`collaboration-${S.groupId}`,G={id:W,title:S.title,kind:"collaboration",groupId:S.groupId,discussionId:S.discussionId};M(fe=>fe.some(qe=>qe.id===W)?fe.map(qe=>qe.id===W?G:qe):[...fe,G]),H(W)}else L.current?(Vt=(Ht=g.current)==null?void 0:Ht.contentWindow)==null||Vt.postMessage({type:pn,intent:S},window.location.origin):E.current=S,H(ae.id);return}const $=Vr(i,window.location.origin,m);if($){M(W=>$.deleted?W.filter(G=>G.groupId!==$.groupId):W.map(G=>G.groupId===$.groupId?{...G,title:$.title}:G)),$.deleted?H(W=>W===`collaboration-${$.groupId}`?De.id:W):x(W=>({...W,[$.groupId]:(W[$.groupId]||0)+1}));return}const K=Kr(i,window.location.origin,i.source===m?m:((Kt=g.current)==null?void 0:Kt.contentWindow)??null);if(K){const W=`collaboration-${K.groupId}`;M(G=>G.some(fe=>fe.id===W)?G:[...G,{id:W,title:K.title,kind:"collaboration",groupId:K.groupId}]),H(W);return}const ee=((Yt=T.current)==null?void 0:Yt.contentWindow)??null,te=Xr(i,window.location.origin,ee);if(te!==null){D(te);return}if(vn(i,window.location.origin,ee)){D(!1),R(W=>W+1),Q(!1),ie();return}if(ee&&i.origin===window.location.origin&&i.source===ee&&((Gt=i.data)==null?void 0:Gt.type)===Qr){Q(!0);return}if(i.origin===window.location.origin&&i.source===ee&&ee&&((Jt=i.data)==null?void 0:Jt.type)===Zr){D(!1),k("browser:unwatch").catch(()=>{}),M(W=>W.filter(G=>G.kind!=="remote-desktop")),R(0),Q(!1),H(ae.id);return}if(Pr(i,window.location.origin,((Xt=g.current)==null?void 0:Xt.contentWindow)??null)){M(En),H(Se.id);return}if(vn(i,window.location.origin,((Qt=g.current)==null?void 0:Qt.contentWindow)??null)){L.current=!0,Kn(!0),ie(),o(),E.current&&((en=(Zt=g.current)==null?void 0:Zt.contentWindow)==null||en.postMessage({type:pn,intent:E.current},window.location.origin),E.current=null);return}const sr=(tn=[...h.current.values()].find(W=>W.contentWindow===i.source))==null?void 0:tn.contentWindow,Pe=$r(i,window.location.origin,sr??((nn=g.current)==null?void 0:nn.contentWindow)??null);if(Pe){const W=G=>{$e("files"),le(!un(G)),Fe(G),un(G)||Bn({...Pe,path:G})};Pe.path.startsWith("~/")?k("hello").then(({home:G})=>{const fe=Ur(Pe.path,null,G);fe&&W(fe)}).catch(()=>{}):W(Pe.path);return}const be=i.source===ee&&ee?ee:((rn=g.current)==null?void 0:rn.contentWindow)??null,je=Ir(i,window.location.origin,be);if(je){k(je.method,{...je.payload,...je.method==="browser:watch"?{frameAck:!0}:{}}).then(W=>{be==null||be.postMessage({type:ln,id:je.id,ok:!0,result:W},window.location.origin)},W=>{be==null||be.postMessage({type:ln,id:je.id,ok:!1,error:W.message||"浏览器操作失败",code:W.code},window.location.origin)});return}jo(i,window.location.origin,[((on=g.current)==null?void 0:on.contentWindow)??null,m,((an=v.current)==null?void 0:an.contentWindow)??null,...[...h.current.values()].map(W=>W.contentWindow)],k)};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)},[o,k,ie]),n.useEffect(()=>{const r=y=>{var S,$;for(const K of[g,T])($=(S=K.current)==null?void 0:S.contentWindow)==null||$.postMessage({type:ot,event:y},window.location.origin)},m=["browser:session","browser:frame","browser:state","browser:closed","browser:webrtc"].map(y=>A(y,r));return()=>m.forEach(y=>y())},[A]),n.useEffect(()=>{var r,i;Lt&&((i=(r=g.current)==null?void 0:r.contentWindow)==null||i.postMessage({type:ot,event:{type:"browser:connection",connected:X.connected,epoch:_}},window.location.origin))},[X.connected,_,Lt]),n.useEffect(()=>{var r,i;w&&((i=(r=T.current)==null?void 0:r.contentWindow)==null||i.postMessage({type:Jr,visible:j===Se.id},window.location.origin))},[j,w]),n.useEffect(()=>{var r,i;w&&((i=(r=T.current)==null?void 0:r.contentWindow)==null||i.postMessage({type:ot,event:{type:"browser:connection",connected:X.connected,epoch:_}},window.location.origin))},[X.connected,_,w]);const At=n.useRef(0),Dt=j?b[j]??null:null;n.useEffect(()=>{const r=window.visualViewport;let i=null,m="";const y=()=>{const S=zo(r,{height:window.innerHeight,width:window.innerWidth}),$=`${S.width}x${S.height}+${S.top}+${S.left}`;$!==m&&(m=$,document.documentElement.style.setProperty("--vv-height",`${S.height}px`),document.documentElement.style.setProperty("--vv-width",`${S.width}px`),document.documentElement.style.setProperty("--vv-top",`${S.top}px`),document.documentElement.style.setProperty("--vv-left",`${S.left}px`),i&&window.clearTimeout(i),i=window.setTimeout(y,250))};return y(),r==null||r.addEventListener("resize",y),r==null||r.addEventListener("scroll",y),window.addEventListener("orientationchange",y),window.addEventListener("resize",y),document.addEventListener("visibilitychange",y),window.addEventListener("pageshow",y),()=>{r==null||r.removeEventListener("resize",y),r==null||r.removeEventListener("scroll",y),window.removeEventListener("orientationchange",y),window.removeEventListener("resize",y),document.removeEventListener("visibilitychange",y),window.removeEventListener("pageshow",y),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")}},[]),n.useEffect(()=>{fetch("/api/web-console/preferences",{credentials:"same-origin"}).then(r=>r.json()).then(r=>{var i,m,y,S;typeof((i=r.preferences)==null?void 0:i.keybarHidden)=="boolean"&&Et(r.preferences.keybarHidden),Array.isArray((m=r.preferences)==null?void 0:m.keyOrder)&&jt(r.preferences.keyOrder),Array.isArray((y=r.preferences)==null?void 0:y.pinnedCommands)&&St(r.preferences.pinnedCommands),(S=r.preferences)!=null&&S.theme&&Ct(ct(r.preferences.theme).id)}).catch(()=>{}).finally(()=>Vn(!0)),fetch("/api/web-console/device-state",{credentials:"same-origin"}).then(r=>r.json()).then(r=>{const i=r.deviceState;i!=null&&i.drawerTab&&$e(i.drawerTab),i!=null&&i.activeTerminalId&&(Te.current=i.activeTerminalId),typeof(i==null?void 0:i.drawerOpen)=="boolean"&&le(i.drawerOpen),i!=null&&i.fileTreeRoot&&vt(i.fileTreeRoot),typeof(i==null?void 0:i.fileTreeFollowMode)=="boolean"&&kt(i.fileTreeFollowMode),i!=null&&i.selectedFile&&Fe(i.selectedFile),i!=null&&i.terminalScroll&&typeof i.terminalScroll=="object"&&Je(i.terminalScroll)}).catch(()=>{}).finally(()=>$n(!0))},[]);const Mt=n.useCallback(r=>{fetch("/api/web-console/preferences",{method:"PATCH",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":t.csrfToken},body:JSON.stringify(r)}).catch(()=>{})},[t.csrfToken]);n.useEffect(()=>{if(!Nt)return;const r=setTimeout(()=>Mt({keybarHidden:Xe,keyOrder:Qe,pinnedCommands:Ze,theme:ke}),500);return()=>clearTimeout(r)},[Xe,Qe,Ze,ke,Nt,Mt]);const Ue=n.useCallback(r=>{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(r)}).catch(()=>{})},[t.csrfToken]);n.useEffect(()=>{if(!t.csrfToken||!B||!ve)return;const r=setTimeout(()=>Ue({activeTerminalId:j,drawerOpen:ce,drawerTab:ge,fileTreeRoot:Ne,fileTreeFollowMode:Le,selectedFile:de,terminalScroll:Re}),500);return()=>clearTimeout(r)},[j,ce,ge,Ne,Le,de,Re,t.csrfToken,Ue,B,ve]),n.useEffect(()=>{if(!t.csrfToken||!B||!ve)return;const r=()=>Ue({activeTerminalId:j,drawerOpen:ce,drawerTab:ge,fileTreeRoot:Ne,fileTreeFollowMode:Le,selectedFile:de,terminalScroll:Re});return window.addEventListener("pagehide",r),()=>window.removeEventListener("pagehide",r)},[j,ce,ge,Ne,Le,de,Re,t.csrfToken,Ue,B,ve]);const Jn=n.useCallback(r=>{Fe(r),le(!1)},[]),Xn=n.useCallback(()=>{if(I.length>=8)return;const r=`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;M(i=>i.length>=8?i:[...i,{id:r,title:`Terminal ${i.length+1}`}]),H(r)},[I.length]),Qn=n.useCallback(r=>{const i=I.find(S=>S.id===j);if(i!=null&&i.kind&&i.kind!=="webapp")return;if(i&&!i.kind){const S=ye.current.get(i.id);S?S(r,!0):We.current.set(i.id,r),le(!1);return}const m=I.length>=8?I.find(S=>!S.kind):null,y=(m==null?void 0:m.id)??`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;m?We.current.set(y,r):M(S=>[...S,{id:y,title:`Terminal ${S.length+1}`,initialCommand:r}]),H(y),le(!1)},[j,I]);n.useEffect(()=>{if(!X.connected||!ve||V.current)return;V.current=!0;let r=!1,i=!1,m;return k("term:list").then(y=>{if(r)return;let S=null;try{S=kn(localStorage.getItem(he))}catch{}const $=Ho(S,y.tabs,oe.current);M($),H(K=>{const ee=oe.current.find(me=>me.id===K&&me.kind&&me.kind!=="webapp");if(ee)return ee.id;const te=(S==null?void 0:S.activeTerminalId)||Te.current||K||ae.id;return te===ae.id?ae.id:$.some(me=>me.id===te)?te:ae.id}),i=!0,Y(!0)}).catch(()=>{r||(V.current=!1,m=setTimeout(()=>xe(y=>y+1),2e3))}),()=>{r=!0,clearTimeout(m),i||(V.current=!1)}},[X.connected,ve,k,he,Z]),n.useLayoutEffect(()=>{if(B)try{const r=kn(JSON.stringify({tabs:I,activeTerminalId:j}));localStorage.setItem(he,JSON.stringify(r))}catch{}},[I,j,B,he]);const Zn=r=>{var m;if(r===ae.id)return;const i=(m=I.find(y=>y.id===r))==null?void 0:m.kind;i==="remote-desktop"&&(R(0),Q(!1),k("browser:unwatch").catch(()=>{})),!(!i&&!window.confirm("关闭页签会终止该终端进程,确认关闭?"))&&(M(y=>{var $;const S=y.filter(K=>K.id!==r);return j===r&&H((($=S[0])==null?void 0:$.id)??null),S}),i||k("term:kill",{id:r}).catch(()=>{}))},er=n.useCallback(()=>{M(r=>{const i=r.find(m=>m.kind==="aihub");return i?(H(i.id),r):(H(Cn.id),[...r,{...Cn}])})},[]),tr=n.useCallback(()=>{M(r=>{const i=r.find(m=>m.kind==="flowstudio");return i?(H(i.id),r):(H(Tn.id),[...r,{...Tn}])})},[]),nr=n.useCallback(()=>{M(En),H(Se.id)},[]),rr=n.useCallback(()=>{M(Vo),H(gt.id)},[]);n.useEffect(()=>{const r=A("term:exited",i=>{const m=i==null?void 0:i.id;m&&(M(y=>{const S=y.filter($=>$.id!==m);return H($=>{var K;return $===m?((K=S[0])==null?void 0:K.id)??null:$}),S}),Je(y=>{if(!(m in y))return y;const S={...y};return delete S[m],S}))});return()=>{r()}},[A]);const Ot=n.useCallback(r=>{if(!j||I.length<2)return;const m=(I.findIndex(y=>y.id===j)+r+I.length)%I.length;H(I[m].id)},[j,I]),_t=Math.max(0,I.findIndex(r=>r.id===j)),or=((Wt=I[_t])==null?void 0:Wt.kind)==="webapp"?re.cssVars["--ui-term-col-bg"]:re.termHostBg,ir={...se.root,...re.cssVars,"--ui-active-content-bg":or,"--ui-terminal-bg":re.termHostBg,"--ui-primary-text":re.keybar.accentText,background:"var(--ui-root-bg)",color:"var(--ui-text)"},pe=n.useCallback(()=>{Ee.current=null,et(0),tt(!1)},[]),rt=n.useCallback(r=>{Math.abs(r)>=64&&I.length>1&&Ot(r<0?1:-1),pe()},[I.length,Ot,pe]),ar=r=>r instanceof Element&&!!r.closest(".terminal-screen");n.useEffect(()=>{const r=i=>{var y;if(j!==ae.id)return;const m=Uo(i,window.location.origin,((y=g.current)==null?void 0:y.contentWindow)??null);m&&(m.phase==="move"?(tt(!0),et(m.deltaX)):m.phase==="end"?rt(m.deltaX):pe())};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)},[j,rt,pe]);const Be=n.useCallback((r="smooth")=>{const i=Pt.current;if(!i||!j)return;const m=i.querySelector(`[data-terminal-id="${j}"]`);if(!m)return;if(m===i.querySelector("[data-terminal-id]")){Wo(i);return}const y=i.querySelector(".terminal-connection"),S=(y==null?void 0:y.offsetWidth)??0,$=8,K=m.offsetLeft,ee=K+m.offsetWidth,te=i.scrollLeft,me=te+i.clientWidth-S;K<te+$?i.scrollTo({left:Math.max(0,K-$),behavior:r}):ee>me-$&&i.scrollTo({left:ee-i.clientWidth+S+$,behavior:r})},[j]);return n.useLayoutEffect(()=>{if(!j)return;const r=I.length>At.current;At.current=I.length,Be(r?"auto":"smooth")},[j,I.length,Be]),n.useEffect(()=>{const r=()=>requestAnimationFrame(()=>Be("auto"));return window.addEventListener("pageshow",r),()=>window.removeEventListener("pageshow",r)},[Be]),e.jsxs("div",{className:`web-root ${N&&j===Se.id&&!a?"is-remote-fullscreen":""}`,style:ir,children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:Rr}}),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(zr,{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(yt,{size:16})})]}),e.jsx("div",{className:"terminal-tab-list",ref:Pt,hidden:!!a,children:I.map(r=>e.jsxs("div",{"data-terminal-id":r.id,draggable:!0,className:`terminal-tab ${r.id===j?"active":""}`,onDragStart:()=>{nt.current=r.id},onDragOver:i=>i.preventDefault(),onDrop:i=>{i.preventDefault();const m=nt.current;nt.current=null,!(!m||m===r.id)&&M(y=>{const S=y.findIndex(te=>te.id===m),$=y.findIndex(te=>te.id===r.id);if(S<0||$<0)return y;const K=[...y],[ee]=K.splice(S,1);return K.splice($,0,ee),k("term:reorder",{ids:K.filter(te=>!te.kind).map(te=>te.id)}).catch(()=>{}),K})},onClick:()=>H(r.id),onDoubleClick:()=>{var m;if(r.kind)return;const i=(m=window.prompt("页签名称",r.title))==null?void 0:m.trim();i&&k("term:rename",{id:r.id,title:i}).then(()=>M(y=>y.map(S=>S.id===r.id?{...S,title:i}:S))).catch(()=>{})},children:[e.jsx("span",{children:r.title}),r.kind!=="webapp"&&e.jsx("button",{tabIndex:-1,onClick:i=>{i.stopPropagation(),Zn(r.id)},children:"×"})]},r.id))}),e.jsx("button",{className:"terminal-add","aria-label":"新建终端页签",hidden:!!a,disabled:I.length>=8,onClick:Xn,children:"+"}),e.jsx("div",{className:"terminal-connection",children:e.jsx(Nr,{sortingDisabled:!ue.loaded||ue.saving,onReorder:(r,i)=>{const m=ue.settings.visibleTools;return ue.setVisibleTools(wo(m,r,i))},avatar:e.jsx(mo,{username:((Ft=t.user)==null?void 0:Ft.username)??"?",connected:X.connected,accent:re.keybar.accent,accentText:re.keybar.accentText,selectedPageId:a==null?void 0:a.id,onSelectPage:d,onUpdatePage:C,configuration:ue,csrfToken:t.csrfToken}),items:[{id:"refresh",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"刷新页面",title:"刷新页面",onClick:()=>a?p(r=>r+1):window.location.reload(),children:e.jsx(we,{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),M(Sn),H(Ye.id)},children:e.jsx(In,{size:17,"aria-hidden":"true"})})},{id:"collaboration",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开群聊列表",title:"群聊列表",onClick:()=>{s(null),M(jn),H(De.id)},children:e.jsx(bt,{size:17,"aria-hidden":"true"})})},{id:"install",content:e.jsx(no,{})},{id:"remote",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开远程桌面",title:"远程桌面 · 浏览器直播",onClick:()=>{s(null),nr()},children:e.jsx(at,{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),er()},children:e.jsx(Ln,{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),tr()},children:e.jsx(wt,{size:17,"aria-hidden":"true"})})},{id:"theme",content:e.jsx(Oo,{themeId:ke,onThemeChange:Ct})},{id:"files",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":ce?"关闭我的文件":"打开我的文件",title:"我的文件","aria-expanded":ce,onClick:()=>{s(null),le(r=>!r)},children:e.jsx(Wr,{size:17,"aria-hidden":"true"})})},{id:"calendar",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开智能体日历",title:"日历 · 定时任务与待办",onClick:()=>{s(null),rr()},children:e.jsx(An,{size:17,"aria-hidden":"true"})})}].filter(r=>ue.settings.visibleTools.some(i=>i===r.id)).sort((r,i)=>ue.settings.visibleTools.findIndex(m=>m===r.id)-ue.settings.visibleTools.findIndex(m=>m===i.id))})})]}),e.jsxs("main",{className:`workspace ${ce?"show-tree":""} ${de?"has-preview":""}`,hidden:!!a,style:se.workspace,children:[e.jsx("section",{className:"term-col",style:se.termCol,onPointerDownCapture:r=>{r.pointerType!=="touch"||!ar(r.target)||(pe(),Ee.current={x:r.clientX,y:r.clientY,axis:"pending",pointerId:r.pointerId})},onPointerMoveCapture:r=>{const i=Ee.current;if(!i||r.pointerId!==i.pointerId||r.pointerType!=="touch")return;const m=r.clientX-i.x,y=r.clientY-i.y;if(i.axis==="pending"){if(Math.max(Math.abs(m),Math.abs(y))<=8)return;if(Math.abs(y)>=Math.abs(m)*1.2){Ee.current=null;return}i.axis="horizontal",tt(!0);const S=$=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",S),Ee.current===i&&pe()};window.addEventListener("pointerup",S),window.addEventListener("pointercancel",S)}i.axis==="horizontal"&&(r.preventDefault(),et(m))},onPointerUpCapture:r=>{const i=Ee.current;if(!i||r.pointerId!==i.pointerId)return;const m=r.clientX-i.x;i.axis==="horizontal"&&Math.abs(m)>=64?rt(m):pe()},onPointerCancelCapture:pe,children:e.jsx("div",{ref:c,className:"terminal-track",style:{transform:`translate3d(calc(${-_t*100}% + ${Yn}px),0,0)`,transition:Gn?"none":"transform 260ms cubic-bezier(.22,.8,.32,1)"},children:I.map(r=>e.jsx("div",{className:"terminal-slide","data-console-tab":r.id,style:{position:"relative"},children:e.jsx(qo,{active:r.kind==="webapp"||!r.kind||r.id===j,children:r.kind==="webapp"?e.jsx("iframe",{ref:g,className:"webapp-frame",src:Ve("/app/"),title:r.title,onLoad:ie}):r.kind==="session-dashboard"?e.jsx(it,{view:"sessions",title:"会话 Dashboard",onFrame:i=>{v.current=i},onLoad:ie}):r.kind==="collaboration-dashboard"?e.jsx(it,{title:"群聊列表",onFrame:i=>{l.current=i},onLoad:ie}):r.kind==="collaboration"?e.jsx(it,{groupId:r.groupId||"",discussionId:r.discussionId,title:r.title,onFrame:i=>{i?h.current.set(r.id,i):h.current.delete(r.id)},onLoad:ie},`${r.id}-${r.discussionId??""}-${f[r.groupId||""]||0}`):r.kind==="remote-desktop"?e.jsxs("div",{style:{height:"100%",background:"var(--ui-term-col-bg, #101014)"},"aria-busy":!F,children:[e.jsx("iframe",{ref:T,className:"webapp-frame",style:{visibility:F?"visible":"hidden"},src:Ve("/app/?view=remote-desktop"),title:"远程桌面",onLoad:ie}),!F&&e.jsx(Ge,{label:"REMOTE DESKTOP",title:"正在打开远程桌面",caption:"正在准备桌面与连接",icon:e.jsx(at,{size:36,strokeWidth:1.5})})]}):r.kind==="calendar"?e.jsx("iframe",{className:"webapp-frame",src:Ve("/app/?view=calendar"),title:"智能体日历",onLoad:ie}):r.kind==="aihub"?e.jsx(Jo,{visible:r.id===j,rpc:k}):r.kind==="flowstudio"?e.jsx(Xo,{visible:r.id===j}):e.jsx(Ko,{terminalId:r.id,title:r.title,initialCommand:r.initialCommand,visible:r.id===j,state:X,rpc:k,onEvent:A,onTerminalData:U,onTerminalReset:q,sendTerminalInput:O,keyOrder:Qe,keybarHidden:Xe,onKeyOrderChange:jt,onKeybarHiddenChange:Et,terminalTheme:re,initialScrollLine:Re[r.id]??null,onScrollLineChange:i=>Je(m=>m[r.id]===i?m:{...m,[r.id]:i}),onRegisterFill:i=>Wn(r.id,i),onCwdChange:i=>i&&z(m=>({...m,[r.id]:i}))})})},r.id))})}),ce&&e.jsx("div",{className:"drawer-mask",onClick:()=>le(!1)}),e.jsxs("aside",{className:`tree-col ${ce?"tree-col-open":""}`,style:se.treeCol,children:[e.jsxs("div",{className:"tree-head",style:se.treeHead,children:[e.jsx("button",{className:ge==="files"?"drawer-tab-active":"",onClick:()=>$e("files"),children:"文件"}),e.jsx("button",{className:ge==="history"?"drawer-tab-active":"",onClick:()=>$e("history"),children:"历史"}),e.jsx("span",{className:"tree-cwd",style:se.treeCwd,children:Dt??""}),e.jsx("button",{style:{...se.iconBtn,marginLeft:"auto",flexShrink:0},onClick:()=>le(!1),"aria-label":"close drawer",children:e.jsx(Ce,{size:15,"aria-hidden":"true"})})]}),ge==="files"?e.jsx(Yo,{ready:_>0,followCwd:!0,cwd:Dt,gateway:P,onOpenFile:Jn,selectedPath:de,initialRoot:Ne,initialFollow:Le,revealRequest:Un,onTreeStateChange:(r,i)=>{vt(r),kt(i)}}):e.jsx(Do,{csrfToken:t.csrfToken,terminalId:(($t=I.find(r=>r.id===j))==null?void 0:$t.kind)==="webapp"?null:j,pinnedCommands:Ze,onPinnedCommandsChange:St,onFill:Fn,onExecute:Qn}),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(Go,{path:de,gateway:P,onClose:()=>Fe(null)})})]}),a&&e.jsx(bo,{page:a,reloadKey:u},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}},bi=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"}));export{Ge as F,bi as p,Wo as r};
|
|
86
|
+
`})]})}function qo({active:t,children:o}){const[a,s]=n.useState(t);return n.useEffect(()=>{t&&s(!0)},[t]),t||a?o:null}function kn(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"]),c=[];for(const u of o.tabs.slice(0,100))!u||typeof u.id!="string"||typeof u.title!="string"||a.has(u.id)||u.kind!==void 0&&!s.has(u.kind)||u.kind==="collaboration"&&typeof u.groupId!="string"||(a.add(u.id),c.push({id:u.id,title:u.title,...u.kind?{kind:u.kind}:{},...typeof u.groupId=="string"?{groupId:u.groupId}:{},...typeof u.discussionId=="string"&&/^[\w-]{1,200}$/.test(u.discussionId)?{discussionId:u.discussionId}:{}}));return{tabs:c,activeTerminalId:typeof o.activeTerminalId=="string"&&o.activeTerminalId!=="messaging"?o.activeTerminalId:null}}catch{return null}}function Ho(t,o,a){const s=new Map(o.filter(p=>p.status==="active"||p.status==="detached").map(p=>[p.id,{id:p.id,title:p.title}])),c=[],u=new Set;for(const p of[...(t==null?void 0:t.tabs)??[],...a,...s.values()])u.has(p.id)||!p.kind&&!s.has(p.id)||(u.add(p.id),c.push(p.kind?p:s.get(p.id)));return c}const Se={id:"remote-desktop",title:"远程桌面",kind:"remote-desktop"};function En(t){const o=t.find(a=>a.kind==="remote-desktop");return o?t.map(a=>a===o?{...Se}:a):[...t,{...Se}]}const De={id:"collaboration-dashboard",title:"群聊列表",kind:"collaboration-dashboard"};function jn(t){return t.some(o=>o.id===De.id)?t:[...t,{...De}]}const Ye={id:"session-dashboard",title:"Dashboard",kind:"session-dashboard"};function Sn(t){return t.some(o=>o.id===Ye.id)?t:[...t,{...Ye}]}const gt={id:"calendar",title:"日历",kind:"calendar"};function Vo(t){return t.some(o=>o.id===gt.id)?t:[...t,{...gt}]}const Ko=ze(()=>_e(()=>import("./TerminalPane-mYe76Pgb.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url),{ssr:!1}),Yo=ze(()=>_e(()=>import("./FileTree-aJGl1V0W.js"),__vite__mapDeps([18,1,2,19,20,5,21,6,10,8]),import.meta.url),{ssr:!1}),Go=ze(()=>_e(()=>import("./FilePreview-EGUAbGpH.js").then(t=>t.b),__vite__mapDeps([22,1,2,12,23,21,8,7,24,5,25]),import.meta.url),{ssr:!1}),Jo=ze(()=>_e(()=>import("./AiHubPane-D2XWxc9R.js"),__vite__mapDeps([26,1,2,5,6,27,21,28]),import.meta.url),{ssr:!1}),Xo=ze(()=>_e(()=>import("./FlowStudioPane-K1o4pSkZ.js"),__vite__mapDeps([29,1,2,30,4,5,6,7,8,9,10,11,12,3,13,14,15,16]),import.meta.url),{ssr:!1,loading:()=>e.jsx(Ge,{})});function Qo(){return e.jsx(Po,{children:(t,o)=>e.jsx(ti,{auth:t,onWorkspaceReady:o})})}const ae={id:"webapp-agent",title:"智能助手",kind:"webapp"},Cn={id:"ai-hub",title:"AI Hub",kind:"aihub"},Tn={id:"flow-studio",title:"Flow Studio",kind:"flowstudio"};function Zo(){var t;return typeof document>"u"?Lr:ct((t=document.getElementById("web-theme-root"))==null?void 0:t.dataset.webTheme).id}const ei="agent-web-shell:skin:v1";function ti({auth:t,onWorkspaceReady:o}){var zt,Wt,Ft,$t;const[a,s]=n.useState(null),c=n.useRef(null),[u,p]=n.useState(0),d=n.useCallback(r=>{if((r==null?void 0:r.openMode)==="new-tab"){window.open(r.url,"_blank","noopener,noreferrer");return}s(r)},[]),C=n.useCallback(r=>s((r==null?void 0:r.openMode)==="current"?r:null),[]),g=n.useRef(null),T=n.useRef(null),l=n.useRef(null),v=n.useRef(null),E=n.useRef(null),L=n.useRef(!1),[f,x]=n.useState({}),h=n.useRef(new Map),[w,R]=n.useState(0),[N,D]=n.useState(!1),[F,Q]=n.useState(!1),ne=n.useRef(()=>{}),J=n.useCallback(r=>{var m;const i=Co(r);if(!(!i||i.type!==ht.watcherFrame)){ne.current(i.channelId,i.sequence);for(const y of[g,T]){if(!((m=y.current)!=null&&m.contentWindow))continue;const S=i.payload.slice().buffer;y.current.contentWindow.postMessage({type:Cr,channelId:i.channelId,sequence:i.sequence,data:S},window.location.origin,[S])}}},[]),{state:X,epoch:_,rpc:k,onEvent:A,onTerminalData:U,onTerminalReset:q,sendTerminalInput:O}=Ro(J,t.getWsNonce,t.refresh),P=n.useMemo(()=>({request:(r,i,m)=>k(r,i,m),subscribe:(r,i)=>A("fs:event",i)}),[A,k]);ne.current=(r,i)=>{k("browser:frame-ack",{channelId:r,sequence:i}).catch(()=>{})};const[I,M]=n.useState([{...ae}]),oe=n.useRef(I);oe.current=I;const[j,H]=n.useState(ae.id);No(c,j,!a);const[b,z]=n.useState({}),V=n.useRef(!1),[B,Y]=n.useState(!1),[Z,xe]=n.useState(0),he=`agentroam:workspace:${typeof window>"u"?"":Oe()}:${((zt=t.user)==null?void 0:zt.id)??""}`,Te=n.useRef(null),ye=n.useRef(new Map),We=n.useRef(new Map),Wn=n.useCallback((r,i)=>{ye.current.set(r,i);const m=window.setTimeout(()=>{if(ye.current.get(r)!==i)return;const y=We.current.get(r);y&&(We.current.delete(r),i(y,!0))},180);return()=>{window.clearTimeout(m),ye.current.get(r)===i&&ye.current.delete(r)}},[]),Fn=n.useCallback(r=>{var m;if(!j||(m=I.find(y=>y.id===j))!=null&&m.kind)return;const i=ye.current.get(j);i?i(r):k("term:input",{id:j,data:`${r}`}).catch(()=>{}),le(!1)},[j,k,I]),[ve,$n]=n.useState(!1),[Re,Je]=n.useState({}),[de,Fe]=n.useState(null),[ce,le]=n.useState(!1),[ge,$e]=n.useState("files"),[Ne,vt]=n.useState(null),[Le,kt]=n.useState(!0),[Un,Bn]=n.useState(null),[Xe,Et]=n.useState(!1),[Qe,jt]=n.useState([]),[Ze,St]=n.useState(Eo()),[ke,Ct]=n.useState(Zo),[Tt,qn]=n.useState(st),[Rt,Hn]=n.useState(!1);n.useEffect(()=>{const r=()=>{try{qn(_o(window.localStorage))}catch{}Hn(!0)},i=m=>{(m.key===zn||m.key===null)&&r()};return r(),window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[]);const[Nt,Vn]=n.useState(!1),ue=vo(t.csrfToken),[Lt,Kn]=n.useState(!1),re=ct(ke),Ee=n.useRef(null),[Yn,et]=n.useState(0),[Gn,tt]=n.useState(!1),nt=n.useRef(null),Pt=n.useRef(null),It=n.useCallback(r=>{var m;const i=[g.current,T.current,l.current,v.current,...h.current.values()];for(const y of i)(m=y==null?void 0:y.contentWindow)==null||m.postMessage({type:ei,skin:r},window.location.origin)},[]),ie=n.useCallback(()=>{var i;if(It(ke),!Rt)return;const r=[g.current,T.current,l.current,v.current,...h.current.values()];for(const m of r)(i=m==null?void 0:m.contentWindow)==null||i.postMessage({type:Tr,navigationLayout:Tt},window.location.origin)},[ke,Tt,Rt,It]);n.useEffect(()=>{ie()},[ie]),n.useEffect(()=>{const r=re.cssVars["--ui-root-bg"],i=re.cssVars["--ui-color-scheme"],m=document.getElementById("web-theme-root");for(const[S,$]of Object.entries(re.cssVars))m==null||m.style.setProperty(S,$);m&&(m.dataset.webTheme=re.id),document.documentElement.style.background=r,document.documentElement.style.colorScheme=i,document.body.style.background=r,document.body.style.colorScheme=i;let y=document.querySelector('meta[name="theme-color"]');y||(y=document.createElement("meta"),y.name="theme-color",document.head.append(y)),y.content=re.cssVars["--ui-tabbar-bg"]},[re]),n.useEffect(()=>{const r=i=>{var Ut,Bt,qt,Ht,Vt,Kt,Yt,Gt,Jt,Xt,Qt,Zt,en,tn,nn,rn,on,an;const m=((Ut=l.current)==null?void 0:Ut.contentWindow)??null,y=[(Bt=g.current)==null?void 0:Bt.contentWindow,m,(qt=v.current)==null?void 0:qt.contentWindow,...[...h.current.values()].map(W=>W.contentWindow)].find(W=>W&&W===i.source)??null,S=Gr(i,window.location.origin,y);if(S){if(s(null),S.kind==="dashboard")M(Sn),H(Ye.id);else if(S.kind==="groups")M(jn),H(De.id);else if(S.kind==="group"){const W=`collaboration-${S.groupId}`,G={id:W,title:S.title,kind:"collaboration",groupId:S.groupId,discussionId:S.discussionId};M(fe=>fe.some(qe=>qe.id===W)?fe.map(qe=>qe.id===W?G:qe):[...fe,G]),H(W)}else L.current?(Vt=(Ht=g.current)==null?void 0:Ht.contentWindow)==null||Vt.postMessage({type:pn,intent:S},window.location.origin):E.current=S,H(ae.id);return}const $=Vr(i,window.location.origin,m);if($){M(W=>$.deleted?W.filter(G=>G.groupId!==$.groupId):W.map(G=>G.groupId===$.groupId?{...G,title:$.title}:G)),$.deleted?H(W=>W===`collaboration-${$.groupId}`?De.id:W):x(W=>({...W,[$.groupId]:(W[$.groupId]||0)+1}));return}const K=Kr(i,window.location.origin,i.source===m?m:((Kt=g.current)==null?void 0:Kt.contentWindow)??null);if(K){const W=`collaboration-${K.groupId}`;M(G=>G.some(fe=>fe.id===W)?G:[...G,{id:W,title:K.title,kind:"collaboration",groupId:K.groupId}]),H(W);return}const ee=((Yt=T.current)==null?void 0:Yt.contentWindow)??null,te=Xr(i,window.location.origin,ee);if(te!==null){D(te);return}if(vn(i,window.location.origin,ee)){D(!1),R(W=>W+1),Q(!1),ie();return}if(ee&&i.origin===window.location.origin&&i.source===ee&&((Gt=i.data)==null?void 0:Gt.type)===Qr){Q(!0);return}if(i.origin===window.location.origin&&i.source===ee&&ee&&((Jt=i.data)==null?void 0:Jt.type)===Zr){D(!1),k("browser:unwatch").catch(()=>{}),M(W=>W.filter(G=>G.kind!=="remote-desktop")),R(0),Q(!1),H(ae.id);return}if(Pr(i,window.location.origin,((Xt=g.current)==null?void 0:Xt.contentWindow)??null)){M(En),H(Se.id);return}if(vn(i,window.location.origin,((Qt=g.current)==null?void 0:Qt.contentWindow)??null)){L.current=!0,Kn(!0),ie(),o(),E.current&&((en=(Zt=g.current)==null?void 0:Zt.contentWindow)==null||en.postMessage({type:pn,intent:E.current},window.location.origin),E.current=null);return}const sr=(tn=[...h.current.values()].find(W=>W.contentWindow===i.source))==null?void 0:tn.contentWindow,Pe=$r(i,window.location.origin,sr??((nn=g.current)==null?void 0:nn.contentWindow)??null);if(Pe){const W=G=>{$e("files"),le(!un(G)),Fe(G),un(G)||Bn({...Pe,path:G})};Pe.path.startsWith("~/")?k("hello").then(({home:G})=>{const fe=Ur(Pe.path,null,G);fe&&W(fe)}).catch(()=>{}):W(Pe.path);return}const be=i.source===ee&&ee?ee:((rn=g.current)==null?void 0:rn.contentWindow)??null,je=Ir(i,window.location.origin,be);if(je){k(je.method,{...je.payload,...je.method==="browser:watch"?{frameAck:!0}:{}}).then(W=>{be==null||be.postMessage({type:ln,id:je.id,ok:!0,result:W},window.location.origin)},W=>{be==null||be.postMessage({type:ln,id:je.id,ok:!1,error:W.message||"浏览器操作失败",code:W.code},window.location.origin)});return}jo(i,window.location.origin,[((on=g.current)==null?void 0:on.contentWindow)??null,m,((an=v.current)==null?void 0:an.contentWindow)??null,...[...h.current.values()].map(W=>W.contentWindow)],k)};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)},[o,k,ie]),n.useEffect(()=>{const r=y=>{var S,$;for(const K of[g,T])($=(S=K.current)==null?void 0:S.contentWindow)==null||$.postMessage({type:ot,event:y},window.location.origin)},m=["browser:session","browser:frame","browser:state","browser:closed","browser:webrtc"].map(y=>A(y,r));return()=>m.forEach(y=>y())},[A]),n.useEffect(()=>{var r,i;Lt&&((i=(r=g.current)==null?void 0:r.contentWindow)==null||i.postMessage({type:ot,event:{type:"browser:connection",connected:X.connected,epoch:_}},window.location.origin))},[X.connected,_,Lt]),n.useEffect(()=>{var r,i;w&&((i=(r=T.current)==null?void 0:r.contentWindow)==null||i.postMessage({type:Jr,visible:j===Se.id},window.location.origin))},[j,w]),n.useEffect(()=>{var r,i;w&&((i=(r=T.current)==null?void 0:r.contentWindow)==null||i.postMessage({type:ot,event:{type:"browser:connection",connected:X.connected,epoch:_}},window.location.origin))},[X.connected,_,w]);const At=n.useRef(0),Dt=j?b[j]??null:null;n.useEffect(()=>{const r=window.visualViewport;let i=null,m="";const y=()=>{const S=zo(r,{height:window.innerHeight,width:window.innerWidth}),$=`${S.width}x${S.height}+${S.top}+${S.left}`;$!==m&&(m=$,document.documentElement.style.setProperty("--vv-height",`${S.height}px`),document.documentElement.style.setProperty("--vv-width",`${S.width}px`),document.documentElement.style.setProperty("--vv-top",`${S.top}px`),document.documentElement.style.setProperty("--vv-left",`${S.left}px`),i&&window.clearTimeout(i),i=window.setTimeout(y,250))};return y(),r==null||r.addEventListener("resize",y),r==null||r.addEventListener("scroll",y),window.addEventListener("orientationchange",y),window.addEventListener("resize",y),document.addEventListener("visibilitychange",y),window.addEventListener("pageshow",y),()=>{r==null||r.removeEventListener("resize",y),r==null||r.removeEventListener("scroll",y),window.removeEventListener("orientationchange",y),window.removeEventListener("resize",y),document.removeEventListener("visibilitychange",y),window.removeEventListener("pageshow",y),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")}},[]),n.useEffect(()=>{fetch("/api/web-console/preferences",{credentials:"same-origin"}).then(r=>r.json()).then(r=>{var i,m,y,S;typeof((i=r.preferences)==null?void 0:i.keybarHidden)=="boolean"&&Et(r.preferences.keybarHidden),Array.isArray((m=r.preferences)==null?void 0:m.keyOrder)&&jt(r.preferences.keyOrder),Array.isArray((y=r.preferences)==null?void 0:y.pinnedCommands)&&St(r.preferences.pinnedCommands),(S=r.preferences)!=null&&S.theme&&Ct(ct(r.preferences.theme).id)}).catch(()=>{}).finally(()=>Vn(!0)),fetch("/api/web-console/device-state",{credentials:"same-origin"}).then(r=>r.json()).then(r=>{const i=r.deviceState;i!=null&&i.drawerTab&&$e(i.drawerTab),i!=null&&i.activeTerminalId&&(Te.current=i.activeTerminalId),typeof(i==null?void 0:i.drawerOpen)=="boolean"&&le(i.drawerOpen),i!=null&&i.fileTreeRoot&&vt(i.fileTreeRoot),typeof(i==null?void 0:i.fileTreeFollowMode)=="boolean"&&kt(i.fileTreeFollowMode),i!=null&&i.selectedFile&&Fe(i.selectedFile),i!=null&&i.terminalScroll&&typeof i.terminalScroll=="object"&&Je(i.terminalScroll)}).catch(()=>{}).finally(()=>$n(!0))},[]);const Mt=n.useCallback(r=>{fetch("/api/web-console/preferences",{method:"PATCH",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":t.csrfToken},body:JSON.stringify(r)}).catch(()=>{})},[t.csrfToken]);n.useEffect(()=>{if(!Nt)return;const r=setTimeout(()=>Mt({keybarHidden:Xe,keyOrder:Qe,pinnedCommands:Ze,theme:ke}),500);return()=>clearTimeout(r)},[Xe,Qe,Ze,ke,Nt,Mt]);const Ue=n.useCallback(r=>{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(r)}).catch(()=>{})},[t.csrfToken]);n.useEffect(()=>{if(!t.csrfToken||!B||!ve)return;const r=setTimeout(()=>Ue({activeTerminalId:j,drawerOpen:ce,drawerTab:ge,fileTreeRoot:Ne,fileTreeFollowMode:Le,selectedFile:de,terminalScroll:Re}),500);return()=>clearTimeout(r)},[j,ce,ge,Ne,Le,de,Re,t.csrfToken,Ue,B,ve]),n.useEffect(()=>{if(!t.csrfToken||!B||!ve)return;const r=()=>Ue({activeTerminalId:j,drawerOpen:ce,drawerTab:ge,fileTreeRoot:Ne,fileTreeFollowMode:Le,selectedFile:de,terminalScroll:Re});return window.addEventListener("pagehide",r),()=>window.removeEventListener("pagehide",r)},[j,ce,ge,Ne,Le,de,Re,t.csrfToken,Ue,B,ve]);const Jn=n.useCallback(r=>{Fe(r),le(!1)},[]),Xn=n.useCallback(()=>{if(I.length>=8)return;const r=`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;M(i=>i.length>=8?i:[...i,{id:r,title:`Terminal ${i.length+1}`}]),H(r)},[I.length]),Qn=n.useCallback(r=>{const i=I.find(S=>S.id===j);if(i!=null&&i.kind&&i.kind!=="webapp")return;if(i&&!i.kind){const S=ye.current.get(i.id);S?S(r,!0):We.current.set(i.id,r),le(!1);return}const m=I.length>=8?I.find(S=>!S.kind):null,y=(m==null?void 0:m.id)??`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;m?We.current.set(y,r):M(S=>[...S,{id:y,title:`Terminal ${S.length+1}`,initialCommand:r}]),H(y),le(!1)},[j,I]);n.useEffect(()=>{if(!X.connected||!ve||V.current)return;V.current=!0;let r=!1,i=!1,m;return k("term:list").then(y=>{if(r)return;let S=null;try{S=kn(localStorage.getItem(he))}catch{}const $=Ho(S,y.tabs,oe.current);M($),H(K=>{const ee=oe.current.find(me=>me.id===K&&me.kind&&me.kind!=="webapp");if(ee)return ee.id;const te=(S==null?void 0:S.activeTerminalId)||Te.current||K||ae.id;return te===ae.id?ae.id:$.some(me=>me.id===te)?te:ae.id}),i=!0,Y(!0)}).catch(()=>{r||(V.current=!1,m=setTimeout(()=>xe(y=>y+1),2e3))}),()=>{r=!0,clearTimeout(m),i||(V.current=!1)}},[X.connected,ve,k,he,Z]),n.useLayoutEffect(()=>{if(B)try{const r=kn(JSON.stringify({tabs:I,activeTerminalId:j}));localStorage.setItem(he,JSON.stringify(r))}catch{}},[I,j,B,he]);const Zn=r=>{var m;if(r===ae.id)return;const i=(m=I.find(y=>y.id===r))==null?void 0:m.kind;i==="remote-desktop"&&(R(0),Q(!1),k("browser:unwatch").catch(()=>{})),!(!i&&!window.confirm("关闭页签会终止该终端进程,确认关闭?"))&&(M(y=>{var $;const S=y.filter(K=>K.id!==r);return j===r&&H((($=S[0])==null?void 0:$.id)??null),S}),i||k("term:kill",{id:r}).catch(()=>{}))},er=n.useCallback(()=>{M(r=>{const i=r.find(m=>m.kind==="aihub");return i?(H(i.id),r):(H(Cn.id),[...r,{...Cn}])})},[]),tr=n.useCallback(()=>{M(r=>{const i=r.find(m=>m.kind==="flowstudio");return i?(H(i.id),r):(H(Tn.id),[...r,{...Tn}])})},[]),nr=n.useCallback(()=>{M(En),H(Se.id)},[]),rr=n.useCallback(()=>{M(Vo),H(gt.id)},[]);n.useEffect(()=>{const r=A("term:exited",i=>{const m=i==null?void 0:i.id;m&&(M(y=>{const S=y.filter($=>$.id!==m);return H($=>{var K;return $===m?((K=S[0])==null?void 0:K.id)??null:$}),S}),Je(y=>{if(!(m in y))return y;const S={...y};return delete S[m],S}))});return()=>{r()}},[A]);const Ot=n.useCallback(r=>{if(!j||I.length<2)return;const m=(I.findIndex(y=>y.id===j)+r+I.length)%I.length;H(I[m].id)},[j,I]),_t=Math.max(0,I.findIndex(r=>r.id===j)),or=((Wt=I[_t])==null?void 0:Wt.kind)==="webapp"?re.cssVars["--ui-term-col-bg"]:re.termHostBg,ir={...se.root,...re.cssVars,"--ui-active-content-bg":or,"--ui-terminal-bg":re.termHostBg,"--ui-primary-text":re.keybar.accentText,background:"var(--ui-root-bg)",color:"var(--ui-text)"},pe=n.useCallback(()=>{Ee.current=null,et(0),tt(!1)},[]),rt=n.useCallback(r=>{Math.abs(r)>=64&&I.length>1&&Ot(r<0?1:-1),pe()},[I.length,Ot,pe]),ar=r=>r instanceof Element&&!!r.closest(".terminal-screen");n.useEffect(()=>{const r=i=>{var y;if(j!==ae.id)return;const m=Uo(i,window.location.origin,((y=g.current)==null?void 0:y.contentWindow)??null);m&&(m.phase==="move"?(tt(!0),et(m.deltaX)):m.phase==="end"?rt(m.deltaX):pe())};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)},[j,rt,pe]);const Be=n.useCallback((r="smooth")=>{const i=Pt.current;if(!i||!j)return;const m=i.querySelector(`[data-terminal-id="${j}"]`);if(!m)return;if(m===i.querySelector("[data-terminal-id]")){Wo(i);return}const y=i.querySelector(".terminal-connection"),S=(y==null?void 0:y.offsetWidth)??0,$=8,K=m.offsetLeft,ee=K+m.offsetWidth,te=i.scrollLeft,me=te+i.clientWidth-S;K<te+$?i.scrollTo({left:Math.max(0,K-$),behavior:r}):ee>me-$&&i.scrollTo({left:ee-i.clientWidth+S+$,behavior:r})},[j]);return n.useLayoutEffect(()=>{if(!j)return;const r=I.length>At.current;At.current=I.length,Be(r?"auto":"smooth")},[j,I.length,Be]),n.useEffect(()=>{const r=()=>requestAnimationFrame(()=>Be("auto"));return window.addEventListener("pageshow",r),()=>window.removeEventListener("pageshow",r)},[Be]),e.jsxs("div",{className:`web-root ${N&&j===Se.id&&!a?"is-remote-fullscreen":""}`,style:ir,children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:Rr}}),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(zr,{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(yt,{size:16})})]}),e.jsx("div",{className:"terminal-tab-list",ref:Pt,hidden:!!a,children:I.map(r=>e.jsxs("div",{"data-terminal-id":r.id,draggable:!0,className:`terminal-tab ${r.id===j?"active":""}`,onDragStart:()=>{nt.current=r.id},onDragOver:i=>i.preventDefault(),onDrop:i=>{i.preventDefault();const m=nt.current;nt.current=null,!(!m||m===r.id)&&M(y=>{const S=y.findIndex(te=>te.id===m),$=y.findIndex(te=>te.id===r.id);if(S<0||$<0)return y;const K=[...y],[ee]=K.splice(S,1);return K.splice($,0,ee),k("term:reorder",{ids:K.filter(te=>!te.kind).map(te=>te.id)}).catch(()=>{}),K})},onClick:()=>H(r.id),onDoubleClick:()=>{var m;if(r.kind)return;const i=(m=window.prompt("页签名称",r.title))==null?void 0:m.trim();i&&k("term:rename",{id:r.id,title:i}).then(()=>M(y=>y.map(S=>S.id===r.id?{...S,title:i}:S))).catch(()=>{})},children:[e.jsx("span",{children:r.title}),r.kind!=="webapp"&&e.jsx("button",{tabIndex:-1,onClick:i=>{i.stopPropagation(),Zn(r.id)},children:"×"})]},r.id))}),e.jsx("button",{className:"terminal-add","aria-label":"新建终端页签",hidden:!!a,disabled:I.length>=8,onClick:Xn,children:"+"}),e.jsx("div",{className:"terminal-connection",children:e.jsx(Nr,{sortingDisabled:!ue.loaded||ue.saving,onReorder:(r,i)=>{const m=ue.settings.visibleTools;return ue.setVisibleTools(wo(m,r,i))},avatar:e.jsx(mo,{username:((Ft=t.user)==null?void 0:Ft.username)??"?",connected:X.connected,accent:re.keybar.accent,accentText:re.keybar.accentText,selectedPageId:a==null?void 0:a.id,onSelectPage:d,onUpdatePage:C,configuration:ue,csrfToken:t.csrfToken}),items:[{id:"refresh",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"刷新页面",title:"刷新页面",onClick:()=>a?p(r=>r+1):window.location.reload(),children:e.jsx(we,{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),M(Sn),H(Ye.id)},children:e.jsx(In,{size:17,"aria-hidden":"true"})})},{id:"collaboration",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开群聊列表",title:"群聊列表",onClick:()=>{s(null),M(jn),H(De.id)},children:e.jsx(bt,{size:17,"aria-hidden":"true"})})},{id:"install",content:e.jsx(no,{})},{id:"remote",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开远程桌面",title:"远程桌面 · 浏览器直播",onClick:()=>{s(null),nr()},children:e.jsx(at,{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),er()},children:e.jsx(Ln,{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),tr()},children:e.jsx(wt,{size:17,"aria-hidden":"true"})})},{id:"theme",content:e.jsx(Oo,{themeId:ke,onThemeChange:Ct})},{id:"files",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":ce?"关闭我的文件":"打开我的文件",title:"我的文件","aria-expanded":ce,onClick:()=>{s(null),le(r=>!r)},children:e.jsx(Wr,{size:17,"aria-hidden":"true"})})},{id:"calendar",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开智能体日历",title:"日历 · 定时任务与待办",onClick:()=>{s(null),rr()},children:e.jsx(An,{size:17,"aria-hidden":"true"})})}].filter(r=>ue.settings.visibleTools.some(i=>i===r.id)).sort((r,i)=>ue.settings.visibleTools.findIndex(m=>m===r.id)-ue.settings.visibleTools.findIndex(m=>m===i.id))})})]}),e.jsxs("main",{className:`workspace ${ce?"show-tree":""} ${de?"has-preview":""}`,hidden:!!a,style:se.workspace,children:[e.jsx("section",{className:"term-col",style:se.termCol,onPointerDownCapture:r=>{r.pointerType!=="touch"||!ar(r.target)||(pe(),Ee.current={x:r.clientX,y:r.clientY,axis:"pending",pointerId:r.pointerId})},onPointerMoveCapture:r=>{const i=Ee.current;if(!i||r.pointerId!==i.pointerId||r.pointerType!=="touch")return;const m=r.clientX-i.x,y=r.clientY-i.y;if(i.axis==="pending"){if(Math.max(Math.abs(m),Math.abs(y))<=8)return;if(Math.abs(y)>=Math.abs(m)*1.2){Ee.current=null;return}i.axis="horizontal",tt(!0);const S=$=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",S),Ee.current===i&&pe()};window.addEventListener("pointerup",S),window.addEventListener("pointercancel",S)}i.axis==="horizontal"&&(r.preventDefault(),et(m))},onPointerUpCapture:r=>{const i=Ee.current;if(!i||r.pointerId!==i.pointerId)return;const m=r.clientX-i.x;i.axis==="horizontal"&&Math.abs(m)>=64?rt(m):pe()},onPointerCancelCapture:pe,children:e.jsx("div",{ref:c,className:"terminal-track",style:{transform:`translate3d(calc(${-_t*100}% + ${Yn}px),0,0)`,transition:Gn?"none":"transform 260ms cubic-bezier(.22,.8,.32,1)"},children:I.map(r=>e.jsx("div",{className:"terminal-slide","data-console-tab":r.id,style:{position:"relative"},children:e.jsx(qo,{active:r.kind==="webapp"||!r.kind||r.id===j,children:r.kind==="webapp"?e.jsx("iframe",{ref:g,className:"webapp-frame",src:Ve("/app/"),title:r.title,onLoad:ie}):r.kind==="session-dashboard"?e.jsx(it,{view:"sessions",title:"会话 Dashboard",onFrame:i=>{v.current=i},onLoad:ie}):r.kind==="collaboration-dashboard"?e.jsx(it,{title:"群聊列表",onFrame:i=>{l.current=i},onLoad:ie}):r.kind==="collaboration"?e.jsx(it,{groupId:r.groupId||"",discussionId:r.discussionId,title:r.title,onFrame:i=>{i?h.current.set(r.id,i):h.current.delete(r.id)},onLoad:ie},`${r.id}-${r.discussionId??""}-${f[r.groupId||""]||0}`):r.kind==="remote-desktop"?e.jsxs("div",{style:{height:"100%",background:"var(--ui-term-col-bg, #101014)"},"aria-busy":!F,children:[e.jsx("iframe",{ref:T,className:"webapp-frame",style:{visibility:F?"visible":"hidden"},src:Ve("/app/?view=remote-desktop"),title:"远程桌面",onLoad:ie}),!F&&e.jsx(Ge,{label:"REMOTE DESKTOP",title:"正在打开远程桌面",caption:"正在准备桌面与连接",icon:e.jsx(at,{size:36,strokeWidth:1.5})})]}):r.kind==="calendar"?e.jsx("iframe",{className:"webapp-frame",src:Ve("/app/?view=calendar"),title:"智能体日历",onLoad:ie}):r.kind==="aihub"?e.jsx(Jo,{visible:r.id===j,rpc:k}):r.kind==="flowstudio"?e.jsx(Xo,{visible:r.id===j}):e.jsx(Ko,{terminalId:r.id,title:r.title,initialCommand:r.initialCommand,visible:r.id===j,state:X,rpc:k,onEvent:A,onTerminalData:U,onTerminalReset:q,sendTerminalInput:O,keyOrder:Qe,keybarHidden:Xe,onKeyOrderChange:jt,onKeybarHiddenChange:Et,terminalTheme:re,initialScrollLine:Re[r.id]??null,onScrollLineChange:i=>Je(m=>m[r.id]===i?m:{...m,[r.id]:i}),onRegisterFill:i=>Wn(r.id,i),onCwdChange:i=>i&&z(m=>({...m,[r.id]:i}))})})},r.id))})}),ce&&e.jsx("div",{className:"drawer-mask",onClick:()=>le(!1)}),e.jsxs("aside",{className:`tree-col ${ce?"tree-col-open":""}`,style:se.treeCol,children:[e.jsxs("div",{className:"tree-head",style:se.treeHead,children:[e.jsx("button",{className:ge==="files"?"drawer-tab-active":"",onClick:()=>$e("files"),children:"文件"}),e.jsx("button",{className:ge==="history"?"drawer-tab-active":"",onClick:()=>$e("history"),children:"历史"}),e.jsx("span",{className:"tree-cwd",style:se.treeCwd,children:Dt??""}),e.jsx("button",{style:{...se.iconBtn,marginLeft:"auto",flexShrink:0},onClick:()=>le(!1),"aria-label":"close drawer",children:e.jsx(Ce,{size:15,"aria-hidden":"true"})})]}),ge==="files"?e.jsx(Yo,{ready:_>0,followCwd:!0,cwd:Dt,gateway:P,onOpenFile:Jn,selectedPath:de,initialRoot:Ne,initialFollow:Le,revealRequest:Un,onTreeStateChange:(r,i)=>{vt(r),kt(i)}}):e.jsx(Do,{csrfToken:t.csrfToken,terminalId:(($t=I.find(r=>r.id===j))==null?void 0:$t.kind)==="webapp"?null:j,pinnedCommands:Ze,onPinnedCommandsChange:St,onFill:Fn,onExecute:Qn}),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(Go,{path:de,gateway:P,onClose:()=>Fe(null)})})]}),a&&e.jsx(bo,{page:a,reloadKey:u},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}},bi=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"}));export{Ge as F,bi as p,Wo as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,r as m,d as a}from"./chunk-SVP7TREG-
|
|
1
|
+
import{g as l,r as m,d as a}from"./chunk-SVP7TREG-BLo_2ua-.js";import{p}from"./chunk-JWPE2WC7-DS7C5_M7.js";import{_ as t,l as o}from"./mermaid.core-BjNFAB9I.js";import{M as u,d as c}from"./cynefin-OW5HDTMX-CJTXYieX.js";import"./index-CTJNAMck.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-
|
|
1
|
+
import{p as rt}from"./chunk-JWPE2WC7-DS7C5_M7.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-BjNFAB9I.js";import{p as xt}from"./cynefin-OW5HDTMX-CJTXYieX.js";import{d as J}from"./arc-D4smlqs5.js";import{o as St}from"./ordinal-BENe2yWM.js";import"./index-CTJNAMck.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{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-
|
|
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-BjNFAB9I.js";import{l as ie}from"./linear-BcJhiCv3.js";import"./index-CTJNAMck.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-
|
|
1
|
+
import{g as s,r as l,d as t}from"./chunk-SVP7TREG-BLo_2ua-.js";import{p as m}from"./chunk-JWPE2WC7-DS7C5_M7.js";import{_ as n,l as i}from"./mermaid.core-BjNFAB9I.js";import{M as p,c as u}from"./cynefin-OW5HDTMX-CJTXYieX.js";import"./index-CTJNAMck.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-w8UYxZUB.js";import{s as Xe}from"./chunk-POPQ4Y6H-BK2jifSN.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-CyzKk3O2.js";import"./index-d8fS3JdV.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-D1OLqjNu.js";import{s as Xe}from"./chunk-POPQ4Y6H-DvgeK_lX.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-BjNFAB9I.js";import"./index-CTJNAMck.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{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-CyzKk3O2.js";import{o as Mt}from"./ordinal-BENe2yWM.js";import"./index-d8fS3JdV.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-BjNFAB9I.js";import{o as Mt}from"./ordinal-BENe2yWM.js";import"./index-CTJNAMck.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()+`
|