decocms 4.579.2 → 4.580.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/dist/client/assets/{AlertCircle-CTbjWy6O.js → AlertCircle-B490hSlt.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DwuVDkrD.js → AreaChart-BD_Roedd.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-XFXQyKrg.js → ArrowLeft-DafuRRD5.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-BGhmN6Zx.js → ArrowUp-DtGM9L0j.js} +1 -1
  5. package/dist/client/assets/{BookOpen01-BPEekJOY.js → BookOpen01-CV2z4c8F.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-CyLm4xQH.js → CartesianChart-CrCj1-9j.js} +1 -1
  7. package/dist/client/assets/{CategoricalChart-BaZiYgxE.js → CategoricalChart-xRS359kv.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-D_eKfCyb.js → CheckCircle-DPwXaovL.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-B8yNz6I1.js → ChevronSelectorVertical-BMmx_KCU.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-DJytO9gL.js → ChevronUp-Ce_cpdSH.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-D8vcOfs6.js → CreditCard01-AousihIp.js} +1 -1
  12. package/dist/client/assets/{Globe04-B6PnEpLB.js → Globe04-Beu1mUUo.js} +1 -1
  13. package/dist/client/assets/{Key01-CqlMd8Tp.js → Key01-C_oaxPMj.js} +1 -1
  14. package/dist/client/assets/{LinkBroken01-BrTHjhI6.js → LinkBroken01-DanTXGHc.js} +1 -1
  15. package/dist/client/assets/{Minus-O-Diijsb.js → Minus-DbBml1RM.js} +1 -1
  16. package/dist/client/assets/{Monitor01-CNesz7Zi.js → Monitor01-DTuQNZAT.js} +1 -1
  17. package/dist/client/assets/{Play-DLBGORyf.js → Play-Di4Yv58S.js} +1 -1
  18. package/dist/client/assets/{Plus-D93afoay.js → Plus--VZnEUO0.js} +1 -1
  19. package/dist/client/assets/{ReferenceLine-DP5lPOEm.js → ReferenceLine-DOIz5qVd.js} +1 -1
  20. package/dist/client/assets/{SearchMd-BMSOzTwj.js → SearchMd-D17naag4.js} +1 -1
  21. package/dist/client/assets/{ShoppingBag01-BjOh6InC.js → ShoppingBag01-Ca3CPvRM.js} +1 -1
  22. package/dist/client/assets/{Sun-Dwiv3SBK.js → Sun-B7TipsV2.js} +1 -1
  23. package/dist/client/assets/{SwitchHorizontal01-TvywMML0.js → SwitchHorizontal01-IY2QD6Vf.js} +1 -1
  24. package/dist/client/assets/{Tool01-BR0iTy6Z.js → Tool01-DqBi4vmR.js} +1 -1
  25. package/dist/client/assets/{Tooltip-CMzIdphO.js → Tooltip-MxdafbEz.js} +1 -1
  26. package/dist/client/assets/{Trash01-DcgAZcrm.js → Trash01-CodGA_L3.js} +1 -1
  27. package/dist/client/assets/{Upload01-C4wCuUx0.js → Upload01-CWNUSACo.js} +1 -1
  28. package/dist/client/assets/{UserSquare-dl1oayK_.js → UserSquare-Ba1GW4kA.js} +1 -1
  29. package/dist/client/assets/{Users01-Bfq6gAwi.js → Users01-LIRLEmGk.js} +1 -1
  30. package/dist/client/assets/{XClose-DN30jgS9.js → XClose-Ddq6ci19.js} +1 -1
  31. package/dist/client/assets/{Zap-C1Evk-yy.js → Zap-D88LAwUm.js} +1 -1
  32. package/dist/client/assets/{access-gate-pZVUht52.js → access-gate-DoWbmgSR.js} +1 -1
  33. package/dist/client/assets/{add-connection-dialog-Z992qi1w.js → add-connection-dialog-WlcCkPK1.js} +1 -1
  34. package/dist/client/assets/agent-app-Ctpa0e3H.js +1 -0
  35. package/dist/client/assets/{agent-assets-CFZFbPFI.js → agent-assets-PBJXgM6u.js} +1 -1
  36. package/dist/client/assets/{agent-automation-CK-VV9xP.js → agent-automation-DVmOZGtA.js} +1 -1
  37. package/dist/client/assets/{agent-automations-csn7BO9I.js → agent-automations-CO9rwZOq.js} +1 -1
  38. package/dist/client/assets/{agent-blog-DPGRYnCY.js → agent-blog--ERi0BnT.js} +2 -2
  39. package/dist/client/assets/{agent-blog-post-Cx_KL21T.js → agent-blog-post-4QotU6Nd.js} +2 -2
  40. package/dist/client/assets/{agent-calendar-DHfOCkRQ.js → agent-calendar-DfjpCx1Y.js} +1 -1
  41. package/dist/client/assets/{agent-capabilities-4_vEEVov.js → agent-capabilities-D5_s8oLS.js} +1 -1
  42. package/dist/client/assets/{agent-connect-sources-HdEFSoEU.js → agent-connect-sources-DXqGgV-u.js} +1 -1
  43. package/dist/client/assets/agent-deck-BYYdHuNF.js +1 -0
  44. package/dist/client/assets/{agent-e2e-D3d1Qsqd.js → agent-e2e-m4Qqei41.js} +1 -1
  45. package/dist/client/assets/agent-experiments-Cu1S7zm3.js +1 -0
  46. package/dist/client/assets/{agent-file-SpdJvvC2.js → agent-file-BqOTIsah.js} +1 -1
  47. package/dist/client/assets/{agent-hosting-BZxtmZl8.js → agent-hosting-CLP6bzwI.js} +1 -1
  48. package/dist/client/assets/{agent-icon-BLhMgLPf.js → agent-icon-Cgeh7jW8.js} +1 -1
  49. package/dist/client/assets/agent-library-BkD93h-_.js +1 -0
  50. package/dist/client/assets/agent-library-file-BhiplAMG.js +1 -0
  51. package/dist/client/assets/agent-overview-DOuM4YFR.js +1 -0
  52. package/dist/client/assets/{agent-releases-DL4F9_VB.js → agent-releases-Dsg8Eaml.js} +1 -1
  53. package/dist/client/assets/agent-settings-p7CJBmk5.js +1 -0
  54. package/dist/client/assets/{agent-site-editor-CqV30Rul.js → agent-site-editor-74zqYFaL.js} +1 -1
  55. package/dist/client/assets/agent-site-editor-code-Ccm9q6fU.js +2 -0
  56. package/dist/client/assets/agent-site-editor-content-CyDKeP5k.js +1 -0
  57. package/dist/client/assets/agent-site-editor-preview-IsxQOCuU.js +1 -0
  58. package/dist/client/assets/agent-view-B_d1jiLC.js +1 -0
  59. package/dist/client/assets/{agent-view-guard-DZvQvKvl.js → agent-view-guard-Bvnd0G7J.js} +1 -1
  60. package/dist/client/assets/{ai-providers-RlxMy215.js → ai-providers-C86HHWcI.js} +1 -1
  61. package/dist/client/assets/{alert-B5Ykyt3T.js → alert-Ddk4XOBP.js} +1 -1
  62. package/dist/client/assets/{analytics-sections-CrpfbEYH.js → analytics-sections-ttnA5J1P.js} +1 -1
  63. package/dist/client/assets/{api-keys-CSc7sP_x.js → api-keys-BDc0LqXX.js} +1 -1
  64. package/dist/client/assets/api-keys-BMQlJqLx.js +1 -0
  65. package/dist/client/assets/{app-editor-DghRfIjT.js → app-editor-BqOBHscf.js} +1 -1
  66. package/dist/client/assets/{asset-utils-BmMj5wge.js → asset-utils-CQgV2l5S.js} +1 -1
  67. package/dist/client/assets/{auth-catchall-D48r6PhG.js → auth-catchall-TyhKRaCF.js} +1 -1
  68. package/dist/client/assets/{auth-entry-C6mHpqQT.js → auth-entry-Bpiei21J.js} +1 -1
  69. package/dist/client/assets/{auth-U9K5aFal.js → auth-htV3gWDl.js} +1 -1
  70. package/dist/client/assets/{auth-split-layout-DZ8IOzfV.js → auth-split-layout-DcB3Nrin.js} +1 -1
  71. package/dist/client/assets/{authenticate-and-persist-oauth-DX8Wh7d9.js → authenticate-and-persist-oauth-BPizgCN9.js} +1 -1
  72. package/dist/client/assets/{automation-list-row-DFyb04uK.js → automation-list-row-eJAAzL38.js} +1 -1
  73. package/dist/client/assets/{automation-runs-Bq3l9enC.js → automation-runs-nA1rdWGx.js} +1 -1
  74. package/dist/client/assets/{automations-B2SGyI95.js → automations-BSnZhOU7.js} +1 -1
  75. package/dist/client/assets/{badge-C5mneqKN.js → badge-2MmgfPaN.js} +1 -1
  76. package/dist/client/assets/{block-document-DtjqDxVH.js → block-document-ou4uYvdS.js} +1 -1
  77. package/dist/client/assets/{blocks-preview-workspace-context-BddxrpRg.js → blocks-preview-workspace-context-s_XY_qcc.js} +1 -1
  78. package/dist/client/assets/{blocks-tab-states-BJKt49qf.js → blocks-tab-states-C3TVI4qC.js} +1 -1
  79. package/dist/client/assets/{blog-preview-url-DPwtQPzJ.js → blog-preview-url-C2NLmgi3.js} +1 -1
  80. package/dist/client/assets/{blog-schema-CMQLhziN.js → blog-schema-BZ5bXjzr.js} +1 -1
  81. package/dist/client/assets/{blog-source-gate-WyoFGgE-.js → blog-source-gate-D9hQSk7w.js} +1 -1
  82. package/dist/client/assets/{blog-view-gate-CS668Ila.js → blog-view-gate-Bfmpcuxi.js} +1 -1
  83. package/dist/client/assets/{buckets-DeXHPgox.js → buckets-Br_ZGNiu.js} +1 -1
  84. package/dist/client/assets/{build-improve-prompt-doc-DnDGx5OC.js → build-improve-prompt-doc-CaVCze7H.js} +1 -1
  85. package/dist/client/assets/{calendar-DbxCxf92.js → calendar-8DkTle43.js} +1 -1
  86. package/dist/client/assets/{capability-load-error-DCozEloC.js → capability-load-error-UJW8JSu-.js} +1 -1
  87. package/dist/client/assets/{category-editor-BmGhOvZr.js → category-editor-Dr07txuz.js} +1 -1
  88. package/dist/client/assets/{category-tree-5dEhPnK2.js → category-tree-CkEo0YAl.js} +1 -1
  89. package/dist/client/assets/{chart-Cy7LFFBX.js → chart-DogG6gJM.js} +1 -1
  90. package/dist/client/assets/{chat-context-BOjsomdh.js → chat-context-DWiThF8S.js} +1 -1
  91. package/dist/client/assets/{chat-draft-CYhwlCHc.js → chat-draft-B3jssFA8.js} +1 -1
  92. package/dist/client/assets/{checkbox-Bv8PV_aY.js → checkbox-BnIB6z48.js} +1 -1
  93. package/dist/client/assets/{choose-editor-DoyVAhj6.js → choose-editor-TvQtb_tG.js} +1 -1
  94. package/dist/client/assets/{cli-auth-success-DaytSyrs.js → cli-auth-success-ZAdvA-Xl.js} +1 -1
  95. package/dist/client/assets/{client-icons-CiAKjxAC.js → client-icons-DVQ-0ktS.js} +1 -1
  96. package/dist/client/assets/{cms-settings-editor-Cuu4FHx1.js → cms-settings-editor-CovIiNyS.js} +1 -1
  97. package/dist/client/assets/{cms-store-drafts-B9MSaBY6.js → cms-store-drafts-BSPHJVkT.js} +1 -1
  98. package/dist/client/assets/{collapsible-DdHbUgH7.js → collapsible-BFaoixTu.js} +1 -1
  99. package/dist/client/assets/{collection-detail-DyddcB5w.js → collection-detail-BowTRYxc.js} +1 -1
  100. package/dist/client/assets/{collection-display-button-DVJBx_vT.js → collection-display-button-C8-Z4iHs.js} +1 -1
  101. package/dist/client/assets/{collection-search-CwqvBBm4.js → collection-search-Bzs9Mv8d.js} +1 -1
  102. package/dist/client/assets/{collection-table-wrapper-DRrebKp3.js → collection-table-wrapper-D376ruwc.js} +1 -1
  103. package/dist/client/assets/{collection-tabs-81bsUeqm.js → collection-tabs-CLS4TDPh.js} +1 -1
  104. package/dist/client/assets/{combobox-BrOkSbhh.js → combobox-H2ovb-DO.js} +1 -1
  105. package/dist/client/assets/{command-woRMyGZF.js → command-HsZGGhEb.js} +1 -1
  106. package/dist/client/assets/{companion-mcps-section-B5-NAK1i.js → companion-mcps-section-CodCTohE.js} +1 -1
  107. package/dist/client/assets/{config-CuCmBQuJ.js → config-USouThEx.js} +1 -1
  108. package/dist/client/assets/{connect-HLDiwDO_.js → connect-C5hrcFB1.js} +1 -1
  109. package/dist/client/assets/{connect-layout-CWZCwH8X.js → connect-layout-DVa42aXM.js} +1 -1
  110. package/dist/client/assets/{connect-source-dialog-CBKuqqHC.js → connect-source-dialog-BZzC0_G0.js} +1 -1
  111. package/dist/client/assets/{connection-BIE1Vidl.js → connection-NXvPQOLL.js} +1 -1
  112. package/dist/client/assets/{connection-card-gYm1H9XQ.js → connection-card-ConjJ0hW.js} +1 -1
  113. package/dist/client/assets/{connection-detail-QqFuUNuZ.js → connection-detail-BXPHZvUS.js} +1 -1
  114. package/dist/client/assets/{connection-form-helpers-DA9irt8S.js → connection-form-helpers-m3kpO5UT.js} +1 -1
  115. package/dist/client/assets/{connection-slug-B8jXAB0J.js → connection-slug-Ca7qS-7c.js} +1 -1
  116. package/dist/client/assets/{connections-JyCHdBZv.js → connections-DUVJ4E8S.js} +1 -1
  117. package/dist/client/assets/{content-tab-DRXqlCUR.js → content-tab-CLSQtEPY.js} +3 -3
  118. package/dist/client/assets/{context-menu-DZcVKhkc.js → context-menu-ChEd2pqk.js} +1 -1
  119. package/dist/client/assets/{context-shell-Bemo51hp.js → context-shell-BwSw_hav.js} +3 -3
  120. package/dist/client/assets/{context-C-ghWKlt.js → context-uUJlzVhd.js} +1 -1
  121. package/dist/client/assets/{core.esm-Z0qYqKj9.js → core.esm-FuunRrAt.js} +1 -1
  122. package/dist/client/assets/{create-organization-dialog-D0g-fdvV.js → create-organization-dialog-Zgxxuc03.js} +1 -1
  123. package/dist/client/assets/{delete-copy-DJ_GOWB2.js → delete-copy-70AoILCz.js} +1 -1
  124. package/dist/client/assets/{device-hint-DfKyeTjV.js → device-hint-DmGomvvg.js} +1 -1
  125. package/dist/client/assets/{discover-D7XfOvTK.js → discover-DYm4HrFe.js} +1 -1
  126. package/dist/client/assets/{domain-settings-DLWYAbIO.js → domain-settings-qW_4jz57.js} +1 -1
  127. package/dist/client/assets/{drawer-BBqyYfPx.js → drawer-CEHmheEC.js} +1 -1
  128. package/dist/client/assets/{editor-D97Qyzcp.js → editor-2DOEfa-g.js} +1 -1
  129. package/dist/client/assets/{editor-classes-szltcTWs.js → editor-classes-oEHYD8ed.js} +1 -1
  130. package/dist/client/assets/{empty-message-DEKaeblB.js → empty-message-BJ9hht1U.js} +1 -1
  131. package/dist/client/assets/{empty-state-DpGHzg8-.js → empty-state-BYcwGXE6.js} +1 -1
  132. package/dist/client/assets/{empty-state-wwy36dTA.js → empty-state-wGW5h04R.js} +1 -1
  133. package/dist/client/assets/{experiments-tab-choice-CbqEz4gO.js → experiments-tab-choice-CPnbUsaT.js} +1 -1
  134. package/dist/client/assets/{extract-connection-data-CXg3fi8w.js → extract-connection-data-BgJsU8db.js} +1 -1
  135. package/dist/client/assets/{feature-gate-CveHfcPr.js → feature-gate-l0KEufHd.js} +1 -1
  136. package/dist/client/assets/{feature-paywall-DFIdKSLH.js → feature-paywall-U96_3IDe.js} +1 -1
  137. package/dist/client/assets/{file-explorer-OW5FLgme.js → file-explorer-CEr-AGV8.js} +1 -1
  138. package/dist/client/assets/{file-preview-BFUDJsk9.js → file-preview-CiOlTiCy.js} +1 -1
  139. package/dist/client/assets/{file-share-button-E0fcfsBv.js → file-share-button-DmFYrwEa.js} +1 -1
  140. package/dist/client/assets/{file-type-icon-hPTLm32j.js → file-type-icon-CIujMc16.js} +1 -1
  141. package/dist/client/assets/{folder-icon-DxENQi9B.js → folder-icon-D9t07Q_K.js} +1 -1
  142. package/dist/client/assets/{form-Bz_uprQc.js → form-COsiqxYx.js} +1 -1
  143. package/dist/client/assets/{frame-navigation-EV-98oaL.js → frame-navigation-DPuQG9u8.js} +1 -1
  144. package/dist/client/assets/{general-DmOZe5tS.js → general--BMDlcSt.js} +1 -1
  145. package/dist/client/assets/{github-icon-CR8sfoo5.js → github-icon-hdY5MZLp.js} +1 -1
  146. package/dist/client/assets/{held-block-view-DW-NjX-S.js → held-block-view-CjiZoLJN.js} +1 -1
  147. package/dist/client/assets/{home-C-1mJg3e.js → home-ne4NkQJ-.js} +1 -1
  148. package/dist/client/assets/{home-overview-DZ5M4FB8.js → home-overview-CXCvbMpa.js} +1 -1
  149. package/dist/client/assets/{hosted-reconcile-JJSMDis4.js → hosted-reconcile-EPXq16lo.js} +1 -1
  150. package/dist/client/assets/{icon-button-DqWSrNSZ.js → icon-button-DFp2kgCJ.js} +1 -1
  151. package/dist/client/assets/{index-CeHQIaZQ.js → index-B8yx4LYe.js} +1 -1
  152. package/dist/client/assets/{index-CfMRfSbP.js → index-BCGy-Hq3.js} +1 -1
  153. package/dist/client/assets/{index-CUuWKDNH.js → index-BHwwGeDM.js} +1 -1
  154. package/dist/client/assets/{index-BdtGqzV_.js → index-BNOS0JsS.js} +1 -1
  155. package/dist/client/assets/{index-B2FeU0Zw.js → index-BkzlbVCp.js} +1 -1
  156. package/dist/client/assets/{index-CyzY-fLE.js → index-BmIFAFOk.js} +1 -1
  157. package/dist/client/assets/{index-7-4YhBZz.js → index-BmltYjMQ.js} +1 -1
  158. package/dist/client/assets/{index-DE9SDic3.js → index-C33bhjQY.js} +1 -1
  159. package/dist/client/assets/{index-BlRhFO8i.js → index-Cb5p1J52.js} +1 -1
  160. package/dist/client/assets/{index-B0kMZVmC.js → index-Ckj4MapM.js} +3 -3
  161. package/dist/client/assets/{index-2LsnM_Ir.js → index-DBxc4w_4.js} +1 -1
  162. package/dist/client/assets/{index-lrnn1LFo.js → index-DMWerknW.js} +1 -1
  163. package/dist/client/assets/{index-aeiz-c5N.js → index-DPvDzlPf.js} +1 -1
  164. package/dist/client/assets/{index-CguuJrFu.js → index-DRqFz_gI.js} +1 -1
  165. package/dist/client/assets/{index-DJq5XMUI.js → index-MEpnpMvz.js} +1 -1
  166. package/dist/client/assets/{index-Dpqgfi8_.js → index-ZwN2wFBi.js} +1 -1
  167. package/dist/client/assets/{index-redirect-Tqe_ugUp.js → index-redirect-CzXIL6ZA.js} +1 -1
  168. package/dist/client/assets/{index-D3FgkNbL.js → index-ym2A_X-L.js} +1 -1
  169. package/dist/client/assets/{infiniteQueryObserver-Bpp7Nde9.js → infiniteQueryObserver-kaRGs7Hf.js} +1 -1
  170. package/dist/client/assets/{infra-billing-BVZxcUBX.js → infra-billing-D4ZX6jyj.js} +1 -1
  171. package/dist/client/assets/{input-D3CQKUJv.js → input-CcRoLVnu.js} +1 -1
  172. package/dist/client/assets/{input-ClzrEMuy.js → input-K73Hb7D2.js} +3 -3
  173. package/dist/client/assets/{integration-icon-BNTOj8TI.js → integration-icon-CgR8Zqe0.js} +1 -1
  174. package/dist/client/assets/{item-actions-DT1aQMAA.js → item-actions-DDmGjpnJ.js} +1 -1
  175. package/dist/client/assets/{jira-icon-CUdm8f26.js → jira-icon-MVqMO7bS.js} +1 -1
  176. package/dist/client/assets/{label-C8wqUUzx.js → label-B0c9G_Wj.js} +1 -1
  177. package/dist/client/assets/{layout-BrcEe09L.js → layout-DScf3mma.js} +1 -1
  178. package/dist/client/assets/{legacy-admin-welcome-dialog-5GoRU8S5.js → legacy-admin-welcome-dialog-qBk_j2Oe.js} +1 -1
  179. package/dist/client/assets/{legacy-agents-deep-Bf1vCfoJ.js → legacy-agents-deep-ly0BkhRn.js} +1 -1
  180. package/dist/client/assets/{legacy-main-redirect-Bh63rUhQ.js → legacy-main-redirect-DWWqrbYd.js} +1 -1
  181. package/dist/client/assets/library-BRaT6wQ7.js +1 -0
  182. package/dist/client/assets/{library-tab-BVzgC-sN.js → library-tab-CbPRTOYJ.js} +1 -1
  183. package/dist/client/assets/{login-DppNfiAq.js → login-vMjk4cCL.js} +1 -1
  184. package/dist/client/assets/{markdown-ChQfidu_.js → markdown-iiRSUjbj.js} +1 -1
  185. package/dist/client/assets/{mcp-app-renderer-Cqipo_fr.js → mcp-app-renderer-BWum_Yq_.js} +1 -1
  186. package/dist/client/assets/{mcp-oauth-BW9RlFd8.js → mcp-oauth-DY__Mn7q.js} +1 -1
  187. package/dist/client/assets/{mcp-oauth-C3I9E6hK.js → mcp-oauth-QpEcJw56.js} +1 -1
  188. package/dist/client/assets/{members-BPvSGNqH.js → members-3gpzixs9.js} +1 -1
  189. package/dist/client/assets/{memory-CQAa3mHm.js → memory-CVraGJet.js} +1 -1
  190. package/dist/client/assets/{mock-board-BMaXmonr.js → mock-board-Cyg7chND.js} +3 -3
  191. package/dist/client/assets/{monaco-editor-GCVIle1A.js → monaco-editor-CMyd4mpO.js} +1 -1
  192. package/dist/client/assets/{monitoring-RTFaXjle.js → monitoring-8mE1s3Sk.js} +1 -1
  193. package/dist/client/assets/{monitoring-stats-row-h4pC7kD6.js → monitoring-stats-row-C3X8BcFH.js} +1 -1
  194. package/dist/client/assets/{multi-select-sZG2voKq.js → multi-select-BqkNqG-G.js} +1 -1
  195. package/dist/client/assets/{mustache-BXaNyEgZ.js → mustache-BbbmaYy_.js} +1 -1
  196. package/dist/client/assets/{named-rule-step-EI_qv23D.js → named-rule-step-BD8vaW_9.js} +1 -1
  197. package/dist/client/assets/{named-rule-view-DcHqSDt-.js → named-rule-view-DX7lQk6g.js} +1 -1
  198. package/dist/client/assets/{new-project-dialog-B8ntXRJU.js → new-project-dialog-BoCiikdy.js} +1 -1
  199. package/dist/client/assets/{oauth-callback-p3ywWjTz.js → oauth-callback-CO3oFULc.js} +1 -1
  200. package/dist/client/assets/{oauth-callback-ai-provider-of2OYrpv.js → oauth-callback-ai-provider-BCh3vcng.js} +1 -1
  201. package/dist/client/assets/{oauth-consent-DpXLchYG.js → oauth-consent-E2-uqyO1.js} +1 -1
  202. package/dist/client/assets/{onboarding-DKqNWZqa.js → onboarding-BCIN3n_n.js} +1 -1
  203. package/dist/client/assets/{openai-conversation-CFoe4Qa0.js → openai-conversation-B1THhy6d.js} +1 -1
  204. package/dist/client/assets/{optimistic-project-sidebar-views-B5MpSmQi.js → optimistic-project-sidebar-views-BclI4lhv.js} +1 -1
  205. package/dist/client/assets/{order-monitor-day-DEpjybnZ.js → order-monitor-day-TnwuzaRA.js} +1 -1
  206. package/dist/client/assets/{organization-choice-DP7th0jj.js → organization-choice-DMs62edL.js} +1 -1
  207. package/dist/client/assets/{orgs-DPHlMXcd.js → orgs-Cnkmmus2.js} +1 -1
  208. package/dist/client/assets/{own-accounts-section-DwQLTK3b.js → own-accounts-section-CQf7o7wv.js} +1 -1
  209. package/dist/client/assets/{pair-BXQ1AL58.js → pair-CeaZHNjW.js} +1 -1
  210. package/dist/client/assets/{parse-sections-CW6TmrTp.js → parse-sections-CpzZzrk6.js} +2 -2
  211. package/dist/client/assets/{plan-DzDjgwtt.js → plan-HsIQZ-2c.js} +1 -1
  212. package/dist/client/assets/{plan-ladder-B0kBPdzm.js → plan-ladder-D2xrhhby.js} +1 -1
  213. package/dist/client/assets/{plan-usage-card-hmzG52qo.js → plan-usage-card-7peC5gus.js} +1 -1
  214. package/dist/client/assets/{popover-CLUI-WCq.js → popover-1KOagqvY.js} +1 -1
  215. package/dist/client/assets/{post-calendar-DGbwtgLH.js → post-calendar-ClIvvSw7.js} +1 -1
  216. package/dist/client/assets/{post-editor-Cb57gZLf.js → post-editor-CL9E0vn-.js} +1 -1
  217. package/dist/client/assets/{preview-content-YsDfk6M3.js → preview-content-BNngsjEI.js} +1 -1
  218. package/dist/client/assets/{preview-dialog-Bz6A7RNp.js → preview-dialog-Dh6wAotN.js} +1 -1
  219. package/dist/client/assets/{preview-panel-4Ms4IncO.js → preview-panel-SgknJwGz.js} +1 -1
  220. package/dist/client/assets/{preview-tab-DEm7tkhA.js → preview-tab-DPV-sr6_.js} +3 -3
  221. package/dist/client/assets/{product-picker-dialog-CNlHID1U.js → product-picker-dialog-CMSSaVrk.js} +1 -1
  222. package/dist/client/assets/{profile-Bt00wkq5.js → profile-CZrFmx7h.js} +1 -1
  223. package/dist/client/assets/{project-app-view-BTWft0P3.js → project-app-view-De-l3CgR.js} +1 -1
  224. package/dist/client/assets/{project-apps-XmfSXScr.js → project-apps-k8HMptd3.js} +1 -1
  225. package/dist/client/assets/{project-icon-BkeJc-xp.js → project-icon-BKBe96cc.js} +1 -1
  226. package/dist/client/assets/{project-index-C3tTBxDV.js → project-index-CbAWo0tj.js} +1 -1
  227. package/dist/client/assets/project-reports-Dp1r0k4Z.js +1 -0
  228. package/dist/client/assets/project-tasks-DdWqilqS.js +1 -0
  229. package/dist/client/assets/{projects-D_tybxDG.js → projects-NlD01O1C.js} +1 -1
  230. package/dist/client/assets/{projects-empty-state-BN5sLjWv.js → projects-empty-state-BDLV9rpC.js} +1 -1
  231. package/dist/client/assets/{prompts-CBKakZB5.js → prompts-BJcBRiOW.js} +1 -1
  232. package/dist/client/assets/{record-editor-DF0JyxbJ.js → record-editor-yPExbiTv.js} +1 -1
  233. package/dist/client/assets/{redirect-editor-DCz9NXOZ.js → redirect-editor-ByI7pOmQ.js} +1 -1
  234. package/dist/client/assets/{reports-Df9PLvuX.js → reports-dXIOsxf3.js} +1 -1
  235. package/dist/client/assets/{reports-onboarding-DCAmw-bq.js → reports-onboarding-hFr1Z7Ke.js} +1 -1
  236. package/dist/client/assets/reports-q7QaXuRD.js +1 -0
  237. package/dist/client/assets/{reports-tab-RfuGKaQ3.js → reports-tab-D7mVCD_Z.js} +2 -2
  238. package/dist/client/assets/{repositories-B40Xay0b.js → repositories-Bl3OrZiF.js} +1 -1
  239. package/dist/client/assets/repositories-JUhqi1Ee.js +1 -0
  240. package/dist/client/assets/{repository-binding-DqsJn1Sb.js → repository-binding-CH7r7brN.js} +1 -1
  241. package/dist/client/assets/{repository-picker-DjmqKxQp.js → repository-picker-CoAjKPWu.js} +1 -1
  242. package/dist/client/assets/{require-capability-11VEza5N.js → require-capability-CDM7cu-0.js} +1 -1
  243. package/dist/client/assets/{required-auth-layout-CnCT_9Qk.js → required-auth-layout-ZjFjMD09.js} +1 -1
  244. package/dist/client/assets/{reset-password-DhGtg5RA.js → reset-password-C8_WUU0G.js} +1 -1
  245. package/dist/client/assets/{resizable-DqI16h9r.js → resizable-DluOfdHp.js} +1 -1
  246. package/dist/client/assets/{resolve-tab-icon-SqRc32_W.js → resolve-tab-icon-_fU3pcJ8.js} +1 -1
  247. package/dist/client/assets/{review-settings-DsCgah9j.js → review-settings-CqyPCVmw.js} +1 -1
  248. package/dist/client/assets/{role-color-Bsnv2ruh.js → role-color-D2BIPP-Y.js} +1 -1
  249. package/dist/client/assets/{roles-CfgNfQ5D.js → roles-eLARL0lr.js} +1 -1
  250. package/dist/client/assets/{route-CF7rRyVo.js → route-CeUaduIj.js} +1 -1
  251. package/dist/client/assets/route-DhZv7zTa.js +1 -0
  252. package/dist/client/assets/{route-YS6zinDQ.js → route-DrxvAn00.js} +1 -1
  253. package/dist/client/assets/{sandbox-lifecycle-context-Cm_5q5SF.js → sandbox-lifecycle-context-Buz_SzWI.js} +1 -1
  254. package/dist/client/assets/{save-status-DQIuewYI.js → save-status-Dh8RiNyJ.js} +1 -1
  255. package/dist/client/assets/{schema-CMu2qDHJ.js → schema-CFD49b5R.js} +1 -1
  256. package/dist/client/assets/{schema-BtSfTK7H.js → schema-IMH2fbyE.js} +1 -1
  257. package/dist/client/assets/{scroll-area-CNyj4Q1_.js → scroll-area-7IjOkXaA.js} +1 -1
  258. package/dist/client/assets/{search-input-DfFZA2x_.js → search-input-J57XNHRR.js} +1 -1
  259. package/dist/client/assets/{search-toggle-BMP-t51j.js → search-toggle-BQacuk1T.js} +1 -1
  260. package/dist/client/assets/{secret-picker-Cia0fA6k.js → secret-picker-D-eT4fqr.js} +1 -1
  261. package/dist/client/assets/{secrets-Db72b1dr.js → secrets-rX9Sgqtx.js} +1 -1
  262. package/dist/client/assets/{section-array-field-CItEGXFU.js → section-array-field-CXs46rRO.js} +1 -1
  263. package/dist/client/assets/{sections-BnvGhIDh.js → sections-Der8b67h.js} +1 -1
  264. package/dist/client/assets/{sections-editor-8kOnY41Y.js → sections-editor-rsqZ0zX0.js} +1 -1
  265. package/dist/client/assets/{select-B-QXEyVH.js → select-CzHIA1ZP.js} +1 -1
  266. package/dist/client/assets/{select-model-BM57OK8a.js → select-model-CUm0gXy-.js} +1 -1
  267. package/dist/client/assets/{seo-editor-DUVQDKfJ.js → seo-editor-B3k4oTgO.js} +1 -1
  268. package/dist/client/assets/{separator-CZVEZSKr.js → separator-C8rbCtXT.js} +1 -1
  269. package/dist/client/assets/settings-tab-9OVWk8FJ.js +1 -0
  270. package/dist/client/assets/{sheet-DFpCUkzK.js → sheet-LMO2Ln_p.js} +1 -1
  271. package/dist/client/assets/{shell-layout-3tQDWFJU.js → shell-layout-C2C8qdsE.js} +1 -1
  272. package/dist/client/assets/{site-draft-actions-BT56hEH5.js → site-draft-actions-DVSJSpbm.js} +1 -1
  273. package/dist/client/assets/{site-draft-view-DaVZ51CU.js → site-draft-view-C-oT4QS-.js} +1 -1
  274. package/dist/client/assets/site-editor-DuBRbCBy.js +1 -0
  275. package/dist/client/assets/{site-editor-toast-DrPEsDU7.js → site-editor-toast-NcKSJm_A.js} +1 -1
  276. package/dist/client/assets/{skills-Bh8g9zPx.js → skills-oDAqiAY0.js} +1 -1
  277. package/dist/client/assets/{slider-D5-tjvxC.js → slider-Bfcuox96.js} +1 -1
  278. package/dist/client/assets/{sortable.esm-CD7Wn3a-.js → sortable.esm-Djzj6LTi.js} +1 -1
  279. package/dist/client/assets/{sso-CgVuMvqq.js → sso-yTAfsZ2v.js} +1 -1
  280. package/dist/client/assets/{suggestion-BjK1ijWQ.js → suggestion-DajZAFgd.js} +1 -1
  281. package/dist/client/assets/{super-agent-icon-D1UApnZ8.js → super-agent-icon-D0qxSSxp.js} +1 -1
  282. package/dist/client/assets/{switch-YFmb691t.js → switch-D7_Z0h5K.js} +1 -1
  283. package/dist/client/assets/{synced-repos-QaqG0EO3.js → synced-repos-lkhh3o-1.js} +1 -1
  284. package/dist/client/assets/{tab-icon-glyph-CjjddmUR.js → tab-icon-glyph-6eELGE3b.js} +1 -1
  285. package/dist/client/assets/{table-EoWRqCf0.js → table-CupY_YOD.js} +1 -1
  286. package/dist/client/assets/{tabs-BPfd6mHK.js → tabs-CfEge7dC.js} +1 -1
  287. package/dist/client/assets/{task-board-CjAeUa_m.js → task-board-Bjy19ZeT.js} +1 -1
  288. package/dist/client/assets/{task-route-Br2Lpz0h.js → task-route-DBxg89lE.js} +1 -1
  289. package/dist/client/assets/{task-status-e2bwwrq0.js → task-status-COmJd60B.js} +1 -1
  290. package/dist/client/assets/{taskboard-analytics-Dz_bNdVa.js → taskboard-analytics-Do9ulM0U.js} +1 -1
  291. package/dist/client/assets/tasks-BL_awQY4.js +1 -0
  292. package/dist/client/assets/{tasks-B4uBSKBg.js → tasks-DHFP5uDs.js} +1 -1
  293. package/dist/client/assets/{textarea-BDeCVCG_.js → textarea-CwMoIHX4.js} +1 -1
  294. package/dist/client/assets/{thread-analytics-DhaZl6TQ.js → thread-analytics-C6OXJGy5.js} +1 -1
  295. package/dist/client/assets/{thread-intent-oRL32U-K.js → thread-intent-B3Q-huPj.js} +1 -1
  296. package/dist/client/assets/{thread-route-Be5LHqPZ.js → thread-route-CjejQPup.js} +1 -1
  297. package/dist/client/assets/{thread-route-tkHuy51W.js → thread-route-DsWHorzr.js} +1 -1
  298. package/dist/client/assets/{thread-sheet-body-De3nDIYw.js → thread-sheet-body-Cd-Cn-jH.js} +1 -1
  299. package/dist/client/assets/{time-range-picker-RqJkhR4f.js → time-range-picker-B8-W2K6e.js} +1 -1
  300. package/dist/client/assets/{toggle-group-Dyg7Y_bS.js → toggle-group-CQgadYmC.js} +1 -1
  301. package/dist/client/assets/{tool-namespace-pd4DYce0.js → tool-namespace-DmqoWQ4e.js} +1 -1
  302. package/dist/client/assets/{tool-set-selector-BxflvD5s.js → tool-set-selector-DWuBmUKd.js} +1 -1
  303. package/dist/client/assets/{toolbar-icon-button-T_NjCrYE.js → toolbar-icon-button-DJdC-8B7.js} +1 -1
  304. package/dist/client/assets/{tooltip-BTKQq4Sy.js → tooltip-BDrd1lBk.js} +1 -1
  305. package/dist/client/assets/{tooltipContext-B3whzr3K.js → tooltipContext-BPkZdlyk.js} +1 -1
  306. package/dist/client/assets/{track-hg2uNpQa.js → track-B3UldxCN.js} +1 -1
  307. package/dist/client/assets/{types-DD9MvS2H.js → types-B_osoN-S.js} +1 -1
  308. package/dist/client/assets/{url-slug-CAaHyqrT.js → url-slug-DBDGG6PE.js} +1 -1
  309. package/dist/client/assets/{usage-stats-LrxjpMvT.js → usage-stats-BrEjL_IX.js} +1 -1
  310. package/dist/client/assets/{use-ai-providers-BnCLnm6i.js → use-ai-providers-CHfk_CLJ.js} +1 -1
  311. package/dist/client/assets/{use-apply-named-rule-CQGJ9Q6I.js → use-apply-named-rule-DBc2j5DB.js} +1 -1
  312. package/dist/client/assets/use-ask-in-chat-BRvXzT6t.js +1 -0
  313. package/dist/client/assets/{use-automations-CRCU5rUU.js → use-automations-kHu7N1ql.js} +1 -1
  314. package/dist/client/assets/{use-autosave-HJouXCY9.js → use-autosave-9pWqjYDA.js} +1 -1
  315. package/dist/client/assets/use-blocks-v8-project-Do8l7aur.js +1 -0
  316. package/dist/client/assets/{use-chat-layout-state-DZgmLot0.js → use-chat-layout-state-Du2lamgE.js} +1 -1
  317. package/dist/client/assets/{use-cms-publish-actions-CQn8AjkF.js → use-cms-publish-actions-CZnv5DMW.js} +1 -1
  318. package/dist/client/assets/{use-connect-companion-DgTOfpzN.js → use-connect-companion-B5y-W5Pd.js} +1 -1
  319. package/dist/client/assets/{use-connection-jMnM0Hiq.js → use-connection-Cz6D5NSl.js} +1 -1
  320. package/dist/client/assets/{use-content-sync-DvjyB8U-.js → use-content-sync-2mOR3FPu.js} +1 -1
  321. package/dist/client/assets/{use-copy-B36-QB7R.js → use-copy-Ny2hsZBb.js} +1 -1
  322. package/dist/client/assets/{use-date-fns-locale-CVz_yaSt.js → use-date-fns-locale-WCP1RJ6A.js} +1 -1
  323. package/dist/client/assets/{use-debounced-autosave-BCwvmx_C.js → use-debounced-autosave-BDkaj-wr.js} +1 -1
  324. package/dist/client/assets/{use-debounced-value-Be2K3Tgl.js → use-debounced-value-CPouCSBM.js} +1 -1
  325. package/dist/client/assets/{use-deco-credits-B5uE_Z9G.js → use-deco-credits-Bpb7VrXk.js} +1 -1
  326. package/dist/client/assets/{use-decopilot-events-144aPqKs.js → use-decopilot-events-DAAHbAJ8.js} +1 -1
  327. package/dist/client/assets/{use-delete-block-BSTpS7wO.js → use-delete-block-CgvZRkAz.js} +1 -1
  328. package/dist/client/assets/{use-delete-connection-BIASpF84.js → use-delete-connection-PmT312Qy.js} +1 -1
  329. package/dist/client/assets/{use-deployment-admin-CK9MBH_P.js → use-deployment-admin-Diay1iLK.js} +1 -1
  330. package/dist/client/assets/{use-entitlements-D0Sb8QlP.js → use-entitlements-D9Ct8Amk.js} +1 -1
  331. package/dist/client/assets/{use-fast-preview-draft-url-D9g7iX8I.js → use-fast-preview-draft-url-Dir946TD.js} +1 -1
  332. package/dist/client/assets/{use-file-configs-Tkt_AHql.js → use-file-configs-BcXWtzxC.js} +1 -1
  333. package/dist/client/assets/{use-id-selection-Cpsai2fK.js → use-id-selection-C1R8QtZl.js} +1 -1
  334. package/dist/client/assets/{use-inbox-feed-CUpQJBQD.js → use-inbox-feed-D__IqJAr.js} +1 -1
  335. package/dist/client/assets/{use-infinite-scroll-C-wdmvlm.js → use-infinite-scroll-B-p-eU3J.js} +1 -1
  336. package/dist/client/assets/{use-join-requests-D6nkHBhc.js → use-join-requests-D3k_gbbI.js} +1 -1
  337. package/dist/client/assets/{use-main-panel-tabs-DTIYfLGl.js → use-main-panel-tabs-C8oha61a.js} +1 -1
  338. package/dist/client/assets/{use-mcp-auth-status-C3bL-6Ja.js → use-mcp-auth-status-Cjf2I3y3.js} +1 -1
  339. package/dist/client/assets/{use-mcp-client-Cp7itm-S.js → use-mcp-client-B2rDMtrE.js} +1 -1
  340. package/dist/client/assets/{use-mcp-prompts-CF2bE4L8.js → use-mcp-prompts-DYPdVpef.js} +1 -1
  341. package/dist/client/assets/{use-mcp-tools-DqfH77AW.js → use-mcp-tools-2IyvnaHm.js} +1 -1
  342. package/dist/client/assets/{use-mobile-CMr55W3O.js → use-mobile-DfHgA8LN.js} +1 -1
  343. package/dist/client/assets/{use-move-blocks-vAC3BNbO.js → use-move-blocks-CEb9IJHa.js} +1 -1
  344. package/dist/client/assets/{use-navigate-to-agent-Bc47TXuM.js → use-navigate-to-agent-BPYZlYTF.js} +1 -1
  345. package/dist/client/assets/{use-never-published-622FRxP4.js → use-never-published-B1VAbjzG.js} +1 -1
  346. package/dist/client/assets/{use-org-fs-CnKWtsx6.js → use-org-fs-Dw8NgWuN.js} +1 -1
  347. package/dist/client/assets/{use-org-repo-syncs-CWan9UEi.js → use-org-repo-syncs-B6ZZE8jN.js} +1 -1
  348. package/dist/client/assets/{use-org-sso-Dx6waIv3.js → use-org-sso-C6B3C6hh.js} +1 -1
  349. package/dist/client/assets/{use-organization-settings-C44OxrrF.js → use-organization-settings-DzVYOA_w.js} +1 -1
  350. package/dist/client/assets/{use-project-native-view-presence-BOiBdd4j.js → use-project-native-view-presence-DKCzx0ab.js} +1 -1
  351. package/dist/client/assets/{use-project-scope-BpnU42cL.js → use-project-scope-ES_3uHyM.js} +1 -1
  352. package/dist/client/assets/{use-recent-apps-DIc0b7h6.js → use-recent-apps-BRiBdVnp.js} +1 -1
  353. package/dist/client/assets/{use-reports-diagnostic-l8XSuOVG.js → use-reports-diagnostic-BM06dnbX.js} +1 -1
  354. package/dist/client/assets/{use-sandbox-events-BTC_EPGc.js → use-sandbox-events-UI-V7x5C.js} +1 -1
  355. package/dist/client/assets/{use-secrets-CFtisZrp.js → use-secrets-BE6lWakr.js} +1 -1
  356. package/dist/client/assets/{use-section-preview-base-C9SoEJn0.js → use-section-preview-base-C_J8bA7c.js} +1 -1
  357. package/dist/client/assets/{use-sidebar-collapsed-V5_gd1MI.js → use-sidebar-collapsed-CZdcfBEK.js} +1 -1
  358. package/dist/client/assets/{use-tags-Cxhud9Xt.js → use-tags-DzxmgrrP.js} +1 -1
  359. package/dist/client/assets/{use-task-board-analytics-CpAa6pHW.js → use-task-board-analytics-BTkj9VsO.js} +1 -1
  360. package/dist/client/assets/{use-task-board-events-DspRxQsF.js → use-task-board-events-AFPQ3IaY.js} +1 -1
  361. package/dist/client/assets/{use-task-board-item-prs-CZVWQT5i.js → use-task-board-item-prs-Co26Lz0N.js} +1 -1
  362. package/dist/client/assets/{use-task-board-items-CzVlUMOO.js → use-task-board-items-D-V9hUJ7.js} +1 -1
  363. package/dist/client/assets/{use-task-board-prompts-ngKSI_fY.js → use-task-board-prompts-D_kD7Ykb.js} +1 -1
  364. package/dist/client/assets/{use-task-metadata-DiPyoyq1.js → use-task-metadata-qDDX-JKM.js} +1 -1
  365. package/dist/client/assets/{use-thread-outputs-BT9YWT4X.js → use-thread-outputs-DhPJ63Je.js} +1 -1
  366. package/dist/client/assets/{use-view-draft-kind-BTxfGo3P.js → use-view-draft-kind-CwsOl80j.js} +1 -1
  367. package/dist/client/assets/{use-voice-input-D66t9nvu.js → use-voice-input-ycbiUn9M.js} +1 -1
  368. package/dist/client/assets/useInfiniteQuery-CiRKSvQD.js +1 -0
  369. package/dist/client/assets/{useQueries-M4myONOE.js → useQueries-COB6YD0k.js} +1 -1
  370. package/dist/client/assets/useSuspenseInfiniteQuery-DOdzMfmO.js +1 -0
  371. package/dist/client/assets/{users-BRGauFES.js → users-BXTgI-CJ.js} +1 -1
  372. package/dist/client/assets/{utils-CZf0WW3u.js → utils-BcxvAJDI.js} +1 -1
  373. package/dist/client/assets/{variant-calendar-MTIN2TYC.js → variant-calendar-Cnt7eLII.js} +1 -1
  374. package/dist/client/assets/{variant-matcher-override-yvSV8zF4.js → variant-matcher-override-BY5EzDJm.js} +1 -1
  375. package/dist/client/assets/{view-header-D_yXL60l.js → view-header-C-ywzr1K.js} +1 -1
  376. package/dist/client/assets/{virtual-mcp-D2YHeobd.js → virtual-mcp-CcPkewkK.js} +1 -1
  377. package/dist/client/assets/{watch-sse-pool-DDOa1h_t.js → watch-sse-pool-VTD53pp7.js} +1 -1
  378. package/dist/client/index.html +1 -1
  379. package/dist/server/server.js +357 -357
  380. package/package.json +1 -1
  381. package/dist/client/assets/agent-app-DzDciOTO.js +0 -1
  382. package/dist/client/assets/agent-deck-BXpuyyHV.js +0 -1
  383. package/dist/client/assets/agent-experiments-BL62SJmo.js +0 -1
  384. package/dist/client/assets/agent-library-BFYPXgq1.js +0 -1
  385. package/dist/client/assets/agent-library-file-DKeb8aqf.js +0 -1
  386. package/dist/client/assets/agent-overview-D5jCjQVj.js +0 -1
  387. package/dist/client/assets/agent-settings-ESG9192X.js +0 -1
  388. package/dist/client/assets/agent-site-editor-code-BQnTQU7w.js +0 -2
  389. package/dist/client/assets/agent-site-editor-content-qd-na2CD.js +0 -1
  390. package/dist/client/assets/agent-site-editor-preview-BXjMAtak.js +0 -1
  391. package/dist/client/assets/agent-view-BLgY0MfR.js +0 -1
  392. package/dist/client/assets/api-keys-vIp11w3k.js +0 -1
  393. package/dist/client/assets/library-CdyTGa2g.js +0 -1
  394. package/dist/client/assets/project-reports-CWeaaEZO.js +0 -1
  395. package/dist/client/assets/project-tasks-jNfpaaGU.js +0 -1
  396. package/dist/client/assets/reports-CffaUFeU.js +0 -1
  397. package/dist/client/assets/repositories-B_3cIxMq.js +0 -1
  398. package/dist/client/assets/route-DJv7Nx6V.js +0 -1
  399. package/dist/client/assets/settings-tab-B9XpN8jX.js +0 -1
  400. package/dist/client/assets/site-editor-DhUm8vlF.js +0 -1
  401. package/dist/client/assets/tasks-CwupKgpp.js +0 -1
  402. package/dist/client/assets/use-ask-in-chat-Bn7rwpYM.js +0 -1
  403. package/dist/client/assets/use-blocks-v8-project-Dd6JSEDd.js +0 -1
  404. package/dist/client/assets/useInfiniteQuery-BLIxG3uZ.js +0 -1
  405. package/dist/client/assets/useSuspenseInfiniteQuery-BJmR9zYx.js +0 -1
