decocms 4.83.0 → 4.83.2

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 (231) hide show
  1. package/dist/client/assets/{AlertCircle-DPEsW7A8.js → AlertCircle-C-LWGksh.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BDBkVxFA.js → AreaChart-BuQ7pYh_.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-B_VVATf8.js → ArrowUp-BeEo8zxR.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-DPt871Ex.js → ArrowUpRight-Cpd1Kvoc.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-Bhjgrg4k.js → CheckCircle-D6vue6JR.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-ClEtq8UA.js → ChevronDown-Chms7f47.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-B9DmLAKh.js → ChevronRight-DGKhdwsU.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-Y_qcNB-R.js → ChevronUp-B2kc02W-.js} +1 -1
  9. package/dist/client/assets/{Copy01-tOHQDVdb.js → Copy01-BLPcoB-x.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-CmHvBgAo.js → DotsVertical-Bv_Wu1PR.js} +1 -1
  11. package/dist/client/assets/{Eye-DkqzK9v4.js → Eye--S6NkM5F.js} +1 -1
  12. package/dist/client/assets/{FilterLines-Da90Z39y.js → FilterLines-CVyIbk7P.js} +1 -1
  13. package/dist/client/assets/{Globe01-BptLpR6D.js → Globe01-D8U_-ef0.js} +1 -1
  14. package/dist/client/assets/{Globe04-5erCJGew.js → Globe04-Cf7fSPDC.js} +1 -1
  15. package/dist/client/assets/{HardDrive-BWMqpfxS.js → HardDrive-BDXue_9V.js} +1 -1
  16. package/dist/client/assets/{Image01-XM4bpaLw.js → Image01-BOJVTyLq.js} +1 -1
  17. package/dist/client/assets/{Key01-ByxRAii_.js → Key01-DgOZ1Vl-.js} +1 -1
  18. package/dist/client/assets/{LayoutLeft-B9Jd6ymK.js → LayoutLeft-uipFY-Sc.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-CKVW-eEM.js → LinkExternal01-Cq7tHe_6.js} +1 -1
  20. package/dist/client/assets/{Monitor01-ClZ2KmM9.js → Monitor01-C0kqyHBJ.js} +1 -1
  21. package/dist/client/assets/{Package-CDoMKJ25.js → Package-2_HSkxNk.js} +1 -1
  22. package/dist/client/assets/{Palette-Dj74Mlc6.js → Palette-DUf6RWjx.js} +1 -1
  23. package/dist/client/assets/{Play-D5sDqr8I.js → Play-D27HpOrJ.js} +1 -1
  24. package/dist/client/assets/{Plus-JOcsz2OW.js → Plus-CX4xPpn4.js} +1 -1
  25. package/dist/client/assets/{SearchLg-BHMKxNfO.js → SearchLg-EiBSceY9.js} +1 -1
  26. package/dist/client/assets/{SearchMd-C-NJ_45S.js → SearchMd-CjaEgvWB.js} +1 -1
  27. package/dist/client/assets/{Settings02-CVFCJqEn.js → Settings02-5t6-pGmO.js} +1 -1
  28. package/dist/client/assets/{Shield01-Bj6HGuxh.js → Shield01-DxxbOkrj.js} +1 -1
  29. package/dist/client/assets/{Star01-QG8pK1yw.js → Star01-DBLmagOx.js} +1 -1
  30. package/dist/client/assets/{Stars01-DqPZujie.js → Stars01-D-dD7V12.js} +1 -1
  31. package/dist/client/assets/{Stars02-D1eOi134.js → Stars02-BHQ6SybJ.js} +1 -1
  32. package/dist/client/assets/{Sun-DHI7Rs1S.js → Sun-7RqH2_Dg.js} +1 -1
  33. package/dist/client/assets/{SwitchHorizontal01-D8ShLQwH.js → SwitchHorizontal01-Dm27fxw8.js} +1 -1
  34. package/dist/client/assets/{Tool01-C6ssLf07.js → Tool01-Bk7pamHg.js} +1 -1
  35. package/dist/client/assets/{Tool02-BHHNM_g4.js → Tool02-CngweHED.js} +1 -1
  36. package/dist/client/assets/{Trash01-BtophoGC.js → Trash01-Bi1KaIxH.js} +1 -1
  37. package/dist/client/assets/{TrendUp01-WOe5Y0pM.js → TrendUp01-DsSWSiUz.js} +1 -1
  38. package/dist/client/assets/{Upload01-CXhKVCP8.js → Upload01-BWPUocl6.js} +1 -1
  39. package/dist/client/assets/{User01-uwH1s6Qn.js → User01-s23e9wZl.js} +1 -1
  40. package/dist/client/assets/{Users01-suVU8oKl.js → Users01-CNMhmtlD.js} +1 -1
  41. package/dist/client/assets/{Users03-Zrh5Q_ci.js → Users03-CTnD7KhC.js} +1 -1
  42. package/dist/client/assets/{X-BolYo4iB.js → X-CLk-1WTe.js} +1 -1
  43. package/dist/client/assets/{XCircle-CnJ70X3w.js → XCircle-2O_4kWp7.js} +1 -1
  44. package/dist/client/assets/{XClose-BdaQO-2_.js → XClose-DSEAQFLe.js} +1 -1
  45. package/dist/client/assets/{Zap-BzNhtsnx.js → Zap-BAgOs3IO.js} +1 -1
  46. package/dist/client/assets/{ZapSquare-DMvgJwuD.js → ZapSquare-T3uj9o0S.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-B5XPtpBa.js → ZoomOut-B7mxhvah.js} +1 -1
  48. package/dist/client/assets/{access-gate-CjWAQSdR.js → access-gate-avJTtHpg.js} +1 -1
  49. package/dist/client/assets/{add-section-modal-CyW16nLc.js → add-section-modal-BL-x5qaG.js} +1 -1
  50. package/dist/client/assets/{agent-icon-BGgFt2fk.js → agent-icon-D18juLx-.js} +1 -1
  51. package/dist/client/assets/{agents-list-MwwVi6Ba.js → agents-list-DLkLGDrw.js} +1 -1
  52. package/dist/client/assets/{ai-providers-DAP6QknZ.js → ai-providers-KsLhnp0X.js} +1 -1
  53. package/dist/client/assets/{alert-Beqn0Fvg.js → alert-Bele4j8y.js} +1 -1
  54. package/dist/client/assets/{alert-dialog-CwKyb2j-.js → alert-dialog-BNeEAttR.js} +1 -1
  55. package/dist/client/assets/{app-editor-DseSILWA.js → app-editor-B0BrwnQg.js} +1 -1
  56. package/dist/client/assets/{auth-D4bTHSVX.js → auth-D4yHRD2-.js} +1 -1
  57. package/dist/client/assets/{auth-catchall-BKLc7QKI.js → auth-catchall-CNZ3D5s7.js} +1 -1
  58. package/dist/client/assets/{auth-entry-1PWVON9e.js → auth-entry-C-qYM8sO.js} +1 -1
  59. package/dist/client/assets/{auth-split-layout-B6cSVZVN.js → auth-split-layout-DYTsk60r.js} +1 -1
  60. package/dist/client/assets/{authenticate-and-persist-oauth-Bt8Gm2rH.js → authenticate-and-persist-oauth-BlDhuvWq.js} +1 -1
  61. package/dist/client/assets/{automation-list-row-P3Wfaud1.js → automation-list-row-XKqqDi6F.js} +1 -1
  62. package/dist/client/assets/{automation-runs-0Gp5Pl3p.js → automation-runs-C0y-Gi-l.js} +25 -25
  63. package/dist/client/assets/{automations-B1Pch092.js → automations-DdZPK7BE.js} +1 -1
  64. package/dist/client/assets/{autosend-kl7RNqnt.js → autosend-Pu6JcU1z.js} +1 -1
  65. package/dist/client/assets/{avatar-BxCDP7Ot.js → avatar-CB-s6LW3.js} +1 -1
  66. package/dist/client/assets/{badge-CJKB36w7.js → badge-D2OV8wRl.js} +1 -1
  67. package/dist/client/assets/{block-document-BNPa3FEr.js → block-document-CMsWkopF.js} +1 -1
  68. package/dist/client/assets/{brand-context-D3Rlfh4r.js → brand-context-DWWqlpVW.js} +1 -1
  69. package/dist/client/assets/{buckets-eqtPNxJ7.js → buckets-Bml_f-qW.js} +1 -1
  70. package/dist/client/assets/{bulk-category-panel-CzrR4JyW.js → bulk-category-panel-CwTU2Dke.js} +1 -1
  71. package/dist/client/assets/{calendar-DeTvDsBF.js → calendar-Cy0H8dDP.js} +1 -1
  72. package/dist/client/assets/{capability-load-error-DB_oh7IY.js → capability-load-error-C8Uwu5_s.js} +1 -1
  73. package/dist/client/assets/{card-9tKE7GXF.js → card-BJLhqcLf.js} +1 -1
  74. package/dist/client/assets/{category-editor-BQbsXApg.js → category-editor-CfWwzNXf.js} +1 -1
  75. package/dist/client/assets/{chat-context-CwNi3A6G.js → chat-context-BzGsRBEi.js} +1 -1
  76. package/dist/client/assets/{checkbox-Diqx1FoE.js → checkbox-fY0uDGwg.js} +1 -1
  77. package/dist/client/assets/{cli-auth-success-DvYAFC0B.js → cli-auth-success-B08QkmvU.js} +1 -1
  78. package/dist/client/assets/{collection-detail-Cv0k2_GT.js → collection-detail-BZt_Ibwr.js} +1 -1
  79. package/dist/client/assets/{collection-display-button-hHnJ4_g2.js → collection-display-button-Cc0b3ED_.js} +1 -1
  80. package/dist/client/assets/{collection-search-kUG_oKbb.js → collection-search-Bv843kn7.js} +1 -1
  81. package/dist/client/assets/{collection-table-wrapper-B9yKUfMg.js → collection-table-wrapper-DjmKYjAk.js} +1 -1
  82. package/dist/client/assets/{collection-tabs-BTDZrBXn.js → collection-tabs-B6yGaiCr.js} +1 -1
  83. package/dist/client/assets/{command-N0I3WfMj.js → command-DWwqFTuu.js} +1 -1
  84. package/dist/client/assets/{commerce-onboarding-BySa1y-W.js → commerce-onboarding-dLv4vpps.js} +1 -1
  85. package/dist/client/assets/{companions-core-CXFBjxtL.js → companions-core-NOLgowrv.js} +1 -1
  86. package/dist/client/assets/{connect-desktop-dialog-ChBtls8K.js → connect-desktop-dialog-DEpb0pcU.js} +1 -1
  87. package/dist/client/assets/{connection-card-D0_c6gO9.js → connection-card-o0DDUNHv.js} +1 -1
  88. package/dist/client/assets/{connection-detail-BE-m8wny.js → connection-detail-Cswj6S4W.js} +1 -1
  89. package/dist/client/assets/{connection-form-helpers-BYaB09EC.js → connection-form-helpers-EPDDGUte.js} +1 -1
  90. package/dist/client/assets/{connections-BFAOtXPe.js → connections-6qWoAdqX.js} +1 -1
  91. package/dist/client/assets/{decopilot-sse-pool-BLGL0LsS.js → decopilot-sse-pool-D-2tGt-o.js} +1 -1
  92. package/dist/client/assets/{dialog-BxyVzjQ3.js → dialog-BFqbrhnG.js} +1 -1
  93. package/dist/client/assets/{domain-settings-BK0JpUz3.js → domain-settings-IW5nZczN.js} +1 -1
  94. package/dist/client/assets/{drawer-CQKQzuhR.js → drawer-Cl_dvusi.js} +1 -1
  95. package/dist/client/assets/{dropdown-menu-BScjo8--.js → dropdown-menu-EfeTZxQL.js} +1 -1
  96. package/dist/client/assets/{empty-state-es2nRb_j.js → empty-state-DQOY2xmV.js} +1 -1
  97. package/dist/client/assets/{extract-connection-data-C2_0wEKz.js → extract-connection-data-C6T0yo3M.js} +1 -1
  98. package/dist/client/assets/{file-explorer-ipUahnFG.js → file-explorer-BIc5X5VW.js} +1 -1
  99. package/dist/client/assets/{file-type-icon-L2ARwYHI.js → file-type-icon-D2keXo94.js} +1 -1
  100. package/dist/client/assets/{files-CEyq4COK.js → files-CSH75kzv.js} +1 -1
  101. package/dist/client/assets/{form-BBrmDTao.js → form-CGKisGk6.js} +1 -1
  102. package/dist/client/assets/{general-mpELEztz.js → general-BfoX5LCV.js} +1 -1
  103. package/dist/client/assets/{github-repo-picker-ClgZW6LI.js → github-repo-picker-BRMhPL_0.js} +1 -1
  104. package/dist/client/assets/{hooks-faeU6CoI.js → hooks-BSMoXVbD.js} +1 -1
  105. package/dist/client/assets/{index-DJmEqij6.js → index-BCsh3PYH.js} +1 -1
  106. package/dist/client/assets/{index-D521UaSg.js → index-BKqtjTbw.js} +1 -1
  107. package/dist/client/assets/{index-CesmbZpg.js → index-BmwqFaiy.js} +5 -5
  108. package/dist/client/assets/{index-DNRNEGzF.js → index-ByT194y-.js} +1 -1
  109. package/dist/client/assets/{index-CxWNtx9x.js → index-CAIYhjul.js} +3 -3
  110. package/dist/client/assets/{index-BXoUOnNS.js → index-CUgYJaPV.js} +1 -1
  111. package/dist/client/assets/{index-DIB09EG-.js → index-CXCcDBTq.js} +1 -1
  112. package/dist/client/assets/{index-D1EuIdjV.js → index-ChtsFoQQ.js} +1 -1
  113. package/dist/client/assets/{index-DxY7xoBM.js → index-D2HwJQV5.js} +2 -2
  114. package/dist/client/assets/{index-DI-ckLEU.js → index-DSgOediN.js} +1 -1
  115. package/dist/client/assets/{index-8daa3oHu.js → index-DrJmHyyo.js} +1 -1
  116. package/dist/client/assets/{index-B7DxR0_h.js → index-H4hcES42.js} +1 -1
  117. package/dist/client/assets/{index-HF6wstce.js → index-Rb2bYeF_.js} +1 -1
  118. package/dist/client/assets/{index-DU67rOKJ.js → index-S3X52veH.js} +1 -1
  119. package/dist/client/assets/{index-redirect-B1CSBKQb.js → index-redirect-CEHG6qWB.js} +1 -1
  120. package/dist/client/assets/{input-C9EhK1Lu.js → input-Dzav8ivG.js} +1 -1
  121. package/dist/client/assets/{integration-icon-Bz3MOu79.js → integration-icon-Db96f3jT.js} +1 -1
  122. package/dist/client/assets/{invite-member-dialog-B4o_u0Yn.js → invite-member-dialog-9O6Lre1u.js} +1 -1
  123. package/dist/client/assets/{label-JPT2W8Pg.js → label-DaAsoL9V.js} +1 -1
  124. package/dist/client/assets/{layout-DDwESlPa.js → layout-Br8401sd.js} +1 -1
  125. package/dist/client/assets/{login-CyRsInne.js → login-DceebZPc.js} +1 -1
  126. package/dist/client/assets/{mcp-oauth-DUn-Fuzj.js → mcp-oauth-Bzb4iSTT.js} +1 -1
  127. package/dist/client/assets/{members-C17VYqOT.js → members-DJky7gY8.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-DYNno9ow.js → monaco-editor-c4RVis_9.js} +1 -1
  129. package/dist/client/assets/{monitoring-stats-row-B1B3SvpD.js → monitoring-stats-row-CgDrRjXa.js} +1 -1
  130. package/dist/client/assets/{multi-select-CTnDksvV.js → multi-select-DswivzJU.js} +1 -1
  131. package/dist/client/assets/{oauth-callback-C2RnV8Ra.js → oauth-callback-N8Kmr_2u.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-ai-provider-qznLDLZZ.js → oauth-callback-ai-provider-B07g_XT9.js} +1 -1
  133. package/dist/client/assets/{onboarding-DUVBk0XQ.js → onboarding-BKAjTwg-.js} +1 -1
  134. package/dist/client/assets/{org-install-DQ2uKUYH.js → org-install-HCB4vzUC.js} +1 -1
  135. package/dist/client/assets/{org-layout-Bln5VKHy.js → org-layout-C0Q-q-fX.js} +1 -1
  136. package/dist/client/assets/{organization-choice-BzUmyMzq.js → organization-choice-D9DKvqVz.js} +1 -1
  137. package/dist/client/assets/{orgs-CQnP3RnF.js → orgs-BrqG5BVm.js} +1 -1
  138. package/dist/client/assets/{page-seo-form-BtLUHPsW.js → page-seo-form-DZCzqL8q.js} +1 -1
  139. package/dist/client/assets/page-seo-sheet-MkscnSYp.js +1 -0
  140. package/dist/client/assets/{popover-BPf7qyUL.js → popover-Zrs8wv0F.js} +1 -1
  141. package/dist/client/assets/{post-editor-BLwE05et.js → post-editor-CdSGWiLa.js} +1 -1
  142. package/dist/client/assets/{primitives-DdZDjvVV.js → primitives-CSHAedU0.js} +1 -1
  143. package/dist/client/assets/{profile-8a3_1Shi.js → profile-L8yVo8jE.js} +1 -1
  144. package/dist/client/assets/project-app-view-D7_4EXf8.js +1 -0
  145. package/dist/client/assets/record-editor-sr_hR6uA.js +1 -0
  146. package/dist/client/assets/redirect-editor-DYiAiFDJ.js +1 -0
  147. package/dist/client/assets/registry-2F4l4D0M.js +2 -0
  148. package/dist/client/assets/{registry-layout-DTk5e6HH.js → registry-layout-ftVzyud_.js} +2 -2
  149. package/dist/client/assets/{reports-qdBRQ4pV.js → reports--rTbu3V7.js} +1 -1
  150. package/dist/client/assets/{require-capability-Bspi0oGk.js → require-capability-BYn5Rk3O.js} +1 -1
  151. package/dist/client/assets/{required-auth-layout-0AnIaBaR.js → required-auth-layout-CoT_XXkN.js} +1 -1
  152. package/dist/client/assets/{reset-password-D0qvkNvH.js → reset-password-CgNFAvmH.js} +1 -1
  153. package/dist/client/assets/{roles-BwrRDzH5.js → roles-DMRweu6k.js} +1 -1
  154. package/dist/client/assets/{search-input-Bdl49Lyd.js → search-input-Cq8-y1F0.js} +1 -1
  155. package/dist/client/assets/{secrets-BGFKYnKe.js → secrets-CmPAp_up.js} +1 -1
  156. package/dist/client/assets/{sections-editor-BKlLtB36.js → sections-editor-wyl18rw9.js} +1 -1
  157. package/dist/client/assets/select-model-DI8jnYOT.js +4 -0
  158. package/dist/client/assets/{select-BjS6pi0R.js → select-peZlJuYe.js} +1 -1
  159. package/dist/client/assets/{self-tool-result-CzsRIvtg.js → self-tool-result-DYrHsoN8.js} +1 -1
  160. package/dist/client/assets/{seo-editor-CMScpL2i.js → seo-editor-BJVKSK5H.js} +1 -1
  161. package/dist/client/assets/{settings-layout-Cbmu_dvI.js → settings-layout-CPUHm_YX.js} +1 -1
  162. package/dist/client/assets/{settings-section-C5ntTZ3s.js → settings-section-B1GgY2if.js} +1 -1
  163. package/dist/client/assets/{shell-controls-CZu8nt18.js → shell-controls-C_p4ZmTF.js} +1 -1
  164. package/dist/client/assets/{shell-layout-ElsOHGco.js → shell-layout-CTslVDtx.js} +1 -1
  165. package/dist/client/assets/{sidebar-Du3GhEXu.js → sidebar-BjlDvhlo.js} +1 -1
  166. package/dist/client/assets/{skeleton-DYrRZj58.js → skeleton-DeOjoVUO.js} +1 -1
  167. package/dist/client/assets/{sso-DwHclfbW.js → sso-D363gW46.js} +1 -1
  168. package/dist/client/assets/{store-D1pr97wp.js → store-DvP7myd4.js} +1 -1
  169. package/dist/client/assets/store-registry-r9GmOZET.js +2 -0
  170. package/dist/client/assets/{studio-tools-HHcBk3Yy.js → studio-tools-C0-5Z8k5.js} +1 -1
  171. package/dist/client/assets/{switch-Co9VnPF1.js → switch-DG2ijYXZ.js} +1 -1
  172. package/dist/client/assets/{table-7Pa2oc8U.js → table-fSAZqdik.js} +1 -1
  173. package/dist/client/assets/{tabs-DIYXMj-h.js → tabs-59hacXBf.js} +1 -1
  174. package/dist/client/assets/{textarea-azsnX4mp.js → textarea-B9TUwSCj.js} +1 -1
  175. package/dist/client/assets/{toggle-group-_FACvaFN.js → toggle-group-CP4FEYCM.js} +1 -1
  176. package/dist/client/assets/{toolbar-WAIhuPvK.js → toolbar-Bn_kiKpu.js} +1 -1
  177. package/dist/client/assets/{toolbar-icon-button-CFa583yL.js → toolbar-icon-button-DChgCAZk.js} +1 -1
  178. package/dist/client/assets/{tooltip-CTQ3jqyw.js → tooltip-DBcnpVTx.js} +1 -1
  179. package/dist/client/assets/{use-ai-providers-C3gvqXwZ.js → use-ai-providers-B0J5EZdH.js} +1 -1
  180. package/dist/client/assets/{use-automations-CV0g4TCD.js → use-automations-CajzdSeA.js} +1 -1
  181. package/dist/client/assets/{use-autosave-BUYSmKJl.js → use-autosave-BvYo7aS2.js} +1 -1
  182. package/dist/client/assets/{use-capability-DzMeZG_B.js → use-capability-CEtXiCRz.js} +1 -1
  183. package/dist/client/assets/{use-clock-tick-4n-sf8En.js → use-clock-tick-r_qU_UzB.js} +1 -1
  184. package/dist/client/assets/{use-collections-CR5m--3v.js → use-collections-DHkHvLr2.js} +1 -1
  185. package/dist/client/assets/{use-connection-Bja1yNlO.js → use-connection-DRK2N5z2.js} +1 -1
  186. package/dist/client/assets/{use-copy-BV3KPbyw.js → use-copy-BHgKL0On.js} +1 -1
  187. package/dist/client/assets/{use-create-virtual-mcp-Uhf3saYW.js → use-create-virtual-mcp-DaHNk0Ix.js} +1 -1
  188. package/dist/client/assets/{use-debounced-autosave-CrTBH0r8.js → use-debounced-autosave-CBxkub0J.js} +1 -1
  189. package/dist/client/assets/{use-debounced-value-DiZ6agyj.js → use-debounced-value-Bc5YBXDl.js} +1 -1
  190. package/dist/client/assets/{use-deco-credits-CrWRWg5d.js → use-deco-credits-CbUWlpHm.js} +1 -1
  191. package/dist/client/assets/{use-decopilot-events-By89abVN.js → use-decopilot-events-lkWlYZO4.js} +1 -1
  192. package/dist/client/assets/{use-delete-connection-rmpivgwt.js → use-delete-connection-Bz-L6aVH.js} +1 -1
  193. package/dist/client/assets/{use-deployment-admin-Dx9ZkF6I.js → use-deployment-admin-BmRZ12zi.js} +1 -1
  194. package/dist/client/assets/{use-file-configs-CKVr-c7q.js → use-file-configs-CRDwG08w.js} +1 -1
  195. package/dist/client/assets/{use-infinite-scroll-B1UJmYzB.js → use-infinite-scroll-C_OzT98l.js} +1 -1
  196. package/dist/client/assets/{use-join-requests-C6fMCeHB.js → use-join-requests-x3YhuWSS.js} +1 -1
  197. package/dist/client/assets/{use-mcp-auth-status-wzWeSyhc.js → use-mcp-auth-status-RbS9dxNI.js} +1 -1
  198. package/dist/client/assets/{use-mcp-client-CodYj4lk.js → use-mcp-client-BRDJsS2i.js} +1 -1
  199. package/dist/client/assets/{use-mcp-tools-DhezZmhh.js → use-mcp-tools-TLy2HClY.js} +1 -1
  200. package/dist/client/assets/{use-members-C5exRENp.js → use-members-T2DIW2PV.js} +1 -1
  201. package/dist/client/assets/{use-mobile-DmC5AwHK.js → use-mobile-COWtBi3l.js} +1 -1
  202. package/dist/client/assets/{use-navigate-to-agent-VNxYrStf.js → use-navigate-to-agent-DWAHU44q.js} +1 -1
  203. package/dist/client/assets/{use-org-auth-client-C-_6T-I_.js → use-org-auth-client-BICeQnTF.js} +1 -1
  204. package/dist/client/assets/{use-org-sso-D9Zrv9Ex.js → use-org-sso-Bd_0B726.js} +1 -1
  205. package/dist/client/assets/{use-organization-roles-kfhFanV-.js → use-organization-roles-DobbYYRj.js} +1 -1
  206. package/dist/client/assets/{use-organization-settings-C02fN1Pg.js → use-organization-settings-BJBqMmWF.js} +1 -1
  207. package/dist/client/assets/{use-registry-app-CntYFu2c.js → use-registry-app-C_q3DUZv.js} +1 -1
  208. package/dist/client/assets/{use-registry-connections-CSTpfPSI.js → use-registry-connections-CmUf1QlB.js} +1 -1
  209. package/dist/client/assets/{use-secrets-59JvHtO0.js → use-secrets-O5sD2Bgz.js} +1 -1
  210. package/dist/client/assets/{use-status-sounds-CrVwkBda.js → use-status-sounds-B96xiiHa.js} +1 -1
  211. package/dist/client/assets/{use-view-mode-Ba0ZEqUw.js → use-view-mode-BJOrvC1j.js} +1 -1
  212. package/dist/client/assets/{use-virtual-mcp-Bs6Z3XqB.js → use-virtual-mcp-63tB8KYL.js} +1 -1
  213. package/dist/client/assets/useInfiniteQuery-BSKFC7YM.js +1 -0
  214. package/dist/client/assets/{useRouterState-BStHehOf.js → useRouterState-BNyrcIx8.js} +1 -1
  215. package/dist/client/assets/useSuspenseInfiniteQuery-Cwnl9Xjp.js +1 -0
  216. package/dist/client/assets/{users-DXYde7XY.js → users-DWHrGlvz.js} +1 -1
  217. package/dist/client/assets/{variant-calendar-BlhvVxku.js → variant-calendar-BVX3kYfI.js} +1 -1
  218. package/dist/client/assets/{view-mode-toggle-Behabpts.js → view-mode-toggle-DBojFra_.js} +1 -1
  219. package/dist/client/index.html +1 -1
  220. package/dist/server/cli.js +5 -5
  221. package/dist/server/server.js +5 -5
  222. package/package.json +1 -1
  223. package/dist/client/assets/page-seo-sheet-DG0rFMaK.js +0 -1
  224. package/dist/client/assets/project-app-view-C5gaZj3T.js +0 -1
  225. package/dist/client/assets/record-editor-DvEIA6tV.js +0 -1
  226. package/dist/client/assets/redirect-editor-BplQQqRM.js +0 -1
  227. package/dist/client/assets/registry-Bq_80-6l.js +0 -2
  228. package/dist/client/assets/select-model-Bj5d_bo2.js +0 -4
  229. package/dist/client/assets/store-registry-Q6zoLWY_.js +0 -2
  230. package/dist/client/assets/useInfiniteQuery-GqUtQwTk.js +0 -1
  231. package/dist/client/assets/useSuspenseInfiniteQuery-oEtZEsYD.js +0 -1
