decocms 4.459.1 → 4.459.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (372) hide show
  1. package/dist/client/assets/{AlertCircle-hP4CniDw.js → AlertCircle-BhLvKd51.js} +1 -1
  2. package/dist/client/assets/{AreaChart-Bo1dQUQK.js → AreaChart-BXdKk-Jh.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-snrf1tGx.js → ArrowLeft-BGBmg7V7.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-DKlHzRUJ.js → ArrowUp-BiSVkN3f.js} +1 -1
  5. package/dist/client/assets/{Building02-C7IJqjKK.js → Building02-Cn4v8u0T.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-D_y9VlNF.js → CartesianChart-CaWYdC9u.js} +1 -1
  7. package/dist/client/assets/{Check-Ck9dGdFT.js → Check-BIm8oPAI.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-C10CcdE5.js → CheckCircle-DtMOIYIN.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DxC2mC66.js → ChevronUp-CW9NwQNu.js} +1 -1
  10. package/dist/client/assets/{Copy01-efUKcLhv.js → Copy01-CVhdu84v.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-DdwRSoSe.js → CreditCard01-YvQwrjsc.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-MvZCuAVY.js → DotsVertical-D-FvZQn0.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-BeBU7UDa.js → ErrorBarContext-D3MulA5M.js} +1 -1
  14. package/dist/client/assets/{Image01-DvcgVgi7.js → Image01-CGBVFmAI.js} +1 -1
  15. package/dist/client/assets/{Key01-Cj8Vm4p6.js → Key01-CwVo9Cfv.js} +1 -1
  16. package/dist/client/assets/{Line-C-48JBMZ.js → Line-C48uhTy3.js} +1 -1
  17. package/dist/client/assets/{Link01-tmXFK6e3.js → Link01-9k5oDSP-.js} +1 -1
  18. package/dist/client/assets/{LinkBroken01-CP7hyYh2.js → LinkBroken01-CKAYv5Ws.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-DA-xCJ3a.js → LinkExternal01-DNJF5sr3.js} +1 -1
  20. package/dist/client/assets/{Monitor01-CWOF0aXq.js → Monitor01-emBSPIO-.js} +1 -1
  21. package/dist/client/assets/{Palette-BqhzEvZt.js → Palette-CbtdR6wJ.js} +1 -1
  22. package/dist/client/assets/{Plus-C_BzVsMU.js → Plus-088McVZs.js} +1 -1
  23. package/dist/client/assets/{SearchMd-Cn3ttzXj.js → SearchMd-CRK8FN15.js} +1 -1
  24. package/dist/client/assets/{Sector-CGnau01_.js → Sector-cSOsr2E-.js} +1 -1
  25. package/dist/client/assets/{ShoppingBag01-Wr2FrDdb.js → ShoppingBag01-BxQzf-9l.js} +1 -1
  26. package/dist/client/assets/{Sun-DYaxr-kZ.js → Sun-D6nY-Bb0.js} +1 -1
  27. package/dist/client/assets/{Tool01-BlNfFonn.js → Tool01-DQQGDcpr.js} +1 -1
  28. package/dist/client/assets/{Trash01-DfS7U4fp.js → Trash01-B3Mmvw35.js} +1 -1
  29. package/dist/client/assets/{Upload01-BcP6uGW4.js → Upload01-jQPNdEwy.js} +1 -1
  30. package/dist/client/assets/{User01-C_D1KbSG.js → User01-B-OC1WKF.js} +1 -1
  31. package/dist/client/assets/{UserSquare-DnwMjdPq.js → UserSquare-DAPHqKUt.js} +1 -1
  32. package/dist/client/assets/{Users01-DmsoNf0W.js → Users01-ClTO42s_.js} +1 -1
  33. package/dist/client/assets/{X-B2rdTMzZ.js → X-B8pJz_49.js} +1 -1
  34. package/dist/client/assets/{XAxis-xi6RGTb2.js → XAxis-D6VwqdrO.js} +1 -1
  35. package/dist/client/assets/{XClose-C-LhQLI0.js → XClose-BqnBpCCh.js} +1 -1
  36. package/dist/client/assets/{ZoomOut-D334bw-H.js → ZoomOut-DsjWT-m0.js} +1 -1
  37. package/dist/client/assets/{access-gate-DSweS_O9.js → access-gate-Bn9w-zIx.js} +1 -1
  38. package/dist/client/assets/{add-connection-dialog-BXpA-FpE.js → add-connection-dialog-BhN1VUAm.js} +1 -1
  39. package/dist/client/assets/{agent-analytics-BTDOeRM6.js → agent-analytics-DqtV4MPf.js} +1 -1
  40. package/dist/client/assets/agent-app-CwRJsLag.js +1 -0
  41. package/dist/client/assets/{agent-assets-wghI4Amx.js → agent-assets-BFqhddLD.js} +1 -1
  42. package/dist/client/assets/{agent-automation-q7dN1ZRz.js → agent-automation-C8klKvKY.js} +1 -1
  43. package/dist/client/assets/{agent-automations-BMZxs2g_.js → agent-automations-DqhEODAb.js} +1 -1
  44. package/dist/client/assets/{agent-connect-sources-DhGbXZpi.js → agent-connect-sources-C86EyOB5.js} +1 -1
  45. package/dist/client/assets/agent-deck-DGV-pK2t.js +1 -0
  46. package/dist/client/assets/{agent-e2e-9WJZyE0h.js → agent-e2e-DzJ9sAzc.js} +1 -1
  47. package/dist/client/assets/{agent-experiments-CoxpwEG5.js → agent-experiments-VcqTmtZL.js} +1 -1
  48. package/dist/client/assets/{agent-file-kcJOcKYn.js → agent-file-DI2wK--r.js} +1 -1
  49. package/dist/client/assets/{agent-hosting-BbOgSYpL.js → agent-hosting-kfFKqM9r.js} +1 -1
  50. package/dist/client/assets/{agent-icon-DVHfcBN5.js → agent-icon-CP_Ce3vP.js} +1 -1
  51. package/dist/client/assets/agent-library-Dlz_4LiQ.js +1 -0
  52. package/dist/client/assets/agent-library-file-DPfP5s66.js +1 -0
  53. package/dist/client/assets/{agent-monitor-CN2DIugD.js → agent-monitor-Cmsy40BX.js} +1 -1
  54. package/dist/client/assets/agent-overview-CmHeFyml.js +1 -0
  55. package/dist/client/assets/agent-settings-C7f7_N2z.js +1 -0
  56. package/dist/client/assets/{agent-site-editor-Mm1DU721.js → agent-site-editor-Cn5duNcn.js} +1 -1
  57. package/dist/client/assets/agent-site-editor-code-CIrGs6m3.js +2 -0
  58. package/dist/client/assets/{agent-site-editor-content-TaqaeLdn.js → agent-site-editor-content-CbT525Tv.js} +5 -5
  59. package/dist/client/assets/{agent-site-editor-preview-BPvpmOCG.js → agent-site-editor-preview-CYb_d7vH.js} +3 -3
  60. package/dist/client/assets/agent-view-Be5hcLqc.js +1 -0
  61. package/dist/client/assets/{agent-view-guard-C-kn102z.js → agent-view-guard-C1R2qCc9.js} +1 -1
  62. package/dist/client/assets/{agents-list-HVHSwhFa.js → agents-list-y-TIBGAq.js} +1 -1
  63. package/dist/client/assets/{ai-providers-CWyW_O_N.js → ai-providers-CRe_x6a5.js} +1 -1
  64. package/dist/client/assets/{alert-Ck8KMasQ.js → alert-DtABAm9U.js} +1 -1
  65. package/dist/client/assets/{alert-dialog-Cyf0IXgS.js → alert-dialog-DmVEYAb4.js} +1 -1
  66. package/dist/client/assets/{analytics-sections-d8aBHi-o.js → analytics-sections-B7lS35B2.js} +1 -1
  67. package/dist/client/assets/{api-keys-ByiOQaV4.js → api-keys-Cif1835z.js} +1 -1
  68. package/dist/client/assets/api-keys-Dwm2bo1Y.js +1 -0
  69. package/dist/client/assets/app-editor-C8_M7ADb.js +1 -0
  70. package/dist/client/assets/{asset-utils-CZ6drd0z.js → asset-utils-CT4-E6TK.js} +1 -1
  71. package/dist/client/assets/{auth-DbQy_3_H.js → auth-2OsbyFrK.js} +1 -1
  72. package/dist/client/assets/{auth-catchall-B06-BTfP.js → auth-catchall-BzbXV9-m.js} +1 -1
  73. package/dist/client/assets/{auth-entry-CqUF12aw.js → auth-entry-DGYmKia4.js} +1 -1
  74. package/dist/client/assets/{auth-split-layout-Ci1D9n5y.js → auth-split-layout-95LDkF8r.js} +1 -1
  75. package/dist/client/assets/{authenticate-and-persist-oauth-BbZoD5Jl.js → authenticate-and-persist-oauth-BGZheh1t.js} +1 -1
  76. package/dist/client/assets/{automation-list-row-Bt0pDv1X.js → automation-list-row-DVowGYyJ.js} +1 -1
  77. package/dist/client/assets/{automation-runs-Dl8dgTPp.js → automation-runs-C4ptawD5.js} +1 -1
  78. package/dist/client/assets/{automations-BGOyn9e5.js → automations-9sMoXMlz.js} +1 -1
  79. package/dist/client/assets/{autosend-DWW-s_U0.js → autosend-BL2q_s0u.js} +1 -1
  80. package/dist/client/assets/{avatar-DWGXIvcf.js → avatar-BE-fSFZD.js} +1 -1
  81. package/dist/client/assets/{badge-we6p4hry.js → badge-CWkPL4_H.js} +1 -1
  82. package/dist/client/assets/{block-document-_9FVQevS.js → block-document-B5Nbhvq6.js} +3 -3
  83. package/dist/client/assets/{blocks-preview-workspace-context-Bpwyq7XF.js → blocks-preview-workspace-context-BmQuZmk0.js} +1 -1
  84. package/dist/client/assets/{blog-schema-CCBE-1lK.js → blog-schema-C5vM1gTk.js} +1 -1
  85. package/dist/client/assets/{buckets-IYr5nWy_.js → buckets-CSwPt34t.js} +1 -1
  86. package/dist/client/assets/{build-improve-prompt-doc-DETXagAT.js → build-improve-prompt-doc-ztgqv-Z4.js} +1 -1
  87. package/dist/client/assets/{calendar-CUA9Aez6.js → calendar-BibeDh1C.js} +1 -1
  88. package/dist/client/assets/{capability-load-error-BneCHbnb.js → capability-load-error-Cifg-uxi.js} +1 -1
  89. package/dist/client/assets/category-editor-LUC4tS1v.js +1 -0
  90. package/dist/client/assets/{chart-CX74ottm.js → chart-Dtz_P3D3.js} +5 -5
  91. package/dist/client/assets/{chat-context-CiWqcBU2.js → chat-context-Blq_eRG7.js} +6 -6
  92. package/dist/client/assets/{chat-draft-DkpmcsoX.js → chat-draft-jYk7-XVU.js} +1 -1
  93. package/dist/client/assets/{checkbox-CXteSDot.js → checkbox-D5Dxpou_.js} +1 -1
  94. package/dist/client/assets/{choose-editor-BD3DdNIK.js → choose-editor-db_FowHS.js} +1 -1
  95. package/dist/client/assets/{claim-phase-copy-BexHEX8r.js → claim-phase-copy-8K3qgNLh.js} +1 -1
  96. package/dist/client/assets/{cli-auth-success-CNGA7JlE.js → cli-auth-success-DjOImTaI.js} +1 -1
  97. package/dist/client/assets/{client-icons-CqX4a6Ar.js → client-icons-BkFbGfWa.js} +1 -1
  98. package/dist/client/assets/{collapsible-DwAPS6G8.js → collapsible-DsS_PEhd.js} +1 -1
  99. package/dist/client/assets/{collection-detail-DF6WGwCf.js → collection-detail-DP9fd0Dw.js} +1 -1
  100. package/dist/client/assets/{collection-display-button-BIc0dgaJ.js → collection-display-button-C2K7H_M_.js} +1 -1
  101. package/dist/client/assets/{collection-search-DoIg4pOf.js → collection-search-9MFDsQ6p.js} +1 -1
  102. package/dist/client/assets/{collection-table-wrapper-CQxrxnX9.js → collection-table-wrapper-SA5bpKVN.js} +1 -1
  103. package/dist/client/assets/{collection-tabs-Dvji2ooE.js → collection-tabs-jDuTyfYq.js} +1 -1
  104. package/dist/client/assets/{column-rules-BrooYRIh.js → column-rules-D6JxKTRe.js} +1 -1
  105. package/dist/client/assets/{combobox-CPn_s26Q.js → combobox-DF39TceE.js} +1 -1
  106. package/dist/client/assets/{command-CLhlH1Qw.js → command-B4jGFd17.js} +1 -1
  107. package/dist/client/assets/{companion-mcps-section-CZ7xsA0m.js → companion-mcps-section-CVSn-aTg.js} +1 -1
  108. package/dist/client/assets/config-bg0vG3sC.js +1 -0
  109. package/dist/client/assets/{connect-B0dB034l.js → connect-D_b6-CyS.js} +1 -1
  110. package/dist/client/assets/{connect-layout-XfG0VjQ8.js → connect-layout-DDUc-hD-.js} +1 -1
  111. package/dist/client/assets/{connection-7beMMzWx.js → connection-CwaA-4mr.js} +1 -1
  112. package/dist/client/assets/{connection-card-Be7WoVGH.js → connection-card-BtsAXkN4.js} +1 -1
  113. package/dist/client/assets/{connection-detail-B768OXfU.js → connection-detail-QHFcVXMr.js} +1 -1
  114. package/dist/client/assets/{connection-form-helpers-RVubyUH7.js → connection-form-helpers-BV0FZHte.js} +1 -1
  115. package/dist/client/assets/{connections-Bg73jyCK.js → connections-CNadoE5b.js} +1 -1
  116. package/dist/client/assets/context-CFdmX9Xg.js +1 -0
  117. package/dist/client/assets/{context-menu-B4Jf6CPJ.js → context-menu-BnfFPukJ.js} +1 -1
  118. package/dist/client/assets/core.esm-C5SAJNWk.js +5 -0
  119. package/dist/client/assets/{create-organization-dialog-CfLH7Jh9.js → create-organization-dialog-mc6cUsWg.js} +1 -1
  120. package/dist/client/assets/{daily-pulse-BWzYVao8.js → daily-pulse-DxbyF8Ez.js} +1 -1
  121. package/dist/client/assets/{decopilot-Dfink1sA.js → decopilot-NLRNUzMe.js} +1 -1
  122. package/dist/client/assets/{device-hint-DXVtdDhz.js → device-hint-Bk3hM3wv.js} +1 -1
  123. package/dist/client/assets/{dialog-KYKWBSL1.js → dialog-BGB8jiGJ.js} +1 -1
  124. package/dist/client/assets/{discover-BD3jqwiC.js → discover-DTxiggmr.js} +1 -1
  125. package/dist/client/assets/{domain-settings-Cf29Okkv.js → domain-settings--d3mBGQt.js} +1 -1
  126. package/dist/client/assets/{download-app-dialog-BubP7yx-.js → download-app-dialog-C1623CnU.js} +1 -1
  127. package/dist/client/assets/{drawer-DWkQ_glv.js → drawer-CDzlciSr.js} +1 -1
  128. package/dist/client/assets/{editor-D2Dbl7hJ.js → editor-CtDmuL7X.js} +3 -3
  129. package/dist/client/assets/{empty-state-NNLhOgxH.js → empty-state-CjQyKZ-1.js} +1 -1
  130. package/dist/client/assets/{empty-state-CWduWzjT.js → empty-state-ClSZs1JG.js} +1 -1
  131. package/dist/client/assets/{extract-connection-data-qdZ9yL7M.js → extract-connection-data-BnK0gWOf.js} +1 -1
  132. package/dist/client/assets/{feature-gate-DmrYDfD0.js → feature-gate-cEqP5nQK.js} +1 -1
  133. package/dist/client/assets/{feature-paywall-za9mjhQi.js → feature-paywall-B0iudT_s.js} +1 -1
  134. package/dist/client/assets/{file-explorer-C3BfL1pu.js → file-explorer-CPmbjsZ0.js} +1 -1
  135. package/dist/client/assets/{file-preview-C2exPqDj.js → file-preview-FOaYPomf.js} +1 -1
  136. package/dist/client/assets/{file-share-button-Bd0_1kzN.js → file-share-button-C99y-deU.js} +1 -1
  137. package/dist/client/assets/{file-type-icon-e3GEv92g.js → file-type-icon-CaoQ1xmx.js} +1 -1
  138. package/dist/client/assets/flat-project-U_elHLQG.js +1 -0
  139. package/dist/client/assets/{folder-icon-dsxfjOg0.js → folder-icon-C189zm-A.js} +1 -1
  140. package/dist/client/assets/{form-C8X8xSNl.js → form-Bc6DsBML.js} +1 -1
  141. package/dist/client/assets/{gateway-client-C7cRG-yz.js → gateway-client-C0zWKCU4.js} +1 -1
  142. package/dist/client/assets/{general-BVagQQFp.js → general-BtREXR3p.js} +1 -1
  143. package/dist/client/assets/home-twE7M1iU.js +1 -0
  144. package/dist/client/assets/{icon-button-Be0mspeY.js → icon-button-DI_TQN14.js} +1 -1
  145. package/dist/client/assets/{index-QvCrIW6i.js → index-BDhW9xxN.js} +3 -3
  146. package/dist/client/assets/{index-3ZF9KrLG.js → index-BOGlzqxy.js} +1 -1
  147. package/dist/client/assets/{index-B4vDpFwz.js → index-BgnBPJ_k.js} +1 -1
  148. package/dist/client/assets/{index-I0YWuNWN.js → index-Bjctp948.js} +1 -1
  149. package/dist/client/assets/{index-MxA60P88.js → index-CKHLb67S.js} +5 -5
  150. package/dist/client/assets/{index-BhYlaEJD.js → index-CN7c5BIN.js} +1 -1
  151. package/dist/client/assets/{index-BoWpPmYJ.js → index-C_I69v1G.js} +1 -1
  152. package/dist/client/assets/{index-5_KsGXx0.js → index-CdXinK8k.js} +1 -1
  153. package/dist/client/assets/{index-DQcfF-hP.js → index-ChB9J_RZ.js} +1 -1
  154. package/dist/client/assets/{index-CtFpwpsJ.js → index-DClhYi2n.js} +1 -1
  155. package/dist/client/assets/{index-DEn9wDzc.js → index-DH9SXre1.js} +1 -1
  156. package/dist/client/assets/{index-CxhjDVE6.js → index-G3JSHUT3.js} +1 -1
  157. package/dist/client/assets/{index-gTfftS9m.js → index-RmHD0J0J.js} +1 -1
  158. package/dist/client/assets/{index-WiELi86Y.js → index-XEhCSGBE.js} +1 -1
  159. package/dist/client/assets/{index-D-LNUFaS.js → index-kogfMavo.js} +1 -1
  160. package/dist/client/assets/{index-redirect-BWvJ00h7.js → index-redirect-BVO0FWKk.js} +1 -1
  161. package/dist/client/assets/{infiniteQueryObserver-B4E75_QN.js → infiniteQueryObserver-8nco6j0l.js} +1 -1
  162. package/dist/client/assets/{infra-billing-C2_mgW0r.js → infra-billing-D_L2KNiI.js} +1 -1
  163. package/dist/client/assets/{input-DzrhMQKQ.js → input--BdO_-Si.js} +1 -1
  164. package/dist/client/assets/{input-rYFgozUW.js → input-Bl8RoIF_.js} +3 -3
  165. package/dist/client/assets/{input-dnKef9VJ.js → input-DrKcGYrl.js} +1 -1
  166. package/dist/client/assets/{integration-icon-B1V7QJ0Z.js → integration-icon-BDP6F9Pj.js} +1 -1
  167. package/dist/client/assets/{label-Bn6aGS7S.js → label-uTNaIuWI.js} +1 -1
  168. package/dist/client/assets/{layout-C0VOhGsK.js → layout-wln6hIY8.js} +1 -1
  169. package/dist/client/assets/{legacy-agents-deep-Di9MZNFv.js → legacy-agents-deep-CawwPAe9.js} +1 -1
  170. package/dist/client/assets/{legacy-main-redirect-Bq-7qzen.js → legacy-main-redirect-BRfxPgdK.js} +1 -1
  171. package/dist/client/assets/library-DvaCz1Wk.js +1 -0
  172. package/dist/client/assets/{library-tab-B7Gkfwc-.js → library-tab-CX8njRPr.js} +1 -1
  173. package/dist/client/assets/{login-ela4cJW6.js → login-Ba7PbDUP.js} +1 -1
  174. package/dist/client/assets/{markdown-BSSkHnhk.js → markdown-LIOti3qC.js} +1 -1
  175. package/dist/client/assets/{mcp-app-renderer-BDnK-zdP.js → mcp-app-renderer-Z11oKtDn.js} +1 -1
  176. package/dist/client/assets/{mcp-oauth-UG4bZwDx.js → mcp-oauth-DdEBE0Y7.js} +1 -1
  177. package/dist/client/assets/{members-DVJlgztX.js → members-BpY2Uunx.js} +1 -1
  178. package/dist/client/assets/{memory-DTVmF33x.js → memory-BOfe9xo8.js} +1 -1
  179. package/dist/client/assets/{mini-report-page-Bm4NxYHw.js → mini-report-page-CDObofTo.js} +1 -1
  180. package/dist/client/assets/{mock-board-TB0C3oxv.js → mock-board-DTiFXXEW.js} +1 -1
  181. package/dist/client/assets/{monaco-editor-DTrO_g8e.js → monaco-editor-J-McljL4.js} +1 -1
  182. package/dist/client/assets/{monitoring-stats-row-BK60Uszk.js → monitoring-stats-row-BuUSw5n9.js} +1 -1
  183. package/dist/client/assets/{multi-select-Cv6XwHp_.js → multi-select-YETcY4pN.js} +1 -1
  184. package/dist/client/assets/{mustache-CkVzTK04.js → mustache-B6NVLdGZ.js} +1 -1
  185. package/dist/client/assets/{new-project-dialog-BltQa2EK.js → new-project-dialog-C_qrCiK3.js} +1 -1
  186. package/dist/client/assets/{oauth-callback-Dfb0SnH3.js → oauth-callback-CoY1dClF.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-ai-provider-Cc0Ol4YV.js → oauth-callback-ai-provider-DRzdFuFq.js} +1 -1
  188. package/dist/client/assets/{onboarding-4jSRiUhV.js → onboarding-ZdgIxalP.js} +1 -1
  189. package/dist/client/assets/{openai-conversation-eMBxQyXE.js → openai-conversation-D0z85aeO.js} +1 -1
  190. package/dist/client/assets/{optimistic-project-sidebar-views-C1m8dTzY.js → optimistic-project-sidebar-views-F9PSyz4u.js} +1 -1
  191. package/dist/client/assets/{org-file-open-context-BPs82lJA.js → org-file-open-context-BMxi_LQF.js} +1 -1
  192. package/dist/client/assets/{organization-choice-Bb6SyphX.js → organization-choice-BByF2TD6.js} +1 -1
  193. package/dist/client/assets/{orgs-D0sK64fg.js → orgs-DNf-zQVQ.js} +1 -1
  194. package/dist/client/assets/{page-seo-form-C5VxItck.js → page-seo-form-D3EpRlka.js} +1 -1
  195. package/dist/client/assets/{pair-PcsLH4D0.js → pair-DcQaouFq.js} +1 -1
  196. package/dist/client/assets/{plan-ladder-BdvlpVQQ.js → plan-ladder-DCJHDLS1.js} +1 -1
  197. package/dist/client/assets/{popover-BaUprubX.js → popover-BeYdUP-7.js} +1 -1
  198. package/dist/client/assets/post-calendar-CWlL1qOv.js +1 -0
  199. package/dist/client/assets/{post-editor-BD6O003-.js → post-editor-BqiuLn6r.js} +2 -2
  200. package/dist/client/assets/{preview-content-Sk08Pr7A.js → preview-content-wfTnwfYO.js} +1 -1
  201. package/dist/client/assets/{preview-dialog-o8jh9tjn.js → preview-dialog-BBD3jkZw.js} +1 -1
  202. package/dist/client/assets/{profile-CrHlRdpp.js → profile-C4Rt4NnT.js} +1 -1
  203. package/dist/client/assets/project-app-view-BSuJFE5I.js +1 -0
  204. package/dist/client/assets/project-feed-DmY6xTEa.js +1 -0
  205. package/dist/client/assets/{project-icon-Cg1qPEYk.js → project-icon-CtBv5qE9.js} +1 -1
  206. package/dist/client/assets/project-reports-DqdW9cvU.js +1 -0
  207. package/dist/client/assets/project-tasks-n0fjaerW.js +1 -0
  208. package/dist/client/assets/{projects-CZ04La1N.js → projects-C5p0nBlq.js} +1 -1
  209. package/dist/client/assets/{projects-empty-state-CmBktXtC.js → projects-empty-state-CTShW1Lx.js} +1 -1
  210. package/dist/client/assets/{prompts-B-79ciZU.js → prompts-CQ9lRosC.js} +1 -1
  211. package/dist/client/assets/record-editor-CuQArctF.js +1 -0
  212. package/dist/client/assets/redirect-editor-BqLcv-Nb.js +1 -0
  213. package/dist/client/assets/{reports-BbEyCsO0.js → reports-D1mTKUWD.js} +1 -1
  214. package/dist/client/assets/reports-eg7qCRZt.js +1 -0
  215. package/dist/client/assets/{reports-onboarding-DaafOk4M.js → reports-onboarding-Bhi9ZgPz.js} +1 -1
  216. package/dist/client/assets/reports-tab-CvuocIip.js +2 -0
  217. package/dist/client/assets/{repositories-CMmN2qAu.js → repositories-BYsSTJU-.js} +1 -1
  218. package/dist/client/assets/{repository-binding-Dmtv7YGN.js → repository-binding-C6IRmj-B.js} +1 -1
  219. package/dist/client/assets/{repository-import-picker-CKbCQvk9.js → repository-import-picker-COTFeOcQ.js} +1 -1
  220. package/dist/client/assets/{repository-picker-DYjy65xM.js → repository-picker-sBc4_JWX.js} +1 -1
  221. package/dist/client/assets/{require-capability-BN4N7OVD.js → require-capability-BhFz_zS7.js} +1 -1
  222. package/dist/client/assets/{required-auth-layout-8zcKPB4g.js → required-auth-layout-CslXPG0m.js} +1 -1
  223. package/dist/client/assets/{reset-password-CZSibvEr.js → reset-password-D0bAgN3-.js} +1 -1
  224. package/dist/client/assets/{resizable-D2ZfrSi0.js → resizable-DQ19gouy.js} +1 -1
  225. package/dist/client/assets/{resolve-tab-icon-Cg2e1659.js → resolve-tab-icon-CY3X9f4_.js} +1 -1
  226. package/dist/client/assets/{review-settings-5LRZ1Xo7.js → review-settings-BV2AxARx.js} +1 -1
  227. package/dist/client/assets/rich-text-link-control-B1QtoX3z.js +1 -0
  228. package/dist/client/assets/{roles-BoXMUY1f.js → roles-BeG_4GHR.js} +1 -1
  229. package/dist/client/assets/route-BqiT-Ol6.js +1 -0
  230. package/dist/client/assets/route-CAFnuBNg.js +1 -0
  231. package/dist/client/assets/{route-oh01RQ-w.js → route-CHYkbxgn.js} +1 -1
  232. package/dist/client/assets/{runnable-block-editor-BJjjoCmo.js → runnable-block-editor-DcMkYuUb.js} +4 -4
  233. package/dist/client/assets/{sandbox-lifecycle-context-m3f3mnES.js → sandbox-lifecycle-context-DeQIS6JV.js} +1 -1
  234. package/dist/client/assets/{schema-qHqkHHod.js → schema-B4_xo1tD.js} +1 -1
  235. package/dist/client/assets/{scroll-area-5fAK7i7z.js → scroll-area-DCMK1tWu.js} +1 -1
  236. package/dist/client/assets/{search-input-DlDEo9jW.js → search-input-BSOQ3ySE.js} +1 -1
  237. package/dist/client/assets/{search-toggle-DBB9-mcC.js → search-toggle-C-N7d4fN.js} +1 -1
  238. package/dist/client/assets/{secret-picker-BLIlbF-9.js → secret-picker-DZTMfxXL.js} +1 -1
  239. package/dist/client/assets/{secrets-B6ciBsym.js → secrets-Bx2QImFq.js} +1 -1
  240. package/dist/client/assets/sections-editor-BYNA13Qk.js +1 -0
  241. package/dist/client/assets/{select-C4t2zfNW.js → select-B6DzqJiH.js} +1 -1
  242. package/dist/client/assets/{select-model-B4hpstt-.js → select-model-bJPmmx5f.js} +1 -1
  243. package/dist/client/assets/seo-editor-qeEunz7R.js +1 -0
  244. package/dist/client/assets/{separator-7dF6xfxz.js → separator-iMNYfJb7.js} +1 -1
  245. package/dist/client/assets/{settings-tab-DsxCSMdM.js → settings-tab-BhyiSM9Z.js} +1 -1
  246. package/dist/client/assets/{sheet-CCkRwnEO.js → sheet-CMNWdtKR.js} +1 -1
  247. package/dist/client/assets/{shell-layout-Cvnu1xoQ.js → shell-layout-CTITeNJr.js} +1 -1
  248. package/dist/client/assets/{skills-Bh6FhxA_.js → skills-BsLVR3Vn.js} +1 -1
  249. package/dist/client/assets/{sso-DfdpWUJy.js → sso-Jw8gC2hK.js} +1 -1
  250. package/dist/client/assets/{suggestion-BZrPkOTO.js → suggestion-CRtEJ9La.js} +1 -1
  251. package/dist/client/assets/{switch-BQeWPFJM.js → switch-Ay_EsHPF.js} +1 -1
  252. package/dist/client/assets/{synced-repos-CCBM75q2.js → synced-repos-DMWgs820.js} +1 -1
  253. package/dist/client/assets/{tab-icon-glyph-yziZ2PV_.js → tab-icon-glyph-C5LJrgle.js} +1 -1
  254. package/dist/client/assets/{table-D-iIBiS4.js → table-BDAYwSIe.js} +1 -1
  255. package/dist/client/assets/{tabs-ewvilFDB.js → tabs-QC_e18gg.js} +1 -1
  256. package/dist/client/assets/{task-board-pB5Y0hMn.js → task-board-BpcFKojY.js} +1 -1
  257. package/dist/client/assets/task-route-CaaYbxyP.js +1 -0
  258. package/dist/client/assets/{task-status-CSzVGIzm.js → task-status-CtgvGjEg.js} +1 -1
  259. package/dist/client/assets/{taskboard-analytics-DGW4w9FB.js → taskboard-analytics-CkC7VEhH.js} +1 -1
  260. package/dist/client/assets/tasks-COTcKNjz.js +1 -0
  261. package/dist/client/assets/{tasks-BXROCEAf.js → tasks-D-EA-uwO.js} +1 -1
  262. package/dist/client/assets/{textarea-Da9tbVx7.js → textarea-MfQKTdum.js} +1 -1
  263. package/dist/client/assets/{thread-analytics-jc5WX2sb.js → thread-analytics-xc71V_Jy.js} +1 -1
  264. package/dist/client/assets/{thread-button-BGoWabG7.js → thread-button-RYt2155P.js} +1 -1
  265. package/dist/client/assets/{thread-intent-KcG0jvJo.js → thread-intent-y4sFV6nC.js} +1 -1
  266. package/dist/client/assets/{thread-route-I67M6zVK.js → thread-route-BRm6UAyi.js} +1 -1
  267. package/dist/client/assets/{thread-route-CrNJBu9Z.js → thread-route-ZX2rkhqS.js} +1 -1
  268. package/dist/client/assets/{thread-sheet-body-MIAAoZeF.js → thread-sheet-body-B9fTAvbI.js} +1 -1
  269. package/dist/client/assets/{toggle-group-CWERIeKx.js → toggle-group-B2CGQVNc.js} +1 -1
  270. package/dist/client/assets/{toolbar-icon-button-BQ4ZQSu9.js → toolbar-icon-button-CsZD8f-r.js} +1 -1
  271. package/dist/client/assets/{tooltip-C1he18et.js → tooltip-D555rgHk.js} +1 -1
  272. package/dist/client/assets/{track-Carz3f1c.js → track-DQPZdUAl.js} +1 -1
  273. package/dist/client/assets/{types-CJepGNea.js → types-C1FT5lJw.js} +1 -1
  274. package/dist/client/assets/{usage-stats-DW00xCiE.js → usage-stats-cLtXqoaq.js} +1 -1
  275. package/dist/client/assets/{use-ai-providers-B_uDPHx4.js → use-ai-providers-cz2PnRt5.js} +1 -1
  276. package/dist/client/assets/{use-automations-MXr63Elt.js → use-automations-BITjz5uS.js} +1 -1
  277. package/dist/client/assets/{use-autosave-DS6DEI0c.js → use-autosave-CXwSXrBr.js} +1 -1
  278. package/dist/client/assets/{use-chat-layout-state-B-w0TqPh.js → use-chat-layout-state-C_QstcMu.js} +1 -1
  279. package/dist/client/assets/{use-clock-tick-BxAer4Nn.js → use-clock-tick-Dx4PkWs4.js} +1 -1
  280. package/dist/client/assets/{use-connect-companion-B_aablGf.js → use-connect-companion-DdM71OKb.js} +1 -1
  281. package/dist/client/assets/{use-connection-Bxzd0HJT.js → use-connection-hMJ4m1KM.js} +1 -1
  282. package/dist/client/assets/{use-copy-DRzLqLAb.js → use-copy-D1Nm-kgX.js} +1 -1
  283. package/dist/client/assets/{use-create-virtual-mcp-B9dVaAK7.js → use-create-virtual-mcp-CHjD7uCu.js} +1 -1
  284. package/dist/client/assets/{use-date-fns-locale-Cz4lpYqP.js → use-date-fns-locale-Bp7nVQWs.js} +1 -1
  285. package/dist/client/assets/{use-debounced-autosave-Cmyk2rKG.js → use-debounced-autosave-SzIG02td.js} +1 -1
  286. package/dist/client/assets/{use-debounced-value-BDfI-sPg.js → use-debounced-value-DCwb28TF.js} +1 -1
  287. package/dist/client/assets/{use-deco-credits-Dr3QUmqQ.js → use-deco-credits-3BarR1a3.js} +1 -1
  288. package/dist/client/assets/{use-decopilot-events-wck0cVko.js → use-decopilot-events-CY9KSVWJ.js} +1 -1
  289. package/dist/client/assets/{use-delete-connection-Ch8H_X4I.js → use-delete-connection-B4ggOZlI.js} +1 -1
  290. package/dist/client/assets/{use-deployment-admin-bef_4H2t.js → use-deployment-admin-D9OrJmDH.js} +1 -1
  291. package/dist/client/assets/{use-fast-preview-draft-url-B6LJboyj.js → use-fast-preview-draft-url-QLdWZwPZ.js} +1 -1
  292. package/dist/client/assets/{use-file-configs-B-rmtKOK.js → use-file-configs-Dk0C1WSo.js} +1 -1
  293. package/dist/client/assets/{use-infinite-scroll-DZuBfYhD.js → use-infinite-scroll-DoBJIre7.js} +1 -1
  294. package/dist/client/assets/{use-join-requests-UioqYvHw.js → use-join-requests-51xqIM_A.js} +1 -1
  295. package/dist/client/assets/{use-main-panel-tabs-BwErZW6K.js → use-main-panel-tabs-DmvkA1OF.js} +1 -1
  296. package/dist/client/assets/{use-mcp-auth-status-Do2QZm9L.js → use-mcp-auth-status-CVLugyb-.js} +1 -1
  297. package/dist/client/assets/{use-mcp-client-COnRDE1N.js → use-mcp-client-alN3BSuJ.js} +1 -1
  298. package/dist/client/assets/{use-mcp-prompts-D6kpqd0T.js → use-mcp-prompts-C5SH_xGs.js} +1 -1
  299. package/dist/client/assets/{use-mcp-tools-jthd3Rd0.js → use-mcp-tools-s04xKOM2.js} +1 -1
  300. package/dist/client/assets/{use-members-CkNBEhUe.js → use-members-DF7c1t5_.js} +1 -1
  301. package/dist/client/assets/{use-mobile-9NhDeVlP.js → use-mobile-DEWonsbr.js} +1 -1
  302. package/dist/client/assets/{use-navigate-to-agent-DINkoobx.js → use-navigate-to-agent-MADN_glW.js} +1 -1
  303. package/dist/client/assets/use-new-blocks-editor-D6QRwqGF.js +1 -0
  304. package/dist/client/assets/{use-open-billing-url-DoBvvVEE.js → use-open-billing-url-CSK9y7YW.js} +1 -1
  305. package/dist/client/assets/{use-org-auth-client-3w2oRMXg.js → use-org-auth-client-CoFPUjTd.js} +1 -1
  306. package/dist/client/assets/{use-org-fs-D1ZsCp-k.js → use-org-fs-BQ9rCXmr.js} +1 -1
  307. package/dist/client/assets/{use-org-repo-syncs-BNvVEyTX.js → use-org-repo-syncs-CaR1Xa1F.js} +1 -1
  308. package/dist/client/assets/{use-org-sso-BJWlQYTu.js → use-org-sso-DzvTriO7.js} +1 -1
  309. package/dist/client/assets/{use-organization-roles-BgjgbvTH.js → use-organization-roles-DGclowcu.js} +1 -1
  310. package/dist/client/assets/{use-organization-settings-C5NCyvVD.js → use-organization-settings-BBoTt-lq.js} +1 -1
  311. package/dist/client/assets/{use-panel-navigate-D3_-3ULo.js → use-panel-navigate-yk7t3bcJ.js} +1 -1
  312. package/dist/client/assets/{use-project-scope-Cgetuc5v.js → use-project-scope-BxM698pt.js} +1 -1
  313. package/dist/client/assets/{use-releases-0U9GbBbc.js → use-releases-BwrUbxxj.js} +1 -1
  314. package/dist/client/assets/{use-reports-diagnostic-Bwcj9zK7.js → use-reports-diagnostic-CpCwaiXg.js} +1 -1
  315. package/dist/client/assets/{use-secrets-R8Tap4VY.js → use-secrets-BebZ2nF0.js} +1 -1
  316. package/dist/client/assets/{use-section-preview-base-C2CmSKKI.js → use-section-preview-base-Z5lePfkA.js} +1 -1
  317. package/dist/client/assets/{use-session-runtime-BGC0nV3W.js → use-session-runtime-Cgb0XGQC.js} +1 -1
  318. package/dist/client/assets/{use-tags-Bg5j1QlT.js → use-tags-D9QMq4tP.js} +1 -1
  319. package/dist/client/assets/{use-task-board-analytics-CjIlkwSI.js → use-task-board-analytics-jg77_cwt.js} +1 -1
  320. package/dist/client/assets/{use-task-board-events-wodqZnnT.js → use-task-board-events-gPs9mr0g.js} +1 -1
  321. package/dist/client/assets/{use-task-metadata-CtiuebFQ.js → use-task-metadata-DhhvrkSV.js} +1 -1
  322. package/dist/client/assets/{use-thread-analytics-CNI0VVVf.js → use-thread-analytics-DJFeqMXb.js} +1 -1
  323. package/dist/client/assets/{use-thread-outputs-l48Wu5jh.js → use-thread-outputs-CHJvnckm.js} +1 -1
  324. package/dist/client/assets/useInfiniteQuery-DWxFiM4L.js +1 -0
  325. package/dist/client/assets/{useQueries-BgbmDVzb.js → useQueries-Ckdgdjes.js} +1 -1
  326. package/dist/client/assets/useSuspenseInfiniteQuery-Cc2PctH-.js +1 -0
  327. package/dist/client/assets/{users-CuuvzgXl.js → users-BTZ7odtd.js} +1 -1
  328. package/dist/client/assets/{utils-BDOPgaMb.js → utils-BFq73cJ1.js} +1 -1
  329. package/dist/client/assets/variant-calendar-KMXxLfQ4.js +1 -0
  330. package/dist/client/assets/{variant-matcher-override-CQQJKk3b.js → variant-matcher-override-M6HMnoKw.js} +1 -1
  331. package/dist/client/assets/{view-mode-toggle-Dp-_utlA.js → view-mode-toggle-Bed1vKIv.js} +1 -1
  332. package/dist/client/assets/{virtual-mcp-D5QMxytx.js → virtual-mcp-DYlKBgbY.js} +1 -1
  333. package/dist/client/index.html +1 -1
  334. package/dist/server/cli.js +1 -1
  335. package/dist/server/server.js +1 -1
  336. package/package.json +1 -1
  337. package/dist/client/assets/agent-app-CWryStLp.js +0 -1
  338. package/dist/client/assets/agent-deck-1hNe0UfH.js +0 -1
  339. package/dist/client/assets/agent-library-C5witbkT.js +0 -1
  340. package/dist/client/assets/agent-library-file-DM3xkn-4.js +0 -1
  341. package/dist/client/assets/agent-overview-D3QLErbg.js +0 -1
  342. package/dist/client/assets/agent-settings-B4HC6tVf.js +0 -1
  343. package/dist/client/assets/agent-site-editor-code-ccdMrNae.js +0 -2
  344. package/dist/client/assets/agent-view-CwL0Ihke.js +0 -1
  345. package/dist/client/assets/api-keys-ClicNfxt.js +0 -1
  346. package/dist/client/assets/app-editor-B-3eao_i.js +0 -1
  347. package/dist/client/assets/category-editor-AJY0SMuG.js +0 -1
  348. package/dist/client/assets/config-BnXYxCUo.js +0 -1
  349. package/dist/client/assets/context-DzV3rzpW.js +0 -1
  350. package/dist/client/assets/flat-project-BZWINo8t.js +0 -1
  351. package/dist/client/assets/home-CaODs6J7.js +0 -1
  352. package/dist/client/assets/library-DbAhPtYr.js +0 -1
  353. package/dist/client/assets/post-calendar-Dfqfwp_c.js +0 -1
  354. package/dist/client/assets/project-app-view-Ci7wEdcu.js +0 -1
  355. package/dist/client/assets/project-feed-DpZMpeRT.js +0 -1
  356. package/dist/client/assets/project-reports-DE-0rcyS.js +0 -1
  357. package/dist/client/assets/project-tasks-BNyRFXYP.js +0 -1
  358. package/dist/client/assets/record-editor-D7BVOr7k.js +0 -1
  359. package/dist/client/assets/redirect-editor-DyPuscgG.js +0 -1
  360. package/dist/client/assets/reports-BxLGsxUd.js +0 -1
  361. package/dist/client/assets/reports-tab-D5bY459Y.js +0 -2
  362. package/dist/client/assets/rich-text-link-control-hBc2uTx7.js +0 -5
  363. package/dist/client/assets/route-BM-hTsDg.js +0 -1
  364. package/dist/client/assets/route-CcOcrij-.js +0 -1
  365. package/dist/client/assets/sections-editor-CYDtyAMS.js +0 -1
  366. package/dist/client/assets/seo-editor-CVsDdTJJ.js +0 -1
  367. package/dist/client/assets/task-route-dM3BzNeJ.js +0 -1
  368. package/dist/client/assets/tasks-BjNzn_32.js +0 -1
  369. package/dist/client/assets/use-new-blocks-editor-Ebux8YL4.js +0 -1
  370. package/dist/client/assets/useInfiniteQuery-DYqcvYaF.js +0 -1
  371. package/dist/client/assets/useSuspenseInfiniteQuery-BpUn49Al.js +0 -1
  372. package/dist/client/assets/variant-calendar-DSUsUR9c.js +0 -1
