decocms 4.358.8 → 4.358.10

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 (261) hide show
  1. package/dist/client/assets/{AlertCircle-BDGgDdnU.js → AlertCircle-CGv2LagT.js} +1 -1
  2. package/dist/client/assets/{AreaChart-iCDv15_j.js → AreaChart-C8jz28H2.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DcYZMYcp.js → ArrowLeft-CrqXhP5Q.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-C-JKgzzW.js → ArrowRight-PtPDnQeO.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Xs8btF3m.js → ArrowUp-DWMH94N-.js} +1 -1
  6. package/dist/client/assets/{Check-Bum7-gpx.js → Check-OrdEpHh8.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-CGCTggu0.js → CheckCircle-ZifqNZkG.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-C307yAT0.js → ChevronRight-CLj2ZqtT.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-KvgVrvOl.js → ChevronSelectorVertical-CpUm5l1j.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-CZ5ILA-E.js → ChevronUp-DwN4CSvk.js} +1 -1
  11. package/dist/client/assets/{Copy01-AMwHi9CR.js → Copy01-iyRTWREU.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-9F1qqx5d.js → CreditCard01-CoUWna_2.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-BCEQFCLt.js → DotsVertical-C05jEl8q.js} +1 -1
  14. package/dist/client/assets/{Download01-DmH-thwp.js → Download01-CzfGo2fl.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-HqNwclqo.js → ErrorBarContext-DxG-Gwqv.js} +1 -1
  16. package/dist/client/assets/{Eye-C9BK0WpO.js → Eye-Cz2-nV7m.js} +1 -1
  17. package/dist/client/assets/{GitBranch01-8UQB0WNt.js → GitBranch01-G4Xokeyr.js} +1 -1
  18. package/dist/client/assets/{Globe01-66hYLRXC.js → Globe01-c3fEChsS.js} +1 -1
  19. package/dist/client/assets/{HardDrive-B1Me-FOx.js → HardDrive-CjWNQ53c.js} +1 -1
  20. package/dist/client/assets/{Image01-DVxIiG0a.js → Image01-CijeoW_8.js} +1 -1
  21. package/dist/client/assets/{Key01-eG7JQJD3.js → Key01-j6qNNGjk.js} +1 -1
  22. package/dist/client/assets/{Link01-D-2P1k10.js → Link01-CtsE0R0D.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01-CMl1UKVD.js → LinkExternal01-DRhSoo2W.js} +1 -1
  24. package/dist/client/assets/{Monitor01-Dx2IHfNm.js → Monitor01-ASpw1r2B.js} +1 -1
  25. package/dist/client/assets/{Package-fd_l_BiE.js → Package-Co40SS3v.js} +1 -1
  26. package/dist/client/assets/{Palette-CFejZrzA.js → Palette-l-bW1Jj5.js} +1 -1
  27. package/dist/client/assets/{Play-DWGn9jzY.js → Play-DPtsotun.js} +1 -1
  28. package/dist/client/assets/{Plus-BB9moQlk.js → Plus-Db5S94rk.js} +1 -1
  29. package/dist/client/assets/{SearchLg-Dx_5UJpu.js → SearchLg-BKpVdtSc.js} +1 -1
  30. package/dist/client/assets/{SearchMd-DRTW6Eci.js → SearchMd-5J9ZvzPt.js} +1 -1
  31. package/dist/client/assets/{Sector-BLukRuC0.js → Sector-CEDNUVBW.js} +1 -1
  32. package/dist/client/assets/{Settings02-CxNahSF6.js → Settings02-CX9GU2_h.js} +1 -1
  33. package/dist/client/assets/{Share07-D21XeGjn.js → Share07-ajbW_r5c.js} +1 -1
  34. package/dist/client/assets/{Shield01-CTgru1Go.js → Shield01-DKmYeZMQ.js} +1 -1
  35. package/dist/client/assets/{Stars01-CEq_MKrs.js → Stars01-Bx4pQeLg.js} +1 -1
  36. package/dist/client/assets/{Sun-BnzNJ9ph.js → Sun-B0zPFK-z.js} +1 -1
  37. package/dist/client/assets/{Tool01-CuyN3PCD.js → Tool01-C97w77mt.js} +1 -1
  38. package/dist/client/assets/{Tool02-BASbnym5.js → Tool02-Rgho6xFo.js} +1 -1
  39. package/dist/client/assets/{Trash01-BhSt7amx.js → Trash01-BnoaysZr.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-DO4mZNHN.js → TrendUp01-B2IK8kp9.js} +1 -1
  41. package/dist/client/assets/{Upload01-BlXZHJIt.js → Upload01-QLEKcflz.js} +1 -1
  42. package/dist/client/assets/{User01-BHYLCtnk.js → User01-BYx93o00.js} +1 -1
  43. package/dist/client/assets/{UserSquare-B7oSdaaK.js → UserSquare-D121VNlC.js} +1 -1
  44. package/dist/client/assets/{Users01-QsT1MVSH.js → Users01-DxZpgNMB.js} +1 -1
  45. package/dist/client/assets/{Users03-BwXNg2js.js → Users03-BH7DTuey.js} +1 -1
  46. package/dist/client/assets/{XCircle-C2-e12le.js → XCircle-CZewIPeW.js} +1 -1
  47. package/dist/client/assets/{XClose-Dt5lNjhR.js → XClose-DPz14YDo.js} +1 -1
  48. package/dist/client/assets/{Zap-D1eUhlLV.js → Zap-PhE6JDGE.js} +1 -1
  49. package/dist/client/assets/{ZoomOut-6XJtTBIm.js → ZoomOut-DsYyutbV.js} +1 -1
  50. package/dist/client/assets/{access-gate-C9n3qFMJ.js → access-gate-BtnmxIIZ.js} +1 -1
  51. package/dist/client/assets/{agent-icon-CvRN2kIe.js → agent-icon-CqZT47B5.js} +1 -1
  52. package/dist/client/assets/{agents-list-7P-FBRl3.js → agents-list-BaWHdEgp.js} +1 -1
  53. package/dist/client/assets/{ai-providers-C7AEeTUw.js → ai-providers-BLwMpXNz.js} +1 -1
  54. package/dist/client/assets/{alert-Hw0kjni-.js → alert-Ziy_5z2J.js} +1 -1
  55. package/dist/client/assets/{alert-dialog-B99tFCPN.js → alert-dialog-DPc_fzyi.js} +1 -1
  56. package/dist/client/assets/{analytics-tab-B7tes2Gc.js → analytics-tab-N1p2Xs04.js} +1 -1
  57. package/dist/client/assets/api-keys-C6t-kS4-.js +1 -0
  58. package/dist/client/assets/{api-keys-Dfjx7xoL.js → api-keys-y8GYCxeE.js} +1 -1
  59. package/dist/client/assets/{app-editor-Dc7_2kRP.js → app-editor-BFFbsBfB.js} +1 -1
  60. package/dist/client/assets/{auth-CA9YH-f3.js → auth-XEUSFe4G.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-Dv36CPjo.js → auth-catchall-rTdEtfmw.js} +1 -1
  62. package/dist/client/assets/{auth-entry-Dzg61dx3.js → auth-entry-BPySrhTo.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-CP-gPGo1.js → auth-split-layout-BONfi2Rj.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-BvkyzpZN.js → authenticate-and-persist-oauth-DRVJSg4u.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-DNckdHdK.js → automation-list-row-pWHxlUwn.js} +1 -1
  66. package/dist/client/assets/{automation-runs-Cam7zjTB.js → automation-runs-CAJKg5F2.js} +1 -1
  67. package/dist/client/assets/{automations-CWYrhHD5.js → automations-CdiuzHyh.js} +1 -1
  68. package/dist/client/assets/{autosend-DonDFhf5.js → autosend-DXSzImGH.js} +1 -1
  69. package/dist/client/assets/{avatar-eSpZRnCw.js → avatar-2SmZuxZ8.js} +1 -1
  70. package/dist/client/assets/{badge-XewurO2c.js → badge-CsdSFwUS.js} +1 -1
  71. package/dist/client/assets/{block-document-DXkP4s-G.js → block-document-nZbGlStM.js} +1 -1
  72. package/dist/client/assets/{breadcrumb-BOorO6tz.js → breadcrumb-BDNhTm3V.js} +1 -1
  73. package/dist/client/assets/{buckets-BwnIpmT9.js → buckets-eTPri2zC.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-BOGUZvpe.js → bulk-category-panel-BF6YfBVd.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-C2MVQTkh.js → capability-load-error-x5n-DlZV.js} +1 -1
  76. package/dist/client/assets/{cards-JFqjIjqN.js → cards-C4c8buka.js} +1 -1
  77. package/dist/client/assets/{category-editor-D5y2bsYp.js → category-editor-D3Mu7OT9.js} +1 -1
  78. package/dist/client/assets/{cdn-tab-BKnxL2B5.js → cdn-tab-LzJwiBk6.js} +1 -1
  79. package/dist/client/assets/{chart-mE2TkzW3.js → chart-CRg8heLY.js} +1 -1
  80. package/dist/client/assets/{chat-context-BoK19tyJ.js → chat-context-BF1udRnT.js} +1 -1
  81. package/dist/client/assets/{checkbox-rGQPVLlM.js → checkbox-D5qaWCp0.js} +1 -1
  82. package/dist/client/assets/{choose-editor-CVBix5FG.js → choose-editor-kI07w4JH.js} +1 -1
  83. package/dist/client/assets/{cli-auth-success-BEN_pMrR.js → cli-auth-success-DHYJ8HFe.js} +1 -1
  84. package/dist/client/assets/{client-icons-D58J4srx.js → client-icons-C0PnsTTH.js} +1 -1
  85. package/dist/client/assets/{collection-detail-B9CbvuqZ.js → collection-detail-DjaMsxtF.js} +1 -1
  86. package/dist/client/assets/{collection-display-button-BeuXG52n.js → collection-display-button-C48rlblm.js} +1 -1
  87. package/dist/client/assets/{collection-search-DmicjHft.js → collection-search-BpTPwhoI.js} +1 -1
  88. package/dist/client/assets/{collection-table-wrapper-DgYJhm5y.js → collection-table-wrapper-CJiI6Ia-.js} +1 -1
  89. package/dist/client/assets/{collection-tabs-C6YGoh8i.js → collection-tabs-DJD19Xj2.js} +1 -1
  90. package/dist/client/assets/{command-C3gabQe3.js → command-185_z6Zw.js} +1 -1
  91. package/dist/client/assets/{commerce-onboarding-Bnqmsl3-.js → commerce-onboarding-RNJRITMx.js} +1 -1
  92. package/dist/client/assets/{connect-Q5DfFzFD.js → connect-D8bUIAHy.js} +1 -1
  93. package/dist/client/assets/{connect-layout-DWE0huJK.js → connect-layout-RZifaua7.js} +1 -1
  94. package/dist/client/assets/{connection-Bncsv4WN.js → connection-CrGg2u4l.js} +1 -1
  95. package/dist/client/assets/{connection-card-u8mXK_Ll.js → connection-card-BClWqucN.js} +1 -1
  96. package/dist/client/assets/{connection-detail-CwFWu0EH.js → connection-detail-DE1Qgr5A.js} +1 -1
  97. package/dist/client/assets/{connection-form-helpers-j2xch7QZ.js → connection-form-helpers-DUW9T-b4.js} +1 -1
  98. package/dist/client/assets/{connections-BhiGlSzc.js → connections-Du71jGOQ.js} +1 -1
  99. package/dist/client/assets/{create-organization-dialog-Bg1s74p9.js → create-organization-dialog-C54vb_Vq.js} +1 -1
  100. package/dist/client/assets/{decopilot-sse-pool-CdA-XfpC.js → decopilot-sse-pool-BdZvUT3v.js} +1 -1
  101. package/dist/client/assets/{dialog-Cb73HT1O.js → dialog-ChihYhwF.js} +1 -1
  102. package/dist/client/assets/{domain-settings-C8SUp69p.js → domain-settings-CKGbXxzq.js} +1 -1
  103. package/dist/client/assets/{drawer-CrnZ4v7V.js → drawer-CzXVcBN1.js} +1 -1
  104. package/dist/client/assets/{dropdown-menu-D5sP40Bh.js → dropdown-menu-DWuIuZTX.js} +1 -1
  105. package/dist/client/assets/{e2e-tab-D7wjbQ-q.js → e2e-tab-DDD6AJwF.js} +1 -1
  106. package/dist/client/assets/{editor-M0xQdBHV.js → editor-H7C8lNIT.js} +1 -1
  107. package/dist/client/assets/{empty-state-Bq5_azuW.js → empty-state-01NavnmO.js} +1 -1
  108. package/dist/client/assets/{empty-state-CGgojVAN.js → empty-state-DbicIg3-.js} +1 -1
  109. package/dist/client/assets/{extract-connection-data-CtGZSOXf.js → extract-connection-data-BAxq3n70.js} +1 -1
  110. package/dist/client/assets/{file-explorer-CTNRxawe.js → file-explorer-DVbI9hET.js} +1 -1
  111. package/dist/client/assets/{file-type-icon-oPj2x3Y3.js → file-type-icon-BlQUrQtA.js} +1 -1
  112. package/dist/client/assets/{folder-icon-DA126rB1.js → folder-icon-B6ia37fF.js} +1 -1
  113. package/dist/client/assets/{form-CNnCCWV8.js → form-BDJs5Qvh.js} +1 -1
  114. package/dist/client/assets/{general-DzDT6Vv2.js → general-CzDQYiv4.js} +1 -1
  115. package/dist/client/assets/{github-icon-DuVGJXID.js → github-icon-B2p3RHo5.js} +1 -1
  116. package/dist/client/assets/{hooks-CtKQL1uv.js → hooks-D33Qgg2F.js} +1 -1
  117. package/dist/client/assets/{index-CqNk88Pi.js → index-B-aYhG_e.js} +1 -1
  118. package/dist/client/assets/{index-C6UY0_k7.js → index-B6i4XsT7.js} +1 -1
  119. package/dist/client/assets/{index-DCVrdvYW.js → index-BE0X_WUs.js} +1 -1
  120. package/dist/client/assets/{index-DLFnfvCI.js → index-BJjb-RrB.js} +1 -1
  121. package/dist/client/assets/{index-DmMXAqxC.js → index-COKDKMgK.js} +2 -2
  122. package/dist/client/assets/{index-B7H8NK5d.js → index-CYM4KmAb.js} +1 -1
  123. package/dist/client/assets/{index-DnBcUKLj.js → index-Ceh367CC.js} +1 -1
  124. package/dist/client/assets/{index-BV8Tpaci.js → index-Cvaj1kBq.js} +1 -1
  125. package/dist/client/assets/{index-DMb7eqOB.js → index-D_Xfdeox.js} +6 -6
  126. package/dist/client/assets/{index-DmJNeh4D.js → index-DurnJcnQ.js} +1 -1
  127. package/dist/client/assets/index-HwmJeFgi.js +1 -0
  128. package/dist/client/assets/{index-DdHi1L3X.js → index-iV4FO7D4.js} +1 -1
  129. package/dist/client/assets/{index-redirect-BKtKAVbY.js → index-redirect-CA8ApUBF.js} +1 -1
  130. package/dist/client/assets/{infiniteQueryObserver-Dz5h94ot.js → infiniteQueryObserver-B2p8wz-k.js} +1 -1
  131. package/dist/client/assets/{infra-billing-CN-tK9zM.js → infra-billing-CP45pBlh.js} +1 -1
  132. package/dist/client/assets/{input-CgZSXYN4.js → input-6ZRoOsiB.js} +1 -1
  133. package/dist/client/assets/{integration-icon-BGwxObnE.js → integration-icon-pfLnYyjw.js} +1 -1
  134. package/dist/client/assets/{invite-member-dialog-CBjqBdax.js → invite-member-dialog-BLPYvues.js} +1 -1
  135. package/dist/client/assets/{label-C_Rf5I6_.js → label-Cgkh_1r3.js} +1 -1
  136. package/dist/client/assets/{layout-O0yDVNRV.js → layout-DZ0ScegO.js} +1 -1
  137. package/dist/client/assets/{login-dKW57zF9.js → login-CRmRFTIo.js} +1 -1
  138. package/dist/client/assets/{markdown-BKkWa5ul.js → markdown-Ba4606EI.js} +1 -1
  139. package/dist/client/assets/{mcp-app-renderer-BV6YR8SP.js → mcp-app-renderer-Wq2ZjTNw.js} +1 -1
  140. package/dist/client/assets/{mcp-oauth-CoSFRw9a.js → mcp-oauth-Dln_4wHe.js} +1 -1
  141. package/dist/client/assets/{members-C_HRSlhu.js → members-C62QA17c.js} +1 -1
  142. package/dist/client/assets/{monaco-editor-BtpiUfB5.js → monaco-editor-BdWxRxtU.js} +1 -1
  143. package/dist/client/assets/{monitoring-stats-row-Bdfr5UQN.js → monitoring-stats-row-B7g_eBc2.js} +1 -1
  144. package/dist/client/assets/{multi-select-DJ-Hbkxa.js → multi-select-DykJphEQ.js} +1 -1
  145. package/dist/client/assets/{oauth-callback-ai-provider-BTo8Dyys.js → oauth-callback-ai-provider-CacdgFwn.js} +1 -1
  146. package/dist/client/assets/{oauth-callback-s1eKXd1l.js → oauth-callback-wIu9v975.js} +1 -1
  147. package/dist/client/assets/{onboarding-Bnp9L2J4.js → onboarding-DbeL77sR.js} +1 -1
  148. package/dist/client/assets/{org-layout-CVOWyCRt.js → org-layout-BYvlasFg.js} +1 -1
  149. package/dist/client/assets/{organization-choice-CsoNwB5T.js → organization-choice-CVRJOb6w.js} +1 -1
  150. package/dist/client/assets/{orgs-C_WFB3ks.js → orgs-Dh2fj-vC.js} +1 -1
  151. package/dist/client/assets/{page-seo-form-D3PfSoRb.js → page-seo-form-smCDVfuh.js} +1 -1
  152. package/dist/client/assets/{popover-Da7smhdB.js → popover-BZalCRl4.js} +1 -1
  153. package/dist/client/assets/{post-calendar-BafS84ox.js → post-calendar-7D_MpmDL.js} +1 -1
  154. package/dist/client/assets/{post-editor-A7Y4rsBW.js → post-editor-DqXlddhs.js} +1 -1
  155. package/dist/client/assets/{primitives-B6oOpGSj.js → primitives-C1VlMQCy.js} +1 -1
  156. package/dist/client/assets/{profile-BmlhR-8h.js → profile-BQBBmEO4.js} +1 -1
  157. package/dist/client/assets/{project-app-view-BEgtCKq4.js → project-app-view-DNqnzR4P.js} +1 -1
  158. package/dist/client/assets/{project-icon-D745WVE6.js → project-icon-waYb9qf2.js} +1 -1
  159. package/dist/client/assets/{prompts-RnqO9xa8.js → prompts-C55rB_QX.js} +1 -1
  160. package/dist/client/assets/record-editor-kVrAelg9.js +1 -0
  161. package/dist/client/assets/redirect-editor-CUGhYigu.js +1 -0
  162. package/dist/client/assets/registry-Gg3kXYVK.js +2 -0
  163. package/dist/client/assets/{registry-layout-D8JQlcrg.js → registry-layout-BoH5DyRY.js} +1 -1
  164. package/dist/client/assets/{reports-BRPdFcRT.js → reports-CajbWTc2.js} +1 -1
  165. package/dist/client/assets/{repositories-BOf2hJSY.js → repositories-DSL102aD.js} +1 -1
  166. package/dist/client/assets/{repository-import-picker-2oY7vjq9.js → repository-import-picker-DZRr44iG.js} +1 -1
  167. package/dist/client/assets/{repository-picker--o_9En2b.js → repository-picker-BUxhbBbj.js} +1 -1
  168. package/dist/client/assets/{require-capability-rulhqizd.js → require-capability-B_9ys7EC.js} +1 -1
  169. package/dist/client/assets/{required-auth-layout-QwpJ5qZ8.js → required-auth-layout-DOxD4Y6H.js} +1 -1
  170. package/dist/client/assets/{reset-password-CAwnTD8T.js → reset-password-DWsVyW70.js} +1 -1
  171. package/dist/client/assets/{review-settings-C-5ihZ_2.js → review-settings-Di6D-8hx.js} +1 -1
  172. package/dist/client/assets/{roles-DviSZSJQ.js → roles-Dfp9hUTm.js} +1 -1
  173. package/dist/client/assets/{schema-CSGmlZMm.js → schema-jzUpa2jr.js} +1 -1
  174. package/dist/client/assets/{scroll-area-BhnxS9kb.js → scroll-area-DbragFMD.js} +1 -1
  175. package/dist/client/assets/{search-input-BCcfzUeH.js → search-input-DNu9Ocbc.js} +1 -1
  176. package/dist/client/assets/{secrets-CMYZfMLJ.js → secrets-CMBWyHaD.js} +1 -1
  177. package/dist/client/assets/{sections-editor-C7DU0S-p.js → sections-editor-D6ajNoWD.js} +1 -1
  178. package/dist/client/assets/{select-model-B6qnse1n.js → select-model-BXG1SRJJ.js} +1 -1
  179. package/dist/client/assets/{select-DQCnroeo.js → select-zab8WvKE.js} +1 -1
  180. package/dist/client/assets/{self-tool-result-XF_UID6C.js → self-tool-result-CyjCFi1v.js} +1 -1
  181. package/dist/client/assets/{seo-editor-IqwFAmtD.js → seo-editor-CNF0Icj0.js} +1 -1
  182. package/dist/client/assets/settings-layout-CspCvfER.js +1 -0
  183. package/dist/client/assets/{settings-sidebar-zCLDCwg0.js → settings-sidebar-B4oRDPXI.js} +1 -1
  184. package/dist/client/assets/{shell-controls-C61EWaK-.js → shell-controls-sbGWoJVI.js} +1 -1
  185. package/dist/client/assets/{shell-layout-km320KvY.js → shell-layout-Ccj_SXnk.js} +1 -1
  186. package/dist/client/assets/{skill-preview-3aJvIC4k.js → skill-preview-CJaOSWIY.js} +1 -1
  187. package/dist/client/assets/{skills--2BPNJVe.js → skills-D7ISxlba.js} +1 -1
  188. package/dist/client/assets/{sso-BsKl-6Al.js → sso-D43Y1aDt.js} +1 -1
  189. package/dist/client/assets/{store-BaCcJ63F.js → store-B0nI88-L.js} +1 -1
  190. package/dist/client/assets/store-registry-DhrI2BH7.js +2 -0
  191. package/dist/client/assets/{switch-QikprZ0C.js → switch-BlMtLJob.js} +1 -1
  192. package/dist/client/assets/{synced-repos-vqYxShY1.js → synced-repos-adBCVhN0.js} +1 -1
  193. package/dist/client/assets/{table-DZ15ysLv.js → table-Dmi8ccp7.js} +1 -1
  194. package/dist/client/assets/{tabs-Cq_qXG8d.js → tabs-B7ntmQTT.js} +1 -1
  195. package/dist/client/assets/{task-board-CpzOUqzD.js → task-board-y-SZtT16.js} +1 -1
  196. package/dist/client/assets/{task-route-C97W4nQK.js → task-route-APkjt4_d.js} +1 -1
  197. package/dist/client/assets/{tasks-Cj4SpjUW.js → tasks-xw7VotyX.js} +1 -1
  198. package/dist/client/assets/{textarea-DYMqdBZW.js → textarea-CYk__hb-.js} +1 -1
  199. package/dist/client/assets/{thread-intent-tfoIKTGL.js → thread-intent-BSwSc5Rc.js} +1 -1
  200. package/dist/client/assets/thread-route-BE_MFJTK.js +1 -0
  201. package/dist/client/assets/{toggle-group-C7s16zsy.js → toggle-group-0CywZwEp.js} +1 -1
  202. package/dist/client/assets/{toolbar-DsbPhHR2.js → toolbar-ChEtWcxo.js} +1 -1
  203. package/dist/client/assets/{toolbar-icon-button-4cTuMznu.js → toolbar-icon-button-DqEYlO40.js} +1 -1
  204. package/dist/client/assets/{track-Dp42ADCp.js → track-fOdfQ32P.js} +1 -1
  205. package/dist/client/assets/{types-C1-e4QHU.js → types-D2LkW7tm.js} +1 -1
  206. package/dist/client/assets/{use-ai-providers-D0MFnnnJ.js → use-ai-providers-B9zLoSLV.js} +1 -1
  207. package/dist/client/assets/{use-automations-Bxct96j5.js → use-automations-BGTeAVZt.js} +1 -1
  208. package/dist/client/assets/{use-autosave-Cf6m0nb3.js → use-autosave-GN52u-oI.js} +1 -1
  209. package/dist/client/assets/{use-connection-BL1yhZNp.js → use-connection-CsJuNLSb.js} +1 -1
  210. package/dist/client/assets/{use-copy-BpfelOsR.js → use-copy-s3gq1I2J.js} +1 -1
  211. package/dist/client/assets/{use-create-virtual-mcp-DEgqlG_P.js → use-create-virtual-mcp-BWTGIrto.js} +1 -1
  212. package/dist/client/assets/{use-date-fns-locale-Cz3dTPVf.js → use-date-fns-locale-CpaiyFeb.js} +1 -1
  213. package/dist/client/assets/{use-debounced-autosave-17VyC1_9.js → use-debounced-autosave-e48SLqgk.js} +1 -1
  214. package/dist/client/assets/{use-debounced-value-3lIFyc-B.js → use-debounced-value-snJET5z8.js} +1 -1
  215. package/dist/client/assets/{use-decopilot-events-CfnA_2wd.js → use-decopilot-events-tVpJUj13.js} +1 -1
  216. package/dist/client/assets/{use-delete-connection-CC4DEP5M.js → use-delete-connection-CNKkzHsp.js} +1 -1
  217. package/dist/client/assets/{use-deployment-admin-fCU-735J.js → use-deployment-admin-B1Q1KExf.js} +1 -1
  218. package/dist/client/assets/{use-destination-route-B73D_eIZ.js → use-destination-route-BLm-BAwC.js} +1 -1
  219. package/dist/client/assets/{use-file-configs-DbiVAtd9.js → use-file-configs-B7_VvtS_.js} +1 -1
  220. package/dist/client/assets/{use-infinite-scroll-CGrWQV9m.js → use-infinite-scroll-Cra9MhHK.js} +1 -1
  221. package/dist/client/assets/{use-join-requests-IU_EaGLg.js → use-join-requests-D_W99iIR.js} +1 -1
  222. package/dist/client/assets/{use-mcp-auth-status-23LCqBdd.js → use-mcp-auth-status-DDOAmttd.js} +1 -1
  223. package/dist/client/assets/{use-mcp-client-Dc7ilQkt.js → use-mcp-client-Cr62uIBo.js} +1 -1
  224. package/dist/client/assets/{use-mcp-prompts-DIloFBQg.js → use-mcp-prompts-Dvu7jADE.js} +1 -1
  225. package/dist/client/assets/{use-mcp-tools-yVPLqbTC.js → use-mcp-tools-CguGG2Ni.js} +1 -1
  226. package/dist/client/assets/{use-members-B-wX7jR_.js → use-members-B2SCOKsl.js} +1 -1
  227. package/dist/client/assets/{use-navigate-to-agent-DC_OOIzX.js → use-navigate-to-agent-BYYtuwrx.js} +1 -1
  228. package/dist/client/assets/{use-org-auth-client-CReY2uqU.js → use-org-auth-client-BGHwjU8g.js} +1 -1
  229. package/dist/client/assets/{use-org-notice-DyChybv5.js → use-org-notice-BX_9nz7z.js} +1 -1
  230. package/dist/client/assets/{use-org-sso-Dg6nqD1f.js → use-org-sso-eOUYuNMl.js} +1 -1
  231. package/dist/client/assets/{use-organization-roles-C55Ep3O6.js → use-organization-roles-BVZrkWLM.js} +1 -1
  232. package/dist/client/assets/{use-organization-settings-CwqtDA4J.js → use-organization-settings-DuZuLm7F.js} +1 -1
  233. package/dist/client/assets/{use-panel-navigate-DEpXw5wF.js → use-panel-navigate-Cd7zoDqa.js} +1 -1
  234. package/dist/client/assets/{use-registry-connections-B2DiSYUv.js → use-registry-connections-tJD8w0Y7.js} +1 -1
  235. package/dist/client/assets/{use-secrets-CXHV-_4u.js → use-secrets-BqOvXvNx.js} +1 -1
  236. package/dist/client/assets/{use-section-preview-base-D6hQ90tl.js → use-section-preview-base-c_3hslet.js} +1 -1
  237. package/dist/client/assets/{use-status-sounds-BElO3PMV.js → use-status-sounds-Bw_PDFm1.js} +1 -1
  238. package/dist/client/assets/{use-tags-DZUN-1Ut.js → use-tags-DGhJYs5v.js} +1 -1
  239. package/dist/client/assets/{use-view-mode-B3NLddU0.js → use-view-mode-BmArn4WI.js} +1 -1
  240. package/dist/client/assets/{use-virtual-mcp-CQsLZfmK.js → use-virtual-mcp-0ZIPz8eH.js} +1 -1
  241. package/dist/client/assets/useInfiniteQuery-1kKiN9aZ.js +1 -0
  242. package/dist/client/assets/useSuspenseInfiniteQuery-C4h4CiTA.js +1 -0
  243. package/dist/client/assets/{users-Bug3AdLE.js → users-CzFESlcK.js} +1 -1
  244. package/dist/client/assets/{variant-calendar-C3HqmQB-.js → variant-calendar-_o_Wke_W.js} +1 -1
  245. package/dist/client/assets/{view-mode-toggle-8QAhZAUM.js → view-mode-toggle-Dq1Higa9.js} +1 -1
  246. package/dist/client/index.html +1 -1
  247. package/dist/server/cli.js +568 -568
  248. package/dist/server/migrate-dbos.js +1 -1
  249. package/dist/server/migrate.js +168 -168
  250. package/dist/server/server.js +363 -363
  251. package/package.json +1 -1
  252. package/dist/client/assets/api-keys-CNyKDa-z.js +0 -1
  253. package/dist/client/assets/index-CLhec1d0.js +0 -1
  254. package/dist/client/assets/record-editor-B29B1sLg.js +0 -1
  255. package/dist/client/assets/redirect-editor-VT1SstB-.js +0 -1
  256. package/dist/client/assets/registry-C5al6BLo.js +0 -2
  257. package/dist/client/assets/settings-layout-CU40hjbA.js +0 -1
  258. package/dist/client/assets/store-registry-DQqHtnqc.js +0 -2
  259. package/dist/client/assets/thread-route-C9DY5m1F.js +0 -1
  260. package/dist/client/assets/useInfiniteQuery-DvifJ2DA.js +0 -1
  261. package/dist/client/assets/useSuspenseInfiniteQuery-DL3cGDzg.js +0 -1
