dorkos 0.125.2 → 0.125.3

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 (307) hide show
  1. package/dist/bin/cli.js +125 -20
  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-BqGlH1pd.js → AboutPage-DSSx1Gzx.js} +1 -1
  5. package/dist/client/assets/{ActivityErrorState-C4hqCedX.js → ActivityErrorState-C-mLOmJm.js} +1 -1
  6. package/dist/client/assets/{ActivityPage-frpyizcK.js → ActivityPage-DsOjjulF.js} +1 -1
  7. package/dist/client/assets/{ActivityRow-DB9c3g1G.js → ActivityRow-ylgCMe7Y.js} +1 -1
  8. package/dist/client/assets/{AdapterIcon-CEHkdca8.js → AdapterIcon-DT5OdFbe.js} +1 -1
  9. package/dist/client/assets/{AdapterSetupWizard-DLJMkb-u.js → AdapterSetupWizard-C6jxF55P.js} +1 -1
  10. package/dist/client/assets/{AgentOptionRow-D-QjHi5k.js → AgentOptionRow-CtdBmX9G.js} +1 -1
  11. package/dist/client/assets/{AgentPicker-DoGucmqI.js → AgentPicker--wr93sVO.js} +1 -1
  12. package/dist/client/assets/{AgentRequestCard--9GA9ymH.js → AgentRequestCard-DVoE2cnk.js} +4 -4
  13. package/dist/client/assets/{AppearancePage-NHNiZrtY.js → AppearancePage-DR_g6BJO.js} +1 -1
  14. package/dist/client/assets/{ApplyToOverridesDialog-Clo55n6V.js → ApplyToOverridesDialog-BqaoB6AS.js} +1 -1
  15. package/dist/client/assets/{AttentionSignalRow-BOpClaCD.js → AttentionSignalRow-CM0TrrbJ.js} +1 -1
  16. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-D9Tm8ual.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-DJ54CELa.js} +1 -1
  17. package/dist/client/assets/{BindingDialog-DZcTXLE8.js → BindingDialog-JAPULq7H.js} +1 -1
  18. package/dist/client/assets/{BlintzCanvas-DzjdPTlx.js → BlintzCanvas-B3-FjszN.js} +3 -3
  19. package/dist/client/assets/{CanvasCsvContent-xYUrbFeA.js → CanvasCsvContent-Cmqry1BS.js} +1 -1
  20. package/dist/client/assets/{CanvasFileContent-D6fTvMea.js → CanvasFileContent-BMkxUF1r.js} +2 -2
  21. package/dist/client/assets/{CanvasModel3dContent-DEassnBV.js → CanvasModel3dContent-DBhuNbFD.js} +2 -2
  22. package/dist/client/assets/ChannelComposer-WR3_Vvta.js +44 -0
  23. package/dist/client/assets/{ChatAppsOff-C00Nl_w6.js → ChatAppsOff-CY5_0lQH.js} +1 -1
  24. package/dist/client/assets/{CodeMirrorDiff-JYxkSqFi.js → CodeMirrorDiff-_EI44zW6.js} +1 -1
  25. package/dist/client/assets/{CodeMirrorEditor-CVXZ9B5S.js → CodeMirrorEditor-x1lTuDQH.js} +1 -1
  26. package/dist/client/assets/{CommitmentList-CcCSwcZ8.js → CommitmentList-D-CvccnF.js} +1 -1
  27. package/dist/client/assets/{CommitmentsPage-BrDbzpyR.js → CommitmentsPage-CLw1FRLv.js} +1 -1
  28. package/dist/client/assets/{ComputerResourceView-BlLvMt1I.js → ComputerResourceView-QJnXivV4.js} +1 -1
  29. package/dist/client/assets/{ComputerViewer-B8SWICbj.js → ComputerViewer-DbTGz3OL.js} +1 -1
  30. package/dist/client/assets/{ConnectionAccessLists-Bsb-t24W.js → ConnectionAccessLists-CB5UY0f0.js} +1 -1
  31. package/dist/client/assets/{ConnectionsPage-RAhWxuWU.js → ConnectionsPage-SpEJxCeF.js} +1 -1
  32. package/dist/client/assets/{ConventionPage-CNij_BXA.js → ConventionPage-C2NIZjG3.js} +1 -1
  33. package/dist/client/assets/{ExtensionPageRoute-BsGqTcyI.js → ExtensionPageRoute-Drr5uceG.js} +1 -1
  34. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-eQVA1bL6.js → FloatingTanStackRouterDevtools-CqogiFob-kKteNmsx.js} +1 -1
  35. package/dist/client/assets/HandlePage-A1OCw0nr.js +1 -0
  36. package/dist/client/assets/{HeartbeatPage-D0tKoR6G.js → HeartbeatPage-BLGTx_57.js} +1 -1
  37. package/dist/client/assets/{KeyEntry-CSmznLcG.js → KeyEntry-DgN8iewR.js} +1 -1
  38. package/dist/client/assets/{LexicalField-gYKPjFfN.js → LexicalField-Bfj72GvX.js} +1 -1
  39. package/dist/client/assets/{ManagesPage-BF6MFrsv.js → ManagesPage-C3G1-Mep.js} +1 -1
  40. package/dist/client/assets/{Marketplace-BWDlXgwH.js → Marketplace-Dg0bIo7_.js} +2 -2
  41. package/dist/client/assets/{MarketplaceSourcesView-BhKzgkiO.js → MarketplaceSourcesView-KPw8YYXi.js} +1 -1
  42. package/dist/client/assets/{McpAppFrame-BotrzoHd.js → McpAppFrame-DjJ4EM39.js} +1 -1
  43. package/dist/client/assets/{McpSigninBody-CdeX_lYs.js → McpSigninBody-V6RSsDqe.js} +1 -1
  44. package/dist/client/assets/{Model3dViewer-KHktOpbD.js → Model3dViewer-woNPO5OC.js} +1 -1
  45. package/dist/client/assets/NamePage-Du9m4rGe.js +1 -0
  46. package/dist/client/assets/{NewDirectMessageMenu-CuvKJEDY.js → NewDirectMessageMenu-CmCOFmXQ.js} +1 -1
  47. package/dist/client/assets/{NotificationsPage-DWcgfZJD.js → NotificationsPage-kUtiVsFS.js} +1 -1
  48. package/dist/client/assets/{OpenMeshSwitch-DdJ7g4yD.js → OpenMeshSwitch-r6HJBjR6.js} +1 -1
  49. package/dist/client/assets/{OperatorIdentityForm-7FUOEWw_.js → OperatorIdentityForm-B29T-N9x.js} +1 -1
  50. package/dist/client/assets/{PermissionHistory-CgQhZrvg.js → PermissionHistory-CV8cFJr3.js} +1 -1
  51. package/dist/client/assets/{PermissionsPage-CK34y1VF.js → PermissionsPage-_PKlbWde.js} +1 -1
  52. package/dist/client/assets/{PersonalityPopover-3BA36sB0.js → PersonalityPopover-BOXTCA6E.js} +1 -1
  53. package/dist/client/assets/PhotoPage-Dx-3Lhm5.js +1 -0
  54. package/dist/client/assets/{PreviewRefusedNotice-CnqAE9sr.js → PreviewRefusedNotice-CdHja8fU.js} +1 -1
  55. package/dist/client/assets/{ProfileFields-CIbISW83.js → ProfileFields-C48alR3i.js} +1 -1
  56. package/dist/client/assets/{ProfilePanelContainer-DPDHtTbI.js → ProfilePanelContainer-BpJVbdUL.js} +1 -1
  57. package/dist/client/assets/{ProfileRolePicker-83GFtm2P.js → ProfileRolePicker-DtuSZNaw.js} +1 -1
  58. package/dist/client/assets/{PromptSuggestionChips-B9chKG4w.js → PromptSuggestionChips-DT-JdGeO.js} +1 -1
  59. package/dist/client/assets/{ReportsToPopover-DUv03JZP.js → ReportsToPopover-BP2nxz2E.js} +1 -1
  60. package/dist/client/assets/{RoomSurface-Bq6Slne3.js → RoomSurface-C_mTmn8g.js} +1 -1
  61. package/dist/client/assets/{RoomsPage-BKxzz-nN.js → RoomsPage-gDIy73MQ.js} +1 -1
  62. package/dist/client/assets/{RunsOnPopover-BIdmMhs9.js → RunsOnPopover-DhXG88Uj.js} +1 -1
  63. package/dist/client/assets/{RuntimeConnectFlow-IaRVgmqH.js → RuntimeConnectFlow-BsZsQZS9.js} +1 -1
  64. package/dist/client/assets/{RuntimeSetupDialog-Er-lzjmK.js → RuntimeSetupDialog-BSb5iK2A.js} +1 -1
  65. package/dist/client/assets/{SeenDevices-9quCcdUW.js → SeenDevices-dzzlSeB2.js} +3 -3
  66. package/dist/client/assets/{SessionsPage-CGic5VaN.js → SessionsPage-C6nmCWVM.js} +1 -1
  67. package/dist/client/assets/{SettingsDialog-BZ58IaK1.js → SettingsDialog-5aEZ-DG6.js} +3 -3
  68. package/dist/client/assets/{SkillsPage-VRYwez5T.js → SkillsPage-DSIKEsHr.js} +1 -1
  69. package/dist/client/assets/{TaskDialogWrapper-C9LMV8oe.js → TaskDialogWrapper-Cst7UxoY.js} +1 -1
  70. package/dist/client/assets/{TasksEmptyState-CagC0LAa.js → TasksEmptyState-DityFi7P.js} +1 -1
  71. package/dist/client/assets/{TasksPage-3gkHB1Pv.js → TasksPage-BZx_Ku0k.js} +1 -1
  72. package/dist/client/assets/{TeamComputerEntry-BD89Y5e6.js → TeamComputerEntry-uj1GcPP_.js} +1 -1
  73. package/dist/client/assets/{ToolsPage-Ds6LwY79.js → ToolsPage-Qm6x37SO.js} +1 -1
  74. package/dist/client/assets/{TopologyGraph-CiZ2ACcQ.js → TopologyGraph-2C3Ij6tO.js} +2 -2
  75. package/dist/client/assets/{TourHost-BISNaEzZ.js → TourHost-BsV8lcXT.js} +1 -1
  76. package/dist/client/assets/{UnlinkDialog-DTuXHNsi.js → UnlinkDialog-ClNn0nv6.js} +1 -1
  77. package/dist/client/assets/{UnreadDivider-l_VZ7ECn.js → UnreadDivider-CGKnJcx7.js} +1 -1
  78. package/dist/client/assets/{WidgetErrorCard-I8WiJv2g.js → WidgetErrorCard-oq5MKUX_.js} +3 -3
  79. package/dist/client/assets/{WorkView-_wehEEl-.js → WorkView-wVnGvWAz.js} +15 -15
  80. package/dist/client/assets/{_shell-BLcPeb8K.js → _shell-D4V8GQqV.js} +6 -6
  81. package/dist/client/assets/{_shell._home-CcRH-M-A.js → _shell._home-DoaHLKk8.js} +1 -1
  82. package/dist/client/assets/{_shell._home.activity-cR24Vr9Q.js → _shell._home.activity-BP1byb8g.js} +1 -1
  83. package/dist/client/assets/{_shell._home.index-agU2ItcI.js → _shell._home.index-BB5pgiqt.js} +2 -2
  84. package/dist/client/assets/{_shell._home.tasks-BDR9JTj3.js → _shell._home.tasks-B3w6mqyb.js} +1 -1
  85. package/dist/client/assets/{_shell._home.workspaces-B4nlcACK.js → _shell._home.workspaces-BcOiklL5.js} +1 -1
  86. package/dist/client/assets/_shell.channels-DxSDnd-3.js +10 -0
  87. package/dist/client/assets/{_shell.connections-CWQYcH58.js → _shell.connections-YKOm7ap5.js} +1 -1
  88. package/dist/client/assets/{_shell.feedback-requests-BkgHtyZr.js → _shell.feedback-requests-DC2Jw1EF.js} +1 -1
  89. package/dist/client/assets/_shell.marketplace-BUh4boaf.js +1 -0
  90. package/dist/client/assets/_shell.marketplace_.sources-CnOFcGv1.js +1 -0
  91. package/dist/client/assets/_shell.session-BUP7x_Ra.js +1 -0
  92. package/dist/client/assets/{_shell.team-CTIVEpZQ.js → _shell.team-C9QJNwaK.js} +3 -3
  93. package/dist/client/assets/{_shell.threads-ClWYrnld.js → _shell.threads-gs_o48eZ.js} +1 -1
  94. package/dist/client/assets/_shell.x._extensionId-B-X7HuaQ.js +1 -0
  95. package/dist/client/assets/_shell.x._extensionId_._-B-X7HuaQ.js +1 -0
  96. package/dist/client/assets/{abnfDiagram-WEYOIA3C-0-Mx5lSG.js → abnfDiagram-WEYOIA3C-sjxf16g2.js} +1 -1
  97. package/dist/client/assets/{access-copy-Cj31J6PU.js → access-copy-_81ChCG3.js} +1 -1
  98. package/dist/client/assets/{arc-DVmpcNHP.js → arc-B-c5OGeX.js} +1 -1
  99. package/dist/client/assets/{architectureDiagram-ZHVYKT53-BZhMXbuC.js → architectureDiagram-ZHVYKT53-CExq4B1X.js} +1 -1
  100. package/dist/client/assets/{banner-Ctq7kvQ0.js → banner-BhzLIs7u.js} +1 -1
  101. package/dist/client/assets/{blockDiagram-RJAE7QA3-Ctmof3-7.js → blockDiagram-RJAE7QA3-C1D5MR7Z.js} +1 -1
  102. package/dist/client/assets/{c4Diagram-XDPPPE54-BPglmQhG.js → c4Diagram-XDPPPE54-DMtF_wcg.js} +1 -1
  103. package/dist/client/assets/{card-DI7YtQh3.js → card-Dsy8PPN6.js} +1 -1
  104. package/dist/client/assets/channel-C6IoQ0kc.js +1 -0
  105. package/dist/client/assets/{chunk-2E7WHVMD-DIK6CHka.js → chunk-2E7WHVMD-DCmxZwyD.js} +1 -1
  106. package/dist/client/assets/{chunk-2Q5K7J3B-C3uATYd9.js → chunk-2Q5K7J3B-BXvjhtJ3.js} +1 -1
  107. package/dist/client/assets/{chunk-4EMNKR2T-Dl3iYXVl.js → chunk-4EMNKR2T-CR6qWjas.js} +1 -1
  108. package/dist/client/assets/{chunk-55XCU76K-BJF-Hcs9.js → chunk-55XCU76K-Bny7RY06.js} +1 -1
  109. package/dist/client/assets/{chunk-5VM5RSS4-Cju3BnqQ.js → chunk-5VM5RSS4-B9aD4Uib.js} +1 -1
  110. package/dist/client/assets/{chunk-JWPE2WC7-v1omZzgE.js → chunk-JWPE2WC7-D28Xa5gr.js} +1 -1
  111. package/dist/client/assets/{chunk-VQ5W62QI-2HqA3jPL.js → chunk-VQ5W62QI-CLgnUSgl.js} +1 -1
  112. package/dist/client/assets/{chunk-XXDRQBXY-RDXwFs9Z.js → chunk-XXDRQBXY-vMTRVR5A.js} +1 -1
  113. package/dist/client/assets/{chunk-ZCHMQSOR-DhQsY-OT.js → chunk-ZCHMQSOR-Ck0VFEtd.js} +2 -2
  114. package/dist/client/assets/{classDiagram-v2-4MYWR3UA-DC5N-GDk.js → classDiagram-v2-4MYWR3UA-Dh4gPh4M.js} +1 -1
  115. package/dist/client/assets/{command-DpK0GpDM.js → command-CxjTPW0z.js} +1 -1
  116. package/dist/client/assets/{cose-bilkent-JH36ORCC-BriFsb6c.js → cose-bilkent-JH36ORCC-BA-tF0x7.js} +1 -1
  117. package/dist/client/assets/{cpu-DzCUBK-1.js → cpu-SRODWAA1.js} +1 -1
  118. package/dist/client/assets/{cynefin-EF2NZ3EQ-cj34OpiI.js → cynefin-EF2NZ3EQ-B_kxrTf4.js} +1 -1
  119. package/dist/client/assets/{cynefinDiagram-WF24UDRP-DvAggKpl.js → cynefinDiagram-WF24UDRP-Be0brpVq.js} +1 -1
  120. package/dist/client/assets/{dagre-NK4GIZVX-BskSpt7C.js → dagre-NK4GIZVX-zI9I0fUC.js} +1 -1
  121. package/dist/client/assets/{diagram-CBK3MWTC-C6BZljcO.js → diagram-CBK3MWTC-jN0pUEKR.js} +1 -1
  122. package/dist/client/assets/{diagram-I5XIIV2D--4FPRmBZ.js → diagram-I5XIIV2D-BjRZmmQf.js} +1 -1
  123. package/dist/client/assets/{diagram-ODIL2UCW-kZxp81Fr.js → diagram-ODIL2UCW-BtnkiX3a.js} +1 -1
  124. package/dist/client/assets/{diagram-PFBEJUXE-BSXBAffS.js → diagram-PFBEJUXE-Bteh9wpL.js} +1 -1
  125. package/dist/client/assets/{diagram-RJA3I4VV-DLDPF6FG.js → diagram-RJA3I4VV-hRmqKbOC.js} +1 -1
  126. package/dist/client/assets/{diagram-TYUNFSNR-CoU2knZy.js → diagram-TYUNFSNR-NKdthGes.js} +1 -1
  127. package/dist/client/assets/{ebnfDiagram-V4P3TTPT-C77T1UPB.js → ebnfDiagram-V4P3TTPT-CpkD13ID.js} +1 -1
  128. package/dist/client/assets/{elk-QONTBCTQ-UFXrlbAn.js → elk-QONTBCTQ-Dw4bdkn4.js} +1 -1
  129. package/dist/client/assets/{empty-state-aNwJA6H8.js → empty-state-Xw8KQdod.js} +1 -1
  130. package/dist/client/assets/{erDiagram-KYQIGQAA-CyLB8fKu.js → erDiagram-KYQIGQAA-fiThyiH_.js} +1 -1
  131. package/dist/client/assets/{execution-config-D7JzMYC2.js → execution-config-ryHuiBdx.js} +1 -1
  132. package/dist/client/assets/{file-bSD5jgk_.js → file-CbZILJJL.js} +1 -1
  133. package/dist/client/assets/{file-exclamation-point-BcCIL-rE.js → file-exclamation-point-rCHuN_aY.js} +1 -1
  134. package/dist/client/assets/{file-text-DTvj1wzM.js → file-text-DGtefNvG.js} +1 -1
  135. package/dist/client/assets/{find-latest-widget-fence-D01ENK2h.js → find-latest-widget-fence-DJDfJAaN.js} +1 -1
  136. package/dist/client/assets/{flowDiagram-IUGLLWBU-qmnUF-Ak.js → flowDiagram-IUGLLWBU-ORyRd0wW.js} +1 -1
  137. package/dist/client/assets/{form-C_yPntkz.js → form-USBlP2n_.js} +1 -1
  138. package/dist/client/assets/{format-cron-DUPWkOrW.js → format-cron-u8efK62G.js} +1 -1
  139. package/dist/client/assets/{ganttDiagram-R7GPNTJY-CBzoqGuU.js → ganttDiagram-R7GPNTJY-BC-M9_Wi.js} +1 -1
  140. package/dist/client/assets/{git-branch-ClXAt1_G.js → git-branch-jQqbJAvp.js} +1 -1
  141. package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-DMh_n1S2.js → gitGraphDiagram-PDYL7XHY-NIdjLN38.js} +1 -1
  142. package/dist/client/assets/{graph-BgkuepqW.js → graph-CBIOKOiw.js} +1 -1
  143. package/dist/client/assets/{heart-BrjEmIsl.js → heart-CSbB9K4Q.js} +1 -1
  144. package/dist/client/assets/{highlighted-body-KPVGNVTW-DlHNVEaV.js → highlighted-body-KPVGNVTW-OC8sqXXy.js} +1 -1
  145. package/dist/client/assets/{image-lightbox-BtzkRztd.js → image-lightbox-DgWS2xlv.js} +1 -1
  146. package/dist/client/assets/{image-off-4yaoLh32.js → image-off-DziiNcIl.js} +1 -1
  147. package/dist/client/assets/{index-CMLDdOez.js → index-B-KhOLHd.js} +1 -1
  148. package/dist/client/assets/{index-DQ9ppIWv.js → index-B5eM1_q1.js} +1 -1
  149. package/dist/client/assets/{index-A_qzw4D8.js → index-B9utW3HE.js} +1 -1
  150. package/dist/client/assets/{index-BUkUamu4.js → index-BAaqQW-m.js} +1 -1
  151. package/dist/client/assets/index-BGGnQdij.js +17 -0
  152. package/dist/client/assets/{index-BeVLPg9t.js → index-BN02EVKP.js} +1 -1
  153. package/dist/client/assets/{index-DrnHzrt4.js → index-BOaou3k5.js} +1 -1
  154. package/dist/client/assets/{index-B-X82FND.js → index-BU_bmsP2.js} +1 -1
  155. package/dist/client/assets/{index-C_H6ZIel.js → index-BYxDsLTQ.js} +1 -1
  156. package/dist/client/assets/index-BpsATTKn.js +1 -0
  157. package/dist/client/assets/{index-CyfSPJ1D.js → index-Bz9CgPjs.js} +1 -1
  158. package/dist/client/assets/{index-CNiC7KUz.js → index-C49AWTah.js} +1 -1
  159. package/dist/client/assets/{index-BtG4vr8c.js → index-C5gtuueN.js} +1 -1
  160. package/dist/client/assets/{index-FhmSwVD0.js → index-C9UgTEuh.js} +1 -1
  161. package/dist/client/assets/{index-WkQdt6Zo.js → index-CCohVfmo.js} +1 -1
  162. package/dist/client/assets/{index-6yT0Qr0s.js → index-CDslENFz.js} +1 -1
  163. package/dist/client/assets/{index-f1W4Bd4W.js → index-CP7hD01s.js} +1 -1
  164. package/dist/client/assets/{index-C0LPB1iH.js → index-CRPh-508.js} +1 -1
  165. package/dist/client/assets/{index-qdygDruh.js → index-CRTzTiNF.js} +1 -1
  166. package/dist/client/assets/index-CUKvspHB.js +1 -0
  167. package/dist/client/assets/{index-CNV11SW6.js → index-CWhDGAYM.js} +1 -1
  168. package/dist/client/assets/{index-DXalAOXT.js → index-CeJVF9AD.js} +1 -1
  169. package/dist/client/assets/{index-DgxXSEmR.js → index-CiAb-mD4.js} +1 -1
  170. package/dist/client/assets/{index-DX546SK5.js → index-CuT_aCM-.js} +2 -2
  171. package/dist/client/assets/{index-DZ1BC5JW.js → index-D9Ej8fsx.js} +1 -1
  172. package/dist/client/assets/{index-WxG6nG96.js → index-DJlq_kd_.js} +1 -1
  173. package/dist/client/assets/{index-DGdKO24t.js → index-DJyLZL6w.js} +1 -1
  174. package/dist/client/assets/index-DSYz85aL.js +1053 -0
  175. package/dist/client/assets/{index-Dj4I8KcL.js → index-DYF1ER90.js} +3 -3
  176. package/dist/client/assets/{index-Ckut3u-d.js → index-DeDh_2c1.js} +1 -1
  177. package/dist/client/assets/{index-CSyZb1X9.js → index-DfYJ-zxk.js} +1 -1
  178. package/dist/client/assets/{index-C_xSr5lb.js → index-DgnJZ7RZ.js} +1 -1
  179. package/dist/client/assets/{index-BqHUbNdh.js → index-Dk33a8Wz.js} +1 -1
  180. package/dist/client/assets/{index-CJhmUsIv.js → index-DkcRrH0O.js} +1 -1
  181. package/dist/client/assets/{index-Bgg4cW4L.js → index-DnyoNFRt.js} +1 -1
  182. package/dist/client/assets/index-DtlBeLQB.css +1 -0
  183. package/dist/client/assets/{index-BXtagrMY.js → index-LFeqJL-v.js} +1 -1
  184. package/dist/client/assets/{index-t-NyR7HD.js → index-RXFhiamo.js} +1 -1
  185. package/dist/client/assets/{index-D0yajRDv.js → index-Yr72qWri.js} +1 -1
  186. package/dist/client/assets/{index-CThGpHO2.js → index-YtJ82pkp.js} +1 -1
  187. package/dist/client/assets/{index-CrQWuUpr.js → index-fAHI5hei.js} +1 -1
  188. package/dist/client/assets/{index-DFWrO42z.js → index-j5szQcqb.js} +1 -1
  189. package/dist/client/assets/{index-DB2t3GUm.js → index-jJbbnV9q.js} +3 -3
  190. package/dist/client/assets/{index-Cefoks17.js → index-n6f9pLtt.js} +1 -1
  191. package/dist/client/assets/{index-Adjbt_HC.js → index-w4wyJU8q.js} +1 -1
  192. package/dist/client/assets/{index.esm-Bb3LMu5X.js → index.esm-Dyd3JXuK.js} +1 -1
  193. package/dist/client/assets/{infoDiagram-MVDRKAX5-DbU4eDjZ.js → infoDiagram-MVDRKAX5-CPcm-36U.js} +1 -1
  194. package/dist/client/assets/{inline-code-DwFNff3_.js → inline-code-BjkmgK0M.js} +1 -1
  195. package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-DmHmF-HT.js → ishikawaDiagram-HPEHV2GE-B8eVNEDQ.js} +1 -1
  196. package/dist/client/assets/{journeyDiagram-BOSHW7O7-DsjOeP3J.js → journeyDiagram-BOSHW7O7-CGkIGaMV.js} +1 -1
  197. package/dist/client/assets/{kanban-definition-FNSA4HC5-ByQ1WGy2.js → kanban-definition-FNSA4HC5-BTDbT6UJ.js} +1 -1
  198. package/dist/client/assets/{layers-DFZUUHM5.js → layers-DyShcAgn.js} +1 -1
  199. package/dist/client/assets/{lightbulb-Bbgsejp1.js → lightbulb-QljDqLq7.js} +1 -1
  200. package/dist/client/assets/{link-2-xieOmwOK.js → link-2-7SoeCkEs.js} +1 -1
  201. package/dist/client/assets/{list-runtime-types-B0CSonAi.js → list-runtime-types-DvfLx6v2.js} +1 -1
  202. package/dist/client/assets/{markdown-content-ysBIqFAg.js → markdown-content-D7t62wwm.js} +1 -1
  203. package/dist/client/assets/{mention-pill-Daeu1X92.js → mention-pill-DNQ2ICCW.js} +1 -1
  204. package/dist/client/assets/{mermaid.core-B1mQMOXd.js → mermaid.core-NAyHAvFm.js} +4 -4
  205. package/dist/client/assets/{message-square-off-D9hm8WNH.js → message-square-off-D6K1M95g.js} +1 -1
  206. package/dist/client/assets/{mindmap-definition-6OY57UG3-CoP-DGm1.js → mindmap-definition-6OY57UG3-26dEepZx.js} +1 -1
  207. package/dist/client/assets/{more-details-DHCpYDi7.js → more-details-BJ_2FYn8.js} +1 -1
  208. package/dist/client/assets/{owner-notice-Crxco7HN.js → owner-notice-CIfb2Yr7.js} +1 -1
  209. package/dist/client/assets/{package-CD8xq7hk.js → package-CeRLwc1u.js} +1 -1
  210. package/dist/client/assets/{page-container-B9sDc2wq.js → page-container-D2J6eon9.js} +1 -1
  211. package/dist/client/assets/{pane-resize-handle-DOchpdJ6.js → pane-resize-handle-CXxva43c.js} +1 -1
  212. package/dist/client/assets/{paperclip-CzhXW5qi.js → paperclip-DFuuQSWM.js} +1 -1
  213. package/dist/client/assets/{path-input-Z2p922fj.js → path-input-DhGxbEsh.js} +1 -1
  214. package/dist/client/assets/{pegDiagram-ECIUJNBX-TEsMAO1a.js → pegDiagram-ECIUJNBX-BJu6g9eg.js} +1 -1
  215. package/dist/client/assets/{pieDiagram-GNMPY74T-CMIDIiMP.js → pieDiagram-GNMPY74T-CMf8TQF7.js} +1 -1
  216. package/dist/client/assets/{plug-BEp9Ly3k.js → plug-Bqwk5g66.js} +1 -1
  217. package/dist/client/assets/{primer-trigger-4qUY83SX.js → primer-trigger-NAz78FSN.js} +1 -1
  218. package/dist/client/assets/{profile-errors-CezsKqhA.js → profile-errors--0_JG2R0.js} +1 -1
  219. package/dist/client/assets/{progress-eQl1UvNz.js → progress-cQRXQehb.js} +1 -1
  220. package/dist/client/assets/{quadrantDiagram-D57K4MC3-DXjohzOz.js → quadrantDiagram-D57K4MC3-Bb92PcA9.js} +1 -1
  221. package/dist/client/assets/{query-error-state-COuKRlU0.js → query-error-state-C2QLFCgp.js} +1 -1
  222. package/dist/client/assets/{radio-Cdnkcg1w.js → radio-CBD2fSSB.js} +1 -1
  223. package/dist/client/assets/{railroadDiagram-Y72NRBL7-BojgH6Hw.js → railroadDiagram-Y72NRBL7-YN2siyto.js} +1 -1
  224. package/dist/client/assets/registry-CsiY3fnM.js +1 -0
  225. package/dist/client/assets/{relay-trace-schemas-XcVQg5Fa.js → relay-trace-schemas-yWn__06J.js} +1 -1
  226. package/dist/client/assets/{repeat-wB31CP7I.js → repeat-CtIEyxm4.js} +1 -1
  227. package/dist/client/assets/{requirementDiagram-EQYSW5RA-Gojbrcvg.js → requirementDiagram-EQYSW5RA-DJBQviv-.js} +1 -1
  228. package/dist/client/assets/{room-files-source-DXKpm43a.js → room-files-source-nnbGMKus.js} +1 -1
  229. package/dist/client/assets/{rotate-ccw-clock-LSKKAcnR.js → rotate-ccw-clock-C2jXtg-P.js} +1 -1
  230. package/dist/client/assets/{rotate-cw-scTEKxeZ.js → rotate-cw-34X3Kx8Z.js} +1 -1
  231. package/dist/client/assets/{sankeyDiagram-SY24JHO5-QS71aycL.js → sankeyDiagram-SY24JHO5-DH2qnwVI.js} +1 -1
  232. package/dist/client/assets/{scroll-area-BNFXgTKM.js → scroll-area-DYTbXWMY.js} +1 -1
  233. package/dist/client/assets/{search-x-Cjf0n9z7.js → search-x-DeFOvp_5.js} +1 -1
  234. package/dist/client/assets/{sequenceDiagram-BLEHNHQU-Beg7mj69.js → sequenceDiagram-BLEHNHQU-CkHcuOw2.js} +1 -1
  235. package/dist/client/assets/{shield-x-Dr4BZfo_.js → shield-x-bloGLifl.js} +1 -1
  236. package/dist/client/assets/{signed-in-L9MLqTuc.js → signed-in-DD2qV0PJ.js} +1 -1
  237. package/dist/client/assets/{sizeCapture-INFHLROL-3Oo1KjRp.js → sizeCapture-INFHLROL-BXK-Cxjs.js} +1 -1
  238. package/dist/client/assets/{soul-file-CxpOawh5.js → soul-file-DFPctfHR.js} +1 -1
  239. package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-DFYIDQ6C.js → stateDiagram-v2-A6IESKWZ-DP_cqXJO.js} +1 -1
  240. package/dist/client/assets/{swimlanes-B3ENRKFQ-BUgKOOrv.js → swimlanes-B3ENRKFQ-BZxkK7Fr.js} +1 -1
  241. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-DXRZtHKX.js +8 -0
  242. package/dist/client/assets/{table-B0LsKsEv.js → table-B8zvHC0J.js} +1 -1
  243. package/dist/client/assets/{timeline-definition-JXYKGLGB-BsPZ0P_8.js → timeline-definition-JXYKGLGB-BPZ64ADa.js} +1 -1
  244. package/dist/client/assets/{trust-posture-Cm7OhCEx.js → trust-posture-C9r0jGhc.js} +1 -1
  245. package/dist/client/assets/{unplug-DLA7Ib_s.js → unplug-DYZEcvkR.js} +1 -1
  246. package/dist/client/assets/{unverified-catalog-notice-CxBO_pta.js → unverified-catalog-notice-DAhwNpy_.js} +1 -1
  247. package/dist/client/assets/{use-adapter-catalog-C333Z2Q6.js → use-adapter-catalog-DrDMqxhZ.js} +1 -1
  248. package/dist/client/assets/{use-bindings-Bu4yLLR5.js → use-bindings-Ci7hpEO4.js} +1 -1
  249. package/dist/client/assets/{use-composer-prefs-BnjCX9pM.js → use-composer-prefs-FpUdi_wE.js} +1 -1
  250. package/dist/client/assets/{use-connector-management-Bo6wOJQS.js → use-connector-management-CinfkPZI.js} +1 -1
  251. package/dist/client/assets/{use-deep-link-scroll-D867V6rs.js → use-deep-link-scroll-DZnA4iYZ.js} +1 -1
  252. package/dist/client/assets/{use-delete-binding-DKObM-zT.js → use-delete-binding-DDtaCc3v.js} +1 -1
  253. package/dist/client/assets/{use-dev-links-C0Zc30aj.js → use-dev-links-CtHwhTBj.js} +1 -1
  254. package/dist/client/assets/{use-direct-message-panel-DNWtQq4B.js → use-direct-message-panel-Da9rkfA3.js} +1 -1
  255. package/dist/client/assets/{use-external-adapter-catalog-Bv5rDkX4.js → use-external-adapter-catalog-CikM-LiV.js} +1 -1
  256. package/dist/client/assets/{use-full-activity-feed-CFUj0qCS.js → use-full-activity-feed-B6TQc-xB.js} +1 -1
  257. package/dist/client/assets/use-is-below-desktop-DJQVU5CF.js +1 -0
  258. package/dist/client/assets/{use-local-browser-BeZjn0gA.js → use-local-browser-ABoWOGv1.js} +1 -1
  259. package/dist/client/assets/{use-mesh-topology-DurMpvjU.js → use-mesh-topology-C5njB0KY.js} +1 -1
  260. package/dist/client/assets/{use-mounted-ref-CBSuPNPv.js → use-mounted-ref-Bp9Wp7zY.js} +1 -1
  261. package/dist/client/assets/{use-notification-prefs-b8iKvzB4.js → use-notification-prefs-DXww4pVV.js} +1 -1
  262. package/dist/client/assets/{use-panel-tab-placements-BcKEux1G.js → use-panel-tab-placements-DLQeHI7w.js} +1 -1
  263. package/dist/client/assets/use-pending-read-CgR0BnSW.js +1 -0
  264. package/dist/client/assets/{use-personality-commit-u3kQ6h3H.js → use-personality-commit-DYQ3KVxd.js} +1 -1
  265. package/dist/client/assets/{use-promo-activation-C8_cGmEW.js → use-promo-activation-nURLgFxH.js} +1 -1
  266. package/dist/client/assets/{use-promo-dismissals-B3VuaQCf.js → use-promo-dismissals-BQkeHMCS.js} +1 -1
  267. package/dist/client/assets/{use-pulse-freshness-CSWQ0TZS.js → use-pulse-freshness-B8VeNnHj.js} +1 -1
  268. package/dist/client/assets/{use-relay-config-BA6c0FMB.js → use-relay-config-D0BknsXK.js} +1 -1
  269. package/dist/client/assets/{use-room-follow-claim-BV-MtDQ5.js → use-room-follow-claim-BruRRf3z.js} +1 -1
  270. package/dist/client/assets/{use-room-sessions-W62Zl72O.js → use-room-sessions-DGcrmZvE.js} +1 -1
  271. package/dist/client/assets/{use-roving-tab-list-CMITzUHu.js → use-roving-tab-list-YQ4MgIBO.js} +1 -1
  272. package/dist/client/assets/{use-session-canvas-u63m2mYH.js → use-session-canvas-BaGypLR6.js} +3 -3
  273. package/dist/client/assets/{use-status-budget-CbmPFvpQ.js → use-status-budget-Q1ltHI80.js} +4 -4
  274. package/dist/client/assets/{use-unclaimed-chats-D7SEUfiO.js → use-unclaimed-chats-Bext8Aim.js} +1 -1
  275. package/dist/client/assets/use-update-config-BJEw2LjV.js +1 -0
  276. package/dist/client/assets/{useMutationState-rOg4bnKv.js → useMutationState-C3WVn0hu.js} +1 -1
  277. package/dist/client/assets/{usecaseDiagram-WPOLBNNX-C-w0e-nv.js → usecaseDiagram-WPOLBNNX-Dg4P8nSr.js} +1 -1
  278. package/dist/client/assets/{vennDiagram-Q3Y3IDCW-BNm2WXT5.js → vennDiagram-Q3Y3IDCW-B8Txoqsz.js} +1 -1
  279. package/dist/client/assets/{wardleyDiagram-IVAIDKWA-BFyFLiir.js → wardleyDiagram-IVAIDKWA-lgQBspKc.js} +1 -1
  280. package/dist/client/assets/{xychartDiagram-4URNHDU4-BKxZlnEx.js → xychartDiagram-4URNHDU4-Ct9-Lgo9.js} +1 -1
  281. package/dist/client/index.html +2 -2
  282. package/dist/server/extension-child.cjs +1701 -435
  283. package/dist/server/index.js +23150 -21706
  284. package/dist/server/index.js.map +2 -2
  285. package/package.json +4 -4
  286. package/dist/client/assets/ChannelComposer-CutghXOq.js +0 -44
  287. package/dist/client/assets/HandlePage-XG5mP_e9.js +0 -1
  288. package/dist/client/assets/NamePage-Cdd9-mZg.js +0 -1
  289. package/dist/client/assets/PhotoPage-DFic-gDH.js +0 -1
  290. package/dist/client/assets/_shell.channels-B7lTxkqM.js +0 -10
  291. package/dist/client/assets/_shell.marketplace-BMqwT9qX.js +0 -1
  292. package/dist/client/assets/_shell.marketplace_.sources-pXGa7Cqb.js +0 -1
  293. package/dist/client/assets/_shell.session-CmoE1W38.js +0 -1
  294. package/dist/client/assets/_shell.x._extensionId-BiXilrSW.js +0 -1
  295. package/dist/client/assets/_shell.x._extensionId_._-BiXilrSW.js +0 -1
  296. package/dist/client/assets/channel-A2WD4smw.js +0 -1
  297. package/dist/client/assets/index-BMCDckcY.js +0 -17
  298. package/dist/client/assets/index-BOuCpkRb.js +0 -1
  299. package/dist/client/assets/index-BVq1p60h.js +0 -1
  300. package/dist/client/assets/index-CjUfPyOM.js +0 -1053
  301. package/dist/client/assets/index-D2ZFfqZZ.css +0 -1
  302. package/dist/client/assets/registry-BSucT23N.js +0 -1
  303. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-Bqjv1MSj.js +0 -8
  304. package/dist/client/assets/use-is-below-desktop-BUS7OPGv.js +0 -1
  305. package/dist/client/assets/use-is-hub-CFhvDMHt.js +0 -1
  306. package/dist/client/assets/use-pending-read-BBBAnUYu.js +0 -1
  307. package/dist/client/assets/use-update-config-Dfd7KMde.js +0 -1
