dorkos 0.121.0 → 0.122.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/dist/bin/cli.js +392 -347
  2. package/dist/browser/native/package-manifest.json +1 -1
  3. package/dist/browser/source-manifest.json +1 -1
  4. package/dist/client/assets/{AboutPage-CtI8gbER.js → AboutPage-ClN3P9B8.js} +1 -1
  5. package/dist/client/assets/{ActivityErrorState-CHTXfBS7.js → ActivityErrorState-B2lq1pyE.js} +1 -1
  6. package/dist/client/assets/{ActivityPage-B8p4yYJL.js → ActivityPage-htTkSy18.js} +1 -1
  7. package/dist/client/assets/{ActivityRow-CSuSz-92.js → ActivityRow-BqV0B1T0.js} +1 -1
  8. package/dist/client/assets/{AdapterIcon-Qnxn0cE5.js → AdapterIcon-DlkN0YJo.js} +1 -1
  9. package/dist/client/assets/{AdapterSetupWizard-BG8H-Lld.js → AdapterSetupWizard-RyNPjSmU.js} +1 -1
  10. package/dist/client/assets/{AgentOptionRow-BWFQFynn.js → AgentOptionRow-DSievGfL.js} +1 -1
  11. package/dist/client/assets/{AgentPicker-CL93SET3.js → AgentPicker-BCtWrhsA.js} +1 -1
  12. package/dist/client/assets/{AgentRequestCard-CamX7Tvr.js → AgentRequestCard-BHIHWNRz.js} +1 -1
  13. package/dist/client/assets/{AppearancePage-rN70_7ih.js → AppearancePage-B2eduuT0.js} +1 -1
  14. package/dist/client/assets/{ApplyToOverridesDialog-DeWaXbgm.js → ApplyToOverridesDialog-C7G2t3X2.js} +1 -1
  15. package/dist/client/assets/{AttentionSignalRow-CKcSWExi.js → AttentionSignalRow-_8thTHYX.js} +1 -1
  16. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-BwYaLf2P.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-WpZU5xiO.js} +1 -1
  17. package/dist/client/assets/{BindingDialog-DqPDLYbF.js → BindingDialog-BAwbHFq3.js} +1 -1
  18. package/dist/client/assets/{BlintzCanvas-DoAZs5bz.js → BlintzCanvas-BEtRmEbL.js} +3 -3
  19. package/dist/client/assets/{BlintzCanvas-xZ3u3nk7.css → BlintzCanvas-DCXOV_yN.css} +1 -1
  20. package/dist/client/assets/{CanvasCsvContent-ViqRJuhW.js → CanvasCsvContent--6i2ETyZ.js} +2 -2
  21. package/dist/client/assets/CanvasFileContent-C86nyLbI.js +2 -0
  22. package/dist/client/assets/CanvasModel3dContent-wYHHAovt.js +2 -0
  23. package/dist/client/assets/{ChatAppsOff-D0PbHYqF.js → ChatAppsOff-2Wvch1rr.js} +1 -1
  24. package/dist/client/assets/{CodeMirrorDiff-DFNSXeuV.js → CodeMirrorDiff-s1TWguZ8.js} +1 -1
  25. package/dist/client/assets/{CodeMirrorEditor-AgkgsSqN.js → CodeMirrorEditor-1ndoTbcZ.js} +1 -1
  26. package/dist/client/assets/{CommitmentList-0V6QivXH.js → CommitmentList-BK97ndab.js} +1 -1
  27. package/dist/client/assets/{CommitmentsPage-i3XoHwBj.js → CommitmentsPage-_nd37gVX.js} +1 -1
  28. package/dist/client/assets/{ComputerResourceView-RPoBc-km.js → ComputerResourceView-C2Broer4.js} +1 -1
  29. package/dist/client/assets/{ComputerViewer-2ugaCd0H.js → ComputerViewer-DgG7t2KZ.js} +1 -1
  30. package/dist/client/assets/{ConnectionAccessLists-DaPP4U96.js → ConnectionAccessLists-Pbo2lft8.js} +1 -1
  31. package/dist/client/assets/{ConnectionsPage-BVqYvfk5.js → ConnectionsPage-Dm2d9owX.js} +1 -1
  32. package/dist/client/assets/{ConventionPage-BoqncrFd.js → ConventionPage-BUltejHJ.js} +1 -1
  33. package/dist/client/assets/{ExtensionPageRoute-BrOEeNX3.js → ExtensionPageRoute-DAomCiMw.js} +1 -1
  34. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-DLwix3K7.js → FloatingTanStackRouterDevtools-CqogiFob-5fT29ZEV.js} +1 -1
  35. package/dist/client/assets/HandlePage-BoBFGnUB.js +1 -0
  36. package/dist/client/assets/{HeartbeatPage-DgXhbaBJ.js → HeartbeatPage-BW0X4YAL.js} +1 -1
  37. package/dist/client/assets/{KeyEntry-CRr32Ae5.js → KeyEntry-ClqAj0dS.js} +1 -1
  38. package/dist/client/assets/{LexicalField-DeAoA6yr.js → LexicalField-CbswpPQ7.js} +1 -1
  39. package/dist/client/assets/{ManagesPage-ZBWYLTZx.js → ManagesPage-Daqs8hys.js} +1 -1
  40. package/dist/client/assets/{Marketplace-iL5p8Omt.js → Marketplace-BNMIm8g_.js} +4 -4
  41. package/dist/client/assets/{MarketplaceSourcesView-CsNLVOdP.js → MarketplaceSourcesView-B4WpzVpr.js} +1 -1
  42. package/dist/client/assets/{McpAppFrame-B1WPswgk.js → McpAppFrame-Dbg_Ni39.js} +1 -1
  43. package/dist/client/assets/{McpSigninBody-CJ28yu0o.js → McpSigninBody-ZmmY1BZ4.js} +1 -1
  44. package/dist/client/assets/{Model3dViewer-BIZWdK8g.js → Model3dViewer-DT8x0h7T.js} +1 -1
  45. package/dist/client/assets/NamePage-bC_9FOtD.js +1 -0
  46. package/dist/client/assets/{NewDirectMessageMenu-DRx9e9kM.js → NewDirectMessageMenu-BbehZd6I.js} +1 -1
  47. package/dist/client/assets/{NotificationsPage-cfqgSuVy.js → NotificationsPage-B9zEN26O.js} +1 -1
  48. package/dist/client/assets/{OpenMeshSwitch-BIIuKDku.js → OpenMeshSwitch-D-AYDXjH.js} +1 -1
  49. package/dist/client/assets/{OperatorIdentityForm-BKUSGrs6.js → OperatorIdentityForm-BdAqzVEG.js} +1 -1
  50. package/dist/client/assets/{PermissionHistory-Ctdqhib6.js → PermissionHistory-IOgLQ7qN.js} +1 -1
  51. package/dist/client/assets/{PermissionsPage-CYA_zdrV.js → PermissionsPage-CKfDf5Pj.js} +1 -1
  52. package/dist/client/assets/{PersonalityPopover-BR4Cpr2C.js → PersonalityPopover-CHPTuHIH.js} +1 -1
  53. package/dist/client/assets/PhotoPage-BOe3xwyN.js +1 -0
  54. package/dist/client/assets/{PresetPicker-zGvDOqTf.js → PresetPicker-BcKF2ds8.js} +1 -1
  55. package/dist/client/assets/{PreviewRefusedNotice-D1Tl265t.js → PreviewRefusedNotice-BuVUhjq3.js} +1 -1
  56. package/dist/client/assets/{ProfileFields-T3vVbHRC.js → ProfileFields-DimHNpR4.js} +1 -1
  57. package/dist/client/assets/{ProfilePanelContainer-CParzTPA.js → ProfilePanelContainer-FRZ5Px2L.js} +1 -1
  58. package/dist/client/assets/{ProfileRolePicker-BU4eiMKn.js → ProfileRolePicker-UWhM5yuR.js} +1 -1
  59. package/dist/client/assets/{PromptSuggestionChips-CGNQc2Tf.js → PromptSuggestionChips-DQaDSd7Y.js} +1 -1
  60. package/dist/client/assets/{ReportsToPopover-Dj5U_Ppi.js → ReportsToPopover-BOuCM8il.js} +1 -1
  61. package/dist/client/assets/RoomSurface-Dhv-LkWz.js +44 -0
  62. package/dist/client/assets/{RoomsPage-Cvs3h6f0.js → RoomsPage-glKYJBpq.js} +1 -1
  63. package/dist/client/assets/{RunsOnPopover-BUlYwRW4.js → RunsOnPopover-BvxoHUeo.js} +1 -1
  64. package/dist/client/assets/{RuntimeConnectFlow-ChrvjC84.js → RuntimeConnectFlow-CgB_X5wo.js} +1 -1
  65. package/dist/client/assets/{RuntimeSetupDialog-BK9yo7YF.js → RuntimeSetupDialog-r1Ss_YQW.js} +1 -1
  66. package/dist/client/assets/{SessionsPage-CWUwU3US.js → SessionsPage-CFLDx-aF.js} +1 -1
  67. package/dist/client/assets/{SettingsDialog-BApzy0J8.js → SettingsDialog-BT5rYJUm.js} +1 -1
  68. package/dist/client/assets/{SkillsPage-z3XnApNX.js → SkillsPage-CUQZ4I_r.js} +1 -1
  69. package/dist/client/assets/{TaskDialogWrapper-BEWUpAlk.js → TaskDialogWrapper-DWpxyxBb.js} +1 -1
  70. package/dist/client/assets/{TasksEmptyState-CLwpLnIO.js → TasksEmptyState-B4TjUm8G.js} +1 -1
  71. package/dist/client/assets/{TasksPage-CyHjr9OZ.js → TasksPage-D_vFBDA1.js} +1 -1
  72. package/dist/client/assets/{TeamComputerEntry-BHHIofx3.js → TeamComputerEntry-EQ1fjMRb.js} +1 -1
  73. package/dist/client/assets/{ToolsPage-CckCco8x.js → ToolsPage-CyNXCe2l.js} +1 -1
  74. package/dist/client/assets/{TopologyGraph-Dox7aWP3.js → TopologyGraph-DsPEpDjt.js} +1 -1
  75. package/dist/client/assets/{TourHost-CTBewD-a.js → TourHost-D1z2mH5S.js} +1 -1
  76. package/dist/client/assets/{UnlinkDialog-CFRgExId.js → UnlinkDialog-q-6B4Ftt.js} +1 -1
  77. package/dist/client/assets/{WidgetErrorCard-Dx5oPMlF.js → WidgetErrorCard-BYMiUiAf.js} +1 -1
  78. package/dist/client/assets/_shell-scIpUrVY.js +80 -0
  79. package/dist/client/assets/{_shell._home-DnBkgWs4.js → _shell._home-D-8JcUYq.js} +1 -1
  80. package/dist/client/assets/{_shell._home.activity-CVCC-EEI.js → _shell._home.activity-xJKxWbtL.js} +1 -1
  81. package/dist/client/assets/{_shell._home.index-Ck6jxwIx.js → _shell._home.index-C74gh1aE.js} +1 -1
  82. package/dist/client/assets/{_shell._home.tasks-B7QQAZnA.js → _shell._home.tasks-Bh8jwRYJ.js} +1 -1
  83. package/dist/client/assets/{_shell._home.workspaces-DlrRd9tv.js → _shell._home.workspaces-BKkUl6wW.js} +1 -1
  84. package/dist/client/assets/{_shell.channels-CiWehoyl.js → _shell.channels-B2A1G9n8.js} +4 -4
  85. package/dist/client/assets/{_shell.connections-CGP5hZHq.js → _shell.connections-eDlPXmuG.js} +1 -1
  86. package/dist/client/assets/{_shell.feedback-requests-BxxNvw6j.js → _shell.feedback-requests-Cdbl3oKj.js} +1 -1
  87. package/dist/client/assets/_shell.marketplace-FHQpZxgB.js +1 -0
  88. package/dist/client/assets/_shell.marketplace_.sources-DXv90Z-v.js +1 -0
  89. package/dist/client/assets/_shell.session-BNeYm91q.js +63 -0
  90. package/dist/client/assets/{_shell.team-CsXH3NkS.js → _shell.team-Consxq97.js} +3 -3
  91. package/dist/client/assets/_shell.x._extensionId-DirEl_qN.js +1 -0
  92. package/dist/client/assets/_shell.x._extensionId_._-DirEl_qN.js +1 -0
  93. package/dist/client/assets/{abnfDiagram-WEYOIA3C-CMdkyiQ3.js → abnfDiagram-WEYOIA3C-DXTlLd8s.js} +1 -1
  94. package/dist/client/assets/{access-copy-CW-z1oMH.js → access-copy-B1SlOYEi.js} +1 -1
  95. package/dist/client/assets/{arc-Bw7tftQk.js → arc-B3IW5TXq.js} +1 -1
  96. package/dist/client/assets/{architectureDiagram-ZHVYKT53-BhpXALtX.js → architectureDiagram-ZHVYKT53-Bx-4szWe.js} +1 -1
  97. package/dist/client/assets/{banner-EomQNDOH.js → banner-RKoWGrEp.js} +1 -1
  98. package/dist/client/assets/{blockDiagram-RJAE7QA3-Bxk_BuZv.js → blockDiagram-RJAE7QA3-D_B3EDQ1.js} +1 -1
  99. package/dist/client/assets/{c4Diagram-XDPPPE54-CYN0FwR8.js → c4Diagram-XDPPPE54-CSBl4ROD.js} +1 -1
  100. package/dist/client/assets/{card-ww4ebz8h.js → card-DTMhLU7B.js} +1 -1
  101. package/dist/client/assets/channel-BlEJg4XA.js +1 -0
  102. package/dist/client/assets/{chunk-2E7WHVMD-IPDvYcPa.js → chunk-2E7WHVMD-QSgLcVHQ.js} +1 -1
  103. package/dist/client/assets/{chunk-2Q5K7J3B-DZ5bU5Ax.js → chunk-2Q5K7J3B-CAEYyBSj.js} +1 -1
  104. package/dist/client/assets/{chunk-4EMNKR2T-DrsWxa6Y.js → chunk-4EMNKR2T-CQ_90aiz.js} +1 -1
  105. package/dist/client/assets/{chunk-55XCU76K-CiBbKG0b.js → chunk-55XCU76K-jsUyUA3N.js} +1 -1
  106. package/dist/client/assets/{chunk-5VM5RSS4-B3K3MUav.js → chunk-5VM5RSS4-JHkf15PA.js} +1 -1
  107. package/dist/client/assets/{chunk-JWPE2WC7-CjV5RcIh.js → chunk-JWPE2WC7-BT-3krv8.js} +1 -1
  108. package/dist/client/assets/{chunk-VQ5W62QI-CWoRr0H2.js → chunk-VQ5W62QI-CJP11I5o.js} +1 -1
  109. package/dist/client/assets/{chunk-XXDRQBXY-E0nvzXiG.js → chunk-XXDRQBXY-BpqBecnj.js} +1 -1
  110. package/dist/client/assets/{chunk-ZCHMQSOR-DFop6Lvt.js → chunk-ZCHMQSOR-BLb4KcT4.js} +2 -2
  111. package/dist/client/assets/{classDiagram-v2-4MYWR3UA-B7JJfc9z.js → classDiagram-v2-4MYWR3UA-DwLyYGkw.js} +1 -1
  112. package/dist/client/assets/{command-D4fLpJxA.js → command-DDSiiJlP.js} +1 -1
  113. package/dist/client/assets/{cose-bilkent-JH36ORCC-BjNppl29.js → cose-bilkent-JH36ORCC-CxYTET88.js} +1 -1
  114. package/dist/client/assets/{cpu-DCe0Yyml.js → cpu--56q_Ey0.js} +1 -1
  115. package/dist/client/assets/{cynefin-EF2NZ3EQ-PmRntJwW.js → cynefin-EF2NZ3EQ-9fHLZRHz.js} +1 -1
  116. package/dist/client/assets/{cynefinDiagram-WF24UDRP-Ctdbp_Vg.js → cynefinDiagram-WF24UDRP-DpfQecff.js} +1 -1
  117. package/dist/client/assets/{dagre-NK4GIZVX-5tvLY2ZW.js → dagre-NK4GIZVX-DuV6buEQ.js} +1 -1
  118. package/dist/client/assets/{diagram-CBK3MWTC-DZO-XBOO.js → diagram-CBK3MWTC-B-A9Sx5n.js} +1 -1
  119. package/dist/client/assets/{diagram-I5XIIV2D-CWBbA1Pv.js → diagram-I5XIIV2D-Ds5Hq9aV.js} +1 -1
  120. package/dist/client/assets/{diagram-ODIL2UCW-hP5A1tGl.js → diagram-ODIL2UCW-UUfSjM-R.js} +1 -1
  121. package/dist/client/assets/{diagram-PFBEJUXE-EI_-RoN7.js → diagram-PFBEJUXE-CUzSSYf9.js} +1 -1
  122. package/dist/client/assets/{diagram-RJA3I4VV-TrYq9A4Z.js → diagram-RJA3I4VV-Cgp6U3q1.js} +1 -1
  123. package/dist/client/assets/{diagram-TYUNFSNR-BAQq2OM5.js → diagram-TYUNFSNR-BxVgzMNE.js} +1 -1
  124. package/dist/client/assets/{ebnfDiagram-V4P3TTPT-cKbeW9dQ.js → ebnfDiagram-V4P3TTPT-BgDiHzoi.js} +1 -1
  125. package/dist/client/assets/{elk-QONTBCTQ-wpfNPp0q.js → elk-QONTBCTQ-BCCN6mFs.js} +1 -1
  126. package/dist/client/assets/{empty-state-DXWQsHMf.js → empty-state-BsA3jcrO.js} +1 -1
  127. package/dist/client/assets/{erDiagram-KYQIGQAA-Dk0OrvjE.js → erDiagram-KYQIGQAA-5RkmUbLz.js} +1 -1
  128. package/dist/client/assets/{execution-config-CAyT2Qoo.js → execution-config-CRkSeCj7.js} +1 -1
  129. package/dist/client/assets/{file-Bf7D_47y.js → file-Bg_qGvWR.js} +1 -1
  130. package/dist/client/assets/{file-exclamation-point-DZXE9_8o.js → file-exclamation-point-BWsLZQVN.js} +1 -1
  131. package/dist/client/assets/{file-text-C1ougnBY.js → file-text-DQThCdY3.js} +1 -1
  132. package/dist/client/assets/{find-latest-widget-fence-B1_-pC-Z.js → find-latest-widget-fence-DFpYPIlS.js} +1 -1
  133. package/dist/client/assets/{flowDiagram-IUGLLWBU-CdlOoRZV.js → flowDiagram-IUGLLWBU-C2FFT_4u.js} +1 -1
  134. package/dist/client/assets/{form-D7kF-U0d.js → form-DjMe15QR.js} +1 -1
  135. package/dist/client/assets/{format-cron-ZtliseYi.js → format-cron-Bo3D4N9C.js} +1 -1
  136. package/dist/client/assets/{ganttDiagram-R7GPNTJY-x0MJLv5d.js → ganttDiagram-R7GPNTJY-BHG-HNDj.js} +1 -1
  137. package/dist/client/assets/{git-branch-B2k77X3Q.js → git-branch-CJ1NlVLY.js} +1 -1
  138. package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-CruCvk7w.js → gitGraphDiagram-PDYL7XHY-D4bvs6_J.js} +1 -1
  139. package/dist/client/assets/{graph-5PBe05F8.js → graph-D8MBmHRU.js} +1 -1
  140. package/dist/client/assets/{heart-CmqGJPDc.js → heart-Beze5rli.js} +1 -1
  141. package/dist/client/assets/{highlighted-body-KPVGNVTW-Bqu2cQDj.js → highlighted-body-KPVGNVTW-B-za1R0D.js} +1 -1
  142. package/dist/client/assets/{image-lightbox-BBbz-ThL.js → image-lightbox-a4gqhNXS.js} +1 -1
  143. package/dist/client/assets/{image-off-BCtWIY4q.js → image-off-dQCXn9D_.js} +1 -1
  144. package/dist/client/assets/{index-8IAr9b71.js → index--vwACals.js} +1 -1
  145. package/dist/client/assets/{index-rWZWP3Wh.js → index-B3VKw60l.js} +1 -1
  146. package/dist/client/assets/index-B3ybVnXe.js +23 -0
  147. package/dist/client/assets/{index-DIxzqCwG.js → index-BJv8b9cZ.js} +1 -1
  148. package/dist/client/assets/{index-Cv0GsC4n.js → index-BMhblg3s.js} +1 -1
  149. package/dist/client/assets/{index-yI1r4pSP.js → index-BMktWriw.js} +1 -1
  150. package/dist/client/assets/{index-BIIH5CXj.js → index-BPa0ZczY.js} +1 -1
  151. package/dist/client/assets/{index-ClBIPuLA.js → index-BTVsyrd0.js} +1 -1
  152. package/dist/client/assets/{index-EdJm7ZN-.js → index-BTfwunle.js} +1 -1
  153. package/dist/client/assets/{index-DrA03bMq.js → index-BaocSCDH.js} +1 -1
  154. package/dist/client/assets/{index-BpmmNapD.js → index-Bk6YahnN.js} +1 -1
  155. package/dist/client/assets/{index-B5rRtvWx.js → index-BqwfU5a7.js} +1 -1
  156. package/dist/client/assets/index-BydIKjk5.js +1 -0
  157. package/dist/client/assets/{index-BfRW2WTx.js → index-C38pc-JE.js} +1 -1
  158. package/dist/client/assets/{index-BuGQxHrf.js → index-C9qjJR0B.js} +1 -1
  159. package/dist/client/assets/{index-C11Ssk2u.js → index-CAGOE4EU.js} +2 -2
  160. package/dist/client/assets/{index-DsJWzmWw.js → index-CDm1XkU1.js} +1 -1
  161. package/dist/client/assets/{index-JxeBJIuE.js → index-CGVRWEpN.js} +1 -1
  162. package/dist/client/assets/{index-BXMxoWrk.js → index-CMlVfxJv.js} +1 -1
  163. package/dist/client/assets/{index-Do6eeFps.js → index-CPxcbKL6.js} +2 -2
  164. package/dist/client/assets/{index-CMNc_OrC.js → index-CU-gekzq.js} +1 -1
  165. package/dist/client/assets/{index-CJ5v2_Cz.js → index-Ckv0K82u.js} +1 -1
  166. package/dist/client/assets/{index-mFOJXyAE.js → index-CocSe_I3.js} +3 -3
  167. package/dist/client/assets/{index-B6dEbNhI.js → index-CodC2rG4.js} +1 -1
  168. package/dist/client/assets/{index-DbDI5BAA.js → index-CxWJDJW7.js} +1 -1
  169. package/dist/client/assets/index-D18FqQKB.js +1 -0
  170. package/dist/client/assets/{index-ChwNEkM8.js → index-D4mYlxG0.js} +1 -1
  171. package/dist/client/assets/{index-DcZPWi_I.js → index-DBdO-_iL.js} +247 -247
  172. package/dist/client/assets/{index-BrQGZ6iF.js → index-DFN-GU8r.js} +1 -1
  173. package/dist/client/assets/{index-t4Ud6YTX.js → index-DLdpa3d4.js} +1 -1
  174. package/dist/client/assets/{index-8TfzCkKR.js → index-DNlhbCX_.js} +1 -1
  175. package/dist/client/assets/{index-DAdo_yIq.js → index-D_KBdkA4.js} +1 -1
  176. package/dist/client/assets/{index-BCk4wW-T.js → index-Dbt6ttQb.js} +1 -1
  177. package/dist/client/assets/{index-BXZlDqvy.js → index-DfSOcv9s.js} +1 -1
  178. package/dist/client/assets/{index-Dmn03xST.js → index-DnfhvN3q.js} +1 -1
  179. package/dist/client/assets/{index-CQ0VLZf-.js → index-DpX_xwGs.js} +1 -1
  180. package/dist/client/assets/{index-xmk9Ohv9.js → index-DqD-Sg0W.js} +1 -1
  181. package/dist/client/assets/{index-xaMF1mrN.js → index-Ds-LCBb6.js} +1 -1
  182. package/dist/client/assets/index-dnaC3n0i.js +17 -0
  183. package/dist/client/assets/{index-CtycM8wY.js → index-hKY0860x.js} +1 -1
  184. package/dist/client/assets/{index-BzPgsdPn.js → index-vNaWkS8Y.js} +1 -1
  185. package/dist/client/assets/{index-1ShgR_xt.js → index-vieeLeZH.js} +1 -1
  186. package/dist/client/assets/{index-Cml5572f.js → index-yDf4EVDy.js} +1 -1
  187. package/dist/client/assets/{index.esm-CZZtbPRj.js → index.esm-Ruqz-OsH.js} +1 -1
  188. package/dist/client/assets/{infoDiagram-MVDRKAX5-Bj9DD77n.js → infoDiagram-MVDRKAX5-CmDlX3lx.js} +1 -1
  189. package/dist/client/assets/{inline-code-g9PVHZI2.js → inline-code-plzdKGm9.js} +1 -1
  190. package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-DckI6dhS.js → ishikawaDiagram-HPEHV2GE-DZFRAvrx.js} +1 -1
  191. package/dist/client/assets/{journeyDiagram-BOSHW7O7-Ce1GAVa0.js → journeyDiagram-BOSHW7O7-B140KXYu.js} +1 -1
  192. package/dist/client/assets/{kanban-definition-FNSA4HC5-Kq5O9rZa.js → kanban-definition-FNSA4HC5-QCZgRJic.js} +1 -1
  193. package/dist/client/assets/{layers-D3lEdRF0.js → layers-Br3LALac.js} +1 -1
  194. package/dist/client/assets/{lightbulb-BFE-KkFU.js → lightbulb-CeJgUDoT.js} +1 -1
  195. package/dist/client/assets/{link-2-Dvb6g-2Q.js → link-2-BXcZwTAC.js} +1 -1
  196. package/dist/client/assets/{list-runtime-types-8YGEK3Al.js → list-runtime-types-CqKIrt9D.js} +1 -1
  197. package/dist/client/assets/{markdown-content-Cqq_QMXA.js → markdown-content-BKbjOTI2.js} +1 -1
  198. package/dist/client/assets/{mention-pill-Bnzt4u2l.js → mention-pill-B-FgNE6o.js} +1 -1
  199. package/dist/client/assets/{mermaid.core-dpp59v7L.js → mermaid.core-Br9hJ7FR.js} +4 -4
  200. package/dist/client/assets/{message-square-off-BX2XnEDx.js → message-square-off-Co0W--np.js} +1 -1
  201. package/dist/client/assets/{mindmap-definition-6OY57UG3-CFdfJO6g.js → mindmap-definition-6OY57UG3-BxjSZAec.js} +1 -1
  202. package/dist/client/assets/{more-details-B4lBMpKi.js → more-details-BsdCkGTg.js} +1 -1
  203. package/dist/client/assets/{owner-notice-ByjrIRmX.js → owner-notice-BxltHzJH.js} +1 -1
  204. package/dist/client/assets/{package-6Rbxg35g.js → package-DPgmy9lP.js} +1 -1
  205. package/dist/client/assets/{page-container-DoZzad36.js → page-container-HokGbFg_.js} +1 -1
  206. package/dist/client/assets/{paperclip-B-jDXtxw.js → paperclip-BDnApT-_.js} +1 -1
  207. package/dist/client/assets/{path-input-DpqUD8hN.js → path-input-C22n3ghr.js} +1 -1
  208. package/dist/client/assets/{pegDiagram-ECIUJNBX-eVnSw2Ma.js → pegDiagram-ECIUJNBX-utA2pUiu.js} +1 -1
  209. package/dist/client/assets/{pieDiagram-GNMPY74T-BYG7LY5Q.js → pieDiagram-GNMPY74T-DjEry_VP.js} +1 -1
  210. package/dist/client/assets/{plug-DnaAhcy4.js → plug-tLTAmXis.js} +1 -1
  211. package/dist/client/assets/{primer-trigger-Da5ECjY8.js → primer-trigger-CfVHNFbe.js} +1 -1
  212. package/dist/client/assets/{profile-errors-GbTNc2-M.js → profile-errors-Dvm4O6MR.js} +1 -1
  213. package/dist/client/assets/{progress-DlIRjXIA.js → progress-BduTwXMX.js} +1 -1
  214. package/dist/client/assets/{quadrantDiagram-D57K4MC3-CRgNKuHR.js → quadrantDiagram-D57K4MC3-DO9NgnEq.js} +1 -1
  215. package/dist/client/assets/{query-error-state-DB-Jby7_.js → query-error-state-puwJHnzi.js} +1 -1
  216. package/dist/client/assets/query-keys-DeYqUDia.js +1 -0
  217. package/dist/client/assets/{radio-CaaE60ws.js → radio-DR4E05zZ.js} +1 -1
  218. package/dist/client/assets/{railroadDiagram-Y72NRBL7-DGL-Hqz9.js → railroadDiagram-Y72NRBL7-BTilAS9p.js} +1 -1
  219. package/dist/client/assets/registry-B3Ss4ItQ.js +1 -0
  220. package/dist/client/assets/{relay-trace-schemas-CcCqyOrA.js → relay-trace-schemas-DwqIIDB9.js} +1 -1
  221. package/dist/client/assets/{requirementDiagram-EQYSW5RA-DKsFpU3l.js → requirementDiagram-EQYSW5RA-C6rzY7GK.js} +1 -1
  222. package/dist/client/assets/{room-files-source-CbbVpvSW.js → room-files-source-Duo4oiqX.js} +1 -1
  223. package/dist/client/assets/{rotate-ccw-clock-CeY00nlZ.js → rotate-ccw-clock-RJuoRE3k.js} +1 -1
  224. package/dist/client/assets/{rotate-cw-Djl5J_x9.js → rotate-cw-C0EpbK5k.js} +1 -1
  225. package/dist/client/assets/{sankeyDiagram-SY24JHO5-BFRkDxic.js → sankeyDiagram-SY24JHO5-BqpJRY1t.js} +1 -1
  226. package/dist/client/assets/{scroll-area-BOqrziJf.js → scroll-area-07T90PR6.js} +1 -1
  227. package/dist/client/assets/{search-x-B_mHjnlo.js → search-x-DQabogEL.js} +1 -1
  228. package/dist/client/assets/{sequenceDiagram-BLEHNHQU-fHea3KOI.js → sequenceDiagram-BLEHNHQU-BHfzZpFt.js} +1 -1
  229. package/dist/client/assets/{shield-check-Csnr5rFy.js → shield-check-DbbCy17l.js} +1 -1
  230. package/dist/client/assets/{shield-x-Dhl4YvvW.js → shield-x-Cuo1GTv4.js} +1 -1
  231. package/dist/client/assets/{signed-in-BMqAss8c.js → signed-in-CFtA8gTK.js} +1 -1
  232. package/dist/client/assets/{sizeCapture-INFHLROL-CztsD3qF.js → sizeCapture-INFHLROL-U0MO-4ua.js} +1 -1
  233. package/dist/client/assets/{soul-file-DOfamgB5.js → soul-file-wKTqbR0Y.js} +1 -1
  234. package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-CWyOqZ9S.js → stateDiagram-v2-A6IESKWZ-fzo1sDsX.js} +1 -1
  235. package/dist/client/assets/{swimlanes-B3ENRKFQ-0EfOxSAX.js → swimlanes-B3ENRKFQ-B7QcCUBU.js} +1 -1
  236. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-CgZZnzbW.js +8 -0
  237. package/dist/client/assets/{table-L7FvN6Or.js → table-BjHA85BX.js} +1 -1
  238. package/dist/client/assets/{terminal-C9M5a_PS.js → terminal-qfxxVZaa.js} +1 -1
  239. package/dist/client/assets/{timeline-definition-JXYKGLGB-sFyYvZ20.js → timeline-definition-JXYKGLGB-okVlmef4.js} +1 -1
  240. package/dist/client/assets/{trust-posture-dl6qwDtI.js → trust-posture-BmW0KVP6.js} +1 -1
  241. package/dist/client/assets/{unplug-CFUEVRbc.js → unplug-BYKBdSMl.js} +1 -1
  242. package/dist/client/assets/{unverified-catalog-notice-CdYU3WEJ.js → unverified-catalog-notice-CQHA4Cst.js} +1 -1
  243. package/dist/client/assets/{use-adapter-catalog-YTofdqDJ.js → use-adapter-catalog-rB4qQQ5D.js} +1 -1
  244. package/dist/client/assets/{use-bindings-CpyT6kNu.js → use-bindings-DiFC7kWg.js} +1 -1
  245. package/dist/client/assets/{use-composer-prefs-CK_EK_QJ.js → use-composer-prefs-DHY5vJ0l.js} +1 -1
  246. package/dist/client/assets/{use-connector-management-DwoK8kon.js → use-connector-management-CoinXIID.js} +1 -1
  247. package/dist/client/assets/{use-deep-link-scroll-CgRjt48R.js → use-deep-link-scroll-Cm8BRFAE.js} +1 -1
  248. package/dist/client/assets/{use-delete-binding-CfsnMXrL.js → use-delete-binding-FtM6qPfF.js} +1 -1
  249. package/dist/client/assets/{use-dev-links-B3I-ZK34.js → use-dev-links-TQFCV3vk.js} +1 -1
  250. package/dist/client/assets/{use-external-adapter-catalog-aGlZNRrp.js → use-external-adapter-catalog-Lx8LZDAa.js} +1 -1
  251. package/dist/client/assets/{use-full-activity-feed-B61Olhdw.js → use-full-activity-feed-CmcBAvUM.js} +1 -1
  252. package/dist/client/assets/use-is-below-desktop-BB9kHnYm.js +1 -0
  253. package/dist/client/assets/use-is-hub-ab4UGRdN.js +1 -0
  254. package/dist/client/assets/{use-jump-back-in-C39GOTHa.js → use-jump-back-in-V8G_6fYj.js} +1 -1
  255. package/dist/client/assets/{use-local-browser-DCwzB4D8.js → use-local-browser-CbS4typW.js} +1 -1
  256. package/dist/client/assets/{use-mesh-topology-LRYxFuZp.js → use-mesh-topology-DZ1qMT3J.js} +1 -1
  257. package/dist/client/assets/{use-mounted-ref-CZaegwTr.js → use-mounted-ref-DUbNzP-m.js} +1 -1
  258. package/dist/client/assets/{use-notification-prefs-FtOiUS5H.js → use-notification-prefs-BAsICJ96.js} +1 -1
  259. package/dist/client/assets/{use-panel-tab-placements-Dv2OPvKh.js → use-panel-tab-placements-ymrpuL_s.js} +1 -1
  260. package/dist/client/assets/use-pending-read-BkCvAuX4.js +1 -0
  261. package/dist/client/assets/{use-personality-commit-BB5aeh6p.js → use-personality-commit-rJOmDgC2.js} +1 -1
  262. package/dist/client/assets/{use-promo-activation-BW0u7n7m.js → use-promo-activation-BKeBloMI.js} +1 -1
  263. package/dist/client/assets/{use-promo-dismissals-BOXzW4kD.js → use-promo-dismissals-Cio8QMjL.js} +1 -1
  264. package/dist/client/assets/{use-pulse-freshness-ClW-MLMo.js → use-pulse-freshness-DZkMVbSM.js} +1 -1
  265. package/dist/client/assets/{use-relay-config-hItHtkSr.js → use-relay-config-CbZQKFhZ.js} +1 -1
  266. package/dist/client/assets/{use-room-follow-claim-wotzxUWc.js → use-room-follow-claim-DbJIsuWz.js} +1 -1
  267. package/dist/client/assets/{use-roving-tab-list-DkbO6xSs.js → use-roving-tab-list-B4nZ7trj.js} +1 -1
  268. package/dist/client/assets/use-session-canvas-sAwc2L1A.js +25 -0
  269. package/dist/client/assets/{use-session-diagnostics-DmxvD-wy.js → use-session-diagnostics-0gcI762B.js} +2 -2
  270. package/dist/client/assets/{use-unclaimed-chats-DKpexDm3.js → use-unclaimed-chats-BWIqOrvs.js} +1 -1
  271. package/dist/client/assets/use-update-config-DTL7WyZV.js +1 -0
  272. package/dist/client/assets/{useMutationState-Btf2Hp1a.js → useMutationState-C9Q5lRej.js} +1 -1
  273. package/dist/client/assets/{usecaseDiagram-WPOLBNNX-DRngjDUq.js → usecaseDiagram-WPOLBNNX-CMjVaeX9.js} +1 -1
  274. package/dist/client/assets/{vennDiagram-Q3Y3IDCW-iK-dlS1-.js → vennDiagram-Q3Y3IDCW-BajZBf0H.js} +1 -1
  275. package/dist/client/assets/{wardleyDiagram-IVAIDKWA-sOS67Cks.js → wardleyDiagram-IVAIDKWA-BN4xF6JT.js} +1 -1
  276. package/dist/client/assets/{xychartDiagram-4URNHDU4-EgnLiIao.js → xychartDiagram-4URNHDU4-Cy0Z9a28.js} +1 -1
  277. package/dist/client/index.html +1 -1
  278. package/dist/server/index.js +30173 -28514
  279. package/dist/server/index.js.map +2 -2
  280. package/package.json +6 -6
  281. package/dist/client/assets/CanvasFileContent-ClcHZ_l-.js +0 -2
  282. package/dist/client/assets/CanvasModel3dContent-Cm3msNdQ.js +0 -2
  283. package/dist/client/assets/HandlePage-B_5GLHsp.js +0 -1
  284. package/dist/client/assets/NamePage-0nr288eM.js +0 -1
  285. package/dist/client/assets/PhotoPage-C3Ir3wlA.js +0 -1
  286. package/dist/client/assets/RoomSurface-BIyjtxKD.js +0 -44
  287. package/dist/client/assets/_shell-BHUZq_8C.js +0 -80
  288. package/dist/client/assets/_shell.marketplace-BoAmyvPt.js +0 -1
  289. package/dist/client/assets/_shell.marketplace_.sources-BpqWjkGL.js +0 -1
  290. package/dist/client/assets/_shell.session-KyPj3OxK.js +0 -61
  291. package/dist/client/assets/_shell.x._extensionId-CfiAgtoq.js +0 -1
  292. package/dist/client/assets/_shell.x._extensionId_._-CfiAgtoq.js +0 -1
  293. package/dist/client/assets/channel-DZpRF3QJ.js +0 -1
  294. package/dist/client/assets/index-Cl8trmnL.js +0 -1
  295. package/dist/client/assets/index-Cp3yShS8.js +0 -23
  296. package/dist/client/assets/index-DKDK-3KH.js +0 -17
  297. package/dist/client/assets/index-DPNBHwcQ.js +0 -1
  298. package/dist/client/assets/registry-DS1Ghdft.js +0 -1
  299. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-C7fkUKrq.js +0 -8
  300. package/dist/client/assets/use-is-below-desktop-Qwyg-mFb.js +0 -1
  301. package/dist/client/assets/use-is-hub-CSz6NDaP.js +0 -1
  302. package/dist/client/assets/use-pending-read-DBOl1ee_.js +0 -1
  303. package/dist/client/assets/use-session-canvas-C_fuAgW_.js +0 -24
  304. package/dist/client/assets/use-update-config-CSYwg557.js +0 -1
