decocms 4.329.6 → 4.329.7

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 (245) hide show
  1. package/dist/client/assets/{AlertCircle-DA1cEHVG.js → AlertCircle-B02pIqyO.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CXRdv0xx.js → AreaChart-DKEbxn8Y.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-Br9KqDZP.js → ArrowLeft-DzuSLuVr.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-TsmTWJjN.js → ArrowUp-CQ6SET-t.js} +1 -1
  5. package/dist/client/assets/{Check-grvRnT6d.js → Check-CnxYOeJk.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-W70-Hp-u.js → CheckCircle-Bs1i8n8R.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-gw9dm0MJ.js → ChevronRight-Bo_7PLYL.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-CZ_XnnrO.js → ChevronSelectorVertical-BWdGiimP.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DbYyUJ2c.js → ChevronUp-CDlju1TC.js} +1 -1
  10. package/dist/client/assets/{Copy01-DC15dYeZ.js → Copy01-D5Ill_kE.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-BQ448v1L.js → CreditCard01-NbxHy6Lv.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-DuImY45F.js → DotsVertical-DRP3CifW.js} +1 -1
  13. package/dist/client/assets/{Download01-C92aqGYG.js → Download01-DoUNzBPU.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-VF7KGcUm.js → ErrorBarContext-B06vTGLd.js} +1 -1
  15. package/dist/client/assets/{Eye-BHvUcvRj.js → Eye-COu8umtC.js} +1 -1
  16. package/dist/client/assets/{GitBranch01-5KhVbuOf.js → GitBranch01-idBGys5s.js} +1 -1
  17. package/dist/client/assets/{Globe01-B1lfl4nW.js → Globe01-CtD7u0-k.js} +1 -1
  18. package/dist/client/assets/{HardDrive-Bl2sm0P3.js → HardDrive-BVnECxVe.js} +1 -1
  19. package/dist/client/assets/{Image01-BmysQdds.js → Image01-Cy8ZoIiy.js} +1 -1
  20. package/dist/client/assets/{Key01-BHRixQVB.js → Key01-DoBw9G0M.js} +1 -1
  21. package/dist/client/assets/{Link01-pXyMJR2J.js → Link01-u2EoXuNT.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-CqwZLC94.js → LinkExternal01-CBhAp9XW.js} +1 -1
  23. package/dist/client/assets/{Monitor01-VQD1wr6O.js → Monitor01-DmqpK-8S.js} +1 -1
  24. package/dist/client/assets/{Package-D8xZrFk4.js → Package-CcAuJGku.js} +1 -1
  25. package/dist/client/assets/{Palette-Bo_A8ldC.js → Palette-BOxVbiJL.js} +1 -1
  26. package/dist/client/assets/{Play-CyYcbqou.js → Play-DG2731JJ.js} +1 -1
  27. package/dist/client/assets/{Plus-BIAtk7db.js → Plus-npiI5-7X.js} +1 -1
  28. package/dist/client/assets/{SearchMd-D6yqdaba.js → SearchMd-DM9iwGft.js} +1 -1
  29. package/dist/client/assets/{Sector-CsxyX7hI.js → Sector-D81Ps0-O.js} +1 -1
  30. package/dist/client/assets/{Settings02-Dmn9Uagb.js → Settings02-C0EhiTe4.js} +1 -1
  31. package/dist/client/assets/{Share07-BUu5_15N.js → Share07-Cp3sAWWN.js} +1 -1
  32. package/dist/client/assets/{Shield01-B9JGpaTp.js → Shield01-B0ob1ipu.js} +1 -1
  33. package/dist/client/assets/{Stars01-CWhfbfaB.js → Stars01-BgKhcopx.js} +1 -1
  34. package/dist/client/assets/{Sun-DWLAV3m1.js → Sun-e_DnDd3f.js} +1 -1
  35. package/dist/client/assets/{Tool01-Cy0ZGCil.js → Tool01-DpeMCocB.js} +1 -1
  36. package/dist/client/assets/{Tool02-CSZTEjDX.js → Tool02-DMSvrhPC.js} +1 -1
  37. package/dist/client/assets/{Trash01-D1GpJcjK.js → Trash01-C64jvZUr.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-CYPVBoFc.js → TrendUp01-DBKvZ-DZ.js} +1 -1
  39. package/dist/client/assets/{Upload01-BCzsausn.js → Upload01-CZcQRY37.js} +1 -1
  40. package/dist/client/assets/{User01-DpOHQvBN.js → User01-DvzdeHqd.js} +1 -1
  41. package/dist/client/assets/{UserSquare-BncQsikh.js → UserSquare-jm1EvWHs.js} +1 -1
  42. package/dist/client/assets/{Users01-Di41qDP0.js → Users01-HKHLFhfO.js} +1 -1
  43. package/dist/client/assets/{Users03-DTortZ69.js → Users03-BTZsMKrW.js} +1 -1
  44. package/dist/client/assets/{XCircle-waBvJxuW.js → XCircle-DC63K01N.js} +1 -1
  45. package/dist/client/assets/{XClose-D87Tx9wT.js → XClose-VJXgkRtY.js} +1 -1
  46. package/dist/client/assets/{Zap-Bz0lnET7.js → Zap-Buyt_ZmJ.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-NYNe_Z4v.js → ZoomOut-Du-2I-dz.js} +1 -1
  48. package/dist/client/assets/{access-gate-CrQA8sIX.js → access-gate-CDET83Ra.js} +1 -1
  49. package/dist/client/assets/{agent-icon-CUm4oB7y.js → agent-icon-Cm-rraMc.js} +1 -1
  50. package/dist/client/assets/{agents-list-dztbB-Cw.js → agents-list-B5SZzu6A.js} +1 -1
  51. package/dist/client/assets/{ai-providers-B_bOEKQb.js → ai-providers-CHx-06O5.js} +1 -1
  52. package/dist/client/assets/{alert-6mjnov6H.js → alert-BDwew5st.js} +1 -1
  53. package/dist/client/assets/{alert-dialog-C51iVTPN.js → alert-dialog-EueylpK5.js} +1 -1
  54. package/dist/client/assets/{analytics-tab-BncFpj4z.js → analytics-tab-ryTT4iyx.js} +1 -1
  55. package/dist/client/assets/{api-keys-BAAWPoda.js → api-keys-7J7aATeq.js} +1 -1
  56. package/dist/client/assets/api-keys-BvHSvKut.js +1 -0
  57. package/dist/client/assets/{app-editor-DR0tLRro.js → app-editor-Lpb2KUNV.js} +1 -1
  58. package/dist/client/assets/{auth-Bbv_i1Jo.js → auth-BfPf7zhg.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-C4qKgNYY.js → auth-catchall-BMHDjmYl.js} +1 -1
  60. package/dist/client/assets/{auth-entry-DRIlfsP_.js → auth-entry-CGeKty09.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-CC36faDL.js → auth-split-layout-BtoAQGpk.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-sBYdDIRi.js → authenticate-and-persist-oauth-hh7nuAWR.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-Hqe9OUun.js → automation-list-row-B7bEWOhz.js} +1 -1
  64. package/dist/client/assets/{automation-runs-DLjirUtq.js → automation-runs-CkSYrEGR.js} +1 -1
  65. package/dist/client/assets/automations-Dej3hvWY.js +1 -0
  66. package/dist/client/assets/{avatar-Cqr4rNtI.js → avatar-DVuZ2F_T.js} +1 -1
  67. package/dist/client/assets/{badge-CdD_S6_J.js → badge-FcNiwbMm.js} +1 -1
  68. package/dist/client/assets/{block-document-CwU9JWtH.js → block-document-CHDLnJJB.js} +1 -1
  69. package/dist/client/assets/{breadcrumb-CGLwazRA.js → breadcrumb-CWoWChjJ.js} +1 -1
  70. package/dist/client/assets/{buckets-CJn89MHy.js → buckets-C8qQEl1X.js} +1 -1
  71. package/dist/client/assets/{bulk-category-panel-3QzafbMh.js → bulk-category-panel-DpDJKk2S.js} +1 -1
  72. package/dist/client/assets/{capability-load-error-DXzCDpxj.js → capability-load-error-DNqhm16P.js} +1 -1
  73. package/dist/client/assets/{cards-De2Tofte.js → cards-Ta4bCObM.js} +1 -1
  74. package/dist/client/assets/{category-editor-COqxAE1f.js → category-editor-C96Lbqi0.js} +1 -1
  75. package/dist/client/assets/{cdn-tab-D_pbGC7l.js → cdn-tab-BLY6nu0I.js} +1 -1
  76. package/dist/client/assets/{chart-7R5tmwSB.js → chart-3ItyUqrn.js} +1 -1
  77. package/dist/client/assets/{chat-context-CTC6stWi.js → chat-context-CALwiBF_.js} +1 -1
  78. package/dist/client/assets/{checkbox-DtN6Dr54.js → checkbox-BmYwx8kR.js} +1 -1
  79. package/dist/client/assets/{choose-editor-Blhw32Ri.js → choose-editor-57QsZhYS.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-CeAzdEYA.js → cli-auth-success-mUvYAJQJ.js} +1 -1
  81. package/dist/client/assets/{client-icons-C1w3IsHJ.js → client-icons-CxvuXLIW.js} +1 -1
  82. package/dist/client/assets/{collection-detail-BFl9ZukZ.js → collection-detail-DlNIkUmi.js} +1 -1
  83. package/dist/client/assets/{collection-display-button-Bzjk0jzF.js → collection-display-button-DYWols_3.js} +1 -1
  84. package/dist/client/assets/{collection-search-CO09NGkg.js → collection-search-BvGAgDld.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-eg9oZGZn.js → collection-table-wrapper-dVk84KQ8.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-cr1701fJ.js → collection-tabs-Cd4Vv0EE.js} +1 -1
  87. package/dist/client/assets/{command-A0s0uPHt.js → command-BYns7CwK.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-DtsFghjm.js → commerce-onboarding-8FWzFt9V.js} +1 -1
  89. package/dist/client/assets/{connect-DrXaw1w8.js → connect-CQyw1evj.js} +1 -1
  90. package/dist/client/assets/{connect-layout-CrHWsBPn.js → connect-layout-U7Ps2Adr.js} +1 -1
  91. package/dist/client/assets/{connection-DFFOswZj.js → connection-CXkee5u6.js} +1 -1
  92. package/dist/client/assets/{connection-card-TaYo6pYl.js → connection-card-CWUJLExI.js} +1 -1
  93. package/dist/client/assets/{connection-detail-BFvYx2p3.js → connection-detail-BSvpvNFK.js} +1 -1
  94. package/dist/client/assets/{connection-form-helpers-CoIQo1Gb.js → connection-form-helpers-D7wCXBEQ.js} +1 -1
  95. package/dist/client/assets/{connections-DW0Ud7Ns.js → connections-CPI7uE_z.js} +1 -1
  96. package/dist/client/assets/{create-organization-dialog-CY527eHC.js → create-organization-dialog-DA4SxHbD.js} +1 -1
  97. package/dist/client/assets/{decopilot-sse-pool-DU0j98RE.js → decopilot-sse-pool-BDzoef2l.js} +1 -1
  98. package/dist/client/assets/{dialog-1xIvEVWS.js → dialog-C9fBgi3G.js} +1 -1
  99. package/dist/client/assets/{domain-settings-CiOIlCwE.js → domain-settings-DxjLWoQG.js} +1 -1
  100. package/dist/client/assets/{download-app-dialog-CsPmnO0q.js → download-app-dialog-B6fQdqDO.js} +1 -1
  101. package/dist/client/assets/{drawer-C-pTdfTV.js → drawer-OLnwjI2K.js} +1 -1
  102. package/dist/client/assets/{dropdown-menu-Dm9zz_PI.js → dropdown-menu-tC5c5wq-.js} +1 -1
  103. package/dist/client/assets/{e2e-tab-DAWapk18.js → e2e-tab-CqS9P7Hc.js} +1 -1
  104. package/dist/client/assets/{editor-DuZZHVnS.js → editor-BjHf7-wi.js} +1 -1
  105. package/dist/client/assets/{empty-state-CaQCn5yY.js → empty-state-DgedPbF9.js} +1 -1
  106. package/dist/client/assets/{empty-state-Z33ir3je.js → empty-state-S-1xJrE6.js} +1 -1
  107. package/dist/client/assets/{extract-connection-data-C44EqyQK.js → extract-connection-data-CDeabBWK.js} +1 -1
  108. package/dist/client/assets/{file-explorer-DQ8njhcM.js → file-explorer-DJnvxauy.js} +1 -1
  109. package/dist/client/assets/{file-type-icon-Dl9zrC0W.js → file-type-icon-CzKQjLvK.js} +1 -1
  110. package/dist/client/assets/{folder-icon-DXofXja-.js → folder-icon-CA44zIJR.js} +1 -1
  111. package/dist/client/assets/{form-DLHM0IAy.js → form-BXpGp03G.js} +1 -1
  112. package/dist/client/assets/{general-D6rHAjlN.js → general-bt8cU3dV.js} +1 -1
  113. package/dist/client/assets/{github-repo-picker-BIbCpUFZ.js → github-repo-picker-Bo27g0p4.js} +1 -1
  114. package/dist/client/assets/{hooks-Cv_l36vR.js → hooks-CV5SIncY.js} +1 -1
  115. package/dist/client/assets/{hosting-tab-DtuFDGvE.js → hosting-tab-CsMIP4FI.js} +1 -1
  116. package/dist/client/assets/{index-ldx_aeXw.js → index-0aQAAJf0.js} +1 -1
  117. package/dist/client/assets/{index-fcQmErZ3.js → index-B0rGGILq.js} +1 -1
  118. package/dist/client/assets/{index-TRl02mXS.js → index-BoFDLZ6p.js} +6 -6
  119. package/dist/client/assets/{index-BVvpVlYL.js → index-BqzhWoLb.js} +1 -1
  120. package/dist/client/assets/{index-CUyq5xp-.js → index-BraqwIq2.js} +1 -1
  121. package/dist/client/assets/{index-BkljfHxy.js → index-CNfEIUn0.js} +2 -2
  122. package/dist/client/assets/{index-Dmu_jFDN.js → index-CReyG0_9.js} +1 -1
  123. package/dist/client/assets/{index-CRSJpMzc.js → index-CrPwkVjC.js} +1 -1
  124. package/dist/client/assets/{index-Dh_lhfEM.js → index-D-HXwBw8.js} +1 -1
  125. package/dist/client/assets/{index-Dm5mbx-j.js → index-Dr2i8l8p.js} +1 -1
  126. package/dist/client/assets/{index-redirect-B4WcqrST.js → index-redirect-CXMszyV9.js} +1 -1
  127. package/dist/client/assets/{infra-billing-CT4isBll.js → infra-billing-B9EzHEgn.js} +1 -1
  128. package/dist/client/assets/{input-CYJ7J22n.js → input-CxZ-2GPj.js} +1 -1
  129. package/dist/client/assets/{integration-icon-kfJeGcu4.js → integration-icon-BRZ0l9mu.js} +1 -1
  130. package/dist/client/assets/{invite-member-dialog-CcDGSu2c.js → invite-member-dialog-DT1qyQ4y.js} +1 -1
  131. package/dist/client/assets/{label-BSeVlzkX.js → label-BBk0UNMj.js} +1 -1
  132. package/dist/client/assets/{layout--aonA48-.js → layout-Bzk-ee8j.js} +1 -1
  133. package/dist/client/assets/{login-DbVueJaI.js → login-Dukc_kdh.js} +1 -1
  134. package/dist/client/assets/{markdown-D7QuNT69.js → markdown-CBbWAQAJ.js} +1 -1
  135. package/dist/client/assets/{mcp-oauth-dGHhlLy0.js → mcp-oauth-BTxNcy48.js} +1 -1
  136. package/dist/client/assets/{members-Bf8lcWZe.js → members-C8NuwGvm.js} +1 -1
  137. package/dist/client/assets/{monaco-editor-CC-Sqg8F.js → monaco-editor-DazsPMf1.js} +1 -1
  138. package/dist/client/assets/{monitoring-stats-row-vacc3BYl.js → monitoring-stats-row-CF0wwnO8.js} +1 -1
  139. package/dist/client/assets/{multi-select-nRNpGGJY.js → multi-select-D8btj7Ad.js} +1 -1
  140. package/dist/client/assets/{oauth-callback-Ce0X_vqm.js → oauth-callback-TXOLa-g7.js} +1 -1
  141. package/dist/client/assets/{oauth-callback-ai-provider-BdyUwN3J.js → oauth-callback-ai-provider-D7uzBtqi.js} +1 -1
  142. package/dist/client/assets/{onboarding-SmWY9lBA.js → onboarding-Dcdgez7W.js} +1 -1
  143. package/dist/client/assets/org-layout-DGy9Vle2.js +1 -0
  144. package/dist/client/assets/{organization-choice-C49clKoP.js → organization-choice-lamU-teH.js} +1 -1
  145. package/dist/client/assets/{orgs-CAjirR3W.js → orgs-D3W0G3Lo.js} +1 -1
  146. package/dist/client/assets/{page-seo-form-BGqqc2Gj.js → page-seo-form-Ctlc9vTL.js} +1 -1
  147. package/dist/client/assets/{popover-mZ_x_ILZ.js → popover-CxFVXm-T.js} +1 -1
  148. package/dist/client/assets/{post-calendar-DM4--jD1.js → post-calendar-vz5_mjGB.js} +1 -1
  149. package/dist/client/assets/{post-editor-GHkZtflO.js → post-editor-BIYWa81Q.js} +1 -1
  150. package/dist/client/assets/{primitives-Bp0pnH9F.js → primitives-wsknTEcb.js} +1 -1
  151. package/dist/client/assets/{profile-Dvj2Ky_G.js → profile-CCYT_2sA.js} +1 -1
  152. package/dist/client/assets/{project-app-view-C5a0S8VK.js → project-app-view-CLQMFT-S.js} +1 -1
  153. package/dist/client/assets/{project-icon-BBqdk5OE.js → project-icon-Da5qBAn7.js} +1 -1
  154. package/dist/client/assets/{prompts-Dr4JAnH0.js → prompts-zFhQIBym.js} +1 -1
  155. package/dist/client/assets/record-editor-bcL0jXd2.js +1 -0
  156. package/dist/client/assets/{redirect-editor-Bat0o4y3.js → redirect-editor-Dnqqv4DM.js} +1 -1
  157. package/dist/client/assets/registry-37zG_yfw.js +2 -0
  158. package/dist/client/assets/{registry-layout-DIey2mbB.js → registry-layout-DHuWNN39.js} +1 -1
  159. package/dist/client/assets/{reports-Bev3cmDf.js → reports-BtLy2yaF.js} +1 -1
  160. package/dist/client/assets/{require-capability-DOJ4tTFn.js → require-capability-DYq0fdEP.js} +1 -1
  161. package/dist/client/assets/{required-auth-layout-B2tIP5k3.js → required-auth-layout-BH79UCBF.js} +1 -1
  162. package/dist/client/assets/{reset-password-C4gYW7se.js → reset-password-CtDPHNXj.js} +1 -1
  163. package/dist/client/assets/{review-settings-BOZEVIl7.js → review-settings-BB2nSALo.js} +1 -1
  164. package/dist/client/assets/{roles-cRWL1Za5.js → roles-CXSZQVw3.js} +1 -1
  165. package/dist/client/assets/{schema-BgSBbsw7.js → schema-DO9s-3_3.js} +1 -1
  166. package/dist/client/assets/{scroll-area-0nfzfnAs.js → scroll-area-Bga4xYk7.js} +1 -1
  167. package/dist/client/assets/{search-input-CIki-uxf.js → search-input-CNFZM5Ki.js} +1 -1
  168. package/dist/client/assets/{secrets-D2e6phy9.js → secrets-BUpBecaC.js} +1 -1
  169. package/dist/client/assets/{sections-editor-D-QRzAnK.js → sections-editor-laKQjgs_.js} +1 -1
  170. package/dist/client/assets/{select-DqJyZyIQ.js → select-D5c8Otgi.js} +1 -1
  171. package/dist/client/assets/{select-model-BsGv2vyu.js → select-model-B4IX9QyY.js} +1 -1
  172. package/dist/client/assets/{self-tool-result-BoZ6MFRP.js → self-tool-result-PbyB4K2F.js} +1 -1
  173. package/dist/client/assets/{seo-editor-g6APT0uI.js → seo-editor-C-OX56j8.js} +1 -1
  174. package/dist/client/assets/settings-layout-CVdat1As.js +1 -0
  175. package/dist/client/assets/{settings-sidebar-jSd5MSjq.js → settings-sidebar-BedGL_Ku.js} +1 -1
  176. package/dist/client/assets/{shell-controls-C4MO7deC.js → shell-controls-DT_IXnne.js} +1 -1
  177. package/dist/client/assets/{shell-layout-tPdz54xh.js → shell-layout-zuPHJJxr.js} +1 -1
  178. package/dist/client/assets/{skill-preview-C-lpKGFK.js → skill-preview-Cds7l0IB.js} +1 -1
  179. package/dist/client/assets/{skills-C_OSw6ZN.js → skills-p_SYs6Ch.js} +1 -1
  180. package/dist/client/assets/{sso-BsFPpeYe.js → sso-JyaPp7fH.js} +1 -1
  181. package/dist/client/assets/{store-qwASLyWC.js → store-Bgn_Isxj.js} +1 -1
  182. package/dist/client/assets/store-registry-D9Jao96C.js +2 -0
  183. package/dist/client/assets/{switch-CZqeYbje.js → switch-C3EYj7hN.js} +1 -1
  184. package/dist/client/assets/{synced-repos-ByBUacaY.js → synced-repos-BmK-DcLv.js} +1 -1
  185. package/dist/client/assets/{table-DbdXafHS.js → table-DEic8MLd.js} +1 -1
  186. package/dist/client/assets/{tabs-C9EAqZz9.js → tabs-iA_HLM1O.js} +1 -1
  187. package/dist/client/assets/{task-board-7HRng9a2.js → task-board-Cw4I7XsI.js} +1 -1
  188. package/dist/client/assets/{task-route-_ESOOTZi.js → task-route-C2MKBcLF.js} +1 -1
  189. package/dist/client/assets/{tasks-CxA4gPZJ.js → tasks-Dt9zTeRV.js} +1 -1
  190. package/dist/client/assets/{textarea-90AQXVh4.js → textarea-BsDleKsG.js} +1 -1
  191. package/dist/client/assets/{toggle-group-Diuss92s.js → toggle-group-CTRGHvcL.js} +1 -1
  192. package/dist/client/assets/{toolbar-BWOWuYdi.js → toolbar-RiMn7tp7.js} +1 -1
  193. package/dist/client/assets/{toolbar-icon-button-DnenepzG.js → toolbar-icon-button-BJhOiNGi.js} +1 -1
  194. package/dist/client/assets/{track-Qcawd54k.js → track-DeADh2iG.js} +1 -1
  195. package/dist/client/assets/{types-B-HpXlbf.js → types-BXQK2N0O.js} +1 -1
  196. package/dist/client/assets/{use-ai-providers-CWtvyrT-.js → use-ai-providers-DfC2UWvW.js} +1 -1
  197. package/dist/client/assets/{use-automations-D9Y9jZ0Z.js → use-automations-4iFK5nkE.js} +1 -1
  198. package/dist/client/assets/{use-autosave-DIT9IDbg.js → use-autosave-B8HtQ_kf.js} +1 -1
  199. package/dist/client/assets/{use-connection-Uyph_H8d.js → use-connection-DNt4swpy.js} +1 -1
  200. package/dist/client/assets/{use-copy-Cuzq782M.js → use-copy-BXRFLn2M.js} +1 -1
  201. package/dist/client/assets/{use-create-virtual-mcp-D24xpy0o.js → use-create-virtual-mcp-D6-1K6Y8.js} +1 -1
  202. package/dist/client/assets/{use-debounced-autosave-DS1yKwxh.js → use-debounced-autosave-BzJT5pgf.js} +1 -1
  203. package/dist/client/assets/{use-debounced-value-DJ0hN8gB.js → use-debounced-value-Df4IN6g1.js} +1 -1
  204. package/dist/client/assets/{use-decopilot-events-Cm5dzSwF.js → use-decopilot-events-jW8Ieour.js} +1 -1
  205. package/dist/client/assets/{use-delete-connection-BKcL-J29.js → use-delete-connection-ByExgudV.js} +1 -1
  206. package/dist/client/assets/{use-deployment-admin-BE2hLNuR.js → use-deployment-admin-DPPYgxrx.js} +1 -1
  207. package/dist/client/assets/{use-destination-route-DLsn9uXe.js → use-destination-route-2_Kd2h4X.js} +1 -1
  208. package/dist/client/assets/{use-file-configs-CHDaFO85.js → use-file-configs-CNLxYc3F.js} +1 -1
  209. package/dist/client/assets/{use-infinite-scroll-Bj-_fMYw.js → use-infinite-scroll-Br6HoOld.js} +1 -1
  210. package/dist/client/assets/{use-join-requests-Cu_2S_W2.js → use-join-requests-CNFJW1O4.js} +1 -1
  211. package/dist/client/assets/{use-mcp-auth-status-HMnG1EUf.js → use-mcp-auth-status-B8KMbW6d.js} +1 -1
  212. package/dist/client/assets/{use-mcp-client-Deaem8WO.js → use-mcp-client-CgA8PWhj.js} +1 -1
  213. package/dist/client/assets/{use-mcp-prompts-C5IrmXgS.js → use-mcp-prompts-CG2uZJ9H.js} +1 -1
  214. package/dist/client/assets/{use-members-Cv__v2oz.js → use-members-4CiFzvQG.js} +1 -1
  215. package/dist/client/assets/{use-navigate-to-agent-B-P_VAZF.js → use-navigate-to-agent-BhLZN4vX.js} +1 -1
  216. package/dist/client/assets/{use-org-auth-client-DWweu3ja.js → use-org-auth-client-B2H7C6Ln.js} +1 -1
  217. package/dist/client/assets/{use-org-sso-CMfMnqpv.js → use-org-sso-CYEN5nc1.js} +1 -1
  218. package/dist/client/assets/{use-organization-roles-BQmWc6DN.js → use-organization-roles-du03Yb4v.js} +1 -1
  219. package/dist/client/assets/{use-organization-settings-CwdP6bUS.js → use-organization-settings-BRf1OrEm.js} +1 -1
  220. package/dist/client/assets/{use-panel-navigate-BRmpjsHj.js → use-panel-navigate-CypROp-b.js} +1 -1
  221. package/dist/client/assets/{use-registry-connections-CU4AWQn4.js → use-registry-connections-C524bvTW.js} +1 -1
  222. package/dist/client/assets/{use-secrets--00GbFn8.js → use-secrets-DJHtvR4D.js} +1 -1
  223. package/dist/client/assets/{use-section-preview-base-CTx7wzR-.js → use-section-preview-base-DLw35Lgq.js} +1 -1
  224. package/dist/client/assets/{use-status-sounds-CkzzANKj.js → use-status-sounds-v0k0tR6A.js} +1 -1
  225. package/dist/client/assets/{use-tags-k_sYBsNz.js → use-tags-gMOyjsIi.js} +1 -1
  226. package/dist/client/assets/{use-view-mode-3y5HyEBP.js → use-view-mode-CR8Vsk8K.js} +1 -1
  227. package/dist/client/assets/{use-virtual-mcp-12aBqy7V.js → use-virtual-mcp-XPauNnS5.js} +1 -1
  228. package/dist/client/assets/useInfiniteQuery-D4DO3KqU.js +1 -0
  229. package/dist/client/assets/useSuspenseInfiniteQuery-Ccvsai-C.js +1 -0
  230. package/dist/client/assets/{users-DjB8KCBh.js → users-D3_VWp5E.js} +1 -1
  231. package/dist/client/assets/{variant-calendar-DaQkdUZ_.js → variant-calendar-CLTs6LWA.js} +1 -1
  232. package/dist/client/assets/{view-mode-toggle-WcHFJdKB.js → view-mode-toggle-VRf3IsoS.js} +1 -1
  233. package/dist/client/index.html +1 -1
  234. package/dist/server/cli.js +541 -541
  235. package/dist/server/server.js +376 -376
  236. package/package.json +1 -1
  237. package/dist/client/assets/api-keys-HdPFDyhU.js +0 -1
  238. package/dist/client/assets/automations-BDc7sMoE.js +0 -1
  239. package/dist/client/assets/org-layout-D0H1iAiF.js +0 -1
  240. package/dist/client/assets/record-editor-2DwNqvUy.js +0 -1
  241. package/dist/client/assets/registry--J_j_Iy0.js +0 -2
  242. package/dist/client/assets/settings-layout-CkbSimBL.js +0 -1
  243. package/dist/client/assets/store-registry-cT643_3i.js +0 -2
  244. package/dist/client/assets/useInfiniteQuery-DiQVH8QR.js +0 -1
  245. package/dist/client/assets/useSuspenseInfiniteQuery-BMUPA2Dd.js +0 -1