@@ -1 +1 @@
1
- import{c as K,j as t,a as re,i as X,r as E,m as pe,K as he,B as ce,d as oe,l as W,t as me}from"./index-CxWNtx9x.js";import{R as xe}from"./required-auth-layout-0AnIaBaR.js";import{A as J}from"./auth-split-layout-B6cSVZVN.js";import{O as be}from"./organization-choice-BzUmyMzq.js";import{A as de}from"./avatar-BxCDP7Ot.js";import{I as je}from"./input-C9EhK1Lu.js";import{L as ye}from"./label-JPT2W8Pg.js";import{S as ve}from"./switch-Co9VnPF1.js";import{t as Ne,a as Se}from"./Users03-Zrh5Q_ci.js";import{i as we}from"./CheckCircle-Bhjgrg4k.js";import{t as ze}from"./Globe04-5erCJGew.js";import{a as ke}from"./Palette-Dj74Mlc6.js";import{i as Ce}from"./Upload01-CXhKVCP8.js";import"./User01-uwH1s6Qn.js";const _e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=K.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=K.c(13),{title:g,description:c,logoUrl:u,logoFallback:o}=i;let a;e[0]!==o||e[1]!==u?(a=t.jsx("div",{children:u?t.jsx(de,{url:u,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=u,e[2]=a):a=e[2];let r;e[3]!==g?(r=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=r):r=e[4];let n;e[5]!==c?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:c}),e[5]=c,e[6]=n):n=e[6];let f;e[7]!==r||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[r,n]}),e[7]=r,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=K.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(J,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const c=e?.user?.email??"",u=e?.user?.name;let o;return i[1]!==u||i[2]!==c?(o=t.jsx(Ee,{email:c,userName:u}),i[1]=u,i[2]=c,i[3]=o):o=i[3],o}function Ee(i){const e=K.c(54),{email:g,userName:c}=i;let u,o,a,r,n,f;if(e[0]!==g||e[1]!==c){a=g.split("@")[1]?.toLowerCase()??"",r=!!a&&!_e.has(a);const l=a.split(".")[0]??"";o=l.charAt(0).toUpperCase()+l.slice(1);let m;e[8]!==o||e[9]!==r||e[10]!==c?(m=r?o:c?.split(" ")[0]??"",e[8]=o,e[9]=r,e[10]=c,e[11]=m):m=e[11],u=m,f=pe,n=he.domainLookup(a),e[0]=g,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=n,e[7]=f}else u=e[2],o=e[3],a=e[4],r=e[5],n=e[6],f=e[7];let s;e[12]!==r||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:r},e[12]=r,e[13]=n,e[14]=s):s=e[14];const{data:j,isLoading:d,isError:N,refetch:p}=f(s);let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=new Set,e[15]=L):L=e[15];const[k,C]=E.useState(L),[A,_]=E.useState(!1);if(d){let l;e[16]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=l):l=e[16];let m;return e[17]!==a?(m=t.jsx(J,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=m):m=e[18],m}if(N){let l;e[19]!==a?(l=t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Couldn't check ",a," for an existing organization."]}),e[19]=a,e[20]=l):l=e[20];let m;e[21]!==p?(m=t.jsx(ce,{variant:"outline",size:"sm",onClick:()=>p(),children:"Retry"}),e[21]=p,e[22]=m):m=e[22];let h;return e[23]!==l||e[24]!==m?(h=t.jsx(J,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[l,m]})}),e[23]=l,e[24]=m,e[25]=h):h=e[25],h}let y,b;e[26]!==j?.organizations?(y=(j?.organizations??[]).flatMap(Pe),b=y.some(Ae),e[26]=j?.organizations,e[27]=y,e[28]=b):(y=e[27],b=e[28]);const $=b;if(A){let l;e[29]!==c?(l=c?.split(" ")[0]??"",e[29]=c,e[30]=l):l=e[30];let m;e[31]===Symbol.for("react.memo_cache_sentinel")?(m=()=>_(!1),e[31]=m):m=e[31];let h;return e[32]!==o||e[33]!==a||e[34]!==r||e[35]!==l?(h=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:l,allowDomainClaim:!1,onBack:m}),e[32]=o,e[33]=a,e[34]=r,e[35]=l,e[36]=h):h=e[36],h}if(y.length>0){const l=$?y.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",m=$?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[37]!==l||e[38]!==m?(h=t.jsx(ie,{title:l,description:m}),e[37]=l,e[38]=m,e[39]=h):h=e[39];let z;e[40]===Symbol.for("react.memo_cache_sentinel")?(z=D=>C(R=>new Set(R).add(D)),e[40]=z):z=e[40];let S;e[41]!==y||e[42]!==a||e[43]!==k?(S=t.jsx(be,{organizations:y,domain:a,requestedSlugs:k,onRequestedSlug:z,onJoined:Le}),e[41]=y,e[42]=a,e[43]=k,e[44]=S):S=e[44];let P;e[45]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>_(!0),children:"Create a new organization instead"}),e[45]=P):P=e[45];let O;return e[46]!==S||e[47]!==h?(O=t.jsx(J,{children:t.jsxs("div",{className:"grid gap-10",children:[h,S,P]})}),e[46]=S,e[47]=h,e[48]=O):O=e[48],O}let w;return e[49]!==u||e[50]!==o||e[51]!==a||e[52]!==r?(w=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:u}),e[49]=u,e[50]=o,e[51]=a,e[52]=r,e[53]=w):w=e[53],w}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function ne(i){const e=K.c(70),{isCorporateEmail:g,emailDomain:c,domainLabel:u,defaultName:o,allowDomainClaim:a,onBack:r}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${c}&sz=128`:null,[s,j]=E.useState(o),[d,N]=E.useState(f),[p,L]=E.useState(!0),[k,C]=E.useState(null);let A;e[0]!==p||e[1]!==d||e[2]!==s?(A=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:d??void 0,claimDomain:p})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error||"Failed to set up organization");return v},e[0]=p,e[1]=d,e[2]=s,e[3]=A):A=e[3];let _;e[4]!==p?(_=x=>{if(!x.slug)return;const v=ue.filter(ge=>p||!ge.claimOnly).length,G=fe*(v-1)+800;C(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},G)},e[4]=p,e[5]=_):_=e[5];let y;e[6]!==A||e[7]!==_?(y={mutationFn:A,onSuccess:_},e[6]=A,e[7]=_,e[8]=y):y=e[8];const b=oe(y);let $;e[9]!==d||e[10]!==s?($={mutationFn:async()=>{const x=s.trim(),v=se(x);if(!v)throw new Error("Invalid organization name");const G=await re.organization.create({name:x,slug:v,...d?{logo:d}:{}});if(G?.error)throw new Error(G.error.message||"Failed to create organization");window.location.href=`/${G?.data?.slug??v}`}},e[9]=d,e[10]=s,e[11]=$):$=e[11];const w=oe($);if(b.isPending||k){let x;e[12]!==u||e[13]!==s?(x=s.trim()||u,e[12]=u,e[13]=s,e[14]=x):x=e[14];let v;return e[15]!==p||e[16]!==c||e[17]!==d||e[18]!==x?(v=t.jsx(J,{children:t.jsx(Fe,{orgName:x,domain:c,claimDomain:p,logoUrl:d})}),e[15]=p,e[16]=c,e[17]=d,e[18]=x,e[19]=v):v=e[19],v}const l=w.isPending;let m;e[20]!==s?(m=se(s.trim()),e[20]=s,e[21]=m):m=e[21];const h=!!m,z=b.error||w.error||null;let S;e[22]!==n||e[23]!==h||e[24]!==w||e[25]!==b||e[26]!==g?(S=x=>{x.preventDefault(),h&&(g&&n?b.mutate():w.mutate())},e[22]=n,e[23]=h,e[24]=w,e[25]=b,e[26]=g,e[27]=S):S=e[27];const P=S;let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=O):O=e[28];let D;e[29]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=D):D=e[29];let R;e[30]!==o||e[31]!==s?(R=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=R):R=e[32];const Z=l||b.isPending;let F;e[33]!==d||e[34]!==R||e[35]!==Z?(F=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[D,t.jsx($e,{value:d,fallback:R,onChange:N,disabled:Z})]}),e[33]=d,e[34]=R,e[35]=Z,e[36]=F):F=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>j(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=l||b.isPending;let M;e[39]!==s||e[40]!==ee||e[41]!==te?(M=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=M):M=e[42];let q;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==c||e[47]!==g||e[48]!==l?(q=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",c," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",c," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:L,disabled:l||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=c,e[47]=g,e[48]=l,e[49]=q):q=e[49];let U;e[50]!==F||e[51]!==M||e[52]!==q?(U=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[F,M,q]}),e[50]=F,e[51]=M,e[52]=q,e[53]=U):U=e[53];let T;e[54]!==z?(T=z&&t.jsx("p",{className:"text-xs text-destructive",children:z instanceof Error?z.message:"Failed to create organization"}),e[54]=z,e[55]=T):T=e[55];const ae=!h||l||b.isPending;let I;e[56]!==b.isPending||e[57]!==l?(I=l||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=l,e[58]=I):I=e[58];let B;e[59]!==ae||e[60]!==I?(B=t.jsx(ce,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:I}),e[59]=ae,e[60]=I,e[61]=B):B=e[61];let Y;e[62]!==r?(Y=r&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:r,children:"See available organizations"}),e[62]=r,e[63]=Y):Y=e[63];let V;return e[64]!==P||e[65]!==U||e[66]!==T||e[67]!==B||e[68]!==Y?(V=t.jsx(J,{children:t.jsxs("form",{onSubmit:P,className:"grid gap-10",children:[O,U,T,B,Y]})}),e[64]=P,e[65]=U,e[66]=T,e[67]=B,e[68]=Y,e[69]=V):V=e[69],V}function $e(i){const e=K.c(14),{value:g,fallback:c,onChange:u,disabled:o}=i,a=E.useRef(null);let r;e[0]!==u?(r=L=>{const k=L.target.files?.[0];if(!k)return;if(k.size>2097152){me.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const C=new FileReader;C.onerror=De,C.onloadend=()=>{C.result&&u(C.result),a.current&&(a.current.value="")},C.readAsDataURL(k)},e[0]=u,e[1]=r):r=e[1];const n=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const j=g??void 0;let d;e[6]!==c||e[7]!==j?(d=t.jsx(de,{url:j,fallback:c,shape:"square",size:"base"}),e[6]=c,e[7]=j,e[8]=d):d=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Ce,{size:14,className:"text-white"})}),e[9]=N):N=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==d?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,d,N]}),e[10]=o,e[11]=s,e[12]=d,e[13]=p):p=e[13],p}function De(){return me.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:c}){const u=ue.filter(n=>g||!n.claimOnly),[o,a]=E.useState(0),r=E.useRef(!1);if(!r.current){r.current=!0;for(let n=1;n<u.length;n++)setTimeout(()=>a(n),fe*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:c??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:u.map((n,f)=>{const s=n.icon,j=f===o,d=f<o,N=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||j?1:.4},children:[t.jsxs("span",{className:W("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(j?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:N.bg,color:N.fg}:void 0,children:[t.jsx(we,{size:16,className:W("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:W("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",j?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:W("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!j?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:W("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",j||d?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
1
+ import{c as K,j as t,a as re,i as X,r as E,m as pe,K as he,B as ce,d as oe,l as W,t as me}from"./index-CAIYhjul.js";import{R as xe}from"./required-auth-layout-CoT_XXkN.js";import{A as J}from"./auth-split-layout-DYTsk60r.js";import{O as be}from"./organization-choice-D9DKvqVz.js";import{A as de}from"./avatar-CB-s6LW3.js";import{I as je}from"./input-Dzav8ivG.js";import{L as ye}from"./label-DaAsoL9V.js";import{S as ve}from"./switch-DG2ijYXZ.js";import{t as Ne,a as Se}from"./Users03-CTnD7KhC.js";import{i as we}from"./CheckCircle-D6vue6JR.js";import{t as ze}from"./Globe04-Cf7fSPDC.js";import{a as ke}from"./Palette-DUf6RWjx.js";import{i as Ce}from"./Upload01-BWPUocl6.js";import"./User01-s23e9wZl.js";const _e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=K.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=K.c(13),{title:g,description:c,logoUrl:u,logoFallback:o}=i;let a;e[0]!==o||e[1]!==u?(a=t.jsx("div",{children:u?t.jsx(de,{url:u,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=u,e[2]=a):a=e[2];let r;e[3]!==g?(r=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=r):r=e[4];let n;e[5]!==c?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:c}),e[5]=c,e[6]=n):n=e[6];let f;e[7]!==r||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[r,n]}),e[7]=r,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=K.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(J,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const c=e?.user?.email??"",u=e?.user?.name;let o;return i[1]!==u||i[2]!==c?(o=t.jsx(Ee,{email:c,userName:u}),i[1]=u,i[2]=c,i[3]=o):o=i[3],o}function Ee(i){const e=K.c(54),{email:g,userName:c}=i;let u,o,a,r,n,f;if(e[0]!==g||e[1]!==c){a=g.split("@")[1]?.toLowerCase()??"",r=!!a&&!_e.has(a);const l=a.split(".")[0]??"";o=l.charAt(0).toUpperCase()+l.slice(1);let m;e[8]!==o||e[9]!==r||e[10]!==c?(m=r?o:c?.split(" ")[0]??"",e[8]=o,e[9]=r,e[10]=c,e[11]=m):m=e[11],u=m,f=pe,n=he.domainLookup(a),e[0]=g,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=n,e[7]=f}else u=e[2],o=e[3],a=e[4],r=e[5],n=e[6],f=e[7];let s;e[12]!==r||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:r},e[12]=r,e[13]=n,e[14]=s):s=e[14];const{data:j,isLoading:d,isError:N,refetch:p}=f(s);let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=new Set,e[15]=L):L=e[15];const[k,C]=E.useState(L),[A,_]=E.useState(!1);if(d){let l;e[16]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=l):l=e[16];let m;return e[17]!==a?(m=t.jsx(J,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=m):m=e[18],m}if(N){let l;e[19]!==a?(l=t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Couldn't check ",a," for an existing organization."]}),e[19]=a,e[20]=l):l=e[20];let m;e[21]!==p?(m=t.jsx(ce,{variant:"outline",size:"sm",onClick:()=>p(),children:"Retry"}),e[21]=p,e[22]=m):m=e[22];let h;return e[23]!==l||e[24]!==m?(h=t.jsx(J,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[l,m]})}),e[23]=l,e[24]=m,e[25]=h):h=e[25],h}let y,b;e[26]!==j?.organizations?(y=(j?.organizations??[]).flatMap(Pe),b=y.some(Ae),e[26]=j?.organizations,e[27]=y,e[28]=b):(y=e[27],b=e[28]);const $=b;if(A){let l;e[29]!==c?(l=c?.split(" ")[0]??"",e[29]=c,e[30]=l):l=e[30];let m;e[31]===Symbol.for("react.memo_cache_sentinel")?(m=()=>_(!1),e[31]=m):m=e[31];let h;return e[32]!==o||e[33]!==a||e[34]!==r||e[35]!==l?(h=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:l,allowDomainClaim:!1,onBack:m}),e[32]=o,e[33]=a,e[34]=r,e[35]=l,e[36]=h):h=e[36],h}if(y.length>0){const l=$?y.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",m=$?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[37]!==l||e[38]!==m?(h=t.jsx(ie,{title:l,description:m}),e[37]=l,e[38]=m,e[39]=h):h=e[39];let z;e[40]===Symbol.for("react.memo_cache_sentinel")?(z=D=>C(R=>new Set(R).add(D)),e[40]=z):z=e[40];let S;e[41]!==y||e[42]!==a||e[43]!==k?(S=t.jsx(be,{organizations:y,domain:a,requestedSlugs:k,onRequestedSlug:z,onJoined:Le}),e[41]=y,e[42]=a,e[43]=k,e[44]=S):S=e[44];let P;e[45]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>_(!0),children:"Create a new organization instead"}),e[45]=P):P=e[45];let O;return e[46]!==S||e[47]!==h?(O=t.jsx(J,{children:t.jsxs("div",{className:"grid gap-10",children:[h,S,P]})}),e[46]=S,e[47]=h,e[48]=O):O=e[48],O}let w;return e[49]!==u||e[50]!==o||e[51]!==a||e[52]!==r?(w=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:u}),e[49]=u,e[50]=o,e[51]=a,e[52]=r,e[53]=w):w=e[53],w}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function ne(i){const e=K.c(70),{isCorporateEmail:g,emailDomain:c,domainLabel:u,defaultName:o,allowDomainClaim:a,onBack:r}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${c}&sz=128`:null,[s,j]=E.useState(o),[d,N]=E.useState(f),[p,L]=E.useState(!0),[k,C]=E.useState(null);let A;e[0]!==p||e[1]!==d||e[2]!==s?(A=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:d??void 0,claimDomain:p})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error||"Failed to set up organization");return v},e[0]=p,e[1]=d,e[2]=s,e[3]=A):A=e[3];let _;e[4]!==p?(_=x=>{if(!x.slug)return;const v=ue.filter(ge=>p||!ge.claimOnly).length,G=fe*(v-1)+800;C(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},G)},e[4]=p,e[5]=_):_=e[5];let y;e[6]!==A||e[7]!==_?(y={mutationFn:A,onSuccess:_},e[6]=A,e[7]=_,e[8]=y):y=e[8];const b=oe(y);let $;e[9]!==d||e[10]!==s?($={mutationFn:async()=>{const x=s.trim(),v=se(x);if(!v)throw new Error("Invalid organization name");const G=await re.organization.create({name:x,slug:v,...d?{logo:d}:{}});if(G?.error)throw new Error(G.error.message||"Failed to create organization");window.location.href=`/${G?.data?.slug??v}`}},e[9]=d,e[10]=s,e[11]=$):$=e[11];const w=oe($);if(b.isPending||k){let x;e[12]!==u||e[13]!==s?(x=s.trim()||u,e[12]=u,e[13]=s,e[14]=x):x=e[14];let v;return e[15]!==p||e[16]!==c||e[17]!==d||e[18]!==x?(v=t.jsx(J,{children:t.jsx(Fe,{orgName:x,domain:c,claimDomain:p,logoUrl:d})}),e[15]=p,e[16]=c,e[17]=d,e[18]=x,e[19]=v):v=e[19],v}const l=w.isPending;let m;e[20]!==s?(m=se(s.trim()),e[20]=s,e[21]=m):m=e[21];const h=!!m,z=b.error||w.error||null;let S;e[22]!==n||e[23]!==h||e[24]!==w||e[25]!==b||e[26]!==g?(S=x=>{x.preventDefault(),h&&(g&&n?b.mutate():w.mutate())},e[22]=n,e[23]=h,e[24]=w,e[25]=b,e[26]=g,e[27]=S):S=e[27];const P=S;let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=O):O=e[28];let D;e[29]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=D):D=e[29];let R;e[30]!==o||e[31]!==s?(R=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=R):R=e[32];const Z=l||b.isPending;let F;e[33]!==d||e[34]!==R||e[35]!==Z?(F=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[D,t.jsx($e,{value:d,fallback:R,onChange:N,disabled:Z})]}),e[33]=d,e[34]=R,e[35]=Z,e[36]=F):F=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>j(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=l||b.isPending;let M;e[39]!==s||e[40]!==ee||e[41]!==te?(M=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=M):M=e[42];let q;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==c||e[47]!==g||e[48]!==l?(q=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",c," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",c," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:L,disabled:l||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=c,e[47]=g,e[48]=l,e[49]=q):q=e[49];let U;e[50]!==F||e[51]!==M||e[52]!==q?(U=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[F,M,q]}),e[50]=F,e[51]=M,e[52]=q,e[53]=U):U=e[53];let T;e[54]!==z?(T=z&&t.jsx("p",{className:"text-xs text-destructive",children:z instanceof Error?z.message:"Failed to create organization"}),e[54]=z,e[55]=T):T=e[55];const ae=!h||l||b.isPending;let I;e[56]!==b.isPending||e[57]!==l?(I=l||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=l,e[58]=I):I=e[58];let B;e[59]!==ae||e[60]!==I?(B=t.jsx(ce,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:I}),e[59]=ae,e[60]=I,e[61]=B):B=e[61];let Y;e[62]!==r?(Y=r&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:r,children:"See available organizations"}),e[62]=r,e[63]=Y):Y=e[63];let V;return e[64]!==P||e[65]!==U||e[66]!==T||e[67]!==B||e[68]!==Y?(V=t.jsx(J,{children:t.jsxs("form",{onSubmit:P,className:"grid gap-10",children:[O,U,T,B,Y]})}),e[64]=P,e[65]=U,e[66]=T,e[67]=B,e[68]=Y,e[69]=V):V=e[69],V}function $e(i){const e=K.c(14),{value:g,fallback:c,onChange:u,disabled:o}=i,a=E.useRef(null);let r;e[0]!==u?(r=L=>{const k=L.target.files?.[0];if(!k)return;if(k.size>2097152){me.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const C=new FileReader;C.onerror=De,C.onloadend=()=>{C.result&&u(C.result),a.current&&(a.current.value="")},C.readAsDataURL(k)},e[0]=u,e[1]=r):r=e[1];const n=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const j=g??void 0;let d;e[6]!==c||e[7]!==j?(d=t.jsx(de,{url:j,fallback:c,shape:"square",size:"base"}),e[6]=c,e[7]=j,e[8]=d):d=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Ce,{size:14,className:"text-white"})}),e[9]=N):N=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==d?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,d,N]}),e[10]=o,e[11]=s,e[12]=d,e[13]=p):p=e[13],p}function De(){return me.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:c}){const u=ue.filter(n=>g||!n.claimOnly),[o,a]=E.useState(0),r=E.useRef(!1);if(!r.current){r.current=!0;for(let n=1;n<u.length;n++)setTimeout(()=>a(n),fe*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:c??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:u.map((n,f)=>{const s=n.icon,j=f===o,d=f<o,N=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||j?1:.4},children:[t.jsxs("span",{className:W("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(j?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:N.bg,color:N.fg}:void 0,children:[t.jsx(we,{size:16,className:W("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:W("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",j?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:W("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!j?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:W("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",j||d?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
@@ -1 +1 @@
1
- import{c as k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-CxWNtx9x.js";const L="#f6f4ed",P="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:P,theme_color:L,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function U(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function M(e){const n=k.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=U("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),z.useLayoutEffect(a,c)}function D(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],M(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=C||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{D as default};
1
+ import{c as k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-CAIYhjul.js";const L="#f6f4ed",P="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:P,theme_color:L,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function U(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function M(e){const n=k.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=U("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),z.useLayoutEffect(a,c)}function D(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],M(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=C||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{D as default};
@@ -1 +1 @@
1
- import{c as o,j as r,O as s}from"./index-CxWNtx9x.js";function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{c as default};
1
+ import{c as o,j as r,O as s}from"./index-CAIYhjul.js";function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{c as default};
@@ -1 +1 @@
1
- import{c as T,r as U,d as F,j as t,B as J,i as O}from"./index-CxWNtx9x.js";import{A as $}from"./avatar-BxCDP7Ot.js";async function P(l,e,f){const i=await fetch(l,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:e})}),r=await i.json();if(!i.ok||!r.success)throw new Error(r.error||f);return r}function K(l){const e=T.c(41),{organizations:f,domain:i,requestedSlugs:r,onRequestedSlug:k,onSelected:p,onJoined:c,onRequestCompleted:y,selectLabel:E}=l,h=E===void 0?"Select":E;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=new Set,e[0]=b):b=e[0];const[M,A]=U.useState(b);let w;e[1]!==k?(w=o=>{A(s=>new Set(s).add(o)),k?.(o)},e[1]=k,e[2]=w):w=e[2];const _=w;let N;e[3]!==c?(N={mutationFn:G,onSuccess:o=>{const{organization:s,slug:x}=o;c?.(s,x)}},e[3]=c,e[4]=N):N=e[4];const n=F(N);let R;e[5]!==_||e[6]!==c||e[7]!==y?(R={mutationFn:D,onSuccess:o=>{const{organization:s,slug:x,alreadyMember:C}=o;if(C&&x){c?.(s,x);return}_(s.slug),y?.(s)}},e[5]=_,e[6]=c,e[7]=y,e[8]=R):R=e[8];const a=F(R);let u;e[9]!==r?(u=r??[],e[9]=r,e[10]=u):u=e[10];let v;e[11]!==M||e[12]!==u?(v=new Set([...u,...M]),e[11]=M,e[12]=u,e[13]=v):v=e[13];const j=v,q=n.variables?.slug??null,S=a.variables?.slug??null;let d;if(e[14]!==i||e[15]!==j||e[16]!==n||e[17]!==p||e[18]!==f||e[19]!==q||e[20]!==S||e[21]!==a||e[22]!==h){let o;e[24]!==i||e[25]!==j||e[26]!==n||e[27]!==p||e[28]!==q||e[29]!==S||e[30]!==a||e[31]!==h?(o=s=>{const x=n.isPending&&q===s.slug,C=a.isPending&&S===s.slug,L=j.has(s.slug),B=s.logo??(i?`https://www.google.com/s2/favicons?domain=${i}&sz=128`:null);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx($,{url:B??void 0,fallback:s.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:s.name}),i&&t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",i]})]}),s.joinMode==="auto"?t.jsx(J,{size:"default",onClick:()=>n.mutate(s),disabled:n.isPending,children:x?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," Joining..."]}):"Join"}):s.joinMode==="request"?L?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(J,{size:"default",variant:"outline",onClick:()=>a.mutate(s),disabled:a.isPending,children:C?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"}):t.jsx(J,{size:"default",onClick:()=>p?.(s),children:h})]},s.id)},e[24]=i,e[25]=j,e[26]=n,e[27]=p,e[28]=q,e[29]=S,e[30]=a,e[31]=h,e[32]=o):o=e[32],d=f.map(o),e[14]=i,e[15]=j,e[16]=n,e[17]=p,e[18]=f,e[19]=q,e[20]=S,e[21]=a,e[22]=h,e[23]=d}else d=e[23];let m;e[33]!==n.error?(m=n.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[33]=n.error,e[34]=m):m=e[34];let g;e[35]!==a.error?(g=a.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[35]=a.error,e[36]=g):g=e[36];let z;return e[37]!==g||e[38]!==d||e[39]!==m?(z=t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g]}),e[37]=g,e[38]=d,e[39]=m,e[40]=z):z=e[40],z}async function D(l){const e=await P("/api/auth/custom/domain-request-join",l.slug,"Failed to request access");return{organization:l,slug:e.slug,alreadyMember:e.alreadyMember}}async function G(l){const e=await P("/api/auth/custom/domain-join",l.slug,"Failed to join organization");return{organization:l,slug:e.slug??l.slug}}export{K as O};
1
+ import{c as T,r as U,d as F,j as t,B as J,i as O}from"./index-CAIYhjul.js";import{A as $}from"./avatar-CB-s6LW3.js";async function P(l,e,f){const i=await fetch(l,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:e})}),r=await i.json();if(!i.ok||!r.success)throw new Error(r.error||f);return r}function K(l){const e=T.c(41),{organizations:f,domain:i,requestedSlugs:r,onRequestedSlug:k,onSelected:p,onJoined:c,onRequestCompleted:y,selectLabel:E}=l,h=E===void 0?"Select":E;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=new Set,e[0]=b):b=e[0];const[M,A]=U.useState(b);let w;e[1]!==k?(w=o=>{A(s=>new Set(s).add(o)),k?.(o)},e[1]=k,e[2]=w):w=e[2];const _=w;let N;e[3]!==c?(N={mutationFn:G,onSuccess:o=>{const{organization:s,slug:x}=o;c?.(s,x)}},e[3]=c,e[4]=N):N=e[4];const n=F(N);let R;e[5]!==_||e[6]!==c||e[7]!==y?(R={mutationFn:D,onSuccess:o=>{const{organization:s,slug:x,alreadyMember:C}=o;if(C&&x){c?.(s,x);return}_(s.slug),y?.(s)}},e[5]=_,e[6]=c,e[7]=y,e[8]=R):R=e[8];const a=F(R);let u;e[9]!==r?(u=r??[],e[9]=r,e[10]=u):u=e[10];let v;e[11]!==M||e[12]!==u?(v=new Set([...u,...M]),e[11]=M,e[12]=u,e[13]=v):v=e[13];const j=v,q=n.variables?.slug??null,S=a.variables?.slug??null;let d;if(e[14]!==i||e[15]!==j||e[16]!==n||e[17]!==p||e[18]!==f||e[19]!==q||e[20]!==S||e[21]!==a||e[22]!==h){let o;e[24]!==i||e[25]!==j||e[26]!==n||e[27]!==p||e[28]!==q||e[29]!==S||e[30]!==a||e[31]!==h?(o=s=>{const x=n.isPending&&q===s.slug,C=a.isPending&&S===s.slug,L=j.has(s.slug),B=s.logo??(i?`https://www.google.com/s2/favicons?domain=${i}&sz=128`:null);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx($,{url:B??void 0,fallback:s.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:s.name}),i&&t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",i]})]}),s.joinMode==="auto"?t.jsx(J,{size:"default",onClick:()=>n.mutate(s),disabled:n.isPending,children:x?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," Joining..."]}):"Join"}):s.joinMode==="request"?L?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(J,{size:"default",variant:"outline",onClick:()=>a.mutate(s),disabled:a.isPending,children:C?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"}):t.jsx(J,{size:"default",onClick:()=>p?.(s),children:h})]},s.id)},e[24]=i,e[25]=j,e[26]=n,e[27]=p,e[28]=q,e[29]=S,e[30]=a,e[31]=h,e[32]=o):o=e[32],d=f.map(o),e[14]=i,e[15]=j,e[16]=n,e[17]=p,e[18]=f,e[19]=q,e[20]=S,e[21]=a,e[22]=h,e[23]=d}else d=e[23];let m;e[33]!==n.error?(m=n.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[33]=n.error,e[34]=m):m=e[34];let g;e[35]!==a.error?(g=a.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[35]=a.error,e[36]=g):g=e[36];let z;return e[37]!==g||e[38]!==d||e[39]!==m?(z=t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g]}),e[37]=g,e[38]=d,e[39]=m,e[40]=z):z=e[40],z}async function D(l){const e=await P("/api/auth/custom/domain-request-join",l.slug,"Failed to request access");return{organization:l,slug:e.slug,alreadyMember:e.alreadyMember}}async function G(l){const e=await P("/api/auth/custom/domain-join",l.slug,"Failed to join organization");return{organization:l,slug:e.slug??l.slug}}export{K as O};
@@ -1 +1 @@
1
- import{c as I,r as O,m as K,j as s,K as R,n as M,d as Q,B as L,t as k}from"./index-CxWNtx9x.js";import{P as T}from"./index-BXoUOnNS.js";import{C as V}from"./collection-table-wrapper-B9yKUfMg.js";import{E as $}from"./empty-state-es2nRb_j.js";import{S as U}from"./search-input-Bdl49Lyd.js";import{I as H}from"./input-C9EhK1Lu.js";import{L as J}from"./label-JPT2W8Pg.js";import{u as W}from"./use-debounced-value-DiZ6agyj.js";import{D as Y,a as G,b as X,c as Z,d as ee,e as te}from"./dialog-BxyVzjQ3.js";import{S as se,a as ie,b as ae,c as ne,d as re}from"./select-BjS6pi0R.js";import{a as q}from"./admin-fetch-CCSvjTk1.js";import{f as le}from"./format-time-BnbuEtat.js";import"./sidebar-Du3GhEXu.js";import"./LayoutLeft-B9Jd6ymK.js";import"./use-mobile-DmC5AwHK.js";import"./X-BolYo4iB.js";import"./tooltip-CTQ3jqyw.js";import"./table-7Pa2oc8U.js";import"./ArrowUp-B_VVATf8.js";import"./SearchMd-C-NJ_45S.js";import"./ChevronUp-Y_qcNB-R.js";import"./ChevronDown-ClEtq8UA.js";import"./differenceInSeconds-NQ4PDo0z.js";const oe=["owner","admin","user"];function me(t){const e=I.c(49),{org:l}=t,[g,n]=O.useState(!1),[a,p]=O.useState(""),[o,S]=O.useState("user"),x=M();let u;e[0]!==a||e[1]!==l.id||e[2]!==o?(u=()=>q(`/api/_admin/orgs/${l.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:o})}),e[0]=a,e[1]=l.id,e[2]=o,e[3]=u):u=e[3];let m;e[4]!==a||e[5]!==l.name||e[6]!==x?(m=()=>{k.success(`Added ${a.trim()} to ${l.name}`),x.invalidateQueries({queryKey:R.deploymentAdminOrgsList()}),n(!1),p(""),S("user")},e[4]=a,e[5]=l.name,e[6]=x,e[7]=m):m=e[7];let h;e[8]!==u||e[9]!==m?(h={mutationFn:u,onSuccess:m,onError:de},e[8]=u,e[9]=m,e[10]=h):h=e[10];const i=Q(h);let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(X,{asChild:!0,children:s.jsx(L,{variant:"outline",size:"sm",children:"Add member"})}),e[11]=b):b=e[11];let r;e[12]!==l.name?(r=s.jsx(Y,{children:s.jsxs(G,{children:["Add member to ",l.name]})}),e[12]=l.name,e[13]=r):r=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(J,{htmlFor:"admin-add-member-email",children:"Email"}),e[14]=c):c=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=B=>p(B.target.value),e[15]=d):d=e[15];let f;e[16]!==a||e[17]!==i.isPending?(f=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx(H,{id:"admin-add-member-email",type:"email",value:a,onChange:d,placeholder:"user@example.com",disabled:i.isPending})]}),e[16]=a,e[17]=i.isPending,e[18]=f):f=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ie,{className:"w-full",children:s.jsx(ae,{})}),e[19]=j):j=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ne,{children:oe.map(ce)}),e[20]=z):z=e[20];let y;e[21]!==i.isPending||e[22]!==o?(y=s.jsxs(se,{value:o,onValueChange:S,disabled:i.isPending,children:[j,z]}),e[21]=i.isPending,e[22]=o,e[23]=y):y=e[23];let _;e[24]!==y||e[25]!==f?(_=s.jsxs("div",{className:"space-y-4",children:[f,y]}),e[24]=y,e[25]=f,e[26]=_):_=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=()=>n(!1),e[27]=A):A=e[27];let C;e[28]!==i.isPending?(C=s.jsx(L,{variant:"outline",onClick:A,disabled:i.isPending,children:"Cancel"}),e[28]=i.isPending,e[29]=C):C=e[29];let N;e[30]!==i?(N=()=>i.mutate(),e[30]=i,e[31]=N):N=e[31];let P;e[32]!==a||e[33]!==i.isPending?(P=!a.trim()||i.isPending,e[32]=a,e[33]=i.isPending,e[34]=P):P=e[34];const F=i.isPending?"Adding...":"Add member";let v;e[35]!==N||e[36]!==P||e[37]!==F?(v=s.jsx(L,{onClick:N,disabled:P,children:F}),e[35]=N,e[36]=P,e[37]=F,e[38]=v):v=e[38];let w;e[39]!==C||e[40]!==v?(w=s.jsxs(Z,{children:[C,v]}),e[39]=C,e[40]=v,e[41]=w):w=e[41];let E;e[42]!==_||e[43]!==w||e[44]!==r?(E=s.jsxs(ee,{className:"sm:max-w-md",children:[r,_,w]}),e[42]=_,e[43]=w,e[44]=r,e[45]=E):E=e[45];let D;return e[46]!==g||e[47]!==E?(D=s.jsxs(te,{open:g,onOpenChange:n,children:[b,E]}),e[46]=g,e[47]=E,e[48]=D):D=e[48],D}function ce(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function de(t){k.error(t instanceof Error?t.message:"Failed to add member")}function ke(){const t=I.c(24),[e,l]=O.useState("");let g;t[0]!==e?(g=e.trim(),t[0]=e,t[1]=g):g=t[1];const n=W(g,300);let a;t[2]!==n?(a=R.deploymentAdminOrgs(n),t[2]=n,t[3]=a):a=t[3];let p;t[4]!==n?(p=()=>{const j=new URLSearchParams({limit:"100"});return n&&j.set("search",n),q(`/api/_admin/orgs?${j}`)},t[4]=n,t[5]=p):p=t[5];let o;t[6]!==a||t[7]!==p?(o={queryKey:a,queryFn:p},t[6]=a,t[7]=p,t[8]=o):o=t[8];const{data:S,isLoading:x,isError:u}=K(o);let m;t[9]!==S?.organizations?(m=S?.organizations??[],t[9]=S?.organizations,t[10]=m):m=t[10];const h=m;let i;t[11]===Symbol.for("react.memo_cache_sentinel")?(i=[{id:"name",header:"Organization",render:ge,cellClassName:"flex-1 min-w-0"},{id:"members",header:"Members",render:pe,cellClassName:"w-24 shrink-0"},{id:"created",header:"Created",render:ue,cellClassName:"w-48 shrink-0"},{id:"actions",header:"",render:fe,cellClassName:"w-32 shrink-0"}],t[11]=i):i=t[11];const b=i;let r;t[12]!==e?(r=s.jsx(U,{value:e,onChange:l,placeholder:"Search organizations by name or slug...",className:"w-full md:w-[375px]"}),t[12]=e,t[13]=r):r=t[13];let c;t[14]!==n||t[15]!==u?(c=u?s.jsx($,{title:"Failed to load organizations",description:"Something went wrong. Refresh to try again."}):s.jsx($,{title:"No organizations found",description:n?`No organizations match "${n}"`:"No organizations exist yet."}),t[14]=n,t[15]=u,t[16]=c):c=t[16];let d;t[17]!==x||t[18]!==h||t[19]!==c?(d=s.jsx(V,{columns:b,data:h,isLoading:x,emptyState:c}),t[17]=x,t[18]=h,t[19]=c,t[20]=d):d=t[20];let f;return t[21]!==r||t[22]!==d?(f=s.jsx(T,{children:s.jsx(T.Content,{children:s.jsx(T.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[r,d]})})})}),t[21]=r,t[22]=d,t[23]=f):f=t[23],f}function fe(t){return s.jsx(me,{org:t})}function ue(t){return s.jsx("span",{className:"text-sm text-foreground",children:le(t.createdAt)})}function pe(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function ge(t){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{ke as default};
1
+ import{c as I,r as O,m as K,j as s,K as R,n as M,d as Q,B as L,t as k}from"./index-CAIYhjul.js";import{P as T}from"./index-CUgYJaPV.js";import{C as V}from"./collection-table-wrapper-DjmKYjAk.js";import{E as $}from"./empty-state-DQOY2xmV.js";import{S as U}from"./search-input-Cq8-y1F0.js";import{I as H}from"./input-Dzav8ivG.js";import{L as J}from"./label-DaAsoL9V.js";import{u as W}from"./use-debounced-value-Bc5YBXDl.js";import{D as Y,a as G,b as X,c as Z,d as ee,e as te}from"./dialog-BFqbrhnG.js";import{S as se,a as ie,b as ae,c as ne,d as re}from"./select-peZlJuYe.js";import{a as q}from"./admin-fetch-CCSvjTk1.js";import{f as le}from"./format-time-BnbuEtat.js";import"./sidebar-BjlDvhlo.js";import"./LayoutLeft-uipFY-Sc.js";import"./use-mobile-COWtBi3l.js";import"./X-CLk-1WTe.js";import"./tooltip-DBcnpVTx.js";import"./table-fSAZqdik.js";import"./ArrowUp-BeEo8zxR.js";import"./SearchMd-CjaEgvWB.js";import"./ChevronUp-B2kc02W-.js";import"./ChevronDown-Chms7f47.js";import"./differenceInSeconds-NQ4PDo0z.js";const oe=["owner","admin","user"];function me(t){const e=I.c(49),{org:l}=t,[g,n]=O.useState(!1),[a,p]=O.useState(""),[o,S]=O.useState("user"),x=M();let u;e[0]!==a||e[1]!==l.id||e[2]!==o?(u=()=>q(`/api/_admin/orgs/${l.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:o})}),e[0]=a,e[1]=l.id,e[2]=o,e[3]=u):u=e[3];let m;e[4]!==a||e[5]!==l.name||e[6]!==x?(m=()=>{k.success(`Added ${a.trim()} to ${l.name}`),x.invalidateQueries({queryKey:R.deploymentAdminOrgsList()}),n(!1),p(""),S("user")},e[4]=a,e[5]=l.name,e[6]=x,e[7]=m):m=e[7];let h;e[8]!==u||e[9]!==m?(h={mutationFn:u,onSuccess:m,onError:de},e[8]=u,e[9]=m,e[10]=h):h=e[10];const i=Q(h);let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(X,{asChild:!0,children:s.jsx(L,{variant:"outline",size:"sm",children:"Add member"})}),e[11]=b):b=e[11];let r;e[12]!==l.name?(r=s.jsx(Y,{children:s.jsxs(G,{children:["Add member to ",l.name]})}),e[12]=l.name,e[13]=r):r=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(J,{htmlFor:"admin-add-member-email",children:"Email"}),e[14]=c):c=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=B=>p(B.target.value),e[15]=d):d=e[15];let f;e[16]!==a||e[17]!==i.isPending?(f=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx(H,{id:"admin-add-member-email",type:"email",value:a,onChange:d,placeholder:"user@example.com",disabled:i.isPending})]}),e[16]=a,e[17]=i.isPending,e[18]=f):f=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ie,{className:"w-full",children:s.jsx(ae,{})}),e[19]=j):j=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ne,{children:oe.map(ce)}),e[20]=z):z=e[20];let y;e[21]!==i.isPending||e[22]!==o?(y=s.jsxs(se,{value:o,onValueChange:S,disabled:i.isPending,children:[j,z]}),e[21]=i.isPending,e[22]=o,e[23]=y):y=e[23];let _;e[24]!==y||e[25]!==f?(_=s.jsxs("div",{className:"space-y-4",children:[f,y]}),e[24]=y,e[25]=f,e[26]=_):_=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=()=>n(!1),e[27]=A):A=e[27];let C;e[28]!==i.isPending?(C=s.jsx(L,{variant:"outline",onClick:A,disabled:i.isPending,children:"Cancel"}),e[28]=i.isPending,e[29]=C):C=e[29];let N;e[30]!==i?(N=()=>i.mutate(),e[30]=i,e[31]=N):N=e[31];let P;e[32]!==a||e[33]!==i.isPending?(P=!a.trim()||i.isPending,e[32]=a,e[33]=i.isPending,e[34]=P):P=e[34];const F=i.isPending?"Adding...":"Add member";let v;e[35]!==N||e[36]!==P||e[37]!==F?(v=s.jsx(L,{onClick:N,disabled:P,children:F}),e[35]=N,e[36]=P,e[37]=F,e[38]=v):v=e[38];let w;e[39]!==C||e[40]!==v?(w=s.jsxs(Z,{children:[C,v]}),e[39]=C,e[40]=v,e[41]=w):w=e[41];let E;e[42]!==_||e[43]!==w||e[44]!==r?(E=s.jsxs(ee,{className:"sm:max-w-md",children:[r,_,w]}),e[42]=_,e[43]=w,e[44]=r,e[45]=E):E=e[45];let D;return e[46]!==g||e[47]!==E?(D=s.jsxs(te,{open:g,onOpenChange:n,children:[b,E]}),e[46]=g,e[47]=E,e[48]=D):D=e[48],D}function ce(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function de(t){k.error(t instanceof Error?t.message:"Failed to add member")}function ke(){const t=I.c(24),[e,l]=O.useState("");let g;t[0]!==e?(g=e.trim(),t[0]=e,t[1]=g):g=t[1];const n=W(g,300);let a;t[2]!==n?(a=R.deploymentAdminOrgs(n),t[2]=n,t[3]=a):a=t[3];let p;t[4]!==n?(p=()=>{const j=new URLSearchParams({limit:"100"});return n&&j.set("search",n),q(`/api/_admin/orgs?${j}`)},t[4]=n,t[5]=p):p=t[5];let o;t[6]!==a||t[7]!==p?(o={queryKey:a,queryFn:p},t[6]=a,t[7]=p,t[8]=o):o=t[8];const{data:S,isLoading:x,isError:u}=K(o);let m;t[9]!==S?.organizations?(m=S?.organizations??[],t[9]=S?.organizations,t[10]=m):m=t[10];const h=m;let i;t[11]===Symbol.for("react.memo_cache_sentinel")?(i=[{id:"name",header:"Organization",render:ge,cellClassName:"flex-1 min-w-0"},{id:"members",header:"Members",render:pe,cellClassName:"w-24 shrink-0"},{id:"created",header:"Created",render:ue,cellClassName:"w-48 shrink-0"},{id:"actions",header:"",render:fe,cellClassName:"w-32 shrink-0"}],t[11]=i):i=t[11];const b=i;let r;t[12]!==e?(r=s.jsx(U,{value:e,onChange:l,placeholder:"Search organizations by name or slug...",className:"w-full md:w-[375px]"}),t[12]=e,t[13]=r):r=t[13];let c;t[14]!==n||t[15]!==u?(c=u?s.jsx($,{title:"Failed to load organizations",description:"Something went wrong. Refresh to try again."}):s.jsx($,{title:"No organizations found",description:n?`No organizations match "${n}"`:"No organizations exist yet."}),t[14]=n,t[15]=u,t[16]=c):c=t[16];let d;t[17]!==x||t[18]!==h||t[19]!==c?(d=s.jsx(V,{columns:b,data:h,isLoading:x,emptyState:c}),t[17]=x,t[18]=h,t[19]=c,t[20]=d):d=t[20];let f;return t[21]!==r||t[22]!==d?(f=s.jsx(T,{children:s.jsx(T.Content,{children:s.jsx(T.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[r,d]})})})}),t[21]=r,t[22]=d,t[23]=f):f=t[23],f}function fe(t){return s.jsx(me,{org:t})}function ue(t){return s.jsx("span",{className:"text-sm text-foreground",children:le(t.createdAt)})}function pe(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function ge(t){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{ke as default};
@@ -1 +1 @@
1
- import{c as L,n as te,K as U,j as a,r as M,l as ne}from"./index-CxWNtx9x.js";import{i as oe,b as se,r as z,c as re,d as ie,e as le,g as ce,S as ae}from"./index-CesmbZpg.js";import{L as Y}from"./label-JPT2W8Pg.js";import{S as $}from"./switch-Co9VnPF1.js";import{d as ue,a as fe,b as pe,c as de,S as ye}from"./select-BjS6pi0R.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ee(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function je(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(Ee(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=je(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=E=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,E)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=E=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:E}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const j={...o};if(T)delete j[u];else{const D=r?.[u];j[u]=D??(u==="type"?"website":"")}s(j)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const E=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const j=p&&d.includes(u),D=j&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),j&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>E(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const j=me(s);p(j),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const j=Se(T,n);p(j)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let E;e[8]!==h||e[9]!==f?(E=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=E):E=e[10];const P=E;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,w as a,qe as b,Ce as c,Z as d,je as f,k as i,Ze as r,He as u};
1
+ import{c as L,n as te,K as U,j as a,r as M,l as ne}from"./index-CAIYhjul.js";import{i as oe,b as se,r as z,c as re,d as ie,e as le,g as ce,S as ae}from"./index-BmwqFaiy.js";import{L as Y}from"./label-DaAsoL9V.js";import{S as $}from"./switch-DG2ijYXZ.js";import{d as ue,a as fe,b as pe,c as de,S as ye}from"./select-peZlJuYe.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ee(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function je(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(Ee(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=je(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=E=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,E)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=E=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:E}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const j={...o};if(T)delete j[u];else{const D=r?.[u];j[u]=D??(u==="type"?"website":"")}s(j)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const E=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const j=p&&d.includes(u),D=j&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),j&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>E(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const j=me(s);p(j),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const j=Se(T,n);p(j)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let E;e[8]!==h||e[9]!==f?(E=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=E):E=e[10];const P=E;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,w as a,qe as b,Ce as c,Z as d,je as f,k as i,Ze as r,He as u};
@@ -0,0 +1 @@
1
+ import{c as it,r as E,j as e,i as rt}from"./index-CAIYhjul.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-BjlDvhlo.js";import{m as nt}from"./automation-runs-C0y-Gi-l.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-DZCzqL8q.js";import{r as xt}from"./index-BmwqFaiy.js";import"./LayoutLeft-uipFY-Sc.js";import"./use-mobile-COWtBi3l.js";import"./X-CLk-1WTe.js";import"./tooltip-DBcnpVTx.js";import"./select-peZlJuYe.js";import"./ChevronUp-B2kc02W-.js";import"./ChevronDown-Chms7f47.js";import"./useInfiniteQuery-BSKFC7YM.js";import"./use-infinite-scroll-C_OzT98l.js";import"./use-connection-DRK2N5z2.js";import"./use-collections-DHkHvLr2.js";import"./use-mcp-client-BRDJsS2i.js";import"./auth-D4yHRD2-.js";import"./use-virtual-mcp-63tB8KYL.js";import"./card-BJLhqcLf.js";import"./table-fSAZqdik.js";import"./empty-state-DQOY2xmV.js";import"./use-members-T2DIW2PV.js";import"./use-org-auth-client-BICeQnTF.js";import"./use-clock-tick-r_qU_UzB.js";import"./AlertCircle-C-LWGksh.js";import"./CheckCircle-D6vue6JR.js";import"./DotsVertical-Bv_Wu1PR.js";import"./agent-icon-D18juLx-.js";import"./Tool01-Bk7pamHg.js";import"./ArrowUp-BeEo8zxR.js";import"./Settings02-5t6-pGmO.js";import"./Tool02-CngweHED.js";import"./XCircle-2O_4kWp7.js";import"./ArrowUpRight-Cpd1Kvoc.js";import"./TrendUp01-DsSWSiUz.js";import"./ZapSquare-T3uj9o0S.js";import"./ZoomOut-B7mxhvah.js";import"./Users03-CTnD7KhC.js";import"./ChevronRight-DGKhdwsU.js";import"./Stars02-BHQ6SybJ.js";import"./Copy01-BLPcoB-x.js";import"./Globe01-D8U_-ef0.js";import"./Eye--S6NkM5F.js";import"./FilterLines-CVyIbk7P.js";import"./Star01-DBLmagOx.js";import"./Globe04-Cf7fSPDC.js";import"./SwitchHorizontal01-Dm27fxw8.js";import"./HardDrive-BDXue_9V.js";import"./Image01-BOJVTyLq.js";import"./Key01-DgOZ1Vl-.js";import"./LinkExternal01-Cq7tHe_6.js";import"./Monitor01-C0kqyHBJ.js";import"./Sun-7RqH2_Dg.js";import"./Package-2_HSkxNk.js";import"./Palette-DUf6RWjx.js";import"./Play-D27HpOrJ.js";import"./Plus-CX4xPpn4.js";import"./SearchLg-EiBSceY9.js";import"./SearchMd-CjaEgvWB.js";import"./Shield01-DxxbOkrj.js";import"./Stars01-D-dD7V12.js";import"./Trash01-Bi1KaIxH.js";import"./Upload01-BWPUocl6.js";import"./User01-s23e9wZl.js";import"./Users01-CNMhmtlD.js";import"./XClose-DSEAQFLe.js";import"./Zap-BAgOs3IO.js";import"./use-automations-CajzdSeA.js";import"./studio-tools-C0-5Z8k5.js";import"./useSuspenseInfiniteQuery-Cwnl9Xjp.js";import"./avatar-CB-s6LW3.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BHgKL0On.js";import"./file-type-icon-D2keXo94.js";import"./dialog-BFqbrhnG.js";import"./tab-id-BijBBRwE.js";import"./hooks-BSMoXVbD.js";import"./decopilot-sse-pool-D-2tGt-o.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-BzGsRBEi.js";import"./autosend-Pu6JcU1z.js";import"./use-ai-providers-B0J5EZdH.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-lkWlYZO4.js";import"./use-organization-settings-BJBqMmWF.js";import"./monaco-editor-c4RVis_9.js";import"./index-CXCcDBTq.js";import"./index-S3X52veH.js";import"./calendar-Cy0H8dDP.js";import"./shell-layout-CTslVDtx.js";import"./required-auth-layout-CoT_XXkN.js";import"./use-org-sso-Bd_0B726.js";import"./integration-icon-Db96f3jT.js";import"./use-navigate-to-agent-DWAHU44q.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BuQ7pYh_.js";import"./form-CGKisGk6.js";import"./label-DaAsoL9V.js";import"./input-Dzav8ivG.js";import"./switch-DG2ijYXZ.js";import"./drawer-Cl_dvusi.js";import"./collection-search-Bv843kn7.js";import"./index-D2HwJQV5.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-C_q3DUZv.js";import"./use-mcp-tools-TLy2HClY.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-BlDhuvWq.js";import"./mcp-oauth-Bzb4iSTT.js";import"./extract-connection-data-C6T0yo3M.js";import"./dropdown-menu-EfeTZxQL.js";import"./popover-Zrs8wv0F.js";import"./command-DWwqFTuu.js";import"./index-DrJmHyyo.js";import"./tabs-59hacXBf.js";import"./toggle-group-CP4FEYCM.js";import"./use-deco-credits-CbUWlpHm.js";import"./connection-card-o0DDUNHv.js";import"./use-registry-connections-CmUf1QlB.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-B9TUwSCj.js";import"./connection-form-helpers-EPDDGUte.js";import"./collection-tabs-B6yGaiCr.js";import"./badge-D2OV8wRl.js";import"./connect-desktop-dialog-DEpb0pcU.js";import"./select-model-DI8jnYOT.js";import"./checkbox-fY0uDGwg.js";import"./skeleton-DeOjoVUO.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B1GgY2if.js";import"./index-BKqtjTbw.js";import"./alert-dialog-BNeEAttR.js";import"./toolbar-Bn_kiKpu.js";import"./use-debounced-value-Bc5YBXDl.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B96xiiHa.js";import"./use-capability-CEtXiCRz.js";import"./toolbar-icon-button-DChgCAZk.js";import"./use-debounced-autosave-CBxkub0J.js";import"./index-CUgYJaPV.js";import"./search-input-Cq8-y1F0.js";import"./use-mcp-auth-status-RbS9dxNI.js";import"./github-repo-picker-BRMhPL_0.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-O5sD2Bgz.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-NOLgowrv.js";import"./use-file-configs-CRDwG08w.js";import"./automation-list-row-XKqqDi6F.js";function fi(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const M=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const q=F,z=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,A=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==z?(l=e.jsx(mt,{className:"text-sm font-semibold",children:z}),t[13]=z,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==A||t[37]!==_?(S=!o||!T&&!A?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=M,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=A,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==q||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:q,children:f}),t[42]=q,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{fi as SeoSheet};
@@ -1 +1 @@
1
- import{r as i,aR as $,j as c,cR as L,aV as z,aS as A,aO as _,aU as g,cS as j,ba as w,cT as G,cU as E,c_ as H,d0 as U,aQ as V,d2 as K,c$ as W,d1 as Q,cV as Y,cW as Z,cY as q,c as R,l as B}from"./index-CxWNtx9x.js";var C="Popover",[b]=V(C,[E]),P=E(),[J,u]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(J,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var S="PopoverAnchor",X=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(j,{...s,...r,ref:e})});X.displayName=S;var F="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(j,{asChild:!0,...s,children:p})});y.displayName=F;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=K("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(U,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Y,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(Z,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(q,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=B("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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
1
+ import{r as i,aR as $,j as c,cR as L,aV as z,aS as A,aO as _,aU as g,cS as j,ba as w,cT as G,cU as E,c_ as H,d0 as U,aQ as V,d2 as K,c$ as W,d1 as Q,cV as Y,cW as Z,cY as q,c as R,l as B}from"./index-CAIYhjul.js";var C="Popover",[b]=V(C,[E]),P=E(),[J,u]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(J,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var S="PopoverAnchor",X=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(j,{...s,...r,ref:e})});X.displayName=S;var F="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(j,{asChild:!0,...s,children:p})});y.displayName=F;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=K("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(U,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Y,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(Z,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(q,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=B("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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
@@ -1 +1 @@
1
- import{c as Y,j as t,B as le}from"./index-CxWNtx9x.js";import{i as ae}from"./AlertCircle-DPEsW7A8.js";import{n as me}from"./LinkExternal01-CKVW-eEM.js";import{aL as pe,h as ne}from"./agent-icon-BGgFt2fk.js";import{I as te}from"./input-C9EhK1Lu.js";import{L as X}from"./label-JPT2W8Pg.js";import{M as ce}from"./multi-select-CTnDksvV.js";import{b as ie,c as de,T as se,a as fe}from"./tabs-DIYXMj-h.js";import{T as ue}from"./textarea-azsnX4mp.js";import{v as xe,w as he,x as ge,o as ve,y as je,z as be,I as ye,A as Ce,B as Ne,C as ke}from"./index-CesmbZpg.js";import{b as Se,T as Pe,a as we}from"./tooltip-CTQ3jqyw.js";import{b as _e,a as Be,B as Te}from"./block-document-BNPa3FEr.js";import{u as Ee}from"./use-autosave-BUYSmKJl.js";import{s as T,E as Fe,R as Re,A as Ae}from"./primitives-DdZDjvVV.js";import"./Tool01-C6ssLf07.js";import"./ArrowUp-B_VVATf8.js";import"./Settings02-CVFCJqEn.js";import"./Tool02-BHHNM_g4.js";import"./XCircle-CnJ70X3w.js";import"./ArrowUpRight-DPt871Ex.js";import"./TrendUp01-WOe5Y0pM.js";import"./ZapSquare-DMvgJwuD.js";import"./ZoomOut-B5XPtpBa.js";import"./Users03-Zrh5Q_ci.js";import"./CheckCircle-Bhjgrg4k.js";import"./ChevronUp-Y_qcNB-R.js";import"./ChevronDown-ClEtq8UA.js";import"./ChevronRight-B9DmLAKh.js";import"./DotsVertical-CmHvBgAo.js";import"./Stars02-D1eOi134.js";import"./Copy01-tOHQDVdb.js";import"./Globe01-BptLpR6D.js";import"./Eye-DkqzK9v4.js";import"./FilterLines-Da90Z39y.js";import"./Star01-QG8pK1yw.js";import"./Globe04-5erCJGew.js";import"./SwitchHorizontal01-D8ShLQwH.js";import"./HardDrive-BWMqpfxS.js";import"./Image01-XM4bpaLw.js";import"./Key01-ByxRAii_.js";import"./LayoutLeft-B9Jd6ymK.js";import"./Monitor01-ClZ2KmM9.js";import"./Sun-DHI7Rs1S.js";import"./Package-CDoMKJ25.js";import"./Palette-Dj74Mlc6.js";import"./Play-D5sDqr8I.js";import"./Plus-JOcsz2OW.js";import"./SearchLg-BHMKxNfO.js";import"./SearchMd-C-NJ_45S.js";import"./Shield01-Bj6HGuxh.js";import"./Stars01-DqPZujie.js";import"./Trash01-BtophoGC.js";import"./Upload01-CXhKVCP8.js";import"./User01-uwH1s6Qn.js";import"./Users01-suVU8oKl.js";import"./XClose-BdaQO-2_.js";import"./X-BolYo4iB.js";import"./Zap-BzNhtsnx.js";import"./badge-CJKB36w7.js";import"./checkbox-Diqx1FoE.js";import"./command-N0I3WfMj.js";import"./index-8daa3oHu.js";import"./dialog-BxyVzjQ3.js";import"./popover-BPf7qyUL.js";import"./chat-context-CwNi3A6G.js";import"./autosend-kl7RNqnt.js";import"./hooks-faeU6CoI.js";import"./use-mcp-client-CodYj4lk.js";import"./auth-D4bTHSVX.js";import"./decopilot-sse-pool-BLGL0LsS.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-HHcBk3Yy.js";import"./use-virtual-mcp-Bs6Z3XqB.js";import"./use-collections-CR5m--3v.js";import"./use-ai-providers-C3gvqXwZ.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-By89abVN.js";import"./use-organization-settings-C02fN1Pg.js";import"./automation-runs-0Gp5Pl3p.js";import"./select-BjS6pi0R.js";import"./useInfiniteQuery-GqUtQwTk.js";import"./use-infinite-scroll-B1UJmYzB.js";import"./use-connection-Bja1yNlO.js";import"./card-9tKE7GXF.js";import"./sidebar-Du3GhEXu.js";import"./use-mobile-DmC5AwHK.js";import"./table-7Pa2oc8U.js";import"./empty-state-es2nRb_j.js";import"./use-members-C5exRENp.js";import"./use-org-auth-client-C-_6T-I_.js";import"./use-clock-tick-4n-sf8En.js";import"./use-automations-CV0g4TCD.js";import"./useSuspenseInfiniteQuery-oEtZEsYD.js";import"./avatar-BxCDP7Ot.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BV3KPbyw.js";import"./file-type-icon-L2ARwYHI.js";import"./monaco-editor-DYNno9ow.js";import"./index-DIB09EG-.js";import"./index-DU67rOKJ.js";import"./calendar-DeTvDsBF.js";import"./shell-layout-ElsOHGco.js";import"./required-auth-layout-0AnIaBaR.js";import"./use-org-sso-D9Zrv9Ex.js";import"./integration-icon-Bz3MOu79.js";import"./use-navigate-to-agent-VNxYrStf.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BDBkVxFA.js";import"./form-BBrmDTao.js";import"./drawer-CQKQzuhR.js";import"./collection-search-kUG_oKbb.js";import"./index-DxY7xoBM.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-CntYFu2c.js";import"./use-mcp-tools-DhezZmhh.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-Bt8Gm2rH.js";import"./mcp-oauth-DUn-Fuzj.js";import"./extract-connection-data-C2_0wEKz.js";import"./dropdown-menu-BScjo8--.js";import"./toggle-group-_FACvaFN.js";import"./use-deco-credits-CrWRWg5d.js";import"./connection-card-D0_c6gO9.js";import"./use-registry-connections-CSTpfPSI.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-BYaB09EC.js";import"./collection-tabs-BTDZrBXn.js";import"./connect-desktop-dialog-ChBtls8K.js";import"./select-model-Bj5d_bo2.js";import"./skeleton-DYrRZj58.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C5ntTZ3s.js";import"./index-D521UaSg.js";import"./alert-dialog-CwKyb2j-.js";import"./toolbar-WAIhuPvK.js";import"./use-debounced-value-DiZ6agyj.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CrVwkBda.js";import"./use-capability-DzMeZG_B.js";import"./toolbar-icon-button-CFa583yL.js";import"./use-debounced-autosave-CrTBH0r8.js";import"./index-BXoUOnNS.js";import"./search-input-Bdl49Lyd.js";import"./use-mcp-auth-status-wzWeSyhc.js";import"./switch-Co9VnPF1.js";import"./github-repo-picker-ClgZW6LI.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-59JvHtO0.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-CXFBjxtL.js";import"./use-file-configs-CKVr-c7q.js";import"./automation-list-row-P3Wfaud1.js";function Le(j){return Array.isArray(j)?j.map(e=>({key:T(e?.key),value:T(e?.value)})):[]}function As(j){const e=Y.c(82),{orgSlug:s,virtualMcpId:r,branch:i,blockKey:f,block:m,decofile:a,meta:c,previewBaseUrl:h}=j;let x;e[0]!==i||e[1]!==s||e[2]!==r?(x={orgSlug:s,virtualMcpId:r,branch:i},e[0]=i,e[1]=s,e[2]=r,e[3]=x):x=e[3];const l=xe(x);let p;e[4]!==m?(p=he(m,"posts"),e[4]=m,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==l?(n=E=>{l.mutate({blockKey:f,data:je(f,"posts",be(E))})},e[6]=f,e[7]=l,e[8]=n):n=e[8];const[o,N]=Ee(d,n);let k;e[9]!==o||e[10]!==N?(k=(E,re)=>N({...o,[E]:re}),e[9]=o,e[10]=N,e[11]=k):k=e[11];const b=k;let S;e[12]!==a||e[13]!==o||e[14]!==h?(S=_e({decofile:a,post:o,previewBaseUrl:h}),e[12]=a,e[13]=o,e[14]=h,e[15]=S):S=e[15];const y=S;let g,v,P,w;e[16]!==o?(v=ge(o),g=v.length>0,P=v.length===1?"field":"fields",w=v.join(", "),e[16]=o,e[17]=g,e[18]=v,e[19]=P,e[20]=w):(g=e[17],v=e[18],P=e[19],w=e[20]);const _=`Missing required ${P}: ${w}`;let C;e[21]!==o.title?(C=T(o.title)||"Untitled post",e[21]=o.title,e[22]=C):C=e[22];let B;e[23]!==C?(B=t.jsx("span",{className:"truncate text-sm font-medium",children:C}),e[23]=C,e[24]=B):B=e[24];let u;e[25]!==g||e[26]!==v||e[27]!==_?(u=g&&t.jsxs(Se,{children:[t.jsx(Pe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(ae,{size:14}),v.length," ",v.length===1?"issue":"issues"]})}),t.jsx(we,{side:"bottom",children:_})]}),e[25]=g,e[26]=v,e[27]=_,e[28]=u):u=e[28];let F;e[29]!==l.isError||e[30]!==l.isPending?(F=t.jsx(ve,{isPending:l.isPending,isError:l.isError}),e[29]=l.isError,e[30]=l.isPending,e[31]=F):F=e[31];const Z=!y||g,ee=g?_:y?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let R;e[32]!==g||e[33]!==y?(R=()=>{y&&!g&&window.open(y,"_blank","noopener,noreferrer")},e[32]=g,e[33]=y,e[34]=R):R=e[34];let H;e[35]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(me,{size:14}),e[35]=H):H=e[35];let A;e[36]!==Z||e[37]!==ee||e[38]!==R?(A=t.jsxs(le,{type:"button",variant:"outline",size:"sm",disabled:Z,title:ee,onClick:R,children:[H,"See preview"]}),e[36]=Z,e[37]=ee,e[38]=R,e[39]=A):A=e[39];let L;e[40]!==u||e[41]!==F||e[42]!==A?(L=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[u,F,A]}),e[40]=u,e[41]=F,e[42]=A,e[43]=L):L=e[43];let $;e[44]!==L||e[45]!==B?($=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[B,L]}),e[44]=L,e[45]=B,e[46]=$):$=e[46];let M;e[47]!==o.title?(M=T(o.title),e[47]=o.title,e[48]=M):M=e[48];let I;e[49]!==b?(I=E=>b("title",E),e[49]=b,e[50]=I):I=e[50];let U;e[51]!==M||e[52]!==I?(U=t.jsx(Fe,{value:M,onChange:I,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[51]=M,e[52]=I,e[53]=U):U=e[53];let J;e[54]===Symbol.for("react.memo_cache_sentinel")?(J=t.jsxs(ie,{value:"content",children:[t.jsx(pe,{}),"Content"]}),e[54]=J):J=e[54];let Q;e[55]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsxs(de,{children:[J,t.jsxs(ie,{value:"settings",children:[t.jsx(ne,{}),"Settings"]})]}),e[55]=Q):Q=e[55];let V;e[56]!==o.sections?(V=Be(o.sections),e[56]=o.sections,e[57]=V):V=e[57];let z;e[58]!==b?(z=E=>b("sections",E),e[58]=b,e[59]=z):z=e[59];let D;e[60]!==i||e[61]!==s||e[62]!==r?(D={orgSlug:s,virtualMcpId:r,branch:i},e[60]=i,e[61]=s,e[62]=r,e[63]=D):D=e[63];let q;e[64]!==c||e[65]!==V||e[66]!==z||e[67]!==D?(q=t.jsx(se,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(Te,{value:V,onChange:z,meta:c,sandboxRef:D,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[64]=c,e[65]=V,e[66]=z,e[67]=D,e[68]=q):q=e[68];let K;e[69]!==a||e[70]!==o||e[71]!==b?(K=t.jsx(se,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx($e,{post:o,decofile:a,onChange:b})})}),e[69]=a,e[70]=o,e[71]=b,e[72]=K):K=e[72];let O;e[73]!==q||e[74]!==K?(O=t.jsxs(fe,{defaultValue:"content",className:"mt-6 gap-4",children:[Q,q,K]}),e[73]=q,e[74]=K,e[75]=O):O=e[75];let G;e[76]!==U||e[77]!==O?(G=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[U,O]})}),e[76]=U,e[77]=O,e[78]=G):G=e[78];let W;return e[79]!==$||e[80]!==G?(W=t.jsxs("div",{className:"flex h-full flex-col",children:[$,G]}),e[79]=$,e[80]=G,e[81]=W):W=e[81],W}function $e(j){const e=Y.c(57),{post:s,decofile:r,onChange:i}=j;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(X,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let m;e[1]!==s.excerpt?(m=T(s.excerpt),e[1]=s.excerpt,e[2]=m):m=e[2];let a;e[3]!==i?(a=u=>i("excerpt",u.target.value),e[3]=i,e[4]=a):a=e[4];let c;e[5]!==m||e[6]!==a?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(ue,{id:"post-excerpt",value:m,onChange:a,rows:2})]}),e[5]=m,e[6]=a,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(X,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==s.slug?(x=T(s.slug),e[9]=s.slug,e[10]=x):x=e[10];let l;e[11]!==i?(l=u=>i("slug",u.target.value),e[11]=i,e[12]=l):l=e[12];let p;e[13]!==x||e[14]!==l?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(te,{id:"post-slug",value:x,onChange:l,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=l,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==s.date?(n=T(s.date),e[17]=s.date,e[18]=n):n=e[18];let o;e[19]!==i?(o=u=>i("date",u),e[19]=i,e[20]=o):o=e[20];let N;e[21]!==n||e[22]!==o?(N=t.jsx(ke,{schema:d,value:n,onChange:o,path:"post-date",label:"Date"}),e[21]=n,e[22]=o,e[23]=N):N=e[23];let k;e[24]!==N||e[25]!==p?(k=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=k):k=e[26];let b;e[27]===Symbol.for("react.memo_cache_sentinel")?(b={type:"string",format:"image-uri",title:"Cover image"},e[27]=b):b=e[27];let S;e[28]!==i?(S=u=>i("image",u),e[28]=i,e[29]=S):S=e[29];let y;e[30]!==s.image||e[31]!==S?(y=t.jsx(ye,{schema:b,value:s.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=s.image,e[31]=S,e[32]=y):y=e[32];let g;e[33]!==i?(g=u=>i("authors",u),e[33]=i,e[34]=g):g=e[34];let v;e[35]!==r||e[36]!==s.authors||e[37]!==g?(v=t.jsx(oe,{label:"Authors",decofile:r,kind:"authors",valueField:"email",toRef:Ie,selected:s.authors,onChange:g}),e[35]=r,e[36]=s.authors,e[37]=g,e[38]=v):v=e[38];let P;e[39]!==i?(P=u=>i("categories",u),e[39]=i,e[40]=P):P=e[40];let w;e[41]!==r||e[42]!==s.categories||e[43]!==P?(w=t.jsx(oe,{label:"Categories",decofile:r,kind:"categories",valueField:"slug",toRef:Me,selected:s.categories,onChange:P}),e[41]=r,e[42]=s.categories,e[43]=P,e[44]=w):w=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let C;e[47]!==s.extraProps||e[48]!==_?(C=t.jsx(Ue,{value:s.extraProps,onChange:_}),e[47]=s.extraProps,e[48]=_,e[49]=C):C=e[49];let B;return e[50]!==k||e[51]!==y||e[52]!==v||e[53]!==w||e[54]!==C||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,k,y,v,w,C]}),e[50]=k,e[51]=y,e[52]=v,e[53]=w,e[54]=C,e[55]=c,e[56]=B):B=e[56],B}function Me(j){return{name:T(j.name),slug:T(j.slug)}}function Ie(j){return{...j}}function Ue(j){const e=Y.c(15),{value:s,onChange:r}=j;let i,f,m,a;if(e[0]!==r||e[1]!==s){i=Le(s);const x=(l,p)=>r(i.map((d,n)=>n===l?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(X,{children:"Extra props"}),e[6]=m):m=e[6],a=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((l,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(te,{value:l.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(te,{value:l.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(Re,{label:"Remove prop",onClick:()=>r(i.filter((d,n)=>n!==p))})]},p))}),e[0]=r,e[1]=s,e[2]=i,e[3]=f,e[4]=m,e[5]=a}else i=e[2],f=e[3],m=e[4],a=e[5];let c;e[7]!==i||e[8]!==r?(c=t.jsx(Ae,{label:"Add prop",onClick:()=>r([...i,{key:"",value:""}])}),e[7]=i,e[8]=r,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==m||e[12]!==a||e[13]!==c?(h=t.jsxs("div",{className:f,children:[m,a,c]}),e[10]=f,e[11]=m,e[12]=a,e[13]=c,e[14]=h):h=e[14],h}function oe(j){const e=Y.c(17),{label:s,decofile:r,kind:i,valueField:f,toRef:m,selected:a,onChange:c}=j;let h;e[0]!==r||e[1]!==i||e[2]!==a||e[3]!==m||e[4]!==f?(h=Ce({records:Ne(r,i),selected:a,valueField:f,toRef:m}),e[0]=r,e[1]=i,e[2]=a,e[3]=m,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:l,refsForValues:p}=h;let d;e[6]!==s?(d=t.jsx(X,{children:s}),e[6]=s,e[7]=d):d=e[7];let n;e[8]!==s||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==l?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",s.toLowerCase()," yet — create some in the"," ",s.toLowerCase()," collection."]}):t.jsx(ce,{options:x,defaultValue:l,onValueChange:N=>c(p(N)),placeholder:`Select ${s.toLowerCase()}`,maxCount:4}),e[8]=s,e[9]=c,e[10]=x,e[11]=p,e[12]=l,e[13]=n):n=e[13];let o;return e[14]!==d||e[15]!==n?(o=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=o):o=e[16],o}export{As as PostEditor};
1
+ import{c as Y,j as t,B as le}from"./index-CAIYhjul.js";import{i as ae}from"./AlertCircle-C-LWGksh.js";import{n as me}from"./LinkExternal01-Cq7tHe_6.js";import{aL as pe,h as ne}from"./agent-icon-D18juLx-.js";import{I as te}from"./input-Dzav8ivG.js";import{L as X}from"./label-DaAsoL9V.js";import{M as ce}from"./multi-select-DswivzJU.js";import{b as ie,c as de,T as se,a as fe}from"./tabs-59hacXBf.js";import{T as ue}from"./textarea-B9TUwSCj.js";import{v as xe,w as he,x as ge,o as ve,y as je,z as be,I as ye,A as Ce,B as Ne,C as ke}from"./index-BmwqFaiy.js";import{b as Se,T as Pe,a as we}from"./tooltip-DBcnpVTx.js";import{b as _e,a as Be,B as Te}from"./block-document-CMsWkopF.js";import{u as Ee}from"./use-autosave-BvYo7aS2.js";import{s as T,E as Fe,R as Re,A as Ae}from"./primitives-CSHAedU0.js";import"./Tool01-Bk7pamHg.js";import"./ArrowUp-BeEo8zxR.js";import"./Settings02-5t6-pGmO.js";import"./Tool02-CngweHED.js";import"./XCircle-2O_4kWp7.js";import"./ArrowUpRight-Cpd1Kvoc.js";import"./TrendUp01-DsSWSiUz.js";import"./ZapSquare-T3uj9o0S.js";import"./ZoomOut-B7mxhvah.js";import"./Users03-CTnD7KhC.js";import"./CheckCircle-D6vue6JR.js";import"./ChevronUp-B2kc02W-.js";import"./ChevronDown-Chms7f47.js";import"./ChevronRight-DGKhdwsU.js";import"./DotsVertical-Bv_Wu1PR.js";import"./Stars02-BHQ6SybJ.js";import"./Copy01-BLPcoB-x.js";import"./Globe01-D8U_-ef0.js";import"./Eye--S6NkM5F.js";import"./FilterLines-CVyIbk7P.js";import"./Star01-DBLmagOx.js";import"./Globe04-Cf7fSPDC.js";import"./SwitchHorizontal01-Dm27fxw8.js";import"./HardDrive-BDXue_9V.js";import"./Image01-BOJVTyLq.js";import"./Key01-DgOZ1Vl-.js";import"./LayoutLeft-uipFY-Sc.js";import"./Monitor01-C0kqyHBJ.js";import"./Sun-7RqH2_Dg.js";import"./Package-2_HSkxNk.js";import"./Palette-DUf6RWjx.js";import"./Play-D27HpOrJ.js";import"./Plus-CX4xPpn4.js";import"./SearchLg-EiBSceY9.js";import"./SearchMd-CjaEgvWB.js";import"./Shield01-DxxbOkrj.js";import"./Stars01-D-dD7V12.js";import"./Trash01-Bi1KaIxH.js";import"./Upload01-BWPUocl6.js";import"./User01-s23e9wZl.js";import"./Users01-CNMhmtlD.js";import"./XClose-DSEAQFLe.js";import"./X-CLk-1WTe.js";import"./Zap-BAgOs3IO.js";import"./badge-D2OV8wRl.js";import"./checkbox-fY0uDGwg.js";import"./command-DWwqFTuu.js";import"./index-DrJmHyyo.js";import"./dialog-BFqbrhnG.js";import"./popover-Zrs8wv0F.js";import"./chat-context-BzGsRBEi.js";import"./autosend-Pu6JcU1z.js";import"./hooks-BSMoXVbD.js";import"./use-mcp-client-BRDJsS2i.js";import"./auth-D4yHRD2-.js";import"./decopilot-sse-pool-D-2tGt-o.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-C0-5Z8k5.js";import"./use-virtual-mcp-63tB8KYL.js";import"./use-collections-DHkHvLr2.js";import"./use-ai-providers-B0J5EZdH.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-lkWlYZO4.js";import"./use-organization-settings-BJBqMmWF.js";import"./automation-runs-C0y-Gi-l.js";import"./select-peZlJuYe.js";import"./useInfiniteQuery-BSKFC7YM.js";import"./use-infinite-scroll-C_OzT98l.js";import"./use-connection-DRK2N5z2.js";import"./card-BJLhqcLf.js";import"./sidebar-BjlDvhlo.js";import"./use-mobile-COWtBi3l.js";import"./table-fSAZqdik.js";import"./empty-state-DQOY2xmV.js";import"./use-members-T2DIW2PV.js";import"./use-org-auth-client-BICeQnTF.js";import"./use-clock-tick-r_qU_UzB.js";import"./use-automations-CajzdSeA.js";import"./useSuspenseInfiniteQuery-Cwnl9Xjp.js";import"./avatar-CB-s6LW3.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BHgKL0On.js";import"./file-type-icon-D2keXo94.js";import"./monaco-editor-c4RVis_9.js";import"./index-CXCcDBTq.js";import"./index-S3X52veH.js";import"./calendar-Cy0H8dDP.js";import"./shell-layout-CTslVDtx.js";import"./required-auth-layout-CoT_XXkN.js";import"./use-org-sso-Bd_0B726.js";import"./integration-icon-Db96f3jT.js";import"./use-navigate-to-agent-DWAHU44q.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BuQ7pYh_.js";import"./form-CGKisGk6.js";import"./drawer-Cl_dvusi.js";import"./collection-search-Bv843kn7.js";import"./index-D2HwJQV5.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-C_q3DUZv.js";import"./use-mcp-tools-TLy2HClY.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-BlDhuvWq.js";import"./mcp-oauth-Bzb4iSTT.js";import"./extract-connection-data-C6T0yo3M.js";import"./dropdown-menu-EfeTZxQL.js";import"./toggle-group-CP4FEYCM.js";import"./use-deco-credits-CbUWlpHm.js";import"./connection-card-o0DDUNHv.js";import"./use-registry-connections-CmUf1QlB.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-EPDDGUte.js";import"./collection-tabs-B6yGaiCr.js";import"./connect-desktop-dialog-DEpb0pcU.js";import"./select-model-DI8jnYOT.js";import"./skeleton-DeOjoVUO.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B1GgY2if.js";import"./index-BKqtjTbw.js";import"./alert-dialog-BNeEAttR.js";import"./toolbar-Bn_kiKpu.js";import"./use-debounced-value-Bc5YBXDl.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B96xiiHa.js";import"./use-capability-CEtXiCRz.js";import"./toolbar-icon-button-DChgCAZk.js";import"./use-debounced-autosave-CBxkub0J.js";import"./index-CUgYJaPV.js";import"./search-input-Cq8-y1F0.js";import"./use-mcp-auth-status-RbS9dxNI.js";import"./switch-DG2ijYXZ.js";import"./github-repo-picker-BRMhPL_0.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-O5sD2Bgz.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-NOLgowrv.js";import"./use-file-configs-CRDwG08w.js";import"./automation-list-row-XKqqDi6F.js";function Le(j){return Array.isArray(j)?j.map(e=>({key:T(e?.key),value:T(e?.value)})):[]}function As(j){const e=Y.c(82),{orgSlug:s,virtualMcpId:r,branch:i,blockKey:f,block:m,decofile:a,meta:c,previewBaseUrl:h}=j;let x;e[0]!==i||e[1]!==s||e[2]!==r?(x={orgSlug:s,virtualMcpId:r,branch:i},e[0]=i,e[1]=s,e[2]=r,e[3]=x):x=e[3];const l=xe(x);let p;e[4]!==m?(p=he(m,"posts"),e[4]=m,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==l?(n=E=>{l.mutate({blockKey:f,data:je(f,"posts",be(E))})},e[6]=f,e[7]=l,e[8]=n):n=e[8];const[o,N]=Ee(d,n);let k;e[9]!==o||e[10]!==N?(k=(E,re)=>N({...o,[E]:re}),e[9]=o,e[10]=N,e[11]=k):k=e[11];const b=k;let S;e[12]!==a||e[13]!==o||e[14]!==h?(S=_e({decofile:a,post:o,previewBaseUrl:h}),e[12]=a,e[13]=o,e[14]=h,e[15]=S):S=e[15];const y=S;let g,v,P,w;e[16]!==o?(v=ge(o),g=v.length>0,P=v.length===1?"field":"fields",w=v.join(", "),e[16]=o,e[17]=g,e[18]=v,e[19]=P,e[20]=w):(g=e[17],v=e[18],P=e[19],w=e[20]);const _=`Missing required ${P}: ${w}`;let C;e[21]!==o.title?(C=T(o.title)||"Untitled post",e[21]=o.title,e[22]=C):C=e[22];let B;e[23]!==C?(B=t.jsx("span",{className:"truncate text-sm font-medium",children:C}),e[23]=C,e[24]=B):B=e[24];let u;e[25]!==g||e[26]!==v||e[27]!==_?(u=g&&t.jsxs(Se,{children:[t.jsx(Pe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(ae,{size:14}),v.length," ",v.length===1?"issue":"issues"]})}),t.jsx(we,{side:"bottom",children:_})]}),e[25]=g,e[26]=v,e[27]=_,e[28]=u):u=e[28];let F;e[29]!==l.isError||e[30]!==l.isPending?(F=t.jsx(ve,{isPending:l.isPending,isError:l.isError}),e[29]=l.isError,e[30]=l.isPending,e[31]=F):F=e[31];const Z=!y||g,ee=g?_:y?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let R;e[32]!==g||e[33]!==y?(R=()=>{y&&!g&&window.open(y,"_blank","noopener,noreferrer")},e[32]=g,e[33]=y,e[34]=R):R=e[34];let H;e[35]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(me,{size:14}),e[35]=H):H=e[35];let A;e[36]!==Z||e[37]!==ee||e[38]!==R?(A=t.jsxs(le,{type:"button",variant:"outline",size:"sm",disabled:Z,title:ee,onClick:R,children:[H,"See preview"]}),e[36]=Z,e[37]=ee,e[38]=R,e[39]=A):A=e[39];let L;e[40]!==u||e[41]!==F||e[42]!==A?(L=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[u,F,A]}),e[40]=u,e[41]=F,e[42]=A,e[43]=L):L=e[43];let $;e[44]!==L||e[45]!==B?($=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[B,L]}),e[44]=L,e[45]=B,e[46]=$):$=e[46];let M;e[47]!==o.title?(M=T(o.title),e[47]=o.title,e[48]=M):M=e[48];let I;e[49]!==b?(I=E=>b("title",E),e[49]=b,e[50]=I):I=e[50];let U;e[51]!==M||e[52]!==I?(U=t.jsx(Fe,{value:M,onChange:I,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[51]=M,e[52]=I,e[53]=U):U=e[53];let J;e[54]===Symbol.for("react.memo_cache_sentinel")?(J=t.jsxs(ie,{value:"content",children:[t.jsx(pe,{}),"Content"]}),e[54]=J):J=e[54];let Q;e[55]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsxs(de,{children:[J,t.jsxs(ie,{value:"settings",children:[t.jsx(ne,{}),"Settings"]})]}),e[55]=Q):Q=e[55];let V;e[56]!==o.sections?(V=Be(o.sections),e[56]=o.sections,e[57]=V):V=e[57];let z;e[58]!==b?(z=E=>b("sections",E),e[58]=b,e[59]=z):z=e[59];let D;e[60]!==i||e[61]!==s||e[62]!==r?(D={orgSlug:s,virtualMcpId:r,branch:i},e[60]=i,e[61]=s,e[62]=r,e[63]=D):D=e[63];let q;e[64]!==c||e[65]!==V||e[66]!==z||e[67]!==D?(q=t.jsx(se,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(Te,{value:V,onChange:z,meta:c,sandboxRef:D,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[64]=c,e[65]=V,e[66]=z,e[67]=D,e[68]=q):q=e[68];let K;e[69]!==a||e[70]!==o||e[71]!==b?(K=t.jsx(se,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx($e,{post:o,decofile:a,onChange:b})})}),e[69]=a,e[70]=o,e[71]=b,e[72]=K):K=e[72];let O;e[73]!==q||e[74]!==K?(O=t.jsxs(fe,{defaultValue:"content",className:"mt-6 gap-4",children:[Q,q,K]}),e[73]=q,e[74]=K,e[75]=O):O=e[75];let G;e[76]!==U||e[77]!==O?(G=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[U,O]})}),e[76]=U,e[77]=O,e[78]=G):G=e[78];let W;return e[79]!==$||e[80]!==G?(W=t.jsxs("div",{className:"flex h-full flex-col",children:[$,G]}),e[79]=$,e[80]=G,e[81]=W):W=e[81],W}function $e(j){const e=Y.c(57),{post:s,decofile:r,onChange:i}=j;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(X,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let m;e[1]!==s.excerpt?(m=T(s.excerpt),e[1]=s.excerpt,e[2]=m):m=e[2];let a;e[3]!==i?(a=u=>i("excerpt",u.target.value),e[3]=i,e[4]=a):a=e[4];let c;e[5]!==m||e[6]!==a?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(ue,{id:"post-excerpt",value:m,onChange:a,rows:2})]}),e[5]=m,e[6]=a,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(X,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==s.slug?(x=T(s.slug),e[9]=s.slug,e[10]=x):x=e[10];let l;e[11]!==i?(l=u=>i("slug",u.target.value),e[11]=i,e[12]=l):l=e[12];let p;e[13]!==x||e[14]!==l?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(te,{id:"post-slug",value:x,onChange:l,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=l,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==s.date?(n=T(s.date),e[17]=s.date,e[18]=n):n=e[18];let o;e[19]!==i?(o=u=>i("date",u),e[19]=i,e[20]=o):o=e[20];let N;e[21]!==n||e[22]!==o?(N=t.jsx(ke,{schema:d,value:n,onChange:o,path:"post-date",label:"Date"}),e[21]=n,e[22]=o,e[23]=N):N=e[23];let k;e[24]!==N||e[25]!==p?(k=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=k):k=e[26];let b;e[27]===Symbol.for("react.memo_cache_sentinel")?(b={type:"string",format:"image-uri",title:"Cover image"},e[27]=b):b=e[27];let S;e[28]!==i?(S=u=>i("image",u),e[28]=i,e[29]=S):S=e[29];let y;e[30]!==s.image||e[31]!==S?(y=t.jsx(ye,{schema:b,value:s.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=s.image,e[31]=S,e[32]=y):y=e[32];let g;e[33]!==i?(g=u=>i("authors",u),e[33]=i,e[34]=g):g=e[34];let v;e[35]!==r||e[36]!==s.authors||e[37]!==g?(v=t.jsx(oe,{label:"Authors",decofile:r,kind:"authors",valueField:"email",toRef:Ie,selected:s.authors,onChange:g}),e[35]=r,e[36]=s.authors,e[37]=g,e[38]=v):v=e[38];let P;e[39]!==i?(P=u=>i("categories",u),e[39]=i,e[40]=P):P=e[40];let w;e[41]!==r||e[42]!==s.categories||e[43]!==P?(w=t.jsx(oe,{label:"Categories",decofile:r,kind:"categories",valueField:"slug",toRef:Me,selected:s.categories,onChange:P}),e[41]=r,e[42]=s.categories,e[43]=P,e[44]=w):w=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let C;e[47]!==s.extraProps||e[48]!==_?(C=t.jsx(Ue,{value:s.extraProps,onChange:_}),e[47]=s.extraProps,e[48]=_,e[49]=C):C=e[49];let B;return e[50]!==k||e[51]!==y||e[52]!==v||e[53]!==w||e[54]!==C||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,k,y,v,w,C]}),e[50]=k,e[51]=y,e[52]=v,e[53]=w,e[54]=C,e[55]=c,e[56]=B):B=e[56],B}function Me(j){return{name:T(j.name),slug:T(j.slug)}}function Ie(j){return{...j}}function Ue(j){const e=Y.c(15),{value:s,onChange:r}=j;let i,f,m,a;if(e[0]!==r||e[1]!==s){i=Le(s);const x=(l,p)=>r(i.map((d,n)=>n===l?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(X,{children:"Extra props"}),e[6]=m):m=e[6],a=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((l,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(te,{value:l.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(te,{value:l.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(Re,{label:"Remove prop",onClick:()=>r(i.filter((d,n)=>n!==p))})]},p))}),e[0]=r,e[1]=s,e[2]=i,e[3]=f,e[4]=m,e[5]=a}else i=e[2],f=e[3],m=e[4],a=e[5];let c;e[7]!==i||e[8]!==r?(c=t.jsx(Ae,{label:"Add prop",onClick:()=>r([...i,{key:"",value:""}])}),e[7]=i,e[8]=r,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==m||e[12]!==a||e[13]!==c?(h=t.jsxs("div",{className:f,children:[m,a,c]}),e[10]=f,e[11]=m,e[12]=a,e[13]=c,e[14]=h):h=e[14],h}function oe(j){const e=Y.c(17),{label:s,decofile:r,kind:i,valueField:f,toRef:m,selected:a,onChange:c}=j;let h;e[0]!==r||e[1]!==i||e[2]!==a||e[3]!==m||e[4]!==f?(h=Ce({records:Ne(r,i),selected:a,valueField:f,toRef:m}),e[0]=r,e[1]=i,e[2]=a,e[3]=m,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:l,refsForValues:p}=h;let d;e[6]!==s?(d=t.jsx(X,{children:s}),e[6]=s,e[7]=d):d=e[7];let n;e[8]!==s||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==l?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",s.toLowerCase()," yet — create some in the"," ",s.toLowerCase()," collection."]}):t.jsx(ce,{options:x,defaultValue:l,onValueChange:N=>c(p(N)),placeholder:`Select ${s.toLowerCase()}`,maxCount:4}),e[8]=s,e[9]=c,e[10]=x,e[11]=p,e[12]=l,e[13]=n):n=e[13];let o;return e[14]!==d||e[15]!==n?(o=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=o):o=e[16],o}export{As as PostEditor};
@@ -1 +1 @@
1
- import{c as f,l as h,j as a}from"./index-CxWNtx9x.js";import{k as y}from"./agent-icon-BGgFt2fk.js";import{s as v}from"./Plus-JOcsz2OW.js";import{s as j}from"./Trash01-BtophoGC.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=i):i=e[8];let l;return e[9]!==n?(l=a.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};
1
+ import{c as f,l as h,j as a}from"./index-CAIYhjul.js";import{k as y}from"./agent-icon-D18juLx-.js";import{s as v}from"./Plus-CX4xPpn4.js";import{s as j}from"./Trash01-Bi1KaIxH.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=i):i=e[8];let l;return e[9]!==n?(l=a.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};
@@ -1 +1 @@
1
- import{c as V,j as t,a as D,M as R,ah as U,U as q,p as N,t as T}from"./index-CxWNtx9x.js";import{P as L}from"./index-BXoUOnNS.js";import{A as B}from"./avatar-BxCDP7Ot.js";import{S as I}from"./switch-Co9VnPF1.js";import{S as G,a as Y,d as $,c as K}from"./select-BjS6pi0R.js";import{a as M,T as z}from"./toggle-group-_FACvaFN.js";import{I as O}from"./input-C9EhK1Lu.js";import{i as H}from"./Monitor01-ClZ2KmM9.js";import{n as J,a as Q}from"./Sun-DHI7Rs1S.js";import{i as W}from"./Play-D5sDqr8I.js";import{u as X}from"./use-debounced-autosave-CrTBH0r8.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-DJmEqij6.js";import{c as te,b as A,S as E,a as F}from"./settings-section-C5ntTZ3s.js";import"./sidebar-Du3GhEXu.js";import"./LayoutLeft-B9Jd6ymK.js";import"./use-mobile-DmC5AwHK.js";import"./X-BolYo4iB.js";import"./tooltip-CTQ3jqyw.js";import"./User01-uwH1s6Qn.js";import"./ChevronUp-Y_qcNB-R.js";import"./ChevronDown-ClEtq8UA.js";import"./card-9tKE7GXF.js";import"./ArrowUpRight-DPt871Ex.js";function se(){const e=V.c(19),{data:s,isPending:o}=D.useSession(),v=s?.user,p=v?.image,h=v?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=R(S);let _;e[2]!==n?(_={save:async()=>{const g=n.control._formState.dirtyFields;if(Object.keys(g).length===0)return;const r=n.getValues(),f=n.control._defaultValues;n.reset(r,{keepValues:!0});try{await D.updateUser({name:r.name}),N("profile_updated",{fields:["name"]}),T.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),T.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:d}=X(_);if(o)return null;const j=v?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(B,{url:p,fallback:j,shape:"circle",size:"base"})}),e[4]=j,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==d||e[8]!==x?(l=g=>{const{field:r}=g;return t.jsx(O,{id:"display-name",...r,onChange:f=>{r.onChange(f),x()},onBlur:()=>{r.onBlur(),d()},onKeyDown:f=>{f.key==="Enter"&&d()},placeholder:"Your name",className:"w-[280px]"})},e[7]=d,e[8]=x,e[9]=l):l=e[9];let m;e[10]!==n.control||e[11]!==l?(m=t.jsx(A,{title:"Display name",action:t.jsx(U,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=m):m=e[12];const b=v?.email;let a;e[13]!==b?(a=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:b})}),e[13]=b,e[14]=a):a=e[14];let u;return e[15]!==i||e[16]!==m||e[17]!==a?(u=t.jsx(E,{children:t.jsxs(F,{children:[i,m,a]})}),e[15]=i,e[16]=m,e[17]=a,e[18]=u):u=e[18],u}function oe(){const e=V.c(48),[s,o]=q();let v;e[0]!==o?(v=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),T.error("Notifications denied. Please enable them in your browser settings."),o(ae);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=v):v=e[1];const p=v;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(z,{value:"light","aria-label":"Light theme",children:t.jsx(J,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(z,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(z,{value:"system","aria-label":"System theme",children:t.jsx(H,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(M,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let d;e[10]!==p||e[11]!==s.enableNotifications?(d=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=d):d=e[12];let j;e[13]!==p||e[14]!==s.enableNotifications?(j=t.jsx(I,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=j):j=e[15];let i;e[16]!==d||e[17]!==j?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:d,action:j}),e[16]=d,e[17]=j,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let m;e[22]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=m):m=e[22];let b;e[23]!==o?(b=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=b):b=e[24];let a;e[25]!==s.enableSounds||e[26]!==b?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[m,t.jsx(I,{checked:s.enableSounds,onCheckedChange:b})]}),e[25]=s.enableSounds,e[26]=b,e[27]=a):a=e[27];let u;e[28]!==a||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:a}),e[28]=a,e[29]=l,e[30]=u):u=e[30];let g;e[31]!==o?(g=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=g):g=e[32];let r;e[33]!==s.toolApprovalLevel?(r={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=r):r=e[34];let f;e[35]!==r?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:r})}),e[35]=r,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(K,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==g||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:g,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=g,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(F,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function ae(e){return{...e,enableNotifications:!1}}function re(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs(te,{children:[t.jsx(L.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function Te(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(re,{}),e[0]=s):s=e[0],s}export{Te as default};
1
+ import{c as V,j as t,a as D,M as R,ah as U,U as q,p as N,t as T}from"./index-CAIYhjul.js";import{P as L}from"./index-CUgYJaPV.js";import{A as B}from"./avatar-CB-s6LW3.js";import{S as I}from"./switch-DG2ijYXZ.js";import{S as G,a as Y,d as $,c as K}from"./select-peZlJuYe.js";import{a as M,T as z}from"./toggle-group-CP4FEYCM.js";import{I as O}from"./input-Dzav8ivG.js";import{i as H}from"./Monitor01-C0kqyHBJ.js";import{n as J,a as Q}from"./Sun-7RqH2_Dg.js";import{i as W}from"./Play-D27HpOrJ.js";import{u as X}from"./use-debounced-autosave-CBxkub0J.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-BCsh3PYH.js";import{c as te,b as A,S as E,a as F}from"./settings-section-B1GgY2if.js";import"./sidebar-BjlDvhlo.js";import"./LayoutLeft-uipFY-Sc.js";import"./use-mobile-COWtBi3l.js";import"./X-CLk-1WTe.js";import"./tooltip-DBcnpVTx.js";import"./User01-s23e9wZl.js";import"./ChevronUp-B2kc02W-.js";import"./ChevronDown-Chms7f47.js";import"./card-BJLhqcLf.js";import"./ArrowUpRight-Cpd1Kvoc.js";function se(){const e=V.c(19),{data:s,isPending:o}=D.useSession(),v=s?.user,p=v?.image,h=v?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=R(S);let _;e[2]!==n?(_={save:async()=>{const g=n.control._formState.dirtyFields;if(Object.keys(g).length===0)return;const r=n.getValues(),f=n.control._defaultValues;n.reset(r,{keepValues:!0});try{await D.updateUser({name:r.name}),N("profile_updated",{fields:["name"]}),T.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),T.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:d}=X(_);if(o)return null;const j=v?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(B,{url:p,fallback:j,shape:"circle",size:"base"})}),e[4]=j,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==d||e[8]!==x?(l=g=>{const{field:r}=g;return t.jsx(O,{id:"display-name",...r,onChange:f=>{r.onChange(f),x()},onBlur:()=>{r.onBlur(),d()},onKeyDown:f=>{f.key==="Enter"&&d()},placeholder:"Your name",className:"w-[280px]"})},e[7]=d,e[8]=x,e[9]=l):l=e[9];let m;e[10]!==n.control||e[11]!==l?(m=t.jsx(A,{title:"Display name",action:t.jsx(U,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=m):m=e[12];const b=v?.email;let a;e[13]!==b?(a=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:b})}),e[13]=b,e[14]=a):a=e[14];let u;return e[15]!==i||e[16]!==m||e[17]!==a?(u=t.jsx(E,{children:t.jsxs(F,{children:[i,m,a]})}),e[15]=i,e[16]=m,e[17]=a,e[18]=u):u=e[18],u}function oe(){const e=V.c(48),[s,o]=q();let v;e[0]!==o?(v=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),T.error("Notifications denied. Please enable them in your browser settings."),o(ae);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=v):v=e[1];const p=v;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(z,{value:"light","aria-label":"Light theme",children:t.jsx(J,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(z,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(z,{value:"system","aria-label":"System theme",children:t.jsx(H,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(M,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let d;e[10]!==p||e[11]!==s.enableNotifications?(d=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=d):d=e[12];let j;e[13]!==p||e[14]!==s.enableNotifications?(j=t.jsx(I,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=j):j=e[15];let i;e[16]!==d||e[17]!==j?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:d,action:j}),e[16]=d,e[17]=j,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let m;e[22]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=m):m=e[22];let b;e[23]!==o?(b=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=b):b=e[24];let a;e[25]!==s.enableSounds||e[26]!==b?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[m,t.jsx(I,{checked:s.enableSounds,onCheckedChange:b})]}),e[25]=s.enableSounds,e[26]=b,e[27]=a):a=e[27];let u;e[28]!==a||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:a}),e[28]=a,e[29]=l,e[30]=u):u=e[30];let g;e[31]!==o?(g=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=g):g=e[32];let r;e[33]!==s.toolApprovalLevel?(r={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=r):r=e[34];let f;e[35]!==r?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:r})}),e[35]=r,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(K,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==g||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:g,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=g,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(F,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function ae(e){return{...e,enableNotifications:!1}}function re(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs(te,{children:[t.jsx(L.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function Te(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(re,{}),e[0]=s):s=e[0],s}export{Te as default};
@@ -0,0 +1 @@
1
+ import{c as L,C as H,j as U}from"./index-CAIYhjul.js";import{a as O,g as $,s as E}from"./automation-runs-C0y-Gi-l.js";import{q as k,u as q}from"./use-mcp-client-BRDJsS2i.js";import{b as B,c as V}from"./use-mcp-tools-TLy2HClY.js";import{u as Y}from"./index-BmwqFaiy.js";import{c as G}from"./monaco-editor-c4RVis_9.js";import{g as K,M as W,a as D}from"./index-S3X52veH.js";import{b as z,a as F}from"./chat-context-BzGsRBEi.js";import{u as J}from"./shell-layout-CTslVDtx.js";import{O as Q}from"./tab-id-BijBBRwE.js";import"./select-peZlJuYe.js";import"./tooltip-DBcnpVTx.js";import"./ChevronUp-B2kc02W-.js";import"./ChevronDown-Chms7f47.js";import"./useInfiniteQuery-BSKFC7YM.js";import"./use-infinite-scroll-C_OzT98l.js";import"./use-connection-DRK2N5z2.js";import"./use-collections-DHkHvLr2.js";import"./use-virtual-mcp-63tB8KYL.js";import"./card-BJLhqcLf.js";import"./sidebar-BjlDvhlo.js";import"./LayoutLeft-uipFY-Sc.js";import"./use-mobile-COWtBi3l.js";import"./X-CLk-1WTe.js";import"./table-fSAZqdik.js";import"./empty-state-DQOY2xmV.js";import"./use-members-T2DIW2PV.js";import"./use-org-auth-client-BICeQnTF.js";import"./use-clock-tick-r_qU_UzB.js";import"./AlertCircle-C-LWGksh.js";import"./CheckCircle-D6vue6JR.js";import"./DotsVertical-Bv_Wu1PR.js";import"./agent-icon-D18juLx-.js";import"./Tool01-Bk7pamHg.js";import"./ArrowUp-BeEo8zxR.js";import"./Settings02-5t6-pGmO.js";import"./Tool02-CngweHED.js";import"./XCircle-2O_4kWp7.js";import"./ArrowUpRight-Cpd1Kvoc.js";import"./TrendUp01-DsSWSiUz.js";import"./ZapSquare-T3uj9o0S.js";import"./ZoomOut-B7mxhvah.js";import"./Users03-CTnD7KhC.js";import"./ChevronRight-DGKhdwsU.js";import"./Stars02-BHQ6SybJ.js";import"./Copy01-BLPcoB-x.js";import"./Globe01-D8U_-ef0.js";import"./Eye--S6NkM5F.js";import"./FilterLines-CVyIbk7P.js";import"./Star01-DBLmagOx.js";import"./Globe04-Cf7fSPDC.js";import"./SwitchHorizontal01-Dm27fxw8.js";import"./HardDrive-BDXue_9V.js";import"./Image01-BOJVTyLq.js";import"./Key01-DgOZ1Vl-.js";import"./LinkExternal01-Cq7tHe_6.js";import"./Monitor01-C0kqyHBJ.js";import"./Sun-7RqH2_Dg.js";import"./Package-2_HSkxNk.js";import"./Palette-DUf6RWjx.js";import"./Play-D27HpOrJ.js";import"./Plus-CX4xPpn4.js";import"./SearchLg-EiBSceY9.js";import"./SearchMd-CjaEgvWB.js";import"./Shield01-DxxbOkrj.js";import"./Stars01-D-dD7V12.js";import"./Trash01-Bi1KaIxH.js";import"./Upload01-BWPUocl6.js";import"./User01-s23e9wZl.js";import"./Users01-CNMhmtlD.js";import"./XClose-DSEAQFLe.js";import"./Zap-BAgOs3IO.js";import"./use-automations-CajzdSeA.js";import"./studio-tools-C0-5Z8k5.js";import"./useSuspenseInfiniteQuery-Cwnl9Xjp.js";import"./avatar-CB-s6LW3.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BHgKL0On.js";import"./file-type-icon-D2keXo94.js";import"./dialog-BFqbrhnG.js";import"./hooks-BSMoXVbD.js";import"./decopilot-sse-pool-D-2tGt-o.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./calendar-Cy0H8dDP.js";import"./integration-icon-Db96f3jT.js";import"./use-navigate-to-agent-DWAHU44q.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BuQ7pYh_.js";import"./form-CGKisGk6.js";import"./label-DaAsoL9V.js";import"./input-Dzav8ivG.js";import"./auth-D4yHRD2-.js";import"./drawer-Cl_dvusi.js";import"./collection-search-Bv843kn7.js";import"./autosend-Pu6JcU1z.js";import"./index-D2HwJQV5.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-C_q3DUZv.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-BlDhuvWq.js";import"./mcp-oauth-Bzb4iSTT.js";import"./extract-connection-data-C6T0yo3M.js";import"./use-decopilot-events-lkWlYZO4.js";import"./dropdown-menu-EfeTZxQL.js";import"./popover-Zrs8wv0F.js";import"./command-DWwqFTuu.js";import"./index-DrJmHyyo.js";import"./use-organization-settings-BJBqMmWF.js";import"./tabs-59hacXBf.js";import"./toggle-group-CP4FEYCM.js";import"./use-deco-credits-CbUWlpHm.js";import"./connection-card-o0DDUNHv.js";import"./use-registry-connections-CmUf1QlB.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-B9TUwSCj.js";import"./connection-form-helpers-EPDDGUte.js";import"./collection-tabs-B6yGaiCr.js";import"./badge-D2OV8wRl.js";import"./use-ai-providers-B0J5EZdH.js";import"./connect-desktop-dialog-DEpb0pcU.js";import"./select-model-DI8jnYOT.js";import"./checkbox-fY0uDGwg.js";import"./skeleton-DeOjoVUO.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B1GgY2if.js";import"./index-BKqtjTbw.js";import"./alert-dialog-BNeEAttR.js";import"./toolbar-Bn_kiKpu.js";import"./use-debounced-value-Bc5YBXDl.js";import"./location-BpLtHjTZ.js";import"./index-CXCcDBTq.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B96xiiHa.js";import"./use-capability-CEtXiCRz.js";import"./toolbar-icon-button-DChgCAZk.js";import"./use-debounced-autosave-CBxkub0J.js";import"./index-CUgYJaPV.js";import"./search-input-Cq8-y1F0.js";import"./use-mcp-auth-status-RbS9dxNI.js";import"./switch-DG2ijYXZ.js";import"./github-repo-picker-BRMhPL_0.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-O5sD2Bgz.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-NOLgowrv.js";import"./use-file-configs-CRDwG08w.js";import"./automation-list-row-XKqqDi6F.js";import"./required-auth-layout-CoT_XXkN.js";import"./use-org-sso-Bd_0B726.js";const X="studio://navigate";function Z(M){const[t]=M;if(M.length!==1||t?.type!=="resource_link"||!t.uri.startsWith(X))return{isNavigate:!1};let o=null;try{o=new URL(t.uri).searchParams.get("main")}catch{}return{isNavigate:!0,tab:o&&Q.has(o)?o:null}}const tt={};function ot(M){const t=L.c(38),{client:o,resourceURI:I,tool:i,connectionId:p,orgId:a,args:v}=M,{sendMessage:C}=z(),{setAppContext:f,clearAppContext:l}=F(),{openSidePanel:g,openTab:s}=J(),e=`${p}:${i.name}`;let c;t[0]!==s?(c=x=>x==="inline"?(s("0"),"inline"):"fullscreen",t[0]=s,t[1]=c):c=t[1];const m=c,n=v??tt;let u;t[2]!==o||t[3]!==i.name||t[4]!==n?(u={client:o,toolName:i.name,toolArguments:n},t[2]=o,t[3]=i.name,t[4]=n,t[5]=u):u=t[5];const{data:r}=V(u);let h;if(t[6]!==i._meta||t[7]!==i.name){const x=$(i._meta);h=E(i.name,x),t[6]=i._meta,t[7]=i.name,t[8]=h}else h=t[8];const A=h;let d;t[9]!==i.inputSchema?(d=i.inputSchema??{type:"object"},t[9]=i.inputSchema,t[10]=d):d=t[10];let R;t[11]!==A||t[12]!==d||t[13]!==i?(R={...i,name:A,inputSchema:d},t[11]=A,t[12]=d,t[13]=i,t[14]=R):R=t[14];const b=R;let _;t[15]!==g||t[16]!==s||t[17]!==C?(_=x=>{const j=Z(x.content);if(j.isNavigate){j.tab&&s(j.tab);return}const w=G(x.content);w.content.length>0&&(g("chat"),C({tiptapDoc:w}))},t[15]=g,t[16]=s,t[17]=C,t[18]=_):_=t[18];const y=_;let P;t[19]!==b?(P={tool:b},t[19]=b,t[20]=P):P=t[20];let N;t[21]!==f||t[22]!==e?(N=x=>f(e,x),t[21]=f,t[22]=e,t[23]=N):N=t[23];let T;t[24]!==l||t[25]!==e?(T=()=>l(e),t[24]=l,t[25]=e,t[26]=T):T=t[26];let S;return t[27]!==o||t[28]!==y||t[29]!==m||t[30]!==a||t[31]!==I||t[32]!==P||t[33]!==N||t[34]!==T||t[35]!==n||t[36]!==r?(S=U.jsx(W,{resourceURI:I,orgId:a,toolInfo:P,toolInput:n,toolResult:r,displayMode:"fullscreen",minHeight:D.fullscreen.minHeight,maxHeight:D.fullscreen.maxHeight,client:o,onMessage:y,onUpdateModelContext:N,onTeardown:T,onRequestDisplayMode:m,className:"h-full"}),t[27]=o,t[28]=y,t[29]=m,t[30]=a,t[31]=I,t[32]=P,t[33]=N,t[34]=T,t[35]=n,t[36]=r,t[37]=S):S=t[37],S}function Wi(M){const t=L.c(24),{connectionId:o,toolName:I,args:i}=M,{org:p}=H(),a=Y();let v;t[0]!==o||t[1]!==a?(v=k(o)&&a.vmEntry?.sandboxProviderKind==="user-desktop"&&a.previewUrl?`${a.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=o,t[1]=a,t[2]=v):v=t[2];const C=v;let f;t[3]!==o||t[4]!==C||t[5]!==p.id||t[6]!==p.slug?(f={connectionId:o,orgId:p.id,orgSlug:p.slug,mcpUrl:C},t[3]=o,t[4]=C,t[5]=p.id,t[6]=p.slug,t[7]=f):f=t[7];const l=q(f);let g;t[8]!==l?(g={client:l},t[8]=l,t[9]=g):g=t[9];const{data:s}=B(g);let e,c,m;t[10]!==I||t[11]!==s.tools?(e=O(decodeURIComponent(I)),m=s.tools.find(r=>r.name===e)??s.tools.find(r=>{const h=$(r._meta);if(!h)return!1;if(E(r.name,h)===e)return!0;const d=E(e,h);return d!==e&&r.name===d}),c=m?._meta?K(m._meta):void 0,t[10]=I,t[11]=s.tools,t[12]=e,t[13]=c,t[14]=m):(e=t[12],c=t[13],m=t[14]);const n=c;if(!m||!n){let r;return t[15]!==e?(r=U.jsx("div",{className:"flex items-center justify-center h-full w-full",children:U.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',e,'" not found or has no UI']})}),t[15]=e,t[16]=r):r=t[16],r}let u;return t[17]!==i||t[18]!==l||t[19]!==o||t[20]!==p.id||t[21]!==n||t[22]!==m?(u=U.jsx(ot,{client:l,resourceURI:n,tool:m,connectionId:o,orgId:p.id,args:i}),t[17]=i,t[18]=l,t[19]=o,t[20]=p.id,t[21]=n,t[22]=m,t[23]=u):u=t[23],u}export{Wi as AppViewContent};
@@ -0,0 +1 @@
1
+ import{c as C,j as o}from"./index-CAIYhjul.js";import{I as B}from"./input-Dzav8ivG.js";import{L as T}from"./label-DaAsoL9V.js";import{S as L,a as A,b as R,c as z,d as O}from"./select-peZlJuYe.js";import{T as V}from"./textarea-B9TUwSCj.js";import{v as D,w as J,o as K,y as M,I as _}from"./index-BmwqFaiy.js";import{s as F}from"./primitives-CSHAedU0.js";import{u as $}from"./use-autosave-BvYo7aS2.js";import"./tooltip-DBcnpVTx.js";import"./ChevronUp-B2kc02W-.js";import"./ChevronDown-Chms7f47.js";import"./ArrowUp-BeEo8zxR.js";import"./chat-context-BzGsRBEi.js";import"./autosend-Pu6JcU1z.js";import"./hooks-BSMoXVbD.js";import"./use-mcp-client-BRDJsS2i.js";import"./auth-D4yHRD2-.js";import"./decopilot-sse-pool-D-2tGt-o.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-C0-5Z8k5.js";import"./use-virtual-mcp-63tB8KYL.js";import"./use-collections-DHkHvLr2.js";import"./use-ai-providers-B0J5EZdH.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-lkWlYZO4.js";import"./use-organization-settings-BJBqMmWF.js";import"./automation-runs-C0y-Gi-l.js";import"./useInfiniteQuery-BSKFC7YM.js";import"./use-infinite-scroll-C_OzT98l.js";import"./use-connection-DRK2N5z2.js";import"./card-BJLhqcLf.js";import"./sidebar-BjlDvhlo.js";import"./LayoutLeft-uipFY-Sc.js";import"./use-mobile-COWtBi3l.js";import"./X-CLk-1WTe.js";import"./table-fSAZqdik.js";import"./empty-state-DQOY2xmV.js";import"./use-members-T2DIW2PV.js";import"./use-org-auth-client-BICeQnTF.js";import"./use-clock-tick-r_qU_UzB.js";import"./AlertCircle-C-LWGksh.js";import"./CheckCircle-D6vue6JR.js";import"./DotsVertical-Bv_Wu1PR.js";import"./agent-icon-D18juLx-.js";import"./Tool01-Bk7pamHg.js";import"./Settings02-5t6-pGmO.js";import"./Tool02-CngweHED.js";import"./XCircle-2O_4kWp7.js";import"./ArrowUpRight-Cpd1Kvoc.js";import"./TrendUp01-DsSWSiUz.js";import"./ZapSquare-T3uj9o0S.js";import"./ZoomOut-B7mxhvah.js";import"./Users03-CTnD7KhC.js";import"./ChevronRight-DGKhdwsU.js";import"./Stars02-BHQ6SybJ.js";import"./Copy01-BLPcoB-x.js";import"./Globe01-D8U_-ef0.js";import"./Eye--S6NkM5F.js";import"./FilterLines-CVyIbk7P.js";import"./Star01-DBLmagOx.js";import"./Globe04-Cf7fSPDC.js";import"./SwitchHorizontal01-Dm27fxw8.js";import"./HardDrive-BDXue_9V.js";import"./Image01-BOJVTyLq.js";import"./Key01-DgOZ1Vl-.js";import"./LinkExternal01-Cq7tHe_6.js";import"./Monitor01-C0kqyHBJ.js";import"./Sun-7RqH2_Dg.js";import"./Package-2_HSkxNk.js";import"./Palette-DUf6RWjx.js";import"./Play-D27HpOrJ.js";import"./Plus-CX4xPpn4.js";import"./SearchLg-EiBSceY9.js";import"./SearchMd-CjaEgvWB.js";import"./Shield01-DxxbOkrj.js";import"./Stars01-D-dD7V12.js";import"./Trash01-Bi1KaIxH.js";import"./Upload01-BWPUocl6.js";import"./User01-s23e9wZl.js";import"./Users01-CNMhmtlD.js";import"./XClose-DSEAQFLe.js";import"./Zap-BAgOs3IO.js";import"./use-automations-CajzdSeA.js";import"./useSuspenseInfiniteQuery-Cwnl9Xjp.js";import"./avatar-CB-s6LW3.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BHgKL0On.js";import"./file-type-icon-D2keXo94.js";import"./dialog-BFqbrhnG.js";import"./monaco-editor-c4RVis_9.js";import"./index-CXCcDBTq.js";import"./index-S3X52veH.js";import"./calendar-Cy0H8dDP.js";import"./shell-layout-CTslVDtx.js";import"./required-auth-layout-CoT_XXkN.js";import"./use-org-sso-Bd_0B726.js";import"./integration-icon-Db96f3jT.js";import"./use-navigate-to-agent-DWAHU44q.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BuQ7pYh_.js";import"./form-CGKisGk6.js";import"./drawer-Cl_dvusi.js";import"./collection-search-Bv843kn7.js";import"./index-D2HwJQV5.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-C_q3DUZv.js";import"./use-mcp-tools-TLy2HClY.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-BlDhuvWq.js";import"./mcp-oauth-Bzb4iSTT.js";import"./extract-connection-data-C6T0yo3M.js";import"./dropdown-menu-EfeTZxQL.js";import"./popover-Zrs8wv0F.js";import"./command-DWwqFTuu.js";import"./index-DrJmHyyo.js";import"./tabs-59hacXBf.js";import"./toggle-group-CP4FEYCM.js";import"./use-deco-credits-CbUWlpHm.js";import"./connection-card-o0DDUNHv.js";import"./use-registry-connections-CmUf1QlB.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-EPDDGUte.js";import"./collection-tabs-B6yGaiCr.js";import"./badge-D2OV8wRl.js";import"./connect-desktop-dialog-DEpb0pcU.js";import"./select-model-DI8jnYOT.js";import"./checkbox-fY0uDGwg.js";import"./skeleton-DeOjoVUO.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B1GgY2if.js";import"./index-BKqtjTbw.js";import"./alert-dialog-BNeEAttR.js";import"./toolbar-Bn_kiKpu.js";import"./use-debounced-value-Bc5YBXDl.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B96xiiHa.js";import"./use-capability-CEtXiCRz.js";import"./toolbar-icon-button-DChgCAZk.js";import"./use-debounced-autosave-CBxkub0J.js";import"./index-CUgYJaPV.js";import"./search-input-Cq8-y1F0.js";import"./use-mcp-auth-status-RbS9dxNI.js";import"./switch-DG2ijYXZ.js";import"./github-repo-picker-BRMhPL_0.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-O5sD2Bgz.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-NOLgowrv.js";import"./use-file-configs-CRDwG08w.js";import"./automation-list-row-XKqqDi6F.js";const q={authors:[{key:"name",label:"Name",widget:"text"},{key:"type",label:"Type",widget:"select",options:[{value:"Person",label:"Person"},{value:"Organization",label:"Organization"}]},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},G={authors:"Author"};function Ko(g){const t=C.c(34),{orgSlug:j,virtualMcpId:w,branch:S,kind:e,blockKey:h,block:E}=g;let y;t[0]!==S||t[1]!==j||t[2]!==w?(y={orgSlug:j,virtualMcpId:w,branch:S},t[0]=S,t[1]=j,t[2]=w,t[3]=y):y=t[3];const m=D(y);let d;t[4]!==E||t[5]!==e?(d=J(E,e),t[4]=E,t[5]=e,t[6]=d):d=t[6];const f=d;let k;t[7]!==h||t[8]!==e||t[9]!==m?(k=a=>{m.mutate({blockKey:h,data:M(h,e,a)})},t[7]=h,t[8]=e,t[9]=m,t[10]=k):k=t[10];const[i,N]=$(f,k);let b;t[11]!==i||t[12]!==N?(b=(a,r)=>N({...i,[a]:r}),t[11]=i,t[12]=N,t[13]=b):b=t[13];const p=b,I=G[e];let l;t[14]!==I?(l=o.jsx("span",{className:"text-sm font-medium",children:I}),t[14]=I,t[15]=l):l=t[15];let n;t[16]!==m.isError||t[17]!==m.isPending?(n=o.jsx(K,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=n):n=t[18];let c;t[19]!==l||t[20]!==n?(c=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[l,n]}),t[19]=l,t[20]=n,t[21]=c):c=t[21];const P=q[e];let u;if(t[22]!==i||t[23]!==p||t[24]!==P){let a;t[26]!==i||t[27]!==p?(a=r=>o.jsx("div",{className:"space-y-2",children:r.widget==="image"?o.jsx(_,{schema:{type:"string",format:"image-uri",title:r.label},value:i[r.key],onChange:s=>p(r.key,s),path:r.key,label:r.label}):r.widget==="select"?o.jsxs(o.Fragment,{children:[o.jsx(T,{htmlFor:r.key,children:r.label}),o.jsxs(L,{value:F(i[r.key])||r.options?.[0]?.value,onValueChange:s=>p(r.key,s),children:[o.jsx(A,{id:r.key,className:"h-10 w-full",children:o.jsx(R,{placeholder:r.label})}),o.jsx(z,{children:(r.options??[]).map(H)})]})]}):o.jsxs(o.Fragment,{children:[o.jsx(T,{htmlFor:r.key,children:r.label}),r.widget==="textarea"?o.jsx(V,{id:r.key,value:F(i[r.key]),onChange:s=>p(r.key,s.target.value),rows:3}):o.jsx(B,{id:r.key,value:F(i[r.key]),placeholder:r.placeholder,onChange:s=>p(r.key,s.target.value),className:"h-10"})]})},r.key),t[26]=i,t[27]=p,t[28]=a):a=t[28],u=P.map(a),t[22]=i,t[23]=p,t[24]=P,t[25]=u}else u=t[25];let x;t[29]!==u?(x=o.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:u})}),t[29]=u,t[30]=x):x=t[30];let v;return t[31]!==x||t[32]!==c?(v=o.jsxs("div",{className:"flex h-full flex-col",children:[c,x]}),t[31]=x,t[32]=c,t[33]=v):v=t[33],v}function H(g){return o.jsx(O,{value:g.value,children:g.label},g.value)}export{Ko as RecordEditor};
@@ -0,0 +1 @@
1
+ import{c as z,j as t}from"./index-CAIYhjul.js";import{C as G}from"./checkbox-fY0uDGwg.js";import{I as K}from"./input-Dzav8ivG.js";import{L as q}from"./label-DaAsoL9V.js";import{c as H,S as J,d as W,a as X,b as Z}from"./select-peZlJuYe.js";import{k as ee,a_ as te,o as re,a$ as M,b0 as ie}from"./index-BmwqFaiy.js";import{u as oe}from"./use-autosave-BvYo7aS2.js";import"./ChevronUp-B2kc02W-.js";import"./tooltip-DBcnpVTx.js";import"./ChevronDown-Chms7f47.js";import"./ArrowUp-BeEo8zxR.js";import"./chat-context-BzGsRBEi.js";import"./autosend-Pu6JcU1z.js";import"./hooks-BSMoXVbD.js";import"./use-mcp-client-BRDJsS2i.js";import"./auth-D4yHRD2-.js";import"./decopilot-sse-pool-D-2tGt-o.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-C0-5Z8k5.js";import"./use-virtual-mcp-63tB8KYL.js";import"./use-collections-DHkHvLr2.js";import"./use-ai-providers-B0J5EZdH.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-lkWlYZO4.js";import"./use-organization-settings-BJBqMmWF.js";import"./automation-runs-C0y-Gi-l.js";import"./useInfiniteQuery-BSKFC7YM.js";import"./use-infinite-scroll-C_OzT98l.js";import"./use-connection-DRK2N5z2.js";import"./card-BJLhqcLf.js";import"./sidebar-BjlDvhlo.js";import"./LayoutLeft-uipFY-Sc.js";import"./use-mobile-COWtBi3l.js";import"./X-CLk-1WTe.js";import"./table-fSAZqdik.js";import"./empty-state-DQOY2xmV.js";import"./use-members-T2DIW2PV.js";import"./use-org-auth-client-BICeQnTF.js";import"./use-clock-tick-r_qU_UzB.js";import"./AlertCircle-C-LWGksh.js";import"./CheckCircle-D6vue6JR.js";import"./DotsVertical-Bv_Wu1PR.js";import"./agent-icon-D18juLx-.js";import"./Tool01-Bk7pamHg.js";import"./Settings02-5t6-pGmO.js";import"./Tool02-CngweHED.js";import"./XCircle-2O_4kWp7.js";import"./ArrowUpRight-Cpd1Kvoc.js";import"./TrendUp01-DsSWSiUz.js";import"./ZapSquare-T3uj9o0S.js";import"./ZoomOut-B7mxhvah.js";import"./Users03-CTnD7KhC.js";import"./ChevronRight-DGKhdwsU.js";import"./Stars02-BHQ6SybJ.js";import"./Copy01-BLPcoB-x.js";import"./Globe01-D8U_-ef0.js";import"./Eye--S6NkM5F.js";import"./FilterLines-CVyIbk7P.js";import"./Star01-DBLmagOx.js";import"./Globe04-Cf7fSPDC.js";import"./SwitchHorizontal01-Dm27fxw8.js";import"./HardDrive-BDXue_9V.js";import"./Image01-BOJVTyLq.js";import"./Key01-DgOZ1Vl-.js";import"./LinkExternal01-Cq7tHe_6.js";import"./Monitor01-C0kqyHBJ.js";import"./Sun-7RqH2_Dg.js";import"./Package-2_HSkxNk.js";import"./Palette-DUf6RWjx.js";import"./Play-D27HpOrJ.js";import"./Plus-CX4xPpn4.js";import"./SearchLg-EiBSceY9.js";import"./SearchMd-CjaEgvWB.js";import"./Shield01-DxxbOkrj.js";import"./Stars01-D-dD7V12.js";import"./Trash01-Bi1KaIxH.js";import"./Upload01-BWPUocl6.js";import"./User01-s23e9wZl.js";import"./Users01-CNMhmtlD.js";import"./XClose-DSEAQFLe.js";import"./Zap-BAgOs3IO.js";import"./use-automations-CajzdSeA.js";import"./useSuspenseInfiniteQuery-Cwnl9Xjp.js";import"./avatar-CB-s6LW3.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BHgKL0On.js";import"./file-type-icon-D2keXo94.js";import"./dialog-BFqbrhnG.js";import"./monaco-editor-c4RVis_9.js";import"./index-CXCcDBTq.js";import"./index-S3X52veH.js";import"./calendar-Cy0H8dDP.js";import"./shell-layout-CTslVDtx.js";import"./required-auth-layout-CoT_XXkN.js";import"./use-org-sso-Bd_0B726.js";import"./integration-icon-Db96f3jT.js";import"./use-navigate-to-agent-DWAHU44q.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BuQ7pYh_.js";import"./form-CGKisGk6.js";import"./drawer-Cl_dvusi.js";import"./collection-search-Bv843kn7.js";import"./index-D2HwJQV5.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-C_q3DUZv.js";import"./use-mcp-tools-TLy2HClY.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-BlDhuvWq.js";import"./mcp-oauth-Bzb4iSTT.js";import"./extract-connection-data-C6T0yo3M.js";import"./dropdown-menu-EfeTZxQL.js";import"./popover-Zrs8wv0F.js";import"./command-DWwqFTuu.js";import"./index-DrJmHyyo.js";import"./tabs-59hacXBf.js";import"./toggle-group-CP4FEYCM.js";import"./use-deco-credits-CbUWlpHm.js";import"./connection-card-o0DDUNHv.js";import"./use-registry-connections-CmUf1QlB.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-B9TUwSCj.js";import"./connection-form-helpers-EPDDGUte.js";import"./collection-tabs-B6yGaiCr.js";import"./badge-D2OV8wRl.js";import"./connect-desktop-dialog-DEpb0pcU.js";import"./select-model-DI8jnYOT.js";import"./skeleton-DeOjoVUO.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B1GgY2if.js";import"./index-BKqtjTbw.js";import"./alert-dialog-BNeEAttR.js";import"./toolbar-Bn_kiKpu.js";import"./use-debounced-value-Bc5YBXDl.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B96xiiHa.js";import"./use-capability-CEtXiCRz.js";import"./toolbar-icon-button-DChgCAZk.js";import"./use-debounced-autosave-CBxkub0J.js";import"./index-CUgYJaPV.js";import"./search-input-Cq8-y1F0.js";import"./use-mcp-auth-status-RbS9dxNI.js";import"./switch-DG2ijYXZ.js";import"./github-repo-picker-BRMhPL_0.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-O5sD2Bgz.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-NOLgowrv.js";import"./use-file-configs-CRDwG08w.js";import"./automation-list-row-XKqqDi6F.js";const me=[{value:"temporary",label:`Temporary (${M.temporary})`},{value:"permanent",label:`Permanent (${M.permanent})`}];function Xr(_){const e=z.c(62),{orgSlug:$,virtualMcpId:A,branch:B,blockKey:D,block:O}=_;let S;e[0]!==B||e[1]!==$||e[2]!==A?(S={orgSlug:$,virtualMcpId:A,branch:B},e[0]=B,e[1]=$,e[2]=A,e[3]=S):S=e[3];const m=ee(S);let g;e[4]!==O?(g=te(O),e[4]=O,e[5]=g):g=e[5];const Y=g;let v;e[6]!==D||e[7]!==m?(v=o=>{m.mutate({blockKey:D,data:ie(o)})},e[6]=D,e[7]=m,e[8]=v):v=e[8];const[r,V]=oe(Y,v);let N;e[9]!==r||e[10]!==V?(N=o=>V({...r,...o}),e[9]=r,e[10]=V,e[11]=N):N=e[11];const i=N;let P;e[12]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("span",{className:"text-sm font-medium",children:"Redirect"}),e[12]=P):P=e[12];let p;e[13]!==m.isError||e[14]!==m.isPending?(p=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[P,t.jsx(re,{isPending:m.isPending,isError:m.isError})]}),e[13]=m.isError,e[14]=m.isPending,e[15]=p):p=e[15];let T;e[16]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(q,{htmlFor:"redirect-from",children:"From"}),e[16]=T):T=e[16];let s;e[17]!==i?(s=o=>i({from:o.target.value}),e[17]=i,e[18]=s):s=e[18];let l;e[19]!==r.from||e[20]!==s?(l=t.jsx(K,{id:"redirect-from",value:r.from,placeholder:"/old-path",onChange:s,className:"h-10"}),e[19]=r.from,e[20]=s,e[21]=l):l=e[21];let E;e[22]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsxs("p",{className:"text-xs text-muted-foreground",children:["The source path to match. Supports URLPattern syntax (e.g."," ",t.jsx("code",{children:"/product/:slug"}),")."]}),e[22]=E):E=e[22];let a;e[23]!==l?(a=t.jsxs("div",{className:"space-y-2",children:[T,l,E]}),e[23]=l,e[24]=a):a=e[24];let R;e[25]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(q,{htmlFor:"redirect-to",children:"To"}),e[25]=R):R=e[25];let c;e[26]!==i?(c=o=>i({to:o.target.value}),e[26]=i,e[27]=c):c=e[27];let n;e[28]!==r.to||e[29]!==c?(n=t.jsx(K,{id:"redirect-to",value:r.to,placeholder:"/new-path",onChange:c,className:"h-10"}),e[28]=r.to,e[29]=c,e[30]=n):n=e[30];let k;e[31]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("p",{className:"text-xs text-muted-foreground",children:"The destination — a relative path or an absolute URL."}),e[31]=k):k=e[31];let d;e[32]!==n?(d=t.jsxs("div",{className:"space-y-2",children:[R,n,k]}),e[32]=n,e[33]=d):d=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(q,{htmlFor:"redirect-type",children:"Type"}),e[34]=C):C=e[34];let f;e[35]!==i?(f=o=>i({type:o}),e[35]=i,e[36]=f):f=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(X,{id:"redirect-type",className:"h-10 w-full",children:t.jsx(Z,{placeholder:"Type"})}),e[37]=w):w=e[37];let I;e[38]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(H,{children:me.map(pe)}),e[38]=I):I=e[38];let h;e[39]!==r.type||e[40]!==f?(h=t.jsxs(J,{value:r.type,onValueChange:f,children:[w,I]}),e[39]=r.type,e[40]=f,e[41]=h):h=e[41];let F;e[42]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx("strong",{children:"Temporary"}),e[42]=F):F=e[42];let L;e[43]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Use ",F," when the redirect may change;"," ",t.jsx("strong",{children:"Permanent"})," lets browsers cache it."]}),e[43]=L):L=e[43];let x;e[44]!==h?(x=t.jsxs("div",{className:"space-y-2",children:[C,h,L]}),e[44]=h,e[45]=x):x=e[45];let u;e[46]!==i?(u=o=>i({discardQueryParameters:o===!0}),e[46]=i,e[47]=u):u=e[47];let y;e[48]!==r.discardQueryParameters||e[49]!==u?(y=t.jsx(G,{checked:r.discardQueryParameters,onCheckedChange:u}),e[48]=r.discardQueryParameters,e[49]=u,e[50]=y):y=e[50];let Q;e[51]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx("span",{className:"text-sm",children:"Discard query parameters"}),e[51]=Q):Q=e[51];let j;e[52]!==y?(j=t.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5",children:[y,Q]}),e[52]=y,e[53]=j):j=e[53];let b;e[54]!==a||e[55]!==d||e[56]!==x||e[57]!==j?(b=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:t.jsxs("div",{className:"mx-auto max-w-xl space-y-6",children:[a,d,x,j]})}),e[54]=a,e[55]=d,e[56]=x,e[57]=j,e[58]=b):b=e[58];let U;return e[59]!==b||e[60]!==p?(U=t.jsxs("div",{className:"flex h-full flex-col",children:[p,b]}),e[59]=b,e[60]=p,e[61]=U):U=e[61],U}function pe(_){return t.jsx(W,{value:_.value,children:_.label},_.value)}export{Xr as RedirectEditor};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-ftVzyud_.js","assets/index-CAIYhjul.js","assets/index-C-1vh7Fd.css","assets/Tool02-CngweHED.js","assets/CheckCircle-D6vue6JR.js","assets/Settings02-5t6-pGmO.js","assets/use-mcp-client-BRDJsS2i.js","assets/auth-D4yHRD2-.js","assets/useInfiniteQuery-BSKFC7YM.js","assets/use-infinite-scroll-C_OzT98l.js","assets/studio-tools-C0-5Z8k5.js","assets/badge-D2OV8wRl.js","assets/input-Dzav8ivG.js","assets/dropdown-menu-EfeTZxQL.js","assets/ChevronUp-B2kc02W-.js","assets/ChevronRight-DGKhdwsU.js","assets/DotsVertical-Bv_Wu1PR.js","assets/table-fSAZqdik.js","assets/toggle-group-CP4FEYCM.js","assets/use-view-mode-BJOrvC1j.js","assets/use-mobile-COWtBi3l.js","assets/FilterLines-CVyIbk7P.js","assets/Globe01-D8U_-ef0.js","assets/SearchMd-CjaEgvWB.js","assets/dialog-BFqbrhnG.js","assets/X-CLk-1WTe.js","assets/AlertCircle-C-LWGksh.js","assets/Upload01-BWPUocl6.js","assets/alert-dialog-BNeEAttR.js","assets/card-BJLhqcLf.js","assets/Trash01-Bi1KaIxH.js","assets/label-DaAsoL9V.js","assets/select-peZlJuYe.js","assets/tooltip-DBcnpVTx.js","assets/ChevronDown-Chms7f47.js","assets/switch-DG2ijYXZ.js","assets/textarea-B9TUwSCj.js","assets/XCircle-2O_4kWp7.js","assets/checkbox-fY0uDGwg.js","assets/Eye--S6NkM5F.js","assets/LinkExternal01-Cq7tHe_6.js","assets/use-copy-BHgKL0On.js","assets/Copy01-BLPcoB-x.js","assets/Key01-DgOZ1Vl-.js","assets/Plus-CX4xPpn4.js","assets/mcp-oauth-Bzb4iSTT.js","assets/Play-D27HpOrJ.js"])))=>i.map(i=>d[i]);
2
+ import{c as s,j as e,r as i,i as a,aX as o}from"./index-CAIYhjul.js";import{R as m}from"./require-capability-BYn5Rk3O.js";import"./use-capability-CEtXiCRz.js";import"./access-gate-avJTtHpg.js";import"./capability-load-error-C8Uwu5_s.js";const n=i.lazy(()=>o(()=>import("./registry-layout-ftVzyud_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};