limixbot 0.3.101 → 0.3.103

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 (203) hide show
  1. package/dist/assets/{ActivityPanel-DZZgXWgd.js → ActivityPanel-DdSZ8OXc.js} +1 -1
  2. package/dist/assets/{App-D24ELMyP.js → App-ftB4PetT.js} +123 -122
  3. package/dist/assets/{AppEventEditor-BFkEZazQ.js → AppEventEditor-B7KR7gbZ.js} +1 -1
  4. package/dist/assets/{BotSettingsDialog-BNDFheN0.js → BotSettingsDialog-BntQ38tC.js} +4 -4
  5. package/dist/assets/{BrowserPanel-BVvlCdxG.js → BrowserPanel-B8zEv2yz.js} +1 -1
  6. package/dist/assets/{BrowserProfilesManager-CQVN08cF.js → BrowserProfilesManager-eHlKAUFP.js} +1 -1
  7. package/dist/assets/{CloudAddDialog-BqehN1pz.js → CloudAddDialog-u5oxANAD.js} +1 -1
  8. package/dist/assets/{ComputerFilesPane-C8Xj3lsj.js → ComputerFilesPane-CyG5dv52.js} +1 -1
  9. package/dist/assets/{ComputerPanel-BfyIIg7u.js → ComputerPanel-BUjqykLD.js} +2 -2
  10. package/dist/assets/{DataPanel-CkOWtMCr.js → DataPanel-DWJbbJNX.js} +1 -1
  11. package/dist/assets/{DesktopViewer-PXMs_Z3h.js → DesktopViewer-CfXOdLV9.js} +1 -1
  12. package/dist/assets/{GrokMoveDialog-B3PuFwiJ.js → GrokMoveDialog-Cj5HG8AL.js} +1 -1
  13. package/dist/assets/{InspectorPanel-BCiZLdqU.js → InspectorPanel-CaOmVE1M.js} +1 -1
  14. package/dist/assets/{KeyboardShortcutsModal-ffycwWVV.js → KeyboardShortcutsModal-kspIwkDg.js} +1 -1
  15. package/dist/assets/{LimixResizeHandles-CtazDkY7.js → LimixResizeHandles-SzYhwKNE.js} +1 -1
  16. package/dist/assets/{LiveDesktop-CJWerWq1.js → LiveDesktop-D3CJ56hW.js} +1 -1
  17. package/dist/assets/{LocalVmWorkspace-CrdC3MmK.js → LocalVmWorkspace-DEAykEFC.js} +1 -1
  18. package/dist/assets/{MacLocalControl-Bcdg_u2n.js → MacLocalControl-C1f-JAvN.js} +1 -1
  19. package/dist/assets/{MarkdownFilePreview-C-XNLE3e.js → MarkdownFilePreview-BkZMg8ux.js} +1 -1
  20. package/dist/assets/{MenuMotion-BclWiAVe.js → MenuMotion-y3_mgPH0.js} +1 -1
  21. package/dist/assets/{NewBotDialog-CI3c7n9d.js → NewBotDialog-DUlssZFn.js} +1 -1
  22. package/dist/assets/{PhoneAppDialog-CR-LtOHi.js → PhoneAppDialog-jl-A35lD.js} +1 -1
  23. package/dist/assets/{PlacesRail-DyYA64do.js → PlacesRail-Be4MJsKP.js} +1 -1
  24. package/dist/assets/{PluginsPanel-79V2kP_5.js → PluginsPanel-9DDdusDH.js} +1 -1
  25. package/dist/assets/{ProIntroduction-BgEaTCd1.js → ProIntroduction-DRl6O52f.js} +1 -1
  26. package/dist/assets/{RemoteAgentSettingsPanel-CpJDLN6F.js → RemoteAgentSettingsPanel-DNUP5pZq.js} +1 -1
  27. package/dist/assets/{RoomPanel-ByAT8CqS.js → RoomPanel-DAvyN5bX.js} +1 -1
  28. package/dist/assets/{RoutinesPage-CA1__NjC.js → RoutinesPage-ByrijqT9.js} +2 -2
  29. package/dist/assets/{SettingsModal-DAymc03s.js → SettingsModal-DhldX0LY.js} +1 -1
  30. package/dist/assets/{ShareTeamDialog-Dr7BcuEX.js → ShareTeamDialog-hRc_SYb6.js} +1 -1
  31. package/dist/assets/{SignedInSites-C-DP_jaP.js → SignedInSites-BxJ2YKXx.js} +1 -1
  32. package/dist/assets/TeamLibraryPanel-CC_SkTIo.js +3 -0
  33. package/dist/assets/{TeamMapPage-DZlNjWAA.js → TeamMapPage-DAfSlcPu.js} +1 -1
  34. package/dist/assets/{TriggersPage-CF1DnXkj.js → TriggersPage-Bipd1gYY.js} +1 -1
  35. package/dist/assets/{VisibilitySection-DnGXDssr.js → VisibilitySection-DbJ_5rwD.js} +1 -1
  36. package/dist/assets/{WebhookTrigger-CyF3M1mk.js → WebhookTrigger-aLhrK-YU.js} +1 -1
  37. package/dist/assets/{WorksOnGrid-D195VW8K.js → WorksOnGrid-u1rPeHHO.js} +1 -1
  38. package/dist/assets/{abnfDiagram-YUKMZFIV-CKc5IYc4.js → abnfDiagram-YUKMZFIV-ChcWlNpY.js} +1 -1
  39. package/dist/assets/{activity-CwaOixB9.js → activity-SfzB9gft.js} +1 -1
  40. package/dist/assets/{architectureDiagram-47P4ROYG-BzQ3blap.js → architectureDiagram-47P4ROYG-DVoUFfCS.js} +1 -1
  41. package/dist/assets/{blockDiagram-E7TT5TSB-Cg5etqDi.js → blockDiagram-E7TT5TSB-DqPV7RMZ.js} +1 -1
  42. package/dist/assets/{c4Diagram-CRA5TL53-ChJTr_PL.js → c4Diagram-CRA5TL53-BGmVwlFz.js} +1 -1
  43. package/dist/assets/{calendar-days-DYBafFRo.js → calendar-days-D3-4I6P4.js} +1 -1
  44. package/dist/assets/channel-BeYKH3lV.js +1 -0
  45. package/dist/assets/{chunk-2Q5K7J3B-DwRap1YG.js → chunk-2Q5K7J3B-B1ypkJ8E.js} +1 -1
  46. package/dist/assets/{chunk-5VM5RSS4-BO6BTUz7.js → chunk-5VM5RSS4-CcV9LLDc.js} +1 -1
  47. package/dist/assets/{chunk-7TKQ45FW-B2VKEfok.js → chunk-7TKQ45FW-BIxUGZLZ.js} +1 -1
  48. package/dist/assets/{chunk-AW2ZBBNX-C7vsX4VD.js → chunk-AW2ZBBNX-BeDhUW76.js} +1 -1
  49. package/dist/assets/{chunk-FVRAUYC3-CIjSXjvq.js → chunk-FVRAUYC3-ChrQXxWu.js} +2 -2
  50. package/dist/assets/{chunk-HTAEGDNF-CCWLt9W1.js → chunk-HTAEGDNF-CoqYrJ09.js} +1 -1
  51. package/dist/assets/{chunk-JWPE2WC7-CYUijN37.js → chunk-JWPE2WC7-x_G8N4UY.js} +1 -1
  52. package/dist/assets/{chunk-KQW6MTUR-D0cFTyVc.js → chunk-KQW6MTUR-BNgvE0Zx.js} +1 -1
  53. package/dist/assets/{chunk-XXDRQBXY-CE20wx8I.js → chunk-XXDRQBXY-B6XLUBJo.js} +1 -1
  54. package/dist/assets/{classDiagram-v2-K4WV4PDN-QBcA1FUG.js → classDiagram-v2-K4WV4PDN-DBiYaY2I.js} +1 -1
  55. package/dist/assets/{coins-CQDndxZe.js → coins-DkeI1D3d.js} +1 -1
  56. package/dist/assets/{core-D0gGNfT3.js → core-Bc6arvu2.js} +1 -1
  57. package/dist/assets/{cose-bilkent-JH36ORCC-CPygoF45.js → cose-bilkent-JH36ORCC-DcXcgm4G.js} +1 -1
  58. package/dist/assets/{cynefin-EF2NZ3EQ-DjRSXXUK.js → cynefin-EF2NZ3EQ-D4661Ow3.js} +1 -1
  59. package/dist/assets/{cynefinDiagram-3GCD6N5R-C4D5WdA1.js → cynefinDiagram-3GCD6N5R-D9JCrRjr.js} +1 -1
  60. package/dist/assets/{dagre-W4DXFKR2-CwHowYoX.js → dagre-W4DXFKR2-D7uDOym_.js} +1 -1
  61. package/dist/assets/de-CrO5MppH.js +8 -0
  62. package/dist/assets/{diagram-2UJZ2QOL-IOgxIe2m.js → diagram-2UJZ2QOL-C1DYfm72.js} +1 -1
  63. package/dist/assets/{diagram-OVF4WLC6-6M2t3aC-.js → diagram-OVF4WLC6-C-nti_Wz.js} +1 -1
  64. package/dist/assets/{diagram-PFPMY2P6-C3MDtWX5.js → diagram-PFPMY2P6-B9JKIvnW.js} +1 -1
  65. package/dist/assets/{diagram-UMYRVEAY-CpXR83ix.js → diagram-UMYRVEAY-B3XBHAVr.js} +1 -1
  66. package/dist/assets/{diagram-YEKJPTXX-DF58kzII.js → diagram-YEKJPTXX-R_DeJtDT.js} +1 -1
  67. package/dist/assets/{diagram-ZIFT7M5P-BTWYDC1S.js → diagram-ZIFT7M5P-ClA3xuGy.js} +1 -1
  68. package/dist/assets/{ebnfDiagram-VR2GEFS7-DWMxXTtf.js → ebnfDiagram-VR2GEFS7-D3DyL10J.js} +1 -1
  69. package/dist/assets/{elk-IJKZMXRS-ZDF01LK0.js → elk-IJKZMXRS-NoFnL8PW.js} +1 -1
  70. package/dist/assets/{erDiagram-O2IAPWRE-DKeRGnUv.js → erDiagram-O2IAPWRE-BPyOLz1a.js} +1 -1
  71. package/dist/assets/es-bnXYOspp.js +6 -0
  72. package/dist/assets/{file-up-Cr20e4wl.js → file-up-BV8p1OPd.js} +1 -1
  73. package/dist/assets/{flowDiagram-OXPTDLAJ-BTJVRu9A.js → flowDiagram-OXPTDLAJ-CdHiMknj.js} +1 -1
  74. package/dist/assets/fr-Drpg1nRS.js +8 -0
  75. package/dist/assets/{ganttDiagram-R7TSEDQI-BrBIiPkW.js → ganttDiagram-R7TSEDQI-B3qyDG4d.js} +1 -1
  76. package/dist/assets/{gitGraphDiagram-XJZIOB7I-xBYIjsc8.js → gitGraphDiagram-XJZIOB7I-CN5_yp8t.js} +1 -1
  77. package/dist/assets/hi-hKAbiCLa.js +1 -0
  78. package/dist/assets/{import-name-CdyBVR45.js → import-name-baZlXmGk.js} +1 -1
  79. package/dist/assets/{index-DwYETevf.js → index-BZfn5_k5.js} +3 -3
  80. package/dist/assets/{index-ShhUWigV.js → index-CyrxXrGh.js} +1 -1
  81. package/dist/assets/{infoDiagram-5W2HQ5XZ-B-FCUMEX.js → infoDiagram-5W2HQ5XZ-C1awaPUj.js} +1 -1
  82. package/dist/assets/{ishikawaDiagram-K3B6WC7H-DxhcI9nM.js → ishikawaDiagram-K3B6WC7H-DcG1GTWM.js} +1 -1
  83. package/dist/assets/it-D6cE_lzY.js +13 -0
  84. package/dist/assets/ja-5lJcngPy.js +13 -0
  85. package/dist/assets/{journeyDiagram-COXZFDF6-DSwqQn-4.js → journeyDiagram-COXZFDF6-B-T-4Ss2.js} +1 -1
  86. package/dist/assets/{kanban-definition-P3RFRI5V-Bidc1dLu.js → kanban-definition-P3RFRI5V-DhgMKb1S.js} +1 -1
  87. package/dist/assets/ko-IP18hNxI.js +13 -0
  88. package/dist/assets/{mcp-servers-scq4KvN-.js → mcp-servers-BFkC95ER.js} +1 -1
  89. package/dist/assets/{mermaid.core-1-GuV68k.js → mermaid.core-C0Ni5l0v.js} +4 -4
  90. package/dist/assets/{mindmap-definition-LZFPQGKD-BtlXbTTm.js → mindmap-definition-LZFPQGKD-CljImffi.js} +1 -1
  91. package/dist/assets/{minimize-CoPseS7J.js → minimize-CkQHJV84.js} +1 -1
  92. package/dist/assets/{monitor-B9eyPPw6.js → monitor-D_UAFHyW.js} +1 -1
  93. package/dist/assets/new-bot-peJFipB7.js +2 -0
  94. package/dist/assets/{org-library-CyWov7QW.js → org-library-Br6VR8QD.js} +1 -1
  95. package/dist/assets/{package-format-Dx-xCjWb.js → package-format-CPaz8LNO.js} +1 -1
  96. package/dist/assets/{pegDiagram-BGZESJAR-uFZWnUng.js → pegDiagram-BGZESJAR-CgnU1Ac1.js} +1 -1
  97. package/dist/assets/{pieDiagram-CAPJLFHJ-B2Itft-D.js → pieDiagram-CAPJLFHJ-BJmtZCJF.js} +1 -1
  98. package/dist/assets/pl-s3VOXZNa.js +13 -0
  99. package/dist/assets/pt-br-WeqOetEr.js +13 -0
  100. package/dist/assets/{quadrantDiagram-GDMTTRAM-Btivs4tR.js → quadrantDiagram-GDMTTRAM-Dqg3HXnH.js} +1 -1
  101. package/dist/assets/{rail-ar9TQRSE.js → rail-Bi4B37ED.js} +1 -1
  102. package/dist/assets/{railroadDiagram-SM67HX2B-92CU8YQH.js → railroadDiagram-SM67HX2B-Dh4hx5Fo.js} +1 -1
  103. package/dist/assets/{remote-desktop-panel-BrVUx9qj.js → remote-desktop-panel-DRsUOxPA.js} +1 -1
  104. package/dist/assets/{requirementDiagram-X7JNWC4A-5izSc7xN.js → requirementDiagram-X7JNWC4A-DoDrImJb.js} +1 -1
  105. package/dist/assets/ru-xPDlIHlb.js +13 -0
  106. package/dist/assets/{sankeyDiagram-UM26HJRW-DPnrZSB2.js → sankeyDiagram-UM26HJRW-4kxKCZbK.js} +1 -1
  107. package/dist/assets/{sequenceDiagram-ZO4K6R2Y-Bda0M6Hv.js → sequenceDiagram-ZO4K6R2Y-Dfn3sj5H.js} +1 -1
  108. package/dist/assets/{sizeCapture-INFHLROL-DKRN8tPD.js → sizeCapture-INFHLROL-e4etpscL.js} +1 -1
  109. package/dist/assets/{stateDiagram-v2-TBUQTH76-D6MqFrrx.js → stateDiagram-v2-TBUQTH76-CiH2EjAT.js} +1 -1
  110. package/dist/assets/{styles-DOwrpvZY.js → styles-BC55IU1j.js} +2 -2
  111. package/dist/assets/{swimlanes-N4OXWK64-D_pFpyCW.js → swimlanes-N4OXWK64-elz4HcrR.js} +1 -1
  112. package/dist/assets/swimlanesDiagram-K3J5GTZL-C2oR937G.js +8 -0
  113. package/dist/assets/{team-share-CS8lXIGF.js → team-share-CVGnlnZg.js} +1 -1
  114. package/dist/assets/{timeline-definition-YOQAKGHF-CsXwhMm7.js → timeline-definition-YOQAKGHF-CBvNtqBT.js} +1 -1
  115. package/dist/assets/tr-D52N3H-s.js +6 -0
  116. package/dist/assets/uk-BgibvZRE.js +1 -0
  117. package/dist/assets/{usecaseDiagram-VIAY4XPW-XU2vytSZ.js → usecaseDiagram-VIAY4XPW-Cqnlu-5K.js} +1 -1
  118. package/dist/assets/{vennDiagram-BLWOH2XV-beqZKO-E.js → vennDiagram-BLWOH2XV-B1DVqqPC.js} +1 -1
  119. package/dist/assets/vi-Dtr5uxBT.js +15 -0
  120. package/dist/assets/{wardleyDiagram-YMQ3BMBF-Ci5sPNvX.js → wardleyDiagram-YMQ3BMBF-CQPngjvL.js} +1 -1
  121. package/dist/assets/{xychartDiagram-TAQBALBS-BCJ2N2BY.js → xychartDiagram-TAQBALBS-Djna4qxy.js} +1 -1
  122. package/dist/assets/zh-Cr6ncAKb.js +13 -0
  123. package/dist/assets/zh-tw-BhYWJRt3.js +13 -0
  124. package/dist/index.html +2 -2
  125. package/dist/rail.html +4 -4
  126. package/dist-server/index.js +90 -82
  127. package/dist-server/package.json +1 -1
  128. package/dist-server/server/bot-channels/engine.js +51 -22
  129. package/dist-server/server/industry-care.js +4 -3
  130. package/dist-server/server/industry-teams.js +3 -3
  131. package/dist-server/server/limix-skill-store.js +7 -1
  132. package/dist-server/server/package-import.js +1 -1
  133. package/dist-server/server/routes/bots-create.js +12 -1
  134. package/dist-server/shared/industry-templates.js +4 -0
  135. package/dist-server/shared/ready-bots.js +15 -0
  136. package/package.json +1 -1
  137. package/skills/industry-auto-repair/SKILL.md +32 -0
  138. package/skills/industry-auto-repair/assets/hybrid-policy.json +10 -0
  139. package/skills/industry-auto-repair/manifest.json +18 -0
  140. package/skills/industry-auto-repair/references/vi.md +17 -0
  141. package/skills/industry-beauty-spa/SKILL.md +32 -0
  142. package/skills/industry-beauty-spa/assets/hybrid-policy.json +10 -0
  143. package/skills/industry-beauty-spa/manifest.json +18 -0
  144. package/skills/industry-beauty-spa/references/vi.md +17 -0
  145. package/skills/industry-education/SKILL.md +32 -0
  146. package/skills/industry-education/assets/hybrid-policy.json +10 -0
  147. package/skills/industry-education/manifest.json +18 -0
  148. package/skills/industry-education/references/vi.md +17 -0
  149. package/skills/industry-food-beverage/SKILL.md +32 -0
  150. package/skills/industry-food-beverage/assets/hybrid-policy.json +10 -0
  151. package/skills/industry-food-beverage/manifest.json +18 -0
  152. package/skills/industry-food-beverage/references/vi.md +17 -0
  153. package/skills/industry-home-services/SKILL.md +32 -0
  154. package/skills/industry-home-services/assets/hybrid-policy.json +10 -0
  155. package/skills/industry-home-services/manifest.json +18 -0
  156. package/skills/industry-home-services/references/vi.md +17 -0
  157. package/skills/industry-hospitality-travel/SKILL.md +32 -0
  158. package/skills/industry-hospitality-travel/assets/hybrid-policy.json +10 -0
  159. package/skills/industry-hospitality-travel/manifest.json +18 -0
  160. package/skills/industry-hospitality-travel/references/vi.md +17 -0
  161. package/skills/industry-logistics/SKILL.md +32 -0
  162. package/skills/industry-logistics/assets/hybrid-policy.json +10 -0
  163. package/skills/industry-logistics/manifest.json +18 -0
  164. package/skills/industry-logistics/references/vi.md +17 -0
  165. package/skills/industry-real-estate/SKILL.md +32 -0
  166. package/skills/industry-real-estate/assets/hybrid-policy.json +10 -0
  167. package/skills/industry-real-estate/manifest.json +18 -0
  168. package/skills/industry-real-estate/references/vi.md +17 -0
  169. package/skills/industry-retail-ecommerce/SKILL.md +32 -0
  170. package/skills/industry-retail-ecommerce/assets/hybrid-policy.json +10 -0
  171. package/skills/industry-retail-ecommerce/manifest.json +18 -0
  172. package/skills/industry-retail-ecommerce/references/vi.md +17 -0
  173. package/skills/industry-wholesale-distribution/SKILL.md +32 -0
  174. package/skills/industry-wholesale-distribution/assets/hybrid-policy.json +10 -0
  175. package/skills/industry-wholesale-distribution/manifest.json +18 -0
  176. package/skills/industry-wholesale-distribution/references/vi.md +17 -0
  177. package/skills/video-workflow/SKILL.md +26 -0
  178. package/skills/video-workflow/assets/hybrid-policy.json +10 -0
  179. package/skills/video-workflow/assets/starter/build.svrun +5 -0
  180. package/skills/video-workflow/assets/starter/main.svml +24 -0
  181. package/skills/video-workflow/assets/starter/package.json +1 -0
  182. package/skills/video-workflow/assets/starter/style.svs +4 -0
  183. package/skills/video-workflow/manifest.json +19 -0
  184. package/skills/video-workflow/references/vi.md +13 -0
  185. package/dist/assets/TeamLibraryPanel-CI8JZtpN.js +0 -3
  186. package/dist/assets/channel-DI8VRWh8.js +0 -1
  187. package/dist/assets/de-XojPh3_p.js +0 -8
  188. package/dist/assets/es-C0MD2HR1.js +0 -6
  189. package/dist/assets/fr-hktiWwtw.js +0 -8
  190. package/dist/assets/hi-D_Yu59YK.js +0 -1
  191. package/dist/assets/it-zbTil6cI.js +0 -13
  192. package/dist/assets/ja-CtqaLHju.js +0 -13
  193. package/dist/assets/ko-DrT-vz1y.js +0 -13
  194. package/dist/assets/new-bot-CNLntcgn.js +0 -2
  195. package/dist/assets/pl-BaR1MZm6.js +0 -13
  196. package/dist/assets/pt-br-mFy7aZD6.js +0 -13
  197. package/dist/assets/ru-BJ0ARJtn.js +0 -13
  198. package/dist/assets/swimlanesDiagram-K3J5GTZL-D6oFbwqj.js +0 -8
  199. package/dist/assets/tr-DnXBUn9-.js +0 -6
  200. package/dist/assets/uk-RZHdJ2pL.js +0 -1
  201. package/dist/assets/vi-Bx9YsUag.js +0 -15
  202. package/dist/assets/zh-DMiI3Rx1.js +0 -13
  203. package/dist/assets/zh-tw-DoGBLWPr.js +0 -13