@@ -1 +1 @@
1
- import{c as at,b as rt,r as te,m as dt,j as s,n as yt,K as ye,o as ct,e as Qe,t as ae,B as V}from"./index-QvCrIW6i.js";import{C as kt}from"./collection-table-wrapper-CQxrxnX9.js";import{E as wt}from"./empty-state-CWduWzjT.js";import{S as Ft}from"./search-input-DlDEo9jW.js";import{I as lt}from"./input-dnKef9VJ.js";import{L as it}from"./label-Bn6aGS7S.js";import{u as Lt}from"./use-debounced-value-BDfI-sPg.js";import{D as ft,a as ut,b as gt,c as ht,d as xt,e as pt}from"./dialog-KYKWBSL1.js";import{S as bt,a as St,b as Nt,c as nt,d as Ct}from"./select-C4t2zfNW.js";import{S as At}from"./switch-BQeWPFJM.js";import{T as Tt}from"./textarea-Da9tbVx7.js";import{B as Be}from"./badge-we6p4hry.js";import{O as $t,D as Dt}from"./schema-qHqkHHod.js";import{S as Kt}from"./site-slug-DebpOoQq.js";import{a as Ee}from"./admin-fetch-CCSvjTk1.js";import{f as zt}from"./format-time-CjIPQhCN.js";import"./table-D-iIBiS4.js";import"./ArrowUp-DKlHzRUJ.js";import"./SearchMd-Cn3ttzXj.js";import"./X-B2rdTMzZ.js";import"./index-I0YWuNWN.js";import"./Check-Ck9dGdFT.js";import"./ChevronUp-DxC2mC66.js";import"./differenceInSeconds-C3x8sHUj.js";const Ut=["owner","admin","user"],Ot=Object.entries($t.shape).map(([i,e])=>({key:i,description:e.description??"",defaultOn:Dt.has(i)})),Pt=new Set(Ot.map(i=>i.key)),Et=/^(?=.{1,64}$)[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;function qt(i){const e={};for(const[l,t]of Object.entries(i)){if(typeof t!="boolean")return null;e[l]=t}return e}function Rt(i){const e=at.c(133),{org:l}=i,t=rt(),[a,$]=te.useState(!1),[m,k]=te.useState(null),[F,D]=te.useState(!1),[E,L]=te.useState(""),[d,_]=te.useState(null),[n,c]=te.useState(!1),[p,N]=te.useState(""),[v,j]=te.useState(null),C=ct();let h;e[0]!==l.id?(h=ye.deploymentAdminOrgFlags(l.id),e[0]=l.id,e[1]=h):h=e[1];let y;e[2]!==l.id?(y=()=>Ee(`/api/_admin/orgs/${l.id}/flags`),e[2]=l.id,e[3]=y):y=e[3];let u;e[4]!==a||e[5]!==h||e[6]!==y?(u={queryKey:h,queryFn:y,enabled:a},e[4]=a,e[5]=h,e[6]=y,e[7]=u):u=e[7];const{data:x,isLoading:w,isFetching:K,isError:o}=dt(u),g=w||K;let r;e[8]!==x?.effective?(r=x?.effective??{},e[8]=x?.effective,e[9]=r):r=e[9];const b=r;let M;e[10]!==x?.flags?(M=x?.flags??{},e[10]=x?.flags,e[11]=M):M=e[11];const S=m??M;let Y;e[12]!==l.id?(Y=je=>Ee(`/api/_admin/orgs/${l.id}/flags`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(je)}),e[12]=l.id,e[13]=Y):Y=e[13];let H;e[14]!==t?(H=je=>{ae.error(je instanceof Error?je.message:t("admin.orgs.failedSaveFlags"))},e[14]=t,e[15]=H):H=e[15];const O=Qe({mutationFn:Y,onSuccess:()=>{ae.success(t("admin.orgs.flagsSaved",{org:l.name})),C.invalidateQueries({queryKey:ye.deploymentAdminOrgFlags(l.id)}),R(),$(!1)},onError:H}),R=()=>{k(null),D(!1),L(""),_(null),c(!1),N(""),j(null)};let z;e[16]!==R?(z=je=>{$(je),je||R()},e[16]=R,e[17]=z):z=e[17];const T=z;let U,q,se,I,J,ne,X,ie,B,Q;if(e[18]!==S||e[19]!==m||e[20]!==b||e[21]!==T||e[22]!==g||e[23]!==o||e[24]!==n||e[25]!==p||e[26]!==O||e[27]!==E||e[28]!==d||e[29]!==a||e[30]!==l.name||e[31]!==F||e[32]!==t){const je=new Set(Pt),De=Ot.map(It);for(const P of Object.keys(S))je.has(P)||(je.add(P),De.push({key:P,description:"",defaultOn:!1,known:!1}));let ve;e[43]!==S?(ve=(P,ee)=>k({...S,[P]:ee}),e[43]=S,e[44]=ve):ve=e[44];const be=ve;let Se;e[45]!==S||e[46]!==E||e[47]!==be||e[48]!==t?(Se=()=>{const P=E.trim();if(!Et.test(P)){_(t("admin.orgs.invalidFlagKey"));return}if(Pt.has(P)||P in S){_(t("admin.orgs.duplicateFlagKey"));return}be(P,!0),L(""),_(null),D(!1)},e[45]=S,e[46]=E,e[47]=be,e[48]=t,e[49]=Se):Se=e[49];const Ve=Se;let Ne;e[50]!==S||e[51]!==n?(Ne=()=>{n||(N(JSON.stringify(S,null,2)),j(null),c(!0))},e[50]=S,e[51]=n,e[52]=Ne):Ne=e[52];const ke=Ne;let Fe,Ke;e[53]!==n||e[54]!==p||e[55]!==t?(Fe=()=>{if(!n)return;const P=Ke();if(!P){j(t("admin.orgs.invalidJson"));return}k(P),j(null),c(!1)},Ke=()=>{let P;try{P=JSON.parse(p)}catch{return null}if(!P||typeof P!="object"||Array.isArray(P))return null;const ee=Object.entries(P);for(const[we,Me]of ee)if(!Et.test(we)||typeof Me!="boolean")return null;return Object.fromEntries(ee)},e[53]=n,e[54]=p,e[55]=t,e[56]=Fe,e[57]=Ke):(Fe=e[56],Ke=e[57]);let Ce;e[58]!==S||e[59]!==m||e[60]!==T||e[61]!==n||e[62]!==O||e[63]!==Ke||e[64]!==t?(Ce=()=>{const P=n?Ke():qt(S);if(!P){j(t(n?"admin.orgs.invalidJson":"admin.orgs.invalidStoredValue"));return}if(j(null),m===null){T(!1);return}O.mutate({flags:P,mode:"replace"})},e[58]=S,e[59]=m,e[60]=T,e[61]=n,e[62]=O,e[63]=Ke,e[64]=t,e[65]=Ce):Ce=e[65],se=Ce,q=ft,X=a,ie=T;let me;e[66]!==t?(me=t("admin.orgs.flags"),e[66]=t,e[67]=me):me=e[67],e[68]!==me?(B=s.jsx(ut,{asChild:!0,children:s.jsx(V,{variant:"outline",size:"sm",children:me})}),e[68]=me,e[69]=B):B=e[69],U=gt,Q="sm:max-w-2xl";let fe;e[70]!==l.name||e[71]!==t?(fe=t("admin.orgs.flagsFor",{org:l.name}),e[70]=l.name,e[71]=t,e[72]=fe):fe=e[72],e[73]!==fe?(I=s.jsx(ht,{children:s.jsx(xt,{children:fe})}),e[73]=fe,e[74]=I):I=e[74];let ue;e[75]!==t?(ue=t("admin.orgs.flagsDescription"),e[75]=t,e[76]=ue):ue=e[76];let Le;e[77]!==ue?(Le=s.jsx("p",{className:"text-sm text-muted-foreground",children:ue}),e[77]=ue,e[78]=Le):Le=e[78];const Ae=n?"outline":"secondary";let ge;e[79]!==t?(ge=t("admin.orgs.flagsViewToggles"),e[79]=t,e[80]=ge):ge=e[80];let Te;e[81]!==Fe||e[82]!==o||e[83]!==Ae||e[84]!==ge?(Te=s.jsx(V,{variant:Ae,size:"sm",onClick:Fe,disabled:o,children:ge}),e[81]=Fe,e[82]=o,e[83]=Ae,e[84]=ge,e[85]=Te):Te=e[85];const Je=n?"secondary":"outline",$e=g||o;let he;e[86]!==t?(he=t("admin.orgs.flagsViewJson"),e[86]=t,e[87]=he):he=e[87];let xe;e[88]!==ke||e[89]!==Je||e[90]!==$e||e[91]!==he?(xe=s.jsx(V,{variant:Je,size:"sm",onClick:ke,disabled:$e,children:he}),e[88]=ke,e[89]=Je,e[90]=$e,e[91]=he,e[92]=xe):xe=e[92];let pe;e[93]!==Te||e[94]!==xe?(pe=s.jsxs("div",{className:"flex shrink-0 gap-1",children:[Te,xe]}),e[93]=Te,e[94]=xe,e[95]=pe):pe=e[95],e[96]!==Le||e[97]!==pe?(J=s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[Le,pe]}),e[96]=Le,e[97]=pe,e[98]=J):J=e[98],ne=o?s.jsx("p",{className:"text-sm text-destructive",children:t("admin.orgs.failedLoadFlags")}):n?s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:t("admin.orgs.jsonReplaceHint")}),s.jsx("textarea",{"aria-label":t("admin.orgs.jsonEditorLabel"),value:p,spellCheck:!1,disabled:O.isPending,onChange:P=>{N(P.target.value),j(null)},className:"h-64 w-full rounded-md border border-border bg-background p-3 font-mono text-sm text-foreground"})]}):s.jsxs("div",{className:"max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:[De.map(P=>{const{key:ee,description:we,defaultOn:Me,known:ot}=P,Pe=S[ee],qe=typeof Pe=="boolean"?Pe:b[ee]??!1,ze=Pe===void 0,Re=!ze&&typeof Pe!="boolean";return s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(At,{"aria-label":ee,checked:qe,disabled:g||O.isPending,onCheckedChange:Ie=>be(ee,Ie)}),s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("code",{className:"text-sm font-medium text-foreground",children:ee}),Me?s.jsx(Be,{variant:"secondary",size:"default",children:t("admin.orgs.flagDefaultOn")}):null,ot?null:s.jsx(Be,{variant:"warning",size:"default",children:t("admin.orgs.flagCustom")}),ze?s.jsx(Be,{variant:"outline",size:"default",children:t("admin.orgs.flagUnset")}):null,Re?s.jsx(Be,{variant:"destructive",size:"default",children:t("admin.orgs.flagInvalid")}):null]}),we?s.jsx("p",{className:"text-sm text-muted-foreground",children:we}):null]})]},ee)}),F?s.jsxs("div",{className:"space-y-1 border-t border-border pt-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(lt,{autoFocus:!0,"aria-label":t("admin.orgs.customFlagKeyLabel"),value:E,placeholder:t("admin.orgs.customFlagKeyPlaceholder"),onChange:P=>{L(P.target.value),_(null)},onKeyDown:P=>{P.key==="Enter"&&Ve()},className:"font-mono"}),s.jsx(V,{variant:"outline",onClick:Ve,children:t("admin.orgs.add")})]}),d?s.jsx("p",{className:"text-sm text-destructive",children:d}):null]}):s.jsx(V,{variant:"outline",size:"sm",disabled:g,onClick:()=>D(!0),children:t("admin.orgs.addCustomFlag")})]}),e[18]=S,e[19]=m,e[20]=b,e[21]=T,e[22]=g,e[23]=o,e[24]=n,e[25]=p,e[26]=O,e[27]=E,e[28]=d,e[29]=a,e[30]=l.name,e[31]=F,e[32]=t,e[33]=U,e[34]=q,e[35]=se,e[36]=I,e[37]=J,e[38]=ne,e[39]=X,e[40]=ie,e[41]=B,e[42]=Q}else U=e[33],q=e[34],se=e[35],I=e[36],J=e[37],ne=e[38],X=e[39],ie=e[40],B=e[41],Q=e[42];let Z;e[99]!==v?(Z=v?s.jsx("p",{className:"text-sm text-destructive",children:v}):null,e[99]=v,e[100]=Z):Z=e[100];let f;e[101]!==T?(f=()=>T(!1),e[101]=T,e[102]=f):f=e[102];const W=O.isPending;let G;e[103]!==t?(G=t("admin.orgs.cancel"),e[103]=t,e[104]=G):G=e[104];let re;e[105]!==O.isPending||e[106]!==f||e[107]!==G?(re=s.jsx(V,{variant:"outline",onClick:f,disabled:W,children:G}),e[105]=O.isPending,e[106]=f,e[107]=G,e[108]=re):re=e[108];const _e=g||o||O.isPending;let oe;e[109]!==O.isPending||e[110]!==t?(oe=O.isPending?t("admin.orgs.saving"):t("admin.orgs.save"),e[109]=O.isPending,e[110]=t,e[111]=oe):oe=e[111];let Oe;e[112]!==se||e[113]!==_e||e[114]!==oe?(Oe=s.jsx(V,{onClick:se,disabled:_e,children:oe}),e[112]=se,e[113]=_e,e[114]=oe,e[115]=Oe):Oe=e[115];let de;e[116]!==re||e[117]!==Oe?(de=s.jsxs(pt,{children:[re,Oe]}),e[116]=re,e[117]=Oe,e[118]=de):de=e[118];let ce;e[119]!==U||e[120]!==I||e[121]!==J||e[122]!==ne||e[123]!==Z||e[124]!==de||e[125]!==Q?(ce=s.jsxs(U,{className:Q,children:[I,J,ne,Z,de]}),e[119]=U,e[120]=I,e[121]=J,e[122]=ne,e[123]=Z,e[124]=de,e[125]=Q,e[126]=ce):ce=e[126];let Ue;return e[127]!==q||e[128]!==X||e[129]!==ie||e[130]!==B||e[131]!==ce?(Ue=s.jsxs(q,{open:X,onOpenChange:ie,children:[B,ce]}),e[127]=q,e[128]=X,e[129]=ie,e[130]=B,e[131]=ce,e[132]=Ue):Ue=e[132],Ue}function It(i){return{...i,known:!0}}class _t extends Error{constructor(e,l,t){super("owned_by_other_org"),this.slug=e,this.ownerName=l,this.ownerSlug=t,this.name="SiteConflictError"}slug;ownerName;ownerSlug}const vt="__own_site__";function Jt(i){const e=at.c(43),{org:l,sites:t}=i,a=rt(),$=ct();let m;e[0]!==l.id?(m=ye.deploymentAdminOrgProjects(l.id),e[0]=l.id,e[1]=m):m=e[1];let k;e[2]!==l.id?(k=()=>Ee(`/api/_admin/orgs/${l.id}/projects`),e[2]=l.id,e[3]=k):k=e[3];let F;e[4]!==m||e[5]!==k?(F={queryKey:m,queryFn:k},e[4]=m,e[5]=k,e[6]=F):F=e[6];const{data:D,isLoading:E,isError:L}=dt(F);let d;e[7]!==D?.projects?(d=D?.projects??[],e[7]=D?.projects,e[8]=d):d=e[8];const _=d;let n;e[9]!==l.id?(n=o=>Ee(`/api/_admin/orgs/${l.id}/projects/${encodeURIComponent(o.project.id)}/metadata`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({analyticsSiteSlug:o.slug})}),e[9]=l.id,e[10]=n):n=e[10];let c;e[11]!==l.id||e[12]!==$||e[13]!==a?(c=(o,g)=>{const{project:r,slug:b}=g;ae.success(b?a("admin.orgs.analyticsSiteSaved",{project:r.title,slug:b}):a("admin.orgs.analyticsSiteCleared",{project:r.title})),$.invalidateQueries({queryKey:ye.deploymentAdminOrgProjects(l.id)})},e[11]=l.id,e[12]=$,e[13]=a,e[14]=c):c=e[14];let p;e[15]!==a?(p=o=>{ae.error(o instanceof Error?o.message:a("admin.orgs.failedSaveAnalyticsSite"))},e[15]=a,e[16]=p):p=e[16];let N;e[17]!==n||e[18]!==c||e[19]!==p?(N={mutationFn:n,onSuccess:c,onError:p},e[17]=n,e[18]=c,e[19]=p,e[20]=N):N=e[20];const v=Qe(N);let j;e[21]!==t?(j=new Set(t.map(Qt)),e[21]=t,e[22]=j):j=e[22];const C=j;let h;e[23]!==a?(h=a("admin.orgs.projectAnalytics"),e[23]=a,e[24]=h):h=e[24];let y;e[25]!==h?(y=s.jsx("p",{className:"text-sm font-medium text-foreground",children:h}),e[25]=h,e[26]=y):y=e[26];let u;e[27]!==a?(u=a("admin.orgs.projectAnalyticsDescription"),e[27]=a,e[28]=u):u=e[28];let x;e[29]!==u?(x=s.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[29]=u,e[30]=x):x=e[30];let w;e[31]!==L||e[32]!==E||e[33]!==v||e[34]!==C||e[35]!==_||e[36]!==t||e[37]!==a?(w=L?s.jsx("p",{className:"text-sm text-destructive",children:a("admin.orgs.failedLoadProjects")}):E?s.jsx("p",{className:"text-sm text-muted-foreground",children:a("admin.orgs.loading")}):_.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:a("admin.orgs.noProjects")}):s.jsx("div",{className:"max-h-[30vh] space-y-2 overflow-y-auto pr-1",children:_.map(o=>{const g=o.metadata.analyticsSiteSlug,r=t.map(Bt).filter(b=>b!==o.siteSlug);return s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-2",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:o.title}),s.jsx("code",{className:"truncate text-xs text-muted-foreground",children:o.siteSlug})]}),s.jsxs(bt,{value:g??vt,disabled:v.isPending,onValueChange:b=>v.mutate({project:o,slug:b===vt?null:b}),children:[s.jsx(Nt,{className:"w-52 font-mono",children:s.jsx(St,{})}),s.jsxs(Ct,{children:[s.jsx(nt,{value:vt,children:a("admin.orgs.analyticsOwnSite",{slug:o.siteSlug})}),r.map(Mt),g&&!C.has(g)?s.jsx(nt,{value:g,disabled:!0,children:a("admin.orgs.analyticsSiteNotOwned",{slug:g})}):null]})]})]},o.id)})}),e[31]=L,e[32]=E,e[33]=v,e[34]=C,e[35]=_,e[36]=t,e[37]=a,e[38]=w):w=e[38];let K;return e[39]!==y||e[40]!==x||e[41]!==w?(K=s.jsxs("div",{className:"space-y-2 border-t border-border pt-3",children:[y,x,w]}),e[39]=y,e[40]=x,e[41]=w,e[42]=K):K=e[42],K}function Mt(i){return s.jsx(nt,{value:i,children:i},i)}function Bt(i){return i.slug}function Qt(i){return i.slug}function Vt(i){const e=at.c(91),{org:l}=i,t=rt(),[a,$]=te.useState(!1),[m,k]=te.useState(""),[F,D]=te.useState(null),[E,L]=te.useState(null),d=ct();let _;e[0]!==l.id?(_=ye.deploymentAdminOrgSites(l.id),e[0]=l.id,e[1]=_):_=e[1];let n;e[2]!==l.id?(n=()=>Ee(`/api/_admin/orgs/${l.id}/sites`),e[2]=l.id,e[3]=n):n=e[3];let c;e[4]!==a||e[5]!==_||e[6]!==n?(c={queryKey:_,queryFn:n,enabled:a},e[4]=a,e[5]=_,e[6]=n,e[7]=c):c=e[7];const{data:p,isLoading:N,isError:v}=dt(c);let j;e[8]!==p?.sites?(j=p?.sites??[],e[8]=p?.sites,e[9]=j):j=e[9];const C=j;let h;e[10]!==l.id||e[11]!==d?(h=()=>d.invalidateQueries({queryKey:ye.deploymentAdminOrgSites(l.id)}),e[10]=l.id,e[11]=d,e[12]=h):h=e[12];const y=h;let u;e[13]!==l.id?(u=async f=>{const W=await fetch(`/api/_admin/orgs/${l.id}/sites`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}),G=await W.json().catch(Ht);if(W.status===409&&G.error==="owned_by_other_org")throw new _t(f.slug,G.ownerOrganizationName??null,G.ownerOrganizationSlug??null);if(!W.ok)throw new Error(G.error||`Request failed (HTTP ${W.status})`);return G},e[13]=l.id,e[14]=u):u=e[14];let x;e[15]!==y||e[16]!==l.name||e[17]!==t?(x=(f,W)=>{ae.success(W.reassign?t("admin.orgs.siteReassigned",{slug:W.slug,org:l.name}):t("admin.orgs.siteAdded",{slug:W.slug,org:l.name})),y(),k(""),D(null),L(null)},e[15]=y,e[16]=l.name,e[17]=t,e[18]=x):x=e[18];let w;e[19]!==t?(w=f=>{if(f instanceof _t){L({slug:f.slug,ownerName:f.ownerName,ownerSlug:f.ownerSlug});return}ae.error(f instanceof Error?f.message:t("admin.orgs.failedAddSite"))},e[19]=t,e[20]=w):w=e[20];let K;e[21]!==u||e[22]!==x||e[23]!==w?(K={mutationFn:u,onSuccess:x,onError:w},e[21]=u,e[22]=x,e[23]=w,e[24]=K):K=e[24];const o=Qe(K);let g;e[25]!==l.id?(g=f=>Ee(`/api/_admin/orgs/${l.id}/sites/${encodeURIComponent(f)}`,{method:"DELETE"}),e[25]=l.id,e[26]=g):g=e[26];let r;e[27]!==y||e[28]!==l.id||e[29]!==l.name||e[30]!==d||e[31]!==t?(r=(f,W)=>{ae.success(t("admin.orgs.siteRemoved",{slug:W,org:l.name})),y(),d.invalidateQueries({queryKey:ye.deploymentAdminOrgProjects(l.id)})},e[27]=y,e[28]=l.id,e[29]=l.name,e[30]=d,e[31]=t,e[32]=r):r=e[32];let b;e[33]!==t?(b=f=>{ae.error(f instanceof Error?f.message:t("admin.orgs.failedRemoveSite"))},e[33]=t,e[34]=b):b=e[34];let M;e[35]!==g||e[36]!==r||e[37]!==b?(M={mutationFn:g,onSuccess:r,onError:b},e[35]=g,e[36]=r,e[37]=b,e[38]=M):M=e[38];const A=Qe(M),S=o.isPending||A.isPending;let Y;e[39]===Symbol.for("react.memo_cache_sentinel")?(Y=f=>{$(f),f||(k(""),D(null),L(null))},e[39]=Y):Y=e[39];const H=Y;let O;e[40]!==o||e[41]!==m||e[42]!==t?(O=()=>{const f=m.trim().toLowerCase();if(!Kt.test(f)){D(t("admin.orgs.invalidSiteSlug"));return}D(null),L(null),o.mutate({slug:f})},e[40]=o,e[41]=m,e[42]=t,e[43]=O):O=e[43];const R=O;let z;e[44]!==t?(z=t("admin.orgs.sites"),e[44]=t,e[45]=z):z=e[45];let T;e[46]!==z?(T=s.jsx(ut,{asChild:!0,children:s.jsx(V,{variant:"outline",size:"sm",children:z})}),e[46]=z,e[47]=T):T=e[47];let U;e[48]!==l.name||e[49]!==t?(U=t("admin.orgs.sitesFor",{org:l.name}),e[48]=l.name,e[49]=t,e[50]=U):U=e[50];let q;e[51]!==U?(q=s.jsx(ht,{children:s.jsx(xt,{children:U})}),e[51]=U,e[52]=q):q=e[52];let se;e[53]!==t?(se=t("admin.orgs.sitesDescription"),e[53]=t,e[54]=se):se=e[54];let I;e[55]!==se?(I=s.jsx("p",{className:"text-sm text-muted-foreground",children:se}),e[55]=se,e[56]=I):I=e[56];let J;e[57]!==F||e[58]!==o||e[59]!==S||e[60]!==E||e[61]!==R||e[62]!==v||e[63]!==N||e[64]!==m||e[65]!==A||e[66]!==C||e[67]!==t?(J=v?s.jsx("p",{className:"text-sm text-destructive",children:t("admin.orgs.failedLoadSites")}):s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"max-h-[45vh] space-y-2 overflow-y-auto pr-1",children:N?s.jsx("p",{className:"text-sm text-muted-foreground",children:t("admin.orgs.loading")}):C.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:t("admin.orgs.noSites")}):C.map(f=>s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-2",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[s.jsx("code",{className:"truncate text-sm font-medium text-foreground",children:f.slug}),s.jsx(Be,{variant:"outline",size:"default",children:f.source})]}),s.jsx(V,{variant:"ghost",size:"sm",disabled:S,onClick:()=>A.mutate(f.slug),children:t("admin.orgs.remove")})]},f.slug))}),s.jsxs("div",{className:"space-y-1 border-t border-border pt-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(lt,{value:m,placeholder:t("admin.orgs.siteSlugPlaceholder"),disabled:o.isPending,onChange:f=>{k(f.target.value),D(null),L(null)},onKeyDown:f=>{f.key==="Enter"&&R()},className:"font-mono"}),s.jsx(V,{variant:"outline",disabled:!m.trim()||o.isPending,onClick:R,children:t("admin.orgs.add")})]}),F?s.jsx("p",{className:"text-sm text-destructive",children:F}):null,E?s.jsxs("div",{className:"space-y-2 rounded-md border border-warning/50 bg-warning/10 p-3",children:[s.jsx("p",{className:"text-sm text-foreground",children:t("admin.orgs.siteReassignWarning",{slug:E.slug,owner:E.ownerName||E.ownerSlug||t("admin.orgs.anotherOrg")})}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(V,{variant:"outline",size:"sm",disabled:o.isPending,onClick:()=>L(null),children:t("admin.orgs.cancel")}),s.jsx(V,{variant:"destructive",size:"sm",disabled:o.isPending,onClick:()=>o.mutate({slug:E.slug,reassign:!0}),children:t("admin.orgs.reassignConfirm")})]})]}):null]})]}),e[57]=F,e[58]=o,e[59]=S,e[60]=E,e[61]=R,e[62]=v,e[63]=N,e[64]=m,e[65]=A,e[66]=C,e[67]=t,e[68]=J):J=e[68];let ne;e[69]!==v||e[70]!==N||e[71]!==a||e[72]!==l||e[73]!==C?(ne=a&&!N&&!v?s.jsx(Jt,{org:l,sites:C}):null,e[69]=v,e[70]=N,e[71]=a,e[72]=l,e[73]=C,e[74]=ne):ne=e[74];let X;e[75]===Symbol.for("react.memo_cache_sentinel")?(X=()=>H(!1),e[75]=X):X=e[75];let ie;e[76]!==t?(ie=t("admin.orgs.close"),e[76]=t,e[77]=ie):ie=e[77];let B;e[78]!==S||e[79]!==ie?(B=s.jsx(pt,{children:s.jsx(V,{variant:"outline",onClick:X,disabled:S,children:ie})}),e[78]=S,e[79]=ie,e[80]=B):B=e[80];let Q;e[81]!==q||e[82]!==I||e[83]!==J||e[84]!==ne||e[85]!==B?(Q=s.jsxs(gt,{className:"sm:max-w-lg",children:[q,I,J,ne,B]}),e[81]=q,e[82]=I,e[83]=J,e[84]=ne,e[85]=B,e[86]=Q):Q=e[86];let Z;return e[87]!==a||e[88]!==T||e[89]!==Q?(Z=s.jsxs(ft,{open:a,onOpenChange:H,children:[T,Q]}),e[87]=a,e[88]=T,e[89]=Q,e[90]=Z):Z=e[90],Z}function Ht(){return{}}function Wt(i){const e=at.c(214),{org:l}=i,t=rt(),[a,$]=te.useState(!1),[m,k]=te.useState(null),F=ct();let D;e[0]!==l.id?(D=ye.deploymentAdminOrgNotice(l.id),e[0]=l.id,e[1]=D):D=e[1];let E;e[2]!==l.id?(E=()=>Ee(`/api/_admin/orgs/${l.id}/notice`).then(Gt),e[2]=l.id,e[3]=E):E=e[3];let L;e[4]!==a||e[5]!==l.notice||e[6]!==D||e[7]!==E?(L={queryKey:D,queryFn:E,enabled:a,initialData:l.notice},e[4]=a,e[5]=l.notice,e[6]=D,e[7]=E,e[8]=L):L=e[8];const{data:d}=dt(L);let _;e[9]!==m||e[10]!==d?.ctaLabel||e[11]!==d?.ctaUrl||e[12]!==d?.message||e[13]!==d?.severity||e[14]!==d?.title?(_=m??{severity:d?.severity??"warn",title:d?.title??"",message:d?.message??"",ctaLabel:d?.ctaLabel??"",ctaUrl:d?.ctaUrl??""},e[9]=m,e[10]=d?.ctaLabel,e[11]=d?.ctaUrl,e[12]=d?.message,e[13]=d?.severity,e[14]=d?.title,e[15]=_):_=e[15];const n=_;let c;e[16]!==l.id||e[17]!==F?(c=()=>{F.invalidateQueries({queryKey:ye.deploymentAdminOrgNotice(l.id)}),F.invalidateQueries({queryKey:ye.deploymentAdminOrgsList()})},e[16]=l.id,e[17]=F,e[18]=c):c=e[18];const p=c;let N;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{k(null),$(!1)},e[19]=N):N=e[19];const v=N;let j;e[20]!==n.ctaLabel||e[21]!==n.ctaUrl||e[22]!==n.message||e[23]!==n.severity||e[24]!==n.title||e[25]!==l.id?(j=()=>Ee(`/api/_admin/orgs/${l.id}/notice`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({severity:n.severity,title:n.title.trim(),message:n.message.trim(),ctaLabel:n.ctaLabel?.trim()||null,ctaUrl:n.ctaUrl?.trim()||null})}),e[20]=n.ctaLabel,e[21]=n.ctaUrl,e[22]=n.message,e[23]=n.severity,e[24]=n.title,e[25]=l.id,e[26]=j):j=e[26];let C;e[27]!==p||e[28]!==l.name||e[29]!==t?(C=()=>{ae.success(t("admin.orgs.noticeSaved",{org:l.name})),p(),v()},e[27]=p,e[28]=l.name,e[29]=t,e[30]=C):C=e[30];let h;e[31]!==t?(h=le=>{ae.error(le instanceof Error?le.message:t("admin.orgs.failedSaveNotice"))},e[31]=t,e[32]=h):h=e[32];let y;e[33]!==j||e[34]!==C||e[35]!==h?(y={mutationFn:j,onSuccess:C,onError:h},e[33]=j,e[34]=C,e[35]=h,e[36]=y):y=e[36];const u=Qe(y);let x;e[37]!==l.id?(x=()=>Ee(`/api/_admin/orgs/${l.id}/notice`,{method:"DELETE"}),e[37]=l.id,e[38]=x):x=e[38];let w;e[39]!==p||e[40]!==l.name||e[41]!==t?(w=()=>{ae.success(t("admin.orgs.noticeCleared",{org:l.name})),p(),v()},e[39]=p,e[40]=l.name,e[41]=t,e[42]=w):w=e[42];let K;e[43]!==t?(K=le=>{ae.error(le instanceof Error?le.message:t("admin.orgs.failedClearNotice"))},e[43]=t,e[44]=K):K=e[44];let o;e[45]!==x||e[46]!==w||e[47]!==K?(o={mutationFn:x,onSuccess:w,onError:K},e[45]=x,e[46]=w,e[47]=K,e[48]=o):o=e[48];const g=Qe(o),r=u.isPending||g.isPending;let b;e[49]!==n.ctaLabel?(b=n.ctaLabel?.trim(),e[49]=n.ctaLabel,e[50]=b):b=e[50];let M;e[51]!==n.ctaUrl?(M=n.ctaUrl?.trim(),e[51]=n.ctaUrl,e[52]=M):M=e[52];const A=!b!=!M;let S;e[53]!==A||e[54]!==n.message||e[55]!==n.title?(S=!!n.title.trim()&&!!n.message.trim()&&!A,e[53]=A,e[54]=n.message,e[55]=n.title,e[56]=S):S=e[56];const Y=S;let H;e[57]===Symbol.for("react.memo_cache_sentinel")?(H=le=>le?$(!0):v(),e[57]=H):H=e[57];let O;e[58]!==t?(O=t("admin.orgs.notice"),e[58]=t,e[59]=O):O=e[59];let R;e[60]!==O?(R=s.jsx(ut,{asChild:!0,children:s.jsx(V,{variant:"outline",size:"sm",children:O})}),e[60]=O,e[61]=R):R=e[61];let z;e[62]!==l.name||e[63]!==t?(z=t("admin.orgs.noticeFor",{org:l.name}),e[62]=l.name,e[63]=t,e[64]=z):z=e[64];let T;e[65]!==z?(T=s.jsx(ht,{children:s.jsx(xt,{children:z})}),e[65]=z,e[66]=T):T=e[66];let U;e[67]!==t?(U=t("admin.orgs.noticeDescription"),e[67]=t,e[68]=U):U=e[68];let q;e[69]!==U?(q=s.jsx("p",{className:"text-sm text-muted-foreground",children:U}),e[69]=U,e[70]=q):q=e[70];const se=`notice-severity-${l.id}`;let I;e[71]!==t?(I=t("admin.orgs.noticeSeverity"),e[71]=t,e[72]=I):I=e[72];let J;e[73]!==se||e[74]!==I?(J=s.jsx(it,{htmlFor:se,children:I}),e[73]=se,e[74]=I,e[75]=J):J=e[75];const ne=n.severity;let X;e[76]!==n?(X=le=>k({...n,severity:le}),e[76]=n,e[77]=X):X=e[77];const ie=`notice-severity-${l.id}`;let B;e[78]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(St,{}),e[78]=B):B=e[78];let Q;e[79]!==ie?(Q=s.jsx(Nt,{id:ie,className:"w-full",children:B}),e[79]=ie,e[80]=Q):Q=e[80];let Z;e[81]!==t?(Z=t("admin.orgs.noticeSeverityWarn"),e[81]=t,e[82]=Z):Z=e[82];let f;e[83]!==Z?(f=s.jsx(nt,{value:"warn",children:Z}),e[83]=Z,e[84]=f):f=e[84];let W;e[85]!==t?(W=t("admin.orgs.noticeSeverityBlock"),e[85]=t,e[86]=W):W=e[86];let G;e[87]!==W?(G=s.jsx(nt,{value:"block",children:W}),e[87]=W,e[88]=G):G=e[88];let re;e[89]!==f||e[90]!==G?(re=s.jsxs(Ct,{children:[f,G]}),e[89]=f,e[90]=G,e[91]=re):re=e[91];let _e;e[92]!==n.severity||e[93]!==r||e[94]!==X||e[95]!==Q||e[96]!==re?(_e=s.jsxs(bt,{value:ne,onValueChange:X,disabled:r,children:[Q,re]}),e[92]=n.severity,e[93]=r,e[94]=X,e[95]=Q,e[96]=re,e[97]=_e):_e=e[97];let oe;e[98]!==J||e[99]!==_e?(oe=s.jsxs("div",{className:"space-y-2",children:[J,_e]}),e[98]=J,e[99]=_e,e[100]=oe):oe=e[100];const Oe=`notice-title-${l.id}`;let de;e[101]!==t?(de=t("admin.orgs.noticeTitle"),e[101]=t,e[102]=de):de=e[102];let ce;e[103]!==Oe||e[104]!==de?(ce=s.jsx(it,{htmlFor:Oe,children:de}),e[103]=Oe,e[104]=de,e[105]=ce):ce=e[105];const Ue=`notice-title-${l.id}`,je=n.title;let De;e[106]!==n?(De=le=>k({...n,title:le.target.value}),e[106]=n,e[107]=De):De=e[107];let ve;e[108]!==t?(ve=t("admin.orgs.noticeTitlePlaceholder"),e[108]=t,e[109]=ve):ve=e[109];let be;e[110]!==n.title||e[111]!==r||e[112]!==Ue||e[113]!==De||e[114]!==ve?(be=s.jsx(lt,{id:Ue,value:je,onChange:De,placeholder:ve,disabled:r}),e[110]=n.title,e[111]=r,e[112]=Ue,e[113]=De,e[114]=ve,e[115]=be):be=e[115];let Se;e[116]!==ce||e[117]!==be?(Se=s.jsxs("div",{className:"space-y-2",children:[ce,be]}),e[116]=ce,e[117]=be,e[118]=Se):Se=e[118];const Ve=`notice-message-${l.id}`;let Ne;e[119]!==t?(Ne=t("admin.orgs.noticeMessage"),e[119]=t,e[120]=Ne):Ne=e[120];let ke;e[121]!==Ve||e[122]!==Ne?(ke=s.jsx(it,{htmlFor:Ve,children:Ne}),e[121]=Ve,e[122]=Ne,e[123]=ke):ke=e[123];const Fe=`notice-message-${l.id}`,Ke=n.message;let Ce;e[124]!==n?(Ce=le=>k({...n,message:le.target.value}),e[124]=n,e[125]=Ce):Ce=e[125];let me;e[126]!==t?(me=t("admin.orgs.noticeMessagePlaceholder"),e[126]=t,e[127]=me):me=e[127];let fe;e[128]!==n.message||e[129]!==r||e[130]!==Fe||e[131]!==Ce||e[132]!==me?(fe=s.jsx(Tt,{id:Fe,value:Ke,onChange:Ce,placeholder:me,rows:4,disabled:r}),e[128]=n.message,e[129]=r,e[130]=Fe,e[131]=Ce,e[132]=me,e[133]=fe):fe=e[133];let ue;e[134]!==ke||e[135]!==fe?(ue=s.jsxs("div",{className:"space-y-2",children:[ke,fe]}),e[134]=ke,e[135]=fe,e[136]=ue):ue=e[136];const Le=`notice-cta-label-${l.id}`;let Ae;e[137]!==t?(Ae=t("admin.orgs.noticeCtaLabel"),e[137]=t,e[138]=Ae):Ae=e[138];let ge;e[139]!==Le||e[140]!==Ae?(ge=s.jsx(it,{htmlFor:Le,children:Ae}),e[139]=Le,e[140]=Ae,e[141]=ge):ge=e[141];const Te=`notice-cta-label-${l.id}`,Je=n.ctaLabel??"";let $e;e[142]!==n?($e=le=>k({...n,ctaLabel:le.target.value}),e[142]=n,e[143]=$e):$e=e[143];let he;e[144]!==t?(he=t("admin.orgs.noticeCtaLabelPlaceholder"),e[144]=t,e[145]=he):he=e[145];let xe;e[146]!==r||e[147]!==Te||e[148]!==Je||e[149]!==$e||e[150]!==he?(xe=s.jsx(lt,{id:Te,value:Je,onChange:$e,placeholder:he,disabled:r}),e[146]=r,e[147]=Te,e[148]=Je,e[149]=$e,e[150]=he,e[151]=xe):xe=e[151];let pe;e[152]!==ge||e[153]!==xe?(pe=s.jsxs("div",{className:"space-y-2",children:[ge,xe]}),e[152]=ge,e[153]=xe,e[154]=pe):pe=e[154];const P=`notice-cta-url-${l.id}`;let ee;e[155]!==t?(ee=t("admin.orgs.noticeCtaUrl"),e[155]=t,e[156]=ee):ee=e[156];let we;e[157]!==P||e[158]!==ee?(we=s.jsx(it,{htmlFor:P,children:ee}),e[157]=P,e[158]=ee,e[159]=we):we=e[159];const Me=`notice-cta-url-${l.id}`,ot=n.ctaUrl??"";let Pe;e[160]!==n?(Pe=le=>k({...n,ctaUrl:le.target.value}),e[160]=n,e[161]=Pe):Pe=e[161];let qe;e[162]!==r||e[163]!==Me||e[164]!==ot||e[165]!==Pe?(qe=s.jsx(lt,{id:Me,value:ot,onChange:Pe,placeholder:"https://...",disabled:r}),e[162]=r,e[163]=Me,e[164]=ot,e[165]=Pe,e[166]=qe):qe=e[166];let ze;e[167]!==we||e[168]!==qe?(ze=s.jsxs("div",{className:"space-y-2",children:[we,qe]}),e[167]=we,e[168]=qe,e[169]=ze):ze=e[169];let Re;e[170]!==pe||e[171]!==ze?(Re=s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[pe,ze]}),e[170]=pe,e[171]=ze,e[172]=Re):Re=e[172];let Ie;e[173]!==A||e[174]!==t?(Ie=A?s.jsx("p",{className:"text-sm text-destructive",children:t("admin.orgs.noticeCtaIncomplete")}):null,e[173]=A,e[174]=t,e[175]=Ie):Ie=e[175];let He;e[176]!==q||e[177]!==oe||e[178]!==Se||e[179]!==ue||e[180]!==Re||e[181]!==Ie?(He=s.jsxs("div",{className:"space-y-4",children:[q,oe,Se,ue,Re,Ie]}),e[176]=q,e[177]=oe,e[178]=Se,e[179]=ue,e[180]=Re,e[181]=Ie,e[182]=He):He=e[182];let We;e[183]!==g||e[184]!==r||e[185]!==d||e[186]!==t?(We=d?s.jsx(V,{variant:"outline",onClick:()=>g.mutate(),disabled:r,children:t("admin.orgs.noticeClear")}):null,e[183]=g,e[184]=r,e[185]=d,e[186]=t,e[187]=We):We=e[187];let Ge;e[188]!==t?(Ge=t("admin.orgs.cancel"),e[188]=t,e[189]=Ge):Ge=e[189];let Ye;e[190]!==r||e[191]!==Ge?(Ye=s.jsx(V,{variant:"outline",onClick:v,disabled:r,children:Ge}),e[190]=r,e[191]=Ge,e[192]=Ye):Ye=e[192];let Xe;e[193]!==u?(Xe=()=>u.mutate(),e[193]=u,e[194]=Xe):Xe=e[194];const jt=!Y||r;let Ze;e[195]!==u.isPending||e[196]!==t?(Ze=u.isPending?t("admin.orgs.noticeSaving"):t("admin.orgs.noticeSave"),e[195]=u.isPending,e[196]=t,e[197]=Ze):Ze=e[197];let et;e[198]!==Xe||e[199]!==jt||e[200]!==Ze?(et=s.jsx(V,{onClick:Xe,disabled:jt,children:Ze}),e[198]=Xe,e[199]=jt,e[200]=Ze,e[201]=et):et=e[201];let tt;e[202]!==We||e[203]!==Ye||e[204]!==et?(tt=s.jsxs(pt,{children:[We,Ye,et]}),e[202]=We,e[203]=Ye,e[204]=et,e[205]=tt):tt=e[205];let st;e[206]!==T||e[207]!==He||e[208]!==tt?(st=s.jsxs(gt,{className:"sm:max-w-lg",children:[T,He,tt]}),e[206]=T,e[207]=He,e[208]=tt,e[209]=st):st=e[209];let mt;return e[210]!==a||e[211]!==R||e[212]!==st?(mt=s.jsxs(ft,{open:a,onOpenChange:H,children:[R,st]}),e[210]=a,e[211]=R,e[212]=st,e[213]=mt):mt=e[213],mt}function Gt(i){return i.notice}function Yt(i){const e=at.c(75),{org:l}=i,t=rt(),[a,$]=te.useState(!1),[m,k]=te.useState(""),[F,D]=te.useState("user"),E=ct();let L;e[0]!==m||e[1]!==l.id||e[2]!==F?(L=()=>Ee(`/api/_admin/orgs/${l.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:m.trim(),role:F})}),e[0]=m,e[1]=l.id,e[2]=F,e[3]=L):L=e[3];let d;e[4]!==m||e[5]!==l.name||e[6]!==E||e[7]!==t?(d=()=>{ae.success(t("admin.orgs.memberAdded",{email:m.trim(),org:l.name})),E.invalidateQueries({queryKey:ye.deploymentAdminOrgsList()}),$(!1),k(""),D("user")},e[4]=m,e[5]=l.name,e[6]=E,e[7]=t,e[8]=d):d=e[8];let _;e[9]!==t?(_=q=>{ae.error(q instanceof Error?q.message:t("admin.orgs.failedAddMember"))},e[9]=t,e[10]=_):_=e[10];let n;e[11]!==L||e[12]!==d||e[13]!==_?(n={mutationFn:L,onSuccess:d,onError:_},e[11]=L,e[12]=d,e[13]=_,e[14]=n):n=e[14];const c=Qe(n);let p;e[15]!==t?(p=t("admin.orgs.addMember"),e[15]=t,e[16]=p):p=e[16];let N;e[17]!==p?(N=s.jsx(ut,{asChild:!0,children:s.jsx(V,{variant:"outline",size:"sm",children:p})}),e[17]=p,e[18]=N):N=e[18];let v;e[19]!==l.name||e[20]!==t?(v=t("admin.orgs.addMemberTo",{org:l.name}),e[19]=l.name,e[20]=t,e[21]=v):v=e[21];let j;e[22]!==v?(j=s.jsx(ht,{children:s.jsx(xt,{children:v})}),e[22]=v,e[23]=j):j=e[23];let C;e[24]!==t?(C=t("admin.orgs.email"),e[24]=t,e[25]=C):C=e[25];let h;e[26]!==C?(h=s.jsx(it,{htmlFor:"admin-add-member-email",children:C}),e[26]=C,e[27]=h):h=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=q=>k(q.target.value),e[28]=y):y=e[28];let u;e[29]!==t?(u=t("admin.orgs.emailPlaceholder"),e[29]=t,e[30]=u):u=e[30];let x;e[31]!==m||e[32]!==c.isPending||e[33]!==u?(x=s.jsx(lt,{id:"admin-add-member-email",type:"email",value:m,onChange:y,placeholder:u,disabled:c.isPending}),e[31]=m,e[32]=c.isPending,e[33]=u,e[34]=x):x=e[34];let w;e[35]!==h||e[36]!==x?(w=s.jsxs("div",{className:"space-y-2",children:[h,x]}),e[35]=h,e[36]=x,e[37]=w):w=e[37];let K;e[38]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Nt,{className:"w-full",children:s.jsx(St,{})}),e[38]=K):K=e[38];let o;e[39]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ct,{children:Ut.map(Xt)}),e[39]=o):o=e[39];let g;e[40]!==c.isPending||e[41]!==F?(g=s.jsxs(bt,{value:F,onValueChange:D,disabled:c.isPending,children:[K,o]}),e[40]=c.isPending,e[41]=F,e[42]=g):g=e[42];let r;e[43]!==w||e[44]!==g?(r=s.jsxs("div",{className:"space-y-4",children:[w,g]}),e[43]=w,e[44]=g,e[45]=r):r=e[45];let b;e[46]===Symbol.for("react.memo_cache_sentinel")?(b=()=>$(!1),e[46]=b):b=e[46];const M=c.isPending;let A;e[47]!==t?(A=t("admin.orgs.cancel"),e[47]=t,e[48]=A):A=e[48];let S;e[49]!==c.isPending||e[50]!==A?(S=s.jsx(V,{variant:"outline",onClick:b,disabled:M,children:A}),e[49]=c.isPending,e[50]=A,e[51]=S):S=e[51];let Y;e[52]!==c?(Y=()=>c.mutate(),e[52]=c,e[53]=Y):Y=e[53];let H;e[54]!==m||e[55]!==c.isPending?(H=!m.trim()||c.isPending,e[54]=m,e[55]=c.isPending,e[56]=H):H=e[56];let O;e[57]!==c.isPending||e[58]!==t?(O=c.isPending?t("admin.orgs.adding"):t("admin.orgs.addMember"),e[57]=c.isPending,e[58]=t,e[59]=O):O=e[59];let R;e[60]!==Y||e[61]!==H||e[62]!==O?(R=s.jsx(V,{onClick:Y,disabled:H,children:O}),e[60]=Y,e[61]=H,e[62]=O,e[63]=R):R=e[63];let z;e[64]!==S||e[65]!==R?(z=s.jsxs(pt,{children:[S,R]}),e[64]=S,e[65]=R,e[66]=z):z=e[66];let T;e[67]!==r||e[68]!==z||e[69]!==j?(T=s.jsxs(gt,{className:"sm:max-w-md",children:[j,r,z]}),e[67]=r,e[68]=z,e[69]=j,e[70]=T):T=e[70];let U;return e[71]!==a||e[72]!==T||e[73]!==N?(U=s.jsxs(ft,{open:a,onOpenChange:$,children:[N,T]}),e[71]=a,e[72]=T,e[73]=N,e[74]=U):U=e[74],U}function Xt(i){return s.jsx(nt,{value:i,children:s.jsx("span",{className:"capitalize",children:i})},i)}function Ps(){const i=at.c(56),e=rt(),[l,t]=te.useState("");let a;i[0]!==l?(a=l.trim(),i[0]=l,i[1]=a):a=i[1];const $=Lt(a,300);let m;i[2]!==$?(m=ye.deploymentAdminOrgs($),i[2]=$,i[3]=m):m=i[3];let k;i[4]!==$?(k=()=>{const A=new URLSearchParams({limit:"100"});return $&&A.set("search",$),Ee(`/api/_admin/orgs?${A}`)},i[4]=$,i[5]=k):k=i[5];let F;i[6]!==m||i[7]!==k?(F={queryKey:m,queryFn:k},i[6]=m,i[7]=k,i[8]=F):F=i[8];const{data:D,isLoading:E,isError:L}=dt(F);let d;i[9]!==D?.organizations?(d=D?.organizations??[],i[9]=D?.organizations,i[10]=d):d=i[10];const _=d;let n;i[11]!==e?(n=e("admin.orgs.organization"),i[11]=e,i[12]=n):n=i[12];let c;i[13]!==e?(c=A=>s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:A.name}),A.archived?s.jsx(Be,{variant:"outline",className:"shrink-0",children:e("admin.orgs.archived")}):null]}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:A.slug})]}),i[13]=e,i[14]=c):c=i[14];let p;i[15]!==n||i[16]!==c?(p={id:"name",header:n,render:c,cellClassName:"flex-1 min-w-0"},i[15]=n,i[16]=c,i[17]=p):p=i[17];let N;i[18]!==e?(N=e("admin.orgs.notice"),i[18]=e,i[19]=N):N=i[19];let v;i[20]!==e?(v=A=>A.notice?s.jsx(Be,{variant:A.notice.severity==="block"?"destructive":"outline",children:A.notice.severity==="block"?e("admin.orgs.noticeSeverityBlock"):e("admin.orgs.noticeSeverityWarn")}):s.jsx("span",{className:"text-sm text-muted-foreground",children:"—"}),i[20]=e,i[21]=v):v=i[21];let j;i[22]!==N||i[23]!==v?(j={id:"notice",header:N,render:v,cellClassName:"w-28 shrink-0"},i[22]=N,i[23]=v,i[24]=j):j=i[24];let C;i[25]!==e?(C=e("admin.orgs.members"),i[25]=e,i[26]=C):C=i[26];let h;i[27]!==C?(h={id:"members",header:C,render:ts,cellClassName:"w-24 shrink-0"},i[27]=C,i[28]=h):h=i[28];let y;i[29]!==e?(y=e("admin.orgs.created"),i[29]=e,i[30]=y):y=i[30];let u;i[31]!==y?(u={id:"created",header:y,render:es,cellClassName:"w-48 shrink-0"},i[31]=y,i[32]=u):u=i[32];let x;i[33]===Symbol.for("react.memo_cache_sentinel")?(x={id:"actions",header:"",render:Zt,cellClassName:"w-auto shrink-0"},i[33]=x):x=i[33];let w;i[34]!==j||i[35]!==h||i[36]!==u||i[37]!==p?(w=[p,j,h,u,x],i[34]=j,i[35]=h,i[36]=u,i[37]=p,i[38]=w):w=i[38];const K=w;let o;i[39]!==e?(o=e("admin.orgs.searchPlaceholder"),i[39]=e,i[40]=o):o=i[40];let g;i[41]!==l||i[42]!==o?(g=s.jsx(Ft,{value:l,onChange:t,placeholder:o,className:"w-full md:w-[375px]"}),i[41]=l,i[42]=o,i[43]=g):g=i[43];let r;i[44]!==$||i[45]!==L||i[46]!==e?(r=L?s.jsx(wt,{title:e("admin.orgs.failedLoadOrgs"),description:e("admin.orgs.failedLoadOrgsDescription")}):s.jsx(wt,{title:e("admin.orgs.noOrgsFound"),description:$?e("admin.orgs.noOrgsMatchSearch",{search:$}):e("admin.orgs.noOrgsYet")}),i[44]=$,i[45]=L,i[46]=e,i[47]=r):r=i[47];let b;i[48]!==K||i[49]!==E||i[50]!==_||i[51]!==r?(b=s.jsx(kt,{columns:K,data:_,isLoading:E,emptyState:r}),i[48]=K,i[49]=E,i[50]=_,i[51]=r,i[52]=b):b=i[52];let M;return i[53]!==g||i[54]!==b?(M=s.jsx(yt,{children:s.jsx(yt.Content,{children:s.jsx(yt.Container,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[g,b]})})})}),i[53]=g,i[54]=b,i[55]=M):M=i[55],M}function Zt(i){return s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx(Rt,{org:i}),s.jsx(Vt,{org:i}),s.jsx(Wt,{org:i}),s.jsx(Yt,{org:i})]})}function es(i){return s.jsx("span",{className:"text-sm text-foreground",children:zt(i.createdAt)})}function ts(i){return s.jsx("span",{className:"text-sm text-foreground",children:i.memberCount})}export{Ps as default};
1
+ import{c as at,b as rt,r as te,m as dt,j as s,n as yt,K as ye,o as ct,e as Qe,t as ae,B as V}from"./index-BDhW9xxN.js";import{C as kt}from"./collection-table-wrapper-SA5bpKVN.js";import{E as wt}from"./empty-state-ClSZs1JG.js";import{S as Ft}from"./search-input-BSOQ3ySE.js";import{I as lt}from"./input-DrKcGYrl.js";import{L as it}from"./label-uTNaIuWI.js";import{u as Lt}from"./use-debounced-value-DCwb28TF.js";import{D as ft,a as ut,b as gt,c as ht,d as xt,e as pt}from"./dialog-BGB8jiGJ.js";import{S as bt,a as St,b as Nt,c as nt,d as Ct}from"./select-B6DzqJiH.js";import{S as At}from"./switch-Ay_EsHPF.js";import{T as Tt}from"./textarea-MfQKTdum.js";import{B as Be}from"./badge-CWkPL4_H.js";import{O as $t,D as Dt}from"./schema-B4_xo1tD.js";import{S as Kt}from"./site-slug-DebpOoQq.js";import{a as Ee}from"./admin-fetch-CCSvjTk1.js";import{f as zt}from"./format-time-CjIPQhCN.js";import"./table-BDAYwSIe.js";import"./ArrowUp-BiSVkN3f.js";import"./SearchMd-CRK8FN15.js";import"./X-B8pJz_49.js";import"./index-Bjctp948.js";import"./Check-BIm8oPAI.js";import"./ChevronUp-CW9NwQNu.js";import"./differenceInSeconds-C3x8sHUj.js";const Ut=["owner","admin","user"],Ot=Object.entries($t.shape).map(([i,e])=>({key:i,description:e.description??"",defaultOn:Dt.has(i)})),Pt=new Set(Ot.map(i=>i.key)),Et=/^(?=.{1,64}$)[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;function qt(i){const e={};for(const[l,t]of Object.entries(i)){if(typeof t!="boolean")return null;e[l]=t}return e}function Rt(i){const e=at.c(133),{org:l}=i,t=rt(),[a,$]=te.useState(!1),[m,k]=te.useState(null),[F,D]=te.useState(!1),[E,L]=te.useState(""),[d,_]=te.useState(null),[n,c]=te.useState(!1),[p,N]=te.useState(""),[v,j]=te.useState(null),C=ct();let h;e[0]!==l.id?(h=ye.deploymentAdminOrgFlags(l.id),e[0]=l.id,e[1]=h):h=e[1];let y;e[2]!==l.id?(y=()=>Ee(`/api/_admin/orgs/${l.id}/flags`),e[2]=l.id,e[3]=y):y=e[3];let u;e[4]!==a||e[5]!==h||e[6]!==y?(u={queryKey:h,queryFn:y,enabled:a},e[4]=a,e[5]=h,e[6]=y,e[7]=u):u=e[7];const{data:x,isLoading:w,isFetching:K,isError:o}=dt(u),g=w||K;let r;e[8]!==x?.effective?(r=x?.effective??{},e[8]=x?.effective,e[9]=r):r=e[9];const b=r;let M;e[10]!==x?.flags?(M=x?.flags??{},e[10]=x?.flags,e[11]=M):M=e[11];const S=m??M;let Y;e[12]!==l.id?(Y=je=>Ee(`/api/_admin/orgs/${l.id}/flags`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(je)}),e[12]=l.id,e[13]=Y):Y=e[13];let H;e[14]!==t?(H=je=>{ae.error(je instanceof Error?je.message:t("admin.orgs.failedSaveFlags"))},e[14]=t,e[15]=H):H=e[15];const O=Qe({mutationFn:Y,onSuccess:()=>{ae.success(t("admin.orgs.flagsSaved",{org:l.name})),C.invalidateQueries({queryKey:ye.deploymentAdminOrgFlags(l.id)}),R(),$(!1)},onError:H}),R=()=>{k(null),D(!1),L(""),_(null),c(!1),N(""),j(null)};let z;e[16]!==R?(z=je=>{$(je),je||R()},e[16]=R,e[17]=z):z=e[17];const T=z;let U,q,se,I,J,ne,X,ie,B,Q;if(e[18]!==S||e[19]!==m||e[20]!==b||e[21]!==T||e[22]!==g||e[23]!==o||e[24]!==n||e[25]!==p||e[26]!==O||e[27]!==E||e[28]!==d||e[29]!==a||e[30]!==l.name||e[31]!==F||e[32]!==t){const je=new Set(Pt),De=Ot.map(It);for(const P of Object.keys(S))je.has(P)||(je.add(P),De.push({key:P,description:"",defaultOn:!1,known:!1}));let ve;e[43]!==S?(ve=(P,ee)=>k({...S,[P]:ee}),e[43]=S,e[44]=ve):ve=e[44];const be=ve;let Se;e[45]!==S||e[46]!==E||e[47]!==be||e[48]!==t?(Se=()=>{const P=E.trim();if(!Et.test(P)){_(t("admin.orgs.invalidFlagKey"));return}if(Pt.has(P)||P in S){_(t("admin.orgs.duplicateFlagKey"));return}be(P,!0),L(""),_(null),D(!1)},e[45]=S,e[46]=E,e[47]=be,e[48]=t,e[49]=Se):Se=e[49];const Ve=Se;let Ne;e[50]!==S||e[51]!==n?(Ne=()=>{n||(N(JSON.stringify(S,null,2)),j(null),c(!0))},e[50]=S,e[51]=n,e[52]=Ne):Ne=e[52];const ke=Ne;let Fe,Ke;e[53]!==n||e[54]!==p||e[55]!==t?(Fe=()=>{if(!n)return;const P=Ke();if(!P){j(t("admin.orgs.invalidJson"));return}k(P),j(null),c(!1)},Ke=()=>{let P;try{P=JSON.parse(p)}catch{return null}if(!P||typeof P!="object"||Array.isArray(P))return null;const ee=Object.entries(P);for(const[we,Me]of ee)if(!Et.test(we)||typeof Me!="boolean")return null;return Object.fromEntries(ee)},e[53]=n,e[54]=p,e[55]=t,e[56]=Fe,e[57]=Ke):(Fe=e[56],Ke=e[57]);let Ce;e[58]!==S||e[59]!==m||e[60]!==T||e[61]!==n||e[62]!==O||e[63]!==Ke||e[64]!==t?(Ce=()=>{const P=n?Ke():qt(S);if(!P){j(t(n?"admin.orgs.invalidJson":"admin.orgs.invalidStoredValue"));return}if(j(null),m===null){T(!1);return}O.mutate({flags:P,mode:"replace"})},e[58]=S,e[59]=m,e[60]=T,e[61]=n,e[62]=O,e[63]=Ke,e[64]=t,e[65]=Ce):Ce=e[65],se=Ce,q=ft,X=a,ie=T;let me;e[66]!==t?(me=t("admin.orgs.flags"),e[66]=t,e[67]=me):me=e[67],e[68]!==me?(B=s.jsx(ut,{asChild:!0,children:s.jsx(V,{variant:"outline",size:"sm",children:me})}),e[68]=me,e[69]=B):B=e[69],U=gt,Q="sm:max-w-2xl";let fe;e[70]!==l.name||e[71]!==t?(fe=t("admin.orgs.flagsFor",{org:l.name}),e[70]=l.name,e[71]=t,e[72]=fe):fe=e[72],e[73]!==fe?(I=s.jsx(ht,{children:s.jsx(xt,{children:fe})}),e[73]=fe,e[74]=I):I=e[74];let ue;e[75]!==t?(ue=t("admin.orgs.flagsDescription"),e[75]=t,e[76]=ue):ue=e[76];let Le;e[77]!==ue?(Le=s.jsx("p",{className:"text-sm text-muted-foreground",children:ue}),e[77]=ue,e[78]=Le):Le=e[78];const Ae=n?"outline":"secondary";let ge;e[79]!==t?(ge=t("admin.orgs.flagsViewToggles"),e[79]=t,e[80]=ge):ge=e[80];let Te;e[81]!==Fe||e[82]!==o||e[83]!==Ae||e[84]!==ge?(Te=s.jsx(V,{variant:Ae,size:"sm",onClick:Fe,disabled:o,children:ge}),e[81]=Fe,e[82]=o,e[83]=Ae,e[84]=ge,e[85]=Te):Te=e[85];const Je=n?"secondary":"outline",$e=g||o;let he;e[86]!==t?(he=t("admin.orgs.flagsViewJson"),e[86]=t,e[87]=he):he=e[87];let xe;e[88]!==ke||e[89]!==Je||e[90]!==$e||e[91]!==he?(xe=s.jsx(V,{variant:Je,size:"sm",onClick:ke,disabled:$e,children:he}),e[88]=ke,e[89]=Je,e[90]=$e,e[91]=he,e[92]=xe):xe=e[92];let pe;e[93]!==Te||e[94]!==xe?(pe=s.jsxs("div",{className:"flex shrink-0 gap-1",children:[Te,xe]}),e[93]=Te,e[94]=xe,e[95]=pe):pe=e[95],e[96]!==Le||e[97]!==pe?(J=s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[Le,pe]}),e[96]=Le,e[97]=pe,e[98]=J):J=e[98],ne=o?s.jsx("p",{className:"text-sm text-destructive",children:t("admin.orgs.failedLoadFlags")}):n?s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:t("admin.orgs.jsonReplaceHint")}),s.jsx("textarea",{"aria-label":t("admin.orgs.jsonEditorLabel"),value:p,spellCheck:!1,disabled:O.isPending,onChange:P=>{N(P.target.value),j(null)},className:"h-64 w-full rounded-md border border-border bg-background p-3 font-mono text-sm text-foreground"})]}):s.jsxs("div",{className:"max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:[De.map(P=>{const{key:ee,description:we,defaultOn:Me,known:ot}=P,Pe=S[ee],qe=typeof Pe=="boolean"?Pe:b[ee]??!1,ze=Pe===void 0,Re=!ze&&typeof Pe!="boolean";return s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(At,{"aria-label":ee,checked:qe,disabled:g||O.isPending,onCheckedChange:Ie=>be(ee,Ie)}),s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("code",{className:"text-sm font-medium text-foreground",children:ee}),Me?s.jsx(Be,{variant:"secondary",size:"default",children:t("admin.orgs.flagDefaultOn")}):null,ot?null:s.jsx(Be,{variant:"warning",size:"default",children:t("admin.orgs.flagCustom")}),ze?s.jsx(Be,{variant:"outline",size:"default",children:t("admin.orgs.flagUnset")}):null,Re?s.jsx(Be,{variant:"destructive",size:"default",children:t("admin.orgs.flagInvalid")}):null]}),we?s.jsx("p",{className:"text-sm text-muted-foreground",children:we}):null]})]},ee)}),F?s.jsxs("div",{className:"space-y-1 border-t border-border pt-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(lt,{autoFocus:!0,"aria-label":t("admin.orgs.customFlagKeyLabel"),value:E,placeholder:t("admin.orgs.customFlagKeyPlaceholder"),onChange:P=>{L(P.target.value),_(null)},onKeyDown:P=>{P.key==="Enter"&&Ve()},className:"font-mono"}),s.jsx(V,{variant:"outline",onClick:Ve,children:t("admin.orgs.add")})]}),d?s.jsx("p",{className:"text-sm text-destructive",children:d}):null]}):s.jsx(V,{variant:"outline",size:"sm",disabled:g,onClick:()=>D(!0),children:t("admin.orgs.addCustomFlag")})]}),e[18]=S,e[19]=m,e[20]=b,e[21]=T,e[22]=g,e[23]=o,e[24]=n,e[25]=p,e[26]=O,e[27]=E,e[28]=d,e[29]=a,e[30]=l.name,e[31]=F,e[32]=t,e[33]=U,e[34]=q,e[35]=se,e[36]=I,e[37]=J,e[38]=ne,e[39]=X,e[40]=ie,e[41]=B,e[42]=Q}else U=e[33],q=e[34],se=e[35],I=e[36],J=e[37],ne=e[38],X=e[39],ie=e[40],B=e[41],Q=e[42];let Z;e[99]!==v?(Z=v?s.jsx("p",{className:"text-sm text-destructive",children:v}):null,e[99]=v,e[100]=Z):Z=e[100];let f;e[101]!==T?(f=()=>T(!1),e[101]=T,e[102]=f):f=e[102];const W=O.isPending;let G;e[103]!==t?(G=t("admin.orgs.cancel"),e[103]=t,e[104]=G):G=e[104];let re;e[105]!==O.isPending||e[106]!==f||e[107]!==G?(re=s.jsx(V,{variant:"outline",onClick:f,disabled:W,children:G}),e[105]=O.isPending,e[106]=f,e[107]=G,e[108]=re):re=e[108];const _e=g||o||O.isPending;let oe;e[109]!==O.isPending||e[110]!==t?(oe=O.isPending?t("admin.orgs.saving"):t("admin.orgs.save"),e[109]=O.isPending,e[110]=t,e[111]=oe):oe=e[111];let Oe;e[112]!==se||e[113]!==_e||e[114]!==oe?(Oe=s.jsx(V,{onClick:se,disabled:_e,children:oe}),e[112]=se,e[113]=_e,e[114]=oe,e[115]=Oe):Oe=e[115];let de;e[116]!==re||e[117]!==Oe?(de=s.jsxs(pt,{children:[re,Oe]}),e[116]=re,e[117]=Oe,e[118]=de):de=e[118];let ce;e[119]!==U||e[120]!==I||e[121]!==J||e[122]!==ne||e[123]!==Z||e[124]!==de||e[125]!==Q?(ce=s.jsxs(U,{className:Q,children:[I,J,ne,Z,de]}),e[119]=U,e[120]=I,e[121]=J,e[122]=ne,e[123]=Z,e[124]=de,e[125]=Q,e[126]=ce):ce=e[126];let Ue;return e[127]!==q||e[128]!==X||e[129]!==ie||e[130]!==B||e[131]!==ce?(Ue=s.jsxs(q,{open:X,onOpenChange:ie,children:[B,ce]}),e[127]=q,e[128]=X,e[129]=ie,e[130]=B,e[131]=ce,e[132]=Ue):Ue=e[132],Ue}function It(i){return{...i,known:!0}}class _t extends Error{constructor(e,l,t){super("owned_by_other_org"),this.slug=e,this.ownerName=l,this.ownerSlug=t,this.name="SiteConflictError"}slug;ownerName;ownerSlug}const vt="__own_site__";function Jt(i){const e=at.c(43),{org:l,sites:t}=i,a=rt(),$=ct();let m;e[0]!==l.id?(m=ye.deploymentAdminOrgProjects(l.id),e[0]=l.id,e[1]=m):m=e[1];let k;e[2]!==l.id?(k=()=>Ee(`/api/_admin/orgs/${l.id}/projects`),e[2]=l.id,e[3]=k):k=e[3];let F;e[4]!==m||e[5]!==k?(F={queryKey:m,queryFn:k},e[4]=m,e[5]=k,e[6]=F):F=e[6];const{data:D,isLoading:E,isError:L}=dt(F);let d;e[7]!==D?.projects?(d=D?.projects??[],e[7]=D?.projects,e[8]=d):d=e[8];const _=d;let n;e[9]!==l.id?(n=o=>Ee(`/api/_admin/orgs/${l.id}/projects/${encodeURIComponent(o.project.id)}/metadata`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({analyticsSiteSlug:o.slug})}),e[9]=l.id,e[10]=n):n=e[10];let c;e[11]!==l.id||e[12]!==$||e[13]!==a?(c=(o,g)=>{const{project:r,slug:b}=g;ae.success(b?a("admin.orgs.analyticsSiteSaved",{project:r.title,slug:b}):a("admin.orgs.analyticsSiteCleared",{project:r.title})),$.invalidateQueries({queryKey:ye.deploymentAdminOrgProjects(l.id)})},e[11]=l.id,e[12]=$,e[13]=a,e[14]=c):c=e[14];let p;e[15]!==a?(p=o=>{ae.error(o instanceof Error?o.message:a("admin.orgs.failedSaveAnalyticsSite"))},e[15]=a,e[16]=p):p=e[16];let N;e[17]!==n||e[18]!==c||e[19]!==p?(N={mutationFn:n,onSuccess:c,onError:p},e[17]=n,e[18]=c,e[19]=p,e[20]=N):N=e[20];const v=Qe(N);let j;e[21]!==t?(j=new Set(t.map(Qt)),e[21]=t,e[22]=j):j=e[22];const C=j;let h;e[23]!==a?(h=a("admin.orgs.projectAnalytics"),e[23]=a,e[24]=h):h=e[24];let y;e[25]!==h?(y=s.jsx("p",{className:"text-sm font-medium text-foreground",children:h}),e[25]=h,e[26]=y):y=e[26];let u;e[27]!==a?(u=a("admin.orgs.projectAnalyticsDescription"),e[27]=a,e[28]=u):u=e[28];let x;e[29]!==u?(x=s.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[29]=u,e[30]=x):x=e[30];let w;e[31]!==L||e[32]!==E||e[33]!==v||e[34]!==C||e[35]!==_||e[36]!==t||e[37]!==a?(w=L?s.jsx("p",{className:"text-sm text-destructive",children:a("admin.orgs.failedLoadProjects")}):E?s.jsx("p",{className:"text-sm text-muted-foreground",children:a("admin.orgs.loading")}):_.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:a("admin.orgs.noProjects")}):s.jsx("div",{className:"max-h-[30vh] space-y-2 overflow-y-auto pr-1",children:_.map(o=>{const g=o.metadata.analyticsSiteSlug,r=t.map(Bt).filter(b=>b!==o.siteSlug);return s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-2",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:o.title}),s.jsx("code",{className:"truncate text-xs text-muted-foreground",children:o.siteSlug})]}),s.jsxs(bt,{value:g??vt,disabled:v.isPending,onValueChange:b=>v.mutate({project:o,slug:b===vt?null:b}),children:[s.jsx(Nt,{className:"w-52 font-mono",children:s.jsx(St,{})}),s.jsxs(Ct,{children:[s.jsx(nt,{value:vt,children:a("admin.orgs.analyticsOwnSite",{slug:o.siteSlug})}),r.map(Mt),g&&!C.has(g)?s.jsx(nt,{value:g,disabled:!0,children:a("admin.orgs.analyticsSiteNotOwned",{slug:g})}):null]})]})]},o.id)})}),e[31]=L,e[32]=E,e[33]=v,e[34]=C,e[35]=_,e[36]=t,e[37]=a,e[38]=w):w=e[38];let K;return e[39]!==y||e[40]!==x||e[41]!==w?(K=s.jsxs("div",{className:"space-y-2 border-t border-border pt-3",children:[y,x,w]}),e[39]=y,e[40]=x,e[41]=w,e[42]=K):K=e[42],K}function Mt(i){return s.jsx(nt,{value:i,children:i},i)}function Bt(i){return i.slug}function Qt(i){return i.slug}function Vt(i){const e=at.c(91),{org:l}=i,t=rt(),[a,$]=te.useState(!1),[m,k]=te.useState(""),[F,D]=te.useState(null),[E,L]=te.useState(null),d=ct();let _;e[0]!==l.id?(_=ye.deploymentAdminOrgSites(l.id),e[0]=l.id,e[1]=_):_=e[1];let n;e[2]!==l.id?(n=()=>Ee(`/api/_admin/orgs/${l.id}/sites`),e[2]=l.id,e[3]=n):n=e[3];let c;e[4]!==a||e[5]!==_||e[6]!==n?(c={queryKey:_,queryFn:n,enabled:a},e[4]=a,e[5]=_,e[6]=n,e[7]=c):c=e[7];const{data:p,isLoading:N,isError:v}=dt(c);let j;e[8]!==p?.sites?(j=p?.sites??[],e[8]=p?.sites,e[9]=j):j=e[9];const C=j;let h;e[10]!==l.id||e[11]!==d?(h=()=>d.invalidateQueries({queryKey:ye.deploymentAdminOrgSites(l.id)}),e[10]=l.id,e[11]=d,e[12]=h):h=e[12];const y=h;let u;e[13]!==l.id?(u=async f=>{const W=await fetch(`/api/_admin/orgs/${l.id}/sites`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}),G=await W.json().catch(Ht);if(W.status===409&&G.error==="owned_by_other_org")throw new _t(f.slug,G.ownerOrganizationName??null,G.ownerOrganizationSlug??null);if(!W.ok)throw new Error(G.error||`Request failed (HTTP ${W.status})`);return G},e[13]=l.id,e[14]=u):u=e[14];let x;e[15]!==y||e[16]!==l.name||e[17]!==t?(x=(f,W)=>{ae.success(W.reassign?t("admin.orgs.siteReassigned",{slug:W.slug,org:l.name}):t("admin.orgs.siteAdded",{slug:W.slug,org:l.name})),y(),k(""),D(null),L(null)},e[15]=y,e[16]=l.name,e[17]=t,e[18]=x):x=e[18];let w;e[19]!==t?(w=f=>{if(f instanceof _t){L({slug:f.slug,ownerName:f.ownerName,ownerSlug:f.ownerSlug});return}ae.error(f instanceof Error?f.message:t("admin.orgs.failedAddSite"))},e[19]=t,e[20]=w):w=e[20];let K;e[21]!==u||e[22]!==x||e[23]!==w?(K={mutationFn:u,onSuccess:x,onError:w},e[21]=u,e[22]=x,e[23]=w,e[24]=K):K=e[24];const o=Qe(K);let g;e[25]!==l.id?(g=f=>Ee(`/api/_admin/orgs/${l.id}/sites/${encodeURIComponent(f)}`,{method:"DELETE"}),e[25]=l.id,e[26]=g):g=e[26];let r;e[27]!==y||e[28]!==l.id||e[29]!==l.name||e[30]!==d||e[31]!==t?(r=(f,W)=>{ae.success(t("admin.orgs.siteRemoved",{slug:W,org:l.name})),y(),d.invalidateQueries({queryKey:ye.deploymentAdminOrgProjects(l.id)})},e[27]=y,e[28]=l.id,e[29]=l.name,e[30]=d,e[31]=t,e[32]=r):r=e[32];let b;e[33]!==t?(b=f=>{ae.error(f instanceof Error?f.message:t("admin.orgs.failedRemoveSite"))},e[33]=t,e[34]=b):b=e[34];let M;e[35]!==g||e[36]!==r||e[37]!==b?(M={mutationFn:g,onSuccess:r,onError:b},e[35]=g,e[36]=r,e[37]=b,e[38]=M):M=e[38];const A=Qe(M),S=o.isPending||A.isPending;let Y;e[39]===Symbol.for("react.memo_cache_sentinel")?(Y=f=>{$(f),f||(k(""),D(null),L(null))},e[39]=Y):Y=e[39];const H=Y;let O;e[40]!==o||e[41]!==m||e[42]!==t?(O=()=>{const f=m.trim().toLowerCase();if(!Kt.test(f)){D(t("admin.orgs.invalidSiteSlug"));return}D(null),L(null),o.mutate({slug:f})},e[40]=o,e[41]=m,e[42]=t,e[43]=O):O=e[43];const R=O;let z;e[44]!==t?(z=t("admin.orgs.sites"),e[44]=t,e[45]=z):z=e[45];let T;e[46]!==z?(T=s.jsx(ut,{asChild:!0,children:s.jsx(V,{variant:"outline",size:"sm",children:z})}),e[46]=z,e[47]=T):T=e[47];let U;e[48]!==l.name||e[49]!==t?(U=t("admin.orgs.sitesFor",{org:l.name}),e[48]=l.name,e[49]=t,e[50]=U):U=e[50];let q;e[51]!==U?(q=s.jsx(ht,{children:s.jsx(xt,{children:U})}),e[51]=U,e[52]=q):q=e[52];let se;e[53]!==t?(se=t("admin.orgs.sitesDescription"),e[53]=t,e[54]=se):se=e[54];let I;e[55]!==se?(I=s.jsx("p",{className:"text-sm text-muted-foreground",children:se}),e[55]=se,e[56]=I):I=e[56];let J;e[57]!==F||e[58]!==o||e[59]!==S||e[60]!==E||e[61]!==R||e[62]!==v||e[63]!==N||e[64]!==m||e[65]!==A||e[66]!==C||e[67]!==t?(J=v?s.jsx("p",{className:"text-sm text-destructive",children:t("admin.orgs.failedLoadSites")}):s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"max-h-[45vh] space-y-2 overflow-y-auto pr-1",children:N?s.jsx("p",{className:"text-sm text-muted-foreground",children:t("admin.orgs.loading")}):C.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:t("admin.orgs.noSites")}):C.map(f=>s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-2",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[s.jsx("code",{className:"truncate text-sm font-medium text-foreground",children:f.slug}),s.jsx(Be,{variant:"outline",size:"default",children:f.source})]}),s.jsx(V,{variant:"ghost",size:"sm",disabled:S,onClick:()=>A.mutate(f.slug),children:t("admin.orgs.remove")})]},f.slug))}),s.jsxs("div",{className:"space-y-1 border-t border-border pt-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(lt,{value:m,placeholder:t("admin.orgs.siteSlugPlaceholder"),disabled:o.isPending,onChange:f=>{k(f.target.value),D(null),L(null)},onKeyDown:f=>{f.key==="Enter"&&R()},className:"font-mono"}),s.jsx(V,{variant:"outline",disabled:!m.trim()||o.isPending,onClick:R,children:t("admin.orgs.add")})]}),F?s.jsx("p",{className:"text-sm text-destructive",children:F}):null,E?s.jsxs("div",{className:"space-y-2 rounded-md border border-warning/50 bg-warning/10 p-3",children:[s.jsx("p",{className:"text-sm text-foreground",children:t("admin.orgs.siteReassignWarning",{slug:E.slug,owner:E.ownerName||E.ownerSlug||t("admin.orgs.anotherOrg")})}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(V,{variant:"outline",size:"sm",disabled:o.isPending,onClick:()=>L(null),children:t("admin.orgs.cancel")}),s.jsx(V,{variant:"destructive",size:"sm",disabled:o.isPending,onClick:()=>o.mutate({slug:E.slug,reassign:!0}),children:t("admin.orgs.reassignConfirm")})]})]}):null]})]}),e[57]=F,e[58]=o,e[59]=S,e[60]=E,e[61]=R,e[62]=v,e[63]=N,e[64]=m,e[65]=A,e[66]=C,e[67]=t,e[68]=J):J=e[68];let ne;e[69]!==v||e[70]!==N||e[71]!==a||e[72]!==l||e[73]!==C?(ne=a&&!N&&!v?s.jsx(Jt,{org:l,sites:C}):null,e[69]=v,e[70]=N,e[71]=a,e[72]=l,e[73]=C,e[74]=ne):ne=e[74];let X;e[75]===Symbol.for("react.memo_cache_sentinel")?(X=()=>H(!1),e[75]=X):X=e[75];let ie;e[76]!==t?(ie=t("admin.orgs.close"),e[76]=t,e[77]=ie):ie=e[77];let B;e[78]!==S||e[79]!==ie?(B=s.jsx(pt,{children:s.jsx(V,{variant:"outline",onClick:X,disabled:S,children:ie})}),e[78]=S,e[79]=ie,e[80]=B):B=e[80];let Q;e[81]!==q||e[82]!==I||e[83]!==J||e[84]!==ne||e[85]!==B?(Q=s.jsxs(gt,{className:"sm:max-w-lg",children:[q,I,J,ne,B]}),e[81]=q,e[82]=I,e[83]=J,e[84]=ne,e[85]=B,e[86]=Q):Q=e[86];let Z;return e[87]!==a||e[88]!==T||e[89]!==Q?(Z=s.jsxs(ft,{open:a,onOpenChange:H,children:[T,Q]}),e[87]=a,e[88]=T,e[89]=Q,e[90]=Z):Z=e[90],Z}function Ht(){return{}}function Wt(i){const e=at.c(214),{org:l}=i,t=rt(),[a,$]=te.useState(!1),[m,k]=te.useState(null),F=ct();let D;e[0]!==l.id?(D=ye.deploymentAdminOrgNotice(l.id),e[0]=l.id,e[1]=D):D=e[1];let E;e[2]!==l.id?(E=()=>Ee(`/api/_admin/orgs/${l.id}/notice`).then(Gt),e[2]=l.id,e[3]=E):E=e[3];let L;e[4]!==a||e[5]!==l.notice||e[6]!==D||e[7]!==E?(L={queryKey:D,queryFn:E,enabled:a,initialData:l.notice},e[4]=a,e[5]=l.notice,e[6]=D,e[7]=E,e[8]=L):L=e[8];const{data:d}=dt(L);let _;e[9]!==m||e[10]!==d?.ctaLabel||e[11]!==d?.ctaUrl||e[12]!==d?.message||e[13]!==d?.severity||e[14]!==d?.title?(_=m??{severity:d?.severity??"warn",title:d?.title??"",message:d?.message??"",ctaLabel:d?.ctaLabel??"",ctaUrl:d?.ctaUrl??""},e[9]=m,e[10]=d?.ctaLabel,e[11]=d?.ctaUrl,e[12]=d?.message,e[13]=d?.severity,e[14]=d?.title,e[15]=_):_=e[15];const n=_;let c;e[16]!==l.id||e[17]!==F?(c=()=>{F.invalidateQueries({queryKey:ye.deploymentAdminOrgNotice(l.id)}),F.invalidateQueries({queryKey:ye.deploymentAdminOrgsList()})},e[16]=l.id,e[17]=F,e[18]=c):c=e[18];const p=c;let N;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{k(null),$(!1)},e[19]=N):N=e[19];const v=N;let j;e[20]!==n.ctaLabel||e[21]!==n.ctaUrl||e[22]!==n.message||e[23]!==n.severity||e[24]!==n.title||e[25]!==l.id?(j=()=>Ee(`/api/_admin/orgs/${l.id}/notice`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({severity:n.severity,title:n.title.trim(),message:n.message.trim(),ctaLabel:n.ctaLabel?.trim()||null,ctaUrl:n.ctaUrl?.trim()||null})}),e[20]=n.ctaLabel,e[21]=n.ctaUrl,e[22]=n.message,e[23]=n.severity,e[24]=n.title,e[25]=l.id,e[26]=j):j=e[26];let C;e[27]!==p||e[28]!==l.name||e[29]!==t?(C=()=>{ae.success(t("admin.orgs.noticeSaved",{org:l.name})),p(),v()},e[27]=p,e[28]=l.name,e[29]=t,e[30]=C):C=e[30];let h;e[31]!==t?(h=le=>{ae.error(le instanceof Error?le.message:t("admin.orgs.failedSaveNotice"))},e[31]=t,e[32]=h):h=e[32];let y;e[33]!==j||e[34]!==C||e[35]!==h?(y={mutationFn:j,onSuccess:C,onError:h},e[33]=j,e[34]=C,e[35]=h,e[36]=y):y=e[36];const u=Qe(y);let x;e[37]!==l.id?(x=()=>Ee(`/api/_admin/orgs/${l.id}/notice`,{method:"DELETE"}),e[37]=l.id,e[38]=x):x=e[38];let w;e[39]!==p||e[40]!==l.name||e[41]!==t?(w=()=>{ae.success(t("admin.orgs.noticeCleared",{org:l.name})),p(),v()},e[39]=p,e[40]=l.name,e[41]=t,e[42]=w):w=e[42];let K;e[43]!==t?(K=le=>{ae.error(le instanceof Error?le.message:t("admin.orgs.failedClearNotice"))},e[43]=t,e[44]=K):K=e[44];let o;e[45]!==x||e[46]!==w||e[47]!==K?(o={mutationFn:x,onSuccess:w,onError:K},e[45]=x,e[46]=w,e[47]=K,e[48]=o):o=e[48];const g=Qe(o),r=u.isPending||g.isPending;let b;e[49]!==n.ctaLabel?(b=n.ctaLabel?.trim(),e[49]=n.ctaLabel,e[50]=b):b=e[50];let M;e[51]!==n.ctaUrl?(M=n.ctaUrl?.trim(),e[51]=n.ctaUrl,e[52]=M):M=e[52];const A=!b!=!M;let S;e[53]!==A||e[54]!==n.message||e[55]!==n.title?(S=!!n.title.trim()&&!!n.message.trim()&&!A,e[53]=A,e[54]=n.message,e[55]=n.title,e[56]=S):S=e[56];const Y=S;let H;e[57]===Symbol.for("react.memo_cache_sentinel")?(H=le=>le?$(!0):v(),e[57]=H):H=e[57];let O;e[58]!==t?(O=t("admin.orgs.notice"),e[58]=t,e[59]=O):O=e[59];let R;e[60]!==O?(R=s.jsx(ut,{asChild:!0,children:s.jsx(V,{variant:"outline",size:"sm",children:O})}),e[60]=O,e[61]=R):R=e[61];let z;e[62]!==l.name||e[63]!==t?(z=t("admin.orgs.noticeFor",{org:l.name}),e[62]=l.name,e[63]=t,e[64]=z):z=e[64];let T;e[65]!==z?(T=s.jsx(ht,{children:s.jsx(xt,{children:z})}),e[65]=z,e[66]=T):T=e[66];let U;e[67]!==t?(U=t("admin.orgs.noticeDescription"),e[67]=t,e[68]=U):U=e[68];let q;e[69]!==U?(q=s.jsx("p",{className:"text-sm text-muted-foreground",children:U}),e[69]=U,e[70]=q):q=e[70];const se=`notice-severity-${l.id}`;let I;e[71]!==t?(I=t("admin.orgs.noticeSeverity"),e[71]=t,e[72]=I):I=e[72];let J;e[73]!==se||e[74]!==I?(J=s.jsx(it,{htmlFor:se,children:I}),e[73]=se,e[74]=I,e[75]=J):J=e[75];const ne=n.severity;let X;e[76]!==n?(X=le=>k({...n,severity:le}),e[76]=n,e[77]=X):X=e[77];const ie=`notice-severity-${l.id}`;let B;e[78]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(St,{}),e[78]=B):B=e[78];let Q;e[79]!==ie?(Q=s.jsx(Nt,{id:ie,className:"w-full",children:B}),e[79]=ie,e[80]=Q):Q=e[80];let Z;e[81]!==t?(Z=t("admin.orgs.noticeSeverityWarn"),e[81]=t,e[82]=Z):Z=e[82];let f;e[83]!==Z?(f=s.jsx(nt,{value:"warn",children:Z}),e[83]=Z,e[84]=f):f=e[84];let W;e[85]!==t?(W=t("admin.orgs.noticeSeverityBlock"),e[85]=t,e[86]=W):W=e[86];let G;e[87]!==W?(G=s.jsx(nt,{value:"block",children:W}),e[87]=W,e[88]=G):G=e[88];let re;e[89]!==f||e[90]!==G?(re=s.jsxs(Ct,{children:[f,G]}),e[89]=f,e[90]=G,e[91]=re):re=e[91];let _e;e[92]!==n.severity||e[93]!==r||e[94]!==X||e[95]!==Q||e[96]!==re?(_e=s.jsxs(bt,{value:ne,onValueChange:X,disabled:r,children:[Q,re]}),e[92]=n.severity,e[93]=r,e[94]=X,e[95]=Q,e[96]=re,e[97]=_e):_e=e[97];let oe;e[98]!==J||e[99]!==_e?(oe=s.jsxs("div",{className:"space-y-2",children:[J,_e]}),e[98]=J,e[99]=_e,e[100]=oe):oe=e[100];const Oe=`notice-title-${l.id}`;let de;e[101]!==t?(de=t("admin.orgs.noticeTitle"),e[101]=t,e[102]=de):de=e[102];let ce;e[103]!==Oe||e[104]!==de?(ce=s.jsx(it,{htmlFor:Oe,children:de}),e[103]=Oe,e[104]=de,e[105]=ce):ce=e[105];const Ue=`notice-title-${l.id}`,je=n.title;let De;e[106]!==n?(De=le=>k({...n,title:le.target.value}),e[106]=n,e[107]=De):De=e[107];let ve;e[108]!==t?(ve=t("admin.orgs.noticeTitlePlaceholder"),e[108]=t,e[109]=ve):ve=e[109];let be;e[110]!==n.title||e[111]!==r||e[112]!==Ue||e[113]!==De||e[114]!==ve?(be=s.jsx(lt,{id:Ue,value:je,onChange:De,placeholder:ve,disabled:r}),e[110]=n.title,e[111]=r,e[112]=Ue,e[113]=De,e[114]=ve,e[115]=be):be=e[115];let Se;e[116]!==ce||e[117]!==be?(Se=s.jsxs("div",{className:"space-y-2",children:[ce,be]}),e[116]=ce,e[117]=be,e[118]=Se):Se=e[118];const Ve=`notice-message-${l.id}`;let Ne;e[119]!==t?(Ne=t("admin.orgs.noticeMessage"),e[119]=t,e[120]=Ne):Ne=e[120];let ke;e[121]!==Ve||e[122]!==Ne?(ke=s.jsx(it,{htmlFor:Ve,children:Ne}),e[121]=Ve,e[122]=Ne,e[123]=ke):ke=e[123];const Fe=`notice-message-${l.id}`,Ke=n.message;let Ce;e[124]!==n?(Ce=le=>k({...n,message:le.target.value}),e[124]=n,e[125]=Ce):Ce=e[125];let me;e[126]!==t?(me=t("admin.orgs.noticeMessagePlaceholder"),e[126]=t,e[127]=me):me=e[127];let fe;e[128]!==n.message||e[129]!==r||e[130]!==Fe||e[131]!==Ce||e[132]!==me?(fe=s.jsx(Tt,{id:Fe,value:Ke,onChange:Ce,placeholder:me,rows:4,disabled:r}),e[128]=n.message,e[129]=r,e[130]=Fe,e[131]=Ce,e[132]=me,e[133]=fe):fe=e[133];let ue;e[134]!==ke||e[135]!==fe?(ue=s.jsxs("div",{className:"space-y-2",children:[ke,fe]}),e[134]=ke,e[135]=fe,e[136]=ue):ue=e[136];const Le=`notice-cta-label-${l.id}`;let Ae;e[137]!==t?(Ae=t("admin.orgs.noticeCtaLabel"),e[137]=t,e[138]=Ae):Ae=e[138];let ge;e[139]!==Le||e[140]!==Ae?(ge=s.jsx(it,{htmlFor:Le,children:Ae}),e[139]=Le,e[140]=Ae,e[141]=ge):ge=e[141];const Te=`notice-cta-label-${l.id}`,Je=n.ctaLabel??"";let $e;e[142]!==n?($e=le=>k({...n,ctaLabel:le.target.value}),e[142]=n,e[143]=$e):$e=e[143];let he;e[144]!==t?(he=t("admin.orgs.noticeCtaLabelPlaceholder"),e[144]=t,e[145]=he):he=e[145];let xe;e[146]!==r||e[147]!==Te||e[148]!==Je||e[149]!==$e||e[150]!==he?(xe=s.jsx(lt,{id:Te,value:Je,onChange:$e,placeholder:he,disabled:r}),e[146]=r,e[147]=Te,e[148]=Je,e[149]=$e,e[150]=he,e[151]=xe):xe=e[151];let pe;e[152]!==ge||e[153]!==xe?(pe=s.jsxs("div",{className:"space-y-2",children:[ge,xe]}),e[152]=ge,e[153]=xe,e[154]=pe):pe=e[154];const P=`notice-cta-url-${l.id}`;let ee;e[155]!==t?(ee=t("admin.orgs.noticeCtaUrl"),e[155]=t,e[156]=ee):ee=e[156];let we;e[157]!==P||e[158]!==ee?(we=s.jsx(it,{htmlFor:P,children:ee}),e[157]=P,e[158]=ee,e[159]=we):we=e[159];const Me=`notice-cta-url-${l.id}`,ot=n.ctaUrl??"";let Pe;e[160]!==n?(Pe=le=>k({...n,ctaUrl:le.target.value}),e[160]=n,e[161]=Pe):Pe=e[161];let qe;e[162]!==r||e[163]!==Me||e[164]!==ot||e[165]!==Pe?(qe=s.jsx(lt,{id:Me,value:ot,onChange:Pe,placeholder:"https://...",disabled:r}),e[162]=r,e[163]=Me,e[164]=ot,e[165]=Pe,e[166]=qe):qe=e[166];let ze;e[167]!==we||e[168]!==qe?(ze=s.jsxs("div",{className:"space-y-2",children:[we,qe]}),e[167]=we,e[168]=qe,e[169]=ze):ze=e[169];let Re;e[170]!==pe||e[171]!==ze?(Re=s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[pe,ze]}),e[170]=pe,e[171]=ze,e[172]=Re):Re=e[172];let Ie;e[173]!==A||e[174]!==t?(Ie=A?s.jsx("p",{className:"text-sm text-destructive",children:t("admin.orgs.noticeCtaIncomplete")}):null,e[173]=A,e[174]=t,e[175]=Ie):Ie=e[175];let He;e[176]!==q||e[177]!==oe||e[178]!==Se||e[179]!==ue||e[180]!==Re||e[181]!==Ie?(He=s.jsxs("div",{className:"space-y-4",children:[q,oe,Se,ue,Re,Ie]}),e[176]=q,e[177]=oe,e[178]=Se,e[179]=ue,e[180]=Re,e[181]=Ie,e[182]=He):He=e[182];let We;e[183]!==g||e[184]!==r||e[185]!==d||e[186]!==t?(We=d?s.jsx(V,{variant:"outline",onClick:()=>g.mutate(),disabled:r,children:t("admin.orgs.noticeClear")}):null,e[183]=g,e[184]=r,e[185]=d,e[186]=t,e[187]=We):We=e[187];let Ge;e[188]!==t?(Ge=t("admin.orgs.cancel"),e[188]=t,e[189]=Ge):Ge=e[189];let Ye;e[190]!==r||e[191]!==Ge?(Ye=s.jsx(V,{variant:"outline",onClick:v,disabled:r,children:Ge}),e[190]=r,e[191]=Ge,e[192]=Ye):Ye=e[192];let Xe;e[193]!==u?(Xe=()=>u.mutate(),e[193]=u,e[194]=Xe):Xe=e[194];const jt=!Y||r;let Ze;e[195]!==u.isPending||e[196]!==t?(Ze=u.isPending?t("admin.orgs.noticeSaving"):t("admin.orgs.noticeSave"),e[195]=u.isPending,e[196]=t,e[197]=Ze):Ze=e[197];let et;e[198]!==Xe||e[199]!==jt||e[200]!==Ze?(et=s.jsx(V,{onClick:Xe,disabled:jt,children:Ze}),e[198]=Xe,e[199]=jt,e[200]=Ze,e[201]=et):et=e[201];let tt;e[202]!==We||e[203]!==Ye||e[204]!==et?(tt=s.jsxs(pt,{children:[We,Ye,et]}),e[202]=We,e[203]=Ye,e[204]=et,e[205]=tt):tt=e[205];let st;e[206]!==T||e[207]!==He||e[208]!==tt?(st=s.jsxs(gt,{className:"sm:max-w-lg",children:[T,He,tt]}),e[206]=T,e[207]=He,e[208]=tt,e[209]=st):st=e[209];let mt;return e[210]!==a||e[211]!==R||e[212]!==st?(mt=s.jsxs(ft,{open:a,onOpenChange:H,children:[R,st]}),e[210]=a,e[211]=R,e[212]=st,e[213]=mt):mt=e[213],mt}function Gt(i){return i.notice}function Yt(i){const e=at.c(75),{org:l}=i,t=rt(),[a,$]=te.useState(!1),[m,k]=te.useState(""),[F,D]=te.useState("user"),E=ct();let L;e[0]!==m||e[1]!==l.id||e[2]!==F?(L=()=>Ee(`/api/_admin/orgs/${l.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:m.trim(),role:F})}),e[0]=m,e[1]=l.id,e[2]=F,e[3]=L):L=e[3];let d;e[4]!==m||e[5]!==l.name||e[6]!==E||e[7]!==t?(d=()=>{ae.success(t("admin.orgs.memberAdded",{email:m.trim(),org:l.name})),E.invalidateQueries({queryKey:ye.deploymentAdminOrgsList()}),$(!1),k(""),D("user")},e[4]=m,e[5]=l.name,e[6]=E,e[7]=t,e[8]=d):d=e[8];let _;e[9]!==t?(_=q=>{ae.error(q instanceof Error?q.message:t("admin.orgs.failedAddMember"))},e[9]=t,e[10]=_):_=e[10];let n;e[11]!==L||e[12]!==d||e[13]!==_?(n={mutationFn:L,onSuccess:d,onError:_},e[11]=L,e[12]=d,e[13]=_,e[14]=n):n=e[14];const c=Qe(n);let p;e[15]!==t?(p=t("admin.orgs.addMember"),e[15]=t,e[16]=p):p=e[16];let N;e[17]!==p?(N=s.jsx(ut,{asChild:!0,children:s.jsx(V,{variant:"outline",size:"sm",children:p})}),e[17]=p,e[18]=N):N=e[18];let v;e[19]!==l.name||e[20]!==t?(v=t("admin.orgs.addMemberTo",{org:l.name}),e[19]=l.name,e[20]=t,e[21]=v):v=e[21];let j;e[22]!==v?(j=s.jsx(ht,{children:s.jsx(xt,{children:v})}),e[22]=v,e[23]=j):j=e[23];let C;e[24]!==t?(C=t("admin.orgs.email"),e[24]=t,e[25]=C):C=e[25];let h;e[26]!==C?(h=s.jsx(it,{htmlFor:"admin-add-member-email",children:C}),e[26]=C,e[27]=h):h=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=q=>k(q.target.value),e[28]=y):y=e[28];let u;e[29]!==t?(u=t("admin.orgs.emailPlaceholder"),e[29]=t,e[30]=u):u=e[30];let x;e[31]!==m||e[32]!==c.isPending||e[33]!==u?(x=s.jsx(lt,{id:"admin-add-member-email",type:"email",value:m,onChange:y,placeholder:u,disabled:c.isPending}),e[31]=m,e[32]=c.isPending,e[33]=u,e[34]=x):x=e[34];let w;e[35]!==h||e[36]!==x?(w=s.jsxs("div",{className:"space-y-2",children:[h,x]}),e[35]=h,e[36]=x,e[37]=w):w=e[37];let K;e[38]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Nt,{className:"w-full",children:s.jsx(St,{})}),e[38]=K):K=e[38];let o;e[39]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ct,{children:Ut.map(Xt)}),e[39]=o):o=e[39];let g;e[40]!==c.isPending||e[41]!==F?(g=s.jsxs(bt,{value:F,onValueChange:D,disabled:c.isPending,children:[K,o]}),e[40]=c.isPending,e[41]=F,e[42]=g):g=e[42];let r;e[43]!==w||e[44]!==g?(r=s.jsxs("div",{className:"space-y-4",children:[w,g]}),e[43]=w,e[44]=g,e[45]=r):r=e[45];let b;e[46]===Symbol.for("react.memo_cache_sentinel")?(b=()=>$(!1),e[46]=b):b=e[46];const M=c.isPending;let A;e[47]!==t?(A=t("admin.orgs.cancel"),e[47]=t,e[48]=A):A=e[48];let S;e[49]!==c.isPending||e[50]!==A?(S=s.jsx(V,{variant:"outline",onClick:b,disabled:M,children:A}),e[49]=c.isPending,e[50]=A,e[51]=S):S=e[51];let Y;e[52]!==c?(Y=()=>c.mutate(),e[52]=c,e[53]=Y):Y=e[53];let H;e[54]!==m||e[55]!==c.isPending?(H=!m.trim()||c.isPending,e[54]=m,e[55]=c.isPending,e[56]=H):H=e[56];let O;e[57]!==c.isPending||e[58]!==t?(O=c.isPending?t("admin.orgs.adding"):t("admin.orgs.addMember"),e[57]=c.isPending,e[58]=t,e[59]=O):O=e[59];let R;e[60]!==Y||e[61]!==H||e[62]!==O?(R=s.jsx(V,{onClick:Y,disabled:H,children:O}),e[60]=Y,e[61]=H,e[62]=O,e[63]=R):R=e[63];let z;e[64]!==S||e[65]!==R?(z=s.jsxs(pt,{children:[S,R]}),e[64]=S,e[65]=R,e[66]=z):z=e[66];let T;e[67]!==r||e[68]!==z||e[69]!==j?(T=s.jsxs(gt,{className:"sm:max-w-md",children:[j,r,z]}),e[67]=r,e[68]=z,e[69]=j,e[70]=T):T=e[70];let U;return e[71]!==a||e[72]!==T||e[73]!==N?(U=s.jsxs(ft,{open:a,onOpenChange:$,children:[N,T]}),e[71]=a,e[72]=T,e[73]=N,e[74]=U):U=e[74],U}function Xt(i){return s.jsx(nt,{value:i,children:s.jsx("span",{className:"capitalize",children:i})},i)}function Ps(){const i=at.c(56),e=rt(),[l,t]=te.useState("");let a;i[0]!==l?(a=l.trim(),i[0]=l,i[1]=a):a=i[1];const $=Lt(a,300);let m;i[2]!==$?(m=ye.deploymentAdminOrgs($),i[2]=$,i[3]=m):m=i[3];let k;i[4]!==$?(k=()=>{const A=new URLSearchParams({limit:"100"});return $&&A.set("search",$),Ee(`/api/_admin/orgs?${A}`)},i[4]=$,i[5]=k):k=i[5];let F;i[6]!==m||i[7]!==k?(F={queryKey:m,queryFn:k},i[6]=m,i[7]=k,i[8]=F):F=i[8];const{data:D,isLoading:E,isError:L}=dt(F);let d;i[9]!==D?.organizations?(d=D?.organizations??[],i[9]=D?.organizations,i[10]=d):d=i[10];const _=d;let n;i[11]!==e?(n=e("admin.orgs.organization"),i[11]=e,i[12]=n):n=i[12];let c;i[13]!==e?(c=A=>s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:A.name}),A.archived?s.jsx(Be,{variant:"outline",className:"shrink-0",children:e("admin.orgs.archived")}):null]}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:A.slug})]}),i[13]=e,i[14]=c):c=i[14];let p;i[15]!==n||i[16]!==c?(p={id:"name",header:n,render:c,cellClassName:"flex-1 min-w-0"},i[15]=n,i[16]=c,i[17]=p):p=i[17];let N;i[18]!==e?(N=e("admin.orgs.notice"),i[18]=e,i[19]=N):N=i[19];let v;i[20]!==e?(v=A=>A.notice?s.jsx(Be,{variant:A.notice.severity==="block"?"destructive":"outline",children:A.notice.severity==="block"?e("admin.orgs.noticeSeverityBlock"):e("admin.orgs.noticeSeverityWarn")}):s.jsx("span",{className:"text-sm text-muted-foreground",children:"—"}),i[20]=e,i[21]=v):v=i[21];let j;i[22]!==N||i[23]!==v?(j={id:"notice",header:N,render:v,cellClassName:"w-28 shrink-0"},i[22]=N,i[23]=v,i[24]=j):j=i[24];let C;i[25]!==e?(C=e("admin.orgs.members"),i[25]=e,i[26]=C):C=i[26];let h;i[27]!==C?(h={id:"members",header:C,render:ts,cellClassName:"w-24 shrink-0"},i[27]=C,i[28]=h):h=i[28];let y;i[29]!==e?(y=e("admin.orgs.created"),i[29]=e,i[30]=y):y=i[30];let u;i[31]!==y?(u={id:"created",header:y,render:es,cellClassName:"w-48 shrink-0"},i[31]=y,i[32]=u):u=i[32];let x;i[33]===Symbol.for("react.memo_cache_sentinel")?(x={id:"actions",header:"",render:Zt,cellClassName:"w-auto shrink-0"},i[33]=x):x=i[33];let w;i[34]!==j||i[35]!==h||i[36]!==u||i[37]!==p?(w=[p,j,h,u,x],i[34]=j,i[35]=h,i[36]=u,i[37]=p,i[38]=w):w=i[38];const K=w;let o;i[39]!==e?(o=e("admin.orgs.searchPlaceholder"),i[39]=e,i[40]=o):o=i[40];let g;i[41]!==l||i[42]!==o?(g=s.jsx(Ft,{value:l,onChange:t,placeholder:o,className:"w-full md:w-[375px]"}),i[41]=l,i[42]=o,i[43]=g):g=i[43];let r;i[44]!==$||i[45]!==L||i[46]!==e?(r=L?s.jsx(wt,{title:e("admin.orgs.failedLoadOrgs"),description:e("admin.orgs.failedLoadOrgsDescription")}):s.jsx(wt,{title:e("admin.orgs.noOrgsFound"),description:$?e("admin.orgs.noOrgsMatchSearch",{search:$}):e("admin.orgs.noOrgsYet")}),i[44]=$,i[45]=L,i[46]=e,i[47]=r):r=i[47];let b;i[48]!==K||i[49]!==E||i[50]!==_||i[51]!==r?(b=s.jsx(kt,{columns:K,data:_,isLoading:E,emptyState:r}),i[48]=K,i[49]=E,i[50]=_,i[51]=r,i[52]=b):b=i[52];let M;return i[53]!==g||i[54]!==b?(M=s.jsx(yt,{children:s.jsx(yt.Content,{children:s.jsx(yt.Container,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[g,b]})})})}),i[53]=g,i[54]=b,i[55]=M):M=i[55],M}function Zt(i){return s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx(Rt,{org:i}),s.jsx(Vt,{org:i}),s.jsx(Wt,{org:i}),s.jsx(Yt,{org:i})]})}function es(i){return s.jsx("span",{className:"text-sm text-foreground",children:zt(i.createdAt)})}function ts(i){return s.jsx("span",{className:"text-sm text-foreground",children:i.memberCount})}export{Ps as default};
@@ -1 +1 @@
1
- import{c as w,o as D,K as _,b as L,j as i}from"./index-QvCrIW6i.js";import{j as P,ak as $,al as O,X as F,am as I,an as Q,ao as Y}from"./runnable-block-editor-BJjjoCmo.js";import{L as A}from"./label-Bn6aGS7S.js";import{S as K}from"./switch-BQeWPFJM.js";import{u as q}from"./use-new-blocks-editor-Ebux8YL4.js";import{c as z,b as M,a as U,d as W,S as X}from"./select-C4t2zfNW.js";function k(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function G(c,e,t,d){if(c.kind==="page"){if(!k(t))return null;const h=t.seo!==void 0?t.seo:e.rawSeoData;return{...t,seo:d===null?null:$(d,h)}}return k(t)?e.siteKind==="block"?d:{...t,seo:d}:null}function re(c,e){const t=c.__resolveType;return typeof t=="string"&&t.length>0?t:e.seoResolveType}function ae(c){const e=w.c(23),{orgSlug:t,virtualMcpId:d,branch:h,target:o,resolved:s,onSaved:f}=c,a=D(),l=`${t}/${d}/${h}`;let u;e[0]!==h||e[1]!==t||e[2]!==d?(u={orgSlug:t,virtualMcpId:d,branch:h},e[0]=h,e[1]=t,e[2]=d,e[3]=u):u=e[3];let r;e[4]!==f?(r={onSaved:f},e[4]=f,e[5]=r):r=e[5];const{save:n,flush:m,isPending:p}=P(u,r);let y;e[6]!==l||e[7]!==a||e[8]!==s||e[9]!==n||e[10]!==o?(y=v=>{s&&n(s.blockKey,()=>{const S=a.getQueryData(_.decofile(l))?.[s.blockKey];return G(o,s,S,v)})},e[6]=l,e[7]=a,e[8]=s,e[9]=n,e[10]=o,e[11]=y):y=e[11];const g=y;let x;e[12]!==l||e[13]!==a||e[14]!==s||e[15]!==n||e[16]!==o?(x=v=>{!s||o.kind!=="page"||n(s.blockKey,()=>{const S=a.getQueryData(_.decofile(l))?.[s.blockKey];return k(S)?{...S,seo:v}:null})},e[12]=l,e[13]=a,e[14]=s,e[15]=n,e[16]=o,e[17]=x):x=e[17];const b=x;let j;return e[18]!==m||e[19]!==p||e[20]!==b||e[21]!==g?(j={persistSeo:g,persistRawSeo:b,flush:m,isPending:p},e[18]=m,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(24),{rawSeo:t,onEnableChange:d,onAsyncRenderChange:h,children:o}=c,s=L(),f=q();let a;e[0]!==t?(a=F(t),e[0]=t,e[1]=a):a=e[1];const l=a;let u;e[2]!==t?(u=O(t),e[2]=t,e[3]=u):u=e[3];const r=u;let n;e[4]!==s?(n=s("sectionsEditor.seoFormChrome.enableLabel"),e[4]=s,e[5]=n):n=e[5];let m;e[6]!==n?(m=i.jsx(A,{htmlFor:"seo-enable",className:"text-sm font-medium",children:n}),e[6]=n,e[7]=m):m=e[7];let p;e[8]!==l||e[9]!==d?(p=i.jsx(K,{id:"seo-enable",checked:l,onCheckedChange:d}),e[8]=l,e[9]=d,e[10]=p):p=e[10];let y;e[11]!==m||e[12]!==p?(y=i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,p]}),e[11]=m,e[12]=p,e[13]=y):y=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==f||e[17]!==l||e[18]!==h||e[19]!==s?(g=l&&(f?o: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:r,onCheckedChange:h,className:"shrink-0"})]})]})),e[14]=r,e[15]=o,e[16]=f,e[17]=l,e[18]=h,e[19]=s,e[20]=g):g=e[20];let x;return e[21]!==y||e[22]!==g?(x=i.jsxs("div",{className:"space-y-4",children:[y,g]}),e[21]=y,e[22]=g,e[23]=x):x=e[23],x}function V(c){const e=w.c(20),{options:t,value:d,onChange:h}=c,o=L();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(A,{className:"text-xs text-muted-foreground",children:s}),e[2]=s,e[3]=f):f=e[3];let a;e[4]!==o?(a=o("sectionsEditor.seoTypeSelect.placeholder"),e[4]=o,e[5]=a):a=e[5];let l;e[6]!==a?(l=i.jsx(M,{className:"w-full",children:i.jsx(U,{placeholder:a})}),e[6]=a,e[7]=l):l=e[7];let u;e[8]!==t?(u=t.filter(B).map(Z),e[8]=t,e[9]=u):u=e[9];let r;e[10]!==u?(r=i.jsx(W,{children:u}),e[10]=u,e[11]=r):r=e[11];let n;e[12]!==h||e[13]!==l||e[14]!==r||e[15]!==d?(n=i.jsxs(X,{value:d,onValueChange:h,children:[l,r]}),e[12]=h,e[13]=l,e[14]=r,e[15]=d,e[16]=n):n=e[16];let m;return e[17]!==f||e[18]!==n?(m=i.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[f,n]}),e[17]=f,e[18]=n,e[19]=m):m=e[19],m}function Z(c){return i.jsx(z,{value:c.resolveType,children:c.title},c.resolveType)}function B(c){return c.resolveType.length>0}function ie(c){const e=w.c(33),{rawSeo:t,innerSeo:d,defaultResolveType:h,seoSchema:o,activeResolveType:s,seoTypeOptions:f,formResetKey:a,siteDefaultSeo:l,onBreadcrumbChange:u,onPersistRaw:r,onInnerChange:n,onClearForm:m,onBumpFormKey:p,beforeFields:y}=c;let g;e[0]!==h||e[1]!==p||e[2]!==m||e[3]!==r?(g=C=>{if(C){const N=Y(h);r(N),m(),p();return}r(null),m(),p()},e[0]=h,e[1]=p,e[2]=m,e[3]=r,e[4]=g):g=e[4];const x=g;let b;e[5]!==r||e[6]!==t?(b=C=>{const N=I(C,t);r(N)},e[5]=r,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 S;e[11]!==s||e[12]!==T||e[13]!==t||e[14]!==o||e[15]!==f?(S=F(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]=S):S=e[16];let R;e[17]!==s||e[18]!==a||e[19]!==d||e[20]!==u||e[21]!==n||e[22]!==t||e[23]!==o||e[24]!==l?(R=F(t)&&o&&s&&i.jsx(Q,{schema:o,resolveType:s,value:d,formResetKey:a,onChange:C=>n(C),onBreadcrumbChange:u,siteDefaultSeo:l}),e[17]=s,e[18]=a,e[19]=d,e[20]=u,e[21]=n,e[22]=t,e[23]=o,e[24]=l,e[25]=R):R=e[25];let E;return e[26]!==y||e[27]!==j||e[28]!==x||e[29]!==t||e[30]!==S||e[31]!==R?(E=i.jsxs(J,{rawSeo:t,onEnableChange:x,onAsyncRenderChange:j,children:[y,S,R]}),e[26]=y,e[27]=j,e[28]=x,e[29]=t,e[30]=S,e[31]=R,e[32]=E):E=e[32],E}export{ie as P,re as a,G as b,ae as u};
1
+ import{c as w,o as D,K as _,b as L,j as i}from"./index-BDhW9xxN.js";import{j as P,ak as $,al as O,X as F,am as I,an as Q,ao as Y}from"./runnable-block-editor-DcMkYuUb.js";import{L as A}from"./label-uTNaIuWI.js";import{S as K}from"./switch-Ay_EsHPF.js";import{u as q}from"./use-new-blocks-editor-D6QRwqGF.js";import{c as z,b as M,a as U,d as W,S as X}from"./select-B6DzqJiH.js";function k(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function G(c,e,t,d){if(c.kind==="page"){if(!k(t))return null;const h=t.seo!==void 0?t.seo:e.rawSeoData;return{...t,seo:d===null?null:$(d,h)}}return k(t)?e.siteKind==="block"?d:{...t,seo:d}:null}function re(c,e){const t=c.__resolveType;return typeof t=="string"&&t.length>0?t:e.seoResolveType}function ae(c){const e=w.c(23),{orgSlug:t,virtualMcpId:d,branch:h,target:o,resolved:s,onSaved:f}=c,a=D(),l=`${t}/${d}/${h}`;let u;e[0]!==h||e[1]!==t||e[2]!==d?(u={orgSlug:t,virtualMcpId:d,branch:h},e[0]=h,e[1]=t,e[2]=d,e[3]=u):u=e[3];let r;e[4]!==f?(r={onSaved:f},e[4]=f,e[5]=r):r=e[5];const{save:n,flush:m,isPending:p}=P(u,r);let y;e[6]!==l||e[7]!==a||e[8]!==s||e[9]!==n||e[10]!==o?(y=v=>{s&&n(s.blockKey,()=>{const S=a.getQueryData(_.decofile(l))?.[s.blockKey];return G(o,s,S,v)})},e[6]=l,e[7]=a,e[8]=s,e[9]=n,e[10]=o,e[11]=y):y=e[11];const g=y;let x;e[12]!==l||e[13]!==a||e[14]!==s||e[15]!==n||e[16]!==o?(x=v=>{!s||o.kind!=="page"||n(s.blockKey,()=>{const S=a.getQueryData(_.decofile(l))?.[s.blockKey];return k(S)?{...S,seo:v}:null})},e[12]=l,e[13]=a,e[14]=s,e[15]=n,e[16]=o,e[17]=x):x=e[17];const b=x;let j;return e[18]!==m||e[19]!==p||e[20]!==b||e[21]!==g?(j={persistSeo:g,persistRawSeo:b,flush:m,isPending:p},e[18]=m,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(24),{rawSeo:t,onEnableChange:d,onAsyncRenderChange:h,children:o}=c,s=L(),f=q();let a;e[0]!==t?(a=F(t),e[0]=t,e[1]=a):a=e[1];const l=a;let u;e[2]!==t?(u=O(t),e[2]=t,e[3]=u):u=e[3];const r=u;let n;e[4]!==s?(n=s("sectionsEditor.seoFormChrome.enableLabel"),e[4]=s,e[5]=n):n=e[5];let m;e[6]!==n?(m=i.jsx(A,{htmlFor:"seo-enable",className:"text-sm font-medium",children:n}),e[6]=n,e[7]=m):m=e[7];let p;e[8]!==l||e[9]!==d?(p=i.jsx(K,{id:"seo-enable",checked:l,onCheckedChange:d}),e[8]=l,e[9]=d,e[10]=p):p=e[10];let y;e[11]!==m||e[12]!==p?(y=i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,p]}),e[11]=m,e[12]=p,e[13]=y):y=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==f||e[17]!==l||e[18]!==h||e[19]!==s?(g=l&&(f?o: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:r,onCheckedChange:h,className:"shrink-0"})]})]})),e[14]=r,e[15]=o,e[16]=f,e[17]=l,e[18]=h,e[19]=s,e[20]=g):g=e[20];let x;return e[21]!==y||e[22]!==g?(x=i.jsxs("div",{className:"space-y-4",children:[y,g]}),e[21]=y,e[22]=g,e[23]=x):x=e[23],x}function V(c){const e=w.c(20),{options:t,value:d,onChange:h}=c,o=L();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(A,{className:"text-xs text-muted-foreground",children:s}),e[2]=s,e[3]=f):f=e[3];let a;e[4]!==o?(a=o("sectionsEditor.seoTypeSelect.placeholder"),e[4]=o,e[5]=a):a=e[5];let l;e[6]!==a?(l=i.jsx(M,{className:"w-full",children:i.jsx(U,{placeholder:a})}),e[6]=a,e[7]=l):l=e[7];let u;e[8]!==t?(u=t.filter(B).map(Z),e[8]=t,e[9]=u):u=e[9];let r;e[10]!==u?(r=i.jsx(W,{children:u}),e[10]=u,e[11]=r):r=e[11];let n;e[12]!==h||e[13]!==l||e[14]!==r||e[15]!==d?(n=i.jsxs(X,{value:d,onValueChange:h,children:[l,r]}),e[12]=h,e[13]=l,e[14]=r,e[15]=d,e[16]=n):n=e[16];let m;return e[17]!==f||e[18]!==n?(m=i.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[f,n]}),e[17]=f,e[18]=n,e[19]=m):m=e[19],m}function Z(c){return i.jsx(z,{value:c.resolveType,children:c.title},c.resolveType)}function B(c){return c.resolveType.length>0}function ie(c){const e=w.c(33),{rawSeo:t,innerSeo:d,defaultResolveType:h,seoSchema:o,activeResolveType:s,seoTypeOptions:f,formResetKey:a,siteDefaultSeo:l,onBreadcrumbChange:u,onPersistRaw:r,onInnerChange:n,onClearForm:m,onBumpFormKey:p,beforeFields:y}=c;let g;e[0]!==h||e[1]!==p||e[2]!==m||e[3]!==r?(g=C=>{if(C){const N=Y(h);r(N),m(),p();return}r(null),m(),p()},e[0]=h,e[1]=p,e[2]=m,e[3]=r,e[4]=g):g=e[4];const x=g;let b;e[5]!==r||e[6]!==t?(b=C=>{const N=I(C,t);r(N)},e[5]=r,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 S;e[11]!==s||e[12]!==T||e[13]!==t||e[14]!==o||e[15]!==f?(S=F(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]=S):S=e[16];let R;e[17]!==s||e[18]!==a||e[19]!==d||e[20]!==u||e[21]!==n||e[22]!==t||e[23]!==o||e[24]!==l?(R=F(t)&&o&&s&&i.jsx(Q,{schema:o,resolveType:s,value:d,formResetKey:a,onChange:C=>n(C),onBreadcrumbChange:u,siteDefaultSeo:l}),e[17]=s,e[18]=a,e[19]=d,e[20]=u,e[21]=n,e[22]=t,e[23]=o,e[24]=l,e[25]=R):R=e[25];let E;return e[26]!==y||e[27]!==j||e[28]!==x||e[29]!==t||e[30]!==S||e[31]!==R?(E=i.jsxs(J,{rawSeo:t,onEnableChange:x,onAsyncRenderChange:j,children:[y,S,R]}),e[26]=y,e[27]=j,e[28]=x,e[29]=t,e[30]=S,e[31]=R,e[32]=E):E=e[32],E}export{ie as P,re as a,G as b,ae as u};
@@ -1,4 +1,4 @@
1
- import{r as R,c as E,b as U,j as a,ak as tt,l as G,X as ge,o as es,a2 as ts,e as ss,K as he,t as ze,m as dt,ab as ns,E as ls,h as as,B as He,aJ as ft,aa as os,eb as mt,s as rs,p as qe,d as We,d0 as is,e0 as cs,ec as us}from"./index-QvCrIW6i.js";import{aP as ds,aQ as fs,aA as ms,R as ps,a as st,ar as gs,h as xs,a2 as hs,aR as bs,aS as pt,aT as ys,q as De,aL as js,aK as vs,aU as gt,aV as xt,A as ht,aW as fe,X as Ns,b as Ss,F as ks,f as _s}from"./agent-icon-DVHfcBN5.js";import{t as Ie,f as ws,c as Cs}from"./Tool01-BlNfFonn.js";import{i as bt}from"./LinkBroken01-CP7hyYh2.js";import{i as yt}from"./Check-Ck9dGdFT.js";import{a as Ts}from"./Copy01-efUKcLhv.js";import{b as je,c as Ke,d as nt}from"./format-time-CjIPQhCN.js";import{b as Is,C as $s,a as As}from"./collapsible-DwAPS6G8.js";import{u as Ms}from"./use-copy-DRzLqLAb.js";import{a as jt,i as Es,M as $e,b as Ls}from"./usage-stats-DW00xCiE.js";import{v as Ps,u as Rs,x as zs,y as Ds}from"./thread-intent-KcG0jvJo.js";import{f as ve,r as Fs,u as Ne,v as Bs,a as Os,w as Us,x as Hs}from"./chat-context-CiWqcBU2.js";import{u as Ge}from"./use-clock-tick-BxAer4Nn.js";import{c as qs}from"./content-blocks-o63cs2vh.js";import{M as Ws}from"./mcp-app-renderer-BDnK-zdP.js";import{g as vt}from"./types-CJepGNea.js";import{o as Ks}from"./omit-sandbox-map-jj4lCB2U.js";import{T as Nt,a as St,b as kt}from"./tooltip-C1he18et.js";import{c as Gs,u as _t}from"./use-mcp-client-COnRDE1N.js";import{g as wt,s as Ct}from"./gateway-client-C7cRG-yz.js";import{s as Tt}from"./tool-namespace-DmnQIdtF.js";import{t as Vs,g as pe,u as be}from"./utils-CVEq3hMx.js";import{i as It}from"./AlertCircle-hP4CniDw.js";import{s as Js,a as _e,n as Xs}from"./Image01-DvcgVgi7.js";import{s as Qs}from"./XClose-C-LhQLI0.js";import{n as Fe}from"./ShoppingBag01-Wr2FrDdb.js";import{i as Ys}from"./SearchMd-Cn3ttzXj.js";import{a as Zs,d as en}from"./shell-layout-Cvnu1xoQ.js";import{a as Ve}from"./use-panel-navigate-D3_-3ULo.js";import{c as $t}from"./use-decopilot-events-wck0cVko.js";import{I as tn,M as At}from"./markdown-BSSkHnhk.js";import{n as Mt}from"./LinkExternal01-DA-xCJ3a.js";import{c as sn,S as nn,a as ln,b as an}from"./sheet-CCkRwnEO.js";import{I as Se}from"./integration-icon-B1V7QJ0Z.js";import{a as Et}from"./use-connection-Bxzd0HJT.js";import{a as me}from"./Palette-BqhzEvZt.js";import{u as Lt}from"./use-navigate-to-agent-DINkoobx.js";import{i as we}from"./Link01-tmXFK6e3.js";import{g as on}from"./use-mcp-prompts-D6kpqd0T.js";import{c as rn,P as cn,u as un,e as dn,F as fn,s as mn,b as pn}from"./index-CtFpwpsJ.js";import{i as gn}from"./Monitor01-CWOF0aXq.js";import{a as xn}from"./use-thread-outputs-l48Wu5jh.js";import{F as hn}from"./file-type-icon-e3GEv92g.js";import{t as bn}from"./ChevronUp-DxC2mC66.js";const yn={damping:.7,stiffness:.05,mass:1.25},jn=70,vn=1e3/60,Nn=350;let Ae=!1;globalThis.document?.addEventListener("mousedown",()=>{Ae=!0});globalThis.document?.addEventListener("mouseup",()=>{Ae=!1});globalThis.document?.addEventListener("click",()=>{Ae=!1});const Sn=(s={})=>{const[e,t]=R.useState(!1),[l,n]=R.useState(s.initial!==!1),[c,u]=R.useState(!1),i=R.useRef(null);i.current=s;const r=R.useCallback(()=>{if(!Ae)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),o=R.useCallback(b=>{d.isAtBottom=b,n(b)},[]),m=R.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:l,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:j}=getComputedStyle(x.current);j!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,j!=="auto"&&(x.current.style.scrollBehavior=j)}},get targetScrollTop(){return!x.current||!v.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!v.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:x.current,contentElement:v.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=jn}}},[]),f=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||o(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:_=!1}=b;let y,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{y=Date.now()}):y=k+(b.duration??0);const N=async()=>{const w=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,M=performance.now(),A=(M-(d.lastTick??M))/vn;if(d.animation||(d.animation={behavior:j,promise:w,ignoreEscapes:_}),d.animation.behavior===j&&(d.lastTick=M),r()||k>Date.now())return N();if(C<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,N();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*A,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return N()}return y>Date.now()?(S=d.calculatedTargetScrollTop,N()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Le(i.current,i.current.resize),ignoreEscapes:_,duration:Math.max(0,y-Date.now())||void 0}):d.isAtBottom)});return w.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:N()},[o,r,d]),p=R.useCallback(()=>{m(!0),o(!1)},[m,o]),g=R.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:_=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(_=j),u(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(r()){m(!0),o(!1);return}const y=k>_,S=k<_;if(d.animation?.ignoreEscapes){d.scrollTop=_;return}S&&(m(!0),o(!1)),y&&m(!1),!d.escapedFromLock&&d.isNearBottom&&o(!0)},1)},[m,o,r,d]),h=R.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),o(!1))},[m,o,d]),x=lt(b=>{x.current?.removeEventListener("scroll",g),x.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),v=lt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:_}=j.contentRect,y=_-(k??_);if(d.resizeDifference=y,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),u(d.isNearBottom),y>=0){const S=Le(i.current,k?i.current.resize:i.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:Nn})}else d.isNearBottom&&(m(!1),o(!0));k=_,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===y&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:v,scrollRef:x,scrollToBottom:f,stopScroll:p,isAtBottom:l||c,isNearBottom:c,escapedFromLock:e,state:d}};function lt(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const Ee=new Map;function Le(...s){const e={...yn};let t=!1;for(const n of s){if(n==="instant"){t=!0;continue}typeof n=="object"&&(t=!1,e.damping=n.damping??e.damping,e.stiffness=n.stiffness??e.stiffness,e.mass=n.mass??e.mass)}const l=JSON.stringify(e);return Ee.has(l)||Ee.set(l,Object.freeze(e)),t?"instant":Ee.get(l)}function H({icon:s,title:e,usage:t,summary:l,state:n,detail:c,detailVariant:u="code",forceOpen:i,variant:r="default",trailing:o,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=U(),[h,x]=R.useState(f??!1),{handleCopy:v,copied:b}=Ms(),k=n==="loading",j=n==="error",y=!!(c&&c.trim())||!!p,S=r==="subtask",N=(i??!1)||h,w=Sn({initial:k?"instant":!1}),C=a.jsxs(Is,{open:N,onOpenChange:i?void 0:x,className:"min-w-0",children:[a.jsxs($s,{disabled:!y,className:G("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",y&&"[@media(hover:hover)]:hover:bg-accent/30",!y&&"cursor-default",k&&"shimmer"),"aria-disabled":!y,children:[a.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?a.jsx(tt,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:G("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",y&&(N?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),y&&a.jsx("div",{className:G("absolute inset-0 flex items-center justify-center transition-opacity duration-150",N?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:a.jsx(tt,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")})})]})}),a.jsx("span",{className:G("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),l?a.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l})}):a.jsx("div",{className:"flex-1"}),o&&a.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:o}),a.jsx(jt,{usage:t})]}),y&&a.jsx(As,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(u==="prose"?a.jsx("div",{className:"mt-1 mb-1",children:a.jsx("div",{ref:w.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a.jsx("p",{ref:w.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:c})})}):a.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:a.jsx("div",{ref:w.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:a.jsxs("div",{ref:w.contentRef,className:"flex items-start justify-between gap-2",children:[a.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:a.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:c})}),a.jsx("button",{type:"button",onClick:()=>v(c),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?a.jsx(yt,{className:"size-3.5"}):a.jsx(Ts,{className:"size-3.5"})})]})})}))})]});return S?a.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:C}):C}function ne(s){const e=E.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=je(t),e[0]=t,e[1]=l):l=e[1];let n;return e[2]!==l?(n=a.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=n):n=e[3],n}const Pt=4;function Rt(s){const e=E.c(8),{count:t,noun:l,onClick:n}=s,c=U();let u;e[0]!==t||e[1]!==l||e[2]!==c?(u=c("common.seeAll",{count:t,noun:l}),e[0]=t,e[1]=l,e[2]=c,e[3]=u):u=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(bt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==u?(r=a.jsxs("button",{type:"button",onClick:n,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[u,i]}),e[5]=n,e[6]=u,e[7]=r):r=e[7],r}function zt(s){const e=E.c(12),{message:t,className:l}=s,n=t.created_at??t.metadata?.created_at??null;let c,u,i,r;if(e[0]!==l||e[1]!==n){r=Symbol.for("react.early_return_sentinel");e:{const m=Ke(n);if(m===null){r=null;break e}const d=new Date(m);c=d.toLocaleString(),e[6]!==l?(u=G("text-[11px] text-muted-foreground/60 select-none",l),e[6]=l,e[7]=u):u=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=n,e[2]=c,e[3]=u,e[4]=i,e[5]=r}else c=e[2],u=e[3],i=e[4],r=e[5];if(r!==Symbol.for("react.early_return_sentinel"))return r;let o;return e[8]!==c||e[9]!==u||e[10]!==i?(o=a.jsx("span",{title:c,className:u,children:i}),e[8]=c,e[9]=u,e[10]=i,e[11]=o):o=e[11],o}function Be(s){const e=E.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>nt(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[n,c]=R.useState(l);let u,i;e[2]!==t?(u=()=>{const d=setInterval(()=>c(nt(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=u,e[4]=i):(u=e[3],i=e[4]),R.useEffect(u,i);const r=n/1e3;let o;e[5]!==r?(o=je(r),e[5]=r,e[6]=o):o=e[6];let m;return e[7]!==o?(m=a.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:o}),e[7]=o,e[8]=m):m=e[8],m}const Dt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function kn(){const s=E.c(5),[e]=R.useState(_n);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let l;s[1]!==e?(l=Dt.map((c,u)=>{const{delay:i}=c;return a.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[u],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},u)}),s[1]=e,s[2]=l):l=s[2];let n;return s[3]!==l?(n=a.jsx("div",{className:"grid",style:t,children:l}),s[3]=l,s[4]=n):n=s[4],n}function _n(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Dt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function wn(s){return{planning:{icon:a.jsx(fs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:a.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const Cn=1200;function Oe(s){const e=E.c(8),{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:i,trailing:r}=s,o=i===void 0?"prose":i;let m;return e[0]!==c||e[1]!==o||e[2]!==t||e[3]!==u||e[4]!==n||e[5]!==l||e[6]!==r?(m=a.jsx(H,{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:o,trailing:r}),e[0]=c,e[1]=o,e[2]=t,e[3]=u,e[4]=n,e[5]=l,e[6]=r,e[7]=m):m=e[7],m}function Tn(s){const e=E.c(22),{startedAt:t}=s,l=U(),n=ve()?.runStatusStage??null,[c,u]=R.useState("planning");let i,r;if(e[0]!==n?(i=()=>{if(n!==null)return;const h=setTimeout(()=>{u("thinking")},Cn);return()=>{clearTimeout(h)}},r=[n],e[0]=n,e[1]=i,e[2]=r):(i=e[1],r=e[2]),R.useEffect(i,r),n!==null){let h;e[3]!==n||e[4]!==l?(h=Ps(l,n),e[3]=n,e[4]=l,e[5]=h):h=e[5];const x=h;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(Ie,{className:"size-4"}),e[6]=v):v=e[6];const b=`${x.label}...`;let k;e[7]!==t?(k=t!==null&&a.jsx(Be,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==x.detail||e[10]!==b||e[11]!==k?(j=a.jsx(Oe,{icon:v,title:b,summary:x.detail,state:"loading",trailing:k}),e[9]=x.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let o;e[13]!==l?(o=wn(l),e[13]=l,e[14]=o):o=e[14];const d=o[c],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&a.jsx(Be,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=a.jsx(Oe,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function In(s){const e=E.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(kn,{}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=a.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[l,a.jsx(Be,{since:t})]}),e[1]=t,e[2]=n):n=e[2],n}const $n=2e4;function An(s){const e=E.c(9),{startedAt:t}=s,l=U(),n=Ge(1e3),c=ve(),i=(t!==null?n-t:0)>=$n;let r;e[0]!==t?(r=a.jsx(Tn,{startedAt:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==i||e[3]!==c||e[4]!==l?(o=i&&c?.stop&&a.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[a.jsx("span",{children:l("chat.thinkingIndicator.takingLonger")}),a.jsx("button",{type:"button",onClick:()=>c.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:l("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=c,e[4]=l,e[5]=o):o=e[5];let m;return e[6]!==r||e[7]!==o?(m=a.jsxs("div",{className:"flex flex-col gap-0.5",children:[r,o]}),e[6]=r,e[7]=o,e[8]=m):m=e[8],m}function Mn(s){const e=E.c(24),{duration:t,parts:l,isStreaming:n}=s,c=U();let u;e[0]!==l?(u=l.every(Pn),e[0]=l,e[1]=u):u=e[1];const i=u;let r;e[2]!==t||e[3]!==c?(r=t&&t/1e3>1?c("chat.thinkingIndicator.thoughtFor",{duration:je(t/1e3)}):c("chat.thinkingIndicator.thought"),e[2]=t,e[3]=c,e[4]=r):r=e[4];const o=r;let m;if(e[5]!==i||e[6]!==n||e[7]!==l){const k=l.map(Ln).join(`
1
+ import{r as R,c as E,b as U,j as a,ak as tt,l as G,X as ge,o as es,a2 as ts,e as ss,K as he,t as ze,m as dt,ab as ns,E as ls,h as as,B as He,aJ as ft,aa as os,ec as mt,s as rs,p as qe,d as We,d0 as is,e1 as cs,ed as us}from"./index-BDhW9xxN.js";import{aP as ds,aQ as fs,aA as ms,R as ps,a as st,ar as gs,h as xs,a2 as hs,aR as bs,aS as pt,aT as ys,q as De,aL as js,aK as vs,aU as gt,aV as xt,A as ht,aW as fe,X as Ns,b as Ss,F as ks,f as _s}from"./agent-icon-CP_Ce3vP.js";import{t as Ie,f as ws,c as Cs}from"./Tool01-DQQGDcpr.js";import{i as bt}from"./LinkBroken01-CKAYv5Ws.js";import{i as yt}from"./Check-BIm8oPAI.js";import{a as Ts}from"./Copy01-CVhdu84v.js";import{b as je,c as Ke,d as nt}from"./format-time-CjIPQhCN.js";import{b as Is,C as $s,a as As}from"./collapsible-DsS_PEhd.js";import{u as Ms}from"./use-copy-D1Nm-kgX.js";import{a as jt,i as Es,M as $e,b as Ls}from"./usage-stats-cLtXqoaq.js";import{v as Ps,u as Rs,x as zs,y as Ds}from"./thread-intent-y4sFV6nC.js";import{f as ve,r as Fs,u as Ne,v as Bs,a as Os,w as Us,x as Hs}from"./chat-context-Blq_eRG7.js";import{u as Ge}from"./use-clock-tick-Dx4PkWs4.js";import{c as qs}from"./content-blocks-o63cs2vh.js";import{M as Ws}from"./mcp-app-renderer-Z11oKtDn.js";import{g as vt}from"./types-C1FT5lJw.js";import{o as Ks}from"./omit-sandbox-map-jj4lCB2U.js";import{T as Nt,a as St,b as kt}from"./tooltip-D555rgHk.js";import{c as Gs,u as _t}from"./use-mcp-client-alN3BSuJ.js";import{g as wt,s as Ct}from"./gateway-client-C0zWKCU4.js";import{s as Tt}from"./tool-namespace-DmnQIdtF.js";import{t as Vs,g as pe,u as be}from"./utils-CVEq3hMx.js";import{i as It}from"./AlertCircle-BhLvKd51.js";import{s as Js,a as _e,n as Xs}from"./Image01-CGBVFmAI.js";import{s as Qs}from"./XClose-BqnBpCCh.js";import{n as Fe}from"./ShoppingBag01-BxQzf-9l.js";import{i as Ys}from"./SearchMd-CRK8FN15.js";import{a as Zs,d as en}from"./shell-layout-CTITeNJr.js";import{a as Ve}from"./use-panel-navigate-yk7t3bcJ.js";import{c as $t}from"./use-decopilot-events-CY9KSVWJ.js";import{I as tn,M as At}from"./markdown-LIOti3qC.js";import{n as Mt}from"./LinkExternal01-DNJF5sr3.js";import{c as sn,S as nn,a as ln,b as an}from"./sheet-CMNWdtKR.js";import{I as Se}from"./integration-icon-BDP6F9Pj.js";import{a as Et}from"./use-connection-hMJ4m1KM.js";import{a as me}from"./Palette-CbtdR6wJ.js";import{u as Lt}from"./use-navigate-to-agent-MADN_glW.js";import{i as we}from"./Link01-9k5oDSP-.js";import{g as on}from"./use-mcp-prompts-C5SH_xGs.js";import{c as rn,P as cn,u as un,e as dn,F as fn,s as mn,b as pn}from"./index-DClhYi2n.js";import{i as gn}from"./Monitor01-emBSPIO-.js";import{a as xn}from"./use-thread-outputs-CHJvnckm.js";import{F as hn}from"./file-type-icon-CaoQ1xmx.js";import{t as bn}from"./ChevronUp-CW9NwQNu.js";const yn={damping:.7,stiffness:.05,mass:1.25},jn=70,vn=1e3/60,Nn=350;let Ae=!1;globalThis.document?.addEventListener("mousedown",()=>{Ae=!0});globalThis.document?.addEventListener("mouseup",()=>{Ae=!1});globalThis.document?.addEventListener("click",()=>{Ae=!1});const Sn=(s={})=>{const[e,t]=R.useState(!1),[l,n]=R.useState(s.initial!==!1),[c,u]=R.useState(!1),i=R.useRef(null);i.current=s;const r=R.useCallback(()=>{if(!Ae)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),o=R.useCallback(b=>{d.isAtBottom=b,n(b)},[]),m=R.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:l,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:j}=getComputedStyle(x.current);j!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,j!=="auto"&&(x.current.style.scrollBehavior=j)}},get targetScrollTop(){return!x.current||!v.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!v.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:x.current,contentElement:v.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=jn}}},[]),f=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||o(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:_=!1}=b;let y,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{y=Date.now()}):y=k+(b.duration??0);const N=async()=>{const w=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,M=performance.now(),A=(M-(d.lastTick??M))/vn;if(d.animation||(d.animation={behavior:j,promise:w,ignoreEscapes:_}),d.animation.behavior===j&&(d.lastTick=M),r()||k>Date.now())return N();if(C<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,N();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*A,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return N()}return y>Date.now()?(S=d.calculatedTargetScrollTop,N()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Le(i.current,i.current.resize),ignoreEscapes:_,duration:Math.max(0,y-Date.now())||void 0}):d.isAtBottom)});return w.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:N()},[o,r,d]),p=R.useCallback(()=>{m(!0),o(!1)},[m,o]),g=R.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:_=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(_=j),u(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(r()){m(!0),o(!1);return}const y=k>_,S=k<_;if(d.animation?.ignoreEscapes){d.scrollTop=_;return}S&&(m(!0),o(!1)),y&&m(!1),!d.escapedFromLock&&d.isNearBottom&&o(!0)},1)},[m,o,r,d]),h=R.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),o(!1))},[m,o,d]),x=lt(b=>{x.current?.removeEventListener("scroll",g),x.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),v=lt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:_}=j.contentRect,y=_-(k??_);if(d.resizeDifference=y,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),u(d.isNearBottom),y>=0){const S=Le(i.current,k?i.current.resize:i.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:Nn})}else d.isNearBottom&&(m(!1),o(!0));k=_,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===y&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:v,scrollRef:x,scrollToBottom:f,stopScroll:p,isAtBottom:l||c,isNearBottom:c,escapedFromLock:e,state:d}};function lt(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const Ee=new Map;function Le(...s){const e={...yn};let t=!1;for(const n of s){if(n==="instant"){t=!0;continue}typeof n=="object"&&(t=!1,e.damping=n.damping??e.damping,e.stiffness=n.stiffness??e.stiffness,e.mass=n.mass??e.mass)}const l=JSON.stringify(e);return Ee.has(l)||Ee.set(l,Object.freeze(e)),t?"instant":Ee.get(l)}function H({icon:s,title:e,usage:t,summary:l,state:n,detail:c,detailVariant:u="code",forceOpen:i,variant:r="default",trailing:o,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=U(),[h,x]=R.useState(f??!1),{handleCopy:v,copied:b}=Ms(),k=n==="loading",j=n==="error",y=!!(c&&c.trim())||!!p,S=r==="subtask",N=(i??!1)||h,w=Sn({initial:k?"instant":!1}),C=a.jsxs(Is,{open:N,onOpenChange:i?void 0:x,className:"min-w-0",children:[a.jsxs($s,{disabled:!y,className:G("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",y&&"[@media(hover:hover)]:hover:bg-accent/30",!y&&"cursor-default",k&&"shimmer"),"aria-disabled":!y,children:[a.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?a.jsx(tt,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:G("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",y&&(N?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),y&&a.jsx("div",{className:G("absolute inset-0 flex items-center justify-center transition-opacity duration-150",N?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:a.jsx(tt,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")})})]})}),a.jsx("span",{className:G("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),l?a.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l})}):a.jsx("div",{className:"flex-1"}),o&&a.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:o}),a.jsx(jt,{usage:t})]}),y&&a.jsx(As,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(u==="prose"?a.jsx("div",{className:"mt-1 mb-1",children:a.jsx("div",{ref:w.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a.jsx("p",{ref:w.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:c})})}):a.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:a.jsx("div",{ref:w.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:a.jsxs("div",{ref:w.contentRef,className:"flex items-start justify-between gap-2",children:[a.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:a.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:c})}),a.jsx("button",{type:"button",onClick:()=>v(c),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?a.jsx(yt,{className:"size-3.5"}):a.jsx(Ts,{className:"size-3.5"})})]})})}))})]});return S?a.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:C}):C}function ne(s){const e=E.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=je(t),e[0]=t,e[1]=l):l=e[1];let n;return e[2]!==l?(n=a.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=n):n=e[3],n}const Pt=4;function Rt(s){const e=E.c(8),{count:t,noun:l,onClick:n}=s,c=U();let u;e[0]!==t||e[1]!==l||e[2]!==c?(u=c("common.seeAll",{count:t,noun:l}),e[0]=t,e[1]=l,e[2]=c,e[3]=u):u=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(bt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==u?(r=a.jsxs("button",{type:"button",onClick:n,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[u,i]}),e[5]=n,e[6]=u,e[7]=r):r=e[7],r}function zt(s){const e=E.c(12),{message:t,className:l}=s,n=t.created_at??t.metadata?.created_at??null;let c,u,i,r;if(e[0]!==l||e[1]!==n){r=Symbol.for("react.early_return_sentinel");e:{const m=Ke(n);if(m===null){r=null;break e}const d=new Date(m);c=d.toLocaleString(),e[6]!==l?(u=G("text-[11px] text-muted-foreground/60 select-none",l),e[6]=l,e[7]=u):u=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=n,e[2]=c,e[3]=u,e[4]=i,e[5]=r}else c=e[2],u=e[3],i=e[4],r=e[5];if(r!==Symbol.for("react.early_return_sentinel"))return r;let o;return e[8]!==c||e[9]!==u||e[10]!==i?(o=a.jsx("span",{title:c,className:u,children:i}),e[8]=c,e[9]=u,e[10]=i,e[11]=o):o=e[11],o}function Be(s){const e=E.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>nt(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[n,c]=R.useState(l);let u,i;e[2]!==t?(u=()=>{const d=setInterval(()=>c(nt(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=u,e[4]=i):(u=e[3],i=e[4]),R.useEffect(u,i);const r=n/1e3;let o;e[5]!==r?(o=je(r),e[5]=r,e[6]=o):o=e[6];let m;return e[7]!==o?(m=a.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:o}),e[7]=o,e[8]=m):m=e[8],m}const Dt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function kn(){const s=E.c(5),[e]=R.useState(_n);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let l;s[1]!==e?(l=Dt.map((c,u)=>{const{delay:i}=c;return a.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[u],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},u)}),s[1]=e,s[2]=l):l=s[2];let n;return s[3]!==l?(n=a.jsx("div",{className:"grid",style:t,children:l}),s[3]=l,s[4]=n):n=s[4],n}function _n(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Dt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function wn(s){return{planning:{icon:a.jsx(fs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:a.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const Cn=1200;function Oe(s){const e=E.c(8),{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:i,trailing:r}=s,o=i===void 0?"prose":i;let m;return e[0]!==c||e[1]!==o||e[2]!==t||e[3]!==u||e[4]!==n||e[5]!==l||e[6]!==r?(m=a.jsx(H,{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:o,trailing:r}),e[0]=c,e[1]=o,e[2]=t,e[3]=u,e[4]=n,e[5]=l,e[6]=r,e[7]=m):m=e[7],m}function Tn(s){const e=E.c(22),{startedAt:t}=s,l=U(),n=ve()?.runStatusStage??null,[c,u]=R.useState("planning");let i,r;if(e[0]!==n?(i=()=>{if(n!==null)return;const h=setTimeout(()=>{u("thinking")},Cn);return()=>{clearTimeout(h)}},r=[n],e[0]=n,e[1]=i,e[2]=r):(i=e[1],r=e[2]),R.useEffect(i,r),n!==null){let h;e[3]!==n||e[4]!==l?(h=Ps(l,n),e[3]=n,e[4]=l,e[5]=h):h=e[5];const x=h;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(Ie,{className:"size-4"}),e[6]=v):v=e[6];const b=`${x.label}...`;let k;e[7]!==t?(k=t!==null&&a.jsx(Be,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==x.detail||e[10]!==b||e[11]!==k?(j=a.jsx(Oe,{icon:v,title:b,summary:x.detail,state:"loading",trailing:k}),e[9]=x.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let o;e[13]!==l?(o=wn(l),e[13]=l,e[14]=o):o=e[14];const d=o[c],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&a.jsx(Be,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=a.jsx(Oe,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function In(s){const e=E.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(kn,{}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=a.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[l,a.jsx(Be,{since:t})]}),e[1]=t,e[2]=n):n=e[2],n}const $n=2e4;function An(s){const e=E.c(9),{startedAt:t}=s,l=U(),n=Ge(1e3),c=ve(),i=(t!==null?n-t:0)>=$n;let r;e[0]!==t?(r=a.jsx(Tn,{startedAt:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==i||e[3]!==c||e[4]!==l?(o=i&&c?.stop&&a.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[a.jsx("span",{children:l("chat.thinkingIndicator.takingLonger")}),a.jsx("button",{type:"button",onClick:()=>c.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:l("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=c,e[4]=l,e[5]=o):o=e[5];let m;return e[6]!==r||e[7]!==o?(m=a.jsxs("div",{className:"flex flex-col gap-0.5",children:[r,o]}),e[6]=r,e[7]=o,e[8]=m):m=e[8],m}function Mn(s){const e=E.c(24),{duration:t,parts:l,isStreaming:n}=s,c=U();let u;e[0]!==l?(u=l.every(Pn),e[0]=l,e[1]=u):u=e[1];const i=u;let r;e[2]!==t||e[3]!==c?(r=t&&t/1e3>1?c("chat.thinkingIndicator.thoughtFor",{duration:je(t/1e3)}):c("chat.thinkingIndicator.thought"),e[2]=t,e[3]=c,e[4]=r):r=e[4];const o=r;let m;if(e[5]!==i||e[6]!==n||e[7]!==l){const k=l.map(Ln).join(`
2
2
  `).trim().split(`
3
3
  `).filter(Boolean),j=n?k[k.length-1]??"":k[0]??"";m=!i&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=i,e[6]=n,e[7]=l,e[8]=m}else m=e[8];const d=m;let f;if(e[9]!==i||e[10]!==l){const b=l.map(En).join(`
4
4
 
@@ -1 +1 @@
1
- import{c as f,X as g,a2 as y,K as P,m as _,l as h,j as d}from"./index-QvCrIW6i.js";import{u as A}from"./use-decopilot-events-wck0cVko.js";function I(){const e=f.c(6),t=y(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],_(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const E=new Set(["custom","ai_service"]);function j(e){return!!e&&E.has(e)}const w="mailto:sales@deco.cx";function O(){const e=f.c(8),{org:t}=g(),a=y(),o=A();let n;e[0]!==t.id?(n=P.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(N)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],_(r)}function N(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function q(e){return b(e).color}function b(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:x,color:S}=b(a);n=x,s="0 0 16 16",r="true",c=h("size-8 shrink-0",S,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{F,K as P,w as S,I as a,q as b,v as f,j as i,R as p,O as u};
1
+ import{c as f,X as g,a2 as y,K as P,m as _,l as h,j as d}from"./index-BDhW9xxN.js";import{u as A}from"./use-decopilot-events-CY9KSVWJ.js";function I(){const e=f.c(6),t=y(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],_(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const E=new Set(["custom","ai_service"]);function j(e){return!!e&&E.has(e)}const w="mailto:sales@deco.cx";function O(){const e=f.c(8),{org:t}=g(),a=y(),o=A();let n;e[0]!==t.id?(n=P.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(N)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],_(r)}function N(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function q(e){return b(e).color}function b(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:x,color:S}=b(a);n=x,s="0 0 16 16",r="true",c=h("size-8 shrink-0",S,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{F,K as P,w as S,I as a,q as b,v as f,j as i,R as p,O as u};
@@ -1 +1 @@
1
- import{r as i,bm as A,j as c,bo as O,bp as h,bt as _,br as G,bs as H,bn as L,bx as j,dd as E,bF as z,bA as K,bC as B,bG as U,bB as V,bD as W,bE as Z,bH as q,bI as J,bv as Q,c as C,l as X}from"./index-QvCrIW6i.js";var m="Popover",[w]=z(m,[j]),x=j(),[Y,v]=w(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=x(e),d=i.useRef(null),[l,u]=i.useState(!1),[f,P]=G({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(H,{...p,children:c.jsx(Y,{scope:e,contentId:L(),triggerRef:d,open:f,onOpenChange:P,onOpenToggle:i.useCallback(()=>P(R=>!R),[P]),hasCustomAnchor:l,onCustomAnchorAdd:i.useCallback(()=>u(!0),[]),onCustomAnchorRemove:i.useCallback(()=>u(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(F,o),s=x(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(y,o),s=x(o),a=A(e,n.triggerRef),p=c.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:a,onClick:h(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});D.displayName=y;var b="PopoverPortal",[ee,oe]=w(b,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=v(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(E,{present:o||s.open,children:c.jsx(Q,{asChild:!0,container:n,children:r})})})};M.displayName=b;var g="PopoverContent",I=i.forwardRef((t,e)=>{const o=oe(g,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=v(g,t.__scopePopover);return c.jsx(E,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});I.displayName=g;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return K(a)},[]),c.jsx(B,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:h(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,d=p.button===0&&p.ctrlKey===!0,l=p.button===2||d;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:h(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:u,...f}=t,P=v(g,o),R=x(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onDismiss:()=>P.onOpenChange(!1),children:c.jsx(q,{"data-state":$(P.open),role:"dialog",id:P.contentId,...R,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(k,o);return c.jsx(O.button,{type:"button",...r,ref:e,onClick:h(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=x(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=I;function ve(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(16);let o,r,n,s,a;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5]);const p=s===void 0?"center":s,d=a===void 0?4:a;let l;e[6]!==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-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden border p-4 shadow-md outline-hidden",o),e[6]=o,e[7]=l):l=e[7];let u;e[8]!==p||e[9]!==n||e[10]!==d||e[11]!==l?(u=c.jsx(de,{"data-slot":"popover-content",align:p,sideOffset:d,translate:"no",className:l,...n}),e[8]=p,e[9]=n,e[10]=d,e[11]=l,e[12]=u):u=e[12];let f;return e[13]!==r||e[14]!==u?(f=c.jsx(ue,{container:r,children:u}),e[13]=r,e[14]=u,e[15]=f):f=e[15],f}function he(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-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,bm as A,j as c,bo as O,bp as h,bt as _,br as G,bs as H,bn as L,bx as j,dd as E,bF as z,bA as K,bC as B,bG as U,bB as V,bD as W,bE as Z,bH as q,bI as J,bv as Q,c as C,l as X}from"./index-BDhW9xxN.js";var m="Popover",[w]=z(m,[j]),x=j(),[Y,v]=w(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=x(e),d=i.useRef(null),[l,u]=i.useState(!1),[f,P]=G({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(H,{...p,children:c.jsx(Y,{scope:e,contentId:L(),triggerRef:d,open:f,onOpenChange:P,onOpenToggle:i.useCallback(()=>P(R=>!R),[P]),hasCustomAnchor:l,onCustomAnchorAdd:i.useCallback(()=>u(!0),[]),onCustomAnchorRemove:i.useCallback(()=>u(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(F,o),s=x(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(y,o),s=x(o),a=A(e,n.triggerRef),p=c.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:a,onClick:h(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});D.displayName=y;var b="PopoverPortal",[ee,oe]=w(b,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=v(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(E,{present:o||s.open,children:c.jsx(Q,{asChild:!0,container:n,children:r})})})};M.displayName=b;var g="PopoverContent",I=i.forwardRef((t,e)=>{const o=oe(g,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=v(g,t.__scopePopover);return c.jsx(E,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});I.displayName=g;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return K(a)},[]),c.jsx(B,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:h(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,d=p.button===0&&p.ctrlKey===!0,l=p.button===2||d;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:h(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:u,...f}=t,P=v(g,o),R=x(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onDismiss:()=>P.onOpenChange(!1),children:c.jsx(q,{"data-state":$(P.open),role:"dialog",id:P.contentId,...R,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(k,o);return c.jsx(O.button,{type:"button",...r,ref:e,onClick:h(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=x(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=I;function ve(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(16);let o,r,n,s,a;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5]);const p=s===void 0?"center":s,d=a===void 0?4:a;let l;e[6]!==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-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden border p-4 shadow-md outline-hidden",o),e[6]=o,e[7]=l):l=e[7];let u;e[8]!==p||e[9]!==n||e[10]!==d||e[11]!==l?(u=c.jsx(de,{"data-slot":"popover-content",align:p,sideOffset:d,translate:"no",className:l,...n}),e[8]=p,e[9]=n,e[10]=d,e[11]=l,e[12]=u):u=e[12];let f;return e[13]!==r||e[14]!==u?(f=c.jsx(ue,{container:r,children:u}),e[13]=r,e[14]=u,e[15]=f):f=e[15],f}function he(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-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};
@@ -0,0 +1 @@
1
+ import{c as it,b as pt,r as mt,x as vt,j as e,l as et,B as tt,ak as Nt}from"./index-BDhW9xxN.js";import{Z as Ct,z as kt}from"./agent-icon-CP_Ce3vP.js";import{s as Dt}from"./Plus-088McVZs.js";import{S as St}from"./scroll-area-DCMK1tWu.js";import{ae as wt,l as zt,a9 as Tt,aa as Et,af as Pt,a8 as ct,ac as dt}from"./agent-site-editor-content-CbT525Tv.js";import"./AlertCircle-BhLvKd51.js";import"./Tool01-DQQGDcpr.js";import"./ArrowUp-BiSVkN3f.js";import"./ArrowLeft-BGBmg7V7.js";import"./LinkBroken01-CKAYv5Ws.js";import"./ShoppingBag01-BxQzf-9l.js";import"./ZoomOut-DsjWT-m0.js";import"./Building02-Cn4v8u0T.js";import"./CheckCircle-DtMOIYIN.js";import"./Check-BIm8oPAI.js";import"./ChevronUp-CW9NwQNu.js";import"./UserSquare-DAPHqKUt.js";import"./Copy01-CVhdu84v.js";import"./CreditCard01-YvQwrjsc.js";import"./DotsVertical-D-FvZQn0.js";import"./Image01-CGBVFmAI.js";import"./Palette-CbtdR6wJ.js";import"./XClose-BqnBpCCh.js";import"./Key01-CwVo9Cfv.js";import"./Link01-9k5oDSP-.js";import"./LinkExternal01-DNJF5sr3.js";import"./Monitor01-emBSPIO-.js";import"./Sun-D6nY-Bb0.js";import"./SearchMd-CRK8FN15.js";import"./Trash01-B3Mmvw35.js";import"./Upload01-jQPNdEwy.js";import"./User01-B-OC1WKF.js";import"./Users01-ClTO42s_.js";import"./X-B8pJz_49.js";import"./select-B6DzqJiH.js";import"./index-Bjctp948.js";import"./agent-view-guard-C1R2qCc9.js";import"./use-main-panel-tabs-DmvkA1OF.js";import"./use-chat-layout-state-C_QstcMu.js";import"./use-file-configs-Dk0C1WSo.js";import"./use-organization-settings-BBoTt-lq.js";import"./schema-B4_xo1tD.js";import"./task-board-BpcFKojY.js";import"./site-slug-DebpOoQq.js";import"./thread-route-BRm6UAyi.js";import"./use-panel-navigate-yk7t3bcJ.js";import"./use-project-scope-BxM698pt.js";import"./repository-binding-C6IRmj-B.js";import"./use-mcp-client-alN3BSuJ.js";import"./auth-2OsbyFrK.js";import"./thread-intent-y4sFV6nC.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./use-connection-hMJ4m1KM.js";import"./use-mcp-tools-s04xKOM2.js";import"./types-C1FT5lJw.js";import"./utils-CVEq3hMx.js";import"./index-kogfMavo.js";import"./chat-context-Blq_eRG7.js";import"./autosend-BL2q_s0u.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-CY9KSVWJ.js";import"./use-ai-providers-cz2PnRt5.js";import"./location-DPIrGNp7.js";import"./gateway-client-C0zWKCU4.js";import"./tooltip-D555rgHk.js";import"./dialog-BGB8jiGJ.js";import"./drawer-CDzlciSr.js";import"./collection-search-9MFDsQ6p.js";import"./use-mobile-DEWonsbr.js";import"./use-mcp-prompts-C5SH_xGs.js";import"./index-DClhYi2n.js";import"./form-Bc6DsBML.js";import"./label-uTNaIuWI.js";import"./input-DrKcGYrl.js";import"./org-file-open-context-BMxi_LQF.js";import"./input-Bl8RoIF_.js";import"./shell-layout-CTITeNJr.js";import"./avatar-BE-fSFZD.js";import"./download-app-dialog-C1623CnU.js";import"./use-clock-tick-Dx4PkWs4.js";import"./command-B4jGFd17.js";import"./index-BOGlzqxy.js";import"./integration-icon-BDP6F9Pj.js";import"./project-icon-CtBv5qE9.js";import"./new-project-dialog-C_qrCiK3.js";import"./repository-import-picker-COTFeOcQ.js";import"./use-navigate-to-agent-MADN_glW.js";import"./repository-picker-sBc4_JWX.js";import"./useInfiniteQuery-DWxFiM4L.js";import"./infiniteQueryObserver-8nco6j0l.js";import"./use-debounced-value-DCwb28TF.js";import"./required-auth-layout-CslXPG0m.js";import"./use-org-sso-DzvTriO7.js";import"./chat-draft-jYk7-XVU.js";import"./use-session-runtime-Cgb0XGQC.js";import"./usage-stats-cLtXqoaq.js";import"./use-copy-D1Nm-kgX.js";import"./markdown-LIOti3qC.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs-QC_e18gg.js";import"./use-deco-credits-3BarR1a3.js";import"./toggle-group-B2CGQVNc.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-CSK9y7YW.js";import"./decopilot-NLRNUzMe.js";import"./checkbox-D5Dxpou_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-BeYdUP-7.js";import"./index-CN7c5BIN.js";import"./input--BdO_-Si.js";import"./suggestion-CRtEJ9La.js";import"./use-org-fs-BQ9rCXmr.js";import"./question-004-sINsf4GQ.js";import"./use-members-DF7c1t5_.js";import"./use-org-auth-client-CoFPUjTd.js";import"./feature-paywall-B0iudT_s.js";import"./plan-ladder-DCJHDLS1.js";import"./add-connection-dialog-BhN1VUAm.js";import"./extract-connection-data-BnK0gWOf.js";import"./metadata-D72DunRR.js";import"./connection-CwaA-4mr.js";import"./connection-card-BtsAXkN4.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-MfQKTdum.js";import"./connection-form-helpers-BV0FZHte.js";import"./authenticate-and-persist-oauth-BGZheh1t.js";import"./mcp-oauth-DdEBE0Y7.js";import"./collection-tabs-jDuTyfYq.js";import"./badge-CWkPL4_H.js";import"./use-infinite-scroll-DoBJIre7.js";import"./useSuspenseInfiniteQuery-Cc2PctH-.js";import"./use-task-board-events-gPs9mr0g.js";import"./pair-DcQaouFq.js";import"./collapsible-DsS_PEhd.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Z11oKtDn.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CMNWdtKR.js";import"./use-thread-outputs-CHJvnckm.js";import"./file-type-icon-CaoQ1xmx.js";import"./sandbox-lifecycle-context-DeQIS6JV.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resolve-tab-icon-CY3X9f4_.js";import"./use-task-metadata-DhhvrkSV.js";import"./virtual-mcp-DYlKBgbY.js";import"./feature-gate-cEqP5nQK.js";import"./alert-dialog-DmVEYAb4.js";import"./runnable-block-editor-DcMkYuUb.js";import"./claim-phase-copy-8K3qgNLh.js";import"./utils-BFq73cJ1.js";import"./monaco-editor-J-McljL4.js";import"./editor-CtDmuL7X.js";import"./calendar-BibeDh1C.js";import"./use-new-blocks-editor-D6QRwqGF.js";import"./rich-text-link-control-B1QtoX3z.js";import"./core.esm-C5SAJNWk.js";import"./switch-Ay_EsHPF.js";import"./combobox-DF39TceE.js";import"./search-input-BSOQ3ySE.js";import"./asset-utils-CT4-E6TK.js";import"./sandbox-git-api-DTIjDZTr.js";import"./mustache-B6NVLdGZ.js";import"./empty-state-CjQyKZ-1.js";import"./empty-state-ClSZs1JG.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",xt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Fo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:l,onReschedule:i,isCreating:k}=h,s=k===void 0?!1:k,r=pt(),[v,N]=mt.useState(null),[rt]=vt(),[n,f]=mt.useState(It),p=rt.language;let C;t[0]!==n||t[1]!==p?(C=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=C):C=t[2];const y=C;let x,u,a,c,j,D,S,w,z,T;if(t[3]!==n||t[4]!==b||t[5]!==v||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==l||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const ut=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=wt(zt(b)),st=Tt(n),bt=Et(new Date);u="flex h-full w-full flex-col";let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(ct(new Date)),t[24]=G):G=t[24];let I;t[25]!==r?(I=r("sandbox.postCalendar.today"),t[25]=r,t[26]=I):I=t[26];let H;t[27]!==I?(H=e.jsx(tt,{variant:"outline",size:"sm",onClick:G,children:I}),t[27]=I,t[28]=H):H=t[28];let J;t[29]===Symbol.for("react.memo_cache_sentinel")?(J=()=>f(Mt),t[29]=J):J=t[29];let U;t[30]!==r?(U=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=U):U=t[31];let Q;t[32]===Symbol.for("react.memo_cache_sentinel")?(Q=e.jsx(kt,{size:16}),t[32]=Q):Q=t[32];let _;t[33]!==U?(_=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:J,"aria-label":U,children:Q}),t[33]=U,t[34]=_):_=t[34];let V;t[35]===Symbol.for("react.memo_cache_sentinel")?(V=()=>f(Lt),t[35]=V):V=t[35];let $;t[36]!==r?($=r("sandbox.postCalendar.next"),t[36]=r,t[37]=$):$=t[37];let X;t[38]===Symbol.for("react.memo_cache_sentinel")?(X=e.jsx(Nt,{size:16}),t[38]=X):X=t[38];let O;t[39]!==$?(O=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:V,"aria-label":$,children:X}),t[39]=$,t[40]=O):O=t[40];let B;t[41]!==y?(B=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=B):B=t[42];let F;t[43]!==r?(F=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=F):F=t[44];let R;t[45]!==F?(R=e.jsx(lt,{className:ft,label:F}),t[45]=F,t[46]=R):R=t[46];let A;t[47]!==r?(A=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=A):A=t[48];let K;t[49]!==A?(K=e.jsx(lt,{className:xt,label:A}),t[49]=A,t[50]=K):K=t[50];let W;t[51]!==R||t[52]!==K?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[R,K]}),t[51]=R,t[52]=K,t[53]=W):W=t[53],t[54]!==H||t[55]!==_||t[56]!==O||t[57]!==B||t[58]!==W?(a=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[H,_,O,B,W]}),t[54]=H,t[55]=_,t[56]=O,t[57]=B,t[58]=W,t[59]=a):a=t[59],T="relative flex-1 min-h-0",x=St,z="h-full",S="flex min-w-[880px] gap-4 p-4";let Z;t[60]!==r?(Z=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=Z):Z=t[61];let Y;t[62]!==Z?(Y=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Z}),t[62]=Z,t[63]=Y):Y=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(m=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:ut.format(m)},m.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(m=>{const yt=m.getMonth()===n.getMonth(),jt=ht.get(Pt(m))??[];return e.jsxs("div",{onDragOver:g=>{v&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const at=g.dataTransfer.getData("text/plain");N(null),at&&i(at,m)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",v&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",m.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:m.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>l(m),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(m)}),children:e.jsx(Dt,{size:14})})]}),jt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:N},g.post.key))]},m.getTime())})}),Y]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",j=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),D=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Ct,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(m=>e.jsx(nt,{entry:m,active:m.post.key===d,draggable:!1,onSelect:o,onDragStateChange:N},m.post.key)),t[3]=n,t[4]=b,t[5]=v,t[6]=s,t[7]=p,t[8]=y,t[9]=l,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=x,t[15]=u,t[16]=a,t[17]=c,t[18]=j,t[19]=D,t[20]=S,t[21]=w,t[22]=z,t[23]=T}else x=t[14],u=t[15],a=t[16],c=t[17],j=t[18],D=t[19],S=t[20],w=t[21],z=t[22],T=t[23];let E;t[64]!==c||t[65]!==j||t[66]!==D?(E=e.jsxs("div",{className:c,children:[j,D]}),t[64]=c,t[65]=j,t[66]=D,t[67]=E):E=t[67];let P;t[68]!==E||t[69]!==S||t[70]!==w?(P=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=P):P=t[71];let L;t[72]!==x||t[73]!==P||t[74]!==z?(L=e.jsx(x,{className:z,children:P}),t[72]=x,t[73]=P,t[74]=z,t[75]=L):L=t[75];let M;t[76]!==L||t[77]!==T?(M=e.jsx("div",{className:T,children:L}),t[76]=L,t[77]=T,t[78]=M):M=t[78];let q;return t[79]!==u||t[80]!==a||t[81]!==M?(q=e.jsxs("div",{className:u,children:[a,M]}),t[79]=u,t[80]=a,t[81]=M,t[82]=q):q=t[82],q}function Lt(h){return dt(h,1)}function Mt(h){return dt(h,-1)}function It(){return ct(new Date)}function lt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,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 i;return t[4]!==d||t[5]!==l?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,d]}),t[4]=d,t[5]=l,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:l,onDragStateChange:i}=h,k=pt(),{post:s,scheduled:r}=b,v=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let N;t[0]!==k||t[1]!==v?(N=k(v),t[0]=k,t[1]=v,t[2]=N):N=t[2];const rt=N;let n;t[3]!==i||t[4]!==s.key?(n=j=>{j.dataTransfer.setData("text/plain",s.key),j.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==l||t[9]!==s.key?(p=()=>l(s.key),t[8]=l,t[9]=s.key,t[10]=p):p=t[10];const C=`${s.title} · ${rt}`,y=r?ft:xt,x=o&&"cursor-grab active:cursor-grabbing",u=d&&"ring-2 ring-primary";let a;t[11]!==y||t[12]!==x||t[13]!==u?(a=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,x,u),t[11]=y,t[12]=x,t[13]=u,t[14]=a):a=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==a||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==C?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:C,className:a,children:s.title}),t[15]=o,t[16]=s.title,t[17]=a,t[18]=n,t[19]=f,t[20]=p,t[21]=C,t[22]=c):c=t[22],c}export{Fo as PostCalendar};