decocms 3.83.6 → 3.84.1

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 (239) hide show
  1. package/dist/client/assets/{AlertCircle-C0MMJCns.js → AlertCircle-CmMED3h6.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-gVE5kRlQ.js → ArrowUpRight-DwILncVx.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-B40vdc2l.js → CheckCircle-DpKZZDmN.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-QQWh1U0r.js → ChevronDown-BjzwFuai.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-CRDrddT9.js → ChevronLeft-uRkOj5F8.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-CWp0460U.js → ChevronRight-BRGGbOax.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-B0iQd-AD.js → ChevronUp-CzO_7LvF.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-BBNwX5J5.js → DotsVertical-DshGnU_X.js} +1 -1
  9. package/dist/client/assets/{Eye-bN0xnD-o.js → Eye-BBVg-SSa.js} +1 -1
  10. package/dist/client/assets/{FilterLines-DttJL6KD.js → FilterLines-CowTK4HW.js} +1 -1
  11. package/dist/client/assets/{Globe01-DTi3Gxq3.js → Globe01-Cm82tRCS.js} +1 -1
  12. package/dist/client/assets/{Globe04-n0f96BbD.js → Globe04-DrE78eQQ.js} +1 -1
  13. package/dist/client/assets/{HardDrive-D5-uOHw9.js → HardDrive-DsahIXX5.js} +1 -1
  14. package/dist/client/assets/{Key01-DAsg8mdj.js → Key01-CwoTMTFC.js} +1 -1
  15. package/dist/client/assets/{LayoutLeft-D2ad_kHx.js → LayoutLeft-_ZNcVcNz.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-D6izDWZT.js → LinkExternal01-BeE3-oct.js} +1 -1
  17. package/dist/client/assets/{Monitor01-CaUMTT8S.js → Monitor01-Aa4wN2Ct.js} +1 -1
  18. package/dist/client/assets/{Palette-ceW3H3uT.js → Palette-DT-obB9z.js} +1 -1
  19. package/dist/client/assets/{Play-VLn5ww3u.js → Play-D7fUrl6h.js} +1 -1
  20. package/dist/client/assets/{Plus-BmqFkgYT.js → Plus-CK2CAzo5.js} +1 -1
  21. package/dist/client/assets/{SearchMd-rJiOFJwK.js → SearchMd-B3Rw93l5.js} +1 -1
  22. package/dist/client/assets/{Settings02-DG5mJ_xI.js → Settings02-B1ZVVT_e.js} +1 -1
  23. package/dist/client/assets/{Shield01-C7ZT-QsW.js → Shield01-BR2mZOZb.js} +1 -1
  24. package/dist/client/assets/{Star01-DPkaqbS_.js → Star01-DBcQByZk.js} +1 -1
  25. package/dist/client/assets/{Stars01-BM2OfAMq.js → Stars01-aJC5veoy.js} +1 -1
  26. package/dist/client/assets/{Stars02-CbFOXGiR.js → Stars02-BwRZ8reG.js} +1 -1
  27. package/dist/client/assets/{Sun-D9AuRcRz.js → Sun-BMePDS8S.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-dm0C0Tjx.js → SwitchHorizontal01-B_NmbobE.js} +1 -1
  29. package/dist/client/assets/{Tool01-BXc8J6xZ.js → Tool01-CZPk8Ney.js} +1 -1
  30. package/dist/client/assets/{Trash01-D1DmT9Mr.js → Trash01-SWS-_O9Z.js} +1 -1
  31. package/dist/client/assets/{Upload01-BpkBrNfw.js → Upload01-CoqelT_E.js} +1 -1
  32. package/dist/client/assets/{User01-DhqtO0lv.js → User01-Do5enW22.js} +1 -1
  33. package/dist/client/assets/{Users01-DScwWUp0.js → Users01-BmWtNHuf.js} +1 -1
  34. package/dist/client/assets/{Users03-BhaYLgGW.js → Users03-B_G71vm-.js} +1 -1
  35. package/dist/client/assets/{X-Dqpx-r1T.js → X-CO9z9Xp0.js} +1 -1
  36. package/dist/client/assets/{XCircle-D9qm_1Ut.js → XCircle-BFWoSw7W.js} +1 -1
  37. package/dist/client/assets/{XClose-BvKJTTlt.js → XClose-BO6FjXoT.js} +1 -1
  38. package/dist/client/assets/{Zap-C6SkRgFu.js → Zap-Bs_ao0zW.js} +1 -1
  39. package/dist/client/assets/{ZapSquare-CL6VANDT.js → ZapSquare-CmQdJEdR.js} +1 -1
  40. package/dist/client/assets/{ZoomOut-wqR_bKeR.js → ZoomOut-BR28jpI9.js} +1 -1
  41. package/dist/client/assets/{access-gate-DATyJxs9.js → access-gate-mrUaShW4.js} +1 -1
  42. package/dist/client/assets/{add-section-modal-DFnJjqFv.js → add-section-modal-BTy1RUe_.js} +1 -1
  43. package/dist/client/assets/{agent-icon-BHjJxJmC.js → agent-icon-BB0OI_Zf.js} +1 -1
  44. package/dist/client/assets/agents-list-DP438aHv.js +1 -0
  45. package/dist/client/assets/ai-providers-CHjXy2IX.js +1 -0
  46. package/dist/client/assets/{alert-BQLAuYif.js → alert-FpAPxAaA.js} +1 -1
  47. package/dist/client/assets/{alert-dialog-Cz6L6NXK.js → alert-dialog-CU4F0Cas.js} +1 -1
  48. package/dist/client/assets/app-editor-DbyBYBd1.js +1 -0
  49. package/dist/client/assets/{auth-C19hiZia.js → auth-DscXYOeb.js} +1 -1
  50. package/dist/client/assets/{auth-catchall-Dw6lQ3Pv.js → auth-catchall-BtmfoD1y.js} +1 -1
  51. package/dist/client/assets/{auth-entry-DGjXLiVY.js → auth-entry-CC1ARBuN.js} +1 -1
  52. package/dist/client/assets/{auth-split-layout-Dmg3NIiT.js → auth-split-layout-Cxddqcmf.js} +1 -1
  53. package/dist/client/assets/{authenticate-and-persist-oauth-B1-SzA6A.js → authenticate-and-persist-oauth-KVWekoHI.js} +1 -1
  54. package/dist/client/assets/{automation-list-row-BYkbwrNr.js → automation-list-row-DdnU0_oJ.js} +1 -1
  55. package/dist/client/assets/{automation-runs-CFBKS4y-.js → automation-runs-CxkH2J7y.js} +1 -1
  56. package/dist/client/assets/automations-CHJDB1Wn.js +1 -0
  57. package/dist/client/assets/{avatar-Bbvs8iIt.js → avatar-B2rvHJ2u.js} +1 -1
  58. package/dist/client/assets/{badge-C3IXjCX0.js → badge-Bu3HgcYX.js} +1 -1
  59. package/dist/client/assets/{block-document-C3ZQBAYM.js → block-document-DR69_B0F.js} +1 -1
  60. package/dist/client/assets/brand-context-BsVjZN3k.js +1 -0
  61. package/dist/client/assets/buckets-BH1wtZ3x.js +1 -0
  62. package/dist/client/assets/{capability-load-error-DP8VgCQ8.js → capability-load-error-CmAUMxoM.js} +1 -1
  63. package/dist/client/assets/{card-RkuQTlVn.js → card-kDiEfTw9.js} +1 -1
  64. package/dist/client/assets/category-editor-CAYNohGr.js +1 -0
  65. package/dist/client/assets/{chat-context-D45ePksk.js → chat-context-D6S41DOV.js} +1 -1
  66. package/dist/client/assets/{checkbox-yMsno3zH.js → checkbox-CsCGEg8f.js} +1 -1
  67. package/dist/client/assets/{cli-auth-success-Dd0r_nul.js → cli-auth-success-B79VcMNm.js} +1 -1
  68. package/dist/client/assets/collection-detail-BV78giTN.js +1 -0
  69. package/dist/client/assets/{collection-display-button-BRBXcU18.js → collection-display-button-BKfSRcS4.js} +1 -1
  70. package/dist/client/assets/{collection-search-EReXMo3F.js → collection-search-Did_rDKr.js} +1 -1
  71. package/dist/client/assets/{collection-tabs-C3OblNuX.js → collection-tabs-BWGqEvBL.js} +1 -1
  72. package/dist/client/assets/{command-BsaV9rjm.js → command-HyE3vuW8.js} +1 -1
  73. package/dist/client/assets/commerce-onboarding-CbmMdla_.js +1 -0
  74. package/dist/client/assets/{connect-desktop-dialog-DuJwJvdQ.js → connect-desktop-dialog-DzyRhy80.js} +1 -1
  75. package/dist/client/assets/{connection-card-uZjILvOr.js → connection-card-D0jDIFWU.js} +1 -1
  76. package/dist/client/assets/connection-detail-CTydjWNJ.js +1 -0
  77. package/dist/client/assets/{connection-form-helpers-DV9ppnRP.js → connection-form-helpers-DoxJStk3.js} +1 -1
  78. package/dist/client/assets/connections-BZqNukEV.js +1 -0
  79. package/dist/client/assets/{context-menu-DmgM_UZR.js → context-menu-CBHA394l.js} +1 -1
  80. package/dist/client/assets/{decopilot-CxoZlpZn.js → decopilot-Cs0sTBvJ.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-BH11VGHE.js → decopilot-sse-pool-DCimHDb8.js} +1 -1
  82. package/dist/client/assets/{dialog-CHU--T7-.js → dialog-D4-cpiIq.js} +1 -1
  83. package/dist/client/assets/{domain-settings-MLZvo-1a.js → domain-settings-CpdgF4g-.js} +1 -1
  84. package/dist/client/assets/{drawer-D4XkXj4V.js → drawer-EynyRy5s.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-D2HxaMPU.js → dropdown-menu-DgXWnPV7.js} +1 -1
  86. package/dist/client/assets/{empty-state-DA37X_xl.js → empty-state-BqLGg5Qt.js} +1 -1
  87. package/dist/client/assets/{extract-connection-data-Ws_H4ap3.js → extract-connection-data-BrfuWfn9.js} +1 -1
  88. package/dist/client/assets/file-explorer-l8kW6-_R.js +2 -0
  89. package/dist/client/assets/{file-type-icon-CVukPbEL.js → file-type-icon-vWAzpBPp.js} +1 -1
  90. package/dist/client/assets/{files-DcKK79mn.js → files-CelzOm7s.js} +1 -1
  91. package/dist/client/assets/{form-Bxj0TUqV.js → form-C0rXEiGF.js} +1 -1
  92. package/dist/client/assets/general-Bcxz5b3F.js +1 -0
  93. package/dist/client/assets/{github-repo-picker-nQicPdJf.js → github-repo-picker-BMm6sNS0.js} +1 -1
  94. package/dist/client/assets/{hooks-C9iWb2N3.js → hooks-iTnRVGBT.js} +1 -1
  95. package/dist/client/assets/{import-from-deco-dialog-C6saVWDH.js → import-from-deco-dialog-CEwUaYj8.js} +1 -1
  96. package/dist/client/assets/{index-BO0QV1fb.js → index-7--My7Kk.js} +7 -7
  97. package/dist/client/assets/{index-C1iIfW5c.js → index-BHPHIMku.js} +2 -2
  98. package/dist/client/assets/{index-bmV9L0o4.js → index-BafofCVM.js} +1 -1
  99. package/dist/client/assets/{index-DzHbeUkj.js → index-BeL2IYvj.js} +1 -1
  100. package/dist/client/assets/{index-BFqTOqSJ.js → index-Bt_ZjPsW.js} +1 -1
  101. package/dist/client/assets/{index-BoDi6OBc.js → index-C1yj8oW9.js} +4 -4
  102. package/dist/client/assets/{index-NjN7v_96.js → index-C6QKjDvm.js} +1 -1
  103. package/dist/client/assets/index-C9vgWyOp.js +1 -0
  104. package/dist/client/assets/{index-akCm1VRq.js → index-CChD3seh.js} +2 -2
  105. package/dist/client/assets/{index-YYxzAkAN.js → index-ChS8eVb4.js} +1 -1
  106. package/dist/client/assets/{index-CprKTf1O.js → index-D5MvY5fk.js} +1 -1
  107. package/dist/client/assets/index-D6W1a9Ed.js +1 -0
  108. package/dist/client/assets/{index-BddhVtBs.js → index-DU_rFtey.js} +1 -1
  109. package/dist/client/assets/{index-ktUKbMYA.js → index-nQQO626p.js} +1 -1
  110. package/dist/client/assets/{index-redirect-DowDbKLD.js → index-redirect-ZLqUsySW.js} +1 -1
  111. package/dist/client/assets/index-uuDmStBi.js +1 -0
  112. package/dist/client/assets/{input-DJV4VNka.js → input-CjEjpxdM.js} +1 -1
  113. package/dist/client/assets/{integration-icon-BpZ3OsA4.js → integration-icon-CSYS5mut.js} +1 -1
  114. package/dist/client/assets/{label-7phVZ6ZM.js → label-B1XS6835.js} +1 -1
  115. package/dist/client/assets/{login-B4rCGJ9Y.js → login-BwzmQ6Vl.js} +1 -1
  116. package/dist/client/assets/{mcp-oauth-BGRbdqPD.js → mcp-oauth-RIVS58UD.js} +1 -1
  117. package/dist/client/assets/{members-C5-ie2FC.js → members-Cv5_M0H8.js} +2 -2
  118. package/dist/client/assets/{monaco-editor-Cqq2xAH1.js → monaco-editor-BhcbAKhi.js} +1 -1
  119. package/dist/client/assets/{monitoring-stats-row-C-saq1Fk.js → monitoring-stats-row-D2hdprzy.js} +1 -1
  120. package/dist/client/assets/{oauth-callback-7tCvDUJs.js → oauth-callback-Ca8aLtLz.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-ai-provider-k9CmEopW.js → oauth-callback-ai-provider-nS8-aDg-.js} +1 -1
  122. package/dist/client/assets/{onboarding-D7HThXnZ.js → onboarding-DokdM2si.js} +1 -1
  123. package/dist/client/assets/{org-install-BBNmxhuK.js → org-install-CFBQ5UN5.js} +1 -1
  124. package/dist/client/assets/{org-layout-uMJB-zBX.js → org-layout-2xw7J9o1.js} +1 -1
  125. package/dist/client/assets/{organization-choice-3XngO70I.js → organization-choice-B7gbF-gx.js} +1 -1
  126. package/dist/client/assets/{page-seo-form-Bp1CNfZX.js → page-seo-form-B9gdIgu6.js} +1 -1
  127. package/dist/client/assets/page-seo-sheet-Dim8a_29.js +1 -0
  128. package/dist/client/assets/{popover-Bo_sL62z.js → popover-C7DR14Uv.js} +1 -1
  129. package/dist/client/assets/post-editor-Dwsexwwq.js +1 -0
  130. package/dist/client/assets/{preview-dialog-B9gUDoJJ.js → preview-dialog-D0Xo8R0Y.js} +1 -1
  131. package/dist/client/assets/{primitives-Ch1GQ4pf.js → primitives-BGDftBXt.js} +1 -1
  132. package/dist/client/assets/profile-Tt594UKC.js +1 -0
  133. package/dist/client/assets/project-app-view-BWGayozD.js +1 -0
  134. package/dist/client/assets/record-editor-Cf-PzES3.js +1 -0
  135. package/dist/client/assets/registry-Bt-hzkrl.js +2 -0
  136. package/dist/client/assets/{registry-layout-BYi_5V3p.js → registry-layout-CepDP4zO.js} +2 -2
  137. package/dist/client/assets/{require-capability-Bnt0ZBRa.js → require-capability-CI6JAqgD.js} +1 -1
  138. package/dist/client/assets/{required-auth-layout-BolsfPYi.js → required-auth-layout-Be42uHMA.js} +1 -1
  139. package/dist/client/assets/{reset-password-CpukUOwJ.js → reset-password-vSV6JpaW.js} +1 -1
  140. package/dist/client/assets/roles-DVimCkc2.js +1 -0
  141. package/dist/client/assets/{save-status-HMD0mFgw.js → save-status-B4LrYjc4.js} +1 -1
  142. package/dist/client/assets/{scroll-area-B1cpZQna.js → scroll-area-Btbw5x0S.js} +1 -1
  143. package/dist/client/assets/{search-input-H6T5GrKJ.js → search-input-BJySI9eP.js} +1 -1
  144. package/dist/client/assets/secrets-CgCqWHuI.js +1 -0
  145. package/dist/client/assets/sections-editor-73TndVEn.js +2 -0
  146. package/dist/client/assets/select-Bdte2-mH.js +1 -0
  147. package/dist/client/assets/{select-model-jVluH6Ea.js → select-model-Da9fCD4_.js} +1 -1
  148. package/dist/client/assets/seo-editor-oYyGw_6F.js +1 -0
  149. package/dist/client/assets/settings-layout-CnLgsNWc.js +1 -0
  150. package/dist/client/assets/{settings-section-CAKwpEKX.js → settings-section-BIuqqQso.js} +1 -1
  151. package/dist/client/assets/{sheet-BDdFViUD.js → sheet-CzR0tmZA.js} +1 -1
  152. package/dist/client/assets/{shell-controls-CiuZpo9F.js → shell-controls-B_8RFrNm.js} +1 -1
  153. package/dist/client/assets/{shell-layout-BFU4WLoP.js → shell-layout-DPTryinF.js} +1 -1
  154. package/dist/client/assets/{shell-route-loading-P7c6nIb-.js → shell-route-loading-D5ohEyID.js} +1 -1
  155. package/dist/client/assets/{sidebar-DoXfrWOj.js → sidebar-BLFhVRa1.js} +1 -1
  156. package/dist/client/assets/{skeleton-DpU2T6Js.js → skeleton-BhIDQEW6.js} +1 -1
  157. package/dist/client/assets/{sortable.esm-JwRAHi44.js → sortable.esm-BrVUE0Ot.js} +1 -1
  158. package/dist/client/assets/sso-Dz4ih-D0.js +1 -0
  159. package/dist/client/assets/store-41qcx4ON.js +1 -0
  160. package/dist/client/assets/store-registry-Du1ihhH9.js +2 -0
  161. package/dist/client/assets/{studio-tools-Lqif47iD.js → studio-tools-cTyVqaHA.js} +1 -1
  162. package/dist/client/assets/{switch-CzdCn_lr.js → switch-DoFOdYGu.js} +1 -1
  163. package/dist/client/assets/{table-CLXzS61A.js → table-zRS7Teha.js} +1 -1
  164. package/dist/client/assets/{tabs-DoKlXPZO.js → tabs-CQOpbrKh.js} +1 -1
  165. package/dist/client/assets/{task-status-DPcnbZIP.js → task-status-DjLIycFQ.js} +1 -1
  166. package/dist/client/assets/{textarea-BjequYD7.js → textarea-Cya3KDiz.js} +1 -1
  167. package/dist/client/assets/{toggle-group-DCz7F7cJ.js → toggle-group-DENfWHtP.js} +1 -1
  168. package/dist/client/assets/{toolbar-DMerIIuJ.js → toolbar-CO9czXOO.js} +1 -1
  169. package/dist/client/assets/tooltip-Cvbl_0l0.js +1 -0
  170. package/dist/client/assets/{types-BV8aIt26.js → types-DkLih0NK.js} +1 -1
  171. package/dist/client/assets/{use-ai-providers-DuFfPCpZ.js → use-ai-providers-BB_netT8.js} +1 -1
  172. package/dist/client/assets/{use-automations-CauJKNE9.js → use-automations-C4-BEJDp.js} +1 -1
  173. package/dist/client/assets/{use-capability-DLjX445R.js → use-capability-DtJSLljk.js} +1 -1
  174. package/dist/client/assets/{use-clock-tick-aakwXYCP.js → use-clock-tick-Bo_9gN4h.js} +1 -1
  175. package/dist/client/assets/{use-collections-D4X4_zKE.js → use-collections-C5z5SeL0.js} +1 -1
  176. package/dist/client/assets/{use-connection-CyHDjrsh.js → use-connection-DYuQNBQ8.js} +1 -1
  177. package/dist/client/assets/{use-copy-V0KcMVib.js → use-copy-V2SquoUh.js} +1 -1
  178. package/dist/client/assets/{use-create-virtual-mcp-CEKhGxvf.js → use-create-virtual-mcp-DqGii1ks.js} +1 -1
  179. package/dist/client/assets/{use-debounced-autosave-C-eVH4yR.js → use-debounced-autosave-B5XSTYsz.js} +1 -1
  180. package/dist/client/assets/{use-delete-connection-CV3l3-SB.js → use-delete-connection-D_b2gPBM.js} +1 -1
  181. package/dist/client/assets/{use-file-configs-BG_rDJRo.js → use-file-configs-CSX8A1vE.js} +1 -1
  182. package/dist/client/assets/{use-infinite-scroll-4IJEWhiu.js → use-infinite-scroll-BaJGyvxX.js} +1 -1
  183. package/dist/client/assets/{use-join-requests-Cab0xxnE.js → use-join-requests-dGis0QYB.js} +1 -1
  184. package/dist/client/assets/{use-mcp-client-DuJQA2rV.js → use-mcp-client-90IJIS7G.js} +1 -1
  185. package/dist/client/assets/{use-mcp-prompts-CmUaiuB7.js → use-mcp-prompts-D2ucpusX.js} +1 -1
  186. package/dist/client/assets/{use-mcp-tools-D715CcxL.js → use-mcp-tools-IJf4yY8f.js} +1 -1
  187. package/dist/client/assets/{use-members-DIDnJkLY.js → use-members-DSWXPVdi.js} +1 -1
  188. package/dist/client/assets/{use-navigate-to-agent-BNMv1Neu.js → use-navigate-to-agent-D_hba2ju.js} +1 -1
  189. package/dist/client/assets/{use-org-auth-client-DtHGY2-t.js → use-org-auth-client-Bmz_glRx.js} +1 -1
  190. package/dist/client/assets/{use-org-sso-BzsvKCfF.js → use-org-sso-d8VUjdDF.js} +1 -1
  191. package/dist/client/assets/{use-organization-roles-BiPQEnrH.js → use-organization-roles-AnHrNvDP.js} +1 -1
  192. package/dist/client/assets/{use-organization-settings-nc8QZXyP.js → use-organization-settings-B-FYwlct.js} +1 -1
  193. package/dist/client/assets/{use-registry-connections-CJhKWnft.js → use-registry-connections-COP2SiNd.js} +1 -1
  194. package/dist/client/assets/{use-secrets-CxFfyxif.js → use-secrets-CgpawoY3.js} +1 -1
  195. package/dist/client/assets/{use-status-sounds-DaofAwGt.js → use-status-sounds-CO3Rxsnj.js} +1 -1
  196. package/dist/client/assets/{use-view-mode-m8F-CboW.js → use-view-mode-CbF51x_n.js} +1 -1
  197. package/dist/client/assets/{use-virtual-mcp-BdsGMQZL.js → use-virtual-mcp-yUKVcLc_.js} +1 -1
  198. package/dist/client/assets/useInfiniteQuery-BxIrRxsB.js +1 -0
  199. package/dist/client/assets/useSuspenseInfiniteQuery-DENvoLd9.js +1 -0
  200. package/dist/client/assets/variant-calendar-Cjzj9fQr.js +1 -0
  201. package/dist/client/assets/{view-mode-toggle-C9q5ISiT.js → view-mode-toggle-D1TNBVMm.js} +1 -1
  202. package/dist/client/index.html +1 -1
  203. package/dist/server/cli.js +380 -380
  204. package/dist/server/server.js +246 -246
  205. package/package.json +1 -1
  206. package/dist/client/assets/agents-list-2Gq7Icxm.js +0 -1
  207. package/dist/client/assets/ai-providers-COV0MWUn.js +0 -1
  208. package/dist/client/assets/app-editor-6TH-Brv5.js +0 -1
  209. package/dist/client/assets/automations-OYmLeyhx.js +0 -1
  210. package/dist/client/assets/brand-context-BFvQ7Sbj.js +0 -1
  211. package/dist/client/assets/buckets-D1zQNpYB.js +0 -1
  212. package/dist/client/assets/category-editor-CBWEnxiL.js +0 -1
  213. package/dist/client/assets/collection-detail-MmIgTfSJ.js +0 -1
  214. package/dist/client/assets/commerce-onboarding-BPDYtCVh.js +0 -1
  215. package/dist/client/assets/connection-detail-sXXukvA0.js +0 -1
  216. package/dist/client/assets/connections-CUxM11Rz.js +0 -1
  217. package/dist/client/assets/file-explorer-BfmNHW6W.js +0 -2
  218. package/dist/client/assets/general-CYWDm58h.js +0 -1
  219. package/dist/client/assets/index-C7XT3JN9.js +0 -1
  220. package/dist/client/assets/index-HQC4CGFu.js +0 -1
  221. package/dist/client/assets/page-seo-sheet-DAfXAXRM.js +0 -1
  222. package/dist/client/assets/post-editor-Dh7W93cU.js +0 -1
  223. package/dist/client/assets/profile-2A5eHa2X.js +0 -1
  224. package/dist/client/assets/project-app-view-C3Xp90Nk.js +0 -1
  225. package/dist/client/assets/record-editor-Bmb0mb5Z.js +0 -1
  226. package/dist/client/assets/registry-C0CXy020.js +0 -2
  227. package/dist/client/assets/roles-PAp6Oo_Q.js +0 -1
  228. package/dist/client/assets/secrets-BGVscZvv.js +0 -1
  229. package/dist/client/assets/sections-editor-DQxu6nDY.js +0 -2
  230. package/dist/client/assets/select-DlsRm0pM.js +0 -1
  231. package/dist/client/assets/seo-editor-DAvYGMob.js +0 -1
  232. package/dist/client/assets/settings-layout-D1AOhck8.js +0 -1
  233. package/dist/client/assets/sso-BV0gs8-C.js +0 -1
  234. package/dist/client/assets/store-B7yfmn2A.js +0 -1
  235. package/dist/client/assets/store-registry-PU_3Djb3.js +0 -2
  236. package/dist/client/assets/tooltip-qf4kMmAF.js +0 -1
  237. package/dist/client/assets/useInfiniteQuery-CkJOjicq.js +0 -1
  238. package/dist/client/assets/useSuspenseInfiniteQuery-n6ZCdGbO.js +0 -1
  239. package/dist/client/assets/variant-calendar-YykiGxU4.js +0 -1