@@ -1,4 +1,4 @@
1
- import{c as dn,t as n,r as d,j as e,X as es,ae as ts,a as G,d as We,l as Bt,S as ws,i as Jt}from"./styles-DOwrpvZY.js";import{S as un,j as w,u as Xe,ez as Ns,eA as As,eB as Cs,eC as ht,w as Ss,eD as Rs,eE as Es,l as zs,G as Sn,eF as Is,eG as Ts,cQ as Os,T as Bs,ah as Xt,bt as Ps,D as en,eH as Rt,eI as ns,eJ as Et,eK as ss,an as as,eL as zt,eM as Ms,eN as is,eO as It,eP as os,eQ as Ls,eR as Rn,eS as Us,Y as cs,eT as Nt,eU as $s,eV as Fs,eW as Ks,eX as Ds,eY as Qs,eZ as ct,e_ as En,e$ as Hs,f0 as zn,ed as In,f1 as _s,f2 as Js,f3 as Vs,f4 as Vt,f5 as Gs,f6 as qs,f7 as Zs,f8 as Ws,f9 as Ys,fa as Xs,fb as ea,fc as ta,fd as na,fe as sa,ff as aa}from"./App-D24ELMyP.js";import{L as ae,P as rs,X as ia,a as oa,v as pn,E as ca,_ as ra,$ as la,B as da}from"./PlacesRail-DyYA64do.js";import{u as Gt}from"./mcp-servers-scq4KvN-.js";import{C as ls,R as tn}from"./MenuMotion-BclWiAVe.js";import{u as ua}from"./ProIntroduction-BgEaTCd1.js";import"./index-DwYETevf.js";import"./monitor-B9eyPPw6.js";const pa=[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],ma=dn("phone-call",pa);const ha=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],fa=dn("radio-tower",ha);const xa=[["path",{d:"m10.852 14.772-.383.923",key:"11vil6"}],["path",{d:"M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1v3clb"}],["path",{d:"m13.148 9.228.383-.923",key:"t2zzyc"}],["path",{d:"m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1bxfiv"}],["path",{d:"m14.772 10.852.923-.383",key:"k9m8cz"}],["path",{d:"m14.772 13.148.923.383",key:"1xvhww"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"m9.228 10.852-.923-.383",key:"1wtb30"}],["path",{d:"m9.228 13.148-.923.383",key:"1a830x"}]],qt=dn("server-cog",xa),ga=new Set(["twitter","x"]);function Tn(t,s){return t!=="managed"||!ga.has(s.trim().toLowerCase())?null:"Twitter/X needs your own X Developer app and Composio auth config. Use self-hosted connected apps for now."}const ba=5,ya=3,Tt=4;function ka(t,s=ba,c=[]){const o=new Map;for(const g of t)for(const k of new Set(g.categories??[]))o.set(k,(o.get(k)??0)+1);const r=[...o].sort((g,k)=>k[1]-g[1]||g[0].localeCompare(k[0])).map(([g])=>g),l=c.filter(g=>r.indexOf(g)>=s),y=[...r.slice(0,Math.max(0,s-l.length)),...l];return{inline:y,more:r.filter(g=>!y.includes(g))}}function nn(t,s){return s===null||(t.categories??[]).includes(s)}function ja(t,s,c){const o=[],r=t.filter(l=>s(l.slug));r.length&&o.push({kind:"connected",cards:r});for(const l of c.slice(0,ya)){const y=t.filter(g=>!s(g.slug)&&nn(g,l));y.length&&o.push({kind:"category",category:l,cards:y.slice(0,Tt),more:y.length>Tt})}return o.push({kind:"all",cards:t.filter(l=>!s(l.slug))}),o}const va={productivity:"productivity","developer tools":"developerTools",communication:"communication",files:"files","sales and crm":"salesCrm",design:"design",marketing:"marketing",analytics:"analytics",social:"social"},wa={"google calendar":"googleCalendar","google sheets":"googleSheets","google docs":"googleDocs",notion:"notion",github:"github",linear:"linear",sentry:"sentry",jira:"jira",slack:"slack",gmail:"gmail",discord:"discord","google drive":"googleDrive",posthog:"posthog","x (twitter)":"xTwitter",reddit:"reddit",zapier:"zapier",hubspot:"hubspot",salesforce:"salesforce",asana:"asana",trello:"trello",dropbox:"dropbox",airtable:"airtable",figma:"figma",stripe:"stripe"};function rt(t){const s=va[t.trim().toLowerCase()];return s?n(`apps.category.${s}`):t}function On(t){const s=wa[t.label.trim().toLowerCase()];return s?n(`apps.catalog.${s}.blurb`):t.blurb}function Na({server:t,disabled:s,onSaved:c}){const[o,r]=d.useState(!1),[l,y]=d.useState(null);if(typeof t.apps!="boolean"||t.apps&&t.hasApps!==!0)return null;const g=t.apps,k=async()=>{r(!0),y(null);try{const p=await w(`/api/mcp/servers/${encodeURIComponent(t.name)}`,{method:"PATCH",body:JSON.stringify({apps:!g})});c(p.servers??[])}catch(p){y(p instanceof Error?p.message:String(p))}finally{r(!1)}};return e.jsxs("div",{"data-mcp-apps":t.name,className:"mt-3 flex items-center gap-3 border-t border-hairline/40 pt-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-[13px] font-medium text-ink",children:n("mcp.apps.title")}),e.jsx("div",{role:l?"alert":void 0,className:l?"mt-0.5 text-[12px] text-danger":"mt-0.5 text-[12px] text-ink-secondary",children:l??n("mcp.apps.desc")})]}),o&&e.jsx(ae,{"aria-hidden":"true",size:13,className:"animate-spin text-ink-secondary"}),e.jsx(un,{checked:g,disabled:s||o,onClick:()=>{k()},"aria-label":n("mcp.apps.toggleAria",{name:t.name}),className:"disabled:opacity-40"})]})}function Bn({feature:t,enabled:s,prefix:c}){const{dispatch:o}=Xe(),[r,l]=d.useState(!1),[y,g]=d.useState(!1),k=async()=>{if(!r){l(!0),g(!1);try{const p=await w("/api/config",{method:"PATCH",body:JSON.stringify({features:{[t]:!s}})});o({type:"configStatus",config:p})}catch{g(!0)}finally{l(!1)}}};return e.jsxs("div",{className:"mt-4 flex items-start justify-between gap-4 rounded-2xl border border-hairline/50 bg-card px-4 py-4 sm:px-5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[14px] font-medium text-ink",children:n(`${c}.title`)}),e.jsx("p",{className:"mt-1 text-[12px] leading-relaxed text-ink-secondary",children:n(`${c}.desc`)}),y&&e.jsx("p",{role:"alert",className:"mt-1 text-[12px] text-danger",children:n("mcp.claude.error")})]}),e.jsx(un,{checked:s,"aria-label":n(`${c}.aria`),disabled:r,onClick:()=>{k()},className:"mt-0.5 shrink-0 disabled:cursor-wait disabled:opacity-50"})]})}function Aa(){const{state:t}=Xe();return e.jsxs(e.Fragment,{children:[e.jsx(Bn,{feature:"claudeUserMcp",enabled:Ns(t.config),prefix:"mcp.claude"}),e.jsx(Bn,{feature:"claudeUserSkills",enabled:As(t.config),prefix:"mcp.claudeSkills"})]})}function Pn({app:t}){if("image"in t.icon)return e.jsx("img",{src:t.icon.image,alt:"",className:"size-10 shrink-0 rounded-xl object-contain"});const s=t.icon.glyph;return e.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-raised text-ink-secondary",children:e.jsx(s,{size:19,"aria-hidden":"true"})})}class me extends Error{key;constructor(s){super(s),this.key=s}}const sn=/^https?:\/\//i,ds=/^[A-Za-z_][A-Za-z0-9_]*=/,Ca=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+:/,Sa=new Set(["npx","uvx","bunx"]),Ra=new Set(["pnpm","yarn"]);function Ea(t,s=[]){const c=za(t).trim();if(!c)return null;try{const o=/^[{[]/.test(c)?La(c):sn.test(c)&&!/\s/.test(c)?[mn(void 0,c,void 0,[])]:Ia(c);return{ok:!0,servers:Da(o,s)}}catch(o){if(o instanceof me)return{ok:!1,error:o.key};throw o}}function za(t){return t.replace(/[“”„]/g,'"').replace(/[‘’]/g,"'").replace(/(^|\s)[–—](?=[a-z])/g,"$1--")}function us(t){const s=[];let c=[],o="",r=!1;const l=()=>{r&&c.push(o),o="",r=!1},y=()=>{l(),c.length&&s.push(c),c=[]},g=k=>t[k]===`
1
+ import{c as dn,t as n,r as d,j as e,X as es,ae as ts,a as G,d as We,l as Bt,S as ws,i as Jt}from"./styles-BC55IU1j.js";import{S as un,j as w,u as Xe,eC as Ns,eD as As,eE as Cs,eF as ht,w as Ss,eG as Rs,eH as Es,l as zs,G as Sn,eI as Is,eJ as Ts,cT as Os,T as Bs,ah as Xt,bt as Ps,D as en,eK as Rt,eL as ns,eM as Et,eN as ss,an as as,eO as zt,eP as Ms,eQ as is,eR as It,eS as os,eT as Ls,eU as Rn,eV as Us,Y as cs,eW as Nt,eX as $s,eY as Fs,eZ as Ks,e_ as Ds,e$ as Qs,f0 as ct,f1 as En,f2 as Hs,f3 as zn,eg as In,f4 as _s,f5 as Js,f6 as Vs,f7 as Vt,f8 as Gs,f9 as qs,fa as Zs,fb as Ws,fc as Ys,fd as Xs,fe as ea,ff as ta,fg as na,fh as sa,fi as aa}from"./App-ftB4PetT.js";import{L as ae,P as rs,X as ia,a as oa,v as pn,E as ca,_ as ra,$ as la,B as da}from"./PlacesRail-Be4MJsKP.js";import{u as Gt}from"./mcp-servers-BFkC95ER.js";import{C as ls,R as tn}from"./MenuMotion-y3_mgPH0.js";import{u as ua}from"./ProIntroduction-DRl6O52f.js";import"./index-BZfn5_k5.js";import"./monitor-D_UAFHyW.js";const pa=[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],ma=dn("phone-call",pa);const ha=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],fa=dn("radio-tower",ha);const xa=[["path",{d:"m10.852 14.772-.383.923",key:"11vil6"}],["path",{d:"M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1v3clb"}],["path",{d:"m13.148 9.228.383-.923",key:"t2zzyc"}],["path",{d:"m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1bxfiv"}],["path",{d:"m14.772 10.852.923-.383",key:"k9m8cz"}],["path",{d:"m14.772 13.148.923.383",key:"1xvhww"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"m9.228 10.852-.923-.383",key:"1wtb30"}],["path",{d:"m9.228 13.148-.923.383",key:"1a830x"}]],qt=dn("server-cog",xa),ga=new Set(["twitter","x"]);function Tn(t,s){return t!=="managed"||!ga.has(s.trim().toLowerCase())?null:"Twitter/X needs your own X Developer app and Composio auth config. Use self-hosted connected apps for now."}const ba=5,ya=3,Tt=4;function ka(t,s=ba,c=[]){const o=new Map;for(const g of t)for(const k of new Set(g.categories??[]))o.set(k,(o.get(k)??0)+1);const r=[...o].sort((g,k)=>k[1]-g[1]||g[0].localeCompare(k[0])).map(([g])=>g),l=c.filter(g=>r.indexOf(g)>=s),y=[...r.slice(0,Math.max(0,s-l.length)),...l];return{inline:y,more:r.filter(g=>!y.includes(g))}}function nn(t,s){return s===null||(t.categories??[]).includes(s)}function ja(t,s,c){const o=[],r=t.filter(l=>s(l.slug));r.length&&o.push({kind:"connected",cards:r});for(const l of c.slice(0,ya)){const y=t.filter(g=>!s(g.slug)&&nn(g,l));y.length&&o.push({kind:"category",category:l,cards:y.slice(0,Tt),more:y.length>Tt})}return o.push({kind:"all",cards:t.filter(l=>!s(l.slug))}),o}const va={productivity:"productivity","developer tools":"developerTools",communication:"communication",files:"files","sales and crm":"salesCrm",design:"design",marketing:"marketing",analytics:"analytics",social:"social"},wa={"google calendar":"googleCalendar","google sheets":"googleSheets","google docs":"googleDocs",notion:"notion",github:"github",linear:"linear",sentry:"sentry",jira:"jira",slack:"slack",gmail:"gmail",discord:"discord","google drive":"googleDrive",posthog:"posthog","x (twitter)":"xTwitter",reddit:"reddit",zapier:"zapier",hubspot:"hubspot",salesforce:"salesforce",asana:"asana",trello:"trello",dropbox:"dropbox",airtable:"airtable",figma:"figma",stripe:"stripe"};function rt(t){const s=va[t.trim().toLowerCase()];return s?n(`apps.category.${s}`):t}function On(t){const s=wa[t.label.trim().toLowerCase()];return s?n(`apps.catalog.${s}.blurb`):t.blurb}function Na({server:t,disabled:s,onSaved:c}){const[o,r]=d.useState(!1),[l,y]=d.useState(null);if(typeof t.apps!="boolean"||t.apps&&t.hasApps!==!0)return null;const g=t.apps,k=async()=>{r(!0),y(null);try{const p=await w(`/api/mcp/servers/${encodeURIComponent(t.name)}`,{method:"PATCH",body:JSON.stringify({apps:!g})});c(p.servers??[])}catch(p){y(p instanceof Error?p.message:String(p))}finally{r(!1)}};return e.jsxs("div",{"data-mcp-apps":t.name,className:"mt-3 flex items-center gap-3 border-t border-hairline/40 pt-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-[13px] font-medium text-ink",children:n("mcp.apps.title")}),e.jsx("div",{role:l?"alert":void 0,className:l?"mt-0.5 text-[12px] text-danger":"mt-0.5 text-[12px] text-ink-secondary",children:l??n("mcp.apps.desc")})]}),o&&e.jsx(ae,{"aria-hidden":"true",size:13,className:"animate-spin text-ink-secondary"}),e.jsx(un,{checked:g,disabled:s||o,onClick:()=>{k()},"aria-label":n("mcp.apps.toggleAria",{name:t.name}),className:"disabled:opacity-40"})]})}function Bn({feature:t,enabled:s,prefix:c}){const{dispatch:o}=Xe(),[r,l]=d.useState(!1),[y,g]=d.useState(!1),k=async()=>{if(!r){l(!0),g(!1);try{const p=await w("/api/config",{method:"PATCH",body:JSON.stringify({features:{[t]:!s}})});o({type:"configStatus",config:p})}catch{g(!0)}finally{l(!1)}}};return e.jsxs("div",{className:"mt-4 flex items-start justify-between gap-4 rounded-2xl border border-hairline/50 bg-card px-4 py-4 sm:px-5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[14px] font-medium text-ink",children:n(`${c}.title`)}),e.jsx("p",{className:"mt-1 text-[12px] leading-relaxed text-ink-secondary",children:n(`${c}.desc`)}),y&&e.jsx("p",{role:"alert",className:"mt-1 text-[12px] text-danger",children:n("mcp.claude.error")})]}),e.jsx(un,{checked:s,"aria-label":n(`${c}.aria`),disabled:r,onClick:()=>{k()},className:"mt-0.5 shrink-0 disabled:cursor-wait disabled:opacity-50"})]})}function Aa(){const{state:t}=Xe();return e.jsxs(e.Fragment,{children:[e.jsx(Bn,{feature:"claudeUserMcp",enabled:Ns(t.config),prefix:"mcp.claude"}),e.jsx(Bn,{feature:"claudeUserSkills",enabled:As(t.config),prefix:"mcp.claudeSkills"})]})}function Pn({app:t}){if("image"in t.icon)return e.jsx("img",{src:t.icon.image,alt:"",className:"size-10 shrink-0 rounded-xl object-contain"});const s=t.icon.glyph;return e.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-raised text-ink-secondary",children:e.jsx(s,{size:19,"aria-hidden":"true"})})}class me extends Error{key;constructor(s){super(s),this.key=s}}const sn=/^https?:\/\//i,ds=/^[A-Za-z_][A-Za-z0-9_]*=/,Ca=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+:/,Sa=new Set(["npx","uvx","bunx"]),Ra=new Set(["pnpm","yarn"]);function Ea(t,s=[]){const c=za(t).trim();if(!c)return null;try{const o=/^[{[]/.test(c)?La(c):sn.test(c)&&!/\s/.test(c)?[mn(void 0,c,void 0,[])]:Ia(c);return{ok:!0,servers:Da(o,s)}}catch(o){if(o instanceof me)return{ok:!1,error:o.key};throw o}}function za(t){return t.replace(/[“”„]/g,'"').replace(/[‘’]/g,"'").replace(/(^|\s)[–—](?=[a-z])/g,"$1--")}function us(t){const s=[];let c=[],o="",r=!1;const l=()=>{r&&c.push(o),o="",r=!1},y=()=>{l(),c.length&&s.push(c),c=[]},g=k=>t[k]===`
2
2
  `?1:t[k]==="\r"&&t[k+1]===`
3
3
  `?2:0;for(let k=0;k<t.length;k+=1){const p=t[k];if(p==="\\"||(p==="`"||p==="^")&&g(k+1)){const h=g(k+1);if(h){k+=h;continue}k+1<t.length&&(o+=t[k+1],r=!0,k+=1);continue}if(p==="'"){const h=t.indexOf("'",k+1);if(h<0)throw new me("mcp.paste.notRecognized");o+=t.slice(k+1,h),r=!0,k=h;continue}if(p==='"'){let h=k+1;for(;h<t.length&&t[h]!=='"';h+=1){if(t[h]==="\\"&&h+1<t.length){const A=g(h+1);if(A){h+=A;continue}if('"\\$`'.includes(t[h+1])){o+=t[h+1],h+=1;continue}}o+=t[h]}if(h>=t.length)throw new me("mcp.paste.notRecognized");r=!0,k=h;continue}if(p==="$"&&t[k+1]==="("){const h=t.indexOf(")",k+2);if(h<0)throw new me("mcp.paste.notRecognized");o+=t.slice(k,h+1),r=!0,k=h;continue}if(p==="#"&&!r){for(;k+1<t.length&&t[k+1]!==`
4
4
  `;)k+=1;continue}if(p===`
@@ -1 +1 @@
1
- import{r as c,j as s,k as h,t as u}from"./styles-DOwrpvZY.js";import{f as m,g as b,h as a,i as p}from"./PlacesRail-DyYA64do.js";import{u as g,a2 as w,a3 as v}from"./App-D24ELMyP.js";function f(t,e){const o=t&&!window.ogb?.remoteClient?.active?window.ogb?.cloudAccount:void 0,[i,n]=c.useState(null),r=o?.offer?JSON.stringify(e??null):null;return c.useEffect(()=>{if(r===null||!o?.offer)return;let l=!0;return o.offer().then(x=>{l&&n(x)},()=>{}),()=>{l=!1}},[o,r]),o?.offer?i:null}function d(){const t=window.ogb?.remoteClient?.active?void 0:window.ogb?.cloudAccount,[e,o]=c.useState(null);return c.useEffect(()=>{if(!t)return;let i=!0,n=!1;const r=t.onState(l=>{n=!0,i&&o(l)});return t.state().then(l=>{i&&!n&&o(l)}).catch(()=>{}),()=>{i=!1,r()}},[t]),t&&m?{view:b(e),account:e}:null}function S(){const{dispatch:t}=g(),e=d(),o=e!==null&&a(e.view);if(f(o,e?.account?.offer),!e)return null;const{view:i}=e,n=p(i);return!n&&i.kind!=="reauth"?null:s.jsxs("section",{"aria-label":u("settings.section.cloudAccount"),"data-cloud-plan":i.kind,className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-hairline/50 p-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(h,{className:"text-ink-secondary",size:18,"aria-hidden":"true"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[14px] font-semibold text-ink",children:u("settings.section.cloudAccount")}),s.jsx("p",{className:"mt-1 text-[12px] text-ink-secondary",children:i.kind==="reauth"?u("pro.reauthShort"):n})]})]}),s.jsx("button",{type:"button",className:"ui-button",onClick:()=>t({type:"toggleAppSettings",open:!0,section:"cloudAccount"}),children:u("pro.openCloudSettings")})]})}function A({place:t,usage:e=null,upgrade:o}){const{dispatch:i}=g(),n=d(),r=n!==null&&a(n.view);if(f(r,n?.account?.offer),!n)return null;const l=n.view.kind==="reauth"?u("pro.reauthShort"):p(n.view);return l?s.jsx(w,{title:u("pro.name"),subtitle:l,children:t==="account"?s.jsx("button",{type:"button","data-cloud-plan":n.view.kind,className:"ui-button",onClick:()=>i({type:"toggleAppSettings",open:!0,section:"cloudAccount"}),children:u("settings.simple.account.manage")}):e&&o?s.jsx(v,{usage:e,upgrade:o}):null}):null}function y(){const t=d(),e=t!==null&&a(t.view);return f(e,t?.account?.offer),null}export{A as C,S as P,f as a,y as b,d as u};
1
+ import{r as c,j as s,k as h,t as u}from"./styles-BC55IU1j.js";import{f as m,g as b,h as a,i as p}from"./PlacesRail-Be4MJsKP.js";import{u as g,a2 as w,a3 as v}from"./App-ftB4PetT.js";function f(t,e){const o=t&&!window.ogb?.remoteClient?.active?window.ogb?.cloudAccount:void 0,[i,n]=c.useState(null),r=o?.offer?JSON.stringify(e??null):null;return c.useEffect(()=>{if(r===null||!o?.offer)return;let l=!0;return o.offer().then(x=>{l&&n(x)},()=>{}),()=>{l=!1}},[o,r]),o?.offer?i:null}function d(){const t=window.ogb?.remoteClient?.active?void 0:window.ogb?.cloudAccount,[e,o]=c.useState(null);return c.useEffect(()=>{if(!t)return;let i=!0,n=!1;const r=t.onState(l=>{n=!0,i&&o(l)});return t.state().then(l=>{i&&!n&&o(l)}).catch(()=>{}),()=>{i=!1,r()}},[t]),t&&m?{view:b(e),account:e}:null}function S(){const{dispatch:t}=g(),e=d(),o=e!==null&&a(e.view);if(f(o,e?.account?.offer),!e)return null;const{view:i}=e,n=p(i);return!n&&i.kind!=="reauth"?null:s.jsxs("section",{"aria-label":u("settings.section.cloudAccount"),"data-cloud-plan":i.kind,className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-hairline/50 p-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(h,{className:"text-ink-secondary",size:18,"aria-hidden":"true"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[14px] font-semibold text-ink",children:u("settings.section.cloudAccount")}),s.jsx("p",{className:"mt-1 text-[12px] text-ink-secondary",children:i.kind==="reauth"?u("pro.reauthShort"):n})]})]}),s.jsx("button",{type:"button",className:"ui-button",onClick:()=>t({type:"toggleAppSettings",open:!0,section:"cloudAccount"}),children:u("pro.openCloudSettings")})]})}function A({place:t,usage:e=null,upgrade:o}){const{dispatch:i}=g(),n=d(),r=n!==null&&a(n.view);if(f(r,n?.account?.offer),!n)return null;const l=n.view.kind==="reauth"?u("pro.reauthShort"):p(n.view);return l?s.jsx(w,{title:u("pro.name"),subtitle:l,children:t==="account"?s.jsx("button",{type:"button","data-cloud-plan":n.view.kind,className:"ui-button",onClick:()=>i({type:"toggleAppSettings",open:!0,section:"cloudAccount"}),children:u("settings.simple.account.manage")}):e&&o?s.jsx(v,{usage:e,upgrade:o}):null}):null}function y(){const t=d(),e=t!==null&&a(t.view);return f(e,t?.account?.offer),null}export{A as C,S as P,f as a,y as b,d as u};
@@ -1 +1 @@
1
- import{r,j as e,C as w,t as n,X as C,a as S}from"./styles-DOwrpvZY.js";import{u as A,I as z,T,B as p,V as L,g as P,S as B,h as E,j as I}from"./App-D24ELMyP.js";import{u as R,B as F,L as U,b as V}from"./PlacesRail-DyYA64do.js";import"./index-DwYETevf.js";import"./monitor-B9eyPPw6.js";import"./MenuMotion-BclWiAVe.js";function M({bot:t,overlay:b=!1}){const{dispatch:f}=A(),{dragProps:k}=R(),[x,g]=r.useState(!1),[h,l]=r.useState(""),[v,j]=r.useState(!1),d=r.useRef(null),o=r.useRef(null),c=r.useRef(null),y=()=>f({type:"toggleSettings",open:!1}),i=a=>{if(o.current={...o.current,...a},c.current)return c.current;g(!0),l("");const s=async()=>{for(;o.current;){const u=o.current;o.current=null,l("");try{const m=await I(`/api/bots/${t.id}/profile`,{method:"PATCH",body:JSON.stringify(u)});f({type:"botPatched",bot:m.bot})}catch(m){l(m instanceof Error?m.message:n("remoteAgent.updateFailed"))}}};return c.current=s().finally(()=>{c.current=null,g(!1)}),c.current},N=async a=>{if(a){j(!0),l("");try{const s=await E(a),u=s?V(s.path):null;if(!u)throw new Error(n("settings.profile.avatar.invalidType"));await i({avatarUrl:u,avatarCrop:t.avatarCrop==="square"?"square":"circle"})}catch(s){l(s instanceof Error?s.message:String(s))}finally{j(!1),d.current&&(d.current.value="")}}};return e.jsxs("aside",{className:S("animate-panel-in absolute inset-0 z-40 flex h-full min-w-0 flex-col border-l border-hairline/40 bg-panel",b?"md:left-auto md:w-[400px] md:shadow-2xl":"md:relative md:z-20 md:w-[400px] md:shrink-0"),children:[e.jsxs("div",{...k,className:"flex items-center justify-between px-4 py-3",children:[e.jsx("button",{onClick:y,"aria-label":n("remoteAgent.collapse"),className:"flex size-10 items-center justify-center rounded-md text-ink-secondary hover:bg-control hover:text-ink",children:e.jsx(w,{size:18})}),e.jsx("span",{className:"text-[15px] font-semibold text-ink",children:n("remoteAgent.title")}),e.jsx("button",{onClick:y,"aria-label":n("remoteAgent.close"),className:"flex size-10 items-center justify-center rounded-md text-ink-secondary hover:bg-control hover:text-ink",children:e.jsx(C,{size:18})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-5 pb-5",children:e.jsxs("div",{className:"flex flex-col gap-4 pt-4",children:[e.jsxs("div",{className:"rounded-xl bg-card p-4",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[e.jsx(F,{bot:t,state:"idle",size:64,motion:"none",motionKey:0,animated:!1}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",className:"sr-only",onChange:a=>{N(a.target.files?.[0])}}),e.jsxs("button",{type:"button",disabled:v||x,onClick:()=>d.current?.click(),className:"flex items-center gap-1.5 rounded-lg bg-control px-3 py-2 text-[13px] text-ink hover:bg-raised-hover disabled:opacity-50",children:[v?e.jsx(U,{size:14,className:"animate-spin"}):e.jsx(z,{size:14})," ",n("botIdentity.avatar")]}),t.avatarUrl&&e.jsx("button",{type:"button",disabled:x,onClick:()=>{i({avatarUrl:null,avatarCrop:"mascot"})},"aria-label":n("remoteAgent.removeAvatar"),className:"flex size-9 items-center justify-center rounded-lg text-ink-secondary hover:bg-control hover:text-danger",children:e.jsx(T,{size:14})})]})]}),e.jsxs("label",{className:"block text-[12px] font-medium text-ink-secondary",children:[n("botSettings.identity.name"),e.jsx("input",{defaultValue:t.name,maxLength:p.name,onBlur:a=>{const s=a.currentTarget.value.trim();s&&s!==t.name&&i({name:s})},className:"mt-1 w-full rounded-lg bg-inset px-3 py-2 text-[14px] text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]}),e.jsxs("label",{className:"mt-3 block text-[12px] font-medium text-ink-secondary",children:[n("botSettings.identity.title"),e.jsx("input",{defaultValue:t.title??"",maxLength:p.title,onBlur:a=>{a.currentTarget.value!==(t.title??"")&&i({title:a.currentTarget.value})},className:"mt-1 w-full rounded-lg bg-inset px-3 py-2 text-[14px] text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]}),e.jsxs("label",{className:"mt-3 block text-[12px] font-medium text-ink-secondary",children:[n("remoteAgent.description"),e.jsx("textarea",{defaultValue:t.description??"",maxLength:p.description,rows:4,onBlur:a=>{a.currentTarget.value!==(t.description??"")&&i({description:a.currentTarget.value})},className:"mt-1 w-full resize-y rounded-lg bg-inset px-3 py-2 text-[13px] leading-relaxed text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]})]}),e.jsx(L,{bot:t,workspaceConfigurationLocked:!0,onPatch:a=>{i(a)}}),e.jsxs("div",{className:"flex items-center justify-between gap-4 rounded-xl bg-card p-4",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx(P,{size:16,className:"mt-0.5 shrink-0 text-ink-secondary"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] font-medium text-ink",children:n("notifications.title")}),e.jsx("div",{className:"mt-0.5 text-[12px] leading-relaxed text-ink-secondary",children:n("remoteAgent.notificationsHint")})]})]}),e.jsx(B,{checked:t.notifications,disabled:x,"aria-label":n("remoteAgent.notifications"),onClick:()=>{i({notifications:!t.notifications})}})]}),h?e.jsx("div",{role:"alert",className:"text-[12px] text-danger",children:h}):null]})})]})}export{M as RemoteAgentSettingsPanel};
1
+ import{r,j as e,C as w,t as n,X as C,a as S}from"./styles-BC55IU1j.js";import{u as A,I as z,T,B as p,V as L,g as P,S as B,h as E,j as I}from"./App-ftB4PetT.js";import{u as R,B as F,L as U,b as V}from"./PlacesRail-Be4MJsKP.js";import"./index-BZfn5_k5.js";import"./monitor-D_UAFHyW.js";import"./MenuMotion-y3_mgPH0.js";function M({bot:t,overlay:b=!1}){const{dispatch:f}=A(),{dragProps:k}=R(),[x,g]=r.useState(!1),[h,l]=r.useState(""),[v,j]=r.useState(!1),d=r.useRef(null),o=r.useRef(null),c=r.useRef(null),y=()=>f({type:"toggleSettings",open:!1}),i=a=>{if(o.current={...o.current,...a},c.current)return c.current;g(!0),l("");const s=async()=>{for(;o.current;){const u=o.current;o.current=null,l("");try{const m=await I(`/api/bots/${t.id}/profile`,{method:"PATCH",body:JSON.stringify(u)});f({type:"botPatched",bot:m.bot})}catch(m){l(m instanceof Error?m.message:n("remoteAgent.updateFailed"))}}};return c.current=s().finally(()=>{c.current=null,g(!1)}),c.current},N=async a=>{if(a){j(!0),l("");try{const s=await E(a),u=s?V(s.path):null;if(!u)throw new Error(n("settings.profile.avatar.invalidType"));await i({avatarUrl:u,avatarCrop:t.avatarCrop==="square"?"square":"circle"})}catch(s){l(s instanceof Error?s.message:String(s))}finally{j(!1),d.current&&(d.current.value="")}}};return e.jsxs("aside",{className:S("animate-panel-in absolute inset-0 z-40 flex h-full min-w-0 flex-col border-l border-hairline/40 bg-panel",b?"md:left-auto md:w-[400px] md:shadow-2xl":"md:relative md:z-20 md:w-[400px] md:shrink-0"),children:[e.jsxs("div",{...k,className:"flex items-center justify-between px-4 py-3",children:[e.jsx("button",{onClick:y,"aria-label":n("remoteAgent.collapse"),className:"flex size-10 items-center justify-center rounded-md text-ink-secondary hover:bg-control hover:text-ink",children:e.jsx(w,{size:18})}),e.jsx("span",{className:"text-[15px] font-semibold text-ink",children:n("remoteAgent.title")}),e.jsx("button",{onClick:y,"aria-label":n("remoteAgent.close"),className:"flex size-10 items-center justify-center rounded-md text-ink-secondary hover:bg-control hover:text-ink",children:e.jsx(C,{size:18})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-5 pb-5",children:e.jsxs("div",{className:"flex flex-col gap-4 pt-4",children:[e.jsxs("div",{className:"rounded-xl bg-card p-4",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[e.jsx(F,{bot:t,state:"idle",size:64,motion:"none",motionKey:0,animated:!1}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",className:"sr-only",onChange:a=>{N(a.target.files?.[0])}}),e.jsxs("button",{type:"button",disabled:v||x,onClick:()=>d.current?.click(),className:"flex items-center gap-1.5 rounded-lg bg-control px-3 py-2 text-[13px] text-ink hover:bg-raised-hover disabled:opacity-50",children:[v?e.jsx(U,{size:14,className:"animate-spin"}):e.jsx(z,{size:14})," ",n("botIdentity.avatar")]}),t.avatarUrl&&e.jsx("button",{type:"button",disabled:x,onClick:()=>{i({avatarUrl:null,avatarCrop:"mascot"})},"aria-label":n("remoteAgent.removeAvatar"),className:"flex size-9 items-center justify-center rounded-lg text-ink-secondary hover:bg-control hover:text-danger",children:e.jsx(T,{size:14})})]})]}),e.jsxs("label",{className:"block text-[12px] font-medium text-ink-secondary",children:[n("botSettings.identity.name"),e.jsx("input",{defaultValue:t.name,maxLength:p.name,onBlur:a=>{const s=a.currentTarget.value.trim();s&&s!==t.name&&i({name:s})},className:"mt-1 w-full rounded-lg bg-inset px-3 py-2 text-[14px] text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]}),e.jsxs("label",{className:"mt-3 block text-[12px] font-medium text-ink-secondary",children:[n("botSettings.identity.title"),e.jsx("input",{defaultValue:t.title??"",maxLength:p.title,onBlur:a=>{a.currentTarget.value!==(t.title??"")&&i({title:a.currentTarget.value})},className:"mt-1 w-full rounded-lg bg-inset px-3 py-2 text-[14px] text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]}),e.jsxs("label",{className:"mt-3 block text-[12px] font-medium text-ink-secondary",children:[n("remoteAgent.description"),e.jsx("textarea",{defaultValue:t.description??"",maxLength:p.description,rows:4,onBlur:a=>{a.currentTarget.value!==(t.description??"")&&i({description:a.currentTarget.value})},className:"mt-1 w-full resize-y rounded-lg bg-inset px-3 py-2 text-[13px] leading-relaxed text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]})]}),e.jsx(L,{bot:t,workspaceConfigurationLocked:!0,onPatch:a=>{i(a)}}),e.jsxs("div",{className:"flex items-center justify-between gap-4 rounded-xl bg-card p-4",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx(P,{size:16,className:"mt-0.5 shrink-0 text-ink-secondary"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] font-medium text-ink",children:n("notifications.title")}),e.jsx("div",{className:"mt-0.5 text-[12px] leading-relaxed text-ink-secondary",children:n("remoteAgent.notificationsHint")})]})]}),e.jsx(B,{checked:t.notifications,disabled:x,"aria-label":n("remoteAgent.notifications"),onClick:()=>{i({notifications:!t.notifications})}})]}),h?e.jsx("div",{role:"alert",className:"text-[12px] text-danger",children:h}):null]})})]})}export{M as RemoteAgentSettingsPanel};
@@ -1,2 +1,2 @@
1
- import{j as e,a as z,t,G as F,r as d,S as L,X as B}from"./styles-DOwrpvZY.js";import{E as O,C as G,T as K,B as E,n as $,u as q,r as H}from"./PlacesRail-DyYA64do.js";import{an as U,u as g,ao as A,ap as W,aq as X,ar as _,as as J,at as Q,au as V,av as Y,aw as M,ax as Z,ay as ee,az as ae,K as te,aA as se,aB as ne,aC as oe,aD as re,aE as le,aF as ie,aG as ce,aH as P,aI as R,aJ as de,aK as ue,aL as pe,aM as S,aN as k,aO as me,aP as fe,aQ as xe,aR as he,aS as be,aT as je,aU as ye,aV as ke,aW as ge,aX as C,aY as we,ab as ve,aZ as Re}from"./App-D24ELMyP.js";import{C as Se}from"./MenuMotion-BclWiAVe.js";import"./monitor-B9eyPPw6.js";import"./index-DwYETevf.js";function N(a){return a===60?t("room.panel.hour"):a%60===0?t("room.panel.hours",{hours:a/60}):t("room.panel.minutes",{minutes:a})}function Ce(a){const{dispatch:n}=g(),l=F(),u=A(a.threadId),o=W(a),[p,r]=d.useState(null),f=a.messages,h=f.length>0,s=()=>oe({title:a.name,messages:f,isGroup:!0}),x=l?[]:X(a.tasks??[]),m=_(a.usage);return{items:[{key:"find",label:t("chat.find"),icon:e.jsx(L,{size:16}),active:u,trailing:e.jsx(Q,{id:"find-conversation"}),onSelect:()=>J(a.threadId)},...l?[]:[{key:"new-thread",heading:t("task.list"),separatorBefore:!0,label:t("task.newShort"),icon:e.jsx(V,{size:16}),onSelect:()=>n({type:"newGroupTask",groupId:a.id})}],...x.length<2?[]:[{key:"threads",label:t("task.switch"),icon:e.jsx(M,{size:16}),value:String(x.length),submenu:x.map(i=>({key:`thread:${i.threadId}`,label:Y(i.title||t("task.newShort")),active:i.threadId===a.threadId,onSelect:()=>n({type:"switchGroupTask",groupId:a.id,threadId:i.threadId})})),onSelect:()=>{}}],{key:"copy",heading:t("chat.export.heading"),separatorBefore:!0,label:t("chat.export.copy"),icon:e.jsx(G,{size:16}),disabled:!h,keepOpen:!0,trailing:p&&e.jsx("span",{role:"status",className:"text-[11px] text-ink-secondary",children:t(p==="copied"?"chat.export.copied":"chat.export.copyFailed")}),onSelect:()=>{Z(s()).then(i=>r(i?"copied":"failed"))}},{key:"download",label:t("chat.export.download"),icon:e.jsx(te,{size:16}),disabled:!h,onSelect:()=>ee(ae(a.name),s())},{key:"turn-limit",label:t("room.panel.turnLimit"),icon:e.jsx(K,{size:16}),separatorBefore:!0,value:N(o.saved??o.globalMinutes),submenu:[{key:"turn-limit:default",label:t("room.turnLimit.default",{minutes:o.globalMinutes}),active:o.saved===null,onSelect:()=>o.save(null)},...se.map(i=>({key:`turn-limit:${i}`,label:N(i),active:o.saved===i,onSelect:()=>o.save(i)}))],onSelect:()=>{}},...m?[{key:"usage",label:t("chat.usage.menu"),icon:e.jsx(ne,{size:16}),keepOpen:!0,trailing:e.jsx("span",{title:m.title,"data-testid":"group-usage-chip",className:"tabular-nums text-[12px] text-ink-secondary",children:m.short}),onSelect:()=>{}}]:[]],on:u}}function Ne({group:a}){const{items:n,on:l}=Ce(a);return e.jsx(U,{items:n,ariaLabel:t("chat.more"),triggerClassName:"rounded-full",triggerTitle:t("chat.more"),renderTrigger:({open:u})=>e.jsx("span",{"data-testid":"room-more",className:z("flex size-8 items-center justify-center rounded-full bg-raised/50 transition-colors hover:bg-raised","max-md:size-9 max-md:border max-md:border-hairline max-md:bg-card",u||l?"text-accent":"text-ink"),children:e.jsx(O,{size:16})})})}function Te({group:a}){return e.jsx(Ne,{group:a},a.threadId)}function ze({group:a,members:n}){const{state:l,dispatch:u}=g(),o=re(l.config),p=le(a,n),r=ie(p),f=s=>{s!==r&&u({type:"patchGroup",groupId:a.id,patch:{defaultResponder:de(s,p)}})},h=[{choice:"auto",title:t("room.panel.responder.autoOption"),hint:o?void 0:t("room.responder.autoOff",{name:ce(a,n)??t("room.responder.leadFallback")})},{choice:"everyone",title:t("room.panel.responder.everyone")},{choice:"mentions",title:t("room.panel.responder.mentions")}];return e.jsx("div",{role:"radiogroup","aria-label":t("room.panel.whoResponds"),children:e.jsxs(P,{children:[n.map(s=>e.jsx(R,{"data-panel-choice":`member:${s.id}`,title:e.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[e.jsx(E,{bot:s,state:$(s.mascotExpression)??"happy",size:22,animated:!1}),e.jsx("span",{className:"truncate",children:s.name})]}),checked:r===`member:${s.id}`,onClick:()=>f(`member:${s.id}`)},s.id)),h.map(({choice:s,title:x,hint:m})=>e.jsx(R,{"data-panel-choice":s,title:x,hint:m,checked:r===s,onClick:()=>f(s)},s))]})})}const T={responder:{title:"room.panel.whoResponds",intro:"room.panel.responder.intro"},folder:{title:"room.folder.title",intro:"room.folder.detail"}};function Ee({group:a,members:n}){return e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("div",{"data-room-panel-faces":!0,className:"mt-0.5 flex -space-x-3",children:n.slice(0,3).map(l=>e.jsx(E,{bot:l,state:"happy",size:52,animated:!1},l.id))}),e.jsx("h2",{id:"room-panel-title",className:"mt-2.5 max-w-full truncate px-1.5 text-[18px] font-semibold text-ink",children:a.name}),a.description&&e.jsx("p",{className:"mt-px line-clamp-2 max-w-full text-[13px] text-ink-secondary",children:a.description})]})}function Me({group:a}){const n=ke(a),l=d.useRef(null),u=d.useRef(!1);d.useEffect(()=>{n.open||!u.current||(u.current=!1,l.current?.focus())},[n.open]);const o=r=>{r.key==="Escape"&&(r.preventDefault(),r.stopPropagation()),(r.key==="Escape"||r.key==="Enter"&&(r.metaKey||r.ctrlKey))&&(u.current=!0),n.onKeyDown(r)};if(n.open)return e.jsxs(ge,{"data-panel-row":"instructions",children:[e.jsx(C,{title:t("room.panel.instructions")}),e.jsx("textarea",{autoFocus:!0,dir:"auto","aria-label":t("room.panel.instructions"),value:n.draft,onChange:r=>n.setDraft(r.target.value),onBlur:n.save,onKeyDown:o,placeholder:t("room.bulletin.placeholder"),rows:6,className:"w-full resize-y rounded-lg border border-hairline bg-inset px-2.5 py-2 text-[13px] leading-relaxed text-ink outline-none placeholder:text-ink-tertiary focus:border-accent-border"}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button","data-panel-done":"instructions",onMouseDown:r=>r.preventDefault(),onClick:()=>{u.current=!0,n.save()},className:we,children:t("botSettings.simple.done")})})]});const p=a.bulletin.split(`
1
+ import{j as e,a as z,t,G as F,r as d,S as L,X as B}from"./styles-BC55IU1j.js";import{E as O,C as G,T as K,B as E,n as $,u as q,r as H}from"./PlacesRail-Be4MJsKP.js";import{an as U,u as g,ao as A,ap as W,aq as X,ar as _,as as J,at as Q,au as V,av as Y,aw as M,ax as Z,ay as ee,az as ae,K as te,aA as se,aB as ne,aC as oe,aD as re,aE as le,aF as ie,aG as ce,aH as P,aI as R,aJ as de,aK as ue,aL as pe,aM as S,aN as k,aO as me,aP as fe,aQ as xe,aR as he,aS as be,aT as je,aU as ye,aV as ke,aW as ge,aX as C,aY as we,ab as ve,aZ as Re}from"./App-ftB4PetT.js";import{C as Se}from"./MenuMotion-y3_mgPH0.js";import"./monitor-D_UAFHyW.js";import"./index-BZfn5_k5.js";function N(a){return a===60?t("room.panel.hour"):a%60===0?t("room.panel.hours",{hours:a/60}):t("room.panel.minutes",{minutes:a})}function Ce(a){const{dispatch:n}=g(),l=F(),u=A(a.threadId),o=W(a),[p,r]=d.useState(null),f=a.messages,h=f.length>0,s=()=>oe({title:a.name,messages:f,isGroup:!0}),x=l?[]:X(a.tasks??[]),m=_(a.usage);return{items:[{key:"find",label:t("chat.find"),icon:e.jsx(L,{size:16}),active:u,trailing:e.jsx(Q,{id:"find-conversation"}),onSelect:()=>J(a.threadId)},...l?[]:[{key:"new-thread",heading:t("task.list"),separatorBefore:!0,label:t("task.newShort"),icon:e.jsx(V,{size:16}),onSelect:()=>n({type:"newGroupTask",groupId:a.id})}],...x.length<2?[]:[{key:"threads",label:t("task.switch"),icon:e.jsx(M,{size:16}),value:String(x.length),submenu:x.map(i=>({key:`thread:${i.threadId}`,label:Y(i.title||t("task.newShort")),active:i.threadId===a.threadId,onSelect:()=>n({type:"switchGroupTask",groupId:a.id,threadId:i.threadId})})),onSelect:()=>{}}],{key:"copy",heading:t("chat.export.heading"),separatorBefore:!0,label:t("chat.export.copy"),icon:e.jsx(G,{size:16}),disabled:!h,keepOpen:!0,trailing:p&&e.jsx("span",{role:"status",className:"text-[11px] text-ink-secondary",children:t(p==="copied"?"chat.export.copied":"chat.export.copyFailed")}),onSelect:()=>{Z(s()).then(i=>r(i?"copied":"failed"))}},{key:"download",label:t("chat.export.download"),icon:e.jsx(te,{size:16}),disabled:!h,onSelect:()=>ee(ae(a.name),s())},{key:"turn-limit",label:t("room.panel.turnLimit"),icon:e.jsx(K,{size:16}),separatorBefore:!0,value:N(o.saved??o.globalMinutes),submenu:[{key:"turn-limit:default",label:t("room.turnLimit.default",{minutes:o.globalMinutes}),active:o.saved===null,onSelect:()=>o.save(null)},...se.map(i=>({key:`turn-limit:${i}`,label:N(i),active:o.saved===i,onSelect:()=>o.save(i)}))],onSelect:()=>{}},...m?[{key:"usage",label:t("chat.usage.menu"),icon:e.jsx(ne,{size:16}),keepOpen:!0,trailing:e.jsx("span",{title:m.title,"data-testid":"group-usage-chip",className:"tabular-nums text-[12px] text-ink-secondary",children:m.short}),onSelect:()=>{}}]:[]],on:u}}function Ne({group:a}){const{items:n,on:l}=Ce(a);return e.jsx(U,{items:n,ariaLabel:t("chat.more"),triggerClassName:"rounded-full",triggerTitle:t("chat.more"),renderTrigger:({open:u})=>e.jsx("span",{"data-testid":"room-more",className:z("flex size-8 items-center justify-center rounded-full bg-raised/50 transition-colors hover:bg-raised","max-md:size-9 max-md:border max-md:border-hairline max-md:bg-card",u||l?"text-accent":"text-ink"),children:e.jsx(O,{size:16})})})}function Te({group:a}){return e.jsx(Ne,{group:a},a.threadId)}function ze({group:a,members:n}){const{state:l,dispatch:u}=g(),o=re(l.config),p=le(a,n),r=ie(p),f=s=>{s!==r&&u({type:"patchGroup",groupId:a.id,patch:{defaultResponder:de(s,p)}})},h=[{choice:"auto",title:t("room.panel.responder.autoOption"),hint:o?void 0:t("room.responder.autoOff",{name:ce(a,n)??t("room.responder.leadFallback")})},{choice:"everyone",title:t("room.panel.responder.everyone")},{choice:"mentions",title:t("room.panel.responder.mentions")}];return e.jsx("div",{role:"radiogroup","aria-label":t("room.panel.whoResponds"),children:e.jsxs(P,{children:[n.map(s=>e.jsx(R,{"data-panel-choice":`member:${s.id}`,title:e.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[e.jsx(E,{bot:s,state:$(s.mascotExpression)??"happy",size:22,animated:!1}),e.jsx("span",{className:"truncate",children:s.name})]}),checked:r===`member:${s.id}`,onClick:()=>f(`member:${s.id}`)},s.id)),h.map(({choice:s,title:x,hint:m})=>e.jsx(R,{"data-panel-choice":s,title:x,hint:m,checked:r===s,onClick:()=>f(s)},s))]})})}const T={responder:{title:"room.panel.whoResponds",intro:"room.panel.responder.intro"},folder:{title:"room.folder.title",intro:"room.folder.detail"}};function Ee({group:a,members:n}){return e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("div",{"data-room-panel-faces":!0,className:"mt-0.5 flex -space-x-3",children:n.slice(0,3).map(l=>e.jsx(E,{bot:l,state:"happy",size:52,animated:!1},l.id))}),e.jsx("h2",{id:"room-panel-title",className:"mt-2.5 max-w-full truncate px-1.5 text-[18px] font-semibold text-ink",children:a.name}),a.description&&e.jsx("p",{className:"mt-px line-clamp-2 max-w-full text-[13px] text-ink-secondary",children:a.description})]})}function Me({group:a}){const n=ke(a),l=d.useRef(null),u=d.useRef(!1);d.useEffect(()=>{n.open||!u.current||(u.current=!1,l.current?.focus())},[n.open]);const o=r=>{r.key==="Escape"&&(r.preventDefault(),r.stopPropagation()),(r.key==="Escape"||r.key==="Enter"&&(r.metaKey||r.ctrlKey))&&(u.current=!0),n.onKeyDown(r)};if(n.open)return e.jsxs(ge,{"data-panel-row":"instructions",children:[e.jsx(C,{title:t("room.panel.instructions")}),e.jsx("textarea",{autoFocus:!0,dir:"auto","aria-label":t("room.panel.instructions"),value:n.draft,onChange:r=>n.setDraft(r.target.value),onBlur:n.save,onKeyDown:o,placeholder:t("room.bulletin.placeholder"),rows:6,className:"w-full resize-y rounded-lg border border-hairline bg-inset px-2.5 py-2 text-[13px] leading-relaxed text-ink outline-none placeholder:text-ink-tertiary focus:border-accent-border"}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button","data-panel-done":"instructions",onMouseDown:r=>r.preventDefault(),onClick:()=>{u.current=!0,n.save()},className:we,children:t("botSettings.simple.done")})})]});const p=a.bulletin.split(`
2
2
  `)[0]?.trim();return e.jsxs("button",{ref:l,type:"button","data-panel-edit":"instructions","aria-label":`${t("botSettings.simple.edit")}: ${t("room.panel.instructions")}`,onClick:n.start,className:z(Re,"w-full text-left hover:bg-ink/[0.03]"),children:[e.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-ink/[0.05] text-ink-secondary max-md:size-8 max-md:rounded-full","aria-hidden":"true",children:e.jsx(ve,{size:15})}),e.jsx(C,{title:t("room.panel.instructions"),hint:e.jsx("span",{dir:"auto",className:"line-clamp-1",children:p||t("room.panel.instructionsHint")})}),e.jsx(Se,{size:15,className:"shrink-0 text-ink-tertiary","aria-hidden":"true"})]})}function Oe({group:a,overlay:n=!1}){const{state:l}=g(),{dragProps:u}=q(),[o,p]=d.useState(null),[r,f]=d.useState(!1),h=d.useRef(null),s=d.useRef(null),x=d.useRef(null),m=d.useRef(null),b=d.useMemo(()=>a.memberIds.map(c=>l.bots.find(y=>y.id===c)).filter(c=>!!c),[a.memberIds,l.bots]),i=ue(a),I=d.useCallback(()=>f(!1),[]),w=c=>{p(c),s.current?.scrollTo({top:0})},v=()=>{m.current=o,p(null)};d.useEffect(()=>{o!==null?s.current?.querySelector("[data-panel-back]")?.focus():m.current&&(s.current?.querySelector(`[data-panel-page="${m.current}"]`)?.focus(),m.current=null)},[o]),d.useEffect(()=>{const c=h.current;c?.focus();const y=j=>{j.key!=="Escape"||j.defaultPrevented||c&&j.target instanceof Node&&!c.contains(j.target)||(j.preventDefault(),S({refocus:!0}))};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[]);const D=c=>{c.key!=="Escape"||c.defaultPrevented||o===null||(c.preventDefault(),c.stopPropagation(),v())};return e.jsxs(e.Fragment,{children:[e.jsxs("aside",{ref:h,role:"dialog","aria-labelledby":"room-panel-title",tabIndex:-1,"data-room-panel":!0,onKeyDown:D,className:je(n,!0),children:[e.jsxs("div",{...u,className:"flex h-[52px] shrink-0 items-center justify-end gap-2 px-3.5",children:[e.jsx(Te,{group:a}),e.jsx("button",{type:"button",onClick:()=>S({refocus:!0}),"aria-label":t("botSettings.simple.close"),className:pe,children:e.jsx(B,{size:16,className:"pointer-events-none"})})]}),e.jsx("div",{ref:s,className:"@container relative min-h-0 flex-1 overflow-y-auto px-5 pb-7",children:o===null?e.jsxs(e.Fragment,{children:[e.jsx(Ee,{group:a,members:b}),e.jsxs(P,{children:[e.jsx(k,{"data-panel-page":"responder",icon:M,title:t("room.panel.whoResponds"),value:me(a,b),onClick:()=>w("responder")}),e.jsx(k,{"data-panel-page":"folder",icon:fe,title:t("room.folder.title"),value:i?.name??t("room.panel.folder.own"),tooltip:i?.path,onClick:()=>w("folder")}),e.jsx(Me,{group:a}),e.jsx(k,{ref:x,"data-panel-row":"members",icon:xe,title:t("room.panel.members"),value:String(b.length),onClick:()=>f(!0)})]})]}):e.jsxs("div",{"data-panel-page-view":o,children:[e.jsx("span",{id:"room-panel-title",className:"sr-only",children:a.name}),e.jsx(he,{back:a.name,title:t(T[o].title),intro:t(T[o].intro),onBack:v}),e.jsx("div",{className:"mt-4 flex flex-col gap-3",children:o==="responder"?e.jsx(ze,{group:a,members:b}):e.jsx(be,{group:a,heading:!1})})]})})]}),r&&H.createPortal(e.jsx(ye,{group:a,onClose:I,triggerRef:x}),document.body)]})}export{Oe as RoomPanel};