@@ -1,4 +1,4 @@
1
- import{em as Ee,a1 as xe,aW as Re,r as ve,a2 as Se,j,G as Ce}from"./index-DcZPWi_I.js";import{u as Oe}from"./index-yI1r4pSP.js";import{r as Te}from"./use-session-canvas-C_fuAgW_.js";import"./rotate-cw-Djl5J_x9.js";import"./index.esm-CZZtbPRj.js";import"./WidgetErrorCard-Dx5oPMlF.js";import"./index-1ShgR_xt.js";import"./card-ww4ebz8h.js";import"./progress-DlIRjXIA.js";import"./markdown-content-Cqq_QMXA.js";import"./table-L7FvN6Or.js";import"./terminal-C9M5a_PS.js";import"./package-6Rbxg35g.js";import"./heart-CmqGJPDc.js";import"./git-branch-B2k77X3Q.js";import"./file-text-C1ougnBY.js";import"./file-Bf7D_47y.js";import"./McpAppFrame-B1WPswgk.js";import"./more-details-B4lBMpKi.js";var he={exports:{}};/* @license
1
+ import{em as Ee,a1 as xe,aW as Re,r as ve,a2 as Se,j,G as Ce}from"./index-DBdO-_iL.js";import{u as Oe}from"./index-BMktWriw.js";import{r as Te}from"./use-session-canvas-sAwc2L1A.js";import"./rotate-cw-C0EpbK5k.js";import"./query-keys-DeYqUDia.js";import"./index.esm-Ruqz-OsH.js";import"./WidgetErrorCard-BYMiUiAf.js";import"./index-vieeLeZH.js";import"./card-DTMhLU7B.js";import"./progress-BduTwXMX.js";import"./markdown-content-BKbjOTI2.js";import"./table-BjHA85BX.js";import"./terminal-qfxxVZaa.js";import"./package-DPgmy9lP.js";import"./heart-Beze5rli.js";import"./git-branch-CJ1NlVLY.js";import"./file-text-DQThCdY3.js";import"./file-Bg_qGvWR.js";import"./McpAppFrame-Dbg_Ni39.js";import"./more-details-BsdCkGTg.js";var he={exports:{}};/* @license
2
2
  Papa Parse
3
3
  v5.7.0
4
4
  https://github.com/mholt/PapaParse
@@ -12,4 +12,4 @@ License: MIT
12
12
  `&&(r=`
13
13
  `);var u=0,D=!1;this.parse=function(l,d,n){if(typeof l!="string")throw new Error("Input must be a string");var F=l.length,k=e.length,x=r.length,M=s.length,p=E(i),f=[],b=[],a=[],R=u=0;if(!l)return T();if(I||I!==!1&&l.indexOf(w)===-1){for(var O=l.split(r),_=0;_<O.length;_++){if(a=O[_],u+=a.length,_!==O.length-1)u+=r.length;else if(n)return T();if(!s||a.substring(0,M)!==s){if(p){if(f=[],Z(a.split(e)),B(),D)return T()}else Z(a.split(e));if(g&&g<=_)return f=f.slice(0,g),T(!0)}}return T()}for(var y=l.indexOf(e,u),c=l.indexOf(r,u),q=new RegExp(ne(A)+ne(w),"g"),h=l.indexOf(w,u);;)if(l[u]===w)for(h=u,u++;;){if((h=l.indexOf(w,h+1))===-1)return n||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:f.length,index:u}),W();if(h===F-1)return W(l.substring(u,h).replace(q,w));if(w===A&&l[h+1]===A)h++;else if(w===A||h===0||l[h-1]!==A){y!==-1&&y<h+1&&(y=l.indexOf(e,h+1));var v=ee((c=c!==-1&&c<h+1?l.indexOf(r,h+1):c)===-1?y:Math.min(y,c));if(l.substr(h+1+v,k)===e){a.push(l.substring(u,h).replace(q,w)),l[u=h+1+v+k]!==w&&(h=l.indexOf(w,u)),y=l.indexOf(e,u),c=l.indexOf(r,u);break}if(v=ee(c),l.substring(h+1+v,h+1+v+x)===r){if(a.push(l.substring(u,h).replace(q,w)),se(h+1+v+x),y=l.indexOf(e,u),h=l.indexOf(w,u),p&&(B(),D))return T();if(g&&f.length>=g)return T(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:f.length,index:u}),h++}}else if(s&&a.length===0&&l.substring(u,u+M)===s){if(c===-1)return T();u=c+x,c=l.indexOf(r,u),y=l.indexOf(e,u)}else if(y!==-1&&(y<c||c===-1))a.push(l.substring(u,y)),u=y+k,y=l.indexOf(e,u);else{if(c===-1)break;if(a.push(l.substring(u,c)),se(c+x),p&&(B(),D))return T();if(g&&f.length>=g)return T(!0)}return W();function Z(S){f.push(S),R=u}function ee(S){var L=0;return L=S!==-1&&(S=l.substring(h+1,S))&&S.trim()===""?S.length:L}function W(S){return n||(S===void 0&&(S=l.substring(u)),a.push(S),u=F,Z(a),p&&B()),T()}function se(S){u=S,Z(a),a=[],c=l.indexOf(r,u)}function T(S){if(t.header&&!d&&f.length&&!Q){var L=f[0],V=Object.create(null),fe=new Set(L);let me=!1;for(let te=0;te<L.length;te++){let K=P(L[te]);if(V[K=E(t.transformHeader)?t.transformHeader(K,te):K]){let ae,ye=V[K];for(;ae=K+"_"+ye,ye++,fe.has(ae););fe.add(ae),L[te]=ae,V[K]++,me=!0,(U=U===null?{}:U)[ae]=K}else V[K]=1,L[te]=K;fe.add(K)}me&&console.warn("Duplicate headers found and renamed."),Q=!0}return{data:f,errors:b,meta:{delimiter:e,linebreak:r,aborted:D,truncated:!!S,cursor:R+(d||0),renamedHeaders:U}}}function B(){i(T()),f=[],b=[]}},this.abort=function(){D=!0},this.getCharIndex=function(){return u}}function be(t){var e=t.data,r=J[e.workerId],s=!1;if(e.error)r.userError(e.error,e.file);else if(e.results&&e.results.data){var i={abort:function(){s=!0,ge(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_e,resume:_e};if(E(r.userStep)){for(var g=0;g<e.results.data.length&&(r.userStep({data:e.results.data[g],errors:e.results.errors,meta:e.results.meta},i),!s);g++);delete e.results}else E(r.userChunk)&&(r.userChunk(e.results,i,e.file),delete e.results)}e.finished&&!s&&ge(e.workerId,e.results)}function ge(t,e){var r=J[t];E(r.userComplete)&&r.userComplete(e),r.terminate(),delete J[t]}function _e(){throw new Error("Not implemented.")}function de(t){if(typeof t!="object"||t===null)return t;var e,r=Array.isArray(t)?[]:{};for(e in t)r[e]=de(t[e]);return r}function $(t,e){return function(){t.apply(e,arguments)}}function E(t){return typeof t=="function"}return o.parse=function(t,e){var r=(e=e||{}).dynamicTyping||!1;if(E(r)&&(e.dynamicTypingFunction=r,r={}),e.dynamicTyping=r,e.transform=!!E(e.transform)&&e.transform,e.downloadTimeout!==void 0){var r=parseInt(e.downloadTimeout);if(isNaN(r))throw new Error("Config downloadTimeout value ("+e.downloadTimeout+") not parsable by parseInt(val).");e.downloadTimeout=r}if(!e.worker||!o.WORKERS_SUPPORTED)return r=null,o.NODE_STREAM_INPUT,typeof t=="string"?(t=P(t),r=new(e.download?re:ie)(e)):t.readable===!0&&E(t.read)&&E(t.on)?r=new ue(e):(m.File&&t instanceof File||t instanceof Object)&&(r=new oe(e)),r.stream(t);(r=(()=>{var s;return!!o.WORKERS_SUPPORTED&&(s=(()=>{var i=m.URL||m.webkitURL||null,g=G.toString();return o.BLOB_URL||(o.BLOB_URL=i.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",g,")();"],{type:"text/javascript"})))})(),(s=new m.Worker(s)).onmessage=be,s.id=Y++,J[s.id]=s)})()).userStep=e.step,r.userChunk=e.chunk,r.userComplete=e.complete,r.userError=e.error,e.step=E(e.step),e.chunk=E(e.chunk),e.complete=E(e.complete),e.error=E(e.error),delete e.worker,r.postMessage({input:t,config:e,workerId:r.id})},o.unparse=function(t,e){var r=!1,s=!0,i=",",g=`\r
14
14
  `,I='"',U=I+I,Q=!1,w=null,A=!1,u=((()=>{if(typeof e=="object"){if(typeof e.delimiter!="string"||o.BAD_DELIMITERS.filter(function(d){return e.delimiter.indexOf(d)!==-1}).length||(i=e.delimiter),typeof e.quotes!="boolean"&&typeof e.quotes!="function"&&!Array.isArray(e.quotes)||(r=e.quotes),typeof e.skipEmptyLines!="boolean"&&typeof e.skipEmptyLines!="string"||(Q=e.skipEmptyLines),typeof e.newline=="string"&&(g=e.newline),typeof e.quoteChar=="string"&&(I=e.quoteChar,U=I+I),typeof e.header=="boolean"&&(s=e.header),Array.isArray(e.columns)){if(e.columns.length===0)throw new Error("Option columns is empty");w=e.columns}e.escapeChar!==void 0&&(U=e.escapeChar+I),e.escapeFormulae instanceof RegExp?A=e.escapeFormulae:typeof e.escapeFormulae=="boolean"&&e.escapeFormulae&&(A=/^[=+\-@\t\r].*$/)}})(),new RegExp(ne(I),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return D(null,t,Q);if(typeof t[0]=="object")return D(w||Object.keys(t[0]),t,Q)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||w),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),D(t.fields||[],t.data||[],Q);throw new Error("Unable to serialize unrecognized input");function D(d,n,F){var k="",x=(typeof d=="string"&&(d=JSON.parse(d)),typeof n=="string"&&(n=JSON.parse(n)),Array.isArray(d)&&0<d.length),M=!Array.isArray(n[0]);if(x&&s){for(var p=0;p<d.length;p++)0<p&&(k+=i),k+=l(d[p],p);0<n.length&&(k+=g)}for(var f=0;f<n.length;f++){var b=(x?d:n[f]).length,a=!1,R=x?Object.keys(n[f]).length===0:n[f].length===0;if(F&&!x&&(a=F==="greedy"?n[f].join("").trim()==="":n[f].length===1&&n[f][0].length===0),F==="greedy"&&x){for(var O=[],_=0;_<b;_++){var y=M?d[_]:_;O.push(n[f][y])}a=O.join("").trim()===""}if(!a){for(var c=0;c<b;c++){0<c&&!R&&(k+=i);var q=x&&M?d[c]:c;k+=l(n[f][q],c)}f<n.length-1&&(!F||0<b&&!R)&&(k+=g)}}return k}function l(d,n){var F,k,x;return d==null?"":d.constructor===Date?isNaN(d.getTime())?"":d.toISOString():(x=!1,A&&typeof d=="string"&&A.test(d)&&(d="'"+d,x=!0),k=(F=d.toString()).replace(u,U),(x=x||r===!0||typeof r=="function"&&r(d,n)||Array.isArray(r)&&r[n]||((M,p)=>{for(var f=0;f<p.length;f++)if(-1<M.indexOf(p[f]))return!0;return!1})(k,o.BAD_DELIMITERS)||-1<k.indexOf(i)||-1<F.indexOf(I)||k.charAt(0)===" "||k.charAt(k.length-1)===" ")?I+k+I:k)}},o.RECORD_SEP="",o.UNIT_SEP="",o.BYTE_ORDER_MARK="\uFEFF",o.BAD_DELIMITERS=["\r",`
15
- `,'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!C&&!!m.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=le,o.ParserHandle=pe,o.NetworkStreamer=re,o.FileStreamer=oe,o.StringStreamer=ie,o.ReadableStreamStreamer=ue,N&&(m.onmessage=function(t){t=t.data,o.WORKER_ID===void 0&&t&&(o.WORKER_ID=t.workerId),typeof t.input=="string"?m.postMessage({workerId:o.WORKER_ID,results:o.parse(t.input,t.config),finished:!0}):(m.File&&t.input instanceof File||t.input instanceof Object)&&(t=o.parse(t.input,t.config))&&m.postMessage({workerId:o.WORKER_ID,results:t,finished:!0})}),(re.prototype=Object.create(z.prototype)).constructor=re,(oe.prototype=Object.create(z.prototype)).constructor=oe,(ie.prototype=Object.create(ie.prototype)).constructor=ie,(ue.prototype=Object.create(z.prototype)).constructor=ue,o})})(he)),he.exports}var De=Ae();const Le=Ee(De),we=32;function et({content:H}){const X=xe(),G=Re(P=>P.selectedCwd),m=ve.useMemo(()=>Te(H.src,P=>X.mediaUrl(G??"",P)),[H.src,X,G]),{data:C,error:N,isLoading:J}=Se({queryKey:["canvas-csv",m.url],enabled:m.url!==null,queryFn:async()=>{const P=await fetch(m.url);if(!P.ok)throw new Error(`Failed to load CSV (${P.status})`);const z=await P.text();return Le.parse(z.trim(),{skipEmptyLines:!0}).data},staleTime:6e4,retry:!1});if(m.url===null)return j.jsx(ce,{children:"This CSV source can’t be displayed here."});if(J)return j.jsx(ce,{children:"Loading CSV…"});if(N||!C||C.length===0)return j.jsx(ce,{children:"This CSV couldn’t be loaded."});const[Y,...o]=C;return j.jsx(je,{header:Y,rows:o})}function je({header:H,rows:X}){const G=ve.useRef(null),m=Oe({count:X.length,getScrollElement:()=>G.current,estimateSize:()=>we,overscan:12});return j.jsx("div",{ref:G,className:"h-full overflow-auto",children:j.jsxs("table",{className:"w-full border-collapse text-sm",children:[j.jsx("thead",{className:"bg-muted sticky top-0 z-10",children:j.jsx("tr",{children:H.map((C,N)=>j.jsx("th",{className:"text-muted-foreground border-b px-3 py-1.5 text-left font-medium whitespace-nowrap",children:C},N))})}),j.jsx("tbody",{style:{height:m.getTotalSize(),position:"relative"},children:m.getVirtualItems().map(C=>{const N=X[C.index];return j.jsx("tr",{className:Ce("absolute flex w-full",C.index%2===1&&"bg-muted/30"),style:{transform:`translateY(${C.start}px)`,height:we},children:H.map((J,Y)=>j.jsx("td",{className:"flex-1 truncate border-b px-3 py-1.5 whitespace-nowrap",title:N[Y]??"",children:N[Y]??""},Y))},C.key)})})]})})}function ce({children:H}){return j.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:j.jsx("p",{children:H})})}export{et as CanvasCsvContent};
15
+ `,'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!C&&!!m.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=le,o.ParserHandle=pe,o.NetworkStreamer=re,o.FileStreamer=oe,o.StringStreamer=ie,o.ReadableStreamStreamer=ue,N&&(m.onmessage=function(t){t=t.data,o.WORKER_ID===void 0&&t&&(o.WORKER_ID=t.workerId),typeof t.input=="string"?m.postMessage({workerId:o.WORKER_ID,results:o.parse(t.input,t.config),finished:!0}):(m.File&&t.input instanceof File||t.input instanceof Object)&&(t=o.parse(t.input,t.config))&&m.postMessage({workerId:o.WORKER_ID,results:t,finished:!0})}),(re.prototype=Object.create(z.prototype)).constructor=re,(oe.prototype=Object.create(z.prototype)).constructor=oe,(ie.prototype=Object.create(ie.prototype)).constructor=ie,(ue.prototype=Object.create(z.prototype)).constructor=ue,o})})(he)),he.exports}var De=Ae();const Le=Ee(De),we=32;function tt({content:H}){const X=xe(),G=Re(P=>P.selectedCwd),m=ve.useMemo(()=>Te(H.src,P=>X.mediaUrl(G??"",P)),[H.src,X,G]),{data:C,error:N,isLoading:J}=Se({queryKey:["canvas-csv",m.url],enabled:m.url!==null,queryFn:async()=>{const P=await fetch(m.url);if(!P.ok)throw new Error(`Failed to load CSV (${P.status})`);const z=await P.text();return Le.parse(z.trim(),{skipEmptyLines:!0}).data},staleTime:6e4,retry:!1});if(m.url===null)return j.jsx(ce,{children:"This CSV source can’t be displayed here."});if(J)return j.jsx(ce,{children:"Loading CSV…"});if(N||!C||C.length===0)return j.jsx(ce,{children:"This CSV couldn’t be loaded."});const[Y,...o]=C;return j.jsx(je,{header:Y,rows:o})}function je({header:H,rows:X}){const G=ve.useRef(null),m=Oe({count:X.length,getScrollElement:()=>G.current,estimateSize:()=>we,overscan:12});return j.jsx("div",{ref:G,className:"h-full overflow-auto",children:j.jsxs("table",{className:"w-full border-collapse text-sm",children:[j.jsx("thead",{className:"bg-muted sticky top-0 z-10",children:j.jsx("tr",{children:H.map((C,N)=>j.jsx("th",{className:"text-muted-foreground border-b px-3 py-1.5 text-left font-medium whitespace-nowrap",children:C},N))})}),j.jsx("tbody",{style:{height:m.getTotalSize(),position:"relative"},children:m.getVirtualItems().map(C=>{const N=X[C.index];return j.jsx("tr",{className:Ce("absolute flex w-full",C.index%2===1&&"bg-muted/30"),style:{transform:`translateY(${C.start}px)`,height:we},children:H.map((J,Y)=>j.jsx("td",{className:"flex-1 truncate border-b px-3 py-1.5 whitespace-nowrap",title:N[Y]??"",children:N[Y]??""},Y))},C.key)})})]})})}function ce({children:H}){return j.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:j.jsx("p",{children:H})})}export{tt as CanvasCsvContent};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-1ndoTbcZ.js","assets/index-DBdO-_iL.js","assets/index-CrflCTqO.css","assets/index-DnfhvN3q.js","assets/index-CocSe_I3.js","assets/BlintzCanvas-BEtRmEbL.js","assets/index-CodC2rG4.js","assets/BlintzCanvas-DCXOV_yN.css"])))=>i.map(i=>d[i]);
2
+ import{r as n,aW as B,gC as ne,j as t,B as L,a3 as se,G as ae,J as ie,gp as ce,gD as ue,aX as G,a1 as oe,gE as le,a2 as de}from"./index-DBdO-_iL.js";import{u as fe,a as he,b as ve}from"./use-session-canvas-sAwc2L1A.js";import{R as pe}from"./rotate-cw-C0EpbK5k.js";import"./query-keys-DeYqUDia.js";import"./index.esm-Ruqz-OsH.js";import"./WidgetErrorCard-BYMiUiAf.js";import"./index-vieeLeZH.js";import"./card-DTMhLU7B.js";import"./progress-BduTwXMX.js";import"./markdown-content-BKbjOTI2.js";import"./table-BjHA85BX.js";import"./terminal-qfxxVZaa.js";import"./package-DPgmy9lP.js";import"./heart-Beze5rli.js";import"./git-branch-CJ1NlVLY.js";import"./file-text-DQThCdY3.js";import"./file-Bg_qGvWR.js";import"./McpAppFrame-Dbg_Ni39.js";import"./more-details-BsdCkGTg.js";function E(e,i){return["canvas-file",e,i]}function me({documentId:e,sourcePath:i,binding:g,save:u,draftRef:y,revisionRef:r,finishAttemptRef:C,timerRef:b,finalSaveRef:x,invalidateConfirmedFile:f}){const p=n.useRef({binding:g,save:u,invalidateConfirmedFile:f}),P=n.useRef(null),o=n.useRef(null);return n.useLayoutEffect(()=>{p.current={binding:g,save:u,invalidateConfirmedFile:f}}),n.useLayoutEffect(()=>{const R=B.getState().openDocuments.find(h=>h.id===e);if(!R||typeof R.openedAt!="number")return;const w=ne(e,R.openedAt,i,{required:()=>!!p.current.binding,current:()=>{const h=o.current;return!!h&&h.revision===r.current&&h.attempt===C.current&&h.binding===p.current.binding&&h.save===p.current.save&&h.binding.current()},invalidateConfirmedFile:()=>p.current.invalidateConfirmedFile(),prepare:async()=>{var a;o.current=null;const{binding:h,save:_}=p.current;if(!(h!=null&&h.current()))return!1;b.current&&(clearTimeout(b.current),b.current=null);const F=y.current,m=r.current,c=++C.current,s=await _(F);return s.status!=="changed"&&s.status!=="no_op"||s.confirmed.content!==F||r.current!==m||C.current!==c||p.current.binding!==h||p.current.save!==_||!h.current()?!1:((a=x.current)==null||a.cancel(),x.current=null,o.current={revision:m,attempt:c,binding:h,save:_},!0)}});return P.current=w,()=>w.retire()},[e,i,y,r,C,b,x]),P}function ye(e,i,g){var c;const u=n.useRef(e),y=n.useRef(null),r=n.useRef(null),[C,b]=n.useState({identity:e.identity,phase:"pending",busy:!1});n.useLayoutEffect(()=>{u.current=e},[e]);const x=n.useCallback((s,a)=>{y.current===s&&u.current.identity===s&&u.current.current()&&b(d=>({identity:s,...a,historical:a.historical??(d.identity===s?d.historical:void 0)}))},[]),f=n.useCallback(s=>{y.current!==s||u.current.identity!==s||b(a=>a.identity===s?{...a,phase:"unavailable",busy:!1}:{identity:s,phase:"unavailable",busy:!1})},[]),p=e.identity,P=e.supported;n.useLayoutEffect(()=>{const s=u.current;r.current=null,y.current=p;let a=!1;return P&&i==="ready"&&s.discover().then(d=>{a||(d.status==="observed"?x(p,{phase:"ready",discovery:d.value,busy:!1}):d.status!=="idle"?x(p,{phase:"unavailable",busy:!1}):f(p))}),()=>{a=!0,r.current=null,y.current===p&&(y.current=null)}},[p,P,i,g,x,f]);const o=C.identity===e.identity?C:void 0,R=n.useCallback(async()=>{const s=u.current,a=s.identity;if(y.current!==a||!s.current())return;r.current=null,b(j=>({identity:a,phase:"pending",busy:!0,historical:j.identity===a?j.historical:void 0}));const d=await s.discover(!0);d.status==="observed"?x(a,{phase:"ready",discovery:d.value,busy:!1}):d.status!=="idle"?x(a,{phase:"unavailable",busy:!1}):f(a)},[x,f]),w=n.useCallback(async s=>{const a=u.current,d=a.identity;if(y.current!==d||!a.current())return;r.current=null,b(l=>({identity:d,phase:"pending",busy:!0,discovery:l.identity===d?l.discovery:void 0,historical:l.identity===d?l.historical:void 0}));const j=await a.recover(s);j.status==="observed"?x(d,{phase:"ready",discovery:j.value.discovery,historical:j.value.result.entry,busy:!1}):j.status!=="idle"?x(d,{phase:j.status==="local_uncertain"?"local_uncertain":"unavailable",busy:!1}):f(d)},[x,f]),h=n.useCallback(async()=>{const s=u.current,a=s.identity;if(y.current!==a||!s.current())return{status:"idle"};const d={};r.current=d,b(l=>l.identity===a?{...l,phase:"pending",busy:!0}:l);const j=await s.inspectCurrent();return r.current!==d?{status:"idle"}:(r.current=null,j.status==="idle"&&f(a),y.current===a&&u.current.identity===a&&s.current()&&j.status!=="idle"&&b(l=>l.identity===a?{...l,phase:j.status==="observed"?"ready":j.status==="local_uncertain"?"local_uncertain":"unavailable",busy:!1}:l),j)},[f]),_=e.supported&&i==="ready",F=i==="pending"?"pending":(o==null?void 0:o.phase)??"pending",m=_&&(F!=="ready"||((c=o==null?void 0:o.discovery)==null?void 0:c.admission)==="blocked");return{supported:_,phase:F,editBlocked:m,busy:(o==null?void 0:o.busy)??F==="pending",discovery:o==null?void 0:o.discovery,historical:o==null?void 0:o.historical,refresh:R,recover:w,inspectCurrent:h}}function xe({recovery:e,editing:i,loadCurrent:g}){var u,y;return e.supported?t.jsxs("section",{"aria-label":"Previous file saves",className:"mx-2 mt-2 rounded border p-2 text-sm",children:[e.phase==="pending"&&t.jsx("p",{role:"status",children:"Checking previous saves…"}),e.phase==="unavailable"&&t.jsx("p",{role:"alert",children:"Previous save evidence is unavailable. New saves stay blocked until it can be checked."}),e.phase==="local_uncertain"&&t.jsx("p",{role:"alert",children:"Use Retry original save. Checking previous saves won’t confirm this save."}),((u=e.discovery)==null?void 0:u.admission)==="blocked"&&t.jsx("p",{role:"alert",children:"An unresolved original save blocks this file. This list may not include the blocking operation."}),e.discovery&&t.jsxs(t.Fragment,{children:[!e.discovery.entries.length&&t.jsx("p",{children:"No matching recent saves."}),e.discovery.hasMore&&t.jsx("p",{children:"Only the latest 25 matching saves are shown. Older evidence is omitted."}),t.jsx("ul",{children:e.discovery.entries.map(r=>t.jsxs("li",{children:[t.jsxs("span",{children:[r.eventId,":"," ",r.state==="receipt"?"Historical save recorded":r.state==="review"?"Original save needs review":r.state==="no_op"?"Original save made no change":"Original save failed before replacement"]}),r.state==="review"&&(r.reason==="prepared_without_replacement"?t.jsx("p",{children:"This save needs manual review. These controls won’t write the file."}):t.jsxs(t.Fragment,{children:[t.jsx("p",{children:"The original saved replacement must be proven before its receipt can be settled."}),t.jsx(L,{type:"button",size:"sm",variant:"ghost",disabled:e.busy||i,onClick:()=>void e.recover(r.eventId),children:"Recover original receipt"})]}))]},r.eventId))})]}),((y=e.historical)==null?void 0:y.state)==="receipt"&&t.jsxs("div",{role:"status",children:[t.jsx("p",{children:"Previous save confirmed. Your current draft may differ."}),t.jsx("p",{children:e.historical.currentFileMatch==="different"?"The current file differs from that historical save.":e.historical.currentFileMatch==="same_saved_replacement"?"The saved replacement matched when checked; current bytes still require a fresh load.":"The current file was not checked."})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(L,{type:"button",size:"sm",variant:"ghost",disabled:e.busy||i,onClick:()=>void e.refresh(),children:"Check previous saves"}),t.jsx(L,{type:"button",size:"sm",variant:"ghost",disabled:i||e.editBlocked||e.busy,onClick:g,children:"Load current file"})]}),t.jsx("p",{children:"These controls don’t resend drafts or confirm agent delivery. Use Load current file."})]}):null}const be=n.lazy(()=>G(()=>import("./CodeMirrorEditor-1ndoTbcZ.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.CodeMirrorEditor}))),ge=n.lazy(()=>G(()=>import("./BlintzCanvas-BEtRmEbL.js").then(e=>e.B),__vite__mapDeps([5,1,2,6,4,7])).then(e=>({default:e.BlintzCanvas}))),je=500;function Ce(e,i){return i==="markdown"||/\.(md|markdown|mdx)$/i.test(e)}function ke(e){switch(e){case"saving":return"Saving…";case"saved":return"Saved";case"error":return"Couldn’t save";case"uncertain":return"Save not confirmed";default:return null}}function W({content:e,documentId:i,cwd:g,loaded:u,theme:y,isEditing:r,onEditingChange:C,setDocumentEditing:b,observedBinding:x,fileSaveObservation:f="unavailable",recoveryBinding:p}){const P=e.readOnly!==!0,o=Ce(e.sourcePath,e.language),R=se(),[w,h]=n.useState(u),[_,F]=n.useState(),m=n.useRef(x);n.useLayoutEffect(()=>{m.current=x},[x]);const c=fe({documentId:i,sourcePath:e.sourcePath,cwd:g,loadedContent:u,documentSaveBinding:_,documentRecoveryBinding:p}),s=ye(c.recovery,f,p),a=he({cwd:g,sourcePath:o?e.sourcePath:null,content:w,saved:c.status==="saved"}),d=n.useRef(!1),j=n.useRef(r);n.useLayoutEffect(()=>(d.current=!0,j.current=r,()=>{d.current=!1}),[r]);const l=n.useRef(null),S=n.useRef(w),D=n.useRef(0),O=n.useRef(0),A=n.useRef(c.save),Q=n.useRef(c.prepareFinalSave),U=n.useRef(c.waitForCloseDrain),z=n.useRef(null),H=n.useRef(C),K=me({documentId:i,sourcePath:e.sourcePath,binding:_,save:c.save,draftRef:S,revisionRef:D,finishAttemptRef:O,timerRef:l,finalSaveRef:z,invalidateConfirmedFile:()=>{R.invalidateQueries({queryKey:E(g,e.sourcePath)}).catch(()=>{})}});n.useEffect(()=>{S.current=w,A.current=c.save,Q.current=c.prepareFinalSave,U.current=c.waitForCloseDrain,H.current=C});const V=n.useCallback(v=>{var k;D.current+=1,S.current=v,h(v),(k=z.current)==null||k.cancel(),z.current=Q.current(v),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,A.current(S.current)},je)},[]),J=()=>{var N;if(s.editBlocked||f==="pending"||f==="ready"&&!((N=m.current)!=null&&N.current()))return;const v=m.current,k=v&&Object.freeze({...v.incarnation});F(v!=null&&v.current()&&k?{incarnation:k,current:()=>{const T=m.current;return!!T&&ue(k,T.incarnation)&&T.current()}}:void 0),D.current+=1,S.current=u,h(u),C(!0),b(i,!0)},X=async()=>{l.current&&(clearTimeout(l.current),l.current=null);const v=S.current,k=D.current,N=++O.current,T=await A.current(v);if(T.status!=="changed"&&T.status!=="no_op"||D.current!==k||O.current!==N||T.confirmed.content!==v)return;const M=T.confirmed;M.content===S.current&&R.setQueryData(E(g,e.sourcePath),q=>q&&{...q,content:M.content,hash:M.hash}),C(!1),b(i,!1)},Z=()=>{R.invalidateQueries({queryKey:E(g,e.sourcePath)})};n.useEffect(()=>{var v;r||(l.current&&clearTimeout(l.current),l.current=null,(v=z.current)==null||v.cancel(),z.current=null)},[r]),n.useEffect(()=>{const v=K.current;return()=>{var T;l.current&&(clearTimeout(l.current),l.current=null);const k=(T=z.current)==null?void 0:T.flush(),N=S.current;v==null||v.settleRetirement(Promise.resolve(k).then(()=>U.current(N))),z.current=null,b(i,!1),H.current(!1)}},[i,b,K]);const ee=async()=>{if(r||!d.current||s.editBlocked)return;const v=D.current,k=await s.inspectCurrent();k.status!=="observed"||!d.current||j.current||D.current!==v||!c.recovery.current()||R.setQueryData(E(g,e.sourcePath),N=>N&&{...N,...k.value})},te=()=>{const v=c.adoptDisk();v!=null&&h(v)},re=()=>{c.overwrite(S.current)},Y=c.status==="saved"?c.confirmedContent!==w?"Unsaved changes":c.documentReceipt?"Save recorded":"Saved to file":ke(c.status),$=r?w:u;return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsxs("div",{className:"sticky top-0 z-10 flex h-0 items-start justify-end gap-2 pr-2",children:[P&&Y&&t.jsx("span",{className:ae("mt-3 text-xs",c.status==="error"?"text-destructive":"text-muted-foreground"),"aria-live":"polite",children:Y}),!r&&f==="pending"&&t.jsx("span",{role:"status",children:"Checking document…"}),!r&&t.jsx(L,{type:"button",variant:"ghost",size:"icon-md",className:"text-muted-foreground hover:text-foreground mt-2",onClick:Z,"aria-label":"Refresh from disk",children:t.jsx(pe,{className:"size-4"})}),P&&t.jsx(L,{type:"button",variant:"ghost",size:"icon-md",className:"text-muted-foreground hover:text-foreground mt-2",onClick:r?()=>void X():J,"aria-label":r?"Finish editing":"Edit file",disabled:!r&&(f==="pending"||s.editBlocked),"data-document-save-observation":f,children:r?t.jsx(ie,{className:"size-4"}):t.jsx(ce,{className:"size-4"})})]}),t.jsx(xe,{recovery:s,editing:r,loadCurrent:()=>void ee()}),c.status==="uncertain"&&t.jsxs("div",{role:"status",className:"mx-2 mt-2 flex items-center gap-2 text-sm",children:[t.jsx("span",{children:"Save not confirmed. Retry the original save before saving another draft."}),t.jsx(L,{type:"button",variant:"ghost",size:"sm",onClick:()=>void c.retryUnconfirmed(),children:"Retry original save"})]}),c.status==="conflict"&&t.jsxs("div",{className:"bg-destructive/10 text-destructive mx-2 mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md px-3 py-2 text-sm",children:[t.jsx("span",{className:"flex-1",children:"This file changed on disk since you opened it."}),t.jsx(L,{type:"button",variant:"ghost",size:"sm",className:"h-7",onClick:te,children:"Reload"}),t.jsx(L,{type:"button",variant:"destructive",size:"sm",className:"h-7",onClick:re,children:"Overwrite"})]}),t.jsx("div",{className:"min-h-0 flex-1",children:t.jsx(n.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading editor…"}),children:o?t.jsx("div",{className:"px-2 pb-6",children:t.jsx(ge,{value:$,editable:r,onChange:r?V:void 0,wikiLinks:a})}):t.jsx(be,{value:$,editable:r,filename:e.sourcePath,languageHint:e.language,theme:y,onChange:r?V:void 0})})})]})}function Re(e){const{fileSaveBinding:i,fileSaveObservation:g}=ve(e.documentId);return t.jsx(W,{...e,observedBinding:i,recoveryBinding:i,fileSaveObservation:g})}function we(e){switch(e==null?void 0:e.code){case"NOT_FOUND":return"This file doesn’t exist.";case"NOT_A_FILE":return"This path is a directory, not a file.";case"TOO_LARGE":return"This file is too large to open here.";case"BINARY_FILE":return"This file isn’t text, so the editor can’t show it.";default:return"This file couldn’t be loaded."}}function Ke({content:e,documentId:i}){const g=oe(),u=B(m=>m.selectedCwd),y=B(m=>m.setDocumentEditing),r=B(m=>{var c;return((c=m.openDocuments.find(s=>s.id===i))==null?void 0:c.editing)??!1}),C=le(),b=B(m=>m.canvasSessionId),x=B(m=>m.roomCanvasLiveRoomId),{data:f,error:p,isLoading:P}=de({queryKey:E(u,e.sourcePath),enabled:u!==null,queryFn:()=>g.readFileContent(u,e.sourcePath),staleTime:3e4,retry:!1}),[o,R]=n.useState(null),w=m=>{R(m&&f?{pinnedHash:f.hash}:null)};if(u===null)return t.jsx(I,{children:"Open a chat to view files."});if(P)return t.jsx(I,{children:"Loading file…"});if(p||!f)return t.jsx(I,{children:we(p)});const h=o!==null&&r,_=(h?o==null?void 0:o.pinnedHash:null)??f.hash,F=b&&!x?Re:W;return t.jsx(F,{content:e,documentId:i,cwd:u,loaded:f.content,theme:C,isEditing:h,onEditingChange:w,setDocumentEditing:y},`${e.sourcePath}:${_}`)}function I({children:e}){return t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:e})})}export{Ke as CanvasFileContent};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Model3dViewer-DT8x0h7T.js","assets/index-DBdO-_iL.js","assets/index-CrflCTqO.css"])))=>i.map(i=>d[i]);
2
+ import{a1 as a,aW as n,r as s,j as t,aX as p}from"./index-DBdO-_iL.js";import{r as u}from"./use-session-canvas-sAwc2L1A.js";import"./rotate-cw-C0EpbK5k.js";import"./query-keys-DeYqUDia.js";import"./index.esm-Ruqz-OsH.js";import"./WidgetErrorCard-BYMiUiAf.js";import"./index-vieeLeZH.js";import"./card-DTMhLU7B.js";import"./progress-BduTwXMX.js";import"./markdown-content-BKbjOTI2.js";import"./table-BjHA85BX.js";import"./terminal-qfxxVZaa.js";import"./package-DPgmy9lP.js";import"./heart-Beze5rli.js";import"./git-branch-CJ1NlVLY.js";import"./file-text-DQThCdY3.js";import"./file-Bg_qGvWR.js";import"./McpAppFrame-Dbg_Ni39.js";import"./more-details-BsdCkGTg.js";const d=s.lazy(()=>p(()=>import("./Model3dViewer-DT8x0h7T.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.Model3dViewer})));function f(e){var o;const r=(o=e.split(".").pop())==null?void 0:o.toLowerCase();return r==="glb"||r==="gltf"?"gltf":r==="stl"?"stl":r==="obj"?"obj":r==="3mf"?"3mf":r==="ply"?"ply":r==="fbx"?"fbx":r==="dae"?"dae":null}function O({content:e}){const r=a(),o=n(i=>i.selectedCwd),l=s.useMemo(()=>u(e.src,i=>r.mediaUrl(o??"",i)),[e.src,r,o]),m=s.useMemo(()=>f(e.src),[e.src]);return l.url===null||m===null?t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:"This 3D model can’t be displayed here."})}):t.jsx("div",{className:"bg-muted/40 h-full w-full",children:t.jsx(s.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading 3D viewer…"}),children:t.jsx(d,{url:l.url,format:m,label:e.title??"Canvas 3D model"})})})}export{O as CanvasModel3dContent,f as formatOf};
@@ -1,4 +1,4 @@
1
- import{W as m,a1 as x,aW as k,r as v,j as t,B as d,G as p,a7 as y}from"./index-DcZPWi_I.js";import{u as R}from"./use-update-config-CSYwg557.js";import{I as S}from"./inline-code-g9PVHZI2.js";/**
1
+ import{W as m,a1 as x,aW as k,r as v,j as t,B as d,G as p,a7 as y}from"./index-DBdO-_iL.js";import{u as R}from"./use-update-config-DTL7WyZV.js";import{I as S}from"./inline-code-plzdKGm9.js";/**
2
2
  * @license lucide-react v1.48.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,3 +1,3 @@
1
- import{j as J,r as T}from"./index-DcZPWi_I.js";import{R as lt}from"./index-Dmn03xST.js";import{o as Q,E as B,q as ne,C as Ge,S as G,r as Ne,u as Fe,v as st,w as H,x as M,V as ot,F as Ve,y as je,R as N,W as Y,G as oe,z as at,A as ft,B as Ie,H as dt,m as ht,n as ct}from"./index-mFOJXyAE.js";class v{constructor(e,n,l,i){this.fromA=e,this.toA=n,this.fromB=l,this.toB=i}offset(e,n=e){return new v(this.fromA+e,this.toA+e,this.fromB+n,this.toB+n)}}function y(t,e,n,l,i,r){if(t==l)return[];let s=fe(t,e,n,l,i,r),o=de(t,e+s,n,l,i+s,r);e+=s,n-=o,i+=s,r-=o;let f=n-e,h=r-i;if(!f||!h)return[new v(e,n,i,r)];if(f>h){let d=t.slice(e,n).indexOf(l.slice(i,r));if(d>-1)return[new v(e,e+d,i,i),new v(e+d+h,n,r,r)]}else if(h>f){let d=l.slice(i,r).indexOf(t.slice(e,n));if(d>-1)return[new v(e,e,i,i+d),new v(n,n,i+d+f,r)]}if(f==1||h==1)return[new v(e,n,i,r)];let a=He(t,e,n,l,i,r);if(a){let[d,c,u]=a;return y(t,e,d,l,i,c).concat(y(t,d+u,n,l,c+u,r))}return ut(t,e,n,l,i,r)}let I=1e9,U=0,ae=!1;function ut(t,e,n,l,i,r){let s=n-e,o=r-i;if(I<1e9&&Math.min(s,o)>I*16||U>0&&Date.now()>U)return Math.min(s,o)>I*64?[new v(e,n,i,r)]:ge(t,e,n,l,i,r);let f=Math.ceil((s+o)/2);ee.reset(f),te.reset(f);let h=(u,m)=>t.charCodeAt(e+u)==l.charCodeAt(i+m),a=(u,m)=>t.charCodeAt(n-u-1)==l.charCodeAt(r-m-1),d=(s-o)%2!=0?te:null,c=d?null:ee;for(let u=0;u<f;u++){if(u>I||U>0&&!(u&63)&&Date.now()>U)return ge(t,e,n,l,i,r);let m=ee.advance(u,s,o,f,d,!1,h)||te.advance(u,s,o,f,c,!0,a);if(m)return mt(t,e,n,e+m[0],l,i,r,i+m[1])}return[new v(e,n,i,r)]}class Ue{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let n=0;n<this.len;n++)this.vec[n]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,n,l,i,r,s,o){for(let f=-e+this.start;f<=e-this.end;f+=2){let h=i+f,a=f==-e||f!=e&&this.vec[h-1]<this.vec[h+1]?this.vec[h+1]:this.vec[h-1]+1,d=a-f;for(;a<n&&d<l&&o(a,d);)a++,d++;if(this.vec[h]=a,a>n)this.end+=2;else if(d>l)this.start+=2;else if(r){let c=i+(n-l)-f;if(c>=0&&c<this.len&&r.vec[c]!=-1)if(s){let u=r.vec[c];if(u>=n-a)return[u,i+u-c]}else{let u=n-r.vec[c];if(a>=u)return[a,d]}}}return null}}const ee=new Ue,te=new Ue;function mt(t,e,n,l,i,r,s,o){let f=!1;return!F(t,l)&&++l==n&&(f=!0),!F(i,o)&&++o==s&&(f=!0),f?[new v(e,n,r,s)]:y(t,e,l,i,r,o).concat(y(t,l,n,i,o,s))}function We(t,e){let n=1,l=Math.min(t,e);for(;n<l;)n=n<<1;return n}function fe(t,e,n,l,i,r){if(e==n||e==r||t.charCodeAt(e)!=l.charCodeAt(i))return 0;let s=We(n-e,r-i);for(let o=e,f=i;;){let h=o+s,a=f+s;if(h>n||a>r||t.slice(o,h)!=l.slice(f,a)){if(s==1)return o-e-(F(t,o)?0:1);s=s>>1}else{if(h==n||a==r)return h-e;o=h,f=a}}}function de(t,e,n,l,i,r){if(e==n||i==r||t.charCodeAt(n-1)!=l.charCodeAt(r-1))return 0;let s=We(n-e,r-i);for(let o=n,f=r;;){let h=o-s,a=f-s;if(h<e||a<i||t.slice(h,o)!=l.slice(a,f)){if(s==1)return n-o-(F(t,o)?0:1);s=s>>1}else{if(h==e||a==i)return n-h;o=h,f=a}}}function re(t,e,n,l,i,r,s,o){let f=l.slice(i,r),h=null;for(;;){if(h||s<o)return h;for(let a=e+s;;){F(t,a)||a++;let d=a+s;if(F(t,d)||(d+=d==a+1?1:-1),d>=n)break;let c=t.slice(a,d),u=-1;for(;(u=f.indexOf(c,u+1))!=-1;){let m=fe(t,d,n,l,i+u+c.length,r),p=de(t,e,a,l,i,i+u),g=c.length+m+p;(!h||h[2]<g)&&(h=[a-p,i+u-p,g])}a=d}if(o<0)return h;s=s>>1}}function He(t,e,n,l,i,r){let s=n-e,o=r-i;if(s<o){let f=He(l,i,r,t,e,n);return f&&[f[1],f[0],f[2]]}return s<4||o*2<s?null:re(t,e,n,l,i,r,Math.floor(s/4),-1)}function ge(t,e,n,l,i,r){ae=!0;let s=n-e,o=r-i,f;if(s<o){let c=re(l,i,r,t,e,n,Math.floor(s/6),50);f=c&&[c[1],c[0],c[2]]}else f=re(t,e,n,l,i,r,Math.floor(o/6),50);if(!f)return[new v(e,n,i,r)];let[h,a,d]=f;return y(t,e,h,l,i,a).concat(y(t,h+d,n,l,a+d,r))}function ze(t,e){for(let n=1;n<t.length;n++){let l=t[n-1],i=t[n];l.toA>i.fromA-e&&l.toB>i.fromB-e&&(t[n-1]=new v(l.fromA,i.toA,l.fromB,i.toB),t.splice(n--,1))}}function gt(t,e,n){for(;;){ze(n,1);let l=!1;for(let i=0;i<n.length;i++){let r=n[i],s,o;(s=fe(t,r.fromA,r.toA,e,r.fromB,r.toB))&&(r=n[i]=new v(r.fromA+s,r.toA,r.fromB+s,r.toB)),(o=de(t,r.fromA,r.toA,e,r.fromB,r.toB))&&(r=n[i]=new v(r.fromA,r.toA-o,r.fromB,r.toB-o));let f=r.toA-r.fromA,h=r.toB-r.fromB;if(f&&h)continue;let a=r.fromA-(i?n[i-1].toA:0),d=(i<n.length-1?n[i+1].fromA:t.length)-r.toA;if(!a||!d)continue;let c=f?t.slice(r.fromA,r.toA):e.slice(r.fromB,r.toB);a<=c.length&&t.slice(r.fromA-a,r.fromA)==c.slice(c.length-a)?(n[i]=new v(r.fromA-a,r.toA-a,r.fromB-a,r.toB-a),l=!0):d<=c.length&&t.slice(r.toA,r.toA+d)==c.slice(0,d)&&(n[i]=new v(r.fromA+d,r.toA+d,r.fromB+d,r.toB+d),l=!0)}if(!l)break}return n}function pt(t,e,n){for(let l=0,i=0;i<t.length;i++){let r=t[i],s=r.toA-r.fromA,o=r.toB-r.fromB;if(s&&o||s>3||o>3){let f=i==t.length-1?e.length:t[i+1].fromA,h=r.fromA-l,a=f-r.toA,d=Ce(e,r.fromA,h),c=pe(e,r.toA,a),u=r.fromA-d,m=c-r.toA;if((!s||!o)&&u&&m){let p=Math.max(s,o),[g,C,S]=s?[e,r.fromA,r.toA]:[n,r.fromB,r.toB];p>u&&e.slice(d,r.fromA)==g.slice(S-u,S)?(r=t[i]=new v(d,d+s,r.fromB-u,r.toB-u),d=r.fromA,c=pe(e,r.toA,f-r.toA)):p>m&&e.slice(r.toA,c)==g.slice(C,C+m)&&(r=t[i]=new v(c-s,c,r.fromB+m,r.toB+m),c=r.toA,d=Ce(e,r.fromA,r.fromA-l)),u=r.fromA-d,m=c-r.toA}if(u||m)r=t[i]=new v(r.fromA-u,r.toA+m,r.fromB-u,r.toB+m);else if(s){if(!o){let p=Ae(e,r.fromA,r.toA),g,C=p<0?-1:ve(e,r.toA,r.fromA);p>-1&&(g=p-r.fromA)<=a&&e.slice(r.fromA,p)==e.slice(r.toA,r.toA+g)?r=t[i]=r.offset(g):C>-1&&(g=r.toA-C)<=h&&e.slice(r.fromA-g,r.fromA)==e.slice(C,r.toA)&&(r=t[i]=r.offset(-g))}}else{let p=Ae(n,r.fromB,r.toB),g,C=p<0?-1:ve(n,r.toB,r.fromB);p>-1&&(g=p-r.fromB)<=a&&n.slice(r.fromB,p)==n.slice(r.toB,r.toB+g)?r=t[i]=r.offset(g):C>-1&&(g=r.toB-C)<=h&&n.slice(r.fromB-g,r.fromB)==n.slice(C,r.toB)&&(r=t[i]=r.offset(-g))}}l=r.toA}return ze(t,3),t}let E;try{E=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function Pe(t){return t>48&&t<58||t>64&&t<91||t>96&&t<123}function qe(t,e){if(e==t.length)return 0;let n=t.charCodeAt(e);return n<192?Pe(n)?1:0:E?!Je(n)||e==t.length-1?E.test(String.fromCharCode(n))?1:0:E.test(t.slice(e,e+2))?2:0:0}function _e(t,e){if(!e)return 0;let n=t.charCodeAt(e-1);return n<192?Pe(n)?1:0:E?!Ke(n)||e==1?E.test(String.fromCharCode(n))?1:0:E.test(t.slice(e-2,e))?2:0:0}const $e=8;function pe(t,e,n){if(e==t.length||!_e(t,e))return e;for(let l=e,i=e+n,r=0;r<$e;r++){let s=qe(t,l);if(!s||l+s>i)return l;l+=s}return e}function Ce(t,e,n){if(!e||!qe(t,e))return e;for(let l=e,i=e-n,r=0;r<$e;r++){let s=_e(t,l);if(!s||l-s<i)return l;l-=s}return e}function ve(t,e,n){for(;e!=n;e--)if(t.charCodeAt(e-1)==10)return e;return-1}function Ae(t,e,n){for(;e!=n;e++)if(t.charCodeAt(e)==10)return e;return-1}const Je=t=>t>=55296&&t<=56319,Ke=t=>t>=56320&&t<=57343;function F(t,e){return!e||e==t.length||!Je(t.charCodeAt(e-1))||!Ke(t.charCodeAt(e))}function Ct(t,e,n){var l;let i=n==null?void 0:n.override;return i?i(t,e):(I=((l=n==null?void 0:n.scanLimit)!==null&&l!==void 0?l:1e9)>>1,U=n!=null&&n.timeout?Date.now()+n.timeout:0,ae=!1,gt(t,e,y(t,0,t.length,e,0,e.length)))}function Qe(){return!ae}function Ye(t,e,n){return pt(Ct(t,e,n),t,e)}const b=Ve.define({combine:t=>t[0]}),ie=G.define(),Ze=Ve.define(),k=H.define({create(t){return null},update(t,e){for(let n of e.effects)n.is(ie)&&(t=n.value);for(let n of e.state.facet(Ze))t=n(t,e);return t}});function vt(t){let e=t.field(k,!1);if(!e)return null;let n=t.facet(b);return{chunks:e,side:n?n.side:null}}class O{constructor(e,n,l,i,r,s=!0){this.changes=e,this.fromA=n,this.toA=l,this.fromB=i,this.toB=r,this.precise=s}offset(e,n){return e||n?new O(this.changes,this.fromA+e,this.toA+e,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,n,l){let i=Ye(e.toString(),n.toString(),l);return Xe(i,e,n,0,0,Qe())}static updateA(e,n,l,i,r){return be(Be(e,i,!0,l.length),e,n,l,r)}static updateB(e,n,l,i,r){return be(Be(e,i,!1,n.length),e,n,l,r)}}function xe(t,e,n,l){let i=n.lineAt(t),r=l.lineAt(e);return i.to==t&&r.to==e&&t<n.length&&e<l.length?[t+1,e+1]:[i.from,r.from]}function we(t,e,n,l){let i=n.lineAt(t),r=l.lineAt(e);return i.from==t&&r.from==e?[t,e]:[i.to+1,r.to+1]}function Xe(t,e,n,l,i,r){let s=[];for(let o=0;o<t.length;o++){let f=t[o],[h,a]=xe(f.fromA+l,f.fromB+i,e,n),[d,c]=we(f.toA+l,f.toB+i,e,n),u=[f.offset(-h+l,-a+i)];for(;o<t.length-1;){let m=t[o+1],[p,g]=xe(m.fromA+l,m.fromB+i,e,n);if(p>d+1&&g>c+1)break;u.push(m.offset(-h+l,-a+i)),[d,c]=we(m.toA+l,m.toB+i,e,n),o++}s.push(new O(u,h,Math.max(h,d),a,Math.max(a,c),r))}return s}const z=1e3;function ke(t,e,n,l){let i=0,r=t.length;for(;;){if(i==r){let a=0,d=0;i&&({toA:a,toB:d}=t[i-1]);let c=e-(n?a:d);return[a+c,d+c]}let s=i+r>>1,o=t[s],[f,h]=n?[o.fromA,o.toA]:[o.fromB,o.toB];if(f>e)r=s;else if(h<=e)i=s+1;else return l?[o.fromA,o.fromB]:[o.toA,o.toB]}}function Be(t,e,n,l){let i=[];return e.iterChangedRanges((r,s,o,f)=>{let h=0,a=n?e.length:l,d=0,c=n?l:e.length;r>z&&([h,d]=ke(t,r-z,n,!0)),s<e.length-z&&([a,c]=ke(t,s+z,n,!1));let u=f-o-(s-r),m,[p,g]=n?[u,0]:[0,u];i.length&&(m=i[i.length-1]).toA>=h?i[i.length-1]={fromA:m.fromA,fromB:m.fromB,toA:a,toB:c,diffA:m.diffA+p,diffB:m.diffB+g}:i.push({fromA:h,toA:a,fromB:d,toB:c,diffA:p,diffB:g})}),i}function be(t,e,n,l,i){if(!t.length)return e;let r=[];for(let s=0,o=0,f=0,h=0;;s++){let a=s==t.length?null:t[s],d=a?a.fromA+o:n.length,c=a?a.fromB+f:l.length;for(;h<e.length;){let g=e[h];if(a&&(g.toA+o>d||g.toB+f>c))break;r.push(g.offset(o,f)),h++}if(!a)break;let u=a.toA+o+a.diffA,m=a.toB+f+a.diffB,p=Ye(n.sliceString(d,u),l.sliceString(c,m),i);for(let g of Xe(p,n,l,d,c,Qe()))r.push(g);for(o+=a.diffA,f+=a.diffB;h<e.length;){let g=e[h];if(g.fromA+o>u&&g.fromB+f>m)break;h++}}return r}const et={scanLimit:500},Z=ot.fromClass(class{constructor(t){({deco:this.deco,gutter:this.gutter}=Le(t))}update(t){(t.docChanged||t.viewportChanged||At(t.startState,t.state)||xt(t.startState,t.state))&&({deco:this.deco,gutter:this.gutter}=Le(t.view))}},{decorations:t=>t.deco}),P=Q.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(Z))===null||e===void 0?void 0:e.gutter)||Ie.empty}}));function At(t,e){return t.field(k,!1)!=e.field(k,!1)}function xt(t,e){return t.facet(b)!=e.facet(b)}const Me=M.line({class:"cm-changedLine"}),tt=M.mark({class:"cm-changedText"}),wt=M.mark({tagName:"ins",class:"cm-insertedLine"}),kt=M.mark({tagName:"del",class:"cm-deletedLine"}),De=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function Bt(t,e,n,l,i,r){let s=n?t.fromA:t.fromB,o=n?t.toA:t.toB,f=0;if(s!=o){i.add(s,s,Me),i.add(s,o,n?kt:wt),r&&r.add(s,s,De);for(let h=e.iterRange(s,o-1),a=s;!h.next().done;){if(h.lineBreak){a++,i.add(a,a,Me),r&&r.add(a,a,De);continue}let d=a+h.value.length;if(l)for(;f<t.changes.length;){let c=t.changes[f],u=s+(n?c.fromA:c.fromB),m=s+(n?c.toA:c.toB),p=Math.max(a,u),g=Math.min(d,m);if(p<g&&i.add(p,g,tt),m<d)f++;else break}a=d}}}function Le(t){let e=t.state.field(k),{side:n,highlightChanges:l,markGutter:i,overrideChunk:r}=t.state.facet(b),s=n=="a",o=new N,f=i?new N:null,{from:h,to:a}=t.viewport;for(let d of e){if((s?d.fromA:d.fromB)>=a)break;(s?d.toA:d.toB)>h&&(!r||!r(t.state,d,o,f))&&Bt(d,t.state.doc,s,l,o,f)}return{deco:o.finish(),gutter:f&&f.finish()}}class q extends Y{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}const K=G.define({map:(t,e)=>t.map(e)}),W=H.define({create:()=>M.none,update:(t,e)=>{for(let n of e.effects)if(n.is(K))return n.value;return t.map(e.changes)},provide:t=>B.decorations.from(t)}),_=.01;function Se(t,e){if(t.size!=e.size)return!1;let n=t.iter(),l=e.iter();for(;n.value;){if(n.from!=l.from||Math.abs(n.value.spec.widget.height-l.value.spec.widget.height)>1)return!1;n.next(),l.next()}return!0}function bt(t,e,n){let l=new N,i=new N,r=t.state.field(W).iter(),s=e.state.field(W).iter(),o=0,f=0,h=0,a=0,d=t.viewport,c=e.viewport;for(let g=0;;g++){let C=g<n.length?n[g]:null,S=C?C.fromA:t.state.doc.length,R=C?C.fromB:e.state.doc.length;if(o<S){let x=t.lineBlockAt(o).top+h,D=e.lineBlockAt(f).top+a,w=x-D;w<-_?(h-=w,l.add(o,o,M.widget({widget:new q(-w),block:!0,side:-1}))):w>_&&(a+=w,i.add(f,f,M.widget({widget:new q(w),block:!0,side:-1})))}if(S>o+1e3&&o<d.from&&S>d.from&&f<c.from&&R>c.from){let x=Math.min(d.from-o,c.from-f);o+=x,f+=x,g--}else if(C)o=C.toA,f=C.toB;else break;for(;r.value&&r.from<o;)h-=r.value.spec.widget.height,r.next();for(;s.value&&s.from<f;)a-=s.value.spec.widget.height,s.next()}for(;r.value;)h-=r.value.spec.widget.height,r.next();for(;s.value;)a-=s.value.spec.widget.height,s.next();let u=t.contentHeight+h-(e.contentHeight+a);u<_?l.add(t.state.doc.length,t.state.doc.length,M.widget({widget:new q(-u),block:!0,side:1})):u>_&&i.add(e.state.doc.length,e.state.doc.length,M.widget({widget:new q(u),block:!0,side:1}));let m=l.finish(),p=i.finish();Se(m,t.state.field(W))||t.dispatch({effects:K.of(m)}),Se(p,e.state.field(W))||e.dispatch({effects:K.of(p)})}const le=G.define({map:(t,e)=>e.mapPos(t)});class Mt extends Y{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let n=document.createElement("div");return n.className="cm-collapsedLines",n.textContent=e.state.phrase("$ unchanged lines",this.lines),n.addEventListener("click",l=>{let i=e.posAtDOM(l.target);e.dispatch({effects:le.of(i)});let{side:r,sibling:s}=e.state.facet(b);s&&s().dispatch({effects:le.of(Dt(i,e.state.field(k),r=="a"))})}),n}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}}function Dt(t,e,n){let l=0,i=0;for(let r=0;;r++){let s=r<e.length?e[r]:null;if(!s||(n?s.fromA:s.fromB)>=t)return i+(t-l);[l,i]=n?[s.toA,s.toB]:[s.toB,s.toA]}}const Lt=H.define({create(t){return M.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is(le)&&(t=t.update({filter:l=>l!=n.value}));if(t.size&&e.state.field(k)!=e.startState.field(k,!1)){let n=e.state.facet(b).side=="a",l=[];for(let i of e.state.field(k))t.between(n?i.fromA:i.fromB,n?i.toA:i.toB,r=>{l.push(r)});l.length&&(t=t.update({filter:i=>l.indexOf(i)<0}))}return t},provide:t=>B.decorations.from(t)});function se({margin:t=3,minSize:e=4}){return Lt.init(n=>St(n,t,e))}function St(t,e,n){let l=new N,i=t.facet(b).side=="a",r=t.field(k),s=1;for(let o=0;;o++){let f=o<r.length?r[o]:null,h=o?s+e:1,a=f?t.doc.lineAt(i?f.fromA:f.fromB).number-1-e:t.doc.lines,d=a-h+1;if(d>=n&&l.add(t.doc.line(h).from,t.doc.line(a).to,M.replace({widget:new Mt(d),block:!0})),!f)break;s=t.doc.lineAt(Math.min(t.doc.length,i?f.toA:f.toB)).number}return l.finish()}const Ot=B.styleModule.of(new st({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),nt=B.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"⦚"',marginInlineEnd:"7px"},"&:after":{content:'"⦚"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),Oe=new Ge,$=new Ge;class Et{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||et;let n=[Q.low(Z),nt,Ot,W,B.updateListener.of(d=>{this.measuring<0&&(d.heightChanged||d.viewportChanged)&&!d.transactions.some(c=>c.effects.some(u=>u.is(K)))&&this.measure()})],l=[b.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&l.push(P);let i=ne.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],B.editorAttributes.of({class:"cm-merge-a"}),$.of(l),n]}),r=[b.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&r.push(P);let s=ne.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],B.editorAttributes.of({class:"cm-merge-b"}),$.of(r),n]});this.chunks=O.build(i.doc,s.doc,this.diffConf);let o=[k.init(()=>this.chunks),Oe.of(e.collapseUnchanged?se(e.collapseUnchanged):[])];i=i.update({effects:G.appendConfig.of(o)}).state,s=s.update({effects:G.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let f=e.orientation||"a-b",h=document.createElement("div");h.className="cm-mergeViewEditor";let a=document.createElement("div");a.className="cm-mergeViewEditor",this.editorDOM.appendChild(f=="a-b"?h:a),this.editorDOM.appendChild(f=="a-b"?a:h),this.a=new B({state:i,parent:h,root:e.root,dispatchTransactions:d=>this.dispatch(d,this.a)}),this.b=new B({state:s,parent:a,root:e.root,dispatchTransactions:d=>this.dispatch(d,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,n){if(e.some(l=>l.docChanged)){let l=e[e.length-1],i=e.reduce((s,o)=>s.compose(o.changes),Ne.empty(e[0].startState.doc.length));this.chunks=n==this.a?O.updateA(this.chunks,l.newDoc,this.b.state.doc,i,this.diffConf):O.updateB(this.chunks,this.a.state.doc,l.newDoc,i,this.diffConf),n.update([...e,l.state.update({effects:ie.of(this.chunks)})]);let r=n==this.a?this.b:this.a;r.update([r.state.update({effects:ie.of(this.chunks)})]),this.scheduleMeasure()}else n.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let r=e.orientation!="b-a";if(r!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(r?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(r?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let r=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in e&&(r=!!e.revertControls,s=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(o=e.renderRevertControl),this.setupRevertControls(r,s,o)}let n="highlightChanges"in e,l="gutter"in e,i="collapseUnchanged"in e;if(n||l||i){let r=[],s=[];if(n||l){let o=this.a.state.facet(b),f=l?e.gutter!==!1:o.markGutter,h=n?e.highlightChanges!==!1:o.highlightChanges;r.push($.reconfigure([b.of({side:"a",sibling:()=>this.b,highlightChanges:h,markGutter:f}),f?P:[]])),s.push($.reconfigure([b.of({side:"b",sibling:()=>this.a,highlightChanges:h,markGutter:f}),f?P:[]]))}if(i){let o=Oe.reconfigure(e.collapseUnchanged?se(e.collapseUnchanged):[]);r.push(o),s.push(o)}this.a.dispatch({effects:r}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(e,n,l){this.revertToA=n,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=l,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){bt(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,n=e.firstChild,l=this.a.viewport,i=this.b.viewport;for(let r=0;r<this.chunks.length;r++){let s=this.chunks[r];if(s.fromA>l.to||s.fromB>i.to)break;if(s.fromA<l.from||s.fromB<i.from)continue;let o=this.a.lineBlockAt(s.fromA).top+"px";for(;n&&+n.dataset.chunk<r;)n=Ee(n);n&&n.dataset.chunk==String(r)?(n.style.top!=o&&(n.style.top=o),n=n.nextSibling):e.insertBefore(this.renderRevertButton(o,r),n)}for(;n;)n=Ee(n)}renderRevertButton(e,n){let l;if(this.renderRevert)l=this.renderRevert();else{l=document.createElement("button");let i=this.a.state.phrase("Revert this chunk");l.setAttribute("aria-label",i),l.setAttribute("title",i),l.textContent=this.revertToLeft?"⇜":"⇝"}return l.style.top=e,l.setAttribute("data-chunk",String(n)),l}revertClicked(e){let n=e.target,l;for(;n&&n.parentNode!=this.revertDOM;)n=n.parentNode;if(n&&(l=this.chunks[n.dataset.chunk])){let[i,r,s,o,f,h]=this.revertToA?[this.b,this.a,l.fromB,l.toB,l.fromA,l.toA]:[this.a,this.b,l.fromA,l.toA,l.fromB,l.toB],a=i.state.sliceDoc(s,Math.max(s,o-1));s!=o&&h<=r.state.doc.length&&(a+=i.state.lineBreak),r.dispatch({changes:{from:f,to:Math.min(r.state.doc.length,h),insert:a},userEvent:"revert"}),e.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}}function Ee(t){let e=t.nextSibling;return t.remove(),e}const yt=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-deletedLineGutter"}},Rt=Q.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(Z))===null||e===void 0?void 0:e.gutter)||Ie.empty},widgetMarker:(t,e)=>e instanceof rt?yt:null}));function Tt(t){var e;let n=typeof t.original=="string"?Fe.of(t.original.split(/\r?\n/)):t.original,l=t.diffConfig||et;return[Q.low(Z),Vt,nt,B.editorAttributes.of({class:"cm-merge-b"}),Ze.of((i,r)=>{let s=r.effects.find(o=>o.is(he));return s&&(i=O.updateA(i,s.value.doc,r.startState.doc,s.value.changes,l)),r.docChanged&&(i=O.updateB(i,r.state.field(V),r.newDoc,r.changes,l)),i}),b.of({highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1,syntaxHighlightDeletions:t.syntaxHighlightDeletions!==!1,syntaxHighlightDeletionsMaxLength:3e3,mergeControls:(e=t.mergeControls)!==null&&e!==void 0?e:!0,overrideChunk:t.allowInlineDiffs?Wt:void 0,side:"b"}),V.init(()=>n),t.gutter!==!1?Rt:[],t.collapseUnchanged?se(t.collapseUnchanged):[],k.init(i=>O.build(n,i.doc,l))]}const he=G.define(),V=H.define({create:()=>Fe.empty,update(t,e){for(let n of e.effects)n.is(he)&&(t=n.value.doc);return t}}),ye=new WeakMap;class rt extends Y{constructor(e){super(),this.buildDOM=e,this.dom=null}eq(e){return this.dom==e.dom}toDOM(e){return this.dom||(this.dom=this.buildDOM(e))}}function Gt(t,e,n){let l=ye.get(e.changes);if(l)return l;let i=s=>{let{highlightChanges:o,syntaxHighlightDeletions:f,syntaxHighlightDeletionsMaxLength:h,mergeControls:a}=t.facet(b),d=document.createElement("div");if(d.className="cm-deletedChunk",a){let x=d.appendChild(document.createElement("div"));x.className="cm-chunkButtons";let D=A=>{A.preventDefault(),Nt(s,s.posAtDOM(d))},w=A=>{A.preventDefault(),Ft(s,s.posAtDOM(d))};if(typeof a=="function")x.appendChild(a("accept",D)),x.appendChild(a("reject",w));else{let A=x.appendChild(document.createElement("button"));A.name="accept",A.textContent=t.phrase("Accept"),A.onmousedown=D;let L=x.appendChild(document.createElement("button"));L.name="reject",L.textContent=t.phrase("Reject"),L.onmousedown=w}}if(n||e.fromA>=e.toA)return d;let c=s.state.field(V).sliceString(e.fromA,e.endA),u=f&&t.facet(at),m=S(),p=e.changes,g=0,C=!1;function S(){let x=d.appendChild(document.createElement("div"));return x.className="cm-deletedLine",x.appendChild(document.createElement("del"))}function R(x,D,w){for(let A=x;A<D;){if(c.charAt(A)==`
1
+ import{j as J,r as T}from"./index-DBdO-_iL.js";import{R as lt}from"./index-DnfhvN3q.js";import{o as Q,E as B,q as ne,C as Ge,S as G,r as Ne,u as Fe,v as st,w as H,x as M,V as ot,F as Ve,y as je,R as N,W as Y,G as oe,z as at,A as ft,B as Ie,H as dt,m as ht,n as ct}from"./index-CocSe_I3.js";class v{constructor(e,n,l,i){this.fromA=e,this.toA=n,this.fromB=l,this.toB=i}offset(e,n=e){return new v(this.fromA+e,this.toA+e,this.fromB+n,this.toB+n)}}function y(t,e,n,l,i,r){if(t==l)return[];let s=fe(t,e,n,l,i,r),o=de(t,e+s,n,l,i+s,r);e+=s,n-=o,i+=s,r-=o;let f=n-e,h=r-i;if(!f||!h)return[new v(e,n,i,r)];if(f>h){let d=t.slice(e,n).indexOf(l.slice(i,r));if(d>-1)return[new v(e,e+d,i,i),new v(e+d+h,n,r,r)]}else if(h>f){let d=l.slice(i,r).indexOf(t.slice(e,n));if(d>-1)return[new v(e,e,i,i+d),new v(n,n,i+d+f,r)]}if(f==1||h==1)return[new v(e,n,i,r)];let a=He(t,e,n,l,i,r);if(a){let[d,c,u]=a;return y(t,e,d,l,i,c).concat(y(t,d+u,n,l,c+u,r))}return ut(t,e,n,l,i,r)}let I=1e9,U=0,ae=!1;function ut(t,e,n,l,i,r){let s=n-e,o=r-i;if(I<1e9&&Math.min(s,o)>I*16||U>0&&Date.now()>U)return Math.min(s,o)>I*64?[new v(e,n,i,r)]:ge(t,e,n,l,i,r);let f=Math.ceil((s+o)/2);ee.reset(f),te.reset(f);let h=(u,m)=>t.charCodeAt(e+u)==l.charCodeAt(i+m),a=(u,m)=>t.charCodeAt(n-u-1)==l.charCodeAt(r-m-1),d=(s-o)%2!=0?te:null,c=d?null:ee;for(let u=0;u<f;u++){if(u>I||U>0&&!(u&63)&&Date.now()>U)return ge(t,e,n,l,i,r);let m=ee.advance(u,s,o,f,d,!1,h)||te.advance(u,s,o,f,c,!0,a);if(m)return mt(t,e,n,e+m[0],l,i,r,i+m[1])}return[new v(e,n,i,r)]}class Ue{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let n=0;n<this.len;n++)this.vec[n]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,n,l,i,r,s,o){for(let f=-e+this.start;f<=e-this.end;f+=2){let h=i+f,a=f==-e||f!=e&&this.vec[h-1]<this.vec[h+1]?this.vec[h+1]:this.vec[h-1]+1,d=a-f;for(;a<n&&d<l&&o(a,d);)a++,d++;if(this.vec[h]=a,a>n)this.end+=2;else if(d>l)this.start+=2;else if(r){let c=i+(n-l)-f;if(c>=0&&c<this.len&&r.vec[c]!=-1)if(s){let u=r.vec[c];if(u>=n-a)return[u,i+u-c]}else{let u=n-r.vec[c];if(a>=u)return[a,d]}}}return null}}const ee=new Ue,te=new Ue;function mt(t,e,n,l,i,r,s,o){let f=!1;return!F(t,l)&&++l==n&&(f=!0),!F(i,o)&&++o==s&&(f=!0),f?[new v(e,n,r,s)]:y(t,e,l,i,r,o).concat(y(t,l,n,i,o,s))}function We(t,e){let n=1,l=Math.min(t,e);for(;n<l;)n=n<<1;return n}function fe(t,e,n,l,i,r){if(e==n||e==r||t.charCodeAt(e)!=l.charCodeAt(i))return 0;let s=We(n-e,r-i);for(let o=e,f=i;;){let h=o+s,a=f+s;if(h>n||a>r||t.slice(o,h)!=l.slice(f,a)){if(s==1)return o-e-(F(t,o)?0:1);s=s>>1}else{if(h==n||a==r)return h-e;o=h,f=a}}}function de(t,e,n,l,i,r){if(e==n||i==r||t.charCodeAt(n-1)!=l.charCodeAt(r-1))return 0;let s=We(n-e,r-i);for(let o=n,f=r;;){let h=o-s,a=f-s;if(h<e||a<i||t.slice(h,o)!=l.slice(a,f)){if(s==1)return n-o-(F(t,o)?0:1);s=s>>1}else{if(h==e||a==i)return n-h;o=h,f=a}}}function re(t,e,n,l,i,r,s,o){let f=l.slice(i,r),h=null;for(;;){if(h||s<o)return h;for(let a=e+s;;){F(t,a)||a++;let d=a+s;if(F(t,d)||(d+=d==a+1?1:-1),d>=n)break;let c=t.slice(a,d),u=-1;for(;(u=f.indexOf(c,u+1))!=-1;){let m=fe(t,d,n,l,i+u+c.length,r),p=de(t,e,a,l,i,i+u),g=c.length+m+p;(!h||h[2]<g)&&(h=[a-p,i+u-p,g])}a=d}if(o<0)return h;s=s>>1}}function He(t,e,n,l,i,r){let s=n-e,o=r-i;if(s<o){let f=He(l,i,r,t,e,n);return f&&[f[1],f[0],f[2]]}return s<4||o*2<s?null:re(t,e,n,l,i,r,Math.floor(s/4),-1)}function ge(t,e,n,l,i,r){ae=!0;let s=n-e,o=r-i,f;if(s<o){let c=re(l,i,r,t,e,n,Math.floor(s/6),50);f=c&&[c[1],c[0],c[2]]}else f=re(t,e,n,l,i,r,Math.floor(o/6),50);if(!f)return[new v(e,n,i,r)];let[h,a,d]=f;return y(t,e,h,l,i,a).concat(y(t,h+d,n,l,a+d,r))}function ze(t,e){for(let n=1;n<t.length;n++){let l=t[n-1],i=t[n];l.toA>i.fromA-e&&l.toB>i.fromB-e&&(t[n-1]=new v(l.fromA,i.toA,l.fromB,i.toB),t.splice(n--,1))}}function gt(t,e,n){for(;;){ze(n,1);let l=!1;for(let i=0;i<n.length;i++){let r=n[i],s,o;(s=fe(t,r.fromA,r.toA,e,r.fromB,r.toB))&&(r=n[i]=new v(r.fromA+s,r.toA,r.fromB+s,r.toB)),(o=de(t,r.fromA,r.toA,e,r.fromB,r.toB))&&(r=n[i]=new v(r.fromA,r.toA-o,r.fromB,r.toB-o));let f=r.toA-r.fromA,h=r.toB-r.fromB;if(f&&h)continue;let a=r.fromA-(i?n[i-1].toA:0),d=(i<n.length-1?n[i+1].fromA:t.length)-r.toA;if(!a||!d)continue;let c=f?t.slice(r.fromA,r.toA):e.slice(r.fromB,r.toB);a<=c.length&&t.slice(r.fromA-a,r.fromA)==c.slice(c.length-a)?(n[i]=new v(r.fromA-a,r.toA-a,r.fromB-a,r.toB-a),l=!0):d<=c.length&&t.slice(r.toA,r.toA+d)==c.slice(0,d)&&(n[i]=new v(r.fromA+d,r.toA+d,r.fromB+d,r.toB+d),l=!0)}if(!l)break}return n}function pt(t,e,n){for(let l=0,i=0;i<t.length;i++){let r=t[i],s=r.toA-r.fromA,o=r.toB-r.fromB;if(s&&o||s>3||o>3){let f=i==t.length-1?e.length:t[i+1].fromA,h=r.fromA-l,a=f-r.toA,d=Ce(e,r.fromA,h),c=pe(e,r.toA,a),u=r.fromA-d,m=c-r.toA;if((!s||!o)&&u&&m){let p=Math.max(s,o),[g,C,S]=s?[e,r.fromA,r.toA]:[n,r.fromB,r.toB];p>u&&e.slice(d,r.fromA)==g.slice(S-u,S)?(r=t[i]=new v(d,d+s,r.fromB-u,r.toB-u),d=r.fromA,c=pe(e,r.toA,f-r.toA)):p>m&&e.slice(r.toA,c)==g.slice(C,C+m)&&(r=t[i]=new v(c-s,c,r.fromB+m,r.toB+m),c=r.toA,d=Ce(e,r.fromA,r.fromA-l)),u=r.fromA-d,m=c-r.toA}if(u||m)r=t[i]=new v(r.fromA-u,r.toA+m,r.fromB-u,r.toB+m);else if(s){if(!o){let p=Ae(e,r.fromA,r.toA),g,C=p<0?-1:ve(e,r.toA,r.fromA);p>-1&&(g=p-r.fromA)<=a&&e.slice(r.fromA,p)==e.slice(r.toA,r.toA+g)?r=t[i]=r.offset(g):C>-1&&(g=r.toA-C)<=h&&e.slice(r.fromA-g,r.fromA)==e.slice(C,r.toA)&&(r=t[i]=r.offset(-g))}}else{let p=Ae(n,r.fromB,r.toB),g,C=p<0?-1:ve(n,r.toB,r.fromB);p>-1&&(g=p-r.fromB)<=a&&n.slice(r.fromB,p)==n.slice(r.toB,r.toB+g)?r=t[i]=r.offset(g):C>-1&&(g=r.toB-C)<=h&&n.slice(r.fromB-g,r.fromB)==n.slice(C,r.toB)&&(r=t[i]=r.offset(-g))}}l=r.toA}return ze(t,3),t}let E;try{E=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function Pe(t){return t>48&&t<58||t>64&&t<91||t>96&&t<123}function qe(t,e){if(e==t.length)return 0;let n=t.charCodeAt(e);return n<192?Pe(n)?1:0:E?!Je(n)||e==t.length-1?E.test(String.fromCharCode(n))?1:0:E.test(t.slice(e,e+2))?2:0:0}function _e(t,e){if(!e)return 0;let n=t.charCodeAt(e-1);return n<192?Pe(n)?1:0:E?!Ke(n)||e==1?E.test(String.fromCharCode(n))?1:0:E.test(t.slice(e-2,e))?2:0:0}const $e=8;function pe(t,e,n){if(e==t.length||!_e(t,e))return e;for(let l=e,i=e+n,r=0;r<$e;r++){let s=qe(t,l);if(!s||l+s>i)return l;l+=s}return e}function Ce(t,e,n){if(!e||!qe(t,e))return e;for(let l=e,i=e-n,r=0;r<$e;r++){let s=_e(t,l);if(!s||l-s<i)return l;l-=s}return e}function ve(t,e,n){for(;e!=n;e--)if(t.charCodeAt(e-1)==10)return e;return-1}function Ae(t,e,n){for(;e!=n;e++)if(t.charCodeAt(e)==10)return e;return-1}const Je=t=>t>=55296&&t<=56319,Ke=t=>t>=56320&&t<=57343;function F(t,e){return!e||e==t.length||!Je(t.charCodeAt(e-1))||!Ke(t.charCodeAt(e))}function Ct(t,e,n){var l;let i=n==null?void 0:n.override;return i?i(t,e):(I=((l=n==null?void 0:n.scanLimit)!==null&&l!==void 0?l:1e9)>>1,U=n!=null&&n.timeout?Date.now()+n.timeout:0,ae=!1,gt(t,e,y(t,0,t.length,e,0,e.length)))}function Qe(){return!ae}function Ye(t,e,n){return pt(Ct(t,e,n),t,e)}const b=Ve.define({combine:t=>t[0]}),ie=G.define(),Ze=Ve.define(),k=H.define({create(t){return null},update(t,e){for(let n of e.effects)n.is(ie)&&(t=n.value);for(let n of e.state.facet(Ze))t=n(t,e);return t}});function vt(t){let e=t.field(k,!1);if(!e)return null;let n=t.facet(b);return{chunks:e,side:n?n.side:null}}class O{constructor(e,n,l,i,r,s=!0){this.changes=e,this.fromA=n,this.toA=l,this.fromB=i,this.toB=r,this.precise=s}offset(e,n){return e||n?new O(this.changes,this.fromA+e,this.toA+e,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,n,l){let i=Ye(e.toString(),n.toString(),l);return Xe(i,e,n,0,0,Qe())}static updateA(e,n,l,i,r){return be(Be(e,i,!0,l.length),e,n,l,r)}static updateB(e,n,l,i,r){return be(Be(e,i,!1,n.length),e,n,l,r)}}function xe(t,e,n,l){let i=n.lineAt(t),r=l.lineAt(e);return i.to==t&&r.to==e&&t<n.length&&e<l.length?[t+1,e+1]:[i.from,r.from]}function we(t,e,n,l){let i=n.lineAt(t),r=l.lineAt(e);return i.from==t&&r.from==e?[t,e]:[i.to+1,r.to+1]}function Xe(t,e,n,l,i,r){let s=[];for(let o=0;o<t.length;o++){let f=t[o],[h,a]=xe(f.fromA+l,f.fromB+i,e,n),[d,c]=we(f.toA+l,f.toB+i,e,n),u=[f.offset(-h+l,-a+i)];for(;o<t.length-1;){let m=t[o+1],[p,g]=xe(m.fromA+l,m.fromB+i,e,n);if(p>d+1&&g>c+1)break;u.push(m.offset(-h+l,-a+i)),[d,c]=we(m.toA+l,m.toB+i,e,n),o++}s.push(new O(u,h,Math.max(h,d),a,Math.max(a,c),r))}return s}const z=1e3;function ke(t,e,n,l){let i=0,r=t.length;for(;;){if(i==r){let a=0,d=0;i&&({toA:a,toB:d}=t[i-1]);let c=e-(n?a:d);return[a+c,d+c]}let s=i+r>>1,o=t[s],[f,h]=n?[o.fromA,o.toA]:[o.fromB,o.toB];if(f>e)r=s;else if(h<=e)i=s+1;else return l?[o.fromA,o.fromB]:[o.toA,o.toB]}}function Be(t,e,n,l){let i=[];return e.iterChangedRanges((r,s,o,f)=>{let h=0,a=n?e.length:l,d=0,c=n?l:e.length;r>z&&([h,d]=ke(t,r-z,n,!0)),s<e.length-z&&([a,c]=ke(t,s+z,n,!1));let u=f-o-(s-r),m,[p,g]=n?[u,0]:[0,u];i.length&&(m=i[i.length-1]).toA>=h?i[i.length-1]={fromA:m.fromA,fromB:m.fromB,toA:a,toB:c,diffA:m.diffA+p,diffB:m.diffB+g}:i.push({fromA:h,toA:a,fromB:d,toB:c,diffA:p,diffB:g})}),i}function be(t,e,n,l,i){if(!t.length)return e;let r=[];for(let s=0,o=0,f=0,h=0;;s++){let a=s==t.length?null:t[s],d=a?a.fromA+o:n.length,c=a?a.fromB+f:l.length;for(;h<e.length;){let g=e[h];if(a&&(g.toA+o>d||g.toB+f>c))break;r.push(g.offset(o,f)),h++}if(!a)break;let u=a.toA+o+a.diffA,m=a.toB+f+a.diffB,p=Ye(n.sliceString(d,u),l.sliceString(c,m),i);for(let g of Xe(p,n,l,d,c,Qe()))r.push(g);for(o+=a.diffA,f+=a.diffB;h<e.length;){let g=e[h];if(g.fromA+o>u&&g.fromB+f>m)break;h++}}return r}const et={scanLimit:500},Z=ot.fromClass(class{constructor(t){({deco:this.deco,gutter:this.gutter}=Le(t))}update(t){(t.docChanged||t.viewportChanged||At(t.startState,t.state)||xt(t.startState,t.state))&&({deco:this.deco,gutter:this.gutter}=Le(t.view))}},{decorations:t=>t.deco}),P=Q.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(Z))===null||e===void 0?void 0:e.gutter)||Ie.empty}}));function At(t,e){return t.field(k,!1)!=e.field(k,!1)}function xt(t,e){return t.facet(b)!=e.facet(b)}const Me=M.line({class:"cm-changedLine"}),tt=M.mark({class:"cm-changedText"}),wt=M.mark({tagName:"ins",class:"cm-insertedLine"}),kt=M.mark({tagName:"del",class:"cm-deletedLine"}),De=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function Bt(t,e,n,l,i,r){let s=n?t.fromA:t.fromB,o=n?t.toA:t.toB,f=0;if(s!=o){i.add(s,s,Me),i.add(s,o,n?kt:wt),r&&r.add(s,s,De);for(let h=e.iterRange(s,o-1),a=s;!h.next().done;){if(h.lineBreak){a++,i.add(a,a,Me),r&&r.add(a,a,De);continue}let d=a+h.value.length;if(l)for(;f<t.changes.length;){let c=t.changes[f],u=s+(n?c.fromA:c.fromB),m=s+(n?c.toA:c.toB),p=Math.max(a,u),g=Math.min(d,m);if(p<g&&i.add(p,g,tt),m<d)f++;else break}a=d}}}function Le(t){let e=t.state.field(k),{side:n,highlightChanges:l,markGutter:i,overrideChunk:r}=t.state.facet(b),s=n=="a",o=new N,f=i?new N:null,{from:h,to:a}=t.viewport;for(let d of e){if((s?d.fromA:d.fromB)>=a)break;(s?d.toA:d.toB)>h&&(!r||!r(t.state,d,o,f))&&Bt(d,t.state.doc,s,l,o,f)}return{deco:o.finish(),gutter:f&&f.finish()}}class q extends Y{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}const K=G.define({map:(t,e)=>t.map(e)}),W=H.define({create:()=>M.none,update:(t,e)=>{for(let n of e.effects)if(n.is(K))return n.value;return t.map(e.changes)},provide:t=>B.decorations.from(t)}),_=.01;function Se(t,e){if(t.size!=e.size)return!1;let n=t.iter(),l=e.iter();for(;n.value;){if(n.from!=l.from||Math.abs(n.value.spec.widget.height-l.value.spec.widget.height)>1)return!1;n.next(),l.next()}return!0}function bt(t,e,n){let l=new N,i=new N,r=t.state.field(W).iter(),s=e.state.field(W).iter(),o=0,f=0,h=0,a=0,d=t.viewport,c=e.viewport;for(let g=0;;g++){let C=g<n.length?n[g]:null,S=C?C.fromA:t.state.doc.length,R=C?C.fromB:e.state.doc.length;if(o<S){let x=t.lineBlockAt(o).top+h,D=e.lineBlockAt(f).top+a,w=x-D;w<-_?(h-=w,l.add(o,o,M.widget({widget:new q(-w),block:!0,side:-1}))):w>_&&(a+=w,i.add(f,f,M.widget({widget:new q(w),block:!0,side:-1})))}if(S>o+1e3&&o<d.from&&S>d.from&&f<c.from&&R>c.from){let x=Math.min(d.from-o,c.from-f);o+=x,f+=x,g--}else if(C)o=C.toA,f=C.toB;else break;for(;r.value&&r.from<o;)h-=r.value.spec.widget.height,r.next();for(;s.value&&s.from<f;)a-=s.value.spec.widget.height,s.next()}for(;r.value;)h-=r.value.spec.widget.height,r.next();for(;s.value;)a-=s.value.spec.widget.height,s.next();let u=t.contentHeight+h-(e.contentHeight+a);u<_?l.add(t.state.doc.length,t.state.doc.length,M.widget({widget:new q(-u),block:!0,side:1})):u>_&&i.add(e.state.doc.length,e.state.doc.length,M.widget({widget:new q(u),block:!0,side:1}));let m=l.finish(),p=i.finish();Se(m,t.state.field(W))||t.dispatch({effects:K.of(m)}),Se(p,e.state.field(W))||e.dispatch({effects:K.of(p)})}const le=G.define({map:(t,e)=>e.mapPos(t)});class Mt extends Y{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let n=document.createElement("div");return n.className="cm-collapsedLines",n.textContent=e.state.phrase("$ unchanged lines",this.lines),n.addEventListener("click",l=>{let i=e.posAtDOM(l.target);e.dispatch({effects:le.of(i)});let{side:r,sibling:s}=e.state.facet(b);s&&s().dispatch({effects:le.of(Dt(i,e.state.field(k),r=="a"))})}),n}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}}function Dt(t,e,n){let l=0,i=0;for(let r=0;;r++){let s=r<e.length?e[r]:null;if(!s||(n?s.fromA:s.fromB)>=t)return i+(t-l);[l,i]=n?[s.toA,s.toB]:[s.toB,s.toA]}}const Lt=H.define({create(t){return M.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is(le)&&(t=t.update({filter:l=>l!=n.value}));if(t.size&&e.state.field(k)!=e.startState.field(k,!1)){let n=e.state.facet(b).side=="a",l=[];for(let i of e.state.field(k))t.between(n?i.fromA:i.fromB,n?i.toA:i.toB,r=>{l.push(r)});l.length&&(t=t.update({filter:i=>l.indexOf(i)<0}))}return t},provide:t=>B.decorations.from(t)});function se({margin:t=3,minSize:e=4}){return Lt.init(n=>St(n,t,e))}function St(t,e,n){let l=new N,i=t.facet(b).side=="a",r=t.field(k),s=1;for(let o=0;;o++){let f=o<r.length?r[o]:null,h=o?s+e:1,a=f?t.doc.lineAt(i?f.fromA:f.fromB).number-1-e:t.doc.lines,d=a-h+1;if(d>=n&&l.add(t.doc.line(h).from,t.doc.line(a).to,M.replace({widget:new Mt(d),block:!0})),!f)break;s=t.doc.lineAt(Math.min(t.doc.length,i?f.toA:f.toB)).number}return l.finish()}const Ot=B.styleModule.of(new st({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),nt=B.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"⦚"',marginInlineEnd:"7px"},"&:after":{content:'"⦚"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),Oe=new Ge,$=new Ge;class Et{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||et;let n=[Q.low(Z),nt,Ot,W,B.updateListener.of(d=>{this.measuring<0&&(d.heightChanged||d.viewportChanged)&&!d.transactions.some(c=>c.effects.some(u=>u.is(K)))&&this.measure()})],l=[b.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&l.push(P);let i=ne.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],B.editorAttributes.of({class:"cm-merge-a"}),$.of(l),n]}),r=[b.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&r.push(P);let s=ne.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],B.editorAttributes.of({class:"cm-merge-b"}),$.of(r),n]});this.chunks=O.build(i.doc,s.doc,this.diffConf);let o=[k.init(()=>this.chunks),Oe.of(e.collapseUnchanged?se(e.collapseUnchanged):[])];i=i.update({effects:G.appendConfig.of(o)}).state,s=s.update({effects:G.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let f=e.orientation||"a-b",h=document.createElement("div");h.className="cm-mergeViewEditor";let a=document.createElement("div");a.className="cm-mergeViewEditor",this.editorDOM.appendChild(f=="a-b"?h:a),this.editorDOM.appendChild(f=="a-b"?a:h),this.a=new B({state:i,parent:h,root:e.root,dispatchTransactions:d=>this.dispatch(d,this.a)}),this.b=new B({state:s,parent:a,root:e.root,dispatchTransactions:d=>this.dispatch(d,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,n){if(e.some(l=>l.docChanged)){let l=e[e.length-1],i=e.reduce((s,o)=>s.compose(o.changes),Ne.empty(e[0].startState.doc.length));this.chunks=n==this.a?O.updateA(this.chunks,l.newDoc,this.b.state.doc,i,this.diffConf):O.updateB(this.chunks,this.a.state.doc,l.newDoc,i,this.diffConf),n.update([...e,l.state.update({effects:ie.of(this.chunks)})]);let r=n==this.a?this.b:this.a;r.update([r.state.update({effects:ie.of(this.chunks)})]),this.scheduleMeasure()}else n.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let r=e.orientation!="b-a";if(r!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(r?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(r?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let r=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in e&&(r=!!e.revertControls,s=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(o=e.renderRevertControl),this.setupRevertControls(r,s,o)}let n="highlightChanges"in e,l="gutter"in e,i="collapseUnchanged"in e;if(n||l||i){let r=[],s=[];if(n||l){let o=this.a.state.facet(b),f=l?e.gutter!==!1:o.markGutter,h=n?e.highlightChanges!==!1:o.highlightChanges;r.push($.reconfigure([b.of({side:"a",sibling:()=>this.b,highlightChanges:h,markGutter:f}),f?P:[]])),s.push($.reconfigure([b.of({side:"b",sibling:()=>this.a,highlightChanges:h,markGutter:f}),f?P:[]]))}if(i){let o=Oe.reconfigure(e.collapseUnchanged?se(e.collapseUnchanged):[]);r.push(o),s.push(o)}this.a.dispatch({effects:r}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(e,n,l){this.revertToA=n,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=l,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){bt(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,n=e.firstChild,l=this.a.viewport,i=this.b.viewport;for(let r=0;r<this.chunks.length;r++){let s=this.chunks[r];if(s.fromA>l.to||s.fromB>i.to)break;if(s.fromA<l.from||s.fromB<i.from)continue;let o=this.a.lineBlockAt(s.fromA).top+"px";for(;n&&+n.dataset.chunk<r;)n=Ee(n);n&&n.dataset.chunk==String(r)?(n.style.top!=o&&(n.style.top=o),n=n.nextSibling):e.insertBefore(this.renderRevertButton(o,r),n)}for(;n;)n=Ee(n)}renderRevertButton(e,n){let l;if(this.renderRevert)l=this.renderRevert();else{l=document.createElement("button");let i=this.a.state.phrase("Revert this chunk");l.setAttribute("aria-label",i),l.setAttribute("title",i),l.textContent=this.revertToLeft?"⇜":"⇝"}return l.style.top=e,l.setAttribute("data-chunk",String(n)),l}revertClicked(e){let n=e.target,l;for(;n&&n.parentNode!=this.revertDOM;)n=n.parentNode;if(n&&(l=this.chunks[n.dataset.chunk])){let[i,r,s,o,f,h]=this.revertToA?[this.b,this.a,l.fromB,l.toB,l.fromA,l.toA]:[this.a,this.b,l.fromA,l.toA,l.fromB,l.toB],a=i.state.sliceDoc(s,Math.max(s,o-1));s!=o&&h<=r.state.doc.length&&(a+=i.state.lineBreak),r.dispatch({changes:{from:f,to:Math.min(r.state.doc.length,h),insert:a},userEvent:"revert"}),e.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}}function Ee(t){let e=t.nextSibling;return t.remove(),e}const yt=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-deletedLineGutter"}},Rt=Q.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(Z))===null||e===void 0?void 0:e.gutter)||Ie.empty},widgetMarker:(t,e)=>e instanceof rt?yt:null}));function Tt(t){var e;let n=typeof t.original=="string"?Fe.of(t.original.split(/\r?\n/)):t.original,l=t.diffConfig||et;return[Q.low(Z),Vt,nt,B.editorAttributes.of({class:"cm-merge-b"}),Ze.of((i,r)=>{let s=r.effects.find(o=>o.is(he));return s&&(i=O.updateA(i,s.value.doc,r.startState.doc,s.value.changes,l)),r.docChanged&&(i=O.updateB(i,r.state.field(V),r.newDoc,r.changes,l)),i}),b.of({highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1,syntaxHighlightDeletions:t.syntaxHighlightDeletions!==!1,syntaxHighlightDeletionsMaxLength:3e3,mergeControls:(e=t.mergeControls)!==null&&e!==void 0?e:!0,overrideChunk:t.allowInlineDiffs?Wt:void 0,side:"b"}),V.init(()=>n),t.gutter!==!1?Rt:[],t.collapseUnchanged?se(t.collapseUnchanged):[],k.init(i=>O.build(n,i.doc,l))]}const he=G.define(),V=H.define({create:()=>Fe.empty,update(t,e){for(let n of e.effects)n.is(he)&&(t=n.value.doc);return t}}),ye=new WeakMap;class rt extends Y{constructor(e){super(),this.buildDOM=e,this.dom=null}eq(e){return this.dom==e.dom}toDOM(e){return this.dom||(this.dom=this.buildDOM(e))}}function Gt(t,e,n){let l=ye.get(e.changes);if(l)return l;let i=s=>{let{highlightChanges:o,syntaxHighlightDeletions:f,syntaxHighlightDeletionsMaxLength:h,mergeControls:a}=t.facet(b),d=document.createElement("div");if(d.className="cm-deletedChunk",a){let x=d.appendChild(document.createElement("div"));x.className="cm-chunkButtons";let D=A=>{A.preventDefault(),Nt(s,s.posAtDOM(d))},w=A=>{A.preventDefault(),Ft(s,s.posAtDOM(d))};if(typeof a=="function")x.appendChild(a("accept",D)),x.appendChild(a("reject",w));else{let A=x.appendChild(document.createElement("button"));A.name="accept",A.textContent=t.phrase("Accept"),A.onmousedown=D;let L=x.appendChild(document.createElement("button"));L.name="reject",L.textContent=t.phrase("Reject"),L.onmousedown=w}}if(n||e.fromA>=e.toA)return d;let c=s.state.field(V).sliceString(e.fromA,e.endA),u=f&&t.facet(at),m=S(),p=e.changes,g=0,C=!1;function S(){let x=d.appendChild(document.createElement("div"));return x.className="cm-deletedLine",x.appendChild(document.createElement("del"))}function R(x,D,w){for(let A=x;A<D;){if(c.charAt(A)==`
2
2
  `){m.firstChild||m.appendChild(document.createElement("br")),m=S(),A++;continue}let L=D,ce=w+(C?" cm-deletedText":""),ue=!1,X=c.indexOf(`
3
3
  `,A);if(X>-1&&X<D&&(L=X),o&&g<p.length){let j=Math.max(0,C?p[g].toA:p[g].fromA);j<=L&&(L=j,C&&g++,ue=!0)}if(L>A){let j=document.createTextNode(c.slice(A,L));if(ce){let me=m.appendChild(document.createElement("span"));me.className=ce,me.appendChild(j)}else m.appendChild(j);A=L}ue&&(C=!C)}}if(u&&e.toA-e.fromA<=h){let x=u.parser.parse(c),D=0;ft(x,{style:w=>dt(t,w)},(w,A,L)=>{w>D&&R(D,w,""),R(w,A,L),D=A}),R(D,c.length,"")}else R(0,c.length,"");return m.firstChild||m.appendChild(document.createElement("br")),d},r=M.widget({block:!0,side:-1,widget:new rt(i)});return ye.set(e.changes,r),r}function Nt(t,e){let{state:n}=t,l=e??n.selection.main.head,i=t.state.field(k).find(f=>f.fromB<=l&&f.endB>=l);if(!i)return!1;let r=t.state.sliceDoc(i.fromB,Math.max(i.fromB,i.toB-1)),s=t.state.field(V);i.fromB!=i.toB&&i.toA<=s.length&&(r+=t.state.lineBreak);let o=Ne.of({from:i.fromA,to:Math.min(s.length,i.toA),insert:r},s.length);return t.dispatch({effects:he.of({doc:o.apply(s),changes:o}),userEvent:"accept"}),!0}function Ft(t,e){let{state:n}=t,l=e??n.selection.main.head,i=n.field(k).find(o=>o.fromB<=l&&o.endB>=l);if(!i)return!1;let s=n.field(V).sliceString(i.fromA,Math.max(i.fromA,i.toA-1));return i.fromA!=i.toA&&i.toB<=n.doc.length&&(s+=n.lineBreak),t.dispatch({changes:{from:i.fromB,to:Math.min(n.doc.length,i.toB),insert:s},userEvent:"revert"}),!0}function Re(t){let e=new N;for(let n of t.field(k)){let l=t.facet(b).overrideChunk&&it(t,n);e.add(n.fromB,n.fromB,Gt(t,n,!!l))}return e.finish()}const Vt=H.define({create:t=>Re(t),update(t,e){return e.state.field(k,!1)!=e.startState.field(k,!1)?Re(e.state):t},provide:t=>B.decorations.from(t)}),Te=new WeakMap;function it(t,e){let n=Te.get(e);if(n!==void 0)return n;n=null;let l=t.field(V),i=t.doc,r=l.lineAt(e.endA).number-l.lineAt(e.fromA).number+1,s=i.lineAt(e.endB).number-i.lineAt(e.fromB).number+1;e:if(r==s&&r<10){let o=[],f=0,h=e.fromA,a=e.fromB;for(let d of e.changes){if(d.fromA<d.toA){f+=d.toA-d.fromA;let c=l.sliceString(h+d.fromA,h+d.toA);if(/\n/.test(c))break e;o.push(M.widget({widget:new jt(c),side:-1}).range(a+d.fromB))}d.fromB<d.toB&&o.push(tt.range(a+d.fromB,a+d.toB))}f<e.endA-e.fromA-r*2&&(n=o)}return Te.set(e,n),n}class jt extends Y{constructor(e){super(),this.text=e}eq(e){return this.text==e.text}toDOM(e){let n=document.createElement("del");return n.className="cm-deletedText",n.textContent=this.text,n}}const It=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-inlineChangedLineGutter"}},Ut=M.line({class:"cm-inlineChangedLine"});function Wt(t,e,n,l){let i=it(t,e),r=0;if(!i)return!1;for(let s=t.doc.lineAt(e.fromB);;){for(l&&l.add(s.from,s.from,It),n.add(s.from,s.from,Ut);r<i.length&&i[r].to<=s.to;){let o=i[r++];n.add(o.from,o.to,o.value)}if(s.to>=e.endB)break;s=t.doc.lineAt(s.to+1)}return!0}function Ht(t){const[e,n]=T.useState([]);return T.useEffect(()=>{let l=!1;const i=ht.matchFilename(ct,t);if(!i){n([]);return}return i.load().then(r=>{l||n([r])}).catch(()=>{l||n([])}),()=>{l=!0}},[t]),e}function Kt({baseline:t,current:e,theme:n,filename:l,sideBySide:i,onRejectHunk:r,onHunkCountChange:s}){const o=Ht(l);return i?J.jsx(Pt,{baseline:t,current:e,theme:n,languageExtension:o}):J.jsx(zt,{baseline:t,current:e,theme:n,languageExtension:o,onRejectHunk:r,onHunkCountChange:s})}function zt({baseline:t,current:e,theme:n,languageExtension:l,onRejectHunk:i,onHunkCountChange:r}){const s=T.useRef(-1),o=T.useMemo(()=>[B.lineWrapping,Tt({original:t,gutter:!0,mergeControls:!0,collapseUnchanged:{margin:3,minSize:4}}),...l],[t,l]);return J.jsx(lt,{value:e,editable:!1,readOnly:!0,theme:n,height:"100%",className:"desktop:select-text h-full text-sm",extensions:o,basicSetup:{highlightActiveLine:!1,highlightActiveLineGutter:!1},onChange:f=>i(f),onUpdate:f=>{var a;const h=((a=vt(f.state))==null?void 0:a.chunks.length)??null;h!==null&&h!==s.current&&(s.current=h,r(h))}})}function Pt({baseline:t,current:e,theme:n,languageExtension:l}){const i=T.useRef(null);return T.useEffect(()=>{const r=i.current;if(!r)return;const s=[B.editable.of(!1),ne.readOnly.of(!0),B.lineWrapping,...n==="dark"?[qt()]:[],...l],o=new Et({a:{doc:t,extensions:s},b:{doc:e,extensions:s},parent:r,collapseUnchanged:{margin:3,minSize:4},highlightChanges:!0,gutter:!0});return()=>o.destroy()},[t,e,n,l]),J.jsx("div",{ref:i,className:"cm-diff-split h-full overflow-auto text-sm"})}function qt(){return B.theme({"&":{backgroundColor:"transparent",color:"inherit"}},{dark:!0})}export{Kt as CodeMirrorDiff};
@@ -1 +1 @@
1
- import{r as n,j as f}from"./index-DcZPWi_I.js";import{R as l}from"./index-Dmn03xST.js";import{m as a,n as c,E as x}from"./index-mFOJXyAE.js";function j({value:u,editable:t,filename:i,languageHint:e,theme:h,onChange:m}){const[g,r]=n.useState([]);return n.useEffect(()=>{let s=!1;const o=e?a.matchLanguageName(c,e,!0):a.matchFilename(c,i);if(!o){r([]);return}return o.load().then(p=>{s||r([p])}).catch(()=>{s||r([])}),()=>{s=!0}},[i,e]),f.jsx(l,{value:u,editable:t,readOnly:!t,onChange:m,theme:h,height:"100%",className:"desktop:select-text h-full text-sm",extensions:[x.lineWrapping,...g],basicSetup:{highlightActiveLine:t,highlightActiveLineGutter:t}})}export{j as CodeMirrorEditor};
1
+ import{r as n,j as f}from"./index-DBdO-_iL.js";import{R as l}from"./index-DnfhvN3q.js";import{m as a,n as c,E as x}from"./index-CocSe_I3.js";function j({value:u,editable:t,filename:i,languageHint:e,theme:h,onChange:m}){const[g,r]=n.useState([]);return n.useEffect(()=>{let s=!1;const o=e?a.matchLanguageName(c,e,!0):a.matchFilename(c,i);if(!o){r([]);return}return o.load().then(p=>{s||r([p])}).catch(()=>{s||r([])}),()=>{s=!0}},[i,e]),f.jsx(l,{value:u,editable:t,readOnly:!t,onChange:m,theme:h,height:"100%",className:"desktop:select-text h-full text-sm",extensions:[x.lineWrapping,...g],basicSetup:{highlightActiveLine:t,highlightActiveLineGutter:t}})}export{j as CodeMirrorEditor};
@@ -1 +1 @@
1
- import{a1 as A,a3 as E,a4 as k,fB as I,fC as $,fD as P,fE as j,fF as o,fG as R,fH as q,fI as z,r as p,j as t,I as y,B as v,G as w,fJ as F,e as U,O as W,Q as X,C as B,U as K,f as Q,a7 as H}from"./index-DcZPWi_I.js";function G(){const e=A(),s=E();return k({mutationFn:({agentId:n,body:a})=>e.createCommitment(n,a),onSettled:()=>s.invalidateQueries({queryKey:I.all})})}function J(){const e=A(),s=E();return k({mutationFn:({id:n,body:a})=>e.updateCommitment(n,a),onSettled:()=>s.invalidateQueries({queryKey:I.all})})}$();const _=300,O=500,Z=200,D="external:",T=P(["open","kept","missed","dropped"]).openapi("CommitmentState"),V=j({id:o(),agentId:o(),to:o().nullable(),what:o(),dueAt:o().nullable(),state:T,overdue:R(),sourceSessionId:o().nullable(),sourceRoomEntryId:o().nullable(),createdAt:o(),closedAt:o().nullable(),note:o().nullable()}).openapi("Commitment"),L=o().datetime({offset:!0});j({what:o().trim().min(1).max(_),to:o().trim().min(1).max(Z).optional(),dueAt:L.optional()}).openapi("CreateCommitmentRequest");j({state:T,dueAt:L.nullable().optional(),note:o().trim().max(O).optional(),from:T.optional()}).openapi("UpdateCommitmentRequest");const Y=500;j({agentId:o().min(1).optional(),state:T.optional(),to:o().min(1).optional(),limit:q().int().min(1).max(Y).optional()}).openapi("ListCommitmentsQuery");j({commitments:z(V)}).openapi("ListCommitmentsResponse");function ee(e,s=new Date){if(!e)return null;const n=new Date(e);if(Number.isNaN(n.getTime()))return null;const a=n.getTime()<s.getTime()?"Overdue ·":"Due",d=n.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"});return n.toDateString()===s.toDateString()?`${a} ${d}`:Math.abs(n.getTime()-s.getTime())/864e5<6?`${a} ${n.toLocaleDateString(void 0,{weekday:"short"})} ${d}`:`${a} ${n.toLocaleDateString(void 0,{month:"short",day:"numeric"})}`}function te(e,s){return e?e.startsWith(D)?`To ${e.slice(D.length)}`:`To ${(s==null?void 0:s(e))??e}`:null}function se(e){return{open:e.filter(s=>s.state==="open"),closed:e.filter(s=>s.state!=="open")}}const ae={kept:"Kept",missed:"Missed",dropped:"Dropped"};function de(e){var n;const s=new Map;for(const a of e)s.set(a.id,a.displayName),(n=a.agent)!=null&&n.manifestId&&s.set(a.agent.manifestId,a.displayName);return a=>s.get(a)}const ne=6e4;function oe(){const e=new Date;return new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().slice(0,16)}function ie({agentId:e,onDone:s}){var m;const n=G(),[a,d]=p.useState(""),[r,l]=p.useState(""),u=p.useId(),g=p.useId(),x=a.trim(),N=n.isError&&((m=n.error)==null?void 0:m.code)==="PAST_DUE",h=r?new Date(r).getTime():null,[c,S]=p.useState(!1),[b]=p.useState(oe);function i(C){if(C.preventDefault(),!x||c)return;const f=h!==null?new Date(h).toISOString():void 0;n.mutate({agentId:e,body:{what:x,...f?{dueAt:f}:{}}},{onSuccess:s})}return t.jsxs("form",{onSubmit:i,"data-slot":"add-commitment-form",className:"flex flex-col gap-2 rounded-md border p-3",children:[t.jsx("label",{htmlFor:u,className:"text-xs font-medium",children:"What was promised"}),t.jsx(y,{id:u,value:a,maxLength:_,onChange:C=>d(C.target.value),placeholder:"Send Acme the revised quote"}),t.jsx("label",{htmlFor:g,className:"text-xs font-medium",children:"Due (optional)"}),t.jsx(y,{id:g,type:"datetime-local",value:r,min:b,"aria-invalid":c||void 0,onChange:C=>{const f=C.target.value;l(f),S(f!==""&&new Date(f).getTime()<Date.now()-ne)}}),(c||N)&&t.jsx("p",{className:"text-destructive text-xs",children:"That time has passed."}),n.isError&&!N&&t.jsx("p",{role:"alert",className:"text-destructive text-xs",children:"Couldn’t save the commitment. Try again."}),t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx(v,{type:"button",size:"sm",variant:"ghost",onClick:s,children:"Cancel"}),t.jsx(v,{type:"submit",size:"sm",disabled:!x||c||n.isPending,children:"Add commitment"})]})]})}function M({commitment:e,agentName:s,nameOf:n,onClose:a,busy:d}){const r=e.state==="open",l=[s,te(e.to,n)].filter(Boolean).join(" · "),u=r?ee(e.dueAt):null;return t.jsxs("li",{"data-slot":"commitment-row","data-state":e.state,"data-overdue":e.overdue||void 0,className:"flex flex-col gap-2 rounded-md px-2 py-2 sm:flex-row sm:items-center sm:gap-3",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:w("text-sm break-words",!r&&"text-muted-foreground",e.state==="dropped"&&"line-through"),children:e.what}),(l||u||!r)&&t.jsxs("div",{className:"text-muted-foreground mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs",children:[e.state!=="open"&&t.jsx("span",{children:ae[e.state]}),l&&t.jsx("span",{className:"min-w-0 truncate",children:l}),u&&t.jsx("span",{className:w(e.overdue&&"text-destructive font-medium"),children:u})]})]}),r&&a&&t.jsxs("div",{className:"flex shrink-0 gap-1",children:[t.jsx(v,{size:"xs",variant:"outline",disabled:d,onClick:()=>a("kept"),"aria-label":`Mark kept: ${e.what}`,children:"Mark kept"}),t.jsx(v,{size:"xs",variant:"ghost",disabled:d,onClick:()=>a("dropped"),"aria-label":`Drop: ${e.what}`,children:"Drop"})]})]})}const re={kept:"Marked kept",dropped:"Commitment dropped"};function ue({agentId:e,nameOf:s,canAdd:n=!1,readOnly:a=!1,canChange:d}){var b;const r=F(e?{agentId:e}:{}),l=J(),[u,g]=p.useState(!1),x=e===void 0;function N(i,m){l.mutate({id:i.id,body:{state:m}},{onSuccess:()=>H.success(re[m],{action:{label:"Undo",onClick:()=>l.mutate({id:i.id,body:{state:"open",from:m}})}})})}if(r.isPending)return t.jsx(U,{className:"h-16 w-full"});if(r.isError)return t.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read commitments."});const{open:h,closed:c}=se(r.data),S=l.isPending?(b=l.variables)==null?void 0:b.id:void 0;return t.jsxs("div",{"data-slot":"commitment-list",className:"flex flex-col gap-2",children:[h.length===0&&c.length===0&&!u&&t.jsx("p",{className:"text-muted-foreground text-sm",children:"No commitments yet."}),h.length>0&&t.jsx("ul",{className:"flex flex-col","aria-label":"Open commitments",children:h.map(i=>t.jsx(M,{commitment:i,agentName:x?s==null?void 0:s(i.agentId):void 0,nameOf:s,busy:S===i.id,...a||d&&!d(i)?{}:{onClose:m=>N(i,m)}},i.id))}),l.isError&&t.jsx("p",{role:"alert",className:"text-destructive text-xs",children:"Couldn’t change that commitment. Try again."}),c.length>0&&t.jsxs(W,{children:[t.jsxs(X,{className:"focus-ring text-muted-foreground hover:text-foreground group flex items-center gap-1 rounded-md px-2 py-1 text-xs",children:[t.jsx(B,{"aria-hidden":!0,className:"size-3.5 transition-transform group-data-[state=open]:rotate-90"}),"Closed (",c.length,")"]}),t.jsx(K,{children:t.jsx("ul",{className:"flex flex-col","aria-label":"Closed commitments",children:c.map(i=>t.jsx(M,{commitment:i,agentName:x?s==null?void 0:s(i.agentId):void 0,nameOf:s},i.id))})})]}),n&&!a&&e&&u&&t.jsx(ie,{agentId:e,onDone:()=>g(!1)}),n&&!a&&e&&!u&&t.jsxs(v,{size:"sm",variant:"ghost",className:"self-start",onClick:()=>g(!0),children:[t.jsx(Q,{"aria-hidden":!0}),"Add commitment"]})]})}export{ue as C,de as r};
1
+ import{a1 as A,a3 as E,a4 as k,fB as I,fC as $,fD as P,fE as j,fF as o,fG as R,fH as q,fI as z,r as p,j as t,I as y,B as v,G as w,fJ as F,e as U,O as W,Q as X,C as B,U as K,f as Q,a7 as H}from"./index-DBdO-_iL.js";function G(){const e=A(),s=E();return k({mutationFn:({agentId:n,body:a})=>e.createCommitment(n,a),onSettled:()=>s.invalidateQueries({queryKey:I.all})})}function J(){const e=A(),s=E();return k({mutationFn:({id:n,body:a})=>e.updateCommitment(n,a),onSettled:()=>s.invalidateQueries({queryKey:I.all})})}$();const _=300,O=500,Z=200,D="external:",T=P(["open","kept","missed","dropped"]).openapi("CommitmentState"),V=j({id:o(),agentId:o(),to:o().nullable(),what:o(),dueAt:o().nullable(),state:T,overdue:R(),sourceSessionId:o().nullable(),sourceRoomEntryId:o().nullable(),createdAt:o(),closedAt:o().nullable(),note:o().nullable()}).openapi("Commitment"),L=o().datetime({offset:!0});j({what:o().trim().min(1).max(_),to:o().trim().min(1).max(Z).optional(),dueAt:L.optional()}).openapi("CreateCommitmentRequest");j({state:T,dueAt:L.nullable().optional(),note:o().trim().max(O).optional(),from:T.optional()}).openapi("UpdateCommitmentRequest");const Y=500;j({agentId:o().min(1).optional(),state:T.optional(),to:o().min(1).optional(),limit:q().int().min(1).max(Y).optional()}).openapi("ListCommitmentsQuery");j({commitments:z(V)}).openapi("ListCommitmentsResponse");function ee(e,s=new Date){if(!e)return null;const n=new Date(e);if(Number.isNaN(n.getTime()))return null;const a=n.getTime()<s.getTime()?"Overdue ·":"Due",d=n.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"});return n.toDateString()===s.toDateString()?`${a} ${d}`:Math.abs(n.getTime()-s.getTime())/864e5<6?`${a} ${n.toLocaleDateString(void 0,{weekday:"short"})} ${d}`:`${a} ${n.toLocaleDateString(void 0,{month:"short",day:"numeric"})}`}function te(e,s){return e?e.startsWith(D)?`To ${e.slice(D.length)}`:`To ${(s==null?void 0:s(e))??e}`:null}function se(e){return{open:e.filter(s=>s.state==="open"),closed:e.filter(s=>s.state!=="open")}}const ae={kept:"Kept",missed:"Missed",dropped:"Dropped"};function de(e){var n;const s=new Map;for(const a of e)s.set(a.id,a.displayName),(n=a.agent)!=null&&n.manifestId&&s.set(a.agent.manifestId,a.displayName);return a=>s.get(a)}const ne=6e4;function oe(){const e=new Date;return new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().slice(0,16)}function ie({agentId:e,onDone:s}){var m;const n=G(),[a,d]=p.useState(""),[r,l]=p.useState(""),u=p.useId(),g=p.useId(),x=a.trim(),N=n.isError&&((m=n.error)==null?void 0:m.code)==="PAST_DUE",h=r?new Date(r).getTime():null,[c,S]=p.useState(!1),[b]=p.useState(oe);function i(C){if(C.preventDefault(),!x||c)return;const f=h!==null?new Date(h).toISOString():void 0;n.mutate({agentId:e,body:{what:x,...f?{dueAt:f}:{}}},{onSuccess:s})}return t.jsxs("form",{onSubmit:i,"data-slot":"add-commitment-form",className:"flex flex-col gap-2 rounded-md border p-3",children:[t.jsx("label",{htmlFor:u,className:"text-xs font-medium",children:"What was promised"}),t.jsx(y,{id:u,value:a,maxLength:_,onChange:C=>d(C.target.value),placeholder:"Send Acme the revised quote"}),t.jsx("label",{htmlFor:g,className:"text-xs font-medium",children:"Due (optional)"}),t.jsx(y,{id:g,type:"datetime-local",value:r,min:b,"aria-invalid":c||void 0,onChange:C=>{const f=C.target.value;l(f),S(f!==""&&new Date(f).getTime()<Date.now()-ne)}}),(c||N)&&t.jsx("p",{className:"text-destructive text-xs",children:"That time has passed."}),n.isError&&!N&&t.jsx("p",{role:"alert",className:"text-destructive text-xs",children:"Couldn’t save the commitment. Try again."}),t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx(v,{type:"button",size:"sm",variant:"ghost",onClick:s,children:"Cancel"}),t.jsx(v,{type:"submit",size:"sm",disabled:!x||c||n.isPending,children:"Add commitment"})]})]})}function M({commitment:e,agentName:s,nameOf:n,onClose:a,busy:d}){const r=e.state==="open",l=[s,te(e.to,n)].filter(Boolean).join(" · "),u=r?ee(e.dueAt):null;return t.jsxs("li",{"data-slot":"commitment-row","data-state":e.state,"data-overdue":e.overdue||void 0,className:"flex flex-col gap-2 rounded-md px-2 py-2 sm:flex-row sm:items-center sm:gap-3",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:w("text-sm break-words",!r&&"text-muted-foreground",e.state==="dropped"&&"line-through"),children:e.what}),(l||u||!r)&&t.jsxs("div",{className:"text-muted-foreground mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs",children:[e.state!=="open"&&t.jsx("span",{children:ae[e.state]}),l&&t.jsx("span",{className:"min-w-0 truncate",children:l}),u&&t.jsx("span",{className:w(e.overdue&&"text-destructive font-medium"),children:u})]})]}),r&&a&&t.jsxs("div",{className:"flex shrink-0 gap-1",children:[t.jsx(v,{size:"xs",variant:"outline",disabled:d,onClick:()=>a("kept"),"aria-label":`Mark kept: ${e.what}`,children:"Mark kept"}),t.jsx(v,{size:"xs",variant:"ghost",disabled:d,onClick:()=>a("dropped"),"aria-label":`Drop: ${e.what}`,children:"Drop"})]})]})}const re={kept:"Marked kept",dropped:"Commitment dropped"};function ue({agentId:e,nameOf:s,canAdd:n=!1,readOnly:a=!1,canChange:d}){var b;const r=F(e?{agentId:e}:{}),l=J(),[u,g]=p.useState(!1),x=e===void 0;function N(i,m){l.mutate({id:i.id,body:{state:m}},{onSuccess:()=>H.success(re[m],{action:{label:"Undo",onClick:()=>l.mutate({id:i.id,body:{state:"open",from:m}})}})})}if(r.isPending)return t.jsx(U,{className:"h-16 w-full"});if(r.isError)return t.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read commitments."});const{open:h,closed:c}=se(r.data),S=l.isPending?(b=l.variables)==null?void 0:b.id:void 0;return t.jsxs("div",{"data-slot":"commitment-list",className:"flex flex-col gap-2",children:[h.length===0&&c.length===0&&!u&&t.jsx("p",{className:"text-muted-foreground text-sm",children:"No commitments yet."}),h.length>0&&t.jsx("ul",{className:"flex flex-col","aria-label":"Open commitments",children:h.map(i=>t.jsx(M,{commitment:i,agentName:x?s==null?void 0:s(i.agentId):void 0,nameOf:s,busy:S===i.id,...a||d&&!d(i)?{}:{onClose:m=>N(i,m)}},i.id))}),l.isError&&t.jsx("p",{role:"alert",className:"text-destructive text-xs",children:"Couldn’t change that commitment. Try again."}),c.length>0&&t.jsxs(W,{children:[t.jsxs(X,{className:"focus-ring text-muted-foreground hover:text-foreground group flex items-center gap-1 rounded-md px-2 py-1 text-xs",children:[t.jsx(B,{"aria-hidden":!0,className:"size-3.5 transition-transform group-data-[state=open]:rotate-90"}),"Closed (",c.length,")"]}),t.jsx(K,{children:t.jsx("ul",{className:"flex flex-col","aria-label":"Closed commitments",children:c.map(i=>t.jsx(M,{commitment:i,agentName:x?s==null?void 0:s(i.agentId):void 0,nameOf:s},i.id))})})]}),n&&!a&&e&&u&&t.jsx(ie,{agentId:e,onDone:()=>g(!1)}),n&&!a&&e&&!u&&t.jsxs(v,{size:"sm",variant:"ghost",className:"self-start",onClick:()=>g(!0),children:[t.jsx(Q,{"aria-hidden":!0}),"Add commitment"]})]})}export{ue as C,de as r};
@@ -1 +1 @@
1
- import{r,d,j as m}from"./index-DcZPWi_I.js";import{r as c,C as l}from"./CommitmentList-0V6QivXH.js";function u({member:s,roster:t}){var o;const e=(o=s.agent)==null?void 0:o.manifestId,i=r.useMemo(()=>c(t),[t]),n=d(s,t),a=n==="managed"||n==="system";return e?m.jsx("div",{className:"min-h-0 flex-1","data-slot":"profile-commitments",children:m.jsx(l,{agentId:e,nameOf:i,canAdd:a,readOnly:!a})}):null}export{u as CommitmentsPage};
1
+ import{r,d,j as m}from"./index-DBdO-_iL.js";import{r as c,C as l}from"./CommitmentList-BK97ndab.js";function u({member:s,roster:t}){var o;const e=(o=s.agent)==null?void 0:o.manifestId,i=r.useMemo(()=>c(t),[t]),n=d(s,t),a=n==="managed"||n==="system";return e?m.jsx("div",{className:"min-h-0 flex-1","data-slot":"profile-commitments",children:m.jsx(l,{agentId:e,nameOf:i,canAdd:a,readOnly:!a})}):null}export{u as CommitmentsPage};
@@ -1,4 +1,4 @@
1
- import{W as g,a1 as x,aW as o,r as C,j as e,B as d,Y as P}from"./index-DcZPWi_I.js";import{r as m,u as f,C as w}from"./ComputerViewer-2ugaCd0H.js";import{u as v}from"./use-is-below-desktop-Qwyg-mFb.js";/**
1
+ import{W as g,a1 as x,aW as o,r as C,j as e,B as d,Y as P}from"./index-DBdO-_iL.js";import{r as m,u as f,C as w}from"./ComputerViewer-DgG7t2KZ.js";import{u as v}from"./use-is-below-desktop-BB9kHnYm.js";/**
2
2
  * @license lucide-react v1.48.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- var R=Object.defineProperty;var S=(i,t,e)=>t in i?R(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var o=(i,t,e)=>S(i,typeof t!="symbol"?t+"":t,e);import{a1 as D,a2 as F,r as h,j as a,I as O,B as y,G as I}from"./index-DcZPWi_I.js";const Y=["computer","local"];function z(){const i=D();return F({queryKey:Y,queryFn:()=>i.getComputer(),networkMode:"always",refetchInterval:2e3,retry:!1})}class B{constructor(t,e,r){o(this,"snapshot",{frame:null,lease:null,owner:null,busy:!1,error:!1,controlError:!1});o(this,"listeners",new Map);o(this,"timer");o(this,"epoch",0);o(this,"acquisition",0);o(this,"queue",Promise.resolve());o(this,"movePending",!1);o(this,"polling",!1);o(this,"retired",!1);o(this,"pendingOwner",null);o(this,"frameRequest",null);o(this,"getSnapshot",()=>this.snapshot);o(this,"subscribe",(t,e)=>(this.listeners.set(t,e),!this.polling&&!this.retired&&this.start(),()=>{this.listeners.delete(t),this.releaseFor(t),this.listeners.size===0&&(this.epoch+=1,this.polling=!1,clearTimeout(this.timer),this.update({frame:null}))}));o(this,"release",async()=>{const t=this.snapshot.lease;this.drop();const e=this.acquisition;if(t)try{await this.transport.releaseComputerControl(t.leaseId)}catch{e===this.acquisition&&this.update({error:!0,frame:null})}});o(this,"releaseFor",t=>this.snapshot.owner===t||this.pendingOwner===t?this.release():Promise.resolve());o(this,"acquire",async t=>{if(this.retired||!this.listeners.has(t)||this.snapshot.busy||!this.snapshot.frame||this.snapshot.lease)return;const e=++this.acquisition;this.pendingOwner=t,this.update({busy:!0,controlError:!1});try{const r=await this.transport.acquireComputerControl();if(!this.listeners.has(t)||e!==this.acquisition||r.generation!==this.generation){await this.transport.releaseComputerControl(r.leaseId);return}this.update({lease:r,owner:t,controlError:!1})}catch{e===this.acquisition&&this.update({controlError:!0})}finally{e===this.acquisition&&(this.pendingOwner=null,this.update({busy:!1}))}});o(this,"send",(t,e)=>{const r=this.snapshot.lease;if(!r||this.snapshot.owner!==t||!this.listeners.has(t))return Promise.resolve(!1);const l=e.kind==="pointer"&&e.action==="move";if(l&&this.movePending)return Promise.resolve(!1);l&&(this.movePending=!0);const n=this.queue.then(async()=>{if(this.snapshot.lease!==r||this.snapshot.owner!==t||!this.listeners.has(t))return l&&(this.movePending=!1),!1;try{return await this.transport.sendComputerInput({...e,...r}),!0}catch{return this.snapshot.lease===r&&this.snapshot.owner===t&&(this.update({error:!0,frame:null}),await this.release()),!1}finally{l&&(this.movePending=!1)}});return this.queue=n.then(()=>{}),n});this.transport=t,this.generation=e,this.previous=r}update(t){this.snapshot={...this.snapshot,...t};for(const e of this.listeners.values())e()}retire(){this.retired=!0,this.epoch+=1,this.polling=!1,clearTimeout(this.timer),this.release(),this.update({frame:null,error:!0})}start(){var r;(r=this.previous)==null||r.retire(),this.previous=void 0,this.polling=!0;const t=++this.epoch,e=async()=>{const l=this.snapshot.lease;try{const n=this.frameRequest??this.transport.getComputerFrame();this.frameRequest=n;const u=await n.finally(()=>{this.frameRequest===n&&(this.frameRequest=null)});if(t!==this.epoch)return;u.generation!==this.generation?(this.update({frame:null,error:!0}),this.release()):(u.controlledByYou===!1&&l&&this.snapshot.lease===l&&this.drop(),this.update({frame:u,error:!1}))}catch{if(t!==this.epoch)return;this.update({frame:null,error:!0}),this.release()}t===this.epoch&&(this.timer=setTimeout(()=>void e(),500))};e()}drop(){this.acquisition+=1,this.movePending=!1,this.pendingOwner=null,this.update({lease:null,owner:null,busy:!1,controlError:!1})}}const k=new WeakMap;function Q(i){var t;return((t=k.get(i))==null?void 0:t.release())??Promise.resolve()}function K(i,t){let e=k.get(i);return(!e||e.generation!==t)&&(e=new B(i,t,e),k.set(i,e)),e}function L(i){const t=D(),e=h.useId(),r=h.useMemo(()=>K(t,i),[t,i]),l=h.useCallback(u=>r.subscribe(e,u),[r,e]),n=h.useSyncExternalStore(l,r.getSnapshot);return{...n,lease:n.owner===e?n.lease:null,controlledElsewhere:!!(n.lease&&n.owner!==e),session:r,owner:e}}function U({send:i}){const[t,e]=h.useState(""),[r,l]=h.useState(!1),n=h.useRef(!0);return h.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),a.jsxs("form",{className:"flex flex-wrap gap-2",onSubmit:u=>{if(u.preventDefault(),!t||r)return;const m=t;l(!0),i({kind:"text",text:m}).then(c=>{n.current&&c&&e(d=>d===m?"":d)}).finally(()=>{n.current&&l(!1)})},children:[a.jsx(O,{"aria-label":"Type on computer",placeholder:"Type on computer",value:t,maxLength:4096,autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:!1,className:"min-w-0 flex-1",onChange:u=>e(u.target.value)}),a.jsx(y,{type:"submit","aria-disabled":r||!t,"aria-busy":r,children:"Type"}),a.jsx(y,{type:"button",variant:"outline",onClick:()=>{i({kind:"key",key:"Enter",action:"down"}),i({kind:"key",key:"Enter",action:"up"})},children:"Enter"})]})}function _({generation:i,onClose:t}){const{frame:e,lease:r,busy:l,error:n,controlError:u,controlledElsewhere:m,session:c,owner:d}=L(i),E=h.useRef(null),q=h.useId(),v=c.release,x=s=>c.send(d,s),N=async()=>{var s;await c.acquire(d),(s=E.current)==null||s.focus()};h.useEffect(()=>{const s=()=>{c.releaseFor(d)},g=()=>{document.hidden&&s()};return window.addEventListener("blur",s),document.addEventListener("visibilitychange",g),()=>{window.removeEventListener("blur",s),document.removeEventListener("visibilitychange",g)}},[c,d,v]);const w=(s,g)=>{var j,P,T,M;if(!r||!e)return;const p=s.currentTarget.getBoundingClientRect();if(!p.width||!p.height)return;const f=Math.min(p.width/e.width,p.height/e.height),b=p.left+(p.width-e.width*f)/2,C=p.top+(p.height-e.height*f)/2;(s.clientX<b||s.clientX>b+e.width*f||s.clientY<C||s.clientY>C+e.height*f)&&!((P=(j=s.currentTarget).hasPointerCapture)!=null&&P.call(j,s.pointerId))||(s.preventDefault(),g==="down"&&(s.currentTarget.focus(),(M=(T=s.currentTarget).setPointerCapture)==null||M.call(T,s.pointerId)),x({kind:"pointer",action:g,button:Math.max(0,Math.min(2,s.button)),x:Math.max(0,Math.min(e.width-1,Math.floor((s.clientX-b)/f))),y:Math.max(0,Math.min(e.height-1,Math.floor((s.clientY-C)/f)))}))};return a.jsxs("section",{"data-slot":"computer-viewer","aria-label":"Computer desktop",className:"flex h-full min-h-0 flex-col gap-2 overflow-auto p-3",onBlur:s=>{s.currentTarget.contains(s.relatedTarget)||c.releaseFor(d)},children:[a.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[a.jsx("p",{className:"text-muted-foreground mr-auto text-sm",role:"status",children:n?"Disconnected":r?"You have control":e?"Watching":"Connecting…"}),r?a.jsx(y,{variant:"outline",onClick:()=>void v(),children:"Return control"}):a.jsx(y,{variant:"outline",disabled:!e||m,"aria-disabled":l||!e||m,"aria-busy":l,onClick:()=>void N(),children:"Take over"}),t&&a.jsx(y,{variant:"ghost",onClick:t,children:"Close view"})]}),n&&a.jsx("p",{role:"alert",className:"text-destructive text-sm",children:"Disconnected. Trying to reconnect…"}),u&&!n&&a.jsx("p",{role:"alert",className:"text-destructive text-sm",children:"Couldn’t take control. Try again."}),e?a.jsx("div",{ref:E,role:"application","aria-label":"Computer desktop control","aria-describedby":q,tabIndex:r?0:-1,className:I("focus-visible:ring-ring block min-h-20 w-full flex-1 rounded-md outline-none select-none focus-visible:ring-2",r?"touch-none":"touch-pan-y"),onDragStart:s=>s.preventDefault(),onContextMenu:s=>s.preventDefault(),onPointerDown:s=>w(s,"down"),onPointerMove:s=>w(s,"move"),onPointerUp:s=>w(s,"up"),onPointerCancel:()=>void c.releaseFor(d),onKeyDown:s=>{if(r){if(s.preventDefault(),s.key==="Escape"&&s.ctrlKey&&s.shiftKey){v();return}s.repeat||x({kind:"key",key:s.key,action:"down"})}},onKeyUp:s=>{r&&(s.preventDefault(),x({kind:"key",key:s.key,action:"up"}))},children:a.jsx("img",{src:e.dataUrl,width:e.width,height:e.height,alt:"Live computer desktop",draggable:!1,className:"block h-full w-full rounded-md object-contain"})}):a.jsx("p",{role:"status",className:"text-muted-foreground py-10 text-center text-sm",children:"Waiting for the desktop…"}),r&&a.jsx(U,{send:x},r.leaseId),a.jsx("p",{id:q,className:I("text-muted-foreground shrink-0 text-xs",!r&&"sr-only"),children:"Press Control + Shift + Escape to return control."}),t&&a.jsx("p",{className:"text-muted-foreground shrink-0 text-xs",children:"Closing this view keeps the computer running."})]})}export{_ as C,Y as a,Q as r,z as u};
1
+ var R=Object.defineProperty;var S=(i,t,e)=>t in i?R(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var o=(i,t,e)=>S(i,typeof t!="symbol"?t+"":t,e);import{a1 as D,a2 as F,r as h,j as a,I as O,B as y,G as I}from"./index-DBdO-_iL.js";const Y=["computer","local"];function z(){const i=D();return F({queryKey:Y,queryFn:()=>i.getComputer(),networkMode:"always",refetchInterval:2e3,retry:!1})}class B{constructor(t,e,r){o(this,"snapshot",{frame:null,lease:null,owner:null,busy:!1,error:!1,controlError:!1});o(this,"listeners",new Map);o(this,"timer");o(this,"epoch",0);o(this,"acquisition",0);o(this,"queue",Promise.resolve());o(this,"movePending",!1);o(this,"polling",!1);o(this,"retired",!1);o(this,"pendingOwner",null);o(this,"frameRequest",null);o(this,"getSnapshot",()=>this.snapshot);o(this,"subscribe",(t,e)=>(this.listeners.set(t,e),!this.polling&&!this.retired&&this.start(),()=>{this.listeners.delete(t),this.releaseFor(t),this.listeners.size===0&&(this.epoch+=1,this.polling=!1,clearTimeout(this.timer),this.update({frame:null}))}));o(this,"release",async()=>{const t=this.snapshot.lease;this.drop();const e=this.acquisition;if(t)try{await this.transport.releaseComputerControl(t.leaseId)}catch{e===this.acquisition&&this.update({error:!0,frame:null})}});o(this,"releaseFor",t=>this.snapshot.owner===t||this.pendingOwner===t?this.release():Promise.resolve());o(this,"acquire",async t=>{if(this.retired||!this.listeners.has(t)||this.snapshot.busy||!this.snapshot.frame||this.snapshot.lease)return;const e=++this.acquisition;this.pendingOwner=t,this.update({busy:!0,controlError:!1});try{const r=await this.transport.acquireComputerControl();if(!this.listeners.has(t)||e!==this.acquisition||r.generation!==this.generation){await this.transport.releaseComputerControl(r.leaseId);return}this.update({lease:r,owner:t,controlError:!1})}catch{e===this.acquisition&&this.update({controlError:!0})}finally{e===this.acquisition&&(this.pendingOwner=null,this.update({busy:!1}))}});o(this,"send",(t,e)=>{const r=this.snapshot.lease;if(!r||this.snapshot.owner!==t||!this.listeners.has(t))return Promise.resolve(!1);const l=e.kind==="pointer"&&e.action==="move";if(l&&this.movePending)return Promise.resolve(!1);l&&(this.movePending=!0);const n=this.queue.then(async()=>{if(this.snapshot.lease!==r||this.snapshot.owner!==t||!this.listeners.has(t))return l&&(this.movePending=!1),!1;try{return await this.transport.sendComputerInput({...e,...r}),!0}catch{return this.snapshot.lease===r&&this.snapshot.owner===t&&(this.update({error:!0,frame:null}),await this.release()),!1}finally{l&&(this.movePending=!1)}});return this.queue=n.then(()=>{}),n});this.transport=t,this.generation=e,this.previous=r}update(t){this.snapshot={...this.snapshot,...t};for(const e of this.listeners.values())e()}retire(){this.retired=!0,this.epoch+=1,this.polling=!1,clearTimeout(this.timer),this.release(),this.update({frame:null,error:!0})}start(){var r;(r=this.previous)==null||r.retire(),this.previous=void 0,this.polling=!0;const t=++this.epoch,e=async()=>{const l=this.snapshot.lease;try{const n=this.frameRequest??this.transport.getComputerFrame();this.frameRequest=n;const u=await n.finally(()=>{this.frameRequest===n&&(this.frameRequest=null)});if(t!==this.epoch)return;u.generation!==this.generation?(this.update({frame:null,error:!0}),this.release()):(u.controlledByYou===!1&&l&&this.snapshot.lease===l&&this.drop(),this.update({frame:u,error:!1}))}catch{if(t!==this.epoch)return;this.update({frame:null,error:!0}),this.release()}t===this.epoch&&(this.timer=setTimeout(()=>void e(),500))};e()}drop(){this.acquisition+=1,this.movePending=!1,this.pendingOwner=null,this.update({lease:null,owner:null,busy:!1,controlError:!1})}}const k=new WeakMap;function Q(i){var t;return((t=k.get(i))==null?void 0:t.release())??Promise.resolve()}function K(i,t){let e=k.get(i);return(!e||e.generation!==t)&&(e=new B(i,t,e),k.set(i,e)),e}function L(i){const t=D(),e=h.useId(),r=h.useMemo(()=>K(t,i),[t,i]),l=h.useCallback(u=>r.subscribe(e,u),[r,e]),n=h.useSyncExternalStore(l,r.getSnapshot);return{...n,lease:n.owner===e?n.lease:null,controlledElsewhere:!!(n.lease&&n.owner!==e),session:r,owner:e}}function U({send:i}){const[t,e]=h.useState(""),[r,l]=h.useState(!1),n=h.useRef(!0);return h.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),a.jsxs("form",{className:"flex flex-wrap gap-2",onSubmit:u=>{if(u.preventDefault(),!t||r)return;const m=t;l(!0),i({kind:"text",text:m}).then(c=>{n.current&&c&&e(d=>d===m?"":d)}).finally(()=>{n.current&&l(!1)})},children:[a.jsx(O,{"aria-label":"Type on computer",placeholder:"Type on computer",value:t,maxLength:4096,autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:!1,className:"min-w-0 flex-1",onChange:u=>e(u.target.value)}),a.jsx(y,{type:"submit","aria-disabled":r||!t,"aria-busy":r,children:"Type"}),a.jsx(y,{type:"button",variant:"outline",onClick:()=>{i({kind:"key",key:"Enter",action:"down"}),i({kind:"key",key:"Enter",action:"up"})},children:"Enter"})]})}function _({generation:i,onClose:t}){const{frame:e,lease:r,busy:l,error:n,controlError:u,controlledElsewhere:m,session:c,owner:d}=L(i),E=h.useRef(null),q=h.useId(),v=c.release,x=s=>c.send(d,s),N=async()=>{var s;await c.acquire(d),(s=E.current)==null||s.focus()};h.useEffect(()=>{const s=()=>{c.releaseFor(d)},g=()=>{document.hidden&&s()};return window.addEventListener("blur",s),document.addEventListener("visibilitychange",g),()=>{window.removeEventListener("blur",s),document.removeEventListener("visibilitychange",g)}},[c,d,v]);const w=(s,g)=>{var j,P,T,M;if(!r||!e)return;const p=s.currentTarget.getBoundingClientRect();if(!p.width||!p.height)return;const f=Math.min(p.width/e.width,p.height/e.height),b=p.left+(p.width-e.width*f)/2,C=p.top+(p.height-e.height*f)/2;(s.clientX<b||s.clientX>b+e.width*f||s.clientY<C||s.clientY>C+e.height*f)&&!((P=(j=s.currentTarget).hasPointerCapture)!=null&&P.call(j,s.pointerId))||(s.preventDefault(),g==="down"&&(s.currentTarget.focus(),(M=(T=s.currentTarget).setPointerCapture)==null||M.call(T,s.pointerId)),x({kind:"pointer",action:g,button:Math.max(0,Math.min(2,s.button)),x:Math.max(0,Math.min(e.width-1,Math.floor((s.clientX-b)/f))),y:Math.max(0,Math.min(e.height-1,Math.floor((s.clientY-C)/f)))}))};return a.jsxs("section",{"data-slot":"computer-viewer","aria-label":"Computer desktop",className:"flex h-full min-h-0 flex-col gap-2 overflow-auto p-3",onBlur:s=>{s.currentTarget.contains(s.relatedTarget)||c.releaseFor(d)},children:[a.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[a.jsx("p",{className:"text-muted-foreground mr-auto text-sm",role:"status",children:n?"Disconnected":r?"You have control":e?"Watching":"Connecting…"}),r?a.jsx(y,{variant:"outline",onClick:()=>void v(),children:"Return control"}):a.jsx(y,{variant:"outline",disabled:!e||m,"aria-disabled":l||!e||m,"aria-busy":l,onClick:()=>void N(),children:"Take over"}),t&&a.jsx(y,{variant:"ghost",onClick:t,children:"Close view"})]}),n&&a.jsx("p",{role:"alert",className:"text-destructive text-sm",children:"Disconnected. Trying to reconnect…"}),u&&!n&&a.jsx("p",{role:"alert",className:"text-destructive text-sm",children:"Couldn’t take control. Try again."}),e?a.jsx("div",{ref:E,role:"application","aria-label":"Computer desktop control","aria-describedby":q,tabIndex:r?0:-1,className:I("focus-visible:ring-ring block min-h-20 w-full flex-1 rounded-md outline-none select-none focus-visible:ring-2",r?"touch-none":"touch-pan-y"),onDragStart:s=>s.preventDefault(),onContextMenu:s=>s.preventDefault(),onPointerDown:s=>w(s,"down"),onPointerMove:s=>w(s,"move"),onPointerUp:s=>w(s,"up"),onPointerCancel:()=>void c.releaseFor(d),onKeyDown:s=>{if(r){if(s.preventDefault(),s.key==="Escape"&&s.ctrlKey&&s.shiftKey){v();return}s.repeat||x({kind:"key",key:s.key,action:"down"})}},onKeyUp:s=>{r&&(s.preventDefault(),x({kind:"key",key:s.key,action:"up"}))},children:a.jsx("img",{src:e.dataUrl,width:e.width,height:e.height,alt:"Live computer desktop",draggable:!1,className:"block h-full w-full rounded-md object-contain"})}):a.jsx("p",{role:"status",className:"text-muted-foreground py-10 text-center text-sm",children:"Waiting for the desktop…"}),r&&a.jsx(U,{send:x},r.leaseId),a.jsx("p",{id:q,className:I("text-muted-foreground shrink-0 text-xs",!r&&"sr-only"),children:"Press Control + Shift + Escape to return control."}),t&&a.jsx("p",{className:"text-muted-foreground shrink-0 text-xs",children:"Closing this view keeps the computer running."})]})}export{_ as C,Y as a,Q as r,z as u};
@@ -1 +1 @@
1
- import{j as s,e as x,B as o,Y as m,Z as u,_ as h,$ as g}from"./index-DcZPWi_I.js";import{u as p,s as l,a as j,b as f}from"./access-copy-CW-z1oMH.js";import{Q as N}from"./query-error-state-DB-Jby7_.js";const v={agent:"From the agent",this_chat:"Only in this chat"};function k({agentId:n,onManage:e}){var i;const a=p(n);if(a.isPending)return s.jsx(x,{className:"h-24 w-full rounded-lg"});if(a.isError)return s.jsx(N,{title:"Couldn’t load account access",description:"Nothing changed. Try again.",onRetry:()=>void a.refetch(),isRetrying:a.isFetching});const c=((i=a.data)==null?void 0:i.connections)??[];return s.jsxs("section",{"aria-labelledby":"agent-account-access",className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h3",{id:"agent-account-access",className:"text-sm font-semibold",children:"Account access"}),s.jsx("p",{className:"text-muted-foreground mt-0.5 text-xs",children:"Accounts this agent can use."})]}),e&&s.jsxs(o,{variant:"ghost",size:"sm",onClick:e,children:["Manage",s.jsx(m,{className:"size-3.5","aria-hidden":!0})]})]}),c.length===0?s.jsxs("div",{className:"bg-muted/40 rounded-lg p-4 text-sm",children:[s.jsx("p",{className:"font-medium",children:"No account access"}),s.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Give access from the Connections page."})]}):s.jsx("ul",{className:"space-y-1.5",children:c.map(t=>{const r=t.readiness.state==="ready";return s.jsxs("li",{"data-testid":`agent-connection-${t.connectionId}`,className:"bg-muted/40 flex min-h-11 items-center gap-3 rounded-lg px-3 py-2",children:[s.jsx(u,{iconKey:t.toolkit,displayName:l(t.toolkit),className:"size-7"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("p",{className:"truncate text-sm font-medium",children:[l(t.toolkit)," (",t.label,")"]}),s.jsxs("p",{className:"text-muted-foreground text-xs",children:[t.operationRevisionIds.length," approved"," ",t.operationRevisionIds.length===1?"action":"actions",t.everyAgent&&" · given to every agent"]})]}),s.jsx(h,{size:"xs",variant:r?"secondary":"outline",title:r?void 0:t.readiness.copy.owner,children:r?"Available":"Unavailable"})]},t.connectionId)})})]})}const y="This only affects this chat. Turning an app back on never adds access.",C="Couldn’t change access for this chat. Try again.";function b(n){return(n==null?void 0:n.code)==="session_access_other_agent"?n.message:C}function _({sessionId:n,onManage:e,emptyAction:a,footer:c}){var r;const i=j(n);if(i.isPending)return s.jsx(x,{className:"h-16 w-full rounded-lg"});if(i.isError)return s.jsxs("section",{"data-testid":"session-connectors",className:"space-y-2",children:[s.jsx("p",{role:"alert",className:"text-destructive px-1 text-xs",children:"Couldn’t load account access."}),s.jsx(o,{variant:"ghost",size:"sm",onClick:()=>void i.refetch(),children:"Try again"})]});const t=((r=i.data)==null?void 0:r.connections)??[];return s.jsxs("section",{"data-testid":"session-connectors","aria-labelledby":"session-account-access",className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[s.jsx("h3",{id:"session-account-access",className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Connections"}),e&&s.jsxs(o,{variant:"ghost",size:"xs",onClick:e,children:["Manage agent access",s.jsx(m,{className:"size-3","aria-hidden":!0})]})]}),t.length===0?s.jsxs("div",{className:"bg-muted/40 space-y-2 rounded-md px-2.5 py-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"No account access"}),s.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Ask this agent to request the access it needs."})]}),a]}):s.jsxs(s.Fragment,{children:[t.some(d=>d.thisChat)&&s.jsx("p",{className:"text-muted-foreground px-1 pb-1 text-xs",children:y}),t.map(d=>s.jsx(S,{sessionId:n,connection:d},d.connectionId))]}),t.length>0&&c]})}function S({sessionId:n,connection:e}){const a=f(n),c=e.readiness.state==="ready",i=`${l(e.toolkit)} (${e.label})`;return s.jsxs("div",{"data-testid":`session-connection-${e.connectionId}`,"data-reason":e.readiness.reason,className:"bg-muted/40 rounded-md px-2.5 py-2",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.jsx("span",{className:"text-sm font-medium",children:i}),s.jsx(h,{size:"xs",variant:c?"secondary":"outline",children:c?v[e.source]:"Not available"})]}),s.jsx("p",{className:c?"text-muted-foreground mt-1 text-xs":"text-status-warning-fg mt-1 text-xs",children:c?`${e.operationRevisionIds.length} ${e.operationRevisionIds.length===1?"action":"actions"} available in this chat.`:e.readiness.copy.owner})]}),e.thisChat&&s.jsx(g,{"aria-label":`${i} in this chat`,"data-testid":`session-connection-switch-${e.connectionId}`,checked:e.thisChat==="on",disabled:a.isPending,onCheckedChange:t=>a.mutate({connectionId:e.connectionId,on:t}),className:"mt-0.5 shrink-0"})]}),a.isError&&e.thisChat&&s.jsx("p",{role:"alert",className:"text-destructive mt-1 text-xs",children:b(a.error)})]})}export{k as A,_ as S};
1
+ import{j as s,e as x,B as o,Y as m,Z as u,_ as h,$ as g}from"./index-DBdO-_iL.js";import{u as p,s as l,a as j,b as f}from"./access-copy-B1SlOYEi.js";import{Q as N}from"./query-error-state-puwJHnzi.js";const v={agent:"From the agent",this_chat:"Only in this chat"};function k({agentId:n,onManage:e}){var i;const a=p(n);if(a.isPending)return s.jsx(x,{className:"h-24 w-full rounded-lg"});if(a.isError)return s.jsx(N,{title:"Couldn’t load account access",description:"Nothing changed. Try again.",onRetry:()=>void a.refetch(),isRetrying:a.isFetching});const c=((i=a.data)==null?void 0:i.connections)??[];return s.jsxs("section",{"aria-labelledby":"agent-account-access",className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h3",{id:"agent-account-access",className:"text-sm font-semibold",children:"Account access"}),s.jsx("p",{className:"text-muted-foreground mt-0.5 text-xs",children:"Accounts this agent can use."})]}),e&&s.jsxs(o,{variant:"ghost",size:"sm",onClick:e,children:["Manage",s.jsx(m,{className:"size-3.5","aria-hidden":!0})]})]}),c.length===0?s.jsxs("div",{className:"bg-muted/40 rounded-lg p-4 text-sm",children:[s.jsx("p",{className:"font-medium",children:"No account access"}),s.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Give access from the Connections page."})]}):s.jsx("ul",{className:"space-y-1.5",children:c.map(t=>{const r=t.readiness.state==="ready";return s.jsxs("li",{"data-testid":`agent-connection-${t.connectionId}`,className:"bg-muted/40 flex min-h-11 items-center gap-3 rounded-lg px-3 py-2",children:[s.jsx(u,{iconKey:t.toolkit,displayName:l(t.toolkit),className:"size-7"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("p",{className:"truncate text-sm font-medium",children:[l(t.toolkit)," (",t.label,")"]}),s.jsxs("p",{className:"text-muted-foreground text-xs",children:[t.operationRevisionIds.length," approved"," ",t.operationRevisionIds.length===1?"action":"actions",t.everyAgent&&" · given to every agent"]})]}),s.jsx(h,{size:"xs",variant:r?"secondary":"outline",title:r?void 0:t.readiness.copy.owner,children:r?"Available":"Unavailable"})]},t.connectionId)})})]})}const y="This only affects this chat. Turning an app back on never adds access.",C="Couldn’t change access for this chat. Try again.";function b(n){return(n==null?void 0:n.code)==="session_access_other_agent"?n.message:C}function _({sessionId:n,onManage:e,emptyAction:a,footer:c}){var r;const i=j(n);if(i.isPending)return s.jsx(x,{className:"h-16 w-full rounded-lg"});if(i.isError)return s.jsxs("section",{"data-testid":"session-connectors",className:"space-y-2",children:[s.jsx("p",{role:"alert",className:"text-destructive px-1 text-xs",children:"Couldn’t load account access."}),s.jsx(o,{variant:"ghost",size:"sm",onClick:()=>void i.refetch(),children:"Try again"})]});const t=((r=i.data)==null?void 0:r.connections)??[];return s.jsxs("section",{"data-testid":"session-connectors","aria-labelledby":"session-account-access",className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[s.jsx("h3",{id:"session-account-access",className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Connections"}),e&&s.jsxs(o,{variant:"ghost",size:"xs",onClick:e,children:["Manage agent access",s.jsx(m,{className:"size-3","aria-hidden":!0})]})]}),t.length===0?s.jsxs("div",{className:"bg-muted/40 space-y-2 rounded-md px-2.5 py-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"No account access"}),s.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Ask this agent to request the access it needs."})]}),a]}):s.jsxs(s.Fragment,{children:[t.some(d=>d.thisChat)&&s.jsx("p",{className:"text-muted-foreground px-1 pb-1 text-xs",children:y}),t.map(d=>s.jsx(S,{sessionId:n,connection:d},d.connectionId))]}),t.length>0&&c]})}function S({sessionId:n,connection:e}){const a=f(n),c=e.readiness.state==="ready",i=`${l(e.toolkit)} (${e.label})`;return s.jsxs("div",{"data-testid":`session-connection-${e.connectionId}`,"data-reason":e.readiness.reason,className:"bg-muted/40 rounded-md px-2.5 py-2",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.jsx("span",{className:"text-sm font-medium",children:i}),s.jsx(h,{size:"xs",variant:c?"secondary":"outline",children:c?v[e.source]:"Not available"})]}),s.jsx("p",{className:c?"text-muted-foreground mt-1 text-xs":"text-status-warning-fg mt-1 text-xs",children:c?`${e.operationRevisionIds.length} ${e.operationRevisionIds.length===1?"action":"actions"} available in this chat.`:e.readiness.copy.owner})]}),e.thisChat&&s.jsx(g,{"aria-label":`${i} in this chat`,"data-testid":`session-connection-switch-${e.connectionId}`,checked:e.thisChat==="on",disabled:a.isPending,onCheckedChange:t=>a.mutate({connectionId:e.connectionId,on:t}),className:"mt-0.5 shrink-0"})]}),a.isError&&e.thisChat&&s.jsx("p",{role:"alert",className:"text-destructive mt-1 text-xs",children:b(a.error)})]})}export{k as A,_ as S};
@@ -1,4 +1,4 @@
1
- import{W as Z,a1 as H,a4 as Q,r,b6 as J,j as e,G as I,bD as K,_ as F,cM as X,cN as Y,cO as ee,g0 as se,g1 as te,B,g2 as ae,g3 as ne,g4 as R,x as ie,g5 as re,g6 as L,g7 as ce,g8 as oe,g9 as de,ga as le,gb as me,gc as ue,gd as pe,ge as xe,gf as ge,gg as he,eQ as fe,eR as je,f as ye,eS as ve,gh as U,a7 as N,ak as Ne,b as be,e as Ce}from"./index-DcZPWi_I.js";import{A as Te}from"./ConnectionAccessLists-DaPP4U96.js";import{u as Ie}from"./use-bindings-CpyT6kNu.js";import{b as Ae,u as Se,a as we,t as ke,B as De}from"./BindingDialog-DqPDLYbF.js";import{u as Re}from"./use-delete-binding-CfsnMXrL.js";import{u as Me,A as Pe}from"./AdapterSetupWizard-BG8H-Lld.js";import{u as Be}from"./use-relay-config-hItHtkSr.js";import{u as Ee}from"./use-external-adapter-catalog-aGlZNRrp.js";import"./relay-trace-schemas-CcCqyOrA.js";import{A as _,a as P,b as ze}from"./AdapterIcon-Qnxn0cE5.js";import{R as $}from"./radio-CaaE60ws.js";import"./access-copy-CW-z1oMH.js";import"./query-error-state-DB-Jby7_.js";import"./empty-state-DXWQsHMf.js";import"./form-D7kF-U0d.js";import"./use-adapter-catalog-YTofdqDJ.js";import"./trust-posture-dl6qwDtI.js";import"./markdown-content-Cqq_QMXA.js";/**
1
+ import{W as Z,a1 as H,a4 as Q,r,b6 as J,j as e,G as I,bD as K,_ as F,cM as X,cN as Y,cO as ee,g0 as se,g1 as te,B,g2 as ae,g3 as ne,g4 as R,x as ie,g5 as re,g6 as L,g7 as ce,g8 as oe,g9 as de,ga as le,gb as me,gc as ue,gd as pe,ge as xe,gf as ge,gg as he,eQ as fe,eR as je,f as ye,eS as ve,gh as U,a7 as N,ak as Ne,b as be,e as Ce}from"./index-DBdO-_iL.js";import{A as Te}from"./ConnectionAccessLists-Pbo2lft8.js";import{u as Ie}from"./use-bindings-DiFC7kWg.js";import{b as Ae,u as Se,a as we,t as ke,B as De}from"./BindingDialog-BAwbHFq3.js";import{u as Re}from"./use-delete-binding-FtM6qPfF.js";import{u as Me,A as Pe}from"./AdapterSetupWizard-RyNPjSmU.js";import{u as Be}from"./use-relay-config-CbZQKFhZ.js";import{u as Ee}from"./use-external-adapter-catalog-Lx8LZDAa.js";import"./relay-trace-schemas-DwqIIDB9.js";import{A as _,a as P,b as ze}from"./AdapterIcon-DlkN0YJo.js";import{R as $}from"./radio-DR4E05zZ.js";import"./access-copy-B1SlOYEi.js";import"./query-error-state-puwJHnzi.js";import"./empty-state-BsA3jcrO.js";import"./form-DjMe15QR.js";import"./use-adapter-catalog-rB4qQQ5D.js";import"./trust-posture-BmW0KVP6.js";import"./markdown-content-BKbjOTI2.js";/**
2
2
  * @license lucide-react v1.48.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{r as u,j as n,be as D,bf as F,cR as Y,cS as B,$ as G,G as h,O as H,Q as U,C as W,U as X,cT as z,L as T,cU as j,cV as V,cW as K,cX as N,cY as Z,cZ as Q,c_ as q,c$ as J,d0 as ee,d1 as te,b as ne,d2 as se,e as oe,B as S,a7 as ae}from"./index-DcZPWi_I.js";import{M as re}from"./more-details-B4lBMpKi.js";import"./relay-trace-schemas-CcCqyOrA.js";import{d as ie,A as ce}from"./untrusted-text-pHjcUwfI.js";import{s as A}from"./soul-file-DOfamgB5.js";import"./form-D7kF-U0d.js";function le({title:e,content:t,enabled:s,maxChars:a,charCount:i,disclaimer:o,onChange:x,onBlur:b,onToggle:d,fill:r=!1}){const c=u.useCallback(g=>{x(g.target.value)},[x]);return n.jsx(D,{className:h(!s&&"opacity-60",r&&"flex min-h-0 flex-1 flex-col"),children:n.jsxs(F,{className:h(r&&"flex min-h-0 flex-1 flex-col"),children:[n.jsxs(Y,{orientation:"horizontal",className:"items-center justify-between",children:[n.jsx(B,{className:"text-sm font-medium",children:e}),d&&n.jsx(G,{checked:s,onCheckedChange:d,"aria-label":`Toggle ${e}`})]}),o&&n.jsx("p",{className:"text-muted-foreground text-xs italic",children:o}),n.jsxs("div",{className:h("space-y-2",r&&"flex min-h-0 flex-1 flex-col"),children:[n.jsx("textarea",{value:t,onChange:c,onBlur:b,rows:r?void 0:8,maxLength:a,className:h("border-border bg-background text-foreground placeholder:text-muted-foreground focus-visible:ring-ring w-full resize-none rounded-md border px-3 py-2 font-mono text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",r&&"min-h-40 flex-1"),placeholder:s?"Write markdown here…":"Turn this on to use it"}),n.jsxs("p",{className:"text-muted-foreground text-right text-xs",children:[i??t.length," / ",a.toLocaleString()]})]})]})})}const w="[new code each turn]",ue=[...new Set([...Object.values(q),...ce,"system-reminder"])];function de(e){const t=e.length>j,s=t?e.slice(0,j):e,a=ie(s,ue);return["<agent_memory>",V,K,`--- BEGIN ${N} ${w} ---`,Z,...t?[Q]:[],a,`--- END ${N} ${w} ---`,"</agent_memory>"].join(`
1
+ import{r as u,j as n,be as D,bf as F,cR as Y,cS as B,$ as G,G as h,O as H,Q as U,C as W,U as X,cT as z,L as T,cU as j,cV as V,cW as K,cX as N,cY as Z,cZ as Q,c_ as q,c$ as J,d0 as ee,d1 as te,b as ne,d2 as se,e as oe,B as S,a7 as ae}from"./index-DBdO-_iL.js";import{M as re}from"./more-details-BsdCkGTg.js";import"./relay-trace-schemas-DwqIIDB9.js";import{d as ie,A as ce}from"./untrusted-text-pHjcUwfI.js";import{s as A}from"./soul-file-wKTqbR0Y.js";import"./form-DjMe15QR.js";function le({title:e,content:t,enabled:s,maxChars:a,charCount:i,disclaimer:o,onChange:x,onBlur:b,onToggle:d,fill:r=!1}){const c=u.useCallback(g=>{x(g.target.value)},[x]);return n.jsx(D,{className:h(!s&&"opacity-60",r&&"flex min-h-0 flex-1 flex-col"),children:n.jsxs(F,{className:h(r&&"flex min-h-0 flex-1 flex-col"),children:[n.jsxs(Y,{orientation:"horizontal",className:"items-center justify-between",children:[n.jsx(B,{className:"text-sm font-medium",children:e}),d&&n.jsx(G,{checked:s,onCheckedChange:d,"aria-label":`Toggle ${e}`})]}),o&&n.jsx("p",{className:"text-muted-foreground text-xs italic",children:o}),n.jsxs("div",{className:h("space-y-2",r&&"flex min-h-0 flex-1 flex-col"),children:[n.jsx("textarea",{value:t,onChange:c,onBlur:b,rows:r?void 0:8,maxLength:a,className:h("border-border bg-background text-foreground placeholder:text-muted-foreground focus-visible:ring-ring w-full resize-none rounded-md border px-3 py-2 font-mono text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",r&&"min-h-40 flex-1"),placeholder:s?"Write markdown here…":"Turn this on to use it"}),n.jsxs("p",{className:"text-muted-foreground text-right text-xs",children:[i??t.length," / ",a.toLocaleString()]})]})]})})}const w="[new code each turn]",ue=[...new Set([...Object.values(q),...ce,"system-reminder"])];function de(e){const t=e.length>j,s=t?e.slice(0,j):e,a=ie(s,ue);return["<agent_memory>",V,K,`--- BEGIN ${N} ${w} ---`,Z,...t?[Q]:[],a,`--- END ${N} ${w} ---`,"</agent_memory>"].join(`
2
2
  `)}function me(e){var a;const s=[`<agent_identity>
3
3
  ${[`Name: ${e.name}`,`ID: ${e.id}`,e.description?`Description: ${e.description}`:null,(a=e.capabilities)!=null&&a.length?`Capabilities: ${e.capabilities.join(", ")}`:null].filter(i=>i!==null).join(`
4
4
  `)}
@@ -1,4 +1,4 @@
1
- import{W as E,r as h,j as n,eY as L,B as k,eZ as j,fZ as N,ax as P,f_ as _,fi as $,f$ as I,a0 as w,e as g,eW as v}from"./index-DcZPWi_I.js";import{E as u}from"./empty-state-DXWQsHMf.js";import{P as x}from"./page-container-DoZzad36.js";import{a as A}from"./use-dev-links-B3I-ZK34.js";import{U as M}from"./UnlinkDialog-CFRgExId.js";/**
1
+ import{W as E,r as h,j as n,eY as L,B as k,eZ as j,fZ as N,ax as P,f_ as _,fi as $,f$ as I,a0 as w,e as g,eW as v}from"./index-DBdO-_iL.js";import{E as u}from"./empty-state-BsA3jcrO.js";import{P as x}from"./page-container-HokGbFg_.js";import{a as A}from"./use-dev-links-TQFCV3vk.js";import{U as M}from"./UnlinkDialog-q-6B4Ftt.js";/**
2
2
  * @license lucide-react v1.48.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{c as X,a as Z,b as j,d as C,D as Ve,m as De,s as Je,i as ze,e as Ke,f as U,g as Qe,t as je,h as We,j as t}from"./index-Do6eeFps.js";import{n as Re,t as Xe,r as Ze,BaseTanStackRouterDevtoolsPanel as et}from"./BaseTanStackRouterDevtoolsPanel-B-iktbLX-BwYaLf2P.js";import{aV as Ae}from"./index-DcZPWi_I.js";var tt=je('<svg xmlns=http://www.w3.org/2000/svg enable-background="new 0 0 634 633"viewBox="0 0 634 633"><g transform=translate(1)><linearGradient x1=-641.486 x2=-641.486 y1=856.648 y2=855.931 gradientTransform="matrix(633 0 0 -633 406377 542258)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#6bdaff></stop><stop offset=0.319 stop-color=#f9ffb5></stop><stop offset=0.706 stop-color=#ffa770></stop><stop offset=1 stop-color=#ff7373></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5 fill-rule=evenodd clip-rule=evenodd></circle><defs><filter width=454 height=396.9 x=-137.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=176.9 height=129.3 x=272.2 y=308 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=176.9 height=129.3 x=272.2 y=308 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><path fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11 d="M436 403.2l-5 28.6m-140-90.3l-10.9 62m52.8-19.4l-4.3 27.1"></path><linearGradient x1=-645.656 x2=-646.499 y1=854.878 y2=854.788 gradientTransform="matrix(-184.159 -32.4722 11.4608 -64.9973 -128419.844 34938.836)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ee2700></stop><stop offset=1 stop-color=#ff008e></stop></linearGradient><path fill-rule=evenodd d="M344.1 363l97.7 17.2c5.8 2.1 8.2 6.2 7.1 12.1-1 5.9-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1.8-12.8 3.7-3.7 8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd></path><path fill=#D8D8D8 fill-rule=evenodd stroke=#FFF stroke-linecap=round stroke-linejoin=bevel stroke-width=7 d="M428.3 384.5l.9-6.5m-33.9 1.5l.9-6.5m-34 .5l.9-6.1m-38.9-16.1l4.2-3.9m-25.2-16.1l4.2-3.9"clip-rule=evenodd></path></g><defs><filter width=280.6 height=317.4 x=73.2 y=113.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=280.6 height=317.4 x=73.2 y=113.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><linearGradient x1=-646.8 x2=-646.8 y1=854.844 y2=853.844 gradientTransform="matrix(-100.1751 48.8587 -97.9753 -200.879 19124.773 203538.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#a17500></stop><stop offset=1 stop-color=#5d2100></stop></linearGradient><path fill-rule=evenodd d="M192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.2-2.9 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6-3.4-18.7-10.8-51.8-22.2-99.6l-25.3 4.6"clip-rule=evenodd></path><linearGradient x1=-635.467 x2=-635.467 y1=852.115 y2=851.115 gradientTransform="matrix(92.6873 4.8575 2.0257 -38.6535 57323.695 36176.047)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd></path><linearGradient x1=-636.573 x2=-636.573 y1=855.444 y2=854.444 gradientTransform="matrix(109.9945 5.7646 6.3597 -121.3507 64719.133 107659.336)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.3 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20 49.6-53.1 49.6-53.1z"clip-rule=evenodd></path><linearGradient x1=-632.145 x2=-632.145 y1=854.174 y2=853.174 gradientTransform="matrix(62.9558 3.2994 3.5021 -66.8246 37035.367 59284.227)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9c-.8-21.9 6-38 20.6-48.2 14.6-10.2 29.8-15.3 45.5-15.3-6.1 21.4-14.5 35.8-25.2 43.4-10.7 7.5-24.4 14.2-40.9 20.1z"clip-rule=evenodd></path><linearGradient x1=-638.224 x2=-638.224 y1=853.801 y2=852.801 gradientTransform="matrix(152.4666 7.9904 3.0934 -59.0251 94939.86 55646.855)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c31.9-30 64.1-39.7 96.7-29 32.6 10.7 50.8 30.4 54.6 59.1-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd></path><linearGradient x1=-637.723 x2=-637.723 y1=855.103 y2=854.103 gradientTransform="matrix(136.467 7.1519 5.2165 -99.5377 82830.875 89859.578)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c35.8-7.6 65.6-.2 89.2 22 23.6 22.2 37.7 49 42.3 80.3-39.8-9.7-68.3-23.8-85.5-42.4-17.2-18.5-32.5-38.5-46-59.9z"clip-rule=evenodd></path><linearGradient x1=-631.79 x2=-631.79 y1=855.872 y2=854.872 gradientTransform="matrix(60.8683 3.19 8.7771 -167.4773 31110.818 145537.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6-6.5 29.9-3.6 63.1 8.7 99.6 27.4-40.3 43.2-69.6 47.4-88 4.2-18.3 5.5-44.1 4-77.2z"clip-rule=evenodd></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4-5.7 18-9.4 33-11.1 45.1"></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M194.8 185.7c-24.4 1.7-43.8 9-58.1 21.8-14.3 12.8-24.7 25.4-31.3 37.8m99.1-68.9c29.7-6.7 52-8.4 67-5 15 3.4 26.9 8.7 35.8 15.9m-110.8-5.9c20.3 9.9 38.2 20.5 53.9 31.9 15.7 11.4 27.4 22.1 35.1 32"></path></g><defs><filter width=532 height=633 x=50.5 y=399 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=532 height=633 x=50.5 y=399 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><linearGradient x1=-641.104 x2=-641.278 y1=856.577 y2=856.183 gradientTransform="matrix(532 0 0 -633 341484.5 542657)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#fff400></stop><stop offset=1 stop-color=#3c8700></stop></linearGradient><ellipse cx=316.5 cy=715.5 fill-rule=evenodd clip-rule=evenodd rx=266 ry=316.5></ellipse><defs><filter width=288 height=283 x=391 y=-24 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=288 height=283 x=391 y=-24 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><g transform="translate(397 -24)"><linearGradient x1=-1036.672 x2=-1036.672 y1=880.018 y2=879.018 gradientTransform="matrix(227 0 0 -227 235493 199764)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffdf00></stop><stop offset=1 stop-color=#ff9d00></stop></linearGradient><circle cx=168.5 cy=113.5 r=113.5 fill-rule=evenodd clip-rule=evenodd></circle><linearGradient x1=-1017.329 x2=-1018.602 y1=658.003 y2=657.998 gradientTransform="matrix(30 0 0 -1 30558 771)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M30 113H0"></path><linearGradient x1=-1014.501 x2=-1015.774 y1=839.985 y2=839.935 gradientTransform="matrix(26.5 0 0 -5.5 26925 4696.5)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M33.5 79.5L7 74"></path><linearGradient x1=-1016.59 x2=-1017.862 y1=852.671 y2=852.595 gradientTransform="matrix(29 0 0 -8 29523 6971)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M34 146l-29 8"></path><linearGradient x1=-1011.984 x2=-1013.257 y1=863.523 y2=863.229 gradientTransform="matrix(24 0 0 -13 24339 11407)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M45 177l-24 13"></path><linearGradient x1=-1006.673 x2=-1007.946 y1=869.279 y2=868.376 gradientTransform="matrix(20 0 0 -19 20205 16720)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M67 204l-20 19"></path><linearGradient x1=-992.85 x2=-993.317 y1=871.258 y2=870.258 gradientTransform="matrix(13.8339 0 0 -22.8467 13825.796 20131.938)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M94.4 227l-13.8 22.8"></path><linearGradient x1=-953.835 x2=-953.965 y1=871.9 y2=870.9 gradientTransform="matrix(7.5 0 0 -24.5 7278 21605)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M127.5 243.5L120 268"></path><linearGradient x1=244.504 x2=244.496 y1=871.898 y2=870.898 gradientTransform="matrix(.5 0 0 -24.5 45.5 21614)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M167.5 252.5l.5 24.5">');function Pe(){const e=We();return(()=>{var w=tt(),O=w.firstChild.firstChild,F=O.nextSibling,M=F.nextSibling,L=M.firstChild,v=M.nextSibling,I=v.firstChild,G=v.nextSibling,c=G.nextSibling,x=c.firstChild,p=c.nextSibling,h=p.firstChild,u=p.nextSibling,T=u.nextSibling,H=T.firstChild,g=T.nextSibling,Y=g.firstChild,B=g.nextSibling,S=B.nextSibling,q=S.firstChild,o=S.nextSibling,N=o.firstChild,E=o.nextSibling,D=E.nextSibling,ee=D.firstChild,y=D.nextSibling,te=y.firstChild,b=y.nextSibling,z=b.nextSibling,V=z.firstChild,$=z.nextSibling,J=$.firstChild,R=$.nextSibling,A=R.nextSibling,l=A.firstChild,r=A.nextSibling,d=r.firstChild,n=r.nextSibling,a=n.firstChild.nextSibling,f=a.nextSibling,i=n.nextSibling,s=i.firstChild,m=i.nextSibling,P=m.firstChild,k=m.nextSibling,_=k.firstChild,ie=_.nextSibling,le=ie.nextSibling,re=le.nextSibling,ne=re.nextSibling,oe=ne.nextSibling,se=oe.nextSibling,ae=se.nextSibling,de=ae.nextSibling,fe=de.nextSibling,ce=fe.nextSibling,pe=ce.nextSibling,ue=pe.nextSibling,Le=ue.nextSibling,ge=k.nextSibling,Ie=ge.firstChild,K=ge.nextSibling,He=K.firstChild,xe=K.nextSibling,Q=xe.nextSibling,he=Q.nextSibling,Ye=he.firstChild,W=he.nextSibling,qe=W.firstChild,$e=W.nextSibling,me=$e.firstChild.firstChild,ke=me.nextSibling,ve=ke.nextSibling,Se=ve.nextSibling,ye=Se.nextSibling,be=ye.nextSibling,_e=be.nextSibling,Ce=_e.nextSibling,Ue=Ce.nextSibling,we=Ue.nextSibling,Oe=we.nextSibling,Fe=Oe.nextSibling,Me=Fe.nextSibling,Ge=Me.nextSibling,Te=Ge.nextSibling,Be=Te.nextSibling,Ee=Be.nextSibling,Ne=Ee.nextSibling;return t(O,"id",`a-${e}`),t(F,"fill",`url(#a-${e})`),t(L,"id",`b-${e}`),t(v,"id",`c-${e}`),t(I,"filter",`url(#b-${e})`),t(G,"mask",`url(#c-${e})`),t(x,"id",`d-${e}`),t(p,"id",`e-${e}`),t(h,"filter",`url(#d-${e})`),t(u,"mask",`url(#e-${e})`),t(H,"id",`f-${e}`),t(g,"id",`g-${e}`),t(Y,"filter",`url(#f-${e})`),t(B,"mask",`url(#g-${e})`),t(q,"id",`h-${e}`),t(o,"id",`i-${e}`),t(N,"filter",`url(#h-${e})`),t(E,"mask",`url(#i-${e})`),t(ee,"id",`j-${e}`),t(y,"id",`k-${e}`),t(te,"filter",`url(#j-${e})`),t(b,"mask",`url(#k-${e})`),t(V,"id",`l-${e}`),t($,"id",`m-${e}`),t(J,"filter",`url(#l-${e})`),t(R,"mask",`url(#m-${e})`),t(l,"id",`n-${e}`),t(r,"id",`o-${e}`),t(d,"filter",`url(#n-${e})`),t(n,"mask",`url(#o-${e})`),t(a,"id",`p-${e}`),t(f,"fill",`url(#p-${e})`),t(s,"id",`q-${e}`),t(m,"id",`r-${e}`),t(P,"filter",`url(#q-${e})`),t(k,"mask",`url(#r-${e})`),t(_,"id",`s-${e}`),t(ie,"fill",`url(#s-${e})`),t(le,"id",`t-${e}`),t(re,"fill",`url(#t-${e})`),t(ne,"id",`u-${e}`),t(oe,"fill",`url(#u-${e})`),t(se,"id",`v-${e}`),t(ae,"fill",`url(#v-${e})`),t(de,"id",`w-${e}`),t(fe,"fill",`url(#w-${e})`),t(ce,"id",`x-${e}`),t(pe,"fill",`url(#x-${e})`),t(ue,"id",`y-${e}`),t(Le,"fill",`url(#y-${e})`),t(Ie,"id",`z-${e}`),t(K,"id",`A-${e}`),t(He,"filter",`url(#z-${e})`),t(xe,"id",`B-${e}`),t(Q,"fill",`url(#B-${e})`),t(Q,"mask",`url(#A-${e})`),t(Ye,"id",`C-${e}`),t(W,"id",`D-${e}`),t(qe,"filter",`url(#C-${e})`),t($e,"mask",`url(#D-${e})`),t(me,"id",`E-${e}`),t(ke,"fill",`url(#E-${e})`),t(ve,"id",`F-${e}`),t(Se,"stroke",`url(#F-${e})`),t(ye,"id",`G-${e}`),t(be,"stroke",`url(#G-${e})`),t(_e,"id",`H-${e}`),t(Ce,"stroke",`url(#H-${e})`),t(Ue,"id",`I-${e}`),t(we,"stroke",`url(#I-${e})`),t(Oe,"id",`J-${e}`),t(Fe,"stroke",`url(#J-${e})`),t(Me,"id",`K-${e}`),t(Ge,"stroke",`url(#K-${e})`),t(Te,"id",`L-${e}`),t(Be,"stroke",`url(#L-${e})`),t(Ee,"id",`M-${e}`),t(Ne,"stroke",`url(#M-${e})`),w})()}var it=je("<button type=button><div><div></div><div></div></div><div>-</div><div>TanStack Router");function ot({initialIsOpen:e,panelProps:w={},closeButtonProps:O={},toggleButtonProps:F={},position:M="bottom-left",containerElement:L="footer",router:v,routerState:I,shadowDOMTarget:G}){const[c,x]=X();let p;const[h,u]=Re("tanstackRouterDevtoolsOpen",e),[T,H]=Re("tanstackRouterDevtoolsHeight",null),[g,Y]=X(!1),[B,S]=X(!1),q=Xe(),o=Ze(),N=(l,r)=>{if(r.button!==0)return;S(!0);const d={originalHeight:(l==null?void 0:l.getBoundingClientRect().height)??0,pageY:r.pageY},n=f=>{const i=d.pageY-f.pageY,s=d.originalHeight+i;H(s),s<70?u(!1):u(!0)},a=()=>{S(!1),document.removeEventListener("mousemove",n),document.removeEventListener("mouseUp",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)};h(),Z(()=>{Y(h()??!1)}),Z(()=>{var l,r,d;if(g()){const n=(r=(l=c())==null?void 0:l.parentElement)==null?void 0:r.style.paddingBottom,a=()=>{var i;const f=p.getBoundingClientRect().height;(i=c())!=null&&i.parentElement&&x(s=>(s!=null&&s.parentElement&&(s.parentElement.style.paddingBottom=`${f}px`),s))};if(a(),typeof window<"u")return window.addEventListener("resize",a),()=>{var f;window.removeEventListener("resize",a),(f=c())!=null&&f.parentElement&&typeof n=="string"&&x(i=>(i.parentElement.style.paddingBottom=n,i))}}else(d=c())!=null&&d.parentElement&&x(n=>(n!=null&&n.parentElement&&n.parentElement.removeAttribute("style"),n))}),Z(()=>{if(c()){const l=c(),r=getComputedStyle(l).fontSize;l==null||l.style.setProperty("--tsrd-font-size",r)}});const{style:E={},...D}=w,{style:ee={},onClick:y,...te}=O,{onClick:b,class:z,...V}=F;if(!q())return null;const $=j(()=>T()??500),J=j(()=>Ae(o().devtoolsPanelContainer,o().devtoolsPanelContainerVisibility(!!h()),o().devtoolsPanelContainerResizing(B),o().devtoolsPanelContainerAnimation(g(),$()+16))),R=j(()=>({height:`${$()}px`,...E||{}})),A=j(()=>Ae(o().mainCloseBtn,o().mainCloseBtnPosition(M),o().mainCloseBtnAnimation(!!h()),z));return C(Qe,{component:L,ref:x,class:"TanStackRouterDevtools",get children(){return[C(Ve.Provider,{value:{onCloseClick:y??(()=>{})},get children(){return C(et,De({ref(l){var r=p;typeof r=="function"?r(l):p=l}},D,{router:v,routerState:I,className:J,style:R,get isOpen(){return g()},setIsOpen:u,handleDragStart:l=>N(p,l),shadowDOMTarget:G}))}}),(()=>{var l=it(),r=l.firstChild,d=r.firstChild,n=d.nextSibling,a=r.nextSibling,f=a.nextSibling;return Je(l,De(V,{"aria-label":"Open TanStack Router Devtools",onClick:i=>{u(!0),b&&b(i)},get class(){return A()}}),!1,!0),ze(d,C(Pe,{})),ze(n,C(Pe,{})),Ke(i=>{var s=o().mainCloseBtnIconContainer,m=o().mainCloseBtnIconOuter,P=o().mainCloseBtnIconInner,k=o().mainCloseBtnDivider,_=o().routerLogoCloseButton;return s!==i.e&&U(r,i.e=s),m!==i.t&&U(d,i.t=m),P!==i.a&&U(n,i.a=P),k!==i.o&&U(a,i.o=k),_!==i.i&&U(f,i.i=_),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()]}})}export{ot as FloatingTanStackRouterDevtools,ot as default};
1
+ import{c as X,a as Z,b as j,d as C,D as Ve,m as De,s as Je,i as ze,e as Ke,f as U,g as Qe,t as je,h as We,j as t}from"./index-CPxcbKL6.js";import{n as Re,t as Xe,r as Ze,BaseTanStackRouterDevtoolsPanel as et}from"./BaseTanStackRouterDevtoolsPanel-B-iktbLX-WpZU5xiO.js";import{aV as Ae}from"./index-DBdO-_iL.js";var tt=je('<svg xmlns=http://www.w3.org/2000/svg enable-background="new 0 0 634 633"viewBox="0 0 634 633"><g transform=translate(1)><linearGradient x1=-641.486 x2=-641.486 y1=856.648 y2=855.931 gradientTransform="matrix(633 0 0 -633 406377 542258)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#6bdaff></stop><stop offset=0.319 stop-color=#f9ffb5></stop><stop offset=0.706 stop-color=#ffa770></stop><stop offset=1 stop-color=#ff7373></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5 fill-rule=evenodd clip-rule=evenodd></circle><defs><filter width=454 height=396.9 x=-137.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=176.9 height=129.3 x=272.2 y=308 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=176.9 height=129.3 x=272.2 y=308 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><path fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11 d="M436 403.2l-5 28.6m-140-90.3l-10.9 62m52.8-19.4l-4.3 27.1"></path><linearGradient x1=-645.656 x2=-646.499 y1=854.878 y2=854.788 gradientTransform="matrix(-184.159 -32.4722 11.4608 -64.9973 -128419.844 34938.836)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ee2700></stop><stop offset=1 stop-color=#ff008e></stop></linearGradient><path fill-rule=evenodd d="M344.1 363l97.7 17.2c5.8 2.1 8.2 6.2 7.1 12.1-1 5.9-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1.8-12.8 3.7-3.7 8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd></path><path fill=#D8D8D8 fill-rule=evenodd stroke=#FFF stroke-linecap=round stroke-linejoin=bevel stroke-width=7 d="M428.3 384.5l.9-6.5m-33.9 1.5l.9-6.5m-34 .5l.9-6.1m-38.9-16.1l4.2-3.9m-25.2-16.1l4.2-3.9"clip-rule=evenodd></path></g><defs><filter width=280.6 height=317.4 x=73.2 y=113.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=280.6 height=317.4 x=73.2 y=113.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><linearGradient x1=-646.8 x2=-646.8 y1=854.844 y2=853.844 gradientTransform="matrix(-100.1751 48.8587 -97.9753 -200.879 19124.773 203538.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#a17500></stop><stop offset=1 stop-color=#5d2100></stop></linearGradient><path fill-rule=evenodd d="M192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.2-2.9 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6-3.4-18.7-10.8-51.8-22.2-99.6l-25.3 4.6"clip-rule=evenodd></path><linearGradient x1=-635.467 x2=-635.467 y1=852.115 y2=851.115 gradientTransform="matrix(92.6873 4.8575 2.0257 -38.6535 57323.695 36176.047)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd></path><linearGradient x1=-636.573 x2=-636.573 y1=855.444 y2=854.444 gradientTransform="matrix(109.9945 5.7646 6.3597 -121.3507 64719.133 107659.336)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.3 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20 49.6-53.1 49.6-53.1z"clip-rule=evenodd></path><linearGradient x1=-632.145 x2=-632.145 y1=854.174 y2=853.174 gradientTransform="matrix(62.9558 3.2994 3.5021 -66.8246 37035.367 59284.227)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9c-.8-21.9 6-38 20.6-48.2 14.6-10.2 29.8-15.3 45.5-15.3-6.1 21.4-14.5 35.8-25.2 43.4-10.7 7.5-24.4 14.2-40.9 20.1z"clip-rule=evenodd></path><linearGradient x1=-638.224 x2=-638.224 y1=853.801 y2=852.801 gradientTransform="matrix(152.4666 7.9904 3.0934 -59.0251 94939.86 55646.855)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c31.9-30 64.1-39.7 96.7-29 32.6 10.7 50.8 30.4 54.6 59.1-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd></path><linearGradient x1=-637.723 x2=-637.723 y1=855.103 y2=854.103 gradientTransform="matrix(136.467 7.1519 5.2165 -99.5377 82830.875 89859.578)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c35.8-7.6 65.6-.2 89.2 22 23.6 22.2 37.7 49 42.3 80.3-39.8-9.7-68.3-23.8-85.5-42.4-17.2-18.5-32.5-38.5-46-59.9z"clip-rule=evenodd></path><linearGradient x1=-631.79 x2=-631.79 y1=855.872 y2=854.872 gradientTransform="matrix(60.8683 3.19 8.7771 -167.4773 31110.818 145537.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6-6.5 29.9-3.6 63.1 8.7 99.6 27.4-40.3 43.2-69.6 47.4-88 4.2-18.3 5.5-44.1 4-77.2z"clip-rule=evenodd></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4-5.7 18-9.4 33-11.1 45.1"></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M194.8 185.7c-24.4 1.7-43.8 9-58.1 21.8-14.3 12.8-24.7 25.4-31.3 37.8m99.1-68.9c29.7-6.7 52-8.4 67-5 15 3.4 26.9 8.7 35.8 15.9m-110.8-5.9c20.3 9.9 38.2 20.5 53.9 31.9 15.7 11.4 27.4 22.1 35.1 32"></path></g><defs><filter width=532 height=633 x=50.5 y=399 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=532 height=633 x=50.5 y=399 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><linearGradient x1=-641.104 x2=-641.278 y1=856.577 y2=856.183 gradientTransform="matrix(532 0 0 -633 341484.5 542657)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#fff400></stop><stop offset=1 stop-color=#3c8700></stop></linearGradient><ellipse cx=316.5 cy=715.5 fill-rule=evenodd clip-rule=evenodd rx=266 ry=316.5></ellipse><defs><filter width=288 height=283 x=391 y=-24 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=288 height=283 x=391 y=-24 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><g transform="translate(397 -24)"><linearGradient x1=-1036.672 x2=-1036.672 y1=880.018 y2=879.018 gradientTransform="matrix(227 0 0 -227 235493 199764)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffdf00></stop><stop offset=1 stop-color=#ff9d00></stop></linearGradient><circle cx=168.5 cy=113.5 r=113.5 fill-rule=evenodd clip-rule=evenodd></circle><linearGradient x1=-1017.329 x2=-1018.602 y1=658.003 y2=657.998 gradientTransform="matrix(30 0 0 -1 30558 771)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M30 113H0"></path><linearGradient x1=-1014.501 x2=-1015.774 y1=839.985 y2=839.935 gradientTransform="matrix(26.5 0 0 -5.5 26925 4696.5)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M33.5 79.5L7 74"></path><linearGradient x1=-1016.59 x2=-1017.862 y1=852.671 y2=852.595 gradientTransform="matrix(29 0 0 -8 29523 6971)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M34 146l-29 8"></path><linearGradient x1=-1011.984 x2=-1013.257 y1=863.523 y2=863.229 gradientTransform="matrix(24 0 0 -13 24339 11407)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M45 177l-24 13"></path><linearGradient x1=-1006.673 x2=-1007.946 y1=869.279 y2=868.376 gradientTransform="matrix(20 0 0 -19 20205 16720)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M67 204l-20 19"></path><linearGradient x1=-992.85 x2=-993.317 y1=871.258 y2=870.258 gradientTransform="matrix(13.8339 0 0 -22.8467 13825.796 20131.938)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M94.4 227l-13.8 22.8"></path><linearGradient x1=-953.835 x2=-953.965 y1=871.9 y2=870.9 gradientTransform="matrix(7.5 0 0 -24.5 7278 21605)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M127.5 243.5L120 268"></path><linearGradient x1=244.504 x2=244.496 y1=871.898 y2=870.898 gradientTransform="matrix(.5 0 0 -24.5 45.5 21614)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M167.5 252.5l.5 24.5">');function Pe(){const e=We();return(()=>{var w=tt(),O=w.firstChild.firstChild,F=O.nextSibling,M=F.nextSibling,L=M.firstChild,v=M.nextSibling,I=v.firstChild,G=v.nextSibling,c=G.nextSibling,x=c.firstChild,p=c.nextSibling,h=p.firstChild,u=p.nextSibling,T=u.nextSibling,H=T.firstChild,g=T.nextSibling,Y=g.firstChild,B=g.nextSibling,S=B.nextSibling,q=S.firstChild,o=S.nextSibling,N=o.firstChild,E=o.nextSibling,D=E.nextSibling,ee=D.firstChild,y=D.nextSibling,te=y.firstChild,b=y.nextSibling,z=b.nextSibling,V=z.firstChild,$=z.nextSibling,J=$.firstChild,R=$.nextSibling,A=R.nextSibling,l=A.firstChild,r=A.nextSibling,d=r.firstChild,n=r.nextSibling,a=n.firstChild.nextSibling,f=a.nextSibling,i=n.nextSibling,s=i.firstChild,m=i.nextSibling,P=m.firstChild,k=m.nextSibling,_=k.firstChild,ie=_.nextSibling,le=ie.nextSibling,re=le.nextSibling,ne=re.nextSibling,oe=ne.nextSibling,se=oe.nextSibling,ae=se.nextSibling,de=ae.nextSibling,fe=de.nextSibling,ce=fe.nextSibling,pe=ce.nextSibling,ue=pe.nextSibling,Le=ue.nextSibling,ge=k.nextSibling,Ie=ge.firstChild,K=ge.nextSibling,He=K.firstChild,xe=K.nextSibling,Q=xe.nextSibling,he=Q.nextSibling,Ye=he.firstChild,W=he.nextSibling,qe=W.firstChild,$e=W.nextSibling,me=$e.firstChild.firstChild,ke=me.nextSibling,ve=ke.nextSibling,Se=ve.nextSibling,ye=Se.nextSibling,be=ye.nextSibling,_e=be.nextSibling,Ce=_e.nextSibling,Ue=Ce.nextSibling,we=Ue.nextSibling,Oe=we.nextSibling,Fe=Oe.nextSibling,Me=Fe.nextSibling,Ge=Me.nextSibling,Te=Ge.nextSibling,Be=Te.nextSibling,Ee=Be.nextSibling,Ne=Ee.nextSibling;return t(O,"id",`a-${e}`),t(F,"fill",`url(#a-${e})`),t(L,"id",`b-${e}`),t(v,"id",`c-${e}`),t(I,"filter",`url(#b-${e})`),t(G,"mask",`url(#c-${e})`),t(x,"id",`d-${e}`),t(p,"id",`e-${e}`),t(h,"filter",`url(#d-${e})`),t(u,"mask",`url(#e-${e})`),t(H,"id",`f-${e}`),t(g,"id",`g-${e}`),t(Y,"filter",`url(#f-${e})`),t(B,"mask",`url(#g-${e})`),t(q,"id",`h-${e}`),t(o,"id",`i-${e}`),t(N,"filter",`url(#h-${e})`),t(E,"mask",`url(#i-${e})`),t(ee,"id",`j-${e}`),t(y,"id",`k-${e}`),t(te,"filter",`url(#j-${e})`),t(b,"mask",`url(#k-${e})`),t(V,"id",`l-${e}`),t($,"id",`m-${e}`),t(J,"filter",`url(#l-${e})`),t(R,"mask",`url(#m-${e})`),t(l,"id",`n-${e}`),t(r,"id",`o-${e}`),t(d,"filter",`url(#n-${e})`),t(n,"mask",`url(#o-${e})`),t(a,"id",`p-${e}`),t(f,"fill",`url(#p-${e})`),t(s,"id",`q-${e}`),t(m,"id",`r-${e}`),t(P,"filter",`url(#q-${e})`),t(k,"mask",`url(#r-${e})`),t(_,"id",`s-${e}`),t(ie,"fill",`url(#s-${e})`),t(le,"id",`t-${e}`),t(re,"fill",`url(#t-${e})`),t(ne,"id",`u-${e}`),t(oe,"fill",`url(#u-${e})`),t(se,"id",`v-${e}`),t(ae,"fill",`url(#v-${e})`),t(de,"id",`w-${e}`),t(fe,"fill",`url(#w-${e})`),t(ce,"id",`x-${e}`),t(pe,"fill",`url(#x-${e})`),t(ue,"id",`y-${e}`),t(Le,"fill",`url(#y-${e})`),t(Ie,"id",`z-${e}`),t(K,"id",`A-${e}`),t(He,"filter",`url(#z-${e})`),t(xe,"id",`B-${e}`),t(Q,"fill",`url(#B-${e})`),t(Q,"mask",`url(#A-${e})`),t(Ye,"id",`C-${e}`),t(W,"id",`D-${e}`),t(qe,"filter",`url(#C-${e})`),t($e,"mask",`url(#D-${e})`),t(me,"id",`E-${e}`),t(ke,"fill",`url(#E-${e})`),t(ve,"id",`F-${e}`),t(Se,"stroke",`url(#F-${e})`),t(ye,"id",`G-${e}`),t(be,"stroke",`url(#G-${e})`),t(_e,"id",`H-${e}`),t(Ce,"stroke",`url(#H-${e})`),t(Ue,"id",`I-${e}`),t(we,"stroke",`url(#I-${e})`),t(Oe,"id",`J-${e}`),t(Fe,"stroke",`url(#J-${e})`),t(Me,"id",`K-${e}`),t(Ge,"stroke",`url(#K-${e})`),t(Te,"id",`L-${e}`),t(Be,"stroke",`url(#L-${e})`),t(Ee,"id",`M-${e}`),t(Ne,"stroke",`url(#M-${e})`),w})()}var it=je("<button type=button><div><div></div><div></div></div><div>-</div><div>TanStack Router");function ot({initialIsOpen:e,panelProps:w={},closeButtonProps:O={},toggleButtonProps:F={},position:M="bottom-left",containerElement:L="footer",router:v,routerState:I,shadowDOMTarget:G}){const[c,x]=X();let p;const[h,u]=Re("tanstackRouterDevtoolsOpen",e),[T,H]=Re("tanstackRouterDevtoolsHeight",null),[g,Y]=X(!1),[B,S]=X(!1),q=Xe(),o=Ze(),N=(l,r)=>{if(r.button!==0)return;S(!0);const d={originalHeight:(l==null?void 0:l.getBoundingClientRect().height)??0,pageY:r.pageY},n=f=>{const i=d.pageY-f.pageY,s=d.originalHeight+i;H(s),s<70?u(!1):u(!0)},a=()=>{S(!1),document.removeEventListener("mousemove",n),document.removeEventListener("mouseUp",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)};h(),Z(()=>{Y(h()??!1)}),Z(()=>{var l,r,d;if(g()){const n=(r=(l=c())==null?void 0:l.parentElement)==null?void 0:r.style.paddingBottom,a=()=>{var i;const f=p.getBoundingClientRect().height;(i=c())!=null&&i.parentElement&&x(s=>(s!=null&&s.parentElement&&(s.parentElement.style.paddingBottom=`${f}px`),s))};if(a(),typeof window<"u")return window.addEventListener("resize",a),()=>{var f;window.removeEventListener("resize",a),(f=c())!=null&&f.parentElement&&typeof n=="string"&&x(i=>(i.parentElement.style.paddingBottom=n,i))}}else(d=c())!=null&&d.parentElement&&x(n=>(n!=null&&n.parentElement&&n.parentElement.removeAttribute("style"),n))}),Z(()=>{if(c()){const l=c(),r=getComputedStyle(l).fontSize;l==null||l.style.setProperty("--tsrd-font-size",r)}});const{style:E={},...D}=w,{style:ee={},onClick:y,...te}=O,{onClick:b,class:z,...V}=F;if(!q())return null;const $=j(()=>T()??500),J=j(()=>Ae(o().devtoolsPanelContainer,o().devtoolsPanelContainerVisibility(!!h()),o().devtoolsPanelContainerResizing(B),o().devtoolsPanelContainerAnimation(g(),$()+16))),R=j(()=>({height:`${$()}px`,...E||{}})),A=j(()=>Ae(o().mainCloseBtn,o().mainCloseBtnPosition(M),o().mainCloseBtnAnimation(!!h()),z));return C(Qe,{component:L,ref:x,class:"TanStackRouterDevtools",get children(){return[C(Ve.Provider,{value:{onCloseClick:y??(()=>{})},get children(){return C(et,De({ref(l){var r=p;typeof r=="function"?r(l):p=l}},D,{router:v,routerState:I,className:J,style:R,get isOpen(){return g()},setIsOpen:u,handleDragStart:l=>N(p,l),shadowDOMTarget:G}))}}),(()=>{var l=it(),r=l.firstChild,d=r.firstChild,n=d.nextSibling,a=r.nextSibling,f=a.nextSibling;return Je(l,De(V,{"aria-label":"Open TanStack Router Devtools",onClick:i=>{u(!0),b&&b(i)},get class(){return A()}}),!1,!0),ze(d,C(Pe,{})),ze(n,C(Pe,{})),Ke(i=>{var s=o().mainCloseBtnIconContainer,m=o().mainCloseBtnIconOuter,P=o().mainCloseBtnIconInner,k=o().mainCloseBtnDivider,_=o().routerLogoCloseButton;return s!==i.e&&U(r,i.e=s),m!==i.t&&U(d,i.t=m),P!==i.a&&U(n,i.a=P),k!==i.o&&U(a,i.o=k),_!==i.i&&U(f,i.i=_),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()]}})}export{ot as FloatingTanStackRouterDevtools,ot as default};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-DBdO-_iL.js";import{a as t}from"./ProfileFields-DimHNpR4.js";import"./profile-errors-Dvm4O6MR.js";import"./use-mounted-ref-DUbNzP-m.js";function n({member:r}){return o.jsx(t,{member:r})}export{n as HandlePage};