@@ -0,0 +1,2 @@
1
+ import{c as Ie,r as w,l as Re,j as n,B as Ue,i as Dn,m as Qs,t as pe,K as Xs}from"./index-C1yj8oW9.js";import{r as Zs,a as Gs,s as ea,i as Tn,c as ta,b as na,G as sa,V as aa,d as ra,e as jt,f as oa,g as ia,h as la,j as ca,k as ua,l as da,m as ma,n as fa,o as pa,p as xt,q as bt,t as ha,v as tt,w as Bt,x as ga,y as Xe,z as gn,S as va,M as vn,A as nt,B as Sn,C as Sa,D as xn,P as xa,E as Ft,F as ba,H as ya,I as ja,J as _a,K as ka,L as wa,N as Na,O as dt,Q as Ra,R as Ca,T as Da,U as Ta,W as Pa,X as Va,Y as Aa,Z as Ma,_ as bn,$ as zt,a0 as Ea,a1 as $a,a2 as It,a3 as Ka,a4 as yn,a5 as Oa,a6 as La,a7 as Ba,a8 as Ht,a9 as Fa,aa as za,ab as Pn,ac as jn,ad as Ia}from"./index-7--My7Kk.js";import{t as Ha}from"./ChevronDown-BjzwFuai.js";import{n as Ua}from"./ChevronLeft-uRkOj5F8.js";import{i as Vn}from"./ChevronRight-BRGGbOax.js";import{n as Wa}from"./ChevronUp-CzO_7LvF.js";import{K as Wt,D as An,W as Mn,l as qa,L as Ya,M as Ja}from"./agent-icon-BB0OI_Zf.js";import{i as Qa}from"./Globe01-Cm82tRCS.js";import{S as yt}from"./scroll-area-Btbw5x0S.js";import{b as st,T as at,a as rt}from"./tooltip-Cvbl_0l0.js";import{a as Xa,D as Za,b as Ga,e as er,c as tr,d as nr}from"./dialog-D4-cpiIq.js";import{I as sr}from"./input-CjEjpxdM.js";import{s as ar,a as En}from"./Eye-BBVg-SSa.js";import{c as rr}from"./ZoomOut-BR28jpI9.js";import{b as or}from"./Settings02-B1ZVVT_e.js";import{s as qt}from"./Plus-CK2CAzo5.js";import{s as $n}from"./Trash01-SWS-_O9Z.js";import{i as ir}from"./Zap-Bs_ao0zW.js";import{c as Ze,a as Kn,D as On,b as Ln,g as lr}from"./dropdown-menu-DgXWnPV7.js";import{b as Bn,c as _t,K as Fn,P as zn,e as In,C as Hn,s as Un,l as mt,D as Wn,d as qn,S as Yn,v as cr,k as Jn,p as ur}from"./sortable.esm-BrVUE0Ot.js";import{r as _n,u as dr,d as mr,a as fr,i as pr,f as hr,P as gr,b as vr,S as Sr}from"./page-seo-form-B9gdIgu6.js";import{b as xr}from"./Tool01-CZPk8Ney.js";import{A as br}from"./add-section-modal-BTy1RUe_.js";import"./index-ChS8eVb4.js";import"./chat-context-D6S41DOV.js";import"./hooks-iTnRVGBT.js";import"./use-mcp-client-90IJIS7G.js";import"./auth-DscXYOeb.js";import"./decopilot-sse-pool-DCimHDb8.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-yUKVcLc_.js";import"./use-collections-C5z5SeL0.js";import"./use-ai-providers-BB_netT8.js";import"./studio-tools-cTyVqaHA.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings-B-FYwlct.js";import"./drawer-EynyRy5s.js";import"./collection-search-Did_rDKr.js";import"./SearchMd-B3Rw93l5.js";import"./use-mcp-prompts-D2ucpusX.js";import"./X-CO9z9Xp0.js";import"./shell-layout-DPTryinF.js";import"./avatar-B2rvHJ2u.js";import"./User01-Do5enW22.js";import"./Users03-B_G71vm-.js";import"./Stars02-BwRZ8reG.js";import"./XClose-BO6FjXoT.js";import"./CheckCircle-DpKZZDmN.js";import"./FilterLines-CowTK4HW.js";import"./required-auth-layout-Be42uHMA.js";import"./use-org-sso-d8VUjdDF.js";import"./SwitchHorizontal01-B_NmbobE.js";import"./ZapSquare-CmQdJEdR.js";import"./Star01-DBcQByZk.js";import"./Upload01-CoqelT_E.js";import"./AlertCircle-CmMED3h6.js";import"./form-C0rXEiGF.js";import"./label-B1XS6835.js";import"./select-Bdte2-mH.js";import"./index-uuDmStBi.js";import"./XCircle-BFWoSw7W.js";import"./tabs-CQOpbrKh.js";import"./toggle-group-DENfWHtP.js";import"./Monitor01-Aa4wN2Ct.js";import"./connect-desktop-dialog-DzyRhy80.js";import"./decopilot-Cs0sTBvJ.js";import"./checkbox-CsCGEg8f.js";import"./skeleton-BhIDQEW6.js";import"./Key01-CwoTMTFC.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BIuqqQso.js";import"./card-kDiEfTw9.js";import"./ArrowUpRight-DwILncVx.js";import"./Stars01-aJC5veoy.js";import"./popover-C7DR14Uv.js";import"./command-HyE3vuW8.js";import"./index-C6QKjDvm.js";import"./useInfiniteQuery-BxIrRxsB.js";import"./use-infinite-scroll-BaJGyvxX.js";import"./question-004-sINsf4GQ.js";import"./integration-icon-CSYS5mut.js";import"./use-status-sounds-CO3Rxsnj.js";import"./empty-state-BqLGg5Qt.js";import"./toolbar-CO9czXOO.js";import"./preview-dialog-D0Xo8R0Y.js";import"./LinkExternal01-BeE3-oct.js";import"./index-D5MvY5fk.js";import"./file-type-icon-vWAzpBPp.js";import"./LayoutLeft-_ZNcVcNz.js";import"./use-connection-DYuQNBQ8.js";import"./use-mcp-tools-IJf4yY8f.js";import"./types-DkLih0NK.js";import"./use-capability-DtJSLljk.js";import"./textarea-Cya3KDiz.js";import"./shell-route-loading-D5ohEyID.js";import"./extract-connection-data-BrfuWfn9.js";import"./index-BafofCVM.js";import"./mcp-oauth-RIVS58UD.js";import"./badge-Bu3HgcYX.js";import"./connection-slug-eyAPH6o3.js";import"./alert-dialog-CU4F0Cas.js";import"./switch-DoFOdYGu.js";import"./Play-D7fUrl6h.js";import"./use-debounced-autosave-B5XSTYsz.js";import"./index-Bt_ZjPsW.js";import"./sidebar-BLFhVRa1.js";import"./sheet-CzR0tmZA.js";import"./search-input-BJySI9eP.js";import"./collection-tabs-BWGqEvBL.js";import"./github-repo-picker-BMm6sNS0.js";import"./authenticate-and-persist-oauth-KVWekoHI.js";import"./use-navigate-to-agent-D_hba2ju.js";import"./Users01-BmWtNHuf.js";import"./use-secrets-CgpawoY3.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./view-mode-toggle-D1TNBVMm.js";import"./DotsVertical-DshGnU_X.js";import"./automation-runs-CxkH2J7y.js";import"./table-zRS7Teha.js";import"./use-members-DSWXPVdi.js";import"./use-org-auth-client-Bmz_glRx.js";import"./task-status-DjLIycFQ.js";import"./use-automations-C4-BEJDp.js";import"./useSuspenseInfiniteQuery-DENvoLd9.js";import"./use-file-configs-CSX8A1vE.js";import"./monaco-editor-BhcbAKhi.js";import"./select-model-Da9fCD4_.js";import"./automation-list-row-DdnU0_oJ.js";import"./Globe04-DrE78eQQ.js";import"./HardDrive-DsahIXX5.js";import"./Sun-BMePDS8S.js";import"./Palette-DT-obB9z.js";import"./Shield01-BR2mZOZb.js";import"./use-clock-tick-Bo_9gN4h.js";import"./use-copy-V2SquoUh.js";import"./content-blocks-o63cs2vh.js";import"./connection-card-D0jDIFWU.js";import"./use-registry-connections-COP2SiNd.js";import"./connection-form-helpers-DoxJStk3.js";function yr(m){return m.schema?.definitions??m.schema?.$defs??{}}function jr(m,e){const r=yr(e),c=r[btoa(m)];if(!c)return;let d=typeof c.image=="string"?c.image:void 0;if(!d&&Array.isArray(c.allOf)){const h=c.allOf.find(v=>typeof v.$ref=="string")?.$ref;if(typeof h=="string"){const v=h.replace("#/definitions/",""),f=r[v];d=typeof f?.image=="string"?f.image:void 0}}if(d?.includes("{{{"))return d}function _r(m,e){if(!e)return;const r=Zs(m);if(!r)return;const c=jr(r.resolveType,e);if(!c)return;const d=Gs(c,r.data);if(d)return ea(d)}const kr="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",wr="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function kn(m){return Array.from({length:m},(e,r)=>({id:crypto.randomUUID(),index:r}))}function Qn(m){return m.map((e,r)=>({...e,index:r}))}function Nr(m,e){if(e===m.length)return m;if(e<m.length)return Qn(m.slice(0,e));const r=Array.from({length:e-m.length},(c,d)=>({id:crypto.randomUUID(),index:m.length+d}));return[...m,...r]}function Xn(m){const e=Ie.c(20),{section:r,raw:c,meta:d}=m,h=r.isSavedBlock===!0,v=r.isMultivariate===!0;let f;e[0]!==d||e[1]!==c?(f=c&&d?_r(c,d):void 0,e[0]=d,e[1]=c,e[2]=f):f=e[2];const g=f;let S;e[3]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(rr,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=S):S=e[3];let x;e[4]!==g?(x=g&&n.jsx("img",{src:g,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=g,e[5]=x):x=e[5];let D;e[6]!==v||e[7]!==h?(D=h?{color:sa}:v?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=v,e[7]=h,e[8]=D):D=e[8];let N;e[9]!==D?(N=n.jsx(Wt,{className:"h-4 w-4 shrink-0",style:D}),e[9]=D,e[10]=N):N=e[10];const j=r.isHidden&&"line-through opacity-50";let C;e[11]!==j?(C=Re("min-w-0 flex-1 truncate text-sm font-medium",j),e[11]=j,e[12]=C):C=e[12];let o;e[13]!==r.label||e[14]!==C?(o=n.jsx("span",{className:C,children:r.label}),e[13]=r.label,e[14]=C,e[15]=o):o=e[15];let k;return e[16]!==x||e[17]!==N||e[18]!==o?(k=n.jsxs(n.Fragment,{children:[S,x,N,o]}),e[16]=x,e[17]=N,e[18]=o,e[19]=k):k=e[19],k}function Zn(m,e){const r=m.isSavedBlock===!0,c=m.isMultivariate===!0;return Re("group flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":r?kr:c?"text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]":"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Rr(m){const e=Ie.c(64),{section:r,raw:c,meta:d,sortableId:h,selected:v,onSelect:f,onDelete:g,onDuplicate:S,onMakeReusable:x,onToggleHidden:D,onToggleLazy:N,onAddVariant:j,onDetach:C}=m,o=c?Tn(c.__resolveType??""):!1;let k;e[0]!==r?(k=ta(r),e[0]=r,e[1]=k):k=e[1];const u=k;let Q;e[2]!==h?(Q={id:h,animateLayoutChanges:Vr},e[2]=h,e[3]=Q):Q=e[3];const{attributes:W,listeners:O,setNodeRef:l,transform:T,isDragging:ae}=In(Q);let P;e[4]!==T?(P=Hn.Transform.toString(T?{...T,x:0}:null),e[4]=T,e[5]=P):P=e[5];const de=ae?0:void 0;let A;e[6]!==P||e[7]!==de?(A={transform:P,opacity:de},e[6]=P,e[7]=de,e[8]=A):A=e[8];const le=A;let M;e[9]!==r?(M=na(r),e[9]=r,e[10]=M):M=e[10];const se=M,oe="button",Se=0;let I;e[11]!==f?(I=E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),f())},e[11]=f,e[12]=I):I=e[12];const te=ae?"cursor-grabbing":"cursor-pointer";let q;e[13]!==r||e[14]!==v||e[15]!==te?(q=Re("touch-none transition-colors",te,Zn(r,v)),e[13]=r,e[14]=v,e[15]=te,e[16]=q):q=e[16];let ie;e[17]!==d||e[18]!==c||e[19]!==r?(ie=n.jsx(Xn,{section:r,raw:c,meta:d}),e[17]=d,e[18]=c,e[19]=r,e[20]=ie):ie=e[20];const V=!r.isMultivariate&&n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":o?"Disable async render":"Enable async render",className:Re("h-7 w-7 shrink-0",o?"":"opacity-0 group-hover:opacity-100"),onClick:E=>{E.stopPropagation(),N()},onPointerDown:Pr,children:n.jsx(ir,{className:Re("h-3.5 w-3.5",o&&"text-yellow-500")})})}),n.jsx(rt,{side:"bottom",children:o?"Disable async render":"Enable async render"})]});let he;e[21]!==D||e[22]!==r.isHidden||e[23]!==r.isMultivariate?(he=!r.isMultivariate&&n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":r.isHidden?"Show section":"Hide section",className:Re("h-7 w-7 shrink-0",r.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:E=>{E.stopPropagation(),D()},onPointerDown:Tr,children:r.isHidden?n.jsx(or,{className:"h-3.5 w-3.5"}):n.jsx(ar,{className:"h-3.5 w-3.5"})})}),n.jsx(rt,{side:"bottom",children:r.isHidden?"Show section":"Hide section"})]}),e[21]=D,e[22]=r.isHidden,e[23]=r.isMultivariate,e[24]=he):he=e[24];let K;e[25]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(Kn,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":"Section actions",className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:Dr,onPointerDown:Cr,children:n.jsx(An,{className:"h-3.5 w-3.5"})})}),e[25]=K):K=e[25];let ce;e[26]!==S?(ce=E=>{E.stopPropagation(),S()},e[26]=S,e[27]=ce):ce=e[27];let X;e[28]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(En,{className:"h-4 w-4"}),e[28]=X):X=e[28];let Y;e[29]!==ce?(Y=n.jsxs(Ze,{onClick:ce,children:[X,"Duplicate"]}),e[29]=ce,e[30]=Y):Y=e[30];let L;e[31]!==u||e[32]!==j?(L=u&&n.jsxs(Ze,{className:aa,onClick:E=>{E.stopPropagation(),j()},children:[n.jsx(Mn,{className:"h-4 w-4"}),"Add variant"]}),e[31]=u,e[32]=j,e[33]=L):L=e[33];let B;e[34]!==se||e[35]!==x?(B=se&&n.jsxs(Ze,{className:wr,onClick:E=>{E.stopPropagation(),x()},children:[n.jsx(Wt,{className:"h-4 w-4"}),"Make reusable"]}),e[34]=se,e[35]=x,e[36]=B):B=e[36];let Z;e[37]!==C||e[38]!==r.isMultivariate||e[39]!==r.isSavedBlock?(Z=r.isSavedBlock===!0&&!r.isMultivariate&&n.jsxs(Ze,{onClick:E=>{E.stopPropagation(),C()},children:[n.jsx(Wt,{className:"h-4 w-4"}),"Detach"]}),e[37]=C,e[38]=r.isMultivariate,e[39]=r.isSavedBlock,e[40]=Z):Z=e[40];let G;e[41]!==g?(G=E=>{E.stopPropagation(),g()},e[41]=g,e[42]=G):G=e[42];let ee;e[43]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx($n,{className:"h-4 w-4"}),e[43]=ee):ee=e[43];let ne;e[44]!==G?(ne=n.jsxs(Ze,{className:"text-destructive focus:text-destructive",onClick:G,children:[ee,"Delete"]}),e[44]=G,e[45]=ne):ne=e[45];let me;e[46]!==Y||e[47]!==L||e[48]!==B||e[49]!==Z||e[50]!==ne?(me=n.jsxs(On,{children:[K,n.jsxs(Ln,{align:"end",className:"w-44",children:[Y,L,B,Z,ne]})]}),e[46]=Y,e[47]=L,e[48]=B,e[49]=Z,e[50]=ne,e[51]=me):me=e[51];let F;return e[52]!==W||e[53]!==O||e[54]!==f||e[55]!==l||e[56]!==le||e[57]!==q||e[58]!==ie||e[59]!==V||e[60]!==he||e[61]!==me||e[62]!==I?(F=n.jsxs("div",{ref:l,style:le,...W,...O,role:oe,tabIndex:Se,onClick:f,onKeyDown:I,className:q,children:[ie,V,he,me]}),e[52]=W,e[53]=O,e[54]=f,e[55]=l,e[56]=le,e[57]=q,e[58]=ie,e[59]=V,e[60]=he,e[61]=me,e[62]=I,e[63]=F):F=e[63],F}function Cr(m){return m.stopPropagation()}function Dr(m){return m.stopPropagation()}function Tr(m){return m.stopPropagation()}function Pr(m){return m.stopPropagation()}function Vr(){return!1}function Ar(m){const e=Ie.c(90),{listKey:r,rawSections:c,sections:d,meta:h,selectedIndex:v,onSelect:f,onReorder:g,onDelete:S,onDuplicate:x,onMakeReusable:D,onToggleHidden:N,onToggleLazy:j,onAddVariant:C,onDetach:o,onAddSection:k,canAddSection:u}=m,Q=u===void 0?!0:u;let W;e[0]!==d.length?(W=()=>kn(d.length),e[0]=d.length,e[1]=W):W=e[1];const[O,l]=w.useState(W),[T,ae]=w.useState(null),[P,de]=w.useState(r),[A,le]=w.useState(d.length),M=w.useRef(!1);P!==r?(de(r),le(d.length),l(kn(d.length))):A!==d.length&&(le(d.length),l(z=>Nr(z,d.length)));let se;e[2]===Symbol.for("react.memo_cache_sentinel")?(se={activationConstraint:{distance:8}},e[2]=se):se=e[2];let oe;e[3]===Symbol.for("react.memo_cache_sentinel")?(oe={coordinateGetter:Un},e[3]=oe):oe=e[3];const Se=Bn(_t(zn,se),_t(Fn,oe));let I;e[4]!==O?(I=O.map(Mr),e[4]=O,e[5]=I):I=e[5];const te=I;let q;e[6]===Symbol.for("react.memo_cache_sentinel")?(q=z=>{ae(String(z.active.id))},e[6]=q):q=e[6];const ie=q;let V;e[7]!==te||e[8]!==g?(V=z=>{ae(null);const{active:_,over:H}=z;if(!H||_.id===H.id)return;const Le=te.indexOf(String(_.id)),Be=te.indexOf(String(H.id));Le===-1||Be===-1||(l(We=>Qn(mt([...We],Le,Be))),M.current=!0,requestAnimationFrame(()=>{M.current=!1}),g?.(Le,Be))},e[7]=te,e[8]=g,e[9]=V):V=e[9];const he=V;let K;e[10]===Symbol.for("react.memo_cache_sentinel")?(K=()=>{ae(null)},e[10]=K):K=e[10];const ce=K;let X,Y,L,B,Z,G,ee,ne,me,F,E,De,_e,Me,ke;if(e[11]!==T||e[12]!==Q||e[13]!==O||e[14]!==te||e[15]!==he||e[16]!==h||e[17]!==k||e[18]!==C||e[19]!==S||e[20]!==o||e[21]!==x||e[22]!==D||e[23]!==f||e[24]!==N||e[25]!==j||e[26]!==c||e[27]!==d||e[28]!==v||e[29]!==Se){Me=Symbol.for("react.early_return_sentinel");e:{const z=_=>{M.current||f(_)};if(e[45]!==T||e[46]!==Q||e[47]!==O||e[48]!==k||e[49]!==c||e[50]!==d){const _=T?O.find(H=>H.id===T):null;if(B=_!=null?d[_.index]:null,L=_!=null?c[_.index]:void 0,O.length===0){let H;e[54]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:"No sections in this page."}),e[54]=H):H=e[54];const Le=!Q;let Be;e[55]===Symbol.for("react.memo_cache_sentinel")?(Be=n.jsx(qt,{size:14}),e[55]=Be):Be=e[55];let We;e[56]!==k||e[57]!==Le?(We=n.jsxs("div",{className:"space-y-2",children:[H,n.jsxs(Ue,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:Le,onClick:k,children:[Be,"Add section"]})]}),e[56]=k,e[57]=Le,e[58]=We):We=e[58],Me=We;break e}_e=Re(_&&"cursor-grabbing"),e[45]=T,e[46]=Q,e[47]=O,e[48]=k,e[49]=c,e[50]=d,e[51]=L,e[52]=B,e[53]=_e}else L=e[51],B=e[52],_e=e[53];Y=Wn,ne=Se,me=qn,F=ie,E=he,De=ce,X=Yn,G=te,ee=cr,ke="space-y-1",Z=O.map(_=>{const H=d[_.index];return H?n.jsx(Rr,{sortableId:_.id,section:H,raw:c[_.index],meta:h,selected:v===_.index,onSelect:()=>z(_.index),onDelete:()=>S(_.index),onDuplicate:()=>x(_.index),onMakeReusable:()=>D(_.index),onToggleHidden:()=>N(_.index),onToggleLazy:()=>j(_.index),onAddVariant:()=>C(_.index),onDetach:()=>o(_.index)},_.id):null})}e[11]=T,e[12]=Q,e[13]=O,e[14]=te,e[15]=he,e[16]=h,e[17]=k,e[18]=C,e[19]=S,e[20]=o,e[21]=x,e[22]=D,e[23]=f,e[24]=N,e[25]=j,e[26]=c,e[27]=d,e[28]=v,e[29]=Se,e[30]=X,e[31]=Y,e[32]=L,e[33]=B,e[34]=Z,e[35]=G,e[36]=ee,e[37]=ne,e[38]=me,e[39]=F,e[40]=E,e[41]=De,e[42]=_e,e[43]=Me,e[44]=ke}else X=e[30],Y=e[31],L=e[32],B=e[33],Z=e[34],G=e[35],ee=e[36],ne=e[37],me=e[38],F=e[39],E=e[40],De=e[41],_e=e[42],Me=e[43],ke=e[44];if(Me!==Symbol.for("react.early_return_sentinel"))return Me;let Te;e[59]!==Z||e[60]!==ke?(Te=n.jsx("div",{className:ke,children:Z}),e[59]=Z,e[60]=ke,e[61]=Te):Te=e[61];let Ce;e[62]!==X||e[63]!==G||e[64]!==ee||e[65]!==Te?(Ce=n.jsx(X,{items:G,strategy:ee,children:Te}),e[62]=X,e[63]=G,e[64]=ee,e[65]=Te,e[66]=Ce):Ce=e[66];let Ke;e[67]!==L||e[68]!==B||e[69]!==h?(Ke=B?n.jsx("div",{className:Re("cursor-grabbing shadow-lg ring-1 ring-border/60",Zn(B,!1)),children:n.jsx(Xn,{section:B,raw:L,meta:h})}):null,e[67]=L,e[68]=B,e[69]=h,e[70]=Ke):Ke=e[70];let we;e[71]!==Ke?(we=n.jsx(Jn,{dropAnimation:null,children:Ke}),e[71]=Ke,e[72]=we):we=e[72];let Ee;e[73]!==Y||e[74]!==ne||e[75]!==me||e[76]!==F||e[77]!==E||e[78]!==De||e[79]!==Ce||e[80]!==we?(Ee=n.jsxs(Y,{sensors:ne,collisionDetection:me,onDragStart:F,onDragEnd:E,onDragCancel:De,children:[Ce,we]}),e[73]=Y,e[74]=ne,e[75]=me,e[76]=F,e[77]=E,e[78]=De,e[79]=Ce,e[80]=we,e[81]=Ee):Ee=e[81];const Oe=!Q;let re;e[82]===Symbol.for("react.memo_cache_sentinel")?(re=n.jsx(qt,{size:14}),e[82]=re):re=e[82];let ue;e[83]!==k||e[84]!==Oe?(ue=n.jsxs(Ue,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:Oe,onClick:k,children:[re,"Add section"]}),e[83]=k,e[84]=Oe,e[85]=ue):ue=e[85];let $e;return e[86]!==_e||e[87]!==Ee||e[88]!==ue?($e=n.jsxs("div",{className:_e,children:[Ee,ue]}),e[86]=_e,e[87]=Ee,e[88]=ue,e[89]=$e):$e=e[89],$e}function Mr(m){return m.id}function Er(m){const e=Ie.c(38),{open:r,initialName:c,autoLabel:d,isPending:h,onSubmit:v,onOpenChange:f}=m,g=h===void 0?!1:h,[S,x]=w.useState(c),[D,N]=w.useState(r);r!==D&&(N(r),r&&x(c));let j;e[0]!==g||e[1]!==f?(j=oe=>{!oe&&!g&&f(!1)},e[0]=g,e[1]=f,e[2]=j):j=e[2];const C=j;let o;e[3]!==g||e[4]!==S||e[5]!==v?(o=async oe=>{oe.preventDefault(),!g&&await v(S.trim())},e[3]=g,e[4]=S,e[5]=v,e[6]=o):o=e[6];const k=o;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Xa,{children:"Rename variant"}),e[7]=u):u=e[7];const Q=d||"the rule";let W;e[8]!==Q?(W=n.jsxs(Za,{children:[u,n.jsxs(Ga,{children:["Save this matcher as a global block with a custom label. Leave empty to inline the matcher again and fall back to"," ",n.jsx("span",{className:"font-medium",children:Q}),"."]})]}),e[8]=Q,e[9]=W):W=e[9];let O;e[10]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[10]=O):O=e[10];let l;e[11]===Symbol.for("react.memo_cache_sentinel")?(l=oe=>x(oe.target.value),e[11]=l):l=e[11];let T;e[12]!==d||e[13]!==g||e[14]!==S?(T=n.jsxs("div",{className:"space-y-1.5 py-4",children:[O,n.jsx(sr,{id:"variant-rename-name",value:S,onChange:l,placeholder:d,autoFocus:!0,disabled:g})]}),e[12]=d,e[13]=g,e[14]=S,e[15]=T):T=e[15];let ae;e[16]!==f?(ae=()=>f(!1),e[16]=f,e[17]=ae):ae=e[17];let P;e[18]!==g||e[19]!==ae?(P=n.jsx(Ue,{type:"button",variant:"outline",onClick:ae,disabled:g,children:"Cancel"}),e[18]=g,e[19]=ae,e[20]=P):P=e[20];let de;e[21]!==g?(de=g?n.jsxs(n.Fragment,{children:[n.jsx(Dn,{size:14,className:"animate-spin"}),"Saving…"]}):"Save",e[21]=g,e[22]=de):de=e[22];let A;e[23]!==g||e[24]!==de?(A=n.jsx(Ue,{type:"submit",disabled:g,children:de}),e[23]=g,e[24]=de,e[25]=A):A=e[25];let le;e[26]!==P||e[27]!==A?(le=n.jsxs(er,{children:[P,A]}),e[26]=P,e[27]=A,e[28]=le):le=e[28];let M;e[29]!==k||e[30]!==le||e[31]!==W||e[32]!==T?(M=n.jsx(tr,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:k,children:[W,T,le]})}),e[29]=k,e[30]=le,e[31]=W,e[32]=T,e[33]=M):M=e[33];let se;return e[34]!==C||e[35]!==r||e[36]!==M?(se=n.jsx(nr,{open:r,onOpenChange:C,children:M}),e[34]=C,e[35]=r,e[36]=M,e[37]=se):se=e[37],se}const $r="oklch(0.65 0.15 160)",Gn="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.22)]";function Yt(m){const e=Ie.c(5),{rule:r,matchers:c}=m,d=r?.__resolveType??"";let h;if(e[0]!==c||e[1]!==d){const S=c.find(x=>x.resolveType===d)?.iconName??ra(d);h=qa(S),e[0]=c,e[1]=d,e[2]=h}else h=e[2];const v=h;if(!v)return null;let f;return e[3]!==v?(f=n.jsx(v,{size:14,className:"shrink-0"}),e[3]=v,e[4]=f):f=e[4],f}function wn(m){return m.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
2
+ `)}function Ut(m){return m.map((e,r)=>({id:crypto.randomUUID(),index:r,variant:e}))}function Kr(m){return m.map((e,r)=>({...e,index:r}))}function Or(m){const e=Ie.c(55),{entry:r,sortableId:c,isActive:d,canDelete:h,decofile:v,meta:f,matchers:g,onSelect:S,onRename:x,onDuplicate:D,onDelete:N}=m;let j;e[0]!==c?(j={id:c,animateLayoutChanges:Fr},e[0]=c,e[1]=j):j=e[1];const{attributes:C,listeners:o,setNodeRef:k,transform:u,isDragging:Q}=In(j);let W;e[2]!==u?(W=Hn.Transform.toString(u?{...u,y:0}:null),e[2]=u,e[3]=W):W=e[3];const O=Q?0:void 0;let l;e[4]!==W||e[5]!==O?(l={transform:W,opacity:O},e[4]=W,e[5]=O,e[6]=l):l=e[6];const T=l,ae=f??void 0;let P;e[7]!==v||e[8]!==r.variant.rule||e[9]!==ae?(P=jt(r.variant.rule,v,ae),e[7]=v,e[8]=r.variant.rule,e[9]=ae,e[10]=P):P=e[10];const de=P,A=d?Gn:"text-muted-foreground hover:bg-muted hover:text-foreground",le=Q?"cursor-grabbing":"cursor-grab";let M;e[11]!==A||e[12]!==le?(M=Re("group shrink-0 inline-flex items-center rounded-md transition-colors touch-none",A,le),e[11]=A,e[12]=le,e[13]=M):M=e[13];let se;e[14]!==de||e[15]!==g?(se=n.jsx(Yt,{rule:de,matchers:g}),e[14]=de,e[15]=g,e[16]=se):se=e[16];let oe;e[17]!==r.variant.label?(oe=n.jsx("span",{className:"truncate",children:r.variant.label}),e[17]=r.variant.label,e[18]=oe):oe=e[18];let Se;e[19]!==C||e[20]!==o||e[21]!==S||e[22]!==se||e[23]!==oe?(Se=n.jsxs("button",{type:"button",...C,...o,onClick:S,className:"inline-flex items-center gap-1.5 h-8 pl-3 pr-1.5 text-sm font-medium cursor-[inherit]",children:[se,oe]}),e[19]=C,e[20]=o,e[21]=S,e[22]=se,e[23]=oe,e[24]=Se):Se=e[24];const I=`Actions for ${r.variant.label}`,te=d&&"opacity-100";let q;e[25]!==te?(q=Re("inline-flex h-8 w-6 items-center justify-center pr-1 cursor-pointer transition-opacity","opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",te),e[25]=te,e[26]=q):q=e[26];let ie;e[27]===Symbol.for("react.memo_cache_sentinel")?(ie=n.jsx(An,{size:12}),e[27]=ie):ie=e[27];let V;e[28]!==I||e[29]!==q?(V=n.jsx(Kn,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":I,onClick:Br,onPointerDown:Lr,className:q,children:ie})}),e[28]=I,e[29]=q,e[30]=V):V=e[30];let he;e[31]===Symbol.for("react.memo_cache_sentinel")?(he=n.jsx(xr,{size:14}),e[31]=he):he=e[31];let K;e[32]!==x?(K=n.jsxs(Ze,{onClick:x,children:[he,"Rename"]}),e[32]=x,e[33]=K):K=e[33];let ce;e[34]===Symbol.for("react.memo_cache_sentinel")?(ce=n.jsx(En,{size:14}),e[34]=ce):ce=e[34];let X;e[35]!==D?(X=n.jsxs(Ze,{onClick:D,children:[ce,"Duplicate"]}),e[35]=D,e[36]=X):X=e[36];let Y;e[37]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsx(lr,{}),e[37]=Y):Y=e[37];const L=!h;let B;e[38]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx($n,{size:14}),e[38]=B):B=e[38];let Z;e[39]!==N||e[40]!==L?(Z=n.jsxs(Ze,{variant:"destructive",disabled:L,onClick:N,children:[B,"Delete"]}),e[39]=N,e[40]=L,e[41]=Z):Z=e[41];let G;e[42]!==K||e[43]!==X||e[44]!==Z?(G=n.jsxs(Ln,{align:"start",className:"w-36",children:[K,X,Y,Z]}),e[42]=K,e[43]=X,e[44]=Z,e[45]=G):G=e[45];let ee;e[46]!==V||e[47]!==G?(ee=n.jsxs(On,{children:[V,G]}),e[46]=V,e[47]=G,e[48]=ee):ee=e[48];let ne;return e[49]!==k||e[50]!==T||e[51]!==Se||e[52]!==ee||e[53]!==M?(ne=n.jsxs("div",{ref:k,style:T,className:M,children:[Se,ee]}),e[49]=k,e[50]=T,e[51]=Se,e[52]=ee,e[53]=M,e[54]=ne):ne=e[54],ne}function Lr(m){return m.stopPropagation()}function Br(m){return m.stopPropagation()}function Fr(){return!1}function zr(m){const e=Ie.c(13),{variant:r,decofile:c,meta:d,matchers:h}=m,v=d??void 0;let f;e[0]!==c||e[1]!==v||e[2]!==r.rule?(f=jt(r.rule,c,v),e[0]=c,e[1]=v,e[2]=r.rule,e[3]=f):f=e[3];const g=f;let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=Re("inline-flex items-center gap-1.5 h-8 pl-3 pr-3 text-sm font-medium rounded-md shadow-lg ring-1 ring-border/60 cursor-grabbing",Gn),e[4]=S):S=e[4];let x;e[5]!==g||e[6]!==h?(x=n.jsx(Yt,{rule:g,matchers:h}),e[5]=g,e[6]=h,e[7]=x):x=e[7];let D;e[8]!==r.label?(D=n.jsx("span",{className:"truncate",children:r.label}),e[8]=r.label,e[9]=D):D=e[9];let N;return e[10]!==x||e[11]!==D?(N=n.jsxs("div",{className:S,children:[x,D]}),e[10]=x,e[11]=D,e[12]=N):N=e[12],N}function Ir(m){const e=Ie.c(78),{listKey:r,variants:c,activeIndex:d,decofile:h,meta:v,matchers:f,onSelect:g,onReorder:S,onRename:x,onDuplicate:D,onDelete:N,onAdd:j}=m;let C;e[0]!==c?(C=()=>Ut(c),e[0]=c,e[1]=C):C=e[1];const[o,k]=w.useState(C),[u,Q]=w.useState(null),[W,O]=w.useState(r),[l,T]=w.useState(c.length);let ae;e[2]!==c?(ae=()=>wn(c),e[2]=c,e[3]=ae):ae=e[3];const[P,de]=w.useState(ae),A=w.useRef(!1),le=wn(c);W!==r?(O(r),T(c.length),de(le),k(Ut(c))):l!==c.length?(T(c.length),de(le),k(Ut(c))):P!==le&&(de(le),k($e=>c.map((z,_)=>({id:$e[_]?.id??crypto.randomUUID(),index:_,variant:z}))));let M;e[4]===Symbol.for("react.memo_cache_sentinel")?(M={activationConstraint:{distance:8}},e[4]=M):M=e[4];let se;e[5]===Symbol.for("react.memo_cache_sentinel")?(se={coordinateGetter:Un},e[5]=se):se=e[5];const oe=Bn(_t(zn,M),_t(Fn,se));let Se;e[6]!==o?(Se=o.map(Hr),e[6]=o,e[7]=Se):Se=e[7];const I=Se,te=c.length>1;let q;e[8]!==o?(q=$e=>{const z=String($e.active.id);Q(o.find(_=>_.id===z)??null)},e[8]=o,e[9]=q):q=e[9];const ie=q;let V;e[10]!==I||e[11]!==S?(V=$e=>{Q(null);const{active:z,over:_}=$e;if(!_||z.id===_.id)return;const H=I.indexOf(String(z.id)),Le=I.indexOf(String(_.id));H===-1||Le===-1||(k(Be=>Kr(mt([...Be],H,Le))),A.current=!0,requestAnimationFrame(()=>{A.current=!1}),S(H,Le))},e[10]=I,e[11]=S,e[12]=V):V=e[12];const he=V;let K;e[13]===Symbol.for("react.memo_cache_sentinel")?(K=()=>{Q(null)},e[13]=K):K=e[13];const ce=K;let X,Y,L,B,Z,G,ee,ne,me,F,E,De;if(e[14]!==u||e[15]!==d||e[16]!==te||e[17]!==h||e[18]!==o||e[19]!==I||e[20]!==he||e[21]!==ie||e[22]!==f||e[23]!==v||e[24]!==N||e[25]!==D||e[26]!==x||e[27]!==g||e[28]!==oe){const $e=_=>{A.current||g(_)};E="flex items-center border-b shrink-0";const z=u&&"cursor-grabbing";e[41]!==z?(F=Re("flex flex-1 min-w-0 items-center gap-1.5 pl-3 pr-2 py-2 overflow-x-auto",z),e[41]=z,e[42]=F):F=e[42],Y=Wn,Z=oe,G=qn,ee=ie,ne=he,me=ce,X=Yn,De=I,L=ur,B=o.map(_=>n.jsx(Or,{sortableId:_.id,entry:_,isActive:_.index===d,canDelete:te,decofile:h,meta:v,matchers:f,onSelect:()=>$e(_.index),onRename:()=>x(_.index),onDuplicate:()=>D(_.index),onDelete:()=>N(_.index)},_.id)),e[14]=u,e[15]=d,e[16]=te,e[17]=h,e[18]=o,e[19]=I,e[20]=he,e[21]=ie,e[22]=f,e[23]=v,e[24]=N,e[25]=D,e[26]=x,e[27]=g,e[28]=oe,e[29]=X,e[30]=Y,e[31]=L,e[32]=B,e[33]=Z,e[34]=G,e[35]=ee,e[36]=ne,e[37]=me,e[38]=F,e[39]=E,e[40]=De}else X=e[29],Y=e[30],L=e[31],B=e[32],Z=e[33],G=e[34],ee=e[35],ne=e[36],me=e[37],F=e[38],E=e[39],De=e[40];let _e;e[43]!==X||e[44]!==L||e[45]!==B||e[46]!==De?(_e=n.jsx(X,{items:De,strategy:L,children:B}),e[43]=X,e[44]=L,e[45]=B,e[46]=De,e[47]=_e):_e=e[47];let Me;e[48]!==u||e[49]!==h||e[50]!==f||e[51]!==v?(Me=u?n.jsx(zr,{variant:u.variant,decofile:h,meta:v,matchers:f}):null,e[48]=u,e[49]=h,e[50]=f,e[51]=v,e[52]=Me):Me=e[52];let ke;e[53]!==Me?(ke=n.jsx(Jn,{dropAnimation:null,children:Me}),e[53]=Me,e[54]=ke):ke=e[54];let Te;e[55]!==Y||e[56]!==Z||e[57]!==G||e[58]!==ee||e[59]!==ne||e[60]!==me||e[61]!==_e||e[62]!==ke?(Te=n.jsxs(Y,{sensors:Z,collisionDetection:G,onDragStart:ee,onDragEnd:ne,onDragCancel:me,children:[_e,ke]}),e[55]=Y,e[56]=Z,e[57]=G,e[58]=ee,e[59]=ne,e[60]=me,e[61]=_e,e[62]=ke,e[63]=Te):Te=e[63];let Ce;e[64]!==F||e[65]!==Te?(Ce=n.jsx("div",{className:F,children:Te}),e[64]=F,e[65]=Te,e[66]=Ce):Ce=e[66];let Ke;e[67]===Symbol.for("react.memo_cache_sentinel")?(Ke={color:$r},e[67]=Ke):Ke=e[67];let we;e[68]===Symbol.for("react.memo_cache_sentinel")?(we=n.jsx(qt,{size:14}),e[68]=we):we=e[68];let Ee;e[69]!==j?(Ee=n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":"Add variant",className:"size-8 shrink-0 cursor-pointer",style:Ke,onClick:j,children:we})}),e[69]=j,e[70]=Ee):Ee=e[70];let Oe;e[71]===Symbol.for("react.memo_cache_sentinel")?(Oe=n.jsx(rt,{side:"bottom",children:"Add variant"}),e[71]=Oe):Oe=e[71];let re;e[72]!==Ee?(re=n.jsx("div",{className:"shrink-0 pr-3 pl-1 py-2",children:n.jsxs(st,{children:[Ee,Oe]})}),e[72]=Ee,e[73]=re):re=e[73];let ue;return e[74]!==E||e[75]!==Ce||e[76]!==re?(ue=n.jsxs("div",{className:E,children:[Ce,re]}),e[74]=E,e[75]=Ce,e[76]=re,e[77]=ue):ue=e[77],ue}function Hr(m){return m.id}function Nn(m){const e=Ie.c(15),{schema:r,value:c,onChange:d,meta:h,decofile:v,onSaveReferencedBlock:f,sandbox:g}=m;let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=[],e[0]=S):S=e[0];const[x,D]=w.useState(S);let N;e[1]!==x?(N=x.length>0&&n.jsxs("nav",{"aria-label":"Variant rule breadcrumb",className:"flex min-w-0 items-center gap-1 overflow-hidden text-xs",children:[n.jsx("button",{type:"button",onClick:()=>D([]),className:"flex shrink-0 items-center gap-0.5 rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",title:"Back to rule",children:n.jsx(Ua,{className:"size-3.5"})}),x.map((o,k)=>{const u=k===x.length-1;return n.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[k>0&&n.jsx(Vn,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>D(x.slice(0,k+1)),title:o,className:Re("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",u?"font-medium text-foreground":"text-muted-foreground"),children:o})]},`${o}-${k}`)})]}),e[1]=x,e[2]=N):N=e[2];let j;e[3]!==x||e[4]!==v||e[5]!==h||e[6]!==d||e[7]!==f||e[8]!==g||e[9]!==r||e[10]!==c?(j=n.jsx(Pn,{schema:r,value:c,onChange:d,basePath:"",breadcrumbPath:x,onBreadcrumbChange:D,meta:h,decofile:v,onSaveReferencedBlock:f,sandbox:g}),e[3]=x,e[4]=v,e[5]=h,e[6]=d,e[7]=f,e[8]=g,e[9]=r,e[10]=c,e[11]=j):j=e[11];let C;return e[12]!==N||e[13]!==j?(C=n.jsxs("div",{className:"space-y-2",children:[N,j]}),e[12]=N,e[13]=j,e[14]=C):C=e[14],C}function Rn(m){const e=Ie.c(21),{activeSchema:r,formValue:c,formResetKey:d,onFormChange:h,onBreadcrumbChange:v,breadcrumbPath:f,emptyMessage:g,beforeForm:S,seoResolveType:x,siteDefaultSeo:D,meta:N,decofile:j,onSaveReferencedBlock:C,sandbox:o}=m;let k;e[0]!==f?(k=f===void 0?[]:f,e[0]=f,e[1]=k):k=e[1];const u=k;let Q;e[2]!==r||e[3]!==u||e[4]!==j||e[5]!==d||e[6]!==c||e[7]!==N||e[8]!==v||e[9]!==h||e[10]!==C||e[11]!==o||e[12]!==x||e[13]!==D?(Q=r&&c?x?n.jsx(Sr,{schema:r,resolveType:x,value:c,formResetKey:d,onChange:h,onBreadcrumbChange:v,siteDefaultSeo:D}):n.jsx(Pn,{schema:r,value:c,onChange:h,basePath:"",breadcrumbPath:u,onBreadcrumbChange:v,meta:N,decofile:j,onSaveReferencedBlock:C,sandbox:o},d):null,e[2]=r,e[3]=u,e[4]=j,e[5]=d,e[6]=c,e[7]=N,e[8]=v,e[9]=h,e[10]=C,e[11]=o,e[12]=x,e[13]=D,e[14]=Q):Q=e[14];const W=Q;let O;e[15]!==g||e[16]!==W?(O=W??n.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:g}),e[15]=g,e[16]=W,e[17]=O):O=e[17];let l;return e[18]!==S||e[19]!==O?(l=n.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:n.jsxs("div",{className:"mx-auto max-w-2xl",children:[S,O]})}),e[18]=S,e[19]=O,e[20]=l):l=e[20],l}const Ur="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.22)]";function Wr(m,e){return ba(m,e,nt)}function qr(m){const e=Ie.c(13),{pageKey:r,initialName:c,initialPath:d,onFieldChange:h}=m,[v,f]=w.useState(c),[g,S]=w.useState(d),[x,D]=w.useState(r);x!==r&&(D(r),f(c),S(d));let N;e[0]!==h?(N=u=>{f(u.target.value),h("name",u.target.value)},e[0]=h,e[1]=N):N=e[1];let j;e[2]!==v||e[3]!==N?(j=n.jsx("input",{type:"text",value:v,onChange:N,className:"w-full bg-transparent text-sm font-semibold truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:"Page name"}),e[2]=v,e[3]=N,e[4]=j):j=e[4];let C;e[5]!==h?(C=u=>{S(u.target.value),h("path",u.target.value)},e[5]=h,e[6]=C):C=e[6];let o;e[7]!==g||e[8]!==C?(o=n.jsx("input",{type:"text",value:g,onChange:C,className:"w-full bg-transparent text-xs text-muted-foreground truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:"/path"}),e[7]=g,e[8]=C,e[9]=o):o=e[9];let k;return e[10]!==j||e[11]!==o?(k=n.jsxs("div",{className:"space-y-1",children:[j,o]}),e[10]=j,e[11]=o,e[12]=k):k=e[12],k}function Cn(m){const e=Ie.c(6),{onClick:r}=m;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Mn,{size:14}),e[0]=c):c=e[0];let d;e[1]!==r?(d=n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":"Add variant",className:"size-7 shrink-0 text-[oklch(0.65_0.15_160)]",onClick:r,children:c})}),e[1]=r,e[2]=d):d=e[2];let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(rt,{side:"bottom",children:"Add variant"}),e[3]=h):h=e[3];let v;return e[4]!==d?(v=n.jsxs(st,{children:[d,h]}),e[4]=d,e[5]=v):v=e[5],v}function Cl({orgSlug:m,virtualMcpId:e,branch:r,previewReady:c=!0,previewUrl:d,currentPath:h,activePageBlockKey:v=null,activeGlobalBlockKey:f=null,externalSelectedIndex:g,onSaved:S,initialEditSeo:x=!1,onExitSeo:D,onViewJsonFile:N,onVariantPreviewOverride:j}){const C=c?{orgSlug:m,virtualMcpId:e,branch:r,previewUrl:d}:null,{data:o,isLoading:k}=oa(C),{data:u,isLoading:Q}=ia(C),W=la(),O=W?.entity?.id===e?W.entity.metadata?.siteSlug??null:null,[l,T]=w.useState(null),[ae,P]=w.useState(null),[de,A]=w.useState(null),[le,M]=w.useState(0),[se,oe]=w.useState(void 0),[Se,I]=w.useState(null),[te,q]=w.useState(null),[ie,V]=w.useState([]),[he,K]=w.useState(0),[ce,X]=w.useState(null),[Y,L]=w.useState(null),[B,Z]=w.useState(!0),[G,ee]=w.useState(!1),[ne,me]=w.useState(!1),[F,E]=w.useState(x),[De,_e]=w.useState(x);x&&!De&&(_e(!0),E(!0),T(null),P(null),A(null),V([])),!x&&De&&_e(!1);const[Me,ke]=w.useState(null),[Te,Ce]=w.useState(void 0),[Ke,we]=w.useState([]),[Ee,Oe]=w.useState(0),[re,ue]=w.useState(0),[$e,z]=w.useState(null),[_,H]=w.useState(null),[Le,Be]=w.useState(null),We=Qs(),es=`${m}/${e}/${r}`,kt=ca({orgSlug:m,virtualMcpId:e,branch:r}),[ts,ns]=w.useState(h),[ss,as]=w.useState(v),[rs,os]=w.useState(f);(ts!==h||ss!==v||rs!==f)&&(queueMicrotask(()=>kt.flush()),ns(h),as(v),os(f),T(null),P(null),A(null),M(0),I(null),q(null),ue(0),z(null),H(null),V([]),K(t=>t+1),E(!1),ke(null),Ce(void 0),we([]),Oe(t=>t+1));const Pe=ua({orgSlug:m,virtualMcpId:e,branch:r}),ft=Ta((t,s)=>{Pe.mutate({blockKey:t,data:s},{onSuccess:()=>S?.(),onError:a=>pe.error(`Save failed: ${a.message}`)})}),Jt=da({orgSlug:m,virtualMcpId:e,branch:r}),[wt,Qt]=w.useState(!1),Nt=w.useRef(null),ot=w.useRef(null),it=w.useRef(null),Rt=w.useRef({}),qe=w.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null});if(!c||k||Q)return n.jsx("div",{className:"h-full w-full flex items-center justify-center",children:n.jsx(Dn,{size:20,className:"animate-spin text-muted-foreground"})});if(!o||!u)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:"Could not load site data."});const is=ma(o),ve=!!f,Fe=ve?null:fa(is,h,v),b=ve?f:Fe?.key??null,Ct=ve&&f?o[f]:void 0,Xt=ve&&f&&Ct?pa(f,Ct):ve&&f?f:"",pt=!ve&&b&&o[b]?o[b]:null,Dt=F&&o&&u&&b&&Fe?_n(o,{kind:"page",pageKey:b,pageName:String(Fe.name??""),path:String(Fe.path??"")},u):null,ls=F?pt?.seo:void 0,Tt=Te!==void 0?Te:ls,cs=F?dr(Tt):void 0,us=Dt?.seoTypeOptions??[],ds=F&&u?mr(u):"",Zt=Me??cs??{},Pt=F&&Dt?fr(Zt,Dt):null,ms=F&&Pt&&pr(Tt)?xt(Pt,u):null,fs=F?hr(o,u)?.seoData:void 0,Ve=ve?[{label:"Default",sections:[{__resolveType:f}]}]:Wr(pt?.sections,o??{}),ht=Ve.length>1,je=Math.min(le,Ve.length-1),Ge=Ve[je],U=Ge?.sections??[],Ne=bt(U,o),Gt=!ve&&ha(pt?.sections);if(ve&&f&&Le!==f){Be(f);const t=U[0],s=Ne[0];if(t&&s){T(0),ue(0),V([]);const a=tt(t,s,o);a&&(P(a.data),A(a.resolveType),H(null),z(null))}}!ve&&Le!==null&&Be(null),qe.current={rawSections:U,parsedSections:Ne,decofile:o??{},activePageKey:b,pageVariants:Ve,variantIndex:je,sectionVariantIndex:re,selectedSectionIndex:l};const ps=()=>({multivariate:Gt,index:je,variants:Ve.map(t=>({rule:t.rule}))}),en=(t,s)=>{if(!j)return;if(!b||!Gt||t.length<=1){j(null);return}const a=yn(b,{multivariate:!0,index:s,variants:t},o,u);j(a.length>0?a:null)},lt=(t,s,a)=>{if(!j)return;if(!b){j(null);return}const i=ps(),p=yn(b,i,o,u);if(!t||s<0){j(p.length>0?p:null);return}const R=Oa({pageKey:b,page:i,sectionIndex:s,sectionLazy:Ne[s]?.isLazy??!1,mvObj:t,selectedVariantIndex:a,decofile:o,meta:u}),y=[...p,...R];j(y.length>0?y:null)},Ye=(t,s,a,i=l??-1,p=!1)=>{const R=Xe(t,s);if(!R){P(null),A(null),H(null),z(null),p&&lt(null,i,a);return}const $=gn(R,nt)[a];if(!$){P(null),A(null),H(null),z(null),p&&lt(null,i,a);return}const ge=ya($.value,o);P(ge?.data??null),A(ge?.resolveType??null);const{resolveType:J,formValue:fe}=Bt($.rule,o,u??void 0);H(J),z(fe),p&&lt(R,i,a)};if(g!==void 0&&g!==se&&(oe(g??null),typeof g=="number")){const t=U[g],s=Ne[g];if(t&&s)if(T(g),ue(0),V([]),K(a=>a+1),s.isMultivariate)Ye(t,s,0,g);else{const a=tt(t,s,o);a?(P(a.data),A(a.resolveType)):(P(null),A(null)),H(null),z(null)}}const gt={orgSlug:m,virtualMcpId:e,branch:r,previewUrl:d??void 0,siteSlug:O},Vt=de&&u?xt(de,u):null,ze=(t,s)=>{if(!b)return;const a=zt(o,b,t,je,Ve);Pe.mutate({blockKey:b,data:a},{onSuccess:()=>s?.onSuccess?.()??S?.(),onError:i=>pe.error(`Save failed: ${i.message}`)})},ct=()=>{T(null),P(null),A(null),ue(0),z(null),H(null),V([]),K(t=>t+1)},hs=(t,s)=>{Nt.current&&clearTimeout(Nt.current);const a=qe.current.sectionVariantIndex;Nt.current=setTimeout(()=>{const{rawSections:i,parsedSections:p,decofile:R,activePageKey:y,pageVariants:$,variantIndex:ge}=qe.current,J=i[s];if(!J)return;const fe=p[s];if(!fe)return;if(fe.isSavedBlock){const be=fe.isLazy?J.section?.__resolveType??J.__resolveType:J.__resolveType;Pe.mutate({blockKey:be,data:t},{onSuccess:()=>S?.(),onError:ye=>pe.error(`Save failed: ${ye.message}`)});return}if(!y)return;const xe={...R[y]},Ae=[...i];if(fe.isMultivariate){const be=Xe(J,fe);if(!be||!y)return;const ye=Fa(be,a,t);Ae[s]=dt(J,fe,ye)}else if(fe.isHidden){const be=Tn(J.__resolveType),ye=be?{...J.section}:{...J},He=Array.isArray(ye.variants)?[...ye.variants]:[];He[0]&&(He[0]={...He[0],value:t}),ye.variants=He,be?Ae[s]={...J,section:ye}:Ae[s]=ye}else fe.isLazy?Ae[s]={...J,section:t}:Ae[s]=t;if($.length>1){const be=xe.sections,ye=[...be?.variants??[]];ye[ge]&&(ye[ge]={...ye[ge],value:Ae}),xe.sections={...be,variants:ye}}else xe.sections=Ae;Pe.mutate({blockKey:y,data:xe},{onSuccess:()=>S?.(),onError:be=>pe.error(`Save failed: ${be.message}`)})},Ht)},gs=t=>{T(t),ue(0),V([]),K(p=>p+1);const s=U[t],a=Ne[t];if(!s||!a)return;if(a.isMultivariate){Ye(s,a,0,t);return}const i=tt(s,a,o);if(!i){P(null),A(null),H(null),z(null),lt(null,t,0);return}P(i.data),A(i.resolveType),H(null),z(null),lt(null,t,0)},tn=t=>{const s=t;P(s),l!==null&&hs(s,l)},At=t=>{if(!b||!o||!u||!Fe)return;const s={kind:"page",pageKey:b,pageName:String(Fe.name??""),path:String(Fe.path??"")},a=_n(o,s,u);a&&kt.save(b,()=>{const i=We.getQueryData(Xs.decofile(es))?.[b];if(!i||typeof i!="object"||i===null||Array.isArray(i))return null;const p={...i,...Rt.current};return Rt.current={},t?.raw!==void 0?{...p,seo:t.raw}:t?.inner!==void 0?vr(s,a,p,t.inner):p})},vs=(t,s)=>{b&&(Rt.current[t]=s,At())},Ss=(t,s)=>{if(!b)return;const a=mt([...U],t,s);l!==null&&(l===t?T(s):t<l&&s>=l?T(l-1):t>l&&s<=l&&T(l+1)),ze(a)},xs=t=>{if(!b)return;const s=U.filter((a,i)=>i!==t);l===t?ct():l!==null&&l>t&&T(l-1),ze(s)},bs=t=>{if(!b)return;const s=U[t];if(!s)return;const a=[...U];a.splice(t+1,0,Ma(s)),l!==null&&l>t&&T(l+1),ze(a)},ys=t=>{if(!b)return;const s=U[t],a=Ne[t];if(!s||!a||a.isMultivariate)return;const i=a.isHidden?Va(s):Aa(s);if(!i)return;const p=[...U];p[t]=i,l===t&&ct(),ze(p)},js=t=>{if(!b)return;const s=U[t],a=Ne[t];if(!s||!a||a.isMultivariate)return;const i=Pa(s);if(!i)return;const p=[...U];p[t]=i,l===t&&ct(),ze(p)},_s=t=>{if(!b)return;const s=U[t],a=Ne[t];if(!s||!a?.isSavedBlock)return;const i=tt(s,a,o);if(!i?.data)return;const{name:p,...R}=i.data,y=[...U];a.isLazy?y[t]={...s,section:R}:y[t]=R,l===t&&ct(),ze(y)},ks=t=>{if(!b)return;const s=[...U,{__resolveType:t.resolveType}],a=s.length-1;ze(s,{onSuccess:()=>{ee(!1),T(a),ue(0),V([]),K(y=>y+1);const i=s[a],p=bt(s,o)[a];if(!i||!p)return;if(p.isMultivariate){Ye(i,p,0);return}const R=tt(i,p,o);if(!R){P(null),A(null),H(null),z(null);return}P(R.data),A(R.resolveType),H(null),z(null)}})},ws=t=>{if(l===null)return;const s=U[l],a=Ne[l];!s||!a?.isMultivariate||(ue(t),V([]),K(i=>i+1),Ye(s,a,t,l,!0))},Ns=t=>{if(l===null||!b)return;const s=U[l],a=Ne[l];if(!s||!a?.isMultivariate)return;const i=Xe(s,a);if(!i)return;const p=Ca(i,t);if(!p){pe.error("Cannot delete the only variant.");return}const R=[...U];R[l]=dt(s,a,p);const y=p.variants;let $=re;t===re?$=Math.min(t,y.length-1):t<re&&($=re-1),ue($),V([]),K(ge=>ge+1),Ye(R[l],a,$),ze(R)},Rs=t=>{if(l===null||!b)return;const s=U[l],a=Ne[l];if(!s||!a?.isMultivariate)return;const i=Xe(s,a);if(!i)return;const p=Da(i,t),R=[...U];R[l]=dt(s,a,p);const y=t+1;ue(y),V([]),K($=>$+1),Ye(R[l],a,y),ze(R)},Cs=(t,s)=>{if(l===null||!b||t===s)return;const a=U[l],i=Ne[l];if(!a||!i?.isMultivariate)return;const p=Xe(a,i);if(!p)return;const R=Na(p,t,s),y=[...U];y[l]=dt(a,i,R);let $=re;re===t?$=s:t<re&&s>=re?$=re-1:t>re&&s<=re&&($=re+1),ue($),Ye(y[l],i,$),ze(y)},Mt=t=>{const s=t??l;if(s===null||!b)return;const a=U[s],i=Ne[s];if(!a||!i)return;const p=ja(a,i);if(!p){pe.error("This section cannot have variants.");return}const R=[...U];R[s]=p.section;const y=bt(R,o)[s];if(!y?.isMultivariate){pe.error("Could not add variant.");return}T(s),ue(p.newVariantIndex),V([]),K($=>$+1),Ye(p.section,y,p.newVariantIndex,s),ze(R)},Ds=()=>{if(l===null||!b)return;const t=U[l],s=Ne[l];if(!t||!s?.isMultivariate)return;const a=Xe(t,s);if(!a)return;const i=Ra(t,s,a);if(!i){pe.error("Could not remove variants.");return}const p=[...U];p[l]=i;const R=bt(p,o)[l];if(!R)return;ue(0),H(null),z(null),V([]),K($=>$+1);const y=tt(i,R,o);y?(P(y.data),A(y.resolveType)):(P(null),A(null)),lt(null,l,0),ze(p)},Ts=async t=>{if(ce===null||!b)return;const s=bn(t,o);if(s){pe.error(s);return}const a=U[ce],i=Ne[ce];if(!a||!i)return;const p=tt(a,i,o);if(!p){pe.error("This section cannot be saved as global.");return}const R={...p.data,name:t};try{await Pe.mutateAsync({blockKey:t,data:R});const y=[...U];y[ce]={__resolveType:t},await Pe.mutateAsync({blockKey:b,data:zt(o,b,y,je,Ve)}),l===ce&&ct(),X(null),pe.success(`Saved global block "${t}"`),S?.()}catch(y){pe.error(y instanceof Error?y.message:"Failed to save global block")}},nn=Ge?.rule;if(ht&&l===null&&te===null&&nn){const{resolveType:t,formValue:s}=Bt(nn,o??{},u??void 0);q(t),I(s)}const vt=u?ga(u):[],Ps=!ve&&!!(d&&u&&o),sn=te&&u?xt(te,u):null,Vs=()=>{ot.current&&(clearTimeout(ot.current),ot.current=null),it.current&&(clearTimeout(it.current),it.current=null)},an=async(t,s)=>{if(!(za(s,t,u)>0))try{await Jt.mutateAsync({blockKey:t})}catch(a){pe.error(a instanceof Error?a.message:"Could not delete matcher block")}},rn=t=>{ot.current&&clearTimeout(ot.current),ot.current=setTimeout(()=>{const{activePageKey:s,decofile:a,variantIndex:i}=qe.current;if(!s)return;const p={...a[s]},R={...p.sections},y=[...R.variants??[]],$=y[i],ge=$?.rule;if(Ft(ge,a,u)){const J=ge?.__resolveType??"",fe=a[J],xe=typeof fe?.name=="string"?fe.name:J,{__resolveType:Ae,...be}=t;Pe.mutate({blockKey:J,data:It(Ae??"",be,xe)},{onSuccess:()=>S?.(),onError:ye=>pe.error(`Save failed: ${ye.message}`)});return}$&&(y[i]={...$,rule:t}),p.sections={...R,variants:y},Pe.mutate({blockKey:s,data:p},{onSuccess:()=>S?.(),onError:J=>pe.error(`Save failed: ${J.message}`)})},Ht)},As=t=>{q(t);const s=t?{__resolveType:t}:{__resolveType:jn};I({}),rn(s)},Ms=t=>{const s=t;I(s);const a=te?{__resolveType:te,...s}:{...s};rn(a)},on=t=>{it.current&&clearTimeout(it.current);const{selectedSectionIndex:s,sectionVariantIndex:a}=qe.current;s!==null&&(it.current=setTimeout(()=>{const{rawSections:i,parsedSections:p,decofile:R,activePageKey:y,pageVariants:$,variantIndex:ge}=qe.current;if(!y)return;const J=i[s],fe=p[s];if(!J||!fe?.isMultivariate)return;const xe=Xe(J,fe);if(!xe)return;const Ae=Ba(xe,a,t),be=[...i];be[s]=dt(J,fe,Ae);const ye=zt(R,y,be,ge,$);Pe.mutate({blockKey:y,data:ye},{onSuccess:()=>S?.(),onError:He=>pe.error(`Save failed: ${He.message}`)})},Ht))},Es=t=>{H(t),z({}),on(t?{__resolveType:t}:{__resolveType:jn})},$s=t=>{const s=t;z(s);const a=_?{__resolveType:_,...s}:{...s};on(a)};if(!ve&&!Fe)return n.jsxs("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:["No page found for ",h]});if(ve&&!Ct)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:"Global block not found"});const Je=l!==null?Ne[l]??null:null,ln=l!==null?U[l]:null,cn=ln&&Je?.isMultivariate?Xe(ln,Je):null,St=cn?gn(cn,nt):[],Et=Math.min(re,Math.max(St.length-1,0)),$t=St[Et]??null,et=Je?.isMultivariate===!0,un=l!==null&&Je!==null,ut=un&&(et||!!(Vt&&ae)),Ks=ut&&!ve&&Je?.isSavedBlock===!0,Qe=ve||Ks,Os=ve?Xt:Je?.label??"",dn=_&&u?xt(_,u):null,Kt=ut&&(!ve||ie.length>0)?ve?[Xt,...ie]:[Fe.name,Je.label,...et&&$t?[$t.label]:[],...ie]:[],Ls=F&&Fe?[Fe.name,"SEO",...Ke]:[],mn=F?Ls:Qe?Kt.length>0?Kt:[Os]:Kt,fn=()=>{if(!b)return;const t=o[b],s=_a(t.sections,U);if(!s)return;const a=ka(s);Pe.mutate({blockKey:b,data:{...t,sections:s}},{onSuccess:()=>{M(a),T(null),P(null),A(null),V([]),I(null),q(null)},onError:i=>pe.error(`Save failed: ${i.message}`)})},Ot=(t,s,a)=>{if(!b)return;const i=o[b],p=i.sections;if(!p||typeof p!="object"||Array.isArray(p))return;const R=p;if(!Array.isArray(R.variants))return;const y=t([...R.variants]);if(!y)return;const $=La(R,y),ge={...o,[b]:{...i,sections:$}};Pe.mutate({blockKey:b,data:ge[b]},{onSuccess:()=>{s?.(),a&&an(a,ge)},onError:J=>pe.error(`Save failed: ${J.message}`)})},Bs=t=>{L(null),M(t),T(null),P(null),A(null),V([]);const s=Ve[t]?.rule,{resolveType:a,formValue:i}=Bt(s,o??{},u??void 0);q(a),I(i),en(Ve.map(p=>({rule:p.rule})),t)},Fs=(t,s)=>{if(t===s)return;let a=je;je===t?a=s:t<je&&s>=je?a=je-1:t>je&&s<=je&&(a=je+1),M(a);const i=mt(Ve.map(p=>({rule:p.rule})),t,s);en(i,a),Ot(p=>mt(p,t,s))},zs=t=>{const s=Ve[t]?.rule,a=wa(s,o??{},u??void 0);Ot(i=>i.length<=1?null:(i.splice(t,1),i),()=>{Ve.length-1===1?M(0):t<je?M(je-1):t===je&&M(Math.max(0,t-1)),T(null),P(null),A(null),V([]),I(null),q(null)},a)},Is=t=>{Ot(s=>Ia(s,t),()=>{M(t+1),T(null),P(null),A(null),V([]),I(null),q(null)})},Hs=async(t,s)=>{Vs();const a=qe.current.activePageKey,i=qe.current.decofile;if(!a)return;const p=i[a],R=p.sections;if(!R||typeof R!="object"||Array.isArray(R))return;const y=R;if(!Array.isArray(y.variants))return;const $=[...y.variants],ge=$[t];if(!ge?.rule||typeof ge.rule!="object"){pe.error("This variant has no matcher rule to rename.");return}const J=ge.rule,fe=s.trim();Qt(!0);try{if(!fe){if(!Ft(J,i,u)){L(null);return}const Lt=J.__resolveType??"";$[t]={...ge,rule:Ea(J,i,u)};const hn={...i,[a]:{...p,sections:{...y,variants:$}}};await Pe.mutateAsync({blockKey:a,data:hn[a]}),await an(Lt,hn),L(null),S?.();return}const xe=$a(J,i,u);if(!xe){pe.error("Could not read this variant's matcher rule.");return}if(xe.blockKey){await Pe.mutateAsync({blockKey:xe.blockKey,data:It(xe.resolveType,xe.data,fe)}),L(null),S?.();return}const Ae=xn(fe),be=bn(Ae,i);if(be){pe.error(be);return}const ye=It(xe.resolveType,xe.data,fe);let He=null;try{await Pe.mutateAsync({blockKey:Ae,data:ye}),He=Ae,$[t]={...ge,rule:Ka(Ae)},await Pe.mutateAsync({blockKey:a,data:{...p,sections:{...y,variants:$}}}),He=null}catch(Lt){throw He&&await Jt.mutateAsync({blockKey:He}).catch(()=>{}),Lt}L(null),pe.success(`Saved matcher as global block "${fe}"`),S?.()}catch(xe){pe.error(xe instanceof Error?xe.message:"Failed to rename variant")}finally{Qt(!1)}},pn=()=>{ct()},Us=t=>{ke(t),At({inner:t})},Ws=t=>{Ce(t),At({raw:t})},qs=()=>{ke(null),we([])},Ys=()=>Oe(t=>t+1),Js=t=>{if(F){if(t===0){kt.flush(),E(!1),ke(null),Ce(void 0),we([]),Oe(a=>a+1),D?.();return}if(t===1){we([]),Oe(a=>a+1);return}we(Ke.slice(0,t-1)),Oe(a=>a+1);return}if(ve){V(ie.slice(0,t)),K(a=>a+1);return}if(t===0){pn();return}if(t===1){V([]),K(a=>a+1);return}if(et&&t===2){V([]),K(a=>a+1);return}const s=et?2:1;V(ie.slice(0,t-s))};return n.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[n.jsx("div",{className:"shrink-0",children:Qe||ut||F?n.jsxs("div",{className:Re("border-b px-3 py-2.5",Qe&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!ve&&ht&&Ge&&n.jsxs("button",{type:"button",onClick:pn,title:`Editing in variant: ${Ge.label}`,className:Re("shrink-0 inline-flex items-center gap-1 rounded-md h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",Ur),children:[n.jsx(Yt,{rule:jt(Ge.rule,o??{},u??void 0),matchers:vt}),n.jsx("span",{className:"max-w-[160px] truncate",children:Ge.label})]}),n.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:mn.map((t,s)=>{const a=s===mn.length-1;return n.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[s>0&&n.jsx(Vn,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>Js(s),title:t,className:Re("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",a?Qe?"font-semibold text-global-section-fg dark:text-global-section-fg-dark":"font-medium text-foreground":Qe?"text-foreground/80":"text-muted-foreground",Qe?"hover:bg-global-section/15":"hover:bg-accent hover:text-accent-foreground"),children:t})]},`${t}-${s}`)})}),Qe&&n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx("span",{className:"shrink-0 cursor-help",children:n.jsx(Qa,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),n.jsx(rt,{side:"bottom",className:"max-w-[260px]",children:"A global section is a reusable block shared across your site. Editing it here updates it everywhere it's used."})]}),un&&!et&&!Je?.isHidden&&b&&n.jsx(Cn,{onClick:()=>Mt()})]}),Qe&&n.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:"This is a global section. Changes apply everywhere this section is used across your site."})]}):n.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(qr,{pageKey:b,initialName:Fe.name,initialPath:Fe.path,onFieldChange:vs})}),n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":"Edit SEO",className:"size-7 shrink-0",onClick:()=>E(!0),children:n.jsx(Ya,{size:14})})}),n.jsx(rt,{side:"bottom",children:"Edit SEO"})]}),n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":"View JSON",className:"size-7 shrink-0",onClick:()=>N&&b?N(b):me(!0),children:n.jsx(Ja,{size:14})})}),n.jsx(rt,{side:"bottom",children:"View JSON"})]}),n.jsx(Cn,{onClick:fn})]})}),ht&&!ut&&!F&&b&&n.jsx(Ir,{listKey:b,variants:Ve,activeIndex:je,decofile:o??{},meta:u,matchers:vt,onSelect:Bs,onReorder:Fs,onRename:L,onDuplicate:Is,onDelete:zs,onAdd:fn}),F?n.jsx(yt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:n.jsx("div",{className:"mx-auto max-w-2xl",children:pt&&b?n.jsx(gr,{rawSeo:Tt,innerSeo:Zt,defaultResolveType:ds,seoSchema:ms,activeResolveType:Pt,seoTypeOptions:us,formResetKey:Ee,siteDefaultSeo:fs,onBreadcrumbChange:we,onPersistRaw:Ws,onInnerChange:Us,onClearForm:qs,onBumpFormKey:Ys}):n.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"SEO schema not found for this site."})})})}):ut?n.jsxs(yt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[et&&St.length>0&&n.jsxs(n.Fragment,{children:[n.jsx(va,{listKey:`${b??""}:${l??""}`,variants:St.map((t,s)=>({index:s,label:t.label})),selectedIndex:Et,onSelect:ws,onDuplicate:Rs,onDelete:Ns,onRemoveAll:Ds,onReorder:Cs,onAdd:()=>Mt()}),et&&n.jsxs("div",{className:"px-3 py-3 border-b space-y-2",children:[n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variant rule"}),n.jsx(vn,{currentRt:_??"",currentLabel:nt($t?.rule),matchers:vt,onSelect:Es}),dn&&$e&&n.jsx("div",{className:"pt-1",children:n.jsx(Nn,{schema:dn,value:$e,onChange:$s,meta:u??void 0,decofile:o,onSaveReferencedBlock:ft,sandbox:gt},`${l??"none"}:${Et}:${_??""}`)})]})]}),n.jsx(Rn,{activeSchema:Vt,formValue:ae,formResetKey:he,onFormChange:tn,onBreadcrumbChange:V,breadcrumbPath:ie,emptyMessage:"No editable fields for this variant.",meta:u,decofile:o,onSaveReferencedBlock:ft,sandbox:gt})]}):ve?n.jsx(yt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx(Rn,{activeSchema:Vt,formValue:ae,formResetKey:he,onFormChange:tn,onBreadcrumbChange:V,breadcrumbPath:ie,emptyMessage:"No editable fields for this global block.",meta:u,decofile:o,onSaveReferencedBlock:ft,sandbox:gt})}):n.jsxs(yt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[ht&&te!==null&&n.jsxs("div",{className:Re("px-3 border-b",B?"pt-3 pb-5 space-y-3":"py-2"),children:[n.jsxs("button",{type:"button",onClick:()=>Z(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-sm py-0.5 hover:bg-muted/40","aria-expanded":B,children:[n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variant rule"}),B?n.jsx(Wa,{className:"size-3.5 shrink-0 text-muted-foreground"}):n.jsx(Ha,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),B&&n.jsxs("div",{className:Re("space-y-3",wt&&"pointer-events-none opacity-50"),children:[n.jsx(vn,{currentRt:te,currentLabel:Sn(Ge?.rule,o??{},nt,u??void 0),matchers:vt,onSelect:As}),sn&&Se&&n.jsx("div",{className:"space-y-3",children:n.jsx(Nn,{schema:sn,value:Se,onChange:Ms,meta:u??void 0,decofile:o,onSaveReferencedBlock:ft,sandbox:gt},`${je}:${te??""}`)})]})]}),n.jsx("div",{className:"p-2 pt-3",children:n.jsx(Ar,{listKey:`${b??""}-${je}`,rawSections:U,sections:Ne,meta:u,selectedIndex:l,onSelect:gs,onReorder:Ss,onDelete:xs,onDuplicate:bs,onMakeReusable:X,onToggleHidden:ys,onToggleLazy:js,onAddVariant:Mt,onDetach:_s,onAddSection:()=>ee(!0),canAddSection:Ps})})]}),n.jsx(Sa,{open:ce!==null,onOpenChange:t=>{t||X(null)},defaultBlockId:ce!==null?xn(Ne[ce]?.label??""):"",isPending:Pe.isPending,onSubmit:Ts}),d&&n.jsx(br,{open:G,onOpenChange:ee,meta:u,decofile:o,previewBaseUrl:d,onSelect:ks}),ne&&b&&o&&n.jsx(xa,{open:ne,onOpenChange:me,pageKey:b,decofile:o}),Y!==null&&n.jsx(Er,{open:!0,initialName:Ft(Ve[Y]?.rule,o??{},u??void 0)?Sn(Ve[Y]?.rule,o??{},nt,u??void 0):"",autoLabel:nt(jt(Ve[Y]?.rule,o??{},u??void 0)),isPending:wt,onSubmit:async t=>{await Hs(Y,t)},onOpenChange:t=>{!t&&!wt&&L(null)}})]})}export{Cl as SectionsEditor};
@@ -0,0 +1 @@
1
+ import{r as i,ai as rt,a2 as Pe,j as d,a3 as lt,aj as be,Z as L,T as at,U as j,V as N,bP as G,a1 as ct,aP as _e,W as Ee,ah as it,bK as dt,bR as ut,dy as pt,dz as ft,dA as mt,dB as ht,_ as gt,X as vt,dC as xt,$ as St,a0 as wt,c as U,l as Q}from"./index-C1yj8oW9.js";import{V as yt}from"./index-uuDmStBi.js";import{i as Ct,n as It}from"./ChevronUp-CzO_7LvF.js";import{t as Re}from"./ChevronDown-BjzwFuai.js";function Ne(s,[e,t]){return Math.min(t,Math.max(e,s))}var bt=[" ","Enter","ArrowUp","ArrowDown"],Tt=[" ","Enter"],ee="Select",[de,ue,Pt]=it(ee),[ne]=vt(ee,[Pt,Ee]),pe=Ee(),[Nt,Y]=ne(ee),[_t,Et]=ne(ee),je=s=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:a,value:r,defaultValue:l,onValueChange:c,dir:u,name:h,autoComplete:v,disabled:b,required:w,form:S}=s,p=pe(e),[g,y]=i.useState(null),[m,x]=i.useState(null),[F,M]=i.useState(!1),se=rt(u),[_,O]=Pe({prop:o,defaultProp:n??!1,onChange:a,caller:ee}),[W,X]=Pe({prop:r,defaultProp:l,onChange:c,caller:ee}),k=i.useRef(null),B=g?S||!!g.closest("form"):!0,[$,V]=i.useState(new Set),H=Array.from($).map(E=>E.props.value).join(";");return d.jsx(lt,{...p,children:d.jsxs(Nt,{required:w,scope:e,trigger:g,onTriggerChange:y,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:W,onValueChange:X,open:_,onOpenChange:O,dir:se,triggerPointerDownPosRef:k,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(_t,{scope:s.__scopeSelect,onNativeOptionAdd:i.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:i.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(tt,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:v,value:W,onChange:E=>X(E.target.value),disabled:b,form:S,children:[W===void 0?d.jsx("option",{value:""}):null,Array.from($)]},H):null]})})};je.displayName=ee;var Me="SelectTrigger",Ae=i.forwardRef((s,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=s,a=pe(t),r=Y(Me,t),l=r.disabled||o,c=L(e,r.onTriggerChange),u=ue(t),h=i.useRef("touch"),[v,b,w]=nt(p=>{const g=u().filter(x=>!x.disabled),y=g.find(x=>x.value===r.value),m=st(g,p,y);m!==void 0&&r.onValueChange(m.value)}),S=p=>{l||(r.onOpenChange(!0),w()),p&&(r.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(at,{asChild:!0,...a,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":r.contentId,"aria-expanded":r.open,"aria-required":r.required,"aria-autocomplete":"none",dir:r.dir,"data-state":r.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":ot(r.value)?"":void 0,...n,ref:c,onClick:N(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(n.onPointerDown,p=>{h.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(n.onKeyDown,p=>{const g=v.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(g&&p.key===" ")&&bt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=i.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,children:a,placeholder:r="",...l}=s,c=Y(Oe,t),{onValueNodeHasChildrenChange:u}=c,h=a!==void 0,v=L(e,c.onValueNodeChange);return G(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:v,style:{pointerEvents:"none"},children:ot(c.value)?d.jsx(d.Fragment,{children:r}):a})});De.displayName=Oe;var Rt="SelectIcon",Le=i.forwardRef((s,e)=>{const{__scopeSelect:t,children:o,...n}=s;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});Le.displayName=Rt;var jt="SelectPortal",ke=s=>d.jsx(ct,{asChild:!0,...s});ke.displayName=jt;var te="SelectContent",Be=i.forwardRef((s,e)=>{const t=Y(te,s.__scopeSelect),[o,n]=i.useState();if(G(()=>{n(new DocumentFragment)},[]),!t.open){const a=o;return a?_e.createPortal(d.jsx(Ve,{scope:s.__scopeSelect,children:d.jsx(de.Slot,{scope:s.__scopeSelect,children:d.jsx("div",{children:s.children})})}),a):null}return d.jsx(He,{...s,ref:e})});Be.displayName=te;var A=10,[Ve,q]=ne(te),Mt="SelectContentImpl",At=xt("SelectContent.RemoveScroll"),He=i.forwardRef((s,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:r,side:l,sideOffset:c,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g,...y}=s,m=Y(te,t),[x,F]=i.useState(null),[M,se]=i.useState(null),_=L(e,f=>F(f)),[O,W]=i.useState(null),[X,k]=i.useState(null),B=ue(t),[$,V]=i.useState(!1),H=i.useRef(!1);i.useEffect(()=>{if(x)return pt(x)},[x]),ft();const E=i.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[C]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===C&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=i.useCallback(()=>E([O,x]),[E,O,x]);i.useEffect(()=>{$&&D()},[$,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;i.useEffect(()=>{if(x){let f={x:0,y:0};const T=C=>{f={x:Math.abs(Math.round(C.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(C.pageY)-(K.current?.y??0))}},R=C=>{f.x<=10&&f.y<=10?C.preventDefault():x.contains(C.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),i.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=nt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),C=st(T,f,R);C&&setTimeout(()=>C.ref.current.focus())}),me=i.useCallback((f,T,R)=>{const C=!H.current&&!R;(m.value!==void 0&&m.value===T||C)&&(W(f),C&&(H.current=!0))},[m.value]),he=i.useCallback(()=>x?.focus(),[x]),oe=i.useCallback((f,T,R)=>{const C=!H.current&&!R;(m.value!==void 0&&m.value===T||C)&&k(f)},[m.value]),ce=o==="popper"?Se:ze,re=ce===Se?{side:l,sideOffset:c,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:se,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:oe,focusSelectedItem:D,selectedItemText:X,position:o,isPositioned:$,searchRef:fe,children:d.jsx(mt,{as:At,allowPinchZoom:!0,children:d.jsx(ht,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(gt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ce,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...y,...re,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:N(y.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let C=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(C=C.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=C.indexOf(I);C=C.slice(P+1)}setTimeout(()=>E(C)),f.preventDefault()}})})})})})})});He.displayName=Mt;var Ot="SelectItemAlignedPosition",ze=i.forwardRef((s,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=s,a=Y(te,t),r=q(te,t),[l,c]=i.useState(null),[u,h]=i.useState(null),v=L(e,_=>h(_)),b=ue(t),w=i.useRef(!1),S=i.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:y,focusSelectedItem:m}=r,x=i.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&p&&g&&y){const _=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),W=a.valueNode.getBoundingClientRect(),X=y.getBoundingClientRect();if(a.dir!=="rtl"){const I=X.left-O.left,P=W.left-I,Z=_.left-P,J=_.width+Z,ge=Math.max(J,O.width),ve=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=J+"px",l.style.left=xe+"px"}else{const I=O.right-X.right,P=window.innerWidth-W.right-I,Z=window.innerWidth-_.right-P,J=_.width+Z,ge=Math.max(J,O.width),ve=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=J+"px",l.style.right=xe+"px"}const k=b(),B=window.innerHeight-A*2,$=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+$+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),oe=_.top+_.height/2-A,ce=B-oe,re=g.offsetHeight/2,f=g.offsetTop+re,T=H+E+f,R=K-T;if(T<=oe){const I=k.length>0&&g===k[k.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,Z=Math.max(ce,re+(I?he:0)+P+D),J=T+Z;l.style.height=J+"px"}else{const I=k.length>0&&g===k[0].ref.current;l.style.top="0px";const Z=Math.max(oe,H+p.offsetTop+(I?me:0)+re)+R;l.style.height=Z+"px",p.scrollTop=T-oe+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,a.trigger,a.valueNode,l,u,p,g,y,a.dir,o]);G(()=>x(),[x]);const[F,M]=i.useState();G(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const se=i.useCallback(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Lt,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:se,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...n,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Ot;var Dt="SelectPopperPosition",Se=i.forwardRef((s,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...a}=s,r=pe(t);return d.jsx(St,{...r,...a,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=Dt;var[Lt,Te]=ne(te,{}),we="SelectViewport",Ue=i.forwardRef((s,e)=>{const{__scopeSelect:t,nonce:o,...n}=s,a=q(we,t),r=Te(we,t),l=L(e,a.onViewportChange),c=i.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:b}=r;if(b?.current&&v){const w=Math.abs(c.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(v.style.minHeight),g=parseFloat(v.style.height),y=Math.max(p,g);if(y<S){const m=y+w,x=Math.min(S,m),F=m-x;v.style.height=x+"px",v.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,v.style.justifyContent="flex-end")}}}c.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[kt,Bt]=ne(Fe),We=i.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=be();return d.jsx(kt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});We.displayName=Fe;var $e="SelectLabel",Ke=i.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=Bt($e,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Ke.displayName=$e;var ie="SelectItem",[Vt,Ge]=ne(ie),Ye=i.forwardRef((s,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:a,...r}=s,l=Y(ie,t),c=q(ie,t),u=l.value===o,[h,v]=i.useState(a??""),[b,w]=i.useState(!1),S=L(e,m=>c.itemRefCallback?.(m,o,n)),p=be(),g=i.useRef("touch"),y=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:i.useCallback(m=>{v(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...r,ref:S,onFocus:N(r.onFocus,()=>w(!0)),onBlur:N(r.onBlur,()=>w(!1)),onClick:N(r.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:N(r.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:N(r.onPointerDown,m=>{g.current=m.pointerType}),onPointerMove:N(r.onPointerMove,m=>{g.current=m.pointerType,n?c.onItemLeave?.():g.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(r.onPointerLeave,m=>{m.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:N(r.onKeyDown,m=>{c.searchRef?.current!==""&&m.key===" "||(Tt.includes(m.key)&&y(),m.key===" "&&m.preventDefault())})})})})});Ye.displayName=ie;var le="SelectItemText",qe=i.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,...a}=s,r=Y(le,t),l=q(le,t),c=Ge(le,t),u=Et(le,t),[h,v]=i.useState(null),b=L(e,y=>v(y),c.onItemTextChange,y=>l.itemTextRefCallback?.(y,c.value,c.disabled)),w=h?.textContent,S=i.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:w},c.value),[c.disabled,c.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return G(()=>(p(S),()=>g(S)),[p,g,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:c.textId,...a,ref:b}),c.isSelected&&r.valueNode&&!r.valueNodeHasChildren?_e.createPortal(a.children,r.valueNode):null]})});qe.displayName=le;var Xe="SelectItemIndicator",Ze=i.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return Ge(Xe,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});Ze.displayName=Xe;var ye="SelectScrollUpButton",Je=i.forwardRef((s,e)=>{const t=q(ye,s.__scopeSelect),o=Te(ye,s.__scopeSelect),[n,a]=i.useState(!1),r=L(e,o.onScrollButtonChange);return G(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=c.scrollTop>0;a(u)};const c=t.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(et,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=t;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Je.displayName=ye;var Ce="SelectScrollDownButton",Qe=i.forwardRef((s,e)=>{const t=q(Ce,s.__scopeSelect),o=Te(Ce,s.__scopeSelect),[n,a]=i.useState(!1),r=L(e,o.onScrollButtonChange);return G(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,h=Math.ceil(c.scrollTop)<u;a(h)};const c=t.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(et,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=t;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});Qe.displayName=Ce;var et=i.forwardRef((s,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=s,a=q("SelectScrollButton",t),r=i.useRef(null),l=ue(t),c=i.useCallback(()=>{r.current!==null&&(window.clearInterval(r.current),r.current=null)},[]);return i.useEffect(()=>()=>c(),[c]),G(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{r.current===null&&(r.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{a.onItemLeave?.(),r.current===null&&(r.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{c()})})}),Ht="SelectSeparator",zt=i.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ut=i.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=pe(t),a=Y(Ie,t),r=q(Ie,t);return a.open&&r.position==="popper"?d.jsx(wt,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Ft="SelectBubbleInput",tt=i.forwardRef(({__scopeSelect:s,value:e,...t},o)=>{const n=i.useRef(null),a=L(o,n),r=dt(e);return i.useEffect(()=>{const l=n.current;if(!l)return;const c=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(r!==e&&h){const v=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(v)}},[r,e]),d.jsx(j.select,{...t,style:{...yt,...t.style},ref:a,defaultValue:e})});tt.displayName=Ft;function ot(s){return s===""||s===void 0}function nt(s){const e=ut(s),t=i.useRef(""),o=i.useRef(0),n=i.useCallback(r=>{const l=t.current+r;e(l),(function c(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>c(""),1e3))})(l)},[e]),a=i.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,a]}function st(s,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,a=t?s.indexOf(t):-1;let r=Wt(s,Math.max(a,0));n.length===1&&(r=r.filter(u=>u!==t));const c=r.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return c!==t?c:void 0}function Wt(s,e){return s.map((t,o)=>s[(e+o)%s.length])}var $t=je,Kt=Ae,Gt=De,Yt=Le,qt=ke,Xt=Be,Zt=Ue,Jt=We,Qt=Ke,eo=Ye,to=qe,oo=Ze,no=Je,so=Qe;function po(s){const e=U.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx($t,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(s){const e=U.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Jt,{"data-slot":"select-group",...t}),e[2]=t,e[3]=o):o=e[3],o}function mo(s){const e=U.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function ho(s){const e=U.c(13);let t,o,n,a;e[0]!==s?({className:o,size:a,children:t,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a):(t=e[1],o=e[2],n=e[3],a=e[4]);const r=a===void 0?"default":a;let l;e[5]!==o?(l=Q("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=c):c=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==r||e[11]!==l?(u=d.jsxs(Kt,{"data-slot":"select-trigger","data-size":r,className:l,...n,children:[t,c]}),e[8]=t,e[9]=n,e[10]=r,e[11]=l,e[12]=u):u=e[12],u}function go(s){const e=U.c(25);let t,o,n,a,r;e[0]!==s?({className:o,children:t,position:a,hideScrollButtons:r,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a,e[5]=r):(t=e[1],o=e[2],n=e[3],a=e[4],r=e[5]);const l=a===void 0?"popper":a,c=r===void 0?!1:r,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let v;e[9]!==c?(v=!c&&d.jsx(ro,{}),e[9]=c,e[10]=v):v=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=Q("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==c?(p=!c&&d.jsx(lo,{}),e[16]=c,e[17]=p):p=e[17];let g;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==v||e[22]!==S||e[23]!==p?(g=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...n,children:[v,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=v,e[22]=S,e[23]=p,e[24]=g):g=e[24],g}function vo(s){const e=U.c(8);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=Q("text-muted-foreground px-2 py-1.5 text-xs",t),e[3]=t,e[4]=n):n=e[4];let a;return e[5]!==o||e[6]!==n?(a=d.jsx(Qt,{"data-slot":"select-label",className:n,...o}),e[5]=o,e[6]=n,e[7]=a):a=e[7],a}function xo(s){const e=U.c(16);let t,o,n,a;e[0]!==s?({className:o,children:t,hideCheck:a,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a):(t=e[1],o=e[2],n=e[3],a=e[4]);const r=a===void 0?!1:a;let l;e[5]!==o?(l=Q("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let c;e[7]!==r?(c=!r&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(oo,{children:d.jsx(Ct,{className:"size-4"})})}),e[7]=r,e[8]=c):c=e[8];let u;e[9]!==t?(u=d.jsx(to,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==c||e[14]!==u?(h=d.jsxs(eo,{"data-slot":"select-item",className:l,...n,children:[c,u]}),e[11]=n,e[12]=l,e[13]=c,e[14]=u,e[15]=h):h=e[15],h}function ro(s){const e=U.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=Q("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(It,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=d.jsx(no,{"data-slot":"select-scroll-up-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}function lo(s){const e=U.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=Q("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Re,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=d.jsx(so,{"data-slot":"select-scroll-down-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}export{fo as S,vo as a,xo as b,ho as c,mo as d,go as e,po as f,Ne as g};
@@ -1 +1 @@
1
- import{c as D,j as o,l as R,r as $,B as H}from"./index-BoDi6OBc.js";import{i as Q,a as W,c as J,d as K}from"./dialog-CHU--T7-.js";import{g as V,b as Y,a as Z,D as ee}from"./drawer-D4XkXj4V.js";import{u as oe}from"./tooltip-qf4kMmAF.js";import{b as A}from"./chat-context-D45ePksk.js";import{D as te,b as le,S as U,M as se}from"./decopilot-CxoZlpZn.js";import{a as G,b as z}from"./connect-desktop-dialog-DuJwJvdQ.js";const ie=[{tier:"fast",description:"Quicker responses"},{tier:"smart",description:"Balanced quality"},{tier:"thinking",description:"Deeper reasoning"}];function X(r){const e=D.c(10),{modelSet:t,selectedModelId:s,onSelect:i}=r;let l,c;if(e[0]!==t.logo||e[1]!==t.models||e[2]!==t.tiers||e[3]!==i||e[4]!==s){const a=Object.fromEntries(t.models.map(ne));l="flex flex-col p-2 w-[320px]",c=ie.map(d=>{const{tier:p,description:m}=d,u=t.tiers[p];if(!u.modelId)return null;const x=a[u.modelId];if(!x)return null;const f=s===u.modelId;return o.jsxs("button",{type:"button",onClick:()=>i(x),className:R("flex items-center gap-3 px-3 py-2.5 rounded-lg text-left hover:bg-accent",f&&"bg-accent/50"),children:[o.jsx("img",{src:t.logo,alt:u.label,className:"size-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),o.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[o.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:u.label}),o.jsx("span",{className:"text-xs text-muted-foreground leading-tight",children:m})]})]},p)}),e[0]=t.logo,e[1]=t.models,e[2]=t.tiers,e[3]=i,e[4]=s,e[5]=l,e[6]=c}else l=e[5],c=e[6];let n;return e[7]!==l||e[8]!==c?(n=o.jsx("div",{className:l,children:c}),e[7]=l,e[8]=c,e[9]=n):n=e[9],n}function ne(r){return[r.modelId,r]}const de=[{providerId:"claude-code",modelId:"claude-code:haiku",title:"Claude Code Haiku",description:"Fast and lightweight",capabilities:["text"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:sonnet",title:"Claude Code Sonnet 5",description:"Balanced performance",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus",title:"Claude Code Opus",description:"Most capable",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus-1m",title:"Claude Code Opus 4.8 1M",description:"Most capable, 1M context window",capabilities:["text","reasoning"],limits:{contextWindow:1e6,maxOutputTokens:null},costs:null}],L="https://assets.decocache.com/decocms/6ac44f1c-c0cf-4480-84b5-2ae6fe742d0b/codex-app.png.png",ce=[{providerId:"codex",modelId:"codex:gpt-5.5",title:"GPT-5.5",description:"Frontier model for complex coding, research, and real-world work",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.4",title:"GPT-5.4",description:"Strong model for everyday coding",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.4-mini",title:"GPT-5.4 Mini",description:"Small, fast, and cost-efficient model for simpler coding tasks",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.3-codex-spark",title:"GPT-5.3 Codex Spark",description:"Ultra-fast coding model",capabilities:["text","reasoning"],logo:L,limits:null,costs:null}],re="https://decoims.com/decocms/93e4059c-e598-412b-87eb-54d72a946ec8/claude-stroke-rounded.svg",ae="https://decoims.com/decocms/9170ffd4-b9cc-4661-ad8f-ae2eea019e00/codex.svg",me={fast:{modelId:"claude-code:haiku",label:"Haiku 4.5",description:"Quicker responses",iconNode:o.jsx(G,{size:16})},smart:{modelId:"claude-code:sonnet",label:"Sonnet 5",description:"Balanced quality",iconNode:o.jsx(G,{size:16})},thinking:{modelId:"claude-code:opus-1m",label:"Opus 4.8 1M",description:"Deeper reasoning",iconNode:o.jsx(G,{size:16})}},pe={fast:{modelId:"codex:gpt-5.4-mini",label:"GPT-5.4 Mini",description:"Quicker responses",iconNode:o.jsx(z,{size:16})},smart:{modelId:"codex:gpt-5.4",label:"GPT-5.4",description:"Balanced quality",iconNode:o.jsx(z,{size:16})},thinking:{modelId:"codex:gpt-5.5",label:"GPT-5.5",description:"Deeper reasoning",iconNode:o.jsx(z,{size:16})}};function q(r){return r==="claude-code"?{logo:re,tiers:me,models:de}:r==="codex"?{logo:ae,tiers:pe,models:ce}:null}function ue(r){const e=D.c(11),{onClose:t,agent:s}=r,i=A(),l=s??i.pendingHarnessId??"decopilot";let c;e[0]!==l?(c=q(l),e[0]=l,e[1]=c):c=e[1];const n=c;if(!n){let m;return e[2]!==t?(m=o.jsx(le,{onClose:t}),e[2]=t,e[3]=m):m=e[3],m}const a=i.selectedModel?.modelId??n.tiers[i.simpleModeTier].modelId;let d;e[4]!==t||e[5]!==i?(d=m=>{i.setModel({...m,keyId:void 0}),t()},e[4]=t,e[5]=i,e[6]=d):d=e[6];let p;return e[7]!==n||e[8]!==a||e[9]!==d?(p=o.jsx(X,{modelSet:n,selectedModelId:a,onSelect:d}),e[7]=n,e[8]=a,e[9]=d,e[10]=p):p=e[10],p}function fe(r){const e=D.c(13);let t,s;e[0]!==r?({agent:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=t?q(t):null,e[3]=t,e[4]=i):i=e[4];const l=i;if(!l){let d;return e[5]!==s?(d=o.jsx(te,{...s}),e[5]=s,e[6]=d):d=e[6],d}const c=s.selectedModel?.modelId??l.tiers.smart.modelId;let n;e[7]!==s?(n=d=>{s.onModelChange(d),s.onClose()},e[7]=s,e[8]=n):n=e[8];let a;return e[9]!==l||e[10]!==c||e[11]!==n?(a=o.jsx(X,{modelSet:l,selectedModelId:c,onSelect:n}),e[9]=l,e[10]=c,e[11]=n,e[12]=a):a=e[12],a}function ve(r){const e=D.c(39),{variant:t,className:s,placeholder:i,model:l,isLoading:c,credentialId:n,onCredentialChange:a,onModelChange:d,filterModels:p,agent:m}=r,u=t===void 0?"borderless":t,x=i===void 0?"Select model":i,[f,k]=$.useState(!1),g=d!==void 0,F=oe(),B=u==="borderless"?"ghost":"outline",P=u==="borderless"&&"md:border-none";let h;e[0]!==s||e[1]!==P?(h=R("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",P,s),e[0]=s,e[1]=P,e[2]=h):h=e[2];let b;e[3]!==c||e[4]!==l||e[5]!==x||e[6]!==g?(b=g?o.jsx(U,{model:l??null,placeholder:x,isLoading:c}):o.jsx(ge,{placeholder:x}),e[3]=c,e[4]=l,e[5]=x,e[6]=g,e[7]=b):b=e[7];let O;e[8]!==B||e[9]!==h||e[10]!==b?(O=o.jsx(H,{variant:B,size:"sm",className:h,children:b}),e[8]=B,e[9]=h,e[10]=b,e[11]=O):O=e[11];const C=O;let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(se,{}),e[12]=w):w=e[12];let y;e[13]!==m||e[14]!==n||e[15]!==p||e[16]!==l||e[17]!==a||e[18]!==d||e[19]!==g?(y=o.jsx($.Suspense,{fallback:w,children:g?o.jsx(fe,{onClose:()=>k(!1),agent:m,credentialId:n??null,onCredentialChange:a??xe,selectedModel:l??null,onModelChange:d,filterModels:p}):o.jsx(ue,{onClose:()=>k(!1),agent:m})}),e[13]=m,e[14]=n,e[15]=p,e[16]=l,e[17]=a,e[18]=d,e[19]=g,e[20]=y):y=e[20];const I=y;if(F){let M;e[21]!==C?(M=o.jsx(V,{asChild:!0,children:C}),e[21]=C,e[22]=M):M=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(Y,{className:"sr-only",children:"Select model"}),e[23]=_):_=e[23];let v;e[24]!==I?(v=o.jsxs(Z,{className:"p-0 flex flex-col max-h-[95vh]",children:[_,o.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:I})]}),e[24]=I,e[25]=v):v=e[25];let T;return e[26]!==f||e[27]!==M||e[28]!==v?(T=o.jsxs(ee,{open:f,onOpenChange:k,children:[M,v]}),e[26]=f,e[27]=M,e[28]=v,e[29]=T):T=e[29],T}let S;e[30]!==C?(S=o.jsx(Q,{asChild:!0,children:C}),e[30]=C,e[31]=S):S=e[31];let N;e[32]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx(W,{className:"sr-only",children:"Select model"}),e[32]=N):N=e[32];let j;e[33]!==I?(j=o.jsxs(J,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[N,I]}),e[33]=I,e[34]=j):j=e[34];let E;return e[35]!==f||e[36]!==S||e[37]!==j?(E=o.jsxs(K,{open:f,onOpenChange:k,children:[S,j]}),e[35]=f,e[36]=S,e[37]=j,e[38]=E):E=e[38],E}function xe(){}function ge(r){const e=D.c(4),{placeholder:t}=r,{selectedModel:s,isModelsLoading:i}=A();let l;return e[0]!==i||e[1]!==s||e[2]!==t?(l=o.jsx(U,{model:s,placeholder:t,isLoading:i}),e[0]=i,e[1]=s,e[2]=t,e[3]=l):l=e[3],l}export{ve as M};
1
+ import{c as D,j as o,l as R,r as $,B as H}from"./index-C1yj8oW9.js";import{i as Q,a as W,c as J,d as K}from"./dialog-D4-cpiIq.js";import{g as V,b as Y,a as Z,D as ee}from"./drawer-EynyRy5s.js";import{u as oe}from"./tooltip-Cvbl_0l0.js";import{b as A}from"./chat-context-D6S41DOV.js";import{D as te,b as le,S as U,M as se}from"./decopilot-Cs0sTBvJ.js";import{a as G,b as z}from"./connect-desktop-dialog-DzyRhy80.js";const ie=[{tier:"fast",description:"Quicker responses"},{tier:"smart",description:"Balanced quality"},{tier:"thinking",description:"Deeper reasoning"}];function X(r){const e=D.c(10),{modelSet:t,selectedModelId:s,onSelect:i}=r;let l,c;if(e[0]!==t.logo||e[1]!==t.models||e[2]!==t.tiers||e[3]!==i||e[4]!==s){const a=Object.fromEntries(t.models.map(ne));l="flex flex-col p-2 w-[320px]",c=ie.map(d=>{const{tier:p,description:m}=d,u=t.tiers[p];if(!u.modelId)return null;const x=a[u.modelId];if(!x)return null;const f=s===u.modelId;return o.jsxs("button",{type:"button",onClick:()=>i(x),className:R("flex items-center gap-3 px-3 py-2.5 rounded-lg text-left hover:bg-accent",f&&"bg-accent/50"),children:[o.jsx("img",{src:t.logo,alt:u.label,className:"size-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),o.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[o.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:u.label}),o.jsx("span",{className:"text-xs text-muted-foreground leading-tight",children:m})]})]},p)}),e[0]=t.logo,e[1]=t.models,e[2]=t.tiers,e[3]=i,e[4]=s,e[5]=l,e[6]=c}else l=e[5],c=e[6];let n;return e[7]!==l||e[8]!==c?(n=o.jsx("div",{className:l,children:c}),e[7]=l,e[8]=c,e[9]=n):n=e[9],n}function ne(r){return[r.modelId,r]}const de=[{providerId:"claude-code",modelId:"claude-code:haiku",title:"Claude Code Haiku",description:"Fast and lightweight",capabilities:["text"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:sonnet",title:"Claude Code Sonnet 5",description:"Balanced performance",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus",title:"Claude Code Opus",description:"Most capable",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus-1m",title:"Claude Code Opus 4.8 1M",description:"Most capable, 1M context window",capabilities:["text","reasoning"],limits:{contextWindow:1e6,maxOutputTokens:null},costs:null}],L="https://assets.decocache.com/decocms/6ac44f1c-c0cf-4480-84b5-2ae6fe742d0b/codex-app.png.png",ce=[{providerId:"codex",modelId:"codex:gpt-5.5",title:"GPT-5.5",description:"Frontier model for complex coding, research, and real-world work",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.4",title:"GPT-5.4",description:"Strong model for everyday coding",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.4-mini",title:"GPT-5.4 Mini",description:"Small, fast, and cost-efficient model for simpler coding tasks",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.3-codex-spark",title:"GPT-5.3 Codex Spark",description:"Ultra-fast coding model",capabilities:["text","reasoning"],logo:L,limits:null,costs:null}],re="https://decoims.com/decocms/93e4059c-e598-412b-87eb-54d72a946ec8/claude-stroke-rounded.svg",ae="https://decoims.com/decocms/9170ffd4-b9cc-4661-ad8f-ae2eea019e00/codex.svg",me={fast:{modelId:"claude-code:haiku",label:"Haiku 4.5",description:"Quicker responses",iconNode:o.jsx(G,{size:16})},smart:{modelId:"claude-code:sonnet",label:"Sonnet 5",description:"Balanced quality",iconNode:o.jsx(G,{size:16})},thinking:{modelId:"claude-code:opus-1m",label:"Opus 4.8 1M",description:"Deeper reasoning",iconNode:o.jsx(G,{size:16})}},pe={fast:{modelId:"codex:gpt-5.4-mini",label:"GPT-5.4 Mini",description:"Quicker responses",iconNode:o.jsx(z,{size:16})},smart:{modelId:"codex:gpt-5.4",label:"GPT-5.4",description:"Balanced quality",iconNode:o.jsx(z,{size:16})},thinking:{modelId:"codex:gpt-5.5",label:"GPT-5.5",description:"Deeper reasoning",iconNode:o.jsx(z,{size:16})}};function q(r){return r==="claude-code"?{logo:re,tiers:me,models:de}:r==="codex"?{logo:ae,tiers:pe,models:ce}:null}function ue(r){const e=D.c(11),{onClose:t,agent:s}=r,i=A(),l=s??i.pendingHarnessId??"decopilot";let c;e[0]!==l?(c=q(l),e[0]=l,e[1]=c):c=e[1];const n=c;if(!n){let m;return e[2]!==t?(m=o.jsx(le,{onClose:t}),e[2]=t,e[3]=m):m=e[3],m}const a=i.selectedModel?.modelId??n.tiers[i.simpleModeTier].modelId;let d;e[4]!==t||e[5]!==i?(d=m=>{i.setModel({...m,keyId:void 0}),t()},e[4]=t,e[5]=i,e[6]=d):d=e[6];let p;return e[7]!==n||e[8]!==a||e[9]!==d?(p=o.jsx(X,{modelSet:n,selectedModelId:a,onSelect:d}),e[7]=n,e[8]=a,e[9]=d,e[10]=p):p=e[10],p}function fe(r){const e=D.c(13);let t,s;e[0]!==r?({agent:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=t?q(t):null,e[3]=t,e[4]=i):i=e[4];const l=i;if(!l){let d;return e[5]!==s?(d=o.jsx(te,{...s}),e[5]=s,e[6]=d):d=e[6],d}const c=s.selectedModel?.modelId??l.tiers.smart.modelId;let n;e[7]!==s?(n=d=>{s.onModelChange(d),s.onClose()},e[7]=s,e[8]=n):n=e[8];let a;return e[9]!==l||e[10]!==c||e[11]!==n?(a=o.jsx(X,{modelSet:l,selectedModelId:c,onSelect:n}),e[9]=l,e[10]=c,e[11]=n,e[12]=a):a=e[12],a}function ve(r){const e=D.c(39),{variant:t,className:s,placeholder:i,model:l,isLoading:c,credentialId:n,onCredentialChange:a,onModelChange:d,filterModels:p,agent:m}=r,u=t===void 0?"borderless":t,x=i===void 0?"Select model":i,[f,k]=$.useState(!1),g=d!==void 0,F=oe(),B=u==="borderless"?"ghost":"outline",P=u==="borderless"&&"md:border-none";let h;e[0]!==s||e[1]!==P?(h=R("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",P,s),e[0]=s,e[1]=P,e[2]=h):h=e[2];let b;e[3]!==c||e[4]!==l||e[5]!==x||e[6]!==g?(b=g?o.jsx(U,{model:l??null,placeholder:x,isLoading:c}):o.jsx(ge,{placeholder:x}),e[3]=c,e[4]=l,e[5]=x,e[6]=g,e[7]=b):b=e[7];let O;e[8]!==B||e[9]!==h||e[10]!==b?(O=o.jsx(H,{variant:B,size:"sm",className:h,children:b}),e[8]=B,e[9]=h,e[10]=b,e[11]=O):O=e[11];const C=O;let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(se,{}),e[12]=w):w=e[12];let y;e[13]!==m||e[14]!==n||e[15]!==p||e[16]!==l||e[17]!==a||e[18]!==d||e[19]!==g?(y=o.jsx($.Suspense,{fallback:w,children:g?o.jsx(fe,{onClose:()=>k(!1),agent:m,credentialId:n??null,onCredentialChange:a??xe,selectedModel:l??null,onModelChange:d,filterModels:p}):o.jsx(ue,{onClose:()=>k(!1),agent:m})}),e[13]=m,e[14]=n,e[15]=p,e[16]=l,e[17]=a,e[18]=d,e[19]=g,e[20]=y):y=e[20];const I=y;if(F){let M;e[21]!==C?(M=o.jsx(V,{asChild:!0,children:C}),e[21]=C,e[22]=M):M=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(Y,{className:"sr-only",children:"Select model"}),e[23]=_):_=e[23];let v;e[24]!==I?(v=o.jsxs(Z,{className:"p-0 flex flex-col max-h-[95vh]",children:[_,o.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:I})]}),e[24]=I,e[25]=v):v=e[25];let T;return e[26]!==f||e[27]!==M||e[28]!==v?(T=o.jsxs(ee,{open:f,onOpenChange:k,children:[M,v]}),e[26]=f,e[27]=M,e[28]=v,e[29]=T):T=e[29],T}let S;e[30]!==C?(S=o.jsx(Q,{asChild:!0,children:C}),e[30]=C,e[31]=S):S=e[31];let N;e[32]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx(W,{className:"sr-only",children:"Select model"}),e[32]=N):N=e[32];let j;e[33]!==I?(j=o.jsxs(J,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[N,I]}),e[33]=I,e[34]=j):j=e[34];let E;return e[35]!==f||e[36]!==S||e[37]!==j?(E=o.jsxs(K,{open:f,onOpenChange:k,children:[S,j]}),e[35]=f,e[36]=S,e[37]=j,e[38]=E):E=e[38],E}function xe(){}function ge(r){const e=D.c(4),{placeholder:t}=r,{selectedModel:s,isModelsLoading:i}=A();let l;return e[0]!==i||e[1]!==s||e[2]!==t?(l=o.jsx(U,{model:s,placeholder:t,isLoading:i}),e[0]=i,e[1]=s,e[2]=t,e[3]=l):l=e[3],l}export{ve as M};
@@ -0,0 +1 @@
1
+ import{c as T,j as t,r as Q,B as je,i as Se}from"./index-C1yj8oW9.js";import{i as be}from"./ChevronRight-BRGGbOax.js";import{L as fe}from"./agent-icon-BB0OI_Zf.js";import{S as ue}from"./scroll-area-Btbw5x0S.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Te,f as Fe,P as Re,S as Ee}from"./page-seo-form-B9gdIgu6.js";import{s as xe,p as ze}from"./index-7--My7Kk.js";import{a as ge}from"./Tool01-CZPk8Ney.js";import"./AlertCircle-CmMED3h6.js";import"./SwitchHorizontal01-B_NmbobE.js";import"./Settings02-B1ZVVT_e.js";import"./XCircle-BFWoSw7W.js";import"./ArrowUpRight-DwILncVx.js";import"./ZapSquare-CmQdJEdR.js";import"./Users03-B_G71vm-.js";import"./CheckCircle-DpKZZDmN.js";import"./ChevronUp-CzO_7LvF.js";import"./ChevronDown-BjzwFuai.js";import"./ChevronLeft-uRkOj5F8.js";import"./DotsVertical-DshGnU_X.js";import"./Stars02-BwRZ8reG.js";import"./Eye-BBVg-SSa.js";import"./ZoomOut-BR28jpI9.js";import"./Globe01-Cm82tRCS.js";import"./FilterLines-CowTK4HW.js";import"./Star01-DBcQByZk.js";import"./Globe04-DrE78eQQ.js";import"./HardDrive-DsahIXX5.js";import"./Key01-CwoTMTFC.js";import"./LayoutLeft-_ZNcVcNz.js";import"./LinkExternal01-BeE3-oct.js";import"./Monitor01-Aa4wN2Ct.js";import"./Sun-BMePDS8S.js";import"./Palette-DT-obB9z.js";import"./Play-D7fUrl6h.js";import"./Plus-CK2CAzo5.js";import"./SearchMd-B3Rw93l5.js";import"./Shield01-BR2mZOZb.js";import"./Stars01-aJC5veoy.js";import"./Trash01-SWS-_O9Z.js";import"./Upload01-CoqelT_E.js";import"./User01-Do5enW22.js";import"./Users01-BmWtNHuf.js";import"./XClose-BO6FjXoT.js";import"./X-CO9z9Xp0.js";import"./Zap-Bs_ao0zW.js";import"./use-clock-tick-Bo_9gN4h.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-V2SquoUh.js";import"./tooltip-Cvbl_0l0.js";import"./index-uuDmStBi.js";import"./file-type-icon-vWAzpBPp.js";import"./dialog-D4-cpiIq.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-DkLih0NK.js";import"./use-mcp-client-90IJIS7G.js";import"./auth-DscXYOeb.js";import"./chat-context-D6S41DOV.js";import"./hooks-iTnRVGBT.js";import"./decopilot-sse-pool-DCimHDb8.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-yUKVcLc_.js";import"./use-collections-C5z5SeL0.js";import"./use-ai-providers-BB_netT8.js";import"./studio-tools-cTyVqaHA.js";import"./use-organization-settings-B-FYwlct.js";import"./shell-layout-DPTryinF.js";import"./avatar-B2rvHJ2u.js";import"./required-auth-layout-Be42uHMA.js";import"./use-org-sso-d8VUjdDF.js";import"./sheet-CzR0tmZA.js";import"./integration-icon-CSYS5mut.js";import"./use-navigate-to-agent-D_hba2ju.js";import"./use-connection-DYuQNBQ8.js";import"./use-mcp-prompts-D2ucpusX.js";import"./form-C0rXEiGF.js";import"./label-B1XS6835.js";import"./input-CjEjpxdM.js";import"./select-Bdte2-mH.js";import"./switch-DoFOdYGu.js";import"./index-ChS8eVb4.js";import"./drawer-EynyRy5s.js";import"./collection-search-Did_rDKr.js";import"./tabs-CQOpbrKh.js";import"./toggle-group-DENfWHtP.js";import"./sortable.esm-BrVUE0Ot.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-D0jDIFWU.js";import"./use-registry-connections-COP2SiNd.js";import"./useInfiniteQuery-BxIrRxsB.js";import"./use-infinite-scroll-BaJGyvxX.js";import"./extract-connection-data-BrfuWfn9.js";import"./card-kDiEfTw9.js";import"./collection-tabs-BWGqEvBL.js";import"./badge-Bu3HgcYX.js";import"./textarea-Cya3KDiz.js";import"./connection-form-helpers-DoxJStk3.js";import"./authenticate-and-persist-oauth-KVWekoHI.js";import"./mcp-oauth-RIVS58UD.js";import"./useSuspenseInfiniteQuery-DENvoLd9.js";import"./connect-desktop-dialog-DzyRhy80.js";import"./decopilot-Cs0sTBvJ.js";import"./checkbox-CsCGEg8f.js";import"./skeleton-BhIDQEW6.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BIuqqQso.js";import"./popover-C7DR14Uv.js";import"./command-HyE3vuW8.js";import"./index-C6QKjDvm.js";import"./dropdown-menu-DgXWnPV7.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CO3Rxsnj.js";import"./empty-state-BqLGg5Qt.js";import"./toolbar-CO9czXOO.js";import"./preview-dialog-D0Xo8R0Y.js";import"./index-D5MvY5fk.js";import"./use-mcp-tools-IJf4yY8f.js";import"./use-capability-DtJSLljk.js";import"./shell-route-loading-D5ohEyID.js";import"./index-BafofCVM.js";import"./alert-dialog-CU4F0Cas.js";import"./use-debounced-autosave-B5XSTYsz.js";import"./index-Bt_ZjPsW.js";import"./sidebar-BLFhVRa1.js";import"./search-input-BJySI9eP.js";import"./github-repo-picker-BMm6sNS0.js";import"./use-secrets-CgpawoY3.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-D1TNBVMm.js";import"./automation-runs-CxkH2J7y.js";import"./table-zRS7Teha.js";import"./use-members-DSWXPVdi.js";import"./use-org-auth-client-Bmz_glRx.js";import"./task-status-DjLIycFQ.js";import"./use-automations-C4-BEJDp.js";import"./use-file-configs-CSX8A1vE.js";import"./monaco-editor-BhcbAKhi.js";import"./select-model-Da9fCD4_.js";import"./automation-list-row-DdnU0_oJ.js";function U(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=U(n.title),i=U(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(n.description),image:U(n.image),favicon:U(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==u||e[24]!==y||e[25]!==g?(S=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=S):S=e[26],S}function De(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const S=i.description??ee;let _;e[17]!==y||e[18]!==S?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:S}),e[17]=y,e[18]=S,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let b;e[24]!==i.image?(b=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=b):b=e[25];let k;e[26]!==N||e[27]!==b||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,b]}),e[26]=N,e[27]=b,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function _i(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,S]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),S(Me));const{persistSeo:b,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!K||Ce(B))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==b||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),b(de)},e[8]=b,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==S?(H=()=>S(Ke),e[14]=S,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(be,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==b||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==R?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),b(E)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Ee,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=b,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=R,e[59]=A):A=e[59];let J;return e[60]!==I||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=J):J=e[62],J}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{_i as SeoEditor};
@@ -0,0 +1 @@
1
+ import{c as S,e as R,j as s,w as J,l as k,af as Q,y as L,s as B,M as I,a as G,i as D,r as F,O as K}from"./index-C1yj8oW9.js";import{u as E,S as U,M as V}from"./shell-controls-B_8RFrNm.js";import{j as X,k as Y,l as Z,b as q,c as w,d as M,S as P,a as O,f as ee,g as se}from"./sidebar-BLFhVRa1.js";import{a as te}from"./index-Bt_ZjPsW.js";import{n as le,b as re,a as ie,c as oe,d as ne,i as T}from"./ZapSquare-CmQdJEdR.js";import{t as ae,a as A}from"./Users03-B_G71vm-.js";import{i as ce}from"./HardDrive-DsahIXX5.js";import{i as me}from"./Key01-CwoTMTFC.js";import{i as fe}from"./Shield01-BR2mZOZb.js";import{s as de}from"./User01-Do5enW22.js";import{i as xe}from"./Zap-Bs_ao0zW.js";import{a as be}from"./use-capability-DtJSLljk.js";import{a as ue}from"./use-join-requests-dGis0QYB.js";import{u as W}from"./tooltip-Cvbl_0l0.js";import{u as he}from"./use-status-sounds-CO3Rxsnj.js";import{a as y}from"./toolbar-CO9czXOO.js";import"./sheet-CzR0tmZA.js";import"./X-CO9z9Xp0.js";import"./LayoutLeft-_ZNcVcNz.js";import"./studio-tools-cTyVqaHA.js";import"./index-uuDmStBi.js";import"./question-004-sINsf4GQ.js";import"./decopilot-sse-pool-DCimHDb8.js";import"./backoff-CrEUbyZT.js";import"./ChevronLeft-uRkOj5F8.js";import"./ChevronRight-BRGGbOax.js";function H(){const e=S.c(21),{capabilities:t,isPrivileged:f,loading:l,error:a}=be(),r=ue().length;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ae,{size:14}),e[0]=o):o=e[0];let n,i;if(e[1]!==t||e[2]!==a||e[3]!==f||e[4]!==r||e[5]!==l){i=Symbol.for("react.early_return_sentinel");e:{let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(le,{size:14}),e[8]=u):u=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(re,{size:14}),e[9]=c):c=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(me,{size:14}),e[10]=d):d=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ce,{size:14}),e[11]=x):x=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ie,{size:14}),e[12]=m):m=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(A,{size:14}),e[13]=b):b=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{size:14}),e[14]=p):p=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(oe,{size:14}),e[15]=g):g=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ne,{size:14}),e[16]=h):h=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(A,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(fe,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Q,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(de,{size:14}),e[20]=N):N=e[20];const z=[{label:"Organization",items:[{key:"general",label:"General",icon:o,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:u,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:c,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:d,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:x,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:m,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:b,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:p,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:h,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:r},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(l||a){i=z;break e}n=z.map(C=>({...C,items:C.items.filter($=>$.privilegedOnly?f:$.requires?f||t[$.requires]:!0)})).filter(pe)}e[1]=t,e[2]=a,e[3]=f,e[4]=r,e[5]=l,e[6]=n,e[7]=i}else n=e[6],i=e[7];return i!==Symbol.for("react.early_return_sentinel")?i:n}function pe(e){return e.items.length>0}function ge(){const e=S.c(19),t=H();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/shell/$org"},e[0]=f):f=e[0];const{org:l}=R(f);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={select:_e},e[1]=a):a=e[1];const r=E(a);let o;e[2]!==l||e[3]!==r?(o=b=>{const p=b.replace("$org",l);return r.startsWith(p)},e[2]=l,e[3]=r,e[4]=o):o=e[4];const n=o;let i;if(e[5]!==t||e[6]!==n||e[7]!==l){let b;e[9]!==n||e[10]!==l?(b=(p,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[p.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:p.label}),s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:p.items.map(h=>s.jsx(P,{children:s.jsx(O,{asChild:!0,isActive:n(h.to),children:s.jsxs(L,{to:h.to,params:{org:l},onClick:()=>B("settings_nav_clicked",{section_key:h.key,section_label:h.label,group_label:p.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[h.icon,h.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:h.label})]})})},h.key))})})]},`${p.label}-${g}`),e[9]=n,e[10]=l,e[11]=b):b=e[11],i=t.map(b),e[5]=t,e[6]=n,e[7]=l,e[8]=i}else i=e[8];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=u):u=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[u,s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs(O,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=c):c=e[13];let d;e[14]!==i?(d=s.jsxs(ee,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[i,c]}),e[14]=i,e[15]=d):d=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.84.1"]})}),e[16]=x):x=e[16];let m;return e[17]!==d?(m=s.jsxs(se,{variant:"sidebar",children:[d,x]}),e[17]=d,e[18]=m):m=e[18],m}function je(){B("signed_out",{source:"settings_sidebar"}),I(),G.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:f}=e,l=H();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org"},t[0]=a):a=t[0];const{org:r}=R(a);let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o={select:ve},t[1]=o):o=t[1];const n=E(o);let i;t[2]!==r||t[3]!==n?(i=g=>{const h=g.replace("$org",r);return n.startsWith(h)},t[2]=r,t[3]=n,t[4]=i):i=t[4];const u=i;let c;if(t[5]!==l||t[6]!==u||t[7]!==f||t[8]!==r){let g;t[10]!==u||t[11]!==f||t[12]!==r?(g=(h,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:h.label}),h.items.map(j=>s.jsxs(L,{to:j.to,params:{org:r},onClick:f,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",u(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${h.label}-${_}`),t[10]=u,t[11]=f,t[12]=r,t[13]=g):g=t[13],c=l.map(g),t[5]=l,t[6]=u,t[7]=f,t[8]=r,t[9]=c}else c=t[9];let d;t[14]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=d):d=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[d,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=x):x=t[15];let m;t[16]!==c?(m=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[c,x]}),t[16]=c,t[17]=m):m=t[17];let b;t[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.84.1"]})}),t[18]=b):b=t[18];let p;return t[19]!==m?(p=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[m,b]}),t[19]=m,t[20]=p):p=t[20],p}function Se(){I(),G.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:f}=J();he(f.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(D,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(F.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(te,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(K,{})})})})}),e[1]=a):a=e[1];const r=a;if(t){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:r}),e[2]=n):n=e[2],n}let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:r})}),e[3]=o):o=e[3],o}function Ye(){const e=S.c(22),t=W();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(y.LogoLink,{}),e[0]=f):f=e[0];let l;e[1]!==t?(l=t&&s.jsx(U,{}),e[1]=t,e[2]=l):l=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"hidden md:contents",children:s.jsx(y.Nav,{})}),e[3]=a):a=e[3];let r;e[4]!==l?(r=s.jsxs(y.LeftColumn,{children:[f,l,a]}),e[4]=l,e[5]=r):r=e[5];let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[6]=o):o=e[6];let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[7]=n):n=e[7];let i;e[8]!==r?(i=s.jsxs(y.Header,{children:[r,o,n]}),e[8]=r,e[9]=i):i=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u={"--sidebar-width-icon":"3.5rem"},e[10]=u):u=e[10];let c;e[11]!==t?(c=!t&&s.jsx(ge,{}),e[11]=t,e[12]=c):c=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(X,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(Ne,{})}),e[13]=d):d=e[13];let x;e[14]!==c?(x=s.jsxs(Y,{className:"flex-1 bg-sidebar min-h-0",style:u,children:[c,d]}),e[14]=c,e[15]=x):x=e[15];let m;e[16]!==t?(m=t&&s.jsx(V,{renderSidebar:ke}),e[16]=t,e[17]=m):m=e[17];let b;return e[18]!==x||e[19]!==m||e[20]!==i?(b=s.jsx(y.Provider,{children:s.jsx(Z,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[i,x,m]})})}),e[18]=x,e[19]=m,e[20]=i,e[21]=b):b=e[21],b}function ke(e){const{onClose:t}=e;return s.jsx(ye,{onClose:t})}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,Ye as default};
@@ -1 +1 @@
1
- import{c as v,l as N,j as r,r as S}from"./index-BoDi6OBc.js";import{C as w}from"./card-RkuQTlVn.js";import{i as E}from"./ArrowUpRight-gVE5kRlQ.js";function I(c){const e=v.c(12),{title:i,description:l,docsHref:t,actions:s,className:n,headerClassName:a,children:d}=c;let m;e[0]!==n?(m=N("flex flex-col gap-3",n),e[0]=n,e[1]=m):m=e[1];let f;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==a||e[6]!==i?(f=(i||l||t||s)&&r.jsxs("div",{className:N("flex items-center justify-between gap-3 px-4",a),children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=a,e[6]=i,e[7]=f):f=e[7];let o;return e[8]!==d||e[9]!==m||e[10]!==f?(o=r.jsxs("section",{className:m,children:[f,d]}),e[8]=d,e[9]=m,e[10]=f,e[11]=o):o=e[11],o}function P(c){const e=v.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const d=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=N("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=d.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let a;return e[7]!==t||e[8]!==s||e[9]!==n?(a=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=a):a=e[10],a}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=v.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:a,children:d}=c,m=d?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",f=n&&"hover:bg-muted/50 cursor-pointer";let o;e[0]!==a||e[1]!==m||e[2]!==f?(o=N(m,f,a),e[0]=a,e[1]=m,e[2]=f,e[3]=o):o=e[3];const b=n?"button":void 0,C=n?0:void 0;let x;e[4]!==n?(x=n?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,d]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==o||e[22]!==b||e[23]!==C||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:o,onClick:n,role:b,tabIndex:C,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=o,e[22]=b,e[23]=C,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=v.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=N("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=v.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=N("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,K as c,H as d};
1
+ import{c as v,l as N,j as r,r as S}from"./index-C1yj8oW9.js";import{C as w}from"./card-kDiEfTw9.js";import{i as E}from"./ArrowUpRight-DwILncVx.js";function I(c){const e=v.c(12),{title:i,description:l,docsHref:t,actions:s,className:n,headerClassName:a,children:d}=c;let m;e[0]!==n?(m=N("flex flex-col gap-3",n),e[0]=n,e[1]=m):m=e[1];let f;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==a||e[6]!==i?(f=(i||l||t||s)&&r.jsxs("div",{className:N("flex items-center justify-between gap-3 px-4",a),children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=a,e[6]=i,e[7]=f):f=e[7];let o;return e[8]!==d||e[9]!==m||e[10]!==f?(o=r.jsxs("section",{className:m,children:[f,d]}),e[8]=d,e[9]=m,e[10]=f,e[11]=o):o=e[11],o}function P(c){const e=v.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const d=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=N("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=d.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let a;return e[7]!==t||e[8]!==s||e[9]!==n?(a=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=a):a=e[10],a}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=v.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:a,children:d}=c,m=d?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",f=n&&"hover:bg-muted/50 cursor-pointer";let o;e[0]!==a||e[1]!==m||e[2]!==f?(o=N(m,f,a),e[0]=a,e[1]=m,e[2]=f,e[3]=o):o=e[3];const b=n?"button":void 0,C=n?0:void 0;let x;e[4]!==n?(x=n?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,d]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==o||e[22]!==b||e[23]!==C||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:o,onClick:n,role:b,tabIndex:C,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=o,e[22]=b,e[23]=C,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=v.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=N("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=v.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=N("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,K as c,H as d};
@@ -1 +1 @@
1
- import{c as n,l as f,j as i,dr as N,cC as y,bT as S,ds as v,cD as C,dt as $,cE as w}from"./index-BoDi6OBc.js";import{i as k}from"./X-Dqpx-r1T.js";function T(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(C,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function D(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(w,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function B(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(D,{}),e[6]=m):m=e[6];const x=p==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",b=p==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs($,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function O(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{P as S,_ as a,O as b,B as c,T as d};
1
+ import{c as n,l as f,j as i,dr as N,cC as y,bT as S,ds as v,cD as C,dt as $,cE as w}from"./index-C1yj8oW9.js";import{i as k}from"./X-CO9z9Xp0.js";function T(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(C,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function D(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(w,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function B(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(D,{}),e[6]=m):m=e[6];const x=p==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",b=p==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs($,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function O(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{P as S,_ as a,O as b,B as c,T as d};
@@ -1 +1 @@
1
- import{b1 as S,r as d,b2 as b,b3 as h,c as f,j as c}from"./index-BoDi6OBc.js";import{S as p,c as x,d as g}from"./sheet-BDdFViUD.js";import{u as m}from"./sidebar-DoXfrWOj.js";import{i as j}from"./LayoutLeft-D2ad_kHx.js";import{T as R}from"./toolbar-DMerIIuJ.js";function E(t){const e=S({warn:t?.router===void 0}),r=t?.router||e,o=d.useRef(void 0);return b(r.stores.__store,s=>{if(t?.select){if(t.structuralSharing??r.options.defaultStructuralSharing){const n=h(o.current,t.select(s));return o.current=n,n}return t.select(s)}return s})}function M(){const t=f.c(3),{toggleSidebar:e}=m();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=c.jsx(j,{size:16}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=c.jsx(R,{onClick:e,"aria-label":"Toggle sidebar",children:r}),t[1]=e,t[2]=o):o=t[2],o}function y(t){const e=f.c(12),{renderSidebar:r}=t,{openMobile:o,setOpenMobile:s}=m();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=c.jsx(p,{className:"sr-only",children:"Navigation"}),e[0]=n):n=e[0];let i;e[1]!==s?(i=()=>s(!1),e[1]=s,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==i?(l=r({onClose:i}),e[3]=r,e[4]=i,e[5]=l):l=e[5];let a;e[6]!==l?(a=c.jsxs(x,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[n,l]}),e[6]=l,e[7]=a):a=e[7];let u;return e[8]!==o||e[9]!==s||e[10]!==a?(u=c.jsx(g,{open:o,onOpenChange:s,children:a}),e[8]=o,e[9]=s,e[10]=a,e[11]=u):u=e[11],u}export{y as M,M as S,E as u};
1
+ import{b1 as S,r as d,b2 as b,b3 as h,c as f,j as c}from"./index-C1yj8oW9.js";import{S as p,c as x,d as g}from"./sheet-CzR0tmZA.js";import{u as m}from"./sidebar-BLFhVRa1.js";import{i as j}from"./LayoutLeft-_ZNcVcNz.js";import{T as R}from"./toolbar-CO9czXOO.js";function E(t){const e=S({warn:t?.router===void 0}),r=t?.router||e,o=d.useRef(void 0);return b(r.stores.__store,s=>{if(t?.select){if(t.structuralSharing??r.options.defaultStructuralSharing){const n=h(o.current,t.select(s));return o.current=n,n}return t.select(s)}return s})}function M(){const t=f.c(3),{toggleSidebar:e}=m();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=c.jsx(j,{size:16}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=c.jsx(R,{onClick:e,"aria-label":"Toggle sidebar",children:r}),t[1]=e,t[2]=o):o=t[2],o}function y(t){const e=f.c(12),{renderSidebar:r}=t,{openMobile:o,setOpenMobile:s}=m();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=c.jsx(p,{className:"sr-only",children:"Navigation"}),e[0]=n):n=e[0];let i;e[1]!==s?(i=()=>s(!1),e[1]=s,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==i?(l=r({onClose:i}),e[3]=r,e[4]=i,e[5]=l):l=e[5];let a;e[6]!==l?(a=c.jsxs(x,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[n,l]}),e[6]=l,e[7]=a):a=e[7];let u;return e[8]!==o||e[9]!==s||e[10]!==a?(u=c.jsx(g,{open:o,onOpenChange:s,children:a}),e[8]=o,e[9]=s,e[10]=a,e[11]=u):u=e[11],u}export{y as M,M as S,E as u};
@@ -1 +1 @@
1
- import{c as k,d as X,j as s,B as O,bX as H,t as B,af as fe,a as Z,o as Se,p as ge,K as le,bY as je,bZ as ve,L as G,r as V,b_ as ke,b$ as Ne,k as ie,b as Oe,w as _e,e as he,u as Ce,H as Ae,c0 as $e,c1 as ce,c2 as ze,c3 as Te,S as Ee,O as Me,c4 as Pe}from"./index-BoDi6OBc.js";import{A as te}from"./avatar-Bbvs8iIt.js";import{t as pe,a as Le}from"./Users03-BhaYLgGW.js";import{i as Fe,b as Ie,s as qe,a as M,n as Re}from"./Stars02-CbFOXGiR.js";import{s as De}from"./XClose-BvKJTTlt.js";import{i as U}from"./CheckCircle-B40vdc2l.js";import{i as de}from"./FilterLines-DttJL6KD.js";import{i as K}from"./Zap-C6SkRgFu.js";import{c as Ue,D as He,a as Ke,d as Ge}from"./dialog-CHU--T7-.js";import{R as Be}from"./required-auth-layout-BolsfPYi.js";import{g as We,c as Ye,A as Je}from"./hooks-C9iWb2N3.js";import{a as Qe,m as Ve,S as Xe}from"./use-mcp-client-DuJQA2rV.js";import{n as Ze}from"./tab-id-BptcWVWa.js";import{c as et}from"./use-organization-settings-nc8QZXyP.js";import{u as tt}from"./use-org-sso-BzsvKCfF.js";function nt(t){const e=k.c(27),{orgName:n,orgSlug:o,orgLogo:r,domain:a}=t;let i;e[0]!==o?(i={mutationFn:async()=>{const b=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await b.json();if(!b.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:b=>{window.location.href=`/${b.slug??o}`},onError:ot},e[0]=o,e[1]=i):i=e[1];const l=X(i),d=st;let c;e[2]!==r||e[3]!==n?(c=r?s.jsx(te,{url:r,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(pe,{className:"h-6 w-6 text-primary"})}),e[2]=r,e[3]=n,e[4]=c):c=e[4];let m;e[5]!==n?(m=s.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=m):m=e[6];let u;e[7]!==a?(u=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",s.jsxs("strong",{children:["@",a]})," email can join this organization."]}),e[7]=a,e[8]=u):u=e[8];let p;e[9]!==m||e[10]!==u?(p=s.jsxs("div",{className:"space-y-2",children:[m,u]}),e[9]=m,e[10]=u,e[11]=p):p=e[11];let h;e[12]!==l?(h=()=>l.mutate(),e[12]=l,e[13]=h):h=e[13];const x=l.isPending?"Joining…":`Enter ${n}`;let f;e[14]!==l.isPending||e[15]!==h||e[16]!==x?(f=s.jsx(O,{onClick:h,disabled:l.isPending,children:x}),e[14]=l.isPending,e[15]=h,e[16]=x,e[17]=f):f=e[17];let g;e[18]!==l.isPending?(g=s.jsx(O,{variant:"ghost",onClick:d,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=g):g=e[19];let y;e[20]!==f||e[21]!==g?(y=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,g]}),e[20]=f,e[21]=g,e[22]=y):y=e[22];let w;return e[23]!==y||e[24]!==c||e[25]!==p?(w=s.jsxs(H,{children:[c,p,y]}),e[23]=y,e[24]=c,e[25]=p,e[26]=w):w=e[26],w}function st(){window.location.href="/"}function ot(t){B.error(t instanceof Error?t.message:"Failed to join organization")}function ue(t){const e=k.c(17),{orgSlug:n,orgName:o,reason:r}=t,a=it,i=r==="not-found",l=i?Fe:fe,d=i?"Organization not found":"No access";let c;e[0]!==i||e[1]!==o||e[2]!==n?(c=i?s.jsxs(s.Fragment,{children:["We couldn't find an organization called ",s.jsx("strong",{children:n}),"."]}):s.jsxs(s.Fragment,{children:["You don't have access to ",s.jsx("strong",{children:o??n}),".",s.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=i,e[1]=o,e[2]=n,e[3]=c):c=e[3];const m=c;let u;e[4]!==l?(u=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=u):u=e[5];let p;e[6]!==d?(p=s.jsx("h3",{className:"text-lg font-medium",children:d}),e[6]=d,e[7]=p):p=e[7];let h;e[8]!==m?(h=s.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[8]=m,e[9]=h):h=e[9];let x;e[10]!==p||e[11]!==h?(x=s.jsxs("div",{className:"space-y-2",children:[p,h]}),e[10]=p,e[11]=h,e[12]=x):x=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(O,{onClick:a,children:"Go to home"}),e[13]=f):f=e[13];let g;return e[14]!==u||e[15]!==x?(g=s.jsxs(H,{children:[u,x,f]}),e[14]=u,e[15]=x,e[16]=g):g=e[16],g}function it(){window.location.href="/"}function at(t){const e=k.c(39),{invitationId:n,orgName:o,orgSlug:r,orgLogo:a}=t;let i;e[0]!==n?(i=async()=>{const C=await Z.organization.acceptInvitation({invitationId:n});if(C.error)throw new Error(C.error.message);return C.data},e[0]=n,e[1]=i):i=e[1];let l;e[2]!==r?(l=()=>{Se(),window.location.href=`/${r}`},e[2]=r,e[3]=l):l=e[3];let d;e[4]!==i||e[5]!==l?(d={mutationFn:i,onSuccess:l,onError:ct},e[4]=i,e[5]=l,e[6]=d):d=e[6];const c=X(d);let m;e[7]!==n?(m=async()=>{const C=await Z.organization.rejectInvitation({invitationId:n});if(C.error)throw new Error(C.error.message);return C.data},e[7]=n,e[8]=m):m=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=lt,e[9]=u):u=e[9];let p;e[10]!==m?(p={mutationFn:m,onSuccess:u,onError:rt},e[10]=m,e[11]=p):p=e[11];const h=X(p),x=c.isPending||h.isPending;let f;e[12]!==a||e[13]!==o?(f=a?s.jsx(te,{url:a,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Ie,{className:"h-6 w-6 text-primary"})}),e[12]=a,e[13]=o,e[14]=f):f=e[14];let g;e[15]!==o?(g=s.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",s.jsx("strong",{children:o})]}),e[15]=o,e[16]=g):g=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=y):y=e[17];let w;e[18]!==g?(w=s.jsxs("div",{className:"space-y-2",children:[g,y]}),e[18]=g,e[19]=w):w=e[19];let b;e[20]!==c?(b=()=>c.mutate(),e[20]=c,e[21]=b):b=e[21];const v=c.isPending?"Accepting…":"Accept invitation";let N;e[22]!==x||e[23]!==b||e[24]!==v?(N=s.jsx(O,{onClick:b,disabled:x,children:v}),e[22]=x,e[23]=b,e[24]=v,e[25]=N):N=e[25];let _;e[26]!==h?(_=()=>h.mutate(),e[26]=h,e[27]=_):_=e[27];const S=h.isPending?"Declining…":"Decline";let A;e[28]!==x||e[29]!==_||e[30]!==S?(A=s.jsx(O,{variant:"ghost",onClick:_,disabled:x,children:S}),e[28]=x,e[29]=_,e[30]=S,e[31]=A):A=e[31];let $;e[32]!==N||e[33]!==A?($=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,A]}),e[32]=N,e[33]=A,e[34]=$):$=e[34];let z;return e[35]!==w||e[36]!==$||e[37]!==f?(z=s.jsxs(H,{children:[f,w,$]}),e[35]=w,e[36]=$,e[37]=f,e[38]=z):z=e[38],z}function rt(t){B.error(t instanceof Error?t.message:"Failed to decline invitation")}function lt(){B.success("Invitation declined"),window.location.href="/"}function ct(t){B.error(t instanceof Error?t.message:"Failed to accept invitation")}function dt(t){const e=k.c(10),{orgName:n,orgLogo:o}=t;let r;e[0]!==o||e[1]!==n?(r=o?s.jsx(te,{url:o,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(qe,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=n,e[2]=r):r=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=a):a=e[3];let i;e[4]!==n?(i=s.jsxs("div",{className:"space-y-2",children:[a,s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your request to join ",s.jsx("strong",{children:n})," is waiting for an admin to approve it. You'll get access once it's approved."]})]}),e[4]=n,e[5]=i):i=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(O,{variant:"ghost",onClick:ut,children:"Go to home"}),e[6]=l):l=e[6];let d;return e[7]!==r||e[8]!==i?(d=s.jsxs(H,{children:[r,i,l]}),e[7]=r,e[8]=i,e[9]=d):d=e[9],d}function ut(){window.location.href="/"}function mt(t){const e=k.c(30),{orgName:n,orgSlug:o,orgLogo:r,domain:a}=t;let i;e[0]!==o?(i=async()=>{const v=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),N=await v.json();if(!v.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=o,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=ht,e[2]=l):l=e[2];let d;e[3]!==i?(d={mutationFn:i,onSuccess:l,onError:gt},e[3]=i,e[4]=d):d=e[4];const c=X(d);let m;e[5]!==r||e[6]!==n?(m=r?s.jsx(te,{url:r,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(pe,{className:"h-6 w-6 text-primary"})}),e[5]=r,e[6]=n,e[7]=m):m=e[7];let u;e[8]!==n?(u=s.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",n,"?"]}),e[8]=n,e[9]=u):u=e[9];let p;e[10]!==a?(p=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",s.jsxs("strong",{children:["@",a]})," emails before you can join."]}),e[10]=a,e[11]=p):p=e[11];let h;e[12]!==u||e[13]!==p?(h=s.jsxs("div",{className:"space-y-2",children:[u,p]}),e[12]=u,e[13]=p,e[14]=h):h=e[14];let x;e[15]!==c?(x=()=>c.mutate(),e[15]=c,e[16]=x):x=e[16];const f=c.isPending?"Requesting…":"Request to join";let g;e[17]!==c.isPending||e[18]!==x||e[19]!==f?(g=s.jsx(O,{onClick:x,disabled:c.isPending,children:f}),e[17]=c.isPending,e[18]=x,e[19]=f,e[20]=g):g=e[20];let y;e[21]!==c.isPending?(y=s.jsx(O,{variant:"ghost",onClick:ft,disabled:c.isPending,children:"Go to home"}),e[21]=c.isPending,e[22]=y):y=e[22];let w;e[23]!==g||e[24]!==y?(w=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,y]}),e[23]=g,e[24]=y,e[25]=w):w=e[25];let b;return e[26]!==w||e[27]!==m||e[28]!==h?(b=s.jsxs(H,{children:[m,h,w]}),e[26]=w,e[27]=m,e[28]=h,e[29]=b):b=e[29],b}function ft(){window.location.href="/"}function gt(t){B.error(t instanceof Error?t.message:"Failed to request access")}function ht(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function pt(t){const e=k.c(7);let n;e[0]!==t?(n=le.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let o;e[2]!==t?(o=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=o):o=e[3];let r;return e[4]!==n||e[5]!==o?(r={queryKey:n,queryFn:o,refetchOnWindowFocus:!1},e[4]=n,e[5]=o,e[6]=r):r=e[6],ge(r)}function xt({orgSlug:t}){const{data:e}=pt(t);if(e.status!=="member"){je()?.org===t&&ve();const n=localStorage.getItem(G.lastOrgSlug())===t;if(n&&localStorage.removeItem(G.lastOrgSlug()),n&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?s.jsx(ue,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?s.jsx(at,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?s.jsx(nt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?s.jsx(mt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?s.jsx(dt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):s.jsx(ue,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function yt(t){const e=k.c(20),{release:n,onCtaClick:o,onLearnMoreClick:r}=t;let a;e[0]!==n.eyebrow?(a=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=a):a=e[1];let i;e[2]!==n.title?(i=s.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=i):i=e[3];let l;e[4]!==a||e[5]!==i?(l=s.jsxs("div",{children:[a,i]}),e[4]=a,e[5]=i,e[6]=l):l=e[6];let d;e[7]!==n.bullets?(d=n.bullets.map(bt),e[7]=n.bullets,e[8]=d):d=e[8];let c;e[9]!==d?(c=s.jsx("ul",{className:"flex flex-col gap-3",children:d}),e[9]=d,e[10]=c):c=e[10];let m;e[11]!==o||e[12]!==r||e[13]!==n.cta||e[14]!==n.learnMoreHref?(m=(n.cta||n.learnMoreHref)&&s.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?s.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:r,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):s.jsx("span",{}),n.cta&&s.jsx(O,{asChild:!0,size:"sm",onClick:o,children:s.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=o,e[12]=r,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=m):m=e[15];let u;return e[16]!==l||e[17]!==c||e[18]!==m?(u=s.jsxs("div",{className:"flex flex-col gap-3",children:[l,c,m]}),e[16]=l,e[17]=c,e[18]=m,e[19]=u):u=e[19],u}function bt(t,e){return s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const xe=[{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:M,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:U,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:K,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:U,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:M,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:K,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:M,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:U,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:K,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:M,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:U,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:K,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:M,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:de,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:U,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:Le,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:K,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:U,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:M,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:de,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:M,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:Re,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ee="studio.release-feed.v1",ae=new Set;let L="",F={},re=!1;function wt(){if(re)return L||"{}";try{return localStorage.getItem(ee)??"{}"}catch{return L||"{}"}}function ye(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function me(){const t=wt();return t!==L&&(L=t,F=ye(t)),F}function St(t){ae.add(t);const e=n=>{if(!(n.key!==ee&&n.key!==null)){try{const o=localStorage.getItem(ee)??"{}",a={...ye(o),...F};F=a,L=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{ae.delete(t),window.removeEventListener("storage",e)}}function jt(t){F=t,L=JSON.stringify(t);try{localStorage.setItem(ee,L),re=!1}catch{re=!0}ae.forEach(e=>e())}function vt(){const t=k.c(7),e=V.useSyncExternalStore(St,me,me);let n;t[0]!==e?(n=d=>!!e[d],t[0]=e,t[1]=n):n=t[1];const o=n,r=kt;let a;t[2]!==e?(a=xe.reduce((d,c)=>e[c.id]?d:d+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let l;return t[4]!==o||t[5]!==i?(l={isSeen:o,markSeen:r,unseenCount:i},t[4]=o,t[5]=i,t[6]=l):l=t[6],l}function kt(t){F[t]||jt({...F,[t]:{seenAt:new Date().toISOString()}})}const Nt=720*60*60*1e3;function Ot(t){const[e,n,o]=t.split("-").map(Number);return!e||!n||!o?new Date(t).getTime():new Date(e,n-1,o).getTime()}function _t(t){const e=xe[0];if(!e)return null;const n=Ot(e.date),o=t-n;return o<0||o>Nt?null:e}function Ct(){const t=k.c(21),{isSeen:e,markSeen:n}=vt();let o,r,a;if(t[0]!==e){a=Symbol.for("react.early_return_sentinel");e:{if(o=_t(Date.now()),!o){a=null;break e}r=e(o.id)}t[0]=e,t[1]=o,t[2]=r,t[3]=a}else o=t[1],r=t[2],a=t[3];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let i;t[4]!==o.id||t[5]!==n?(i=()=>n(o.id),t[4]=o.id,t[5]=n,t[6]=i):i=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(De,{size:14}),t[7]=l):l=t[7];let d;t[8]!==i?(d=s.jsx(O,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:i,children:l}),t[8]=i,t[9]=d):d=t[9];let c,m;t[10]!==o.id||t[11]!==n?(c=()=>n(o.id),m=()=>n(o.id),t[10]=o.id,t[11]=n,t[12]=c,t[13]=m):(c=t[12],m=t[13]);let u;t[14]!==o||t[15]!==c||t[16]!==m?(u=s.jsx(yt,{release:o,onCtaClick:c,onLearnMoreClick:m}),t[14]=o,t[15]=c,t[16]=m,t[17]=u):u=t[17];let p;return t[18]!==d||t[19]!==u?(p=s.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[d,u]}),t[18]=d,t[19]=u,t[20]=p):p=t[20],p}const be=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),P=be?"⌘":"Ctrl",E={keyboardShortcuts:{keys:[P,"K"],description:"Keyboard shortcuts"},focusChatInput:{keys:[P,"L"],description:"Focus chat input"},saveAndFormat:{keys:[P,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[P,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[P,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",P,"S"],description:"New task"},toggleDaemon:{keys:[P,"D"],description:"Toggle daemon logs"}},At=[{label:"General",shortcuts:[E.keyboardShortcuts,E.newTask,E.toggleDaemon]},{label:"Editor",shortcuts:[E.saveAndFormat]},{label:"Chat",shortcuts:[E.focusChatInput,E.togglePlanMode,E.sendMessage,E.newLine]},{label:"Questions",shortcuts:[E.selectOption]},{label:"Monitoring",shortcuts:[E.applyFilter]}];function $t(t){return be?t.metaKey:t.ctrlKey}function zt(t){const e=k.c(5),{open:n,onOpenChange:o}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(He,{children:s.jsx(Ke,{children:"Keyboard Shortcuts"})}),e[0]=r):r=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(Ue,{className:"sm:max-w-md",children:[r,s.jsx("div",{className:"flex flex-col gap-4",children:At.map(Tt)})]}),e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==n?(i=s.jsx(Ge,{open:n,onOpenChange:o,children:a}),e[2]=o,e[3]=n,e[4]=i):i=e[4],i}function Tt(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Et)})]},t.label)}function Et(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Mt)})]},t.description)}function Mt(t){return s.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}function Pt({activeOrg:t}){return t&&(ke(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ne()),null}function Lt(t,e,n){if(!n)return null;const o=We(t,e);return o?o.threads.get().find(a=>a.id===n)?.branch??null:null}function we(t){return{queryKey:le.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function rn(t){const e=k.c(10);let n;e[0]!==t?(n=we(t),e[0]=t,e[1]=n):n=e[1];const o=ie(n);let r;e[2]!==o.data?.prompts?(r=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=r):r=e[3];let a;e[4]!==o.data?.tiles?(a=o.data?.tiles??[],e[4]=o.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==o.isLoading||e[7]!==r||e[8]!==a?(i={isLoading:o.isLoading,prompts:r,tiles:a},e[6]=o.isLoading,e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function Ft(t){const e=k.c(17),{orgSlug:n,orgName:o,domain:r}=t;let a;e[0]!==n?(a=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=a):a=e[1];const i=a,l=It;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(fe,{className:"h-6 w-6 text-primary"})}),e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=c):c=e[3];let m;e[4]!==r||e[5]!==o?(m=o?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:o})," requires SSO authentication",r?` via ${r}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=r,e[5]=o,e[6]=m):m=e[6];let u;e[7]!==m?(u=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx("p",{className:"text-sm text-muted-foreground",children:m})]}),e[7]=m,e[8]=u):u=e[8];let p;e[9]!==i?(p=s.jsx(O,{onClick:i,children:"Sign in with SSO"}),e[9]=i,e[10]=p):p=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(O,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=h):h=e[11];let x;e[12]!==p?(x=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,h]}),e[12]=p,e[13]=x):x=e[13];let f;return e[14]!==u||e[15]!==x?(f=s.jsxs(H,{children:[d,u,x]}),e[14]=u,e[15]=x,e[16]=f):f=e[16],f}function It(){window.location.href="/"}function qt(t){const e=k.c(8),{org:n,children:o}=t,a=et(n.id,n.slug)?.enabled_plugins??null;let i;e[0]!==n.id||e[1]!==n.name||e[2]!==a?(i={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:a,ui:null},e[0]=n.id,e[1]=n.name,e[2]=a,e[3]=i):i=e[3];const l=i;let d;return e[4]!==o||e[5]!==n||e[6]!==l?(d=s.jsx(Pe,{org:n,project:l,children:o}),e[4]=o,e[5]=n,e[6]=l,e[7]=d):d=e[7],d}function Rt(){const t=Oe(),e=Ye(),{org:n,locator:o}=_e(),r=he({strict:!1}),a=Ce({strict:!1}),i=r.org??"",l=r.taskId??"",d=(f,g,y=!0)=>t({to:"/$org/$taskId",params:{org:i,taskId:f},search:g,replace:y}),c=(f,g=!0)=>d(l,f,g),m=f=>c(g=>({...g,chat:f?1:0})),u=(f,g,y)=>d(f,w=>{const b={chat:1};if(g?b.virtualmcpid=g:w.virtualmcpid&&(b.virtualmcpid=w.virtualmcpid),y?.main)b.main=y.main;else{const v=w.main;v&&typeof v=="string"&&!Ze(v)&&(b.main=v)}return y?.autosend&&(b.autosend=Je),b},!1);return{setChatOpen:m,setTaskId:u,createNewTask:async f=>{const g=crypto.randomUUID(),y=f??a.virtualmcpid??Qe(n.id).id,b=y===a.virtualmcpid?Lt(n.slug,o,l):null;try{await e?.create({id:g,virtual_mcp_id:y,...b?{branch:b}:{}})}catch{}u(g,y)},openTab:f=>d(l||crypto.randomUUID(),g=>({...g,main:f})),toggleMain:()=>c(f=>{if(f.main!==void 0&&f.main!=="0")return{...f,main:"0"};const y={...f};return delete y.main,y})}}function Dt(){const t=k.c(51);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const o=Ae(e)?.params.org;let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{taskId:a}=he(r),[i,l]=V.useState(!1),d=o??"";let c;t[2]!==d?(c=we(d),t[2]=d,t[3]=c):c=t[3];const m=!!o&&!a;let u;t[4]!==c||t[5]!==m?(u={...c,enabled:m},t[4]=c,t[5]=m,t[6]=u):u=t[6],ie(u);const{data:p}=Z.useSession(),h=p?.user?.id;let x;t[7]!==o||t[8]!==h?(x=o&&h?$e(h,o):null,t[7]=o,t[8]=h,t[9]=x):x=t[9];const f=x;let g,y;t[10]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{const j=T=>{$t(T)&&T.code==="KeyK"&&(T.preventDefault(),l(!0))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},y=[],t[10]=g,t[11]=y):(g=t[10],y=t[11]),V.useEffect(g,y);let w;t[12]!==o?(w=le.activeOrganization(o),t[12]=o,t[13]=w):w=t[13];let b;t[14]!==o||t[15]!==h?(b=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Z.organization.getFullOrganization({query:{organizationSlug:o}}).finally(Ut),T=ce(j);return j&&!T&&localStorage.setItem(G.lastOrgSlug(),o),h&&j&&Te(h,o,j),j},t[14]=o,t[15]=h,t[16]=b):b=t[16];const v=f?f.data:void 0,N=f?.updatedAt;let _;t[17]!==b||t[18]!==v||t[19]!==N||t[20]!==w?(_={queryKey:w,queryFn:b,initialData:v,initialDataUpdatedAt:N,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=b,t[18]=v,t[19]=N,t[20]=w,t[21]=_):_=t[21];const{data:S}=ge(_),A=S?.id,$=S?.slug,{data:z}=tt(A,$),C=A??"",ne=$??"";let I;t[22]!==C||t[23]!==ne?(I=Ve({connectionId:Xe,orgId:C,orgSlug:ne}),t[22]=C,t[23]=ne,t[24]=I):I=t[24];const se=!!A&&!!$;let W;if(t[25]!==I||t[26]!==se?(W={...I,enabled:se},t[25]=I,t[26]=se,t[27]=W):W=t[27],ie(W),!S){let j;t[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ee,{}),t[28]=j):j=t[28];let T;return t[29]!==o?(T=s.jsx(V.Suspense,{fallback:j,children:s.jsx(xt,{orgSlug:o})}),t[29]=o,t[30]=T):T=t[30],T}if(ce(S)){localStorage.getItem(G.lastOrgSlug())===o&&localStorage.removeItem(G.lastOrgSlug());let j;return t[31]!==S.name?(j=s.jsx(ze,{orgName:S.name}),t[31]=S.name,t[32]=j):j=t[32],j}if(z?.ssoRequired&&!z.authenticated){let j;return t[33]!==S.id||t[34]!==S.name||t[35]!==S.slug||t[36]!==z.domain?(j=s.jsx(Ft,{orgId:S.id,orgSlug:S.slug,orgName:S.name,domain:z.domain}),t[33]=S.id,t[34]=S.name,t[35]=S.slug,t[36]=z.domain,t[37]=j):j=t[37],j}const oe=S.logo??null;let q;t[38]!==S||t[39]!==oe?(q={...S,logo:oe},t[38]=S,t[39]=oe,t[40]=q):q=t[40];let R;t[41]!==S?(R=s.jsx(Pt,{activeOrg:S}),t[41]=S,t[42]=R):R=t[42];let Y,J;t[43]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Me,{}),J=s.jsx(Ct,{}),t[43]=Y,t[44]=J):(Y=t[43],J=t[44]);let D;t[45]!==i?(D=s.jsx(zt,{open:i,onOpenChange:l}),t[45]=i,t[46]=D):D=t[46];let Q;return t[47]!==q||t[48]!==R||t[49]!==D?(Q=s.jsxs(qt,{org:q,children:[R,Y,J,D]}),t[47]=q,t[48]=R,t[49]=D,t[50]=Q):Q=t[50],Q}function Ut(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Ht(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Be,{children:s.jsx(Dt,{})}),t[0]=e):e=t[0],e}const ln=Object.freeze(Object.defineProperty({__proto__:null,default:Ht,usePanelActions:Rt},Symbol.toStringTag,{value:"Module"}));export{E as K,xe as R,yt as a,Rt as b,rn as c,we as h,$t as i,Lt as r,ln as s,vt as u};
1
+ import{c as k,d as X,j as s,B as O,bX as H,t as B,af as fe,a as Z,o as Se,p as ge,K as le,bY as je,bZ as ve,L as G,r as V,b_ as ke,b$ as Ne,k as ie,b as Oe,w as _e,e as he,u as Ce,H as Ae,c0 as $e,c1 as ce,c2 as ze,c3 as Te,S as Ee,O as Me,c4 as Pe}from"./index-C1yj8oW9.js";import{A as te}from"./avatar-B2rvHJ2u.js";import{t as pe,a as Le}from"./Users03-B_G71vm-.js";import{i as Fe,b as Ie,s as qe,a as M,n as Re}from"./Stars02-BwRZ8reG.js";import{s as De}from"./XClose-BO6FjXoT.js";import{i as U}from"./CheckCircle-DpKZZDmN.js";import{i as de}from"./FilterLines-CowTK4HW.js";import{i as K}from"./Zap-Bs_ao0zW.js";import{c as Ue,D as He,a as Ke,d as Ge}from"./dialog-D4-cpiIq.js";import{R as Be}from"./required-auth-layout-Be42uHMA.js";import{g as We,c as Ye,A as Je}from"./hooks-iTnRVGBT.js";import{a as Qe,m as Ve,S as Xe}from"./use-mcp-client-90IJIS7G.js";import{n as Ze}from"./tab-id-BptcWVWa.js";import{c as et}from"./use-organization-settings-B-FYwlct.js";import{u as tt}from"./use-org-sso-d8VUjdDF.js";function nt(t){const e=k.c(27),{orgName:n,orgSlug:o,orgLogo:r,domain:a}=t;let i;e[0]!==o?(i={mutationFn:async()=>{const b=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await b.json();if(!b.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:b=>{window.location.href=`/${b.slug??o}`},onError:ot},e[0]=o,e[1]=i):i=e[1];const l=X(i),d=st;let c;e[2]!==r||e[3]!==n?(c=r?s.jsx(te,{url:r,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(pe,{className:"h-6 w-6 text-primary"})}),e[2]=r,e[3]=n,e[4]=c):c=e[4];let m;e[5]!==n?(m=s.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=m):m=e[6];let u;e[7]!==a?(u=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",s.jsxs("strong",{children:["@",a]})," email can join this organization."]}),e[7]=a,e[8]=u):u=e[8];let p;e[9]!==m||e[10]!==u?(p=s.jsxs("div",{className:"space-y-2",children:[m,u]}),e[9]=m,e[10]=u,e[11]=p):p=e[11];let h;e[12]!==l?(h=()=>l.mutate(),e[12]=l,e[13]=h):h=e[13];const x=l.isPending?"Joining…":`Enter ${n}`;let f;e[14]!==l.isPending||e[15]!==h||e[16]!==x?(f=s.jsx(O,{onClick:h,disabled:l.isPending,children:x}),e[14]=l.isPending,e[15]=h,e[16]=x,e[17]=f):f=e[17];let g;e[18]!==l.isPending?(g=s.jsx(O,{variant:"ghost",onClick:d,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=g):g=e[19];let y;e[20]!==f||e[21]!==g?(y=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,g]}),e[20]=f,e[21]=g,e[22]=y):y=e[22];let w;return e[23]!==y||e[24]!==c||e[25]!==p?(w=s.jsxs(H,{children:[c,p,y]}),e[23]=y,e[24]=c,e[25]=p,e[26]=w):w=e[26],w}function st(){window.location.href="/"}function ot(t){B.error(t instanceof Error?t.message:"Failed to join organization")}function ue(t){const e=k.c(17),{orgSlug:n,orgName:o,reason:r}=t,a=it,i=r==="not-found",l=i?Fe:fe,d=i?"Organization not found":"No access";let c;e[0]!==i||e[1]!==o||e[2]!==n?(c=i?s.jsxs(s.Fragment,{children:["We couldn't find an organization called ",s.jsx("strong",{children:n}),"."]}):s.jsxs(s.Fragment,{children:["You don't have access to ",s.jsx("strong",{children:o??n}),".",s.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=i,e[1]=o,e[2]=n,e[3]=c):c=e[3];const m=c;let u;e[4]!==l?(u=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=u):u=e[5];let p;e[6]!==d?(p=s.jsx("h3",{className:"text-lg font-medium",children:d}),e[6]=d,e[7]=p):p=e[7];let h;e[8]!==m?(h=s.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[8]=m,e[9]=h):h=e[9];let x;e[10]!==p||e[11]!==h?(x=s.jsxs("div",{className:"space-y-2",children:[p,h]}),e[10]=p,e[11]=h,e[12]=x):x=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(O,{onClick:a,children:"Go to home"}),e[13]=f):f=e[13];let g;return e[14]!==u||e[15]!==x?(g=s.jsxs(H,{children:[u,x,f]}),e[14]=u,e[15]=x,e[16]=g):g=e[16],g}function it(){window.location.href="/"}function at(t){const e=k.c(39),{invitationId:n,orgName:o,orgSlug:r,orgLogo:a}=t;let i;e[0]!==n?(i=async()=>{const C=await Z.organization.acceptInvitation({invitationId:n});if(C.error)throw new Error(C.error.message);return C.data},e[0]=n,e[1]=i):i=e[1];let l;e[2]!==r?(l=()=>{Se(),window.location.href=`/${r}`},e[2]=r,e[3]=l):l=e[3];let d;e[4]!==i||e[5]!==l?(d={mutationFn:i,onSuccess:l,onError:ct},e[4]=i,e[5]=l,e[6]=d):d=e[6];const c=X(d);let m;e[7]!==n?(m=async()=>{const C=await Z.organization.rejectInvitation({invitationId:n});if(C.error)throw new Error(C.error.message);return C.data},e[7]=n,e[8]=m):m=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=lt,e[9]=u):u=e[9];let p;e[10]!==m?(p={mutationFn:m,onSuccess:u,onError:rt},e[10]=m,e[11]=p):p=e[11];const h=X(p),x=c.isPending||h.isPending;let f;e[12]!==a||e[13]!==o?(f=a?s.jsx(te,{url:a,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Ie,{className:"h-6 w-6 text-primary"})}),e[12]=a,e[13]=o,e[14]=f):f=e[14];let g;e[15]!==o?(g=s.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",s.jsx("strong",{children:o})]}),e[15]=o,e[16]=g):g=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=y):y=e[17];let w;e[18]!==g?(w=s.jsxs("div",{className:"space-y-2",children:[g,y]}),e[18]=g,e[19]=w):w=e[19];let b;e[20]!==c?(b=()=>c.mutate(),e[20]=c,e[21]=b):b=e[21];const v=c.isPending?"Accepting…":"Accept invitation";let N;e[22]!==x||e[23]!==b||e[24]!==v?(N=s.jsx(O,{onClick:b,disabled:x,children:v}),e[22]=x,e[23]=b,e[24]=v,e[25]=N):N=e[25];let _;e[26]!==h?(_=()=>h.mutate(),e[26]=h,e[27]=_):_=e[27];const S=h.isPending?"Declining…":"Decline";let A;e[28]!==x||e[29]!==_||e[30]!==S?(A=s.jsx(O,{variant:"ghost",onClick:_,disabled:x,children:S}),e[28]=x,e[29]=_,e[30]=S,e[31]=A):A=e[31];let $;e[32]!==N||e[33]!==A?($=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,A]}),e[32]=N,e[33]=A,e[34]=$):$=e[34];let z;return e[35]!==w||e[36]!==$||e[37]!==f?(z=s.jsxs(H,{children:[f,w,$]}),e[35]=w,e[36]=$,e[37]=f,e[38]=z):z=e[38],z}function rt(t){B.error(t instanceof Error?t.message:"Failed to decline invitation")}function lt(){B.success("Invitation declined"),window.location.href="/"}function ct(t){B.error(t instanceof Error?t.message:"Failed to accept invitation")}function dt(t){const e=k.c(10),{orgName:n,orgLogo:o}=t;let r;e[0]!==o||e[1]!==n?(r=o?s.jsx(te,{url:o,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(qe,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=n,e[2]=r):r=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=a):a=e[3];let i;e[4]!==n?(i=s.jsxs("div",{className:"space-y-2",children:[a,s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your request to join ",s.jsx("strong",{children:n})," is waiting for an admin to approve it. You'll get access once it's approved."]})]}),e[4]=n,e[5]=i):i=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(O,{variant:"ghost",onClick:ut,children:"Go to home"}),e[6]=l):l=e[6];let d;return e[7]!==r||e[8]!==i?(d=s.jsxs(H,{children:[r,i,l]}),e[7]=r,e[8]=i,e[9]=d):d=e[9],d}function ut(){window.location.href="/"}function mt(t){const e=k.c(30),{orgName:n,orgSlug:o,orgLogo:r,domain:a}=t;let i;e[0]!==o?(i=async()=>{const v=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),N=await v.json();if(!v.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=o,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=ht,e[2]=l):l=e[2];let d;e[3]!==i?(d={mutationFn:i,onSuccess:l,onError:gt},e[3]=i,e[4]=d):d=e[4];const c=X(d);let m;e[5]!==r||e[6]!==n?(m=r?s.jsx(te,{url:r,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(pe,{className:"h-6 w-6 text-primary"})}),e[5]=r,e[6]=n,e[7]=m):m=e[7];let u;e[8]!==n?(u=s.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",n,"?"]}),e[8]=n,e[9]=u):u=e[9];let p;e[10]!==a?(p=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",s.jsxs("strong",{children:["@",a]})," emails before you can join."]}),e[10]=a,e[11]=p):p=e[11];let h;e[12]!==u||e[13]!==p?(h=s.jsxs("div",{className:"space-y-2",children:[u,p]}),e[12]=u,e[13]=p,e[14]=h):h=e[14];let x;e[15]!==c?(x=()=>c.mutate(),e[15]=c,e[16]=x):x=e[16];const f=c.isPending?"Requesting…":"Request to join";let g;e[17]!==c.isPending||e[18]!==x||e[19]!==f?(g=s.jsx(O,{onClick:x,disabled:c.isPending,children:f}),e[17]=c.isPending,e[18]=x,e[19]=f,e[20]=g):g=e[20];let y;e[21]!==c.isPending?(y=s.jsx(O,{variant:"ghost",onClick:ft,disabled:c.isPending,children:"Go to home"}),e[21]=c.isPending,e[22]=y):y=e[22];let w;e[23]!==g||e[24]!==y?(w=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,y]}),e[23]=g,e[24]=y,e[25]=w):w=e[25];let b;return e[26]!==w||e[27]!==m||e[28]!==h?(b=s.jsxs(H,{children:[m,h,w]}),e[26]=w,e[27]=m,e[28]=h,e[29]=b):b=e[29],b}function ft(){window.location.href="/"}function gt(t){B.error(t instanceof Error?t.message:"Failed to request access")}function ht(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function pt(t){const e=k.c(7);let n;e[0]!==t?(n=le.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let o;e[2]!==t?(o=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=o):o=e[3];let r;return e[4]!==n||e[5]!==o?(r={queryKey:n,queryFn:o,refetchOnWindowFocus:!1},e[4]=n,e[5]=o,e[6]=r):r=e[6],ge(r)}function xt({orgSlug:t}){const{data:e}=pt(t);if(e.status!=="member"){je()?.org===t&&ve();const n=localStorage.getItem(G.lastOrgSlug())===t;if(n&&localStorage.removeItem(G.lastOrgSlug()),n&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?s.jsx(ue,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?s.jsx(at,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?s.jsx(nt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?s.jsx(mt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?s.jsx(dt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):s.jsx(ue,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function yt(t){const e=k.c(20),{release:n,onCtaClick:o,onLearnMoreClick:r}=t;let a;e[0]!==n.eyebrow?(a=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=a):a=e[1];let i;e[2]!==n.title?(i=s.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=i):i=e[3];let l;e[4]!==a||e[5]!==i?(l=s.jsxs("div",{children:[a,i]}),e[4]=a,e[5]=i,e[6]=l):l=e[6];let d;e[7]!==n.bullets?(d=n.bullets.map(bt),e[7]=n.bullets,e[8]=d):d=e[8];let c;e[9]!==d?(c=s.jsx("ul",{className:"flex flex-col gap-3",children:d}),e[9]=d,e[10]=c):c=e[10];let m;e[11]!==o||e[12]!==r||e[13]!==n.cta||e[14]!==n.learnMoreHref?(m=(n.cta||n.learnMoreHref)&&s.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?s.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:r,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):s.jsx("span",{}),n.cta&&s.jsx(O,{asChild:!0,size:"sm",onClick:o,children:s.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=o,e[12]=r,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=m):m=e[15];let u;return e[16]!==l||e[17]!==c||e[18]!==m?(u=s.jsxs("div",{className:"flex flex-col gap-3",children:[l,c,m]}),e[16]=l,e[17]=c,e[18]=m,e[19]=u):u=e[19],u}function bt(t,e){return s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const xe=[{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:M,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:U,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:K,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:U,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:M,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:K,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:M,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:U,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:K,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:M,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:U,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:K,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:M,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:de,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:U,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:Le,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:K,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:U,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:M,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:de,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:M,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:Re,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ee="studio.release-feed.v1",ae=new Set;let L="",F={},re=!1;function wt(){if(re)return L||"{}";try{return localStorage.getItem(ee)??"{}"}catch{return L||"{}"}}function ye(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function me(){const t=wt();return t!==L&&(L=t,F=ye(t)),F}function St(t){ae.add(t);const e=n=>{if(!(n.key!==ee&&n.key!==null)){try{const o=localStorage.getItem(ee)??"{}",a={...ye(o),...F};F=a,L=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{ae.delete(t),window.removeEventListener("storage",e)}}function jt(t){F=t,L=JSON.stringify(t);try{localStorage.setItem(ee,L),re=!1}catch{re=!0}ae.forEach(e=>e())}function vt(){const t=k.c(7),e=V.useSyncExternalStore(St,me,me);let n;t[0]!==e?(n=d=>!!e[d],t[0]=e,t[1]=n):n=t[1];const o=n,r=kt;let a;t[2]!==e?(a=xe.reduce((d,c)=>e[c.id]?d:d+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let l;return t[4]!==o||t[5]!==i?(l={isSeen:o,markSeen:r,unseenCount:i},t[4]=o,t[5]=i,t[6]=l):l=t[6],l}function kt(t){F[t]||jt({...F,[t]:{seenAt:new Date().toISOString()}})}const Nt=720*60*60*1e3;function Ot(t){const[e,n,o]=t.split("-").map(Number);return!e||!n||!o?new Date(t).getTime():new Date(e,n-1,o).getTime()}function _t(t){const e=xe[0];if(!e)return null;const n=Ot(e.date),o=t-n;return o<0||o>Nt?null:e}function Ct(){const t=k.c(21),{isSeen:e,markSeen:n}=vt();let o,r,a;if(t[0]!==e){a=Symbol.for("react.early_return_sentinel");e:{if(o=_t(Date.now()),!o){a=null;break e}r=e(o.id)}t[0]=e,t[1]=o,t[2]=r,t[3]=a}else o=t[1],r=t[2],a=t[3];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let i;t[4]!==o.id||t[5]!==n?(i=()=>n(o.id),t[4]=o.id,t[5]=n,t[6]=i):i=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(De,{size:14}),t[7]=l):l=t[7];let d;t[8]!==i?(d=s.jsx(O,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:i,children:l}),t[8]=i,t[9]=d):d=t[9];let c,m;t[10]!==o.id||t[11]!==n?(c=()=>n(o.id),m=()=>n(o.id),t[10]=o.id,t[11]=n,t[12]=c,t[13]=m):(c=t[12],m=t[13]);let u;t[14]!==o||t[15]!==c||t[16]!==m?(u=s.jsx(yt,{release:o,onCtaClick:c,onLearnMoreClick:m}),t[14]=o,t[15]=c,t[16]=m,t[17]=u):u=t[17];let p;return t[18]!==d||t[19]!==u?(p=s.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[d,u]}),t[18]=d,t[19]=u,t[20]=p):p=t[20],p}const be=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),P=be?"⌘":"Ctrl",E={keyboardShortcuts:{keys:[P,"K"],description:"Keyboard shortcuts"},focusChatInput:{keys:[P,"L"],description:"Focus chat input"},saveAndFormat:{keys:[P,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[P,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[P,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",P,"S"],description:"New task"},toggleDaemon:{keys:[P,"D"],description:"Toggle daemon logs"}},At=[{label:"General",shortcuts:[E.keyboardShortcuts,E.newTask,E.toggleDaemon]},{label:"Editor",shortcuts:[E.saveAndFormat]},{label:"Chat",shortcuts:[E.focusChatInput,E.togglePlanMode,E.sendMessage,E.newLine]},{label:"Questions",shortcuts:[E.selectOption]},{label:"Monitoring",shortcuts:[E.applyFilter]}];function $t(t){return be?t.metaKey:t.ctrlKey}function zt(t){const e=k.c(5),{open:n,onOpenChange:o}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(He,{children:s.jsx(Ke,{children:"Keyboard Shortcuts"})}),e[0]=r):r=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(Ue,{className:"sm:max-w-md",children:[r,s.jsx("div",{className:"flex flex-col gap-4",children:At.map(Tt)})]}),e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==n?(i=s.jsx(Ge,{open:n,onOpenChange:o,children:a}),e[2]=o,e[3]=n,e[4]=i):i=e[4],i}function Tt(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Et)})]},t.label)}function Et(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Mt)})]},t.description)}function Mt(t){return s.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}function Pt({activeOrg:t}){return t&&(ke(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ne()),null}function Lt(t,e,n){if(!n)return null;const o=We(t,e);return o?o.threads.get().find(a=>a.id===n)?.branch??null:null}function we(t){return{queryKey:le.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function rn(t){const e=k.c(10);let n;e[0]!==t?(n=we(t),e[0]=t,e[1]=n):n=e[1];const o=ie(n);let r;e[2]!==o.data?.prompts?(r=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=r):r=e[3];let a;e[4]!==o.data?.tiles?(a=o.data?.tiles??[],e[4]=o.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==o.isLoading||e[7]!==r||e[8]!==a?(i={isLoading:o.isLoading,prompts:r,tiles:a},e[6]=o.isLoading,e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function Ft(t){const e=k.c(17),{orgSlug:n,orgName:o,domain:r}=t;let a;e[0]!==n?(a=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=a):a=e[1];const i=a,l=It;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(fe,{className:"h-6 w-6 text-primary"})}),e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=c):c=e[3];let m;e[4]!==r||e[5]!==o?(m=o?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:o})," requires SSO authentication",r?` via ${r}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=r,e[5]=o,e[6]=m):m=e[6];let u;e[7]!==m?(u=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx("p",{className:"text-sm text-muted-foreground",children:m})]}),e[7]=m,e[8]=u):u=e[8];let p;e[9]!==i?(p=s.jsx(O,{onClick:i,children:"Sign in with SSO"}),e[9]=i,e[10]=p):p=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(O,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=h):h=e[11];let x;e[12]!==p?(x=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,h]}),e[12]=p,e[13]=x):x=e[13];let f;return e[14]!==u||e[15]!==x?(f=s.jsxs(H,{children:[d,u,x]}),e[14]=u,e[15]=x,e[16]=f):f=e[16],f}function It(){window.location.href="/"}function qt(t){const e=k.c(8),{org:n,children:o}=t,a=et(n.id,n.slug)?.enabled_plugins??null;let i;e[0]!==n.id||e[1]!==n.name||e[2]!==a?(i={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:a,ui:null},e[0]=n.id,e[1]=n.name,e[2]=a,e[3]=i):i=e[3];const l=i;let d;return e[4]!==o||e[5]!==n||e[6]!==l?(d=s.jsx(Pe,{org:n,project:l,children:o}),e[4]=o,e[5]=n,e[6]=l,e[7]=d):d=e[7],d}function Rt(){const t=Oe(),e=Ye(),{org:n,locator:o}=_e(),r=he({strict:!1}),a=Ce({strict:!1}),i=r.org??"",l=r.taskId??"",d=(f,g,y=!0)=>t({to:"/$org/$taskId",params:{org:i,taskId:f},search:g,replace:y}),c=(f,g=!0)=>d(l,f,g),m=f=>c(g=>({...g,chat:f?1:0})),u=(f,g,y)=>d(f,w=>{const b={chat:1};if(g?b.virtualmcpid=g:w.virtualmcpid&&(b.virtualmcpid=w.virtualmcpid),y?.main)b.main=y.main;else{const v=w.main;v&&typeof v=="string"&&!Ze(v)&&(b.main=v)}return y?.autosend&&(b.autosend=Je),b},!1);return{setChatOpen:m,setTaskId:u,createNewTask:async f=>{const g=crypto.randomUUID(),y=f??a.virtualmcpid??Qe(n.id).id,b=y===a.virtualmcpid?Lt(n.slug,o,l):null;try{await e?.create({id:g,virtual_mcp_id:y,...b?{branch:b}:{}})}catch{}u(g,y)},openTab:f=>d(l||crypto.randomUUID(),g=>({...g,main:f})),toggleMain:()=>c(f=>{if(f.main!==void 0&&f.main!=="0")return{...f,main:"0"};const y={...f};return delete y.main,y})}}function Dt(){const t=k.c(51);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const o=Ae(e)?.params.org;let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{taskId:a}=he(r),[i,l]=V.useState(!1),d=o??"";let c;t[2]!==d?(c=we(d),t[2]=d,t[3]=c):c=t[3];const m=!!o&&!a;let u;t[4]!==c||t[5]!==m?(u={...c,enabled:m},t[4]=c,t[5]=m,t[6]=u):u=t[6],ie(u);const{data:p}=Z.useSession(),h=p?.user?.id;let x;t[7]!==o||t[8]!==h?(x=o&&h?$e(h,o):null,t[7]=o,t[8]=h,t[9]=x):x=t[9];const f=x;let g,y;t[10]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{const j=T=>{$t(T)&&T.code==="KeyK"&&(T.preventDefault(),l(!0))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},y=[],t[10]=g,t[11]=y):(g=t[10],y=t[11]),V.useEffect(g,y);let w;t[12]!==o?(w=le.activeOrganization(o),t[12]=o,t[13]=w):w=t[13];let b;t[14]!==o||t[15]!==h?(b=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Z.organization.getFullOrganization({query:{organizationSlug:o}}).finally(Ut),T=ce(j);return j&&!T&&localStorage.setItem(G.lastOrgSlug(),o),h&&j&&Te(h,o,j),j},t[14]=o,t[15]=h,t[16]=b):b=t[16];const v=f?f.data:void 0,N=f?.updatedAt;let _;t[17]!==b||t[18]!==v||t[19]!==N||t[20]!==w?(_={queryKey:w,queryFn:b,initialData:v,initialDataUpdatedAt:N,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=b,t[18]=v,t[19]=N,t[20]=w,t[21]=_):_=t[21];const{data:S}=ge(_),A=S?.id,$=S?.slug,{data:z}=tt(A,$),C=A??"",ne=$??"";let I;t[22]!==C||t[23]!==ne?(I=Ve({connectionId:Xe,orgId:C,orgSlug:ne}),t[22]=C,t[23]=ne,t[24]=I):I=t[24];const se=!!A&&!!$;let W;if(t[25]!==I||t[26]!==se?(W={...I,enabled:se},t[25]=I,t[26]=se,t[27]=W):W=t[27],ie(W),!S){let j;t[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ee,{}),t[28]=j):j=t[28];let T;return t[29]!==o?(T=s.jsx(V.Suspense,{fallback:j,children:s.jsx(xt,{orgSlug:o})}),t[29]=o,t[30]=T):T=t[30],T}if(ce(S)){localStorage.getItem(G.lastOrgSlug())===o&&localStorage.removeItem(G.lastOrgSlug());let j;return t[31]!==S.name?(j=s.jsx(ze,{orgName:S.name}),t[31]=S.name,t[32]=j):j=t[32],j}if(z?.ssoRequired&&!z.authenticated){let j;return t[33]!==S.id||t[34]!==S.name||t[35]!==S.slug||t[36]!==z.domain?(j=s.jsx(Ft,{orgId:S.id,orgSlug:S.slug,orgName:S.name,domain:z.domain}),t[33]=S.id,t[34]=S.name,t[35]=S.slug,t[36]=z.domain,t[37]=j):j=t[37],j}const oe=S.logo??null;let q;t[38]!==S||t[39]!==oe?(q={...S,logo:oe},t[38]=S,t[39]=oe,t[40]=q):q=t[40];let R;t[41]!==S?(R=s.jsx(Pt,{activeOrg:S}),t[41]=S,t[42]=R):R=t[42];let Y,J;t[43]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Me,{}),J=s.jsx(Ct,{}),t[43]=Y,t[44]=J):(Y=t[43],J=t[44]);let D;t[45]!==i?(D=s.jsx(zt,{open:i,onOpenChange:l}),t[45]=i,t[46]=D):D=t[46];let Q;return t[47]!==q||t[48]!==R||t[49]!==D?(Q=s.jsxs(qt,{org:q,children:[R,Y,J,D]}),t[47]=q,t[48]=R,t[49]=D,t[50]=Q):Q=t[50],Q}function Ut(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Ht(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Be,{children:s.jsx(Dt,{})}),t[0]=e):e=t[0],e}const ln=Object.freeze(Object.defineProperty({__proto__:null,default:Ht,usePanelActions:Rt},Symbol.toStringTag,{value:"Module"}));export{E as K,xe as R,yt as a,Rt as b,rn as c,we as h,$t as i,Lt as r,ln as s,vt as u};
@@ -1 +1 @@
1
- import{c as i,j as s,i as l}from"./index-BoDi6OBc.js";function n(){const t=i.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{"data-testid":"shell-route-loading",className:"absolute inset-0 h-full w-full flex items-center justify-center",children:s.jsx(l,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}export{n as S};
1
+ import{c as i,j as s,i as l}from"./index-C1yj8oW9.js";function n(){const t=i.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{"data-testid":"shell-route-loading",className:"absolute inset-0 h-full w-full flex items-center justify-center",children:s.jsx(l,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}export{n as S};