@@ -1 +1 @@
1
- import{c as v,G as _,u as E,j,N}from"./index-DmMXAqxC.js";import{D as f}from"./use-destination-route-B73D_eIZ.js";const T={board:f.tasks,files:f.library,reports:f.reports,overview:f.home};function I(e){return!!e&&e in T}function O(){const e=v.c(34),{org:l}=_();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={strict:!1},e[0]=m):m=e[0];const{connect:o,siteUrl:a,main:c,task:h,sidepanel:i,virtualmcpid:p}=E(m);if(I(c)){const r=T[c];let t;e[1]!==l.slug?(t={org:l.slug},e[1]=l.slug,e[2]=t):t=e[2];let s;e[3]!==o||e[4]!==i||e[5]!==a||e[6]!==h?(s={connect:o,siteUrl:a,task:h,sidepanel:i},e[3]=o,e[4]=i,e[5]=a,e[6]=h,e[7]=s):s=e[7];let d;return e[8]!==r||e[9]!==t||e[10]!==s?(d=j.jsx(N,{to:r,params:t,search:s,replace:!0}),e[8]=r,e[9]=t,e[10]=s,e[11]=d):d=e[11],d}const g=p??null;if(g){let r;e[12]!==l.slug?(r={org:l.slug,panel:void 0},e[12]=l.slug,e[13]=r):r=e[13];let t;e[14]!==o||e[15]!==c||e[16]!==g||e[17]!==i||e[18]!==a?(t={virtualmcpid:g,connect:o,siteUrl:a,sidepanel:i,main:c},e[14]=o,e[15]=c,e[16]=g,e[17]=i,e[18]=a,e[19]=t):t=e[19];let s;return e[20]!==r||e[21]!==t?(s=j.jsx(N,{to:f.agents,params:r,search:t,replace:!0}),e[20]=r,e[21]=t,e[22]=s):s=e[22],s}let n;e[23]!==l.slug?(n={org:l.slug},e[23]=l.slug,e[24]=n):n=e[24];let u;e[25]!==o||e[26]!==c||e[27]!==i||e[28]!==a||e[29]!==p?(u={connect:o,siteUrl:a,sidepanel:i,main:c,virtualmcpid:p},e[25]=o,e[26]=c,e[27]=i,e[28]=a,e[29]=p,e[30]=u):u=e[30];let x;return e[31]!==n||e[32]!==u?(x=j.jsx(N,{to:f.home,params:n,search:u,replace:!0}),e[31]=n,e[32]=u,e[33]=x):x=e[33],x}export{O as default};
1
+ import{c as v,G as _,u as E,j,N}from"./index-COKDKMgK.js";import{D as f}from"./use-destination-route-BLm-BAwC.js";const T={board:f.tasks,files:f.library,reports:f.reports,overview:f.home};function I(e){return!!e&&e in T}function O(){const e=v.c(34),{org:l}=_();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={strict:!1},e[0]=m):m=e[0];const{connect:o,siteUrl:a,main:c,task:h,sidepanel:i,virtualmcpid:p}=E(m);if(I(c)){const r=T[c];let t;e[1]!==l.slug?(t={org:l.slug},e[1]=l.slug,e[2]=t):t=e[2];let s;e[3]!==o||e[4]!==i||e[5]!==a||e[6]!==h?(s={connect:o,siteUrl:a,task:h,sidepanel:i},e[3]=o,e[4]=i,e[5]=a,e[6]=h,e[7]=s):s=e[7];let d;return e[8]!==r||e[9]!==t||e[10]!==s?(d=j.jsx(N,{to:r,params:t,search:s,replace:!0}),e[8]=r,e[9]=t,e[10]=s,e[11]=d):d=e[11],d}const g=p??null;if(g){let r;e[12]!==l.slug?(r={org:l.slug,panel:void 0},e[12]=l.slug,e[13]=r):r=e[13];let t;e[14]!==o||e[15]!==c||e[16]!==g||e[17]!==i||e[18]!==a?(t={virtualmcpid:g,connect:o,siteUrl:a,sidepanel:i,main:c},e[14]=o,e[15]=c,e[16]=g,e[17]=i,e[18]=a,e[19]=t):t=e[19];let s;return e[20]!==r||e[21]!==t?(s=j.jsx(N,{to:f.agents,params:r,search:t,replace:!0}),e[20]=r,e[21]=t,e[22]=s):s=e[22],s}let n;e[23]!==l.slug?(n={org:l.slug},e[23]=l.slug,e[24]=n):n=e[24];let u;e[25]!==o||e[26]!==c||e[27]!==i||e[28]!==a||e[29]!==p?(u={connect:o,siteUrl:a,sidepanel:i,main:c,virtualmcpid:p},e[25]=o,e[26]=c,e[27]=i,e[28]=a,e[29]=p,e[30]=u):u=e[30];let x;return e[31]!==n||e[32]!==u?(x=j.jsx(N,{to:f.home,params:n,search:u,replace:!0}),e[31]=n,e[32]=u,e[33]=x):x=e[33],x}export{O as default};
@@ -0,0 +1 @@
1
+ import{c as _,d as _e,G as R,o as E,b as A,a as le,Z as ht,v as gt,J as jt,r as D,j as n,t as Ye,l as O,_ as ae,$ as vt,a0 as yt,a1 as Nt,a2 as St,a3 as kt,a4 as _t,a5 as z,a6 as M,a7 as Xe,n as Pt,e as wt,K as It,B as Ct,a8 as ze,a9 as Ke,aa as At,m as $t,ab as Tt,L as Ot,E as zt}from"./index-COKDKMgK.js";import{u as Pe,r as Me,D as $,a as Mt}from"./use-destination-route-BLm-BAwC.js";import{u as we,a as Ie,b as Ze,P as Dt}from"./project-icon-waYb9qf2.js";import{u as Rt,i as Et,a as Le,D as Ft}from"./thread-route-BE_MFJTK.js";import{u as Re,S as Ce,a as Vt,b as Bt,c as et,d as Kt,e as Lt,f as qt,g as Ut,h as Qt}from"./settings-sidebar-B4oRDPXI.js";import{L as re}from"./anchors-yqDzZN4K.js";import{P as tt,a as Ee,b as st}from"./popover-BZalCRl4.js";import{D as Ht,a as Jt,b as Gt}from"./drawer-CzXVcBN1.js";import{A as ke}from"./avatar-2SmZuxZ8.js";import{a as Wt}from"./Copy01-iyRTWREU.js";import{n as Yt}from"./Download01-CzfGo2fl.js";import{t as Xt,i as Zt,a as es,b as ts,c as ss,s as Fe,d as nt,e as ns,n as os,f as ot,g as is,h as as,j as rs,k as ls}from"./agent-icon-CqZT47B5.js";import{i as cs}from"./Globe01-c3fEChsS.js";import{n as ds}from"./LinkExternal01-DRhSoo2W.js";import{g as qe,e as ms}from"./TrendUp01-B2IK8kp9.js";import{i as it}from"./Monitor01-ASpw1r2B.js";import{n as us,a as fs}from"./Sun-B0zPFK-z.js";import{a as at}from"./Settings02-CX9GU2_h.js";import{i as xs}from"./Shield01-DKmYeZMQ.js";import{b as ps}from"./Users03-BH7DTuey.js";import{u as bs}from"./use-deployment-admin-B1Q1KExf.js";import{u as hs}from"./use-is-desktop-app-BNujXJc_.js";import{I as rt}from"./invite-member-dialog-BLPYvues.js";import{u as gs,t as lt,S as js,A as vs,a as ct,e as ys,r as dt,b as Ns,s as Ss,p as ks,P as _s,c as Ps,d as ws,f as Is,i as Cs,g as As,h as $s}from"./task-route-APkjt4_d.js";import{a as Ts}from"./use-organization-settings-DuZuLm7F.js";import{S as Os}from"./scroll-area-DbragFMD.js";import{u as zs}from"./useInfiniteQuery-1kKiN9aZ.js";import{n as Ms}from"./decopilot-sse-pool-BdZvUT3v.js";import{g as Ds}from"./get-initials-D-f_fDFw.js";import{a as Rs}from"./format-time-BtXRrtv4.js";import{i as Es}from"./Share07-ajbW_r5c.js";import{u as Ve}from"./use-navigate-to-agent-BYYtuwrx.js";import{c as Fs}from"./XClose-DPz14YDo.js";import{a as Vs}from"./Image01-CijeoW_8.js";import{u as Bs}from"./use-panel-navigate-Cd7zoDqa.js";import{i as Ks}from"./source-system-tabs-CnEGUb4r.js";function Ls(){const t=_.c(6),e=_e(),{org:s}=R(),{setScope:i}=we(),o=Rt(),r=Pe();let a;return t[0]!==r||t[1]!==e||t[2]!==s||t[3]!==o||t[4]!==i?(a=()=>{const l=o!==void 0?"route_resolves_scope":Me(r,null)?null:"route_needs_scope",c=l!==null;if(E("scope_cleared",{relocated:c,reason:l}),!c){i(null);return}e({to:$.home,params:{org:s.slug},search:{virtualmcpid:void 0}})},t[0]=r,t[1]=e,t[2]=s,t[3]=o,t[4]=i,t[5]=a):a=t[5],a}function ie(t){const e=_.c(26),{item:s,onClose:i}=t;let o;e[0]!==s.className?(o=O("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",s.className),e[0]=s.className,e[1]=o):o=e[1];const r=o;if(s.href){const u=s.external?"_blank":void 0,d=s.external?"noopener noreferrer":void 0;let f;e[2]!==s.icon?(f=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[2]=s.icon,e[3]=f):f=e[3];let p;e[4]!==s.label?(p=n.jsx("span",{className:"flex-1",children:s.label}),e[4]=s.label,e[5]=p):p=e[5];let b;return e[6]!==r||e[7]!==s.href||e[8]!==i||e[9]!==u||e[10]!==d||e[11]!==f||e[12]!==p?(b=n.jsxs("a",{href:s.href,target:u,rel:d,className:r,onClick:i,children:[f,p]}),e[6]=r,e[7]=s.href,e[8]=i,e[9]=u,e[10]=d,e[11]=f,e[12]=p,e[13]=b):b=e[13],b}let a;e[14]!==s||e[15]!==i?(a=()=>{s.onClick?.(),i()},e[14]=s,e[15]=i,e[16]=a):a=e[16];let l;e[17]!==s.icon?(l=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[17]=s.icon,e[18]=l):l=e[18];let c;e[19]!==s.label?(c=n.jsx("span",{className:"flex-1",children:s.label}),e[19]=s.label,e[20]=c):c=e[20];let m;return e[21]!==r||e[22]!==a||e[23]!==l||e[24]!==c?(m=n.jsxs("button",{type:"button",onClick:a,className:r,children:[l,c]}),e[21]=r,e[22]=a,e[23]=l,e[24]=c,e[25]=m):m=e[25],m}function qs(){const t=_.c(4),e=A();let s;t[0]!==e?(s=e("common.accountPopover.impersonating"),t[0]=e,t[1]=s):s=t[1];let i;return t[2]!==s?(i=n.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:s}),t[2]=s,t[3]=i):i=t[3],i}function Ue(t){const e=_.c(38),{user:s,userImage:i,isImpersonating:o,isMobile:r}=t,a=A(),l=r?"py-4 border-b border-border":"py-3 mx-1 mt-1";let c;e[0]!==l?(c=O("flex items-center gap-3 px-4",l),e[0]=l,e[1]=c):c=e[1];const m=s?.name??"U";let u;e[2]!==m||e[3]!==i?(u=n.jsx(ke,{url:i,fallback:m,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=m,e[3]=i,e[4]=u):u=e[4];let d;e[5]!==a||e[6]!==s?.name?(d=s?.name??a("common.accountPopover.defaultUserName"),e[5]=a,e[6]=s?.name,e[7]=d):d=e[7];let f;e[8]!==d?(f=n.jsx("p",{className:"text-sm font-medium truncate",children:d}),e[8]=d,e[9]=f):f=e[9];let p;e[10]!==o?(p=o&&n.jsx(qs,{}),e[10]=o,e[11]=p):p=e[11];let b;e[12]!==f||e[13]!==p?(b=n.jsxs("div",{className:"flex items-center gap-2",children:[f,p]}),e[12]=f,e[13]=p,e[14]=b):b=e[14];const g=s?.email;let x;e[15]!==g?(x=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:g}),e[15]=g,e[16]=x):x=e[16];let h;e[17]!==x||e[18]!==b?(h=n.jsxs("div",{className:"flex-1 min-w-0",children:[b,x]}),e[17]=x,e[18]=b,e[19]=h):h=e[19];let j;e[20]!==a||e[21]!==s?(j=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(()=>{Ye.success(a("common.accountPopover.userIdCopied"))})},e[20]=a,e[21]=s,e[22]=j):j=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Wt,{size:14}),e[23]=v):v=e[23];let y;e[24]!==j?(y=n.jsx(Nt,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:v})}),e[24]=j,e[25]=y):y=e[25];let N;e[26]!==a?(N=a("common.accountPopover.copyUserId"),e[26]=a,e[27]=N):N=e[27];let S;e[28]!==N?(S=n.jsx(St,{side:"right",children:n.jsx("p",{className:"text-xs",children:N})}),e[28]=N,e[29]=S):S=e[29];let k;e[30]!==y||e[31]!==S?(k=n.jsx(kt,{delayDuration:300,children:n.jsxs(_t,{children:[y,S]})}),e[30]=y,e[31]=S,e[32]=k):k=e[32];let P;return e[33]!==h||e[34]!==k||e[35]!==c||e[36]!==u?(P=n.jsxs("div",{className:c,children:[u,h,k]}),e[33]=h,e[34]=k,e[35]=c,e[36]=u,e[37]=P):P=e[37],P}function Qe(t){const e=_.c(35),{themeOptions:s,preferences:i,setPreferences:o,isMobile:r}=t,a=A(),l=r?"size-8":"size-7",c=r?"px-3 py-3":"px-2 py-1.5";let m;e[0]!==c?(m=O("flex items-center justify-between border-t border-border/50",c),e[0]=c,e[1]=m):m=e[1];let u;if(e[2]!==l||e[3]!==i.theme||e[4]!==o||e[5]!==s){let N;e[7]!==l||e[8]!==i.theme||e[9]!==o?(N=S=>{const{value:k,icon:P,label:w}=S;return n.jsx("button",{type:"button","aria-label":w,onClick:()=>o(I=>({...I,theme:k})),className:O(l,"rounded-md flex items-center justify-center transition-colors",i.theme===k?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:P},k)},e[7]=l,e[8]=i.theme,e[9]=o,e[10]=N):N=e[10],u=s.map(N),e[2]=l,e[3]=i.theme,e[4]=o,e[5]=s,e[6]=u}else u=e[6];let d;e[11]!==u?(d=n.jsx("div",{className:"flex items-center gap-0.5",children:u}),e[11]=u,e[12]=d):d=e[12];let f;e[13]!==i.enableSounds||e[14]!==a?(f=i.enableSounds?a("common.accountPopover.disableSounds"):a("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=a,e[15]=f):f=e[15];let p;e[16]!==o?(p=()=>o(Us),e[16]=o,e[17]=p):p=e[17];const b=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let g;e[18]!==l||e[19]!==b?(g=O(l,"rounded-md flex items-center justify-center transition-colors",b),e[18]=l,e[19]=b,e[20]=g):g=e[20];let x;e[21]!==i.enableSounds?(x=i.enableSounds?n.jsx(es,{size:14}):n.jsx(ts,{size:14}),e[21]=i.enableSounds,e[22]=x):x=e[22];let h;e[23]!==f||e[24]!==p||e[25]!==g||e[26]!==x?(h=n.jsx("button",{type:"button","aria-label":f,onClick:p,className:g,children:x}),e[23]=f,e[24]=p,e[25]=g,e[26]=x,e[27]=h):h=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.358.10"]}),e[28]=j):j=e[28];let v;e[29]!==h?(v=n.jsxs("div",{className:"flex items-center gap-2",children:[h,j]}),e[29]=h,e[30]=v):v=e[30];let y;return e[31]!==v||e[32]!==m||e[33]!==d?(y=n.jsxs("div",{className:m,children:[d,v]}),e[31]=v,e[32]=m,e[33]=d,e[34]=y):y=e[34],y}function Us(t){return{...t,enableSounds:!t.enableSounds}}function He(t){const e=_.c(54),{user:s,userImage:i,menuItems:o,signOutItem:r,stopImpersonatingItem:a,isImpersonating:l,themeOptions:c,preferences:m,setPreferences:u,close:d,isMobile:f}=t;if(f){let y;e[0]!==l||e[1]!==s||e[2]!==i?(y=n.jsx(Ue,{user:s,userImage:i,isImpersonating:l,isMobile:!0}),e[0]=l,e[1]=s,e[2]=i,e[3]=y):y=e[3];let N;if(e[4]!==d||e[5]!==o){let C;e[7]!==d?(C=T=>n.jsx(ie,{item:T,onClose:d},T.key),e[7]=d,e[8]=C):C=e[8],N=o.map(C),e[4]=d,e[5]=o,e[6]=N}else N=e[6];let S;e[9]!==d||e[10]!==a?(S=a&&n.jsx(ie,{item:a,onClose:d}),e[9]=d,e[10]=a,e[11]=S):S=e[11];let k;e[12]!==d||e[13]!==r?(k=n.jsx(ie,{item:r,onClose:d}),e[12]=d,e[13]=r,e[14]=k):k=e[14];let P;e[15]!==N||e[16]!==S||e[17]!==k?(P=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[N,S,k]})}),e[15]=N,e[16]=S,e[17]=k,e[18]=P):P=e[18];let w;e[19]!==m||e[20]!==u||e[21]!==c?(w=n.jsx(Qe,{themeOptions:c,preferences:m,setPreferences:u,isMobile:!0}),e[19]=m,e[20]=u,e[21]=c,e[22]=w):w=e[22];let I;return e[23]!==y||e[24]!==P||e[25]!==w?(I=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y,P,w]}),e[23]=y,e[24]=P,e[25]=w,e[26]=I):I=e[26],I}let p;e[27]!==l||e[28]!==s||e[29]!==i?(p=n.jsx(Ue,{user:s,userImage:i,isImpersonating:l,isMobile:!1}),e[27]=l,e[28]=s,e[29]=i,e[30]=p):p=e[30];let b;if(e[31]!==d||e[32]!==o){let y;e[34]!==d?(y=N=>n.jsx(ie,{item:N,onClose:d},N.key),e[34]=d,e[35]=y):y=e[35],b=o.map(y),e[31]=d,e[32]=o,e[33]=b}else b=e[33];let g;e[36]!==d||e[37]!==a?(g=a&&n.jsx(ie,{item:a,onClose:d}),e[36]=d,e[37]=a,e[38]=g):g=e[38];let x;e[39]!==d||e[40]!==r?(x=n.jsx(ie,{item:r,onClose:d}),e[39]=d,e[40]=r,e[41]=x):x=e[41];let h;e[42]!==b||e[43]!==g||e[44]!==x?(h=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[b,g,x]}),e[42]=b,e[43]=g,e[44]=x,e[45]=h):h=e[45];let j;e[46]!==m||e[47]!==u||e[48]!==c?(j=n.jsx(Qe,{themeOptions:c,preferences:m,setPreferences:u,isMobile:!1}),e[46]=m,e[47]=u,e[48]=c,e[49]=j):j=e[49];let v;return e[50]!==p||e[51]!==h||e[52]!==j?(v=n.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:n.jsxs("div",{className:"flex flex-col",children:[p,h,j]})}),e[50]=p,e[51]=h,e[52]=j,e[53]=v):v=e[53],v}function De(){const t=_.c(107),e=A(),{data:s}=le.useSession(),{org:i}=R(),o=_e();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org",shouldThrow:!1},t[0]=r):r=t[0];const l=ht(r)?.params.org,[c,m]=gt(),u=jt(),{isAdmin:d}=bs(),f=hs(),[p,b]=D.useState(!1),[g,x]=D.useState(!1),h=s?.user,j=h?.image,v=!!s?.session?.impersonatedBy;let y;t[1]===Symbol.for("react.memo_cache_sentinel")?(y=()=>b(!1),t[1]=y):y=t[1];const N=y;let S;t[2]!==e?(S=e("common.accountPopover.preferences"),t[2]=e,t[3]=S):S=t[3];let k;t[4]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(at,{size:16}),t[4]=k):k=t[4];let P;t[5]!==o||t[6]!==l?(P=()=>{o({to:"/$org/settings/profile",params:{org:l??""}})},t[5]=o,t[6]=l,t[7]=P):P=t[7];let w;t[8]!==S||t[9]!==P?(w={key:"preferences",label:S,icon:k,onClick:P},t[8]=S,t[9]=P,t[10]=w):w=t[10];let I;t[11]!==i||t[12]!==o?(I=i?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(ds,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=I):I=t[13];let C;t[14]!==f||t[15]!==e?(C=(Et()||Le())&&!f?[{key:"install-desktop-app",label:Le()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:n.jsx(Yt,{size:16}),onClick:()=>x(!0)}]:[],t[14]=f,t[15]=e,t[16]=C):C=t[16];let T;t[17]!==e?(T=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=T):T=t[18];let F;t[19]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(Zt,{size:16}),t[19]=F):F=t[19];let V;t[20]!==T?(V={key:"terms",label:T,icon:F,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=T,t[21]=V):V=t[21];let B;t[22]!==e?(B=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=B):B=t[23];let ce;t[24]===Symbol.for("react.memo_cache_sentinel")?(ce=n.jsx(xs,{size:16}),t[24]=ce):ce=t[24];let K;t[25]!==B?(K={key:"privacy",label:B,icon:ce,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=B,t[26]=K):K=t[26];let L;t[27]!==e?(L=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=L):L=t[28];let de;t[29]===Symbol.for("react.memo_cache_sentinel")?(de=n.jsx(vt,{className:"w-4 h-4"}),t[29]=de):de=t[29];let q;t[30]!==L?(q={key:"github",label:L,icon:de,href:"https://github.com/decocms/studio",external:!0},t[30]=L,t[31]=q):q=t[31];let U;t[32]!==e?(U=e("common.accountPopover.community"),t[32]=e,t[33]=U):U=t[33];let me;t[34]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(ps,{size:16}),t[34]=me):me=t[34];let Q;t[35]!==U?(Q={key:"community",label:U,icon:me,href:"https://decocms.com/discord",external:!0},t[35]=U,t[36]=Q):Q=t[36];let H;t[37]!==e?(H=e("common.accountPopover.homepage"),t[37]=e,t[38]=H):H=t[38];let ue;t[39]===Symbol.for("react.memo_cache_sentinel")?(ue=n.jsx(cs,{size:16}),t[39]=ue):ue=t[39];let J;t[40]!==H?(J={key:"homepage",label:H,icon:ue,href:"https://decocms.com",external:!0},t[40]=H,t[41]=J):J=t[41];let G;t[42]!==d||t[43]!==o||t[44]!==e?(G=d?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(Xt,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=d,t[43]=o,t[44]=e,t[45]=G):G=t[45];let fe;t[46]!==V||t[47]!==K||t[48]!==q||t[49]!==Q||t[50]!==J||t[51]!==G||t[52]!==w||t[53]!==I||t[54]!==C?(fe=[w,...I,...C,V,K,q,Q,J,...G],t[46]=V,t[47]=K,t[48]=q,t[49]=Q,t[50]=J,t[51]=G,t[52]=w,t[53]=I,t[54]=C,t[55]=fe):fe=t[55];const Ae=fe;let W;t[56]!==e?(W=e("common.accountPopover.signOut"),t[56]=e,t[57]=W):W=t[57];let xe;t[58]===Symbol.for("react.memo_cache_sentinel")?(xe=n.jsx(qe,{size:16}),t[58]=xe):xe=t[58];let pe;t[59]!==W?(pe={key:"logout",label:W,icon:xe,onClick:Hs},t[59]=W,t[60]=pe):pe=t[60];const $e=pe;let be;t[61]!==v||t[62]!==e?(be=v?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(qe,{size:16}),onClick:async()=>{const{error:Be}=await le.admin.stopImpersonating();if(Be){Ye.error(Be.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=v,t[62]=e,t[63]=be):be=t[63];const Te=be;let he;t[64]===Symbol.for("react.memo_cache_sentinel")?(he=n.jsx(us,{size:14}),t[64]=he):he=t[64];let Y;t[65]!==e?(Y=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=Y):Y=t[66];let X;t[67]!==Y?(X={value:"light",icon:he,label:Y},t[67]=Y,t[68]=X):X=t[68];let ge;t[69]===Symbol.for("react.memo_cache_sentinel")?(ge=n.jsx(fs,{size:14}),t[69]=ge):ge=t[69];let Z;t[70]!==e?(Z=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=Z):Z=t[71];let ee;t[72]!==Z?(ee={value:"dark",icon:ge,label:Z},t[72]=Z,t[73]=ee):ee=t[73];let je;t[74]===Symbol.for("react.memo_cache_sentinel")?(je=n.jsx(it,{size:14}),t[74]=je):je=t[74];let te;t[75]!==e?(te=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=te):te=t[76];let se;t[77]!==te?(se={value:"system",icon:je,label:te},t[77]=te,t[78]=se):se=t[78];let ve;t[79]!==X||t[80]!==ee||t[81]!==se?(ve=[X,ee,se],t[79]=X,t[80]=ee,t[81]=se,t[82]=ve):ve=t[82];const Oe=ve;let ye;t[83]!==v||t[84]!==u||t[85]!==Ae||t[86]!==c||t[87]!==m||t[88]!==$e||t[89]!==Te||t[90]!==Oe||t[91]!==h||t[92]!==j?(ye={user:h,userImage:j,menuItems:Ae,signOutItem:$e,stopImpersonatingItem:Te,isImpersonating:v,themeOptions:Oe,preferences:c,setPreferences:m,close:N,isMobile:u},t[83]=v,t[84]=u,t[85]=Ae,t[86]=c,t[87]=m,t[88]=$e,t[89]=Te,t[90]=Oe,t[91]=h,t[92]=j,t[93]=ye):ye=t[93];const Ne=ye;let ne;t[94]!==v||t[95]!==u||t[96]!==p||t[97]!==Ne||t[98]!==e||t[99]!==h?.name||t[100]!==j?(ne=u?n.jsxs(Ht,{open:p,onOpenChange:b,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>b(!0),className:O("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",v&&"border-2 border-dashed border-warning"),children:[n.jsx(ke,{url:j,fallback:h?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:h?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(Jt,{className:"h-[80dvh] p-0",children:[n.jsx(Gt,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(He,{...Ne})]})]}):n.jsxs(tt,{open:p,onOpenChange:b,children:[n.jsx(Ee,{asChild:!0,children:n.jsxs(ae,{"data-tour":re.account,tooltip:h?.name??e("common.accountPopover.defaultAccountLabel"),className:O("rounded-md",v&&"border-2 border-dashed border-warning"),children:[n.jsx(ke,{url:j,fallback:h?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:h?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(st,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Qs,children:n.jsx(He,{...Ne})})]}),t[94]=v,t[95]=u,t[96]=p,t[97]=Ne,t[98]=e,t[99]=h?.name,t[100]=j,t[101]=ne):ne=t[101];let oe;t[102]!==g?(oe=n.jsx(Ft,{open:g,onOpenChange:x}),t[102]=g,t[103]=oe):oe=t[103];let Se;return t[104]!==ne||t[105]!==oe?(Se=n.jsxs(n.Fragment,{children:[ne,oe]}),t[104]=ne,t[105]=oe,t[106]=Se):Se=t[106],Se}function Qs(t){return t.preventDefault()}function Hs(){E("signed_out",{source:"account_popover"}),yt(),le.signOut()}class Js extends D.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,s){}render(){return this.state.hasError?null:this.props.children}}function Gs(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Ws(){const t=_.c(17),e=_e(),{org:s}=R(),{hasDecoKey:i,balanceDollars:o}=gs();if(!i)return null;let r;t[0]!==o?(r=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=r):r=t[1];let a;t[2]!==o?(a=O(o!=null&&Gs(o)),t[2]=o,t[3]=a):a=t[3];let l;t[4]!==e||t[5]!==s.slug?(l=()=>e({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[4]=e,t[5]=s.slug,t[6]=l):l=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ss,{}),t[7]=c):c=t[7];let m;t[8]!==o?(m=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=m):m=t[9];let u;t[10]!==m?(u=n.jsx("span",{children:m}),t[10]=m,t[11]=u):u=t[11];let d;return t[12]!==r||t[13]!==a||t[14]!==l||t[15]!==u?(d=n.jsx(z,{children:n.jsx(M,{children:n.jsxs(ae,{tooltip:r,className:a,onClick:l,children:[c,u]})})}),t[12]=r,t[13]=a,t[14]=l,t[15]=u,t[16]=d):d=t[16],d}function Je(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Js,{children:n.jsx(D.Suspense,{fallback:null,children:n.jsx(Ws,{})})}),t[0]=e):e=t[0],e}const Ys=6e4;function Xs(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Zs(t,e){if(!t)return t;const s=e?new Set(e):null;let i=0;const o=t.pages.map(a=>{const l=a.notifications.filter(c=>s&&!s.has(c.id)?!0:(i++,!1));return{...a,notifications:l}}),r=s?Math.max(0,(t.pages[0]?.unreadCount??0)-i):0;return{...t,pages:o.map(a=>({...a,unreadCount:r}))}}function en(t,e){const s=_.c(4),{data:i}=le.useSession(),o=i?.user?.id;let r;s[0]!==e||s[1]!==t||s[2]!==o?(r=a=>!t||!o?nn:Ms.subscribe(t,c=>{try{if(JSON.parse(c.data).subject!==o)return}catch{return}e(),a()},e),s[0]=e,s[1]=t,s[2]=o,s[3]=r):r=s[3],D.useSyncExternalStore(r,sn,tn)}function tn(){return 0}function sn(){return 0}function nn(){}function mt(){const t=_.c(37),{locator:e,org:s}=R(),i=Xe(),o=Pt();let r;t[0]!==e?(r=It.notifications(e),t[0]=e,t[1]=r):r=t[1];const a=r;let l;t[2]!==i?(l=P=>{const{pageParam:w}=P;return Xs(i,w)},t[2]=i,t[3]=l):l=t[3];let c;t[4]!==a||t[5]!==l?(c={queryKey:a,queryFn:l,initialPageParam:void 0,getNextPageParam:rn,refetchInterval:Ys},t[4]=a,t[5]=l,t[6]=c):c=t[6];const m=zs(c);let u;t[7]!==o||t[8]!==a?(u=()=>o.invalidateQueries({queryKey:a,refetchType:"active"}),t[7]=o,t[8]=a,t[9]=u):u=t[9],en(s.slug,u);let d;t[10]!==i?(d=P=>i.call("NOTIFICATION_MARK_READ",P?{ids:P}:{}),t[10]=i,t[11]=d):d=t[11];let f,p;t[12]!==o||t[13]!==a?(f=async P=>{await o.cancelQueries({queryKey:a}),o.setQueryData(a,w=>Zs(w,P))},p=()=>o.invalidateQueries({queryKey:a}),t[12]=o,t[13]=a,t[14]=f,t[15]=p):(f=t[14],p=t[15]);let b;t[16]!==d||t[17]!==f||t[18]!==p?(b={mutationFn:d,onMutate:f,onSettled:p},t[16]=d,t[17]=f,t[18]=p,t[19]=b):b=t[19];const g=wt(b);let x;t[20]!==m.data?.pages?(x=m.data?.pages??[],t[20]=m.data?.pages,t[21]=x):x=t[21];const h=x;let j;t[22]!==h?(j=h.flatMap(on),t[22]=h,t[23]=j):j=t[23];const v=h[0]?.unreadCount??0;let y;t[24]!==m?(y=()=>{m.hasNextPage&&!m.isFetchingNextPage&&m.fetchNextPage()},t[24]=m,t[25]=y):y=t[25];let N,S;t[26]!==g?(N=()=>g.mutate(null),S=P=>g.mutate([P]),t[26]=g,t[27]=N,t[28]=S):(N=t[27],S=t[28]);let k;return t[29]!==m.hasNextPage||t[30]!==m.isFetchingNextPage||t[31]!==v||t[32]!==y||t[33]!==N||t[34]!==S||t[35]!==j?(k={updates:j,redDotCount:v,hasMore:m.hasNextPage,isFetchingMore:m.isFetchingNextPage,fetchMore:y,markAllRead:N,markRead:S},t[29]=m.hasNextPage,t[30]=m.isFetchingNextPage,t[31]=v,t[32]=y,t[33]=N,t[34]=S,t[35]=j,t[36]=k):k=t[36],k}function on(t){return t.notifications.map(an)}function an(t){return{id:t.id,taskBoardItemId:t.taskBoardItemId,taskTitle:t.taskTitle,taskKeySeq:t.taskKeySeq,action:t.type,actorName:t.actorName,actorImage:t.actorImage,occurredAt:t.createdAt}}function rn(t){return t.nextCursor??void 0}function ln(t){switch(t){case"mentioned":case"review_requested":return"font-medium text-foreground";case"merge_failed":case"review_changes_requested":return"font-medium text-destructive";case"review_approved":return"font-medium text-success";default:return""}}function cn(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");default:{const s=t.action;return String(s)}}}function dn(t){const e=_.c(36),{update:s,orgSlug:i,onSelect:o}=t,r=A();let a;e[0]!==i||e[1]!==s.taskKeySeq?(a=lt(i,s.taskKeySeq),e[0]=i,e[1]=s.taskKeySeq,e[2]=a):a=e[2];const l=a,c=!s.actorName;let m;e[3]!==c||e[4]!==s.actorImage||e[5]!==s.actorName?(m=n.jsx("span",{className:"mt-0.5 shrink-0",children:c?n.jsx(js,{size:24}):n.jsx(ke,{url:s.actorImage??void 0,fallback:Ds(s.actorName??void 0),shape:"circle",size:"xs"})}),e[3]=c,e[4]=s.actorImage,e[5]=s.actorName,e[6]=m):m=e[6];let u;e[7]!==s.taskTitle?(u=n.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:s.taskTitle}),e[7]=s.taskTitle,e[8]=u):u=e[8];let d;e[9]!==s.occurredAt?(d=Rs(new Date(s.occurredAt)),e[9]=s.occurredAt,e[10]=d):d=e[10];let f;e[11]!==d?(f=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground/70",children:d}),e[11]=d,e[12]=f):f=e[12];let p;e[13]!==u||e[14]!==f?(p=n.jsxs("div",{className:"flex items-baseline gap-2",children:[u,f]}),e[13]=u,e[14]=f,e[15]=p):p=e[15];let b;e[16]!==l?(b=l&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-medium",children:l})," · "]}),e[16]=l,e[17]=b):b=e[17];let g;e[18]!==s.action?(g=O(ln(s.action)),e[18]=s.action,e[19]=g):g=e[19];let x;e[20]!==r||e[21]!==s?(x=cn(s,r),e[20]=r,e[21]=s,e[22]=x):x=e[22];let h;e[23]!==g||e[24]!==x?(h=n.jsx("span",{className:g,children:x}),e[23]=g,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==h||e[27]!==b?(j=n.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[b,h]}),e[26]=h,e[27]=b,e[28]=j):j=e[28];let v;e[29]!==j||e[30]!==p?(v=n.jsxs("div",{className:"min-w-0 flex-1",children:[p,j]}),e[29]=j,e[30]=p,e[31]=v):v=e[31];let y;return e[32]!==o||e[33]!==v||e[34]!==m?(y=n.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-start gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[m,v]}),e[32]=o,e[33]=v,e[34]=m,e[35]=y):y=e[35],y}function mn(t){const e=_.c(2),{onReach:s}=t;let i;return e[0]!==s?(i=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const r=new IntersectionObserver(a=>{a.some(un)&&s()});return r.observe(o),()=>r.disconnect()}}),e[0]=s,e[1]=i):i=e[1],i}function un(t){return t.isIntersecting}function fn(t){const e=_.c(23),{onClose:s}=t,i=A(),o=_e(),{org:r}=R(),{updates:a,markAllRead:l,markRead:c,hasMore:m,fetchMore:u}=mt();let d;e[0]!==i?(d=i("sidebar.inbox.title"),e[0]=i,e[1]=d):d=e[1];let f;e[2]!==d?(f=n.jsx("h3",{className:"text-sm font-medium",children:d}),e[2]=d,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==i||e[6]!==a.length?(p=a.length>0&&n.jsx(Ct,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:l,children:i("sidebar.inbox.markAllRead")}),e[4]=l,e[5]=i,e[6]=a.length,e[7]=p):p=e[7];let b;e[8]!==f||e[9]!==p?(b=n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[f,p]}),e[8]=f,e[9]=p,e[10]=b):b=e[10];let g;e[11]!==u||e[12]!==m||e[13]!==c||e[14]!==o||e[15]!==s||e[16]!==r||e[17]!==i||e[18]!==a?(g=a.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[n.jsx(Fe,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:i("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:i("sidebar.inbox.emptyBody")})]}):n.jsxs(Os,{className:"min-h-0 flex-1",children:[a.map(h=>{const j=lt(r.slug,h.taskKeySeq);return n.jsx(dn,{update:h,orgSlug:r.slug,onSelect:()=>{c(h.id),s(),j&&o({to:"/$org/tasks/{-$taskKey}",params:{org:r.slug,taskKey:j}})}},h.id)}),m&&n.jsx(mn,{onReach:u})]}),e[11]=u,e[12]=m,e[13]=c,e[14]=o,e[15]=s,e[16]=r,e[17]=i,e[18]=a,e[19]=g):g=e[19];let x;return e[20]!==b||e[21]!==g?(x=n.jsxs(n.Fragment,{children:[b,g]}),e[20]=b,e[21]=g,e[22]=x):x=e[22],x}function ut(){const t=_.c(1),{redDotCount:e}=mt();if(e===0)return null;let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=s):s=t[0],s}function ft(t){const e=_.c(10),{open:s,onOpenChange:i,children:o}=t;let r;e[0]!==i||e[1]!==s?(r=s&&n.jsx(fn,{onClose:()=>i(!1)}),e[0]=i,e[1]=s,e[2]=r):r=e[2];let a;e[3]!==r?(a=n.jsx(st,{side:"right",align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(400px,calc(100vw-2rem))] flex-col p-0",children:r}),e[3]=r,e[4]=a):a=e[4];let l;return e[5]!==o||e[6]!==i||e[7]!==s||e[8]!==a?(l=n.jsxs(tt,{open:s,onOpenChange:i,children:[o,a]}),e[5]=o,e[6]=i,e[7]=s,e[8]=a,e[9]=l):l=e[9],l}function xt(){const t=_.c(9),e=A(),[s,i]=D.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let r,a;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Fe,{size:15}),a=n.jsx(ut,{}),t[2]=r,t[3]=a):(r=t[2],a=t[3]);let l;t[4]!==o?(l=n.jsx(Ee,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[r,a]})}),t[4]=o,t[5]=l):l=t[5];let c;return t[6]!==s||t[7]!==l?(c=n.jsx(ft,{open:s,onOpenChange:i,children:l}),t[6]=s,t[7]=l,t[8]=c):c=t[8],c}function xn(){const t=_.c(15),e=A(),[s,i]=D.useState(!1),o=Re();let r;t[0]!==o||t[1]!==e?(r=o?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=r):r=t[2];let a,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Fe,{}),l=n.jsx(ut,{}),t[3]=a,t[4]=l):(a=t[3],l=t[4]);let c;t[5]!==e?(c=e("sidebar.inbox.title"),t[5]=e,t[6]=c):c=t[6];let m;t[7]!==c?(m=n.jsx("span",{className:"truncate",children:c}),t[7]=c,t[8]=m):m=t[8];let u;t[9]!==r||t[10]!==m?(u=n.jsx(Ee,{asChild:!0,children:n.jsxs(ae,{tooltip:r,className:"relative",children:[a,l,m]})}),t[9]=r,t[10]=m,t[11]=u):u=t[11];let d;return t[12]!==s||t[13]!==u?(d=n.jsx(ft,{open:s,onOpenChange:i,children:u}),t[12]=s,t[13]=u,t[14]=d):d=t[14],d}function Ge(){const t=_.c(29),e=A(),[s,i]=D.useState(!1);let o;t[0]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=o):o=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(nt,{}),t[2]=r):r=t[2];let a;t[3]!==e?(a=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=a):a=t[4];let l;t[5]!==a?(l=n.jsx("span",{children:a}),t[5]=a,t[6]=l):l=t[6];let c;t[7]!==o||t[8]!==l?(c=n.jsx(M,{children:n.jsx(rt,{trigger:n.jsxs(ae,{tooltip:o,children:[r,l]})})}),t[7]=o,t[8]=l,t[9]=c):c=t[9];let m;t[10]!==e?(m=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=m):m=t[11];let u,d;t[12]===Symbol.for("react.memo_cache_sentinel")?(u=()=>i(!0),d=n.jsx(ns,{}),t[12]=u,t[13]=d):(u=t[12],d=t[13]);let f;t[14]!==e?(f=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=f):f=t[15];let p;t[16]!==f?(p=n.jsx("span",{children:f}),t[16]=f,t[17]=p):p=t[17];let b;t[18]!==m||t[19]!==p?(b=n.jsx(M,{children:n.jsxs(ae,{tooltip:m,onClick:u,children:[d,p]})}),t[18]=m,t[19]=p,t[20]=b):b=t[20];let g;t[21]!==b||t[22]!==c?(g=n.jsxs(z,{className:"gap-0.5",children:[c,b]}),t[21]=b,t[22]=c,t[23]=g):g=t[23];let x;t[24]!==s?(x=s&&n.jsx(vs,{open:s,onOpenChange:i,mode:"browse"}),t[24]=s,t[25]=x):x=t[25];let h;return t[26]!==g||t[27]!==x?(h=n.jsxs(n.Fragment,{children:[g,x]}),t[26]=g,t[27]=x,t[28]=h):h=t[28],h}function We(){const t=_.c(10),e=A();let s;t[0]!==e?(s=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=s):s=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(nt,{}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let r;t[5]!==o?(r=n.jsx("span",{children:o}),t[5]=o,t[6]=r):r=t[6];let a;return t[7]!==s||t[8]!==r?(a=n.jsx(z,{className:"gap-0.5",children:n.jsx(M,{children:n.jsx(rt,{trigger:n.jsxs(ae,{tooltip:s,children:[i,r]})})})}),t[7]=s,t[8]=r,t[9]=a):a=t[9],a}function pn(){const t=_.c(17),e=Re(),s=Ts(),i=!s;if(e){let c;t[0]!==i?(c=i&&n.jsx(Je,{}),t[0]=i,t[1]=c):c=t[1];let m;t[2]!==s?(m=s?n.jsx(We,{}):n.jsx(Ge,{}),t[2]=s,t[3]=m):m=t[3];let u;t[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(M,{children:n.jsx(xn,{})}),t[4]=u):u=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsxs(z,{children:[u,n.jsx(M,{children:n.jsx(De,{})})]}),t[5]=d):d=t[5];let f;return t[6]!==c||t[7]!==m?(f=n.jsxs(ze,{className:"px-2 pb-3 gap-1",children:[c,m,d]}),t[6]=c,t[7]=m,t[8]=f):f=t[8],f}let o;t[9]!==i?(o=i&&n.jsx(Je,{}),t[9]=i,t[10]=o):o=t[10];let r;t[11]!==s?(r=s?n.jsx(We,{}):n.jsx(Ge,{}),t[11]=s,t[12]=r):r=t[12];let a;t[13]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(z,{className:"gap-0.5",children:n.jsx(M,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(De,{})}),n.jsx(xt,{})]})})}),t[13]=a):a=t[13];let l;return t[14]!==o||t[15]!==r?(l=n.jsxs(ze,{className:"px-2 pb-3 gap-0.5",children:[o,r,a]}),t[14]=o,t[15]=r,t[16]=l):l=t[16],l}function bn(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ze,{className:"px-2 pb-3",children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(z,{children:n.jsx(M,{children:n.jsx(De,{})})})}),n.jsx(xt,{})]})}),t[0]=e):e=t[0],e}const hn="settings",gn=["overview","reports","board","files"];function jn(t,e){return!t||!e?!1:!Ze(e.metadata)}function vn(t,e,s,i){if(!t||!e)return!0;const o=i!==void 0;return ys(o?i:dt(e.metadata),o?1:e.metadata?.sidebarViewsVersion).includes(s)}function yn(){const t=_.c(16),e=A(),{org:s}=R(),i=Pe(),o=Ie(),{project:r,repo:a}=we(),l=ct(r?.id);let c;t[0]!==r||t[1]!==o?(c=jn(o,r),t[0]=r,t[1]=o,t[2]=c):c=t[2];const m=c;let u;t[3]!==l||t[4]!==r||t[5]!==o?(u=p=>vn(o,r,p,l),t[3]=l,t[4]=r,t[5]=o,t[6]=u):u=t[6];const d=u;let f;if(t[7]!==d||t[8]!==m||t[9]!==i||t[10]!==s||t[11]!==r?.id||t[12]!==a||t[13]!==o||t[14]!==e){const p={overview:m||!d("overview")?null:{key:"overview",label:e("sidebar.navDestinations.home"),icon:n.jsx(is,{size:16}),isActive:i===$.home||i===$.orgIndex,trackAs:"overview",link:{to:$.home,params:{org:s.slug}}},reports:Me($.reports,o)&&!m&&d("reports")?{key:"reports",label:e("sidebar.navDestinations.reports"),icon:n.jsx(ot,{size:16}),isActive:i===$.reports,trackAs:"reports",link:{to:$.reports,params:{org:s.slug}}}:null,board:m||!d("board")?null:{key:"board",label:e("sidebar.navDestinations.tasks"),icon:n.jsx(os,{size:16}),isActive:i===$.tasks,trackAs:"board",dataTour:re.tasks,link:{to:$.tasks,params:{org:s.slug,taskKey:void 0},search:b=>{const g=a??r?.id;return g?{...b,repo:g}:b}}},files:Me($.library,o)?{key:"files",label:e("sidebar.navDestinations.library"),icon:n.jsx(Es,{size:16}),isActive:i===$.library,trackAs:"files",link:{to:$.library,params:{org:s.slug}}}:null};f=gn.map(b=>p[b]).filter(Nn),t[7]=d,t[8]=m,t[9]=i,t[10]=s,t[11]=r?.id,t[12]=a,t[13]=o,t[14]=e,t[15]=f}else f=t[15];return f}function Nn(t){return t!==null}function Sn(t){const e=_.c(7),{onNavigate:s}=t,i=yn();let o;if(e[0]!==i||e[1]!==s){let a;e[3]!==s?(a=l=>n.jsx(Ce,{icon:l.icon,label:l.label,dataTour:l.dataTour,isActive:l.isActive,link:l.link,onSelect:()=>{E("nav_destination_clicked",{destination:l.trackAs}),s?.()}},l.key),e[3]=s,e[4]=a):a=e[4],o=i.map(a),e[0]=i,e[1]=s,e[2]=o}else o=e[2];let r;return e[5]!==o?(r=n.jsx(z,{className:"gap-1",children:o}),e[5]=o,e[6]=r):r=e[6],r}function kn(t){const e=_.c(18),{onNavigate:s}=t,i=A(),{org:o}=R(),r=Ie(),a=Ve(),l=Pe(),c=Mt();let m;e[0]!==c||e[1]!==l?(m=l.startsWith("/$org/settings")||l===$.agents&&c==="settings",e[0]=c,e[1]=l,e[2]=m):m=e[2];const u=m;let d;e[3]!==i?(d=i("sidebar.navDestinations.settings"),e[3]=i,e[4]=d):d=e[4];const f=d;let p;e[5]!==o||e[6]!==r?(p=r?void 0:{to:"/$org/settings",params:{org:o.slug}},e[5]=o,e[6]=r,e[7]=p):p=e[7];const b=p;let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(at,{size:16}),e[8]=g):g=e[8];let x;e[9]!==a||e[10]!==s||e[11]!==r?(x=()=>{E("nav_destination_clicked",{destination:hn,target:r?"project":"org"}),r&&a(r,{panel:"settings"}),s?.()},e[9]=a,e[10]=s,e[11]=r,e[12]=x):x=e[12];let h;return e[13]!==u||e[14]!==f||e[15]!==b||e[16]!==x?(h=n.jsx(z,{className:"gap-1",children:n.jsx(Ce,{dataTour:re.settings,icon:g,label:f,isActive:u,link:b,onSelect:x})}),e[13]=u,e[14]=f,e[15]=b,e[16]=x,e[17]=h):h=e[17],h}function _n(t,e){const s=new Set(e);return s.size===0?t:t.filter(i=>s.has(i.connectionId))}function Pn(t){const e=t.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(s=>!!s&&typeof s=="object"&&typeof s.connectionId=="string"&&typeof s.toolName=="string"):[]}function wn(t){const e=_.c(12),{onNavigate:s}=t,i=A(),{project:o}=we(),r=Ve(),a=Pe(),l=Bs(),c=Ns(o),m=ct(o?.id);if(!o)return null;let u;if(e[0]!==c.presence||e[1]!==m||e[2]!==o.metadata){const p=Ze(o.metadata),b=m??dt(o.metadata);u=new Set(Ss(b,ks(p,c.presence),m!==void 0?1:o.metadata.sidebarViewsVersion)),e[0]=c.presence,e[1]=m,e[2]=o.metadata,e[3]=u}else u=e[3];const d=u;let f;if(e[4]!==l||e[5]!==a||e[6]!==r||e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==i){const p=[];d.has("site-editor")&&p.push({key:"site-editor",label:i("sidebar.projectNav.siteEditor"),icon:n.jsx(it,{size:16}),panel:"site-editor",isActive:An,dataTour:re.siteEditor});const b={assets:{label:i("common.mainPanelTabs.assets"),icon:n.jsx(Vs,{size:16})},hosting:{label:i("common.mainPanelTabs.hosting"),icon:n.jsx(ls,{size:16})},e2e:{label:i("common.mainPanelTabs.e2e"),icon:n.jsx(ms,{size:16})},analytics:{label:i("common.mainPanelTabs.analytics"),icon:n.jsx(ot,{size:16})},cdn:{label:i("common.mainPanelTabs.cdn"),icon:n.jsx(rs,{size:16})}};for(const x of _s){if(!d.has(x))continue;const h=b[x];p.push({key:x,label:h.label,icon:h.icon,panel:x,isActive:j=>j===x})}for(const x of _n(Pn(o),(o.connections??[]).map(Cn)))x.toolName!=="fetch_assets"&&p.push({key:`pinned:${x.connectionId}:${x.toolName}`,label:x.label||x.toolName,icon:x.icon?n.jsx("img",{src:x.icon,alt:"",className:"size-4 rounded-[3px]"}):n.jsx(Fs,{size:16}),panel:Ke(x.connectionId,x.toolName),isActive:h=>h===Ke(x.connectionId,x.toolName)});d.has("automations")&&p.push({key:"automations",label:i("sidebar.projectNav.automations"),icon:n.jsx(as,{size:16}),panel:"automations",isActive:In,dataTour:re.automations});const g=a===$.agents;f=n.jsx(z,{className:"gap-1",children:p.map(x=>n.jsx(Ce,{icon:x.icon,label:x.label,dataTour:x.dataTour,isActive:g&&x.isActive(l),onSelect:()=>{E("project_nav_clicked",{surface:x.key}),r(o.id,{panel:x.panel}),s?.()}},x.key))}),e[4]=l,e[5]=a,e[6]=r,e[7]=s,e[8]=o,e[9]=d,e[10]=i,e[11]=f}else f=e[11];return f}function In(t){return t==="automations"||At(t)!==null}function Cn(t){return t.connection_id}function An(t){return!!t&&Ks(t)}const $n=3;function Tn(t,e){return t.status==="archived"||t.status==="done"?!1:e&&t.assigneeId===e?!0:Cs(t)||As(t)}function On(t,e,s){const i=new Map;for(const r of e){if(!Tn(r,s))continue;const a=ws(r,t);for(const l of a){const c=i.get(l.id)??[];c.push({task:r,only:a.length===1}),i.set(l.id,c)}}const o=new Map;for(const[r,a]of i)a.sort((l,c)=>Number(c.only)-Number(l.only)||(c.task.updatedAt??"").localeCompare(l.task.updatedAt??"")),o.set(r,a.slice(0,$n).map(l=>l.task));return o}function zn(t){const e=_.c(21),{task:s,orgSlug:i,isLast:o,onNavigate:r}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("span",{"aria-hidden":"true",className:"absolute top-0 left-4 h-1/2 w-3 rounded-bl-lg border-b border-l border-sidebar-border"}),e[0]=a):a=e[0];let l;e[1]!==o?(l=!o&&n.jsx("span",{"aria-hidden":"true",className:"absolute top-1/2 bottom-0 left-4 border-l border-sidebar-border"}),e[1]=o,e[2]=l):l=e[2];let c;e[3]!==i||e[4]!==s?(c=Is(i,s),e[3]=i,e[4]=s,e[5]=c):c=e[5];let m;e[6]!==i||e[7]!==c?(m={org:i,taskKey:c},e[6]=i,e[7]=c,e[8]=m):m=e[8];let u;e[9]!==r||e[10]!==s.status?(u=()=>{E("sidebar_attention_task_clicked",{status:s.status}),r?.()},e[9]=r,e[10]=s.status,e[11]=u):u=e[11];let d;e[12]!==s.title?(d=n.jsx("span",{className:"truncate",children:s.title}),e[12]=s.title,e[13]=d):d=e[13];let f;e[14]!==m||e[15]!==u||e[16]!==d?(f=n.jsx(Ot,{to:"/$org/tasks/{-$taskKey}",params:m,onClick:u,className:"flex h-8 items-center rounded-lg pr-2 pl-9 text-sm text-sidebar-foreground/70 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:d}),e[14]=m,e[15]=u,e[16]=d,e[17]=f):f=e[17];let p;return e[18]!==l||e[19]!==f?(p=n.jsxs("li",{className:"relative",children:[a,l,f]}),e[18]=l,e[19]=f,e[20]=p):p=e[20],p}function Mn(t){const e=_.c(35),{onNavigate:s}=t,i=A(),o=Re(),{org:r,locator:a}=R(),l=Xe(),{projects:c}=we(),m=Ie(),u=Ve(),{data:d}=le.useSession();let f;e[0]!==a||e[1]!==l?(f=$s(a,l),e[0]=a,e[1]=l,e[2]=f):f=e[2];const p=!o&&!m;let b;e[3]!==f||e[4]!==p?(b={...f,enabled:p},e[3]=f,e[4]=p,e[5]=b):b=e[5];const{data:g}=$t(b);if(m||c.length===0)return null;let x,h,j,v,y,N;if(e[6]!==o||e[7]!==g?.items||e[8]!==u||e[9]!==s||e[10]!==r||e[11]!==c||e[12]!==m||e[13]!==d?.user?.id||e[14]!==i){const P=On(Ps(c),g?.items??[],d?.user?.id),w=o&&"pt-3";e[21]!==w?(v=O("flex flex-col gap-1",w),e[21]=w,e[22]=v):v=e[22],y=re.projects,e[23]!==o||e[24]!==i?(N=!o&&n.jsx("p",{className:"px-2 pt-5 pb-0.5 text-xs font-medium text-muted-foreground/60",children:i("sidebar.projects.heading")}),e[23]=o,e[24]=i,e[25]=N):N=e[25],x=z,h="gap-1",j=c.map(I=>{const C=P.get(I.id)??[];return n.jsx(Ce,{icon:n.jsx(Dt,{icon:I.icon,name:I.title}),label:I.title,isActive:I.id===m,onSelect:()=>{E("sidebar_project_clicked"),u(I.id,{panel:Tt(I.metadata?.ui?.layout)}),s?.()},children:!o&&C.length>0&&n.jsx("ul",{className:"flex flex-col",children:C.map((T,F)=>n.jsx(zn,{task:T,orgSlug:r.slug,isLast:F===C.length-1,onNavigate:s},T.id))})},I.id)}),e[6]=o,e[7]=g?.items,e[8]=u,e[9]=s,e[10]=r,e[11]=c,e[12]=m,e[13]=d?.user?.id,e[14]=i,e[15]=x,e[16]=h,e[17]=j,e[18]=v,e[19]=y,e[20]=N}else x=e[15],h=e[16],j=e[17],v=e[18],y=e[19],N=e[20];let S;e[26]!==x||e[27]!==h||e[28]!==j?(S=n.jsx(x,{className:h,children:j}),e[26]=x,e[27]=h,e[28]=j,e[29]=S):S=e[29];let k;return e[30]!==v||e[31]!==y||e[32]!==N||e[33]!==S?(k=n.jsxs("div",{className:v,"data-tour":y,children:[N,S]}),e[30]=v,e[31]=y,e[32]=N,e[33]=S,e[34]=k):k=e[34],k}function pt(t){const e=_.c(8),{onNavigate:s}=t,i=A(),o=Ie(),r=Ls();if(!o)return null;let a;e[0]!==i?(a=i("sidebar.scope.allProjects"),e[0]=i,e[1]=a):a=e[1];let l;e[2]!==r||e[3]!==s?(l=()=>{r(),s?.()},e[2]=r,e[3]=s,e[4]=l):l=e[4];let c;return e[5]!==a||e[6]!==l?(c=n.jsx(Qt,{label:a,onSelect:l}),e[5]=a,e[6]=l,e[7]=c):c=e[7],c}function bt(t){const e=_.c(2),{onNavigate:s}=t;let i;return e[0]!==s?(i=n.jsx(zt,{children:n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx(Sn,{onNavigate:s}),n.jsx(wn,{onNavigate:s}),n.jsx(kn,{onNavigate:s}),n.jsx(Mn,{onNavigate:s})]})}),e[0]=s,e[1]=i):i=e[1],i}function jo(){const t=_.c(3),e=Vt();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Bt,{}),t[0]=s):s=t[0];let i;return t[1]!==e?(i=n.jsx(et,{header:s,back:e?n.jsx(qt,{}):n.jsx(pt,{}),body:e?n.jsx(Lt,{}):n.jsx(bt,{}),footer:e?n.jsx(Kt,{}):n.jsx(pn,{})}),t[1]=e,t[2]=i):i=t[2],i}function vo(t){const e=_.c(9),{onClose:s}=t;let i,o,r;e[0]!==s?(i=n.jsx(Ut,{onClose:s}),o=n.jsx(pt,{onNavigate:s}),r=n.jsx(bt,{onNavigate:s}),e[0]=s,e[1]=i,e[2]=o,e[3]=r):(i=e[1],o=e[2],r=e[3]);let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(bn,{}),e[4]=a):a=e[4];let l;return e[5]!==i||e[6]!==o||e[7]!==r?(l=n.jsx(et,{sheet:!0,header:i,back:o,body:r,footer:a}),e[5]=i,e[6]=o,e[7]=r,e[8]=l):l=e[8],l}export{jo as S,vo as a};
@@ -1 +1 @@
1
- import{c as ee,j as t,a1 as ns,B as Ie,a2 as is,a4 as ls,l as xt,b as Ae,b8 as dt,b6 as Ps,b1 as vs,t as ce,n as bt,r as Z,e as lt,m as ct,K as Ye,bm as ys,bl as Ss,bn as Ns,bo as Cs,z as Wt,G as Ds,P as Jt,b5 as ws}from"./index-DmMXAqxC.js";import{n as _t}from"./LinkExternal01-CMl1UKVD.js";import{be as $s,bf as as,aD as Ls,aY as _s,bg as ks,k as kt,C as Yt,av as Gt,aF as Es}from"./agent-icon-CvRN2kIe.js";import{B as Re}from"./badge-XewurO2c.js";import{E as Ze}from"./empty-state-Bq5_azuW.js";import{u as Rs}from"./use-virtual-mcp-CQsLZfmK.js";import{r as Fs}from"./site-slug-uya6Wp4-.js";import{i as As}from"./AlertCircle-BDGgDdnU.js";import{d as gt}from"./UserSquare-B7oSdaaK.js";import{i as zs}from"./Zap-D1eUhlLV.js";import{c as os,d as rs,b as cs,f as ms,g as ds,e as fs,a as us,A as hs}from"./alert-dialog-B99tFCPN.js";import{d as Vs,a as nt,T as Fe,c as Et,e as Rt,b as Ft}from"./table-DZ15ysLv.js";import{i as xs}from"./ChevronRight-C307yAT0.js";import{a as Hs}from"./Copy01-AMwHi9CR.js";import{am as Vt,an as Ht,al as Bs}from"./automation-runs-Cam7zjTB.js";import{i as At}from"./Globe01-66hYLRXC.js";import{s as Pt}from"./Plus-BB9moQlk.js";import{s as vt}from"./Trash01-BhSt7amx.js";import{c as yt,d as St,e as Nt,b as Ct,D as Dt}from"./dialog-Cb73HT1O.js";import{I as it}from"./input-CgZSXYN4.js";import{L as Xe}from"./label-C_Rf5I6_.js";import{i as Os}from"./Settings02-CxNahSF6.js";import{s as qs}from"./Eye-C9BK0WpO.js";import{a as Bt,b as Ot,c as ft,d as qt,S as Mt}from"./select-DQCnroeo.js";import{i as Ms}from"./ArrowRight-C-JKgzzW.js";import"./Tool01-CuyN3PCD.js";import"./ArrowUp-Xs8btF3m.js";import"./ArrowLeft-DcYZMYcp.js";import"./Tool02-BASbnym5.js";import"./TrendUp01-DO4mZNHN.js";import"./ZoomOut-6XJtTBIm.js";import"./Users03-BwXNg2js.js";import"./CheckCircle-CGCTggu0.js";import"./Check-Bum7-gpx.js";import"./ChevronUp-CZ5ILA-E.js";import"./ChevronSelectorVertical-KvgVrvOl.js";import"./DotsVertical-BCEQFCLt.js";import"./CreditCard01-9F1qqx5d.js";import"./Download01-DmH-thwp.js";import"./Share07-D21XeGjn.js";import"./GitBranch01-8UQB0WNt.js";import"./XClose-Dt5lNjhR.js";import"./HardDrive-B1Me-FOx.js";import"./Image01-DVxIiG0a.js";import"./Key01-eG7JQJD3.js";import"./Link01-D-2P1k10.js";import"./Monitor01-Dx2IHfNm.js";import"./Sun-BnzNJ9ph.js";import"./Package-fd_l_BiE.js";import"./Palette-CFejZrzA.js";import"./Play-DWGn9jzY.js";import"./SearchLg-Dx_5UJpu.js";import"./SearchMd-DRTW6Eci.js";import"./Shield01-CTgru1Go.js";import"./Stars01-CEq_MKrs.js";import"./Upload01-BlXZHJIt.js";import"./User01-BHYLCtnk.js";import"./Users01-QsT1MVSH.js";import"./XCircle-C2-e12le.js";import"./use-mcp-client-Dc7ilQkt.js";import"./auth-CA9YH-f3.js";import"./useInfiniteQuery-DvifJ2DA.js";import"./infiniteQueryObserver-Dz5h94ot.js";import"./use-connection-BL1yhZNp.js";import"./empty-state-CGgojVAN.js";import"./use-infinite-scroll-CGrWQV9m.js";import"./use-members-B-wX7jR_.js";import"./use-org-auth-client-CReY2uqU.js";import"./use-automations-Bxct96j5.js";import"./useSuspenseInfiniteQuery-DL3cGDzg.js";import"./avatar-eSpZRnCw.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-copy-BpfelOsR.js";import"./markdown-BKkWa5ul.js";import"./use-panel-navigate-DEpXw5wF.js";import"./use-destination-route-B73D_eIZ.js";import"./hooks-CtKQL1uv.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CdA-XfpC.js";import"./task-board-CpzOUqzD.js";import"./schema-CSGmlZMm.js";import"./chat-context-BoK19tyJ.js";import"./autosend-DonDFhf5.js";import"./thread-intent-tfoIKTGL.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-D0MFnnnJ.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-CfnA_2wd.js";import"./thread-route-C9DY5m1F.js";import"./use-organization-settings-CwqtDA4J.js";import"./monaco-editor-BtpiUfB5.js";import"./editor-M0xQdBHV.js";import"./mcp-app-renderer-BV6YR8SP.js";import"./types-C1-e4QHU.js";import"./shell-layout-km320KvY.js";import"./anchors-yqDzZN4K.js";import"./project-icon-D745WVE6.js";import"./github-repo-CTPv5ZM2.js";import"./source-system-tabs-CnEGUb4r.js";import"./command-C3gabQe3.js";import"./index-CqNk88Pi.js";import"./integration-icon-BGwxObnE.js";import"./required-auth-layout-QwpJ5qZ8.js";import"./use-org-sso-Dg6nqD1f.js";import"./use-org-notice-DyChybv5.js";import"./use-navigate-to-agent-DC_OOIzX.js";import"./use-mcp-prompts-DIloFBQg.js";import"./form-CNnCCWV8.js";import"./file-type-icon-oPj2x3Y3.js";function Lt(r,e){return r.name===e.name&&(r.scope??"runtime")===e.scope}function mt(r,e){if(Array.isArray(r))return r;if(r&&typeof r=="object"){const o=r[e];if(Array.isArray(o))return o}return[]}function zt(r){return r==="deco-deno"?"Deco Deno":r==="deco-tanstack"?"Deco TanStack":r??null}function Is(r){const e=(r??"").toLowerCase();return e.includes("ready")||e.includes("success")||e.includes("active")?"success":e.includes("fail")||e.includes("error")?"destructive":e.includes("build")||e.includes("pend")||e.includes("progress")?"warning":"secondary"}function Xt(r){if(!r)return"—";const e=new Date(r).getTime();if(Number.isNaN(e))return"—";const o=Math.round((Date.now()-e)/1e3),l=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),a=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[i,c]of a)if(Math.abs(o)>=c)return l.format(-Math.round(o/c),i);return l.format(-o,"second")}function Qs(r){if(r==null||!Number.isFinite(r))return"—";if(r<1e3)return`${Math.round(r)}ms`;const e=r/1e3;if(e<60)return`${e.toFixed(e>=10?0:1)}s`;const o=Math.round(e);return`${Math.floor(o/60)}m ${o%60}s`}class It extends Error{constructor(e,o){super(e),this.status=o}status}function jt(r){return r instanceof It&&r.status===401}function rt(r){return r instanceof Error?r.message:String(r)}function Us(r){const e=r.trim();if(!e)return null;const l=(e.endsWith(".")?e.slice(0,-1):e).split(".");if(l.length<2)return"Domain must include a TLD (e.g., example.com)";if(e.length>253)return"Domain name is too long (max 253 characters)";for(const i of l){if(i.length>63)return`Label "${i}" is too long (max 63 characters)`;if(!/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/i.test(i))return`Label "${i}" has invalid characters or format`}const a=l[l.length-1]??"";return/^[0-9]+$/.test(a)?"Domain must include a valid TLD, not a number":null}function gs(r,e){return r&&typeof r=="object"&&"error"in r?String(r.error):`request failed (${e})`}async function Qt(r){const e=await fetch(r),o=await e.json().catch(()=>({}));if(!e.ok)throw new It(gs(o,e.status),e.status);return o}async function at(r,e,o){const l=await fetch(r,{method:e,headers:o!==void 0?{"Content-Type":"application/json"}:{},body:o!==void 0?JSON.stringify(o):void 0}),a=await l.json().catch(()=>({}));if(!l.ok)throw new It(gs(a,l.status),l.status);return a}function et(r){const e=ee.c(19);let o,l,a,i,c,m;e[0]!==r?({label:l,tooltipSide:i,variant:c,size:m,children:o,...a}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=a,e[4]=i,e[5]=c,e[6]=m):(o=e[1],l=e[2],a=e[3],i=e[4],c=e[5],m=e[6]);const s=i===void 0?"top":i,n=c===void 0?"ghost":c,h=m===void 0?"icon-sm":m;let g;e[7]!==o||e[8]!==l||e[9]!==a||e[10]!==h||e[11]!==n?(g=t.jsx(ns,{asChild:!0,children:t.jsx(Ie,{"data-slot":"icon-button","aria-label":l,variant:n,size:h,...a,children:o})}),e[7]=o,e[8]=l,e[9]=a,e[10]=h,e[11]=n,e[12]=g):g=e[12];let d;e[13]!==l||e[14]!==s?(d=t.jsx(is,{side:s,children:l}),e[13]=l,e[14]=s,e[15]=d):d=e[15];let f;return e[16]!==g||e[17]!==d?(f=t.jsxs(ls,{children:[g,d]}),e[16]=g,e[17]=d,e[18]=f):f=e[18],f}function ut(r){const e=ee.c(4),{title:o,actions:l,children:a}=r;let i;return e[0]!==l||e[1]!==a||e[2]!==o?(i=t.jsx(vs,{title:o,actions:l,children:a}),e[0]=l,e[1]=a,e[2]=o,e[3]=i):i=e[3],i}function Qe(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("gap-0 overflow-hidden p-0 divide-y divide-border",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx(Ps,{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function pt(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("flex min-h-12 items-center gap-3 px-4 py-2",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx("div",{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function ot(r){const e=ee.c(2),{children:o}=r;let l;return e[0]!==o?(l=t.jsx("p",{className:"px-4 py-6 text-sm text-muted-foreground",children:o}),e[0]=o,e[1]=l):l=e[1],l}function ht(r){const e=ee.c(2),{rows:o}=r,l=o===void 0?3:o;let a;return e[0]!==l?(a=t.jsx(Qe,{children:Array.from({length:l},Ks)}),e[0]=l,e[1]=a):a=e[1],a}function Ks(r,e){return t.jsxs(pt,{children:[t.jsx(dt,{className:"h-4 w-40"}),t.jsx(dt,{className:"h-4 flex-1"}),t.jsx(dt,{className:"size-7 rounded-lg"})]},e)}function Me(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("text-xs font-medium text-muted-foreground",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx(Vs,{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function Ut(r){const e=ee.c(12),{open:o,onClick:l}=r,a=Ae();let i;e[0]!==o||e[1]!==a?(i=a(o?"mainPanelTabs.hostingTab.hideDetails":"mainPanelTabs.hostingTab.showDetails"),e[0]=o,e[1]=a,e[2]=i):i=e[2];const c=o&&"rotate-90";let m;e[3]!==c?(m=xt("transition-transform duration-200 motion-reduce:transition-none",c),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==m?(s=t.jsx(xs,{className:m}),e[5]=m,e[6]=s):s=e[6];let n;return e[7]!==l||e[8]!==o||e[9]!==i||e[10]!==s?(n=t.jsx(et,{label:i,size:"icon-sm",className:"-ml-1.5 text-muted-foreground","aria-expanded":o,onClick:l,children:s}),e[7]=l,e[8]=o,e[9]=i,e[10]=s,e[11]=n):n=e[11],n}function Ws(r){const e=ee.c(8),{open:o,colSpan:l,children:a}=r;let i;e[0]!==a?(i=t.jsx(Vt,{children:t.jsx("div",{className:"border-b border-border bg-muted/30 px-4 py-3",children:a})}),e[0]=a,e[1]=i):i=e[1];let c;e[2]!==o||e[3]!==i?(c=t.jsx(Ht,{open:o,children:i}),e[2]=o,e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==l||e[6]!==c?(m=t.jsx(nt,{className:"border-0 hover:bg-transparent",children:t.jsx(Fe,{colSpan:l,className:"p-0 whitespace-normal",children:c})}),e[5]=l,e[6]=c,e[7]=m):m=e[7],m}function bs(r){const e=ee.c(5),{open:o,children:l}=r;let a;e[0]!==l?(a=t.jsx(Vt,{children:t.jsx("div",{className:"border-t border-border bg-muted/30 px-4 py-3",children:l})}),e[0]=l,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.jsx(Ht,{open:o,children:a}),e[2]=o,e[3]=a,e[4]=i):i=e[4],i}function ps(r){const e=ee.c(6),{scope:o}=r,l=Ae(),a=o==="build"?"outline":"secondary";let i;e[0]!==o||e[1]!==l?(i=l(o==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime"),e[0]=o,e[1]=l,e[2]=i):i=e[2];let c;return e[3]!==a||e[4]!==i?(c=t.jsx(Re,{variant:a,children:i}),e[3]=a,e[4]=i,e[5]=c):c=e[5],c}function Js(r){const e=ee.c(9),{value:o}=r,l=Ae();let a;e[0]!==l?(a=l("mainPanelTabs.hostingTab.dnsCopy"),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==l||e[3]!==o?(i=()=>{if(!navigator.clipboard){ce.error(l("mainPanelTabs.hostingTab.dnsCopyError"));return}navigator.clipboard.writeText(o).then(()=>ce.success(l("mainPanelTabs.hostingTab.dnsCopied")),()=>ce.error(l("mainPanelTabs.hostingTab.dnsCopyError")))},e[2]=l,e[3]=o,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Hs,{className:"size-3.5"}),e[5]=c):c=e[5];let m;return e[6]!==a||e[7]!==i?(m=t.jsx(et,{label:a,onClick:i,children:c}),e[6]=a,e[7]=i,e[8]=m):m=e[8],m}function wt(r){const e=ee.c(28),{open:o,onOpenChange:l,title:a,description:i,confirmLabel:c,pending:m,onConfirm:s}=r,n=Ae();let h;e[0]!==a?(h=t.jsx(os,{children:a}),e[0]=a,e[1]=h):h=e[1];let g;e[2]!==i?(g=t.jsx(rs,{children:i}),e[2]=i,e[3]=g):g=e[3];let d;e[4]!==h||e[5]!==g?(d=t.jsxs(cs,{children:[h,g]}),e[4]=h,e[5]=g,e[6]=d):d=e[6];let f;e[7]!==n?(f=n("mainPanelTabs.hostingTab.cancel"),e[7]=n,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=t.jsx(ms,{disabled:m,children:f}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let b;e[12]!==s?(b=S=>{S.preventDefault(),s()},e[12]=s,e[13]=b):b=e[13];let x;e[14]!==c||e[15]!==m||e[16]!==b?(x=t.jsx(ds,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:b,disabled:m,children:c}),e[14]=c,e[15]=m,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==u||e[19]!==x?(N=t.jsxs(fs,{children:[u,x]}),e[18]=u,e[19]=x,e[20]=N):N=e[20];let C;e[21]!==d||e[22]!==N?(C=t.jsxs(us,{children:[d,N]}),e[21]=d,e[22]=N,e[23]=C):C=e[23];let P;return e[24]!==l||e[25]!==o||e[26]!==C?(P=t.jsx(hs,{open:o,onOpenChange:l,children:C}),e[24]=l,e[25]=o,e[26]=C,e[27]=P):P=e[27],P}const Ys=8;function Gs(r){const e=ee.c(54),{base:o,orgSlug:l,site:a}=r,i=Ae(),c=bt(),[m,s]=Z.useState(!1);let n;e[0]!==o?(n=()=>at(`${o}/deploy`,"POST",{mode:"current"}),e[0]=o,e[1]=n):n=e[1];let h;e[2]!==l||e[3]!==c||e[4]!==a||e[5]!==i?(h=()=>{c.invalidateQueries({queryKey:Ye.hostingDeployments(l,a)}),c.invalidateQueries({queryKey:Ye.hostingDeploymentHistory(l,a)}),ce.success(i("mainPanelTabs.hostingTab.toastDeployQueued")),s(!1)},e[2]=l,e[3]=c,e[4]=a,e[5]=i,e[6]=h):h=e[6];let g;e[7]!==n||e[8]!==h?(g={mutationFn:n,onSuccess:h,onError:Xs},e[7]=n,e[8]=h,e[9]=g):g=e[9];const d=lt(g);let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=()=>s(!0),e[10]=f):f=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(gt,{}),e[11]=u):u=e[11];let b;e[12]!==d.isPending||e[13]!==i?(b=d.isPending?i("mainPanelTabs.hostingTab.deploying"):i("mainPanelTabs.hostingTab.deploy"),e[12]=d.isPending,e[13]=i,e[14]=b):b=e[14];let x;e[15]!==d.isPending||e[16]!==b?(x=t.jsxs(Ie,{size:"sm",onClick:f,disabled:d.isPending,children:[u,b]}),e[15]=d.isPending,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==i?(N=i("mainPanelTabs.hostingTab.deployConfirmTitle"),e[18]=i,e[19]=N):N=e[19];let C;e[20]!==N?(C=t.jsx(os,{children:N}),e[20]=N,e[21]=C):C=e[21];let P;e[22]!==i?(P=i("mainPanelTabs.hostingTab.deployConfirmDescription"),e[22]=i,e[23]=P):P=e[23];let S;e[24]!==P?(S=t.jsx(rs,{children:P}),e[24]=P,e[25]=S):S=e[25];let y;e[26]!==S||e[27]!==C?(y=t.jsxs(cs,{children:[C,S]}),e[26]=S,e[27]=C,e[28]=y):y=e[28];const R=d.isPending;let w;e[29]!==i?(w=i("mainPanelTabs.hostingTab.cancel"),e[29]=i,e[30]=w):w=e[30];let j;e[31]!==d.isPending||e[32]!==w?(j=t.jsx(ms,{disabled:R,children:w}),e[31]=d.isPending,e[32]=w,e[33]=j):j=e[33];let T;e[34]!==d?(T=_=>{_.preventDefault(),d.mutate()},e[34]=d,e[35]=T):T=e[35];const V=d.isPending;let q;e[36]!==i?(q=i("mainPanelTabs.hostingTab.deploy"),e[36]=i,e[37]=q):q=e[37];let F;e[38]!==d.isPending||e[39]!==T||e[40]!==q?(F=t.jsx(ds,{onClick:T,disabled:V,children:q}),e[38]=d.isPending,e[39]=T,e[40]=q,e[41]=F):F=e[41];let v;e[42]!==j||e[43]!==F?(v=t.jsxs(fs,{children:[j,F]}),e[42]=j,e[43]=F,e[44]=v):v=e[44];let H;e[45]!==y||e[46]!==v?(H=t.jsxs(us,{children:[y,v]}),e[45]=y,e[46]=v,e[47]=H):H=e[47];let A;e[48]!==m||e[49]!==H?(A=t.jsx(hs,{open:m,onOpenChange:s,children:H}),e[48]=m,e[49]=H,e[50]=A):A=e[50];let Q;return e[51]!==A||e[52]!==x?(Q=t.jsxs(t.Fragment,{children:[x,A]}),e[51]=A,e[52]=x,e[53]=Q):Q=e[53],Q}function Xs(r){return ce.error(rt(r))}function Zs(r,e){const o=(r??"").toLowerCase();return o.includes("rollback")?t.jsxs(Re,{variant:"warning",children:[t.jsx(_s,{}),e("mainPanelTabs.hostingTab.actionRollback")]}):o.includes("redeploy")?t.jsxs(Re,{variant:"secondary",children:[t.jsx(ks,{}),e("mainPanelTabs.hostingTab.actionRedeploy")]}):t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),e("mainPanelTabs.hostingTab.actionDeploy")]})}function en(r,e,o){const l=(r??"").toLowerCase();return l==="build"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(as,{}),o("mainPanelTabs.hostingTab.typeBuild")]}):l==="fast-deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(zs,{}),o("mainPanelTabs.hostingTab.typeFastDeploy")]}):l==="deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),o("mainPanelTabs.hostingTab.typeDeploy")]}):Zs(e,o)}function tn(r,e){const o=(r??"").toLowerCase();return o==="success"?t.jsx(Re,{variant:"success",children:e("mainPanelTabs.hostingTab.outcomeSuccess")}):o==="failure"?t.jsx(Re,{variant:"destructive",children:e("mainPanelTabs.hostingTab.outcomeFailure")}):o==="pending"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(Ls,{}),e("mainPanelTabs.hostingTab.outcomePending")]}):null}function Zt(r){const e=ee.c(7),{commit:o,onClick:l}=r,a=Ae();let i;e[0]!==a?(i=a("mainPanelTabs.hostingTab.buildLogs"),e[0]=a,e[1]=i):i=e[1];const c=!o;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(as,{}),e[2]=m):m=e[2];let s;return e[3]!==l||e[4]!==i||e[5]!==c?(s=t.jsx(et,{label:i,onClick:l,disabled:c,children:m}),e[3]=l,e[4]=i,e[5]=c,e[6]=s):s=e[6],s}function sn(r){const e=ee.c(37),{base:o,orgSlug:l,site:a,target:i,onOpenChange:c}=r,m=Ae(),s=i!=null,n=i?.commit??"",h=i?.env??"";let g;e[0]!==n||e[1]!==h||e[2]!==l||e[3]!==a?(g=Ye.hostingBuildLogs(l,a,n,h),e[0]=n,e[1]=h,e[2]=l,e[3]=a,e[4]=g):g=e[4];let d;e[5]!==o||e[6]!==n||e[7]!==h?(d=()=>Qt(`${o}/deployments/logs?commit=${encodeURIComponent(n)}&env=${encodeURIComponent(h)}`),e[5]=o,e[6]=n,e[7]=h,e[8]=d):d=e[8];const f=s&&!!n;let u;e[9]!==g||e[10]!==d||e[11]!==f?(u={queryKey:g,queryFn:d,enabled:f,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[9]=g,e[10]=d,e[11]=f,e[12]=u):u=e[12];const b=ct(u),x=b.data;let N;e[13]!==m?(N=m("mainPanelTabs.hostingTab.buildLogsTitle"),e[13]=m,e[14]=N):N=e[14];let C;e[15]!==N?(C=t.jsx(ys,{children:N}),e[15]=N,e[16]=C):C=e[16];let P;e[17]!==n||e[18]!==m?(P=m("mainPanelTabs.hostingTab.buildLogsCommit",{commit:n.slice(0,7)}),e[17]=n,e[18]=m,e[19]=P):P=e[19];let S;e[20]!==P?(S=t.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:P}),e[20]=P,e[21]=S):S=e[21];let y;e[22]!==C||e[23]!==S?(y=t.jsxs(Ss,{className:"shrink-0 border-b border-border px-5 py-5 md:px-6",children:[C,S]}),e[22]=C,e[23]=S,e[24]=y):y=e[24];let R;e[25]!==x||e[26]!==b.error||e[27]!==b.isLoading||e[28]!==m?(R=t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-5 md:px-6",children:jt(b.error)?t.jsx(Ze,{icon:t.jsx(kt,{className:"size-5"}),title:m("mainPanelTabs.hostingTab.notConnectedTitle"),description:m("mainPanelTabs.hostingTab.notConnectedDescription")}):b.isLoading?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-2/3"})]}):b.error?t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsError")}):x&&x.configured===!1?t.jsxs("div",{className:"flex flex-col items-center gap-2 rounded-lg border border-border bg-muted/30 px-4 py-8 text-center",children:[t.jsx(As,{className:"size-5 text-muted-foreground"}),t.jsx("p",{className:"text-sm font-medium text-foreground",children:m("mainPanelTabs.hostingTab.buildLogsNotWiredTitle")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:x.reason??m("mainPanelTabs.hostingTab.buildLogsNotWiredDescription")})]}):x?.text?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("pre",{className:"overflow-auto font-mono text-[11px] leading-relaxed text-foreground/80 whitespace-pre-wrap break-words",children:x.text}),x.truncated&&t.jsx("p",{className:"text-xs text-warning",children:m("mainPanelTabs.hostingTab.buildLogsTruncated")}),x.url&&t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-xs text-primary hover:underline",children:[t.jsx(_t,{className:"size-3.5"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]})]}):x?.url?t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-sm text-primary hover:underline",children:[t.jsx(_t,{className:"size-4"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]}):t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsEmpty")})}),e[25]=x,e[26]=b.error,e[27]=b.isLoading,e[28]=m,e[29]=R):R=e[29];let w;e[30]!==R||e[31]!==y?(w=t.jsxs(Ns,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:[y,R]}),e[30]=R,e[31]=y,e[32]=w):w=e[32];let j;return e[33]!==c||e[34]!==s||e[35]!==w?(j=t.jsx(Cs,{open:s,onOpenChange:c,children:w}),e[33]=c,e[34]=s,e[35]=w,e[36]=j):j=e[36],j}function nn(r){const e=ee.c(52),{base:o,orgSlug:l,site:a,enabled:i,deployments:c,isLoading:m,error:s}=r,n=Ae(),[h,g]=Z.useState(null),[d,f]=Z.useState(Ys),[u,b]=Z.useState(null);let x;e[0]!==l||e[1]!==a?(x=Ye.hostingDeploymentHistory(l,a),e[0]=l,e[1]=a,e[2]=x):x=e[2];let N;e[3]!==o?(N=()=>Qt(`${o}/deployments/history?limit=50`),e[3]=o,e[4]=N):N=e[4];let C;e[5]!==i||e[6]!==x||e[7]!==N?(C={queryKey:x,queryFn:N,enabled:i,retry:!1,staleTime:3e4},e[5]=i,e[6]=x,e[7]=N,e[8]=C):C=e[8];const P=ct(C);let S,y,R,w;if(e[9]!==c||e[10]!==s||e[11]!==h||e[12]!==d||e[13]!==P.data||e[14]!==P.error||e[15]!==P.isLoading||e[16]!==m||e[17]!==n){const F=mt(P.data,"items"),v=F.slice(0,d),H=F.length-v.length;let A;e[22]!==c?(A=c.find(on)?.commitSha??c.find(an)?.commitSha??null,e[22]=c,e[23]=A):A=e[23];const Q=A;let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=(p,I)=>{p&&b({commit:p,env:I??"production"})},e[24]=_):_=e[24];const W=_;let J;e[25]!==n?(J=n("mainPanelTabs.hostingTab.deployments"),e[25]=n,e[26]=J):J=e[26];let U;e[27]!==c||e[28]!==s||e[29]!==h||e[30]!==m||e[31]!==n?(U=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deploymentsError")})}):c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployments"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDuration")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colUpdated")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsx(Ft,{children:c.map(p=>{const I=!!p.buildMessage,Y=h===p.id;return t.jsxs(Z.Fragment,{children:[t.jsxs(nt,{className:xt(I&&"cursor-pointer hover:bg-muted/40"),onClick:I?()=>g(Y?null:p.id):void 0,children:[t.jsx(Fe,{className:"px-4",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[I?t.jsx(Ut,{open:Y,onClick:()=>g(Y?null:p.id)}):t.jsx($s,{className:"size-4 text-muted-foreground/60"}),t.jsx("span",{className:"font-mono text-xs",children:p.shortCommit??p.commitSha?.slice(0,7)??"—"}),p.production===!0&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.production")})]})}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Re,{variant:Is(p.phase),children:p.phase??"—"}),p.up===!0&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-right font-mono text-xs text-muted-foreground tabular-nums",children:Qs(p.durationMs)}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Xt(p.finishedAt??p.startedAt??p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",onClick:ln,children:t.jsx(Zt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]}),I&&t.jsx(Ws,{open:Y,colSpan:6,children:t.jsx("p",{className:"whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:p.buildMessage})})]},p.id)})})]}),e[27]=c,e[28]=s,e[29]=h,e[30]=m,e[31]=n,e[32]=U):U=e[32],e[33]!==U||e[34]!==J?(w=t.jsx(ut,{title:J,children:U}),e[33]=U,e[34]=J,e[35]=w):w=e[35],S=ut,e[36]!==n?(y=n("mainPanelTabs.hostingTab.deployHistory"),e[36]=n,e[37]=y):y=e[37],R=P.isLoading?t.jsx(ht,{}):P.error?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deployHistoryError")})}):F.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployHistory"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colAction")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colActor")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDate")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsxs(Ft,{children:[v.map(p=>{const I=!!Q&&p.commitSha===Q;return t.jsxs(nt,{children:[t.jsx(Fe,{className:"pl-4",children:en(p.type,p.action,n)}),t.jsx(Fe,{children:tn(p.outcome,n)}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"font-mono text-xs",children:p.commitSha?.slice(0,7)??"—"}),I&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:p.actor??"—"}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Xt(p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",children:t.jsx(Zt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]},p.id)}),H>0&&t.jsx(nt,{className:"hover:bg-transparent",children:t.jsx(Fe,{colSpan:7,className:"p-2 text-center",children:t.jsx(Ie,{variant:"ghost",size:"sm",onClick:()=>f(F.length),children:n("mainPanelTabs.hostingTab.showMoreHistory",{count:String(H)})})})})]})]}),e[9]=c,e[10]=s,e[11]=h,e[12]=d,e[13]=P.data,e[14]=P.error,e[15]=P.isLoading,e[16]=m,e[17]=n,e[18]=S,e[19]=y,e[20]=R,e[21]=w}else S=e[18],y=e[19],R=e[20],w=e[21];let j;e[38]!==S||e[39]!==y||e[40]!==R?(j=t.jsx(S,{title:y,children:R}),e[38]=S,e[39]=y,e[40]=R,e[41]=j):j=e[41];let T;e[42]===Symbol.for("react.memo_cache_sentinel")?(T=F=>{F||b(null)},e[42]=T):T=e[42];let V;e[43]!==o||e[44]!==u||e[45]!==l||e[46]!==a?(V=t.jsx(sn,{base:o,orgSlug:l,site:a,target:u,onOpenChange:T}),e[43]=o,e[44]=u,e[45]=l,e[46]=a,e[47]=V):V=e[47];let q;return e[48]!==w||e[49]!==j||e[50]!==V?(q=t.jsxs(t.Fragment,{children:[w,j,V]}),e[48]=w,e[49]=j,e[50]=V,e[51]=q):q=e[51],q}function ln(r){return r.stopPropagation()}function an(r){return r.production===!0&&r.up}function on(r){return r.up===!0}const rn=["16.148.147.194","52.32.122.94","52.35.156.199"];function cn(r){return r.replace(/\.$/,"").split(".").filter(Boolean).length===2}function es(r){const e=r.trim();return e.length>0&&!e.startsWith("/")&&e.includes(".")}function Ts(r){const e=ee.c(24),{records:o}=r,l=Ae();let a;e[0]!==l?(a=l("mainPanelTabs.hostingTab.dnsColType"),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==a?(i=t.jsx(Me,{className:"w-16",children:a}),e[2]=a,e[3]=i):i=e[3];let c;e[4]!==l?(c=l("mainPanelTabs.hostingTab.dnsColName"),e[4]=l,e[5]=c):c=e[5];let m;e[6]!==c?(m=t.jsx(Me,{children:c}),e[6]=c,e[7]=m):m=e[7];let s;e[8]!==l?(s=l("mainPanelTabs.hostingTab.dnsColValue"),e[8]=l,e[9]=s):s=e[9];let n;e[10]!==s?(n=t.jsx(Me,{children:s}),e[10]=s,e[11]=n):n=e[11];let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(Me,{className:"w-10"}),e[12]=h):h=e[12];let g;e[13]!==i||e[14]!==m||e[15]!==n?(g=t.jsx(Rt,{children:t.jsxs(nt,{children:[i,m,n,h]})}),e[13]=i,e[14]=m,e[15]=n,e[16]=g):g=e[16];let d;e[17]!==o?(d=o.map(mn),e[17]=o,e[18]=d):d=e[18];let f;e[19]!==d?(f=t.jsx(Ft,{children:d}),e[19]=d,e[20]=f):f=e[20];let u;return e[21]!==f||e[22]!==g?(u=t.jsxs(Et,{className:"table-fixed",children:[g,f]}),e[21]=f,e[22]=g,e[23]=u):u=e[23],u}function mn(r){return t.jsxs(nt,{children:[t.jsx(Fe,{className:"font-mono text-xs",children:r.type}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs",children:r.name}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs text-muted-foreground",children:r.value}),t.jsx(Fe,{className:"text-right",children:t.jsx(Js,{value:r.value})})]},`${r.type}-${r.name}-${r.value}`)}function js(r){const e=ee.c(14),{status:o,children:l}=r,a=Ae();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(At,{className:"size-4 text-muted-foreground"}),e[0]=i):i=e[0];let c;e[1]!==a?(c=a("mainPanelTabs.hostingTab.dnsSetupTitle"),e[1]=a,e[2]=c):c=e[2];let m;e[3]!==c?(m=t.jsx("span",{className:"text-sm font-medium",children:c}),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==o||e[6]!==a?(s=o&&t.jsx(Re,{variant:o.active?"success":"outline",className:"ml-auto",children:o.active?a("mainPanelTabs.hostingTab.dnsActive"):a("mainPanelTabs.hostingTab.dnsAwaiting")}),e[5]=o,e[6]=a,e[7]=s):s=e[7];let n;e[8]!==m||e[9]!==s?(n=t.jsxs("div",{className:"flex items-center gap-2",children:[i,m,s]}),e[8]=m,e[9]=s,e[10]=n):n=e[10];let h;return e[11]!==l||e[12]!==n?(h=t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[n,l]}),e[11]=l,e[12]=n,e[13]=h):h=e[13],h}function ts(r){const e=ee.c(21),{from:o,source:l}=r,a=Ae();let i,c,m,s,n;if(e[0]!==o||e[1]!==l||e[2]!==a){const d=o.trim().replace(/\.$/,""),f=d?cn(d)?"@":d:"@",u=l==="both";c=js,e[8]!==u?(s={active:u},e[8]=u,e[9]=s):s=e[9];let b;e[10]!==u||e[11]!==a?(b=a(u?"mainPanelTabs.hostingTab.dnsActiveHint":"mainPanelTabs.hostingTab.dnsAwaitingHint"),e[10]=u,e[11]=a,e[12]=b):b=e[12],n=t.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("mainPanelTabs.hostingTab.dnsRedirectIntent",{from:d||"—"})," ",b]}),i=Ts,m=rn.map(x=>({type:"A",name:f,value:x})),e[0]=o,e[1]=l,e[2]=a,e[3]=i,e[4]=c,e[5]=m,e[6]=s,e[7]=n}else i=e[3],c=e[4],m=e[5],s=e[6],n=e[7];let h;e[13]!==i||e[14]!==m?(h=t.jsx(i,{records:m}),e[13]=i,e[14]=m,e[15]=h):h=e[15];let g;return e[16]!==c||e[17]!==s||e[18]!==n||e[19]!==h?(g=t.jsxs(c,{status:s,children:[n,h]}),e[16]=c,e[17]=s,e[18]=n,e[19]=h,e[20]=g):g=e[20],g}function ss(r){const e=ee.c(2),{records:o}=r;if(o.length===0)return null;let l;return e[0]!==o?(l=t.jsx(js,{children:t.jsx(Ts,{records:o})}),e[0]=o,e[1]=l):l=e[1],l}function dn(r){const e=ee.c(16),{domain:o}=r,l=Ae(),a=o.status??"pending";let i;e[0]!==a||e[1]!==l?(i=l(a==="active"?"mainPanelTabs.hostingTab.statusActive":a==="action-required"?"mainPanelTabs.hostingTab.statusActionRequired":"mainPanelTabs.hostingTab.statusPending"),e[0]=a,e[1]=l,e[2]=i):i=e[2];const c=i;let m;e[3]!==o.detail||e[4]!==l?(m=o.detail==="zone-not-onboarded"?l("mainPanelTabs.hostingTab.detailZoneNotOnboarded"):void 0,e[3]=o.detail,e[4]=l,e[5]=m):m=e[5];const s=m,n=a==="active"?"success":a==="action-required"?"warning":"outline";let h;e[6]!==c||e[7]!==n?(h=t.jsx(Re,{variant:n,children:c}),e[6]=c,e[7]=n,e[8]=h):h=e[8];const g=h;if(!s)return g;let d;e[9]!==g?(d=t.jsx(ns,{asChild:!0,children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==s?(f=t.jsx(is,{className:"max-w-xs",children:s}),e[11]=s,e[12]=f):f=e[12];let u;return e[13]!==d||e[14]!==f?(u=t.jsxs(ls,{children:[d,f]}),e[13]=d,e[14]=f,e[15]=u):u=e[15],u}function fn(r){const e=ee.c(121),{base:o,orgSlug:l,site:a,domains:i,dnsTemplate:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(null),[N,C]=Z.useState(null);let P;e[0]!==l||e[1]!==h||e[2]!==a?(P=()=>h.invalidateQueries({queryKey:Ye.hostingDomains(l,a)}),e[0]=l,e[1]=h,e[2]=a,e[3]=P):P=e[3];const S=P;let y;e[4]!==o?(y=$=>at(`${o}/domains`,"PUT",$),e[4]=o,e[5]=y):y=e[5];let R;e[6]!==S||e[7]!==n?(R=()=>{S(),ce.success(n("mainPanelTabs.hostingTab.toastDomainSaved")),d(!1)},e[6]=S,e[7]=n,e[8]=R):R=e[8];let w;e[9]!==y||e[10]!==R?(w={mutationFn:y,onSuccess:R,onError:hn},e[9]=y,e[10]=R,e[11]=w):w=e[11];const j=lt(w);let T;e[12]!==o?(T=$=>at(`${o}/domains/${encodeURIComponent($)}`,"DELETE"),e[12]=o,e[13]=T):T=e[13];let V;e[14]!==S||e[15]!==n?(V=()=>{S(),ce.success(n("mainPanelTabs.hostingTab.toastDomainDeleted")),x(null)},e[14]=S,e[15]=n,e[16]=V):V=e[16];let q;e[17]!==T||e[18]!==V?(q={mutationFn:T,onSuccess:V,onError:un},e[17]=T,e[18]=V,e[19]=q):q=e[19];const F=lt(q);let v;e[20]!==f||e[21]!==j||e[22]!==n?(v=()=>{const $=f.trim().toLowerCase();if(!$){ce.error(n("mainPanelTabs.hostingTab.errorDomainHostRequired"));return}const se=Us($);if(se){ce.error(se);return}j.mutate({host:$})},e[20]=f,e[21]=j,e[22]=n,e[23]=v):v=e[23];const H=v;let A;if(e[24]!==c||e[25]!==f){let $;e[27]!==f?($=se=>({...se,name:f.trim().toLowerCase()||se.name}),e[27]=f,e[28]=$):$=e[28],A=c.map($),e[24]=c,e[25]=f,e[26]=A}else A=e[26];const Q=A;let _,W;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{u(""),d(!0)},W=t.jsx(Pt,{}),e[29]=_,e[30]=W):(_=e[29],W=e[30]);let J;e[31]!==n?(J=n("mainPanelTabs.hostingTab.addDomain"),e[31]=n,e[32]=J):J=e[32];let U;e[33]!==J?(U=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[W,J]}),e[33]=J,e[34]=U):U=e[34];const p=U;let I;e[35]!==n?(I=n("mainPanelTabs.hostingTab.domains"),e[35]=n,e[36]=I):I=e[36];const Y=i.length>0?p:void 0;let D;e[37]!==p||e[38]!==F.isPending||e[39]!==N||e[40]!==i||e[41]!==s||e[42]!==m||e[43]!==n?(D=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.domainsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(At,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDomains"),className:"py-10",buttonComponent:p})}):t.jsx(Qe,{children:i.map(($,se)=>{const Se=!$.canonical&&($.dns?.length??0)>0,je=N===$.host;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Se?t.jsx(Ut,{open:je,onClick:()=>C(je?null:$.host)}):t.jsx(At,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("span",{className:"truncate font-mono text-xs",children:$.host}),$.canonical&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.canonical")})]}),t.jsx(dn,{domain:$}),!$.canonical&&t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteDomain"),onClick:()=>x($.host),disabled:F.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]}),Se&&t.jsx(bs,{open:je,children:t.jsx(ss,{records:$.dns??[]})})]},`${$.host}-${se}`)})}),e[37]=p,e[38]=F.isPending,e[39]=N,e[40]=i,e[41]=s,e[42]=m,e[43]=n,e[44]=D):D=e[44];let G;e[45]!==n?(G=n("mainPanelTabs.hostingTab.addDomainTitle"),e[45]=n,e[46]=G):G=e[46];let O;e[47]!==G?(O=t.jsx(yt,{children:t.jsx(St,{children:G})}),e[47]=G,e[48]=O):O=e[48];let k;e[49]!==H?(k=$=>{$.preventDefault(),H()},e[49]=H,e[50]=k):k=e[50];let E;e[51]!==n?(E=n("mainPanelTabs.hostingTab.colHost"),e[51]=n,e[52]=E):E=e[52];let B;e[53]!==E?(B=t.jsx(Xe,{htmlFor:"domain-host",children:E}),e[53]=E,e[54]=B):B=e[54];let X;e[55]!==n?(X=n("mainPanelTabs.hostingTab.domainHostPlaceholder"),e[55]=n,e[56]=X):X=e[56];let te;e[57]===Symbol.for("react.memo_cache_sentinel")?(te=$=>u($.target.value),e[57]=te):te=e[57];let K;e[58]!==f||e[59]!==j.isPending||e[60]!==X?(K=t.jsx(it,{id:"domain-host",placeholder:X,value:f,onChange:te,className:"font-mono text-xs",autoComplete:"off",disabled:j.isPending}),e[58]=f,e[59]=j.isPending,e[60]=X,e[61]=K):K=e[61];let ne;e[62]!==B||e[63]!==K?(ne=t.jsxs("div",{className:"flex flex-col gap-2",children:[B,K]}),e[62]=B,e[63]=K,e[64]=ne):ne=e[64];let ie;e[65]!==f||e[66]!==Q?(ie=f.trim()&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(ss,{records:Q})}),e[65]=f,e[66]=Q,e[67]=ie):ie=e[67];let Pe;e[68]===Symbol.for("react.memo_cache_sentinel")?(Pe=()=>d(!1),e[68]=Pe):Pe=e[68];const Ce=j.isPending;let me;e[69]!==n?(me=n("mainPanelTabs.hostingTab.cancel"),e[69]=n,e[70]=me):me=e[70];let pe;e[71]!==j.isPending||e[72]!==me?(pe=t.jsx(Ie,{variant:"outline",type:"button",onClick:Pe,disabled:Ce,children:me}),e[71]=j.isPending,e[72]=me,e[73]=pe):pe=e[73];let le;e[74]!==f||e[75]!==j.isPending?(le=j.isPending||!f.trim(),e[74]=f,e[75]=j.isPending,e[76]=le):le=e[76];let ae;e[77]!==j.isPending||e[78]!==n?(ae=j.isPending?n("mainPanelTabs.hostingTab.saving"):n("mainPanelTabs.hostingTab.save"),e[77]=j.isPending,e[78]=n,e[79]=ae):ae=e[79];let de;e[80]!==le||e[81]!==ae?(de=t.jsx(Ie,{type:"submit",disabled:le,children:ae}),e[80]=le,e[81]=ae,e[82]=de):de=e[82];let De;e[83]!==pe||e[84]!==de?(De=t.jsxs(Nt,{children:[pe,de]}),e[83]=pe,e[84]=de,e[85]=De):De=e[85];let fe;e[86]!==k||e[87]!==ne||e[88]!==ie||e[89]!==De?(fe=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:k,children:[ne,ie,De]}),e[86]=k,e[87]=ne,e[88]=ie,e[89]=De,e[90]=fe):fe=e[90];let ue;e[91]!==O||e[92]!==fe?(ue=t.jsxs(Ct,{className:"sm:max-w-md",children:[O,fe]}),e[91]=O,e[92]=fe,e[93]=ue):ue=e[93];let oe;e[94]!==g||e[95]!==ue?(oe=t.jsx(Dt,{open:g,onOpenChange:d,children:ue}),e[94]=g,e[95]=ue,e[96]=oe):oe=e[96];const Te=b!=null;let he;e[97]===Symbol.for("react.memo_cache_sentinel")?(he=$=>{$||x(null)},e[97]=he):he=e[97];let xe;e[98]!==n?(xe=n("mainPanelTabs.hostingTab.confirmDeleteDomainTitle"),e[98]=n,e[99]=xe):xe=e[99];const ve=b??"";let ye;e[100]!==n||e[101]!==ve?(ye=n("mainPanelTabs.hostingTab.confirmDeleteDomainDescription",{host:ve}),e[100]=n,e[101]=ve,e[102]=ye):ye=e[102];let ge;e[103]!==n?(ge=n("mainPanelTabs.hostingTab.deleteDomain"),e[103]=n,e[104]=ge):ge=e[104];let re;e[105]!==F||e[106]!==b?(re=()=>{b&&F.mutate(b)},e[105]=F,e[106]=b,e[107]=re):re=e[107];let be;e[108]!==F.isPending||e[109]!==Te||e[110]!==xe||e[111]!==ye||e[112]!==ge||e[113]!==re?(be=t.jsx(wt,{open:Te,onOpenChange:he,title:xe,description:ye,confirmLabel:ge,pending:F.isPending,onConfirm:re}),e[108]=F.isPending,e[109]=Te,e[110]=xe,e[111]=ye,e[112]=ge,e[113]=re,e[114]=be):be=e[114];let we;return e[115]!==I||e[116]!==Y||e[117]!==D||e[118]!==oe||e[119]!==be?(we=t.jsxs(ut,{title:I,actions:Y,children:[D,oe,be]}),e[115]=I,e[116]=Y,e[117]=D,e[118]=oe,e[119]=be,e[120]=we):we=e[120],we}function un(r){return ce.error(rt(r))}function hn(r){return ce.error(rt(r))}function xn(r){const e=ee.c(24),{value:o,onChange:l,disabled:a,className:i}=r,c=Ae();let m;e[0]!==l?(m=N=>l(N==="build"?"build":"runtime"),e[0]=l,e[1]=m):m=e[1];let s;e[2]!==i?(s=xt("h-8",i),e[2]=i,e[3]=s):s=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Bt,{}),e[4]=n):n=e[4];let h;e[5]!==s?(h=t.jsx(Ot,{className:s,children:n}),e[5]=s,e[6]=h):h=e[6];let g;e[7]!==c?(g=c("mainPanelTabs.hostingTab.secretScopeRuntime"),e[7]=c,e[8]=g):g=e[8];let d;e[9]!==g?(d=t.jsx(ft,{value:"runtime",children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==c?(f=c("mainPanelTabs.hostingTab.secretScopeBuild"),e[11]=c,e[12]=f):f=e[12];let u;e[13]!==f?(u=t.jsx(ft,{value:"build",children:f}),e[13]=f,e[14]=u):u=e[14];let b;e[15]!==d||e[16]!==u?(b=t.jsxs(qt,{children:[d,u]}),e[15]=d,e[16]=u,e[17]=b):b=e[17];let x;return e[18]!==a||e[19]!==m||e[20]!==h||e[21]!==b||e[22]!==o?(x=t.jsxs(Mt,{value:o,onValueChange:m,disabled:a,children:[h,b]}),e[18]=a,e[19]=m,e[20]=h,e[21]=b,e[22]=o,e[23]=x):x=e[23],x}function gn(r){const e=ee.c(151),{base:o,orgSlug:l,site:a,envVars:i,codeVars:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(""),[N,C]=Z.useState("runtime"),[P,S]=Z.useState(null),[y,R]=Z.useState(""),[w,j]=Z.useState(null);let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=new Set,e[0]=T):T=e[0];const[V,q]=Z.useState(T);let F;e[1]===Symbol.for("react.memo_cache_sentinel")?(F=L=>{q(Ne=>{const We=new Set(Ne);return We.has(L)?We.delete(L):We.add(L),We})},e[1]=F):F=e[1];const v=F;let H;e[2]!==o?(H=L=>at(`${o}/env`,"PUT",{vars:L}),e[2]=o,e[3]=H):H=e[3];let A;e[4]!==l||e[5]!==h||e[6]!==a||e[7]!==n?(A=()=>{h.invalidateQueries({queryKey:Ye.hostingEnv(l,a)}),ce.success(n("mainPanelTabs.hostingTab.toastEnvSaved"))},e[4]=l,e[5]=h,e[6]=a,e[7]=n,e[8]=A):A=e[8];let Q;e[9]!==H||e[10]!==A?(Q={mutationFn:H,onSuccess:A,onError:pn},e[9]=H,e[10]=A,e[11]=Q):Q=e[11];const _=lt(Q);let W;e[12]!==f||e[13]!==N||e[14]!==b||e[15]!==_||e[16]!==i||e[17]!==n?(W=()=>{const L=f.trim();if(!L){ce.error(n("mainPanelTabs.hostingTab.errorEnvNameRequired"));return}if(i.some(Ne=>Lt(Ne,{name:L,scope:N}))){ce.error(n("mainPanelTabs.hostingTab.errorEnvNameDuplicate"));return}_.mutate([...i,{name:L,value:b,scope:N}],{onSuccess:()=>{d(!1),u(""),x(""),C("runtime")}})},e[12]=f,e[13]=N,e[14]=b,e[15]=_,e[16]=i,e[17]=n,e[18]=W):W=e[18];const J=W;let U;e[19]!==y||e[20]!==_||e[21]!==i?(U=L=>{_.mutate(i.map(Ne=>Lt(Ne,L)?{name:L.name,value:y,scope:L.scope}:Ne),{onSuccess:()=>S(null)})},e[19]=y,e[20]=_,e[21]=i,e[22]=U):U=e[22];const p=U;let I;e[23]!==w||e[24]!==_||e[25]!==i?(I=()=>{w&&_.mutate(i.filter(L=>!Lt(L,w)),{onSuccess:()=>j(null)})},e[23]=w,e[24]=_,e[25]=i,e[26]=I):I=e[26];const Y=I,D=_.isPending;let G;e[27]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{u(""),x(""),C("runtime")},e[27]=G):G=e[27];const O=G;let k,E;e[28]===Symbol.for("react.memo_cache_sentinel")?(k=()=>d(!0),E=t.jsx(Pt,{}),e[28]=k,e[29]=E):(k=e[28],E=e[29]);let B;e[30]!==n?(B=n("mainPanelTabs.hostingTab.addVariable"),e[30]=n,e[31]=B):B=e[31];let X;e[32]!==B?(X=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:k,children:[E,B]}),e[32]=B,e[33]=X):X=e[33];const te=X;let K;e[34]!==n?(K=n("mainPanelTabs.hostingTab.env"),e[34]=n,e[35]=K):K=e[35];const ne=i.length>0||c.length>0?te:void 0;let ie;e[36]!==te||e[37]!==c||e[38]!==y||e[39]!==P?.name||e[40]!==P?.scope||e[41]!==i||e[42]!==s||e[43]!==p||e[44]!==m||e[45]!==D||e[46]!==V||e[47]!==n?(ie=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.envError")})}):i.length===0&&c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Yt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noEnv"),className:"py-10",buttonComponent:te})}):t.jsxs(Qe,{children:[i.map(L=>{const Ne=L.scope==="build"?"build":"runtime",We=`${L.name}:${Ne}`,tt=P?.name===L.name&&P?.scope===Ne,st=V.has(We);return t.jsxs(pt,{children:[t.jsxs("div",{className:"flex min-w-0 flex-1 basis-0 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(ps,{scope:Ne})}),t.jsx("span",{className:"truncate font-mono text-xs",children:L.name})]}),t.jsx("div",{className:"flex min-w-0 flex-1 basis-0 items-center justify-end gap-2",children:tt?t.jsxs(t.Fragment,{children:[t.jsx(it,{value:y,onChange:z=>R(z.target.value),onKeyDown:z=>{z.key==="Enter"&&p({name:L.name,scope:Ne}),z.key==="Escape"&&S(null)},autoFocus:!0,className:"h-8 font-mono text-xs"}),t.jsx(Ie,{size:"sm",onClick:()=>p({name:L.name,scope:Ne}),disabled:D,children:n("mainPanelTabs.hostingTab.save")}),t.jsx(Ie,{size:"sm",variant:"ghost",onClick:()=>S(null),disabled:D,children:n("mainPanelTabs.hostingTab.cancel")})]}):t.jsxs(t.Fragment,{children:[t.jsx(et,{label:n(st?"mainPanelTabs.hostingTab.hideValue":"mainPanelTabs.hostingTab.showValue"),onClick:()=>v(We),className:"text-muted-foreground",children:st?t.jsx(Os,{}):t.jsx(qs,{})}),st?t.jsx("button",{type:"button",onClick:()=>{S({name:L.name,scope:Ne}),R(L.value)},title:n("mainPanelTabs.hostingTab.editValue"),className:"min-w-0 truncate rounded px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground hover:bg-muted hover:text-foreground",children:L.value||"—"}):t.jsx("span",{className:"min-w-0 truncate px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground/60",children:L.value?"••••••••••":"—"})]})}),t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteVariable"),onClick:()=>j({name:L.name,scope:Ne}),disabled:D,className:"text-muted-foreground",children:t.jsx(vt,{})})]},We)}),c.length>0&&t.jsxs(Ht,{children:[t.jsx(Bs,{asChild:!0,children:t.jsxs("button",{type:"button",className:"group flex w-full items-center gap-2 px-4 py-2.5 text-left text-xs text-muted-foreground hover:bg-muted/40",children:[t.jsx(xs,{className:"size-4 transition-transform duration-200 group-data-[state=open]:rotate-90 motion-reduce:transition-none"}),t.jsx(Yt,{className:"size-4"}),n("mainPanelTabs.hostingTab.codeVarsToggle",{count:String(c.length)})]})}),t.jsx(Vt,{children:t.jsx("div",{className:"divide-y divide-border/60 border-t border-border bg-muted/30",children:c.map(bn)})})]})]}),e[36]=te,e[37]=c,e[38]=y,e[39]=P?.name,e[40]=P?.scope,e[41]=i,e[42]=s,e[43]=p,e[44]=m,e[45]=D,e[46]=V,e[47]=n,e[48]=ie):ie=e[48];let Pe;e[49]===Symbol.for("react.memo_cache_sentinel")?(Pe=L=>{d(L),L||O()},e[49]=Pe):Pe=e[49];let Ce;e[50]!==n?(Ce=n("mainPanelTabs.hostingTab.addVariable"),e[50]=n,e[51]=Ce):Ce=e[51];let me;e[52]!==Ce?(me=t.jsx(yt,{children:t.jsx(St,{children:Ce})}),e[52]=Ce,e[53]=me):me=e[53];let pe;e[54]!==J?(pe=L=>{L.preventDefault(),J()},e[54]=J,e[55]=pe):pe=e[55];let le;e[56]!==n?(le=n("mainPanelTabs.hostingTab.colName"),e[56]=n,e[57]=le):le=e[57];let ae;e[58]!==le?(ae=t.jsx(Xe,{htmlFor:"env-name",children:le}),e[58]=le,e[59]=ae):ae=e[59];let de;e[60]!==n?(de=n("mainPanelTabs.hostingTab.envNamePlaceholder"),e[60]=n,e[61]=de):de=e[61];let De;e[62]===Symbol.for("react.memo_cache_sentinel")?(De=L=>u(L.target.value),e[62]=De):De=e[62];let fe;e[63]!==f||e[64]!==D||e[65]!==de?(fe=t.jsx(it,{id:"env-name",placeholder:de,value:f,onChange:De,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[63]=f,e[64]=D,e[65]=de,e[66]=fe):fe=e[66];let ue;e[67]!==ae||e[68]!==fe?(ue=t.jsxs("div",{className:"flex flex-col gap-2",children:[ae,fe]}),e[67]=ae,e[68]=fe,e[69]=ue):ue=e[69];let oe;e[70]!==n?(oe=n("mainPanelTabs.hostingTab.colValue"),e[70]=n,e[71]=oe):oe=e[71];let Te;e[72]!==oe?(Te=t.jsx(Xe,{htmlFor:"env-value",children:oe}),e[72]=oe,e[73]=Te):Te=e[73];let he;e[74]!==n?(he=n("mainPanelTabs.hostingTab.envValuePlaceholder"),e[74]=n,e[75]=he):he=e[75];let xe;e[76]===Symbol.for("react.memo_cache_sentinel")?(xe=L=>x(L.target.value),e[76]=xe):xe=e[76];let ve;e[77]!==b||e[78]!==D||e[79]!==he?(ve=t.jsx(it,{id:"env-value",placeholder:he,value:b,onChange:xe,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[77]=b,e[78]=D,e[79]=he,e[80]=ve):ve=e[80];let ye;e[81]!==Te||e[82]!==ve?(ye=t.jsxs("div",{className:"flex flex-col gap-2",children:[Te,ve]}),e[81]=Te,e[82]=ve,e[83]=ye):ye=e[83];let ge;e[84]!==n?(ge=n("mainPanelTabs.hostingTab.secretScope"),e[84]=n,e[85]=ge):ge=e[85];let re;e[86]!==ge?(re=t.jsx(Xe,{children:ge}),e[86]=ge,e[87]=re):re=e[87];let be;e[88]!==N||e[89]!==D?(be=t.jsx(xn,{value:N,onChange:C,disabled:D,className:"w-full"}),e[88]=N,e[89]=D,e[90]=be):be=e[90];let we;e[91]!==N||e[92]!==n?(we=n(N==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[91]=N,e[92]=n,e[93]=we):we=e[93];let $;e[94]!==we?($=t.jsx("p",{className:"text-xs text-muted-foreground",children:we}),e[94]=we,e[95]=$):$=e[95];let se;e[96]!==re||e[97]!==be||e[98]!==$?(se=t.jsxs("div",{className:"flex flex-col gap-2",children:[re,be,$]}),e[96]=re,e[97]=be,e[98]=$,e[99]=se):se=e[99];let Se;e[100]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{d(!1),O()},e[100]=Se):Se=e[100];let je;e[101]!==n?(je=n("mainPanelTabs.hostingTab.cancel"),e[101]=n,e[102]=je):je=e[102];let $e;e[103]!==D||e[104]!==je?($e=t.jsx(Ie,{variant:"outline",type:"button",onClick:Se,disabled:D,children:je}),e[103]=D,e[104]=je,e[105]=$e):$e=e[105];let ze;e[106]!==f||e[107]!==D?(ze=D||!f.trim(),e[106]=f,e[107]=D,e[108]=ze):ze=e[108];let Ke;e[109]!==D||e[110]!==n?(Ke=n(D?"mainPanelTabs.hostingTab.saving":"mainPanelTabs.hostingTab.add"),e[109]=D,e[110]=n,e[111]=Ke):Ke=e[111];let Le;e[112]!==ze||e[113]!==Ke?(Le=t.jsx(Ie,{type:"submit",disabled:ze,children:Ke}),e[112]=ze,e[113]=Ke,e[114]=Le):Le=e[114];let _e;e[115]!==$e||e[116]!==Le?(_e=t.jsxs(Nt,{children:[$e,Le]}),e[115]=$e,e[116]=Le,e[117]=_e):_e=e[117];let Be;e[118]!==pe||e[119]!==ue||e[120]!==ye||e[121]!==se||e[122]!==_e?(Be=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:pe,children:[ue,ye,se,_e]}),e[118]=pe,e[119]=ue,e[120]=ye,e[121]=se,e[122]=_e,e[123]=Be):Be=e[123];let Ve;e[124]!==me||e[125]!==Be?(Ve=t.jsxs(Ct,{className:"sm:max-w-md",children:[me,Be]}),e[124]=me,e[125]=Be,e[126]=Ve):Ve=e[126];let ke;e[127]!==g||e[128]!==Ve?(ke=t.jsx(Dt,{open:g,onOpenChange:Pe,children:Ve}),e[127]=g,e[128]=Ve,e[129]=ke):ke=e[129];const Je=w!=null;let He;e[130]===Symbol.for("react.memo_cache_sentinel")?(He=L=>{L||j(null)},e[130]=He):He=e[130];let Ee;e[131]!==n?(Ee=n("mainPanelTabs.hostingTab.confirmDeleteVariableTitle"),e[131]=n,e[132]=Ee):Ee=e[132];const Oe=w?.name??"";let qe;e[133]!==n||e[134]!==Oe?(qe=n("mainPanelTabs.hostingTab.confirmDeleteVariableDescription",{name:Oe}),e[133]=n,e[134]=Oe,e[135]=qe):qe=e[135];let Ue;e[136]!==n?(Ue=n("mainPanelTabs.hostingTab.deleteVariable"),e[136]=n,e[137]=Ue):Ue=e[137];let M;e[138]!==Y||e[139]!==D||e[140]!==Je||e[141]!==Ee||e[142]!==qe||e[143]!==Ue?(M=t.jsx(wt,{open:Je,onOpenChange:He,title:Ee,description:qe,confirmLabel:Ue,pending:D,onConfirm:Y}),e[138]=Y,e[139]=D,e[140]=Je,e[141]=Ee,e[142]=qe,e[143]=Ue,e[144]=M):M=e[144];let Ge;return e[145]!==K||e[146]!==ne||e[147]!==ie||e[148]!==ke||e[149]!==M?(Ge=t.jsxs(ut,{title:K,actions:ne,children:[ie,ke,M]}),e[145]=K,e[146]=ne,e[147]=ie,e[148]=ke,e[149]=M,e[150]=Ge):Ge=e[150],Ge}function bn(r){return t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 font-mono text-xs",children:[t.jsx("span",{className:"flex-1 basis-0 truncate",children:r.name}),t.jsx("span",{className:"flex-1 basis-0 truncate text-right text-muted-foreground",children:r.value})]},r.name)}function pn(r){return ce.error(rt(r))}function Tn(r){const e=ee.c(6),{type:o}=r,l=Ae(),a=o==="permanent"?"secondary":"outline";let i;e[0]!==l||e[1]!==o?(i=l(o==="permanent"?"mainPanelTabs.hostingTab.permanent":"mainPanelTabs.hostingTab.temporary"),e[0]=l,e[1]=o,e[2]=i):i=e[2];let c;return e[3]!==a||e[4]!==i?(c=t.jsx(Re,{variant:a,children:i}),e[3]=a,e[4]=i,e[5]=c):c=e[5],c}function jn(r){const e=ee.c(163),{base:o,orgSlug:l,site:a,redirects:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(null),[u,b]=Z.useState(""),[x,N]=Z.useState(""),[C,P]=Z.useState("permanent"),[S,y]=Z.useState(null),[R,w]=Z.useState(null);let j;e[0]!==l||e[1]!==n||e[2]!==a?(j=()=>n.invalidateQueries({queryKey:Ye.hostingRedirects(l,a)}),e[0]=l,e[1]=n,e[2]=a,e[3]=j):j=e[3];const T=j;let V;e[4]!==o?(V=z=>at(`${o}/redirects`,"PUT",z),e[4]=o,e[5]=V):V=e[5];let q;e[6]!==T||e[7]!==s?(q=()=>{T(),ce.success(s("mainPanelTabs.hostingTab.toastRedirectSaved")),g(!1)},e[6]=T,e[7]=s,e[8]=q):q=e[8];let F;e[9]!==V||e[10]!==q?(F={mutationFn:V,onSuccess:q,onError:vn},e[9]=V,e[10]=q,e[11]=F):F=e[11];const v=lt(F);let H;e[12]!==o?(H=z=>at(`${o}/redirects/${encodeURIComponent(z)}`,"DELETE"),e[12]=o,e[13]=H):H=e[13];let A;e[14]!==T||e[15]!==s?(A=()=>{T(),ce.success(s("mainPanelTabs.hostingTab.toastRedirectDeleted")),y(null)},e[14]=T,e[15]=s,e[16]=A):A=e[16];let Q;e[17]!==H||e[18]!==A?(Q={mutationFn:H,onSuccess:A,onError:Pn},e[17]=H,e[18]=A,e[19]=Q):Q=e[19];const _=lt(Q);let W;e[20]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{f(null),b(""),N(""),P("permanent"),g(!0)},e[20]=W):W=e[20];const J=W;let U;e[21]===Symbol.for("react.memo_cache_sentinel")?(U=z=>{f(z.from),b(z.from),N(z.to),P(z.type==="temporary"?"temporary":"permanent"),g(!0)},e[21]=U):U=e[21];const p=U;let I;e[22]!==u||e[23]!==x||e[24]!==C||e[25]!==v||e[26]!==s?(I=()=>{const z=u.trim(),Tt=x.trim();if(!z||!Tt){ce.error(s("mainPanelTabs.hostingTab.errorRedirectFieldsRequired"));return}v.mutate({from:z,to:Tt,type:C})},e[22]=u,e[23]=x,e[24]=C,e[25]=v,e[26]=s,e[27]=I):I=e[27];const Y=I;let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(Pt,{}),e[28]=D):D=e[28];let G;e[29]!==s?(G=s("mainPanelTabs.hostingTab.addRedirect"),e[29]=s,e[30]=G):G=e[30];let O;e[31]!==G?(O=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:J,children:[D,G]}),e[31]=G,e[32]=O):O=e[32];const k=O;let E;e[33]!==s?(E=s("mainPanelTabs.hostingTab.redirects"),e[33]=s,e[34]=E):E=e[34];const B=i.length>0?k:void 0;let X;e[35]!==k||e[36]!==_.isPending||e[37]!==R||e[38]!==m||e[39]!==c||e[40]!==v.isPending||e[41]!==i||e[42]!==s?(X=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.redirectsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Gt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noRedirects"),className:"py-10",buttonComponent:k})}):t.jsx(Qe,{children:i.map((z,Tt)=>{const Kt=es(z.from),$t=R===z.from;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Kt?t.jsx(Ut,{open:$t,onClick:()=>w($t?null:z.from)}):t.jsx(Gt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 font-mono text-xs",children:[t.jsx("span",{className:"truncate",children:z.from}),t.jsx(Ms,{className:"size-3.5 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"truncate text-muted-foreground",children:z.to})]}),t.jsx(Tn,{type:z.type}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.editRedirect"),onClick:()=>p(z),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(Es,{})}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteRedirect"),onClick:()=>y(z.from),disabled:_.isPending,className:"-ml-1 text-muted-foreground",children:t.jsx(vt,{})})]}),Kt&&t.jsx(bs,{open:$t,children:t.jsx(ts,{from:z.from,source:z.source})})]},z.id??`${z.from}-${Tt}`)})}),e[35]=k,e[36]=_.isPending,e[37]=R,e[38]=m,e[39]=c,e[40]=v.isPending,e[41]=i,e[42]=s,e[43]=X):X=e[43];let te;e[44]!==d||e[45]!==s?(te=d!=null?s("mainPanelTabs.hostingTab.editRedirectTitle"):s("mainPanelTabs.hostingTab.addRedirectTitle"),e[44]=d,e[45]=s,e[46]=te):te=e[46];let K;e[47]!==te?(K=t.jsx(yt,{children:t.jsx(St,{children:te})}),e[47]=te,e[48]=K):K=e[48];let ne;e[49]!==Y?(ne=z=>{z.preventDefault(),Y()},e[49]=Y,e[50]=ne):ne=e[50];let ie;e[51]!==s?(ie=s("mainPanelTabs.hostingTab.colFrom"),e[51]=s,e[52]=ie):ie=e[52];let Pe;e[53]!==ie?(Pe=t.jsx(Xe,{htmlFor:"redirect-from",children:ie}),e[53]=ie,e[54]=Pe):Pe=e[54];let Ce;e[55]!==s?(Ce=s("mainPanelTabs.hostingTab.redirectFromPlaceholder"),e[55]=s,e[56]=Ce):Ce=e[56];let me;e[57]===Symbol.for("react.memo_cache_sentinel")?(me=z=>b(z.target.value),e[57]=me):me=e[57];const pe=d!=null||v.isPending;let le;e[58]!==u||e[59]!==Ce||e[60]!==pe?(le=t.jsx(it,{id:"redirect-from",placeholder:Ce,value:u,onChange:me,className:"font-mono text-xs",disabled:pe}),e[58]=u,e[59]=Ce,e[60]=pe,e[61]=le):le=e[61];let ae;e[62]!==Pe||e[63]!==le?(ae=t.jsxs("div",{className:"flex flex-col gap-2",children:[Pe,le]}),e[62]=Pe,e[63]=le,e[64]=ae):ae=e[64];let de;e[65]!==s?(de=s("mainPanelTabs.hostingTab.colTo"),e[65]=s,e[66]=de):de=e[66];let De;e[67]!==de?(De=t.jsx(Xe,{htmlFor:"redirect-to",children:de}),e[67]=de,e[68]=De):De=e[68];let fe;e[69]!==s?(fe=s("mainPanelTabs.hostingTab.redirectToPlaceholder"),e[69]=s,e[70]=fe):fe=e[70];let ue;e[71]===Symbol.for("react.memo_cache_sentinel")?(ue=z=>N(z.target.value),e[71]=ue):ue=e[71];let oe;e[72]!==x||e[73]!==v.isPending||e[74]!==fe?(oe=t.jsx(it,{id:"redirect-to",placeholder:fe,value:x,onChange:ue,className:"font-mono text-xs",disabled:v.isPending}),e[72]=x,e[73]=v.isPending,e[74]=fe,e[75]=oe):oe=e[75];let Te;e[76]!==De||e[77]!==oe?(Te=t.jsxs("div",{className:"flex flex-col gap-2",children:[De,oe]}),e[76]=De,e[77]=oe,e[78]=Te):Te=e[78];let he;e[79]!==s?(he=s("mainPanelTabs.hostingTab.colType"),e[79]=s,e[80]=he):he=e[80];let xe;e[81]!==he?(xe=t.jsx(Xe,{children:he}),e[81]=he,e[82]=xe):xe=e[82];let ve;e[83]===Symbol.for("react.memo_cache_sentinel")?(ve=z=>P(z==="temporary"?"temporary":"permanent"),e[83]=ve):ve=e[83];const ye=v.isPending;let ge;e[84]===Symbol.for("react.memo_cache_sentinel")?(ge=t.jsx(Ot,{className:"w-full",children:t.jsx(Bt,{})}),e[84]=ge):ge=e[84];let re;e[85]!==s?(re=s("mainPanelTabs.hostingTab.permanent"),e[85]=s,e[86]=re):re=e[86];let be;e[87]!==re?(be=t.jsx(ft,{value:"permanent",children:re}),e[87]=re,e[88]=be):be=e[88];let we;e[89]!==s?(we=s("mainPanelTabs.hostingTab.temporary"),e[89]=s,e[90]=we):we=e[90];let $;e[91]!==we?($=t.jsx(ft,{value:"temporary",children:we}),e[91]=we,e[92]=$):$=e[92];let se;e[93]!==be||e[94]!==$?(se=t.jsxs(qt,{children:[be,$]}),e[93]=be,e[94]=$,e[95]=se):se=e[95];let Se;e[96]!==C||e[97]!==v.isPending||e[98]!==se?(Se=t.jsxs(Mt,{value:C,onValueChange:ve,disabled:ye,children:[ge,se]}),e[96]=C,e[97]=v.isPending,e[98]=se,e[99]=Se):Se=e[99];let je;e[100]!==xe||e[101]!==Se?(je=t.jsxs("div",{className:"flex flex-col gap-2",children:[xe,Se]}),e[100]=xe,e[101]=Se,e[102]=je):je=e[102];let $e;e[103]!==d||e[104]!==u||e[105]!==i?($e=es(u)&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(ts,{from:u,source:i.find(z=>z.from===d)?.source})}),e[103]=d,e[104]=u,e[105]=i,e[106]=$e):$e=e[106];let ze;e[107]===Symbol.for("react.memo_cache_sentinel")?(ze=()=>g(!1),e[107]=ze):ze=e[107];const Ke=v.isPending;let Le;e[108]!==s?(Le=s("mainPanelTabs.hostingTab.cancel"),e[108]=s,e[109]=Le):Le=e[109];let _e;e[110]!==v.isPending||e[111]!==Le?(_e=t.jsx(Ie,{variant:"outline",type:"button",onClick:ze,disabled:Ke,children:Le}),e[110]=v.isPending,e[111]=Le,e[112]=_e):_e=e[112];let Be;e[113]!==u||e[114]!==x||e[115]!==v.isPending?(Be=v.isPending||!u.trim()||!x.trim(),e[113]=u,e[114]=x,e[115]=v.isPending,e[116]=Be):Be=e[116];let Ve;e[117]!==v.isPending||e[118]!==s?(Ve=v.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.save"),e[117]=v.isPending,e[118]=s,e[119]=Ve):Ve=e[119];let ke;e[120]!==Be||e[121]!==Ve?(ke=t.jsx(Ie,{type:"submit",disabled:Be,children:Ve}),e[120]=Be,e[121]=Ve,e[122]=ke):ke=e[122];let Je;e[123]!==_e||e[124]!==ke?(Je=t.jsxs(Nt,{children:[_e,ke]}),e[123]=_e,e[124]=ke,e[125]=Je):Je=e[125];let He;e[126]!==ne||e[127]!==ae||e[128]!==Te||e[129]!==je||e[130]!==$e||e[131]!==Je?(He=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:ne,children:[ae,Te,je,$e,Je]}),e[126]=ne,e[127]=ae,e[128]=Te,e[129]=je,e[130]=$e,e[131]=Je,e[132]=He):He=e[132];let Ee;e[133]!==K||e[134]!==He?(Ee=t.jsxs(Ct,{className:"sm:max-w-md",children:[K,He]}),e[133]=K,e[134]=He,e[135]=Ee):Ee=e[135];let Oe;e[136]!==h||e[137]!==Ee?(Oe=t.jsx(Dt,{open:h,onOpenChange:g,children:Ee}),e[136]=h,e[137]=Ee,e[138]=Oe):Oe=e[138];const qe=S!=null;let Ue;e[139]===Symbol.for("react.memo_cache_sentinel")?(Ue=z=>{z||y(null)},e[139]=Ue):Ue=e[139];let M;e[140]!==s?(M=s("mainPanelTabs.hostingTab.confirmDeleteRedirectTitle"),e[140]=s,e[141]=M):M=e[141];const Ge=S??"";let L;e[142]!==s||e[143]!==Ge?(L=s("mainPanelTabs.hostingTab.confirmDeleteRedirectDescription",{from:Ge}),e[142]=s,e[143]=Ge,e[144]=L):L=e[144];let Ne;e[145]!==s?(Ne=s("mainPanelTabs.hostingTab.deleteRedirect"),e[145]=s,e[146]=Ne):Ne=e[146];let We;e[147]!==_||e[148]!==S?(We=()=>{S&&_.mutate(S)},e[147]=_,e[148]=S,e[149]=We):We=e[149];let tt;e[150]!==_.isPending||e[151]!==qe||e[152]!==M||e[153]!==L||e[154]!==Ne||e[155]!==We?(tt=t.jsx(wt,{open:qe,onOpenChange:Ue,title:M,description:L,confirmLabel:Ne,pending:_.isPending,onConfirm:We}),e[150]=_.isPending,e[151]=qe,e[152]=M,e[153]=L,e[154]=Ne,e[155]=We,e[156]=tt):tt=e[156];let st;return e[157]!==E||e[158]!==B||e[159]!==X||e[160]!==Oe||e[161]!==tt?(st=t.jsxs(ut,{title:E,actions:B,children:[X,Oe,tt]}),e[157]=E,e[158]=B,e[159]=X,e[160]=Oe,e[161]=tt,e[162]=st):st=e[162],st}function Pn(r){return ce.error(rt(r))}function vn(r){return ce.error(rt(r))}function yn(r){const e=ee.c(160),{base:o,orgSlug:l,site:a,secrets:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(""),[u,b]=Z.useState(""),[x,N]=Z.useState("runtime"),[C,P]=Z.useState(null);let S;e[0]!==l||e[1]!==n||e[2]!==a?(S=()=>n.invalidateQueries({queryKey:Ye.hostingSecrets(l,a)}),e[0]=l,e[1]=n,e[2]=a,e[3]=S):S=e[3];const y=S;let R;e[4]!==o?(R=M=>at(`${o}/secrets`,"PUT",M),e[4]=o,e[5]=R):R=e[5];let w;e[6]!==y||e[7]!==s?(w=()=>{y(),ce.success(s("mainPanelTabs.hostingTab.toastSecretSaved")),g(!1),f(""),b(""),N("runtime")},e[6]=y,e[7]=s,e[8]=w):w=e[8];let j;e[9]!==R||e[10]!==w?(j={mutationFn:R,onSuccess:w,onError:Nn},e[9]=R,e[10]=w,e[11]=j):j=e[11];const T=lt(j);let V;e[12]!==o?(V=M=>at(`${o}/secrets/${encodeURIComponent(M.name)}?scope=${M.scope}`,"DELETE"),e[12]=o,e[13]=V):V=e[13];let q;e[14]!==y||e[15]!==s?(q=()=>{y(),ce.success(s("mainPanelTabs.hostingTab.toastSecretDeleted")),P(null)},e[14]=y,e[15]=s,e[16]=q):q=e[16];let F;e[17]!==V||e[18]!==q?(F={mutationFn:V,onSuccess:q,onError:Sn},e[17]=V,e[18]=q,e[19]=F):F=e[19];const v=lt(F);let H;e[20]!==d||e[21]!==x||e[22]!==u||e[23]!==T||e[24]!==s?(H=()=>{const M=d.trim();if(!M){ce.error(s("mainPanelTabs.hostingTab.errorSecretNameRequired"));return}if(!u){ce.error(s("mainPanelTabs.hostingTab.errorSecretValueRequired"));return}T.mutate({name:M,value:u,scope:x})},e[20]=d,e[21]=x,e[22]=u,e[23]=T,e[24]=s,e[25]=H):H=e[25];const A=H;let Q,_;e[26]===Symbol.for("react.memo_cache_sentinel")?(_=()=>g(!0),Q=t.jsx(Pt,{}),e[26]=Q,e[27]=_):(Q=e[26],_=e[27]);let W;e[28]!==s?(W=s("mainPanelTabs.hostingTab.addSecret"),e[28]=s,e[29]=W):W=e[29];let J;e[30]!==W?(J=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[Q,W]}),e[30]=W,e[31]=J):J=e[31];const U=J;let p;e[32]!==s?(p=s("mainPanelTabs.hostingTab.secrets"),e[32]=s,e[33]=p):p=e[33];const I=i.length>0?U:void 0;let Y;e[34]!==U||e[35]!==v.isPending||e[36]!==m||e[37]!==c||e[38]!==i||e[39]!==s?(Y=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.secretsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Wt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noSecrets"),className:"py-10",buttonComponent:U})}):t.jsx(Qe,{children:i.map(M=>{const Ge=M.scope==="build"?"build":"runtime";return t.jsxs(pt,{children:[t.jsx(Wt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(ps,{scope:Ge})}),t.jsx("span",{className:"truncate font-mono text-xs",children:M.name}),M.origin==="worker"&&t.jsx(Re,{variant:"secondary",children:s("mainPanelTabs.hostingTab.secretOnWorker")})]}),t.jsx("span",{className:"font-mono text-xs text-muted-foreground/60",children:s("mainPanelTabs.hostingTab.secretValueHidden")}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteSecret"),onClick:()=>P({name:M.name,scope:Ge}),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]},`${M.name}:${Ge}`)})}),e[34]=U,e[35]=v.isPending,e[36]=m,e[37]=c,e[38]=i,e[39]=s,e[40]=Y):Y=e[40];let D;e[41]!==s?(D=s("mainPanelTabs.hostingTab.addSecretTitle"),e[41]=s,e[42]=D):D=e[42];let G;e[43]!==D?(G=t.jsx(yt,{children:t.jsx(St,{children:D})}),e[43]=D,e[44]=G):G=e[44];let O;e[45]!==A?(O=M=>{M.preventDefault(),A()},e[45]=A,e[46]=O):O=e[46];let k;e[47]!==s?(k=s("mainPanelTabs.hostingTab.colName"),e[47]=s,e[48]=k):k=e[48];let E;e[49]!==k?(E=t.jsx(Xe,{htmlFor:"secret-name",children:k}),e[49]=k,e[50]=E):E=e[50];let B;e[51]!==s?(B=s("mainPanelTabs.hostingTab.secretNamePlaceholder"),e[51]=s,e[52]=B):B=e[52];let X;e[53]===Symbol.for("react.memo_cache_sentinel")?(X=M=>f(M.target.value),e[53]=X):X=e[53];let te;e[54]!==d||e[55]!==T.isPending||e[56]!==B?(te=t.jsx(it,{id:"secret-name",placeholder:B,value:d,onChange:X,className:"font-mono text-xs",autoComplete:"off",disabled:T.isPending}),e[54]=d,e[55]=T.isPending,e[56]=B,e[57]=te):te=e[57];let K;e[58]!==E||e[59]!==te?(K=t.jsxs("div",{className:"flex flex-col gap-2",children:[E,te]}),e[58]=E,e[59]=te,e[60]=K):K=e[60];let ne;e[61]!==s?(ne=s("mainPanelTabs.hostingTab.colValue"),e[61]=s,e[62]=ne):ne=e[62];let ie;e[63]!==ne?(ie=t.jsx(Xe,{htmlFor:"secret-value",children:ne}),e[63]=ne,e[64]=ie):ie=e[64];let Pe;e[65]!==s?(Pe=s("mainPanelTabs.hostingTab.secretValuePlaceholder"),e[65]=s,e[66]=Pe):Pe=e[66];let Ce;e[67]===Symbol.for("react.memo_cache_sentinel")?(Ce=M=>b(M.target.value),e[67]=Ce):Ce=e[67];let me;e[68]!==u||e[69]!==T.isPending||e[70]!==Pe?(me=t.jsx(it,{id:"secret-value",type:"password",placeholder:Pe,value:u,onChange:Ce,className:"font-mono text-xs",autoComplete:"new-password",disabled:T.isPending}),e[68]=u,e[69]=T.isPending,e[70]=Pe,e[71]=me):me=e[71];let pe;e[72]!==ie||e[73]!==me?(pe=t.jsxs("div",{className:"flex flex-col gap-2",children:[ie,me]}),e[72]=ie,e[73]=me,e[74]=pe):pe=e[74];let le;e[75]!==s?(le=s("mainPanelTabs.hostingTab.secretScope"),e[75]=s,e[76]=le):le=e[76];let ae;e[77]!==le?(ae=t.jsx(Xe,{children:le}),e[77]=le,e[78]=ae):ae=e[78];let de;e[79]===Symbol.for("react.memo_cache_sentinel")?(de=M=>N(M==="build"?"build":"runtime"),e[79]=de):de=e[79];const De=T.isPending;let fe;e[80]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(Ot,{className:"w-full",children:t.jsx(Bt,{})}),e[80]=fe):fe=e[80];let ue;e[81]!==s?(ue=s("mainPanelTabs.hostingTab.secretScopeRuntime"),e[81]=s,e[82]=ue):ue=e[82];let oe;e[83]!==ue?(oe=t.jsx(ft,{value:"runtime",children:ue}),e[83]=ue,e[84]=oe):oe=e[84];let Te;e[85]!==s?(Te=s("mainPanelTabs.hostingTab.secretScopeBuild"),e[85]=s,e[86]=Te):Te=e[86];let he;e[87]!==Te?(he=t.jsx(ft,{value:"build",children:Te}),e[87]=Te,e[88]=he):he=e[88];let xe;e[89]!==oe||e[90]!==he?(xe=t.jsxs(qt,{children:[oe,he]}),e[89]=oe,e[90]=he,e[91]=xe):xe=e[91];let ve;e[92]!==x||e[93]!==T.isPending||e[94]!==xe?(ve=t.jsxs(Mt,{value:x,onValueChange:de,disabled:De,children:[fe,xe]}),e[92]=x,e[93]=T.isPending,e[94]=xe,e[95]=ve):ve=e[95];let ye;e[96]!==x||e[97]!==s?(ye=s(x==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[96]=x,e[97]=s,e[98]=ye):ye=e[98];let ge;e[99]!==ye?(ge=t.jsx("p",{className:"text-xs text-muted-foreground",children:ye}),e[99]=ye,e[100]=ge):ge=e[100];let re;e[101]!==ae||e[102]!==ve||e[103]!==ge?(re=t.jsxs("div",{className:"flex flex-col gap-2",children:[ae,ve,ge]}),e[101]=ae,e[102]=ve,e[103]=ge,e[104]=re):re=e[104];let be;e[105]===Symbol.for("react.memo_cache_sentinel")?(be=()=>g(!1),e[105]=be):be=e[105];const we=T.isPending;let $;e[106]!==s?($=s("mainPanelTabs.hostingTab.cancel"),e[106]=s,e[107]=$):$=e[107];let se;e[108]!==T.isPending||e[109]!==$?(se=t.jsx(Ie,{variant:"outline",type:"button",onClick:be,disabled:we,children:$}),e[108]=T.isPending,e[109]=$,e[110]=se):se=e[110];let Se;e[111]!==d||e[112]!==u||e[113]!==T.isPending?(Se=T.isPending||!d.trim()||!u,e[111]=d,e[112]=u,e[113]=T.isPending,e[114]=Se):Se=e[114];let je;e[115]!==T.isPending||e[116]!==s?(je=T.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.add"),e[115]=T.isPending,e[116]=s,e[117]=je):je=e[117];let $e;e[118]!==Se||e[119]!==je?($e=t.jsx(Ie,{type:"submit",disabled:Se,children:je}),e[118]=Se,e[119]=je,e[120]=$e):$e=e[120];let ze;e[121]!==se||e[122]!==$e?(ze=t.jsxs(Nt,{children:[se,$e]}),e[121]=se,e[122]=$e,e[123]=ze):ze=e[123];let Ke;e[124]!==O||e[125]!==K||e[126]!==pe||e[127]!==re||e[128]!==ze?(Ke=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:O,children:[K,pe,re,ze]}),e[124]=O,e[125]=K,e[126]=pe,e[127]=re,e[128]=ze,e[129]=Ke):Ke=e[129];let Le;e[130]!==G||e[131]!==Ke?(Le=t.jsxs(Ct,{className:"sm:max-w-md",children:[G,Ke]}),e[130]=G,e[131]=Ke,e[132]=Le):Le=e[132];let _e;e[133]!==h||e[134]!==Le?(_e=t.jsx(Dt,{open:h,onOpenChange:g,children:Le}),e[133]=h,e[134]=Le,e[135]=_e):_e=e[135];const Be=C!=null;let Ve;e[136]===Symbol.for("react.memo_cache_sentinel")?(Ve=M=>{M||P(null)},e[136]=Ve):Ve=e[136];let ke;e[137]!==s?(ke=s("mainPanelTabs.hostingTab.confirmDeleteSecretTitle"),e[137]=s,e[138]=ke):ke=e[138];const Je=C?.name??"";let He;e[139]!==s||e[140]!==Je?(He=s("mainPanelTabs.hostingTab.confirmDeleteSecretDescription",{name:Je}),e[139]=s,e[140]=Je,e[141]=He):He=e[141];let Ee;e[142]!==s?(Ee=s("mainPanelTabs.hostingTab.deleteSecret"),e[142]=s,e[143]=Ee):Ee=e[143];let Oe;e[144]!==v||e[145]!==C?(Oe=()=>{C&&v.mutate(C)},e[144]=v,e[145]=C,e[146]=Oe):Oe=e[146];let qe;e[147]!==v.isPending||e[148]!==Be||e[149]!==ke||e[150]!==He||e[151]!==Ee||e[152]!==Oe?(qe=t.jsx(wt,{open:Be,onOpenChange:Ve,title:ke,description:He,confirmLabel:Ee,pending:v.isPending,onConfirm:Oe}),e[147]=v.isPending,e[148]=Be,e[149]=ke,e[150]=He,e[151]=Ee,e[152]=Oe,e[153]=qe):qe=e[153];let Ue;return e[154]!==p||e[155]!==I||e[156]!==Y||e[157]!==_e||e[158]!==qe?(Ue=t.jsxs(ut,{title:p,actions:I,children:[Y,_e,qe]}),e[154]=p,e[155]=I,e[156]=Y,e[157]=_e,e[158]=qe,e[159]=Ue):Ue=e[159],Ue}function Sn(r){return ce.error(rt(r))}function Nn(r){return ce.error(rt(r))}const Cn=3e4;function El(r){const e=ee.c(111),{virtualMcpId:o}=r,l=Ae(),{org:a}=Ds(),i=Rs(o),c=Fs(i),m=!!c,s=c?`/api/${a.slug}/hosting/${encodeURIComponent(c)}`:"";let n;e[0]!==s||e[1]!==m?(n=(O,k)=>({queryKey:O,queryFn:()=>Qt(`${s}${k}`),enabled:m,retry:!1,staleTime:Cn}),e[0]=s,e[1]=m,e[2]=n):n=e[2];const h=n,g=c??"",d=ct(h(Ye.hostingDeployments(a.slug,g),"/deployments")),f=ct(h(Ye.hostingEnv(a.slug,g),"/env")),u=ct(h(Ye.hostingSecrets(a.slug,g),"/secrets")),b=ct(h(Ye.hostingRedirects(a.slug,g),"/redirects")),x=ct(h(Ye.hostingDomains(a.slug,g),"/domains"));if(!c){let O;e[3]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[3]=O):O=e[3];let k;e[4]!==l?(k=l("mainPanelTabs.hostingTab.noSiteTitle"),e[4]=l,e[5]=k):k=e[5];let E;e[6]!==l?(E=l("mainPanelTabs.hostingTab.noSiteDescription"),e[6]=l,e[7]=E):E=e[7];let B;return e[8]!==k||e[9]!==E?(B=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[8]=k,e[9]=E,e[10]=B):B=e[10],B}if(jt(d.error)&&jt(f.error)&&jt(b.error)){let O;e[11]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[11]=O):O=e[11];let k;e[12]!==l?(k=l("mainPanelTabs.hostingTab.notConnectedTitle"),e[12]=l,e[13]=k):k=e[13];let E;e[14]!==l?(E=l("mainPanelTabs.hostingTab.notConnectedDescription"),e[14]=l,e[15]=E):E=e[15];let B;return e[16]!==k||e[17]!==E?(B=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[16]=k,e[17]=E,e[18]=B):B=e[18],B}let C,P,S,y,R,w,j,T,V,q;if(e[19]!==d.data||e[20]!==x.data||e[21]!==f.data||e[22]!==b.data||e[23]!==u.data){P=mt(d.data,"items");let O;e[34]!==f.data?(O=mt(f.data,"vars"),e[34]=f.data,e[35]=O):O=e[35],R=O;let k;e[36]!==f.data?(k=mt(f.data,"codeVars"),e[36]=f.data,e[37]=k):k=e[37],C=k;let E;e[38]!==u.data?(E=mt(u.data,"secrets"),e[38]=u.data,e[39]=E):E=e[39],V=E;let B;e[40]!==b.data?(B=mt(b.data,"items"),e[40]=b.data,e[41]=B):B=e[41],T=B;const X=x.data;let te;e[42]!==X?.items?(te=X?.items??[],e[42]=X?.items,e[43]=te):te=e[43],y=te;let K;e[44]!==X?.dnsTemplate?(K=X?.dnsTemplate??[],e[44]=X?.dnsTemplate,e[45]=K):K=e[45],S=K;const ne=P.find(wn);w=zt((ne??P.find(Dn))?.framework),j=ne?.servingUrl??null,q=j?j.replace(/^https?:\/\//,"").replace(/\/$/,""):null,e[19]=d.data,e[20]=x.data,e[21]=f.data,e[22]=b.data,e[23]=u.data,e[24]=C,e[25]=P,e[26]=S,e[27]=y,e[28]=R,e[29]=w,e[30]=j,e[31]=T,e[32]=V,e[33]=q}else C=e[24],P=e[25],S=e[26],y=e[27],R=e[28],w=e[29],j=e[30],T=e[31],V=e[32],q=e[33];const F=q;let v;e[46]!==s||e[47]!==a.slug||e[48]!==c?(v=t.jsx(Gs,{base:s,orgSlug:a.slug,site:c}),e[46]=s,e[47]=a.slug,e[48]=c,e[49]=v):v=e[49];let H;e[50]!==l?(H=l("mainPanelTabs.hostingTab.title"),e[50]=l,e[51]=H):H=e[51];let A;e[52]!==w?(A=w&&t.jsx(Re,{variant:"secondary",children:w}),e[52]=w,e[53]=A):A=e[53];let Q;e[54]!==H||e[55]!==A?(Q=t.jsxs("span",{className:"inline-flex items-center gap-2.5",children:[H,A]}),e[54]=H,e[55]=A,e[56]=Q):Q=e[56];let _;e[57]!==v||e[58]!==Q?(_=t.jsx(Jt.Title,{actions:v,children:Q}),e[57]=v,e[58]=Q,e[59]=_):_=e[59];let W;e[60]!==F||e[61]!==j?(W=j&&F&&t.jsx("p",{className:"flex flex-wrap items-center gap-x-1.5 text-sm text-muted-foreground",children:t.jsxs("a",{href:j,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 font-mono text-xs text-foreground hover:underline",children:[F,t.jsx(_t,{className:"size-3"})]})}),e[60]=F,e[61]=j,e[62]=W):W=e[62];let J;e[63]!==_||e[64]!==W?(J=t.jsxs("div",{className:"flex flex-col gap-2",children:[_,W]}),e[63]=_,e[64]=W,e[65]=J):J=e[65];let U;e[66]!==s||e[67]!==P||e[68]!==d.error||e[69]!==d.isLoading||e[70]!==m||e[71]!==a.slug||e[72]!==c?(U=t.jsx(nn,{base:s,orgSlug:a.slug,site:c,enabled:m,deployments:P,isLoading:d.isLoading,error:d.error}),e[66]=s,e[67]=P,e[68]=d.error,e[69]=d.isLoading,e[70]=m,e[71]=a.slug,e[72]=c,e[73]=U):U=e[73];let p;e[74]!==s||e[75]!==C||e[76]!==f.error||e[77]!==f.isLoading||e[78]!==R||e[79]!==a.slug||e[80]!==c?(p=t.jsx(gn,{base:s,orgSlug:a.slug,site:c,envVars:R,codeVars:C,isLoading:f.isLoading,error:f.error}),e[74]=s,e[75]=C,e[76]=f.error,e[77]=f.isLoading,e[78]=R,e[79]=a.slug,e[80]=c,e[81]=p):p=e[81];let I;e[82]!==s||e[83]!==a.slug||e[84]!==V||e[85]!==u.error||e[86]!==u.isLoading||e[87]!==c?(I=t.jsx(yn,{base:s,orgSlug:a.slug,site:c,secrets:V,isLoading:u.isLoading,error:u.error}),e[82]=s,e[83]=a.slug,e[84]=V,e[85]=u.error,e[86]=u.isLoading,e[87]=c,e[88]=I):I=e[88];let Y;e[89]!==s||e[90]!==S||e[91]!==y||e[92]!==x.error||e[93]!==x.isLoading||e[94]!==a.slug||e[95]!==c?(Y=t.jsx(fn,{base:s,orgSlug:a.slug,site:c,domains:y,dnsTemplate:S,isLoading:x.isLoading,error:x.error}),e[89]=s,e[90]=S,e[91]=y,e[92]=x.error,e[93]=x.isLoading,e[94]=a.slug,e[95]=c,e[96]=Y):Y=e[96];let D;e[97]!==s||e[98]!==a.slug||e[99]!==T||e[100]!==b.error||e[101]!==b.isLoading||e[102]!==c?(D=t.jsx(jn,{base:s,orgSlug:a.slug,site:c,redirects:T,isLoading:b.isLoading,error:b.error}),e[97]=s,e[98]=a.slug,e[99]=T,e[100]=b.error,e[101]=b.isLoading,e[102]=c,e[103]=D):D=e[103];let G;return e[104]!==U||e[105]!==p||e[106]!==I||e[107]!==Y||e[108]!==D||e[109]!==J?(G=t.jsx("div",{className:"h-full min-h-0 overflow-y-auto",children:t.jsx(Jt.Body,{maxWidth:"max-w-5xl",children:t.jsxs(ws,{children:[J,U,p,I,Y,D]})})}),e[104]=U,e[105]=p,e[106]=I,e[107]=Y,e[108]=D,e[109]=J,e[110]=G):G=e[110],G}function Dn(r){return r.framework}function wn(r){return r.up===!0}export{El as HostingTab};
1
+ import{c as ee,j as t,a1 as ns,B as Ie,a2 as is,a4 as ls,l as xt,b as Ae,b8 as dt,b6 as Ps,b1 as vs,t as ce,n as bt,r as Z,e as lt,m as ct,K as Ye,bm as ys,bl as Ss,bn as Ns,bo as Cs,z as Wt,G as Ds,P as Jt,b5 as ws}from"./index-COKDKMgK.js";import{n as _t}from"./LinkExternal01-DRhSoo2W.js";import{be as $s,bf as as,aD as Ls,aY as _s,bg as ks,k as kt,C as Yt,av as Gt,aF as Es}from"./agent-icon-CqZT47B5.js";import{B as Re}from"./badge-CsdSFwUS.js";import{E as Ze}from"./empty-state-01NavnmO.js";import{u as Rs}from"./use-virtual-mcp-0ZIPz8eH.js";import{r as Fs}from"./site-slug-uya6Wp4-.js";import{i as As}from"./AlertCircle-CGv2LagT.js";import{d as gt}from"./UserSquare-D121VNlC.js";import{i as zs}from"./Zap-PhE6JDGE.js";import{c as os,d as rs,b as cs,f as ms,g as ds,e as fs,a as us,A as hs}from"./alert-dialog-DPc_fzyi.js";import{d as Vs,a as nt,T as Fe,c as Et,e as Rt,b as Ft}from"./table-Dmi8ccp7.js";import{i as xs}from"./ChevronRight-CLj2ZqtT.js";import{a as Hs}from"./Copy01-iyRTWREU.js";import{am as Vt,an as Ht,al as Bs}from"./automation-runs-CAJKg5F2.js";import{i as At}from"./Globe01-c3fEChsS.js";import{s as Pt}from"./Plus-Db5S94rk.js";import{s as vt}from"./Trash01-BnoaysZr.js";import{c as yt,d as St,e as Nt,b as Ct,D as Dt}from"./dialog-ChihYhwF.js";import{I as it}from"./input-6ZRoOsiB.js";import{L as Xe}from"./label-Cgkh_1r3.js";import{i as Os}from"./Settings02-CX9GU2_h.js";import{s as qs}from"./Eye-Cz2-nV7m.js";import{a as Bt,b as Ot,c as ft,d as qt,S as Mt}from"./select-zab8WvKE.js";import{i as Ms}from"./ArrowRight-PtPDnQeO.js";import"./Tool01-C97w77mt.js";import"./ArrowUp-DWMH94N-.js";import"./ArrowLeft-CrqXhP5Q.js";import"./Tool02-Rgho6xFo.js";import"./TrendUp01-B2IK8kp9.js";import"./ZoomOut-DsYyutbV.js";import"./Users03-BH7DTuey.js";import"./CheckCircle-ZifqNZkG.js";import"./Check-OrdEpHh8.js";import"./ChevronUp-DwN4CSvk.js";import"./ChevronSelectorVertical-CpUm5l1j.js";import"./DotsVertical-C05jEl8q.js";import"./CreditCard01-CoUWna_2.js";import"./Download01-CzfGo2fl.js";import"./Share07-ajbW_r5c.js";import"./GitBranch01-G4Xokeyr.js";import"./XClose-DPz14YDo.js";import"./HardDrive-CjWNQ53c.js";import"./Image01-CijeoW_8.js";import"./Key01-j6qNNGjk.js";import"./Link01-CtsE0R0D.js";import"./Monitor01-ASpw1r2B.js";import"./Sun-B0zPFK-z.js";import"./Package-Co40SS3v.js";import"./Palette-l-bW1Jj5.js";import"./Play-DPtsotun.js";import"./SearchLg-BKpVdtSc.js";import"./SearchMd-5J9ZvzPt.js";import"./Shield01-DKmYeZMQ.js";import"./Stars01-Bx4pQeLg.js";import"./Upload01-QLEKcflz.js";import"./User01-BYx93o00.js";import"./Users01-DxZpgNMB.js";import"./XCircle-CZewIPeW.js";import"./use-mcp-client-Cr62uIBo.js";import"./auth-XEUSFe4G.js";import"./useInfiniteQuery-1kKiN9aZ.js";import"./infiniteQueryObserver-B2p8wz-k.js";import"./use-connection-CsJuNLSb.js";import"./empty-state-DbicIg3-.js";import"./use-infinite-scroll-Cra9MhHK.js";import"./use-members-B2SCOKsl.js";import"./use-org-auth-client-BGHwjU8g.js";import"./use-automations-BGTeAVZt.js";import"./useSuspenseInfiniteQuery-C4h4CiTA.js";import"./avatar-2SmZuxZ8.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-copy-s3gq1I2J.js";import"./markdown-Ba4606EI.js";import"./use-panel-navigate-Cd7zoDqa.js";import"./use-destination-route-BLm-BAwC.js";import"./hooks-D33Qgg2F.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BdZvUT3v.js";import"./task-board-y-SZtT16.js";import"./schema-jzUpa2jr.js";import"./chat-context-BF1udRnT.js";import"./autosend-DXSzImGH.js";import"./thread-intent-BSwSc5Rc.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-B9zLoSLV.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-tVpJUj13.js";import"./thread-route-BE_MFJTK.js";import"./use-organization-settings-DuZuLm7F.js";import"./monaco-editor-BdWxRxtU.js";import"./editor-H7C8lNIT.js";import"./mcp-app-renderer-Wq2ZjTNw.js";import"./types-D2LkW7tm.js";import"./shell-layout-Ccj_SXnk.js";import"./anchors-yqDzZN4K.js";import"./project-icon-waYb9qf2.js";import"./github-repo-CTPv5ZM2.js";import"./source-system-tabs-CnEGUb4r.js";import"./command-185_z6Zw.js";import"./index-B-aYhG_e.js";import"./integration-icon-pfLnYyjw.js";import"./required-auth-layout-DOxD4Y6H.js";import"./use-org-sso-eOUYuNMl.js";import"./use-org-notice-BX_9nz7z.js";import"./use-navigate-to-agent-BYYtuwrx.js";import"./use-mcp-prompts-Dvu7jADE.js";import"./form-BDJs5Qvh.js";import"./file-type-icon-BlQUrQtA.js";function Lt(r,e){return r.name===e.name&&(r.scope??"runtime")===e.scope}function mt(r,e){if(Array.isArray(r))return r;if(r&&typeof r=="object"){const o=r[e];if(Array.isArray(o))return o}return[]}function zt(r){return r==="deco-deno"?"Deco Deno":r==="deco-tanstack"?"Deco TanStack":r??null}function Is(r){const e=(r??"").toLowerCase();return e.includes("ready")||e.includes("success")||e.includes("active")?"success":e.includes("fail")||e.includes("error")?"destructive":e.includes("build")||e.includes("pend")||e.includes("progress")?"warning":"secondary"}function Xt(r){if(!r)return"—";const e=new Date(r).getTime();if(Number.isNaN(e))return"—";const o=Math.round((Date.now()-e)/1e3),l=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),a=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[i,c]of a)if(Math.abs(o)>=c)return l.format(-Math.round(o/c),i);return l.format(-o,"second")}function Qs(r){if(r==null||!Number.isFinite(r))return"—";if(r<1e3)return`${Math.round(r)}ms`;const e=r/1e3;if(e<60)return`${e.toFixed(e>=10?0:1)}s`;const o=Math.round(e);return`${Math.floor(o/60)}m ${o%60}s`}class It extends Error{constructor(e,o){super(e),this.status=o}status}function jt(r){return r instanceof It&&r.status===401}function rt(r){return r instanceof Error?r.message:String(r)}function Us(r){const e=r.trim();if(!e)return null;const l=(e.endsWith(".")?e.slice(0,-1):e).split(".");if(l.length<2)return"Domain must include a TLD (e.g., example.com)";if(e.length>253)return"Domain name is too long (max 253 characters)";for(const i of l){if(i.length>63)return`Label "${i}" is too long (max 63 characters)`;if(!/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/i.test(i))return`Label "${i}" has invalid characters or format`}const a=l[l.length-1]??"";return/^[0-9]+$/.test(a)?"Domain must include a valid TLD, not a number":null}function gs(r,e){return r&&typeof r=="object"&&"error"in r?String(r.error):`request failed (${e})`}async function Qt(r){const e=await fetch(r),o=await e.json().catch(()=>({}));if(!e.ok)throw new It(gs(o,e.status),e.status);return o}async function at(r,e,o){const l=await fetch(r,{method:e,headers:o!==void 0?{"Content-Type":"application/json"}:{},body:o!==void 0?JSON.stringify(o):void 0}),a=await l.json().catch(()=>({}));if(!l.ok)throw new It(gs(a,l.status),l.status);return a}function et(r){const e=ee.c(19);let o,l,a,i,c,m;e[0]!==r?({label:l,tooltipSide:i,variant:c,size:m,children:o,...a}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=a,e[4]=i,e[5]=c,e[6]=m):(o=e[1],l=e[2],a=e[3],i=e[4],c=e[5],m=e[6]);const s=i===void 0?"top":i,n=c===void 0?"ghost":c,h=m===void 0?"icon-sm":m;let g;e[7]!==o||e[8]!==l||e[9]!==a||e[10]!==h||e[11]!==n?(g=t.jsx(ns,{asChild:!0,children:t.jsx(Ie,{"data-slot":"icon-button","aria-label":l,variant:n,size:h,...a,children:o})}),e[7]=o,e[8]=l,e[9]=a,e[10]=h,e[11]=n,e[12]=g):g=e[12];let d;e[13]!==l||e[14]!==s?(d=t.jsx(is,{side:s,children:l}),e[13]=l,e[14]=s,e[15]=d):d=e[15];let f;return e[16]!==g||e[17]!==d?(f=t.jsxs(ls,{children:[g,d]}),e[16]=g,e[17]=d,e[18]=f):f=e[18],f}function ut(r){const e=ee.c(4),{title:o,actions:l,children:a}=r;let i;return e[0]!==l||e[1]!==a||e[2]!==o?(i=t.jsx(vs,{title:o,actions:l,children:a}),e[0]=l,e[1]=a,e[2]=o,e[3]=i):i=e[3],i}function Qe(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("gap-0 overflow-hidden p-0 divide-y divide-border",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx(Ps,{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function pt(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("flex min-h-12 items-center gap-3 px-4 py-2",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx("div",{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function ot(r){const e=ee.c(2),{children:o}=r;let l;return e[0]!==o?(l=t.jsx("p",{className:"px-4 py-6 text-sm text-muted-foreground",children:o}),e[0]=o,e[1]=l):l=e[1],l}function ht(r){const e=ee.c(2),{rows:o}=r,l=o===void 0?3:o;let a;return e[0]!==l?(a=t.jsx(Qe,{children:Array.from({length:l},Ks)}),e[0]=l,e[1]=a):a=e[1],a}function Ks(r,e){return t.jsxs(pt,{children:[t.jsx(dt,{className:"h-4 w-40"}),t.jsx(dt,{className:"h-4 flex-1"}),t.jsx(dt,{className:"size-7 rounded-lg"})]},e)}function Me(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("text-xs font-medium text-muted-foreground",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx(Vs,{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function Ut(r){const e=ee.c(12),{open:o,onClick:l}=r,a=Ae();let i;e[0]!==o||e[1]!==a?(i=a(o?"mainPanelTabs.hostingTab.hideDetails":"mainPanelTabs.hostingTab.showDetails"),e[0]=o,e[1]=a,e[2]=i):i=e[2];const c=o&&"rotate-90";let m;e[3]!==c?(m=xt("transition-transform duration-200 motion-reduce:transition-none",c),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==m?(s=t.jsx(xs,{className:m}),e[5]=m,e[6]=s):s=e[6];let n;return e[7]!==l||e[8]!==o||e[9]!==i||e[10]!==s?(n=t.jsx(et,{label:i,size:"icon-sm",className:"-ml-1.5 text-muted-foreground","aria-expanded":o,onClick:l,children:s}),e[7]=l,e[8]=o,e[9]=i,e[10]=s,e[11]=n):n=e[11],n}function Ws(r){const e=ee.c(8),{open:o,colSpan:l,children:a}=r;let i;e[0]!==a?(i=t.jsx(Vt,{children:t.jsx("div",{className:"border-b border-border bg-muted/30 px-4 py-3",children:a})}),e[0]=a,e[1]=i):i=e[1];let c;e[2]!==o||e[3]!==i?(c=t.jsx(Ht,{open:o,children:i}),e[2]=o,e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==l||e[6]!==c?(m=t.jsx(nt,{className:"border-0 hover:bg-transparent",children:t.jsx(Fe,{colSpan:l,className:"p-0 whitespace-normal",children:c})}),e[5]=l,e[6]=c,e[7]=m):m=e[7],m}function bs(r){const e=ee.c(5),{open:o,children:l}=r;let a;e[0]!==l?(a=t.jsx(Vt,{children:t.jsx("div",{className:"border-t border-border bg-muted/30 px-4 py-3",children:l})}),e[0]=l,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.jsx(Ht,{open:o,children:a}),e[2]=o,e[3]=a,e[4]=i):i=e[4],i}function ps(r){const e=ee.c(6),{scope:o}=r,l=Ae(),a=o==="build"?"outline":"secondary";let i;e[0]!==o||e[1]!==l?(i=l(o==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime"),e[0]=o,e[1]=l,e[2]=i):i=e[2];let c;return e[3]!==a||e[4]!==i?(c=t.jsx(Re,{variant:a,children:i}),e[3]=a,e[4]=i,e[5]=c):c=e[5],c}function Js(r){const e=ee.c(9),{value:o}=r,l=Ae();let a;e[0]!==l?(a=l("mainPanelTabs.hostingTab.dnsCopy"),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==l||e[3]!==o?(i=()=>{if(!navigator.clipboard){ce.error(l("mainPanelTabs.hostingTab.dnsCopyError"));return}navigator.clipboard.writeText(o).then(()=>ce.success(l("mainPanelTabs.hostingTab.dnsCopied")),()=>ce.error(l("mainPanelTabs.hostingTab.dnsCopyError")))},e[2]=l,e[3]=o,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Hs,{className:"size-3.5"}),e[5]=c):c=e[5];let m;return e[6]!==a||e[7]!==i?(m=t.jsx(et,{label:a,onClick:i,children:c}),e[6]=a,e[7]=i,e[8]=m):m=e[8],m}function wt(r){const e=ee.c(28),{open:o,onOpenChange:l,title:a,description:i,confirmLabel:c,pending:m,onConfirm:s}=r,n=Ae();let h;e[0]!==a?(h=t.jsx(os,{children:a}),e[0]=a,e[1]=h):h=e[1];let g;e[2]!==i?(g=t.jsx(rs,{children:i}),e[2]=i,e[3]=g):g=e[3];let d;e[4]!==h||e[5]!==g?(d=t.jsxs(cs,{children:[h,g]}),e[4]=h,e[5]=g,e[6]=d):d=e[6];let f;e[7]!==n?(f=n("mainPanelTabs.hostingTab.cancel"),e[7]=n,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=t.jsx(ms,{disabled:m,children:f}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let b;e[12]!==s?(b=S=>{S.preventDefault(),s()},e[12]=s,e[13]=b):b=e[13];let x;e[14]!==c||e[15]!==m||e[16]!==b?(x=t.jsx(ds,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:b,disabled:m,children:c}),e[14]=c,e[15]=m,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==u||e[19]!==x?(N=t.jsxs(fs,{children:[u,x]}),e[18]=u,e[19]=x,e[20]=N):N=e[20];let C;e[21]!==d||e[22]!==N?(C=t.jsxs(us,{children:[d,N]}),e[21]=d,e[22]=N,e[23]=C):C=e[23];let P;return e[24]!==l||e[25]!==o||e[26]!==C?(P=t.jsx(hs,{open:o,onOpenChange:l,children:C}),e[24]=l,e[25]=o,e[26]=C,e[27]=P):P=e[27],P}const Ys=8;function Gs(r){const e=ee.c(54),{base:o,orgSlug:l,site:a}=r,i=Ae(),c=bt(),[m,s]=Z.useState(!1);let n;e[0]!==o?(n=()=>at(`${o}/deploy`,"POST",{mode:"current"}),e[0]=o,e[1]=n):n=e[1];let h;e[2]!==l||e[3]!==c||e[4]!==a||e[5]!==i?(h=()=>{c.invalidateQueries({queryKey:Ye.hostingDeployments(l,a)}),c.invalidateQueries({queryKey:Ye.hostingDeploymentHistory(l,a)}),ce.success(i("mainPanelTabs.hostingTab.toastDeployQueued")),s(!1)},e[2]=l,e[3]=c,e[4]=a,e[5]=i,e[6]=h):h=e[6];let g;e[7]!==n||e[8]!==h?(g={mutationFn:n,onSuccess:h,onError:Xs},e[7]=n,e[8]=h,e[9]=g):g=e[9];const d=lt(g);let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=()=>s(!0),e[10]=f):f=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(gt,{}),e[11]=u):u=e[11];let b;e[12]!==d.isPending||e[13]!==i?(b=d.isPending?i("mainPanelTabs.hostingTab.deploying"):i("mainPanelTabs.hostingTab.deploy"),e[12]=d.isPending,e[13]=i,e[14]=b):b=e[14];let x;e[15]!==d.isPending||e[16]!==b?(x=t.jsxs(Ie,{size:"sm",onClick:f,disabled:d.isPending,children:[u,b]}),e[15]=d.isPending,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==i?(N=i("mainPanelTabs.hostingTab.deployConfirmTitle"),e[18]=i,e[19]=N):N=e[19];let C;e[20]!==N?(C=t.jsx(os,{children:N}),e[20]=N,e[21]=C):C=e[21];let P;e[22]!==i?(P=i("mainPanelTabs.hostingTab.deployConfirmDescription"),e[22]=i,e[23]=P):P=e[23];let S;e[24]!==P?(S=t.jsx(rs,{children:P}),e[24]=P,e[25]=S):S=e[25];let y;e[26]!==S||e[27]!==C?(y=t.jsxs(cs,{children:[C,S]}),e[26]=S,e[27]=C,e[28]=y):y=e[28];const R=d.isPending;let w;e[29]!==i?(w=i("mainPanelTabs.hostingTab.cancel"),e[29]=i,e[30]=w):w=e[30];let j;e[31]!==d.isPending||e[32]!==w?(j=t.jsx(ms,{disabled:R,children:w}),e[31]=d.isPending,e[32]=w,e[33]=j):j=e[33];let T;e[34]!==d?(T=_=>{_.preventDefault(),d.mutate()},e[34]=d,e[35]=T):T=e[35];const V=d.isPending;let q;e[36]!==i?(q=i("mainPanelTabs.hostingTab.deploy"),e[36]=i,e[37]=q):q=e[37];let F;e[38]!==d.isPending||e[39]!==T||e[40]!==q?(F=t.jsx(ds,{onClick:T,disabled:V,children:q}),e[38]=d.isPending,e[39]=T,e[40]=q,e[41]=F):F=e[41];let v;e[42]!==j||e[43]!==F?(v=t.jsxs(fs,{children:[j,F]}),e[42]=j,e[43]=F,e[44]=v):v=e[44];let H;e[45]!==y||e[46]!==v?(H=t.jsxs(us,{children:[y,v]}),e[45]=y,e[46]=v,e[47]=H):H=e[47];let A;e[48]!==m||e[49]!==H?(A=t.jsx(hs,{open:m,onOpenChange:s,children:H}),e[48]=m,e[49]=H,e[50]=A):A=e[50];let Q;return e[51]!==A||e[52]!==x?(Q=t.jsxs(t.Fragment,{children:[x,A]}),e[51]=A,e[52]=x,e[53]=Q):Q=e[53],Q}function Xs(r){return ce.error(rt(r))}function Zs(r,e){const o=(r??"").toLowerCase();return o.includes("rollback")?t.jsxs(Re,{variant:"warning",children:[t.jsx(_s,{}),e("mainPanelTabs.hostingTab.actionRollback")]}):o.includes("redeploy")?t.jsxs(Re,{variant:"secondary",children:[t.jsx(ks,{}),e("mainPanelTabs.hostingTab.actionRedeploy")]}):t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),e("mainPanelTabs.hostingTab.actionDeploy")]})}function en(r,e,o){const l=(r??"").toLowerCase();return l==="build"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(as,{}),o("mainPanelTabs.hostingTab.typeBuild")]}):l==="fast-deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(zs,{}),o("mainPanelTabs.hostingTab.typeFastDeploy")]}):l==="deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),o("mainPanelTabs.hostingTab.typeDeploy")]}):Zs(e,o)}function tn(r,e){const o=(r??"").toLowerCase();return o==="success"?t.jsx(Re,{variant:"success",children:e("mainPanelTabs.hostingTab.outcomeSuccess")}):o==="failure"?t.jsx(Re,{variant:"destructive",children:e("mainPanelTabs.hostingTab.outcomeFailure")}):o==="pending"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(Ls,{}),e("mainPanelTabs.hostingTab.outcomePending")]}):null}function Zt(r){const e=ee.c(7),{commit:o,onClick:l}=r,a=Ae();let i;e[0]!==a?(i=a("mainPanelTabs.hostingTab.buildLogs"),e[0]=a,e[1]=i):i=e[1];const c=!o;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(as,{}),e[2]=m):m=e[2];let s;return e[3]!==l||e[4]!==i||e[5]!==c?(s=t.jsx(et,{label:i,onClick:l,disabled:c,children:m}),e[3]=l,e[4]=i,e[5]=c,e[6]=s):s=e[6],s}function sn(r){const e=ee.c(37),{base:o,orgSlug:l,site:a,target:i,onOpenChange:c}=r,m=Ae(),s=i!=null,n=i?.commit??"",h=i?.env??"";let g;e[0]!==n||e[1]!==h||e[2]!==l||e[3]!==a?(g=Ye.hostingBuildLogs(l,a,n,h),e[0]=n,e[1]=h,e[2]=l,e[3]=a,e[4]=g):g=e[4];let d;e[5]!==o||e[6]!==n||e[7]!==h?(d=()=>Qt(`${o}/deployments/logs?commit=${encodeURIComponent(n)}&env=${encodeURIComponent(h)}`),e[5]=o,e[6]=n,e[7]=h,e[8]=d):d=e[8];const f=s&&!!n;let u;e[9]!==g||e[10]!==d||e[11]!==f?(u={queryKey:g,queryFn:d,enabled:f,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[9]=g,e[10]=d,e[11]=f,e[12]=u):u=e[12];const b=ct(u),x=b.data;let N;e[13]!==m?(N=m("mainPanelTabs.hostingTab.buildLogsTitle"),e[13]=m,e[14]=N):N=e[14];let C;e[15]!==N?(C=t.jsx(ys,{children:N}),e[15]=N,e[16]=C):C=e[16];let P;e[17]!==n||e[18]!==m?(P=m("mainPanelTabs.hostingTab.buildLogsCommit",{commit:n.slice(0,7)}),e[17]=n,e[18]=m,e[19]=P):P=e[19];let S;e[20]!==P?(S=t.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:P}),e[20]=P,e[21]=S):S=e[21];let y;e[22]!==C||e[23]!==S?(y=t.jsxs(Ss,{className:"shrink-0 border-b border-border px-5 py-5 md:px-6",children:[C,S]}),e[22]=C,e[23]=S,e[24]=y):y=e[24];let R;e[25]!==x||e[26]!==b.error||e[27]!==b.isLoading||e[28]!==m?(R=t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-5 md:px-6",children:jt(b.error)?t.jsx(Ze,{icon:t.jsx(kt,{className:"size-5"}),title:m("mainPanelTabs.hostingTab.notConnectedTitle"),description:m("mainPanelTabs.hostingTab.notConnectedDescription")}):b.isLoading?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-2/3"})]}):b.error?t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsError")}):x&&x.configured===!1?t.jsxs("div",{className:"flex flex-col items-center gap-2 rounded-lg border border-border bg-muted/30 px-4 py-8 text-center",children:[t.jsx(As,{className:"size-5 text-muted-foreground"}),t.jsx("p",{className:"text-sm font-medium text-foreground",children:m("mainPanelTabs.hostingTab.buildLogsNotWiredTitle")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:x.reason??m("mainPanelTabs.hostingTab.buildLogsNotWiredDescription")})]}):x?.text?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("pre",{className:"overflow-auto font-mono text-[11px] leading-relaxed text-foreground/80 whitespace-pre-wrap break-words",children:x.text}),x.truncated&&t.jsx("p",{className:"text-xs text-warning",children:m("mainPanelTabs.hostingTab.buildLogsTruncated")}),x.url&&t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-xs text-primary hover:underline",children:[t.jsx(_t,{className:"size-3.5"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]})]}):x?.url?t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-sm text-primary hover:underline",children:[t.jsx(_t,{className:"size-4"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]}):t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsEmpty")})}),e[25]=x,e[26]=b.error,e[27]=b.isLoading,e[28]=m,e[29]=R):R=e[29];let w;e[30]!==R||e[31]!==y?(w=t.jsxs(Ns,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:[y,R]}),e[30]=R,e[31]=y,e[32]=w):w=e[32];let j;return e[33]!==c||e[34]!==s||e[35]!==w?(j=t.jsx(Cs,{open:s,onOpenChange:c,children:w}),e[33]=c,e[34]=s,e[35]=w,e[36]=j):j=e[36],j}function nn(r){const e=ee.c(52),{base:o,orgSlug:l,site:a,enabled:i,deployments:c,isLoading:m,error:s}=r,n=Ae(),[h,g]=Z.useState(null),[d,f]=Z.useState(Ys),[u,b]=Z.useState(null);let x;e[0]!==l||e[1]!==a?(x=Ye.hostingDeploymentHistory(l,a),e[0]=l,e[1]=a,e[2]=x):x=e[2];let N;e[3]!==o?(N=()=>Qt(`${o}/deployments/history?limit=50`),e[3]=o,e[4]=N):N=e[4];let C;e[5]!==i||e[6]!==x||e[7]!==N?(C={queryKey:x,queryFn:N,enabled:i,retry:!1,staleTime:3e4},e[5]=i,e[6]=x,e[7]=N,e[8]=C):C=e[8];const P=ct(C);let S,y,R,w;if(e[9]!==c||e[10]!==s||e[11]!==h||e[12]!==d||e[13]!==P.data||e[14]!==P.error||e[15]!==P.isLoading||e[16]!==m||e[17]!==n){const F=mt(P.data,"items"),v=F.slice(0,d),H=F.length-v.length;let A;e[22]!==c?(A=c.find(on)?.commitSha??c.find(an)?.commitSha??null,e[22]=c,e[23]=A):A=e[23];const Q=A;let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=(p,I)=>{p&&b({commit:p,env:I??"production"})},e[24]=_):_=e[24];const W=_;let J;e[25]!==n?(J=n("mainPanelTabs.hostingTab.deployments"),e[25]=n,e[26]=J):J=e[26];let U;e[27]!==c||e[28]!==s||e[29]!==h||e[30]!==m||e[31]!==n?(U=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deploymentsError")})}):c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployments"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDuration")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colUpdated")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsx(Ft,{children:c.map(p=>{const I=!!p.buildMessage,Y=h===p.id;return t.jsxs(Z.Fragment,{children:[t.jsxs(nt,{className:xt(I&&"cursor-pointer hover:bg-muted/40"),onClick:I?()=>g(Y?null:p.id):void 0,children:[t.jsx(Fe,{className:"px-4",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[I?t.jsx(Ut,{open:Y,onClick:()=>g(Y?null:p.id)}):t.jsx($s,{className:"size-4 text-muted-foreground/60"}),t.jsx("span",{className:"font-mono text-xs",children:p.shortCommit??p.commitSha?.slice(0,7)??"—"}),p.production===!0&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.production")})]})}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Re,{variant:Is(p.phase),children:p.phase??"—"}),p.up===!0&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-right font-mono text-xs text-muted-foreground tabular-nums",children:Qs(p.durationMs)}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Xt(p.finishedAt??p.startedAt??p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",onClick:ln,children:t.jsx(Zt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]}),I&&t.jsx(Ws,{open:Y,colSpan:6,children:t.jsx("p",{className:"whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:p.buildMessage})})]},p.id)})})]}),e[27]=c,e[28]=s,e[29]=h,e[30]=m,e[31]=n,e[32]=U):U=e[32],e[33]!==U||e[34]!==J?(w=t.jsx(ut,{title:J,children:U}),e[33]=U,e[34]=J,e[35]=w):w=e[35],S=ut,e[36]!==n?(y=n("mainPanelTabs.hostingTab.deployHistory"),e[36]=n,e[37]=y):y=e[37],R=P.isLoading?t.jsx(ht,{}):P.error?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deployHistoryError")})}):F.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployHistory"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colAction")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colActor")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDate")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsxs(Ft,{children:[v.map(p=>{const I=!!Q&&p.commitSha===Q;return t.jsxs(nt,{children:[t.jsx(Fe,{className:"pl-4",children:en(p.type,p.action,n)}),t.jsx(Fe,{children:tn(p.outcome,n)}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"font-mono text-xs",children:p.commitSha?.slice(0,7)??"—"}),I&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:p.actor??"—"}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Xt(p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",children:t.jsx(Zt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]},p.id)}),H>0&&t.jsx(nt,{className:"hover:bg-transparent",children:t.jsx(Fe,{colSpan:7,className:"p-2 text-center",children:t.jsx(Ie,{variant:"ghost",size:"sm",onClick:()=>f(F.length),children:n("mainPanelTabs.hostingTab.showMoreHistory",{count:String(H)})})})})]})]}),e[9]=c,e[10]=s,e[11]=h,e[12]=d,e[13]=P.data,e[14]=P.error,e[15]=P.isLoading,e[16]=m,e[17]=n,e[18]=S,e[19]=y,e[20]=R,e[21]=w}else S=e[18],y=e[19],R=e[20],w=e[21];let j;e[38]!==S||e[39]!==y||e[40]!==R?(j=t.jsx(S,{title:y,children:R}),e[38]=S,e[39]=y,e[40]=R,e[41]=j):j=e[41];let T;e[42]===Symbol.for("react.memo_cache_sentinel")?(T=F=>{F||b(null)},e[42]=T):T=e[42];let V;e[43]!==o||e[44]!==u||e[45]!==l||e[46]!==a?(V=t.jsx(sn,{base:o,orgSlug:l,site:a,target:u,onOpenChange:T}),e[43]=o,e[44]=u,e[45]=l,e[46]=a,e[47]=V):V=e[47];let q;return e[48]!==w||e[49]!==j||e[50]!==V?(q=t.jsxs(t.Fragment,{children:[w,j,V]}),e[48]=w,e[49]=j,e[50]=V,e[51]=q):q=e[51],q}function ln(r){return r.stopPropagation()}function an(r){return r.production===!0&&r.up}function on(r){return r.up===!0}const rn=["16.148.147.194","52.32.122.94","52.35.156.199"];function cn(r){return r.replace(/\.$/,"").split(".").filter(Boolean).length===2}function es(r){const e=r.trim();return e.length>0&&!e.startsWith("/")&&e.includes(".")}function Ts(r){const e=ee.c(24),{records:o}=r,l=Ae();let a;e[0]!==l?(a=l("mainPanelTabs.hostingTab.dnsColType"),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==a?(i=t.jsx(Me,{className:"w-16",children:a}),e[2]=a,e[3]=i):i=e[3];let c;e[4]!==l?(c=l("mainPanelTabs.hostingTab.dnsColName"),e[4]=l,e[5]=c):c=e[5];let m;e[6]!==c?(m=t.jsx(Me,{children:c}),e[6]=c,e[7]=m):m=e[7];let s;e[8]!==l?(s=l("mainPanelTabs.hostingTab.dnsColValue"),e[8]=l,e[9]=s):s=e[9];let n;e[10]!==s?(n=t.jsx(Me,{children:s}),e[10]=s,e[11]=n):n=e[11];let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(Me,{className:"w-10"}),e[12]=h):h=e[12];let g;e[13]!==i||e[14]!==m||e[15]!==n?(g=t.jsx(Rt,{children:t.jsxs(nt,{children:[i,m,n,h]})}),e[13]=i,e[14]=m,e[15]=n,e[16]=g):g=e[16];let d;e[17]!==o?(d=o.map(mn),e[17]=o,e[18]=d):d=e[18];let f;e[19]!==d?(f=t.jsx(Ft,{children:d}),e[19]=d,e[20]=f):f=e[20];let u;return e[21]!==f||e[22]!==g?(u=t.jsxs(Et,{className:"table-fixed",children:[g,f]}),e[21]=f,e[22]=g,e[23]=u):u=e[23],u}function mn(r){return t.jsxs(nt,{children:[t.jsx(Fe,{className:"font-mono text-xs",children:r.type}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs",children:r.name}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs text-muted-foreground",children:r.value}),t.jsx(Fe,{className:"text-right",children:t.jsx(Js,{value:r.value})})]},`${r.type}-${r.name}-${r.value}`)}function js(r){const e=ee.c(14),{status:o,children:l}=r,a=Ae();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(At,{className:"size-4 text-muted-foreground"}),e[0]=i):i=e[0];let c;e[1]!==a?(c=a("mainPanelTabs.hostingTab.dnsSetupTitle"),e[1]=a,e[2]=c):c=e[2];let m;e[3]!==c?(m=t.jsx("span",{className:"text-sm font-medium",children:c}),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==o||e[6]!==a?(s=o&&t.jsx(Re,{variant:o.active?"success":"outline",className:"ml-auto",children:o.active?a("mainPanelTabs.hostingTab.dnsActive"):a("mainPanelTabs.hostingTab.dnsAwaiting")}),e[5]=o,e[6]=a,e[7]=s):s=e[7];let n;e[8]!==m||e[9]!==s?(n=t.jsxs("div",{className:"flex items-center gap-2",children:[i,m,s]}),e[8]=m,e[9]=s,e[10]=n):n=e[10];let h;return e[11]!==l||e[12]!==n?(h=t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[n,l]}),e[11]=l,e[12]=n,e[13]=h):h=e[13],h}function ts(r){const e=ee.c(21),{from:o,source:l}=r,a=Ae();let i,c,m,s,n;if(e[0]!==o||e[1]!==l||e[2]!==a){const d=o.trim().replace(/\.$/,""),f=d?cn(d)?"@":d:"@",u=l==="both";c=js,e[8]!==u?(s={active:u},e[8]=u,e[9]=s):s=e[9];let b;e[10]!==u||e[11]!==a?(b=a(u?"mainPanelTabs.hostingTab.dnsActiveHint":"mainPanelTabs.hostingTab.dnsAwaitingHint"),e[10]=u,e[11]=a,e[12]=b):b=e[12],n=t.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("mainPanelTabs.hostingTab.dnsRedirectIntent",{from:d||"—"})," ",b]}),i=Ts,m=rn.map(x=>({type:"A",name:f,value:x})),e[0]=o,e[1]=l,e[2]=a,e[3]=i,e[4]=c,e[5]=m,e[6]=s,e[7]=n}else i=e[3],c=e[4],m=e[5],s=e[6],n=e[7];let h;e[13]!==i||e[14]!==m?(h=t.jsx(i,{records:m}),e[13]=i,e[14]=m,e[15]=h):h=e[15];let g;return e[16]!==c||e[17]!==s||e[18]!==n||e[19]!==h?(g=t.jsxs(c,{status:s,children:[n,h]}),e[16]=c,e[17]=s,e[18]=n,e[19]=h,e[20]=g):g=e[20],g}function ss(r){const e=ee.c(2),{records:o}=r;if(o.length===0)return null;let l;return e[0]!==o?(l=t.jsx(js,{children:t.jsx(Ts,{records:o})}),e[0]=o,e[1]=l):l=e[1],l}function dn(r){const e=ee.c(16),{domain:o}=r,l=Ae(),a=o.status??"pending";let i;e[0]!==a||e[1]!==l?(i=l(a==="active"?"mainPanelTabs.hostingTab.statusActive":a==="action-required"?"mainPanelTabs.hostingTab.statusActionRequired":"mainPanelTabs.hostingTab.statusPending"),e[0]=a,e[1]=l,e[2]=i):i=e[2];const c=i;let m;e[3]!==o.detail||e[4]!==l?(m=o.detail==="zone-not-onboarded"?l("mainPanelTabs.hostingTab.detailZoneNotOnboarded"):void 0,e[3]=o.detail,e[4]=l,e[5]=m):m=e[5];const s=m,n=a==="active"?"success":a==="action-required"?"warning":"outline";let h;e[6]!==c||e[7]!==n?(h=t.jsx(Re,{variant:n,children:c}),e[6]=c,e[7]=n,e[8]=h):h=e[8];const g=h;if(!s)return g;let d;e[9]!==g?(d=t.jsx(ns,{asChild:!0,children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==s?(f=t.jsx(is,{className:"max-w-xs",children:s}),e[11]=s,e[12]=f):f=e[12];let u;return e[13]!==d||e[14]!==f?(u=t.jsxs(ls,{children:[d,f]}),e[13]=d,e[14]=f,e[15]=u):u=e[15],u}function fn(r){const e=ee.c(121),{base:o,orgSlug:l,site:a,domains:i,dnsTemplate:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(null),[N,C]=Z.useState(null);let P;e[0]!==l||e[1]!==h||e[2]!==a?(P=()=>h.invalidateQueries({queryKey:Ye.hostingDomains(l,a)}),e[0]=l,e[1]=h,e[2]=a,e[3]=P):P=e[3];const S=P;let y;e[4]!==o?(y=$=>at(`${o}/domains`,"PUT",$),e[4]=o,e[5]=y):y=e[5];let R;e[6]!==S||e[7]!==n?(R=()=>{S(),ce.success(n("mainPanelTabs.hostingTab.toastDomainSaved")),d(!1)},e[6]=S,e[7]=n,e[8]=R):R=e[8];let w;e[9]!==y||e[10]!==R?(w={mutationFn:y,onSuccess:R,onError:hn},e[9]=y,e[10]=R,e[11]=w):w=e[11];const j=lt(w);let T;e[12]!==o?(T=$=>at(`${o}/domains/${encodeURIComponent($)}`,"DELETE"),e[12]=o,e[13]=T):T=e[13];let V;e[14]!==S||e[15]!==n?(V=()=>{S(),ce.success(n("mainPanelTabs.hostingTab.toastDomainDeleted")),x(null)},e[14]=S,e[15]=n,e[16]=V):V=e[16];let q;e[17]!==T||e[18]!==V?(q={mutationFn:T,onSuccess:V,onError:un},e[17]=T,e[18]=V,e[19]=q):q=e[19];const F=lt(q);let v;e[20]!==f||e[21]!==j||e[22]!==n?(v=()=>{const $=f.trim().toLowerCase();if(!$){ce.error(n("mainPanelTabs.hostingTab.errorDomainHostRequired"));return}const se=Us($);if(se){ce.error(se);return}j.mutate({host:$})},e[20]=f,e[21]=j,e[22]=n,e[23]=v):v=e[23];const H=v;let A;if(e[24]!==c||e[25]!==f){let $;e[27]!==f?($=se=>({...se,name:f.trim().toLowerCase()||se.name}),e[27]=f,e[28]=$):$=e[28],A=c.map($),e[24]=c,e[25]=f,e[26]=A}else A=e[26];const Q=A;let _,W;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{u(""),d(!0)},W=t.jsx(Pt,{}),e[29]=_,e[30]=W):(_=e[29],W=e[30]);let J;e[31]!==n?(J=n("mainPanelTabs.hostingTab.addDomain"),e[31]=n,e[32]=J):J=e[32];let U;e[33]!==J?(U=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[W,J]}),e[33]=J,e[34]=U):U=e[34];const p=U;let I;e[35]!==n?(I=n("mainPanelTabs.hostingTab.domains"),e[35]=n,e[36]=I):I=e[36];const Y=i.length>0?p:void 0;let D;e[37]!==p||e[38]!==F.isPending||e[39]!==N||e[40]!==i||e[41]!==s||e[42]!==m||e[43]!==n?(D=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.domainsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(At,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDomains"),className:"py-10",buttonComponent:p})}):t.jsx(Qe,{children:i.map(($,se)=>{const Se=!$.canonical&&($.dns?.length??0)>0,je=N===$.host;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Se?t.jsx(Ut,{open:je,onClick:()=>C(je?null:$.host)}):t.jsx(At,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("span",{className:"truncate font-mono text-xs",children:$.host}),$.canonical&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.canonical")})]}),t.jsx(dn,{domain:$}),!$.canonical&&t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteDomain"),onClick:()=>x($.host),disabled:F.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]}),Se&&t.jsx(bs,{open:je,children:t.jsx(ss,{records:$.dns??[]})})]},`${$.host}-${se}`)})}),e[37]=p,e[38]=F.isPending,e[39]=N,e[40]=i,e[41]=s,e[42]=m,e[43]=n,e[44]=D):D=e[44];let G;e[45]!==n?(G=n("mainPanelTabs.hostingTab.addDomainTitle"),e[45]=n,e[46]=G):G=e[46];let O;e[47]!==G?(O=t.jsx(yt,{children:t.jsx(St,{children:G})}),e[47]=G,e[48]=O):O=e[48];let k;e[49]!==H?(k=$=>{$.preventDefault(),H()},e[49]=H,e[50]=k):k=e[50];let E;e[51]!==n?(E=n("mainPanelTabs.hostingTab.colHost"),e[51]=n,e[52]=E):E=e[52];let B;e[53]!==E?(B=t.jsx(Xe,{htmlFor:"domain-host",children:E}),e[53]=E,e[54]=B):B=e[54];let X;e[55]!==n?(X=n("mainPanelTabs.hostingTab.domainHostPlaceholder"),e[55]=n,e[56]=X):X=e[56];let te;e[57]===Symbol.for("react.memo_cache_sentinel")?(te=$=>u($.target.value),e[57]=te):te=e[57];let K;e[58]!==f||e[59]!==j.isPending||e[60]!==X?(K=t.jsx(it,{id:"domain-host",placeholder:X,value:f,onChange:te,className:"font-mono text-xs",autoComplete:"off",disabled:j.isPending}),e[58]=f,e[59]=j.isPending,e[60]=X,e[61]=K):K=e[61];let ne;e[62]!==B||e[63]!==K?(ne=t.jsxs("div",{className:"flex flex-col gap-2",children:[B,K]}),e[62]=B,e[63]=K,e[64]=ne):ne=e[64];let ie;e[65]!==f||e[66]!==Q?(ie=f.trim()&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(ss,{records:Q})}),e[65]=f,e[66]=Q,e[67]=ie):ie=e[67];let Pe;e[68]===Symbol.for("react.memo_cache_sentinel")?(Pe=()=>d(!1),e[68]=Pe):Pe=e[68];const Ce=j.isPending;let me;e[69]!==n?(me=n("mainPanelTabs.hostingTab.cancel"),e[69]=n,e[70]=me):me=e[70];let pe;e[71]!==j.isPending||e[72]!==me?(pe=t.jsx(Ie,{variant:"outline",type:"button",onClick:Pe,disabled:Ce,children:me}),e[71]=j.isPending,e[72]=me,e[73]=pe):pe=e[73];let le;e[74]!==f||e[75]!==j.isPending?(le=j.isPending||!f.trim(),e[74]=f,e[75]=j.isPending,e[76]=le):le=e[76];let ae;e[77]!==j.isPending||e[78]!==n?(ae=j.isPending?n("mainPanelTabs.hostingTab.saving"):n("mainPanelTabs.hostingTab.save"),e[77]=j.isPending,e[78]=n,e[79]=ae):ae=e[79];let de;e[80]!==le||e[81]!==ae?(de=t.jsx(Ie,{type:"submit",disabled:le,children:ae}),e[80]=le,e[81]=ae,e[82]=de):de=e[82];let De;e[83]!==pe||e[84]!==de?(De=t.jsxs(Nt,{children:[pe,de]}),e[83]=pe,e[84]=de,e[85]=De):De=e[85];let fe;e[86]!==k||e[87]!==ne||e[88]!==ie||e[89]!==De?(fe=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:k,children:[ne,ie,De]}),e[86]=k,e[87]=ne,e[88]=ie,e[89]=De,e[90]=fe):fe=e[90];let ue;e[91]!==O||e[92]!==fe?(ue=t.jsxs(Ct,{className:"sm:max-w-md",children:[O,fe]}),e[91]=O,e[92]=fe,e[93]=ue):ue=e[93];let oe;e[94]!==g||e[95]!==ue?(oe=t.jsx(Dt,{open:g,onOpenChange:d,children:ue}),e[94]=g,e[95]=ue,e[96]=oe):oe=e[96];const Te=b!=null;let he;e[97]===Symbol.for("react.memo_cache_sentinel")?(he=$=>{$||x(null)},e[97]=he):he=e[97];let xe;e[98]!==n?(xe=n("mainPanelTabs.hostingTab.confirmDeleteDomainTitle"),e[98]=n,e[99]=xe):xe=e[99];const ve=b??"";let ye;e[100]!==n||e[101]!==ve?(ye=n("mainPanelTabs.hostingTab.confirmDeleteDomainDescription",{host:ve}),e[100]=n,e[101]=ve,e[102]=ye):ye=e[102];let ge;e[103]!==n?(ge=n("mainPanelTabs.hostingTab.deleteDomain"),e[103]=n,e[104]=ge):ge=e[104];let re;e[105]!==F||e[106]!==b?(re=()=>{b&&F.mutate(b)},e[105]=F,e[106]=b,e[107]=re):re=e[107];let be;e[108]!==F.isPending||e[109]!==Te||e[110]!==xe||e[111]!==ye||e[112]!==ge||e[113]!==re?(be=t.jsx(wt,{open:Te,onOpenChange:he,title:xe,description:ye,confirmLabel:ge,pending:F.isPending,onConfirm:re}),e[108]=F.isPending,e[109]=Te,e[110]=xe,e[111]=ye,e[112]=ge,e[113]=re,e[114]=be):be=e[114];let we;return e[115]!==I||e[116]!==Y||e[117]!==D||e[118]!==oe||e[119]!==be?(we=t.jsxs(ut,{title:I,actions:Y,children:[D,oe,be]}),e[115]=I,e[116]=Y,e[117]=D,e[118]=oe,e[119]=be,e[120]=we):we=e[120],we}function un(r){return ce.error(rt(r))}function hn(r){return ce.error(rt(r))}function xn(r){const e=ee.c(24),{value:o,onChange:l,disabled:a,className:i}=r,c=Ae();let m;e[0]!==l?(m=N=>l(N==="build"?"build":"runtime"),e[0]=l,e[1]=m):m=e[1];let s;e[2]!==i?(s=xt("h-8",i),e[2]=i,e[3]=s):s=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Bt,{}),e[4]=n):n=e[4];let h;e[5]!==s?(h=t.jsx(Ot,{className:s,children:n}),e[5]=s,e[6]=h):h=e[6];let g;e[7]!==c?(g=c("mainPanelTabs.hostingTab.secretScopeRuntime"),e[7]=c,e[8]=g):g=e[8];let d;e[9]!==g?(d=t.jsx(ft,{value:"runtime",children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==c?(f=c("mainPanelTabs.hostingTab.secretScopeBuild"),e[11]=c,e[12]=f):f=e[12];let u;e[13]!==f?(u=t.jsx(ft,{value:"build",children:f}),e[13]=f,e[14]=u):u=e[14];let b;e[15]!==d||e[16]!==u?(b=t.jsxs(qt,{children:[d,u]}),e[15]=d,e[16]=u,e[17]=b):b=e[17];let x;return e[18]!==a||e[19]!==m||e[20]!==h||e[21]!==b||e[22]!==o?(x=t.jsxs(Mt,{value:o,onValueChange:m,disabled:a,children:[h,b]}),e[18]=a,e[19]=m,e[20]=h,e[21]=b,e[22]=o,e[23]=x):x=e[23],x}function gn(r){const e=ee.c(151),{base:o,orgSlug:l,site:a,envVars:i,codeVars:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(""),[N,C]=Z.useState("runtime"),[P,S]=Z.useState(null),[y,R]=Z.useState(""),[w,j]=Z.useState(null);let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=new Set,e[0]=T):T=e[0];const[V,q]=Z.useState(T);let F;e[1]===Symbol.for("react.memo_cache_sentinel")?(F=L=>{q(Ne=>{const We=new Set(Ne);return We.has(L)?We.delete(L):We.add(L),We})},e[1]=F):F=e[1];const v=F;let H;e[2]!==o?(H=L=>at(`${o}/env`,"PUT",{vars:L}),e[2]=o,e[3]=H):H=e[3];let A;e[4]!==l||e[5]!==h||e[6]!==a||e[7]!==n?(A=()=>{h.invalidateQueries({queryKey:Ye.hostingEnv(l,a)}),ce.success(n("mainPanelTabs.hostingTab.toastEnvSaved"))},e[4]=l,e[5]=h,e[6]=a,e[7]=n,e[8]=A):A=e[8];let Q;e[9]!==H||e[10]!==A?(Q={mutationFn:H,onSuccess:A,onError:pn},e[9]=H,e[10]=A,e[11]=Q):Q=e[11];const _=lt(Q);let W;e[12]!==f||e[13]!==N||e[14]!==b||e[15]!==_||e[16]!==i||e[17]!==n?(W=()=>{const L=f.trim();if(!L){ce.error(n("mainPanelTabs.hostingTab.errorEnvNameRequired"));return}if(i.some(Ne=>Lt(Ne,{name:L,scope:N}))){ce.error(n("mainPanelTabs.hostingTab.errorEnvNameDuplicate"));return}_.mutate([...i,{name:L,value:b,scope:N}],{onSuccess:()=>{d(!1),u(""),x(""),C("runtime")}})},e[12]=f,e[13]=N,e[14]=b,e[15]=_,e[16]=i,e[17]=n,e[18]=W):W=e[18];const J=W;let U;e[19]!==y||e[20]!==_||e[21]!==i?(U=L=>{_.mutate(i.map(Ne=>Lt(Ne,L)?{name:L.name,value:y,scope:L.scope}:Ne),{onSuccess:()=>S(null)})},e[19]=y,e[20]=_,e[21]=i,e[22]=U):U=e[22];const p=U;let I;e[23]!==w||e[24]!==_||e[25]!==i?(I=()=>{w&&_.mutate(i.filter(L=>!Lt(L,w)),{onSuccess:()=>j(null)})},e[23]=w,e[24]=_,e[25]=i,e[26]=I):I=e[26];const Y=I,D=_.isPending;let G;e[27]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{u(""),x(""),C("runtime")},e[27]=G):G=e[27];const O=G;let k,E;e[28]===Symbol.for("react.memo_cache_sentinel")?(k=()=>d(!0),E=t.jsx(Pt,{}),e[28]=k,e[29]=E):(k=e[28],E=e[29]);let B;e[30]!==n?(B=n("mainPanelTabs.hostingTab.addVariable"),e[30]=n,e[31]=B):B=e[31];let X;e[32]!==B?(X=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:k,children:[E,B]}),e[32]=B,e[33]=X):X=e[33];const te=X;let K;e[34]!==n?(K=n("mainPanelTabs.hostingTab.env"),e[34]=n,e[35]=K):K=e[35];const ne=i.length>0||c.length>0?te:void 0;let ie;e[36]!==te||e[37]!==c||e[38]!==y||e[39]!==P?.name||e[40]!==P?.scope||e[41]!==i||e[42]!==s||e[43]!==p||e[44]!==m||e[45]!==D||e[46]!==V||e[47]!==n?(ie=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.envError")})}):i.length===0&&c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Yt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noEnv"),className:"py-10",buttonComponent:te})}):t.jsxs(Qe,{children:[i.map(L=>{const Ne=L.scope==="build"?"build":"runtime",We=`${L.name}:${Ne}`,tt=P?.name===L.name&&P?.scope===Ne,st=V.has(We);return t.jsxs(pt,{children:[t.jsxs("div",{className:"flex min-w-0 flex-1 basis-0 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(ps,{scope:Ne})}),t.jsx("span",{className:"truncate font-mono text-xs",children:L.name})]}),t.jsx("div",{className:"flex min-w-0 flex-1 basis-0 items-center justify-end gap-2",children:tt?t.jsxs(t.Fragment,{children:[t.jsx(it,{value:y,onChange:z=>R(z.target.value),onKeyDown:z=>{z.key==="Enter"&&p({name:L.name,scope:Ne}),z.key==="Escape"&&S(null)},autoFocus:!0,className:"h-8 font-mono text-xs"}),t.jsx(Ie,{size:"sm",onClick:()=>p({name:L.name,scope:Ne}),disabled:D,children:n("mainPanelTabs.hostingTab.save")}),t.jsx(Ie,{size:"sm",variant:"ghost",onClick:()=>S(null),disabled:D,children:n("mainPanelTabs.hostingTab.cancel")})]}):t.jsxs(t.Fragment,{children:[t.jsx(et,{label:n(st?"mainPanelTabs.hostingTab.hideValue":"mainPanelTabs.hostingTab.showValue"),onClick:()=>v(We),className:"text-muted-foreground",children:st?t.jsx(Os,{}):t.jsx(qs,{})}),st?t.jsx("button",{type:"button",onClick:()=>{S({name:L.name,scope:Ne}),R(L.value)},title:n("mainPanelTabs.hostingTab.editValue"),className:"min-w-0 truncate rounded px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground hover:bg-muted hover:text-foreground",children:L.value||"—"}):t.jsx("span",{className:"min-w-0 truncate px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground/60",children:L.value?"••••••••••":"—"})]})}),t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteVariable"),onClick:()=>j({name:L.name,scope:Ne}),disabled:D,className:"text-muted-foreground",children:t.jsx(vt,{})})]},We)}),c.length>0&&t.jsxs(Ht,{children:[t.jsx(Bs,{asChild:!0,children:t.jsxs("button",{type:"button",className:"group flex w-full items-center gap-2 px-4 py-2.5 text-left text-xs text-muted-foreground hover:bg-muted/40",children:[t.jsx(xs,{className:"size-4 transition-transform duration-200 group-data-[state=open]:rotate-90 motion-reduce:transition-none"}),t.jsx(Yt,{className:"size-4"}),n("mainPanelTabs.hostingTab.codeVarsToggle",{count:String(c.length)})]})}),t.jsx(Vt,{children:t.jsx("div",{className:"divide-y divide-border/60 border-t border-border bg-muted/30",children:c.map(bn)})})]})]}),e[36]=te,e[37]=c,e[38]=y,e[39]=P?.name,e[40]=P?.scope,e[41]=i,e[42]=s,e[43]=p,e[44]=m,e[45]=D,e[46]=V,e[47]=n,e[48]=ie):ie=e[48];let Pe;e[49]===Symbol.for("react.memo_cache_sentinel")?(Pe=L=>{d(L),L||O()},e[49]=Pe):Pe=e[49];let Ce;e[50]!==n?(Ce=n("mainPanelTabs.hostingTab.addVariable"),e[50]=n,e[51]=Ce):Ce=e[51];let me;e[52]!==Ce?(me=t.jsx(yt,{children:t.jsx(St,{children:Ce})}),e[52]=Ce,e[53]=me):me=e[53];let pe;e[54]!==J?(pe=L=>{L.preventDefault(),J()},e[54]=J,e[55]=pe):pe=e[55];let le;e[56]!==n?(le=n("mainPanelTabs.hostingTab.colName"),e[56]=n,e[57]=le):le=e[57];let ae;e[58]!==le?(ae=t.jsx(Xe,{htmlFor:"env-name",children:le}),e[58]=le,e[59]=ae):ae=e[59];let de;e[60]!==n?(de=n("mainPanelTabs.hostingTab.envNamePlaceholder"),e[60]=n,e[61]=de):de=e[61];let De;e[62]===Symbol.for("react.memo_cache_sentinel")?(De=L=>u(L.target.value),e[62]=De):De=e[62];let fe;e[63]!==f||e[64]!==D||e[65]!==de?(fe=t.jsx(it,{id:"env-name",placeholder:de,value:f,onChange:De,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[63]=f,e[64]=D,e[65]=de,e[66]=fe):fe=e[66];let ue;e[67]!==ae||e[68]!==fe?(ue=t.jsxs("div",{className:"flex flex-col gap-2",children:[ae,fe]}),e[67]=ae,e[68]=fe,e[69]=ue):ue=e[69];let oe;e[70]!==n?(oe=n("mainPanelTabs.hostingTab.colValue"),e[70]=n,e[71]=oe):oe=e[71];let Te;e[72]!==oe?(Te=t.jsx(Xe,{htmlFor:"env-value",children:oe}),e[72]=oe,e[73]=Te):Te=e[73];let he;e[74]!==n?(he=n("mainPanelTabs.hostingTab.envValuePlaceholder"),e[74]=n,e[75]=he):he=e[75];let xe;e[76]===Symbol.for("react.memo_cache_sentinel")?(xe=L=>x(L.target.value),e[76]=xe):xe=e[76];let ve;e[77]!==b||e[78]!==D||e[79]!==he?(ve=t.jsx(it,{id:"env-value",placeholder:he,value:b,onChange:xe,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[77]=b,e[78]=D,e[79]=he,e[80]=ve):ve=e[80];let ye;e[81]!==Te||e[82]!==ve?(ye=t.jsxs("div",{className:"flex flex-col gap-2",children:[Te,ve]}),e[81]=Te,e[82]=ve,e[83]=ye):ye=e[83];let ge;e[84]!==n?(ge=n("mainPanelTabs.hostingTab.secretScope"),e[84]=n,e[85]=ge):ge=e[85];let re;e[86]!==ge?(re=t.jsx(Xe,{children:ge}),e[86]=ge,e[87]=re):re=e[87];let be;e[88]!==N||e[89]!==D?(be=t.jsx(xn,{value:N,onChange:C,disabled:D,className:"w-full"}),e[88]=N,e[89]=D,e[90]=be):be=e[90];let we;e[91]!==N||e[92]!==n?(we=n(N==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[91]=N,e[92]=n,e[93]=we):we=e[93];let $;e[94]!==we?($=t.jsx("p",{className:"text-xs text-muted-foreground",children:we}),e[94]=we,e[95]=$):$=e[95];let se;e[96]!==re||e[97]!==be||e[98]!==$?(se=t.jsxs("div",{className:"flex flex-col gap-2",children:[re,be,$]}),e[96]=re,e[97]=be,e[98]=$,e[99]=se):se=e[99];let Se;e[100]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{d(!1),O()},e[100]=Se):Se=e[100];let je;e[101]!==n?(je=n("mainPanelTabs.hostingTab.cancel"),e[101]=n,e[102]=je):je=e[102];let $e;e[103]!==D||e[104]!==je?($e=t.jsx(Ie,{variant:"outline",type:"button",onClick:Se,disabled:D,children:je}),e[103]=D,e[104]=je,e[105]=$e):$e=e[105];let ze;e[106]!==f||e[107]!==D?(ze=D||!f.trim(),e[106]=f,e[107]=D,e[108]=ze):ze=e[108];let Ke;e[109]!==D||e[110]!==n?(Ke=n(D?"mainPanelTabs.hostingTab.saving":"mainPanelTabs.hostingTab.add"),e[109]=D,e[110]=n,e[111]=Ke):Ke=e[111];let Le;e[112]!==ze||e[113]!==Ke?(Le=t.jsx(Ie,{type:"submit",disabled:ze,children:Ke}),e[112]=ze,e[113]=Ke,e[114]=Le):Le=e[114];let _e;e[115]!==$e||e[116]!==Le?(_e=t.jsxs(Nt,{children:[$e,Le]}),e[115]=$e,e[116]=Le,e[117]=_e):_e=e[117];let Be;e[118]!==pe||e[119]!==ue||e[120]!==ye||e[121]!==se||e[122]!==_e?(Be=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:pe,children:[ue,ye,se,_e]}),e[118]=pe,e[119]=ue,e[120]=ye,e[121]=se,e[122]=_e,e[123]=Be):Be=e[123];let Ve;e[124]!==me||e[125]!==Be?(Ve=t.jsxs(Ct,{className:"sm:max-w-md",children:[me,Be]}),e[124]=me,e[125]=Be,e[126]=Ve):Ve=e[126];let ke;e[127]!==g||e[128]!==Ve?(ke=t.jsx(Dt,{open:g,onOpenChange:Pe,children:Ve}),e[127]=g,e[128]=Ve,e[129]=ke):ke=e[129];const Je=w!=null;let He;e[130]===Symbol.for("react.memo_cache_sentinel")?(He=L=>{L||j(null)},e[130]=He):He=e[130];let Ee;e[131]!==n?(Ee=n("mainPanelTabs.hostingTab.confirmDeleteVariableTitle"),e[131]=n,e[132]=Ee):Ee=e[132];const Oe=w?.name??"";let qe;e[133]!==n||e[134]!==Oe?(qe=n("mainPanelTabs.hostingTab.confirmDeleteVariableDescription",{name:Oe}),e[133]=n,e[134]=Oe,e[135]=qe):qe=e[135];let Ue;e[136]!==n?(Ue=n("mainPanelTabs.hostingTab.deleteVariable"),e[136]=n,e[137]=Ue):Ue=e[137];let M;e[138]!==Y||e[139]!==D||e[140]!==Je||e[141]!==Ee||e[142]!==qe||e[143]!==Ue?(M=t.jsx(wt,{open:Je,onOpenChange:He,title:Ee,description:qe,confirmLabel:Ue,pending:D,onConfirm:Y}),e[138]=Y,e[139]=D,e[140]=Je,e[141]=Ee,e[142]=qe,e[143]=Ue,e[144]=M):M=e[144];let Ge;return e[145]!==K||e[146]!==ne||e[147]!==ie||e[148]!==ke||e[149]!==M?(Ge=t.jsxs(ut,{title:K,actions:ne,children:[ie,ke,M]}),e[145]=K,e[146]=ne,e[147]=ie,e[148]=ke,e[149]=M,e[150]=Ge):Ge=e[150],Ge}function bn(r){return t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 font-mono text-xs",children:[t.jsx("span",{className:"flex-1 basis-0 truncate",children:r.name}),t.jsx("span",{className:"flex-1 basis-0 truncate text-right text-muted-foreground",children:r.value})]},r.name)}function pn(r){return ce.error(rt(r))}function Tn(r){const e=ee.c(6),{type:o}=r,l=Ae(),a=o==="permanent"?"secondary":"outline";let i;e[0]!==l||e[1]!==o?(i=l(o==="permanent"?"mainPanelTabs.hostingTab.permanent":"mainPanelTabs.hostingTab.temporary"),e[0]=l,e[1]=o,e[2]=i):i=e[2];let c;return e[3]!==a||e[4]!==i?(c=t.jsx(Re,{variant:a,children:i}),e[3]=a,e[4]=i,e[5]=c):c=e[5],c}function jn(r){const e=ee.c(163),{base:o,orgSlug:l,site:a,redirects:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(null),[u,b]=Z.useState(""),[x,N]=Z.useState(""),[C,P]=Z.useState("permanent"),[S,y]=Z.useState(null),[R,w]=Z.useState(null);let j;e[0]!==l||e[1]!==n||e[2]!==a?(j=()=>n.invalidateQueries({queryKey:Ye.hostingRedirects(l,a)}),e[0]=l,e[1]=n,e[2]=a,e[3]=j):j=e[3];const T=j;let V;e[4]!==o?(V=z=>at(`${o}/redirects`,"PUT",z),e[4]=o,e[5]=V):V=e[5];let q;e[6]!==T||e[7]!==s?(q=()=>{T(),ce.success(s("mainPanelTabs.hostingTab.toastRedirectSaved")),g(!1)},e[6]=T,e[7]=s,e[8]=q):q=e[8];let F;e[9]!==V||e[10]!==q?(F={mutationFn:V,onSuccess:q,onError:vn},e[9]=V,e[10]=q,e[11]=F):F=e[11];const v=lt(F);let H;e[12]!==o?(H=z=>at(`${o}/redirects/${encodeURIComponent(z)}`,"DELETE"),e[12]=o,e[13]=H):H=e[13];let A;e[14]!==T||e[15]!==s?(A=()=>{T(),ce.success(s("mainPanelTabs.hostingTab.toastRedirectDeleted")),y(null)},e[14]=T,e[15]=s,e[16]=A):A=e[16];let Q;e[17]!==H||e[18]!==A?(Q={mutationFn:H,onSuccess:A,onError:Pn},e[17]=H,e[18]=A,e[19]=Q):Q=e[19];const _=lt(Q);let W;e[20]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{f(null),b(""),N(""),P("permanent"),g(!0)},e[20]=W):W=e[20];const J=W;let U;e[21]===Symbol.for("react.memo_cache_sentinel")?(U=z=>{f(z.from),b(z.from),N(z.to),P(z.type==="temporary"?"temporary":"permanent"),g(!0)},e[21]=U):U=e[21];const p=U;let I;e[22]!==u||e[23]!==x||e[24]!==C||e[25]!==v||e[26]!==s?(I=()=>{const z=u.trim(),Tt=x.trim();if(!z||!Tt){ce.error(s("mainPanelTabs.hostingTab.errorRedirectFieldsRequired"));return}v.mutate({from:z,to:Tt,type:C})},e[22]=u,e[23]=x,e[24]=C,e[25]=v,e[26]=s,e[27]=I):I=e[27];const Y=I;let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(Pt,{}),e[28]=D):D=e[28];let G;e[29]!==s?(G=s("mainPanelTabs.hostingTab.addRedirect"),e[29]=s,e[30]=G):G=e[30];let O;e[31]!==G?(O=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:J,children:[D,G]}),e[31]=G,e[32]=O):O=e[32];const k=O;let E;e[33]!==s?(E=s("mainPanelTabs.hostingTab.redirects"),e[33]=s,e[34]=E):E=e[34];const B=i.length>0?k:void 0;let X;e[35]!==k||e[36]!==_.isPending||e[37]!==R||e[38]!==m||e[39]!==c||e[40]!==v.isPending||e[41]!==i||e[42]!==s?(X=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.redirectsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Gt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noRedirects"),className:"py-10",buttonComponent:k})}):t.jsx(Qe,{children:i.map((z,Tt)=>{const Kt=es(z.from),$t=R===z.from;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Kt?t.jsx(Ut,{open:$t,onClick:()=>w($t?null:z.from)}):t.jsx(Gt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 font-mono text-xs",children:[t.jsx("span",{className:"truncate",children:z.from}),t.jsx(Ms,{className:"size-3.5 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"truncate text-muted-foreground",children:z.to})]}),t.jsx(Tn,{type:z.type}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.editRedirect"),onClick:()=>p(z),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(Es,{})}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteRedirect"),onClick:()=>y(z.from),disabled:_.isPending,className:"-ml-1 text-muted-foreground",children:t.jsx(vt,{})})]}),Kt&&t.jsx(bs,{open:$t,children:t.jsx(ts,{from:z.from,source:z.source})})]},z.id??`${z.from}-${Tt}`)})}),e[35]=k,e[36]=_.isPending,e[37]=R,e[38]=m,e[39]=c,e[40]=v.isPending,e[41]=i,e[42]=s,e[43]=X):X=e[43];let te;e[44]!==d||e[45]!==s?(te=d!=null?s("mainPanelTabs.hostingTab.editRedirectTitle"):s("mainPanelTabs.hostingTab.addRedirectTitle"),e[44]=d,e[45]=s,e[46]=te):te=e[46];let K;e[47]!==te?(K=t.jsx(yt,{children:t.jsx(St,{children:te})}),e[47]=te,e[48]=K):K=e[48];let ne;e[49]!==Y?(ne=z=>{z.preventDefault(),Y()},e[49]=Y,e[50]=ne):ne=e[50];let ie;e[51]!==s?(ie=s("mainPanelTabs.hostingTab.colFrom"),e[51]=s,e[52]=ie):ie=e[52];let Pe;e[53]!==ie?(Pe=t.jsx(Xe,{htmlFor:"redirect-from",children:ie}),e[53]=ie,e[54]=Pe):Pe=e[54];let Ce;e[55]!==s?(Ce=s("mainPanelTabs.hostingTab.redirectFromPlaceholder"),e[55]=s,e[56]=Ce):Ce=e[56];let me;e[57]===Symbol.for("react.memo_cache_sentinel")?(me=z=>b(z.target.value),e[57]=me):me=e[57];const pe=d!=null||v.isPending;let le;e[58]!==u||e[59]!==Ce||e[60]!==pe?(le=t.jsx(it,{id:"redirect-from",placeholder:Ce,value:u,onChange:me,className:"font-mono text-xs",disabled:pe}),e[58]=u,e[59]=Ce,e[60]=pe,e[61]=le):le=e[61];let ae;e[62]!==Pe||e[63]!==le?(ae=t.jsxs("div",{className:"flex flex-col gap-2",children:[Pe,le]}),e[62]=Pe,e[63]=le,e[64]=ae):ae=e[64];let de;e[65]!==s?(de=s("mainPanelTabs.hostingTab.colTo"),e[65]=s,e[66]=de):de=e[66];let De;e[67]!==de?(De=t.jsx(Xe,{htmlFor:"redirect-to",children:de}),e[67]=de,e[68]=De):De=e[68];let fe;e[69]!==s?(fe=s("mainPanelTabs.hostingTab.redirectToPlaceholder"),e[69]=s,e[70]=fe):fe=e[70];let ue;e[71]===Symbol.for("react.memo_cache_sentinel")?(ue=z=>N(z.target.value),e[71]=ue):ue=e[71];let oe;e[72]!==x||e[73]!==v.isPending||e[74]!==fe?(oe=t.jsx(it,{id:"redirect-to",placeholder:fe,value:x,onChange:ue,className:"font-mono text-xs",disabled:v.isPending}),e[72]=x,e[73]=v.isPending,e[74]=fe,e[75]=oe):oe=e[75];let Te;e[76]!==De||e[77]!==oe?(Te=t.jsxs("div",{className:"flex flex-col gap-2",children:[De,oe]}),e[76]=De,e[77]=oe,e[78]=Te):Te=e[78];let he;e[79]!==s?(he=s("mainPanelTabs.hostingTab.colType"),e[79]=s,e[80]=he):he=e[80];let xe;e[81]!==he?(xe=t.jsx(Xe,{children:he}),e[81]=he,e[82]=xe):xe=e[82];let ve;e[83]===Symbol.for("react.memo_cache_sentinel")?(ve=z=>P(z==="temporary"?"temporary":"permanent"),e[83]=ve):ve=e[83];const ye=v.isPending;let ge;e[84]===Symbol.for("react.memo_cache_sentinel")?(ge=t.jsx(Ot,{className:"w-full",children:t.jsx(Bt,{})}),e[84]=ge):ge=e[84];let re;e[85]!==s?(re=s("mainPanelTabs.hostingTab.permanent"),e[85]=s,e[86]=re):re=e[86];let be;e[87]!==re?(be=t.jsx(ft,{value:"permanent",children:re}),e[87]=re,e[88]=be):be=e[88];let we;e[89]!==s?(we=s("mainPanelTabs.hostingTab.temporary"),e[89]=s,e[90]=we):we=e[90];let $;e[91]!==we?($=t.jsx(ft,{value:"temporary",children:we}),e[91]=we,e[92]=$):$=e[92];let se;e[93]!==be||e[94]!==$?(se=t.jsxs(qt,{children:[be,$]}),e[93]=be,e[94]=$,e[95]=se):se=e[95];let Se;e[96]!==C||e[97]!==v.isPending||e[98]!==se?(Se=t.jsxs(Mt,{value:C,onValueChange:ve,disabled:ye,children:[ge,se]}),e[96]=C,e[97]=v.isPending,e[98]=se,e[99]=Se):Se=e[99];let je;e[100]!==xe||e[101]!==Se?(je=t.jsxs("div",{className:"flex flex-col gap-2",children:[xe,Se]}),e[100]=xe,e[101]=Se,e[102]=je):je=e[102];let $e;e[103]!==d||e[104]!==u||e[105]!==i?($e=es(u)&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(ts,{from:u,source:i.find(z=>z.from===d)?.source})}),e[103]=d,e[104]=u,e[105]=i,e[106]=$e):$e=e[106];let ze;e[107]===Symbol.for("react.memo_cache_sentinel")?(ze=()=>g(!1),e[107]=ze):ze=e[107];const Ke=v.isPending;let Le;e[108]!==s?(Le=s("mainPanelTabs.hostingTab.cancel"),e[108]=s,e[109]=Le):Le=e[109];let _e;e[110]!==v.isPending||e[111]!==Le?(_e=t.jsx(Ie,{variant:"outline",type:"button",onClick:ze,disabled:Ke,children:Le}),e[110]=v.isPending,e[111]=Le,e[112]=_e):_e=e[112];let Be;e[113]!==u||e[114]!==x||e[115]!==v.isPending?(Be=v.isPending||!u.trim()||!x.trim(),e[113]=u,e[114]=x,e[115]=v.isPending,e[116]=Be):Be=e[116];let Ve;e[117]!==v.isPending||e[118]!==s?(Ve=v.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.save"),e[117]=v.isPending,e[118]=s,e[119]=Ve):Ve=e[119];let ke;e[120]!==Be||e[121]!==Ve?(ke=t.jsx(Ie,{type:"submit",disabled:Be,children:Ve}),e[120]=Be,e[121]=Ve,e[122]=ke):ke=e[122];let Je;e[123]!==_e||e[124]!==ke?(Je=t.jsxs(Nt,{children:[_e,ke]}),e[123]=_e,e[124]=ke,e[125]=Je):Je=e[125];let He;e[126]!==ne||e[127]!==ae||e[128]!==Te||e[129]!==je||e[130]!==$e||e[131]!==Je?(He=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:ne,children:[ae,Te,je,$e,Je]}),e[126]=ne,e[127]=ae,e[128]=Te,e[129]=je,e[130]=$e,e[131]=Je,e[132]=He):He=e[132];let Ee;e[133]!==K||e[134]!==He?(Ee=t.jsxs(Ct,{className:"sm:max-w-md",children:[K,He]}),e[133]=K,e[134]=He,e[135]=Ee):Ee=e[135];let Oe;e[136]!==h||e[137]!==Ee?(Oe=t.jsx(Dt,{open:h,onOpenChange:g,children:Ee}),e[136]=h,e[137]=Ee,e[138]=Oe):Oe=e[138];const qe=S!=null;let Ue;e[139]===Symbol.for("react.memo_cache_sentinel")?(Ue=z=>{z||y(null)},e[139]=Ue):Ue=e[139];let M;e[140]!==s?(M=s("mainPanelTabs.hostingTab.confirmDeleteRedirectTitle"),e[140]=s,e[141]=M):M=e[141];const Ge=S??"";let L;e[142]!==s||e[143]!==Ge?(L=s("mainPanelTabs.hostingTab.confirmDeleteRedirectDescription",{from:Ge}),e[142]=s,e[143]=Ge,e[144]=L):L=e[144];let Ne;e[145]!==s?(Ne=s("mainPanelTabs.hostingTab.deleteRedirect"),e[145]=s,e[146]=Ne):Ne=e[146];let We;e[147]!==_||e[148]!==S?(We=()=>{S&&_.mutate(S)},e[147]=_,e[148]=S,e[149]=We):We=e[149];let tt;e[150]!==_.isPending||e[151]!==qe||e[152]!==M||e[153]!==L||e[154]!==Ne||e[155]!==We?(tt=t.jsx(wt,{open:qe,onOpenChange:Ue,title:M,description:L,confirmLabel:Ne,pending:_.isPending,onConfirm:We}),e[150]=_.isPending,e[151]=qe,e[152]=M,e[153]=L,e[154]=Ne,e[155]=We,e[156]=tt):tt=e[156];let st;return e[157]!==E||e[158]!==B||e[159]!==X||e[160]!==Oe||e[161]!==tt?(st=t.jsxs(ut,{title:E,actions:B,children:[X,Oe,tt]}),e[157]=E,e[158]=B,e[159]=X,e[160]=Oe,e[161]=tt,e[162]=st):st=e[162],st}function Pn(r){return ce.error(rt(r))}function vn(r){return ce.error(rt(r))}function yn(r){const e=ee.c(160),{base:o,orgSlug:l,site:a,secrets:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(""),[u,b]=Z.useState(""),[x,N]=Z.useState("runtime"),[C,P]=Z.useState(null);let S;e[0]!==l||e[1]!==n||e[2]!==a?(S=()=>n.invalidateQueries({queryKey:Ye.hostingSecrets(l,a)}),e[0]=l,e[1]=n,e[2]=a,e[3]=S):S=e[3];const y=S;let R;e[4]!==o?(R=M=>at(`${o}/secrets`,"PUT",M),e[4]=o,e[5]=R):R=e[5];let w;e[6]!==y||e[7]!==s?(w=()=>{y(),ce.success(s("mainPanelTabs.hostingTab.toastSecretSaved")),g(!1),f(""),b(""),N("runtime")},e[6]=y,e[7]=s,e[8]=w):w=e[8];let j;e[9]!==R||e[10]!==w?(j={mutationFn:R,onSuccess:w,onError:Nn},e[9]=R,e[10]=w,e[11]=j):j=e[11];const T=lt(j);let V;e[12]!==o?(V=M=>at(`${o}/secrets/${encodeURIComponent(M.name)}?scope=${M.scope}`,"DELETE"),e[12]=o,e[13]=V):V=e[13];let q;e[14]!==y||e[15]!==s?(q=()=>{y(),ce.success(s("mainPanelTabs.hostingTab.toastSecretDeleted")),P(null)},e[14]=y,e[15]=s,e[16]=q):q=e[16];let F;e[17]!==V||e[18]!==q?(F={mutationFn:V,onSuccess:q,onError:Sn},e[17]=V,e[18]=q,e[19]=F):F=e[19];const v=lt(F);let H;e[20]!==d||e[21]!==x||e[22]!==u||e[23]!==T||e[24]!==s?(H=()=>{const M=d.trim();if(!M){ce.error(s("mainPanelTabs.hostingTab.errorSecretNameRequired"));return}if(!u){ce.error(s("mainPanelTabs.hostingTab.errorSecretValueRequired"));return}T.mutate({name:M,value:u,scope:x})},e[20]=d,e[21]=x,e[22]=u,e[23]=T,e[24]=s,e[25]=H):H=e[25];const A=H;let Q,_;e[26]===Symbol.for("react.memo_cache_sentinel")?(_=()=>g(!0),Q=t.jsx(Pt,{}),e[26]=Q,e[27]=_):(Q=e[26],_=e[27]);let W;e[28]!==s?(W=s("mainPanelTabs.hostingTab.addSecret"),e[28]=s,e[29]=W):W=e[29];let J;e[30]!==W?(J=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[Q,W]}),e[30]=W,e[31]=J):J=e[31];const U=J;let p;e[32]!==s?(p=s("mainPanelTabs.hostingTab.secrets"),e[32]=s,e[33]=p):p=e[33];const I=i.length>0?U:void 0;let Y;e[34]!==U||e[35]!==v.isPending||e[36]!==m||e[37]!==c||e[38]!==i||e[39]!==s?(Y=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.secretsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Wt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noSecrets"),className:"py-10",buttonComponent:U})}):t.jsx(Qe,{children:i.map(M=>{const Ge=M.scope==="build"?"build":"runtime";return t.jsxs(pt,{children:[t.jsx(Wt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(ps,{scope:Ge})}),t.jsx("span",{className:"truncate font-mono text-xs",children:M.name}),M.origin==="worker"&&t.jsx(Re,{variant:"secondary",children:s("mainPanelTabs.hostingTab.secretOnWorker")})]}),t.jsx("span",{className:"font-mono text-xs text-muted-foreground/60",children:s("mainPanelTabs.hostingTab.secretValueHidden")}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteSecret"),onClick:()=>P({name:M.name,scope:Ge}),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]},`${M.name}:${Ge}`)})}),e[34]=U,e[35]=v.isPending,e[36]=m,e[37]=c,e[38]=i,e[39]=s,e[40]=Y):Y=e[40];let D;e[41]!==s?(D=s("mainPanelTabs.hostingTab.addSecretTitle"),e[41]=s,e[42]=D):D=e[42];let G;e[43]!==D?(G=t.jsx(yt,{children:t.jsx(St,{children:D})}),e[43]=D,e[44]=G):G=e[44];let O;e[45]!==A?(O=M=>{M.preventDefault(),A()},e[45]=A,e[46]=O):O=e[46];let k;e[47]!==s?(k=s("mainPanelTabs.hostingTab.colName"),e[47]=s,e[48]=k):k=e[48];let E;e[49]!==k?(E=t.jsx(Xe,{htmlFor:"secret-name",children:k}),e[49]=k,e[50]=E):E=e[50];let B;e[51]!==s?(B=s("mainPanelTabs.hostingTab.secretNamePlaceholder"),e[51]=s,e[52]=B):B=e[52];let X;e[53]===Symbol.for("react.memo_cache_sentinel")?(X=M=>f(M.target.value),e[53]=X):X=e[53];let te;e[54]!==d||e[55]!==T.isPending||e[56]!==B?(te=t.jsx(it,{id:"secret-name",placeholder:B,value:d,onChange:X,className:"font-mono text-xs",autoComplete:"off",disabled:T.isPending}),e[54]=d,e[55]=T.isPending,e[56]=B,e[57]=te):te=e[57];let K;e[58]!==E||e[59]!==te?(K=t.jsxs("div",{className:"flex flex-col gap-2",children:[E,te]}),e[58]=E,e[59]=te,e[60]=K):K=e[60];let ne;e[61]!==s?(ne=s("mainPanelTabs.hostingTab.colValue"),e[61]=s,e[62]=ne):ne=e[62];let ie;e[63]!==ne?(ie=t.jsx(Xe,{htmlFor:"secret-value",children:ne}),e[63]=ne,e[64]=ie):ie=e[64];let Pe;e[65]!==s?(Pe=s("mainPanelTabs.hostingTab.secretValuePlaceholder"),e[65]=s,e[66]=Pe):Pe=e[66];let Ce;e[67]===Symbol.for("react.memo_cache_sentinel")?(Ce=M=>b(M.target.value),e[67]=Ce):Ce=e[67];let me;e[68]!==u||e[69]!==T.isPending||e[70]!==Pe?(me=t.jsx(it,{id:"secret-value",type:"password",placeholder:Pe,value:u,onChange:Ce,className:"font-mono text-xs",autoComplete:"new-password",disabled:T.isPending}),e[68]=u,e[69]=T.isPending,e[70]=Pe,e[71]=me):me=e[71];let pe;e[72]!==ie||e[73]!==me?(pe=t.jsxs("div",{className:"flex flex-col gap-2",children:[ie,me]}),e[72]=ie,e[73]=me,e[74]=pe):pe=e[74];let le;e[75]!==s?(le=s("mainPanelTabs.hostingTab.secretScope"),e[75]=s,e[76]=le):le=e[76];let ae;e[77]!==le?(ae=t.jsx(Xe,{children:le}),e[77]=le,e[78]=ae):ae=e[78];let de;e[79]===Symbol.for("react.memo_cache_sentinel")?(de=M=>N(M==="build"?"build":"runtime"),e[79]=de):de=e[79];const De=T.isPending;let fe;e[80]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(Ot,{className:"w-full",children:t.jsx(Bt,{})}),e[80]=fe):fe=e[80];let ue;e[81]!==s?(ue=s("mainPanelTabs.hostingTab.secretScopeRuntime"),e[81]=s,e[82]=ue):ue=e[82];let oe;e[83]!==ue?(oe=t.jsx(ft,{value:"runtime",children:ue}),e[83]=ue,e[84]=oe):oe=e[84];let Te;e[85]!==s?(Te=s("mainPanelTabs.hostingTab.secretScopeBuild"),e[85]=s,e[86]=Te):Te=e[86];let he;e[87]!==Te?(he=t.jsx(ft,{value:"build",children:Te}),e[87]=Te,e[88]=he):he=e[88];let xe;e[89]!==oe||e[90]!==he?(xe=t.jsxs(qt,{children:[oe,he]}),e[89]=oe,e[90]=he,e[91]=xe):xe=e[91];let ve;e[92]!==x||e[93]!==T.isPending||e[94]!==xe?(ve=t.jsxs(Mt,{value:x,onValueChange:de,disabled:De,children:[fe,xe]}),e[92]=x,e[93]=T.isPending,e[94]=xe,e[95]=ve):ve=e[95];let ye;e[96]!==x||e[97]!==s?(ye=s(x==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[96]=x,e[97]=s,e[98]=ye):ye=e[98];let ge;e[99]!==ye?(ge=t.jsx("p",{className:"text-xs text-muted-foreground",children:ye}),e[99]=ye,e[100]=ge):ge=e[100];let re;e[101]!==ae||e[102]!==ve||e[103]!==ge?(re=t.jsxs("div",{className:"flex flex-col gap-2",children:[ae,ve,ge]}),e[101]=ae,e[102]=ve,e[103]=ge,e[104]=re):re=e[104];let be;e[105]===Symbol.for("react.memo_cache_sentinel")?(be=()=>g(!1),e[105]=be):be=e[105];const we=T.isPending;let $;e[106]!==s?($=s("mainPanelTabs.hostingTab.cancel"),e[106]=s,e[107]=$):$=e[107];let se;e[108]!==T.isPending||e[109]!==$?(se=t.jsx(Ie,{variant:"outline",type:"button",onClick:be,disabled:we,children:$}),e[108]=T.isPending,e[109]=$,e[110]=se):se=e[110];let Se;e[111]!==d||e[112]!==u||e[113]!==T.isPending?(Se=T.isPending||!d.trim()||!u,e[111]=d,e[112]=u,e[113]=T.isPending,e[114]=Se):Se=e[114];let je;e[115]!==T.isPending||e[116]!==s?(je=T.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.add"),e[115]=T.isPending,e[116]=s,e[117]=je):je=e[117];let $e;e[118]!==Se||e[119]!==je?($e=t.jsx(Ie,{type:"submit",disabled:Se,children:je}),e[118]=Se,e[119]=je,e[120]=$e):$e=e[120];let ze;e[121]!==se||e[122]!==$e?(ze=t.jsxs(Nt,{children:[se,$e]}),e[121]=se,e[122]=$e,e[123]=ze):ze=e[123];let Ke;e[124]!==O||e[125]!==K||e[126]!==pe||e[127]!==re||e[128]!==ze?(Ke=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:O,children:[K,pe,re,ze]}),e[124]=O,e[125]=K,e[126]=pe,e[127]=re,e[128]=ze,e[129]=Ke):Ke=e[129];let Le;e[130]!==G||e[131]!==Ke?(Le=t.jsxs(Ct,{className:"sm:max-w-md",children:[G,Ke]}),e[130]=G,e[131]=Ke,e[132]=Le):Le=e[132];let _e;e[133]!==h||e[134]!==Le?(_e=t.jsx(Dt,{open:h,onOpenChange:g,children:Le}),e[133]=h,e[134]=Le,e[135]=_e):_e=e[135];const Be=C!=null;let Ve;e[136]===Symbol.for("react.memo_cache_sentinel")?(Ve=M=>{M||P(null)},e[136]=Ve):Ve=e[136];let ke;e[137]!==s?(ke=s("mainPanelTabs.hostingTab.confirmDeleteSecretTitle"),e[137]=s,e[138]=ke):ke=e[138];const Je=C?.name??"";let He;e[139]!==s||e[140]!==Je?(He=s("mainPanelTabs.hostingTab.confirmDeleteSecretDescription",{name:Je}),e[139]=s,e[140]=Je,e[141]=He):He=e[141];let Ee;e[142]!==s?(Ee=s("mainPanelTabs.hostingTab.deleteSecret"),e[142]=s,e[143]=Ee):Ee=e[143];let Oe;e[144]!==v||e[145]!==C?(Oe=()=>{C&&v.mutate(C)},e[144]=v,e[145]=C,e[146]=Oe):Oe=e[146];let qe;e[147]!==v.isPending||e[148]!==Be||e[149]!==ke||e[150]!==He||e[151]!==Ee||e[152]!==Oe?(qe=t.jsx(wt,{open:Be,onOpenChange:Ve,title:ke,description:He,confirmLabel:Ee,pending:v.isPending,onConfirm:Oe}),e[147]=v.isPending,e[148]=Be,e[149]=ke,e[150]=He,e[151]=Ee,e[152]=Oe,e[153]=qe):qe=e[153];let Ue;return e[154]!==p||e[155]!==I||e[156]!==Y||e[157]!==_e||e[158]!==qe?(Ue=t.jsxs(ut,{title:p,actions:I,children:[Y,_e,qe]}),e[154]=p,e[155]=I,e[156]=Y,e[157]=_e,e[158]=qe,e[159]=Ue):Ue=e[159],Ue}function Sn(r){return ce.error(rt(r))}function Nn(r){return ce.error(rt(r))}const Cn=3e4;function El(r){const e=ee.c(111),{virtualMcpId:o}=r,l=Ae(),{org:a}=Ds(),i=Rs(o),c=Fs(i),m=!!c,s=c?`/api/${a.slug}/hosting/${encodeURIComponent(c)}`:"";let n;e[0]!==s||e[1]!==m?(n=(O,k)=>({queryKey:O,queryFn:()=>Qt(`${s}${k}`),enabled:m,retry:!1,staleTime:Cn}),e[0]=s,e[1]=m,e[2]=n):n=e[2];const h=n,g=c??"",d=ct(h(Ye.hostingDeployments(a.slug,g),"/deployments")),f=ct(h(Ye.hostingEnv(a.slug,g),"/env")),u=ct(h(Ye.hostingSecrets(a.slug,g),"/secrets")),b=ct(h(Ye.hostingRedirects(a.slug,g),"/redirects")),x=ct(h(Ye.hostingDomains(a.slug,g),"/domains"));if(!c){let O;e[3]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[3]=O):O=e[3];let k;e[4]!==l?(k=l("mainPanelTabs.hostingTab.noSiteTitle"),e[4]=l,e[5]=k):k=e[5];let E;e[6]!==l?(E=l("mainPanelTabs.hostingTab.noSiteDescription"),e[6]=l,e[7]=E):E=e[7];let B;return e[8]!==k||e[9]!==E?(B=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[8]=k,e[9]=E,e[10]=B):B=e[10],B}if(jt(d.error)&&jt(f.error)&&jt(b.error)){let O;e[11]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[11]=O):O=e[11];let k;e[12]!==l?(k=l("mainPanelTabs.hostingTab.notConnectedTitle"),e[12]=l,e[13]=k):k=e[13];let E;e[14]!==l?(E=l("mainPanelTabs.hostingTab.notConnectedDescription"),e[14]=l,e[15]=E):E=e[15];let B;return e[16]!==k||e[17]!==E?(B=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[16]=k,e[17]=E,e[18]=B):B=e[18],B}let C,P,S,y,R,w,j,T,V,q;if(e[19]!==d.data||e[20]!==x.data||e[21]!==f.data||e[22]!==b.data||e[23]!==u.data){P=mt(d.data,"items");let O;e[34]!==f.data?(O=mt(f.data,"vars"),e[34]=f.data,e[35]=O):O=e[35],R=O;let k;e[36]!==f.data?(k=mt(f.data,"codeVars"),e[36]=f.data,e[37]=k):k=e[37],C=k;let E;e[38]!==u.data?(E=mt(u.data,"secrets"),e[38]=u.data,e[39]=E):E=e[39],V=E;let B;e[40]!==b.data?(B=mt(b.data,"items"),e[40]=b.data,e[41]=B):B=e[41],T=B;const X=x.data;let te;e[42]!==X?.items?(te=X?.items??[],e[42]=X?.items,e[43]=te):te=e[43],y=te;let K;e[44]!==X?.dnsTemplate?(K=X?.dnsTemplate??[],e[44]=X?.dnsTemplate,e[45]=K):K=e[45],S=K;const ne=P.find(wn);w=zt((ne??P.find(Dn))?.framework),j=ne?.servingUrl??null,q=j?j.replace(/^https?:\/\//,"").replace(/\/$/,""):null,e[19]=d.data,e[20]=x.data,e[21]=f.data,e[22]=b.data,e[23]=u.data,e[24]=C,e[25]=P,e[26]=S,e[27]=y,e[28]=R,e[29]=w,e[30]=j,e[31]=T,e[32]=V,e[33]=q}else C=e[24],P=e[25],S=e[26],y=e[27],R=e[28],w=e[29],j=e[30],T=e[31],V=e[32],q=e[33];const F=q;let v;e[46]!==s||e[47]!==a.slug||e[48]!==c?(v=t.jsx(Gs,{base:s,orgSlug:a.slug,site:c}),e[46]=s,e[47]=a.slug,e[48]=c,e[49]=v):v=e[49];let H;e[50]!==l?(H=l("mainPanelTabs.hostingTab.title"),e[50]=l,e[51]=H):H=e[51];let A;e[52]!==w?(A=w&&t.jsx(Re,{variant:"secondary",children:w}),e[52]=w,e[53]=A):A=e[53];let Q;e[54]!==H||e[55]!==A?(Q=t.jsxs("span",{className:"inline-flex items-center gap-2.5",children:[H,A]}),e[54]=H,e[55]=A,e[56]=Q):Q=e[56];let _;e[57]!==v||e[58]!==Q?(_=t.jsx(Jt.Title,{actions:v,children:Q}),e[57]=v,e[58]=Q,e[59]=_):_=e[59];let W;e[60]!==F||e[61]!==j?(W=j&&F&&t.jsx("p",{className:"flex flex-wrap items-center gap-x-1.5 text-sm text-muted-foreground",children:t.jsxs("a",{href:j,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 font-mono text-xs text-foreground hover:underline",children:[F,t.jsx(_t,{className:"size-3"})]})}),e[60]=F,e[61]=j,e[62]=W):W=e[62];let J;e[63]!==_||e[64]!==W?(J=t.jsxs("div",{className:"flex flex-col gap-2",children:[_,W]}),e[63]=_,e[64]=W,e[65]=J):J=e[65];let U;e[66]!==s||e[67]!==P||e[68]!==d.error||e[69]!==d.isLoading||e[70]!==m||e[71]!==a.slug||e[72]!==c?(U=t.jsx(nn,{base:s,orgSlug:a.slug,site:c,enabled:m,deployments:P,isLoading:d.isLoading,error:d.error}),e[66]=s,e[67]=P,e[68]=d.error,e[69]=d.isLoading,e[70]=m,e[71]=a.slug,e[72]=c,e[73]=U):U=e[73];let p;e[74]!==s||e[75]!==C||e[76]!==f.error||e[77]!==f.isLoading||e[78]!==R||e[79]!==a.slug||e[80]!==c?(p=t.jsx(gn,{base:s,orgSlug:a.slug,site:c,envVars:R,codeVars:C,isLoading:f.isLoading,error:f.error}),e[74]=s,e[75]=C,e[76]=f.error,e[77]=f.isLoading,e[78]=R,e[79]=a.slug,e[80]=c,e[81]=p):p=e[81];let I;e[82]!==s||e[83]!==a.slug||e[84]!==V||e[85]!==u.error||e[86]!==u.isLoading||e[87]!==c?(I=t.jsx(yn,{base:s,orgSlug:a.slug,site:c,secrets:V,isLoading:u.isLoading,error:u.error}),e[82]=s,e[83]=a.slug,e[84]=V,e[85]=u.error,e[86]=u.isLoading,e[87]=c,e[88]=I):I=e[88];let Y;e[89]!==s||e[90]!==S||e[91]!==y||e[92]!==x.error||e[93]!==x.isLoading||e[94]!==a.slug||e[95]!==c?(Y=t.jsx(fn,{base:s,orgSlug:a.slug,site:c,domains:y,dnsTemplate:S,isLoading:x.isLoading,error:x.error}),e[89]=s,e[90]=S,e[91]=y,e[92]=x.error,e[93]=x.isLoading,e[94]=a.slug,e[95]=c,e[96]=Y):Y=e[96];let D;e[97]!==s||e[98]!==a.slug||e[99]!==T||e[100]!==b.error||e[101]!==b.isLoading||e[102]!==c?(D=t.jsx(jn,{base:s,orgSlug:a.slug,site:c,redirects:T,isLoading:b.isLoading,error:b.error}),e[97]=s,e[98]=a.slug,e[99]=T,e[100]=b.error,e[101]=b.isLoading,e[102]=c,e[103]=D):D=e[103];let G;return e[104]!==U||e[105]!==p||e[106]!==I||e[107]!==Y||e[108]!==D||e[109]!==J?(G=t.jsx("div",{className:"h-full min-h-0 overflow-y-auto",children:t.jsx(Jt.Body,{maxWidth:"max-w-5xl",children:t.jsxs(ws,{children:[J,U,p,I,Y,D]})})}),e[104]=U,e[105]=p,e[106]=I,e[107]=Y,e[108]=D,e[109]=J,e[110]=G):G=e[110],G}function Dn(r){return r.framework}function wn(r){return r.up===!0}export{El as HostingTab};
@@ -1 +1 @@
1
- import{c as f,f as p,c2 as u,j as s,bA as x,N as a}from"./index-DmMXAqxC.js";import{C as j}from"./capability-load-error-C2MVQTkh.js";function d(){const t=f.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:g,error:c}=u();if(g){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(x,{}),t[1]=e):e=t[1],e}if(c){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{d as default};
1
+ import{c as f,f as p,c2 as u,j as s,bA as x,N as a}from"./index-COKDKMgK.js";import{C as j}from"./capability-load-error-x5n-DlZV.js";function d(){const t=f.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:g,error:c}=u();if(g){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(x,{}),t[1]=e):e=t[1],e}if(c){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{d as default};
@@ -1 +1 @@
1
- import{bO as g,fe as d,ff as v}from"./index-DmMXAqxC.js";var p=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=a&&r==="forward",o=c&&r==="forward",n=a&&r==="backward",f=c&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{p as I};
1
+ import{bO as g,fe as d,ff as v}from"./index-COKDKMgK.js";var p=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=a&&r==="forward",o=c&&r==="forward",n=a&&r==="backward",f=c&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{p as I};