@@ -1 +1 @@
1
- import{c as r,a4 as f,ak as y,K as S,i as _,q as d,e as R}from"./index-B0kMZVmC.js";const p=5e3;function m(e){return(e??[]).some(n=>!n.lastSyncedAt&&!n.lastSyncError)}function g(){const e=r.c(7),{org:n}=f(),t=y();let i;e[0]!==n.id?(i=S.orgRepoSyncs(n.id),e[0]=n.id,e[1]=i):i=e[1];let s;e[2]!==t?(s=async()=>(await t.call("ORG_REPO_SYNC_LIST",{})).configs,e[2]=t,e[3]=s):s=e[3];let o;return e[4]!==i||e[5]!==s?(o={queryKey:i,staleTime:6e4,refetchInterval:E,queryFn:s},e[4]=i,e[5]=s,e[6]=o):o=e[6],_(o)}function E(e){return m(e.state.data)?p:!1}function P(){const e=r.c(2),n=g();let t;return e[0]!==n.data?(t=new Set((n.data??[]).map(O)),e[0]=n.data,e[1]=t):t=e[1],t}function O(e){return e.volume}function q(){const e=r.c(12),{org:n}=f(),t=y(),i=d();let s;e[0]!==n||e[1]!==i?(s=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[0]=n,e[1]=i,e[2]=s):s=e[2];const o=s;let c;e[3]!==t?(c=async u=>(await t.call("ORG_REPO_SYNC_CREATE",u)).config,e[3]=t,e[4]=c):c=e[4];let a;e[5]!==o||e[6]!==t?(a=u=>{t.call("ORG_REPO_SYNC_RUN",{id:u.id}).catch(C).then(o)},e[5]=o,e[6]=t,e[7]=a):a=e[7];let l;return e[8]!==o||e[9]!==c||e[10]!==a?(l={mutationFn:c,onSuccess:a,onSettled:o},e[8]=o,e[9]=c,e[10]=a,e[11]=l):l=e[11],R(l)}function C(){return null}function T(){const e=r.c(8),{org:n}=f(),t=y(),i=d();let s;e[0]!==t?(s=a=>t.call("ORG_REPO_SYNC_DELETE",{id:a}),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==n||e[3]!==i?(o=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[2]=n,e[3]=i,e[4]=o):o=e[4];let c;return e[5]!==s||e[6]!==o?(c={mutationFn:s,onSettled:o},e[5]=s,e[6]=o,e[7]=c):c=e[7],R(c)}export{P as a,q as b,T as c,g as u};
1
+ import{c as r,a4 as f,ak as y,K as S,i as _,q as d,e as R}from"./index-Ckj4MapM.js";const p=5e3;function m(e){return(e??[]).some(n=>!n.lastSyncedAt&&!n.lastSyncError)}function g(){const e=r.c(7),{org:n}=f(),t=y();let i;e[0]!==n.id?(i=S.orgRepoSyncs(n.id),e[0]=n.id,e[1]=i):i=e[1];let s;e[2]!==t?(s=async()=>(await t.call("ORG_REPO_SYNC_LIST",{})).configs,e[2]=t,e[3]=s):s=e[3];let o;return e[4]!==i||e[5]!==s?(o={queryKey:i,staleTime:6e4,refetchInterval:E,queryFn:s},e[4]=i,e[5]=s,e[6]=o):o=e[6],_(o)}function E(e){return m(e.state.data)?p:!1}function P(){const e=r.c(2),n=g();let t;return e[0]!==n.data?(t=new Set((n.data??[]).map(O)),e[0]=n.data,e[1]=t):t=e[1],t}function O(e){return e.volume}function q(){const e=r.c(12),{org:n}=f(),t=y(),i=d();let s;e[0]!==n||e[1]!==i?(s=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[0]=n,e[1]=i,e[2]=s):s=e[2];const o=s;let c;e[3]!==t?(c=async u=>(await t.call("ORG_REPO_SYNC_CREATE",u)).config,e[3]=t,e[4]=c):c=e[4];let a;e[5]!==o||e[6]!==t?(a=u=>{t.call("ORG_REPO_SYNC_RUN",{id:u.id}).catch(C).then(o)},e[5]=o,e[6]=t,e[7]=a):a=e[7];let l;return e[8]!==o||e[9]!==c||e[10]!==a?(l={mutationFn:c,onSuccess:a,onSettled:o},e[8]=o,e[9]=c,e[10]=a,e[11]=l):l=e[11],R(l)}function C(){return null}function T(){const e=r.c(8),{org:n}=f(),t=y(),i=d();let s;e[0]!==t?(s=a=>t.call("ORG_REPO_SYNC_DELETE",{id:a}),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==n||e[3]!==i?(o=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[2]=n,e[3]=i,e[4]=o):o=e[4];let c;return e[5]!==s||e[6]!==o?(c={mutationFn:s,onSettled:o},e[5]=s,e[6]=o,e[7]=c):c=e[7],R(c)}export{P as a,q as b,T as c,g as u};
@@ -1 +1 @@
1
- import{c as u,i as S,q as r,e as y,K as c}from"./index-B0kMZVmC.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function m(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{C as a,O as b,m as c,h as d,q as u};
1
+ import{c as u,i as S,q as r,e as y,K as c}from"./index-Ckj4MapM.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function m(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{C as a,O as b,m as c,h as d,q as u};
@@ -1 +1 @@
1
- import{c as u,a as w,dS as b,a4 as E,i as F,al as M,K as y,ak as T,q as A,e as O}from"./index-B0kMZVmC.js";import{D as C,o as G,a as $}from"./schema-CMu2qDHJ.js";import{r as z}from"./task-board-CjAeUa_m.js";const I={organizationId:"",sidebar_items:null,coding_agent_mcp_excluded:null,simple_mode:null,default_home_agents:null,flags:null,submodule_credentials:null},x={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function P(t,e){return{queryKey:y.organizationSettings(e),queryFn:async()=>{try{return await M(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...I,organizationId:e}}},staleTime:6e4}}function c(t){const e=u.c(7),{org:n}=E();let s;e[0]!==n.id||e[1]!==n.slug?(s=P(n.slug,n.id),e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const o=t,a=!!n.id;let i;return e[3]!==s||e[4]!==o||e[5]!==a?(i={...s,select:o,enabled:a},e[3]=s,e[4]=o,e[5]=a,e[6]=i):i=e[6],F(i)}function _(){const t=u.c(9),{org:e}=E(),n=T(),s=A();let o;t[0]!==e||t[1]!==n?(o=async l=>{const r=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...l});if(!r)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return r},t[0]=e,t[1]=n,t[2]=o):o=t[2];let a;t[3]!==e||t[4]!==s?(a=l=>{s.setQueryData(y.organizationSettings(e.id),r=>({...r??I,...l}))},t[3]=e,t[4]=s,t[5]=a):a=t[5];let i;return t[6]!==o||t[7]!==a?(i={mutationFn:o,onSuccess:a},t[6]=o,t[7]=a,t[8]=i):i=t[8],O(i)}function R(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:x}function Y(){const{data:t}=c(D);return t??x}function D(t){return R(t.simple_mode)}function j(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i)=>e.mutate({simple_mode:a},i),s=(a,i)=>e.mutateAsync({simple_mode:a},i),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function B(){return d("reports_only")}function d(t){const e=u.c(5);let n;e[0]!==t?(n=a=>G(a.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s}=c(n);let o;return e[2]!==s||e[3]!==t?(o=s??C.has(t),e[2]=s,e[3]=t,e[4]=o):o=e[4],o}function V(t){const e=u.c(6);let n;e[0]!==t?(n=i=>G(i.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s,isError:o}=c(n);let a;return e[2]!==s||e[3]!==t||e[4]!==o?(a=s??(o?C.has(t):void 0),e[2]=s,e[3]=t,e[4]=o,e[5]=a):a=e[5],a}function W(){const t=d("chat_harness_sandbox_only");return b().runtime.agentSandbox&&t}function H(){const t=u.c(8),{org:e}=E(),n=T(),s=A();let o;t[0]!==n?(o=l=>n.call("ORGANIZATION_BLOCKS_EDITOR_SET",{enabled:l}),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==e||t[3]!==s?(a=l=>{const{enabled:r}=l;s.setQueryData(y.organizationSettings(e.id),m=>m&&{...m,flags:{...m.flags,new_blocks_editor:r}})},t[2]=e,t[3]=s,t[4]=a):a=t[4];let i;return t[5]!==o||t[6]!==a?(i={mutationFn:o,onSuccess:a},t[5]=o,t[6]=a,t[7]=i):i=t[7],O(i)}function k(t){return!!t&&t.trim().toLowerCase().endsWith("@deco.cx")}function J(){const t=u.c(8),{data:e}=w.useSession(),n=b();let s;t[0]!==n.auth.localMode||t[1]!==e?.user?.email?(s=n.auth.localMode===!0||k(e?.user?.email),t[0]=n.auth.localMode,t[1]=e?.user?.email,t[2]=s):s=t[2];const o=s,a=n.hostingControlPlaneGa===!0,i=n.monitorGa===!0,l=d("hosting_enabled"),r=d("e2e_enabled"),m=d("monitor_enabled"),N=d("experiments_enabled"),g=o||a||l,S=o||a||r,p=o||i||m,h=o||a||N;let f;return t[3]!==g||t[4]!==S||t[5]!==p||t[6]!==h?(f={hosting:g,e2e:S,monitor:p,experiments:h},t[3]=g,t[4]=S,t[5]=p,t[6]=h,t[7]=f):f=t[7],f}function X(){const{data:t}=c(L);return t??!1}function L(t){return $(t.flags)}function tt(){const{data:t}=c(q);return t??!0}function q(t){return z(t.flags)}function et(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i,l)=>e.mutate({flags:{[a]:i}},l),s=(a,i,l)=>e.mutateAsync({flags:{[a]:i}},l),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function nt(){const t=u.c(2),{data:e}=c(Q);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function Q(t){return t.coding_agent_mcp_excluded}function st(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutate({coding_agent_mcp_excluded:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutate:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function ot(){const t=u.c(2),{data:e}=c(U);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function U(t){return t.submodule_credentials}function at(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutateAsync({submodule_credentials:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutateAsync:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}export{d as a,W as b,V as c,Y as d,J as e,tt as f,H as g,X as h,et as i,nt as j,st as k,j as l,ot as m,at as n,B as u};
1
+ import{c as u,a as w,dS as b,a4 as E,i as F,al as M,K as y,ak as T,q as A,e as O}from"./index-Ckj4MapM.js";import{D as C,o as G,a as $}from"./schema-CFD49b5R.js";import{r as z}from"./task-board-Bjy19ZeT.js";const I={organizationId:"",sidebar_items:null,coding_agent_mcp_excluded:null,simple_mode:null,default_home_agents:null,flags:null,submodule_credentials:null},x={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function P(t,e){return{queryKey:y.organizationSettings(e),queryFn:async()=>{try{return await M(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...I,organizationId:e}}},staleTime:6e4}}function c(t){const e=u.c(7),{org:n}=E();let s;e[0]!==n.id||e[1]!==n.slug?(s=P(n.slug,n.id),e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const o=t,a=!!n.id;let i;return e[3]!==s||e[4]!==o||e[5]!==a?(i={...s,select:o,enabled:a},e[3]=s,e[4]=o,e[5]=a,e[6]=i):i=e[6],F(i)}function _(){const t=u.c(9),{org:e}=E(),n=T(),s=A();let o;t[0]!==e||t[1]!==n?(o=async l=>{const r=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...l});if(!r)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return r},t[0]=e,t[1]=n,t[2]=o):o=t[2];let a;t[3]!==e||t[4]!==s?(a=l=>{s.setQueryData(y.organizationSettings(e.id),r=>({...r??I,...l}))},t[3]=e,t[4]=s,t[5]=a):a=t[5];let i;return t[6]!==o||t[7]!==a?(i={mutationFn:o,onSuccess:a},t[6]=o,t[7]=a,t[8]=i):i=t[8],O(i)}function R(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:x}function Y(){const{data:t}=c(D);return t??x}function D(t){return R(t.simple_mode)}function j(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i)=>e.mutate({simple_mode:a},i),s=(a,i)=>e.mutateAsync({simple_mode:a},i),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function B(){return d("reports_only")}function d(t){const e=u.c(5);let n;e[0]!==t?(n=a=>G(a.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s}=c(n);let o;return e[2]!==s||e[3]!==t?(o=s??C.has(t),e[2]=s,e[3]=t,e[4]=o):o=e[4],o}function V(t){const e=u.c(6);let n;e[0]!==t?(n=i=>G(i.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s,isError:o}=c(n);let a;return e[2]!==s||e[3]!==t||e[4]!==o?(a=s??(o?C.has(t):void 0),e[2]=s,e[3]=t,e[4]=o,e[5]=a):a=e[5],a}function W(){const t=d("chat_harness_sandbox_only");return b().runtime.agentSandbox&&t}function H(){const t=u.c(8),{org:e}=E(),n=T(),s=A();let o;t[0]!==n?(o=l=>n.call("ORGANIZATION_BLOCKS_EDITOR_SET",{enabled:l}),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==e||t[3]!==s?(a=l=>{const{enabled:r}=l;s.setQueryData(y.organizationSettings(e.id),m=>m&&{...m,flags:{...m.flags,new_blocks_editor:r}})},t[2]=e,t[3]=s,t[4]=a):a=t[4];let i;return t[5]!==o||t[6]!==a?(i={mutationFn:o,onSuccess:a},t[5]=o,t[6]=a,t[7]=i):i=t[7],O(i)}function k(t){return!!t&&t.trim().toLowerCase().endsWith("@deco.cx")}function J(){const t=u.c(8),{data:e}=w.useSession(),n=b();let s;t[0]!==n.auth.localMode||t[1]!==e?.user?.email?(s=n.auth.localMode===!0||k(e?.user?.email),t[0]=n.auth.localMode,t[1]=e?.user?.email,t[2]=s):s=t[2];const o=s,a=n.hostingControlPlaneGa===!0,i=n.monitorGa===!0,l=d("hosting_enabled"),r=d("e2e_enabled"),m=d("monitor_enabled"),N=d("experiments_enabled"),g=o||a||l,S=o||a||r,p=o||i||m,h=o||a||N;let f;return t[3]!==g||t[4]!==S||t[5]!==p||t[6]!==h?(f={hosting:g,e2e:S,monitor:p,experiments:h},t[3]=g,t[4]=S,t[5]=p,t[6]=h,t[7]=f):f=t[7],f}function X(){const{data:t}=c(L);return t??!1}function L(t){return $(t.flags)}function tt(){const{data:t}=c(q);return t??!0}function q(t){return z(t.flags)}function et(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i,l)=>e.mutate({flags:{[a]:i}},l),s=(a,i,l)=>e.mutateAsync({flags:{[a]:i}},l),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function nt(){const t=u.c(2),{data:e}=c(Q);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function Q(t){return t.coding_agent_mcp_excluded}function st(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutate({coding_agent_mcp_excluded:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutate:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function ot(){const t=u.c(2),{data:e}=c(U);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function U(t){return t.submodule_credentials}function at(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutateAsync({submodule_credentials:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutateAsync:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}export{d as a,W as b,V as c,Y as d,J as e,tt as f,H as g,X as h,et as i,nt as j,st as k,j as l,ot as m,at as n,B as u};
@@ -1 +1 @@
1
- import{c as v,a4 as W,dS as y,gS as B,i as C,K as N}from"./index-B0kMZVmC.js";import{m as F}from"./match-site-slug-config-D3fUJ6vX.js";import{u as J}from"./use-file-configs-Tkt_AHql.js";import{f as K}from"./use-view-draft-kind-BTxfGo3P.js";import{e as U}from"./use-organization-settings-C44OxrrF.js";import{b as $}from"./use-blocks-v8-project-Dd6JSEDd.js";const u=["overview","context","monitor","plan","reports","board","site-editor","calendar","experiments","blog","assets","releases","hosting","e2e","automations"],k=["overview","reports","board","site-editor","blog"],O=1,h=["overview","context","monitor","plan","board"],q=["blog"],L=["calendar","experiments"],Q=["hosting"],H={calendar:!1,hosting:!1,"site-editor":!1,blog:!1};function T(t){return[...h,...t.calendar?L:[],...t.hosting&&t["site-editor"]?Q:[],...t.blog?q:[]]}function Y(t,e){const n=new Set(t??[]);return T(e).filter(s=>!n.has(s))}function ae(t,e,n){const s=new Set([...t??[],...T({...e,"site-editor":e["site-editor"]&&n.includes("site-editor")})]);return u.filter(r=>s.has(r))}function le(t,e){if(!t&&e===void 0)return new Set(h);const n=new Set(e!==void 0?g(e,O):g(G(t),t?.sidebarViewsVersion,Y(t?.sidebarViewsSeen,H)));return new Set(h.filter(s=>n.has(s)))}const z=["calendar","experiments","assets","releases","hosting","e2e"];function fe(t,e,n){if(!t)return{project:n??null,resolvedScopeId:null};const s=e?.id===t?e:n?.id===t?n:null;return{project:s,resolvedScopeId:s?t:null}}function G(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function g(t,e,n=[]){const s=new Set(t??[]);if(e!==O)for(const r of k)s.add(r);for(const r of n)r==="hosting"&&!s.has("site-editor")||s.add(r);return u.filter(r=>s.has(r))}function X(t){return u.some(e=>e===t)}function Z(t){return z.some(e=>e===t)}function M(t,e){return{overview:t,context:!0,monitor:!0,plan:!0,reports:t,board:t,"site-editor":t,blog:t&&e.blog===!0,assets:e.assets,releases:t&&e.releases,hosting:e.hosting,e2e:e.e2e,calendar:t&&e.calendar,experiments:t&&e.experiments,automations:!0}}function ue(t,e,n){const s=M(e,n);return t?s:{...s,overview:!0,reports:!0,board:!0}}function de(t,e,n,s=[]){const r=new Set(g(t,n,s));return u.filter(o=>e[o]&&r.has(o))}function Se(t,e,n){return n||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function be(t){return u.filter(e=>t[e])}function ee(t,e,n){return!X(t)||e[t]?!1:t==="blog"?n.blog!==!0:!Z(t)||t==="releases"||t==="calendar"||t==="experiments"?!0:!(t==="assets"?n.assets:n.siteAccess)}function Ve(t,e,n,s,r){return ee(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,n)||t==="content"&&!s.includes("content")||t==="code"&&r&&!s.includes("code")}function ge(t,e,n,s){const r=new Set(g(t,s));return n?r.add(e):r.delete(e),u.filter(o=>r.has(o))}function we(t){const e=v.c(21),{org:n}=W(),s=y(),r=U(),o=K(),i=J();let c;e[0]!==t?(c=$(t),e[0]=t,e[1]=c):c=e[1];const d=c;let S;e[2]!==t?(S=B(t),e[2]=t,e[3]=S):S=e[3];const a=S,w=s.hostingEnabled===!0,x=w&&!!a,D=te(n.slug,a,x),R=D.data?.owned===!0;let l;e[4]!==i.data?.configs?(l=i.data?.configs??[],e[4]=i.data?.configs,e[5]=l):l=e[5];let b;e[6]!==a||e[7]!==l?(b=F(l,a),e[6]=a,e[7]=l,e[8]=b):b=e[8];const P=!!b,E=d&&!!t?.metadata?.siteSlug,m=w&&R&&r.hosting,p=w&&R&&r.e2e,_=o===!0;let f;e[9]!==P||e[10]!==E||e[11]!==m||e[12]!==p||e[13]!==_||e[14]!==d?(f={assets:P,releases:E,hosting:m,e2e:p,calendar:d,experiments:d,blog:_},e[9]=P,e[10]=E,e[11]=m,e[12]=p,e[13]=_,e[14]=d,e[15]=f):f=e[15];const A=!!a&&i.isPending,I=x&&D.isPending,j=o===void 0;let V;return e[16]!==A||e[17]!==I||e[18]!==j||e[19]!==f?(V={presence:f,assetsPending:A,siteAccessPending:I,blogPending:j},e[16]=A,e[17]=I,e[18]=j,e[19]=f,e[20]=V):V=e[20],V}function te(t,e,n){const s=v.c(10);let r;s[0]!==t||s[1]!==e?(r=N.hostingAccess(t,e??""),s[0]=t,s[1]=e,s[2]=r):r=s[2];let o;s[3]!==t||s[4]!==e?(o=async()=>{const c=await fetch(`/api/${t}/hosting/${encodeURIComponent(e??"")}/access`);return c.ok?await c.json():{owned:!1,canWrite:!1}},s[3]=t,s[4]=e,s[5]=o):o=s[5];let i;return s[6]!==n||s[7]!==r||s[8]!==o?(i={queryKey:r,queryFn:o,enabled:n,staleTime:6e4},s[6]=n,s[7]=r,s[8]=o,s[9]=i):i=s[9],C(i)}export{u as P,de as a,O as b,fe as c,ue as d,Ve as e,ee as f,g,be as h,Z as i,h as j,ae as k,Se as l,Y as o,M as p,G as r,le as s,ge as t,we as u};
1
+ import{c as v,a4 as W,dS as y,gS as B,i as C,K as N}from"./index-Ckj4MapM.js";import{m as F}from"./match-site-slug-config-D3fUJ6vX.js";import{u as J}from"./use-file-configs-BcXWtzxC.js";import{f as K}from"./use-view-draft-kind-CwsOl80j.js";import{e as U}from"./use-organization-settings-DzVYOA_w.js";import{b as $}from"./use-blocks-v8-project-Do8l7aur.js";const u=["overview","context","monitor","plan","reports","board","site-editor","calendar","experiments","blog","assets","releases","hosting","e2e","automations"],k=["overview","reports","board","site-editor","blog"],O=1,h=["overview","context","monitor","plan","board"],q=["blog"],L=["calendar","experiments"],Q=["hosting"],H={calendar:!1,hosting:!1,"site-editor":!1,blog:!1};function T(t){return[...h,...t.calendar?L:[],...t.hosting&&t["site-editor"]?Q:[],...t.blog?q:[]]}function Y(t,e){const n=new Set(t??[]);return T(e).filter(s=>!n.has(s))}function ae(t,e,n){const s=new Set([...t??[],...T({...e,"site-editor":e["site-editor"]&&n.includes("site-editor")})]);return u.filter(r=>s.has(r))}function le(t,e){if(!t&&e===void 0)return new Set(h);const n=new Set(e!==void 0?g(e,O):g(G(t),t?.sidebarViewsVersion,Y(t?.sidebarViewsSeen,H)));return new Set(h.filter(s=>n.has(s)))}const z=["calendar","experiments","assets","releases","hosting","e2e"];function fe(t,e,n){if(!t)return{project:n??null,resolvedScopeId:null};const s=e?.id===t?e:n?.id===t?n:null;return{project:s,resolvedScopeId:s?t:null}}function G(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function g(t,e,n=[]){const s=new Set(t??[]);if(e!==O)for(const r of k)s.add(r);for(const r of n)r==="hosting"&&!s.has("site-editor")||s.add(r);return u.filter(r=>s.has(r))}function X(t){return u.some(e=>e===t)}function Z(t){return z.some(e=>e===t)}function M(t,e){return{overview:t,context:!0,monitor:!0,plan:!0,reports:t,board:t,"site-editor":t,blog:t&&e.blog===!0,assets:e.assets,releases:t&&e.releases,hosting:e.hosting,e2e:e.e2e,calendar:t&&e.calendar,experiments:t&&e.experiments,automations:!0}}function ue(t,e,n){const s=M(e,n);return t?s:{...s,overview:!0,reports:!0,board:!0}}function de(t,e,n,s=[]){const r=new Set(g(t,n,s));return u.filter(o=>e[o]&&r.has(o))}function Se(t,e,n){return n||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function be(t){return u.filter(e=>t[e])}function ee(t,e,n){return!X(t)||e[t]?!1:t==="blog"?n.blog!==!0:!Z(t)||t==="releases"||t==="calendar"||t==="experiments"?!0:!(t==="assets"?n.assets:n.siteAccess)}function Ve(t,e,n,s,r){return ee(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,n)||t==="content"&&!s.includes("content")||t==="code"&&r&&!s.includes("code")}function ge(t,e,n,s){const r=new Set(g(t,s));return n?r.add(e):r.delete(e),u.filter(o=>r.has(o))}function we(t){const e=v.c(21),{org:n}=W(),s=y(),r=U(),o=K(),i=J();let c;e[0]!==t?(c=$(t),e[0]=t,e[1]=c):c=e[1];const d=c;let S;e[2]!==t?(S=B(t),e[2]=t,e[3]=S):S=e[3];const a=S,w=s.hostingEnabled===!0,x=w&&!!a,D=te(n.slug,a,x),R=D.data?.owned===!0;let l;e[4]!==i.data?.configs?(l=i.data?.configs??[],e[4]=i.data?.configs,e[5]=l):l=e[5];let b;e[6]!==a||e[7]!==l?(b=F(l,a),e[6]=a,e[7]=l,e[8]=b):b=e[8];const P=!!b,E=d&&!!t?.metadata?.siteSlug,m=w&&R&&r.hosting,p=w&&R&&r.e2e,_=o===!0;let f;e[9]!==P||e[10]!==E||e[11]!==m||e[12]!==p||e[13]!==_||e[14]!==d?(f={assets:P,releases:E,hosting:m,e2e:p,calendar:d,experiments:d,blog:_},e[9]=P,e[10]=E,e[11]=m,e[12]=p,e[13]=_,e[14]=d,e[15]=f):f=e[15];const A=!!a&&i.isPending,I=x&&D.isPending,j=o===void 0;let V;return e[16]!==A||e[17]!==I||e[18]!==j||e[19]!==f?(V={presence:f,assetsPending:A,siteAccessPending:I,blogPending:j},e[16]=A,e[17]=I,e[18]=j,e[19]=f,e[20]=V):V=e[20],V}function te(t,e,n){const s=v.c(10);let r;s[0]!==t||s[1]!==e?(r=N.hostingAccess(t,e??""),s[0]=t,s[1]=e,s[2]=r):r=s[2];let o;s[3]!==t||s[4]!==e?(o=async()=>{const c=await fetch(`/api/${t}/hosting/${encodeURIComponent(e??"")}/access`);return c.ok?await c.json():{owned:!1,canWrite:!1}},s[3]=t,s[4]=e,s[5]=o):o=s[5];let i;return s[6]!==n||s[7]!==r||s[8]!==o?(i={queryKey:r,queryFn:o,enabled:n,staleTime:6e4},s[6]=n,s[7]=r,s[8]=o,s[9]=i):i=s[9],C(i)}export{u as P,de as a,O as b,fe as c,ue as d,Ve as e,ee as f,g,be as h,Z as i,h as j,ae as k,Se as l,Y as o,M as p,G as r,le as s,ge as t,we as u};
@@ -1 +1 @@
1
- import{c as _,f as P,u as T,d as N,cK as R,dI as E,cI as k,ae as l}from"./index-B0kMZVmC.js";import{d as C,b as O,p as w}from"./repository-binding-DqsJn1Sb.js";const x=1;function b(e){return(e??[]).filter(E)}function M(){const e=_.c(4);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const r=P(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const t=T(n);if(r.agentId)return r.agentId;let a;return e[2]!==t?(a="virtualmcpid"in t&&typeof t.virtualmcpid=="string"?t.virtualmcpid.trim():void 0,e[2]=t,e[3]=a):a=e[3],a||null}function D(){const e=_.c(16),o=N();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const n=P(r),t=R(),a=C(),i=b(a),s=M(),y=i.find(c=>c.id===s)??null;let p;e[1]!==a||e[2]!==s?(p=s&&a.length>0&&!a.some(c=>c.id===s)?s:null,e[1]=a,e[2]=s,e[3]=p):p=e[3];const S=O(p),u=y??b(S?[S]:[])[0]??null;let m;e[4]!==t||e[5]!==o||e[6]!==n||e[7]!==s?(m=c=>{if(c===s&&t!==void 0)return;const h=n.org??"",I=V;if(c){k(o,{org:h,agentId:c,tabId:t==="board"||t==="reports"?t:"overview",search:I,replace:!1});return}if(t==="board"){o({to:l.tasks,params:{org:h,taskKey:void 0},search:I});return}const j=t==="files"?l.library:t==="monitoring"?l.monitoring:t==="plan"?l.plan:l.home;o({to:j,params:{org:h},search:I})},e[4]=t,e[5]=o,e[6]=n,e[7]=s,e[8]=m):m=e[8];const f=m,v=w(u),g=i.length>=x;let d;return e[9]!==u||e[10]!==i||e[11]!==s||e[12]!==f||e[13]!==v||e[14]!==g?(d={scopeId:s,project:u,repo:v,projects:i,hasProjects:g,setScope:f},e[9]=u,e[10]=i,e[11]=s,e[12]=f,e[13]=v,e[14]=g,e[15]=d):d=e[15],d}function V(e){return{...e,virtualmcpid:void 0,thread:void 0,mainpanel:void 0,path:void 0,preview:void 0,expanded:void 0}}export{D as a,b as s,M as u};
1
+ import{c as _,f as P,u as T,d as N,cK as R,dI as E,cI as k,ae as l}from"./index-Ckj4MapM.js";import{d as C,b as O,p as w}from"./repository-binding-CH7r7brN.js";const x=1;function b(e){return(e??[]).filter(E)}function M(){const e=_.c(4);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const r=P(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const t=T(n);if(r.agentId)return r.agentId;let a;return e[2]!==t?(a="virtualmcpid"in t&&typeof t.virtualmcpid=="string"?t.virtualmcpid.trim():void 0,e[2]=t,e[3]=a):a=e[3],a||null}function D(){const e=_.c(16),o=N();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const n=P(r),t=R(),a=C(),i=b(a),s=M(),y=i.find(c=>c.id===s)??null;let p;e[1]!==a||e[2]!==s?(p=s&&a.length>0&&!a.some(c=>c.id===s)?s:null,e[1]=a,e[2]=s,e[3]=p):p=e[3];const S=O(p),u=y??b(S?[S]:[])[0]??null;let m;e[4]!==t||e[5]!==o||e[6]!==n||e[7]!==s?(m=c=>{if(c===s&&t!==void 0)return;const h=n.org??"",I=V;if(c){k(o,{org:h,agentId:c,tabId:t==="board"||t==="reports"?t:"overview",search:I,replace:!1});return}if(t==="board"){o({to:l.tasks,params:{org:h,taskKey:void 0},search:I});return}const j=t==="files"?l.library:t==="monitoring"?l.monitoring:t==="plan"?l.plan:l.home;o({to:j,params:{org:h},search:I})},e[4]=t,e[5]=o,e[6]=n,e[7]=s,e[8]=m):m=e[8];const f=m,v=w(u),g=i.length>=x;let d;return e[9]!==u||e[10]!==i||e[11]!==s||e[12]!==f||e[13]!==v||e[14]!==g?(d={scopeId:s,project:u,repo:v,projects:i,hasProjects:g,setScope:f},e[9]=u,e[10]=i,e[11]=s,e[12]=f,e[13]=v,e[14]=g,e[15]=d):d=e[15],d}function V(e){return{...e,virtualmcpid:void 0,thread:void 0,mainpanel:void 0,path:void 0,preview:void 0,expanded:void 0}}export{D as a,b as s,M as u};
@@ -1 +1 @@
1
- import{r as A,c as m,l as j,ar as b,at as y,ag as N}from"./index-B0kMZVmC.js";import{e as w}from"./use-view-draft-kind-BTxfGo3P.js";import{P as E}from"./project-apps-XmfSXScr.js";import{b as P}from"./repository-binding-DqsJn1Sb.js";function D(n,e){const t=new Set(e);return t.size===0?n:n.filter(c=>t.has(c.connectionId))}function R(n){const e=n.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(t=>!!t&&typeof t=="object"&&typeof t.connectionId=="string"&&typeof t.toolName=="string"&&["undefined","string"].includes(typeof t.label)&&(t.icon==null||typeof t.icon=="string")):[]}const V=4;function I(n,e){return n.app===e.app&&n.projectId===e.projectId}function h(n,e,t=V){return[e,...n.filter(c=>!I(c,e))].slice(0,t)}function _(n,e){return n.filter(t=>!I(t,e))}function g(n,e,t){const c=n.findLast(l=>l.staticData.mainView);if(!c)return null;const{mainView:r,siteEditorView:p,local:i}=c.staticData;if(!r)return null;const o=c.params,a=o?.agentId;if(a&&r==="app"&&o.connectionId&&o.toolName)return{app:t(o.connectionId,o.toolName),projectId:a,connection:{id:o.connectionId,toolName:o.toolName}};const s=p?"site-editor":r;return e(s)?a?{app:s,projectId:a}:i?{app:s,projectId:null}:null:null}const d=[];function O(n){const e=m.c(12);let t;e[0]!==n?(t=y.recentApps(n),e[0]=n,e[1]=t):t=e[1];const[c,r]=b(t,d),p=w(),i=Array.isArray(c)?c:d;let o;e[2]!==p||e[3]!==i?(o=p?i:i.filter(S),e[2]=p,e[3]=i,e[4]=o):o=e[4];let a,s;e[5]!==r?(a=f=>r(u=>h(Array.isArray(u)?u:[],f)),s=f=>r(u=>_(Array.isArray(u)?u:[],f)),e[5]=r,e[6]=a,e[7]=s):(a=e[6],s=e[7]);let l;return e[8]!==o||e[9]!==a||e[10]!==s?(l={recent:o,remember:a,forget:s},e[8]=o,e[9]=a,e[10]=s,e[11]=l):l=e[11],l}function S(n){return n.app!=="blog"}function T(){const n=m.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:L,structuralSharing:!0},n[0]=e):e=n[0],j(e)}function L(n){return g(n.matches,C,N)}function C(n){return n in E}function Y(n){const{remember:e}=O(n),t=T(),c=P(t?.projectId),r=t?.projectId&&c?.id===t.projectId?c.title:null,p=t?.connection&&c?R(c).find(o=>o.connectionId===t.connection?.id&&o.toolName===t.connection.toolName):void 0,i=t?.connection&&{id:t.connection.id,toolName:t.connection.toolName,label:p?.label||t.connection.toolName,icon:p?.icon};A.useEffect(()=>{!t?.projectId||!r||e({app:t.app,projectId:t.projectId,projectTitle:r,...i&&{connection:i}})},[n,t?.app,t?.projectId,r,i?.label,i?.icon])}export{T as a,O as b,D as k,R as p,Y as u};
1
+ import{r as A,c as m,l as j,ar as b,at as y,ag as N}from"./index-Ckj4MapM.js";import{e as w}from"./use-view-draft-kind-CwsOl80j.js";import{P as E}from"./project-apps-k8HMptd3.js";import{b as P}from"./repository-binding-CH7r7brN.js";function D(n,e){const t=new Set(e);return t.size===0?n:n.filter(c=>t.has(c.connectionId))}function R(n){const e=n.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(t=>!!t&&typeof t=="object"&&typeof t.connectionId=="string"&&typeof t.toolName=="string"&&["undefined","string"].includes(typeof t.label)&&(t.icon==null||typeof t.icon=="string")):[]}const V=4;function I(n,e){return n.app===e.app&&n.projectId===e.projectId}function h(n,e,t=V){return[e,...n.filter(c=>!I(c,e))].slice(0,t)}function _(n,e){return n.filter(t=>!I(t,e))}function g(n,e,t){const c=n.findLast(l=>l.staticData.mainView);if(!c)return null;const{mainView:r,siteEditorView:p,local:i}=c.staticData;if(!r)return null;const o=c.params,a=o?.agentId;if(a&&r==="app"&&o.connectionId&&o.toolName)return{app:t(o.connectionId,o.toolName),projectId:a,connection:{id:o.connectionId,toolName:o.toolName}};const s=p?"site-editor":r;return e(s)?a?{app:s,projectId:a}:i?{app:s,projectId:null}:null:null}const d=[];function O(n){const e=m.c(12);let t;e[0]!==n?(t=y.recentApps(n),e[0]=n,e[1]=t):t=e[1];const[c,r]=b(t,d),p=w(),i=Array.isArray(c)?c:d;let o;e[2]!==p||e[3]!==i?(o=p?i:i.filter(S),e[2]=p,e[3]=i,e[4]=o):o=e[4];let a,s;e[5]!==r?(a=f=>r(u=>h(Array.isArray(u)?u:[],f)),s=f=>r(u=>_(Array.isArray(u)?u:[],f)),e[5]=r,e[6]=a,e[7]=s):(a=e[6],s=e[7]);let l;return e[8]!==o||e[9]!==a||e[10]!==s?(l={recent:o,remember:a,forget:s},e[8]=o,e[9]=a,e[10]=s,e[11]=l):l=e[11],l}function S(n){return n.app!=="blog"}function T(){const n=m.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:L,structuralSharing:!0},n[0]=e):e=n[0],j(e)}function L(n){return g(n.matches,C,N)}function C(n){return n in E}function Y(n){const{remember:e}=O(n),t=T(),c=P(t?.projectId),r=t?.projectId&&c?.id===t.projectId?c.title:null,p=t?.connection&&c?R(c).find(o=>o.connectionId===t.connection?.id&&o.toolName===t.connection.toolName):void 0,i=t?.connection&&{id:t.connection.id,toolName:t.connection.toolName,label:p?.label||t.connection.toolName,icon:p?.icon};A.useEffect(()=>{!t?.projectId||!r||e({app:t.app,projectId:t.projectId,projectTitle:r,...i&&{connection:i}})},[n,t?.app,t?.projectId,r,i?.label,i?.icon])}export{T as a,O as b,D as k,R as p,Y as u};
@@ -1 +1 @@
1
- import{c as N,a4 as Q,W as F,T as A,i as f,K as R,g_ as L,$ as K,U}from"./index-B0kMZVmC.js";import{m as O}from"./use-mcp-client-Cp7itm-S.js";import{u as h}from"./companions-core-DhUD88pR.js";function D(n){return n?n.scanned_at?"ready":n.run_in_progress?"generating":"none":"none"}function M(n){return n.connectionQueryPending?!0:!n.hasConnection||n.cdClientFailed?!1:n.diagnosticQueryPending}const b=2e4;function q(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function j(){const n=N.c(24),{org:e}=Q(),t=F.REPORTS(e.id);let l;n[0]!==e.id||n[1]!==e.slug?(l=O({connectionId:A,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=l):l=n[2];const{data:p}=f(l),u=f({queryKey:R.reportsConnection(e.id,t),enabled:!!p,retry:!1,staleTime:6e4,queryFn:async()=>{if(!p)throw new Error("selfClient not ready");const T=await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}});return h(T)}}),m=u.data?.item??null,{data:s,isError:y}=f({...O({connectionId:t,orgId:e.id,orgSlug:e.slug}),enabled:!!m}),C=R.reportsDiagnostic(e.id,t),E=!!s;let i;n[3]!==s?(i=async()=>{if(!s)throw new Error("cdClient not ready");const T=await s.callTool({name:L,arguments:{}});return h(T).diagnostic??null},n[3]=s,n[4]=i):i=n[4];let d;n[5]!==C||n[6]!==E||n[7]!==i?(d={queryKey:C,enabled:E,retry:1,refetchInterval:v,queryFn:i},n[5]=C,n[6]=E,n[7]=i,n[8]=d):d=n[8];const r=f(d),o=m?.metadata?.siteUrl,P=r.data??null,w=r.isSuccess,_=!!m;let a;n[9]!==y||n[10]!==u.isPending||n[11]!==r.isPending||n[12]!==_?(a=M({connectionQueryPending:u.isPending,hasConnection:_,cdClientFailed:y,diagnosticQueryPending:r.isPending}),n[9]=y,n[10]=u.isPending,n[11]=r.isPending,n[12]=_,n[13]=a):a=n[13];const I=typeof o=="string"&&o?o:null;let c;n[14]!==o?(c=q(o),n[14]=o,n[15]=c):c=n[15];const S=s??null;let g;return n[16]!==t||n[17]!==r.isSuccess||n[18]!==c||n[19]!==S||n[20]!==P||n[21]!==a||n[22]!==I?(g={diagnostic:P,isSuccess:w,isLoading:a,siteUrl:I,host:c,connectionId:t,cdClient:S},n[16]=t,n[17]=r.isSuccess,n[18]=c,n[19]=S,n[20]=P,n[21]=a,n[22]=I,n[23]=g):g=n[23],g}function v(n){return n.state.status!=="error"&&D(n.state.data)==="generating"?b:!1}function B(n,e){return{to:K.app,params:{org:n.slug,agentId:U(n.id),connectionId:e,toolName:L},search:{}}}export{D as d,B as r,j as u};
1
+ import{c as N,a4 as Q,W as F,T as A,i as f,K as R,g_ as L,$ as K,U}from"./index-Ckj4MapM.js";import{m as O}from"./use-mcp-client-B2rDMtrE.js";import{u as h}from"./companions-core-DhUD88pR.js";function D(n){return n?n.scanned_at?"ready":n.run_in_progress?"generating":"none":"none"}function M(n){return n.connectionQueryPending?!0:!n.hasConnection||n.cdClientFailed?!1:n.diagnosticQueryPending}const b=2e4;function q(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function j(){const n=N.c(24),{org:e}=Q(),t=F.REPORTS(e.id);let l;n[0]!==e.id||n[1]!==e.slug?(l=O({connectionId:A,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=l):l=n[2];const{data:p}=f(l),u=f({queryKey:R.reportsConnection(e.id,t),enabled:!!p,retry:!1,staleTime:6e4,queryFn:async()=>{if(!p)throw new Error("selfClient not ready");const T=await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}});return h(T)}}),m=u.data?.item??null,{data:s,isError:y}=f({...O({connectionId:t,orgId:e.id,orgSlug:e.slug}),enabled:!!m}),C=R.reportsDiagnostic(e.id,t),E=!!s;let i;n[3]!==s?(i=async()=>{if(!s)throw new Error("cdClient not ready");const T=await s.callTool({name:L,arguments:{}});return h(T).diagnostic??null},n[3]=s,n[4]=i):i=n[4];let d;n[5]!==C||n[6]!==E||n[7]!==i?(d={queryKey:C,enabled:E,retry:1,refetchInterval:v,queryFn:i},n[5]=C,n[6]=E,n[7]=i,n[8]=d):d=n[8];const r=f(d),o=m?.metadata?.siteUrl,P=r.data??null,w=r.isSuccess,_=!!m;let a;n[9]!==y||n[10]!==u.isPending||n[11]!==r.isPending||n[12]!==_?(a=M({connectionQueryPending:u.isPending,hasConnection:_,cdClientFailed:y,diagnosticQueryPending:r.isPending}),n[9]=y,n[10]=u.isPending,n[11]=r.isPending,n[12]=_,n[13]=a):a=n[13];const I=typeof o=="string"&&o?o:null;let c;n[14]!==o?(c=q(o),n[14]=o,n[15]=c):c=n[15];const S=s??null;let g;return n[16]!==t||n[17]!==r.isSuccess||n[18]!==c||n[19]!==S||n[20]!==P||n[21]!==a||n[22]!==I?(g={diagnostic:P,isSuccess:w,isLoading:a,siteUrl:I,host:c,connectionId:t,cdClient:S},n[16]=t,n[17]=r.isSuccess,n[18]=c,n[19]=S,n[20]=P,n[21]=a,n[22]=I,n[23]=g):g=n[23],g}function v(n){return n.state.status!=="error"&&D(n.state.data)==="generating"?b:!1}function B(n,e){return{to:K.app,params:{org:n.slug,agentId:U(n.id),connectionId:e,toolName:L},search:{}}}export{D as d,B as r,j as u};
@@ -1,2 +1,2 @@
1
- import{c as he,j as G,r as a,a4 as Ee,q as ve,K as C,cF as J}from"./index-B0kMZVmC.js";import{h as pe,u as me}from"./chat-context-BOjsomdh.js";import{b as Se}from"./sandbox-url-D3mC8qhT.js";import{u as ge}from"./repository-binding-DqsJn1Sb.js";import{e as ye}from"./backoff-CrEUbyZT.js";function W(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const be={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},Z=a.createContext(be),z=16384;class De{data="";append(e){this.data+=e,this.data.length>z&&(this.data=this.data.slice(this.data.length-z))}get(){return this.data}clear(){this.data=""}}const ke=1e3,Re=3e4,Te=3e3,X=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],I="log";function xe(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function Ce(t){return t===404}function Le(t){return/(?:^|[\s;&|(])deno\s+task\b/.test(t)}async function _e(t){try{const e=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Te)});return await e.body?.cancel().catch(()=>{}),Ce(e.status)}catch{return!1}}const ee=pe(Z);function Me(t){const e=he.c(10);let i,f,c;e[0]!==t?({resetKey:c,children:i,...f}=t,e[0]=t,e[1]=i,e[2]=f,e[3]=c):(i=e[1],f=e[2],c=e[3]);let o;e[4]!==f||e[5]!==c?(o=G.jsx(we,{...f},c),e[4]=f,e[5]=c,e[6]=o):o=e[6];let h;return e[7]!==i||e[8]!==o?(h=G.jsx(ee.Host,{source:o,children:i}),e[7]=i,e[8]=o,e[9]=h):h=e[9],h}function we(t){return ee.usePublish(Pe(t)),null}function Pe({virtualMcpId:t,branch:e,previewUrl:i=null,enabled:f=!0}){const{org:c}=Ee(),o=ve(),h=me()?.taskId??null,[ne,L]=a.useState(null),[se,_]=a.useState({phase:"idle"}),[re,w]=a.useState({state:"running"}),[ae,P]=a.useState({kind:"unknown"}),[ce,O]=a.useState(!1),[oe,N]=a.useState([]),[ue,B]=a.useState([]),[,ie]=a.useState(0),m=a.useRef(new Map),K=a.useRef(new Set),k=a.useRef(new Set),A=a.useRef(null),R=xe(i),Q=ge(t)?.metadata?.runtime?.selected==="deno",le=l=>{let d=m.current.get(l);return d||(d=new De,m.current.set(l,d)),d};return a.useEffect(()=>{if(L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),A.current=null,O(!1),N([]),B([]),m.current.clear(),!t||!e||!f)return;const l=Se({orgSlug:c.slug,virtualMcpId:t,branch:e,threadId:h??null},"events");let d=!1,S=0,T=null,g=null,y=null,v=null,E=null,x=null,V=!1;const F=()=>{g&&clearTimeout(g),g=setTimeout(()=>{g=null,o.invalidateQueries({queryKey:C.liveMeta(c.slug,t,e)})},1e3)},de=n=>{try{const s=JSON.parse(n.data);L(s),s.kind!=="failed"&&(O(!1),S=0),s.kind==="ready"&&H()}catch(s){console.warn("[vm-events] bad phase payload",s)}},$=()=>{O(!0),L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),N([]),B([]),m.current.clear()},j=n=>{try{const s=JSON.parse(n.data);if(typeof s.data!="string")return;S=0;const u=s.data.replace(/\r?\n/g,`\r
1
+ import{c as he,j as G,r as a,a4 as Ee,q as ve,K as C,cF as J}from"./index-Ckj4MapM.js";import{h as pe,u as me}from"./chat-context-DWiThF8S.js";import{b as Se}from"./sandbox-url-D3mC8qhT.js";import{u as ge}from"./repository-binding-CH7r7brN.js";import{e as ye}from"./backoff-CrEUbyZT.js";function W(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const be={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},Z=a.createContext(be),z=16384;class De{data="";append(e){this.data+=e,this.data.length>z&&(this.data=this.data.slice(this.data.length-z))}get(){return this.data}clear(){this.data=""}}const ke=1e3,Re=3e4,Te=3e3,X=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],I="log";function xe(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function Ce(t){return t===404}function Le(t){return/(?:^|[\s;&|(])deno\s+task\b/.test(t)}async function _e(t){try{const e=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Te)});return await e.body?.cancel().catch(()=>{}),Ce(e.status)}catch{return!1}}const ee=pe(Z);function Me(t){const e=he.c(10);let i,f,c;e[0]!==t?({resetKey:c,children:i,...f}=t,e[0]=t,e[1]=i,e[2]=f,e[3]=c):(i=e[1],f=e[2],c=e[3]);let o;e[4]!==f||e[5]!==c?(o=G.jsx(we,{...f},c),e[4]=f,e[5]=c,e[6]=o):o=e[6];let h;return e[7]!==i||e[8]!==o?(h=G.jsx(ee.Host,{source:o,children:i}),e[7]=i,e[8]=o,e[9]=h):h=e[9],h}function we(t){return ee.usePublish(Pe(t)),null}function Pe({virtualMcpId:t,branch:e,previewUrl:i=null,enabled:f=!0}){const{org:c}=Ee(),o=ve(),h=me()?.taskId??null,[ne,L]=a.useState(null),[se,_]=a.useState({phase:"idle"}),[re,w]=a.useState({state:"running"}),[ae,P]=a.useState({kind:"unknown"}),[ce,O]=a.useState(!1),[oe,N]=a.useState([]),[ue,B]=a.useState([]),[,ie]=a.useState(0),m=a.useRef(new Map),K=a.useRef(new Set),k=a.useRef(new Set),A=a.useRef(null),R=xe(i),Q=ge(t)?.metadata?.runtime?.selected==="deno",le=l=>{let d=m.current.get(l);return d||(d=new De,m.current.set(l,d)),d};return a.useEffect(()=>{if(L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),A.current=null,O(!1),N([]),B([]),m.current.clear(),!t||!e||!f)return;const l=Se({orgSlug:c.slug,virtualMcpId:t,branch:e,threadId:h??null},"events");let d=!1,S=0,T=null,g=null,y=null,v=null,E=null,x=null,V=!1;const F=()=>{g&&clearTimeout(g),g=setTimeout(()=>{g=null,o.invalidateQueries({queryKey:C.liveMeta(c.slug,t,e)})},1e3)},de=n=>{try{const s=JSON.parse(n.data);L(s),s.kind!=="failed"&&(O(!1),S=0),s.kind==="ready"&&H()}catch(s){console.warn("[vm-events] bad phase payload",s)}},$=()=>{O(!0),L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),N([]),B([]),m.current.clear()},j=n=>{try{const s=JSON.parse(n.data);if(typeof s.data!="string")return;S=0;const u=s.data.replace(/\r?\n/g,`\r
2
2
  `);le(s.source).append(u);for(const r of K.current)try{r(s.source,u)}catch{}ie(r=>r+1)}catch{}},q=n=>{const s=n.type;try{const u=JSON.parse(n.data);switch(S=0,s){case"lifecycle":{const r=u;_(r.state);const b=`${c.slug}/${t}/${e}`;if(W(r.state.phase)&&!(x&&W(x))){J(o,c.id);const D=C.decofile(b);o.getQueryData(D)===void 0&&o.invalidateQueries({queryKey:D})}r.state.phase==="running"&&x!=="running"&&(J(o,c.id),o.invalidateQueries({queryKey:C.decofile(b)}),F()),x=r.state.phase;const p=r.state.phase==="running"?r.state.port:null,U=A.current;if(A.current=p,U!==null&&p!==null&&U!==p)for(const D of k.current)try{D()}catch{}return}case"status":w(u);return;case"tasks":{const r=u;V=r.active.some(p=>Le(p.command));const b=r.active.map(p=>p.logName??"").filter(Boolean);B(b);return}case"scripts":N(u.scripts);return;case"branch":{const r=u.meta;P(r);return}case"reload":for(const r of k.current)try{r()}catch{}return;case"file-changed":{const{path:r}=u,b=`${c.slug}/${t}/${e}`;if(r.startsWith(".deco/")||r.includes("/.deco/")){if(!(x==="running"))return;r.endsWith(".deco/meta.gen.json")&&F(),y&&clearTimeout(y),y=setTimeout(()=>{if(y=null,o.invalidateQueries({queryKey:C.decofile(b)}),Q||V)for(const D of k.current)try{D()}catch{}},500)}else F();return}}}catch{}};function M(){if(d)return;const n=new EventSource(l);v=n,n.onopen=()=>{},n.onerror=()=>{v===n&&n.readyState===EventSource.CLOSED&&Y("studio")},n.addEventListener("phase",de),n.addEventListener("gone",$),n.addEventListener(I,j);for(const s of X)n.addEventListener(s,q)}function H(){if(d||!R||E)return;const n=new EventSource(R);E=n;let s=!1;n.onopen=()=>{if(d||E!==n)return;s=!0,S=0;const u=v;v=null,u?.close()},n.onerror=()=>{E===n&&n.readyState===EventSource.CLOSED&&fe(n,s)},n.addEventListener(I,j);for(const u of X)n.addEventListener(u,q)}async function fe(n,s){const u=R?await _e(R):!1;if(!(d||E!==n)){if(n.close(),E=null,u){$(),v||M();return}s&&Y("direct")}}function Y(n){if(d||T)return;const s=ye(Re,ke,S,2,0);S++,T=setTimeout(()=>{if(T=null,!d){if(n==="direct"){E?.close(),E=null,H();return}v?.close(),v=null,M()}},s)}return M(),()=>{d=!0,v?.close(),E?.close(),T&&clearTimeout(T),g&&clearTimeout(g),y&&clearTimeout(y)}},[t,e,c.slug,c.id,f,h,R,o,Q]),{phase:ne,lifecycle:se,status:re,branch:ae,notFound:ce,scripts:oe,activeProcesses:ue,getBuffer:l=>m.current.get(l)?.get()??"",hasData:l=>(m.current.get(l)?.get().length??0)>0,subscribeChunks:l=>(K.current.add(l),()=>{K.current.delete(l)}),subscribeReload:l=>(k.current.add(l),()=>{k.current.delete(l)})}}function te(){return a.use(Z)}function Ue(t){const{subscribeChunks:e}=te(),i=a.useRef(t);i.current=t,a.useEffect(()=>e((o,h)=>{i.current?.(o,h)}),[e])}function Qe(t){const{subscribeReload:e}=te(),i=a.useRef(t);i.current=t,a.useEffect(()=>e(()=>{i.current?.()}),[e])}export{Me as S,Ue as a,Qe as b,W as i,te as u};
@@ -1 +1 @@
1
- import{c as u,a4 as c,ak as r,K as l,V as d,q as f,e as S}from"./index-B0kMZVmC.js";function C(){const e=u.c(7),{org:i}=c(),n=r();let a;e[0]!==i.id?(a=l.secrets(i.id),e[0]=i.id,e[1]=a):a=e[1];let t;e[2]!==n?(t=async()=>await n.call("SECRET_LIST",{}),e[2]=n,e[3]=t):t=e[3];let s;e[4]!==a||e[5]!==t?(s={queryKey:a,staleTime:6e4,queryFn:t},e[4]=a,e[5]=t,e[6]=s):s=e[6];const{data:o}=d(s);return o.secrets}function m(){const e=u.c(8),{org:i}=c(),n=r(),a=f();let t;e[0]!==n?(t=async y=>await n.call("SECRET_CREATE",{...y}),e[0]=n,e[1]=t):t=e[1];let s;e[2]!==i||e[3]!==a?(s=()=>{a.invalidateQueries({queryKey:l.secrets(i.id)})},e[2]=i,e[3]=a,e[4]=s):s=e[4];let o;return e[5]!==t||e[6]!==s?(o={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=o):o=e[7],S(o)}export{m as a,C as u};
1
+ import{c as u,a4 as c,ak as r,K as l,V as d,q as f,e as S}from"./index-Ckj4MapM.js";function C(){const e=u.c(7),{org:i}=c(),n=r();let a;e[0]!==i.id?(a=l.secrets(i.id),e[0]=i.id,e[1]=a):a=e[1];let t;e[2]!==n?(t=async()=>await n.call("SECRET_LIST",{}),e[2]=n,e[3]=t):t=e[3];let s;e[4]!==a||e[5]!==t?(s={queryKey:a,staleTime:6e4,queryFn:t},e[4]=a,e[5]=t,e[6]=s):s=e[6];const{data:o}=d(s);return o.secrets}function m(){const e=u.c(8),{org:i}=c(),n=r(),a=f();let t;e[0]!==n?(t=async y=>await n.call("SECRET_CREATE",{...y}),e[0]=n,e[1]=t):t=e[1];let s;e[2]!==i||e[3]!==a?(s=()=>{a.invalidateQueries({queryKey:l.secrets(i.id)})},e[2]=i,e[3]=a,e[4]=s):s=e[4];let o;return e[5]!==t||e[6]!==s?(o={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=o):o=e[7],S(o)}export{m as a,C as u};
@@ -1 +1 @@
1
- import{i8 as ee,bn as te,c as M,b as re,r as b,j as i,m as se,bm as oe,D as ie,v as ne,x as le,I as ce,w as ae}from"./index-B0kMZVmC.js";import{a as G,e as V}from"./UserSquare-dl1oayK_.js";import{b as fe}from"./agent-icon-BLhMgLPf.js";import{i as ue}from"./SearchMd-BMSOzTwj.js";import{a as _}from"./save-status-DQIuewYI.js";import{ac as de,k as me,an as ve}from"./blocks-tab-states-BJKt49qf.js";import{a$ as K,c as pe,u as xe,i as he,E as ge}from"./site-editor-toast-DrPEsDU7.js";import{d as Y,r as we}from"./held-block-view-DW-NjX-S.js";import{u as Se}from"./use-voice-input-D66t9nvu.js";function be(r){return r.schema?.definitions??r.schema?.$defs??{}}function Z(r,e){const t=be(e),s=t[btoa(r)];if(!s)return[];const o=[s];if(Array.isArray(s.allOf)){const l=s.allOf.find(n=>typeof n.$ref=="string")?.$ref;if(typeof l=="string"){const n=t[l.replace("#/definitions/","")];n&&o.push(n)}}return o}function je(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s?.includes("{{{"))return s}}function We(r,e){if(!e)return;const t=ee(r,te(e));if(!t)return;const s=je(t.resolveType,e);if(!s)return;const o=we(s,t.data);if(o)return Y(o)}function ye(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s&&!s.includes("{{"))return Y(s)}}const Ne=12,z=new Set,F=new Set;function Re(){for(const r of F)r()}function Pe(r){return z.has(r)?!0:z.size>=Ne?!1:(z.add(r),!0)}function Q(r){z.delete(r)&&Re()}function Ie(r){return F.add(r),()=>{F.delete(r)}}function Te(r,e){const t=b.useRef(!1),[s,o]=b.useState(!1),l=b.useRef(null),n=b.useRef(null),f=b.useRef(null),c=b.useRef(r);c.current=r;const[p]=b.useState(()=>{const u=()=>{f.current?.(),f.current=null},d=()=>t.current?!0:Pe(e)?(t.current=!0,o(!0),u(),!0):!1;return a=>{if(n.current=a,l.current&&(l.current.disconnect(),l.current=null),u(),!a){t.current&&(Q(e),t.current=!1,o(!1));return}queueMicrotask(()=>{if(n.current!==a)return;const w=new IntersectionObserver(m=>{if(m[0]?.isIntersecting??!1){!d()&&!f.current&&(f.current=Ie(()=>{n.current===a&&d()}));return}u(),t.current&&(Q(e),t.current=!1,o(!1))},{root:c.current.current,rootMargin:"160px 0px"});w.observe(a),l.current=w})}});return{ref:p,iframeActive:s}}function Ce(r){const e=M.c(9),{previewUrl:t,title:s,scrollRootRef:o,slotId:l}=r,{ref:n,iframeActive:f}=Te(o,l),[c,p]=b.useState(!1),u=_()?V:G;let d;e[0]!==u||e[1]!==f||e[2]!==c||e[3]!==t||e[4]!==s?(d=f?i.jsxs(i.Fragment,{children:[!c&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:i.jsx(u,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),i.jsx("iframe",{src:t,title:`Preview ${s}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>p(!0)})]}):i.jsx("div",{className:"flex h-full items-center justify-center",children:i.jsx(u,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=u,e[1]=f,e[2]=c,e[3]=t,e[4]=s,e[5]=d):d=e[5];let a;return e[6]!==n||e[7]!==d?(a=i.jsx("div",{ref:n,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:d}),e[6]=n,e[7]=d,e[8]=a):a=e[8],a}function Ue(r){const e=M.c(3),{image:t}=r,s=_()?V:G;let o;return e[0]!==s||e[1]!==t?(o=i.jsx("div",{className:"relative flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted/40",children:t?i.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):i.jsx(s,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=s,e[1]=t,e[2]=o):o=e[2],o}function ke(r){const e=M.c(28),{entry:t,previewUrl:s,image:o,scrollRootRef:l,onSelect:n}=r,c=_()?t.isSavedBlock?fe:V:G,p=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let u;e[0]!==p?(u=se("group flex flex-col overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-lg))] border bg-card text-left transition-colors shadow-edge","hover:border-primary/40 hover:bg-accent",p),e[0]=p,e[1]=u):u=e[1];let d;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==o||e[5]!==s||e[6]!==l?(d=s?i.jsx(Ce,{previewUrl:s,title:t.title,scrollRootRef:l,slotId:t.resolveType}):i.jsx(Ue,{image:o}),e[2]=t.resolveType,e[3]=t.title,e[4]=o,e[5]=s,e[6]=l,e[7]=d):d=e[7];let a;e[8]!==t.isSavedBlock?(a=t.isSavedBlock?{color:oe}:void 0,e[8]=t.isSavedBlock,e[9]=a):a=e[9];let w;e[10]!==c||e[11]!==a?(w=i.jsx(c,{className:"h-4 w-4 shrink-0",style:a}),e[10]=c,e[11]=a,e[12]=w):w=e[12];let m;e[13]!==t.title?(m=i.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[13]=t.title,e[14]=m):m=e[14];let x;e[15]!==t.description?(x=t.description&&i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[15]=t.description,e[16]=x):x=e[16];let h;e[17]!==m||e[18]!==x?(h=i.jsxs("div",{className:"min-w-0 flex-1",children:[m,x]}),e[17]=m,e[18]=x,e[19]=h):h=e[19];let g;e[20]!==w||e[21]!==h?(g=i.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[w,h]}),e[20]=w,e[21]=h,e[22]=g):g=e[22];let S;return e[23]!==n||e[24]!==u||e[25]!==d||e[26]!==g?(S=i.jsxs("button",{type:"button",onClick:n,className:u,children:[d,g]}),e[23]=n,e[24]=u,e[25]=d,e[26]=g,e[27]=S):S=e[27],S}function qe(r){const e=M.c(51),{open:t,onOpenChange:s,meta:o,decofile:l,previewBaseUrl:n,onSelect:f}=r,c=re(),[p,u]=b.useState(""),[d,a]=b.useState(t),w=b.useRef(null);t!==d&&(a(t),t&&u(""));let m,x,h,g,S,y,N,R,j,P,I;if(e[0]!==l||e[1]!==o||e[2]!==s||e[3]!==f||e[4]!==t||e[5]!==n||e[6]!==p||e[7]!==c){const W=t&&o&&l?de(o,l):[],q=o?me(o):"",H=l?ve(l):void 0,X=new Map;if(t&&q&&n)for(const v of W)X.set(v.resolveType,K(n,q,v.previewBlock,H));const O=p.trim().toLowerCase(),J=O?W.filter(v=>v.title.toLowerCase().includes(O)||v.resolveType.toLowerCase().includes(O)||v.description?.toLowerCase().includes(O)):W;x=ie,P=t,I=s,m=ne,N="top-3 right-3",R="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let k;e[19]!==c?(k=c("sectionsEditor.addSectionModal.title"),e[19]=c,e[20]=k):k=e[20];let B;e[21]!==k?(B=i.jsx(le,{children:k}),e[21]=k,e[22]=B):B=e[22];let $;e[23]===Symbol.for("react.memo_cache_sentinel")?($=i.jsx(ue,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=$):$=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=v=>u(v.target.value),e[24]=D):D=e[24];let A;e[25]!==c?(A=c("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=c,e[26]=A):A=e[26];let L;e[27]!==p||e[28]!==A?(L=i.jsxs("div",{className:"relative pt-2",children:[$,i.jsx(ce,{value:p,onChange:D,placeholder:A,className:"h-9 pl-8"})]}),e[27]=p,e[28]=A,e[29]=L):L=e[29],e[30]!==B||e[31]!==L?(j=i.jsxs(ae,{className:"shrink-0 border-b px-4 py-3 text-left",children:[B,L]}),e[30]=B,e[31]=L,e[32]=j):j=e[32],S=w,y="min-h-0 flex-1 overflow-y-auto",h="p-4",g=J.length===0?i.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:c("sectionsEditor.addSectionModal.noSectionsFound")}):i.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:J.map(v=>i.jsx(ke,{entry:v,scrollRootRef:w,previewUrl:n?X.get(v.resolveType)??K(n,q,v.previewBlock,H):null,image:n||!o?void 0:ye(v.resolveType,o),onSelect:()=>f(v)},v.resolveType))}),e[0]=l,e[1]=o,e[2]=s,e[3]=f,e[4]=t,e[5]=n,e[6]=p,e[7]=c,e[8]=m,e[9]=x,e[10]=h,e[11]=g,e[12]=S,e[13]=y,e[14]=N,e[15]=R,e[16]=j,e[17]=P,e[18]=I}else m=e[8],x=e[9],h=e[10],g=e[11],S=e[12],y=e[13],N=e[14],R=e[15],j=e[16],P=e[17],I=e[18];let T;e[33]!==h||e[34]!==g?(T=i.jsx("div",{className:h,children:g}),e[33]=h,e[34]=g,e[35]=T):T=e[35];let C;e[36]!==T||e[37]!==S||e[38]!==y?(C=i.jsx("div",{ref:S,className:y,children:T}),e[36]=T,e[37]=S,e[38]=y,e[39]=C):C=e[39];let U;e[40]!==m||e[41]!==C||e[42]!==N||e[43]!==R||e[44]!==j?(U=i.jsxs(m,{closeButtonClassName:N,className:R,children:[j,C]}),e[40]=m,e[41]=C,e[42]=N,e[43]=R,e[44]=j,e[45]=U):U=e[45];let E;return e[46]!==x||e[47]!==U||e[48]!==P||e[49]!==I?(E=i.jsx(x,{open:P,onOpenChange:I,children:U}),e[46]=x,e[47]=U,e[48]=P,e[49]=I,e[50]=E):E=e[50],E}function Fe(r){const e=M.c(4),{previewServerUrl:t,runtime:s}=Se(r.virtualMcpId),{url:o}=pe(r.virtualMcpId),l=xe(r.virtualMcpId,r.branch),n=s==="cms";if(he(l))return null;if(o)return o;let f;return e[0]!==n||e[1]!==r.sandboxUrl||e[2]!==t?(f=ge({sandboxUrl:r.sandboxUrl,previewServerUrl:t,fastPreviewActive:n}),e[0]=n,e[1]=r.sandboxUrl,e[2]=t,e[3]=f):f=e[3],f}export{qe as A,We as g,Z as s,Fe as u};
1
+ import{i8 as ee,bn as te,c as M,b as re,r as b,j as i,m as se,bm as oe,D as ie,v as ne,x as le,I as ce,w as ae}from"./index-Ckj4MapM.js";import{a as G,e as V}from"./UserSquare-Ba1GW4kA.js";import{b as fe}from"./agent-icon-Cgeh7jW8.js";import{i as ue}from"./SearchMd-D17naag4.js";import{a as _}from"./save-status-Dh8RiNyJ.js";import{ac as de,k as me,an as ve}from"./blocks-tab-states-C3TVI4qC.js";import{a$ as K,c as pe,u as xe,i as he,E as ge}from"./site-editor-toast-NcKSJm_A.js";import{d as Y,r as we}from"./held-block-view-CjiZoLJN.js";import{u as Se}from"./use-voice-input-ycbiUn9M.js";function be(r){return r.schema?.definitions??r.schema?.$defs??{}}function Z(r,e){const t=be(e),s=t[btoa(r)];if(!s)return[];const o=[s];if(Array.isArray(s.allOf)){const l=s.allOf.find(n=>typeof n.$ref=="string")?.$ref;if(typeof l=="string"){const n=t[l.replace("#/definitions/","")];n&&o.push(n)}}return o}function je(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s?.includes("{{{"))return s}}function We(r,e){if(!e)return;const t=ee(r,te(e));if(!t)return;const s=je(t.resolveType,e);if(!s)return;const o=we(s,t.data);if(o)return Y(o)}function ye(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s&&!s.includes("{{"))return Y(s)}}const Ne=12,z=new Set,F=new Set;function Re(){for(const r of F)r()}function Pe(r){return z.has(r)?!0:z.size>=Ne?!1:(z.add(r),!0)}function Q(r){z.delete(r)&&Re()}function Ie(r){return F.add(r),()=>{F.delete(r)}}function Te(r,e){const t=b.useRef(!1),[s,o]=b.useState(!1),l=b.useRef(null),n=b.useRef(null),f=b.useRef(null),c=b.useRef(r);c.current=r;const[p]=b.useState(()=>{const u=()=>{f.current?.(),f.current=null},d=()=>t.current?!0:Pe(e)?(t.current=!0,o(!0),u(),!0):!1;return a=>{if(n.current=a,l.current&&(l.current.disconnect(),l.current=null),u(),!a){t.current&&(Q(e),t.current=!1,o(!1));return}queueMicrotask(()=>{if(n.current!==a)return;const w=new IntersectionObserver(m=>{if(m[0]?.isIntersecting??!1){!d()&&!f.current&&(f.current=Ie(()=>{n.current===a&&d()}));return}u(),t.current&&(Q(e),t.current=!1,o(!1))},{root:c.current.current,rootMargin:"160px 0px"});w.observe(a),l.current=w})}});return{ref:p,iframeActive:s}}function Ce(r){const e=M.c(9),{previewUrl:t,title:s,scrollRootRef:o,slotId:l}=r,{ref:n,iframeActive:f}=Te(o,l),[c,p]=b.useState(!1),u=_()?V:G;let d;e[0]!==u||e[1]!==f||e[2]!==c||e[3]!==t||e[4]!==s?(d=f?i.jsxs(i.Fragment,{children:[!c&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:i.jsx(u,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),i.jsx("iframe",{src:t,title:`Preview ${s}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>p(!0)})]}):i.jsx("div",{className:"flex h-full items-center justify-center",children:i.jsx(u,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=u,e[1]=f,e[2]=c,e[3]=t,e[4]=s,e[5]=d):d=e[5];let a;return e[6]!==n||e[7]!==d?(a=i.jsx("div",{ref:n,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:d}),e[6]=n,e[7]=d,e[8]=a):a=e[8],a}function Ue(r){const e=M.c(3),{image:t}=r,s=_()?V:G;let o;return e[0]!==s||e[1]!==t?(o=i.jsx("div",{className:"relative flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted/40",children:t?i.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):i.jsx(s,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=s,e[1]=t,e[2]=o):o=e[2],o}function ke(r){const e=M.c(28),{entry:t,previewUrl:s,image:o,scrollRootRef:l,onSelect:n}=r,c=_()?t.isSavedBlock?fe:V:G,p=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let u;e[0]!==p?(u=se("group flex flex-col overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-lg))] border bg-card text-left transition-colors shadow-edge","hover:border-primary/40 hover:bg-accent",p),e[0]=p,e[1]=u):u=e[1];let d;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==o||e[5]!==s||e[6]!==l?(d=s?i.jsx(Ce,{previewUrl:s,title:t.title,scrollRootRef:l,slotId:t.resolveType}):i.jsx(Ue,{image:o}),e[2]=t.resolveType,e[3]=t.title,e[4]=o,e[5]=s,e[6]=l,e[7]=d):d=e[7];let a;e[8]!==t.isSavedBlock?(a=t.isSavedBlock?{color:oe}:void 0,e[8]=t.isSavedBlock,e[9]=a):a=e[9];let w;e[10]!==c||e[11]!==a?(w=i.jsx(c,{className:"h-4 w-4 shrink-0",style:a}),e[10]=c,e[11]=a,e[12]=w):w=e[12];let m;e[13]!==t.title?(m=i.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[13]=t.title,e[14]=m):m=e[14];let x;e[15]!==t.description?(x=t.description&&i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[15]=t.description,e[16]=x):x=e[16];let h;e[17]!==m||e[18]!==x?(h=i.jsxs("div",{className:"min-w-0 flex-1",children:[m,x]}),e[17]=m,e[18]=x,e[19]=h):h=e[19];let g;e[20]!==w||e[21]!==h?(g=i.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[w,h]}),e[20]=w,e[21]=h,e[22]=g):g=e[22];let S;return e[23]!==n||e[24]!==u||e[25]!==d||e[26]!==g?(S=i.jsxs("button",{type:"button",onClick:n,className:u,children:[d,g]}),e[23]=n,e[24]=u,e[25]=d,e[26]=g,e[27]=S):S=e[27],S}function qe(r){const e=M.c(51),{open:t,onOpenChange:s,meta:o,decofile:l,previewBaseUrl:n,onSelect:f}=r,c=re(),[p,u]=b.useState(""),[d,a]=b.useState(t),w=b.useRef(null);t!==d&&(a(t),t&&u(""));let m,x,h,g,S,y,N,R,j,P,I;if(e[0]!==l||e[1]!==o||e[2]!==s||e[3]!==f||e[4]!==t||e[5]!==n||e[6]!==p||e[7]!==c){const W=t&&o&&l?de(o,l):[],q=o?me(o):"",H=l?ve(l):void 0,X=new Map;if(t&&q&&n)for(const v of W)X.set(v.resolveType,K(n,q,v.previewBlock,H));const O=p.trim().toLowerCase(),J=O?W.filter(v=>v.title.toLowerCase().includes(O)||v.resolveType.toLowerCase().includes(O)||v.description?.toLowerCase().includes(O)):W;x=ie,P=t,I=s,m=ne,N="top-3 right-3",R="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let k;e[19]!==c?(k=c("sectionsEditor.addSectionModal.title"),e[19]=c,e[20]=k):k=e[20];let B;e[21]!==k?(B=i.jsx(le,{children:k}),e[21]=k,e[22]=B):B=e[22];let $;e[23]===Symbol.for("react.memo_cache_sentinel")?($=i.jsx(ue,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=$):$=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=v=>u(v.target.value),e[24]=D):D=e[24];let A;e[25]!==c?(A=c("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=c,e[26]=A):A=e[26];let L;e[27]!==p||e[28]!==A?(L=i.jsxs("div",{className:"relative pt-2",children:[$,i.jsx(ce,{value:p,onChange:D,placeholder:A,className:"h-9 pl-8"})]}),e[27]=p,e[28]=A,e[29]=L):L=e[29],e[30]!==B||e[31]!==L?(j=i.jsxs(ae,{className:"shrink-0 border-b px-4 py-3 text-left",children:[B,L]}),e[30]=B,e[31]=L,e[32]=j):j=e[32],S=w,y="min-h-0 flex-1 overflow-y-auto",h="p-4",g=J.length===0?i.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:c("sectionsEditor.addSectionModal.noSectionsFound")}):i.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:J.map(v=>i.jsx(ke,{entry:v,scrollRootRef:w,previewUrl:n?X.get(v.resolveType)??K(n,q,v.previewBlock,H):null,image:n||!o?void 0:ye(v.resolveType,o),onSelect:()=>f(v)},v.resolveType))}),e[0]=l,e[1]=o,e[2]=s,e[3]=f,e[4]=t,e[5]=n,e[6]=p,e[7]=c,e[8]=m,e[9]=x,e[10]=h,e[11]=g,e[12]=S,e[13]=y,e[14]=N,e[15]=R,e[16]=j,e[17]=P,e[18]=I}else m=e[8],x=e[9],h=e[10],g=e[11],S=e[12],y=e[13],N=e[14],R=e[15],j=e[16],P=e[17],I=e[18];let T;e[33]!==h||e[34]!==g?(T=i.jsx("div",{className:h,children:g}),e[33]=h,e[34]=g,e[35]=T):T=e[35];let C;e[36]!==T||e[37]!==S||e[38]!==y?(C=i.jsx("div",{ref:S,className:y,children:T}),e[36]=T,e[37]=S,e[38]=y,e[39]=C):C=e[39];let U;e[40]!==m||e[41]!==C||e[42]!==N||e[43]!==R||e[44]!==j?(U=i.jsxs(m,{closeButtonClassName:N,className:R,children:[j,C]}),e[40]=m,e[41]=C,e[42]=N,e[43]=R,e[44]=j,e[45]=U):U=e[45];let E;return e[46]!==x||e[47]!==U||e[48]!==P||e[49]!==I?(E=i.jsx(x,{open:P,onOpenChange:I,children:U}),e[46]=x,e[47]=U,e[48]=P,e[49]=I,e[50]=E):E=e[50],E}function Fe(r){const e=M.c(4),{previewServerUrl:t,runtime:s}=Se(r.virtualMcpId),{url:o}=pe(r.virtualMcpId),l=xe(r.virtualMcpId,r.branch),n=s==="cms";if(he(l))return null;if(o)return o;let f;return e[0]!==n||e[1]!==r.sandboxUrl||e[2]!==t?(f=ge({sandboxUrl:r.sandboxUrl,previewServerUrl:t,fastPreviewActive:n}),e[0]=n,e[1]=r.sandboxUrl,e[2]=t,e[3]=f):f=e[3],f}export{qe as A,We as g,Z as s,Fe as u};
@@ -1 +1 @@
1
- import{r as y,c as j,j as o,m as C,bW as A,bX as R,a6 as H,c7 as W,b as L,d as V,a4 as F}from"./index-B0kMZVmC.js";import{m as q}from"./use-chat-layout-state-DZgmLot0.js";import{M as X}from"./agent-icon-BLhMgLPf.js";import{b as G,a as E,T as P,c as z}from"./tooltip-BTKQq4Sy.js";import{T as J}from"./toolbar-icon-button-T_NjCrYE.js";import{g as K}from"./shell-layout-3tQDWFJU.js";import{u as Q}from"./use-mobile-CMr55W3O.js";import{b as U,c as Y,S as Z,d as ee,a as te}from"./sheet-DFpCUkzK.js";const se="15rem",ae="18rem",ie="4.5rem",D=y.createContext(null);function I(){const s=y.useContext(D);if(!s)throw new Error("useSidebar must be used within a SidebarProvider.");return s}function ge(s){const e=j.c(19),{children:t,defaultOpen:a,open:i,onOpenChange:n}=s,d=a===void 0?!1:a,r=Q(),[l,c]=y.useState(d),[p,v]=y.useState(!1),u=i!==void 0,f=u?i:l;let h;e[0]!==u||e[1]!==n?(h=M=>{u||c(M),n?.(M)},e[0]=u,e[1]=n,e[2]=h):h=e[2];const b=h;let w;e[3]!==r||e[4]!==f||e[5]!==b?(w=()=>{r?v(ne):b(!f)},e[3]=r,e[4]=f,e[5]=b,e[6]=w):w=e[6];const N=w,x=f?"expanded":"collapsed";let m;e[7]!==r||e[8]!==f||e[9]!==p||e[10]!==b||e[11]!==x||e[12]!==N?(m={state:x,open:f,setOpen:b,isMobile:r,openMobile:p,setOpenMobile:v,toggleSidebar:N},e[7]=r,e[8]=f,e[9]=p,e[10]=b,e[11]=x,e[12]=N,e[13]=m):m=e[13];const S=m;let g;e[14]!==t?(g=o.jsx(G,{delayDuration:0,children:t}),e[14]=t,e[15]=g):g=e[15];let T;return e[16]!==S||e[17]!==g?(T=o.jsx(D.Provider,{value:S,children:g}),e[16]=S,e[17]=g,e[18]=T):T=e[18],T}function ne(s){return!s}function ve(s){const e=j.c(14);let t,a,i,n;e[0]!==s?({className:a,style:n,children:t,...i}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n):(t=e[1],a=e[2],i=e[3],n=e[4]);let d;e[5]!==n?(d={"--sidebar-width":se,"--sidebar-width-icon":ie,...n},e[5]=n,e[6]=d):d=e[6];const r=d;let l;e[7]!==a?(l=C("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=l):l=e[8];let c;return e[9]!==t||e[10]!==i||e[11]!==r||e[12]!==l?(c=o.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:l,...i,children:t}),e[9]=t,e[10]=i,e[11]=r,e[12]=l,e[13]=c):c=e[13],c}function Se(s){const e=j.c(36);let t,a,i,n,d;e[0]!==s?({side:n,variant:d,className:a,children:t,...i}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n,e[5]=d):(t=e[1],a=e[2],i=e[3],n=e[4],d=e[5]);const r=n===void 0?"left":n,l=d===void 0?"sidebar":d,{isMobile:c,state:p,openMobile:v,setOpenMobile:u}=I();if(c){let T;e[6]===Symbol.for("react.memo_cache_sentinel")?(T={"--sidebar-width":ae},e[6]=T):T=e[6];let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsxs(Y,{className:"sr-only",children:[o.jsx(Z,{children:"Sidebar"}),o.jsx(ee,{children:"Displays the mobile sidebar."})]}),e[7]=M):M=e[7];let $;e[8]!==t?($=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=o.jsxs(te,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:T,side:r,children:[M,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let B;return e[13]!==v||e[14]!==i||e[15]!==u||e[16]!==_?(B=o.jsx(U,{open:v,onOpenChange:u,...i,children:_}),e[13]=v,e[14]=i,e[15]=u,e[16]=_,e[17]=B):B=e[17],B}const f=p==="expanded",h=f?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let b;e[18]!==h?(b=C("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",h),e[18]=h,e[19]=b):b=e[19];const w=f?void 0:"icon",N=f?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let x;e[20]!==a||e[21]!==N?(x=C("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",N,a),e[20]=a,e[21]=N,e[22]=x):x=e[22];let m;e[23]!==t?(m=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=m):m=e[24];let S;e[25]!==i||e[26]!==x||e[27]!==m?(S=o.jsx("div",{"data-slot":"sidebar-container",className:x,...i,children:m}),e[25]=i,e[26]=x,e[27]=m,e[28]=S):S=e[28];let g;return e[29]!==r||e[30]!==p||e[31]!==b||e[32]!==w||e[33]!==S||e[34]!==l?(g=o.jsx("div",{className:b,"data-state":p,"data-collapsible":w,"data-variant":l,"data-side":r,"data-slot":"sidebar",children:S}),e[29]=r,e[30]=p,e[31]=b,e[32]=w,e[33]=S,e[34]=l,e[35]=g):g=e[35],g}function je(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("main",{"data-slot":"sidebar-inset",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function we(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function Ne(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function Te(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function Ce(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}const le=R("peer/menu-button flex w-full cursor-pointer items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm focus-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground hover:[&_svg:not([class*='text-'])]:text-sidebar-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm group-data-[state=collapsed]/sidebar:size-8! group-data-[state=collapsed]/sidebar:rounded-full",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ye(s){const e=j.c(28);let t,a,i,n,d,r,l;e[0]!==s?({asChild:i,isActive:n,variant:d,size:r,tooltip:l,className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n,e[5]=d,e[6]=r,e[7]=l):(t=e[1],a=e[2],i=e[3],n=e[4],d=e[5],r=e[6],l=e[7]);const c=i===void 0?!1:i,p=n===void 0?!1:n,v=d===void 0?"default":d,u=r===void 0?"default":r,f=c?A:"button",{isMobile:h}=I();let b;e[8]!==t||e[9]!==u||e[10]!==v?(b=C(le({variant:v,size:u}),t),e[8]=t,e[9]=u,e[10]=v,e[11]=b):b=e[11];let w;e[12]!==f||e[13]!==p||e[14]!==a||e[15]!==u||e[16]!==b?(w=o.jsx(f,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":p,className:b,...a}),e[12]=f,e[13]=p,e[14]=a,e[15]=u,e[16]=b,e[17]=w):w=e[17];const N=w;if(!l)return N;if(typeof l=="string"){let g;e[18]!==l?(g={children:l},e[18]=l,e[19]=g):g=e[19],l=g}let x;e[20]!==N?(x=o.jsx(P,{asChild:!0,children:N}),e[20]=N,e[21]=x):x=e[21];let m;e[22]!==h||e[23]!==l?(m=o.jsx(E,{side:"right",align:"center",hidden:h,...l}),e[22]=h,e[23]=l,e[24]=m):m=e[24];let S;return e[25]!==x||e[26]!==m?(S=o.jsxs(z,{children:[x,m]}),e[25]=x,e[26]=m,e[27]=S):S=e[27],S}function re(){const s=j.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings",shouldThrow:!1},s[0]=e):e=s[0],!!H(e)}const O=y.createContext(null);function Me(s){const e=j.c(5),{children:t}=s,[a,i]=y.useState(null);let n;e[0]!==a?(n={target:a,setTarget:i},e[0]=a,e[1]=n):n=e[1];let d;return e[2]!==t||e[3]!==n?(d=o.jsx(O,{value:n,children:t}),e[2]=t,e[3]=n,e[4]=d):d=e[4],d}function oe(){const s=y.use(O);if(!s)throw new Error("Sidebar thread controls require a Layout");return s}function k(s){const e=j.c(17),{open:t,onToggle:a}=s,i=L(),{isMobile:n,setOpenMobile:d}=I(),r=t?"page.closeThread":"page.openThread";let l;e[0]!==i||e[1]!==r?(l=i(r),e[0]=i,e[1]=r,e[2]=l):l=e[2];const c=l;let p;e[3]!==n||e[4]!==a||e[5]!==d?(p=()=>{a(),n&&d(!1)},e[3]=n,e[4]=a,e[5]=d,e[6]=p):p=e[6];let v;e[7]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(X,{size:16}),e[7]=v):v=e[7];let u;e[8]!==c||e[9]!==t||e[10]!==p?(u=o.jsx(P,{asChild:!0,children:o.jsx(J,{"aria-label":c,"aria-pressed":t,active:t,className:"size-7 shrink-0 group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:size-8",onClick:p,children:v})}),e[8]=c,e[9]=t,e[10]=p,e[11]=u):u=e[11];let f;e[12]!==c?(f=o.jsx(E,{side:"right",children:c}),e[12]=c,e[13]=f):f=e[13];let h;return e[14]!==u||e[15]!==f?(h=o.jsxs(z,{children:[u,f]}),e[14]=u,e[15]=f,e[16]=h):h=e[16],h}function $e(s){const e=j.c(3),t=y.use(O);let a;return e[0]!==s||e[1]!==t?(a=t?.target?W.createPortal(o.jsx(k,{...s}),t.target):null,e[0]=s,e[1]=t,e[2]=a):a=e[2],a}function _e(){const s=j.c(11),{setTarget:e}=oe(),t=re(),{isMobile:a}=I(),i=V(),{org:n}=F(),{openSidePanel:d}=K();let r;s[0]!==e?(r=o.jsx("div",{ref:e,className:"peer/thread-button contents empty:hidden"}),s[0]=e,s[1]=r):r=s[1];let l;s[2]!==t||s[3]!==a||s[4]!==i||s[5]!==d||s[6]!==n?(l=o.jsx("div",{className:"hidden peer-empty/thread-button:contents",children:o.jsx(k,{open:!1,onToggle:()=>{t?i({to:"/$org/home",params:{org:n.slug},search:{sidepanel:!0,mainpanel:!a}}):a?i({to:".",search:de,replace:!0}):d()}})}),s[2]=t,s[3]=a,s[4]=i,s[5]=d,s[6]=n,s[7]=l):l=s[7];let c;return s[8]!==r||s[9]!==l?(c=o.jsxs(o.Fragment,{children:[r,l]}),s[8]=r,s[9]=l,s[10]=c):c=s[10],c}function de(s){return{...s,...q("chat")}}function Ie(){const{state:s,isMobile:e}=I();return s==="collapsed"&&!e}export{ye as S,Te as a,Ce as b,I as c,we as d,_e as e,Ne as f,Se as g,re as h,ge as i,ve as j,Me as k,je as l,$e as m,Ie as u};
1
+ import{r as y,c as j,j as o,m as C,bW as A,bX as R,a6 as H,c7 as W,b as L,d as V,a4 as F}from"./index-Ckj4MapM.js";import{m as q}from"./use-chat-layout-state-Du2lamgE.js";import{M as X}from"./agent-icon-Cgeh7jW8.js";import{b as G,a as E,T as P,c as z}from"./tooltip-BDrd1lBk.js";import{T as J}from"./toolbar-icon-button-DJdC-8B7.js";import{g as K}from"./shell-layout-C2C8qdsE.js";import{u as Q}from"./use-mobile-DfHgA8LN.js";import{b as U,c as Y,S as Z,d as ee,a as te}from"./sheet-LMO2Ln_p.js";const se="15rem",ae="18rem",ie="4.5rem",D=y.createContext(null);function I(){const s=y.useContext(D);if(!s)throw new Error("useSidebar must be used within a SidebarProvider.");return s}function ge(s){const e=j.c(19),{children:t,defaultOpen:a,open:i,onOpenChange:n}=s,d=a===void 0?!1:a,r=Q(),[l,c]=y.useState(d),[p,v]=y.useState(!1),u=i!==void 0,f=u?i:l;let h;e[0]!==u||e[1]!==n?(h=M=>{u||c(M),n?.(M)},e[0]=u,e[1]=n,e[2]=h):h=e[2];const b=h;let w;e[3]!==r||e[4]!==f||e[5]!==b?(w=()=>{r?v(ne):b(!f)},e[3]=r,e[4]=f,e[5]=b,e[6]=w):w=e[6];const N=w,x=f?"expanded":"collapsed";let m;e[7]!==r||e[8]!==f||e[9]!==p||e[10]!==b||e[11]!==x||e[12]!==N?(m={state:x,open:f,setOpen:b,isMobile:r,openMobile:p,setOpenMobile:v,toggleSidebar:N},e[7]=r,e[8]=f,e[9]=p,e[10]=b,e[11]=x,e[12]=N,e[13]=m):m=e[13];const S=m;let g;e[14]!==t?(g=o.jsx(G,{delayDuration:0,children:t}),e[14]=t,e[15]=g):g=e[15];let T;return e[16]!==S||e[17]!==g?(T=o.jsx(D.Provider,{value:S,children:g}),e[16]=S,e[17]=g,e[18]=T):T=e[18],T}function ne(s){return!s}function ve(s){const e=j.c(14);let t,a,i,n;e[0]!==s?({className:a,style:n,children:t,...i}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n):(t=e[1],a=e[2],i=e[3],n=e[4]);let d;e[5]!==n?(d={"--sidebar-width":se,"--sidebar-width-icon":ie,...n},e[5]=n,e[6]=d):d=e[6];const r=d;let l;e[7]!==a?(l=C("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=l):l=e[8];let c;return e[9]!==t||e[10]!==i||e[11]!==r||e[12]!==l?(c=o.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:l,...i,children:t}),e[9]=t,e[10]=i,e[11]=r,e[12]=l,e[13]=c):c=e[13],c}function Se(s){const e=j.c(36);let t,a,i,n,d;e[0]!==s?({side:n,variant:d,className:a,children:t,...i}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n,e[5]=d):(t=e[1],a=e[2],i=e[3],n=e[4],d=e[5]);const r=n===void 0?"left":n,l=d===void 0?"sidebar":d,{isMobile:c,state:p,openMobile:v,setOpenMobile:u}=I();if(c){let T;e[6]===Symbol.for("react.memo_cache_sentinel")?(T={"--sidebar-width":ae},e[6]=T):T=e[6];let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsxs(Y,{className:"sr-only",children:[o.jsx(Z,{children:"Sidebar"}),o.jsx(ee,{children:"Displays the mobile sidebar."})]}),e[7]=M):M=e[7];let $;e[8]!==t?($=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=o.jsxs(te,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:T,side:r,children:[M,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let B;return e[13]!==v||e[14]!==i||e[15]!==u||e[16]!==_?(B=o.jsx(U,{open:v,onOpenChange:u,...i,children:_}),e[13]=v,e[14]=i,e[15]=u,e[16]=_,e[17]=B):B=e[17],B}const f=p==="expanded",h=f?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let b;e[18]!==h?(b=C("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",h),e[18]=h,e[19]=b):b=e[19];const w=f?void 0:"icon",N=f?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let x;e[20]!==a||e[21]!==N?(x=C("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",N,a),e[20]=a,e[21]=N,e[22]=x):x=e[22];let m;e[23]!==t?(m=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=m):m=e[24];let S;e[25]!==i||e[26]!==x||e[27]!==m?(S=o.jsx("div",{"data-slot":"sidebar-container",className:x,...i,children:m}),e[25]=i,e[26]=x,e[27]=m,e[28]=S):S=e[28];let g;return e[29]!==r||e[30]!==p||e[31]!==b||e[32]!==w||e[33]!==S||e[34]!==l?(g=o.jsx("div",{className:b,"data-state":p,"data-collapsible":w,"data-variant":l,"data-side":r,"data-slot":"sidebar",children:S}),e[29]=r,e[30]=p,e[31]=b,e[32]=w,e[33]=S,e[34]=l,e[35]=g):g=e[35],g}function je(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("main",{"data-slot":"sidebar-inset",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function we(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function Ne(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function Te(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function Ce(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}const le=R("peer/menu-button flex w-full cursor-pointer items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm focus-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground hover:[&_svg:not([class*='text-'])]:text-sidebar-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm group-data-[state=collapsed]/sidebar:size-8! group-data-[state=collapsed]/sidebar:rounded-full",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ye(s){const e=j.c(28);let t,a,i,n,d,r,l;e[0]!==s?({asChild:i,isActive:n,variant:d,size:r,tooltip:l,className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n,e[5]=d,e[6]=r,e[7]=l):(t=e[1],a=e[2],i=e[3],n=e[4],d=e[5],r=e[6],l=e[7]);const c=i===void 0?!1:i,p=n===void 0?!1:n,v=d===void 0?"default":d,u=r===void 0?"default":r,f=c?A:"button",{isMobile:h}=I();let b;e[8]!==t||e[9]!==u||e[10]!==v?(b=C(le({variant:v,size:u}),t),e[8]=t,e[9]=u,e[10]=v,e[11]=b):b=e[11];let w;e[12]!==f||e[13]!==p||e[14]!==a||e[15]!==u||e[16]!==b?(w=o.jsx(f,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":p,className:b,...a}),e[12]=f,e[13]=p,e[14]=a,e[15]=u,e[16]=b,e[17]=w):w=e[17];const N=w;if(!l)return N;if(typeof l=="string"){let g;e[18]!==l?(g={children:l},e[18]=l,e[19]=g):g=e[19],l=g}let x;e[20]!==N?(x=o.jsx(P,{asChild:!0,children:N}),e[20]=N,e[21]=x):x=e[21];let m;e[22]!==h||e[23]!==l?(m=o.jsx(E,{side:"right",align:"center",hidden:h,...l}),e[22]=h,e[23]=l,e[24]=m):m=e[24];let S;return e[25]!==x||e[26]!==m?(S=o.jsxs(z,{children:[x,m]}),e[25]=x,e[26]=m,e[27]=S):S=e[27],S}function re(){const s=j.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings",shouldThrow:!1},s[0]=e):e=s[0],!!H(e)}const O=y.createContext(null);function Me(s){const e=j.c(5),{children:t}=s,[a,i]=y.useState(null);let n;e[0]!==a?(n={target:a,setTarget:i},e[0]=a,e[1]=n):n=e[1];let d;return e[2]!==t||e[3]!==n?(d=o.jsx(O,{value:n,children:t}),e[2]=t,e[3]=n,e[4]=d):d=e[4],d}function oe(){const s=y.use(O);if(!s)throw new Error("Sidebar thread controls require a Layout");return s}function k(s){const e=j.c(17),{open:t,onToggle:a}=s,i=L(),{isMobile:n,setOpenMobile:d}=I(),r=t?"page.closeThread":"page.openThread";let l;e[0]!==i||e[1]!==r?(l=i(r),e[0]=i,e[1]=r,e[2]=l):l=e[2];const c=l;let p;e[3]!==n||e[4]!==a||e[5]!==d?(p=()=>{a(),n&&d(!1)},e[3]=n,e[4]=a,e[5]=d,e[6]=p):p=e[6];let v;e[7]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(X,{size:16}),e[7]=v):v=e[7];let u;e[8]!==c||e[9]!==t||e[10]!==p?(u=o.jsx(P,{asChild:!0,children:o.jsx(J,{"aria-label":c,"aria-pressed":t,active:t,className:"size-7 shrink-0 group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:size-8",onClick:p,children:v})}),e[8]=c,e[9]=t,e[10]=p,e[11]=u):u=e[11];let f;e[12]!==c?(f=o.jsx(E,{side:"right",children:c}),e[12]=c,e[13]=f):f=e[13];let h;return e[14]!==u||e[15]!==f?(h=o.jsxs(z,{children:[u,f]}),e[14]=u,e[15]=f,e[16]=h):h=e[16],h}function $e(s){const e=j.c(3),t=y.use(O);let a;return e[0]!==s||e[1]!==t?(a=t?.target?W.createPortal(o.jsx(k,{...s}),t.target):null,e[0]=s,e[1]=t,e[2]=a):a=e[2],a}function _e(){const s=j.c(11),{setTarget:e}=oe(),t=re(),{isMobile:a}=I(),i=V(),{org:n}=F(),{openSidePanel:d}=K();let r;s[0]!==e?(r=o.jsx("div",{ref:e,className:"peer/thread-button contents empty:hidden"}),s[0]=e,s[1]=r):r=s[1];let l;s[2]!==t||s[3]!==a||s[4]!==i||s[5]!==d||s[6]!==n?(l=o.jsx("div",{className:"hidden peer-empty/thread-button:contents",children:o.jsx(k,{open:!1,onToggle:()=>{t?i({to:"/$org/home",params:{org:n.slug},search:{sidepanel:!0,mainpanel:!a}}):a?i({to:".",search:de,replace:!0}):d()}})}),s[2]=t,s[3]=a,s[4]=i,s[5]=d,s[6]=n,s[7]=l):l=s[7];let c;return s[8]!==r||s[9]!==l?(c=o.jsxs(o.Fragment,{children:[r,l]}),s[8]=r,s[9]=l,s[10]=c):c=s[10],c}function de(s){return{...s,...q("chat")}}function Ie(){const{state:s,isMobile:e}=I();return s==="collapsed"&&!e}export{ye as S,Te as a,Ce as b,I as c,we as d,_e as e,Ne as f,Se as g,re as h,ge as i,ve as j,Me as k,je as l,$e as m,Ie as u};
@@ -1 +1 @@
1
- import{c as u,a4 as f,ak as y,i as m,q as g,e as T,K as l,t as E}from"./index-B0kMZVmC.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
1
+ import{c as u,a4 as f,ak as y,i as m,q as g,e as T,K as l,t as E}from"./index-Ckj4MapM.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
@@ -1 +1 @@
1
- import{c as O,f,i as S,K as _,al as R,a4 as i,ak as l}from"./index-B0kMZVmC.js";const K=["TASK_BOARD_OPERATION","TASK_BOARD_REWORK","TASK_BOARD_DELIVERY","TASK_BOARD_SPRINTS","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS"];function B(){const t=O.c(8),o=f({strict:!1}).org??"";let e;t[0]!==o?(e=_.taskBoardAdminOrgs(o),t[0]=o,t[1]=e):e=t[1];const s=!!o;let n;t[2]!==o?(n=()=>R(o,"TASK_BOARD_ADMIN_ORG_LIST",{}),t[2]=o,t[3]=n):n=t[3];let c;return t[4]!==e||t[5]!==s||t[6]!==n?(c={queryKey:e,enabled:s,queryFn:n,staleTime:3e5},t[4]=e,t[5]=s,t[6]=n,t[7]=c):c=t[7],S(c)}function y(t,o){const e=O.c(14),{locator:s}=i(),n=l();let c;e[0]!==s||e[1]!==o.from||e[2]!==o.org||e[3]!==o.project||e[4]!==o.to||e[5]!==t?(c=_.taskBoardAnalytics(s,t,o.org??"",o.project??"",o.from,o.to),e[0]=s,e[1]=o.from,e[2]=o.org,e[3]=o.project,e[4]=o.to,e[5]=t,e[6]=c):c=e[6];let T;e[7]!==o||e[8]!==n||e[9]!==t?(T=()=>n.call(t,o),e[7]=o,e[8]=n,e[9]=t,e[10]=T):T=e[10];let A;return e[11]!==c||e[12]!==T?(A={queryKey:c,queryFn:T},e[11]=c,e[12]=T,e[13]=A):A=e[13],S(A)}function D(t,o){const e=O.c(15),{locator:s}=i(),n=l();let c;e[0]!==o||e[1]!==s||e[2]!==t.from||e[3]!==t.org||e[4]!==t.project||e[5]!==t.to?(c=_.taskBoardOperationTasks(s,t.org??"",t.project??"",t.from,t.to,o??""),e[0]=o,e[1]=s,e[2]=t.from,e[3]=t.org,e[4]=t.project,e[5]=t.to,e[6]=c):c=e[6];const T=o!==null;let A;e[7]!==o||e[8]!==t||e[9]!==n?(A=()=>n.call("TASK_BOARD_OPERATION_TASKS",{...t,drill:o??""}),e[7]=o,e[8]=t,e[9]=n,e[10]=A):A=e[10];let u;return e[11]!==c||e[12]!==T||e[13]!==A?(u={queryKey:c,enabled:T,queryFn:A},e[11]=c,e[12]=T,e[13]=A,e[14]=u):u=e[14],S(u)}export{K as A,y as a,D as b,B as u};
1
+ import{c as O,f,i as S,K as _,al as R,a4 as i,ak as l}from"./index-Ckj4MapM.js";const K=["TASK_BOARD_OPERATION","TASK_BOARD_REWORK","TASK_BOARD_DELIVERY","TASK_BOARD_SPRINTS","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS"];function B(){const t=O.c(8),o=f({strict:!1}).org??"";let e;t[0]!==o?(e=_.taskBoardAdminOrgs(o),t[0]=o,t[1]=e):e=t[1];const s=!!o;let n;t[2]!==o?(n=()=>R(o,"TASK_BOARD_ADMIN_ORG_LIST",{}),t[2]=o,t[3]=n):n=t[3];let c;return t[4]!==e||t[5]!==s||t[6]!==n?(c={queryKey:e,enabled:s,queryFn:n,staleTime:3e5},t[4]=e,t[5]=s,t[6]=n,t[7]=c):c=t[7],S(c)}function y(t,o){const e=O.c(14),{locator:s}=i(),n=l();let c;e[0]!==s||e[1]!==o.from||e[2]!==o.org||e[3]!==o.project||e[4]!==o.to||e[5]!==t?(c=_.taskBoardAnalytics(s,t,o.org??"",o.project??"",o.from,o.to),e[0]=s,e[1]=o.from,e[2]=o.org,e[3]=o.project,e[4]=o.to,e[5]=t,e[6]=c):c=e[6];let T;e[7]!==o||e[8]!==n||e[9]!==t?(T=()=>n.call(t,o),e[7]=o,e[8]=n,e[9]=t,e[10]=T):T=e[10];let A;return e[11]!==c||e[12]!==T?(A={queryKey:c,queryFn:T},e[11]=c,e[12]=T,e[13]=A):A=e[13],S(A)}function D(t,o){const e=O.c(15),{locator:s}=i(),n=l();let c;e[0]!==o||e[1]!==s||e[2]!==t.from||e[3]!==t.org||e[4]!==t.project||e[5]!==t.to?(c=_.taskBoardOperationTasks(s,t.org??"",t.project??"",t.from,t.to,o??""),e[0]=o,e[1]=s,e[2]=t.from,e[3]=t.org,e[4]=t.project,e[5]=t.to,e[6]=c):c=e[6];const T=o!==null;let A;e[7]!==o||e[8]!==t||e[9]!==n?(A=()=>n.call("TASK_BOARD_OPERATION_TASKS",{...t,drill:o??""}),e[7]=o,e[8]=t,e[9]=n,e[10]=A):A=e[10];let u;return e[11]!==c||e[12]!==T||e[13]!==A?(u={queryKey:c,enabled:T,queryFn:A},e[11]=c,e[12]=T,e[13]=A,e[14]=u):u=e[14],S(u)}export{K as A,y as a,D as b,B as u};
@@ -1 +1 @@
1
- import{a as m}from"./task-board-CjAeUa_m.js";import{r as e}from"./index-B0kMZVmC.js";import{t as g}from"./watch-sse-pool-DDOa1h_t.js";const p=()=>0;function v(E){const{orgSlug:r,enabled:t=!0,onUpdate:u,onDelete:c,onResync:o}=E,a=e.useRef(u);a.current=u;const f=e.useRef(c);f.current=c;const d=e.useRef(o);d.current=o;const s=e.useRef(null),R=e.useRef(t),i=e.useRef(r);(!s.current||R.current!==t||i.current!==r)&&(R.current=t,i.current=r,s.current=b=>{if(!t||!r)return()=>{};const S=l=>{let n;try{n=JSON.parse(l.data)}catch{return}n.data&&(l.type===m?f.current?.(n.data.id):a.current(n.data)),b()};return g.subscribe(r,S,()=>d.current?.())}),e.useSyncExternalStore(s.current,p,p)}export{v as u};
1
+ import{a as m}from"./task-board-Bjy19ZeT.js";import{r as e}from"./index-Ckj4MapM.js";import{t as g}from"./watch-sse-pool-VTD53pp7.js";const p=()=>0;function v(E){const{orgSlug:r,enabled:t=!0,onUpdate:u,onDelete:c,onResync:o}=E,a=e.useRef(u);a.current=u;const f=e.useRef(c);f.current=c;const d=e.useRef(o);d.current=o;const s=e.useRef(null),R=e.useRef(t),i=e.useRef(r);(!s.current||R.current!==t||i.current!==r)&&(R.current=t,i.current=r,s.current=b=>{if(!t||!r)return()=>{};const S=l=>{let n;try{n=JSON.parse(l.data)}catch{return}n.data&&(l.type===m?f.current?.(n.data.id):a.current(n.data)),b()};return g.subscribe(r,S,()=>d.current?.())}),e.useSyncExternalStore(s.current,p,p)}export{v as u};
@@ -1 +1 @@
1
- import{r as y,at as w,c as h,a4 as R,ak as k,q as T,i as O,K as A}from"./index-B0kMZVmC.js";import{c as B}from"./watch-sse-pool-DDOa1h_t.js";const P=()=>0;function C(e){const{orgSlug:t,itemId:s,onPrs:r}=e,o=y.useRef(r);o.current=r;const l=y.useRef(null),a=y.useRef(""),i=`${t}:${s??""}`;(!l.current||a.current!==i)&&(a.current=i,l.current=u=>{if(!t||!s)return()=>{};const d=c=>{let n;try{n=JSON.parse(c.data)}catch{return}n.data?.id!==s||!Array.isArray(n.data.prs)||(o.current(n.data.prs),u())};return B.subscribe(t,d)}),y.useSyncExternalStore(l.current,P,P)}const E=1440*60*1e3,D=40;function g(e){try{const t=window.localStorage.getItem(w.taskBoardPrs(e));return t?JSON.parse(t):{}}catch{return{}}}function L(e){const t=Date.now(),s=Object.entries(e).filter(([,r])=>t-r.updatedAt<=E);for(s.sort(([,r],[,o])=>r.updatedAt-o.updatedAt);s.length>D;)s.shift();return Object.fromEntries(s)}function _(e,t){if(typeof window>"u")return null;const s=g(e)[t];return!s||Date.now()-s.updatedAt>E?null:s}function b(e,t,s){if(!(typeof window>"u"))try{const r=g(e);r[t]={data:s,updatedAt:Date.now()},window.localStorage.setItem(w.taskBoardPrs(e),JSON.stringify(L(r)))}catch{}}const v=6e4,K=2e3,N=e=>e.state===null;function j(e){const t=h.c(25),{org:s,locator:r}=R(),o=k(),l=T();let a;t[0]!==e||t[1]!==r||t[2]!==l?(a=S=>{l.setQueryData(A.taskBoardItemPrs(r,e??""),S)},t[0]=e,t[1]=r,t[2]=l,t[3]=a):a=t[3];let i;t[4]!==e||t[5]!==s.slug||t[6]!==a?(i={orgSlug:s.slug,itemId:e,onPrs:a},t[4]=e,t[5]=s.slug,t[6]=a,t[7]=i):i=t[7],C(i);let u;t[8]!==e||t[9]!==r?(u=A.taskBoardItemPrs(r,e??""),t[8]=e,t[9]=r,t[10]=u):u=t[10];const d=!!e;let c,n;t[11]!==e||t[12]!==r?(c=()=>e?_(r,e)?.data??void 0:void 0,n=()=>e?_(r,e)?.updatedAt:void 0,t[11]=e,t[12]=r,t[13]=c,t[14]=n):(c=t[13],n=t[14]);let f;t[15]!==e||t[16]!==r||t[17]!==o?(f=async()=>{const{prs:S}=await o.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:e});return b(r,e,S),S},t[15]=e,t[16]=r,t[17]=o,t[18]=f):f=t[18];let p;return t[19]!==u||t[20]!==d||t[21]!==c||t[22]!==n||t[23]!==f?(p={queryKey:u,enabled:d,refetchInterval:M,initialData:c,initialDataUpdatedAt:n,queryFn:f},t[19]=u,t[20]=d,t[21]=c,t[22]=n,t[23]=f,t[24]=p):p=t[24],O(p)}function M(e){return e.state.data?.some(N)?K:v}export{j as u};
1
+ import{r as y,at as w,c as h,a4 as R,ak as k,q as T,i as O,K as A}from"./index-Ckj4MapM.js";import{c as B}from"./watch-sse-pool-VTD53pp7.js";const P=()=>0;function C(e){const{orgSlug:t,itemId:s,onPrs:r}=e,o=y.useRef(r);o.current=r;const l=y.useRef(null),a=y.useRef(""),i=`${t}:${s??""}`;(!l.current||a.current!==i)&&(a.current=i,l.current=u=>{if(!t||!s)return()=>{};const d=c=>{let n;try{n=JSON.parse(c.data)}catch{return}n.data?.id!==s||!Array.isArray(n.data.prs)||(o.current(n.data.prs),u())};return B.subscribe(t,d)}),y.useSyncExternalStore(l.current,P,P)}const E=1440*60*1e3,D=40;function g(e){try{const t=window.localStorage.getItem(w.taskBoardPrs(e));return t?JSON.parse(t):{}}catch{return{}}}function L(e){const t=Date.now(),s=Object.entries(e).filter(([,r])=>t-r.updatedAt<=E);for(s.sort(([,r],[,o])=>r.updatedAt-o.updatedAt);s.length>D;)s.shift();return Object.fromEntries(s)}function _(e,t){if(typeof window>"u")return null;const s=g(e)[t];return!s||Date.now()-s.updatedAt>E?null:s}function b(e,t,s){if(!(typeof window>"u"))try{const r=g(e);r[t]={data:s,updatedAt:Date.now()},window.localStorage.setItem(w.taskBoardPrs(e),JSON.stringify(L(r)))}catch{}}const v=6e4,K=2e3,N=e=>e.state===null;function j(e){const t=h.c(25),{org:s,locator:r}=R(),o=k(),l=T();let a;t[0]!==e||t[1]!==r||t[2]!==l?(a=S=>{l.setQueryData(A.taskBoardItemPrs(r,e??""),S)},t[0]=e,t[1]=r,t[2]=l,t[3]=a):a=t[3];let i;t[4]!==e||t[5]!==s.slug||t[6]!==a?(i={orgSlug:s.slug,itemId:e,onPrs:a},t[4]=e,t[5]=s.slug,t[6]=a,t[7]=i):i=t[7],C(i);let u;t[8]!==e||t[9]!==r?(u=A.taskBoardItemPrs(r,e??""),t[8]=e,t[9]=r,t[10]=u):u=t[10];const d=!!e;let c,n;t[11]!==e||t[12]!==r?(c=()=>e?_(r,e)?.data??void 0:void 0,n=()=>e?_(r,e)?.updatedAt:void 0,t[11]=e,t[12]=r,t[13]=c,t[14]=n):(c=t[13],n=t[14]);let f;t[15]!==e||t[16]!==r||t[17]!==o?(f=async()=>{const{prs:S}=await o.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:e});return b(r,e,S),S},t[15]=e,t[16]=r,t[17]=o,t[18]=f):f=t[18];let p;return t[19]!==u||t[20]!==d||t[21]!==c||t[22]!==n||t[23]!==f?(p={queryKey:u,enabled:d,refetchInterval:M,initialData:c,initialDataUpdatedAt:n,queryFn:f},t[19]=u,t[20]=d,t[21]=c,t[22]=n,t[23]=f,t[24]=p):p=t[24],O(p)}function M(e){return e.state.data?.some(N)?K:v}export{j as u};
@@ -1 +1 @@
1
- import{i as j,b as Y}from"./config-CuCmBQuJ.js";import{c as P,a4 as U,q as W,K as E,ak as G,i as V,b as X,e as R,E as Z,t as H}from"./index-B0kMZVmC.js";import{u as tt}from"./use-task-board-events-DspRxQsF.js";import{u as et}from"./use-decopilot-events-144aPqKs.js";const st=new Set(["post_deploy_validation","done"]),at=new Set(["done","archived"]);function J(t){if(!st.has(t.status)||!t.updatedAt)return null;const r=Date.parse(t.updatedAt);return Number.isNaN(r)?null:r}function ft(t,r){return t.filter(s=>(J(s)??-1/0)>=r).length}function mt(t,r){return t.filter(s=>at.has(s.status)?!1:r&&s.assigneeId===r?!0:j(s)||Y(s)).sort((s,e)=>(s.updatedAt??"").localeCompare(e.updatedAt??""))}function yt(t){return j(t)?"answer":Y(t)?"review":"assigned"}function ht(t){const r=[];for(const s of t)for(const e of s.threads)e.status==="in_progress"&&r.push({threadId:e.threadId,taskId:s.id,taskTitle:s.title,runTitle:e.title,startedAt:e.createdAt});return r.sort((s,e)=>e.startedAt.localeCompare(s.startedAt))}const gt=14;function At(t,r,s=Date.now()){const e=new Array(r).fill(0);for(const a of t){const n=J(a);if(n===null)continue;const i=r-1-Math.floor(Math.max(0,s-n)/864e5);i>=0&&i<r&&(e[i]+=1)}return e}function It(t,r,s=Date.now()){const e=new Array(r).fill(0);for(const a of t)for(const n of a.threads){const i=Date.parse(n.lastActiveAt);if(Number.isNaN(i))continue;const o=r-1-Math.floor(Math.max(0,s-i)/864e5);o>=0&&o<r&&(e[o]+=1)}return e}function rt(t){const r=new Date(t);r.setDate(1),r.setHours(0,0,0,0);const s=r.getTime();return{since:s,days:Math.floor((t-s)/864e5)+1}}function St(t,r=Date.now()){const{since:s,days:e}=rt(r),a=new Array(e).fill(0);for(const n of t)for(const i of n.threads){const o=Date.parse(i.lastActiveAt);if(Number.isNaN(o)||o<s||o>r)continue;const m=Math.floor((o-s)/864e5);m>=0&&m<e&&(a[m]+=i.costUsd??0)}return a}function Tt(t){return t<=0?"$0":t>=1e3?`$${(t/1e3).toFixed(1)}k`:t>=10?`$${Math.round(t)}`:`$${t.toFixed(2)}`}function nt(t,r){return{queryKey:E.taskBoardItems(t),refetchInterval:6e4,queryFn:async()=>{const{items:s,demoFrozenItemIds:e}=await r.call("TASK_BOARD_ITEM_LIST",{});return{items:s,demoFrozenItemIds:e}}}}function ot(){const t=P.c(21),{org:r,locator:s}=U(),e=W();let a;t[0]!==s?(a=E.taskBoardItems(s),t[0]=s,t[1]=a):a=t[1];const n=a;let i;t[2]!==s||t[3]!==e||t[4]!==n?(i=y=>{e.cancelQueries({queryKey:n}),e.setQueryData(n,d=>d&&{...d,items:d.items.some(c=>c.id===y.id)?d.items.map(c=>c.id===y.id?y:c):[y,...d.items]}),e.invalidateQueries({queryKey:E.taskBoardActivity(s,y.id)}),e.invalidateQueries({queryKey:E.taskBoardComments(s,y.id)})},t[2]=s,t[3]=e,t[4]=n,t[5]=i):i=t[5];let o,m;t[6]!==e||t[7]!==n?(o=()=>{e.invalidateQueries({queryKey:n})},m=y=>{e.cancelQueries({queryKey:n}),e.setQueryData(n,d=>d&&{...d,items:d.items.filter(c=>c.id!==y)})},t[6]=e,t[7]=n,t[8]=o,t[9]=m):(o=t[8],m=t[9]);let u;t[10]!==r.slug||t[11]!==i||t[12]!==o||t[13]!==m?(u={orgSlug:r.slug,onUpdate:i,onResync:o,onDelete:m},t[10]=r.slug,t[11]=i,t[12]=o,t[13]=m,t[14]=u):u=t[14],tt(u);let h;t[15]!==e||t[16]!==n?(h=y=>{const d=y.subject,c=y.data.status;e.cancelQueries({queryKey:n}),e.setQueryData(n,g=>g&&{...g,items:g.items.map(A=>A.threads.some(S=>S.threadId===d)?{...A,threads:A.threads.map(S=>S.threadId===d?{...S,status:c}:S)}:A)});const D=e.getQueryData(n)?.items.some(g=>g.threads.some(A=>A.threadId===d));c==="failed"&&D&&e.invalidateQueries({queryKey:n})},t[15]=e,t[16]=n,t[17]=h):h=t[17];let T;t[18]!==r.slug||t[19]!==h?(T={orgSlug:r.slug,onTaskStatus:h},t[18]=r.slug,t[19]=h,t[20]=T):T=t[20],et(T)}function Dt(){const t=P.c(13),{locator:r}=U(),s=G();let e;t[0]!==r||t[1]!==s?(e=nt(r,s),t[0]=r,t[1]=s,t[2]=e):e=t[2];const a=V(e);ot();let n;t[3]!==a.data?.items?(n=a.data?.items??[],t[3]=a.data?.items,t[4]=n):n=t[4];let i;t[5]!==a.data?.demoFrozenItemIds?(i=a.data?.demoFrozenItemIds??[],t[5]=a.data?.demoFrozenItemIds,t[6]=i):i=t[6];let o;return t[7]!==a.error||t[8]!==a.isFetching||t[9]!==a.isLoading||t[10]!==n||t[11]!==i?(o={items:n,demoFrozenItemIds:i,isLoading:a.isLoading,isFetching:a.isFetching,error:a.error},t[7]=a.error,t[8]=a.isFetching,t[9]=a.isLoading,t[10]=n,t[11]=i,t[12]=o):o=t[12],o}function Et(){const t=P.c(70),{org:r,locator:s}=U(),e=G(),a=W(),n=X();let i;t[0]!==s?(i=E.taskBoardItems(s),t[0]=s,t[1]=i):i=t[1];const o=i;let m;t[2]!==a||t[3]!==o?(m=()=>a.invalidateQueries({queryKey:o}),t[2]=a,t[3]=o,t[4]=m):m=t[4];const u=m;let h;t[5]!==e?(h=l=>e.call("TASK_BOARD_ITEM_CREATE",l),t[5]=e,t[6]=h):h=t[6];let T;t[7]!==u||t[8]!==h?(T={mutationFn:h,onSuccess:u},t[7]=u,t[8]=h,t[9]=T):T=t[9];const y=R(T);let d;t[10]!==e?(d=l=>e.call("TASK_BOARD_ITEM_UPDATE",l),t[10]=e,t[11]=d):d=t[11];let c;t[12]!==a||t[13]!==o?(c=async l=>{await a.cancelQueries({queryKey:o});const I=a.getQueryData(o);return a.setQueryData(o,f=>f&&{...f,items:f.items.map(O=>O.id===l.id?{...O,...l,...l.status!==void 0&&l.status!==O.status&&{statusSince:new Date().toISOString()}}:O)}),{previous:I}},t[12]=a,t[13]=o,t[14]=c):c=t[14];let D;t[15]!==r?(D=(l,I)=>{I.status==="done"&&Z("task_marked_done",{organization_id:r.id,task_board_item_id:I.id})},t[15]=r,t[16]=D):D=t[16];let g;t[17]!==a||t[18]!==o?(g=(l,I,f)=>{f?.previous&&a.setQueryData(o,f.previous)},t[17]=a,t[18]=o,t[19]=g):g=t[19];let A;t[20]!==u||t[21]!==s||t[22]!==a?(A=(l,I,f)=>{u(),a.invalidateQueries({queryKey:E.taskBoardActivity(s,f.id)})},t[20]=u,t[21]=s,t[22]=a,t[23]=A):A=t[23];let S;t[24]!==d||t[25]!==c||t[26]!==D||t[27]!==g||t[28]!==A?(S={mutationFn:d,onMutate:c,onSuccess:D,onError:g,onSettled:A},t[24]=d,t[25]=c,t[26]=D,t[27]=g,t[28]=A,t[29]=S):S=t[29];const $=R(S);let k;t[30]!==e?(k=l=>e.call("TASK_BOARD_ITEM_DELETE",{id:l}),t[30]=e,t[31]=k):k=t[31];let _;t[32]!==u||t[33]!==n?(_=l=>{H.error(l instanceof Error&&l.message?l.message:n("taskBoard.taskBoard.deleteError")),u()},t[32]=u,t[33]=n,t[34]=_):_=t[34];let w;t[35]!==u||t[36]!==k||t[37]!==_?(w={mutationFn:k,onSuccess:u,onError:_},t[35]=u,t[36]=k,t[37]=_,t[38]=w):w=t[38];const x=R(w);let B;t[39]!==e?(B=async l=>{const I=await Promise.allSettled(l.map(f=>e.call("TASK_BOARD_ITEM_DELETE",{id:f})));return{total:l.length,failed:I.filter(it).length}},t[39]=e,t[40]=B):B=t[40];let p,Q;t[41]!==n?(p=l=>{const{total:I,failed:f}=l;f!==0&&H.error(n("taskBoard.taskBoard.deleteBulkError",{failed:String(f),total:String(I)}))},Q=()=>H.error(n("taskBoard.taskBoard.deleteError")),t[41]=n,t[42]=p,t[43]=Q):(p=t[42],Q=t[43]);let q;t[44]!==u||t[45]!==B||t[46]!==p||t[47]!==Q?(q={mutationFn:B,onSuccess:p,onError:Q,onSettled:u},t[44]=u,t[45]=B,t[46]=p,t[47]=Q,t[48]=q):q=t[48];const L=R(q);let M;t[49]!==e?(M=l=>e.call("TASK_BOARD_ITEM_UPDATE",l),t[49]=e,t[50]=M):M=t[50];let v;t[51]!==u||t[52]!==M?(v={mutationFn:M,onSuccess:u},t[51]=u,t[52]=M,t[53]=v):v=t[53];const b=R(v);let F;t[54]!==e?(F=l=>e.call("TASK_BOARD_ITEM_RERUN",l),t[54]=e,t[55]=F):F=t[55];let K;t[56]!==u||t[57]!==s||t[58]!==a?(K=(l,I,f)=>{u(),a.invalidateQueries({queryKey:E.taskBoardActivity(s,f.id)})},t[56]=u,t[57]=s,t[58]=a,t[59]=K):K=t[59];let N;t[60]!==F||t[61]!==K?(N={mutationFn:F,onSettled:K},t[60]=F,t[61]=K,t[62]=N):N=t[62];const z=R(N);let C;return t[63]!==y||t[64]!==b||t[65]!==x||t[66]!==L||t[67]!==z||t[68]!==$?(C={create:y,update:$,remove:x,removeMany:L,link:b,rerun:z},t[63]=y,t[64]=b,t[65]=x,t[66]=L,t[67]=z,t[68]=$,t[69]=C):C=t[69],C}function it(t){return t.status==="rejected"}export{gt as R,nt as a,yt as b,At as c,It as d,St as e,Tt as f,Dt as g,Et as h,ht as r,ft as s,mt as t,ot as u};
1
+ import{i as j,b as Y}from"./config-USouThEx.js";import{c as P,a4 as U,q as W,K as E,ak as G,i as V,b as X,e as R,E as Z,t as H}from"./index-Ckj4MapM.js";import{u as tt}from"./use-task-board-events-AFPQ3IaY.js";import{u as et}from"./use-decopilot-events-DAAHbAJ8.js";const st=new Set(["post_deploy_validation","done"]),at=new Set(["done","archived"]);function J(t){if(!st.has(t.status)||!t.updatedAt)return null;const r=Date.parse(t.updatedAt);return Number.isNaN(r)?null:r}function ft(t,r){return t.filter(s=>(J(s)??-1/0)>=r).length}function mt(t,r){return t.filter(s=>at.has(s.status)?!1:r&&s.assigneeId===r?!0:j(s)||Y(s)).sort((s,e)=>(s.updatedAt??"").localeCompare(e.updatedAt??""))}function yt(t){return j(t)?"answer":Y(t)?"review":"assigned"}function ht(t){const r=[];for(const s of t)for(const e of s.threads)e.status==="in_progress"&&r.push({threadId:e.threadId,taskId:s.id,taskTitle:s.title,runTitle:e.title,startedAt:e.createdAt});return r.sort((s,e)=>e.startedAt.localeCompare(s.startedAt))}const gt=14;function At(t,r,s=Date.now()){const e=new Array(r).fill(0);for(const a of t){const n=J(a);if(n===null)continue;const i=r-1-Math.floor(Math.max(0,s-n)/864e5);i>=0&&i<r&&(e[i]+=1)}return e}function It(t,r,s=Date.now()){const e=new Array(r).fill(0);for(const a of t)for(const n of a.threads){const i=Date.parse(n.lastActiveAt);if(Number.isNaN(i))continue;const o=r-1-Math.floor(Math.max(0,s-i)/864e5);o>=0&&o<r&&(e[o]+=1)}return e}function rt(t){const r=new Date(t);r.setDate(1),r.setHours(0,0,0,0);const s=r.getTime();return{since:s,days:Math.floor((t-s)/864e5)+1}}function St(t,r=Date.now()){const{since:s,days:e}=rt(r),a=new Array(e).fill(0);for(const n of t)for(const i of n.threads){const o=Date.parse(i.lastActiveAt);if(Number.isNaN(o)||o<s||o>r)continue;const m=Math.floor((o-s)/864e5);m>=0&&m<e&&(a[m]+=i.costUsd??0)}return a}function Tt(t){return t<=0?"$0":t>=1e3?`$${(t/1e3).toFixed(1)}k`:t>=10?`$${Math.round(t)}`:`$${t.toFixed(2)}`}function nt(t,r){return{queryKey:E.taskBoardItems(t),refetchInterval:6e4,queryFn:async()=>{const{items:s,demoFrozenItemIds:e}=await r.call("TASK_BOARD_ITEM_LIST",{});return{items:s,demoFrozenItemIds:e}}}}function ot(){const t=P.c(21),{org:r,locator:s}=U(),e=W();let a;t[0]!==s?(a=E.taskBoardItems(s),t[0]=s,t[1]=a):a=t[1];const n=a;let i;t[2]!==s||t[3]!==e||t[4]!==n?(i=y=>{e.cancelQueries({queryKey:n}),e.setQueryData(n,d=>d&&{...d,items:d.items.some(c=>c.id===y.id)?d.items.map(c=>c.id===y.id?y:c):[y,...d.items]}),e.invalidateQueries({queryKey:E.taskBoardActivity(s,y.id)}),e.invalidateQueries({queryKey:E.taskBoardComments(s,y.id)})},t[2]=s,t[3]=e,t[4]=n,t[5]=i):i=t[5];let o,m;t[6]!==e||t[7]!==n?(o=()=>{e.invalidateQueries({queryKey:n})},m=y=>{e.cancelQueries({queryKey:n}),e.setQueryData(n,d=>d&&{...d,items:d.items.filter(c=>c.id!==y)})},t[6]=e,t[7]=n,t[8]=o,t[9]=m):(o=t[8],m=t[9]);let u;t[10]!==r.slug||t[11]!==i||t[12]!==o||t[13]!==m?(u={orgSlug:r.slug,onUpdate:i,onResync:o,onDelete:m},t[10]=r.slug,t[11]=i,t[12]=o,t[13]=m,t[14]=u):u=t[14],tt(u);let h;t[15]!==e||t[16]!==n?(h=y=>{const d=y.subject,c=y.data.status;e.cancelQueries({queryKey:n}),e.setQueryData(n,g=>g&&{...g,items:g.items.map(A=>A.threads.some(S=>S.threadId===d)?{...A,threads:A.threads.map(S=>S.threadId===d?{...S,status:c}:S)}:A)});const D=e.getQueryData(n)?.items.some(g=>g.threads.some(A=>A.threadId===d));c==="failed"&&D&&e.invalidateQueries({queryKey:n})},t[15]=e,t[16]=n,t[17]=h):h=t[17];let T;t[18]!==r.slug||t[19]!==h?(T={orgSlug:r.slug,onTaskStatus:h},t[18]=r.slug,t[19]=h,t[20]=T):T=t[20],et(T)}function Dt(){const t=P.c(13),{locator:r}=U(),s=G();let e;t[0]!==r||t[1]!==s?(e=nt(r,s),t[0]=r,t[1]=s,t[2]=e):e=t[2];const a=V(e);ot();let n;t[3]!==a.data?.items?(n=a.data?.items??[],t[3]=a.data?.items,t[4]=n):n=t[4];let i;t[5]!==a.data?.demoFrozenItemIds?(i=a.data?.demoFrozenItemIds??[],t[5]=a.data?.demoFrozenItemIds,t[6]=i):i=t[6];let o;return t[7]!==a.error||t[8]!==a.isFetching||t[9]!==a.isLoading||t[10]!==n||t[11]!==i?(o={items:n,demoFrozenItemIds:i,isLoading:a.isLoading,isFetching:a.isFetching,error:a.error},t[7]=a.error,t[8]=a.isFetching,t[9]=a.isLoading,t[10]=n,t[11]=i,t[12]=o):o=t[12],o}function Et(){const t=P.c(70),{org:r,locator:s}=U(),e=G(),a=W(),n=X();let i;t[0]!==s?(i=E.taskBoardItems(s),t[0]=s,t[1]=i):i=t[1];const o=i;let m;t[2]!==a||t[3]!==o?(m=()=>a.invalidateQueries({queryKey:o}),t[2]=a,t[3]=o,t[4]=m):m=t[4];const u=m;let h;t[5]!==e?(h=l=>e.call("TASK_BOARD_ITEM_CREATE",l),t[5]=e,t[6]=h):h=t[6];let T;t[7]!==u||t[8]!==h?(T={mutationFn:h,onSuccess:u},t[7]=u,t[8]=h,t[9]=T):T=t[9];const y=R(T);let d;t[10]!==e?(d=l=>e.call("TASK_BOARD_ITEM_UPDATE",l),t[10]=e,t[11]=d):d=t[11];let c;t[12]!==a||t[13]!==o?(c=async l=>{await a.cancelQueries({queryKey:o});const I=a.getQueryData(o);return a.setQueryData(o,f=>f&&{...f,items:f.items.map(O=>O.id===l.id?{...O,...l,...l.status!==void 0&&l.status!==O.status&&{statusSince:new Date().toISOString()}}:O)}),{previous:I}},t[12]=a,t[13]=o,t[14]=c):c=t[14];let D;t[15]!==r?(D=(l,I)=>{I.status==="done"&&Z("task_marked_done",{organization_id:r.id,task_board_item_id:I.id})},t[15]=r,t[16]=D):D=t[16];let g;t[17]!==a||t[18]!==o?(g=(l,I,f)=>{f?.previous&&a.setQueryData(o,f.previous)},t[17]=a,t[18]=o,t[19]=g):g=t[19];let A;t[20]!==u||t[21]!==s||t[22]!==a?(A=(l,I,f)=>{u(),a.invalidateQueries({queryKey:E.taskBoardActivity(s,f.id)})},t[20]=u,t[21]=s,t[22]=a,t[23]=A):A=t[23];let S;t[24]!==d||t[25]!==c||t[26]!==D||t[27]!==g||t[28]!==A?(S={mutationFn:d,onMutate:c,onSuccess:D,onError:g,onSettled:A},t[24]=d,t[25]=c,t[26]=D,t[27]=g,t[28]=A,t[29]=S):S=t[29];const $=R(S);let k;t[30]!==e?(k=l=>e.call("TASK_BOARD_ITEM_DELETE",{id:l}),t[30]=e,t[31]=k):k=t[31];let _;t[32]!==u||t[33]!==n?(_=l=>{H.error(l instanceof Error&&l.message?l.message:n("taskBoard.taskBoard.deleteError")),u()},t[32]=u,t[33]=n,t[34]=_):_=t[34];let w;t[35]!==u||t[36]!==k||t[37]!==_?(w={mutationFn:k,onSuccess:u,onError:_},t[35]=u,t[36]=k,t[37]=_,t[38]=w):w=t[38];const x=R(w);let B;t[39]!==e?(B=async l=>{const I=await Promise.allSettled(l.map(f=>e.call("TASK_BOARD_ITEM_DELETE",{id:f})));return{total:l.length,failed:I.filter(it).length}},t[39]=e,t[40]=B):B=t[40];let p,Q;t[41]!==n?(p=l=>{const{total:I,failed:f}=l;f!==0&&H.error(n("taskBoard.taskBoard.deleteBulkError",{failed:String(f),total:String(I)}))},Q=()=>H.error(n("taskBoard.taskBoard.deleteError")),t[41]=n,t[42]=p,t[43]=Q):(p=t[42],Q=t[43]);let q;t[44]!==u||t[45]!==B||t[46]!==p||t[47]!==Q?(q={mutationFn:B,onSuccess:p,onError:Q,onSettled:u},t[44]=u,t[45]=B,t[46]=p,t[47]=Q,t[48]=q):q=t[48];const L=R(q);let M;t[49]!==e?(M=l=>e.call("TASK_BOARD_ITEM_UPDATE",l),t[49]=e,t[50]=M):M=t[50];let v;t[51]!==u||t[52]!==M?(v={mutationFn:M,onSuccess:u},t[51]=u,t[52]=M,t[53]=v):v=t[53];const b=R(v);let F;t[54]!==e?(F=l=>e.call("TASK_BOARD_ITEM_RERUN",l),t[54]=e,t[55]=F):F=t[55];let K;t[56]!==u||t[57]!==s||t[58]!==a?(K=(l,I,f)=>{u(),a.invalidateQueries({queryKey:E.taskBoardActivity(s,f.id)})},t[56]=u,t[57]=s,t[58]=a,t[59]=K):K=t[59];let N;t[60]!==F||t[61]!==K?(N={mutationFn:F,onSettled:K},t[60]=F,t[61]=K,t[62]=N):N=t[62];const z=R(N);let C;return t[63]!==y||t[64]!==b||t[65]!==x||t[66]!==L||t[67]!==z||t[68]!==$?(C={create:y,update:$,remove:x,removeMany:L,link:b,rerun:z},t[63]=y,t[64]=b,t[65]=x,t[66]=L,t[67]=z,t[68]=$,t[69]=C):C=t[69],C}function it(t){return t.status==="rejected"}export{gt as R,nt as a,yt as b,At as c,It as d,St as e,Tt as f,Dt as g,Et as h,ht as r,ft as s,mt as t,ot as u};
@@ -1 +1 @@
1
- import{c as $,b as D,m as z,j as o,a4 as q,L as Z,as as ee,d as te,r as U,hh as se,B as ae,t as oe,ak as V,K as F,i as ne,q as Y,e as le}from"./index-B0kMZVmC.js";import{s as W}from"./Plus-D93afoay.js";import{s as re}from"./XClose-DN30jgS9.js";import{i as ie}from"./Zap-C1Evk-yy.js";import{B as K}from"./badge-C5mneqKN.js";import{f as ce,a as ue,c as de,C as me,e as fe,b as pe}from"./command-woRMyGZF.js";import{I as xe}from"./icon-button-DqWSrNSZ.js";import{c as he,a as ge,b as je,S as ke}from"./sheet-DFpCUkzK.js";import{j as ve}from"./use-org-fs-CnKWtsx6.js";import{a as Ne}from"./use-project-scope-BpnU42cL.js";import{u as J,a as _e}from"./use-automations-CRCU5rUU.js";import{C as ye}from"./task-board-CjAeUa_m.js";import{b as be}from"./watch-sse-pool-DDOa1h_t.js";const Be={triage:"taskBoard.columnGuide.triage",todo:"taskBoard.columnGuide.todo",in_progress:"taskBoard.columnGuide.inProgress",in_review:"taskBoard.columnGuide.inReview",qa:"taskBoard.columnGuide.qa",customer_approval:"taskBoard.columnGuide.customerApproval",ready_for_deployment:"taskBoard.columnGuide.readyForDeployment",post_deploy_validation:"taskBoard.columnGuide.postDeployValidation",done:null,archived:null};function Se(t){const e=ye.find(a=>a===t);return e?Be[e]:null}function He(t){const e=$.c(7),{data:a}=J();let s;e[0]!==a?(s=a??[],e[0]=a,e[1]=s):s=e[1];let n;if(e[2]!==t||e[3]!==s){let l;e[5]!==t?(l=r=>r.board_triggers.some(c=>c.type==="board_column_transition"&&c.column_key===t),e[5]=t,e[6]=l):l=e[6],n=s.filter(l),e[2]=t,e[3]=s,e[4]=n}else n=e[4];return n}function Q(t){switch(t){case"board_column_transition":return 0;case"board_pr_ready":return 1;case"board_pr_merged":return 2;default:return t}}function Ce(t){switch(t){case"board_column_transition":return"taskBoard.columnRules.starter.board_column_transition";case"board_pr_ready":return"taskBoard.columnRules.starter.board_pr_ready";case"board_pr_merged":return"taskBoard.columnRules.starter.board_pr_merged";default:return t}}function Re(t){const e=$.c(5),{data:a}=J();let s;if(e[0]!==t||e[1]!==a){let n;e[3]!==t?(n=l=>{const r=l.board_triggers.find(c=>c.column_key===t);return r?[{automation:l,starter:r.type}]:[]},e[3]=t,e[4]=n):n=e[4],s=(a??[]).flatMap(n).sort(Ae),e[0]=t,e[1]=a,e[2]=s}else s=e[2];return s}function Ae(t,e){return Number(e.automation.active)-Number(t.automation.active)||Q(t.starter)-Q(e.starter)}function Ue(t){const e=$.c(37),{columnKey:a,label:s,icon:n,iconClassName:l,open:r,onOpenChange:c}=t,i=D(),{org:u}=q(),h=Se(a),d=Re(a);let g;e[0]!==c?(g=()=>c(!1),e[0]=c,e[1]=g):g=e[1];const x=g,R=je,_=ge,O="w-full gap-0 sm:max-w-md",y=void 0,b=Te,B=he,A="gap-1 pb-0";let m;e[2]!==n||e[3]!==l?(m=n&&o.jsx(n,{size:16,className:l}),e[2]=n,e[3]=l,e[4]=m):m=e[4];let j;e[5]!==s||e[6]!==m?(j=o.jsxs(ke,{className:"flex items-center gap-2",children:[m,s]}),e[5]=s,e[6]=m,e[7]=j):j=e[7];const T=h&&o.jsx("p",{className:"surface-inset mt-2 rounded-xl px-3.5 py-3 text-sm leading-relaxed text-foreground",children:i(h)});let k;e[8]!==B||e[9]!==j||e[10]!==T?(k=o.jsxs(B,{className:A,children:[j,T]}),e[8]=B,e[9]=j,e[10]=T,e[11]=k):k=e[11];let v;e[12]!==i?(v=i("taskBoard.columnRules.runsHere"),e[12]=i,e[13]=v):v=e[13];let S;e[14]!==v?(S=o.jsx("h3",{className:"text-meta",children:v}),e[14]=v,e[15]=S):S=e[15];let f;e[16]!==d||e[17]!==a||e[18]!==s||e[19]!==x||e[20]!==u||e[21]!==i?(f=d.length===0?o.jsx(we,{columnKey:a,label:s,onLeave:x}):o.jsx("div",{className:"surface divide-y divide-border",children:d.map(L=>{const{automation:N,starter:E}=L;return o.jsxs(Z,{to:"/$org/projects/$agentId/automations/$automationId",params:{org:u.slug,agentId:N.virtual_mcp_id,automationId:N.id},onClick:x,className:"group flex items-center gap-3 px-3 py-2.5 transition-colors hover:bg-accent/50",children:[o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx("span",{className:z("truncate text-sm",N.active?"text-foreground":"text-muted-foreground"),children:N.name}),o.jsx("span",{className:"text-meta",children:N.active?i(Ce(E)):i("taskBoard.columnRules.off")})]}),o.jsx(ee,{size:14,className:"shrink-0 text-muted-foreground transition-colors group-hover:text-foreground"})]},N.id)})}),e[16]=d,e[17]=a,e[18]=s,e[19]=x,e[20]=u,e[21]=i,e[22]=f):f=e[22];let w;e[23]!==S||e[24]!==f?(w=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-4 pt-6 pb-6",children:[S,f]}),e[23]=S,e[24]=f,e[25]=w):w=e[25];let I;e[26]!==_||e[27]!==w||e[28]!==y||e[29]!==b||e[30]!==k?(I=o.jsxs(_,{className:O,"aria-describedby":y,onOpenAutoFocus:b,children:[k,w]}),e[26]=_,e[27]=w,e[28]=y,e[29]=b,e[30]=k,e[31]=I):I=e[31];let C;return e[32]!==R||e[33]!==r||e[34]!==c||e[35]!==I?(C=o.jsx(R,{open:r,onOpenChange:c,children:I}),e[32]=R,e[33]=r,e[34]=c,e[35]=I,e[36]=C):C=e[36],C}function Te(t){return t.preventDefault()}function we({columnKey:t,label:e,onLeave:a}){const s=D(),{org:n}=q(),{project:l}=Ne(),r=te(),{create:c,triggerAdd:i}=_e(),[u,h]=U.useState(!1),d=l?.id??se(n.id),g=async()=>{h(!0);try{const x=await c.mutateAsync({name:s("taskBoard.columnRules.newAutomationName",{column:e}),messages:[],models:{tier:"smart"},active:!1,virtual_mcp_id:d});await i.mutateAsync({automation_id:x.id,type:"board_column_transition",column_key:t}),a(),r({to:"/$org/projects/$agentId/automations/$automationId",params:{org:n.slug,agentId:d,automationId:x.id}})}catch{oe.error(s("taskBoard.columnRules.newAutomationFailed"))}finally{h(!1)}};return o.jsxs("div",{className:"surface flex flex-col items-center gap-3 px-6 py-8 text-center",children:[o.jsx("span",{className:"flex size-9 items-center justify-center rounded-full bg-muted text-muted-foreground",children:o.jsx(ie,{size:16})}),o.jsx("p",{className:"text-sm font-medium text-foreground",children:s("taskBoard.columnRules.noAutomations")}),o.jsxs(ae,{variant:"outline",size:"sm",className:"gap-1.5",disabled:u,onClick:g,children:[o.jsx(W,{size:14}),s("taskBoard.columnRules.newAutomation")]})]})}const Ie=[];function Ve(t){const e=$.c(71),{value:a,onChange:s,inherited:n,fill:l}=t,r=n===void 0?Ie:n,c=l===void 0?!1:l,i=D(),u=ve();let h;e[0]!==u.data?(h=f=>u.data?.find(w=>w.id===f)?.name??f,e[0]=u.data,e[1]=h):h=e[1];const d=h;let g,x,R,_,O,y,b,B,A,m;if(e[2]!==u.data||e[3]!==c||e[4]!==r||e[5]!==d||e[6]!==s||e[7]!==i||e[8]!==a){let f;e[19]!==r||e[20]!==a?(f=p=>!p.disableModelInvocation&&!a.includes(p.id)&&!r.includes(p.id),e[19]=r,e[20]=a,e[21]=f):f=e[21];const w=(u.data??[]).filter(f);if(e[22]!==c||e[23]!==r||e[24]!==d||e[25]!==s||e[26]!==i||e[27]!==a){let p;e[30]!==r?(p=P=>!r.includes(P),e[30]=r,e[31]=p):p=e[31];const M=a.filter(p),G=c&&"min-h-0 flex-1";e[32]!==G?(m=z("flex flex-col gap-2",G),e[32]=G,e[33]=m):m=e[33],_=M.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1.5",children:M.map(P=>o.jsxs(K,{variant:"outline",className:"py-0 pr-0 pl-2",children:[d(P),o.jsx(xe,{label:i("taskBoard.columnRules.removeSkill",{skill:d(P)}),onClick:()=>s(a.filter(X=>X!==P)),className:"size-5 text-muted-foreground",children:o.jsx(re,{size:12})})]},P))}),e[22]=c,e[23]=r,e[24]=d,e[25]=s,e[26]=i,e[27]=a,e[28]=_,e[29]=m}else _=e[28],m=e[29];R=ce;const I=c&&"min-h-0 flex-1";e[34]!==I?(B=z("h-auto border",I),e[34]=I,e[35]=B):B=e[35];let C;e[36]!==i?(C=i("taskBoard.columnRules.searchSkills"),e[36]=i,e[37]=C):C=e[37],e[38]!==C?(A=o.jsx(ue,{placeholder:C,className:"h-9"}),e[38]=C,e[39]=A):A=e[39],x=de;const L=c?"max-h-none flex-1":"max-h-56";e[40]!==L?(y=z(L),e[40]=L,e[41]=y):y=e[41];let N;e[42]!==i?(N=i("taskBoard.columnRules.noSkills"),e[42]=i,e[43]=N):N=e[43],e[44]!==N?(b=o.jsx(me,{children:N}),e[44]=N,e[45]=b):b=e[45],g=fe;let E;e[46]!==s||e[47]!==a?(E=p=>o.jsxs(pe,{value:`${p.name} ${p.id}`,onSelect:()=>s([...a,p.id]),children:[o.jsx(W,{size:14,className:"shrink-0 text-muted-foreground"}),o.jsxs("span",{className:"flex min-w-0 flex-col",children:[o.jsx("span",{className:"truncate text-sm",children:p.name}),p.description&&o.jsx("span",{className:"text-meta line-clamp-1",children:p.description})]})]},p.id),e[46]=s,e[47]=a,e[48]=E):E=e[48],O=w.map(E),e[2]=u.data,e[3]=c,e[4]=r,e[5]=d,e[6]=s,e[7]=i,e[8]=a,e[9]=g,e[10]=x,e[11]=R,e[12]=_,e[13]=O,e[14]=y,e[15]=b,e[16]=B,e[17]=A,e[18]=m}else g=e[9],x=e[10],R=e[11],_=e[12],O=e[13],y=e[14],b=e[15],B=e[16],A=e[17],m=e[18];let j;e[49]!==g||e[50]!==O?(j=o.jsx(g,{children:O}),e[49]=g,e[50]=O,e[51]=j):j=e[51];let T;e[52]!==x||e[53]!==j||e[54]!==y||e[55]!==b?(T=o.jsxs(x,{className:y,children:[b,j]}),e[52]=x,e[53]=j,e[54]=y,e[55]=b,e[56]=T):T=e[56];let k;e[57]!==R||e[58]!==T||e[59]!==B||e[60]!==A?(k=o.jsxs(R,{className:B,children:[A,T]}),e[57]=R,e[58]=T,e[59]=B,e[60]=A,e[61]=k):k=e[61];let v;e[62]!==r||e[63]!==d||e[64]!==i?(v=r.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-meta",children:i("taskBoard.columnRules.inheritedHint")}),o.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(f=>o.jsx(K,{variant:"muted",children:d(f)},f))})]}),e[62]=r,e[63]=d,e[64]=i,e[65]=v):v=e[65];let S;return e[66]!==_||e[67]!==k||e[68]!==v||e[69]!==m?(S=o.jsxs("div",{className:m,children:[_,k,v]}),e[66]=_,e[67]=k,e[68]=v,e[69]=m,e[70]=S):S=e[70],S}function Ye(){const t=$.c(7),{org:e}=q(),a=V();let s;t[0]!==e.id?(s=F.taskBoardPrompts(e.id),t[0]=e.id,t[1]=s):s=t[1];let n;t[2]!==a?(n=async()=>(await a.call("TASK_BOARD_PROMPT_LIST",{})).prompts,t[2]=a,t[3]=n):n=t[3];let l;return t[4]!==s||t[5]!==n?(l={queryKey:s,staleTime:6e4,queryFn:n},t[4]=s,t[5]=n,t[6]=l):l=t[6],ne(l)}function We(){const t=$.c(8),{org:e}=q(),a=V(),s=Y();let n;t[0]!==a?(n=async c=>{const{columnKey:i,rules:u}=c;if(u){const h=u.prompt.trim();await(h||u.skills.length?a.call("TASK_BOARD_PROMPT_UPSERT",{columnKey:i,prompt:h,skills:u.skills}):a.call("TASK_BOARD_PROMPT_DELETE",{columnKey:i}))}},t[0]=a,t[1]=n):n=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==n||t[6]!==l?(r={mutationFn:n,onSettled:l},t[5]=n,t[6]=l,t[7]=r):r=t[7],le(r)}const H=()=>0;function Je(){const t=$.c(6),{org:e}=q(),a=Y();let s;t[0]!==e.id||t[1]!==a?(s=()=>a.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[0]=e.id,t[1]=a,t[2]=s):s=t[2];const n=s;let l;t[3]!==e.slug||t[4]!==n?(l=()=>be.subscribe(e.slug,n,n),t[3]=e.slug,t[4]=n,t[5]=l):l=t[5];const r=l;U.useSyncExternalStore(r,H,H)}export{Ue as C,Ve as S,He as a,Ye as b,Se as c,We as d,Je as u};
1
+ import{c as $,b as D,m as z,j as o,a4 as q,L as Z,as as ee,d as te,r as U,hh as se,B as ae,t as oe,ak as V,K as F,i as ne,q as Y,e as le}from"./index-Ckj4MapM.js";import{s as W}from"./Plus--VZnEUO0.js";import{s as re}from"./XClose-Ddq6ci19.js";import{i as ie}from"./Zap-D88LAwUm.js";import{B as K}from"./badge-2MmgfPaN.js";import{f as ce,a as ue,c as de,C as me,e as fe,b as pe}from"./command-HsZGGhEb.js";import{I as xe}from"./icon-button-DFp2kgCJ.js";import{c as he,a as ge,b as je,S as ke}from"./sheet-LMO2Ln_p.js";import{j as ve}from"./use-org-fs-Dw8NgWuN.js";import{a as Ne}from"./use-project-scope-ES_3uHyM.js";import{u as J,a as _e}from"./use-automations-kHu7N1ql.js";import{C as ye}from"./task-board-Bjy19ZeT.js";import{b as be}from"./watch-sse-pool-VTD53pp7.js";const Be={triage:"taskBoard.columnGuide.triage",todo:"taskBoard.columnGuide.todo",in_progress:"taskBoard.columnGuide.inProgress",in_review:"taskBoard.columnGuide.inReview",qa:"taskBoard.columnGuide.qa",customer_approval:"taskBoard.columnGuide.customerApproval",ready_for_deployment:"taskBoard.columnGuide.readyForDeployment",post_deploy_validation:"taskBoard.columnGuide.postDeployValidation",done:null,archived:null};function Se(t){const e=ye.find(a=>a===t);return e?Be[e]:null}function He(t){const e=$.c(7),{data:a}=J();let s;e[0]!==a?(s=a??[],e[0]=a,e[1]=s):s=e[1];let n;if(e[2]!==t||e[3]!==s){let l;e[5]!==t?(l=r=>r.board_triggers.some(c=>c.type==="board_column_transition"&&c.column_key===t),e[5]=t,e[6]=l):l=e[6],n=s.filter(l),e[2]=t,e[3]=s,e[4]=n}else n=e[4];return n}function Q(t){switch(t){case"board_column_transition":return 0;case"board_pr_ready":return 1;case"board_pr_merged":return 2;default:return t}}function Ce(t){switch(t){case"board_column_transition":return"taskBoard.columnRules.starter.board_column_transition";case"board_pr_ready":return"taskBoard.columnRules.starter.board_pr_ready";case"board_pr_merged":return"taskBoard.columnRules.starter.board_pr_merged";default:return t}}function Re(t){const e=$.c(5),{data:a}=J();let s;if(e[0]!==t||e[1]!==a){let n;e[3]!==t?(n=l=>{const r=l.board_triggers.find(c=>c.column_key===t);return r?[{automation:l,starter:r.type}]:[]},e[3]=t,e[4]=n):n=e[4],s=(a??[]).flatMap(n).sort(Ae),e[0]=t,e[1]=a,e[2]=s}else s=e[2];return s}function Ae(t,e){return Number(e.automation.active)-Number(t.automation.active)||Q(t.starter)-Q(e.starter)}function Ue(t){const e=$.c(37),{columnKey:a,label:s,icon:n,iconClassName:l,open:r,onOpenChange:c}=t,i=D(),{org:u}=q(),h=Se(a),d=Re(a);let g;e[0]!==c?(g=()=>c(!1),e[0]=c,e[1]=g):g=e[1];const x=g,R=je,_=ge,O="w-full gap-0 sm:max-w-md",y=void 0,b=Te,B=he,A="gap-1 pb-0";let m;e[2]!==n||e[3]!==l?(m=n&&o.jsx(n,{size:16,className:l}),e[2]=n,e[3]=l,e[4]=m):m=e[4];let j;e[5]!==s||e[6]!==m?(j=o.jsxs(ke,{className:"flex items-center gap-2",children:[m,s]}),e[5]=s,e[6]=m,e[7]=j):j=e[7];const T=h&&o.jsx("p",{className:"surface-inset mt-2 rounded-xl px-3.5 py-3 text-sm leading-relaxed text-foreground",children:i(h)});let k;e[8]!==B||e[9]!==j||e[10]!==T?(k=o.jsxs(B,{className:A,children:[j,T]}),e[8]=B,e[9]=j,e[10]=T,e[11]=k):k=e[11];let v;e[12]!==i?(v=i("taskBoard.columnRules.runsHere"),e[12]=i,e[13]=v):v=e[13];let S;e[14]!==v?(S=o.jsx("h3",{className:"text-meta",children:v}),e[14]=v,e[15]=S):S=e[15];let f;e[16]!==d||e[17]!==a||e[18]!==s||e[19]!==x||e[20]!==u||e[21]!==i?(f=d.length===0?o.jsx(we,{columnKey:a,label:s,onLeave:x}):o.jsx("div",{className:"surface divide-y divide-border",children:d.map(L=>{const{automation:N,starter:E}=L;return o.jsxs(Z,{to:"/$org/projects/$agentId/automations/$automationId",params:{org:u.slug,agentId:N.virtual_mcp_id,automationId:N.id},onClick:x,className:"group flex items-center gap-3 px-3 py-2.5 transition-colors hover:bg-accent/50",children:[o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx("span",{className:z("truncate text-sm",N.active?"text-foreground":"text-muted-foreground"),children:N.name}),o.jsx("span",{className:"text-meta",children:N.active?i(Ce(E)):i("taskBoard.columnRules.off")})]}),o.jsx(ee,{size:14,className:"shrink-0 text-muted-foreground transition-colors group-hover:text-foreground"})]},N.id)})}),e[16]=d,e[17]=a,e[18]=s,e[19]=x,e[20]=u,e[21]=i,e[22]=f):f=e[22];let w;e[23]!==S||e[24]!==f?(w=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-4 pt-6 pb-6",children:[S,f]}),e[23]=S,e[24]=f,e[25]=w):w=e[25];let I;e[26]!==_||e[27]!==w||e[28]!==y||e[29]!==b||e[30]!==k?(I=o.jsxs(_,{className:O,"aria-describedby":y,onOpenAutoFocus:b,children:[k,w]}),e[26]=_,e[27]=w,e[28]=y,e[29]=b,e[30]=k,e[31]=I):I=e[31];let C;return e[32]!==R||e[33]!==r||e[34]!==c||e[35]!==I?(C=o.jsx(R,{open:r,onOpenChange:c,children:I}),e[32]=R,e[33]=r,e[34]=c,e[35]=I,e[36]=C):C=e[36],C}function Te(t){return t.preventDefault()}function we({columnKey:t,label:e,onLeave:a}){const s=D(),{org:n}=q(),{project:l}=Ne(),r=te(),{create:c,triggerAdd:i}=_e(),[u,h]=U.useState(!1),d=l?.id??se(n.id),g=async()=>{h(!0);try{const x=await c.mutateAsync({name:s("taskBoard.columnRules.newAutomationName",{column:e}),messages:[],models:{tier:"smart"},active:!1,virtual_mcp_id:d});await i.mutateAsync({automation_id:x.id,type:"board_column_transition",column_key:t}),a(),r({to:"/$org/projects/$agentId/automations/$automationId",params:{org:n.slug,agentId:d,automationId:x.id}})}catch{oe.error(s("taskBoard.columnRules.newAutomationFailed"))}finally{h(!1)}};return o.jsxs("div",{className:"surface flex flex-col items-center gap-3 px-6 py-8 text-center",children:[o.jsx("span",{className:"flex size-9 items-center justify-center rounded-full bg-muted text-muted-foreground",children:o.jsx(ie,{size:16})}),o.jsx("p",{className:"text-sm font-medium text-foreground",children:s("taskBoard.columnRules.noAutomations")}),o.jsxs(ae,{variant:"outline",size:"sm",className:"gap-1.5",disabled:u,onClick:g,children:[o.jsx(W,{size:14}),s("taskBoard.columnRules.newAutomation")]})]})}const Ie=[];function Ve(t){const e=$.c(71),{value:a,onChange:s,inherited:n,fill:l}=t,r=n===void 0?Ie:n,c=l===void 0?!1:l,i=D(),u=ve();let h;e[0]!==u.data?(h=f=>u.data?.find(w=>w.id===f)?.name??f,e[0]=u.data,e[1]=h):h=e[1];const d=h;let g,x,R,_,O,y,b,B,A,m;if(e[2]!==u.data||e[3]!==c||e[4]!==r||e[5]!==d||e[6]!==s||e[7]!==i||e[8]!==a){let f;e[19]!==r||e[20]!==a?(f=p=>!p.disableModelInvocation&&!a.includes(p.id)&&!r.includes(p.id),e[19]=r,e[20]=a,e[21]=f):f=e[21];const w=(u.data??[]).filter(f);if(e[22]!==c||e[23]!==r||e[24]!==d||e[25]!==s||e[26]!==i||e[27]!==a){let p;e[30]!==r?(p=P=>!r.includes(P),e[30]=r,e[31]=p):p=e[31];const M=a.filter(p),G=c&&"min-h-0 flex-1";e[32]!==G?(m=z("flex flex-col gap-2",G),e[32]=G,e[33]=m):m=e[33],_=M.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1.5",children:M.map(P=>o.jsxs(K,{variant:"outline",className:"py-0 pr-0 pl-2",children:[d(P),o.jsx(xe,{label:i("taskBoard.columnRules.removeSkill",{skill:d(P)}),onClick:()=>s(a.filter(X=>X!==P)),className:"size-5 text-muted-foreground",children:o.jsx(re,{size:12})})]},P))}),e[22]=c,e[23]=r,e[24]=d,e[25]=s,e[26]=i,e[27]=a,e[28]=_,e[29]=m}else _=e[28],m=e[29];R=ce;const I=c&&"min-h-0 flex-1";e[34]!==I?(B=z("h-auto border",I),e[34]=I,e[35]=B):B=e[35];let C;e[36]!==i?(C=i("taskBoard.columnRules.searchSkills"),e[36]=i,e[37]=C):C=e[37],e[38]!==C?(A=o.jsx(ue,{placeholder:C,className:"h-9"}),e[38]=C,e[39]=A):A=e[39],x=de;const L=c?"max-h-none flex-1":"max-h-56";e[40]!==L?(y=z(L),e[40]=L,e[41]=y):y=e[41];let N;e[42]!==i?(N=i("taskBoard.columnRules.noSkills"),e[42]=i,e[43]=N):N=e[43],e[44]!==N?(b=o.jsx(me,{children:N}),e[44]=N,e[45]=b):b=e[45],g=fe;let E;e[46]!==s||e[47]!==a?(E=p=>o.jsxs(pe,{value:`${p.name} ${p.id}`,onSelect:()=>s([...a,p.id]),children:[o.jsx(W,{size:14,className:"shrink-0 text-muted-foreground"}),o.jsxs("span",{className:"flex min-w-0 flex-col",children:[o.jsx("span",{className:"truncate text-sm",children:p.name}),p.description&&o.jsx("span",{className:"text-meta line-clamp-1",children:p.description})]})]},p.id),e[46]=s,e[47]=a,e[48]=E):E=e[48],O=w.map(E),e[2]=u.data,e[3]=c,e[4]=r,e[5]=d,e[6]=s,e[7]=i,e[8]=a,e[9]=g,e[10]=x,e[11]=R,e[12]=_,e[13]=O,e[14]=y,e[15]=b,e[16]=B,e[17]=A,e[18]=m}else g=e[9],x=e[10],R=e[11],_=e[12],O=e[13],y=e[14],b=e[15],B=e[16],A=e[17],m=e[18];let j;e[49]!==g||e[50]!==O?(j=o.jsx(g,{children:O}),e[49]=g,e[50]=O,e[51]=j):j=e[51];let T;e[52]!==x||e[53]!==j||e[54]!==y||e[55]!==b?(T=o.jsxs(x,{className:y,children:[b,j]}),e[52]=x,e[53]=j,e[54]=y,e[55]=b,e[56]=T):T=e[56];let k;e[57]!==R||e[58]!==T||e[59]!==B||e[60]!==A?(k=o.jsxs(R,{className:B,children:[A,T]}),e[57]=R,e[58]=T,e[59]=B,e[60]=A,e[61]=k):k=e[61];let v;e[62]!==r||e[63]!==d||e[64]!==i?(v=r.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-meta",children:i("taskBoard.columnRules.inheritedHint")}),o.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(f=>o.jsx(K,{variant:"muted",children:d(f)},f))})]}),e[62]=r,e[63]=d,e[64]=i,e[65]=v):v=e[65];let S;return e[66]!==_||e[67]!==k||e[68]!==v||e[69]!==m?(S=o.jsxs("div",{className:m,children:[_,k,v]}),e[66]=_,e[67]=k,e[68]=v,e[69]=m,e[70]=S):S=e[70],S}function Ye(){const t=$.c(7),{org:e}=q(),a=V();let s;t[0]!==e.id?(s=F.taskBoardPrompts(e.id),t[0]=e.id,t[1]=s):s=t[1];let n;t[2]!==a?(n=async()=>(await a.call("TASK_BOARD_PROMPT_LIST",{})).prompts,t[2]=a,t[3]=n):n=t[3];let l;return t[4]!==s||t[5]!==n?(l={queryKey:s,staleTime:6e4,queryFn:n},t[4]=s,t[5]=n,t[6]=l):l=t[6],ne(l)}function We(){const t=$.c(8),{org:e}=q(),a=V(),s=Y();let n;t[0]!==a?(n=async c=>{const{columnKey:i,rules:u}=c;if(u){const h=u.prompt.trim();await(h||u.skills.length?a.call("TASK_BOARD_PROMPT_UPSERT",{columnKey:i,prompt:h,skills:u.skills}):a.call("TASK_BOARD_PROMPT_DELETE",{columnKey:i}))}},t[0]=a,t[1]=n):n=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==n||t[6]!==l?(r={mutationFn:n,onSettled:l},t[5]=n,t[6]=l,t[7]=r):r=t[7],le(r)}const H=()=>0;function Je(){const t=$.c(6),{org:e}=q(),a=Y();let s;t[0]!==e.id||t[1]!==a?(s=()=>a.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[0]=e.id,t[1]=a,t[2]=s):s=t[2];const n=s;let l;t[3]!==e.slug||t[4]!==n?(l=()=>be.subscribe(e.slug,n,n),t[3]=e.slug,t[4]=n,t[5]=l):l=t[5];const r=l;U.useSyncExternalStore(r,H,H)}export{Ue as C,Ve as S,He as a,Ye as b,Se as c,We as d,Je as u};
@@ -1 +1 @@
1
- import{a4 as l,ak as c,r as i,V as d,K as T}from"./index-B0kMZVmC.js";import{u as m}from"./thread-intent-oRL32U-K.js";const p=[],S=()=>()=>{},h=()=>p;function f(t){const{org:s}=l(),r=c(),n=m(),o=i.useSyncExternalStore(n?.threads.subscribe??S,n?.threads.get??h),e=t===null?null:o.find(a=>a.id===t)??null,{data:u}=d({queryKey:T.ensureTask(s.id,t),queryFn:async()=>{if(t===null)return null;try{const{item:a}=await r.call("COLLECTION_THREADS_GET",{id:t});return a??null}catch{return null}},initialData:e&&!e.partial?e:void 0,select:a=>a?.metadata??null,staleTime:3e4});return e?.metadata??u??null}export{f as u};
1
+ import{a4 as l,ak as c,r as i,V as d,K as T}from"./index-Ckj4MapM.js";import{u as m}from"./thread-intent-B3Q-huPj.js";const p=[],S=()=>()=>{},h=()=>p;function f(t){const{org:s}=l(),r=c(),n=m(),o=i.useSyncExternalStore(n?.threads.subscribe??S,n?.threads.get??h),e=t===null?null:o.find(a=>a.id===t)??null,{data:u}=d({queryKey:T.ensureTask(s.id,t),queryFn:async()=>{if(t===null)return null;try{const{item:a}=await r.call("COLLECTION_THREADS_GET",{id:t});return a??null}catch{return null}},initialData:e&&!e.partial?e:void 0,select:a=>a?.metadata??null,staleTime:3e4});return e?.metadata??u??null}export{f as u};
@@ -1 +1 @@
1
- import{c,a4 as i,i as l,K as p}from"./index-B0kMZVmC.js";import{f}from"./chat-context-BOjsomdh.js";async function m(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=f()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>m(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
1
+ import{c,a4 as i,i as l,K as p}from"./index-Ckj4MapM.js";import{f}from"./chat-context-DWiThF8S.js";async function m(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=f()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>m(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
@@ -1 +1 @@
1
- import{c as m,f as w,u as A,cG as k,d as x,l as I,cH as _,cI as P,at as K,cJ as O,cK as R}from"./index-B0kMZVmC.js";import{b as j}from"./thread-route-tkHuy51W.js";import{u as B}from"./use-project-scope-BpnU42cL.js";import{a as L,c as M}from"./use-organization-settings-C44OxrrF.js";import{f as v,i as c,j as F,t as U,d as J,g as T}from"./thread-intent-oRL32U-K.js";function $(e){const t=e.destination==="agent",n={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(n):n,mainpanel:void 0}}function z(){const e=m.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:C},e[0]=t):t=e[0],I(t)}function C(e){for(let t=e.matches.length-1;t>=0;t--){const n=e.matches[t]?.staticData;if(n?.mainView||n?.siteEditorView)return{mainView:n.mainView,siteEditorView:n.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function ce(){const e=m.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=w(t);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const r=A(a),i={file:"file"in r&&typeof r.file=="string"?r.file:void 0,key:"key"in r&&typeof r.key=="string"?r.key:void 0,path:"path"in r&&typeof r.path=="string"?r.path:void 0},{mainView:o,siteEditorView:s}=z();return k({mainView:o,siteEditorView:s,params:n,search:i})}function ue(){const e=m.c(11),t=x();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const a=w(n),r=j(),i=B(),o=a.org??"";let s;e[1]!==t||e[2]!==o||e[3]!==r||e[4]!==i?(s=(d,u)=>{const y=_(d),S=u?.virtualmcpid!==void 0||i!==null?"project":"organization",D=y.kind==="org-destination"||y.kind==="project-destination"&&S==="organization",E=N=>$({previous:N,destination:D?"organization":"agent",update:u?.search});P(t,{org:o,agentId:u?.virtualmcpid??r,tabId:d,destinationScope:S,taskKey:u?.taskKey,search:E,replace:u?.replace??!0})},e[1]=t,e[2]=o,e[3]=r,e[4]=i,e[5]=s):s=e[5];const p=s;let l;e[6]!==t?(l=d=>t({to:".",search:G,replace:d?.replace??!0}),e[6]=t,e[7]=l):l=e[7];const h=l;let f;return e[8]!==h||e[9]!==p?(f={openPanel:p,closePanel:h},e[8]=h,e[9]=p,e[10]=f):f=e[10],f}function G(e){return{...e,mainpanel:!1,sidepanel:!0}}const Y=1e4,le="true",b=2;function g(e,t){return K.chatAutosend(e,t)}function H(e){return e==="pending"||e==="sending"}function Q(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;const n=t;let a=0;n.status==="sending"?a=n.retryAt===void 0?1:b:n.retryAt!==void 0&&(a=1);const r=n.attempt===void 0?a:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!H(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>b?null:{...t,attempt:r}}function fe(e,t,n,a,r=Date.now()){const i={message:a,createdAt:r,status:"pending",attempt:0};return e.setItem(g(t,n),JSON.stringify(i)),i}function W(e,t,n){const a=g(t,n),r=Q(e.getItem(a));return r||(e.removeItem(a),null)}function de(e,t,n,a=Date.now()){const r=g(t,n),i=W(e,t,n);if(!i||i.status!=="pending")return null;if(i.attempt>=b)return e.removeItem(r),null;const o=i.retryAt??i.createdAt;if(a-o>=Y)return e.removeItem(r),null;const s={...i,status:"sending",attempt:i.attempt+1};return e.setItem(r,JSON.stringify(s)),{message:s.message,createdAt:s.createdAt,attempt:s.attempt}}function me(e,t,n){e.removeItem(g(t,n))}const X=new Set(["site-editor","content","code","calendar","experiments"]);function q(e,t,n){return n?e==="blog"||e==="blog-post"?"blog":e==="monitoring"?t==="experiments"?"site":null:e&&X.has(e)?"site":null:null}function V(e){return c(e)?"blog":"site"}function ge(e,t,n){return t===null?[...e]:e.filter(a=>V(a.branch)===t||a.branch===n)}function pe(e,t,n,a){const r=e.filter(i=>i.branch!==t&&(n===null||V(i.branch)===n));return r.find(i=>(i.runtime??a)!=="sandbox")??r[0]}function he(e){return c(e)?"thread.branchPicker.blogDraftName":"thread.branchPicker.defaultVersionName"}function Z(e,t,n){return e==="blog"?c(t.branch)||F(t.metadata,n)==="sandbox":e==="site"?!c(t.branch):!0}function be(e,t,n){return!t.partial&&e==="blog"===c(t.branch)&&U(t,J(n))}function ve(e,t){const n=e||v(t);return c(n)?{branch:n}:{branch:n,runtime:"sandbox"}}function ee(e,t,n){return Z(e,t,n)?null:e==="blog"?"site-editor":"blog"}function ye(e,t,n){return n&&c(e)?v(t):T(t)}function Se(e){const t=e.viewKind==="blog"||e.blogView&&c(e.branch)?v(e.userLabel):T(e.userLabel);return e.projectDefault==="cms"?{kind:"new-thread",runtime:"cms",branch:t}:{kind:"repoint",branch:t}}function te(e){if(!e)return null;const t=_(e);return t.kind==="blog"?"blog":t.kind==="site-editor"||t.kind==="agent-section"&&(t.section==="calendar"||t.section==="experiments")?"site":null}function we(e,t,n){return!e||!t||!n?e:ee(te(e),t,void 0)??e}function ne(){return L("blog_view_enabled")}function Ae(){const e=O()?.org.id,t=M("blog_view_enabled");return e?t:!1}function _e(){const e=m.c(5),t=R(),n=ne();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const r=A(a),i="view"in r&&typeof r.view=="string"?r.view:void 0;let o;return e[1]!==n||e[2]!==t||e[3]!==i?(o=q(t,i,n),e[1]=n,e[2]=t,e[3]=i,e[4]=o):o=e[4],o}export{le as A,_e as a,ue as b,ve as c,he as d,ne as e,Ae as f,de as g,me as h,be as i,ge as j,V as k,Se as l,ye as n,$ as r,pe as s,we as t,ce as u,Z as v,fe as w};
1
+ import{c as m,f as w,u as A,cG as k,d as x,l as I,cH as _,cI as P,at as K,cJ as O,cK as R}from"./index-Ckj4MapM.js";import{b as j}from"./thread-route-DsWHorzr.js";import{u as B}from"./use-project-scope-ES_3uHyM.js";import{a as L,c as M}from"./use-organization-settings-DzVYOA_w.js";import{f as v,i as c,j as F,t as U,d as J,g as T}from"./thread-intent-B3Q-huPj.js";function $(e){const t=e.destination==="agent",n={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(n):n,mainpanel:void 0}}function z(){const e=m.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:C},e[0]=t):t=e[0],I(t)}function C(e){for(let t=e.matches.length-1;t>=0;t--){const n=e.matches[t]?.staticData;if(n?.mainView||n?.siteEditorView)return{mainView:n.mainView,siteEditorView:n.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function ce(){const e=m.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=w(t);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const r=A(a),i={file:"file"in r&&typeof r.file=="string"?r.file:void 0,key:"key"in r&&typeof r.key=="string"?r.key:void 0,path:"path"in r&&typeof r.path=="string"?r.path:void 0},{mainView:o,siteEditorView:s}=z();return k({mainView:o,siteEditorView:s,params:n,search:i})}function ue(){const e=m.c(11),t=x();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const a=w(n),r=j(),i=B(),o=a.org??"";let s;e[1]!==t||e[2]!==o||e[3]!==r||e[4]!==i?(s=(d,u)=>{const y=_(d),S=u?.virtualmcpid!==void 0||i!==null?"project":"organization",D=y.kind==="org-destination"||y.kind==="project-destination"&&S==="organization",E=N=>$({previous:N,destination:D?"organization":"agent",update:u?.search});P(t,{org:o,agentId:u?.virtualmcpid??r,tabId:d,destinationScope:S,taskKey:u?.taskKey,search:E,replace:u?.replace??!0})},e[1]=t,e[2]=o,e[3]=r,e[4]=i,e[5]=s):s=e[5];const p=s;let l;e[6]!==t?(l=d=>t({to:".",search:G,replace:d?.replace??!0}),e[6]=t,e[7]=l):l=e[7];const h=l;let f;return e[8]!==h||e[9]!==p?(f={openPanel:p,closePanel:h},e[8]=h,e[9]=p,e[10]=f):f=e[10],f}function G(e){return{...e,mainpanel:!1,sidepanel:!0}}const Y=1e4,le="true",b=2;function g(e,t){return K.chatAutosend(e,t)}function H(e){return e==="pending"||e==="sending"}function Q(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;const n=t;let a=0;n.status==="sending"?a=n.retryAt===void 0?1:b:n.retryAt!==void 0&&(a=1);const r=n.attempt===void 0?a:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!H(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>b?null:{...t,attempt:r}}function fe(e,t,n,a,r=Date.now()){const i={message:a,createdAt:r,status:"pending",attempt:0};return e.setItem(g(t,n),JSON.stringify(i)),i}function W(e,t,n){const a=g(t,n),r=Q(e.getItem(a));return r||(e.removeItem(a),null)}function de(e,t,n,a=Date.now()){const r=g(t,n),i=W(e,t,n);if(!i||i.status!=="pending")return null;if(i.attempt>=b)return e.removeItem(r),null;const o=i.retryAt??i.createdAt;if(a-o>=Y)return e.removeItem(r),null;const s={...i,status:"sending",attempt:i.attempt+1};return e.setItem(r,JSON.stringify(s)),{message:s.message,createdAt:s.createdAt,attempt:s.attempt}}function me(e,t,n){e.removeItem(g(t,n))}const X=new Set(["site-editor","content","code","calendar","experiments"]);function q(e,t,n){return n?e==="blog"||e==="blog-post"?"blog":e==="monitoring"?t==="experiments"?"site":null:e&&X.has(e)?"site":null:null}function V(e){return c(e)?"blog":"site"}function ge(e,t,n){return t===null?[...e]:e.filter(a=>V(a.branch)===t||a.branch===n)}function pe(e,t,n,a){const r=e.filter(i=>i.branch!==t&&(n===null||V(i.branch)===n));return r.find(i=>(i.runtime??a)!=="sandbox")??r[0]}function he(e){return c(e)?"thread.branchPicker.blogDraftName":"thread.branchPicker.defaultVersionName"}function Z(e,t,n){return e==="blog"?c(t.branch)||F(t.metadata,n)==="sandbox":e==="site"?!c(t.branch):!0}function be(e,t,n){return!t.partial&&e==="blog"===c(t.branch)&&U(t,J(n))}function ve(e,t){const n=e||v(t);return c(n)?{branch:n}:{branch:n,runtime:"sandbox"}}function ee(e,t,n){return Z(e,t,n)?null:e==="blog"?"site-editor":"blog"}function ye(e,t,n){return n&&c(e)?v(t):T(t)}function Se(e){const t=e.viewKind==="blog"||e.blogView&&c(e.branch)?v(e.userLabel):T(e.userLabel);return e.projectDefault==="cms"?{kind:"new-thread",runtime:"cms",branch:t}:{kind:"repoint",branch:t}}function te(e){if(!e)return null;const t=_(e);return t.kind==="blog"?"blog":t.kind==="site-editor"||t.kind==="agent-section"&&(t.section==="calendar"||t.section==="experiments")?"site":null}function we(e,t,n){return!e||!t||!n?e:ee(te(e),t,void 0)??e}function ne(){return L("blog_view_enabled")}function Ae(){const e=O()?.org.id,t=M("blog_view_enabled");return e?t:!1}function _e(){const e=m.c(5),t=R(),n=ne();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const r=A(a),i="view"in r&&typeof r.view=="string"?r.view:void 0;let o;return e[1]!==n||e[2]!==t||e[3]!==i?(o=q(t,i,n),e[1]=n,e[2]=t,e[3]=i,e[4]=o):o=e[4],o}export{le as A,_e as a,ue as b,ve as c,he as d,ne as e,Ae as f,de as g,me as h,be as i,ge as j,V as k,Se as l,ye as n,$ as r,pe as s,we as t,ce as u,Z as v,fe as w};
@@ -1 +1 @@
1
- import{c as L,b as V,r as N,j as r,m as q,B as Z,bu as ee}from"./index-B0kMZVmC.js";import{j as te,d as re,r as se,p as ne}from"./thread-intent-oRL32U-K.js";import{u as H,i as oe,d as le,j as ie,k as ce,m as ae}from"./chat-context-BOjsomdh.js";import{u as ue}from"./repository-binding-DqsJn1Sb.js";import{a as Q,b as Y,P as G}from"./popover-CLUI-WCq.js";import{d as de,b as fe,a as me,D as he}from"./drawer-BBqyYfPx.js";import{T as pe,a as xe,c as ge}from"./tooltip-BTKQq4Sy.js";import{u as ve}from"./use-mobile-CMr55W3O.js";import{g as ye,at as Se,l as be}from"./agent-icon-BLhMgLPf.js";import{t as je}from"./ChevronUp-DJytO9gL.js";import{t as Te}from"./Tool01-BR0iTy6Z.js";import{d as Re}from"./use-organization-settings-C44OxrrF.js";import{u as J,c as Me,d as ke}from"./use-ai-providers-BnCLnm6i.js";import{M as Ce,a as Ie}from"./index-B2FeU0Zw.js";import{d as we,e as Ne,b as _e}from"./use-entitlements-D0Sb8QlP.js";function ft(t){const e=L.c(14),o=ue(t),S=H(),s=o?.metadata,a=S?.activeTask,n=a?.metadata?.runtime;let u;e[0]!==n?(u=ne(n),e[0]=n,e[1]=u):u=e[1];const x=u,b=!!a&&!a.partial,l=a?.metadata;let j;e[2]!==s||e[3]!==l?(j=te(l,s),e[2]=s,e[3]=l,e[4]=j):j=e[4];const g=!!x||b&&!!o;let f;e[5]!==s?(f=re(s),e[5]=s,e[6]=f):f=e[6];let i;e[7]!==s?(i=se(s),e[7]=s,e[8]=i):i=e[8];let v;return e[9]!==j||e[10]!==g||e[11]!==f||e[12]!==i?(v={runtime:j,resolved:g,projectDefault:f,previewServerUrl:i},e[9]=j,e[10]=g,e[11]=f,e[12]=i,e[13]=v):v=e[13],v}function Pe(t){return["openai-compatible","openrouter","deco"].includes(t)}function De(t,e){return Pe(t)&&$e(e)!==null}function $e(t){const e=t.replace(/^openai\//,"");return/^(gpt-\d|o[134](?:-|$))/.test(e)?e:null}const Ee={anthropic:/^claude-/,openrouter:/^anthropic\/claude-/,deco:/^anthropic\/claude-/};function Fe(t,e){return Ee[t]?.test(e)??!1}function Ae(t){return Me(t)&&Fe(t.providerId,t.modelId)}function ze(t,e){return t?{modelId:t.modelId,title:t.title??t.modelId,keyId:t.keyId,providerId:e,description:null,logo:null,capabilities:[],limits:null,costs:null}:null}const Le={fast:"chat.tierTrigger.tierFast",smart:"chat.tierTrigger.tierSmart",thinking:"chat.tierTrigger.tierThinking"};function Ue(t){const e=L.c(32),{tier:o,orgSlot:S,userSlot:s,autoSlot:a,filterModels:n,onPick:u,onReset:x,onClose:b}=t,l=V(),j=J(),g=new Set(j.map(Be)),f=oe([s,S,a],g),i=f?.keyId??null,[v,m]=N.useState(i??j[0]?.id??null),c=j.some(P=>P.id===v)?v:i??j[0]?.id??null,k=c?j.find(P=>P.id===c):null,M="flex h-[70vh] max-h-[460px] w-full flex-col",T=Le[o];let h;e[0]!==l||e[1]!==T?(h=l(T),e[0]=l,e[1]=T,e[2]=h):h=e[2];let p;e[3]!==h?(p=r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:h}),e[3]=h,e[4]=p):p=e[4];let y;e[5]!==x||e[6]!==l||e[7]!==s?(y=s&&r.jsx("button",{type:"button",onClick:x,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded-lg hover:bg-accent cursor-pointer",children:l("chat.modelPreferences.reset")}),e[5]=x,e[6]=l,e[7]=s,e[8]=y):y=e[8];let R;e[9]!==p||e[10]!==y?(R=r.jsxs("div",{className:"flex items-center justify-between px-3 h-8 shrink-0",children:[p,y]}),e[9]=p,e[10]=y,e[11]=R):R=e[11];const d="flex-1 min-h-0",C=N.Suspense;let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsx(Ie,{}),e[12]=_):_=e[12];const z=Ce,A=!0,E=ze(i?f:null,k?.providerId??"deco");let D;e[13]!==c||e[14]!==u||e[15]!==m?(D=P=>{const F=P.keyId??c??"";m(F),u({keyId:F,modelId:P.modelId,title:P.title})},e[13]=c,e[14]=u,e[15]=m,e[16]=D):D=e[16];let I;e[17]!==z||e[18]!==c||e[19]!==n||e[20]!==b||e[21]!==m||e[22]!==E||e[23]!==D?(I=r.jsx(z,{compact:A,filterModels:n,onClose:b,credentialId:c,onCredentialChange:m,selectedModel:E,onModelChange:D}),e[17]=z,e[18]=c,e[19]=n,e[20]=b,e[21]=m,e[22]=E,e[23]=D,e[24]=I):I=e[24];let w;e[25]!==C||e[26]!==I||e[27]!==_?(w=r.jsx("div",{className:d,children:r.jsx(C,{fallback:_,children:I})}),e[25]=C,e[26]=I,e[27]=_,e[28]=w):w=e[28];let $;return e[29]!==w||e[30]!==R?($=r.jsxs("div",{className:M,children:[R,w]}),e[29]=w,e[30]=R,e[31]=$):$=e[31],$}function Be(t){return t.id}const Ke=["fast","smart","thinking"];function X(t){return{fast:t("chat.tierTrigger.tierFast"),smart:t("chat.tierTrigger.tierSmart"),thinking:t("chat.tierTrigger.tierThinking")}}const O={fast:"chat.agentModels.quickerResponses",smart:"chat.agentModels.balancedQuality",thinking:"chat.agentModels.deeperReasoning"};function qe(t){const e=L.c(28),{tier:o,pillIcon:S,groups:s}=t,a=V();let n;e[0]!==a?(n=X(a),e[0]=a,e[1]=n):n=e[1];const u=n,[x,b]=N.useState(!1);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=R=>{R.onSelect(),b(!1)},e[2]=l):l=e[2];const j=l,g=u[o];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=q("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),e[3]=f):f=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=q("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),e[4]=i):i=e[4];const v=u[o];let m;e[5]!==v?(m=r.jsx("span",{className:i,children:v}),e[5]=v,e[6]=m):m=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(je,{size:12,className:"opacity-60 hidden @[320px]/chat-bottom:inline-block"}),e[7]=c):c=e[7];let k;e[8]!==S||e[9]!==g||e[10]!==m?(k=r.jsx(pe,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(Q,{asChild:!0,children:r.jsxs(Z,{type:"button",variant:"ghost",size:"default","aria-label":g,className:f,children:[S,m,c]})})})}),e[8]=S,e[9]=g,e[10]=m,e[11]=k):k=e[11];let M;e[12]!==g?(M=r.jsx(xe,{children:g}),e[12]=g,e[13]=M):M=e[13];let T;e[14]!==k||e[15]!==M?(T=r.jsxs(ge,{children:[k,M]}),e[14]=k,e[15]=M,e[16]=T):T=e[16];let h;if(e[17]!==s||e[18]!==a){let R;e[20]!==a?(R=d=>r.jsx("div",{className:"flex flex-col",children:d.rows.map(C=>r.jsxs("div",{className:"group/tier-row relative flex items-stretch rounded-lg hover:bg-accent",children:[r.jsxs("button",{type:"button",role:"menuitem","aria-label":C.title,onClick:()=>j(C),className:q("flex flex-1 min-w-0 items-start gap-2 px-2 py-1.5 text-left",C.modelOverride&&"pr-7 [@media(hover:hover)]:pr-2"),children:[C.icon&&r.jsx("span",{className:"shrink-0 text-muted-foreground mt-0.5",children:C.icon}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-sm",children:C.title}),C.subtitle&&r.jsx("div",{className:"text-xs text-muted-foreground",children:C.subtitle})]}),C.active&&r.jsx("span",{title:a("chat.tierTrigger.selected"),children:r.jsx(ee,{size:14,className:"text-foreground mt-0.5"})})]}),C.modelOverride&&r.jsx(Oe,{label:C.title,render:C.modelOverride})]},C.key))},d.key),e[20]=a,e[21]=R):R=e[21],h=s.map(R),e[17]=s,e[18]=a,e[19]=h}else h=e[19];let p;e[22]!==h?(p=r.jsx(Y,{align:"end",className:"p-1 w-64",onOpenAutoFocus:Ve,children:r.jsx("div",{role:"menu",className:"flex flex-col",children:h})}),e[22]=h,e[23]=p):p=e[23];let y;return e[24]!==x||e[25]!==T||e[26]!==p?(y=r.jsxs(G,{open:x,onOpenChange:b,children:[T,p]}),e[24]=x,e[25]=T,e[26]=p,e[27]=y):y=e[27],y}function Ve(t){return t.preventDefault()}function Oe(t){const e=L.c(38),{label:o,render:S}=t,s=V(),a=ve(),[n,u]=N.useState(!1);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=()=>u(!1),e[0]=x):x=e[0];const b=x;let l;e[1]!==o||e[2]!==s?(l=s("chat.modelPreferences.customizeModel",{tier:o}),e[1]=o,e[2]=s,e[3]=l):l=e[3];const j=n&&"opacity-100";let g;e[4]!==j?(g=q("absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center","size-6 rounded-lg bg-background shadow-edge","text-muted-foreground hover:text-foreground","opacity-100 [@media(hover:hover)]:opacity-0","[@media(hover:hover)]:group-hover/tier-row:opacity-100","[@media(hover:hover)]:group-focus-within/tier-row:opacity-100",j),e[4]=j,e[5]=g):g=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx(be,{size:14}),e[6]=f):f=e[6];let i;e[7]!==l||e[8]!==g?(i=r.jsx("button",{type:"button","aria-label":l,className:g,children:f}),e[7]=l,e[8]=g,e[9]=i):i=e[9];const v=i;if(a){let T;e[10]!==v?(T=r.jsx(de,{asChild:!0,children:v}),e[10]=v,e[11]=T):T=e[11];let h;e[12]!==o||e[13]!==s?(h=s("chat.modelPreferences.customizeModel",{tier:o}),e[12]=o,e[13]=s,e[14]=h):h=e[14];let p;e[15]!==h?(p=r.jsx(fe,{className:"sr-only",children:h}),e[15]=h,e[16]=p):p=e[16];let y;e[17]!==n||e[18]!==S?(y=n&&S(b),e[17]=n,e[18]=S,e[19]=y):y=e[19];let R;e[20]!==y||e[21]!==p?(R=r.jsxs(me,{className:"p-0 flex flex-col max-h-[95vh]",children:[p,y]}),e[20]=y,e[21]=p,e[22]=R):R=e[22];let d;return e[23]!==n||e[24]!==R||e[25]!==T?(d=r.jsxs(he,{open:n,onOpenChange:u,children:[T,R]}),e[23]=n,e[24]=R,e[25]=T,e[26]=d):d=e[26],d}let m;e[27]!==v?(m=r.jsx(Q,{asChild:!0,children:v}),e[27]=v,e[28]=m):m=e[28];let c;e[29]!==n||e[30]!==S?(c=n&&S(b),e[29]=n,e[30]=S,e[31]=c):c=e[31];let k;e[32]!==c?(k=r.jsx(Y,{side:"right",align:"start",collisionPadding:12,className:"w-[min(22rem,calc(100vw-2rem))] p-0 overflow-hidden",children:c}),e[32]=c,e[33]=k):k=e[33];let M;return e[34]!==n||e[35]!==m||e[36]!==k?(M=r.jsxs(G,{open:n,onOpenChange:u,children:[m,k]}),e[34]=n,e[35]=m,e[36]=k,e[37]=M):M=e[37],M}function W(t){return t==="fast"?r.jsx(ye,{size:16}):t==="thinking"?r.jsx(Se,{size:16}):r.jsx(Te,{size:16})}function We(t){const e=L.c(13),o=ae();let S;e[0]!==t||e[1]!==o.tiers?(S=b=>{const l=o.tiers[b];return l?l.title??l.modelId:t.chat[b]?.title},e[0]=t,e[1]=o.tiers,e[2]=S):S=e[2];const s=S;let a;e[3]!==s?(a=s("fast"),e[3]=s,e[4]=a):a=e[4];let n;e[5]!==s?(n=s("smart"),e[5]=s,e[6]=n):n=e[6];let u;e[7]!==s?(u=s("thinking"),e[7]=s,e[8]=u):u=e[8];let x;return e[9]!==a||e[10]!==n||e[11]!==u?(x={fast:a,smart:n,thinking:u},e[9]=a,e[10]=n,e[11]=u,e[12]=x):x=e[12],x}function mt(){const t=L.c(25),e=V(),{simpleModeTier:o,setSimpleModeTier:S}=le(),s=Re(),a=J(),n=ke(a),u=We(n),{data:x,error:b}=ie();let l;t[0]!==x?(l=x===void 0?{tiers:{}}:x,t[0]=x,t[1]=l):l=t[1];const j=l,g=ce(),f=H()?.lockedHarness,i=f==="claude-code",v=we("model_choice"),m=Ne(),c=_e();if(!m||!v)return null;let k,M;if(t[2]!==n||t[3]!==c||t[4]!==i||t[5]!==f||t[6]!==s||t[7]!==S||t[8]!==e||t[9]!==o||t[10]!==u||t[11]!==g||t[12]!==j||t[13]!==b){const R=X(e);k="decopilot",M=Ke.map(d=>{const C=u[d],_=j.tiers[d];return{key:`decopilot-${d}`,icon:W(d),title:R[d],subtitle:c?C??e(O[d]):e(O[d]),active:o===d,onSelect:()=>S(d),modelOverride:c?z=>r.jsxs(r.Fragment,{children:[b&&r.jsx("div",{className:"text-xs text-destructive p-3 pb-0",children:e("chat.modelPreferences.loadFailed")}),r.jsx(Ue,{tier:d,orgSlot:s.tiers[d],userSlot:_,autoSlot:n.chat[d],filterModels:f==="codex"?He:i?Ae:void 0,onClose:z,onPick:A=>g.mutate({tier:d,slot:A}),onReset:()=>g.mutate({tier:d,slot:null})},`${d}:${_?.keyId??"org"}:${_?.modelId??""}`)]}):void 0}}),t[2]=n,t[3]=c,t[4]=i,t[5]=f,t[6]=s,t[7]=S,t[8]=e,t[9]=o,t[10]=u,t[11]=g,t[12]=j,t[13]=b,t[14]=k,t[15]=M}else k=t[14],M=t[15];let T;t[16]!==k||t[17]!==M?(T=[{key:k,rows:M}],t[16]=k,t[17]=M,t[18]=T):T=t[18];const h=T;let p;t[19]!==o?(p=W(o),t[19]=o,t[20]=p):p=t[20];let y;return t[21]!==h||t[22]!==p||t[23]!==o?(y=r.jsx(qe,{tier:o,pillIcon:p,groups:h}),t[21]=h,t[22]=p,t[23]=o,t[24]=y):y=t[24],y}function He(t){return De(t.providerId,t.modelId)}const B=48;function ht(){const t=L.c(12),[e,o]=N.useState("idle"),[S,s]=N.useState(""),[a,n]=N.useState(""),[u,x]=N.useState(Ge),b=N.useRef(null),l=N.useRef(null),j=N.useRef(null),g=N.useRef(null),f=N.useRef(0),i=N.useRef(!1),v=N.useRef(""),m=N.useRef(""),c=N.useRef(!1),k=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition);let M;t[0]===Symbol.for("react.memo_cache_sentinel")?(M=()=>{f.current&&(cancelAnimationFrame(f.current),f.current=0),l.current?.close().catch(Ye),g.current?.getTracks().forEach(Qe),j.current=null,l.current=null,g.current=null},t[0]=M):M=t[0];const T=M;let h;t[1]===Symbol.for("react.memo_cache_sentinel")?(h=E=>{g.current=E;const D=new AudioContext;l.current=D;const I=D.createMediaStreamSource(E),w=D.createAnalyser();w.fftSize=128,w.smoothingTimeConstant=.8,I.connect(w),j.current=w;const $=new Uint8Array(w.frequencyBinCount),P=()=>{if(!j.current)return;j.current.getByteFrequencyData($);const F=[];for(let U=0;U<B;U++){const K=Math.floor(U/B*$.length);F.push(Math.max(.04,($[K]??0)/255))}x(F),f.current=requestAnimationFrame(P)};P()},t[1]=h):h=t[1];const p=h;let y;t[2]!==e?(y=async()=>{if(c.current||i.current)return e;c.current=!0;const E=window.SpeechRecognition||window.webkitSpeechRecognition;if(!E)return c.current=!1,o("unsupported"),"unsupported";let D;try{D=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{return c.current=!1,o("permission-denied"),"permission-denied"}c.current=!1,s(""),n(""),m.current="",v.current="",i.current=!0,o("recording"),p(D);const I=new E;b.current=I,I.interimResults=!0,I.continuous=!0,I.lang=navigator.language||"en-US",I.onresult=w=>{if(b.current!==I)return;let $="",P="";for(let F=w.resultIndex;F<w.results.length;F++){const U=w.results[F],K=U?.[0]?.transcript??"";U?.isFinal?P=P+K:$=$+K}P&&(v.current=v.current+P,s(v.current)),m.current=$,n($)},I.onerror=w=>{b.current===I&&w.error!=="no-speech"&&(i.current=!1,b.current=null,T(),o(w.error==="not-allowed"?"permission-denied":"idle"))},I.onend=()=>{if(b.current===I&&i.current)try{I.start()}catch{}};try{I.start()}catch{return i.current=!1,b.current=null,T(),o("idle"),"idle"}return"recording"},t[2]=e,t[3]=y):y=t[3];const R=y;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{i.current=!1,b.current?.stop(),T(),o("idle"),x(Array(B).fill(.05)),n("");const E=(v.current+(m.current?" "+m.current:"")).trim();return s(""),v.current="",m.current="",E},t[4]=d):d=t[4];const C=d;let _;t[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{i.current=!1,b.current?.abort(),T(),o("idle"),s(""),n(""),x(Array(B).fill(.05)),v.current="",m.current=""},t[5]=_):_=t[5];const z=_;let A;return t[6]!==a||t[7]!==R||t[8]!==e||t[9]!==S||t[10]!==u?(A={status:e,transcript:S,interimTranscript:a,waveformData:u,isSupported:k,startRecording:R,stopRecording:C,cancelRecording:z},t[6]=a,t[7]=R,t[8]=e,t[9]=S,t[10]=u,t[11]=A):A=t[11],A}function Qe(t){return t.stop()}function Ye(){}function Ge(){return Array(B).fill(.05)}export{mt as T,ht as a,Pe as s,ft as u};
1
+ import{c as L,b as V,r as N,j as r,m as q,B as Z,bu as ee}from"./index-Ckj4MapM.js";import{j as te,d as re,r as se,p as ne}from"./thread-intent-B3Q-huPj.js";import{u as H,i as oe,d as le,j as ie,k as ce,m as ae}from"./chat-context-DWiThF8S.js";import{u as ue}from"./repository-binding-CH7r7brN.js";import{a as Q,b as Y,P as G}from"./popover-1KOagqvY.js";import{d as de,b as fe,a as me,D as he}from"./drawer-CEHmheEC.js";import{T as pe,a as xe,c as ge}from"./tooltip-BDrd1lBk.js";import{u as ve}from"./use-mobile-DfHgA8LN.js";import{g as ye,at as Se,l as be}from"./agent-icon-Cgeh7jW8.js";import{t as je}from"./ChevronUp-Ce_cpdSH.js";import{t as Te}from"./Tool01-DqBi4vmR.js";import{d as Re}from"./use-organization-settings-DzVYOA_w.js";import{u as J,c as Me,d as ke}from"./use-ai-providers-CHfk_CLJ.js";import{M as Ce,a as Ie}from"./index-BkzlbVCp.js";import{d as we,e as Ne,b as _e}from"./use-entitlements-D9Ct8Amk.js";function ft(t){const e=L.c(14),o=ue(t),S=H(),s=o?.metadata,a=S?.activeTask,n=a?.metadata?.runtime;let u;e[0]!==n?(u=ne(n),e[0]=n,e[1]=u):u=e[1];const x=u,b=!!a&&!a.partial,l=a?.metadata;let j;e[2]!==s||e[3]!==l?(j=te(l,s),e[2]=s,e[3]=l,e[4]=j):j=e[4];const g=!!x||b&&!!o;let f;e[5]!==s?(f=re(s),e[5]=s,e[6]=f):f=e[6];let i;e[7]!==s?(i=se(s),e[7]=s,e[8]=i):i=e[8];let v;return e[9]!==j||e[10]!==g||e[11]!==f||e[12]!==i?(v={runtime:j,resolved:g,projectDefault:f,previewServerUrl:i},e[9]=j,e[10]=g,e[11]=f,e[12]=i,e[13]=v):v=e[13],v}function Pe(t){return["openai-compatible","openrouter","deco"].includes(t)}function De(t,e){return Pe(t)&&$e(e)!==null}function $e(t){const e=t.replace(/^openai\//,"");return/^(gpt-\d|o[134](?:-|$))/.test(e)?e:null}const Ee={anthropic:/^claude-/,openrouter:/^anthropic\/claude-/,deco:/^anthropic\/claude-/};function Fe(t,e){return Ee[t]?.test(e)??!1}function Ae(t){return Me(t)&&Fe(t.providerId,t.modelId)}function ze(t,e){return t?{modelId:t.modelId,title:t.title??t.modelId,keyId:t.keyId,providerId:e,description:null,logo:null,capabilities:[],limits:null,costs:null}:null}const Le={fast:"chat.tierTrigger.tierFast",smart:"chat.tierTrigger.tierSmart",thinking:"chat.tierTrigger.tierThinking"};function Ue(t){const e=L.c(32),{tier:o,orgSlot:S,userSlot:s,autoSlot:a,filterModels:n,onPick:u,onReset:x,onClose:b}=t,l=V(),j=J(),g=new Set(j.map(Be)),f=oe([s,S,a],g),i=f?.keyId??null,[v,m]=N.useState(i??j[0]?.id??null),c=j.some(P=>P.id===v)?v:i??j[0]?.id??null,k=c?j.find(P=>P.id===c):null,M="flex h-[70vh] max-h-[460px] w-full flex-col",T=Le[o];let h;e[0]!==l||e[1]!==T?(h=l(T),e[0]=l,e[1]=T,e[2]=h):h=e[2];let p;e[3]!==h?(p=r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:h}),e[3]=h,e[4]=p):p=e[4];let y;e[5]!==x||e[6]!==l||e[7]!==s?(y=s&&r.jsx("button",{type:"button",onClick:x,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded-lg hover:bg-accent cursor-pointer",children:l("chat.modelPreferences.reset")}),e[5]=x,e[6]=l,e[7]=s,e[8]=y):y=e[8];let R;e[9]!==p||e[10]!==y?(R=r.jsxs("div",{className:"flex items-center justify-between px-3 h-8 shrink-0",children:[p,y]}),e[9]=p,e[10]=y,e[11]=R):R=e[11];const d="flex-1 min-h-0",C=N.Suspense;let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsx(Ie,{}),e[12]=_):_=e[12];const z=Ce,A=!0,E=ze(i?f:null,k?.providerId??"deco");let D;e[13]!==c||e[14]!==u||e[15]!==m?(D=P=>{const F=P.keyId??c??"";m(F),u({keyId:F,modelId:P.modelId,title:P.title})},e[13]=c,e[14]=u,e[15]=m,e[16]=D):D=e[16];let I;e[17]!==z||e[18]!==c||e[19]!==n||e[20]!==b||e[21]!==m||e[22]!==E||e[23]!==D?(I=r.jsx(z,{compact:A,filterModels:n,onClose:b,credentialId:c,onCredentialChange:m,selectedModel:E,onModelChange:D}),e[17]=z,e[18]=c,e[19]=n,e[20]=b,e[21]=m,e[22]=E,e[23]=D,e[24]=I):I=e[24];let w;e[25]!==C||e[26]!==I||e[27]!==_?(w=r.jsx("div",{className:d,children:r.jsx(C,{fallback:_,children:I})}),e[25]=C,e[26]=I,e[27]=_,e[28]=w):w=e[28];let $;return e[29]!==w||e[30]!==R?($=r.jsxs("div",{className:M,children:[R,w]}),e[29]=w,e[30]=R,e[31]=$):$=e[31],$}function Be(t){return t.id}const Ke=["fast","smart","thinking"];function X(t){return{fast:t("chat.tierTrigger.tierFast"),smart:t("chat.tierTrigger.tierSmart"),thinking:t("chat.tierTrigger.tierThinking")}}const O={fast:"chat.agentModels.quickerResponses",smart:"chat.agentModels.balancedQuality",thinking:"chat.agentModels.deeperReasoning"};function qe(t){const e=L.c(28),{tier:o,pillIcon:S,groups:s}=t,a=V();let n;e[0]!==a?(n=X(a),e[0]=a,e[1]=n):n=e[1];const u=n,[x,b]=N.useState(!1);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=R=>{R.onSelect(),b(!1)},e[2]=l):l=e[2];const j=l,g=u[o];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=q("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),e[3]=f):f=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=q("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),e[4]=i):i=e[4];const v=u[o];let m;e[5]!==v?(m=r.jsx("span",{className:i,children:v}),e[5]=v,e[6]=m):m=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(je,{size:12,className:"opacity-60 hidden @[320px]/chat-bottom:inline-block"}),e[7]=c):c=e[7];let k;e[8]!==S||e[9]!==g||e[10]!==m?(k=r.jsx(pe,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(Q,{asChild:!0,children:r.jsxs(Z,{type:"button",variant:"ghost",size:"default","aria-label":g,className:f,children:[S,m,c]})})})}),e[8]=S,e[9]=g,e[10]=m,e[11]=k):k=e[11];let M;e[12]!==g?(M=r.jsx(xe,{children:g}),e[12]=g,e[13]=M):M=e[13];let T;e[14]!==k||e[15]!==M?(T=r.jsxs(ge,{children:[k,M]}),e[14]=k,e[15]=M,e[16]=T):T=e[16];let h;if(e[17]!==s||e[18]!==a){let R;e[20]!==a?(R=d=>r.jsx("div",{className:"flex flex-col",children:d.rows.map(C=>r.jsxs("div",{className:"group/tier-row relative flex items-stretch rounded-lg hover:bg-accent",children:[r.jsxs("button",{type:"button",role:"menuitem","aria-label":C.title,onClick:()=>j(C),className:q("flex flex-1 min-w-0 items-start gap-2 px-2 py-1.5 text-left",C.modelOverride&&"pr-7 [@media(hover:hover)]:pr-2"),children:[C.icon&&r.jsx("span",{className:"shrink-0 text-muted-foreground mt-0.5",children:C.icon}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-sm",children:C.title}),C.subtitle&&r.jsx("div",{className:"text-xs text-muted-foreground",children:C.subtitle})]}),C.active&&r.jsx("span",{title:a("chat.tierTrigger.selected"),children:r.jsx(ee,{size:14,className:"text-foreground mt-0.5"})})]}),C.modelOverride&&r.jsx(Oe,{label:C.title,render:C.modelOverride})]},C.key))},d.key),e[20]=a,e[21]=R):R=e[21],h=s.map(R),e[17]=s,e[18]=a,e[19]=h}else h=e[19];let p;e[22]!==h?(p=r.jsx(Y,{align:"end",className:"p-1 w-64",onOpenAutoFocus:Ve,children:r.jsx("div",{role:"menu",className:"flex flex-col",children:h})}),e[22]=h,e[23]=p):p=e[23];let y;return e[24]!==x||e[25]!==T||e[26]!==p?(y=r.jsxs(G,{open:x,onOpenChange:b,children:[T,p]}),e[24]=x,e[25]=T,e[26]=p,e[27]=y):y=e[27],y}function Ve(t){return t.preventDefault()}function Oe(t){const e=L.c(38),{label:o,render:S}=t,s=V(),a=ve(),[n,u]=N.useState(!1);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=()=>u(!1),e[0]=x):x=e[0];const b=x;let l;e[1]!==o||e[2]!==s?(l=s("chat.modelPreferences.customizeModel",{tier:o}),e[1]=o,e[2]=s,e[3]=l):l=e[3];const j=n&&"opacity-100";let g;e[4]!==j?(g=q("absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center","size-6 rounded-lg bg-background shadow-edge","text-muted-foreground hover:text-foreground","opacity-100 [@media(hover:hover)]:opacity-0","[@media(hover:hover)]:group-hover/tier-row:opacity-100","[@media(hover:hover)]:group-focus-within/tier-row:opacity-100",j),e[4]=j,e[5]=g):g=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx(be,{size:14}),e[6]=f):f=e[6];let i;e[7]!==l||e[8]!==g?(i=r.jsx("button",{type:"button","aria-label":l,className:g,children:f}),e[7]=l,e[8]=g,e[9]=i):i=e[9];const v=i;if(a){let T;e[10]!==v?(T=r.jsx(de,{asChild:!0,children:v}),e[10]=v,e[11]=T):T=e[11];let h;e[12]!==o||e[13]!==s?(h=s("chat.modelPreferences.customizeModel",{tier:o}),e[12]=o,e[13]=s,e[14]=h):h=e[14];let p;e[15]!==h?(p=r.jsx(fe,{className:"sr-only",children:h}),e[15]=h,e[16]=p):p=e[16];let y;e[17]!==n||e[18]!==S?(y=n&&S(b),e[17]=n,e[18]=S,e[19]=y):y=e[19];let R;e[20]!==y||e[21]!==p?(R=r.jsxs(me,{className:"p-0 flex flex-col max-h-[95vh]",children:[p,y]}),e[20]=y,e[21]=p,e[22]=R):R=e[22];let d;return e[23]!==n||e[24]!==R||e[25]!==T?(d=r.jsxs(he,{open:n,onOpenChange:u,children:[T,R]}),e[23]=n,e[24]=R,e[25]=T,e[26]=d):d=e[26],d}let m;e[27]!==v?(m=r.jsx(Q,{asChild:!0,children:v}),e[27]=v,e[28]=m):m=e[28];let c;e[29]!==n||e[30]!==S?(c=n&&S(b),e[29]=n,e[30]=S,e[31]=c):c=e[31];let k;e[32]!==c?(k=r.jsx(Y,{side:"right",align:"start",collisionPadding:12,className:"w-[min(22rem,calc(100vw-2rem))] p-0 overflow-hidden",children:c}),e[32]=c,e[33]=k):k=e[33];let M;return e[34]!==n||e[35]!==m||e[36]!==k?(M=r.jsxs(G,{open:n,onOpenChange:u,children:[m,k]}),e[34]=n,e[35]=m,e[36]=k,e[37]=M):M=e[37],M}function W(t){return t==="fast"?r.jsx(ye,{size:16}):t==="thinking"?r.jsx(Se,{size:16}):r.jsx(Te,{size:16})}function We(t){const e=L.c(13),o=ae();let S;e[0]!==t||e[1]!==o.tiers?(S=b=>{const l=o.tiers[b];return l?l.title??l.modelId:t.chat[b]?.title},e[0]=t,e[1]=o.tiers,e[2]=S):S=e[2];const s=S;let a;e[3]!==s?(a=s("fast"),e[3]=s,e[4]=a):a=e[4];let n;e[5]!==s?(n=s("smart"),e[5]=s,e[6]=n):n=e[6];let u;e[7]!==s?(u=s("thinking"),e[7]=s,e[8]=u):u=e[8];let x;return e[9]!==a||e[10]!==n||e[11]!==u?(x={fast:a,smart:n,thinking:u},e[9]=a,e[10]=n,e[11]=u,e[12]=x):x=e[12],x}function mt(){const t=L.c(25),e=V(),{simpleModeTier:o,setSimpleModeTier:S}=le(),s=Re(),a=J(),n=ke(a),u=We(n),{data:x,error:b}=ie();let l;t[0]!==x?(l=x===void 0?{tiers:{}}:x,t[0]=x,t[1]=l):l=t[1];const j=l,g=ce(),f=H()?.lockedHarness,i=f==="claude-code",v=we("model_choice"),m=Ne(),c=_e();if(!m||!v)return null;let k,M;if(t[2]!==n||t[3]!==c||t[4]!==i||t[5]!==f||t[6]!==s||t[7]!==S||t[8]!==e||t[9]!==o||t[10]!==u||t[11]!==g||t[12]!==j||t[13]!==b){const R=X(e);k="decopilot",M=Ke.map(d=>{const C=u[d],_=j.tiers[d];return{key:`decopilot-${d}`,icon:W(d),title:R[d],subtitle:c?C??e(O[d]):e(O[d]),active:o===d,onSelect:()=>S(d),modelOverride:c?z=>r.jsxs(r.Fragment,{children:[b&&r.jsx("div",{className:"text-xs text-destructive p-3 pb-0",children:e("chat.modelPreferences.loadFailed")}),r.jsx(Ue,{tier:d,orgSlot:s.tiers[d],userSlot:_,autoSlot:n.chat[d],filterModels:f==="codex"?He:i?Ae:void 0,onClose:z,onPick:A=>g.mutate({tier:d,slot:A}),onReset:()=>g.mutate({tier:d,slot:null})},`${d}:${_?.keyId??"org"}:${_?.modelId??""}`)]}):void 0}}),t[2]=n,t[3]=c,t[4]=i,t[5]=f,t[6]=s,t[7]=S,t[8]=e,t[9]=o,t[10]=u,t[11]=g,t[12]=j,t[13]=b,t[14]=k,t[15]=M}else k=t[14],M=t[15];let T;t[16]!==k||t[17]!==M?(T=[{key:k,rows:M}],t[16]=k,t[17]=M,t[18]=T):T=t[18];const h=T;let p;t[19]!==o?(p=W(o),t[19]=o,t[20]=p):p=t[20];let y;return t[21]!==h||t[22]!==p||t[23]!==o?(y=r.jsx(qe,{tier:o,pillIcon:p,groups:h}),t[21]=h,t[22]=p,t[23]=o,t[24]=y):y=t[24],y}function He(t){return De(t.providerId,t.modelId)}const B=48;function ht(){const t=L.c(12),[e,o]=N.useState("idle"),[S,s]=N.useState(""),[a,n]=N.useState(""),[u,x]=N.useState(Ge),b=N.useRef(null),l=N.useRef(null),j=N.useRef(null),g=N.useRef(null),f=N.useRef(0),i=N.useRef(!1),v=N.useRef(""),m=N.useRef(""),c=N.useRef(!1),k=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition);let M;t[0]===Symbol.for("react.memo_cache_sentinel")?(M=()=>{f.current&&(cancelAnimationFrame(f.current),f.current=0),l.current?.close().catch(Ye),g.current?.getTracks().forEach(Qe),j.current=null,l.current=null,g.current=null},t[0]=M):M=t[0];const T=M;let h;t[1]===Symbol.for("react.memo_cache_sentinel")?(h=E=>{g.current=E;const D=new AudioContext;l.current=D;const I=D.createMediaStreamSource(E),w=D.createAnalyser();w.fftSize=128,w.smoothingTimeConstant=.8,I.connect(w),j.current=w;const $=new Uint8Array(w.frequencyBinCount),P=()=>{if(!j.current)return;j.current.getByteFrequencyData($);const F=[];for(let U=0;U<B;U++){const K=Math.floor(U/B*$.length);F.push(Math.max(.04,($[K]??0)/255))}x(F),f.current=requestAnimationFrame(P)};P()},t[1]=h):h=t[1];const p=h;let y;t[2]!==e?(y=async()=>{if(c.current||i.current)return e;c.current=!0;const E=window.SpeechRecognition||window.webkitSpeechRecognition;if(!E)return c.current=!1,o("unsupported"),"unsupported";let D;try{D=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{return c.current=!1,o("permission-denied"),"permission-denied"}c.current=!1,s(""),n(""),m.current="",v.current="",i.current=!0,o("recording"),p(D);const I=new E;b.current=I,I.interimResults=!0,I.continuous=!0,I.lang=navigator.language||"en-US",I.onresult=w=>{if(b.current!==I)return;let $="",P="";for(let F=w.resultIndex;F<w.results.length;F++){const U=w.results[F],K=U?.[0]?.transcript??"";U?.isFinal?P=P+K:$=$+K}P&&(v.current=v.current+P,s(v.current)),m.current=$,n($)},I.onerror=w=>{b.current===I&&w.error!=="no-speech"&&(i.current=!1,b.current=null,T(),o(w.error==="not-allowed"?"permission-denied":"idle"))},I.onend=()=>{if(b.current===I&&i.current)try{I.start()}catch{}};try{I.start()}catch{return i.current=!1,b.current=null,T(),o("idle"),"idle"}return"recording"},t[2]=e,t[3]=y):y=t[3];const R=y;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{i.current=!1,b.current?.stop(),T(),o("idle"),x(Array(B).fill(.05)),n("");const E=(v.current+(m.current?" "+m.current:"")).trim();return s(""),v.current="",m.current="",E},t[4]=d):d=t[4];const C=d;let _;t[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{i.current=!1,b.current?.abort(),T(),o("idle"),s(""),n(""),x(Array(B).fill(.05)),v.current="",m.current=""},t[5]=_):_=t[5];const z=_;let A;return t[6]!==a||t[7]!==R||t[8]!==e||t[9]!==S||t[10]!==u?(A={status:e,transcript:S,interimTranscript:a,waveformData:u,isSupported:k,startRecording:R,stopRecording:C,cancelRecording:z},t[6]=a,t[7]=R,t[8]=e,t[9]=S,t[10]=u,t[11]=A):A=t[11],A}function Qe(t){return t.stop()}function Ye(){}function Ge(){return Array(B).fill(.05)}export{mt as T,ht as a,Pe as s,ft as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-kaRGs7Hf.js";import{d$ as i}from"./index-Ckj4MapM.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +1 @@
1
- import{e9 as Q,ea as y,eb as S,ec as w,e0 as C,q as k,ed as q,ee as x,r as p,ef as M,eg as H,eh as L,ei as P,ej as O,ek as B,el as A}from"./index-B0kMZVmC.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function T(r,e,s){const t=r.slice(0);return t[e]=s,t}var j=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#a=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#d(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#f(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,c=i.some((o,d)=>o!==s[d]),f=u||c,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#a=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#c(t,s)]}#c(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=T(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#c(this.#e,this.#a),e=this.#b(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function I({queries:r,...e},s){const t=k(s),i=q(),n=x(),u=p.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{M(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),L(n);const[c]=p.useState(()=>new j(t,u,e)),[f,b,o]=c.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?c.subscribe(y.batchCalls(h)):P,[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(u,e)},[u,e,c]);const m=f.some((h,a)=>O(u[a],h))?f.flatMap((h,a)=>{const l=u[a];if(l&&O(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=f.find((h,a)=>{const l=u[a];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{I as u};
1
+ import{e9 as Q,ea as y,eb as S,ec as w,e0 as C,q as k,ed as q,ee as x,r as p,ef as M,eg as H,eh as L,ei as P,ej as O,ek as B,el as A}from"./index-Ckj4MapM.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function T(r,e,s){const t=r.slice(0);return t[e]=s,t}var j=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#a=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#d(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#f(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,c=i.some((o,d)=>o!==s[d]),f=u||c,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#a=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#c(t,s)]}#c(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=T(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#c(this.#e,this.#a),e=this.#b(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function I({queries:r,...e},s){const t=k(s),i=q(),n=x(),u=p.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{M(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),L(n);const[c]=p.useState(()=>new j(t,u,e)),[f,b,o]=c.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?c.subscribe(y.batchCalls(h)):P,[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(u,e)},[u,e,c]);const m=f.some((h,a)=>O(u[a],h))?f.flatMap((h,a)=>{const l=u[a];if(l&&O(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=f.find((h,a)=>{const l=u[a];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{I as u};
@@ -0,0 +1 @@
1
+ import{I as s}from"./infiniteQueryObserver-kaRGs7Hf.js";import{d$ as u,e7 as n}from"./index-Ckj4MapM.js";function a(e,r){return u({...e,enabled:!0,suspense:!0,throwOnError:n},s,r)}export{a as u};