@@ -1 +1 @@
1
- import{c as ie,j as t,a as ye,h as ce,b as de,m as Ce,K as Oe,r as P,B as Ne,e as pe,l as ae,t as he}from"./index-BkljfHxy.js";import{R as ze}from"./required-auth-layout-B2tIP5k3.js";import{A as se}from"./auth-split-layout-CC36faDL.js";import{O as Le}from"./organization-choice-C49clKoP.js";import{A as ve}from"./avatar-Cqr4rNtI.js";import{I as _e}from"./input-CYJ7J22n.js";import{L as Ee}from"./label-BSeVlzkX.js";import{S as Ae}from"./switch-CZqeYbje.js";import{t as De,a as Pe,b as Re}from"./Users03-DTortZ69.js";import{i as Fe}from"./CheckCircle-W70-Hp-u.js";import{a as Me}from"./Palette-Bo_A8ldC.js";import{i as $e}from"./Upload01-BCzsausn.js";import"./Plus-BIAtk7db.js";import"./User01-DpOHQvBN.js";const Te=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 xe(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function lt(){const i=ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ze,{children:t.jsx(qe,{})}),i[0]=e):e=i[0],e}function fe(i){const e=ie.c(13),{title:b,description:m,logoUrl:n,logoFallback:s}=i;let a;e[0]!==s||e[1]!==n?(a=t.jsx("div",{children:n?t.jsx(ve,{url:n,fallback:s??"?",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]=s,e[1]=n,e[2]=a):a=e[2];let f;e[3]!==b?(f=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:b}),e[3]=b,e[4]=f):f=e[4];let r;e[5]!==m?(r=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:m}),e[5]=m,e[6]=r):r=e[6];let o;e[7]!==f||e[8]!==r?(o=t.jsxs("div",{className:"space-y-2",children:[f,r]}),e[7]=f,e[8]=r,e[9]=o):o=e[9];let j;return e[10]!==a||e[11]!==o?(j=t.jsxs("div",{className:"grid gap-10",children:[a,o]}),e[10]=a,e[11]=o,e[12]=j):j=e[12],j}function qe(){const i=ie.c(4),{data:e,isPending:b}=ye.useSession();if(b){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(se,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(ce,{className:"size-3.5 text-muted-foreground"})})}),i[0]=a):a=i[0],a}const m=e?.user?.email??"",n=e?.user?.name;let s;return i[1]!==n||i[2]!==m?(s=t.jsx(Ue,{email:m,userName:n}),i[1]=n,i[2]=m,i[3]=s):s=i[3],s}function Ue(i){const e=ie.c(59),{email:b,userName:m}=i,n=de(),s=b.split("@")[1]?.toLowerCase()??"",a=!!s&&!Te.has(s),f=s.split(".")[0]??"",r=f.charAt(0).toUpperCase()+f.slice(1);let o;e[0]!==r||e[1]!==a||e[2]!==m?(o=a?r:m?.split(" ")[0]??"",e[0]=r,e[1]=a,e[2]=m,e[3]=o):o=e[3];const j=o,{data:c,isLoading:v,isError:u,refetch:w}=Ce({queryKey:Oe.domainLookup(s),queryFn:Je,enabled:a});let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=new Set,e[4]=g):g=e[4];const[_,M]=P.useState(g),[$,y]=P.useState(!1);if(v){let l;return e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ce,{className:"size-3.5 text-muted-foreground"}),e[5]=l):l=e[5],t.jsx(se,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checking",{domain:s})})]})})}if(u){let l;e[6]!==w?(l=()=>w(),e[6]=w,e[7]=l):l=e[7];let d;e[8]!==n?(d=n("routes.onboarding.retry"),e[8]=n,e[9]=d):d=e[9];let h;return e[10]!==l||e[11]!==d?(h=t.jsx(Ne,{variant:"outline",size:"sm",onClick:l,children:d}),e[10]=l,e[11]=d,e[12]=h):h=e[12],t.jsx(se,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checkFailed",{domain:s})}),h]})})}let N,A;e[13]!==c?.organizations?(N=(c?.organizations??[]).flatMap(Be),A=N.some(Ke),e[13]=c?.organizations,e[14]=N,e[15]=A):(N=e[14],A=e[15]);const p=A;if($){let l;e[16]!==m?(l=m?.split(" ")[0]??"",e[16]=m,e[17]=l):l=e[17];let d;e[18]!==y?(d=()=>y(!1),e[18]=y,e[19]=d):d=e[19];let h;return e[20]!==r||e[21]!==s||e[22]!==a||e[23]!==l||e[24]!==d?(h=t.jsx(be,{isCorporateEmail:a,emailDomain:s,domainLabel:r,defaultName:l,allowDomainClaim:!1,onBack:d}),e[20]=r,e[21]=s,e[22]=a,e[23]=l,e[24]=d,e[25]=h):h=e[25],h}if(N.length>0){let l;e[26]!==p||e[27]!==N.length||e[28]!==n?(l=p?N.length===1?n("routes.onboarding.accessSingle"):n("routes.onboarding.accessMultiple"):n("routes.onboarding.requestAccess"),e[26]=p,e[27]=N.length,e[28]=n,e[29]=l):l=e[29];let d;e[30]!==p||e[31]!==n?(d=n(p?"routes.onboarding.emailMatchesOrg":"routes.onboarding.emailMatchesOrgApproval"),e[30]=p,e[31]=n,e[32]=d):d=e[32];let h;e[33]!==l||e[34]!==d?(h=t.jsx(fe,{title:l,description:d}),e[33]=l,e[34]=d,e[35]=h):h=e[35];let O;e[36]!==M?(O=R=>M(F=>new Set(F).add(R)),e[36]=M,e[37]=O):O=e[37];let C;e[38]!==N||e[39]!==s||e[40]!==_||e[41]!==O?(C=t.jsx(Le,{organizations:N,domain:s,requestedSlugs:_,onRequestedSlug:O,onJoined:Ie}),e[38]=N,e[39]=s,e[40]=_,e[41]=O,e[42]=C):C=e[42];let z;e[43]!==y?(z=()=>y(!0),e[43]=y,e[44]=z):z=e[44];let E;e[45]!==n?(E=n("routes.onboarding.createNewOrg"),e[45]=n,e[46]=E):E=e[46];let k;e[47]!==E||e[48]!==z?(k=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:z,children:E}),e[47]=E,e[48]=z,e[49]=k):k=e[49];let L;return e[50]!==k||e[51]!==h||e[52]!==C?(L=t.jsx(se,{children:t.jsxs("div",{className:"grid gap-10",children:[h,C,k]})}),e[50]=k,e[51]=h,e[52]=C,e[53]=L):L=e[53],L}let D;return e[54]!==j||e[55]!==r||e[56]!==s||e[57]!==a?(D=t.jsx(be,{isCorporateEmail:a,emailDomain:s,domainLabel:r,defaultName:j}),e[54]=j,e[55]=r,e[56]=s,e[57]=a,e[58]=D):D=e[58],D}function Ie(i,e){window.location.href=`/${e}`}function Ke(i){return i.joinMode==="auto"}function Be(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 Je(){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 be(i){const e=ie.c(103),{isCorporateEmail:b,emailDomain:m,domainLabel:n,defaultName:s,allowDomainClaim:a,onBack:f}=i,r=a===void 0?!0:a,o=de(),j=b&&r?`https://www.google.com/s2/favicons?domain=${m}&sz=128`:null,[c,v]=P.useState(s),[u,w]=P.useState(j),[g,_]=P.useState(!0),[M,$]=P.useState(null);let y;e[0]!==g||e[1]!==u||e[2]!==c?(y=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.trim()||void 0,logo:u??void 0,claimDomain:g})}),S=await x.json();if(!x.ok||!S.success)throw new Error(S.error||"Failed to set up organization");return S},e[0]=g,e[1]=u,e[2]=c,e[3]=y):y=e[3];let N;e[4]!==g?(N=x=>{if(!x.slug)return;const S=we.filter(ke=>g||!ke.claimOnly).length,ne=Se*(S-1)+800;$(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},ne)},e[4]=g,e[5]=N):N=e[5];let A;e[6]!==y||e[7]!==N?(A={mutationFn:y,onSuccess:N},e[6]=y,e[7]=N,e[8]=A):A=e[8];const p=pe(A);let D;e[9]!==u||e[10]!==c?(D={mutationFn:async()=>{const x=c.trim(),S=xe(x);if(!S)throw new Error("Invalid organization name");const ne=await ye.organization.create({name:x,slug:S,...u?{logo:u}:{}});if(ne?.error)throw new Error(ne.error.message||"Failed to create organization");window.location.href=`/${ne?.data?.slug??S}`}},e[9]=u,e[10]=c,e[11]=D):D=e[11];const l=pe(D);if(p.isPending||M){let x;e[12]!==n||e[13]!==c?(x=c.trim()||n,e[12]=n,e[13]=c,e[14]=x):x=e[14];let S;return e[15]!==g||e[16]!==m||e[17]!==u||e[18]!==x?(S=t.jsx(se,{children:t.jsx(Ye,{orgName:x,domain:m,claimDomain:g,logoUrl:u})}),e[15]=g,e[16]=m,e[17]=u,e[18]=x,e[19]=S):S=e[19],S}const d=l.isPending;let h;e[20]!==c?(h=xe(c.trim()),e[20]=c,e[21]=h):h=e[21];const O=!!h,C=p.error||l.error||null;let z;e[22]!==r||e[23]!==O||e[24]!==l||e[25]!==p||e[26]!==b?(z=x=>{x.preventDefault(),O&&(b&&r?p.mutate():l.mutate())},e[22]=r,e[23]=O,e[24]=l,e[25]=p,e[26]=b,e[27]=z):z=e[27];const E=z;let k;e[28]!==o?(k=o("routes.onboarding.welcomeTitle"),e[28]=o,e[29]=k):k=e[29];let L;e[30]!==o?(L=o("routes.onboarding.setupDescription"),e[30]=o,e[31]=L):L=e[31];let R;e[32]!==k||e[33]!==L?(R=t.jsx(fe,{title:k,description:L}),e[32]=k,e[33]=L,e[34]=R):R=e[34];let F;e[35]!==o?(F=o("routes.onboarding.orgAvatar"),e[35]=o,e[36]=F):F=e[36];let T;e[37]!==F?(T=t.jsx("p",{className:"text-sm font-medium",children:F}),e[37]=F,e[38]=T):T=e[38];let q;e[39]!==o?(q=o("routes.onboarding.optional"),e[39]=o,e[40]=q):q=e[40];let U;e[41]!==q?(U=t.jsx("p",{className:"text-xs text-muted-foreground",children:q}),e[41]=q,e[42]=U):U=e[42];let I;e[43]!==T||e[44]!==U?(I=t.jsxs("div",{className:"space-y-0.5",children:[T,U]}),e[43]=T,e[44]=U,e[45]=I):I=e[45];let K;e[46]!==s||e[47]!==c?(K=(c.trim()||s||"?").charAt(0).toUpperCase(),e[46]=s,e[47]=c,e[48]=K):K=e[48];const me=d||p.isPending;let B;e[49]!==u||e[50]!==K||e[51]!==me?(B=t.jsx(Ge,{value:u,fallback:K,onChange:w,disabled:me}),e[49]=u,e[50]=K,e[51]=me,e[52]=B):B=e[52];let J;e[53]!==I||e[54]!==B?(J=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[I,B]}),e[53]=I,e[54]=B,e[55]=J):J=e[55];let G;e[56]!==o?(G=o("routes.onboarding.orgName"),e[56]=o,e[57]=G):G=e[57];let Y;e[58]!==G?(Y=t.jsx(Ee,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:G}),e[58]=G,e[59]=Y):Y=e[59];let re;e[60]===Symbol.for("react.memo_cache_sentinel")?(re=x=>v(x.target.value),e[60]=re):re=e[60];let H;e[61]!==s||e[62]!==o?(H=s||o("routes.onboarding.myOrganizationPlaceholder"),e[61]=s,e[62]=o,e[63]=H):H=e[63];const ue=d||p.isPending;let Q;e[64]!==c||e[65]!==H||e[66]!==ue?(Q=t.jsx(_e,{id:"org-name",value:c,onChange:re,placeholder:H,disabled:ue,className:"h-10 max-w-[220px]"}),e[64]=c,e[65]=H,e[66]=ue,e[67]=Q):Q=e[67];let W;e[68]!==Y||e[69]!==Q?(W=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[Y,Q]}),e[68]=Y,e[69]=Q,e[70]=W):W=e[70];let V;e[71]!==r||e[72]!==g||e[73]!==p.isPending||e[74]!==m||e[75]!==b||e[76]!==d||e[77]!==o?(V=b&&r&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:o("routes.onboarding.allowSignups",{domain:m})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("routes.onboarding.allowSignupsDescription",{domain:m})})]}),t.jsx(Ae,{checked:g,onCheckedChange:_,disabled:d||p.isPending})]}),e[71]=r,e[72]=g,e[73]=p.isPending,e[74]=m,e[75]=b,e[76]=d,e[77]=o,e[78]=V):V=e[78];let X;e[79]!==J||e[80]!==W||e[81]!==V?(X=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[J,W,V]}),e[79]=J,e[80]=W,e[81]=V,e[82]=X):X=e[82];let Z;e[83]!==C||e[84]!==o?(Z=C&&t.jsx("p",{className:"text-xs text-destructive",children:C instanceof Error?C.message:o("routes.onboarding.failedCreateOrg")}),e[83]=C,e[84]=o,e[85]=Z):Z=e[85];const ge=!O||d||p.isPending;let ee;e[86]!==p.isPending||e[87]!==d||e[88]!==o?(ee=d||p.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ce,{className:"size-3.5"})," ",o("routes.onboarding.creating")]}):o("routes.onboarding.continue"),e[86]=p.isPending,e[87]=d,e[88]=o,e[89]=ee):ee=e[89];let te;e[90]!==ge||e[91]!==ee?(te=t.jsx(Ne,{type:"submit",size:"xl",className:"w-full",disabled:ge,children:ee}),e[90]=ge,e[91]=ee,e[92]=te):te=e[92];let oe;e[93]!==f||e[94]!==o?(oe=f&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:f,children:o("routes.onboarding.seeAvailableOrgs")}),e[93]=f,e[94]=o,e[95]=oe):oe=e[95];let le;return e[96]!==E||e[97]!==R||e[98]!==X||e[99]!==Z||e[100]!==te||e[101]!==oe?(le=t.jsx(se,{children:t.jsxs("form",{onSubmit:E,className:"grid gap-10",children:[R,X,Z,te,oe]})}),e[96]=E,e[97]=R,e[98]=X,e[99]=Z,e[100]=te,e[101]=oe,e[102]=le):le=e[102],le}function Ge(i){const e=ie.c(18),{value:b,fallback:m,onChange:n,disabled:s}=i,a=de(),f=P.useRef(null);let r;e[0]!==n||e[1]!==a?(r=M=>{const $=M.target.files?.[0];if(!$)return;if($.size>2097152){he.error(a("routes.onboarding.imageTooLarge")),f.current&&(f.current.value="");return}const y=new FileReader;y.onerror=()=>he.error(a("routes.onboarding.failedReadImage")),y.onloadend=()=>{y.result&&n(y.result),f.current&&(f.current.value="")},y.readAsDataURL($)},e[0]=n,e[1]=a,e[2]=r):r=e[2];const o=r;let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f.current?.click(),e[3]=j):j=e[3];let c;e[4]!==a?(c=a("routes.onboarding.uploadOrgLogo"),e[4]=a,e[5]=c):c=e[5];let v;e[6]!==s||e[7]!==o?(v=t.jsx("input",{ref:f,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:s}),e[6]=s,e[7]=o,e[8]=v):v=e[8];const u=b??void 0;let w;e[9]!==m||e[10]!==u?(w=t.jsx(ve,{url:u,fallback:m,shape:"square",size:"base"}),e[9]=m,e[10]=u,e[11]=w):w=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=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($e,{size:14,className:"text-white"})}),e[12]=g):g=e[12];let _;return e[13]!==s||e[14]!==c||e[15]!==v||e[16]!==w?(_=t.jsxs("button",{type:"button",onClick:j,disabled:s,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":c,children:[v,w,g]}),e[13]=s,e[14]=c,e[15]=v,e[16]=w,e[17]=_):_=e[17],_}const we=[{icon:De,labelKey:"routes.onboarding.step.creatingOrg",claimOnly:!1},{icon:Pe,labelKey:"routes.onboarding.step.claimingDomain",claimOnly:!0},{icon:Re,labelKey:"routes.onboarding.step.enablingAutoJoin",claimOnly:!0},{icon:Me,labelKey:"routes.onboarding.step.extractingBrand",claimOnly:!1}],Se=1500,je=[{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 Ye({orgName:i,domain:e,claimDomain:b,logoUrl:m}){const n=de(),s=we.filter(o=>b||!o.claimOnly),[a,f]=P.useState(0),r=P.useRef(!1);if(!r.current){r.current=!0;for(let o=1;o<s.length;o++)setTimeout(()=>f(o),Se*o)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(fe,{title:n("routes.onboarding.settingUp",{orgName:i}),description:n("routes.onboarding.gettingReady",{domain:e}),logoUrl:m??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:s.map((o,j)=>{const c=o.icon,v=j===a,u=j<a,w=je[j%je.length],g=n(o.labelKey);return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:u||v?1:.4},children:[t.jsxs("span",{className:ae("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!u&&(v?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:u?{backgroundColor:w.bg,color:w.fg}:void 0,children:[t.jsx(Fe,{size:16,className:ae("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",u?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(ce,{className:ae("absolute size-4","motion-safe:transition-opacity motion-safe:duration-200",v?"opacity-100":"opacity-0")}),t.jsx(c,{size:16,className:ae("absolute motion-safe:transition-opacity motion-safe:duration-200",!u&&!v?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:ae("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",v||u?"text-foreground":"text-muted-foreground"),children:g})]},o.labelKey)})})]})}export{lt as default};
1
+ import{c as ie,j as t,a as ye,h as ce,b as de,m as Ce,K as Oe,r as P,B as Ne,e as pe,l as ae,t as he}from"./index-CNfEIUn0.js";import{R as ze}from"./required-auth-layout-BH79UCBF.js";import{A as se}from"./auth-split-layout-BtoAQGpk.js";import{O as Le}from"./organization-choice-lamU-teH.js";import{A as ve}from"./avatar-DVuZ2F_T.js";import{I as _e}from"./input-CxZ-2GPj.js";import{L as Ee}from"./label-BBk0UNMj.js";import{S as Ae}from"./switch-C3EYj7hN.js";import{t as De,a as Pe,b as Re}from"./Users03-BTZsMKrW.js";import{i as Fe}from"./CheckCircle-Bs1i8n8R.js";import{a as Me}from"./Palette-BOxVbiJL.js";import{i as $e}from"./Upload01-CZcQRY37.js";import"./Plus-npiI5-7X.js";import"./User01-DvzdeHqd.js";const Te=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 xe(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function lt(){const i=ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ze,{children:t.jsx(qe,{})}),i[0]=e):e=i[0],e}function fe(i){const e=ie.c(13),{title:b,description:m,logoUrl:n,logoFallback:s}=i;let a;e[0]!==s||e[1]!==n?(a=t.jsx("div",{children:n?t.jsx(ve,{url:n,fallback:s??"?",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]=s,e[1]=n,e[2]=a):a=e[2];let f;e[3]!==b?(f=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:b}),e[3]=b,e[4]=f):f=e[4];let r;e[5]!==m?(r=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:m}),e[5]=m,e[6]=r):r=e[6];let o;e[7]!==f||e[8]!==r?(o=t.jsxs("div",{className:"space-y-2",children:[f,r]}),e[7]=f,e[8]=r,e[9]=o):o=e[9];let j;return e[10]!==a||e[11]!==o?(j=t.jsxs("div",{className:"grid gap-10",children:[a,o]}),e[10]=a,e[11]=o,e[12]=j):j=e[12],j}function qe(){const i=ie.c(4),{data:e,isPending:b}=ye.useSession();if(b){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(se,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(ce,{className:"size-3.5 text-muted-foreground"})})}),i[0]=a):a=i[0],a}const m=e?.user?.email??"",n=e?.user?.name;let s;return i[1]!==n||i[2]!==m?(s=t.jsx(Ue,{email:m,userName:n}),i[1]=n,i[2]=m,i[3]=s):s=i[3],s}function Ue(i){const e=ie.c(59),{email:b,userName:m}=i,n=de(),s=b.split("@")[1]?.toLowerCase()??"",a=!!s&&!Te.has(s),f=s.split(".")[0]??"",r=f.charAt(0).toUpperCase()+f.slice(1);let o;e[0]!==r||e[1]!==a||e[2]!==m?(o=a?r:m?.split(" ")[0]??"",e[0]=r,e[1]=a,e[2]=m,e[3]=o):o=e[3];const j=o,{data:c,isLoading:v,isError:u,refetch:w}=Ce({queryKey:Oe.domainLookup(s),queryFn:Je,enabled:a});let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=new Set,e[4]=g):g=e[4];const[_,M]=P.useState(g),[$,y]=P.useState(!1);if(v){let l;return e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ce,{className:"size-3.5 text-muted-foreground"}),e[5]=l):l=e[5],t.jsx(se,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checking",{domain:s})})]})})}if(u){let l;e[6]!==w?(l=()=>w(),e[6]=w,e[7]=l):l=e[7];let d;e[8]!==n?(d=n("routes.onboarding.retry"),e[8]=n,e[9]=d):d=e[9];let h;return e[10]!==l||e[11]!==d?(h=t.jsx(Ne,{variant:"outline",size:"sm",onClick:l,children:d}),e[10]=l,e[11]=d,e[12]=h):h=e[12],t.jsx(se,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checkFailed",{domain:s})}),h]})})}let N,A;e[13]!==c?.organizations?(N=(c?.organizations??[]).flatMap(Be),A=N.some(Ke),e[13]=c?.organizations,e[14]=N,e[15]=A):(N=e[14],A=e[15]);const p=A;if($){let l;e[16]!==m?(l=m?.split(" ")[0]??"",e[16]=m,e[17]=l):l=e[17];let d;e[18]!==y?(d=()=>y(!1),e[18]=y,e[19]=d):d=e[19];let h;return e[20]!==r||e[21]!==s||e[22]!==a||e[23]!==l||e[24]!==d?(h=t.jsx(be,{isCorporateEmail:a,emailDomain:s,domainLabel:r,defaultName:l,allowDomainClaim:!1,onBack:d}),e[20]=r,e[21]=s,e[22]=a,e[23]=l,e[24]=d,e[25]=h):h=e[25],h}if(N.length>0){let l;e[26]!==p||e[27]!==N.length||e[28]!==n?(l=p?N.length===1?n("routes.onboarding.accessSingle"):n("routes.onboarding.accessMultiple"):n("routes.onboarding.requestAccess"),e[26]=p,e[27]=N.length,e[28]=n,e[29]=l):l=e[29];let d;e[30]!==p||e[31]!==n?(d=n(p?"routes.onboarding.emailMatchesOrg":"routes.onboarding.emailMatchesOrgApproval"),e[30]=p,e[31]=n,e[32]=d):d=e[32];let h;e[33]!==l||e[34]!==d?(h=t.jsx(fe,{title:l,description:d}),e[33]=l,e[34]=d,e[35]=h):h=e[35];let O;e[36]!==M?(O=R=>M(F=>new Set(F).add(R)),e[36]=M,e[37]=O):O=e[37];let C;e[38]!==N||e[39]!==s||e[40]!==_||e[41]!==O?(C=t.jsx(Le,{organizations:N,domain:s,requestedSlugs:_,onRequestedSlug:O,onJoined:Ie}),e[38]=N,e[39]=s,e[40]=_,e[41]=O,e[42]=C):C=e[42];let z;e[43]!==y?(z=()=>y(!0),e[43]=y,e[44]=z):z=e[44];let E;e[45]!==n?(E=n("routes.onboarding.createNewOrg"),e[45]=n,e[46]=E):E=e[46];let k;e[47]!==E||e[48]!==z?(k=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:z,children:E}),e[47]=E,e[48]=z,e[49]=k):k=e[49];let L;return e[50]!==k||e[51]!==h||e[52]!==C?(L=t.jsx(se,{children:t.jsxs("div",{className:"grid gap-10",children:[h,C,k]})}),e[50]=k,e[51]=h,e[52]=C,e[53]=L):L=e[53],L}let D;return e[54]!==j||e[55]!==r||e[56]!==s||e[57]!==a?(D=t.jsx(be,{isCorporateEmail:a,emailDomain:s,domainLabel:r,defaultName:j}),e[54]=j,e[55]=r,e[56]=s,e[57]=a,e[58]=D):D=e[58],D}function Ie(i,e){window.location.href=`/${e}`}function Ke(i){return i.joinMode==="auto"}function Be(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 Je(){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 be(i){const e=ie.c(103),{isCorporateEmail:b,emailDomain:m,domainLabel:n,defaultName:s,allowDomainClaim:a,onBack:f}=i,r=a===void 0?!0:a,o=de(),j=b&&r?`https://www.google.com/s2/favicons?domain=${m}&sz=128`:null,[c,v]=P.useState(s),[u,w]=P.useState(j),[g,_]=P.useState(!0),[M,$]=P.useState(null);let y;e[0]!==g||e[1]!==u||e[2]!==c?(y=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.trim()||void 0,logo:u??void 0,claimDomain:g})}),S=await x.json();if(!x.ok||!S.success)throw new Error(S.error||"Failed to set up organization");return S},e[0]=g,e[1]=u,e[2]=c,e[3]=y):y=e[3];let N;e[4]!==g?(N=x=>{if(!x.slug)return;const S=we.filter(ke=>g||!ke.claimOnly).length,ne=Se*(S-1)+800;$(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},ne)},e[4]=g,e[5]=N):N=e[5];let A;e[6]!==y||e[7]!==N?(A={mutationFn:y,onSuccess:N},e[6]=y,e[7]=N,e[8]=A):A=e[8];const p=pe(A);let D;e[9]!==u||e[10]!==c?(D={mutationFn:async()=>{const x=c.trim(),S=xe(x);if(!S)throw new Error("Invalid organization name");const ne=await ye.organization.create({name:x,slug:S,...u?{logo:u}:{}});if(ne?.error)throw new Error(ne.error.message||"Failed to create organization");window.location.href=`/${ne?.data?.slug??S}`}},e[9]=u,e[10]=c,e[11]=D):D=e[11];const l=pe(D);if(p.isPending||M){let x;e[12]!==n||e[13]!==c?(x=c.trim()||n,e[12]=n,e[13]=c,e[14]=x):x=e[14];let S;return e[15]!==g||e[16]!==m||e[17]!==u||e[18]!==x?(S=t.jsx(se,{children:t.jsx(Ye,{orgName:x,domain:m,claimDomain:g,logoUrl:u})}),e[15]=g,e[16]=m,e[17]=u,e[18]=x,e[19]=S):S=e[19],S}const d=l.isPending;let h;e[20]!==c?(h=xe(c.trim()),e[20]=c,e[21]=h):h=e[21];const O=!!h,C=p.error||l.error||null;let z;e[22]!==r||e[23]!==O||e[24]!==l||e[25]!==p||e[26]!==b?(z=x=>{x.preventDefault(),O&&(b&&r?p.mutate():l.mutate())},e[22]=r,e[23]=O,e[24]=l,e[25]=p,e[26]=b,e[27]=z):z=e[27];const E=z;let k;e[28]!==o?(k=o("routes.onboarding.welcomeTitle"),e[28]=o,e[29]=k):k=e[29];let L;e[30]!==o?(L=o("routes.onboarding.setupDescription"),e[30]=o,e[31]=L):L=e[31];let R;e[32]!==k||e[33]!==L?(R=t.jsx(fe,{title:k,description:L}),e[32]=k,e[33]=L,e[34]=R):R=e[34];let F;e[35]!==o?(F=o("routes.onboarding.orgAvatar"),e[35]=o,e[36]=F):F=e[36];let T;e[37]!==F?(T=t.jsx("p",{className:"text-sm font-medium",children:F}),e[37]=F,e[38]=T):T=e[38];let q;e[39]!==o?(q=o("routes.onboarding.optional"),e[39]=o,e[40]=q):q=e[40];let U;e[41]!==q?(U=t.jsx("p",{className:"text-xs text-muted-foreground",children:q}),e[41]=q,e[42]=U):U=e[42];let I;e[43]!==T||e[44]!==U?(I=t.jsxs("div",{className:"space-y-0.5",children:[T,U]}),e[43]=T,e[44]=U,e[45]=I):I=e[45];let K;e[46]!==s||e[47]!==c?(K=(c.trim()||s||"?").charAt(0).toUpperCase(),e[46]=s,e[47]=c,e[48]=K):K=e[48];const me=d||p.isPending;let B;e[49]!==u||e[50]!==K||e[51]!==me?(B=t.jsx(Ge,{value:u,fallback:K,onChange:w,disabled:me}),e[49]=u,e[50]=K,e[51]=me,e[52]=B):B=e[52];let J;e[53]!==I||e[54]!==B?(J=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[I,B]}),e[53]=I,e[54]=B,e[55]=J):J=e[55];let G;e[56]!==o?(G=o("routes.onboarding.orgName"),e[56]=o,e[57]=G):G=e[57];let Y;e[58]!==G?(Y=t.jsx(Ee,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:G}),e[58]=G,e[59]=Y):Y=e[59];let re;e[60]===Symbol.for("react.memo_cache_sentinel")?(re=x=>v(x.target.value),e[60]=re):re=e[60];let H;e[61]!==s||e[62]!==o?(H=s||o("routes.onboarding.myOrganizationPlaceholder"),e[61]=s,e[62]=o,e[63]=H):H=e[63];const ue=d||p.isPending;let Q;e[64]!==c||e[65]!==H||e[66]!==ue?(Q=t.jsx(_e,{id:"org-name",value:c,onChange:re,placeholder:H,disabled:ue,className:"h-10 max-w-[220px]"}),e[64]=c,e[65]=H,e[66]=ue,e[67]=Q):Q=e[67];let W;e[68]!==Y||e[69]!==Q?(W=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[Y,Q]}),e[68]=Y,e[69]=Q,e[70]=W):W=e[70];let V;e[71]!==r||e[72]!==g||e[73]!==p.isPending||e[74]!==m||e[75]!==b||e[76]!==d||e[77]!==o?(V=b&&r&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:o("routes.onboarding.allowSignups",{domain:m})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("routes.onboarding.allowSignupsDescription",{domain:m})})]}),t.jsx(Ae,{checked:g,onCheckedChange:_,disabled:d||p.isPending})]}),e[71]=r,e[72]=g,e[73]=p.isPending,e[74]=m,e[75]=b,e[76]=d,e[77]=o,e[78]=V):V=e[78];let X;e[79]!==J||e[80]!==W||e[81]!==V?(X=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[J,W,V]}),e[79]=J,e[80]=W,e[81]=V,e[82]=X):X=e[82];let Z;e[83]!==C||e[84]!==o?(Z=C&&t.jsx("p",{className:"text-xs text-destructive",children:C instanceof Error?C.message:o("routes.onboarding.failedCreateOrg")}),e[83]=C,e[84]=o,e[85]=Z):Z=e[85];const ge=!O||d||p.isPending;let ee;e[86]!==p.isPending||e[87]!==d||e[88]!==o?(ee=d||p.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ce,{className:"size-3.5"})," ",o("routes.onboarding.creating")]}):o("routes.onboarding.continue"),e[86]=p.isPending,e[87]=d,e[88]=o,e[89]=ee):ee=e[89];let te;e[90]!==ge||e[91]!==ee?(te=t.jsx(Ne,{type:"submit",size:"xl",className:"w-full",disabled:ge,children:ee}),e[90]=ge,e[91]=ee,e[92]=te):te=e[92];let oe;e[93]!==f||e[94]!==o?(oe=f&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:f,children:o("routes.onboarding.seeAvailableOrgs")}),e[93]=f,e[94]=o,e[95]=oe):oe=e[95];let le;return e[96]!==E||e[97]!==R||e[98]!==X||e[99]!==Z||e[100]!==te||e[101]!==oe?(le=t.jsx(se,{children:t.jsxs("form",{onSubmit:E,className:"grid gap-10",children:[R,X,Z,te,oe]})}),e[96]=E,e[97]=R,e[98]=X,e[99]=Z,e[100]=te,e[101]=oe,e[102]=le):le=e[102],le}function Ge(i){const e=ie.c(18),{value:b,fallback:m,onChange:n,disabled:s}=i,a=de(),f=P.useRef(null);let r;e[0]!==n||e[1]!==a?(r=M=>{const $=M.target.files?.[0];if(!$)return;if($.size>2097152){he.error(a("routes.onboarding.imageTooLarge")),f.current&&(f.current.value="");return}const y=new FileReader;y.onerror=()=>he.error(a("routes.onboarding.failedReadImage")),y.onloadend=()=>{y.result&&n(y.result),f.current&&(f.current.value="")},y.readAsDataURL($)},e[0]=n,e[1]=a,e[2]=r):r=e[2];const o=r;let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f.current?.click(),e[3]=j):j=e[3];let c;e[4]!==a?(c=a("routes.onboarding.uploadOrgLogo"),e[4]=a,e[5]=c):c=e[5];let v;e[6]!==s||e[7]!==o?(v=t.jsx("input",{ref:f,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:s}),e[6]=s,e[7]=o,e[8]=v):v=e[8];const u=b??void 0;let w;e[9]!==m||e[10]!==u?(w=t.jsx(ve,{url:u,fallback:m,shape:"square",size:"base"}),e[9]=m,e[10]=u,e[11]=w):w=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=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($e,{size:14,className:"text-white"})}),e[12]=g):g=e[12];let _;return e[13]!==s||e[14]!==c||e[15]!==v||e[16]!==w?(_=t.jsxs("button",{type:"button",onClick:j,disabled:s,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":c,children:[v,w,g]}),e[13]=s,e[14]=c,e[15]=v,e[16]=w,e[17]=_):_=e[17],_}const we=[{icon:De,labelKey:"routes.onboarding.step.creatingOrg",claimOnly:!1},{icon:Pe,labelKey:"routes.onboarding.step.claimingDomain",claimOnly:!0},{icon:Re,labelKey:"routes.onboarding.step.enablingAutoJoin",claimOnly:!0},{icon:Me,labelKey:"routes.onboarding.step.extractingBrand",claimOnly:!1}],Se=1500,je=[{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 Ye({orgName:i,domain:e,claimDomain:b,logoUrl:m}){const n=de(),s=we.filter(o=>b||!o.claimOnly),[a,f]=P.useState(0),r=P.useRef(!1);if(!r.current){r.current=!0;for(let o=1;o<s.length;o++)setTimeout(()=>f(o),Se*o)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(fe,{title:n("routes.onboarding.settingUp",{orgName:i}),description:n("routes.onboarding.gettingReady",{domain:e}),logoUrl:m??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:s.map((o,j)=>{const c=o.icon,v=j===a,u=j<a,w=je[j%je.length],g=n(o.labelKey);return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:u||v?1:.4},children:[t.jsxs("span",{className:ae("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!u&&(v?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:u?{backgroundColor:w.bg,color:w.fg}:void 0,children:[t.jsx(Fe,{size:16,className:ae("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",u?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(ce,{className:ae("absolute size-4","motion-safe:transition-opacity motion-safe:duration-200",v?"opacity-100":"opacity-0")}),t.jsx(c,{size:16,className:ae("absolute motion-safe:transition-opacity motion-safe:duration-200",!u&&!v?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:ae("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",v||u?"text-foreground":"text-muted-foreground"),children:g})]},o.labelKey)})})]})}export{lt as default};
@@ -0,0 +1 @@
1
+ import{c as w,b as z,G as g,j as a,H as _,r as j,I as D,J as I,M as O,O as L,R as A,U as M}from"./index-CNfEIUn0.js";import{S as T}from"./index-Dr2i8l8p.js";import{u as H}from"./settings-sidebar-BedGL_Ku.js";import"./task-route-C2MKBcLF.js";import"./hooks-CV5SIncY.js";import"./use-destination-route-2_Kd2h4X.js";import"./constants-DNuUCxmW.js";import"./use-mcp-client-CgA8PWhj.js";import"./auth-BfPf7zhg.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BDzoef2l.js";import"./task-board-Cw4I7XsI.js";import"./schema-DO9s-3_3.js";import"./ChevronUp-CDlju1TC.js";import"./agent-icon-Cm-rraMc.js";import"./AlertCircle-B02pIqyO.js";import"./Tool01-DpeMCocB.js";import"./ArrowUp-CQ6SET-t.js";import"./ArrowLeft-DzuSLuVr.js";import"./Tool02-DMSvrhPC.js";import"./XCircle-DC63K01N.js";import"./TrendUp01-DBKvZ-DZ.js";import"./ZoomOut-Du-2I-dz.js";import"./Users03-BTZsMKrW.js";import"./CheckCircle-Bs1i8n8R.js";import"./Check-CnxYOeJk.js";import"./ChevronRight-Bo_7PLYL.js";import"./ChevronSelectorVertical-BWdGiimP.js";import"./DotsVertical-DRP3CifW.js";import"./UserSquare-jm1EvWHs.js";import"./Copy01-D5Ill_kE.js";import"./CreditCard01-NbxHy6Lv.js";import"./Download01-DoUNzBPU.js";import"./Settings02-C0EhiTe4.js";import"./Eye-COu8umtC.js";import"./Share07-Cp3sAWWN.js";import"./GitBranch01-idBGys5s.js";import"./Globe01-CtD7u0-k.js";import"./XClose-VJXgkRtY.js";import"./HardDrive-BVnECxVe.js";import"./Image01-Cy8ZoIiy.js";import"./Key01-DoBw9G0M.js";import"./Link01-u2EoXuNT.js";import"./LinkExternal01-CBhAp9XW.js";import"./Monitor01-DmqpK-8S.js";import"./Sun-e_DnDd3f.js";import"./Package-CcAuJGku.js";import"./Palette-BOxVbiJL.js";import"./Play-DG2731JJ.js";import"./Plus-npiI5-7X.js";import"./SearchMd-DM9iwGft.js";import"./Shield01-B0ob1ipu.js";import"./Stars01-BgKhcopx.js";import"./Trash01-C64jvZUr.js";import"./Upload01-CZcQRY37.js";import"./User01-DvzdeHqd.js";import"./Users01-HKHLFhfO.js";import"./Zap-Buyt_ZmJ.js";import"./use-virtual-mcp-XPauNnS5.js";import"./github-repo-COLY3wWI.js";import"./use-navigate-to-agent-BhLZN4vX.js";import"./chat-context-CALwiBF_.js";import"./use-panel-navigate-CypROp-b.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-DfC2UWvW.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-jW8Ieour.js";import"./use-organization-settings-BRf1OrEm.js";import"./toolbar-icon-button-BJhOiNGi.js";import"./popover-CxFVXm-T.js";import"./drawer-OLnwjI2K.js";import"./github-repo-picker-Bo27g0p4.js";import"./dialog-C9fBgi3G.js";import"./collection-search-BvGAgDld.js";import"./use-debounced-value-Df4IN6g1.js";import"./use-connection-DNt4swpy.js";import"./authenticate-and-persist-oauth-hh7nuAWR.js";import"./mcp-oauth-BTxNcy48.js";import"./extract-connection-data-CDeabBWK.js";import"./metadata-dUsYcpuu.js";import"./connection-CXkee5u6.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./project-icon-Da5qBAn7.js";import"./shell-layout-zuPHJJxr.js";import"./avatar-DVuZ2F_T.js";import"./download-app-dialog-B6fQdqDO.js";import"./command-BYns7CwK.js";import"./index-BraqwIq2.js";import"./required-auth-layout-BH79UCBF.js";import"./use-org-sso-CYEN5nc1.js";import"./connection-card-CWUJLExI.js";import"./use-registry-connections-C524bvTW.js";import"./useInfiniteQuery-D4DO3KqU.js";import"./use-infinite-scroll-Br6HoOld.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-BRZ0l9mu.js";import"./form-BXpGp03G.js";import"./label-BBk0UNMj.js";import"./input-CxZ-2GPj.js";import"./select-D5c8Otgi.js";import"./textarea-BsDleKsG.js";import"./connection-form-helpers-D7wCXBEQ.js";import"./collection-tabs-Cd4Vv0EE.js";import"./badge-FcNiwbMm.js";import"./useSuspenseInfiniteQuery-Ccvsai-C.js";import"./use-file-configs-CNLxYc3F.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-tC5c5wq-.js";import"./get-initials-D-f_fDFw.js";import"./use-deployment-admin-DPPYgxrx.js";import"./invite-member-dialog-DT1qyQ4y.js";import"./use-org-auth-client-B2H7C6Ln.js";import"./use-organization-roles-du03Yb4v.js";import"./scroll-area-Bga4xYk7.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./create-organization-dialog-DA4SxHbD.js";import"./alert-dialog-EueylpK5.js";import"./use-join-requests-CNFJW1O4.js";function N(t){const e=w.c(11),{onPointerDown:o,onDoubleClick:l}=t,i=z(),{isMobile:b}=g(),c=H();if(b||c)return null;let s;e[0]!==i?(s=i("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=i,e[1]=s):s=e[1];let r;e[2]!==i?(r=i("sidebar.sidebarResizeHandle.title"),e[2]=i,e[3]=r):r=e[3];let p,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(p={left:"var(--sidebar-width)"},m=a.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=p,e[5]=m):(p=e[4],m=e[5]);let n;return e[6]!==l||e[7]!==o||e[8]!==s||e[9]!==r?(n=a.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":s,title:r,onPointerDown:o,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:p,children:m}),e[6]=l,e[7]=o,e[8]=s,e[9]=r,e[10]=n):n=e[10],n}const v=240,W=400,C="sidebar.width";function S(t){return Math.max(v,Math.min(W,t))}function X(){const t=w.c(11),[e,o]=_(C,$),l=j.useRef(null);let i;t[0]!==o||t[1]!==e?(i=m=>{m.preventDefault();const n=m.clientX,d=S(e),f=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),u=f?Array.from(f.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const y of u)y.style.transition="none";const h=y=>{const x=S(d+(y.clientX-n));f?.style.setProperty("--sidebar-width",`${x}px`)},R=y=>{const x=S(d+(y.clientX-n));o(x);for(const E of u)E.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",R),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",h),window.addEventListener("pointerup",R)},t[0]=o,t[1]=e,t[2]=i):i=t[2];const b=i;let c;t[3]!==o?(c=()=>{o(v)},t[3]=o,t[4]=c):c=t[4];const s=c;let r;t[5]!==e?(r=S(e),t[5]=e,t[6]=r):r=t[6];let p;return t[7]!==b||t[8]!==s||t[9]!==r?(p={width:r,wrapperRef:l,onStartResize:b,resetWidth:s},t[7]=b,t[8]=s,t[9]=r,t[10]=p):p=t[10],p}function $(t){return typeof t=="number"?S(t):v}const P="3.125rem";function rr(){const t=w.c(16),e=D();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=I.sidebarOpen(),t[0]=o):o=t[0];const[l,i]=_(o,!0),{width:b,wrapperRef:c,onStartResize:s,resetWidth:r}=X(),p=`${b}px`;let m;t[1]!==p?(m={"--sidebar-width":p,"--sidebar-width-icon":P},t[1]=p,t[2]=m):m=t[2];const n=m;let d;t[3]!==e||t[4]!==s||t[5]!==r?(d=!e&&a.jsxs(a.Fragment,{children:[a.jsx(T,{}),a.jsx(N,{onPointerDown:s,onDoubleClick:r})]}),t[3]=e,t[4]=s,t[5]=r,t[6]=d):d=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsx(O,{className:"flex flex-col min-h-0",style:{background:"transparent",containerType:"inline-size"},children:a.jsx(L,{})}),t[7]=f):f=t[7];let u;t[8]!==n||t[9]!==d||t[10]!==c?(u=a.jsx("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:a.jsxs(A,{ref:c,className:"flex-1 bg-sidebar relative min-h-0",style:n,children:[d,f]})}),t[8]=n,t[9]=d,t[10]=c,t[11]=u):u=t[11];let h;return t[12]!==i||t[13]!==l||t[14]!==u?(h=a.jsx(M,{open:l,onOpenChange:i,children:u}),t[12]=i,t[13]=l,t[14]=u,t[15]=h):h=t[15],h}export{rr as default};
@@ -1 +1 @@
1
- import{c as G,r as H,e as A,j as s,B as L,h as B}from"./index-BkljfHxy.js";import{A as I}from"./avatar-Cqr4rNtI.js";import{s as K}from"./Plus-BIAtk7db.js";async function T(i,e,p){const o=await fetch(i,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:e})}),l=await o.json();if(!o.ok||!l.success)throw new Error(l.error||p);return l}function Z(i){const e=G.c(45),{organizations:p,domain:o,requestedSlugs:l,onRequestedSlug:C,onSelected:h,onJoined:c,onRequestCompleted:M,selectLabel:O,onCreateNew:S,createNewLabel:P}=i,j=O===void 0?"Select":O,_=P===void 0?"Create new organization":P;let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=new Set,e[0]=N):N=e[0];const[J,U]=H.useState(N);let v;e[1]!==C?(v=r=>{U(t=>new Set(t).add(r)),C?.(r)},e[1]=C,e[2]=v):v=e[2];const E=v;let z;e[3]!==c?(z={mutationFn:V,onSuccess:r=>{const{organization:t,slug:x}=r;c?.(t,x)}},e[3]=c,e[4]=z):z=e[4];const n=A(z);let R;e[5]!==E||e[6]!==c||e[7]!==M?(R={mutationFn:Q,onSuccess:r=>{const{organization:t,slug:x,alreadyMember:F}=r;if(F&&x){c?.(t,x);return}E(t.slug),M?.(t)}},e[5]=E,e[6]=c,e[7]=M,e[8]=R):R=e[8];const a=A(R);let u;e[9]!==l?(u=l??[],e[9]=l,e[10]=u):u=e[10];let y;e[11]!==J||e[12]!==u?(y=new Set([...u,...J]),e[11]=J,e[12]=u,e[13]=y):y=e[13];const b=y,q=n.variables?.slug??null,w=a.variables?.slug??null;let d;e[14]!==_||e[15]!==S?(d=S&&s.jsxs("button",{type:"button",onClick:S,className:"rounded-xl border border-dashed border-border p-4 flex items-center justify-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground hover:border-foreground/40 transition-colors",children:[s.jsx(K,{size:16}),_]}),e[14]=_,e[15]=S,e[16]=d):d=e[16];let m;if(e[17]!==o||e[18]!==b||e[19]!==n||e[20]!==h||e[21]!==p||e[22]!==q||e[23]!==w||e[24]!==a||e[25]!==j){let r;e[27]!==o||e[28]!==b||e[29]!==n||e[30]!==h||e[31]!==q||e[32]!==w||e[33]!==a||e[34]!==j?(r=t=>{const x=n.isPending&&q===t.slug,F=a.isPending&&w===t.slug,$=b.has(t.slug),D=t.logo??(o?`https://www.google.com/s2/favicons?domain=${o}&sz=128`:null);return s.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[s.jsx(I,{url:D??void 0,fallback:t.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:t.name}),o&&s.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",o]})]}),t.joinMode==="auto"?s.jsx(L,{size:"default",onClick:()=>n.mutate(t),disabled:n.isPending,children:x?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(B,{className:"size-3.5"})," Joining..."]}):"Join"}):t.joinMode==="request"?$?s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):s.jsx(L,{size:"default",variant:"outline",onClick:()=>a.mutate(t),disabled:a.isPending,children:F?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(B,{className:"size-3.5"})," Requesting..."]}):"Request to join"}):s.jsx(L,{size:"default",onClick:()=>h?.(t),children:j})]},t.id)},e[27]=o,e[28]=b,e[29]=n,e[30]=h,e[31]=q,e[32]=w,e[33]=a,e[34]=j,e[35]=r):r=e[35],m=p.map(r),e[17]=o,e[18]=b,e[19]=n,e[20]=h,e[21]=p,e[22]=q,e[23]=w,e[24]=a,e[25]=j,e[26]=m}else m=e[26];let g;e[36]!==n.error?(g=n.error&&s.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[36]=n.error,e[37]=g):g=e[37];let f;e[38]!==a.error?(f=a.error&&s.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[38]=a.error,e[39]=f):f=e[39];let k;return e[40]!==m||e[41]!==g||e[42]!==f||e[43]!==d?(k=s.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g,f]}),e[40]=m,e[41]=g,e[42]=f,e[43]=d,e[44]=k):k=e[44],k}async function Q(i){const e=await T("/api/auth/custom/domain-request-join",i.slug,"Failed to request access");return{organization:i,slug:e.slug,alreadyMember:e.alreadyMember}}async function V(i){const e=await T("/api/auth/custom/domain-join",i.slug,"Failed to join organization");return{organization:i,slug:e.slug??i.slug}}export{Z as O};
1
+ import{c as G,r as H,e as A,j as s,B as L,h as B}from"./index-CNfEIUn0.js";import{A as I}from"./avatar-DVuZ2F_T.js";import{s as K}from"./Plus-npiI5-7X.js";async function T(i,e,p){const o=await fetch(i,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:e})}),l=await o.json();if(!o.ok||!l.success)throw new Error(l.error||p);return l}function Z(i){const e=G.c(45),{organizations:p,domain:o,requestedSlugs:l,onRequestedSlug:C,onSelected:h,onJoined:c,onRequestCompleted:M,selectLabel:O,onCreateNew:S,createNewLabel:P}=i,j=O===void 0?"Select":O,_=P===void 0?"Create new organization":P;let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=new Set,e[0]=N):N=e[0];const[J,U]=H.useState(N);let v;e[1]!==C?(v=r=>{U(t=>new Set(t).add(r)),C?.(r)},e[1]=C,e[2]=v):v=e[2];const E=v;let z;e[3]!==c?(z={mutationFn:V,onSuccess:r=>{const{organization:t,slug:x}=r;c?.(t,x)}},e[3]=c,e[4]=z):z=e[4];const n=A(z);let R;e[5]!==E||e[6]!==c||e[7]!==M?(R={mutationFn:Q,onSuccess:r=>{const{organization:t,slug:x,alreadyMember:F}=r;if(F&&x){c?.(t,x);return}E(t.slug),M?.(t)}},e[5]=E,e[6]=c,e[7]=M,e[8]=R):R=e[8];const a=A(R);let u;e[9]!==l?(u=l??[],e[9]=l,e[10]=u):u=e[10];let y;e[11]!==J||e[12]!==u?(y=new Set([...u,...J]),e[11]=J,e[12]=u,e[13]=y):y=e[13];const b=y,q=n.variables?.slug??null,w=a.variables?.slug??null;let d;e[14]!==_||e[15]!==S?(d=S&&s.jsxs("button",{type:"button",onClick:S,className:"rounded-xl border border-dashed border-border p-4 flex items-center justify-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground hover:border-foreground/40 transition-colors",children:[s.jsx(K,{size:16}),_]}),e[14]=_,e[15]=S,e[16]=d):d=e[16];let m;if(e[17]!==o||e[18]!==b||e[19]!==n||e[20]!==h||e[21]!==p||e[22]!==q||e[23]!==w||e[24]!==a||e[25]!==j){let r;e[27]!==o||e[28]!==b||e[29]!==n||e[30]!==h||e[31]!==q||e[32]!==w||e[33]!==a||e[34]!==j?(r=t=>{const x=n.isPending&&q===t.slug,F=a.isPending&&w===t.slug,$=b.has(t.slug),D=t.logo??(o?`https://www.google.com/s2/favicons?domain=${o}&sz=128`:null);return s.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[s.jsx(I,{url:D??void 0,fallback:t.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:t.name}),o&&s.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",o]})]}),t.joinMode==="auto"?s.jsx(L,{size:"default",onClick:()=>n.mutate(t),disabled:n.isPending,children:x?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(B,{className:"size-3.5"})," Joining..."]}):"Join"}):t.joinMode==="request"?$?s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):s.jsx(L,{size:"default",variant:"outline",onClick:()=>a.mutate(t),disabled:a.isPending,children:F?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(B,{className:"size-3.5"})," Requesting..."]}):"Request to join"}):s.jsx(L,{size:"default",onClick:()=>h?.(t),children:j})]},t.id)},e[27]=o,e[28]=b,e[29]=n,e[30]=h,e[31]=q,e[32]=w,e[33]=a,e[34]=j,e[35]=r):r=e[35],m=p.map(r),e[17]=o,e[18]=b,e[19]=n,e[20]=h,e[21]=p,e[22]=q,e[23]=w,e[24]=a,e[25]=j,e[26]=m}else m=e[26];let g;e[36]!==n.error?(g=n.error&&s.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[36]=n.error,e[37]=g):g=e[37];let f;e[38]!==a.error?(f=a.error&&s.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[38]=a.error,e[39]=f):f=e[39];let k;return e[40]!==m||e[41]!==g||e[42]!==f||e[43]!==d?(k=s.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g,f]}),e[40]=m,e[41]=g,e[42]=f,e[43]=d,e[44]=k):k=e[44],k}async function Q(i){const e=await T("/api/auth/custom/domain-request-join",i.slug,"Failed to request access");return{organization:i,slug:e.slug,alreadyMember:e.alreadyMember}}async function V(i){const e=await T("/api/auth/custom/domain-join",i.slug,"Failed to join organization");return{organization:i,slug:e.slug??i.slug}}export{Z as O};
@@ -1 +1 @@
1
- import{c as Te,b as De,r as M,m as Be,j as n,P as Ie,K as Ne,n as Ue,e as Le,t as ie,B as I}from"./index-BkljfHxy.js";import{C as ms}from"./collection-table-wrapper-eg9oZGZn.js";import{E as ts}from"./empty-state-Z33ir3je.js";import{S as us}from"./search-input-CIki-uxf.js";import{I as Ve}from"./input-CYJ7J22n.js";import{L as fs}from"./label-BSeVlzkX.js";import{u as gs}from"./use-debounced-value-DJ0hN8gB.js";import{D as Qe,a as Ge,b as He,c as Ye,d as We,e as Xe}from"./dialog-1xIvEVWS.js";import{S as hs,a as xs,b as ps,c as js,d as ys}from"./select-DqJyZyIQ.js";import{S as vs}from"./switch-CZqeYbje.js";import{B as Ce}from"./badge-CdD_S6_J.js";import{O as Ss,D as bs}from"./schema-BgSBbsw7.js";import{S as Ns}from"./site-slug-uya6Wp4-.js";import{a as we}from"./admin-fetch-CCSvjTk1.js";import{f as ws}from"./format-time-BnbuEtat.js";import"./table-DbdXafHS.js";import"./ArrowUp-TsmTWJjN.js";import"./SearchMd-D6yqdaba.js";import"./Check-grvRnT6d.js";import"./ChevronUp-DbYyUJ2c.js";import"./differenceInSeconds-NQ4PDo0z.js";const Cs=["owner","admin","user"],as=Object.entries(Ss.shape).map(([t,e])=>({key:t,description:e.description??"",defaultOn:bs.has(t)})),ns=new Set(as.map(t=>t.key)),is=/^(?=.{1,64}$)[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;function _s(t){const e={};for(const[i,s]of Object.entries(t)){if(typeof s!="boolean")return null;e[i]=s}return e}function Es(t){const e=Te.c(133),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(null),[P,R]=M.useState(!1),[b,_]=M.useState(""),[k,p]=M.useState(null),[r,o]=M.useState(!1),[x,E]=M.useState(""),[N,f]=M.useState(null),F=Ue();let j;e[0]!==i.id?(j=Ne.deploymentAdminOrgFlags(i.id),e[0]=i.id,e[1]=j):j=e[1];let w;e[2]!==i.id?(w=()=>we(`/api/_admin/orgs/${i.id}/flags`),e[2]=i.id,e[3]=w):w=e[3];let h;e[4]!==S||e[5]!==j||e[6]!==w?(h={queryKey:j,queryFn:w,enabled:S},e[4]=S,e[5]=j,e[6]=w,e[7]=h):h=e[7];const{data:u,isLoading:C,isFetching:A,isError:d}=Be(h),y=C||A;let z;e[8]!==u?.effective?(z=u?.effective??{},e[8]=u?.effective,e[9]=z):z=e[9];const B=z;let Z;e[10]!==u?.flags?(Z=u?.flags??{},e[10]=u?.flags,e[11]=Z):Z=e[11];const c=a??Z;let q;e[12]!==i.id?(q=ne=>we(`/api/_admin/orgs/${i.id}/flags`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(ne)}),e[12]=i.id,e[13]=q):q=e[13];let G;e[14]!==s?(G=ne=>{ie.error(ne instanceof Error?ne.message:s("admin.orgs.failedSaveFlags"))},e[14]=s,e[15]=G):G=e[15];const g=Le({mutationFn:q,onSuccess:()=>{ie.success(s("admin.orgs.flagsSaved",{org:i.name})),F.invalidateQueries({queryKey:Ne.deploymentAdminOrgFlags(i.id)}),J(),O(!1)},onError:G}),J=()=>{K(null),R(!1),_(""),p(null),o(!1),E(""),f(null)};let L;e[16]!==J?(L=ne=>{O(ne),ne||J()},e[16]=J,e[17]=L):L=e[17];const v=L;let T,D,H,U,V,ee,Y,W,Q,se;if(e[18]!==c||e[19]!==a||e[20]!==B||e[21]!==v||e[22]!==y||e[23]!==d||e[24]!==r||e[25]!==x||e[26]!==g||e[27]!==b||e[28]!==k||e[29]!==S||e[30]!==i.name||e[31]!==P||e[32]!==s){const ne=new Set(ns),Ze=as.map(Os);for(const m of Object.keys(c))ne.has(m)||(ne.add(m),Ze.push({key:m,description:"",defaultOn:!1,known:!1}));let Ee;e[43]!==c?(Ee=(m,te)=>K({...c,[m]:te}),e[43]=c,e[44]=Ee):Ee=e[44];const Oe=Ee;let Pe;e[45]!==c||e[46]!==b||e[47]!==Oe||e[48]!==s?(Pe=()=>{const m=b.trim();if(!is.test(m)){p(s("admin.orgs.invalidFlagKey"));return}if(ns.has(m)||m in c){p(s("admin.orgs.duplicateFlagKey"));return}Oe(m,!0),_(""),p(null),R(!1)},e[45]=c,e[46]=b,e[47]=Oe,e[48]=s,e[49]=Pe):Pe=e[49];const es=Pe;let ke;e[50]!==c||e[51]!==r?(ke=()=>{r||(E(JSON.stringify(c,null,2)),f(null),o(!0))},e[50]=c,e[51]=r,e[52]=ke):ke=e[52];const $e=ke;let fe,ae;e[53]!==r||e[54]!==x||e[55]!==s?(fe=()=>{if(!r)return;const m=ae();if(!m){f(s("admin.orgs.invalidJson"));return}K(m),f(null),o(!1)},ae=()=>{let m;try{m=JSON.parse(x)}catch{return null}if(!m||typeof m!="object"||Array.isArray(m))return null;const te=Object.entries(m);for(const[Ae,Me]of te)if(!is.test(Ae)||typeof Me!="boolean")return null;return Object.fromEntries(te)},e[53]=r,e[54]=x,e[55]=s,e[56]=fe,e[57]=ae):(fe=e[56],ae=e[57]);let Fe;e[58]!==c||e[59]!==a||e[60]!==v||e[61]!==r||e[62]!==g||e[63]!==ae||e[64]!==s?(Fe=()=>{const m=r?ae():_s(c);if(!m){f(s(r?"admin.orgs.invalidJson":"admin.orgs.invalidStoredValue"));return}if(f(null),a===null){v(!1);return}g.mutate({flags:m,mode:"replace"})},e[58]=c,e[59]=a,e[60]=v,e[61]=r,e[62]=g,e[63]=ae,e[64]=s,e[65]=Fe):Fe=e[65],H=Fe,D=Qe,Y=S,W=v;let ge;e[66]!==s?(ge=s("admin.orgs.flags"),e[66]=s,e[67]=ge):ge=e[67],e[68]!==ge?(Q=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:ge})}),e[68]=ge,e[69]=Q):Q=e[69],T=He,se="sm:max-w-2xl";let he;e[70]!==i.name||e[71]!==s?(he=s("admin.orgs.flagsFor",{org:i.name}),e[70]=i.name,e[71]=s,e[72]=he):he=e[72],e[73]!==he?(U=n.jsx(Ye,{children:n.jsx(We,{children:he})}),e[73]=he,e[74]=U):U=e[74];let xe;e[75]!==s?(xe=s("admin.orgs.flagsDescription"),e[75]=s,e[76]=xe):xe=e[76];let pe;e[77]!==xe?(pe=n.jsx("p",{className:"text-sm text-muted-foreground",children:xe}),e[77]=xe,e[78]=pe):pe=e[78];const Re=r?"outline":"secondary";let je;e[79]!==s?(je=s("admin.orgs.flagsViewToggles"),e[79]=s,e[80]=je):je=e[80];let ye;e[81]!==fe||e[82]!==d||e[83]!==Re||e[84]!==je?(ye=n.jsx(I,{variant:Re,size:"sm",onClick:fe,disabled:d,children:je}),e[81]=fe,e[82]=d,e[83]=Re,e[84]=je,e[85]=ye):ye=e[85];const qe=r?"secondary":"outline",Je=y||d;let ve;e[86]!==s?(ve=s("admin.orgs.flagsViewJson"),e[86]=s,e[87]=ve):ve=e[87];let Se;e[88]!==$e||e[89]!==qe||e[90]!==Je||e[91]!==ve?(Se=n.jsx(I,{variant:qe,size:"sm",onClick:$e,disabled:Je,children:ve}),e[88]=$e,e[89]=qe,e[90]=Je,e[91]=ve,e[92]=Se):Se=e[92];let be;e[93]!==ye||e[94]!==Se?(be=n.jsxs("div",{className:"flex shrink-0 gap-1",children:[ye,Se]}),e[93]=ye,e[94]=Se,e[95]=be):be=e[95],e[96]!==pe||e[97]!==be?(V=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[pe,be]}),e[96]=pe,e[97]=be,e[98]=V):V=e[98],ee=d?n.jsx("p",{className:"text-sm text-destructive",children:s("admin.orgs.failedLoadFlags")}):r?n.jsxs("div",{className:"space-y-2",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.jsonReplaceHint")}),n.jsx("textarea",{"aria-label":s("admin.orgs.jsonEditorLabel"),value:x,spellCheck:!1,disabled:g.isPending,onChange:m=>{E(m.target.value),f(null)},className:"h-64 w-full rounded-md border border-border bg-background p-3 font-mono text-sm text-foreground"})]}):n.jsxs("div",{className:"max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:[Ze.map(m=>{const{key:te,description:Ae,defaultOn:Me,known:rs}=m,ze=c[te],os=typeof ze=="boolean"?ze:B[te]??!1,ss=ze===void 0,ds=!ss&&typeof ze!="boolean";return n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(vs,{"aria-label":te,checked:os,disabled:y||g.isPending,onCheckedChange:cs=>Oe(te,cs)}),n.jsxs("div",{className:"min-w-0 space-y-1",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("code",{className:"text-sm font-medium text-foreground",children:te}),Me?n.jsx(Ce,{variant:"secondary",size:"default",children:s("admin.orgs.flagDefaultOn")}):null,rs?null:n.jsx(Ce,{variant:"warning",size:"default",children:s("admin.orgs.flagCustom")}),ss?n.jsx(Ce,{variant:"outline",size:"default",children:s("admin.orgs.flagUnset")}):null,ds?n.jsx(Ce,{variant:"destructive",size:"default",children:s("admin.orgs.flagInvalid")}):null]}),Ae?n.jsx("p",{className:"text-sm text-muted-foreground",children:Ae}):null]})]},te)}),P?n.jsxs("div",{className:"space-y-1 border-t border-border pt-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ve,{autoFocus:!0,"aria-label":s("admin.orgs.customFlagKeyLabel"),value:b,placeholder:s("admin.orgs.customFlagKeyPlaceholder"),onChange:m=>{_(m.target.value),p(null)},onKeyDown:m=>{m.key==="Enter"&&es()},className:"font-mono"}),n.jsx(I,{variant:"outline",onClick:es,children:s("admin.orgs.add")})]}),k?n.jsx("p",{className:"text-sm text-destructive",children:k}):null]}):n.jsx(I,{variant:"outline",size:"sm",disabled:y,onClick:()=>R(!0),children:s("admin.orgs.addCustomFlag")})]}),e[18]=c,e[19]=a,e[20]=B,e[21]=v,e[22]=y,e[23]=d,e[24]=r,e[25]=x,e[26]=g,e[27]=b,e[28]=k,e[29]=S,e[30]=i.name,e[31]=P,e[32]=s,e[33]=T,e[34]=D,e[35]=H,e[36]=U,e[37]=V,e[38]=ee,e[39]=Y,e[40]=W,e[41]=Q,e[42]=se}else T=e[33],D=e[34],H=e[35],U=e[36],V=e[37],ee=e[38],Y=e[39],W=e[40],Q=e[41],se=e[42];let l;e[99]!==N?(l=N?n.jsx("p",{className:"text-sm text-destructive",children:N}):null,e[99]=N,e[100]=l):l=e[100];let $;e[101]!==v?($=()=>v(!1),e[101]=v,e[102]=$):$=e[102];const le=g.isPending;let re;e[103]!==s?(re=s("admin.orgs.cancel"),e[103]=s,e[104]=re):re=e[104];let oe;e[105]!==g.isPending||e[106]!==$||e[107]!==re?(oe=n.jsx(I,{variant:"outline",onClick:$,disabled:le,children:re}),e[105]=g.isPending,e[106]=$,e[107]=re,e[108]=oe):oe=e[108];const Ke=y||d||g.isPending;let de;e[109]!==g.isPending||e[110]!==s?(de=g.isPending?s("admin.orgs.saving"):s("admin.orgs.save"),e[109]=g.isPending,e[110]=s,e[111]=de):de=e[111];let ce;e[112]!==H||e[113]!==Ke||e[114]!==de?(ce=n.jsx(I,{onClick:H,disabled:Ke,children:de}),e[112]=H,e[113]=Ke,e[114]=de,e[115]=ce):ce=e[115];let me;e[116]!==oe||e[117]!==ce?(me=n.jsxs(Xe,{children:[oe,ce]}),e[116]=oe,e[117]=ce,e[118]=me):me=e[118];let ue;e[119]!==T||e[120]!==U||e[121]!==V||e[122]!==ee||e[123]!==l||e[124]!==me||e[125]!==se?(ue=n.jsxs(T,{className:se,children:[U,V,ee,l,me]}),e[119]=T,e[120]=U,e[121]=V,e[122]=ee,e[123]=l,e[124]=me,e[125]=se,e[126]=ue):ue=e[126];let _e;return e[127]!==D||e[128]!==Y||e[129]!==W||e[130]!==Q||e[131]!==ue?(_e=n.jsxs(D,{open:Y,onOpenChange:W,children:[Q,ue]}),e[127]=D,e[128]=Y,e[129]=W,e[130]=Q,e[131]=ue,e[132]=_e):_e=e[132],_e}function Os(t){return{...t,known:!0}}class ls extends Error{constructor(e,i,s){super("owned_by_other_org"),this.slug=e,this.ownerName=i,this.ownerSlug=s,this.name="SiteConflictError"}slug;ownerName;ownerSlug}function Ps(t){const e=Te.c(82),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(""),[P,R]=M.useState(null),[b,_]=M.useState(null),k=Ue();let p;e[0]!==i.id?(p=Ne.deploymentAdminOrgSites(i.id),e[0]=i.id,e[1]=p):p=e[1];let r;e[2]!==i.id?(r=()=>we(`/api/_admin/orgs/${i.id}/sites`),e[2]=i.id,e[3]=r):r=e[3];let o;e[4]!==S||e[5]!==p||e[6]!==r?(o={queryKey:p,queryFn:r,enabled:S},e[4]=S,e[5]=p,e[6]=r,e[7]=o):o=e[7];const{data:x,isLoading:E,isError:N}=Be(o);let f;e[8]!==x?.sites?(f=x?.sites??[],e[8]=x?.sites,e[9]=f):f=e[9];const F=f;let j;e[10]!==i.id||e[11]!==k?(j=()=>k.invalidateQueries({queryKey:Ne.deploymentAdminOrgSites(i.id)}),e[10]=i.id,e[11]=k,e[12]=j):j=e[12];const w=j;let h;e[13]!==i.id?(h=async l=>{const $=await fetch(`/api/_admin/orgs/${i.id}/sites`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),le=await $.json().catch(ks);if($.status===409&&le.error==="owned_by_other_org")throw new ls(l.slug,le.ownerOrganizationName??null,le.ownerOrganizationSlug??null);if(!$.ok)throw new Error(le.error||`Request failed (HTTP ${$.status})`);return le},e[13]=i.id,e[14]=h):h=e[14];let u;e[15]!==w||e[16]!==i.name||e[17]!==s?(u=(l,$)=>{ie.success($.reassign?s("admin.orgs.siteReassigned",{slug:$.slug,org:i.name}):s("admin.orgs.siteAdded",{slug:$.slug,org:i.name})),w(),K(""),R(null),_(null)},e[15]=w,e[16]=i.name,e[17]=s,e[18]=u):u=e[18];let C;e[19]!==s?(C=l=>{if(l instanceof ls){_({slug:l.slug,ownerName:l.ownerName,ownerSlug:l.ownerSlug});return}ie.error(l instanceof Error?l.message:s("admin.orgs.failedAddSite"))},e[19]=s,e[20]=C):C=e[20];let A;e[21]!==h||e[22]!==u||e[23]!==C?(A={mutationFn:h,onSuccess:u,onError:C},e[21]=h,e[22]=u,e[23]=C,e[24]=A):A=e[24];const d=Le(A);let y;e[25]!==i.id?(y=l=>we(`/api/_admin/orgs/${i.id}/sites/${encodeURIComponent(l)}`,{method:"DELETE"}),e[25]=i.id,e[26]=y):y=e[26];let z;e[27]!==w||e[28]!==i.name||e[29]!==s?(z=(l,$)=>{ie.success(s("admin.orgs.siteRemoved",{slug:$,org:i.name})),w()},e[27]=w,e[28]=i.name,e[29]=s,e[30]=z):z=e[30];let B;e[31]!==s?(B=l=>{ie.error(l instanceof Error?l.message:s("admin.orgs.failedRemoveSite"))},e[31]=s,e[32]=B):B=e[32];let Z;e[33]!==y||e[34]!==z||e[35]!==B?(Z={mutationFn:y,onSuccess:z,onError:B},e[33]=y,e[34]=z,e[35]=B,e[36]=Z):Z=e[36];const X=Le(Z),c=d.isPending||X.isPending;let q;e[37]===Symbol.for("react.memo_cache_sentinel")?(q=l=>{O(l),l||(K(""),R(null),_(null))},e[37]=q):q=e[37];const G=q;let g;e[38]!==d||e[39]!==a||e[40]!==s?(g=()=>{const l=a.trim().toLowerCase();if(!Ns.test(l)){R(s("admin.orgs.invalidSiteSlug"));return}R(null),_(null),d.mutate({slug:l})},e[38]=d,e[39]=a,e[40]=s,e[41]=g):g=e[41];const J=g;let L;e[42]!==s?(L=s("admin.orgs.sites"),e[42]=s,e[43]=L):L=e[43];let v;e[44]!==L?(v=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:L})}),e[44]=L,e[45]=v):v=e[45];let T;e[46]!==i.name||e[47]!==s?(T=s("admin.orgs.sitesFor",{org:i.name}),e[46]=i.name,e[47]=s,e[48]=T):T=e[48];let D;e[49]!==T?(D=n.jsx(Ye,{children:n.jsx(We,{children:T})}),e[49]=T,e[50]=D):D=e[50];let H;e[51]!==s?(H=s("admin.orgs.sitesDescription"),e[51]=s,e[52]=H):H=e[52];let U;e[53]!==H?(U=n.jsx("p",{className:"text-sm text-muted-foreground",children:H}),e[53]=H,e[54]=U):U=e[54];let V;e[55]!==P||e[56]!==d||e[57]!==c||e[58]!==b||e[59]!==J||e[60]!==N||e[61]!==E||e[62]!==a||e[63]!==X||e[64]!==F||e[65]!==s?(V=N?n.jsx("p",{className:"text-sm text-destructive",children:s("admin.orgs.failedLoadSites")}):n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"max-h-[45vh] space-y-2 overflow-y-auto pr-1",children:E?n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.loading")}):F.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.noSites")}):F.map(l=>n.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-2",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("code",{className:"truncate text-sm font-medium text-foreground",children:l.slug}),n.jsx(Ce,{variant:"outline",size:"default",children:l.source})]}),n.jsx(I,{variant:"ghost",size:"sm",disabled:c,onClick:()=>X.mutate(l.slug),children:s("admin.orgs.remove")})]},l.slug))}),n.jsxs("div",{className:"space-y-1 border-t border-border pt-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ve,{value:a,placeholder:s("admin.orgs.siteSlugPlaceholder"),disabled:d.isPending,onChange:l=>{K(l.target.value),R(null),_(null)},onKeyDown:l=>{l.key==="Enter"&&J()},className:"font-mono"}),n.jsx(I,{variant:"outline",disabled:!a.trim()||d.isPending,onClick:J,children:s("admin.orgs.add")})]}),P?n.jsx("p",{className:"text-sm text-destructive",children:P}):null,b?n.jsxs("div",{className:"space-y-2 rounded-md border border-warning/50 bg-warning/10 p-3",children:[n.jsx("p",{className:"text-sm text-foreground",children:s("admin.orgs.siteReassignWarning",{slug:b.slug,owner:b.ownerName||b.ownerSlug||s("admin.orgs.anotherOrg")})}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(I,{variant:"outline",size:"sm",disabled:d.isPending,onClick:()=>_(null),children:s("admin.orgs.cancel")}),n.jsx(I,{variant:"destructive",size:"sm",disabled:d.isPending,onClick:()=>d.mutate({slug:b.slug,reassign:!0}),children:s("admin.orgs.reassignConfirm")})]})]}):null]})]}),e[55]=P,e[56]=d,e[57]=c,e[58]=b,e[59]=J,e[60]=N,e[61]=E,e[62]=a,e[63]=X,e[64]=F,e[65]=s,e[66]=V):V=e[66];let ee;e[67]===Symbol.for("react.memo_cache_sentinel")?(ee=()=>G(!1),e[67]=ee):ee=e[67];let Y;e[68]!==s?(Y=s("admin.orgs.close"),e[68]=s,e[69]=Y):Y=e[69];let W;e[70]!==c||e[71]!==Y?(W=n.jsx(Xe,{children:n.jsx(I,{variant:"outline",onClick:ee,disabled:c,children:Y})}),e[70]=c,e[71]=Y,e[72]=W):W=e[72];let Q;e[73]!==D||e[74]!==U||e[75]!==V||e[76]!==W?(Q=n.jsxs(He,{className:"sm:max-w-lg",children:[D,U,V,W]}),e[73]=D,e[74]=U,e[75]=V,e[76]=W,e[77]=Q):Q=e[77];let se;return e[78]!==S||e[79]!==v||e[80]!==Q?(se=n.jsxs(Qe,{open:S,onOpenChange:G,children:[v,Q]}),e[78]=S,e[79]=v,e[80]=Q,e[81]=se):se=e[81],se}function ks(){return{}}function Fs(t){const e=Te.c(75),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(""),[P,R]=M.useState("user"),b=Ue();let _;e[0]!==a||e[1]!==i.id||e[2]!==P?(_=()=>we(`/api/_admin/orgs/${i.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:P})}),e[0]=a,e[1]=i.id,e[2]=P,e[3]=_):_=e[3];let k;e[4]!==a||e[5]!==i.name||e[6]!==b||e[7]!==s?(k=()=>{ie.success(s("admin.orgs.memberAdded",{email:a.trim(),org:i.name})),b.invalidateQueries({queryKey:Ne.deploymentAdminOrgsList()}),O(!1),K(""),R("user")},e[4]=a,e[5]=i.name,e[6]=b,e[7]=s,e[8]=k):k=e[8];let p;e[9]!==s?(p=D=>{ie.error(D instanceof Error?D.message:s("admin.orgs.failedAddMember"))},e[9]=s,e[10]=p):p=e[10];let r;e[11]!==_||e[12]!==k||e[13]!==p?(r={mutationFn:_,onSuccess:k,onError:p},e[11]=_,e[12]=k,e[13]=p,e[14]=r):r=e[14];const o=Le(r);let x;e[15]!==s?(x=s("admin.orgs.addMember"),e[15]=s,e[16]=x):x=e[16];let E;e[17]!==x?(E=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:x})}),e[17]=x,e[18]=E):E=e[18];let N;e[19]!==i.name||e[20]!==s?(N=s("admin.orgs.addMemberTo",{org:i.name}),e[19]=i.name,e[20]=s,e[21]=N):N=e[21];let f;e[22]!==N?(f=n.jsx(Ye,{children:n.jsx(We,{children:N})}),e[22]=N,e[23]=f):f=e[23];let F;e[24]!==s?(F=s("admin.orgs.email"),e[24]=s,e[25]=F):F=e[25];let j;e[26]!==F?(j=n.jsx(fs,{htmlFor:"admin-add-member-email",children:F}),e[26]=F,e[27]=j):j=e[27];let w;e[28]===Symbol.for("react.memo_cache_sentinel")?(w=D=>K(D.target.value),e[28]=w):w=e[28];let h;e[29]!==s?(h=s("admin.orgs.emailPlaceholder"),e[29]=s,e[30]=h):h=e[30];let u;e[31]!==a||e[32]!==o.isPending||e[33]!==h?(u=n.jsx(Ve,{id:"admin-add-member-email",type:"email",value:a,onChange:w,placeholder:h,disabled:o.isPending}),e[31]=a,e[32]=o.isPending,e[33]=h,e[34]=u):u=e[34];let C;e[35]!==j||e[36]!==u?(C=n.jsxs("div",{className:"space-y-2",children:[j,u]}),e[35]=j,e[36]=u,e[37]=C):C=e[37];let A;e[38]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(xs,{className:"w-full",children:n.jsx(ps,{})}),e[38]=A):A=e[38];let d;e[39]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(js,{children:Cs.map(As)}),e[39]=d):d=e[39];let y;e[40]!==o.isPending||e[41]!==P?(y=n.jsxs(hs,{value:P,onValueChange:R,disabled:o.isPending,children:[A,d]}),e[40]=o.isPending,e[41]=P,e[42]=y):y=e[42];let z;e[43]!==C||e[44]!==y?(z=n.jsxs("div",{className:"space-y-4",children:[C,y]}),e[43]=C,e[44]=y,e[45]=z):z=e[45];let B;e[46]===Symbol.for("react.memo_cache_sentinel")?(B=()=>O(!1),e[46]=B):B=e[46];const Z=o.isPending;let X;e[47]!==s?(X=s("admin.orgs.cancel"),e[47]=s,e[48]=X):X=e[48];let c;e[49]!==o.isPending||e[50]!==X?(c=n.jsx(I,{variant:"outline",onClick:B,disabled:Z,children:X}),e[49]=o.isPending,e[50]=X,e[51]=c):c=e[51];let q;e[52]!==o?(q=()=>o.mutate(),e[52]=o,e[53]=q):q=e[53];let G;e[54]!==a||e[55]!==o.isPending?(G=!a.trim()||o.isPending,e[54]=a,e[55]=o.isPending,e[56]=G):G=e[56];let g;e[57]!==o.isPending||e[58]!==s?(g=o.isPending?s("admin.orgs.adding"):s("admin.orgs.addMember"),e[57]=o.isPending,e[58]=s,e[59]=g):g=e[59];let J;e[60]!==q||e[61]!==G||e[62]!==g?(J=n.jsx(I,{onClick:q,disabled:G,children:g}),e[60]=q,e[61]=G,e[62]=g,e[63]=J):J=e[63];let L;e[64]!==c||e[65]!==J?(L=n.jsxs(Xe,{children:[c,J]}),e[64]=c,e[65]=J,e[66]=L):L=e[66];let v;e[67]!==z||e[68]!==L||e[69]!==f?(v=n.jsxs(He,{className:"sm:max-w-md",children:[f,z,L]}),e[67]=z,e[68]=L,e[69]=f,e[70]=v):v=e[70];let T;return e[71]!==S||e[72]!==v||e[73]!==E?(T=n.jsxs(Qe,{open:S,onOpenChange:O,children:[E,v]}),e[71]=S,e[72]=v,e[73]=E,e[74]=T):T=e[74],T}function As(t){return n.jsx(ys,{value:t,children:n.jsx("span",{className:"capitalize",children:t})},t)}function it(){const t=Te.c(45),e=De(),[i,s]=M.useState("");let S;t[0]!==i?(S=i.trim(),t[0]=i,t[1]=S):S=t[1];const O=gs(S,300);let a;t[2]!==O?(a=Ne.deploymentAdminOrgs(O),t[2]=O,t[3]=a):a=t[3];let K;t[4]!==O?(K=()=>{const y=new URLSearchParams({limit:"100"});return O&&y.set("search",O),we(`/api/_admin/orgs?${y}`)},t[4]=O,t[5]=K):K=t[5];let P;t[6]!==a||t[7]!==K?(P={queryKey:a,queryFn:K},t[6]=a,t[7]=K,t[8]=P):P=t[8];const{data:R,isLoading:b,isError:_}=Be(P);let k;t[9]!==R?.organizations?(k=R?.organizations??[],t[9]=R?.organizations,t[10]=k):k=t[10];const p=k;let r;t[11]!==e?(r=e("admin.orgs.organization"),t[11]=e,t[12]=r):r=t[12];let o;t[13]!==r?(o={id:"name",header:r,render:Ds,cellClassName:"flex-1 min-w-0"},t[13]=r,t[14]=o):o=t[14];let x;t[15]!==e?(x=e("admin.orgs.members"),t[15]=e,t[16]=x):x=t[16];let E;t[17]!==x?(E={id:"members",header:x,render:Ts,cellClassName:"w-24 shrink-0"},t[17]=x,t[18]=E):E=t[18];let N;t[19]!==e?(N=e("admin.orgs.created"),t[19]=e,t[20]=N):N=t[20];let f;t[21]!==N?(f={id:"created",header:N,render:Ls,cellClassName:"w-48 shrink-0"},t[21]=N,t[22]=f):f=t[22];let F;t[23]===Symbol.for("react.memo_cache_sentinel")?(F={id:"actions",header:"",render:zs,cellClassName:"w-auto shrink-0"},t[23]=F):F=t[23];let j;t[24]!==f||t[25]!==o||t[26]!==E?(j=[o,E,f,F],t[24]=f,t[25]=o,t[26]=E,t[27]=j):j=t[27];const w=j;let h;t[28]!==e?(h=e("admin.orgs.searchPlaceholder"),t[28]=e,t[29]=h):h=t[29];let u;t[30]!==i||t[31]!==h?(u=n.jsx(us,{value:i,onChange:s,placeholder:h,className:"w-full md:w-[375px]"}),t[30]=i,t[31]=h,t[32]=u):u=t[32];let C;t[33]!==O||t[34]!==_||t[35]!==e?(C=_?n.jsx(ts,{title:e("admin.orgs.failedLoadOrgs"),description:e("admin.orgs.failedLoadOrgsDescription")}):n.jsx(ts,{title:e("admin.orgs.noOrgsFound"),description:O?e("admin.orgs.noOrgsMatchSearch",{search:O}):e("admin.orgs.noOrgsYet")}),t[33]=O,t[34]=_,t[35]=e,t[36]=C):C=t[36];let A;t[37]!==w||t[38]!==b||t[39]!==p||t[40]!==C?(A=n.jsx(ms,{columns:w,data:p,isLoading:b,emptyState:C}),t[37]=w,t[38]=b,t[39]=p,t[40]=C,t[41]=A):A=t[41];let d;return t[42]!==u||t[43]!==A?(d=n.jsx(Ie,{children:n.jsx(Ie.Content,{children:n.jsx(Ie.Body,{children:n.jsxs("div",{className:"flex flex-col gap-6",children:[u,A]})})})}),t[42]=u,t[43]=A,t[44]=d):d=t[44],d}function zs(t){return n.jsxs("div",{className:"flex items-center justify-end gap-2",children:[n.jsx(Es,{org:t}),n.jsx(Ps,{org:t}),n.jsx(Fs,{org:t})]})}function Ls(t){return n.jsx("span",{className:"text-sm text-foreground",children:ws(t.createdAt)})}function Ts(t){return n.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function Ds(t){return n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),n.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{it as default};
1
+ import{c as Te,b as De,r as M,m as Be,j as n,P as Ie,K as Ne,n as Ue,e as Le,t as ie,B as I}from"./index-CNfEIUn0.js";import{C as ms}from"./collection-table-wrapper-dVk84KQ8.js";import{E as ts}from"./empty-state-S-1xJrE6.js";import{S as us}from"./search-input-CNFZM5Ki.js";import{I as Ve}from"./input-CxZ-2GPj.js";import{L as fs}from"./label-BBk0UNMj.js";import{u as gs}from"./use-debounced-value-Df4IN6g1.js";import{D as Qe,a as Ge,b as He,c as Ye,d as We,e as Xe}from"./dialog-C9fBgi3G.js";import{S as hs,a as xs,b as ps,c as js,d as ys}from"./select-D5c8Otgi.js";import{S as vs}from"./switch-C3EYj7hN.js";import{B as Ce}from"./badge-FcNiwbMm.js";import{O as Ss,D as bs}from"./schema-DO9s-3_3.js";import{S as Ns}from"./site-slug-uya6Wp4-.js";import{a as we}from"./admin-fetch-CCSvjTk1.js";import{f as ws}from"./format-time-BnbuEtat.js";import"./table-DEic8MLd.js";import"./ArrowUp-CQ6SET-t.js";import"./SearchMd-DM9iwGft.js";import"./Check-CnxYOeJk.js";import"./ChevronUp-CDlju1TC.js";import"./differenceInSeconds-NQ4PDo0z.js";const Cs=["owner","admin","user"],as=Object.entries(Ss.shape).map(([t,e])=>({key:t,description:e.description??"",defaultOn:bs.has(t)})),ns=new Set(as.map(t=>t.key)),is=/^(?=.{1,64}$)[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;function _s(t){const e={};for(const[i,s]of Object.entries(t)){if(typeof s!="boolean")return null;e[i]=s}return e}function Es(t){const e=Te.c(133),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(null),[P,R]=M.useState(!1),[b,_]=M.useState(""),[k,p]=M.useState(null),[r,o]=M.useState(!1),[x,E]=M.useState(""),[N,f]=M.useState(null),F=Ue();let j;e[0]!==i.id?(j=Ne.deploymentAdminOrgFlags(i.id),e[0]=i.id,e[1]=j):j=e[1];let w;e[2]!==i.id?(w=()=>we(`/api/_admin/orgs/${i.id}/flags`),e[2]=i.id,e[3]=w):w=e[3];let h;e[4]!==S||e[5]!==j||e[6]!==w?(h={queryKey:j,queryFn:w,enabled:S},e[4]=S,e[5]=j,e[6]=w,e[7]=h):h=e[7];const{data:u,isLoading:C,isFetching:A,isError:d}=Be(h),y=C||A;let z;e[8]!==u?.effective?(z=u?.effective??{},e[8]=u?.effective,e[9]=z):z=e[9];const B=z;let Z;e[10]!==u?.flags?(Z=u?.flags??{},e[10]=u?.flags,e[11]=Z):Z=e[11];const c=a??Z;let q;e[12]!==i.id?(q=ne=>we(`/api/_admin/orgs/${i.id}/flags`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(ne)}),e[12]=i.id,e[13]=q):q=e[13];let G;e[14]!==s?(G=ne=>{ie.error(ne instanceof Error?ne.message:s("admin.orgs.failedSaveFlags"))},e[14]=s,e[15]=G):G=e[15];const g=Le({mutationFn:q,onSuccess:()=>{ie.success(s("admin.orgs.flagsSaved",{org:i.name})),F.invalidateQueries({queryKey:Ne.deploymentAdminOrgFlags(i.id)}),J(),O(!1)},onError:G}),J=()=>{K(null),R(!1),_(""),p(null),o(!1),E(""),f(null)};let L;e[16]!==J?(L=ne=>{O(ne),ne||J()},e[16]=J,e[17]=L):L=e[17];const v=L;let T,D,H,U,V,ee,Y,W,Q,se;if(e[18]!==c||e[19]!==a||e[20]!==B||e[21]!==v||e[22]!==y||e[23]!==d||e[24]!==r||e[25]!==x||e[26]!==g||e[27]!==b||e[28]!==k||e[29]!==S||e[30]!==i.name||e[31]!==P||e[32]!==s){const ne=new Set(ns),Ze=as.map(Os);for(const m of Object.keys(c))ne.has(m)||(ne.add(m),Ze.push({key:m,description:"",defaultOn:!1,known:!1}));let Ee;e[43]!==c?(Ee=(m,te)=>K({...c,[m]:te}),e[43]=c,e[44]=Ee):Ee=e[44];const Oe=Ee;let Pe;e[45]!==c||e[46]!==b||e[47]!==Oe||e[48]!==s?(Pe=()=>{const m=b.trim();if(!is.test(m)){p(s("admin.orgs.invalidFlagKey"));return}if(ns.has(m)||m in c){p(s("admin.orgs.duplicateFlagKey"));return}Oe(m,!0),_(""),p(null),R(!1)},e[45]=c,e[46]=b,e[47]=Oe,e[48]=s,e[49]=Pe):Pe=e[49];const es=Pe;let ke;e[50]!==c||e[51]!==r?(ke=()=>{r||(E(JSON.stringify(c,null,2)),f(null),o(!0))},e[50]=c,e[51]=r,e[52]=ke):ke=e[52];const $e=ke;let fe,ae;e[53]!==r||e[54]!==x||e[55]!==s?(fe=()=>{if(!r)return;const m=ae();if(!m){f(s("admin.orgs.invalidJson"));return}K(m),f(null),o(!1)},ae=()=>{let m;try{m=JSON.parse(x)}catch{return null}if(!m||typeof m!="object"||Array.isArray(m))return null;const te=Object.entries(m);for(const[Ae,Me]of te)if(!is.test(Ae)||typeof Me!="boolean")return null;return Object.fromEntries(te)},e[53]=r,e[54]=x,e[55]=s,e[56]=fe,e[57]=ae):(fe=e[56],ae=e[57]);let Fe;e[58]!==c||e[59]!==a||e[60]!==v||e[61]!==r||e[62]!==g||e[63]!==ae||e[64]!==s?(Fe=()=>{const m=r?ae():_s(c);if(!m){f(s(r?"admin.orgs.invalidJson":"admin.orgs.invalidStoredValue"));return}if(f(null),a===null){v(!1);return}g.mutate({flags:m,mode:"replace"})},e[58]=c,e[59]=a,e[60]=v,e[61]=r,e[62]=g,e[63]=ae,e[64]=s,e[65]=Fe):Fe=e[65],H=Fe,D=Qe,Y=S,W=v;let ge;e[66]!==s?(ge=s("admin.orgs.flags"),e[66]=s,e[67]=ge):ge=e[67],e[68]!==ge?(Q=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:ge})}),e[68]=ge,e[69]=Q):Q=e[69],T=He,se="sm:max-w-2xl";let he;e[70]!==i.name||e[71]!==s?(he=s("admin.orgs.flagsFor",{org:i.name}),e[70]=i.name,e[71]=s,e[72]=he):he=e[72],e[73]!==he?(U=n.jsx(Ye,{children:n.jsx(We,{children:he})}),e[73]=he,e[74]=U):U=e[74];let xe;e[75]!==s?(xe=s("admin.orgs.flagsDescription"),e[75]=s,e[76]=xe):xe=e[76];let pe;e[77]!==xe?(pe=n.jsx("p",{className:"text-sm text-muted-foreground",children:xe}),e[77]=xe,e[78]=pe):pe=e[78];const Re=r?"outline":"secondary";let je;e[79]!==s?(je=s("admin.orgs.flagsViewToggles"),e[79]=s,e[80]=je):je=e[80];let ye;e[81]!==fe||e[82]!==d||e[83]!==Re||e[84]!==je?(ye=n.jsx(I,{variant:Re,size:"sm",onClick:fe,disabled:d,children:je}),e[81]=fe,e[82]=d,e[83]=Re,e[84]=je,e[85]=ye):ye=e[85];const qe=r?"secondary":"outline",Je=y||d;let ve;e[86]!==s?(ve=s("admin.orgs.flagsViewJson"),e[86]=s,e[87]=ve):ve=e[87];let Se;e[88]!==$e||e[89]!==qe||e[90]!==Je||e[91]!==ve?(Se=n.jsx(I,{variant:qe,size:"sm",onClick:$e,disabled:Je,children:ve}),e[88]=$e,e[89]=qe,e[90]=Je,e[91]=ve,e[92]=Se):Se=e[92];let be;e[93]!==ye||e[94]!==Se?(be=n.jsxs("div",{className:"flex shrink-0 gap-1",children:[ye,Se]}),e[93]=ye,e[94]=Se,e[95]=be):be=e[95],e[96]!==pe||e[97]!==be?(V=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[pe,be]}),e[96]=pe,e[97]=be,e[98]=V):V=e[98],ee=d?n.jsx("p",{className:"text-sm text-destructive",children:s("admin.orgs.failedLoadFlags")}):r?n.jsxs("div",{className:"space-y-2",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.jsonReplaceHint")}),n.jsx("textarea",{"aria-label":s("admin.orgs.jsonEditorLabel"),value:x,spellCheck:!1,disabled:g.isPending,onChange:m=>{E(m.target.value),f(null)},className:"h-64 w-full rounded-md border border-border bg-background p-3 font-mono text-sm text-foreground"})]}):n.jsxs("div",{className:"max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:[Ze.map(m=>{const{key:te,description:Ae,defaultOn:Me,known:rs}=m,ze=c[te],os=typeof ze=="boolean"?ze:B[te]??!1,ss=ze===void 0,ds=!ss&&typeof ze!="boolean";return n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(vs,{"aria-label":te,checked:os,disabled:y||g.isPending,onCheckedChange:cs=>Oe(te,cs)}),n.jsxs("div",{className:"min-w-0 space-y-1",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("code",{className:"text-sm font-medium text-foreground",children:te}),Me?n.jsx(Ce,{variant:"secondary",size:"default",children:s("admin.orgs.flagDefaultOn")}):null,rs?null:n.jsx(Ce,{variant:"warning",size:"default",children:s("admin.orgs.flagCustom")}),ss?n.jsx(Ce,{variant:"outline",size:"default",children:s("admin.orgs.flagUnset")}):null,ds?n.jsx(Ce,{variant:"destructive",size:"default",children:s("admin.orgs.flagInvalid")}):null]}),Ae?n.jsx("p",{className:"text-sm text-muted-foreground",children:Ae}):null]})]},te)}),P?n.jsxs("div",{className:"space-y-1 border-t border-border pt-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ve,{autoFocus:!0,"aria-label":s("admin.orgs.customFlagKeyLabel"),value:b,placeholder:s("admin.orgs.customFlagKeyPlaceholder"),onChange:m=>{_(m.target.value),p(null)},onKeyDown:m=>{m.key==="Enter"&&es()},className:"font-mono"}),n.jsx(I,{variant:"outline",onClick:es,children:s("admin.orgs.add")})]}),k?n.jsx("p",{className:"text-sm text-destructive",children:k}):null]}):n.jsx(I,{variant:"outline",size:"sm",disabled:y,onClick:()=>R(!0),children:s("admin.orgs.addCustomFlag")})]}),e[18]=c,e[19]=a,e[20]=B,e[21]=v,e[22]=y,e[23]=d,e[24]=r,e[25]=x,e[26]=g,e[27]=b,e[28]=k,e[29]=S,e[30]=i.name,e[31]=P,e[32]=s,e[33]=T,e[34]=D,e[35]=H,e[36]=U,e[37]=V,e[38]=ee,e[39]=Y,e[40]=W,e[41]=Q,e[42]=se}else T=e[33],D=e[34],H=e[35],U=e[36],V=e[37],ee=e[38],Y=e[39],W=e[40],Q=e[41],se=e[42];let l;e[99]!==N?(l=N?n.jsx("p",{className:"text-sm text-destructive",children:N}):null,e[99]=N,e[100]=l):l=e[100];let $;e[101]!==v?($=()=>v(!1),e[101]=v,e[102]=$):$=e[102];const le=g.isPending;let re;e[103]!==s?(re=s("admin.orgs.cancel"),e[103]=s,e[104]=re):re=e[104];let oe;e[105]!==g.isPending||e[106]!==$||e[107]!==re?(oe=n.jsx(I,{variant:"outline",onClick:$,disabled:le,children:re}),e[105]=g.isPending,e[106]=$,e[107]=re,e[108]=oe):oe=e[108];const Ke=y||d||g.isPending;let de;e[109]!==g.isPending||e[110]!==s?(de=g.isPending?s("admin.orgs.saving"):s("admin.orgs.save"),e[109]=g.isPending,e[110]=s,e[111]=de):de=e[111];let ce;e[112]!==H||e[113]!==Ke||e[114]!==de?(ce=n.jsx(I,{onClick:H,disabled:Ke,children:de}),e[112]=H,e[113]=Ke,e[114]=de,e[115]=ce):ce=e[115];let me;e[116]!==oe||e[117]!==ce?(me=n.jsxs(Xe,{children:[oe,ce]}),e[116]=oe,e[117]=ce,e[118]=me):me=e[118];let ue;e[119]!==T||e[120]!==U||e[121]!==V||e[122]!==ee||e[123]!==l||e[124]!==me||e[125]!==se?(ue=n.jsxs(T,{className:se,children:[U,V,ee,l,me]}),e[119]=T,e[120]=U,e[121]=V,e[122]=ee,e[123]=l,e[124]=me,e[125]=se,e[126]=ue):ue=e[126];let _e;return e[127]!==D||e[128]!==Y||e[129]!==W||e[130]!==Q||e[131]!==ue?(_e=n.jsxs(D,{open:Y,onOpenChange:W,children:[Q,ue]}),e[127]=D,e[128]=Y,e[129]=W,e[130]=Q,e[131]=ue,e[132]=_e):_e=e[132],_e}function Os(t){return{...t,known:!0}}class ls extends Error{constructor(e,i,s){super("owned_by_other_org"),this.slug=e,this.ownerName=i,this.ownerSlug=s,this.name="SiteConflictError"}slug;ownerName;ownerSlug}function Ps(t){const e=Te.c(82),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(""),[P,R]=M.useState(null),[b,_]=M.useState(null),k=Ue();let p;e[0]!==i.id?(p=Ne.deploymentAdminOrgSites(i.id),e[0]=i.id,e[1]=p):p=e[1];let r;e[2]!==i.id?(r=()=>we(`/api/_admin/orgs/${i.id}/sites`),e[2]=i.id,e[3]=r):r=e[3];let o;e[4]!==S||e[5]!==p||e[6]!==r?(o={queryKey:p,queryFn:r,enabled:S},e[4]=S,e[5]=p,e[6]=r,e[7]=o):o=e[7];const{data:x,isLoading:E,isError:N}=Be(o);let f;e[8]!==x?.sites?(f=x?.sites??[],e[8]=x?.sites,e[9]=f):f=e[9];const F=f;let j;e[10]!==i.id||e[11]!==k?(j=()=>k.invalidateQueries({queryKey:Ne.deploymentAdminOrgSites(i.id)}),e[10]=i.id,e[11]=k,e[12]=j):j=e[12];const w=j;let h;e[13]!==i.id?(h=async l=>{const $=await fetch(`/api/_admin/orgs/${i.id}/sites`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),le=await $.json().catch(ks);if($.status===409&&le.error==="owned_by_other_org")throw new ls(l.slug,le.ownerOrganizationName??null,le.ownerOrganizationSlug??null);if(!$.ok)throw new Error(le.error||`Request failed (HTTP ${$.status})`);return le},e[13]=i.id,e[14]=h):h=e[14];let u;e[15]!==w||e[16]!==i.name||e[17]!==s?(u=(l,$)=>{ie.success($.reassign?s("admin.orgs.siteReassigned",{slug:$.slug,org:i.name}):s("admin.orgs.siteAdded",{slug:$.slug,org:i.name})),w(),K(""),R(null),_(null)},e[15]=w,e[16]=i.name,e[17]=s,e[18]=u):u=e[18];let C;e[19]!==s?(C=l=>{if(l instanceof ls){_({slug:l.slug,ownerName:l.ownerName,ownerSlug:l.ownerSlug});return}ie.error(l instanceof Error?l.message:s("admin.orgs.failedAddSite"))},e[19]=s,e[20]=C):C=e[20];let A;e[21]!==h||e[22]!==u||e[23]!==C?(A={mutationFn:h,onSuccess:u,onError:C},e[21]=h,e[22]=u,e[23]=C,e[24]=A):A=e[24];const d=Le(A);let y;e[25]!==i.id?(y=l=>we(`/api/_admin/orgs/${i.id}/sites/${encodeURIComponent(l)}`,{method:"DELETE"}),e[25]=i.id,e[26]=y):y=e[26];let z;e[27]!==w||e[28]!==i.name||e[29]!==s?(z=(l,$)=>{ie.success(s("admin.orgs.siteRemoved",{slug:$,org:i.name})),w()},e[27]=w,e[28]=i.name,e[29]=s,e[30]=z):z=e[30];let B;e[31]!==s?(B=l=>{ie.error(l instanceof Error?l.message:s("admin.orgs.failedRemoveSite"))},e[31]=s,e[32]=B):B=e[32];let Z;e[33]!==y||e[34]!==z||e[35]!==B?(Z={mutationFn:y,onSuccess:z,onError:B},e[33]=y,e[34]=z,e[35]=B,e[36]=Z):Z=e[36];const X=Le(Z),c=d.isPending||X.isPending;let q;e[37]===Symbol.for("react.memo_cache_sentinel")?(q=l=>{O(l),l||(K(""),R(null),_(null))},e[37]=q):q=e[37];const G=q;let g;e[38]!==d||e[39]!==a||e[40]!==s?(g=()=>{const l=a.trim().toLowerCase();if(!Ns.test(l)){R(s("admin.orgs.invalidSiteSlug"));return}R(null),_(null),d.mutate({slug:l})},e[38]=d,e[39]=a,e[40]=s,e[41]=g):g=e[41];const J=g;let L;e[42]!==s?(L=s("admin.orgs.sites"),e[42]=s,e[43]=L):L=e[43];let v;e[44]!==L?(v=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:L})}),e[44]=L,e[45]=v):v=e[45];let T;e[46]!==i.name||e[47]!==s?(T=s("admin.orgs.sitesFor",{org:i.name}),e[46]=i.name,e[47]=s,e[48]=T):T=e[48];let D;e[49]!==T?(D=n.jsx(Ye,{children:n.jsx(We,{children:T})}),e[49]=T,e[50]=D):D=e[50];let H;e[51]!==s?(H=s("admin.orgs.sitesDescription"),e[51]=s,e[52]=H):H=e[52];let U;e[53]!==H?(U=n.jsx("p",{className:"text-sm text-muted-foreground",children:H}),e[53]=H,e[54]=U):U=e[54];let V;e[55]!==P||e[56]!==d||e[57]!==c||e[58]!==b||e[59]!==J||e[60]!==N||e[61]!==E||e[62]!==a||e[63]!==X||e[64]!==F||e[65]!==s?(V=N?n.jsx("p",{className:"text-sm text-destructive",children:s("admin.orgs.failedLoadSites")}):n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"max-h-[45vh] space-y-2 overflow-y-auto pr-1",children:E?n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.loading")}):F.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.noSites")}):F.map(l=>n.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-2",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("code",{className:"truncate text-sm font-medium text-foreground",children:l.slug}),n.jsx(Ce,{variant:"outline",size:"default",children:l.source})]}),n.jsx(I,{variant:"ghost",size:"sm",disabled:c,onClick:()=>X.mutate(l.slug),children:s("admin.orgs.remove")})]},l.slug))}),n.jsxs("div",{className:"space-y-1 border-t border-border pt-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ve,{value:a,placeholder:s("admin.orgs.siteSlugPlaceholder"),disabled:d.isPending,onChange:l=>{K(l.target.value),R(null),_(null)},onKeyDown:l=>{l.key==="Enter"&&J()},className:"font-mono"}),n.jsx(I,{variant:"outline",disabled:!a.trim()||d.isPending,onClick:J,children:s("admin.orgs.add")})]}),P?n.jsx("p",{className:"text-sm text-destructive",children:P}):null,b?n.jsxs("div",{className:"space-y-2 rounded-md border border-warning/50 bg-warning/10 p-3",children:[n.jsx("p",{className:"text-sm text-foreground",children:s("admin.orgs.siteReassignWarning",{slug:b.slug,owner:b.ownerName||b.ownerSlug||s("admin.orgs.anotherOrg")})}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(I,{variant:"outline",size:"sm",disabled:d.isPending,onClick:()=>_(null),children:s("admin.orgs.cancel")}),n.jsx(I,{variant:"destructive",size:"sm",disabled:d.isPending,onClick:()=>d.mutate({slug:b.slug,reassign:!0}),children:s("admin.orgs.reassignConfirm")})]})]}):null]})]}),e[55]=P,e[56]=d,e[57]=c,e[58]=b,e[59]=J,e[60]=N,e[61]=E,e[62]=a,e[63]=X,e[64]=F,e[65]=s,e[66]=V):V=e[66];let ee;e[67]===Symbol.for("react.memo_cache_sentinel")?(ee=()=>G(!1),e[67]=ee):ee=e[67];let Y;e[68]!==s?(Y=s("admin.orgs.close"),e[68]=s,e[69]=Y):Y=e[69];let W;e[70]!==c||e[71]!==Y?(W=n.jsx(Xe,{children:n.jsx(I,{variant:"outline",onClick:ee,disabled:c,children:Y})}),e[70]=c,e[71]=Y,e[72]=W):W=e[72];let Q;e[73]!==D||e[74]!==U||e[75]!==V||e[76]!==W?(Q=n.jsxs(He,{className:"sm:max-w-lg",children:[D,U,V,W]}),e[73]=D,e[74]=U,e[75]=V,e[76]=W,e[77]=Q):Q=e[77];let se;return e[78]!==S||e[79]!==v||e[80]!==Q?(se=n.jsxs(Qe,{open:S,onOpenChange:G,children:[v,Q]}),e[78]=S,e[79]=v,e[80]=Q,e[81]=se):se=e[81],se}function ks(){return{}}function Fs(t){const e=Te.c(75),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(""),[P,R]=M.useState("user"),b=Ue();let _;e[0]!==a||e[1]!==i.id||e[2]!==P?(_=()=>we(`/api/_admin/orgs/${i.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:P})}),e[0]=a,e[1]=i.id,e[2]=P,e[3]=_):_=e[3];let k;e[4]!==a||e[5]!==i.name||e[6]!==b||e[7]!==s?(k=()=>{ie.success(s("admin.orgs.memberAdded",{email:a.trim(),org:i.name})),b.invalidateQueries({queryKey:Ne.deploymentAdminOrgsList()}),O(!1),K(""),R("user")},e[4]=a,e[5]=i.name,e[6]=b,e[7]=s,e[8]=k):k=e[8];let p;e[9]!==s?(p=D=>{ie.error(D instanceof Error?D.message:s("admin.orgs.failedAddMember"))},e[9]=s,e[10]=p):p=e[10];let r;e[11]!==_||e[12]!==k||e[13]!==p?(r={mutationFn:_,onSuccess:k,onError:p},e[11]=_,e[12]=k,e[13]=p,e[14]=r):r=e[14];const o=Le(r);let x;e[15]!==s?(x=s("admin.orgs.addMember"),e[15]=s,e[16]=x):x=e[16];let E;e[17]!==x?(E=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:x})}),e[17]=x,e[18]=E):E=e[18];let N;e[19]!==i.name||e[20]!==s?(N=s("admin.orgs.addMemberTo",{org:i.name}),e[19]=i.name,e[20]=s,e[21]=N):N=e[21];let f;e[22]!==N?(f=n.jsx(Ye,{children:n.jsx(We,{children:N})}),e[22]=N,e[23]=f):f=e[23];let F;e[24]!==s?(F=s("admin.orgs.email"),e[24]=s,e[25]=F):F=e[25];let j;e[26]!==F?(j=n.jsx(fs,{htmlFor:"admin-add-member-email",children:F}),e[26]=F,e[27]=j):j=e[27];let w;e[28]===Symbol.for("react.memo_cache_sentinel")?(w=D=>K(D.target.value),e[28]=w):w=e[28];let h;e[29]!==s?(h=s("admin.orgs.emailPlaceholder"),e[29]=s,e[30]=h):h=e[30];let u;e[31]!==a||e[32]!==o.isPending||e[33]!==h?(u=n.jsx(Ve,{id:"admin-add-member-email",type:"email",value:a,onChange:w,placeholder:h,disabled:o.isPending}),e[31]=a,e[32]=o.isPending,e[33]=h,e[34]=u):u=e[34];let C;e[35]!==j||e[36]!==u?(C=n.jsxs("div",{className:"space-y-2",children:[j,u]}),e[35]=j,e[36]=u,e[37]=C):C=e[37];let A;e[38]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(xs,{className:"w-full",children:n.jsx(ps,{})}),e[38]=A):A=e[38];let d;e[39]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(js,{children:Cs.map(As)}),e[39]=d):d=e[39];let y;e[40]!==o.isPending||e[41]!==P?(y=n.jsxs(hs,{value:P,onValueChange:R,disabled:o.isPending,children:[A,d]}),e[40]=o.isPending,e[41]=P,e[42]=y):y=e[42];let z;e[43]!==C||e[44]!==y?(z=n.jsxs("div",{className:"space-y-4",children:[C,y]}),e[43]=C,e[44]=y,e[45]=z):z=e[45];let B;e[46]===Symbol.for("react.memo_cache_sentinel")?(B=()=>O(!1),e[46]=B):B=e[46];const Z=o.isPending;let X;e[47]!==s?(X=s("admin.orgs.cancel"),e[47]=s,e[48]=X):X=e[48];let c;e[49]!==o.isPending||e[50]!==X?(c=n.jsx(I,{variant:"outline",onClick:B,disabled:Z,children:X}),e[49]=o.isPending,e[50]=X,e[51]=c):c=e[51];let q;e[52]!==o?(q=()=>o.mutate(),e[52]=o,e[53]=q):q=e[53];let G;e[54]!==a||e[55]!==o.isPending?(G=!a.trim()||o.isPending,e[54]=a,e[55]=o.isPending,e[56]=G):G=e[56];let g;e[57]!==o.isPending||e[58]!==s?(g=o.isPending?s("admin.orgs.adding"):s("admin.orgs.addMember"),e[57]=o.isPending,e[58]=s,e[59]=g):g=e[59];let J;e[60]!==q||e[61]!==G||e[62]!==g?(J=n.jsx(I,{onClick:q,disabled:G,children:g}),e[60]=q,e[61]=G,e[62]=g,e[63]=J):J=e[63];let L;e[64]!==c||e[65]!==J?(L=n.jsxs(Xe,{children:[c,J]}),e[64]=c,e[65]=J,e[66]=L):L=e[66];let v;e[67]!==z||e[68]!==L||e[69]!==f?(v=n.jsxs(He,{className:"sm:max-w-md",children:[f,z,L]}),e[67]=z,e[68]=L,e[69]=f,e[70]=v):v=e[70];let T;return e[71]!==S||e[72]!==v||e[73]!==E?(T=n.jsxs(Qe,{open:S,onOpenChange:O,children:[E,v]}),e[71]=S,e[72]=v,e[73]=E,e[74]=T):T=e[74],T}function As(t){return n.jsx(ys,{value:t,children:n.jsx("span",{className:"capitalize",children:t})},t)}function it(){const t=Te.c(45),e=De(),[i,s]=M.useState("");let S;t[0]!==i?(S=i.trim(),t[0]=i,t[1]=S):S=t[1];const O=gs(S,300);let a;t[2]!==O?(a=Ne.deploymentAdminOrgs(O),t[2]=O,t[3]=a):a=t[3];let K;t[4]!==O?(K=()=>{const y=new URLSearchParams({limit:"100"});return O&&y.set("search",O),we(`/api/_admin/orgs?${y}`)},t[4]=O,t[5]=K):K=t[5];let P;t[6]!==a||t[7]!==K?(P={queryKey:a,queryFn:K},t[6]=a,t[7]=K,t[8]=P):P=t[8];const{data:R,isLoading:b,isError:_}=Be(P);let k;t[9]!==R?.organizations?(k=R?.organizations??[],t[9]=R?.organizations,t[10]=k):k=t[10];const p=k;let r;t[11]!==e?(r=e("admin.orgs.organization"),t[11]=e,t[12]=r):r=t[12];let o;t[13]!==r?(o={id:"name",header:r,render:Ds,cellClassName:"flex-1 min-w-0"},t[13]=r,t[14]=o):o=t[14];let x;t[15]!==e?(x=e("admin.orgs.members"),t[15]=e,t[16]=x):x=t[16];let E;t[17]!==x?(E={id:"members",header:x,render:Ts,cellClassName:"w-24 shrink-0"},t[17]=x,t[18]=E):E=t[18];let N;t[19]!==e?(N=e("admin.orgs.created"),t[19]=e,t[20]=N):N=t[20];let f;t[21]!==N?(f={id:"created",header:N,render:Ls,cellClassName:"w-48 shrink-0"},t[21]=N,t[22]=f):f=t[22];let F;t[23]===Symbol.for("react.memo_cache_sentinel")?(F={id:"actions",header:"",render:zs,cellClassName:"w-auto shrink-0"},t[23]=F):F=t[23];let j;t[24]!==f||t[25]!==o||t[26]!==E?(j=[o,E,f,F],t[24]=f,t[25]=o,t[26]=E,t[27]=j):j=t[27];const w=j;let h;t[28]!==e?(h=e("admin.orgs.searchPlaceholder"),t[28]=e,t[29]=h):h=t[29];let u;t[30]!==i||t[31]!==h?(u=n.jsx(us,{value:i,onChange:s,placeholder:h,className:"w-full md:w-[375px]"}),t[30]=i,t[31]=h,t[32]=u):u=t[32];let C;t[33]!==O||t[34]!==_||t[35]!==e?(C=_?n.jsx(ts,{title:e("admin.orgs.failedLoadOrgs"),description:e("admin.orgs.failedLoadOrgsDescription")}):n.jsx(ts,{title:e("admin.orgs.noOrgsFound"),description:O?e("admin.orgs.noOrgsMatchSearch",{search:O}):e("admin.orgs.noOrgsYet")}),t[33]=O,t[34]=_,t[35]=e,t[36]=C):C=t[36];let A;t[37]!==w||t[38]!==b||t[39]!==p||t[40]!==C?(A=n.jsx(ms,{columns:w,data:p,isLoading:b,emptyState:C}),t[37]=w,t[38]=b,t[39]=p,t[40]=C,t[41]=A):A=t[41];let d;return t[42]!==u||t[43]!==A?(d=n.jsx(Ie,{children:n.jsx(Ie.Content,{children:n.jsx(Ie.Body,{children:n.jsxs("div",{className:"flex flex-col gap-6",children:[u,A]})})})}),t[42]=u,t[43]=A,t[44]=d):d=t[44],d}function zs(t){return n.jsxs("div",{className:"flex items-center justify-end gap-2",children:[n.jsx(Es,{org:t}),n.jsx(Ps,{org:t}),n.jsx(Fs,{org:t})]})}function Ls(t){return n.jsx("span",{className:"text-sm text-foreground",children:ws(t.createdAt)})}function Ts(t){return n.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function Ds(t){return n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),n.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{it as default};
@@ -1 +1 @@
1
- import{c as w,n as D,K as k,b as A,j as i}from"./index-BkljfHxy.js";import{bq as P,d as $,br as O,aA as N,bs as I,bt as Q,bu as q}from"./index-TRl02mXS.js";import{L}from"./label-BSeVlzkX.js";import{S as K}from"./switch-CZqeYbje.js";import{d as Y,a as z,b as M,c as U,S as W}from"./select-DqJyZyIQ.js";function _(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function G(c,e,t,d){if(c.kind==="page"){if(!_(t))return null;const h=t.seo!==void 0?t.seo:e.rawSeoData;return{...t,seo:d===null?null:P(d,h)}}return _(t)?e.siteKind==="block"?d:{...t,seo:d}:null}function le(c,e){const t=c.__resolveType;return typeof t=="string"&&t.length>0?t:e.seoResolveType}function oe(c){const e=w.c(23),{orgSlug:t,virtualMcpId:d,branch:h,target:o,resolved:s,onSaved:f}=c,r=D(),a=`${t}/${d}/${h}`;let m;e[0]!==h||e[1]!==t||e[2]!==d?(m={orgSlug:t,virtualMcpId:d,branch:h},e[0]=h,e[1]=t,e[2]=d,e[3]=m):m=e[3];let l;e[4]!==f?(l={onSaved:f},e[4]=f,e[5]=l):l=e[5];const{save:n,flush:u,isPending:p}=$(m,l);let y;e[6]!==a||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==o?(y=v=>{s&&n(s.blockKey,()=>{const x=r.getQueryData(k.decofile(a))?.[s.blockKey];return G(o,s,x,v)})},e[6]=a,e[7]=r,e[8]=s,e[9]=n,e[10]=o,e[11]=y):y=e[11];const g=y;let S;e[12]!==a||e[13]!==r||e[14]!==s||e[15]!==n||e[16]!==o?(S=v=>{!s||o.kind!=="page"||n(s.blockKey,()=>{const x=r.getQueryData(k.decofile(a))?.[s.blockKey];return _(x)?{...x,seo:v}:null})},e[12]=a,e[13]=r,e[14]=s,e[15]=n,e[16]=o,e[17]=S):S=e[17];const b=S;let j;return e[18]!==u||e[19]!==p||e[20]!==b||e[21]!==g?(j={persistSeo:g,persistRawSeo:b,flush:u,isPending:p},e[18]=u,e[19]=p,e[20]=b,e[21]=g,e[22]=j):j=e[22],j}const H="https://deco.cx/docs/en/performance/edge-async-render";function J(c){const e=w.c(23),{rawSeo:t,onEnableChange:d,onAsyncRenderChange:h,children:o}=c,s=A();let f;e[0]!==t?(f=N(t),e[0]=t,e[1]=f):f=e[1];const r=f;let a;e[2]!==t?(a=O(t),e[2]=t,e[3]=a):a=e[3];const m=a;let l;e[4]!==s?(l=s("sectionsEditor.seoFormChrome.enableLabel"),e[4]=s,e[5]=l):l=e[5];let n;e[6]!==l?(n=i.jsx(L,{htmlFor:"seo-enable",className:"text-sm font-medium",children:l}),e[6]=l,e[7]=n):n=e[7];let u;e[8]!==r||e[9]!==d?(u=i.jsx(K,{id:"seo-enable",checked:r,onCheckedChange:d}),e[8]=r,e[9]=d,e[10]=u):u=e[10];let p;e[11]!==n||e[12]!==u?(p=i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n,u]}),e[11]=n,e[12]=u,e[13]=p):p=e[13];let y;e[14]!==m||e[15]!==o||e[16]!==r||e[17]!==h||e[18]!==s?(y=r&&i.jsxs(i.Fragment,{children:[o,i.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[i.jsxs("div",{className:"min-w-0 space-y-1",children:[i.jsx("p",{className:"text-sm font-medium",children:s("sectionsEditor.seoFormChrome.asyncRenderLabel")}),i.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",i.jsx("a",{href:H,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:s("sectionsEditor.seoFormChrome.documentationLinkText")}),"."]})]}),i.jsx(K,{id:"seo-async-render",checked:m,onCheckedChange:h,className:"shrink-0"})]})]}),e[14]=m,e[15]=o,e[16]=r,e[17]=h,e[18]=s,e[19]=y):y=e[19];let g;return e[20]!==p||e[21]!==y?(g=i.jsxs("div",{className:"space-y-4",children:[p,y]}),e[20]=p,e[21]=y,e[22]=g):g=e[22],g}function V(c){const e=w.c(20),{options:t,value:d,onChange:h}=c,o=A();if(t.length<=1)return null;let s;e[0]!==o?(s=o("sectionsEditor.seoTypeSelect.label"),e[0]=o,e[1]=s):s=e[1];let f;e[2]!==s?(f=i.jsx(L,{className:"text-xs text-muted-foreground",children:s}),e[2]=s,e[3]=f):f=e[3];let r;e[4]!==o?(r=o("sectionsEditor.seoTypeSelect.placeholder"),e[4]=o,e[5]=r):r=e[5];let a;e[6]!==r?(a=i.jsx(z,{className:"w-full",children:i.jsx(M,{placeholder:r})}),e[6]=r,e[7]=a):a=e[7];let m;e[8]!==t?(m=t.filter(Z).map(X),e[8]=t,e[9]=m):m=e[9];let l;e[10]!==m?(l=i.jsx(U,{children:m}),e[10]=m,e[11]=l):l=e[11];let n;e[12]!==h||e[13]!==a||e[14]!==l||e[15]!==d?(n=i.jsxs(W,{value:d,onValueChange:h,children:[a,l]}),e[12]=h,e[13]=a,e[14]=l,e[15]=d,e[16]=n):n=e[16];let u;return e[17]!==f||e[18]!==n?(u=i.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[f,n]}),e[17]=f,e[18]=n,e[19]=u):u=e[19],u}function X(c){return i.jsx(Y,{value:c.resolveType,children:c.title},c.resolveType)}function Z(c){return c.resolveType.length>0}function re(c){const e=w.c(33),{rawSeo:t,innerSeo:d,defaultResolveType:h,seoSchema:o,activeResolveType:s,seoTypeOptions:f,formResetKey:r,siteDefaultSeo:a,onBreadcrumbChange:m,onPersistRaw:l,onInnerChange:n,onClearForm:u,onBumpFormKey:p,beforeFields:y}=c;let g;e[0]!==h||e[1]!==p||e[2]!==u||e[3]!==l?(g=C=>{if(C){const F=q(h);l(F),u(),p();return}l(null),u(),p()},e[0]=h,e[1]=p,e[2]=u,e[3]=l,e[4]=g):g=e[4];const S=g;let b;e[5]!==l||e[6]!==t?(b=C=>{const F=I(C,t);l(F)},e[5]=l,e[6]=t,e[7]=b):b=e[7];const j=b;let v;e[8]!==p||e[9]!==n?(v=C=>{n({__resolveType:C}),p()},e[8]=p,e[9]=n,e[10]=v):v=e[10];const T=v;let x;e[11]!==s||e[12]!==T||e[13]!==t||e[14]!==o||e[15]!==f?(x=N(t)&&o&&s&&f&&f.length>0&&i.jsx(V,{options:f,value:s,onChange:T}),e[11]=s,e[12]=T,e[13]=t,e[14]=o,e[15]=f,e[16]=x):x=e[16];let R;e[17]!==s||e[18]!==r||e[19]!==d||e[20]!==m||e[21]!==n||e[22]!==t||e[23]!==o||e[24]!==a?(R=N(t)&&o&&s&&i.jsx(Q,{schema:o,resolveType:s,value:d,formResetKey:r,onChange:C=>n(C),onBreadcrumbChange:m,siteDefaultSeo:a}),e[17]=s,e[18]=r,e[19]=d,e[20]=m,e[21]=n,e[22]=t,e[23]=o,e[24]=a,e[25]=R):R=e[25];let E;return e[26]!==y||e[27]!==j||e[28]!==S||e[29]!==t||e[30]!==x||e[31]!==R?(E=i.jsxs(J,{rawSeo:t,onEnableChange:S,onAsyncRenderChange:j,children:[y,x,R]}),e[26]=y,e[27]=j,e[28]=S,e[29]=t,e[30]=x,e[31]=R,e[32]=E):E=e[32],E}export{re as P,le as a,G as b,oe as u};
1
+ import{c as w,n as D,K as k,b as A,j as i}from"./index-CNfEIUn0.js";import{bq as P,d as $,br as O,aA as N,bs as I,bt as Q,bu as q}from"./index-BoFDLZ6p.js";import{L}from"./label-BBk0UNMj.js";import{S as K}from"./switch-C3EYj7hN.js";import{d as Y,a as z,b as M,c as U,S as W}from"./select-D5c8Otgi.js";function _(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function G(c,e,t,d){if(c.kind==="page"){if(!_(t))return null;const h=t.seo!==void 0?t.seo:e.rawSeoData;return{...t,seo:d===null?null:P(d,h)}}return _(t)?e.siteKind==="block"?d:{...t,seo:d}:null}function le(c,e){const t=c.__resolveType;return typeof t=="string"&&t.length>0?t:e.seoResolveType}function oe(c){const e=w.c(23),{orgSlug:t,virtualMcpId:d,branch:h,target:o,resolved:s,onSaved:f}=c,r=D(),a=`${t}/${d}/${h}`;let m;e[0]!==h||e[1]!==t||e[2]!==d?(m={orgSlug:t,virtualMcpId:d,branch:h},e[0]=h,e[1]=t,e[2]=d,e[3]=m):m=e[3];let l;e[4]!==f?(l={onSaved:f},e[4]=f,e[5]=l):l=e[5];const{save:n,flush:u,isPending:p}=$(m,l);let y;e[6]!==a||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==o?(y=v=>{s&&n(s.blockKey,()=>{const x=r.getQueryData(k.decofile(a))?.[s.blockKey];return G(o,s,x,v)})},e[6]=a,e[7]=r,e[8]=s,e[9]=n,e[10]=o,e[11]=y):y=e[11];const g=y;let S;e[12]!==a||e[13]!==r||e[14]!==s||e[15]!==n||e[16]!==o?(S=v=>{!s||o.kind!=="page"||n(s.blockKey,()=>{const x=r.getQueryData(k.decofile(a))?.[s.blockKey];return _(x)?{...x,seo:v}:null})},e[12]=a,e[13]=r,e[14]=s,e[15]=n,e[16]=o,e[17]=S):S=e[17];const b=S;let j;return e[18]!==u||e[19]!==p||e[20]!==b||e[21]!==g?(j={persistSeo:g,persistRawSeo:b,flush:u,isPending:p},e[18]=u,e[19]=p,e[20]=b,e[21]=g,e[22]=j):j=e[22],j}const H="https://deco.cx/docs/en/performance/edge-async-render";function J(c){const e=w.c(23),{rawSeo:t,onEnableChange:d,onAsyncRenderChange:h,children:o}=c,s=A();let f;e[0]!==t?(f=N(t),e[0]=t,e[1]=f):f=e[1];const r=f;let a;e[2]!==t?(a=O(t),e[2]=t,e[3]=a):a=e[3];const m=a;let l;e[4]!==s?(l=s("sectionsEditor.seoFormChrome.enableLabel"),e[4]=s,e[5]=l):l=e[5];let n;e[6]!==l?(n=i.jsx(L,{htmlFor:"seo-enable",className:"text-sm font-medium",children:l}),e[6]=l,e[7]=n):n=e[7];let u;e[8]!==r||e[9]!==d?(u=i.jsx(K,{id:"seo-enable",checked:r,onCheckedChange:d}),e[8]=r,e[9]=d,e[10]=u):u=e[10];let p;e[11]!==n||e[12]!==u?(p=i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n,u]}),e[11]=n,e[12]=u,e[13]=p):p=e[13];let y;e[14]!==m||e[15]!==o||e[16]!==r||e[17]!==h||e[18]!==s?(y=r&&i.jsxs(i.Fragment,{children:[o,i.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[i.jsxs("div",{className:"min-w-0 space-y-1",children:[i.jsx("p",{className:"text-sm font-medium",children:s("sectionsEditor.seoFormChrome.asyncRenderLabel")}),i.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",i.jsx("a",{href:H,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:s("sectionsEditor.seoFormChrome.documentationLinkText")}),"."]})]}),i.jsx(K,{id:"seo-async-render",checked:m,onCheckedChange:h,className:"shrink-0"})]})]}),e[14]=m,e[15]=o,e[16]=r,e[17]=h,e[18]=s,e[19]=y):y=e[19];let g;return e[20]!==p||e[21]!==y?(g=i.jsxs("div",{className:"space-y-4",children:[p,y]}),e[20]=p,e[21]=y,e[22]=g):g=e[22],g}function V(c){const e=w.c(20),{options:t,value:d,onChange:h}=c,o=A();if(t.length<=1)return null;let s;e[0]!==o?(s=o("sectionsEditor.seoTypeSelect.label"),e[0]=o,e[1]=s):s=e[1];let f;e[2]!==s?(f=i.jsx(L,{className:"text-xs text-muted-foreground",children:s}),e[2]=s,e[3]=f):f=e[3];let r;e[4]!==o?(r=o("sectionsEditor.seoTypeSelect.placeholder"),e[4]=o,e[5]=r):r=e[5];let a;e[6]!==r?(a=i.jsx(z,{className:"w-full",children:i.jsx(M,{placeholder:r})}),e[6]=r,e[7]=a):a=e[7];let m;e[8]!==t?(m=t.filter(Z).map(X),e[8]=t,e[9]=m):m=e[9];let l;e[10]!==m?(l=i.jsx(U,{children:m}),e[10]=m,e[11]=l):l=e[11];let n;e[12]!==h||e[13]!==a||e[14]!==l||e[15]!==d?(n=i.jsxs(W,{value:d,onValueChange:h,children:[a,l]}),e[12]=h,e[13]=a,e[14]=l,e[15]=d,e[16]=n):n=e[16];let u;return e[17]!==f||e[18]!==n?(u=i.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[f,n]}),e[17]=f,e[18]=n,e[19]=u):u=e[19],u}function X(c){return i.jsx(Y,{value:c.resolveType,children:c.title},c.resolveType)}function Z(c){return c.resolveType.length>0}function re(c){const e=w.c(33),{rawSeo:t,innerSeo:d,defaultResolveType:h,seoSchema:o,activeResolveType:s,seoTypeOptions:f,formResetKey:r,siteDefaultSeo:a,onBreadcrumbChange:m,onPersistRaw:l,onInnerChange:n,onClearForm:u,onBumpFormKey:p,beforeFields:y}=c;let g;e[0]!==h||e[1]!==p||e[2]!==u||e[3]!==l?(g=C=>{if(C){const F=q(h);l(F),u(),p();return}l(null),u(),p()},e[0]=h,e[1]=p,e[2]=u,e[3]=l,e[4]=g):g=e[4];const S=g;let b;e[5]!==l||e[6]!==t?(b=C=>{const F=I(C,t);l(F)},e[5]=l,e[6]=t,e[7]=b):b=e[7];const j=b;let v;e[8]!==p||e[9]!==n?(v=C=>{n({__resolveType:C}),p()},e[8]=p,e[9]=n,e[10]=v):v=e[10];const T=v;let x;e[11]!==s||e[12]!==T||e[13]!==t||e[14]!==o||e[15]!==f?(x=N(t)&&o&&s&&f&&f.length>0&&i.jsx(V,{options:f,value:s,onChange:T}),e[11]=s,e[12]=T,e[13]=t,e[14]=o,e[15]=f,e[16]=x):x=e[16];let R;e[17]!==s||e[18]!==r||e[19]!==d||e[20]!==m||e[21]!==n||e[22]!==t||e[23]!==o||e[24]!==a?(R=N(t)&&o&&s&&i.jsx(Q,{schema:o,resolveType:s,value:d,formResetKey:r,onChange:C=>n(C),onBreadcrumbChange:m,siteDefaultSeo:a}),e[17]=s,e[18]=r,e[19]=d,e[20]=m,e[21]=n,e[22]=t,e[23]=o,e[24]=a,e[25]=R):R=e[25];let E;return e[26]!==y||e[27]!==j||e[28]!==S||e[29]!==t||e[30]!==x||e[31]!==R?(E=i.jsxs(J,{rawSeo:t,onEnableChange:S,onAsyncRenderChange:j,children:[y,x,R]}),e[26]=y,e[27]=j,e[28]=S,e[29]=t,e[30]=x,e[31]=R,e[32]=E):E=e[32],E}export{re as P,le as a,G as b,oe as u};
@@ -1 +1 @@
1
- import{r as i,bp as G,j as a,e0 as L,bt as z,bq as O,bm as b,bs as P,e1 as _,cG as j,e2 as H,e3 as w,e5 as K,e7 as q,bo as U,ea as V,e6 as W,e8 as Z,e9 as B,eb as J,ec as Q,c as m,l as X}from"./index-BkljfHxy.js";var C="Popover",[E]=U(C,[w]),g=w(),[Y,d]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:c=!1}=t,p=g(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=G({prop:r,defaultProp:n??!1,onChange:s,caller:C});return a.jsx(L,{...p,children:a.jsx(Y,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(R=>!R),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:c,children:o})})};N.displayName=C;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=g(o),{onCustomAnchorAdd:c,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(c(),()=>p()),[c,p]),a.jsx(_,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(y,o),s=g(o),c=O(e,n.triggerRef),p=a.jsx(b.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:c,onClick:P(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:a.jsx(_,{asChild:!0,...s,children:p})});D.displayName=y;var A="PopoverPortal",[ee,oe]=E(A,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(A,e);return a.jsx(ee,{scope:e,forceMount:o,children:a.jsx(j,{present:o||s.open,children:a.jsx(H,{asChild:!0,container:n,children:r})})})};M.displayName=A;var v="PopoverContent",T=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return a.jsx(j,{present:r||s.open,children:s.modal?a.jsx(re,{...n,ref:e}):a.jsx(ne,{...n,ref:e})})});T.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const c=r.current;if(c)return K(c)},[]),a.jsx(q,{as:te,allowPinchZoom:!0,children:a.jsx(k,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(t.onCloseAutoFocus,c=>{c.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:P(t.onPointerDownOutside,c=>{const p=c.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:P(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return a.jsx(k,{...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 c=s.target;o.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),k=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),R=g(o);return W(),a.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:a.jsx(B,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:a.jsx(J,{"data-state":$(f.open),role:"dialog",id:f.contentId,...R,...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)"}})})})}),I="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(I,o);return a.jsx(b.button,{type:"button",...r,ref:e,onClick:P(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=I;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=g(o);return a.jsx(Q,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=T;function ve(t){const e=m.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=a.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=m.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=a.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=m.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 c=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=X("notranslate 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 u;return e[7]!==c||e[8]!==r||e[9]!==p||e[10]!==l?(u=a.jsx(ue,{children:a.jsx(de,{"data-slot":"popover-content",align:c,sideOffset:p,translate:"no",className:l,...r})}),e[7]=c,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}function he(t){const e=m.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=a.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
1
+ import{r as i,bp as G,j as a,e0 as L,bt as z,bq as O,bm as b,bs as P,e1 as _,cG as j,e2 as H,e3 as w,e5 as K,e7 as q,bo as U,ea as V,e6 as W,e8 as Z,e9 as B,eb as J,ec as Q,c as m,l as X}from"./index-CNfEIUn0.js";var C="Popover",[E]=U(C,[w]),g=w(),[Y,d]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:c=!1}=t,p=g(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=G({prop:r,defaultProp:n??!1,onChange:s,caller:C});return a.jsx(L,{...p,children:a.jsx(Y,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(R=>!R),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:c,children:o})})};N.displayName=C;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=g(o),{onCustomAnchorAdd:c,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(c(),()=>p()),[c,p]),a.jsx(_,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(y,o),s=g(o),c=O(e,n.triggerRef),p=a.jsx(b.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:c,onClick:P(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:a.jsx(_,{asChild:!0,...s,children:p})});D.displayName=y;var A="PopoverPortal",[ee,oe]=E(A,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(A,e);return a.jsx(ee,{scope:e,forceMount:o,children:a.jsx(j,{present:o||s.open,children:a.jsx(H,{asChild:!0,container:n,children:r})})})};M.displayName=A;var v="PopoverContent",T=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return a.jsx(j,{present:r||s.open,children:s.modal?a.jsx(re,{...n,ref:e}):a.jsx(ne,{...n,ref:e})})});T.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const c=r.current;if(c)return K(c)},[]),a.jsx(q,{as:te,allowPinchZoom:!0,children:a.jsx(k,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(t.onCloseAutoFocus,c=>{c.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:P(t.onPointerDownOutside,c=>{const p=c.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:P(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return a.jsx(k,{...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 c=s.target;o.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),k=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),R=g(o);return W(),a.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:a.jsx(B,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:a.jsx(J,{"data-state":$(f.open),role:"dialog",id:f.contentId,...R,...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)"}})})})}),I="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(I,o);return a.jsx(b.button,{type:"button",...r,ref:e,onClick:P(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=I;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=g(o);return a.jsx(Q,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=T;function ve(t){const e=m.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=a.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=m.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=a.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=m.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 c=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=X("notranslate 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 u;return e[7]!==c||e[8]!==r||e[9]!==p||e[10]!==l?(u=a.jsx(ue,{children:a.jsx(de,{"data-slot":"popover-content",align:c,sideOffset:p,translate:"no",className:l,...r})}),e[7]=c,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}function he(t){const e=m.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=a.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
@@ -1 +1 @@
1
- import{c as nt,b as ct,r as ft,v as wt,l as Z,j as e,B as at}from"./index-BkljfHxy.js";import{i as Tt}from"./AlertCircle-DA1cEHVG.js";import{as as zt,z as Et}from"./agent-icon-CUm4oB7y.js";import{i as At}from"./ChevronRight-gw9dm0MJ.js";import{s as Pt}from"./Plus-BIAtk7db.js";import{a as _t,b as Mt,A as It}from"./alert-6mjnov6H.js";import{S as Lt}from"./scroll-area-0nfzfnAs.js";import{B as Ut,bC as Ot,a5 as $t,bx as Ht,by as Rt,bD as Bt,bw as bt,bA as ht,bE as Ft,bF as Kt}from"./index-TRl02mXS.js";import"./Tool01-Cy0ZGCil.js";import"./ArrowUp-TsmTWJjN.js";import"./ArrowLeft-Br9KqDZP.js";import"./Tool02-CSZTEjDX.js";import"./XCircle-waBvJxuW.js";import"./TrendUp01-CYPVBoFc.js";import"./ZoomOut-NYNe_Z4v.js";import"./Users03-DTortZ69.js";import"./CheckCircle-W70-Hp-u.js";import"./Check-grvRnT6d.js";import"./ChevronUp-DbYyUJ2c.js";import"./ChevronSelectorVertical-CZ_XnnrO.js";import"./DotsVertical-DuImY45F.js";import"./UserSquare-BncQsikh.js";import"./Copy01-DC15dYeZ.js";import"./CreditCard01-BQ448v1L.js";import"./Download01-C92aqGYG.js";import"./Settings02-Dmn9Uagb.js";import"./Eye-BHvUcvRj.js";import"./Share07-BUu5_15N.js";import"./GitBranch01-5KhVbuOf.js";import"./Globe01-B1lfl4nW.js";import"./XClose-D87Tx9wT.js";import"./HardDrive-Bl2sm0P3.js";import"./Image01-BmysQdds.js";import"./Key01-BHRixQVB.js";import"./Link01-pXyMJR2J.js";import"./LinkExternal01-CqwZLC94.js";import"./Monitor01-VQD1wr6O.js";import"./Sun-DWLAV3m1.js";import"./Package-D8xZrFk4.js";import"./Palette-Bo_A8ldC.js";import"./Play-CyYcbqou.js";import"./SearchMd-D6yqdaba.js";import"./Shield01-B9JGpaTp.js";import"./Stars01-CWhfbfaB.js";import"./Trash01-D1GpJcjK.js";import"./Upload01-BCzsausn.js";import"./User01-DpOHQvBN.js";import"./Users01-Di41qDP0.js";import"./Zap-Bz0lnET7.js";import"./select-DqJyZyIQ.js";import"./chat-context-CTC6stWi.js";import"./use-panel-navigate-BRmpjsHj.js";import"./use-destination-route-DLsn9uXe.js";import"./hooks-Cv_l36vR.js";import"./constants-DNuUCxmW.js";import"./use-mcp-client-Deaem8WO.js";import"./auth-Bbv_i1Jo.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DU0j98RE.js";import"./task-board-7HRng9a2.js";import"./schema-BgSBbsw7.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-12aBqy7V.js";import"./use-ai-providers-CWtvyrT-.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-Cm5dzSwF.js";import"./use-organization-settings-CwdP6bUS.js";import"./automation-runs-DLjirUtq.js";import"./useInfiniteQuery-DiQVH8QR.js";import"./use-infinite-scroll-Bj-_fMYw.js";import"./use-connection-Uyph_H8d.js";import"./table-DbdXafHS.js";import"./empty-state-Z33ir3je.js";import"./use-members-Cv__v2oz.js";import"./use-org-auth-client-DWweu3ja.js";import"./use-automations-D9Y9jZ0Z.js";import"./useSuspenseInfiniteQuery-BMUPA2Dd.js";import"./avatar-Cqr4rNtI.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Cuzq782M.js";import"./markdown-D7QuNT69.js";import"./dialog-1xIvEVWS.js";import"./monaco-editor-CC-Sqg8F.js";import"./editor-DuZZHVnS.js";import"./types-B-HpXlbf.js";import"./shell-layout-tPdz54xh.js";import"./download-app-dialog-CsPmnO0q.js";import"./project-icon-BBqdk5OE.js";import"./github-repo-COLY3wWI.js";import"./command-A0s0uPHt.js";import"./index-CUyq5xp-.js";import"./required-auth-layout-B2tIP5k3.js";import"./use-org-sso-CMfMnqpv.js";import"./integration-icon-kfJeGcu4.js";import"./use-navigate-to-agent-B-P_VAZF.js";import"./use-mcp-prompts-C5IrmXgS.js";import"./form-DLHM0IAy.js";import"./label-BSeVlzkX.js";import"./input-CYJ7J22n.js";import"./file-type-icon-Dl9zrC0W.js";import"./drawer-C-pTdfTV.js";import"./collection-search-CO09NGkg.js";import"./tabs-C9EAqZz9.js";import"./toggle-group-Diuss92s.js";import"./task-route-_ESOOTZi.js";import"./toolbar-icon-button-DnenepzG.js";import"./popover-mZ_x_ILZ.js";import"./github-repo-picker-BIbCpUFZ.js";import"./use-debounced-value-DJ0hN8gB.js";import"./authenticate-and-persist-oauth-sBYdDIRi.js";import"./mcp-oauth-dGHhlLy0.js";import"./extract-connection-data-C44EqyQK.js";import"./metadata-dUsYcpuu.js";import"./connection-DFFOswZj.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-TaYo6pYl.js";import"./use-registry-connections-CU4AWQn4.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-90AQXVh4.js";import"./connection-form-helpers-CoIQo1Gb.js";import"./collection-tabs-cr1701fJ.js";import"./badge-CdD_S6_J.js";import"./use-file-configs-CHDaFO85.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-Dm9zz_PI.js";import"./get-initials-D-f_fDFw.js";import"./select-model-BsGv2vyu.js";import"./checkbox-DtN6Dr54.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-DXofXja-.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CkzzANKj.js";import"./toolbar-BWOWuYdi.js";import"./skill-preview-C-lpKGFK.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-C51iVTPN.js";import"./use-debounced-autosave-DS1yKwxh.js";import"./search-input-CIki-uxf.js";import"./use-mcp-auth-status-HMnG1EUf.js";import"./switch-CZqeYbje.js";import"./use-secrets--00GbFn8.js";import"./client-icons-C1w3IsHJ.js";import"./connect-layout-CrHWsBPn.js";import"./self-tool-result-BoZ6MFRP.js";import"./track-Qcawd54k.js";import"./use-tags-k_sYBsNz.js";import"./breadcrumb-CGLwazRA.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-Hqe9OUun.js";import"./site-error--i37Vnuw.js";import"./cards-De2Tofte.js";const jt="border-success/30 bg-success/10 text-success hover:bg-success/20",yt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Wt(f){const t=nt.c(17),{support:x}=f,i=ct(),o=x.kind==="unsupported-runtime";let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(Tt,{}),t[0]=l):l=t[0];const a=o?"sandbox.postCalendar.unsupportedRuntimeTitle":"sandbox.postCalendar.outdatedAppsTitle";let c;t[1]!==i||t[2]!==a?(c=i(a),t[1]=i,t[2]=a,t[3]=c):c=t[3];let s;t[4]!==c?(s=e.jsx(_t,{children:c}),t[4]=c,t[5]=s):s=t[5];let d;t[6]!==o||t[7]!==i?(d=o?i("sandbox.postCalendar.unsupportedRuntimeDescription"):i("sandbox.postCalendar.outdatedAppsDescription",{required:Ft}),t[6]=o,t[7]=i,t[8]=d):d=t[8];let r;t[9]!==d?(r=e.jsx(Mt,{children:d}),t[9]=d,t[10]=r):r=t[10];let n;t[11]!==o?(n=!o&&e.jsx("code",{className:"mt-2 block rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground",children:Kt}),t[11]=o,t[12]=n):n=t[12];let m;return t[13]!==s||t[14]!==r||t[15]!==n?(m=e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/30 p-6",children:e.jsxs(It,{variant:"warning",className:"max-w-md bg-background/95 shadow-lg backdrop-blur",children:[l,e.jsxs("div",{children:[s,r,n]})]})}),t[13]=s,t[14]=r,t[15]=n,t[16]=m):m=t[16],m}function Fo(f){const t=nt.c(94),{decofile:x,support:i,selectedKey:o,onSelect:l,onCreate:a,onReschedule:c,isCreating:s}=f,d=s===void 0?!1:s,r=ct();let n;t[0]!==i?(n=Ut(i),t[0]=i,t[1]=n):n=t[1];const m=n,[g,y]=ft.useState(null),[N]=wt(),[b,w]=ft.useState(Vt),h=N.language;let D;t[2]!==b||t[3]!==h?(D=new Intl.DateTimeFormat(h,{month:"long",year:"numeric"}).format(b),t[2]=b,t[3]=h,t[4]=D):D=t[4];const u=D;let j,C,T,z,k,E,A,P,_,M,S;if(t[5]!==m||t[6]!==b||t[7]!==x||t[8]!==g||t[9]!==d||t[10]!==h||t[11]!==u||t[12]!==a||t[13]!==c||t[14]!==l||t[15]!==o||t[16]!==r){const vt=new Intl.DateTimeFormat(h,{weekday:"short"}),Ct=new Intl.DateTimeFormat(h,{dateStyle:"long"}),{byDay:Nt,undated:mt}=Ot($t(x)),dt=Ht(b),Dt=Rt(new Date);z="flex h-full w-full flex-col";let et;t[28]===Symbol.for("react.memo_cache_sentinel")?(et=()=>w(bt(new Date)),t[28]=et):et=t[28];let H;t[29]!==r?(H=r("sandbox.postCalendar.today"),t[29]=r,t[30]=H):H=t[30];let R;t[31]!==H?(R=e.jsx(at,{variant:"outline",size:"sm",onClick:et,children:H}),t[31]=H,t[32]=R):R=t[32];let rt;t[33]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>w(Gt),t[33]=rt):rt=t[33];let B;t[34]!==r?(B=r("sandbox.postCalendar.previous"),t[34]=r,t[35]=B):B=t[35];let ot;t[36]===Symbol.for("react.memo_cache_sentinel")?(ot=e.jsx(Et,{size:16}),t[36]=ot):ot=t[36];let F;t[37]!==B?(F=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:rt,"aria-label":B,children:ot}),t[37]=B,t[38]=F):F=t[38];let st;t[39]===Symbol.for("react.memo_cache_sentinel")?(st=()=>w(qt),t[39]=st):st=t[39];let K;t[40]!==r?(K=r("sandbox.postCalendar.next"),t[40]=r,t[41]=K):K=t[41];let it;t[42]===Symbol.for("react.memo_cache_sentinel")?(it=e.jsx(At,{size:16}),t[42]=it):it=t[42];let W;t[43]!==K?(W=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:st,"aria-label":K,children:it}),t[43]=K,t[44]=W):W=t[44];let q;t[45]!==u?(q=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:u}),t[45]=u,t[46]=q):q=t[46];let G;t[47]!==r?(G=r("sandbox.postCalendar.legendScheduled"),t[47]=r,t[48]=G):G=t[48];let V;t[49]!==G?(V=e.jsx(xt,{className:jt,label:G}),t[49]=G,t[50]=V):V=t[50];let J;t[51]!==r?(J=r("sandbox.postCalendar.legendUnscheduled"),t[51]=r,t[52]=J):J=t[52];let Q;t[53]!==J?(Q=e.jsx(xt,{className:yt,label:J}),t[53]=J,t[54]=Q):Q=t[54];let X;t[55]!==V||t[56]!==Q?(X=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[V,Q]}),t[55]=V,t[56]=Q,t[57]=X):X=t[57],t[58]!==R||t[59]!==F||t[60]!==W||t[61]!==q||t[62]!==X?(k=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[R,F,W,q,X]}),t[58]=R,t[59]=F,t[60]=W,t[61]=q,t[62]=X,t[63]=k):k=t[63],T="relative flex-1 min-h-0",j=Lt;const pt=!m&&"blur-[2px] select-none";t[64]!==pt?(S=Z("h-full",pt),t[64]=pt,t[65]=S):S=t[65],C=!m,_="flex min-w-[880px] gap-4 p-4";let Y;t[66]!==r?(Y=r("sandbox.postCalendar.unscheduledHint"),t[66]=r,t[67]=Y):Y=t[67];let lt;t[68]!==Y?(lt=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Y}),t[68]=Y,t[69]=lt):lt=t[69],M=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:dt[0]?.map(p=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:vt.format(p)},p.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:dt.flat().map(p=>{const kt=p.getMonth()===b.getMonth(),St=Nt.get(Bt(p))??[];return e.jsxs("div",{onDragOver:v=>{g&&(v.preventDefault(),v.dataTransfer.dropEffect="move")},onDrop:v=>{v.preventDefault();const ut=v.dataTransfer.getData("text/plain");y(null),ut&&c(ut,p)},className:Z("group/day min-h-28 space-y-1 p-2 transition-colors",kt?"bg-background":"bg-muted/40",g&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:Z("grid size-6 place-items-center rounded-full text-xs",p.getTime()===Dt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:p.getDate()}),m&&e.jsx(at,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:d,onClick:()=>a(p),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:Ct.format(p)}),children:e.jsx(Pt,{size:14})})]}),St.map(v=>e.jsx(gt,{entry:v,active:v.post.key===o,draggable:m&&v.scheduled,onSelect:l,onDragStateChange:y},v.post.key))]},p.getTime())})}),lt]}),E="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",A=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:mt.length})}),P=mt.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(zt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):mt.map(p=>e.jsx(gt,{entry:p,active:p.post.key===o,draggable:!1,onSelect:l,onDragStateChange:y},p.post.key)),t[5]=m,t[6]=b,t[7]=x,t[8]=g,t[9]=d,t[10]=h,t[11]=u,t[12]=a,t[13]=c,t[14]=l,t[15]=o,t[16]=r,t[17]=j,t[18]=C,t[19]=T,t[20]=z,t[21]=k,t[22]=E,t[23]=A,t[24]=P,t[25]=_,t[26]=M,t[27]=S}else j=t[17],C=t[18],T=t[19],z=t[20],k=t[21],E=t[22],A=t[23],P=t[24],_=t[25],M=t[26],S=t[27];let I;t[70]!==E||t[71]!==A||t[72]!==P?(I=e.jsxs("div",{className:E,children:[A,P]}),t[70]=E,t[71]=A,t[72]=P,t[73]=I):I=t[73];let L;t[74]!==I||t[75]!==_||t[76]!==M?(L=e.jsxs("div",{className:_,children:[M,I]}),t[74]=I,t[75]=_,t[76]=M,t[77]=L):L=t[77];let U;t[78]!==j||t[79]!==C||t[80]!==L||t[81]!==S?(U=e.jsx(j,{className:S,inert:C,children:L}),t[78]=j,t[79]=C,t[80]=L,t[81]=S,t[82]=U):U=t[82];let O;t[83]!==m||t[84]!==i?(O=!m&&e.jsx(Wt,{support:i}),t[83]=m,t[84]=i,t[85]=O):O=t[85];let $;t[86]!==T||t[87]!==U||t[88]!==O?($=e.jsxs("div",{className:T,children:[U,O]}),t[86]=T,t[87]=U,t[88]=O,t[89]=$):$=t[89];let tt;return t[90]!==z||t[91]!==k||t[92]!==$?(tt=e.jsxs("div",{className:z,children:[k,$]}),t[90]=z,t[91]=k,t[92]=$,t[93]=tt):tt=t[93],tt}function qt(f){return ht(f,1)}function Gt(f){return ht(f,-1)}function Vt(){return bt(new Date)}function xt(f){const t=nt.c(7),{className:x,label:i}=f;let o;t[0]!==x?(o=Z("size-3 rounded-sm border",x),t[0]=x,t[1]=o):o=t[1];let l;t[2]!==o?(l=e.jsx("span",{className:o}),t[2]=o,t[3]=l):l=t[3];let a;return t[4]!==i||t[5]!==l?(a=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,i]}),t[4]=i,t[5]=l,t[6]=a):a=t[6],a}function gt(f){const t=nt.c(23),{entry:x,active:i,draggable:o,onSelect:l,onDragStateChange:a}=f,c=ct(),{post:s,scheduled:d}=x,r=d?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let n;t[0]!==c||t[1]!==r?(n=c(r),t[0]=c,t[1]=r,t[2]=n):n=t[2];const m=n;let g;t[3]!==a||t[4]!==s.key?(g=C=>{C.dataTransfer.setData("text/plain",s.key),C.dataTransfer.effectAllowed="move",a(s.key)},t[3]=a,t[4]=s.key,t[5]=g):g=t[5];let y;t[6]!==a?(y=()=>a(null),t[6]=a,t[7]=y):y=t[7];let N;t[8]!==l||t[9]!==s.key?(N=()=>l(s.key),t[8]=l,t[9]=s.key,t[10]=N):N=t[10];const b=`${s.title} · ${m}`,w=d?jt:yt,h=o&&"cursor-grab active:cursor-grabbing",D=i&&"ring-2 ring-primary";let u;t[11]!==w||t[12]!==h||t[13]!==D?(u=Z("w-full truncate rounded-md border px-2 py-1 text-left text-xs font-medium transition-colors",w,h,D),t[11]=w,t[12]=h,t[13]=D,t[14]=u):u=t[14];let j;return t[15]!==o||t[16]!==s.title||t[17]!==u||t[18]!==g||t[19]!==y||t[20]!==N||t[21]!==b?(j=e.jsx("button",{type:"button",draggable:o,onDragStart:g,onDragEnd:y,onClick:N,title:b,className:u,children:s.title}),t[15]=o,t[16]=s.title,t[17]=u,t[18]=g,t[19]=y,t[20]=N,t[21]=b,t[22]=j):j=t[22],j}export{Fo as PostCalendar};
1
+ import{c as nt,b as ct,r as ft,v as wt,l as Z,j as e,B as at}from"./index-CNfEIUn0.js";import{i as Tt}from"./AlertCircle-B02pIqyO.js";import{as as zt,z as Et}from"./agent-icon-Cm-rraMc.js";import{i as At}from"./ChevronRight-Bo_7PLYL.js";import{s as Pt}from"./Plus-npiI5-7X.js";import{a as _t,b as Mt,A as It}from"./alert-BDwew5st.js";import{S as Lt}from"./scroll-area-Bga4xYk7.js";import{B as Ut,bC as Ot,a5 as $t,bx as Ht,by as Rt,bD as Bt,bw as bt,bA as ht,bE as Ft,bF as Kt}from"./index-BoFDLZ6p.js";import"./Tool01-DpeMCocB.js";import"./ArrowUp-CQ6SET-t.js";import"./ArrowLeft-DzuSLuVr.js";import"./Tool02-DMSvrhPC.js";import"./XCircle-DC63K01N.js";import"./TrendUp01-DBKvZ-DZ.js";import"./ZoomOut-Du-2I-dz.js";import"./Users03-BTZsMKrW.js";import"./CheckCircle-Bs1i8n8R.js";import"./Check-CnxYOeJk.js";import"./ChevronUp-CDlju1TC.js";import"./ChevronSelectorVertical-BWdGiimP.js";import"./DotsVertical-DRP3CifW.js";import"./UserSquare-jm1EvWHs.js";import"./Copy01-D5Ill_kE.js";import"./CreditCard01-NbxHy6Lv.js";import"./Download01-DoUNzBPU.js";import"./Settings02-C0EhiTe4.js";import"./Eye-COu8umtC.js";import"./Share07-Cp3sAWWN.js";import"./GitBranch01-idBGys5s.js";import"./Globe01-CtD7u0-k.js";import"./XClose-VJXgkRtY.js";import"./HardDrive-BVnECxVe.js";import"./Image01-Cy8ZoIiy.js";import"./Key01-DoBw9G0M.js";import"./Link01-u2EoXuNT.js";import"./LinkExternal01-CBhAp9XW.js";import"./Monitor01-DmqpK-8S.js";import"./Sun-e_DnDd3f.js";import"./Package-CcAuJGku.js";import"./Palette-BOxVbiJL.js";import"./Play-DG2731JJ.js";import"./SearchMd-DM9iwGft.js";import"./Shield01-B0ob1ipu.js";import"./Stars01-BgKhcopx.js";import"./Trash01-C64jvZUr.js";import"./Upload01-CZcQRY37.js";import"./User01-DvzdeHqd.js";import"./Users01-HKHLFhfO.js";import"./Zap-Buyt_ZmJ.js";import"./select-D5c8Otgi.js";import"./chat-context-CALwiBF_.js";import"./use-panel-navigate-CypROp-b.js";import"./use-destination-route-2_Kd2h4X.js";import"./hooks-CV5SIncY.js";import"./constants-DNuUCxmW.js";import"./use-mcp-client-CgA8PWhj.js";import"./auth-BfPf7zhg.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BDzoef2l.js";import"./task-board-Cw4I7XsI.js";import"./schema-DO9s-3_3.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-XPauNnS5.js";import"./use-ai-providers-DfC2UWvW.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-jW8Ieour.js";import"./use-organization-settings-BRf1OrEm.js";import"./automation-runs-CkSYrEGR.js";import"./useInfiniteQuery-D4DO3KqU.js";import"./use-infinite-scroll-Br6HoOld.js";import"./use-connection-DNt4swpy.js";import"./table-DEic8MLd.js";import"./empty-state-S-1xJrE6.js";import"./use-members-4CiFzvQG.js";import"./use-org-auth-client-B2H7C6Ln.js";import"./use-automations-4iFK5nkE.js";import"./useSuspenseInfiniteQuery-Ccvsai-C.js";import"./avatar-DVuZ2F_T.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BXRFLn2M.js";import"./markdown-CBbWAQAJ.js";import"./dialog-C9fBgi3G.js";import"./monaco-editor-DazsPMf1.js";import"./editor-BjHf7-wi.js";import"./types-BXQK2N0O.js";import"./shell-layout-zuPHJJxr.js";import"./download-app-dialog-B6fQdqDO.js";import"./project-icon-Da5qBAn7.js";import"./github-repo-COLY3wWI.js";import"./command-BYns7CwK.js";import"./index-BraqwIq2.js";import"./required-auth-layout-BH79UCBF.js";import"./use-org-sso-CYEN5nc1.js";import"./integration-icon-BRZ0l9mu.js";import"./use-navigate-to-agent-BhLZN4vX.js";import"./use-mcp-prompts-CG2uZJ9H.js";import"./form-BXpGp03G.js";import"./label-BBk0UNMj.js";import"./input-CxZ-2GPj.js";import"./file-type-icon-CzKQjLvK.js";import"./drawer-OLnwjI2K.js";import"./collection-search-BvGAgDld.js";import"./tabs-iA_HLM1O.js";import"./toggle-group-CTRGHvcL.js";import"./task-route-C2MKBcLF.js";import"./toolbar-icon-button-BJhOiNGi.js";import"./popover-CxFVXm-T.js";import"./github-repo-picker-Bo27g0p4.js";import"./use-debounced-value-Df4IN6g1.js";import"./authenticate-and-persist-oauth-hh7nuAWR.js";import"./mcp-oauth-BTxNcy48.js";import"./extract-connection-data-CDeabBWK.js";import"./metadata-dUsYcpuu.js";import"./connection-CXkee5u6.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-CWUJLExI.js";import"./use-registry-connections-C524bvTW.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-BsDleKsG.js";import"./connection-form-helpers-D7wCXBEQ.js";import"./collection-tabs-Cd4Vv0EE.js";import"./badge-FcNiwbMm.js";import"./use-file-configs-CNLxYc3F.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-tC5c5wq-.js";import"./get-initials-D-f_fDFw.js";import"./select-model-B4IX9QyY.js";import"./checkbox-BmYwx8kR.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-CA44zIJR.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-v0k0tR6A.js";import"./toolbar-RiMn7tp7.js";import"./skill-preview-Cds7l0IB.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-EueylpK5.js";import"./use-debounced-autosave-BzJT5pgf.js";import"./search-input-CNFZM5Ki.js";import"./use-mcp-auth-status-B8KMbW6d.js";import"./switch-C3EYj7hN.js";import"./use-secrets-DJHtvR4D.js";import"./client-icons-CxvuXLIW.js";import"./connect-layout-U7Ps2Adr.js";import"./self-tool-result-PbyB4K2F.js";import"./track-DeADh2iG.js";import"./use-tags-gMOyjsIi.js";import"./breadcrumb-CWoWChjJ.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-B7bEWOhz.js";import"./site-error--i37Vnuw.js";import"./cards-Ta4bCObM.js";const jt="border-success/30 bg-success/10 text-success hover:bg-success/20",yt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Wt(f){const t=nt.c(17),{support:x}=f,i=ct(),o=x.kind==="unsupported-runtime";let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(Tt,{}),t[0]=l):l=t[0];const a=o?"sandbox.postCalendar.unsupportedRuntimeTitle":"sandbox.postCalendar.outdatedAppsTitle";let c;t[1]!==i||t[2]!==a?(c=i(a),t[1]=i,t[2]=a,t[3]=c):c=t[3];let s;t[4]!==c?(s=e.jsx(_t,{children:c}),t[4]=c,t[5]=s):s=t[5];let d;t[6]!==o||t[7]!==i?(d=o?i("sandbox.postCalendar.unsupportedRuntimeDescription"):i("sandbox.postCalendar.outdatedAppsDescription",{required:Ft}),t[6]=o,t[7]=i,t[8]=d):d=t[8];let r;t[9]!==d?(r=e.jsx(Mt,{children:d}),t[9]=d,t[10]=r):r=t[10];let n;t[11]!==o?(n=!o&&e.jsx("code",{className:"mt-2 block rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground",children:Kt}),t[11]=o,t[12]=n):n=t[12];let m;return t[13]!==s||t[14]!==r||t[15]!==n?(m=e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/30 p-6",children:e.jsxs(It,{variant:"warning",className:"max-w-md bg-background/95 shadow-lg backdrop-blur",children:[l,e.jsxs("div",{children:[s,r,n]})]})}),t[13]=s,t[14]=r,t[15]=n,t[16]=m):m=t[16],m}function Fo(f){const t=nt.c(94),{decofile:x,support:i,selectedKey:o,onSelect:l,onCreate:a,onReschedule:c,isCreating:s}=f,d=s===void 0?!1:s,r=ct();let n;t[0]!==i?(n=Ut(i),t[0]=i,t[1]=n):n=t[1];const m=n,[g,y]=ft.useState(null),[N]=wt(),[b,w]=ft.useState(Vt),h=N.language;let D;t[2]!==b||t[3]!==h?(D=new Intl.DateTimeFormat(h,{month:"long",year:"numeric"}).format(b),t[2]=b,t[3]=h,t[4]=D):D=t[4];const u=D;let j,C,T,z,k,E,A,P,_,M,S;if(t[5]!==m||t[6]!==b||t[7]!==x||t[8]!==g||t[9]!==d||t[10]!==h||t[11]!==u||t[12]!==a||t[13]!==c||t[14]!==l||t[15]!==o||t[16]!==r){const vt=new Intl.DateTimeFormat(h,{weekday:"short"}),Ct=new Intl.DateTimeFormat(h,{dateStyle:"long"}),{byDay:Nt,undated:mt}=Ot($t(x)),dt=Ht(b),Dt=Rt(new Date);z="flex h-full w-full flex-col";let et;t[28]===Symbol.for("react.memo_cache_sentinel")?(et=()=>w(bt(new Date)),t[28]=et):et=t[28];let H;t[29]!==r?(H=r("sandbox.postCalendar.today"),t[29]=r,t[30]=H):H=t[30];let R;t[31]!==H?(R=e.jsx(at,{variant:"outline",size:"sm",onClick:et,children:H}),t[31]=H,t[32]=R):R=t[32];let rt;t[33]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>w(Gt),t[33]=rt):rt=t[33];let B;t[34]!==r?(B=r("sandbox.postCalendar.previous"),t[34]=r,t[35]=B):B=t[35];let ot;t[36]===Symbol.for("react.memo_cache_sentinel")?(ot=e.jsx(Et,{size:16}),t[36]=ot):ot=t[36];let F;t[37]!==B?(F=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:rt,"aria-label":B,children:ot}),t[37]=B,t[38]=F):F=t[38];let st;t[39]===Symbol.for("react.memo_cache_sentinel")?(st=()=>w(qt),t[39]=st):st=t[39];let K;t[40]!==r?(K=r("sandbox.postCalendar.next"),t[40]=r,t[41]=K):K=t[41];let it;t[42]===Symbol.for("react.memo_cache_sentinel")?(it=e.jsx(At,{size:16}),t[42]=it):it=t[42];let W;t[43]!==K?(W=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:st,"aria-label":K,children:it}),t[43]=K,t[44]=W):W=t[44];let q;t[45]!==u?(q=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:u}),t[45]=u,t[46]=q):q=t[46];let G;t[47]!==r?(G=r("sandbox.postCalendar.legendScheduled"),t[47]=r,t[48]=G):G=t[48];let V;t[49]!==G?(V=e.jsx(xt,{className:jt,label:G}),t[49]=G,t[50]=V):V=t[50];let J;t[51]!==r?(J=r("sandbox.postCalendar.legendUnscheduled"),t[51]=r,t[52]=J):J=t[52];let Q;t[53]!==J?(Q=e.jsx(xt,{className:yt,label:J}),t[53]=J,t[54]=Q):Q=t[54];let X;t[55]!==V||t[56]!==Q?(X=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[V,Q]}),t[55]=V,t[56]=Q,t[57]=X):X=t[57],t[58]!==R||t[59]!==F||t[60]!==W||t[61]!==q||t[62]!==X?(k=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[R,F,W,q,X]}),t[58]=R,t[59]=F,t[60]=W,t[61]=q,t[62]=X,t[63]=k):k=t[63],T="relative flex-1 min-h-0",j=Lt;const pt=!m&&"blur-[2px] select-none";t[64]!==pt?(S=Z("h-full",pt),t[64]=pt,t[65]=S):S=t[65],C=!m,_="flex min-w-[880px] gap-4 p-4";let Y;t[66]!==r?(Y=r("sandbox.postCalendar.unscheduledHint"),t[66]=r,t[67]=Y):Y=t[67];let lt;t[68]!==Y?(lt=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Y}),t[68]=Y,t[69]=lt):lt=t[69],M=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:dt[0]?.map(p=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:vt.format(p)},p.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:dt.flat().map(p=>{const kt=p.getMonth()===b.getMonth(),St=Nt.get(Bt(p))??[];return e.jsxs("div",{onDragOver:v=>{g&&(v.preventDefault(),v.dataTransfer.dropEffect="move")},onDrop:v=>{v.preventDefault();const ut=v.dataTransfer.getData("text/plain");y(null),ut&&c(ut,p)},className:Z("group/day min-h-28 space-y-1 p-2 transition-colors",kt?"bg-background":"bg-muted/40",g&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:Z("grid size-6 place-items-center rounded-full text-xs",p.getTime()===Dt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:p.getDate()}),m&&e.jsx(at,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:d,onClick:()=>a(p),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:Ct.format(p)}),children:e.jsx(Pt,{size:14})})]}),St.map(v=>e.jsx(gt,{entry:v,active:v.post.key===o,draggable:m&&v.scheduled,onSelect:l,onDragStateChange:y},v.post.key))]},p.getTime())})}),lt]}),E="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",A=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:mt.length})}),P=mt.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(zt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):mt.map(p=>e.jsx(gt,{entry:p,active:p.post.key===o,draggable:!1,onSelect:l,onDragStateChange:y},p.post.key)),t[5]=m,t[6]=b,t[7]=x,t[8]=g,t[9]=d,t[10]=h,t[11]=u,t[12]=a,t[13]=c,t[14]=l,t[15]=o,t[16]=r,t[17]=j,t[18]=C,t[19]=T,t[20]=z,t[21]=k,t[22]=E,t[23]=A,t[24]=P,t[25]=_,t[26]=M,t[27]=S}else j=t[17],C=t[18],T=t[19],z=t[20],k=t[21],E=t[22],A=t[23],P=t[24],_=t[25],M=t[26],S=t[27];let I;t[70]!==E||t[71]!==A||t[72]!==P?(I=e.jsxs("div",{className:E,children:[A,P]}),t[70]=E,t[71]=A,t[72]=P,t[73]=I):I=t[73];let L;t[74]!==I||t[75]!==_||t[76]!==M?(L=e.jsxs("div",{className:_,children:[M,I]}),t[74]=I,t[75]=_,t[76]=M,t[77]=L):L=t[77];let U;t[78]!==j||t[79]!==C||t[80]!==L||t[81]!==S?(U=e.jsx(j,{className:S,inert:C,children:L}),t[78]=j,t[79]=C,t[80]=L,t[81]=S,t[82]=U):U=t[82];let O;t[83]!==m||t[84]!==i?(O=!m&&e.jsx(Wt,{support:i}),t[83]=m,t[84]=i,t[85]=O):O=t[85];let $;t[86]!==T||t[87]!==U||t[88]!==O?($=e.jsxs("div",{className:T,children:[U,O]}),t[86]=T,t[87]=U,t[88]=O,t[89]=$):$=t[89];let tt;return t[90]!==z||t[91]!==k||t[92]!==$?(tt=e.jsxs("div",{className:z,children:[k,$]}),t[90]=z,t[91]=k,t[92]=$,t[93]=tt):tt=t[93],tt}function qt(f){return ht(f,1)}function Gt(f){return ht(f,-1)}function Vt(){return bt(new Date)}function xt(f){const t=nt.c(7),{className:x,label:i}=f;let o;t[0]!==x?(o=Z("size-3 rounded-sm border",x),t[0]=x,t[1]=o):o=t[1];let l;t[2]!==o?(l=e.jsx("span",{className:o}),t[2]=o,t[3]=l):l=t[3];let a;return t[4]!==i||t[5]!==l?(a=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,i]}),t[4]=i,t[5]=l,t[6]=a):a=t[6],a}function gt(f){const t=nt.c(23),{entry:x,active:i,draggable:o,onSelect:l,onDragStateChange:a}=f,c=ct(),{post:s,scheduled:d}=x,r=d?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let n;t[0]!==c||t[1]!==r?(n=c(r),t[0]=c,t[1]=r,t[2]=n):n=t[2];const m=n;let g;t[3]!==a||t[4]!==s.key?(g=C=>{C.dataTransfer.setData("text/plain",s.key),C.dataTransfer.effectAllowed="move",a(s.key)},t[3]=a,t[4]=s.key,t[5]=g):g=t[5];let y;t[6]!==a?(y=()=>a(null),t[6]=a,t[7]=y):y=t[7];let N;t[8]!==l||t[9]!==s.key?(N=()=>l(s.key),t[8]=l,t[9]=s.key,t[10]=N):N=t[10];const b=`${s.title} · ${m}`,w=d?jt:yt,h=o&&"cursor-grab active:cursor-grabbing",D=i&&"ring-2 ring-primary";let u;t[11]!==w||t[12]!==h||t[13]!==D?(u=Z("w-full truncate rounded-md border px-2 py-1 text-left text-xs font-medium transition-colors",w,h,D),t[11]=w,t[12]=h,t[13]=D,t[14]=u):u=t[14];let j;return t[15]!==o||t[16]!==s.title||t[17]!==u||t[18]!==g||t[19]!==y||t[20]!==N||t[21]!==b?(j=e.jsx("button",{type:"button",draggable:o,onDragStart:g,onDragEnd:y,onClick:N,title:b,className:u,children:s.title}),t[15]=o,t[16]=s.title,t[17]=u,t[18]=g,t[19]=y,t[20]=N,t[21]=b,t[22]=j):j=t[22],j}export{Fo as PostCalendar};
@@ -1 +1 @@
1
- import{c as he,b as be,j as t,a4 as Pe,a1 as ke,a2 as Ne,B as Te}from"./index-BkljfHxy.js";import{b as Be}from"./chat-context-CTC6stWi.js";import{i as Ie}from"./AlertCircle-DA1cEHVG.js";import{n as Ae}from"./LinkExternal01-CqwZLC94.js";import{bj as Re,p as De}from"./agent-icon-CUm4oB7y.js";import{I as ue}from"./input-CYJ7J22n.js";import{L as xe}from"./label-BSeVlzkX.js";import{M as $e}from"./multi-select-nRNpGGJY.js";import{b as je,c as _e,T as ve,a as Me}from"./tabs-C9EAqZz9.js";import{S as Se}from"./switch-CZqeYbje.js";import{T as Le}from"./textarea-90AQXVh4.js";import{e as Ve,t as ze,v as Ue,w as Ye,x as we,j as He,y as qe,z as Je,A as Ke,B as Oe,C as Ge,D as Ee,E as ge,F as Qe,H as We,I as Xe,J as Fe}from"./index-TRl02mXS.js";import{b as Ze,a as et,B as tt}from"./block-document-CwU9JWtH.js";import{u as st}from"./use-autosave-DIT9IDbg.js";import{s as Q,E as lt,R as it,A as ot}from"./primitives-Bp0pnH9F.js";import"./use-panel-navigate-BRmpjsHj.js";import"./use-destination-route-DLsn9uXe.js";import"./hooks-Cv_l36vR.js";import"./constants-DNuUCxmW.js";import"./use-mcp-client-Deaem8WO.js";import"./auth-Bbv_i1Jo.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DU0j98RE.js";import"./task-board-7HRng9a2.js";import"./schema-BgSBbsw7.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-12aBqy7V.js";import"./use-ai-providers-CWtvyrT-.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-Cm5dzSwF.js";import"./use-organization-settings-CwdP6bUS.js";import"./Tool01-Cy0ZGCil.js";import"./ArrowUp-TsmTWJjN.js";import"./ArrowLeft-Br9KqDZP.js";import"./Tool02-CSZTEjDX.js";import"./XCircle-waBvJxuW.js";import"./TrendUp01-CYPVBoFc.js";import"./ZoomOut-NYNe_Z4v.js";import"./Users03-DTortZ69.js";import"./CheckCircle-W70-Hp-u.js";import"./Check-grvRnT6d.js";import"./ChevronUp-DbYyUJ2c.js";import"./ChevronRight-gw9dm0MJ.js";import"./ChevronSelectorVertical-CZ_XnnrO.js";import"./DotsVertical-DuImY45F.js";import"./UserSquare-BncQsikh.js";import"./Copy01-DC15dYeZ.js";import"./CreditCard01-BQ448v1L.js";import"./Download01-C92aqGYG.js";import"./Settings02-Dmn9Uagb.js";import"./Eye-BHvUcvRj.js";import"./Share07-BUu5_15N.js";import"./GitBranch01-5KhVbuOf.js";import"./Globe01-B1lfl4nW.js";import"./XClose-D87Tx9wT.js";import"./HardDrive-Bl2sm0P3.js";import"./Image01-BmysQdds.js";import"./Key01-BHRixQVB.js";import"./Link01-pXyMJR2J.js";import"./Monitor01-VQD1wr6O.js";import"./Sun-DWLAV3m1.js";import"./Package-D8xZrFk4.js";import"./Palette-Bo_A8ldC.js";import"./Play-CyYcbqou.js";import"./Plus-BIAtk7db.js";import"./SearchMd-D6yqdaba.js";import"./Shield01-B9JGpaTp.js";import"./Stars01-CWhfbfaB.js";import"./Trash01-D1GpJcjK.js";import"./Upload01-BCzsausn.js";import"./User01-DpOHQvBN.js";import"./Users01-Di41qDP0.js";import"./Zap-Bz0lnET7.js";import"./badge-CdD_S6_J.js";import"./checkbox-DtN6Dr54.js";import"./command-A0s0uPHt.js";import"./index-CUyq5xp-.js";import"./dialog-1xIvEVWS.js";import"./popover-mZ_x_ILZ.js";import"./automation-runs-DLjirUtq.js";import"./useInfiniteQuery-DiQVH8QR.js";import"./use-infinite-scroll-Bj-_fMYw.js";import"./use-connection-Uyph_H8d.js";import"./table-DbdXafHS.js";import"./empty-state-Z33ir3je.js";import"./use-members-Cv__v2oz.js";import"./use-org-auth-client-DWweu3ja.js";import"./use-automations-D9Y9jZ0Z.js";import"./useSuspenseInfiniteQuery-BMUPA2Dd.js";import"./avatar-Cqr4rNtI.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Cuzq782M.js";import"./markdown-D7QuNT69.js";import"./monaco-editor-CC-Sqg8F.js";import"./editor-DuZZHVnS.js";import"./types-B-HpXlbf.js";import"./shell-layout-tPdz54xh.js";import"./download-app-dialog-CsPmnO0q.js";import"./project-icon-BBqdk5OE.js";import"./github-repo-COLY3wWI.js";import"./required-auth-layout-B2tIP5k3.js";import"./use-org-sso-CMfMnqpv.js";import"./integration-icon-kfJeGcu4.js";import"./use-navigate-to-agent-B-P_VAZF.js";import"./use-mcp-prompts-C5IrmXgS.js";import"./form-DLHM0IAy.js";import"./file-type-icon-Dl9zrC0W.js";import"./drawer-C-pTdfTV.js";import"./collection-search-CO09NGkg.js";import"./select-DqJyZyIQ.js";import"./toggle-group-Diuss92s.js";import"./task-route-_ESOOTZi.js";import"./toolbar-icon-button-DnenepzG.js";import"./github-repo-picker-BIbCpUFZ.js";import"./use-debounced-value-DJ0hN8gB.js";import"./authenticate-and-persist-oauth-sBYdDIRi.js";import"./mcp-oauth-dGHhlLy0.js";import"./extract-connection-data-C44EqyQK.js";import"./metadata-dUsYcpuu.js";import"./connection-DFFOswZj.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-TaYo6pYl.js";import"./use-registry-connections-CU4AWQn4.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-CoIQo1Gb.js";import"./collection-tabs-cr1701fJ.js";import"./use-file-configs-CHDaFO85.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-Dm9zz_PI.js";import"./get-initials-D-f_fDFw.js";import"./select-model-BsGv2vyu.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-DXofXja-.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CkzzANKj.js";import"./toolbar-BWOWuYdi.js";import"./skill-preview-C-lpKGFK.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-C51iVTPN.js";import"./use-debounced-autosave-DS1yKwxh.js";import"./scroll-area-0nfzfnAs.js";import"./search-input-CIki-uxf.js";import"./use-mcp-auth-status-HMnG1EUf.js";import"./use-secrets--00GbFn8.js";import"./client-icons-C1w3IsHJ.js";import"./connect-layout-CrHWsBPn.js";import"./self-tool-result-BoZ6MFRP.js";import"./track-Qcawd54k.js";import"./use-tags-k_sYBsNz.js";import"./breadcrumb-CGLwazRA.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-Hqe9OUun.js";import"./site-error--i37Vnuw.js";import"./cards-De2Tofte.js";function at(V){return Array.isArray(V)?V.map(e=>({key:Q(e?.key),value:Q(e?.value)})):[]}function ni(V){const e=he.c(126),{orgSlug:s,virtualMcpId:d,branch:i,blockKey:o,block:p,decofile:l,meta:r,previewBaseUrl:c}=V,a=be(),m=Be()?.taskId??null;let x;e[0]!==i||e[1]!==s||e[2]!==d?(x={orgSlug:s,virtualMcpId:d,branch:i},e[0]=i,e[1]=s,e[2]=d,e[3]=x):x=e[3];const f=Ve(x);let u;e[4]!==i||e[5]!==r||e[6]!==s||e[7]!==d?(u={orgSlug:s,virtualMcpId:d,branch:i,meta:r},e[4]=i,e[5]=r,e[6]=s,e[7]=d,e[8]=u):u=e[8];const C=ze(u);let b;e[9]!==i||e[10]!==s||e[11]!==d?(b={orgSlug:s,virtualMcpId:d,branch:i},e[9]=i,e[10]=s,e[11]=d,e[12]=b):b=e[12];const g=Ue(b);let j;e[13]!==p?(j=Ye(p,"posts"),e[13]=p,e[14]=j):j=e[14];const k=j;let y;e[15]!==o||e[16]!==f?(y=G=>{f.mutate({blockKey:o,data:qe(o,"posts",Je(G))})},e[15]=o,e[16]=f,e[17]=y):y=e[17];const[n,S]=st(k,y);let z;e[18]!==n||e[19]!==S?(z=(G,h)=>S({...n,[G]:h}),e[18]=n,e[19]=S,e[20]=z):z=e[20];const P=z;let U;e[21]!==l||e[22]!==g||e[23]!==n||e[24]!==c?(U=Ze({decofile:l,post:n,previewBaseUrl:c,draftPointer:g}),e[21]=l,e[22]=g,e[23]=n,e[24]=c,e[25]=U):U=e[25];const N=U;let v,L,Y;e[26]!==n||e[27]!==a?(L=we(n),v=L.length>0,Y=L.length===1?a("sandbox.postEditor.missingFieldSingular",{fields:L.join(", ")}):a("sandbox.postEditor.missingFieldPlural",{fields:L.join(", ")}),e[26]=n,e[27]=a,e[28]=v,e[29]=L,e[30]=Y):(v=e[28],L=e[29],Y=e[30]);const w=Y;let F;e[31]!==n.title||e[32]!==a?(F=Q(n.title)||a("sandbox.postEditor.untitledPost"),e[31]=n.title,e[32]=a,e[33]=F):F=e[33];let T;e[34]!==F?(T=t.jsx("span",{className:"truncate text-sm font-medium",children:F}),e[34]=F,e[35]=T):T=e[35];let B;e[36]!==v||e[37]!==L||e[38]!==w||e[39]!==a?(B=v&&t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(Ie,{size:14}),L.length," ",L.length===1?a("sandbox.postEditor.issueSingular"):a("sandbox.postEditor.issuePlural")]})}),t.jsx(Ne,{side:"bottom",children:w})]}),e[36]=v,e[37]=L,e[38]=w,e[39]=a,e[40]=B):B=e[40];let I;e[41]!==f.isError||e[42]!==f.isPending?(I=t.jsx(He,{isPending:f.isPending,isError:f.isError}),e[41]=f.isError,e[42]=f.isPending,e[43]=I):I=e[43];const J=!N||v;let A;e[44]!==v||e[45]!==w||e[46]!==N||e[47]!==a?(A=v?w:a(N?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),e[44]=v,e[45]=w,e[46]=N,e[47]=a,e[48]=A):A=e[48];let R;e[49]!==v||e[50]!==N?(R=()=>{N&&!v&&window.open(N,"_blank","noopener,noreferrer")},e[49]=v,e[50]=N,e[51]=R):R=e[51];let H;e[52]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(Ae,{size:14}),e[52]=H):H=e[52];let D;e[53]!==a?(D=a("sandbox.postEditor.seePreview"),e[53]=a,e[54]=D):D=e[54];let $;e[55]!==J||e[56]!==A||e[57]!==R||e[58]!==D?($=t.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:J,title:A,onClick:R,children:[H,D]}),e[55]=J,e[56]=A,e[57]=R,e[58]=D,e[59]=$):$=e[59];let K;e[60]!==B||e[61]!==I||e[62]!==$?(K=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[B,I,$]}),e[60]=B,e[61]=I,e[62]=$,e[63]=K):K=e[63];let O;e[64]!==T||e[65]!==K?(O=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[T,K]}),e[64]=T,e[65]=K,e[66]=O):O=e[66];let _;e[67]!==n.title?(_=Q(n.title),e[67]=n.title,e[68]=_):_=e[68];let M;e[69]!==P?(M=G=>P("title",G),e[69]=P,e[70]=M):M=e[70];let q;e[71]!==a?(q=a("sandbox.postEditor.postTitlePlaceholder"),e[71]=a,e[72]=q):q=e[72];let E;e[73]!==_||e[74]!==M||e[75]!==q?(E=t.jsx(lt,{value:_,onChange:M,placeholder:q,className:"py-1 text-4xl font-bold text-foreground"}),e[73]=_,e[74]=M,e[75]=q,e[76]=E):E=e[76];let W;e[77]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx(Re,{}),e[77]=W):W=e[77];let X;e[78]!==a?(X=a("sandbox.postEditor.contentTab"),e[78]=a,e[79]=X):X=e[79];let Z;e[80]!==X?(Z=t.jsxs(je,{value:"content",children:[W,X]}),e[80]=X,e[81]=Z):Z=e[81];let me;e[82]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(De,{}),e[82]=me):me=e[82];let ee;e[83]!==a?(ee=a("sandbox.postEditor.settingsTab"),e[83]=a,e[84]=ee):ee=e[84];let te;e[85]!==ee?(te=t.jsxs(je,{value:"settings",children:[me,ee]}),e[85]=ee,e[86]=te):te=e[86];let se;e[87]!==Z||e[88]!==te?(se=t.jsxs(_e,{children:[Z,te]}),e[87]=Z,e[88]=te,e[89]=se):se=e[89];let le;e[90]!==n.sections?(le=et(n.sections),e[90]=n.sections,e[91]=le):le=e[91];let ie;e[92]!==P?(ie=G=>P("sections",G),e[92]=P,e[93]=ie):ie=e[93];let oe;e[94]!==i||e[95]!==s||e[96]!==m||e[97]!==d?(oe={orgSlug:s,virtualMcpId:d,branch:i,threadId:m},e[94]=i,e[95]=s,e[96]=m,e[97]=d,e[98]=oe):oe=e[98];let ae;e[99]!==a?(ae=a("sandbox.postEditor.noContentYet"),e[99]=a,e[100]=ae):ae=e[100];let re;e[101]!==r||e[102]!==le||e[103]!==ie||e[104]!==oe||e[105]!==ae?(re=t.jsx(ve,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(tt,{value:le,onChange:ie,meta:r,sandboxRef:oe,emptyMessage:ae})})}),e[101]=r,e[102]=le,e[103]=ie,e[104]=oe,e[105]=ae,e[106]=re):re=e[106];let ne;e[107]!==n||e[108]!==S?(ne=G=>S({...n,...G}),e[107]=n,e[108]=S,e[109]=ne):ne=e[109];let de;e[110]!==l||e[111]!==n||e[112]!==P||e[113]!==C||e[114]!==ne?(de=t.jsx(ve,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(rt,{post:n,decofile:l,support:C,onChange:P,onPatch:ne})})}),e[110]=l,e[111]=n,e[112]=P,e[113]=C,e[114]=ne,e[115]=de):de=e[115];let pe;e[116]!==se||e[117]!==re||e[118]!==de?(pe=t.jsxs(Me,{defaultValue:"content",className:"mt-6 gap-4",children:[se,re,de]}),e[116]=se,e[117]=re,e[118]=de,e[119]=pe):pe=e[119];let ce;e[120]!==E||e[121]!==pe?(ce=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:[E,pe]})}),e[120]=E,e[121]=pe,e[122]=ce):ce=e[122];let fe;return e[123]!==O||e[124]!==ce?(fe=t.jsxs("div",{className:"flex h-full flex-col",children:[O,ce]}),e[123]=O,e[124]=ce,e[125]=fe):fe=e[125],fe}function Ce(V){const e=he.c(18),{id:s,label:d,checked:i,blocked:o,blockedReason:p,className:l,onCheckedChange:r}=V;let c;e[0]!==s||e[1]!==d?(c=t.jsx(xe,{htmlFor:s,children:d}),e[0]=s,e[1]=d,e[2]=c):c=e[2];let a;e[3]!==o||e[4]!==i||e[5]!==l||e[6]!==s||e[7]!==r?(a=t.jsx(ke,{asChild:!0,children:t.jsx("span",{children:t.jsx(Se,{id:s,className:l,checked:i,disabled:o,onCheckedChange:r})})}),e[3]=o,e[4]=i,e[5]=l,e[6]=s,e[7]=r,e[8]=a):a=e[8];let m;e[9]!==o||e[10]!==p?(m=o&&t.jsx(Ne,{side:"bottom",children:p}),e[9]=o,e[10]=p,e[11]=m):m=e[11];let x;e[12]!==a||e[13]!==m?(x=t.jsxs(Pe,{children:[a,m]}),e[12]=a,e[13]=m,e[14]=x):x=e[14];let f;return e[15]!==c||e[16]!==x?(f=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c,x]}),e[15]=c,e[16]=x,e[17]=f):f=e[17],f}function rt(V){const e=he.c(142),{post:s,decofile:d,support:i,onChange:o,onPatch:p}=V,l=be();let r;e[0]!==i?(r=Ke(i),e[0]=i,e[1]=r):r=e[1];const c=r;let a;e[2]!==i?(a=Oe(i),e[2]=i,e[3]=a):a=e[3];const m=a;let x;e[4]!==s?(x=Ge(s),e[4]=s,e[5]=x):x=e[5];const f=x,u=m&&f==="scheduled";let C;if(e[6]!==s||e[7]!==l){const h=we(s);C=h.length===1?l("sandbox.postEditor.missingFieldSingular",{fields:h.join(", ")}):l("sandbox.postEditor.missingFieldPlural",{fields:h.join(", ")}),e[6]=s,e[7]=l,e[8]=C}else C=e[8];const b=C;let g;e[9]!==p||e[10]!==s?(g=h=>p(Xe(s,h,new Date)),e[9]=p,e[10]=s,e[11]=g):g=e[11];const j=g;let k;e[12]!==c||e[13]!==m||e[14]!==u||e[15]!==b||e[16]!==o||e[17]!==s||e[18]!==j||e[19]!==f||e[20]!==l?(k=c&&t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[m&&t.jsx(Ce,{id:"post-scheduled",label:l("sandbox.postEditor.schedulingLabel"),checked:u,blocked:Ee(s,"scheduled"),blockedReason:b,onCheckedChange:h=>j(h?"scheduled":"draft")}),u?t.jsx(ge,{schema:{type:"string",format:"date-time",title:l("sandbox.postEditor.scheduledDatetimeLabel"),description:l("sandbox.postEditor.scheduledDatetimeDescription")},value:Q(s.scheduledDatetime),onChange:h=>o("scheduledDatetime",h),path:"post-scheduled-datetime",label:l("sandbox.postEditor.scheduledDatetimeLabel")}):t.jsx(Ce,{id:"post-published",label:l("sandbox.postEditor.publishedLabel"),className:"data-[state=checked]:bg-success",checked:f==="published",blocked:Ee(s,"published"),blockedReason:b,onCheckedChange:h=>j(h?"published":"draft")})]}),e[12]=c,e[13]=m,e[14]=u,e[15]=b,e[16]=o,e[17]=s,e[18]=j,e[19]=f,e[20]=l,e[21]=k):k=e[21];let y;e[22]!==l?(y=l("sandbox.postEditor.excerptLabel"),e[22]=l,e[23]=y):y=e[23];let n;e[24]!==y?(n=t.jsx(xe,{htmlFor:"post-excerpt",children:y}),e[24]=y,e[25]=n):n=e[25];let S;e[26]!==s.excerpt?(S=Q(s.excerpt),e[26]=s.excerpt,e[27]=S):S=e[27];let z;e[28]!==o?(z=h=>o("excerpt",h.target.value),e[28]=o,e[29]=z):z=e[29];let P;e[30]!==z||e[31]!==S?(P=t.jsx(Le,{id:"post-excerpt",value:S,onChange:z,rows:2}),e[30]=z,e[31]=S,e[32]=P):P=e[32];let U;e[33]!==P||e[34]!==n?(U=t.jsxs("div",{className:"space-y-2",children:[n,P]}),e[33]=P,e[34]=n,e[35]=U):U=e[35];let N;e[36]!==l?(N=l("sandbox.postEditor.slugLabel"),e[36]=l,e[37]=N):N=e[37];let v;e[38]!==N?(v=t.jsx(xe,{htmlFor:"post-slug",children:N}),e[38]=N,e[39]=v):v=e[39];let L;e[40]!==s.slug?(L=Q(s.slug),e[40]=s.slug,e[41]=L):L=e[41];let Y;e[42]!==o?(Y=h=>o("slug",h.target.value),e[42]=o,e[43]=Y):Y=e[43];let w;e[44]!==l?(w=l("sandbox.postEditor.slugPlaceholder"),e[44]=l,e[45]=w):w=e[45];let F;e[46]!==L||e[47]!==Y||e[48]!==w?(F=t.jsx(ue,{id:"post-slug",value:L,onChange:Y,placeholder:w,className:"h-10"}),e[46]=L,e[47]=Y,e[48]=w,e[49]=F):F=e[49];let T;e[50]!==v||e[51]!==F?(T=t.jsxs("div",{className:"space-y-2",children:[v,F]}),e[50]=v,e[51]=F,e[52]=T):T=e[52];let B;e[53]!==l?(B=l("sandbox.postEditor.dateLabel"),e[53]=l,e[54]=B):B=e[54];let I;e[55]!==B?(I={type:"string",format:"date",title:B},e[55]=B,e[56]=I):I=e[56];let J;e[57]!==s.date?(J=Q(s.date),e[57]=s.date,e[58]=J):J=e[58];let A;e[59]!==o?(A=h=>o("date",h),e[59]=o,e[60]=A):A=e[60];let R;e[61]!==l?(R=l("sandbox.postEditor.dateLabel"),e[61]=l,e[62]=R):R=e[62];let H;e[63]!==I||e[64]!==J||e[65]!==A||e[66]!==R?(H=t.jsx(ge,{schema:I,value:J,onChange:A,path:"post-date",label:R}),e[63]=I,e[64]=J,e[65]=A,e[66]=R,e[67]=H):H=e[67];let D;e[68]!==T||e[69]!==H?(D=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T,H]}),e[68]=T,e[69]=H,e[70]=D):D=e[70];let $;e[71]!==l?($=l("sandbox.postEditor.coverImageLabel"),e[71]=l,e[72]=$):$=e[72];let K;e[73]!==$?(K={type:"string",format:"image-uri",title:$},e[73]=$,e[74]=K):K=e[74];const O=s.image;let _;e[75]!==o?(_=h=>o("image",h),e[75]=o,e[76]=_):_=e[76];let M;e[77]!==l?(M=l("sandbox.postEditor.coverImageLabel"),e[77]=l,e[78]=M):M=e[78];let q;e[79]!==s.image||e[80]!==K||e[81]!==_||e[82]!==M?(q=t.jsx(Fe,{schema:K,value:O,onChange:_,path:"post-image",label:M}),e[79]=s.image,e[80]=K,e[81]=_,e[82]=M,e[83]=q):q=e[83];let E;e[84]!==l?(E=l("sandbox.postEditor.coverAltLabel"),e[84]=l,e[85]=E):E=e[85];let W;e[86]!==l?(W=l("sandbox.postEditor.coverAltDescription"),e[86]=l,e[87]=W):W=e[87];let X;e[88]!==E||e[89]!==W?(X={type:"string",title:E,description:W},e[88]=E,e[89]=W,e[90]=X):X=e[90];let Z;e[91]!==s.alt?(Z=Q(s.alt),e[91]=s.alt,e[92]=Z):Z=e[92];let me;e[93]!==o?(me=h=>o("alt",h),e[93]=o,e[94]=me):me=e[94];let ee;e[95]!==l?(ee=l("sandbox.postEditor.coverAltLabel"),e[95]=l,e[96]=ee):ee=e[96];let te;e[97]!==X||e[98]!==Z||e[99]!==me||e[100]!==ee?(te=t.jsx(ge,{schema:X,value:Z,onChange:me,path:"post-alt",label:ee}),e[97]=X,e[98]=Z,e[99]=me,e[100]=ee,e[101]=te):te=e[101];let se;e[102]!==q||e[103]!==te?(se=t.jsxs("div",{className:"space-y-2",children:[q,te]}),e[102]=q,e[103]=te,e[104]=se):se=e[104];let le;e[105]!==l?(le=l("sandbox.postEditor.authorsLabel"),e[105]=l,e[106]=le):le=e[106];let ie;e[107]!==o?(ie=h=>o("authors",h),e[107]=o,e[108]=ie):ie=e[108];let oe;e[109]!==d||e[110]!==s.authors||e[111]!==le||e[112]!==ie?(oe=t.jsx(ye,{label:le,decofile:d,kind:"authors",valueField:"email",toRef:dt,selected:s.authors,onChange:ie}),e[109]=d,e[110]=s.authors,e[111]=le,e[112]=ie,e[113]=oe):oe=e[113];let ae;e[114]!==l?(ae=l("sandbox.postEditor.categoriesLabel"),e[114]=l,e[115]=ae):ae=e[115];let re;e[116]!==o?(re=h=>o("categories",h),e[116]=o,e[117]=re):re=e[117];let ne;e[118]!==d||e[119]!==s.categories||e[120]!==ae||e[121]!==re?(ne=t.jsx(ye,{label:ae,decofile:d,kind:"categories",valueField:"slug",toRef:nt,selected:s.categories,onChange:re}),e[118]=d,e[119]=s.categories,e[120]=ae,e[121]=re,e[122]=ne):ne=e[122];let de;e[123]!==o?(de=h=>o("extraProps",h),e[123]=o,e[124]=de):de=e[124];let pe;e[125]!==s.extraProps||e[126]!==de?(pe=t.jsx(ct,{value:s.extraProps,onChange:de}),e[125]=s.extraProps,e[126]=de,e[127]=pe):pe=e[127];let ce;e[128]!==o?(ce=h=>o("seo",h),e[128]=o,e[129]=ce):ce=e[129];let fe;e[130]!==s.seo||e[131]!==ce?(fe=t.jsx(pt,{value:s.seo,onChange:ce}),e[130]=s.seo,e[131]=ce,e[132]=fe):fe=e[132];let G;return e[133]!==U||e[134]!==D||e[135]!==se||e[136]!==oe||e[137]!==ne||e[138]!==pe||e[139]!==fe||e[140]!==k?(G=t.jsxs("div",{className:"space-y-5",children:[k,U,D,se,oe,ne,pe,fe]}),e[133]=U,e[134]=D,e[135]=se,e[136]=oe,e[137]=ne,e[138]=pe,e[139]=fe,e[140]=k,e[141]=G):G=e[141],G}function nt(V){return{name:Q(V.name),slug:Q(V.slug)}}function dt(V){return{...V}}function pt(V){const e=he.c(93),{value:s,onChange:d}=V,i=be();let o;e[0]!==s?(o=s&&typeof s=="object"&&!Array.isArray(s)?s:{},e[0]=s,e[1]=o):o=e[1];const p=o;let l;e[2]!==d||e[3]!==p?(l=(E,W)=>d({...p,[E]:W}),e[2]=d,e[3]=p,e[4]=l):l=e[4];const r=l;let c;e[5]!==i?(c=i("sandbox.postEditor.seoSectionLabel"),e[5]=i,e[6]=c):c=e[6];let a;e[7]!==c?(a=t.jsx("p",{className:"text-sm font-medium",children:c}),e[7]=c,e[8]=a):a=e[8];let m;e[9]!==i?(m=i("sandbox.postEditor.seoSectionHint"),e[9]=i,e[10]=m):m=e[10];let x;e[11]!==m?(x=t.jsx("p",{className:"text-xs text-muted-foreground",children:m}),e[11]=m,e[12]=x):x=e[12];let f;e[13]!==a||e[14]!==x?(f=t.jsxs("div",{className:"space-y-1",children:[a,x]}),e[13]=a,e[14]=x,e[15]=f):f=e[15];let u;e[16]!==i?(u=i("sandbox.postEditor.seoTitleLabel"),e[16]=i,e[17]=u):u=e[17];let C;e[18]!==u?(C=t.jsx(xe,{htmlFor:"post-seo-title",children:u}),e[18]=u,e[19]=C):C=e[19];let b;e[20]!==p.title?(b=Q(p.title),e[20]=p.title,e[21]=b):b=e[21];let g;e[22]!==r?(g=E=>r("title",E.target.value),e[22]=r,e[23]=g):g=e[23];let j;e[24]!==b||e[25]!==g?(j=t.jsx(ue,{id:"post-seo-title",value:b,onChange:g,className:"h-10"}),e[24]=b,e[25]=g,e[26]=j):j=e[26];let k;e[27]!==j||e[28]!==C?(k=t.jsxs("div",{className:"space-y-2",children:[C,j]}),e[27]=j,e[28]=C,e[29]=k):k=e[29];let y;e[30]!==i?(y=i("sandbox.postEditor.seoDescriptionLabel"),e[30]=i,e[31]=y):y=e[31];let n;e[32]!==y?(n=t.jsx(xe,{htmlFor:"post-seo-description",children:y}),e[32]=y,e[33]=n):n=e[33];let S;e[34]!==p.description?(S=Q(p.description),e[34]=p.description,e[35]=S):S=e[35];let z;e[36]!==r?(z=E=>r("description",E.target.value),e[36]=r,e[37]=z):z=e[37];let P;e[38]!==S||e[39]!==z?(P=t.jsx(Le,{id:"post-seo-description",value:S,onChange:z,rows:2}),e[38]=S,e[39]=z,e[40]=P):P=e[40];let U;e[41]!==n||e[42]!==P?(U=t.jsxs("div",{className:"space-y-2",children:[n,P]}),e[41]=n,e[42]=P,e[43]=U):U=e[43];let N;e[44]!==i?(N=i("sandbox.postEditor.seoImageLabel"),e[44]=i,e[45]=N):N=e[45];let v;e[46]!==N?(v={type:"string",format:"image-uri",title:N},e[46]=N,e[47]=v):v=e[47];const L=p.image;let Y;e[48]!==r?(Y=E=>r("image",E),e[48]=r,e[49]=Y):Y=e[49];let w;e[50]!==i?(w=i("sandbox.postEditor.seoImageLabel"),e[50]=i,e[51]=w):w=e[51];let F;e[52]!==p.image||e[53]!==v||e[54]!==Y||e[55]!==w?(F=t.jsx(Fe,{schema:v,value:L,onChange:Y,path:"post-seo-image",label:w}),e[52]=p.image,e[53]=v,e[54]=Y,e[55]=w,e[56]=F):F=e[56];let T;e[57]!==i?(T=i("sandbox.postEditor.seoCanonicalLabel"),e[57]=i,e[58]=T):T=e[58];let B;e[59]!==T?(B=t.jsx(xe,{htmlFor:"post-seo-canonical",children:T}),e[59]=T,e[60]=B):B=e[60];let I;e[61]!==p.canonical?(I=Q(p.canonical),e[61]=p.canonical,e[62]=I):I=e[62];let J;e[63]!==r?(J=E=>r("canonical",E.target.value),e[63]=r,e[64]=J):J=e[64];let A;e[65]!==i?(A=i("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=i,e[66]=A):A=e[66];let R;e[67]!==I||e[68]!==J||e[69]!==A?(R=t.jsx(ue,{id:"post-seo-canonical",value:I,onChange:J,placeholder:A,className:"h-10"}),e[67]=I,e[68]=J,e[69]=A,e[70]=R):R=e[70];let H;e[71]!==B||e[72]!==R?(H=t.jsxs("div",{className:"space-y-2",children:[B,R]}),e[71]=B,e[72]=R,e[73]=H):H=e[73];let D;e[74]!==i?(D=i("sandbox.postEditor.seoNoIndexingLabel"),e[74]=i,e[75]=D):D=e[75];let $;e[76]!==D?($=t.jsx(xe,{htmlFor:"post-seo-no-indexing",children:D}),e[76]=D,e[77]=$):$=e[77];const K=p.noIndexing===!0;let O;e[78]!==r?(O=E=>r("noIndexing",E),e[78]=r,e[79]=O):O=e[79];let _;e[80]!==K||e[81]!==O?(_=t.jsx(Se,{id:"post-seo-no-indexing",checked:K,onCheckedChange:O}),e[80]=K,e[81]=O,e[82]=_):_=e[82];let M;e[83]!==$||e[84]!==_?(M=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[$,_]}),e[83]=$,e[84]=_,e[85]=M):M=e[85];let q;return e[86]!==k||e[87]!==U||e[88]!==F||e[89]!==H||e[90]!==M||e[91]!==f?(q=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[f,k,U,F,H,M]}),e[86]=k,e[87]=U,e[88]=F,e[89]=H,e[90]=M,e[91]=f,e[92]=q):q=e[92],q}function ct(V){const e=he.c(24),{value:s,onChange:d}=V,i=be();let o,p,l,r;if(e[0]!==d||e[1]!==i||e[2]!==s){o=at(s);const f=(C,b)=>d(o.map((g,j)=>j===C?{...g,...b}:g));p="space-y-2";let u;e[7]!==i?(u=i("sandbox.postEditor.extraPropsLabel"),e[7]=i,e[8]=u):u=e[8],e[9]!==u?(l=t.jsx(xe,{children:u}),e[9]=u,e[10]=l):l=e[10],r=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((C,b)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(ue,{value:C.key,onChange:g=>f(b,{key:g.target.value}),placeholder:i("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(ue,{value:C.value,onChange:g=>f(b,{value:g.target.value}),placeholder:i("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(it,{label:i("sandbox.postEditor.removePropLabel"),onClick:()=>d(o.filter((g,j)=>j!==b))})]},b))}),e[0]=d,e[1]=i,e[2]=s,e[3]=o,e[4]=p,e[5]=l,e[6]=r}else o=e[3],p=e[4],l=e[5],r=e[6];let c;e[11]!==i?(c=i("sandbox.postEditor.addPropLabel"),e[11]=i,e[12]=c):c=e[12];let a;e[13]!==o||e[14]!==d?(a=()=>d([...o,{key:"",value:""}]),e[13]=o,e[14]=d,e[15]=a):a=e[15];let m;e[16]!==c||e[17]!==a?(m=t.jsx(ot,{label:c,onClick:a}),e[16]=c,e[17]=a,e[18]=m):m=e[18];let x;return e[19]!==p||e[20]!==l||e[21]!==r||e[22]!==m?(x=t.jsxs("div",{className:p,children:[l,r,m]}),e[19]=p,e[20]=l,e[21]=r,e[22]=m,e[23]=x):x=e[23],x}function ye(V){const e=he.c(24),{label:s,decofile:d,kind:i,valueField:o,toRef:p,selected:l,onChange:r}=V,c=be();let a;e[0]!==d||e[1]!==i||e[2]!==l||e[3]!==p||e[4]!==o?(a=Qe({records:We(d,i),selected:l,valueField:o,toRef:p}),e[0]=d,e[1]=i,e[2]=l,e[3]=p,e[4]=o,e[5]=a):a=e[5];const{options:m,selectedValues:x,refsForValues:f}=a;let u;e[6]!==i||e[7]!==c?(u=c(i==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=i,e[7]=c,e[8]=u):u=e[8];const C=u;let b;e[9]!==i||e[10]!==c?(b=c(i==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=i,e[10]=c,e[11]=b):b=e[11];const g=b;let j;e[12]!==s?(j=t.jsx(xe,{children:s}),e[12]=s,e[13]=j):j=e[13];let k;e[14]!==C||e[15]!==r||e[16]!==m||e[17]!==f||e[18]!==g||e[19]!==x?(k=m.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:C}):t.jsx($e,{options:m,defaultValue:x,onValueChange:n=>r(f(n)),placeholder:g,maxCount:4}),e[14]=C,e[15]=r,e[16]=m,e[17]=f,e[18]=g,e[19]=x,e[20]=k):k=e[20];let y;return e[21]!==j||e[22]!==k?(y=t.jsxs("div",{className:"space-y-2",children:[j,k]}),e[21]=j,e[22]=k,e[23]=y):y=e[23],y}export{ni as PostEditor};
1
+ import{c as he,b as be,j as t,a4 as Pe,a1 as ke,a2 as Ne,B as Te}from"./index-CNfEIUn0.js";import{b as Be}from"./chat-context-CALwiBF_.js";import{i as Ie}from"./AlertCircle-B02pIqyO.js";import{n as Ae}from"./LinkExternal01-CBhAp9XW.js";import{bj as Re,p as De}from"./agent-icon-Cm-rraMc.js";import{I as ue}from"./input-CxZ-2GPj.js";import{L as xe}from"./label-BBk0UNMj.js";import{M as $e}from"./multi-select-D8btj7Ad.js";import{b as je,c as _e,T as ve,a as Me}from"./tabs-iA_HLM1O.js";import{S as Se}from"./switch-C3EYj7hN.js";import{T as Le}from"./textarea-BsDleKsG.js";import{e as Ve,t as ze,v as Ue,w as Ye,x as we,j as He,y as qe,z as Je,A as Ke,B as Oe,C as Ge,D as Ee,E as ge,F as Qe,H as We,I as Xe,J as Fe}from"./index-BoFDLZ6p.js";import{b as Ze,a as et,B as tt}from"./block-document-CHDLnJJB.js";import{u as st}from"./use-autosave-B8HtQ_kf.js";import{s as Q,E as lt,R as it,A as ot}from"./primitives-wsknTEcb.js";import"./use-panel-navigate-CypROp-b.js";import"./use-destination-route-2_Kd2h4X.js";import"./hooks-CV5SIncY.js";import"./constants-DNuUCxmW.js";import"./use-mcp-client-CgA8PWhj.js";import"./auth-BfPf7zhg.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BDzoef2l.js";import"./task-board-Cw4I7XsI.js";import"./schema-DO9s-3_3.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-XPauNnS5.js";import"./use-ai-providers-DfC2UWvW.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-jW8Ieour.js";import"./use-organization-settings-BRf1OrEm.js";import"./Tool01-DpeMCocB.js";import"./ArrowUp-CQ6SET-t.js";import"./ArrowLeft-DzuSLuVr.js";import"./Tool02-DMSvrhPC.js";import"./XCircle-DC63K01N.js";import"./TrendUp01-DBKvZ-DZ.js";import"./ZoomOut-Du-2I-dz.js";import"./Users03-BTZsMKrW.js";import"./CheckCircle-Bs1i8n8R.js";import"./Check-CnxYOeJk.js";import"./ChevronUp-CDlju1TC.js";import"./ChevronRight-Bo_7PLYL.js";import"./ChevronSelectorVertical-BWdGiimP.js";import"./DotsVertical-DRP3CifW.js";import"./UserSquare-jm1EvWHs.js";import"./Copy01-D5Ill_kE.js";import"./CreditCard01-NbxHy6Lv.js";import"./Download01-DoUNzBPU.js";import"./Settings02-C0EhiTe4.js";import"./Eye-COu8umtC.js";import"./Share07-Cp3sAWWN.js";import"./GitBranch01-idBGys5s.js";import"./Globe01-CtD7u0-k.js";import"./XClose-VJXgkRtY.js";import"./HardDrive-BVnECxVe.js";import"./Image01-Cy8ZoIiy.js";import"./Key01-DoBw9G0M.js";import"./Link01-u2EoXuNT.js";import"./Monitor01-DmqpK-8S.js";import"./Sun-e_DnDd3f.js";import"./Package-CcAuJGku.js";import"./Palette-BOxVbiJL.js";import"./Play-DG2731JJ.js";import"./Plus-npiI5-7X.js";import"./SearchMd-DM9iwGft.js";import"./Shield01-B0ob1ipu.js";import"./Stars01-BgKhcopx.js";import"./Trash01-C64jvZUr.js";import"./Upload01-CZcQRY37.js";import"./User01-DvzdeHqd.js";import"./Users01-HKHLFhfO.js";import"./Zap-Buyt_ZmJ.js";import"./badge-FcNiwbMm.js";import"./checkbox-BmYwx8kR.js";import"./command-BYns7CwK.js";import"./index-BraqwIq2.js";import"./dialog-C9fBgi3G.js";import"./popover-CxFVXm-T.js";import"./automation-runs-CkSYrEGR.js";import"./useInfiniteQuery-D4DO3KqU.js";import"./use-infinite-scroll-Br6HoOld.js";import"./use-connection-DNt4swpy.js";import"./table-DEic8MLd.js";import"./empty-state-S-1xJrE6.js";import"./use-members-4CiFzvQG.js";import"./use-org-auth-client-B2H7C6Ln.js";import"./use-automations-4iFK5nkE.js";import"./useSuspenseInfiniteQuery-Ccvsai-C.js";import"./avatar-DVuZ2F_T.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BXRFLn2M.js";import"./markdown-CBbWAQAJ.js";import"./monaco-editor-DazsPMf1.js";import"./editor-BjHf7-wi.js";import"./types-BXQK2N0O.js";import"./shell-layout-zuPHJJxr.js";import"./download-app-dialog-B6fQdqDO.js";import"./project-icon-Da5qBAn7.js";import"./github-repo-COLY3wWI.js";import"./required-auth-layout-BH79UCBF.js";import"./use-org-sso-CYEN5nc1.js";import"./integration-icon-BRZ0l9mu.js";import"./use-navigate-to-agent-BhLZN4vX.js";import"./use-mcp-prompts-CG2uZJ9H.js";import"./form-BXpGp03G.js";import"./file-type-icon-CzKQjLvK.js";import"./drawer-OLnwjI2K.js";import"./collection-search-BvGAgDld.js";import"./select-D5c8Otgi.js";import"./toggle-group-CTRGHvcL.js";import"./task-route-C2MKBcLF.js";import"./toolbar-icon-button-BJhOiNGi.js";import"./github-repo-picker-Bo27g0p4.js";import"./use-debounced-value-Df4IN6g1.js";import"./authenticate-and-persist-oauth-hh7nuAWR.js";import"./mcp-oauth-BTxNcy48.js";import"./extract-connection-data-CDeabBWK.js";import"./metadata-dUsYcpuu.js";import"./connection-CXkee5u6.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-CWUJLExI.js";import"./use-registry-connections-C524bvTW.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-D7wCXBEQ.js";import"./collection-tabs-Cd4Vv0EE.js";import"./use-file-configs-CNLxYc3F.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-tC5c5wq-.js";import"./get-initials-D-f_fDFw.js";import"./select-model-B4IX9QyY.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-CA44zIJR.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-v0k0tR6A.js";import"./toolbar-RiMn7tp7.js";import"./skill-preview-Cds7l0IB.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-EueylpK5.js";import"./use-debounced-autosave-BzJT5pgf.js";import"./scroll-area-Bga4xYk7.js";import"./search-input-CNFZM5Ki.js";import"./use-mcp-auth-status-B8KMbW6d.js";import"./use-secrets-DJHtvR4D.js";import"./client-icons-CxvuXLIW.js";import"./connect-layout-U7Ps2Adr.js";import"./self-tool-result-PbyB4K2F.js";import"./track-DeADh2iG.js";import"./use-tags-gMOyjsIi.js";import"./breadcrumb-CWoWChjJ.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-B7bEWOhz.js";import"./site-error--i37Vnuw.js";import"./cards-Ta4bCObM.js";function at(V){return Array.isArray(V)?V.map(e=>({key:Q(e?.key),value:Q(e?.value)})):[]}function ni(V){const e=he.c(126),{orgSlug:s,virtualMcpId:d,branch:i,blockKey:o,block:p,decofile:l,meta:r,previewBaseUrl:c}=V,a=be(),m=Be()?.taskId??null;let x;e[0]!==i||e[1]!==s||e[2]!==d?(x={orgSlug:s,virtualMcpId:d,branch:i},e[0]=i,e[1]=s,e[2]=d,e[3]=x):x=e[3];const f=Ve(x);let u;e[4]!==i||e[5]!==r||e[6]!==s||e[7]!==d?(u={orgSlug:s,virtualMcpId:d,branch:i,meta:r},e[4]=i,e[5]=r,e[6]=s,e[7]=d,e[8]=u):u=e[8];const C=ze(u);let b;e[9]!==i||e[10]!==s||e[11]!==d?(b={orgSlug:s,virtualMcpId:d,branch:i},e[9]=i,e[10]=s,e[11]=d,e[12]=b):b=e[12];const g=Ue(b);let j;e[13]!==p?(j=Ye(p,"posts"),e[13]=p,e[14]=j):j=e[14];const k=j;let y;e[15]!==o||e[16]!==f?(y=G=>{f.mutate({blockKey:o,data:qe(o,"posts",Je(G))})},e[15]=o,e[16]=f,e[17]=y):y=e[17];const[n,S]=st(k,y);let z;e[18]!==n||e[19]!==S?(z=(G,h)=>S({...n,[G]:h}),e[18]=n,e[19]=S,e[20]=z):z=e[20];const P=z;let U;e[21]!==l||e[22]!==g||e[23]!==n||e[24]!==c?(U=Ze({decofile:l,post:n,previewBaseUrl:c,draftPointer:g}),e[21]=l,e[22]=g,e[23]=n,e[24]=c,e[25]=U):U=e[25];const N=U;let v,L,Y;e[26]!==n||e[27]!==a?(L=we(n),v=L.length>0,Y=L.length===1?a("sandbox.postEditor.missingFieldSingular",{fields:L.join(", ")}):a("sandbox.postEditor.missingFieldPlural",{fields:L.join(", ")}),e[26]=n,e[27]=a,e[28]=v,e[29]=L,e[30]=Y):(v=e[28],L=e[29],Y=e[30]);const w=Y;let F;e[31]!==n.title||e[32]!==a?(F=Q(n.title)||a("sandbox.postEditor.untitledPost"),e[31]=n.title,e[32]=a,e[33]=F):F=e[33];let T;e[34]!==F?(T=t.jsx("span",{className:"truncate text-sm font-medium",children:F}),e[34]=F,e[35]=T):T=e[35];let B;e[36]!==v||e[37]!==L||e[38]!==w||e[39]!==a?(B=v&&t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(Ie,{size:14}),L.length," ",L.length===1?a("sandbox.postEditor.issueSingular"):a("sandbox.postEditor.issuePlural")]})}),t.jsx(Ne,{side:"bottom",children:w})]}),e[36]=v,e[37]=L,e[38]=w,e[39]=a,e[40]=B):B=e[40];let I;e[41]!==f.isError||e[42]!==f.isPending?(I=t.jsx(He,{isPending:f.isPending,isError:f.isError}),e[41]=f.isError,e[42]=f.isPending,e[43]=I):I=e[43];const J=!N||v;let A;e[44]!==v||e[45]!==w||e[46]!==N||e[47]!==a?(A=v?w:a(N?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),e[44]=v,e[45]=w,e[46]=N,e[47]=a,e[48]=A):A=e[48];let R;e[49]!==v||e[50]!==N?(R=()=>{N&&!v&&window.open(N,"_blank","noopener,noreferrer")},e[49]=v,e[50]=N,e[51]=R):R=e[51];let H;e[52]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(Ae,{size:14}),e[52]=H):H=e[52];let D;e[53]!==a?(D=a("sandbox.postEditor.seePreview"),e[53]=a,e[54]=D):D=e[54];let $;e[55]!==J||e[56]!==A||e[57]!==R||e[58]!==D?($=t.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:J,title:A,onClick:R,children:[H,D]}),e[55]=J,e[56]=A,e[57]=R,e[58]=D,e[59]=$):$=e[59];let K;e[60]!==B||e[61]!==I||e[62]!==$?(K=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[B,I,$]}),e[60]=B,e[61]=I,e[62]=$,e[63]=K):K=e[63];let O;e[64]!==T||e[65]!==K?(O=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[T,K]}),e[64]=T,e[65]=K,e[66]=O):O=e[66];let _;e[67]!==n.title?(_=Q(n.title),e[67]=n.title,e[68]=_):_=e[68];let M;e[69]!==P?(M=G=>P("title",G),e[69]=P,e[70]=M):M=e[70];let q;e[71]!==a?(q=a("sandbox.postEditor.postTitlePlaceholder"),e[71]=a,e[72]=q):q=e[72];let E;e[73]!==_||e[74]!==M||e[75]!==q?(E=t.jsx(lt,{value:_,onChange:M,placeholder:q,className:"py-1 text-4xl font-bold text-foreground"}),e[73]=_,e[74]=M,e[75]=q,e[76]=E):E=e[76];let W;e[77]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx(Re,{}),e[77]=W):W=e[77];let X;e[78]!==a?(X=a("sandbox.postEditor.contentTab"),e[78]=a,e[79]=X):X=e[79];let Z;e[80]!==X?(Z=t.jsxs(je,{value:"content",children:[W,X]}),e[80]=X,e[81]=Z):Z=e[81];let me;e[82]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(De,{}),e[82]=me):me=e[82];let ee;e[83]!==a?(ee=a("sandbox.postEditor.settingsTab"),e[83]=a,e[84]=ee):ee=e[84];let te;e[85]!==ee?(te=t.jsxs(je,{value:"settings",children:[me,ee]}),e[85]=ee,e[86]=te):te=e[86];let se;e[87]!==Z||e[88]!==te?(se=t.jsxs(_e,{children:[Z,te]}),e[87]=Z,e[88]=te,e[89]=se):se=e[89];let le;e[90]!==n.sections?(le=et(n.sections),e[90]=n.sections,e[91]=le):le=e[91];let ie;e[92]!==P?(ie=G=>P("sections",G),e[92]=P,e[93]=ie):ie=e[93];let oe;e[94]!==i||e[95]!==s||e[96]!==m||e[97]!==d?(oe={orgSlug:s,virtualMcpId:d,branch:i,threadId:m},e[94]=i,e[95]=s,e[96]=m,e[97]=d,e[98]=oe):oe=e[98];let ae;e[99]!==a?(ae=a("sandbox.postEditor.noContentYet"),e[99]=a,e[100]=ae):ae=e[100];let re;e[101]!==r||e[102]!==le||e[103]!==ie||e[104]!==oe||e[105]!==ae?(re=t.jsx(ve,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(tt,{value:le,onChange:ie,meta:r,sandboxRef:oe,emptyMessage:ae})})}),e[101]=r,e[102]=le,e[103]=ie,e[104]=oe,e[105]=ae,e[106]=re):re=e[106];let ne;e[107]!==n||e[108]!==S?(ne=G=>S({...n,...G}),e[107]=n,e[108]=S,e[109]=ne):ne=e[109];let de;e[110]!==l||e[111]!==n||e[112]!==P||e[113]!==C||e[114]!==ne?(de=t.jsx(ve,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(rt,{post:n,decofile:l,support:C,onChange:P,onPatch:ne})})}),e[110]=l,e[111]=n,e[112]=P,e[113]=C,e[114]=ne,e[115]=de):de=e[115];let pe;e[116]!==se||e[117]!==re||e[118]!==de?(pe=t.jsxs(Me,{defaultValue:"content",className:"mt-6 gap-4",children:[se,re,de]}),e[116]=se,e[117]=re,e[118]=de,e[119]=pe):pe=e[119];let ce;e[120]!==E||e[121]!==pe?(ce=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:[E,pe]})}),e[120]=E,e[121]=pe,e[122]=ce):ce=e[122];let fe;return e[123]!==O||e[124]!==ce?(fe=t.jsxs("div",{className:"flex h-full flex-col",children:[O,ce]}),e[123]=O,e[124]=ce,e[125]=fe):fe=e[125],fe}function Ce(V){const e=he.c(18),{id:s,label:d,checked:i,blocked:o,blockedReason:p,className:l,onCheckedChange:r}=V;let c;e[0]!==s||e[1]!==d?(c=t.jsx(xe,{htmlFor:s,children:d}),e[0]=s,e[1]=d,e[2]=c):c=e[2];let a;e[3]!==o||e[4]!==i||e[5]!==l||e[6]!==s||e[7]!==r?(a=t.jsx(ke,{asChild:!0,children:t.jsx("span",{children:t.jsx(Se,{id:s,className:l,checked:i,disabled:o,onCheckedChange:r})})}),e[3]=o,e[4]=i,e[5]=l,e[6]=s,e[7]=r,e[8]=a):a=e[8];let m;e[9]!==o||e[10]!==p?(m=o&&t.jsx(Ne,{side:"bottom",children:p}),e[9]=o,e[10]=p,e[11]=m):m=e[11];let x;e[12]!==a||e[13]!==m?(x=t.jsxs(Pe,{children:[a,m]}),e[12]=a,e[13]=m,e[14]=x):x=e[14];let f;return e[15]!==c||e[16]!==x?(f=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c,x]}),e[15]=c,e[16]=x,e[17]=f):f=e[17],f}function rt(V){const e=he.c(142),{post:s,decofile:d,support:i,onChange:o,onPatch:p}=V,l=be();let r;e[0]!==i?(r=Ke(i),e[0]=i,e[1]=r):r=e[1];const c=r;let a;e[2]!==i?(a=Oe(i),e[2]=i,e[3]=a):a=e[3];const m=a;let x;e[4]!==s?(x=Ge(s),e[4]=s,e[5]=x):x=e[5];const f=x,u=m&&f==="scheduled";let C;if(e[6]!==s||e[7]!==l){const h=we(s);C=h.length===1?l("sandbox.postEditor.missingFieldSingular",{fields:h.join(", ")}):l("sandbox.postEditor.missingFieldPlural",{fields:h.join(", ")}),e[6]=s,e[7]=l,e[8]=C}else C=e[8];const b=C;let g;e[9]!==p||e[10]!==s?(g=h=>p(Xe(s,h,new Date)),e[9]=p,e[10]=s,e[11]=g):g=e[11];const j=g;let k;e[12]!==c||e[13]!==m||e[14]!==u||e[15]!==b||e[16]!==o||e[17]!==s||e[18]!==j||e[19]!==f||e[20]!==l?(k=c&&t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[m&&t.jsx(Ce,{id:"post-scheduled",label:l("sandbox.postEditor.schedulingLabel"),checked:u,blocked:Ee(s,"scheduled"),blockedReason:b,onCheckedChange:h=>j(h?"scheduled":"draft")}),u?t.jsx(ge,{schema:{type:"string",format:"date-time",title:l("sandbox.postEditor.scheduledDatetimeLabel"),description:l("sandbox.postEditor.scheduledDatetimeDescription")},value:Q(s.scheduledDatetime),onChange:h=>o("scheduledDatetime",h),path:"post-scheduled-datetime",label:l("sandbox.postEditor.scheduledDatetimeLabel")}):t.jsx(Ce,{id:"post-published",label:l("sandbox.postEditor.publishedLabel"),className:"data-[state=checked]:bg-success",checked:f==="published",blocked:Ee(s,"published"),blockedReason:b,onCheckedChange:h=>j(h?"published":"draft")})]}),e[12]=c,e[13]=m,e[14]=u,e[15]=b,e[16]=o,e[17]=s,e[18]=j,e[19]=f,e[20]=l,e[21]=k):k=e[21];let y;e[22]!==l?(y=l("sandbox.postEditor.excerptLabel"),e[22]=l,e[23]=y):y=e[23];let n;e[24]!==y?(n=t.jsx(xe,{htmlFor:"post-excerpt",children:y}),e[24]=y,e[25]=n):n=e[25];let S;e[26]!==s.excerpt?(S=Q(s.excerpt),e[26]=s.excerpt,e[27]=S):S=e[27];let z;e[28]!==o?(z=h=>o("excerpt",h.target.value),e[28]=o,e[29]=z):z=e[29];let P;e[30]!==z||e[31]!==S?(P=t.jsx(Le,{id:"post-excerpt",value:S,onChange:z,rows:2}),e[30]=z,e[31]=S,e[32]=P):P=e[32];let U;e[33]!==P||e[34]!==n?(U=t.jsxs("div",{className:"space-y-2",children:[n,P]}),e[33]=P,e[34]=n,e[35]=U):U=e[35];let N;e[36]!==l?(N=l("sandbox.postEditor.slugLabel"),e[36]=l,e[37]=N):N=e[37];let v;e[38]!==N?(v=t.jsx(xe,{htmlFor:"post-slug",children:N}),e[38]=N,e[39]=v):v=e[39];let L;e[40]!==s.slug?(L=Q(s.slug),e[40]=s.slug,e[41]=L):L=e[41];let Y;e[42]!==o?(Y=h=>o("slug",h.target.value),e[42]=o,e[43]=Y):Y=e[43];let w;e[44]!==l?(w=l("sandbox.postEditor.slugPlaceholder"),e[44]=l,e[45]=w):w=e[45];let F;e[46]!==L||e[47]!==Y||e[48]!==w?(F=t.jsx(ue,{id:"post-slug",value:L,onChange:Y,placeholder:w,className:"h-10"}),e[46]=L,e[47]=Y,e[48]=w,e[49]=F):F=e[49];let T;e[50]!==v||e[51]!==F?(T=t.jsxs("div",{className:"space-y-2",children:[v,F]}),e[50]=v,e[51]=F,e[52]=T):T=e[52];let B;e[53]!==l?(B=l("sandbox.postEditor.dateLabel"),e[53]=l,e[54]=B):B=e[54];let I;e[55]!==B?(I={type:"string",format:"date",title:B},e[55]=B,e[56]=I):I=e[56];let J;e[57]!==s.date?(J=Q(s.date),e[57]=s.date,e[58]=J):J=e[58];let A;e[59]!==o?(A=h=>o("date",h),e[59]=o,e[60]=A):A=e[60];let R;e[61]!==l?(R=l("sandbox.postEditor.dateLabel"),e[61]=l,e[62]=R):R=e[62];let H;e[63]!==I||e[64]!==J||e[65]!==A||e[66]!==R?(H=t.jsx(ge,{schema:I,value:J,onChange:A,path:"post-date",label:R}),e[63]=I,e[64]=J,e[65]=A,e[66]=R,e[67]=H):H=e[67];let D;e[68]!==T||e[69]!==H?(D=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T,H]}),e[68]=T,e[69]=H,e[70]=D):D=e[70];let $;e[71]!==l?($=l("sandbox.postEditor.coverImageLabel"),e[71]=l,e[72]=$):$=e[72];let K;e[73]!==$?(K={type:"string",format:"image-uri",title:$},e[73]=$,e[74]=K):K=e[74];const O=s.image;let _;e[75]!==o?(_=h=>o("image",h),e[75]=o,e[76]=_):_=e[76];let M;e[77]!==l?(M=l("sandbox.postEditor.coverImageLabel"),e[77]=l,e[78]=M):M=e[78];let q;e[79]!==s.image||e[80]!==K||e[81]!==_||e[82]!==M?(q=t.jsx(Fe,{schema:K,value:O,onChange:_,path:"post-image",label:M}),e[79]=s.image,e[80]=K,e[81]=_,e[82]=M,e[83]=q):q=e[83];let E;e[84]!==l?(E=l("sandbox.postEditor.coverAltLabel"),e[84]=l,e[85]=E):E=e[85];let W;e[86]!==l?(W=l("sandbox.postEditor.coverAltDescription"),e[86]=l,e[87]=W):W=e[87];let X;e[88]!==E||e[89]!==W?(X={type:"string",title:E,description:W},e[88]=E,e[89]=W,e[90]=X):X=e[90];let Z;e[91]!==s.alt?(Z=Q(s.alt),e[91]=s.alt,e[92]=Z):Z=e[92];let me;e[93]!==o?(me=h=>o("alt",h),e[93]=o,e[94]=me):me=e[94];let ee;e[95]!==l?(ee=l("sandbox.postEditor.coverAltLabel"),e[95]=l,e[96]=ee):ee=e[96];let te;e[97]!==X||e[98]!==Z||e[99]!==me||e[100]!==ee?(te=t.jsx(ge,{schema:X,value:Z,onChange:me,path:"post-alt",label:ee}),e[97]=X,e[98]=Z,e[99]=me,e[100]=ee,e[101]=te):te=e[101];let se;e[102]!==q||e[103]!==te?(se=t.jsxs("div",{className:"space-y-2",children:[q,te]}),e[102]=q,e[103]=te,e[104]=se):se=e[104];let le;e[105]!==l?(le=l("sandbox.postEditor.authorsLabel"),e[105]=l,e[106]=le):le=e[106];let ie;e[107]!==o?(ie=h=>o("authors",h),e[107]=o,e[108]=ie):ie=e[108];let oe;e[109]!==d||e[110]!==s.authors||e[111]!==le||e[112]!==ie?(oe=t.jsx(ye,{label:le,decofile:d,kind:"authors",valueField:"email",toRef:dt,selected:s.authors,onChange:ie}),e[109]=d,e[110]=s.authors,e[111]=le,e[112]=ie,e[113]=oe):oe=e[113];let ae;e[114]!==l?(ae=l("sandbox.postEditor.categoriesLabel"),e[114]=l,e[115]=ae):ae=e[115];let re;e[116]!==o?(re=h=>o("categories",h),e[116]=o,e[117]=re):re=e[117];let ne;e[118]!==d||e[119]!==s.categories||e[120]!==ae||e[121]!==re?(ne=t.jsx(ye,{label:ae,decofile:d,kind:"categories",valueField:"slug",toRef:nt,selected:s.categories,onChange:re}),e[118]=d,e[119]=s.categories,e[120]=ae,e[121]=re,e[122]=ne):ne=e[122];let de;e[123]!==o?(de=h=>o("extraProps",h),e[123]=o,e[124]=de):de=e[124];let pe;e[125]!==s.extraProps||e[126]!==de?(pe=t.jsx(ct,{value:s.extraProps,onChange:de}),e[125]=s.extraProps,e[126]=de,e[127]=pe):pe=e[127];let ce;e[128]!==o?(ce=h=>o("seo",h),e[128]=o,e[129]=ce):ce=e[129];let fe;e[130]!==s.seo||e[131]!==ce?(fe=t.jsx(pt,{value:s.seo,onChange:ce}),e[130]=s.seo,e[131]=ce,e[132]=fe):fe=e[132];let G;return e[133]!==U||e[134]!==D||e[135]!==se||e[136]!==oe||e[137]!==ne||e[138]!==pe||e[139]!==fe||e[140]!==k?(G=t.jsxs("div",{className:"space-y-5",children:[k,U,D,se,oe,ne,pe,fe]}),e[133]=U,e[134]=D,e[135]=se,e[136]=oe,e[137]=ne,e[138]=pe,e[139]=fe,e[140]=k,e[141]=G):G=e[141],G}function nt(V){return{name:Q(V.name),slug:Q(V.slug)}}function dt(V){return{...V}}function pt(V){const e=he.c(93),{value:s,onChange:d}=V,i=be();let o;e[0]!==s?(o=s&&typeof s=="object"&&!Array.isArray(s)?s:{},e[0]=s,e[1]=o):o=e[1];const p=o;let l;e[2]!==d||e[3]!==p?(l=(E,W)=>d({...p,[E]:W}),e[2]=d,e[3]=p,e[4]=l):l=e[4];const r=l;let c;e[5]!==i?(c=i("sandbox.postEditor.seoSectionLabel"),e[5]=i,e[6]=c):c=e[6];let a;e[7]!==c?(a=t.jsx("p",{className:"text-sm font-medium",children:c}),e[7]=c,e[8]=a):a=e[8];let m;e[9]!==i?(m=i("sandbox.postEditor.seoSectionHint"),e[9]=i,e[10]=m):m=e[10];let x;e[11]!==m?(x=t.jsx("p",{className:"text-xs text-muted-foreground",children:m}),e[11]=m,e[12]=x):x=e[12];let f;e[13]!==a||e[14]!==x?(f=t.jsxs("div",{className:"space-y-1",children:[a,x]}),e[13]=a,e[14]=x,e[15]=f):f=e[15];let u;e[16]!==i?(u=i("sandbox.postEditor.seoTitleLabel"),e[16]=i,e[17]=u):u=e[17];let C;e[18]!==u?(C=t.jsx(xe,{htmlFor:"post-seo-title",children:u}),e[18]=u,e[19]=C):C=e[19];let b;e[20]!==p.title?(b=Q(p.title),e[20]=p.title,e[21]=b):b=e[21];let g;e[22]!==r?(g=E=>r("title",E.target.value),e[22]=r,e[23]=g):g=e[23];let j;e[24]!==b||e[25]!==g?(j=t.jsx(ue,{id:"post-seo-title",value:b,onChange:g,className:"h-10"}),e[24]=b,e[25]=g,e[26]=j):j=e[26];let k;e[27]!==j||e[28]!==C?(k=t.jsxs("div",{className:"space-y-2",children:[C,j]}),e[27]=j,e[28]=C,e[29]=k):k=e[29];let y;e[30]!==i?(y=i("sandbox.postEditor.seoDescriptionLabel"),e[30]=i,e[31]=y):y=e[31];let n;e[32]!==y?(n=t.jsx(xe,{htmlFor:"post-seo-description",children:y}),e[32]=y,e[33]=n):n=e[33];let S;e[34]!==p.description?(S=Q(p.description),e[34]=p.description,e[35]=S):S=e[35];let z;e[36]!==r?(z=E=>r("description",E.target.value),e[36]=r,e[37]=z):z=e[37];let P;e[38]!==S||e[39]!==z?(P=t.jsx(Le,{id:"post-seo-description",value:S,onChange:z,rows:2}),e[38]=S,e[39]=z,e[40]=P):P=e[40];let U;e[41]!==n||e[42]!==P?(U=t.jsxs("div",{className:"space-y-2",children:[n,P]}),e[41]=n,e[42]=P,e[43]=U):U=e[43];let N;e[44]!==i?(N=i("sandbox.postEditor.seoImageLabel"),e[44]=i,e[45]=N):N=e[45];let v;e[46]!==N?(v={type:"string",format:"image-uri",title:N},e[46]=N,e[47]=v):v=e[47];const L=p.image;let Y;e[48]!==r?(Y=E=>r("image",E),e[48]=r,e[49]=Y):Y=e[49];let w;e[50]!==i?(w=i("sandbox.postEditor.seoImageLabel"),e[50]=i,e[51]=w):w=e[51];let F;e[52]!==p.image||e[53]!==v||e[54]!==Y||e[55]!==w?(F=t.jsx(Fe,{schema:v,value:L,onChange:Y,path:"post-seo-image",label:w}),e[52]=p.image,e[53]=v,e[54]=Y,e[55]=w,e[56]=F):F=e[56];let T;e[57]!==i?(T=i("sandbox.postEditor.seoCanonicalLabel"),e[57]=i,e[58]=T):T=e[58];let B;e[59]!==T?(B=t.jsx(xe,{htmlFor:"post-seo-canonical",children:T}),e[59]=T,e[60]=B):B=e[60];let I;e[61]!==p.canonical?(I=Q(p.canonical),e[61]=p.canonical,e[62]=I):I=e[62];let J;e[63]!==r?(J=E=>r("canonical",E.target.value),e[63]=r,e[64]=J):J=e[64];let A;e[65]!==i?(A=i("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=i,e[66]=A):A=e[66];let R;e[67]!==I||e[68]!==J||e[69]!==A?(R=t.jsx(ue,{id:"post-seo-canonical",value:I,onChange:J,placeholder:A,className:"h-10"}),e[67]=I,e[68]=J,e[69]=A,e[70]=R):R=e[70];let H;e[71]!==B||e[72]!==R?(H=t.jsxs("div",{className:"space-y-2",children:[B,R]}),e[71]=B,e[72]=R,e[73]=H):H=e[73];let D;e[74]!==i?(D=i("sandbox.postEditor.seoNoIndexingLabel"),e[74]=i,e[75]=D):D=e[75];let $;e[76]!==D?($=t.jsx(xe,{htmlFor:"post-seo-no-indexing",children:D}),e[76]=D,e[77]=$):$=e[77];const K=p.noIndexing===!0;let O;e[78]!==r?(O=E=>r("noIndexing",E),e[78]=r,e[79]=O):O=e[79];let _;e[80]!==K||e[81]!==O?(_=t.jsx(Se,{id:"post-seo-no-indexing",checked:K,onCheckedChange:O}),e[80]=K,e[81]=O,e[82]=_):_=e[82];let M;e[83]!==$||e[84]!==_?(M=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[$,_]}),e[83]=$,e[84]=_,e[85]=M):M=e[85];let q;return e[86]!==k||e[87]!==U||e[88]!==F||e[89]!==H||e[90]!==M||e[91]!==f?(q=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[f,k,U,F,H,M]}),e[86]=k,e[87]=U,e[88]=F,e[89]=H,e[90]=M,e[91]=f,e[92]=q):q=e[92],q}function ct(V){const e=he.c(24),{value:s,onChange:d}=V,i=be();let o,p,l,r;if(e[0]!==d||e[1]!==i||e[2]!==s){o=at(s);const f=(C,b)=>d(o.map((g,j)=>j===C?{...g,...b}:g));p="space-y-2";let u;e[7]!==i?(u=i("sandbox.postEditor.extraPropsLabel"),e[7]=i,e[8]=u):u=e[8],e[9]!==u?(l=t.jsx(xe,{children:u}),e[9]=u,e[10]=l):l=e[10],r=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((C,b)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(ue,{value:C.key,onChange:g=>f(b,{key:g.target.value}),placeholder:i("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(ue,{value:C.value,onChange:g=>f(b,{value:g.target.value}),placeholder:i("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(it,{label:i("sandbox.postEditor.removePropLabel"),onClick:()=>d(o.filter((g,j)=>j!==b))})]},b))}),e[0]=d,e[1]=i,e[2]=s,e[3]=o,e[4]=p,e[5]=l,e[6]=r}else o=e[3],p=e[4],l=e[5],r=e[6];let c;e[11]!==i?(c=i("sandbox.postEditor.addPropLabel"),e[11]=i,e[12]=c):c=e[12];let a;e[13]!==o||e[14]!==d?(a=()=>d([...o,{key:"",value:""}]),e[13]=o,e[14]=d,e[15]=a):a=e[15];let m;e[16]!==c||e[17]!==a?(m=t.jsx(ot,{label:c,onClick:a}),e[16]=c,e[17]=a,e[18]=m):m=e[18];let x;return e[19]!==p||e[20]!==l||e[21]!==r||e[22]!==m?(x=t.jsxs("div",{className:p,children:[l,r,m]}),e[19]=p,e[20]=l,e[21]=r,e[22]=m,e[23]=x):x=e[23],x}function ye(V){const e=he.c(24),{label:s,decofile:d,kind:i,valueField:o,toRef:p,selected:l,onChange:r}=V,c=be();let a;e[0]!==d||e[1]!==i||e[2]!==l||e[3]!==p||e[4]!==o?(a=Qe({records:We(d,i),selected:l,valueField:o,toRef:p}),e[0]=d,e[1]=i,e[2]=l,e[3]=p,e[4]=o,e[5]=a):a=e[5];const{options:m,selectedValues:x,refsForValues:f}=a;let u;e[6]!==i||e[7]!==c?(u=c(i==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=i,e[7]=c,e[8]=u):u=e[8];const C=u;let b;e[9]!==i||e[10]!==c?(b=c(i==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=i,e[10]=c,e[11]=b):b=e[11];const g=b;let j;e[12]!==s?(j=t.jsx(xe,{children:s}),e[12]=s,e[13]=j):j=e[13];let k;e[14]!==C||e[15]!==r||e[16]!==m||e[17]!==f||e[18]!==g||e[19]!==x?(k=m.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:C}):t.jsx($e,{options:m,defaultValue:x,onValueChange:n=>r(f(n)),placeholder:g,maxCount:4}),e[14]=C,e[15]=r,e[16]=m,e[17]=f,e[18]=g,e[19]=x,e[20]=k):k=e[20];let y;return e[21]!==j||e[22]!==k?(y=t.jsxs("div",{className:"space-y-2",children:[j,k]}),e[21]=j,e[22]=k,e[23]=y):y=e[23],y}export{ni as PostEditor};
@@ -1 +1 @@
1
- import{c as f,l as h,j as a}from"./index-BkljfHxy.js";import{m as y}from"./agent-icon-CUm4oB7y.js";import{s as v}from"./Plus-BIAtk7db.js";import{s as j}from"./Trash01-D1GpJcjK.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-CNfEIUn0.js";import{m as y}from"./agent-icon-Cm-rraMc.js";import{s as v}from"./Plus-npiI5-7X.js";import{s as j}from"./Trash01-C64jvZUr.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};