@@ -1 +1 @@
1
- import{r as z,ez as B}from"./index-CjUfPyOM.js";function N(r){return typeof r=="object"?r.key:r}function H(r,a){const t=r.length;return new Proxy(r,{get(s,e,n){if(typeof e=="string"){const l=e.charCodeAt(0);if(l>=48&&l<=57){const i=+e;if(Number.isInteger(i)&&i>=0&&i<t){let o=s[i];if(typeof o!="object"){const c=a[i*2];o=s[i]={index:i,key:o,start:c,size:a[i*2+1],end:c+a[i*2+1],lane:0}}return o}}if(e==="length")return t}return Reflect.get(s,e,n)}})}function A(r,a,t){let s=t.initialDeps??[],e,n=!0;function l(){const i=r();return(i.length!==s.length||i.some((c,g)=>s[g]!==c))&&(s=i,e=a(...i),t!=null&&t.onChange&&!(n&&t.skipInitialOnChange)&&t.onChange(e),n=!1),e}return l.updateDeps=i=>{s=i},l}function k(r,a){if(r===void 0)throw new Error("Unexpected undefined");return r}const V=(r,a)=>Math.abs(r-a)<1.01,J=(r,a,t)=>{let s;return Object.assign(function(...e){r.clearTimeout(s),s=r.setTimeout(()=>a.apply(this,e),t)},{cancel:()=>{r.clearTimeout(s)}})};let R;const L=()=>{if(R!==void 0)return R;if(typeof navigator>"u")return R=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return R=!0;const r=navigator.maxTouchPoints;return R=navigator.platform==="MacIntel"&&r!==void 0&&r>0},K=r=>{const{offsetWidth:a,offsetHeight:t}=r;return{width:a,height:t}},$=r=>r,q=r=>{const a=Math.max(r.startIndex-r.overscan,0),s=Math.min(r.endIndex+r.overscan,r.count-1)-a+1,e=new Array(s);for(let n=0;n<s;n++)e[n]=a+n;return e},U=(r,a)=>{const t=r.scrollElement;if(!t)return;const s=r.targetWindow;if(!s)return;const e=l=>{const{width:i,height:o}=l;a({width:Math.round(i),height:Math.round(o)})};if(e(K(t)),!s.ResizeObserver)return()=>{};const n=new s.ResizeObserver(l=>{const i=()=>{const o=l[0];if(o!=null&&o.borderBoxSize){const c=o.borderBoxSize[0];if(c){e({width:c.inlineSize,height:c.blockSize});return}}e(K(t))};r.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return n.observe(t,{box:"border-box"}),()=>{n.unobserve(t)}},j={passive:!0},X=typeof window>"u"?!0:"onscrollend"in window,G=(r,a,t)=>{const s=r.scrollElement;if(!s)return;const e=r.targetWindow;if(!e)return;const n=r.options.useScrollendEvent&&X;let l=0;const i=n?null:J(e,()=>a(t(s),!1),r.options.isScrollingResetDelay),o=h=>()=>{l=t(s),i==null||i(),a(l,h)},c=o(!0),g=o(!1);return s.addEventListener("scroll",c,j),n&&s.addEventListener("scrollend",g,j),()=>{s.removeEventListener("scroll",c),n&&s.removeEventListener("scrollend",g),i==null||i.cancel()}},Q=(r,a)=>G(r,a,t=>{const{horizontal:s,isRtl:e}=r.options;return s?t.scrollLeft*(e&&-1||1):t.scrollTop}),Y=(r,a,t)=>{if(t.options.useCachedMeasurements){const s=t.indexFromElement(r),e=t.options.getItemKey(s);return t.itemSizeCache.get(e)??t.options.estimateSize(s)}if(a!=null&&a.borderBoxSize){const s=a.borderBoxSize[0];if(s)return Math.round(s[t.options.horizontal?"inlineSize":"blockSize"])}if(!a){const s=t.indexFromElement(r),e=t.options.getItemKey(s),n=t.itemSizeCache.get(e);if(n!==void 0)return n}return r[t.options.horizontal?"offsetWidth":"offsetHeight"]},Z=(r,{adjustments:a=0,behavior:t},s)=>{var e,n;(n=(e=s.scrollElement)==null?void 0:e.scrollTo)==null||n.call(e,{[s.options.horizontal?"left":"top"]:r+a,behavior:t})},tt=Z;function et(r,a,t,s){if(a===0)return!1;const e=s(0),n=new Set;let l=0;for(;l<r;){const o=t(l);if(o===e)break;n.add(o),l++}const i=r-l;if(i===0||i>=a)return!1;for(let o=0;o<i;o++)if(s(o)!==t(l+o))return!1;for(let o=i;o<a;o++)if(n.has(s(o)))return!1;return!0}class st{constructor(a){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,s,e;return((e=(s=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:s.now)==null?void 0:e.call(s))??Date.now()},this.observer=(()=>{let t=null;const s=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(e=>{e.forEach(n=>{const l=()=>{const i=n.target,o=this.indexFromElement(i);if(!i.isConnected){this.observer.unobserve(i);for(const[c,g]of this.elementsCache)if(g===i){this.elementsCache.delete(c);break}return}this.isIndexInRange(o)&&this.shouldMeasureDuringScroll(o)&&this.resizeItem(o,this.options.measureElement(i,n,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var e;(e=s())==null||e.disconnect(),t=null},observe:e=>{var n;return(n=s())==null?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return(n=s())==null?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=t=>{var s;const e={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:$,rangeExtractor:q,onChange:()=>{},measureElement:Y,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const h in t){const d=t[h];d!==void 0&&(e[h]=d)}const n=this.options;let l=null,i=null,o=!1;if(n!==void 0&&n.enabled&&e.enabled&&e.anchorTo==="end"&&this.scrollElement!==null){const h=n.count,d=e.count,u=this.getMeasurements(),S=((s=this._singleLaneMeasurements)==null?void 0:s.items)??u,p=E=>N(S[E]),v=h>0?p(0):null,b=h>0?p(h-1):null;if(d!==h||h>0&&d>0&&(e.getItemKey(0)!==v||e.getItemKey(d-1)!==b)){o=!0;const E=h>0?this.getVirtualItemForOffset(this.getScrollOffset())??u[0]:null;E&&(l=[E.key,this.getScrollOffset()-E.start]);const _=e.followOnAppend===!0?"auto":e.followOnAppend||null;_&&d>0&&this.isAtEnd(n.scrollEndThreshold)&&(h===0||e.getItemKey(d-1)!==b)&&(d>h||et(h,d,p,e.getItemKey))&&(i=_)}}this.options=e,o&&(this.pendingMin=0,this.itemSizeCacheVersion++);let c=!1,g=0;if(l&&this.scrollOffset!==null){const[h,d]=l,u=this.getMeasurements(),{count:S,getItemKey:p}=this.options;let v=0;for(;v<S&&p(v)!==h;)v++;if(v<S){const b=u[v];if(b){const f=Math.max(0,b.start+d);!i&&f!==this.scrollOffset&&(g=f-this.scrollOffset,this.scrollOffset=f,c=!0)}}}(c||i)&&(this.pendingScrollAnchor=[c?l[0]:null,c?l[1]:0,i,g])},this.notify=t=>{var s,e;(e=(s=this.options).onChange)==null||e.call(s,this,t)},this.maybeNotify=A(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t,s;const e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(l=>{this.observer.observe(l)}),this.unsubs.push(this.options.observeElementRect(this,l=>{this.scrollRect=l,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(l,i)=>{if(i&&this._intendedScrollOffset===null&&l===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(l-this._intendedScrollOffset)<1.5&&(l=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(l-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const o=this.getScrollOffset();this.scrollDirection=i?o===l?this.scrollDirection:o<l?"forward":"backward":null,this.scrollOffset=l,this.isScrolling=i,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const l=this.scrollElement,i=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},o=()=>{this._iosTouching=!1,!(!L()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};l.addEventListener("touchstart",i,j),l.addEventListener("touchend",o,j),this.unsubs.push(()=>{l.removeEventListener("touchstart",i),l.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const n=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,n&&this.scrollElement&&this.options.enabled){const[l,i,o,c]=n;l!==null&&!o&&(L()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):((s=this.scrollState)==null?void 0:s.behavior)==="smooth"&&!V(this.getScrollOffset()-c,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:s}=this._clampedAdjustment,e=this.getMaxScrollOffset();e>s+.5&&(this._clampedAdjustment=t>e+.5?{target:t,maxAtWrite:e}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),s=this.getMaxScrollOffset();if(t<0||t>s)return;if(this._iosDeferredAdjustment<0&&t>=s-1){this._iosDeferredAdjustment=0;return}const e=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=e,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=A(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,s,e,n,l,i,o,c)=>(this.prevLanes!==void 0&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:t,paddingStart:s,scrollMargin:e,getItemKey:n,enabled:l,lanes:i,laneAssignmentMode:o,gap:c}),{key:!1}),this.isIndexInRange=t=>t>=0&&t<this.options.count,this.getMeasurements=A(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:s,scrollMargin:e,getItemKey:n,enabled:l,lanes:i,laneAssignmentMode:o,gap:c},g)=>{var h;const d=this.itemSizeCache;if(!l)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const f of this.laneAssignments.keys())f>=t&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),i===1){const f=t*2;let m=(h=this._singleLaneMeasurements)==null?void 0:h.flat;if(!m||m.length<f){const O=new Float64Array(f);m&&u>0&&O.set(m.subarray(0,u*2)),m=O}const E=u===0?new Array(t):this._singleLaneMeasurements.items.slice();let _;if(u===0)_=s+e;else{const O=u-1;_=m[O*2]+m[O*2+1]+c}for(let O=u;O<t;O++){const M=n(O);E[O]=M;const T=d.get(M),w=typeof T=="number"?T:this.options.estimateSize(O);m[O*2]=_,m[O*2+1]=w,_+=w+c}this._singleLaneMeasurements={flat:m,items:E};const x=H(E,m);return this.measurementsCache=x,x}const S=this.measurementsCache.slice(0,u),p=new Array(i).fill(void 0),v=new Float64Array(i);let b=0;for(let f=0;f<u;f++){const m=S[f];m&&(p[m.lane]===void 0&&b++,p[m.lane]=f,v[m.lane]=m.end)}for(let f=u;f<t;f++){const m=n(f),E=this.laneAssignments.get(f);let _,x;const O=o==="estimate"||d.has(m);if(E!==void 0&&this.options.lanes>1){_=E;const C=p[_],I=C!==void 0?S[C]:void 0;x=I?I.end+c:s+e}else if(b===i){let C=0,I=v[0],W=p[0];for(let y=1;y<i;y++){const F=v[y];(F<I||F===I&&p[y]<W)&&(C=y,I=F,W=p[y])}_=C,x=I+c,O&&this.laneAssignments.set(f,_)}else _=f%this.options.lanes,x=s+e,O&&this.laneAssignments.set(f,_);const M=d.get(m),T=typeof M=="number"?M:this.options.estimateSize(f),w=x+T;S[f]={index:f,start:x,size:T,end:w,key:m,lane:_},p[_]===void 0&&b++,p[_]=f,v[_]=w}return this.measurementsCache=S,S},{key:!1,debug:()=>this.options.debug}),this.calculateRange=A(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,s,e,n)=>t.length===0||s===0?(this.range=null,null):(this.range=it(t,s,e,n,n===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=A(()=>{let t=null,s=null;const e=this.calculateRange();return e&&(t=e.startIndex,s=e.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,s]},(t,s,e,n,l)=>n===null||l===null?[]:t({startIndex:n,endIndex:l,overscan:s,count:e}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const s=this.options.indexAttribute,e=t.getAttribute(s);return e?parseInt(e,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var s;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const e=this.scrollState.index??((s=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:s.index);if(e!==void 0&&this.range){const n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),l=Math.max(0,e-n),i=Math.min(this.options.count-1,e+n);return t>=l&&t<=i}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((l,i)=>{l.isConnected||(this.observer.unobserve(l),this.elementsCache.delete(i))});return}const s=this.indexFromElement(t);if(!this.isIndexInRange(s))return;const e=this.options.getItemKey(s),n=this.elementsCache.get(e);n!==t&&(n&&this.observer.unobserve(n),this.observer.observe(t),this.elementsCache.set(e,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,s)=>{var e,n,l;if(!this.isIndexInRange(t))return;let i,o,c;const g=(e=this._singleLaneMeasurements)==null?void 0:e.flat;if(this.options.lanes===1&&g!=null)c=this.options.getItemKey(t),o=g[t*2],i=g[t*2+1];else{const u=this.measurementsCache[t];if(!u)return;c=u.key,o=u.start,i=u.size}const h=this.itemSizeCache.get(c)??i,d=s-h;if(d!==0){const u=this.options.anchorTo==="end"&&((n=this.scrollState)==null?void 0:n.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,S=u?this.getTotalSize():0,p=this.getScrollOffset()+this.scrollAdjustments,b=!this.itemSizeCache.has(c)?o<p:o+h<=p&&this.scrollDirection!=="backward",f=((l=this.scrollState)==null?void 0:l.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[t]??{index:t,key:c,start:o,size:i,end:o+i,lane:0},d,this):b);(this.pendingMin===null||t<this.pendingMin)&&(this.pendingMin=t),this.itemSizeCache.set(c,s),this.itemSizeCacheVersion++;let m=!1;u?m=this.applyScrollAdjustment(this.getTotalSize()-S):f&&(m=this.applyScrollAdjustment(d)),this.notify(m),this._retryClampedAdjustment()}},this.getVirtualItems=A(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,s)=>{const e=[];for(let n=0,l=t.length;n<l;n++){const i=t[n],o=s[i];e.push(o)}return e},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{var s;const e=this.getMeasurements();if(e.length===0)return;const n=(s=this._singleLaneMeasurements)==null?void 0:s.flat,l=this.options.lanes===1&&n!=null,i=P(0,e.length-1,l?o=>n[o*2]:o=>k(e[o]).start,t);return k(e[i])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,s,e=0)=>{if(!this.scrollElement)return 0;const n=this.getSize(),l=this.getScrollOffset();s==="auto"&&(s=t>=l+n?"end":"start"),s==="center"?t+=(e-n)/2:s==="end"&&(t-=n);const i=this.getMaxScrollOffset();return Math.max(Math.min(i,t),0)},this.getOffsetForIndex=(t,s="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const e=this.getSize(),n=this.getScrollOffset(),l=this.measurementsCache[t];if(!l)return;if(s==="auto")if(l.end>=n+e-this.options.scrollPaddingEnd)s="end";else if(l.start<=n+this.options.scrollPaddingStart)s="start";else return[n,s];if(s==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),s];const i=s==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,s,l.size),s]},this.scrollToOffset=(t,{align:s="start",behavior:e="auto"}={})=>{this._iosDeferredAdjustment=0;const n=this.getOffsetForAlignment(t,s),l=this.now();this.scrollState={index:null,align:s,behavior:e,startedAt:l,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:s="auto",behavior:e="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const n=this.getOffsetForIndex(t,s);if(!n)return;const[l,i]=n,o=this.now();this.scrollState={index:t,align:i,behavior:e,startedAt:o,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:s="auto"}={})=>{const e=this.getScrollOffset()+t,n=this.now();this.scrollState={index:null,align:"start",behavior:s,startedAt:n,lastTargetOffset:e,stableFrames:0},this._scrollToOffset(e,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t,s;const e=this.getMeasurements();let n;if(e.length===0)n=this.options.paddingStart;else if(this.options.lanes===1){const l=e.length-1,i=(t=this._singleLaneMeasurements)==null?void 0:t.flat;i!=null?n=i[l*2]+i[l*2+1]:n=((s=e[l])==null?void 0:s.end)??0}else{const l=Array(this.options.lanes).fill(null);let i=e.length-1;for(;i>=0&&l.some(o=>o===null);){const o=e[i];l[o.lane]===null&&(l[o.lane]=o.end),i--}n=Math.max(...l.filter(o=>o!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const s=this.getMeasurements();for(const e of s)e&&this.itemSizeCache.has(e.key)&&t.push({index:e.index,key:e.key,start:e.start,size:e.size,end:e.end,lane:e.lane});return t},this._scrollToOffset=(t,{adjustments:s,behavior:e})=>{this._intendedScrollOffset=t+(s??0),this.options.scrollToFn(t,{behavior:e,adjustments:s},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(a)}applyScrollAdjustment(a,t){if(a===0)return!1;if(L()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=a,!1;{const s=this.getScrollOffset()+this.scrollAdjustments+a,e=this.scrollElement,n=e!==null&&("scrollHeight"in e||"document"in e)?this.getMaxScrollOffset():null;return this._clampedAdjustment=n!==null&&s>n+.5?{target:s,maxAtWrite:n}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const s=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,e=s?s[0]:this.scrollState.lastTargetOffset,n=1,l=e!==this.scrollState.lastTargetOffset;if(!l&&V(e,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=n){this.getScrollOffset()!==e&&this._scrollToOffset(e,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,l){const i=this.getSize()||600,o=Math.abs(e-this.getScrollOffset()),c=this.scrollState.behavior==="smooth"&&o>i;this.scrollState.lastTargetOffset=e,c||(this.scrollState.behavior="auto"),this._scrollToOffset(e,{adjustments:void 0,behavior:c?"smooth":"auto"})}this.scheduleScrollReconcile()}}const P=(r,a,t,s)=>{for(;r<=a;){const e=(r+a)/2|0,n=t(e);if(n<s)r=e+1;else if(n>s)a=e-1;else return e}return r>0?r-1:0};function nt(r,a,t){let s=0;for(;s<=a;){const e=(s+a)/2|0,n=r[e*2];if(n<t)s=e+1;else if(n>t)a=e-1;else return e}return s>0?s-1:0}function it(r,a,t,s,e){const n=r.length-1;if(r.length<=s)return{startIndex:0,endIndex:n};if(s===1&&e!==null){const c=nt(e,n,t);let g=c;const h=t+a;for(;g<n&&e[g*2]+e[g*2+1]<h;)g++;return{startIndex:c,endIndex:g}}let i=P(0,n,c=>r[c].start,t),o=i;if(s===1)for(;o<n&&r[o].end<t+a;)o++;else if(s>1){const c=Array(s).fill(0);for(;o<n&&c.some(h=>h<t+a);){const h=r[o];c[h.lane]=h.end,o++}const g=Array(s).fill(t+a);for(;i>=0&&g.some(h=>h>=t);){const h=r[i];g[h.lane]=h.start,i--}i=Math.max(0,i-i%s),o=Math.min(n,o+(s-1-o%s))}return{startIndex:i,endIndex:o}}const D=typeof document<"u"?z.useLayoutEffect:z.useEffect;function lt({useFlushSync:r=!0,directDomUpdates:a=!1,directDomUpdatesMode:t="transform",...s}){const e=z.useReducer(h=>h+1,0)[1],n=z.useRef({enabled:a,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});n.current.enabled=a,n.current.mode=t;const l=z.useRef(!1),i=h=>{const d=n.current;if(!d.enabled||!d.container)return;const u=h.getTotalSize();if(u!==d.lastSize){d.lastSize=u;const S=h.options.horizontal?"width":"height";d.container.style[S]=`${u}px`}},o=h=>{const d=n.current;if(!d.enabled||!d.container)return;i(h);const u=!!h.options.horizontal,S=d.mode==="transform",p=u?"left":"top",v=h.options.scrollMargin,b=h.getVirtualItems();for(const f of b){const m=f.start-v,E=h.elementsCache.get(f.key);E&&d.lastPositions.get(E)!==m&&(d.lastPositions.set(E,m),S?E.style.transform=u?`translate3d(${m}px, 0, 0)`:`translate3d(0, ${m}px, 0)`:E.style[p]=`${m}px`)}},c={...s,onChange:(h,d)=>{var u;const S=n.current;let p=!0;if(S.enabled){o(h);const v=h.range,b=S.prevRange;p=!b||b.isScrolling!==h.isScrolling||b.startIndex!==(v==null?void 0:v.startIndex)||b.endIndex!==(v==null?void 0:v.endIndex),p&&(S.prevRange=v?{startIndex:v.startIndex,endIndex:v.endIndex,isScrolling:h.isScrolling}:null)}p&&(r&&d&&!l.current?B.flushSync(e):e()),(u=s.onChange)==null||u.call(s,h,d)}},[g]=z.useState(()=>{const h=new st(c),d=h.measureElement;return h.measureElement=u=>{l.current=!0;try{d(u)}finally{l.current=!1}},Object.assign(h,{containerRef:u=>{const S=n.current;if(S.container=u,S.lastSize=null,u&&S.enabled){const p=h.getTotalSize();S.lastSize=p;const v=h.options.horizontal?"width":"height";u.style[v]=`${p}px`}}})});return g.setOptions(c),D(()=>g._didMount(),[]),D(()=>(i(g),g._willUpdate())),D(()=>{o(g)}),g}function rt(r){return lt({observeElementRect:U,observeElementOffset:Q,scrollToFn:tt,...r})}export{rt as u};
1
+ import{r as z,ez as B}from"./index-DSYz85aL.js";function N(r){return typeof r=="object"?r.key:r}function H(r,a){const t=r.length;return new Proxy(r,{get(s,e,n){if(typeof e=="string"){const l=e.charCodeAt(0);if(l>=48&&l<=57){const i=+e;if(Number.isInteger(i)&&i>=0&&i<t){let o=s[i];if(typeof o!="object"){const c=a[i*2];o=s[i]={index:i,key:o,start:c,size:a[i*2+1],end:c+a[i*2+1],lane:0}}return o}}if(e==="length")return t}return Reflect.get(s,e,n)}})}function A(r,a,t){let s=t.initialDeps??[],e,n=!0;function l(){const i=r();return(i.length!==s.length||i.some((c,g)=>s[g]!==c))&&(s=i,e=a(...i),t!=null&&t.onChange&&!(n&&t.skipInitialOnChange)&&t.onChange(e),n=!1),e}return l.updateDeps=i=>{s=i},l}function k(r,a){if(r===void 0)throw new Error("Unexpected undefined");return r}const V=(r,a)=>Math.abs(r-a)<1.01,J=(r,a,t)=>{let s;return Object.assign(function(...e){r.clearTimeout(s),s=r.setTimeout(()=>a.apply(this,e),t)},{cancel:()=>{r.clearTimeout(s)}})};let R;const L=()=>{if(R!==void 0)return R;if(typeof navigator>"u")return R=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return R=!0;const r=navigator.maxTouchPoints;return R=navigator.platform==="MacIntel"&&r!==void 0&&r>0},K=r=>{const{offsetWidth:a,offsetHeight:t}=r;return{width:a,height:t}},$=r=>r,q=r=>{const a=Math.max(r.startIndex-r.overscan,0),s=Math.min(r.endIndex+r.overscan,r.count-1)-a+1,e=new Array(s);for(let n=0;n<s;n++)e[n]=a+n;return e},U=(r,a)=>{const t=r.scrollElement;if(!t)return;const s=r.targetWindow;if(!s)return;const e=l=>{const{width:i,height:o}=l;a({width:Math.round(i),height:Math.round(o)})};if(e(K(t)),!s.ResizeObserver)return()=>{};const n=new s.ResizeObserver(l=>{const i=()=>{const o=l[0];if(o!=null&&o.borderBoxSize){const c=o.borderBoxSize[0];if(c){e({width:c.inlineSize,height:c.blockSize});return}}e(K(t))};r.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return n.observe(t,{box:"border-box"}),()=>{n.unobserve(t)}},j={passive:!0},X=typeof window>"u"?!0:"onscrollend"in window,G=(r,a,t)=>{const s=r.scrollElement;if(!s)return;const e=r.targetWindow;if(!e)return;const n=r.options.useScrollendEvent&&X;let l=0;const i=n?null:J(e,()=>a(t(s),!1),r.options.isScrollingResetDelay),o=h=>()=>{l=t(s),i==null||i(),a(l,h)},c=o(!0),g=o(!1);return s.addEventListener("scroll",c,j),n&&s.addEventListener("scrollend",g,j),()=>{s.removeEventListener("scroll",c),n&&s.removeEventListener("scrollend",g),i==null||i.cancel()}},Q=(r,a)=>G(r,a,t=>{const{horizontal:s,isRtl:e}=r.options;return s?t.scrollLeft*(e&&-1||1):t.scrollTop}),Y=(r,a,t)=>{if(t.options.useCachedMeasurements){const s=t.indexFromElement(r),e=t.options.getItemKey(s);return t.itemSizeCache.get(e)??t.options.estimateSize(s)}if(a!=null&&a.borderBoxSize){const s=a.borderBoxSize[0];if(s)return Math.round(s[t.options.horizontal?"inlineSize":"blockSize"])}if(!a){const s=t.indexFromElement(r),e=t.options.getItemKey(s),n=t.itemSizeCache.get(e);if(n!==void 0)return n}return r[t.options.horizontal?"offsetWidth":"offsetHeight"]},Z=(r,{adjustments:a=0,behavior:t},s)=>{var e,n;(n=(e=s.scrollElement)==null?void 0:e.scrollTo)==null||n.call(e,{[s.options.horizontal?"left":"top"]:r+a,behavior:t})},tt=Z;function et(r,a,t,s){if(a===0)return!1;const e=s(0),n=new Set;let l=0;for(;l<r;){const o=t(l);if(o===e)break;n.add(o),l++}const i=r-l;if(i===0||i>=a)return!1;for(let o=0;o<i;o++)if(s(o)!==t(l+o))return!1;for(let o=i;o<a;o++)if(n.has(s(o)))return!1;return!0}class st{constructor(a){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,s,e;return((e=(s=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:s.now)==null?void 0:e.call(s))??Date.now()},this.observer=(()=>{let t=null;const s=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(e=>{e.forEach(n=>{const l=()=>{const i=n.target,o=this.indexFromElement(i);if(!i.isConnected){this.observer.unobserve(i);for(const[c,g]of this.elementsCache)if(g===i){this.elementsCache.delete(c);break}return}this.isIndexInRange(o)&&this.shouldMeasureDuringScroll(o)&&this.resizeItem(o,this.options.measureElement(i,n,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var e;(e=s())==null||e.disconnect(),t=null},observe:e=>{var n;return(n=s())==null?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return(n=s())==null?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=t=>{var s;const e={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:$,rangeExtractor:q,onChange:()=>{},measureElement:Y,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const h in t){const d=t[h];d!==void 0&&(e[h]=d)}const n=this.options;let l=null,i=null,o=!1;if(n!==void 0&&n.enabled&&e.enabled&&e.anchorTo==="end"&&this.scrollElement!==null){const h=n.count,d=e.count,u=this.getMeasurements(),S=((s=this._singleLaneMeasurements)==null?void 0:s.items)??u,p=E=>N(S[E]),v=h>0?p(0):null,b=h>0?p(h-1):null;if(d!==h||h>0&&d>0&&(e.getItemKey(0)!==v||e.getItemKey(d-1)!==b)){o=!0;const E=h>0?this.getVirtualItemForOffset(this.getScrollOffset())??u[0]:null;E&&(l=[E.key,this.getScrollOffset()-E.start]);const _=e.followOnAppend===!0?"auto":e.followOnAppend||null;_&&d>0&&this.isAtEnd(n.scrollEndThreshold)&&(h===0||e.getItemKey(d-1)!==b)&&(d>h||et(h,d,p,e.getItemKey))&&(i=_)}}this.options=e,o&&(this.pendingMin=0,this.itemSizeCacheVersion++);let c=!1,g=0;if(l&&this.scrollOffset!==null){const[h,d]=l,u=this.getMeasurements(),{count:S,getItemKey:p}=this.options;let v=0;for(;v<S&&p(v)!==h;)v++;if(v<S){const b=u[v];if(b){const f=Math.max(0,b.start+d);!i&&f!==this.scrollOffset&&(g=f-this.scrollOffset,this.scrollOffset=f,c=!0)}}}(c||i)&&(this.pendingScrollAnchor=[c?l[0]:null,c?l[1]:0,i,g])},this.notify=t=>{var s,e;(e=(s=this.options).onChange)==null||e.call(s,this,t)},this.maybeNotify=A(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t,s;const e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(l=>{this.observer.observe(l)}),this.unsubs.push(this.options.observeElementRect(this,l=>{this.scrollRect=l,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(l,i)=>{if(i&&this._intendedScrollOffset===null&&l===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(l-this._intendedScrollOffset)<1.5&&(l=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(l-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const o=this.getScrollOffset();this.scrollDirection=i?o===l?this.scrollDirection:o<l?"forward":"backward":null,this.scrollOffset=l,this.isScrolling=i,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const l=this.scrollElement,i=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},o=()=>{this._iosTouching=!1,!(!L()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};l.addEventListener("touchstart",i,j),l.addEventListener("touchend",o,j),this.unsubs.push(()=>{l.removeEventListener("touchstart",i),l.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const n=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,n&&this.scrollElement&&this.options.enabled){const[l,i,o,c]=n;l!==null&&!o&&(L()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):((s=this.scrollState)==null?void 0:s.behavior)==="smooth"&&!V(this.getScrollOffset()-c,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:s}=this._clampedAdjustment,e=this.getMaxScrollOffset();e>s+.5&&(this._clampedAdjustment=t>e+.5?{target:t,maxAtWrite:e}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),s=this.getMaxScrollOffset();if(t<0||t>s)return;if(this._iosDeferredAdjustment<0&&t>=s-1){this._iosDeferredAdjustment=0;return}const e=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=e,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=A(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,s,e,n,l,i,o,c)=>(this.prevLanes!==void 0&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:t,paddingStart:s,scrollMargin:e,getItemKey:n,enabled:l,lanes:i,laneAssignmentMode:o,gap:c}),{key:!1}),this.isIndexInRange=t=>t>=0&&t<this.options.count,this.getMeasurements=A(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:s,scrollMargin:e,getItemKey:n,enabled:l,lanes:i,laneAssignmentMode:o,gap:c},g)=>{var h;const d=this.itemSizeCache;if(!l)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const f of this.laneAssignments.keys())f>=t&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),i===1){const f=t*2;let m=(h=this._singleLaneMeasurements)==null?void 0:h.flat;if(!m||m.length<f){const O=new Float64Array(f);m&&u>0&&O.set(m.subarray(0,u*2)),m=O}const E=u===0?new Array(t):this._singleLaneMeasurements.items.slice();let _;if(u===0)_=s+e;else{const O=u-1;_=m[O*2]+m[O*2+1]+c}for(let O=u;O<t;O++){const M=n(O);E[O]=M;const T=d.get(M),w=typeof T=="number"?T:this.options.estimateSize(O);m[O*2]=_,m[O*2+1]=w,_+=w+c}this._singleLaneMeasurements={flat:m,items:E};const x=H(E,m);return this.measurementsCache=x,x}const S=this.measurementsCache.slice(0,u),p=new Array(i).fill(void 0),v=new Float64Array(i);let b=0;for(let f=0;f<u;f++){const m=S[f];m&&(p[m.lane]===void 0&&b++,p[m.lane]=f,v[m.lane]=m.end)}for(let f=u;f<t;f++){const m=n(f),E=this.laneAssignments.get(f);let _,x;const O=o==="estimate"||d.has(m);if(E!==void 0&&this.options.lanes>1){_=E;const C=p[_],I=C!==void 0?S[C]:void 0;x=I?I.end+c:s+e}else if(b===i){let C=0,I=v[0],W=p[0];for(let y=1;y<i;y++){const F=v[y];(F<I||F===I&&p[y]<W)&&(C=y,I=F,W=p[y])}_=C,x=I+c,O&&this.laneAssignments.set(f,_)}else _=f%this.options.lanes,x=s+e,O&&this.laneAssignments.set(f,_);const M=d.get(m),T=typeof M=="number"?M:this.options.estimateSize(f),w=x+T;S[f]={index:f,start:x,size:T,end:w,key:m,lane:_},p[_]===void 0&&b++,p[_]=f,v[_]=w}return this.measurementsCache=S,S},{key:!1,debug:()=>this.options.debug}),this.calculateRange=A(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,s,e,n)=>t.length===0||s===0?(this.range=null,null):(this.range=it(t,s,e,n,n===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=A(()=>{let t=null,s=null;const e=this.calculateRange();return e&&(t=e.startIndex,s=e.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,s]},(t,s,e,n,l)=>n===null||l===null?[]:t({startIndex:n,endIndex:l,overscan:s,count:e}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const s=this.options.indexAttribute,e=t.getAttribute(s);return e?parseInt(e,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var s;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const e=this.scrollState.index??((s=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:s.index);if(e!==void 0&&this.range){const n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),l=Math.max(0,e-n),i=Math.min(this.options.count-1,e+n);return t>=l&&t<=i}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((l,i)=>{l.isConnected||(this.observer.unobserve(l),this.elementsCache.delete(i))});return}const s=this.indexFromElement(t);if(!this.isIndexInRange(s))return;const e=this.options.getItemKey(s),n=this.elementsCache.get(e);n!==t&&(n&&this.observer.unobserve(n),this.observer.observe(t),this.elementsCache.set(e,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,s)=>{var e,n,l;if(!this.isIndexInRange(t))return;let i,o,c;const g=(e=this._singleLaneMeasurements)==null?void 0:e.flat;if(this.options.lanes===1&&g!=null)c=this.options.getItemKey(t),o=g[t*2],i=g[t*2+1];else{const u=this.measurementsCache[t];if(!u)return;c=u.key,o=u.start,i=u.size}const h=this.itemSizeCache.get(c)??i,d=s-h;if(d!==0){const u=this.options.anchorTo==="end"&&((n=this.scrollState)==null?void 0:n.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,S=u?this.getTotalSize():0,p=this.getScrollOffset()+this.scrollAdjustments,b=!this.itemSizeCache.has(c)?o<p:o+h<=p&&this.scrollDirection!=="backward",f=((l=this.scrollState)==null?void 0:l.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[t]??{index:t,key:c,start:o,size:i,end:o+i,lane:0},d,this):b);(this.pendingMin===null||t<this.pendingMin)&&(this.pendingMin=t),this.itemSizeCache.set(c,s),this.itemSizeCacheVersion++;let m=!1;u?m=this.applyScrollAdjustment(this.getTotalSize()-S):f&&(m=this.applyScrollAdjustment(d)),this.notify(m),this._retryClampedAdjustment()}},this.getVirtualItems=A(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,s)=>{const e=[];for(let n=0,l=t.length;n<l;n++){const i=t[n],o=s[i];e.push(o)}return e},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{var s;const e=this.getMeasurements();if(e.length===0)return;const n=(s=this._singleLaneMeasurements)==null?void 0:s.flat,l=this.options.lanes===1&&n!=null,i=P(0,e.length-1,l?o=>n[o*2]:o=>k(e[o]).start,t);return k(e[i])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,s,e=0)=>{if(!this.scrollElement)return 0;const n=this.getSize(),l=this.getScrollOffset();s==="auto"&&(s=t>=l+n?"end":"start"),s==="center"?t+=(e-n)/2:s==="end"&&(t-=n);const i=this.getMaxScrollOffset();return Math.max(Math.min(i,t),0)},this.getOffsetForIndex=(t,s="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const e=this.getSize(),n=this.getScrollOffset(),l=this.measurementsCache[t];if(!l)return;if(s==="auto")if(l.end>=n+e-this.options.scrollPaddingEnd)s="end";else if(l.start<=n+this.options.scrollPaddingStart)s="start";else return[n,s];if(s==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),s];const i=s==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,s,l.size),s]},this.scrollToOffset=(t,{align:s="start",behavior:e="auto"}={})=>{this._iosDeferredAdjustment=0;const n=this.getOffsetForAlignment(t,s),l=this.now();this.scrollState={index:null,align:s,behavior:e,startedAt:l,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:s="auto",behavior:e="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const n=this.getOffsetForIndex(t,s);if(!n)return;const[l,i]=n,o=this.now();this.scrollState={index:t,align:i,behavior:e,startedAt:o,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:s="auto"}={})=>{const e=this.getScrollOffset()+t,n=this.now();this.scrollState={index:null,align:"start",behavior:s,startedAt:n,lastTargetOffset:e,stableFrames:0},this._scrollToOffset(e,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t,s;const e=this.getMeasurements();let n;if(e.length===0)n=this.options.paddingStart;else if(this.options.lanes===1){const l=e.length-1,i=(t=this._singleLaneMeasurements)==null?void 0:t.flat;i!=null?n=i[l*2]+i[l*2+1]:n=((s=e[l])==null?void 0:s.end)??0}else{const l=Array(this.options.lanes).fill(null);let i=e.length-1;for(;i>=0&&l.some(o=>o===null);){const o=e[i];l[o.lane]===null&&(l[o.lane]=o.end),i--}n=Math.max(...l.filter(o=>o!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const s=this.getMeasurements();for(const e of s)e&&this.itemSizeCache.has(e.key)&&t.push({index:e.index,key:e.key,start:e.start,size:e.size,end:e.end,lane:e.lane});return t},this._scrollToOffset=(t,{adjustments:s,behavior:e})=>{this._intendedScrollOffset=t+(s??0),this.options.scrollToFn(t,{behavior:e,adjustments:s},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(a)}applyScrollAdjustment(a,t){if(a===0)return!1;if(L()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=a,!1;{const s=this.getScrollOffset()+this.scrollAdjustments+a,e=this.scrollElement,n=e!==null&&("scrollHeight"in e||"document"in e)?this.getMaxScrollOffset():null;return this._clampedAdjustment=n!==null&&s>n+.5?{target:s,maxAtWrite:n}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const s=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,e=s?s[0]:this.scrollState.lastTargetOffset,n=1,l=e!==this.scrollState.lastTargetOffset;if(!l&&V(e,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=n){this.getScrollOffset()!==e&&this._scrollToOffset(e,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,l){const i=this.getSize()||600,o=Math.abs(e-this.getScrollOffset()),c=this.scrollState.behavior==="smooth"&&o>i;this.scrollState.lastTargetOffset=e,c||(this.scrollState.behavior="auto"),this._scrollToOffset(e,{adjustments:void 0,behavior:c?"smooth":"auto"})}this.scheduleScrollReconcile()}}const P=(r,a,t,s)=>{for(;r<=a;){const e=(r+a)/2|0,n=t(e);if(n<s)r=e+1;else if(n>s)a=e-1;else return e}return r>0?r-1:0};function nt(r,a,t){let s=0;for(;s<=a;){const e=(s+a)/2|0,n=r[e*2];if(n<t)s=e+1;else if(n>t)a=e-1;else return e}return s>0?s-1:0}function it(r,a,t,s,e){const n=r.length-1;if(r.length<=s)return{startIndex:0,endIndex:n};if(s===1&&e!==null){const c=nt(e,n,t);let g=c;const h=t+a;for(;g<n&&e[g*2]+e[g*2+1]<h;)g++;return{startIndex:c,endIndex:g}}let i=P(0,n,c=>r[c].start,t),o=i;if(s===1)for(;o<n&&r[o].end<t+a;)o++;else if(s>1){const c=Array(s).fill(0);for(;o<n&&c.some(h=>h<t+a);){const h=r[o];c[h.lane]=h.end,o++}const g=Array(s).fill(t+a);for(;i>=0&&g.some(h=>h>=t);){const h=r[i];g[h.lane]=h.start,i--}i=Math.max(0,i-i%s),o=Math.min(n,o+(s-1-o%s))}return{startIndex:i,endIndex:o}}const D=typeof document<"u"?z.useLayoutEffect:z.useEffect;function lt({useFlushSync:r=!0,directDomUpdates:a=!1,directDomUpdatesMode:t="transform",...s}){const e=z.useReducer(h=>h+1,0)[1],n=z.useRef({enabled:a,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});n.current.enabled=a,n.current.mode=t;const l=z.useRef(!1),i=h=>{const d=n.current;if(!d.enabled||!d.container)return;const u=h.getTotalSize();if(u!==d.lastSize){d.lastSize=u;const S=h.options.horizontal?"width":"height";d.container.style[S]=`${u}px`}},o=h=>{const d=n.current;if(!d.enabled||!d.container)return;i(h);const u=!!h.options.horizontal,S=d.mode==="transform",p=u?"left":"top",v=h.options.scrollMargin,b=h.getVirtualItems();for(const f of b){const m=f.start-v,E=h.elementsCache.get(f.key);E&&d.lastPositions.get(E)!==m&&(d.lastPositions.set(E,m),S?E.style.transform=u?`translate3d(${m}px, 0, 0)`:`translate3d(0, ${m}px, 0)`:E.style[p]=`${m}px`)}},c={...s,onChange:(h,d)=>{var u;const S=n.current;let p=!0;if(S.enabled){o(h);const v=h.range,b=S.prevRange;p=!b||b.isScrolling!==h.isScrolling||b.startIndex!==(v==null?void 0:v.startIndex)||b.endIndex!==(v==null?void 0:v.endIndex),p&&(S.prevRange=v?{startIndex:v.startIndex,endIndex:v.endIndex,isScrolling:h.isScrolling}:null)}p&&(r&&d&&!l.current?B.flushSync(e):e()),(u=s.onChange)==null||u.call(s,h,d)}},[g]=z.useState(()=>{const h=new st(c),d=h.measureElement;return h.measureElement=u=>{l.current=!0;try{d(u)}finally{l.current=!1}},Object.assign(h,{containerRef:u=>{const S=n.current;if(S.container=u,S.lastSize=null,u&&S.enabled){const p=h.getTotalSize();S.lastSize=p;const v=h.options.horizontal?"width":"height";u.style[v]=`${p}px`}}})});return g.setOptions(c),D(()=>g._didMount(),[]),D(()=>(i(g),g._willUpdate())),D(()=>{o(g)}),g}function rt(r){return lt({observeElementRect:U,observeElementOffset:Q,scrollToFn:tt,...r})}export{rt as u};
@@ -1 +1 @@
1
- import{ge as ce,j as e,gf as me,gg as ue,gh as P,gi as xe,gj as F,cQ as he,cf as U,r as k,ak as L,gk as C,H as A,aV as V,X,gl as ge,gm as pe,g3 as Y,g4 as Q,B as E,f as J,g5 as W,a2 as fe,a3 as je,a4 as ve,gn as Z,go as Ne,a7 as w,gp as ee,gq as be,gr as se,a0 as ye,bd as we,fN as Se,gs as ke,fH as Ce,fI as Ee,gt as $e,gu as Pe,T as Te,G as z,ew as Re,gv as B,gw as Ae,gx as _e,_ as I,$ as De,gy as Ie,gz as Le,gA as ze,gB as Oe,gC as Me,gD as Fe,gE as Be,gF as H,dX as He,gG as qe,gH as q}from"./index-CjUfPyOM.js";import{gI as bs,gJ as ys,gK as ws,gL as Ss,gM as ks,fL as Cs}from"./index-CjUfPyOM.js";import{u as Ge}from"./use-deep-link-scroll-D867V6rs.js";import{M as te}from"./more-details-DHCpYDi7.js";import{C as Ke}from"./card-DI7YtQh3.js";import{u as Ue,a as Ve}from"./use-panel-tab-placements-BcKEux1G.js";import{C as ne,a as ae,b as re,c as ie,d as T,e as R}from"./command-DpK0GpDM.js";import{F as oe}from"./file-text-DTvj1wzM.js";const Xe=["server_crashed","server_out_of_memory","server_unresponsive","isolation_unavailable","server_start_failed","server_start_timeout"],Ye={server_crashed:s=>`${s} stopped unexpectedly 3 times. Reload it to try again.`,server_out_of_memory:s=>`${s} ran out of memory and stopped. Reload it to try again.`,server_unresponsive:s=>`${s} stopped responding, so DorkOS stopped it.`,isolation_unavailable:s=>`${s} can’t run with its limits on this computer.`,server_start_failed:s=>`${s} couldn’t start. Reload it to try again.`,server_start_timeout:s=>`${s} took too long to start. Reload it to try again.`};function O(s){return Xe.includes(s)}function Qe(s,r){return O(s)?Ye[s](r):null}function Je(s){return`Restarting ${s}…`}function We({extensionId:s}){const r=ce("right-panel").filter(i=>i.extensionId===s);return r.length===0?null:e.jsx("div",{className:"space-y-3 pt-1","data-testid":`panel-tab-placement-${s}`,children:r.map(i=>e.jsx(es,{tab:i,labelled:r.length>1},i.id))})}function Ze(){var i;const s=(i=he().data)==null?void 0:i.agents,r=U().data;return k.useMemo(()=>{const l=new Map((s??[]).map(n=>[n.id,L(n)])),o=new Map((r??[]).map(n=>[n.id,C(n)]));return{agents:s??[],rooms:r??[],agentNames:l,roomNames:o}},[s,r])}function es({tab:s,labelled:r}){const i=me(Ue(),s.id),{setPlacement:l}=Ve(),o=Ze(),n=ue(i,s.declaredPlacement),x=n.show.pages.includes(P),d=a=>l(s.id,{show:a.show,hide:a.hide}),u=a=>a.kind==="agents"?o.agentNames.get(a.id)??"An agent that is gone":a.kind==="rooms"?o.roomNames.get(a.id)??"A channel that is gone":ge(a.id),m=(a,h)=>["agents","rooms","pages"].flatMap(v=>a[v].filter(c=>h||c!==P).map(c=>({kind:v,id:c}))),t=(a,h)=>({...a,[h.kind]:a[h.kind].filter(v=>v!==h.id)}),f=m(n.show,!1),N=m(n.hide,!0);return e.jsxs("div",{className:"space-y-2","data-testid":`panel-tab-placement-${s.id}`,children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm",children:r?`${s.title} tab shows`:"Panel tab shows"}),e.jsxs(xe,{value:x?"everywhere":"only",onValueChange:a=>d({hide:n.hide,show:a==="everywhere"?{...n.show,pages:[P]}:{...n.show,pages:n.show.pages.filter(h=>h!==P)}}),"aria-label":`Where the ${s.title} tab shows`,children:[e.jsx(F,{value:"everywhere",children:"Everywhere"}),e.jsx(F,{value:"only",children:"Only in…"})]}),i&&e.jsx("button",{type:"button",onClick:()=>l(s.id,null),className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm text-xs underline underline-offset-2",children:s.declaredPlacement?"Use its default":"Reset"})]}),!x&&e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[f.map(a=>e.jsx(G,{place:a,name:u(a),removeLabel:`Remove ${u(a)}`,onRemove:()=>d({...n,show:t(n.show,a)})},`${a.kind}:${a.id}`)),e.jsx(ts,{tabTitle:s.title,names:o,taken:n.show,onAdd:a=>d({show:{...n.show,[a.kind]:[...n.show[a.kind],a.id]},hide:t(n.hide,a)})}),f.length===0&&e.jsx("span",{className:"text-muted-foreground text-xs",children:"Shows nowhere yet. Add a place."})]}),N.length>0&&e.jsxs("div",{role:"group","aria-labelledby":`${s.id}-hidden-in`,className:"flex flex-wrap items-center gap-1.5",children:[e.jsx("span",{id:`${s.id}-hidden-in`,className:"text-muted-foreground text-xs",children:"Hidden in"}),N.map(a=>e.jsx(G,{place:a,name:u(a),removeLabel:`Show in ${u(a)} again`,onRemove:()=>d({...n,hide:t(n.hide,a)})},`${a.kind}:${a.id}`))]})]})}const ss={agents:V,rooms:A,pages:oe};function G({place:s,name:r,removeLabel:i,onRemove:l}){const o=ss[s.kind];return e.jsxs("span",{className:"bg-muted inline-flex h-6 items-center gap-1 rounded-md pr-0.5 pl-1.5 text-xs",children:[e.jsx(o,{className:"text-muted-foreground size-3","aria-hidden":!0}),e.jsx("span",{className:"max-w-40 truncate",children:r}),e.jsx("button",{type:"button",onClick:l,"aria-label":i,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm p-0.5",children:e.jsx(X,{className:"size-3"})})]})}function ts({tabTitle:s,names:r,taken:i,onAdd:l}){const[o,n]=k.useState(!1),x=t=>{l(t),n(!1)},d=pe.filter(t=>!i.pages.includes(t.key)),u=r.agents.filter(t=>!i.agents.includes(t.id)),m=r.rooms.filter(t=>!i.rooms.includes(t.id));return e.jsxs(Y,{open:o,onOpenChange:n,children:[e.jsx(Q,{asChild:!0,children:e.jsxs(E,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-xs","aria-label":`Add a place for the ${s} tab`,children:[e.jsx(J,{className:"size-3"}),"Add"]})}),e.jsx(W,{align:"start",className:"w-64 p-0",children:e.jsxs(ne,{children:[e.jsx(ae,{placeholder:"Find an agent, channel or page"}),e.jsxs(re,{className:"max-h-64",children:[e.jsx(ie,{children:"Nothing matches."}),u.length>0&&e.jsx(T,{heading:"Agents",children:u.map(t=>e.jsxs(R,{value:`agent ${L(t)} ${t.id}`,onSelect:()=>x({kind:"agents",id:t.id}),children:[e.jsx(V,{className:"size-3.5"}),L(t)]},t.id))}),m.length>0&&e.jsx(T,{heading:"Channels and DMs",children:m.map(t=>e.jsxs(R,{value:`room ${C(t)} ${t.id}`,onSelect:()=>x({kind:"rooms",id:t.id}),children:[e.jsx(A,{className:"size-3.5"}),C(t)]},t.id))}),d.length>0&&e.jsx(T,{heading:"Pages",children:d.map(t=>e.jsxs(R,{value:`page ${t.label}`,onSelect:()=>x({kind:"pages",id:t.key}),children:[e.jsx(oe,{className:"size-3.5"}),t.label]},t.key))})]})]})})]})}const de=s=>[...Ne.detail(s),"room-access"];function ns(s){return fe({queryKey:de(s),queryFn:async()=>{const r=await fetch(Z(`/extensions/${s}/room-access`));if(!r.ok)throw new Error(`Couldn’t load the rooms. The server answered ${r.status}.`);return(await r.json()).roomIds}})}function as(s){const r=je();return ve({mutationFn:async i=>{const l=await fetch(Z(`/extensions/${s}/room-access`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({roomIds:i})});if(!l.ok){const o=await l.json().catch(()=>({}));throw new Error(o.message??o.error??"Couldn’t save the rooms. Try again.")}return(await l.json()).roomIds},onSuccess:i=>{r.setQueryData(de(s),i)}})}function rs({extensionId:s,name:r}){const i=ns(s).data??[],{mutate:l}=as(s),o=U().data,n=k.useMemo(()=>(o??[]).filter(m=>!m.bridge),[o]),x=k.useMemo(()=>new Map((o??[]).map(m=>[m.id,C(m)])),[o]),d=m=>l(m,{onError:t=>w.error(t.message)}),u=m=>x.get(m)??"A room that is gone";return e.jsxs("div",{className:"space-y-1.5 pt-1","data-testid":`room-access-${s}`,children:[e.jsx("p",{className:"text-sm",children:"Rooms it can use"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[i.map(m=>e.jsxs("span",{className:"bg-muted inline-flex h-6 items-center gap-1 rounded-md pr-0.5 pl-1.5 text-xs",children:[e.jsx(A,{className:"text-muted-foreground size-3","aria-hidden":!0}),e.jsx("span",{className:"max-w-40 truncate",children:u(m)}),e.jsx("button",{type:"button",onClick:()=>d(i.filter(t=>t!==m)),"aria-label":`Remove ${u(m)}`,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm p-0.5",children:e.jsx(X,{className:"size-3"})})]},m)),e.jsx(is,{name:r,rooms:n.filter(m=>!i.includes(m.id)),onAdd:m=>d([...i,m])})]}),e.jsx("p",{className:"text-muted-foreground text-xs",children:i.length===0?"None yet. It can’t read or reply anywhere.":"It reads and replies as you, only here."})]})}function is({name:s,rooms:r,onAdd:i}){const[l,o]=k.useState(!1);return e.jsxs(Y,{open:l,onOpenChange:o,children:[e.jsx(Q,{asChild:!0,children:e.jsxs(E,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-xs","aria-label":`Add a room for ${s}`,children:[e.jsx(J,{className:"size-3"}),"Add"]})}),e.jsx(W,{align:"start",className:"w-64 p-0",children:e.jsxs(ne,{children:[e.jsx(ae,{placeholder:"Find a channel or DM"}),e.jsxs(re,{className:"max-h-64",children:[e.jsx(ie,{children:"Nothing matches."}),r.length>0&&e.jsx(T,{heading:"Channels and DMs",children:r.map(n=>e.jsxs(R,{value:`room ${C(n)} ${n.id}`,onSelect:()=>{i(n.id),o(!1)},children:[e.jsx(A,{className:"size-3.5"}),C(n)]},n.id))})]})]})})]})}const os=new Set(["disabled","discovered","incompatible","invalid"]),ds="/marketplace?view=installed";function ls({extension:s,onToggle:r,isToggling:i,onSetRunApproval:l,isSettingApproval:o,onReload:n,isReloading:x}){var M;const{manifest:d,status:u,scope:m,error:t,serverError:f,origin:N,approvedToRun:a}=s,[h,v]=k.useState(!1),c=!os.has(u),g=u==="incompatible",b=u==="invalid",p=u==="compile_error"||u==="activate_error",S=!g&&!b,j=!(N==="core"&&d.canDisable===!1),$=s.hasServerEntry||s.hasDataProxy,y=ee(s),le=be(s.id,se(y)),_=p?"Not working":g?"Incompatible":b?"Can’t load":null;return e.jsx(Ke,{"data-slot":"extension-card","data-testid":`extension-card-${s.id}`,"data-section":s.id,radius:"lg",gap:"none",className:z(p&&"border-amber-500/50",(g||b)&&"opacity-70"),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p&&e.jsx(ye,{className:"text-status-warning-dot size-4 shrink-0","aria-hidden":"true"}),(g||b)&&!p&&e.jsx(we,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),!p&&!g&&!b&&e.jsx(Se,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"font-medium",children:d.name}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:["v",d.version]}),s.devLink&&e.jsx(ke,{})]}),s.devLink&&e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1","data-testid":`extension-dev-link-${s.id}`,children:[e.jsx(Ce,{path:s.devLink.path,className:"min-w-0"}),e.jsx("button",{type:"button",onClick:()=>void Ee(ds),className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm text-xs underline underline-offset-2",children:"Unlink or switch"})]}),d.description&&e.jsx("p",{className:"text-muted-foreground text-sm",children:d.description}),e.jsx($e,{gifts:Pe(s),"data-testid":`extension-agent-gifts-${s.id}`}),c&&e.jsx(We,{extensionId:s.id}),((M=d.capabilities)==null?void 0:M.rooms)===!0&&e.jsx(rs,{extensionId:s.id,name:d.name}),g&&d.minHostVersion&&e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Needs DorkOS ",d.minHostVersion," or newer"]}),p&&t&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-status-warning-fg text-sm",children:[u==="compile_error"?"Couldn’t build: ":"Couldn’t start: ",t.message]}),t.details&&e.jsxs("button",{type:"button",onClick:()=>v(D=>!D),className:"text-muted-foreground hover:text-foreground flex items-center gap-1 text-xs transition-colors","aria-expanded":h,children:[e.jsx(Te,{className:z("size-3 transition-transform",h&&"rotate-180")}),h?"Hide details":"Show details"]}),h&&t.details&&e.jsx("pre",{className:"bg-muted mt-1 max-h-32 overflow-auto rounded-md p-2 text-xs",children:t.details})]}),f&&O(f.code)&&e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1","data-testid":`extension-server-status-${s.id}`,children:[e.jsx("p",{className:"text-status-warning-fg text-sm",children:f.message||Qe(f.code,d.name)}),e.jsx("button",{type:"button",onClick:n,disabled:x,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm text-xs underline underline-offset-2 disabled:opacity-50",children:"Reload"})]}),s.restartingAt&&!f&&e.jsx("p",{className:"text-muted-foreground text-sm",role:"status",children:Je(d.name)}),f&&!O(f.code)&&e.jsxs("p",{className:"text-status-warning-fg text-sm",children:["Couldn’t rebuild its server part: ",f.message,". The last version still runs."]}),N==="user"&&(a?e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs","data-testid":`extension-run-allowed-${s.id}`,children:[e.jsx(Re,{className:"size-3.5 shrink-0","aria-hidden":"true"}),e.jsx("span",{children:"You allowed this to run."}),s.originProblem==="changed"&&e.jsx("span",{children:"You approved its changed files. Any further change asks again."}),e.jsx("button",{type:"button",onClick:()=>l(s.id,!1),disabled:o,className:"hover:text-foreground underline underline-offset-2 disabled:opacity-50",children:"Stop it"}),e.jsx(B,{permissions:y,className:"basis-full","data-testid":`extension-permissions-${s.id}`})]}):e.jsxs("div",{className:"space-y-2 rounded-lg border border-amber-500/40 bg-amber-500/5 p-3","data-testid":`extension-needs-approval-${s.id}`,children:[e.jsx("p",{className:"text-sm font-medium",children:"This extension is waiting for you"}),s.originProblem&&e.jsx("p",{className:"text-status-warning-fg text-sm","data-testid":`extension-origin-problem-${s.id}`,children:s.originProblem==="changed"?"Its files changed after install, so DorkOS can’t vouch for it. Look it over first.":s.originProblem==="dev-link"?"It runs from your folder, so DorkOS can’t vouch for its source.":"Its plugin links to files elsewhere, so DorkOS can’t vouch for its source."}),e.jsx(B,{permissions:y,added:le,"data-testid":`extension-permissions-${s.id}`}),e.jsx("p",{className:"text-muted-foreground text-sm",children:Ae($,(y==null?void 0:y.runtime)==="subprocess")}),e.jsx("p",{className:"text-muted-foreground text-sm",children:_e}),e.jsx(E,{size:"sm",onClick:()=>l(s.id,!0),disabled:o,"data-testid":`extension-approve-run-${s.id}`,children:"Turn it on"})]})),e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs",children:[e.jsx(I,{variant:"outline",children:m}),_&&e.jsx(I,{variant:_==="Not working"?"destructive":"secondary","data-testid":`extension-health-${s.id}`,children:_}),d.author&&e.jsx("span",{children:d.author})]})]}),e.jsx("div",{className:"flex shrink-0 items-center pt-0.5",children:j?e.jsx(De,{checked:c,onCheckedChange:D=>r(s.id,D),disabled:!S||i,"aria-label":`${c?"Disable":"Enable"} ${d.name}`}):e.jsx(I,{variant:"secondary",title:"This extension is always on","data-testid":`extension-required-${s.id}`,children:"Required"})})]})})}function K(s){const r=new Date(s);return Number.isNaN(r.getTime())?"":r.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function cs(){const{data:s=[]}=Ie(),{stop:r,pendingSource:i}=Le();return s.length===0?null:e.jsxs("section",{className:"space-y-3","data-testid":"trusted-sources-section",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Trusted sources"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Extensions from these sources turn on without asking."}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Stop trusting one, and extensions already on keep running."}),e.jsx(te,{className:"text-muted-foreground text-sm",label:"If you stop trusting one",openLabel:"If you stop trusting one",children:e.jsx("p",{children:"Newer versions and new extensions from it wait for your yes."})})]}),e.jsx("ul",{className:"divide-y rounded-xl border",children:s.map(({source:l,trustedAt:o})=>e.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1.5 px-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate font-mono text-sm",children:l}),K(o)&&e.jsxs("p",{className:"text-muted-foreground text-xs",children:["Trusted ",K(o)]})]}),e.jsx(E,{type:"button",variant:"outline",size:"sm",disabled:i===l,onClick:()=>r(l),children:"Stop trusting"})]},l))})]})}function js(){const{data:s=[],isLoading:r}=ze(),{section:i}=Oe();Ge(r?null:i);const l=Me(),o=Fe(),n=Be(),x=H(!0),d=H(!1),u=new Set([...l.variables?[l.variables]:[],...o.variables?[o.variables]:[]]),m=new Set([...x.isPending&&x.variables?[x.variables.id]:[],...d.isPending&&d.variables?[d.variables.id]:[]]);function t(c,g){const b=g?x:d,p=s.find(j=>j.id===c);if(!p)return;const S=g?se(ee(p)):void 0;b.mutate({id:c,version:p.manifest.version,plugin:p.sourcePlugin??null,...S?{permissions:S}:{}},{onSuccess:j=>{g&&q.getState().forget(c);const $=j.extension.manifest.name,y=j.extension.isolation?"":" inside DorkOS";w.success(g?`${$} can now run${y}`:`${$} stopped running`)},onError:j=>{if(j instanceof qe&&j.stale){S&&q.getState().remember(c,S),w.error(`${p.manifest.name} changed since you saw it. Check it again.`);return}w.error(g?"Couldn’t let it run.":"Couldn’t stop it running.",{description:j.message})}})}async function f(c,g){(g?l:o).mutate(c,{onError:p=>{w.error(g?"Couldn’t turn that on.":"Couldn’t turn that off.",{description:p.message})}})}function N(){n.mutate(void 0,{onSuccess:c=>{w.success(`Reloaded ${c.length} extension${c.length===1?"":"s"}`)},onError:c=>{w.error("Couldn’t reload your extensions.",{description:c.message})}})}if(r)return e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm",children:"Loading extensions…"});const a=s.filter(c=>c.origin==="core"),h=s.filter(c=>c.origin==="user"),v=c=>e.jsx(ls,{extension:c,onToggle:f,isToggling:u.has(c.id),onSetRunApproval:t,isSettingApproval:m.has(c.id),onReload:N,isReloading:n.isPending},c.id);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"text-muted-foreground space-y-1 text-sm",children:[e.jsx("p",{children:"Extensions add new screens and tools to DorkOS."}),e.jsxs(te,{children:[e.jsx("p",{children:"Core extensions come with DorkOS."}),e.jsxs("p",{children:["Installed ones live in"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:"~/.dork/extensions/"})," or your project’s"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:".dork/extensions/"}),"."]})]})]}),s.length===0?e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"no-extensions",children:e.jsx("p",{children:"No extensions installed."})}):e.jsxs(e.Fragment,{children:[a.length>0&&e.jsxs("section",{className:"space-y-3","data-testid":"core-extensions-section",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Core extensions"}),e.jsx("div",{className:"space-y-3",children:a.map(v)})]}),e.jsxs("section",{className:"space-y-3","data-testid":"installed-extensions-section",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Installed extensions"}),h.length>0?e.jsx("div",{className:"space-y-3",children:h.map(v)}):e.jsxs("div",{className:"text-muted-foreground rounded-xl border border-dashed p-4 text-sm","data-testid":"no-installed-extensions",children:["No extensions installed yet. Browse"," ",e.jsx("span",{className:"text-foreground font-medium",children:"Marketplace"})," to add some."]})]})]}),e.jsx(cs,{}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(E,{variant:"outline",size:"sm",onClick:N,disabled:n.isPending,"data-testid":"reload-extensions-button",children:[e.jsx(He,{className:z("mr-2 size-4",n.isPending&&"animate-spin")}),"Reload extensions"]})})]})}export{bs as ExtensionEventBridge,ys as ExtensionLoader,ws as ExtensionProvider,js as ExtensionsSettingsTab,Ss as createExtensionAPI,ks as createExtensionEventBridge,Cs as useExtensions};
1
+ import{ge as ce,j as e,gf as me,gg as ue,gh as P,gi as xe,gj as F,cQ as he,cf as U,r as k,ak as L,gk as C,H as A,aV as V,X,gl as ge,gm as pe,g3 as Y,g4 as Q,B as E,f as J,g5 as W,a2 as fe,a3 as je,a4 as ve,gn as Z,go as Ne,a7 as w,gp as ee,gq as be,gr as se,a0 as ye,bd as we,fN as Se,gs as ke,fH as Ce,fI as Ee,gt as $e,gu as Pe,T as Te,G as z,ew as Re,gv as B,gw as Ae,gx as _e,_ as I,$ as De,gy as Ie,gz as Le,gA as ze,gB as Oe,gC as Me,gD as Fe,gE as Be,gF as H,dX as He,gG as qe,gH as q}from"./index-DSYz85aL.js";import{gI as bs,gJ as ys,gK as ws,gL as Ss,gM as ks,fL as Cs}from"./index-DSYz85aL.js";import{u as Ge}from"./use-deep-link-scroll-DZnA4iYZ.js";import{M as te}from"./more-details-BJ_2FYn8.js";import{C as Ke}from"./card-Dsy8PPN6.js";import{u as Ue,a as Ve}from"./use-panel-tab-placements-DLQeHI7w.js";import{C as ne,a as ae,b as re,c as ie,d as T,e as R}from"./command-CxjTPW0z.js";import{F as oe}from"./file-text-DGtefNvG.js";const Xe=["server_crashed","server_out_of_memory","server_unresponsive","isolation_unavailable","server_start_failed","server_start_timeout"],Ye={server_crashed:s=>`${s} stopped unexpectedly 3 times. Reload it to try again.`,server_out_of_memory:s=>`${s} ran out of memory and stopped. Reload it to try again.`,server_unresponsive:s=>`${s} stopped responding, so DorkOS stopped it.`,isolation_unavailable:s=>`${s} can’t run with its limits on this computer.`,server_start_failed:s=>`${s} couldn’t start. Reload it to try again.`,server_start_timeout:s=>`${s} took too long to start. Reload it to try again.`};function O(s){return Xe.includes(s)}function Qe(s,r){return O(s)?Ye[s](r):null}function Je(s){return`Restarting ${s}…`}function We({extensionId:s}){const r=ce("right-panel").filter(i=>i.extensionId===s);return r.length===0?null:e.jsx("div",{className:"space-y-3 pt-1","data-testid":`panel-tab-placement-${s}`,children:r.map(i=>e.jsx(es,{tab:i,labelled:r.length>1},i.id))})}function Ze(){var i;const s=(i=he().data)==null?void 0:i.agents,r=U().data;return k.useMemo(()=>{const l=new Map((s??[]).map(n=>[n.id,L(n)])),o=new Map((r??[]).map(n=>[n.id,C(n)]));return{agents:s??[],rooms:r??[],agentNames:l,roomNames:o}},[s,r])}function es({tab:s,labelled:r}){const i=me(Ue(),s.id),{setPlacement:l}=Ve(),o=Ze(),n=ue(i,s.declaredPlacement),x=n.show.pages.includes(P),d=a=>l(s.id,{show:a.show,hide:a.hide}),u=a=>a.kind==="agents"?o.agentNames.get(a.id)??"An agent that is gone":a.kind==="rooms"?o.roomNames.get(a.id)??"A channel that is gone":ge(a.id),m=(a,h)=>["agents","rooms","pages"].flatMap(v=>a[v].filter(c=>h||c!==P).map(c=>({kind:v,id:c}))),t=(a,h)=>({...a,[h.kind]:a[h.kind].filter(v=>v!==h.id)}),f=m(n.show,!1),N=m(n.hide,!0);return e.jsxs("div",{className:"space-y-2","data-testid":`panel-tab-placement-${s.id}`,children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm",children:r?`${s.title} tab shows`:"Panel tab shows"}),e.jsxs(xe,{value:x?"everywhere":"only",onValueChange:a=>d({hide:n.hide,show:a==="everywhere"?{...n.show,pages:[P]}:{...n.show,pages:n.show.pages.filter(h=>h!==P)}}),"aria-label":`Where the ${s.title} tab shows`,children:[e.jsx(F,{value:"everywhere",children:"Everywhere"}),e.jsx(F,{value:"only",children:"Only in…"})]}),i&&e.jsx("button",{type:"button",onClick:()=>l(s.id,null),className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm text-xs underline underline-offset-2",children:s.declaredPlacement?"Use its default":"Reset"})]}),!x&&e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[f.map(a=>e.jsx(G,{place:a,name:u(a),removeLabel:`Remove ${u(a)}`,onRemove:()=>d({...n,show:t(n.show,a)})},`${a.kind}:${a.id}`)),e.jsx(ts,{tabTitle:s.title,names:o,taken:n.show,onAdd:a=>d({show:{...n.show,[a.kind]:[...n.show[a.kind],a.id]},hide:t(n.hide,a)})}),f.length===0&&e.jsx("span",{className:"text-muted-foreground text-xs",children:"Shows nowhere yet. Add a place."})]}),N.length>0&&e.jsxs("div",{role:"group","aria-labelledby":`${s.id}-hidden-in`,className:"flex flex-wrap items-center gap-1.5",children:[e.jsx("span",{id:`${s.id}-hidden-in`,className:"text-muted-foreground text-xs",children:"Hidden in"}),N.map(a=>e.jsx(G,{place:a,name:u(a),removeLabel:`Show in ${u(a)} again`,onRemove:()=>d({...n,hide:t(n.hide,a)})},`${a.kind}:${a.id}`))]})]})}const ss={agents:V,rooms:A,pages:oe};function G({place:s,name:r,removeLabel:i,onRemove:l}){const o=ss[s.kind];return e.jsxs("span",{className:"bg-muted inline-flex h-6 items-center gap-1 rounded-md pr-0.5 pl-1.5 text-xs",children:[e.jsx(o,{className:"text-muted-foreground size-3","aria-hidden":!0}),e.jsx("span",{className:"max-w-40 truncate",children:r}),e.jsx("button",{type:"button",onClick:l,"aria-label":i,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm p-0.5",children:e.jsx(X,{className:"size-3"})})]})}function ts({tabTitle:s,names:r,taken:i,onAdd:l}){const[o,n]=k.useState(!1),x=t=>{l(t),n(!1)},d=pe.filter(t=>!i.pages.includes(t.key)),u=r.agents.filter(t=>!i.agents.includes(t.id)),m=r.rooms.filter(t=>!i.rooms.includes(t.id));return e.jsxs(Y,{open:o,onOpenChange:n,children:[e.jsx(Q,{asChild:!0,children:e.jsxs(E,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-xs","aria-label":`Add a place for the ${s} tab`,children:[e.jsx(J,{className:"size-3"}),"Add"]})}),e.jsx(W,{align:"start",className:"w-64 p-0",children:e.jsxs(ne,{children:[e.jsx(ae,{placeholder:"Find an agent, channel or page"}),e.jsxs(re,{className:"max-h-64",children:[e.jsx(ie,{children:"Nothing matches."}),u.length>0&&e.jsx(T,{heading:"Agents",children:u.map(t=>e.jsxs(R,{value:`agent ${L(t)} ${t.id}`,onSelect:()=>x({kind:"agents",id:t.id}),children:[e.jsx(V,{className:"size-3.5"}),L(t)]},t.id))}),m.length>0&&e.jsx(T,{heading:"Channels and DMs",children:m.map(t=>e.jsxs(R,{value:`room ${C(t)} ${t.id}`,onSelect:()=>x({kind:"rooms",id:t.id}),children:[e.jsx(A,{className:"size-3.5"}),C(t)]},t.id))}),d.length>0&&e.jsx(T,{heading:"Pages",children:d.map(t=>e.jsxs(R,{value:`page ${t.label}`,onSelect:()=>x({kind:"pages",id:t.key}),children:[e.jsx(oe,{className:"size-3.5"}),t.label]},t.key))})]})]})})]})}const de=s=>[...Ne.detail(s),"room-access"];function ns(s){return fe({queryKey:de(s),queryFn:async()=>{const r=await fetch(Z(`/extensions/${s}/room-access`));if(!r.ok)throw new Error(`Couldn’t load the rooms. The server answered ${r.status}.`);return(await r.json()).roomIds}})}function as(s){const r=je();return ve({mutationFn:async i=>{const l=await fetch(Z(`/extensions/${s}/room-access`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({roomIds:i})});if(!l.ok){const o=await l.json().catch(()=>({}));throw new Error(o.message??o.error??"Couldn’t save the rooms. Try again.")}return(await l.json()).roomIds},onSuccess:i=>{r.setQueryData(de(s),i)}})}function rs({extensionId:s,name:r}){const i=ns(s).data??[],{mutate:l}=as(s),o=U().data,n=k.useMemo(()=>(o??[]).filter(m=>!m.bridge),[o]),x=k.useMemo(()=>new Map((o??[]).map(m=>[m.id,C(m)])),[o]),d=m=>l(m,{onError:t=>w.error(t.message)}),u=m=>x.get(m)??"A room that is gone";return e.jsxs("div",{className:"space-y-1.5 pt-1","data-testid":`room-access-${s}`,children:[e.jsx("p",{className:"text-sm",children:"Rooms it can use"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[i.map(m=>e.jsxs("span",{className:"bg-muted inline-flex h-6 items-center gap-1 rounded-md pr-0.5 pl-1.5 text-xs",children:[e.jsx(A,{className:"text-muted-foreground size-3","aria-hidden":!0}),e.jsx("span",{className:"max-w-40 truncate",children:u(m)}),e.jsx("button",{type:"button",onClick:()=>d(i.filter(t=>t!==m)),"aria-label":`Remove ${u(m)}`,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm p-0.5",children:e.jsx(X,{className:"size-3"})})]},m)),e.jsx(is,{name:r,rooms:n.filter(m=>!i.includes(m.id)),onAdd:m=>d([...i,m])})]}),e.jsx("p",{className:"text-muted-foreground text-xs",children:i.length===0?"None yet. It can’t read or reply anywhere.":"It reads and replies as you, only here."})]})}function is({name:s,rooms:r,onAdd:i}){const[l,o]=k.useState(!1);return e.jsxs(Y,{open:l,onOpenChange:o,children:[e.jsx(Q,{asChild:!0,children:e.jsxs(E,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-xs","aria-label":`Add a room for ${s}`,children:[e.jsx(J,{className:"size-3"}),"Add"]})}),e.jsx(W,{align:"start",className:"w-64 p-0",children:e.jsxs(ne,{children:[e.jsx(ae,{placeholder:"Find a channel or DM"}),e.jsxs(re,{className:"max-h-64",children:[e.jsx(ie,{children:"Nothing matches."}),r.length>0&&e.jsx(T,{heading:"Channels and DMs",children:r.map(n=>e.jsxs(R,{value:`room ${C(n)} ${n.id}`,onSelect:()=>{i(n.id),o(!1)},children:[e.jsx(A,{className:"size-3.5"}),C(n)]},n.id))})]})]})})]})}const os=new Set(["disabled","discovered","incompatible","invalid"]),ds="/marketplace?view=installed";function ls({extension:s,onToggle:r,isToggling:i,onSetRunApproval:l,isSettingApproval:o,onReload:n,isReloading:x}){var M;const{manifest:d,status:u,scope:m,error:t,serverError:f,origin:N,approvedToRun:a}=s,[h,v]=k.useState(!1),c=!os.has(u),g=u==="incompatible",b=u==="invalid",p=u==="compile_error"||u==="activate_error",S=!g&&!b,j=!(N==="core"&&d.canDisable===!1),$=s.hasServerEntry||s.hasDataProxy,y=ee(s),le=be(s.id,se(y)),_=p?"Not working":g?"Incompatible":b?"Can’t load":null;return e.jsx(Ke,{"data-slot":"extension-card","data-testid":`extension-card-${s.id}`,"data-section":s.id,radius:"lg",gap:"none",className:z(p&&"border-amber-500/50",(g||b)&&"opacity-70"),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p&&e.jsx(ye,{className:"text-status-warning-dot size-4 shrink-0","aria-hidden":"true"}),(g||b)&&!p&&e.jsx(we,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),!p&&!g&&!b&&e.jsx(Se,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"font-medium",children:d.name}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:["v",d.version]}),s.devLink&&e.jsx(ke,{})]}),s.devLink&&e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1","data-testid":`extension-dev-link-${s.id}`,children:[e.jsx(Ce,{path:s.devLink.path,className:"min-w-0"}),e.jsx("button",{type:"button",onClick:()=>void Ee(ds),className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm text-xs underline underline-offset-2",children:"Unlink or switch"})]}),d.description&&e.jsx("p",{className:"text-muted-foreground text-sm",children:d.description}),e.jsx($e,{gifts:Pe(s),"data-testid":`extension-agent-gifts-${s.id}`}),c&&e.jsx(We,{extensionId:s.id}),((M=d.capabilities)==null?void 0:M.rooms)===!0&&e.jsx(rs,{extensionId:s.id,name:d.name}),g&&d.minHostVersion&&e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Needs DorkOS ",d.minHostVersion," or newer"]}),p&&t&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-status-warning-fg text-sm",children:[u==="compile_error"?"Couldn’t build: ":"Couldn’t start: ",t.message]}),t.details&&e.jsxs("button",{type:"button",onClick:()=>v(D=>!D),className:"text-muted-foreground hover:text-foreground flex items-center gap-1 text-xs transition-colors","aria-expanded":h,children:[e.jsx(Te,{className:z("size-3 transition-transform",h&&"rotate-180")}),h?"Hide details":"Show details"]}),h&&t.details&&e.jsx("pre",{className:"bg-muted mt-1 max-h-32 overflow-auto rounded-md p-2 text-xs",children:t.details})]}),f&&O(f.code)&&e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1","data-testid":`extension-server-status-${s.id}`,children:[e.jsx("p",{className:"text-status-warning-fg text-sm",children:f.message||Qe(f.code,d.name)}),e.jsx("button",{type:"button",onClick:n,disabled:x,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm text-xs underline underline-offset-2 disabled:opacity-50",children:"Reload"})]}),s.restartingAt&&!f&&e.jsx("p",{className:"text-muted-foreground text-sm",role:"status",children:Je(d.name)}),f&&!O(f.code)&&e.jsxs("p",{className:"text-status-warning-fg text-sm",children:["Couldn’t rebuild its server part: ",f.message,". The last version still runs."]}),N==="user"&&(a?e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs","data-testid":`extension-run-allowed-${s.id}`,children:[e.jsx(Re,{className:"size-3.5 shrink-0","aria-hidden":"true"}),e.jsx("span",{children:"You allowed this to run."}),s.originProblem==="changed"&&e.jsx("span",{children:"You approved its changed files. Any further change asks again."}),e.jsx("button",{type:"button",onClick:()=>l(s.id,!1),disabled:o,className:"hover:text-foreground underline underline-offset-2 disabled:opacity-50",children:"Stop it"}),e.jsx(B,{permissions:y,className:"basis-full","data-testid":`extension-permissions-${s.id}`})]}):e.jsxs("div",{className:"space-y-2 rounded-lg border border-amber-500/40 bg-amber-500/5 p-3","data-testid":`extension-needs-approval-${s.id}`,children:[e.jsx("p",{className:"text-sm font-medium",children:"This extension is waiting for you"}),s.originProblem&&e.jsx("p",{className:"text-status-warning-fg text-sm","data-testid":`extension-origin-problem-${s.id}`,children:s.originProblem==="changed"?"Its files changed after install, so DorkOS can’t vouch for it. Look it over first.":s.originProblem==="dev-link"?"It runs from your folder, so DorkOS can’t vouch for its source.":"Its plugin links to files elsewhere, so DorkOS can’t vouch for its source."}),e.jsx(B,{permissions:y,added:le,"data-testid":`extension-permissions-${s.id}`}),e.jsx("p",{className:"text-muted-foreground text-sm",children:Ae($,(y==null?void 0:y.runtime)==="subprocess")}),e.jsx("p",{className:"text-muted-foreground text-sm",children:_e}),e.jsx(E,{size:"sm",onClick:()=>l(s.id,!0),disabled:o,"data-testid":`extension-approve-run-${s.id}`,children:"Turn it on"})]})),e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs",children:[e.jsx(I,{variant:"outline",children:m}),_&&e.jsx(I,{variant:_==="Not working"?"destructive":"secondary","data-testid":`extension-health-${s.id}`,children:_}),d.author&&e.jsx("span",{children:d.author})]})]}),e.jsx("div",{className:"flex shrink-0 items-center pt-0.5",children:j?e.jsx(De,{checked:c,onCheckedChange:D=>r(s.id,D),disabled:!S||i,"aria-label":`${c?"Disable":"Enable"} ${d.name}`}):e.jsx(I,{variant:"secondary",title:"This extension is always on","data-testid":`extension-required-${s.id}`,children:"Required"})})]})})}function K(s){const r=new Date(s);return Number.isNaN(r.getTime())?"":r.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function cs(){const{data:s=[]}=Ie(),{stop:r,pendingSource:i}=Le();return s.length===0?null:e.jsxs("section",{className:"space-y-3","data-testid":"trusted-sources-section",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Trusted sources"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Extensions from these sources turn on without asking."}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Stop trusting one, and extensions already on keep running."}),e.jsx(te,{className:"text-muted-foreground text-sm",label:"If you stop trusting one",openLabel:"If you stop trusting one",children:e.jsx("p",{children:"Newer versions and new extensions from it wait for your yes."})})]}),e.jsx("ul",{className:"divide-y rounded-xl border",children:s.map(({source:l,trustedAt:o})=>e.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1.5 px-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate font-mono text-sm",children:l}),K(o)&&e.jsxs("p",{className:"text-muted-foreground text-xs",children:["Trusted ",K(o)]})]}),e.jsx(E,{type:"button",variant:"outline",size:"sm",disabled:i===l,onClick:()=>r(l),children:"Stop trusting"})]},l))})]})}function js(){const{data:s=[],isLoading:r}=ze(),{section:i}=Oe();Ge(r?null:i);const l=Me(),o=Fe(),n=Be(),x=H(!0),d=H(!1),u=new Set([...l.variables?[l.variables]:[],...o.variables?[o.variables]:[]]),m=new Set([...x.isPending&&x.variables?[x.variables.id]:[],...d.isPending&&d.variables?[d.variables.id]:[]]);function t(c,g){const b=g?x:d,p=s.find(j=>j.id===c);if(!p)return;const S=g?se(ee(p)):void 0;b.mutate({id:c,version:p.manifest.version,plugin:p.sourcePlugin??null,...S?{permissions:S}:{}},{onSuccess:j=>{g&&q.getState().forget(c);const $=j.extension.manifest.name,y=j.extension.isolation?"":" inside DorkOS";w.success(g?`${$} can now run${y}`:`${$} stopped running`)},onError:j=>{if(j instanceof qe&&j.stale){S&&q.getState().remember(c,S),w.error(`${p.manifest.name} changed since you saw it. Check it again.`);return}w.error(g?"Couldn’t let it run.":"Couldn’t stop it running.",{description:j.message})}})}async function f(c,g){(g?l:o).mutate(c,{onError:p=>{w.error(g?"Couldn’t turn that on.":"Couldn’t turn that off.",{description:p.message})}})}function N(){n.mutate(void 0,{onSuccess:c=>{w.success(`Reloaded ${c.length} extension${c.length===1?"":"s"}`)},onError:c=>{w.error("Couldn’t reload your extensions.",{description:c.message})}})}if(r)return e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm",children:"Loading extensions…"});const a=s.filter(c=>c.origin==="core"),h=s.filter(c=>c.origin==="user"),v=c=>e.jsx(ls,{extension:c,onToggle:f,isToggling:u.has(c.id),onSetRunApproval:t,isSettingApproval:m.has(c.id),onReload:N,isReloading:n.isPending},c.id);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"text-muted-foreground space-y-1 text-sm",children:[e.jsx("p",{children:"Extensions add new screens and tools to DorkOS."}),e.jsxs(te,{children:[e.jsx("p",{children:"Core extensions come with DorkOS."}),e.jsxs("p",{children:["Installed ones live in"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:"~/.dork/extensions/"})," or your project’s"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:".dork/extensions/"}),"."]})]})]}),s.length===0?e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"no-extensions",children:e.jsx("p",{children:"No extensions installed."})}):e.jsxs(e.Fragment,{children:[a.length>0&&e.jsxs("section",{className:"space-y-3","data-testid":"core-extensions-section",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Core extensions"}),e.jsx("div",{className:"space-y-3",children:a.map(v)})]}),e.jsxs("section",{className:"space-y-3","data-testid":"installed-extensions-section",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Installed extensions"}),h.length>0?e.jsx("div",{className:"space-y-3",children:h.map(v)}):e.jsxs("div",{className:"text-muted-foreground rounded-xl border border-dashed p-4 text-sm","data-testid":"no-installed-extensions",children:["No extensions installed yet. Browse"," ",e.jsx("span",{className:"text-foreground font-medium",children:"Marketplace"})," to add some."]})]})]}),e.jsx(cs,{}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(E,{variant:"outline",size:"sm",onClick:N,disabled:n.isPending,"data-testid":"reload-extensions-button",children:[e.jsx(He,{className:z("mr-2 size-4",n.isPending&&"animate-spin")}),"Reload extensions"]})})]})}export{bs as ExtensionEventBridge,ys as ExtensionLoader,ws as ExtensionProvider,js as ExtensionsSettingsTab,Ss as createExtensionAPI,ks as createExtensionEventBridge,Cs as useExtensions};