decocms 4.348.0 → 4.350.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/dist/client/assets/{AlertCircle-U9pv2NJQ.js → AlertCircle-BMk6q2FA.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CC-EQfkr.js → AreaChart-BLsqA7uB.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-FEKnVEE6.js → ArrowLeft-CBdaifdY.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-YeNm0TCu.js → ArrowRight-k7OlY3ZV.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-zrcAFzEu.js → ArrowUp-BrUqWSUA.js} +1 -1
  6. package/dist/client/assets/{Check-H7Mmr0MJ.js → Check-BRo4TcYL.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DA8ScrFC.js → CheckCircle-ByifJ5DN.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-DO3RC1pd.js → ChevronRight-CL-1AW54.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical--A8HrUqB.js → ChevronSelectorVertical-D89G1wQX.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-BP8TOpcT.js → ChevronUp-DRrtPFPU.js} +1 -1
  11. package/dist/client/assets/{Copy01-C3i-U8ZG.js → Copy01-Cz84dNWo.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-CNl0cUX6.js → CreditCard01-16ccuHl7.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-Bt-VkXeN.js → DotsVertical-CUeujFxe.js} +1 -1
  14. package/dist/client/assets/{Download01-B_WTEIkC.js → Download01-BY5nFlV8.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-DXwUT8Pm.js → ErrorBarContext-laRz9pMB.js} +1 -1
  16. package/dist/client/assets/{Eye-ikYAyCJB.js → Eye-DSfFTZ0l.js} +1 -1
  17. package/dist/client/assets/{GitBranch01-ClVrLal8.js → GitBranch01-CzoRmimO.js} +1 -1
  18. package/dist/client/assets/{Globe01-BwbIv0-p.js → Globe01-DhXQEmKy.js} +1 -1
  19. package/dist/client/assets/{HardDrive-CXyeDYVm.js → HardDrive-Dz1jdiPQ.js} +1 -1
  20. package/dist/client/assets/{Image01-EEtalrwj.js → Image01-ChEQz8oh.js} +1 -1
  21. package/dist/client/assets/{Key01-Dfc1sl9E.js → Key01-BOmG8BKE.js} +1 -1
  22. package/dist/client/assets/{Link01-BjYhVWwh.js → Link01-DkfXBBhQ.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01-D79zgSZj.js → LinkExternal01-CbmJH8Oa.js} +1 -1
  24. package/dist/client/assets/{Monitor01-CcAhoL31.js → Monitor01-D0BOdaeR.js} +1 -1
  25. package/dist/client/assets/{Package-1FrUQ_EG.js → Package-BtdRPN0k.js} +1 -1
  26. package/dist/client/assets/{Palette-BixW1ssS.js → Palette-D3howidE.js} +1 -1
  27. package/dist/client/assets/{Play-DZ4DLqc8.js → Play-BRZZbBP9.js} +1 -1
  28. package/dist/client/assets/{Plus-DeGsbqDF.js → Plus-CHPz10Kd.js} +1 -1
  29. package/dist/client/assets/SearchLg-B8u5Z_-p.js +1 -0
  30. package/dist/client/assets/{SearchMd-BNuJvIQD.js → SearchMd-BfOW0ihr.js} +1 -1
  31. package/dist/client/assets/{Sector-oNzpp3He.js → Sector-C7O4njZA.js} +3 -3
  32. package/dist/client/assets/{Settings02-DrHeXPDm.js → Settings02-5Mu_nYD8.js} +1 -1
  33. package/dist/client/assets/{Share07-BDAimDHi.js → Share07-B8Aw6CDi.js} +1 -1
  34. package/dist/client/assets/{Shield01-DnbggGAu.js → Shield01-BCG_3DYj.js} +1 -1
  35. package/dist/client/assets/{Stars01-DoidW0k0.js → Stars01-foIfuOVN.js} +1 -1
  36. package/dist/client/assets/{Sun-bCSbt1Ff.js → Sun-BzWxkbN5.js} +1 -1
  37. package/dist/client/assets/{Tool01-CyDReH3q.js → Tool01-BEvJ_YW1.js} +1 -1
  38. package/dist/client/assets/{Tool02-CtNw7bNe.js → Tool02-BJ6DrdG_.js} +1 -1
  39. package/dist/client/assets/{Trash01-DcTV6bg0.js → Trash01-BV_RW_ot.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-ClNnKXkn.js → TrendUp01-BQU61XVU.js} +1 -1
  41. package/dist/client/assets/{Upload01-Ct4yKwsS.js → Upload01-CzJgAWQf.js} +1 -1
  42. package/dist/client/assets/{User01-QYqaP7k3.js → User01-BYo154It.js} +1 -1
  43. package/dist/client/assets/{UserSquare-B1psP4hc.js → UserSquare-B8muuAeC.js} +1 -1
  44. package/dist/client/assets/{Users01-CiWVH62V.js → Users01-CCJxFqcF.js} +1 -1
  45. package/dist/client/assets/{Users03-D6zVISLF.js → Users03-B3GcmkAW.js} +1 -1
  46. package/dist/client/assets/{XCircle-DyKp194a.js → XCircle-B00jwioD.js} +1 -1
  47. package/dist/client/assets/{XClose-McE2ySi-.js → XClose-BSY1lYTG.js} +1 -1
  48. package/dist/client/assets/{Zap-nYGNb9hC.js → Zap-u6tF2K1C.js} +1 -1
  49. package/dist/client/assets/{ZoomOut-CqfoYky-.js → ZoomOut-GAT73I28.js} +1 -1
  50. package/dist/client/assets/{access-gate-CH5FSeIV.js → access-gate-BUfTolQd.js} +1 -1
  51. package/dist/client/assets/agent-icon-CaI0ggpq.js +1 -0
  52. package/dist/client/assets/agents-list-DLUa5_h5.js +1 -0
  53. package/dist/client/assets/{ai-providers-BFaxW6kI.js → ai-providers-CpT_7AV2.js} +1 -1
  54. package/dist/client/assets/{alert-6i_2sx2u.js → alert-BG7MpKMj.js} +1 -1
  55. package/dist/client/assets/{alert-dialog-BIwJfWwl.js → alert-dialog-BJoAnvTa.js} +2 -2
  56. package/dist/client/assets/analytics-tab-CVYQKeUX.js +2 -0
  57. package/dist/client/assets/{api-keys-U9NJedFL.js → api-keys-C1X3ZED1.js} +1 -1
  58. package/dist/client/assets/api-keys-CgATwrHZ.js +1 -0
  59. package/dist/client/assets/app-editor-CLUQ5UuG.js +1 -0
  60. package/dist/client/assets/{auth-BVYw4FRF.js → auth-DrTXT3NH.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-DG1z4Yrp.js → auth-catchall--kEE8BrW.js} +1 -1
  62. package/dist/client/assets/{auth-entry-65gjdT0Q.js → auth-entry-Bypdb_OP.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout--QyhC9AU.js → auth-split-layout-C9p5qokp.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-B1Xd_JVd.js → authenticate-and-persist-oauth-BSOO7-Ru.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-qgJpJ0m6.js → automation-list-row-CUdrE7CI.js} +1 -1
  66. package/dist/client/assets/{automation-runs-DI-xL2M5.js → automation-runs-staCAMV3.js} +27 -27
  67. package/dist/client/assets/automations-BblO5Bed.js +1 -0
  68. package/dist/client/assets/{autosend-CxKrnLl5.js → autosend-BLWBLlQp.js} +1 -1
  69. package/dist/client/assets/{avatar-C8Mb6TNg.js → avatar-8wWRKAWW.js} +1 -1
  70. package/dist/client/assets/{badge-DaEVG-87.js → badge-Dc8kcV5t.js} +1 -1
  71. package/dist/client/assets/{block-document-D8nzQnLu.js → block-document-0d7k0rKQ.js} +1 -1
  72. package/dist/client/assets/{breadcrumb-DCFVI-vF.js → breadcrumb-DTve-fNU.js} +1 -1
  73. package/dist/client/assets/{buckets-nyX_HxUQ.js → buckets-Bgjegid2.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-BQukMuKz.js → bulk-category-panel-BXxBWLb6.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-D2g3S_3R.js → capability-load-error-Bt-0_xjM.js} +1 -1
  76. package/dist/client/assets/{cards-CTM3PZ_9.js → cards-C2rTb-Sr.js} +1 -1
  77. package/dist/client/assets/category-editor-DTJMv5Az.js +1 -0
  78. package/dist/client/assets/{cdn-tab-B8_LIanh.js → cdn-tab-DKXQ2vhA.js} +1 -1
  79. package/dist/client/assets/{chart-DA0R9QFL.js → chart-DmKqaSZG.js} +1 -1
  80. package/dist/client/assets/{chat-context-BvcjAKGC.js → chat-context-C48t2Pu7.js} +5 -5
  81. package/dist/client/assets/{checkbox-E8AiLxWP.js → checkbox-CNie4rus.js} +1 -1
  82. package/dist/client/assets/choose-editor-De8eese3.js +1 -0
  83. package/dist/client/assets/{cli-auth-success-C1hdea_C.js → cli-auth-success-2KTVF2ia.js} +1 -1
  84. package/dist/client/assets/{client-icons-BiGI-rVs.js → client-icons-DJ5EKjKX.js} +1 -1
  85. package/dist/client/assets/collection-detail-CIWvltBQ.js +1 -0
  86. package/dist/client/assets/{collection-display-button-p1WL8L5A.js → collection-display-button-CueahYcm.js} +1 -1
  87. package/dist/client/assets/{collection-search-BFuAKML3.js → collection-search-C-vZtduC.js} +1 -1
  88. package/dist/client/assets/{collection-table-wrapper-B3leyUk1.js → collection-table-wrapper-BapDNTsG.js} +1 -1
  89. package/dist/client/assets/{collection-tabs-jnYmxyBx.js → collection-tabs-BnDECkbQ.js} +1 -1
  90. package/dist/client/assets/{command-BTB0umeF.js → command-Dodm-w8K.js} +1 -1
  91. package/dist/client/assets/commerce-onboarding-DXMBUTDz.js +1 -0
  92. package/dist/client/assets/{connect-CiClwP-h.js → connect-j2mlrPiR.js} +2 -2
  93. package/dist/client/assets/{connect-layout-B8tnAWgZ.js → connect-layout-DiecLu9A.js} +1 -1
  94. package/dist/client/assets/{connection-lcMS2LdS.js → connection-BT2Nvm5b.js} +1 -1
  95. package/dist/client/assets/{connection-card-Elfgtygk.js → connection-card-DoxPiAfH.js} +1 -1
  96. package/dist/client/assets/connection-detail-DV4_FKFy.js +1 -0
  97. package/dist/client/assets/{connection-form-helpers-M1vgWgMZ.js → connection-form-helpers-422OHKLl.js} +1 -1
  98. package/dist/client/assets/connections-CRaA-93j.js +1 -0
  99. package/dist/client/assets/{create-organization-dialog-Csth32xO.js → create-organization-dialog-D8vhxdyz.js} +1 -1
  100. package/dist/client/assets/{decopilot-sse-pool-AajGLnoQ.js → decopilot-sse-pool-CC8xuhpc.js} +1 -1
  101. package/dist/client/assets/{dialog-DTWAhfaj.js → dialog-Cz0TyjbB.js} +1 -1
  102. package/dist/client/assets/{domain-settings-DENjXXRv.js → domain-settings-4DGH3ghA.js} +1 -1
  103. package/dist/client/assets/{drawer-BksB5Qvf.js → drawer-BJF-pfh2.js} +1 -1
  104. package/dist/client/assets/{dropdown-menu-BPZS68Mf.js → dropdown-menu-BNXoL43E.js} +1 -1
  105. package/dist/client/assets/e2e-tab-Cn2FXk4V.js +1 -0
  106. package/dist/client/assets/{editor-D74qHqnA.js → editor-COagHbmc.js} +1 -1
  107. package/dist/client/assets/{empty-state-2QI0GDcc.js → empty-state-BcShOK8y.js} +1 -1
  108. package/dist/client/assets/{empty-state-5b6uGere.js → empty-state-R3Gf1cup.js} +1 -1
  109. package/dist/client/assets/{extract-connection-data-CTWz8EOk.js → extract-connection-data-WnP-t00f.js} +1 -1
  110. package/dist/client/assets/file-explorer-DoJ3JAGu.js +2 -0
  111. package/dist/client/assets/{file-type-icon-CKa9k4Eo.js → file-type-icon-CkFKND12.js} +1 -1
  112. package/dist/client/assets/{folder-icon-EabOWuN5.js → folder-icon-B_G8NPBM.js} +1 -1
  113. package/dist/client/assets/{form-BbWAigc0.js → form-BI8lXaWf.js} +1 -1
  114. package/dist/client/assets/general-DpFlP6Mv.js +1 -0
  115. package/dist/client/assets/{github-icon-D3DXPILS.js → github-icon-Bh8cYN11.js} +1 -1
  116. package/dist/client/assets/{hooks-Bj0aWBZV.js → hooks-DQxSpV5B.js} +1 -1
  117. package/dist/client/assets/hosting-tab-c114uUEI.js +1 -0
  118. package/dist/client/assets/{index-bZJ_OWgL.js → index-B4q20JqK.js} +1 -1
  119. package/dist/client/assets/{index-I0fSGHxP.js → index-BPQ0yfn_.js} +1 -1
  120. package/dist/client/assets/{index-TOMs0gOM.js → index-BQndpmm6.js} +2 -2
  121. package/dist/client/assets/index-Bsw_h-fN.js +1 -0
  122. package/dist/client/assets/{index-CttZrzIJ.js → index-CHwEdqc6.js} +1 -1
  123. package/dist/client/assets/{index-CcEKn9GL.js → index-CS7wGNbF.js} +1 -1
  124. package/dist/client/assets/index-Cj0gEWsO.css +1 -0
  125. package/dist/client/assets/{index-D3DIhOCa.js → index-D7c3ENS3.js} +1 -1
  126. package/dist/client/assets/{index-DZsx-GLV.js → index-DJQUO_5F.js} +25 -25
  127. package/dist/client/assets/{index-pnchsg3N.js → index-DUxHsoB3.js} +1 -1
  128. package/dist/client/assets/index-DfKKmgLE.js +827 -0
  129. package/dist/client/assets/{index-NlvkyqXy.js → index-SlLtg_R2.js} +1 -1
  130. package/dist/client/assets/index-redirect-CMnNA3cO.js +1 -0
  131. package/dist/client/assets/{infiniteQueryObserver-CN-Yb9Nr.js → infiniteQueryObserver-Dz5k81cL.js} +1 -1
  132. package/dist/client/assets/{infra-billing-CCYPhVJl.js → infra-billing-38iVSWLx.js} +1 -1
  133. package/dist/client/assets/{input-DBkq-ui7.js → input-DAq8Cogd.js} +1 -1
  134. package/dist/client/assets/{integration-icon-CoQDsKMQ.js → integration-icon-eQHWUfyl.js} +1 -1
  135. package/dist/client/assets/{invite-member-dialog-DHhflO7x.js → invite-member-dialog-BOj3Gkcq.js} +1 -1
  136. package/dist/client/assets/{label-XljGvqhv.js → label-C5IuR8oP.js} +1 -1
  137. package/dist/client/assets/{layout-DMMEJgp_.js → layout-BpEmheyC.js} +1 -1
  138. package/dist/client/assets/{login-DSFqd2Cw.js → login-DUbU__Dn.js} +1 -1
  139. package/dist/client/assets/{markdown-C6BHxHIr.js → markdown-gi_MNGvw.js} +1 -1
  140. package/dist/client/assets/{mcp-app-renderer-BhcjOn-v.js → mcp-app-renderer-DAhokX0e.js} +2 -2
  141. package/dist/client/assets/{mcp-oauth-CkCOYpGa.js → mcp-oauth-H1nDAtgI.js} +1 -1
  142. package/dist/client/assets/{members-BRMS-z8-.js → members-DjEJdLt1.js} +1 -1
  143. package/dist/client/assets/{monaco-editor-DUfjWmCH.js → monaco-editor-s5nxaT6J.js} +2 -2
  144. package/dist/client/assets/{monitoring-stats-row-CNGtiW-V.js → monitoring-stats-row-CaLy4Ryh.js} +1 -1
  145. package/dist/client/assets/{multi-select-D2NZR3Je.js → multi-select-CFqy5bas.js} +1 -1
  146. package/dist/client/assets/{oauth-callback-_iMiiQ6O.js → oauth-callback-Jvfg7sIW.js} +1 -1
  147. package/dist/client/assets/{oauth-callback-ai-provider-DWJ3tDti.js → oauth-callback-ai-provider-D5EPLu-K.js} +1 -1
  148. package/dist/client/assets/{onboarding-b4vqNQcH.js → onboarding-Zr_p1vAb.js} +1 -1
  149. package/dist/client/assets/org-layout-C9lwccdN.js +1 -0
  150. package/dist/client/assets/{organization-choice-B5jL_4VB.js → organization-choice-CTABkZvs.js} +1 -1
  151. package/dist/client/assets/{orgs-CxYHNmZz.js → orgs-Do50-Jd8.js} +1 -1
  152. package/dist/client/assets/{page-seo-form-D1zgMMO5.js → page-seo-form-B97SOeU5.js} +1 -1
  153. package/dist/client/assets/{popover-CugUBL2K.js → popover-CRp4G2Z6.js} +1 -1
  154. package/dist/client/assets/post-calendar-DPPABLzV.js +1 -0
  155. package/dist/client/assets/post-editor-DSvtP40e.js +1 -0
  156. package/dist/client/assets/{primitives-D5ZpBmDc.js → primitives-C7BIiVVo.js} +1 -1
  157. package/dist/client/assets/{profile-CR5LBckw.js → profile-BLTCJe7b.js} +1 -1
  158. package/dist/client/assets/project-app-view-Blu2IsZ3.js +1 -0
  159. package/dist/client/assets/{project-icon-D9jBx1Lh.js → project-icon-sXGV0X2Q.js} +1 -1
  160. package/dist/client/assets/{prompts-AYoj9J5J.js → prompts-3ZqIJFDd.js} +1 -1
  161. package/dist/client/assets/record-editor-CsxPBrFI.js +1 -0
  162. package/dist/client/assets/redirect-editor-Br7pXUqD.js +1 -0
  163. package/dist/client/assets/registry-BOCis5ep.js +2 -0
  164. package/dist/client/assets/{registry-layout-DS0JrRJJ.js → registry-layout-ED4OGMt2.js} +1 -1
  165. package/dist/client/assets/{reports-BPeWGcnC.js → reports-BdX-p26G.js} +2 -2
  166. package/dist/client/assets/{repositories-DDxpnac9.js → repositories-uAK6PGQO.js} +1 -1
  167. package/dist/client/assets/{repository-import-picker-DRmwXY_Z.js → repository-import-picker-BOqZjy75.js} +1 -1
  168. package/dist/client/assets/{repository-picker-BVGd2Z5t.js → repository-picker-Dg2kea9_.js} +1 -1
  169. package/dist/client/assets/{require-capability-BAWColZy.js → require-capability-DZaP9GRG.js} +1 -1
  170. package/dist/client/assets/{required-auth-layout-D_4lUDFj.js → required-auth-layout-BeMcQPLp.js} +1 -1
  171. package/dist/client/assets/{reset-password-Muwzg6q6.js → reset-password-HtxIFDKb.js} +1 -1
  172. package/dist/client/assets/review-settings-D7iT6mdL.js +1 -0
  173. package/dist/client/assets/roles-BoykZStL.js +1 -0
  174. package/dist/client/assets/{schema-K0VPsDN5.js → schema-CXWi7OUE.js} +1 -1
  175. package/dist/client/assets/{scroll-area-BtEw-0mL.js → scroll-area-DIILjYAD.js} +1 -1
  176. package/dist/client/assets/{search-input-DVFSQDiL.js → search-input-BnJ22pqo.js} +1 -1
  177. package/dist/client/assets/{secrets-RFx7imRf.js → secrets-Be4aGdkk.js} +1 -1
  178. package/dist/client/assets/{sections-editor-DnYOtohw.js → sections-editor-BQDRzdu2.js} +2 -2
  179. package/dist/client/assets/{select-model-aeACLtyd.js → select-model-BS741VWv.js} +1 -1
  180. package/dist/client/assets/{select-TX0TM16h.js → select-zsrd2RiW.js} +1 -1
  181. package/dist/client/assets/{self-tool-result-Bbk6LNdT.js → self-tool-result-UHlGJAZm.js} +1 -1
  182. package/dist/client/assets/seo-editor-B4chp4Nv.js +1 -0
  183. package/dist/client/assets/settings-layout-DdFAcCKC.js +1 -0
  184. package/dist/client/assets/{settings-sidebar-DDdLTxRO.js → settings-sidebar-qKQ2rd4i.js} +1 -1
  185. package/dist/client/assets/{shell-controls-BXEtXK0P.js → shell-controls-DwOzdtxQ.js} +1 -1
  186. package/dist/client/assets/shell-layout-D38a2ilI.js +1 -0
  187. package/dist/client/assets/{skill-preview-DmcbNeFW.js → skill-preview-BH1OTEDh.js} +1 -1
  188. package/dist/client/assets/{skills-D5ThPL4T.js → skills-B9ZpA0KI.js} +1 -1
  189. package/dist/client/assets/{sso-DIv3IfcX.js → sso-DIok2qyj.js} +1 -1
  190. package/dist/client/assets/{store-D4mWXY1Z.js → store-BnWD-sX4.js} +1 -1
  191. package/dist/client/assets/store-registry-Bs_SblgK.js +2 -0
  192. package/dist/client/assets/{switch-BSQsnixt.js → switch-wRuzhZCP.js} +1 -1
  193. package/dist/client/assets/{synced-repos-BksI9Fmi.js → synced-repos-BK1T5QWT.js} +1 -1
  194. package/dist/client/assets/{table-CSLvM8dI.js → table-DMgVyVQS.js} +1 -1
  195. package/dist/client/assets/{tabs-BvOQpnly.js → tabs-C9rYvTFN.js} +1 -1
  196. package/dist/client/assets/{task-board-C6hevS_c.js → task-board-D0cF49Rr.js} +1 -1
  197. package/dist/client/assets/{task-route-Dl0AbbvO.js → task-route-Dyvp3vwK.js} +1 -1
  198. package/dist/client/assets/tasks-DssW8rYC.js +1 -0
  199. package/dist/client/assets/{textarea-NzT1ozxc.js → textarea-NYvkjUAn.js} +1 -1
  200. package/dist/client/assets/{thread-intent-CRKQoXCi.js → thread-intent-CgKd5Wx-.js} +1 -1
  201. package/dist/client/assets/{thread-route-BVfQR44p.js → thread-route-BgI1RAgC.js} +1 -1
  202. package/dist/client/assets/{toggle-group-DOqWV4T2.js → toggle-group-It3hRo8l.js} +1 -1
  203. package/dist/client/assets/{toolbar-DU14MGQo.js → toolbar-SMhPqa2y.js} +1 -1
  204. package/dist/client/assets/{toolbar-icon-button-5CxdQ2TT.js → toolbar-icon-button-C4gmxVIe.js} +1 -1
  205. package/dist/client/assets/{track-CGYLX8Er.js → track-ByEKyB4m.js} +1 -1
  206. package/dist/client/assets/{types-DTNV26Po.js → types-DRS7wX8l.js} +1 -1
  207. package/dist/client/assets/{use-ai-providers-BSKIayEv.js → use-ai-providers-Mptwa2nu.js} +1 -1
  208. package/dist/client/assets/{use-automations-DIpGUZTg.js → use-automations-xybTlCwA.js} +1 -1
  209. package/dist/client/assets/{use-autosave-J1-_cCzS.js → use-autosave-DKENIaWw.js} +1 -1
  210. package/dist/client/assets/{use-connection-BJuR4u4_.js → use-connection-Cj6jhInv.js} +1 -1
  211. package/dist/client/assets/{use-copy-BjXr_pKM.js → use-copy-PCW_eaa6.js} +1 -1
  212. package/dist/client/assets/{use-create-virtual-mcp-D04e0Bk1.js → use-create-virtual-mcp-2La6_4nW.js} +1 -1
  213. package/dist/client/assets/{use-date-fns-locale-DQ9VKYwt.js → use-date-fns-locale-DFrNlcdk.js} +1 -1
  214. package/dist/client/assets/{use-debounced-autosave-RrEYWg_V.js → use-debounced-autosave-CyQ6phI-.js} +1 -1
  215. package/dist/client/assets/{use-debounced-value-B_8t2ZDh.js → use-debounced-value-DTG_WVYT.js} +1 -1
  216. package/dist/client/assets/{use-decopilot-events-DWrIyAdA.js → use-decopilot-events-DnaHPSLF.js} +1 -1
  217. package/dist/client/assets/{use-delete-connection-DtkuuBez.js → use-delete-connection-8l-RyDdH.js} +1 -1
  218. package/dist/client/assets/{use-deployment-admin-CFMU-XcS.js → use-deployment-admin-CShZ060R.js} +1 -1
  219. package/dist/client/assets/{use-destination-route-DE7DNG84.js → use-destination-route-BS5_9jNo.js} +1 -1
  220. package/dist/client/assets/{use-file-configs-B12Bgu3Z.js → use-file-configs-BvqhugH-.js} +1 -1
  221. package/dist/client/assets/{use-infinite-scroll-BXr_u2X1.js → use-infinite-scroll-DU0M3enW.js} +1 -1
  222. package/dist/client/assets/{use-join-requests-D-KCRo7_.js → use-join-requests-lrCf0PQt.js} +1 -1
  223. package/dist/client/assets/{use-mcp-auth-status-BPLGrU-q.js → use-mcp-auth-status-CM0X2Q6P.js} +1 -1
  224. package/dist/client/assets/{use-mcp-client-CT68MaZf.js → use-mcp-client-DOjgXsoM.js} +2 -2
  225. package/dist/client/assets/{use-mcp-prompts-Bfyb41qd.js → use-mcp-prompts-BKEcBOIJ.js} +1 -1
  226. package/dist/client/assets/{use-mcp-tools-DeRZ-3eb.js → use-mcp-tools-Bjz_51W4.js} +1 -1
  227. package/dist/client/assets/{use-members-DJJCMnU7.js → use-members-BB7OB8zH.js} +1 -1
  228. package/dist/client/assets/{use-navigate-to-agent-COZVNK2u.js → use-navigate-to-agent-BX5Ov16Z.js} +1 -1
  229. package/dist/client/assets/{use-org-auth-client-DzA-vkZA.js → use-org-auth-client-Dv5ggRPD.js} +1 -1
  230. package/dist/client/assets/{use-org-notice-DJYgAFPy.js → use-org-notice-Bb3hmM0X.js} +1 -1
  231. package/dist/client/assets/{use-org-sso-CzPpWIQr.js → use-org-sso-qVsnd7nU.js} +1 -1
  232. package/dist/client/assets/{use-organization-roles-C0nmTCQ9.js → use-organization-roles-c807ZNwQ.js} +1 -1
  233. package/dist/client/assets/{use-organization-settings-DrMHeBOr.js → use-organization-settings-Duntu8dc.js} +1 -1
  234. package/dist/client/assets/{use-panel-navigate-DscHtGsE.js → use-panel-navigate-lJXqYoE8.js} +1 -1
  235. package/dist/client/assets/{use-registry-connections-CFql8C6x.js → use-registry-connections-Q445kfkp.js} +1 -1
  236. package/dist/client/assets/{use-secrets-CNGepf_x.js → use-secrets-D_yQvvYk.js} +1 -1
  237. package/dist/client/assets/{use-section-preview-base-BtG237cA.js → use-section-preview-base-CQBGEP31.js} +1 -1
  238. package/dist/client/assets/{use-status-sounds-L30GUs7u.js → use-status-sounds-Dg3N4ijY.js} +1 -1
  239. package/dist/client/assets/{use-tags-O7Ozj_kd.js → use-tags-D9wANkyQ.js} +1 -1
  240. package/dist/client/assets/{use-view-mode-lhEpmryw.js → use-view-mode-D37EDMuR.js} +1 -1
  241. package/dist/client/assets/{use-virtual-mcp-BXbxVipJ.js → use-virtual-mcp-9JWM1UZv.js} +1 -1
  242. package/dist/client/assets/useInfiniteQuery-BCgs6-zI.js +1 -0
  243. package/dist/client/assets/useSuspenseInfiniteQuery-BFXkdPJm.js +1 -0
  244. package/dist/client/assets/{users-CkRr5SvX.js → users-D6I_Ulcy.js} +1 -1
  245. package/dist/client/assets/variant-calendar-OloQMR7L.js +1 -0
  246. package/dist/client/assets/{view-mode-toggle-Djyfw1v1.js → view-mode-toggle-DUf-vSHP.js} +1 -1
  247. package/dist/client/index.html +2 -2
  248. package/dist/server/cli.js +1 -1
  249. package/dist/server/server.js +1 -1
  250. package/package.json +1 -1
  251. package/dist/client/assets/agent-icon-CnnQSswm.js +0 -1
  252. package/dist/client/assets/agents-list-Be9vygo-.js +0 -1
  253. package/dist/client/assets/analytics-tab-CbgXJ0tW.js +0 -2
  254. package/dist/client/assets/api-keys-CD9aqPus.js +0 -1
  255. package/dist/client/assets/app-editor-QPD1L4OP.js +0 -1
  256. package/dist/client/assets/automations-BS56l2F-.js +0 -1
  257. package/dist/client/assets/category-editor-Vq1v0CXB.js +0 -1
  258. package/dist/client/assets/choose-editor-BdTQxBij.js +0 -1
  259. package/dist/client/assets/collection-detail-CnCqIfnk.js +0 -1
  260. package/dist/client/assets/commerce-onboarding-B4F0Tnl7.js +0 -1
  261. package/dist/client/assets/connection-detail-L68FjDUB.js +0 -1
  262. package/dist/client/assets/connections-Cq6QnpjJ.js +0 -1
  263. package/dist/client/assets/e2e-tab-DUREhAJG.js +0 -1
  264. package/dist/client/assets/file-explorer-DEF_0jI4.js +0 -2
  265. package/dist/client/assets/general-DWhviXPW.js +0 -1
  266. package/dist/client/assets/hosting-tab-CAb80WXs.js +0 -1
  267. package/dist/client/assets/index-BT-75k1L.js +0 -1
  268. package/dist/client/assets/index-DhYXykaq.js +0 -827
  269. package/dist/client/assets/index-bWqcZ8bk.css +0 -1
  270. package/dist/client/assets/index-redirect-StIyTln4.js +0 -1
  271. package/dist/client/assets/org-layout-ByyP_m92.js +0 -1
  272. package/dist/client/assets/post-calendar-CNLjTDlA.js +0 -1
  273. package/dist/client/assets/post-editor-CecVUF8d.js +0 -1
  274. package/dist/client/assets/project-app-view-D7LtFUZ4.js +0 -1
  275. package/dist/client/assets/record-editor-vTG2nsSZ.js +0 -1
  276. package/dist/client/assets/redirect-editor-k_ZJZYUp.js +0 -1
  277. package/dist/client/assets/registry-CfSc7pmv.js +0 -2
  278. package/dist/client/assets/review-settings-Cu5Kl-yB.js +0 -1
  279. package/dist/client/assets/roles-bkDNCeem.js +0 -1
  280. package/dist/client/assets/seo-editor-CvfZpri2.js +0 -1
  281. package/dist/client/assets/settings-layout-BrG6I0Uc.js +0 -1
  282. package/dist/client/assets/shell-layout-jfh4uwOT.js +0 -1
  283. package/dist/client/assets/store-registry-DhHtNP8N.js +0 -2
  284. package/dist/client/assets/tasks-CxrKZF9u.js +0 -1
  285. package/dist/client/assets/useInfiniteQuery-a-wpM9y3.js +0 -1
  286. package/dist/client/assets/useSuspenseInfiniteQuery-WUmm_LeP.js +0 -1
  287. package/dist/client/assets/variant-calendar-CkeoT_kl.js +0 -1
@@ -0,0 +1,2 @@
1
+ import{c as se,b as Te,r as d,j as r,h as pe,B as Re,fk as en,br as tn,bx as ge,fl as nn,fm as rn,fn as on,fo as sn,cO as an,fp as ln,fq as dt,bt as cn,fr as dn,fs as un,ft as fn,fu as pn,fv as mn,fw as xn,fx as hn,fy as gn,fz as bn,l as le,n as yn,t as te,a4 as tt,a1 as nt,a2 as rt,K as ot}from"./index-DJQUO_5F.js";import{ae as vn,bm as Cn,bn as wn}from"./agent-icon-CaI0ggpq.js";import{s as Nn}from"./XClose-BSY1lYTG.js";import{S as jn}from"./scroll-area-DIILjYAD.js";import{a as En}from"./chat-context-C48t2Pu7.js";import{F as Sn}from"./editor-COagHbmc.js";import{u as Dn}from"./shell-layout-D38a2ilI.js";import{s as je,a as st,f as Mn,b as Rn}from"./index-DfKKmgLE.js";import{d as Tn,h as Pn,c as kn,e as Fn,b as An,D as On}from"./dialog-Cz0TyjbB.js";import{I as it}from"./input-DAq8Cogd.js";import{c as Ln,d as In,b as Kn,f as zn,g as $n,e as _n,a as Gn,A as Bn}from"./alert-dialog-BJoAnvTa.js";import{t as Vn}from"./ChevronUp-DRrtPFPU.js";import{i as Un}from"./ChevronRight-CL-1AW54.js";import{i as qn}from"./Share07-B8Aw6CDi.js";import{i as Hn,E as Wn,e as Le,h as Qn,j as Xn,k as Yn,l as Jn,t as re,m as Ee,n as Ie,o as Se,g as Ke,p as ze,q as Zn,s as er,v as tr,r as $e,u as De,w as _e,x as nr,y as rr,z as or,A as sr}from"./skill-preview-BH1OTEDh.js";import"./AlertCircle-BMk6q2FA.js";import"./Tool01-BEvJ_YW1.js";import"./ArrowUp-BrUqWSUA.js";import"./ArrowLeft-CBdaifdY.js";import"./Tool02-BJ6DrdG_.js";import"./ArrowRight-k7OlY3ZV.js";import"./TrendUp01-BQU61XVU.js";import"./ZoomOut-GAT73I28.js";import"./Users03-B3GcmkAW.js";import"./CheckCircle-ByifJ5DN.js";import"./Check-BRo4TcYL.js";import"./ChevronSelectorVertical-D89G1wQX.js";import"./DotsVertical-CUeujFxe.js";import"./UserSquare-B8muuAeC.js";import"./Copy01-Cz84dNWo.js";import"./CreditCard01-16ccuHl7.js";import"./Download01-BY5nFlV8.js";import"./Settings02-5Mu_nYD8.js";import"./Eye-DSfFTZ0l.js";import"./GitBranch01-CzoRmimO.js";import"./Globe01-DhXQEmKy.js";import"./HardDrive-Dz1jdiPQ.js";import"./Image01-ChEQz8oh.js";import"./Key01-BOmG8BKE.js";import"./Link01-DkfXBBhQ.js";import"./LinkExternal01-CbmJH8Oa.js";import"./Monitor01-D0BOdaeR.js";import"./Sun-BzWxkbN5.js";import"./Package-BtdRPN0k.js";import"./Palette-D3howidE.js";import"./Play-BRZZbBP9.js";import"./Plus-CHPz10Kd.js";import"./SearchLg-B8u5Z_-p.js";import"./SearchMd-BfOW0ihr.js";import"./Shield01-BCG_3DYj.js";import"./Stars01-foIfuOVN.js";import"./Trash01-BV_RW_ot.js";import"./Upload01-CzJgAWQf.js";import"./User01-BYo154It.js";import"./Users01-CCJxFqcF.js";import"./XCircle-B00jwioD.js";import"./Zap-u6tF2K1C.js";import"./select-zsrd2RiW.js";import"./use-panel-navigate-lJXqYoE8.js";import"./use-destination-route-BS5_9jNo.js";import"./autosend-BLWBLlQp.js";import"./thread-intent-CgKd5Wx-.js";import"./slugify-CEUa2lfQ.js";import"./hooks-DQxSpV5B.js";import"./use-mcp-client-DOjgXsoM.js";import"./auth-DrTXT3NH.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CC8xuhpc.js";import"./task-board-D0cF49Rr.js";import"./schema-CXWi7OUE.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-9JWM1UZv.js";import"./use-ai-providers-Mptwa2nu.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-DnaHPSLF.js";import"./thread-route-BgI1RAgC.js";import"./use-organization-settings-Duntu8dc.js";import"./avatar-8wWRKAWW.js";import"./project-icon-sXGV0X2Q.js";import"./github-repo-CTPv5ZM2.js";import"./source-system-tabs-CnEGUb4r.js";import"./command-Dodm-w8K.js";import"./index-D7c3ENS3.js";import"./required-auth-layout-BeMcQPLp.js";import"./use-org-sso-qVsnd7nU.js";import"./use-org-notice-Bb3hmM0X.js";import"./automation-runs-staCAMV3.js";import"./useInfiniteQuery-BCgs6-zI.js";import"./infiniteQueryObserver-Dz5k81cL.js";import"./use-connection-Cj6jhInv.js";import"./table-DMgVyVQS.js";import"./empty-state-R3Gf1cup.js";import"./use-infinite-scroll-DU0M3enW.js";import"./use-members-BB7OB8zH.js";import"./use-org-auth-client-Dv5ggRPD.js";import"./use-automations-xybTlCwA.js";import"./useSuspenseInfiniteQuery-BFXkdPJm.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-copy-PCW_eaa6.js";import"./markdown-gi_MNGvw.js";import"./monaco-editor-s5nxaT6J.js";import"./mcp-app-renderer-DAhokX0e.js";import"./types-DRS7wX8l.js";import"./integration-icon-eQHWUfyl.js";import"./use-navigate-to-agent-BX5Ov16Z.js";import"./use-mcp-prompts-BKEcBOIJ.js";import"./form-BI8lXaWf.js";import"./label-C5IuR8oP.js";import"./file-type-icon-CkFKND12.js";import"./drawer-BJF-pfh2.js";import"./collection-search-C-vZtduC.js";import"./tabs-C9rYvTFN.js";import"./toggle-group-It3hRo8l.js";import"./task-route-Dyvp3vwK.js";import"./extract-connection-data-WnP-t00f.js";import"./metadata-dUsYcpuu.js";import"./connection-BT2Nvm5b.js";import"./connection-card-DoxPiAfH.js";import"./use-registry-connections-Q445kfkp.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-NYvkjUAn.js";import"./connection-form-helpers-422OHKLl.js";import"./authenticate-and-persist-oauth-BSOO7-Ru.js";import"./mcp-oauth-H1nDAtgI.js";import"./collection-tabs-BnDECkbQ.js";import"./badge-Dc8kcV5t.js";import"./use-file-configs-BvqhugH-.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-BNXoL43E.js";import"./popover-CRp4G2Z6.js";import"./github-icon-Bh8cYN11.js";import"./get-initials-D-f_fDFw.js";import"./select-model-BS741VWv.js";import"./checkbox-CNie4rus.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-B_G8NPBM.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Dg3N4ijY.js";import"./toolbar-SMhPqa2y.js";import"./use-mcp-tools-Bjz_51W4.js";import"./use-date-fns-locale-DFrNlcdk.js";import"./use-debounced-autosave-CyQ6phI-.js";import"./search-input-BnJ22pqo.js";import"./use-mcp-auth-status-CM0X2Q6P.js";import"./switch-wRuzhZCP.js";import"./breadcrumb-DTve-fNU.js";import"./repository-import-picker-BOqZjy75.js";import"./repository-picker-Dg2kea9_.js";import"./use-debounced-value-DTG_WVYT.js";import"./use-secrets-D_yQvvYk.js";import"./client-icons-DJ5EKjKX.js";import"./connect-layout-DiecLu9A.js";import"./self-tool-result-UHlGJAZm.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./track-ByEKyB4m.js";import"./use-tags-D9wANkyQ.js";import"./toolbar-icon-button-C4gmxVIe.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-CUdrE7CI.js";import"./site-error--i37Vnuw.js";import"./cards-C2rTb-Sr.js";const ir={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function ar(i){const e=se.c(71),{open:s,mode:a,initialName:l,parentLabel:m,isPending:y,onSubmit:u,onOpenChange:b}=i,E=l===void 0?"":l,h=y===void 0?!1:y,x=Te(),[f,L]=d.useState(E),[X,I]=d.useState(s),C=ir[a];s!==X&&(I(s),s&&L(E));let g;e[0]!==h||e[1]!==b?(g=Q=>{!Q&&!h&&b(!1)},e[0]=h,e[1]=b,e[2]=g):g=e[2];const R=g;let z;e[3]!==h||e[4]!==f||e[5]!==u?(z=async Q=>{Q.preventDefault();const ne=f.trim();!ne||h||await u(ne)},e[3]=h,e[4]=f,e[5]=u,e[6]=z):z=e[6];const O=z;let T;e[7]!==C.titleKey||e[8]!==x?(T=x(C.titleKey),e[7]=C.titleKey,e[8]=x,e[9]=T):T=e[9];let P;e[10]!==T?(P=r.jsx(Tn,{children:T}),e[10]=T,e[11]=P):P=e[11];let D;e[12]!==C.descriptionKey||e[13]!==x?(D=x(C.descriptionKey),e[12]=C.descriptionKey,e[13]=x,e[14]=D):D=e[14];let S;e[15]!==D?(S=r.jsx(Pn,{children:D}),e[15]=D,e[16]=S):S=e[16];let N;e[17]!==P||e[18]!==S?(N=r.jsxs(kn,{children:[P,S]}),e[17]=P,e[18]=S,e[19]=N):N=e[19];let M;e[20]!==m||e[21]!==x?(M=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x("sandbox.fileExplorerNameDialog.location")}),r.jsx(it,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=m,e[21]=x,e[22]=M):M=e[22];let j;e[23]!==x?(j=x("sandbox.fileExplorerNameDialog.name"),e[23]=x,e[24]=j):j=e[24];let F;e[25]!==j?(F=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:j}),e[25]=j,e[26]=F):F=e[26];let q;e[27]===Symbol.for("react.memo_cache_sentinel")?(q=Q=>L(Q.target.value),e[27]=q):q=e[27];let $;e[28]!==C.placeholderKey||e[29]!==x?($=x(C.placeholderKey),e[28]=C.placeholderKey,e[29]=x,e[30]=$):$=e[30];let Y;e[31]!==h||e[32]!==f||e[33]!==$?(Y=r.jsx(it,{id:"file-explorer-name",value:f,onChange:q,placeholder:$,autoFocus:!0,disabled:h}),e[31]=h,e[32]=f,e[33]=$,e[34]=Y):Y=e[34];let J;e[35]!==F||e[36]!==Y?(J=r.jsxs("div",{className:"space-y-1.5",children:[F,Y]}),e[35]=F,e[36]=Y,e[37]=J):J=e[37];let ee;e[38]!==M||e[39]!==J?(ee=r.jsxs("div",{className:"space-y-4 py-4",children:[M,J]}),e[38]=M,e[39]=J,e[40]=ee):ee=e[40];let _;e[41]!==b?(_=()=>b(!1),e[41]=b,e[42]=_):_=e[42];let A;e[43]!==x?(A=x("sandbox.fileExplorerNameDialog.cancel"),e[43]=x,e[44]=A):A=e[44];let H;e[45]!==h||e[46]!==_||e[47]!==A?(H=r.jsx(Re,{type:"button",variant:"outline",onClick:_,disabled:h,children:A}),e[45]=h,e[46]=_,e[47]=A,e[48]=H):H=e[48];let K;e[49]!==h||e[50]!==f?(K=!f.trim()||h,e[49]=h,e[50]=f,e[51]=K):K=e[51];let W;e[52]!==C.submitKey||e[53]!==h||e[54]!==x?(W=h?r.jsxs(r.Fragment,{children:[r.jsx(pe,{className:"size-3.5"}),x("sandbox.fileExplorerNameDialog.saving")]}):x(C.submitKey),e[52]=C.submitKey,e[53]=h,e[54]=x,e[55]=W):W=e[55];let G;e[56]!==K||e[57]!==W?(G=r.jsx(Re,{type:"submit",disabled:K,children:W}),e[56]=K,e[57]=W,e[58]=G):G=e[58];let k;e[59]!==H||e[60]!==G?(k=r.jsxs(Fn,{children:[H,G]}),e[59]=H,e[60]=G,e[61]=k):k=e[61];let B;e[62]!==O||e[63]!==ee||e[64]!==k||e[65]!==N?(B=r.jsx(An,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:O,children:[N,ee,k]})}),e[62]=O,e[63]=ee,e[64]=k,e[65]=N,e[66]=B):B=e[66];let V;return e[67]!==R||e[68]!==s||e[69]!==B?(V=r.jsx(On,{open:s,onOpenChange:R,children:B}),e[67]=R,e[68]=s,e[69]=B,e[70]=V):V=e[70],V}function lr(i){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:l,onOpenChange:m,onConfirm:y}=i,u=Te(),b=s?.kind==="directory",E=s!==null,h=b?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let x;e[0]!==u||e[1]!==h?(x=u(h),e[0]=u,e[1]=h,e[2]=x):x=e[2];let f;e[3]!==x?(f=r.jsx(Ln,{children:x}),e[3]=x,e[4]=f):f=e[4];let L;e[5]!==u?(L=u("sandbox.fileExplorerDeleteDialog.description"),e[5]=u,e[6]=L):L=e[6];const X=s?.name;let I;e[7]!==X?(I=r.jsx("span",{className:"font-mono",children:X}),e[7]=X,e[8]=I):I=e[8];let C;e[9]!==b||e[10]!==u?(C=b?u("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=b,e[10]=u,e[11]=C):C=e[11];let g;e[12]!==a.length||e[13]!==u?(g=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?u("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):u("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:a.length})]}),e[12]=a.length,e[13]=u,e[14]=g):g=e[14];let R;e[15]!==L||e[16]!==I||e[17]!==C||e[18]!==g?(R=r.jsxs(In,{children:[L," ",I,C,g]}),e[15]=L,e[16]=I,e[17]=C,e[18]=g,e[19]=R):R=e[19];let z;e[20]!==R||e[21]!==f?(z=r.jsxs(Kn,{children:[f,R]}),e[20]=R,e[21]=f,e[22]=z):z=e[22];let O;e[23]!==u?(O=u("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=u,e[24]=O):O=e[24];let T;e[25]!==l||e[26]!==O?(T=r.jsx(zn,{disabled:l,children:O}),e[25]=l,e[26]=O,e[27]=T):T=e[27];const P=l||!s;let D;e[28]!==s||e[29]!==y?(D=q=>{q.preventDefault(),s&&y(s)},e[28]=s,e[29]=y,e[30]=D):D=e[30];let S;e[31]!==u?(S=u("sandbox.fileExplorerDeleteDialog.delete"),e[31]=u,e[32]=S):S=e[32];let N;e[33]!==P||e[34]!==D||e[35]!==S?(N=r.jsx($n,{disabled:P,onClick:D,children:S}),e[33]=P,e[34]=D,e[35]=S,e[36]=N):N=e[36];let M;e[37]!==T||e[38]!==N?(M=r.jsxs(_n,{children:[T,N]}),e[37]=T,e[38]=N,e[39]=M):M=e[39];let j;e[40]!==z||e[41]!==M?(j=r.jsxs(Gn,{children:[z,M]}),e[40]=z,e[41]=M,e[42]=j):j=e[42];let F;return e[43]!==m||e[44]!==E||e[45]!==j?(F=r.jsx(Bn,{open:E,onOpenChange:m,children:j}),e[43]=m,e[44]=E,e[45]=j,e[46]=F):F=e[46],F}var Ge="ContextMenu",[cr]=cn(Ge,[dt]),Z=dt(),[dr,ut]=cr(Ge),ft=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:l,modal:m=!0}=i,[y,u]=d.useState(!1),b=Z(e),E=an(a),h=d.useCallback(x=>{u(x),E(x)},[E]);return r.jsx(dr,{scope:e,open:y,onOpenChange:h,modal:m,children:r.jsx(ln,{...b,dir:l,open:y,onOpenChange:h,modal:m,children:s})})};ft.displayName=Ge;var pt="ContextMenuTrigger",mt=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...l}=i,m=ut(pt,s),y=Z(s),u=d.useRef({x:0,y:0}),b=d.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),E=d.useRef(0),h=d.useCallback(()=>window.clearTimeout(E.current),[]),x=f=>{u.current={x:f.clientX,y:f.clientY},m.onOpenChange(!0)};return d.useEffect(()=>h,[h]),d.useEffect(()=>{a&&h()},[a,h]),r.jsxs(r.Fragment,{children:[r.jsx(en,{...y,virtualRef:b}),r.jsx(tn.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:ge(i.onContextMenu,f=>{h(),x(f),f.preventDefault()}),onPointerDown:a?i.onPointerDown:ge(i.onPointerDown,Me(f=>{h(),E.current=window.setTimeout(()=>x(f),700)})),onPointerMove:a?i.onPointerMove:ge(i.onPointerMove,Me(h)),onPointerCancel:a?i.onPointerCancel:ge(i.onPointerCancel,Me(h)),onPointerUp:a?i.onPointerUp:ge(i.onPointerUp,Me(h))})]})});mt.displayName=pt;var ur="ContextMenuPortal",xt=i=>{const{__scopeContextMenu:e,...s}=i,a=Z(e);return r.jsx(on,{...a,...s})};xt.displayName=ur;var ht="ContextMenuContent",gt=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=ut(ht,s),m=Z(s),y=d.useRef(!1);return r.jsx(sn,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{i.onCloseAutoFocus?.(u),!u.defaultPrevented&&y.current&&u.preventDefault(),y.current=!1},onInteractOutside:u=>{i.onInteractOutside?.(u),!u.defaultPrevented&&!l.modal&&(y.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gt.displayName=ht;var fr="ContextMenuGroup",pr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(dn,{...l,...a,ref:e})});pr.displayName=fr;var mr="ContextMenuLabel",xr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(un,{...l,...a,ref:e})});xr.displayName=mr;var hr="ContextMenuItem",bt=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(nn,{...l,...a,ref:e})});bt.displayName=hr;var gr="ContextMenuCheckboxItem",br=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(fn,{...l,...a,ref:e})});br.displayName=gr;var yr="ContextMenuRadioGroup",vr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(pn,{...l,...a,ref:e})});vr.displayName=yr;var Cr="ContextMenuRadioItem",wr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(mn,{...l,...a,ref:e})});wr.displayName=Cr;var Nr="ContextMenuItemIndicator",jr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(xn,{...l,...a,ref:e})});jr.displayName=Nr;var Er="ContextMenuSeparator",yt=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(rn,{...l,...a,ref:e})});yt.displayName=Er;var Sr="ContextMenuArrow",Dr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(hn,{...l,...a,ref:e})});Dr.displayName=Sr;var Mr="ContextMenuSubTrigger",Rr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(gn,{...l,...a,ref:e})});Rr.displayName=Mr;var Tr="ContextMenuSubContent",Pr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(bn,{...l,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Pr.displayName=Tr;function Me(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var kr=ft,Fr=mt,Ar=xt,Or=gt,Lr=bt,Ir=yt;function Kr(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(kr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function zr(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Fr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function $r(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(Ar,{children:r.jsx(Or,{"data-slot":"context-menu-content",translate:"no",className:l,...a})}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}function fe(i){const e=se.c(12);let s,a,l,m;e[0]!==i?({className:s,inset:a,variant:m,...l}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=m):(s=e[1],a=e[2],l=e[3],m=e[4]);const y=m===void 0?"default":m;let u;e[5]!==s?(u=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=u):u=e[6];let b;return e[7]!==a||e[8]!==l||e[9]!==u||e[10]!==y?(b=r.jsx(Lr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":y,className:u,...l}),e[7]=a,e[8]=l,e[9]=u,e[10]=y,e[11]=b):b=e[11],b}function at(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(Ir,{"data-slot":"context-menu-separator",className:l,...a}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}const _r="#d9a441";function Gr(i){const e=se.c(63),{node:s,depth:a,isExpanded:l,isSelected:m,isLoading:y,fileVisual:u,onOpen:b,onSelect:E,onNewFile:h,onNewFolder:x,onCopyPath:f,onCopyRelativePath:L,onRename:X,onDelete:I}=i,C=y===void 0?!1:y,g=Te(),R=s.kind==="directory",{Icon:z,color:O}=u,T=m&&"bg-accent";let P;e[0]!==T?(P=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",T),e[0]=T,e[1]=P):P=e[1];const D=`${a*14+8}px`;let S;e[2]!==D?(S={paddingLeft:D},e[2]=D,e[3]=S):S=e[3];let N;e[4]!==b||e[5]!==E?(N=()=>{E(),b()},e[4]=b,e[5]=E,e[6]=N):N=e[6];let M;e[7]!==z||e[8]!==O||e[9]!==R||e[10]!==l||e[11]!==C?(M=R?r.jsxs(r.Fragment,{children:[C?r.jsx(pe,{className:"size-3.5 shrink-0 text-muted-foreground"}):l?r.jsx(Vn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(Un,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(qn,{size:16,className:"shrink-0",style:{color:_r}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(z,{size:16,className:"shrink-0",style:{color:O}})]}),e[7]=z,e[8]=O,e[9]=R,e[10]=l,e[11]=C,e[12]=M):M=e[12];let j;e[13]!==s.name?(j=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=j):j=e[14];let F;e[15]!==P||e[16]!==S||e[17]!==N||e[18]!==M||e[19]!==j?(F=r.jsx(zr,{asChild:!0,children:r.jsxs("button",{type:"button",className:P,style:S,onClick:N,children:[M,j]})}),e[15]=P,e[16]=S,e[17]=N,e[18]=M,e[19]=j,e[20]=F):F=e[20];let q;e[21]!==g?(q=g("sandbox.fileTreeRow.newFile"),e[21]=g,e[22]=q):q=e[22];let $;e[23]!==h||e[24]!==q?($=r.jsx(fe,{onSelect:h,children:q}),e[23]=h,e[24]=q,e[25]=$):$=e[25];let Y;e[26]!==g?(Y=g("sandbox.fileTreeRow.newFolder"),e[26]=g,e[27]=Y):Y=e[27];let J;e[28]!==x||e[29]!==Y?(J=r.jsx(fe,{onSelect:x,children:Y}),e[28]=x,e[29]=Y,e[30]=J):J=e[30];let ee;e[31]===Symbol.for("react.memo_cache_sentinel")?(ee=r.jsx(at,{}),e[31]=ee):ee=e[31];let _;e[32]!==g?(_=g("sandbox.fileTreeRow.copyPath"),e[32]=g,e[33]=_):_=e[33];let A;e[34]!==f||e[35]!==_?(A=r.jsx(fe,{onSelect:f,children:_}),e[34]=f,e[35]=_,e[36]=A):A=e[36];let H;e[37]!==g?(H=g("sandbox.fileTreeRow.copyRelativePath"),e[37]=g,e[38]=H):H=e[38];let K;e[39]!==L||e[40]!==H?(K=r.jsx(fe,{onSelect:L,children:H}),e[39]=L,e[40]=H,e[41]=K):K=e[41];let W;e[42]===Symbol.for("react.memo_cache_sentinel")?(W=r.jsx(at,{}),e[42]=W):W=e[42];let G;e[43]!==g?(G=g("sandbox.fileTreeRow.rename"),e[43]=g,e[44]=G):G=e[44];let k;e[45]!==X||e[46]!==G?(k=r.jsx(fe,{onSelect:X,children:G}),e[45]=X,e[46]=G,e[47]=k):k=e[47];let B;e[48]!==g?(B=g("sandbox.fileTreeRow.delete"),e[48]=g,e[49]=B):B=e[49];let V;e[50]!==I||e[51]!==B?(V=r.jsx(fe,{variant:"destructive",onSelect:I,children:B}),e[50]=I,e[51]=B,e[52]=V):V=e[52];let Q;e[53]!==$||e[54]!==J||e[55]!==A||e[56]!==K||e[57]!==k||e[58]!==V?(Q=r.jsxs($r,{className:"w-52",children:[$,J,ee,A,K,W,k,V]}),e[53]=$,e[54]=J,e[55]=A,e[56]=K,e[57]=k,e[58]=V,e[59]=Q):Q=e[59];let ne;return e[60]!==Q||e[61]!==F?(ne=r.jsxs(Kr,{children:[F,Q]}),e[60]=Q,e[61]=F,e[62]=ne):ne=e[62],ne}const lt=200,Br=2,Vr=250,ct=200;function Ur(i,e){return Rn(i,e)}function qr(i){const e=se.c(9),{text:s,query:a}=i;let l,m,y;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:b,segments:E}=Zn(s,a);l="truncate font-mono text-muted-foreground",m=b&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),y=E.map(Hr),e[0]=a,e[1]=s,e[2]=l,e[3]=m,e[4]=y}else l=e[2],m=e[3],y=e[4];let u;return e[5]!==l||e[6]!==m||e[7]!==y?(u=r.jsxs("span",{className:l,children:[m,y]}),e[5]=l,e[6]=m,e[7]=y,e[8]=u):u=e[8],u}function Hr(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function Yi({orgSlug:i,virtualMcpId:e,branch:s,threadId:a,openPath:l}){const m={orgSlug:i,virtualMcpId:e,branch:s,threadId:a},[y,u]=d.useState({files:[],directories:[],truncated:!1}),{files:b,directories:E}=y,[h,x]=d.useState(new Set),[f,L]=d.useState(null),[X,I]=d.useState(null),[C,g]=d.useState([]),[R,z]=d.useState(""),[O,T]=d.useState(null),[P,D]=d.useState(null),[S,N]=d.useState(!1),[M,j]=d.useState(!1),[F,q]=d.useState(!1),[$,Y]=d.useState(!1),[,J]=d.useState(new Set),[ee,_]=d.useState(new Set),A=d.useRef(0),H=d.useRef(null),K=d.useRef(new Set),W=d.useRef(new Map),G=d.useRef(null),k=d.useRef(0),B=d.useRef(null),V=d.useRef(null),Q=d.useRef(null);function ne(t){J(n=>{const o=typeof t=="function"?t(n):t;return K.current=o,o})}const[me,de]=d.useState(new Map),Pe=d.useRef(null),[ie,be]=d.useState(null),{sendMessage:vt}=En(),{openSidePanel:Ct}=Dn(),ye=yn(),[U,oe]=d.useState(null),[ke,Fe]=d.useState(null),[ve,Ce]=d.useState(!1);async function ae(t,n){const o=await fetch(Ur(m,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function we(){ye.invalidateQueries({queryKey:st(m)})}function Be(t,n,o){navigator.clipboard.writeText(o).then(()=>te.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>te.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function wt(t){const n=or(t);if(!n)return;const o=`${i}/${e}/${s}`;ye.setQueryData(ot.decofile(o),c=>{if(!c)return c;const{[n]:p,...v}=c;return v}),ye.invalidateQueries({queryKey:ot.liveMeta(i,e,s)})}function Nt(t){const n=t.kind==="file"?[t.path]:b.filter(o=>o.startsWith(".deco/blocks/")).map(o=>Ee(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)wt(o)}function jt(t){const n=Ee(t);return C.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=me.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ve(t){g(n=>n.map(o=>t(o)).filter(o=>o!==null)),L(n=>n&&t(n)),de(n=>{const o=new Map;for(const[c,p]of n){const v=t(c);v&&o.set(v,p)}return o}),I(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Et(t){const n=Ee(t);I(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ve(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function St(t,n){if(!U)return;const o=De(U.parentDir,n);if(_e(o,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ae("write",{path:re(o),content:""}),await xe(),await we(),oe(null),he(o)}async function Dt(t,n){if(!U)return;const o=De(U.parentDir,n);if(_e(o,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ae("mkdir",{path:c}),u(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await xe(),await we(),oe(null),x(p=>{const v=new Set(p);for(const ce of ze(o))v.add(ce);return v.add(o),v}),I({name:n,path:o,kind:"directory",children:[]})}async function Mt(t,n){if(!U)return;const o=U.node.path,c=Se(o),p=De(c,n);if(p===o){oe(null);return}if(_e(p,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ae("rename",{from:re(o),to:re(p)}),Ve(v=>v===o?p:v.startsWith(`${o}/`)?De(p,v.slice(o.length+1)):v),await xe(),await we(),oe(null)}async function Rt(t,n){Ce(!0);try{await ae("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Nt(n),Et(n.path),await xe(),await we(),Fe(null),te.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){te.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{Ce(!1)}}async function Tt(t,n){const o=tr(n);if(o){te.error(o);return}Ce(!0);try{U?.mode==="new-file"?(await St(t,n),te.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):U?.mode==="new-folder"?(await Dt(t,n),te.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):U?.mode==="rename"&&(await Mt(t,n),te.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){te.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{Ce(!1)}}const Ue=d.useRef(!1);Ue.current||(Ue.current=!0,H.current=xe());const[Pt,kt]=d.useState(null),w=Te();if(l&&l!==Pt){kt(l);const t=l;queueMicrotask(()=>{Hn(t)&&he(t)})}async function Ae(t){const n=await ae("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function qe(t,n,o){if(o!==A.current)return!1;let c=!1;return u(p=>{const v=n?sr(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!v.truncated,{files:v.files,directories:v.directories,truncated:c}}),c&&te.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function Ft(t){const n=W.current.get(t);if(n)return n;const o=A.current,c=(async()=>{const p=await Ae({pattern:"**/*",path:re(t),limit:Le}),v=qe(p,!0,o);return!v&&o===A.current&&ne(ce=>{const Ne=new Set(ce);return Ne.add(t),Ne}),v})();W.current.set(t,c);try{return await c}finally{W.current.delete(t)}}async function He(t){if(!$e(t,K.current))return!1;_(n=>new Set(n).add(t));try{return await Ft(t)}finally{_(n=>{const o=new Set(n);return o.delete(t),o})}}async function At(t,n){const o=new Set(K.current);for(const c of ze(n)){if(!$e(c,o))continue;if(await He(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function xe(){const t=++A.current;B.current=null,V.current=null,W.current.clear(),q(!0),ne(new Set),x(new Set),_(new Set);try{const n=await Ae({pattern:"**/*",limit:Le,maxDepth:Wn});qe(n,!1,t),Y(!0)}catch{$&&te.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{q(!1)}}async function We(t){if(!me.get(t)?.loaded){de(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ae("read",{path:re(t),full:!0}),c=er(o.content??"");de(p=>{const v=new Map(p);return v.set(t,{savedContent:c,editorValue:c,loaded:!0}),v})}catch{}}}function Ot(){k.current++,T(null),D(null),N(!1),j(!1)}async function Lt(){const t=A.current,n=B.current;if(n&&n.generation===t)return n.files;const o=V.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await Ae({pattern:"**/*",limit:Le});return A.current===t&&(B.current={generation:t,files:p.files}),p.files})();V.current={generation:t,promise:c};try{return await c}finally{V.current?.generation===t&&(V.current=null)}}async function It(t,n){try{const o=await Lt();if(n!==k.current)return;T(nr(o,t,ct))}catch{if(n!==k.current)return;T([])}}async function Kt(t,n){N(!0);try{const o=await ae("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:lt});if(n!==k.current)return;D(rr(o.results??"")),j((o.matchCount??0)>=lt)}catch{if(n!==k.current)return;D([]),j(!1)}finally{n===k.current&&N(!1)}}function zt(t){const n=t.trim(),o=++k.current;It(n,o),n.length<Br?(D(null),N(!1),j(!1)):Kt(n,o)}function $t(t){if(z(t),G.current&&clearTimeout(G.current),!t.trim()){Ot();return}G.current=setTimeout(()=>{zt(t)},Vr)}function Qe(t){const n=Q.current;if(!n||n.path!==f)return;Q.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function _t(t){Q.current={path:t.path,line:t.line};const n=f===t.path&&me.get(t.path)?.loaded;he(t.path),n&&Pe.current&&Qe(Pe.current)}async function Gt(t,n){try{await ae("write",{path:re(t),content:n}),je("file saved via sandbox /write",{path:t}),ye.invalidateQueries({queryKey:st(m)});try{const o=await Mn(m);je("git status after save",o)}catch(o){je("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}de(o=>{const c=new Map(o),p=c.get(t);return p&&c.set(t,{...p,savedContent:n}),c})}catch(o){je("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function Bt(t){L(t),I({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),be(null),C.includes(t)||g(n=>[...n,t]),We(t)}function Vt(t){g(n=>{const o=n.filter(c=>c!==t);return f===t&&L(o[o.length-1]??null),o}),de(n=>{const o=new Map(n);return o.delete(t),o})}function Xe(t){x(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Ut(t){if($e(t,K.current))try{if(await He(t))return}catch(n){te.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}Xe(t)}async function qt(t,n){if(n){Xe(t);return}await Ut(t)}async function Ht(t){await H.current,await At(w,t);const n=ze(t);x(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),Bt(t)}function he(t){Ht(t).catch(n=>{te.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})}function Wt(){return X?.kind==="directory"?X.path:X?.kind==="file"?Se(X.path):f?Se(f):"/"}function Ye(t){const n=Wt();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Qt=Qn(b,E),Je=Xn(Qt,h),Oe=O?.length??0,Ze=Yn(P??[]),et=P?.length??0,ue=f?me.get(f):null,Xt=ue?.loaded&&ue.editorValue!==ue.savedContent,Yt=ke?jt(ke.path):[],Jt=(t,n)=>{Pe.current=t,Qe(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!f)return;const o=t.getValue();await Gt(f,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!f)return;const p=c.getValueInRange(o);be({filePath:f,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Zt(t){if(!ie)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ie.filePath}\``,`**Lines:** ${ie.lineStart}–${ie.lineEnd}`];if(ie.selectedCode){const o=Ke(ie.filePath),c=ie.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),Ct(),vt({parts:[{type:"text",text:n.join(`
2
+ `)}]}),be(null)}return F&&!$?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{className:"size-5 text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(vn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:R,onChange:t=>$t(t.target.value),placeholder:w("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":w("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(tt,{children:[r.jsx(nt,{asChild:!0,children:r.jsx(Re,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFileLabel"),onClick:()=>Ye("new-file"),children:r.jsx(Cn,{size:14})})}),r.jsx(rt,{side:"bottom",children:w("sandbox.fileExplorer.newFile")})]}),r.jsxs(tt,{children:[r.jsx(nt,{asChild:!0,children:r.jsx(Re,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Ye("new-folder"),children:r.jsx(wn,{size:14})})}),r.jsx(rt,{side:"bottom",children:w("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(jn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!R&&Je.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",p=h.has(n.path),v=X?.path===n.path,ce=Jn(n.path,n.kind),Ne=c&&ee.has(n.path);return r.jsx(Gr,{node:n,depth:o,isExpanded:p,isSelected:v,isLoading:Ne,fileVisual:Ie(n.name),onSelect:()=>I(n),onOpen:()=>{c?qt(n.path,p):he(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>Be(w,"Path",Ee(n.path)),onCopyRelativePath:()=>Be(w,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>Fe(n)},n.path)}),!R&&$&&Je.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFilesFound")}),R&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.files")}),Oe>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Oe,Oe>=ct?"+":""]})]}),O!==null&&O.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFileNamesMatch")}),O?.map(t=>{const n=t.split("/").pop()??t,o=Se(t),{Icon:c,color:p}=Ie(n),v=f===t;return r.jsxs("button",{type:"button",onClick:()=>he(t),title:t,className:le("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",v&&"bg-accent"),children:[r.jsx(c,{size:14,className:le("shrink-0",p)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),R&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.inFiles")}),et>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[et,M?"+":""]}),S&&r.jsx(pe,{className:"size-[10px]"})]}),!S&&P!==null&&Ze.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noMatchesInFileContents")}),Ze.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Ie(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:le("shrink-0",c)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(p=>r.jsxs("button",{type:"button",onClick:()=>_t(p),title:`${t.path}:${p.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:p.line}),r.jsx(qr,{text:p.text,query:R})]},`${t.path}:${p.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[C.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:C.map(t=>{const n=me.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=f===t,p=t.split("/").pop()??t;return r.jsxs("div",{className:le("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",c?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{L(t),We(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":c,children:[r.jsx("span",{className:"truncate max-w-32",children:p}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:v=>{v.stopPropagation(),Vt(t)},children:r.jsx(Nn,{size:12})})]},t)})}),ie&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Zt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:w("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&be(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:w("sandbox.fileExplorer.send"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:w("sandbox.fileExplorer.send")}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:f&&ue?.loaded?r.jsx(Sn,{language:Ke(f),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ue.editorValue,path:f,onChange:t=>{const n=f;n&&de(o=>{const c=new Map(o),p=c.get(n);return p&&c.set(n,{...p,editorValue:t??""}),c})},onMount:Jt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{className:"size-5 text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},f):f&&!ue?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{className:"size-5 text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:w("sandbox.fileExplorer.selectFileToEdit")})}),f&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:f}),r.jsxs("span",{children:[w(Xt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Ke(f)]})]})]}),r.jsx(ar,{open:U!==null,mode:U?.mode??"new-file",initialName:U?.mode==="rename"?U.node.name:"",parentLabel:U&&U.mode!=="rename"?U.parentDir==="/"?"/":re(U.parentDir):void 0,isPending:ve,onSubmit:t=>Tt(w,t),onOpenChange:t=>{!t&&!ve&&oe(null)}}),r.jsx(lr,{deleteTarget:ke,deleteDirtyPaths:Yt,fsActionPending:ve,onOpenChange:t=>{!t&&!ve&&Fe(null)},onConfirm:t=>{Rt(w,t)}})]})}export{Yi as FileExplorer};
@@ -1 +1 @@
1
- import{c as g,j as o}from"./index-DZsx-GLV.js";const h={pdf:"#D92D20",doc:"#155EEF",docx:"#155EEF",txt:"#475467",md:"#475467",xls:"#099250",xlsx:"#099250",csv:"#099250",tsv:"#099250",json:"#475467",xml:"#475467",yaml:"#475467",yml:"#475467",ppt:"#DC6803",pptx:"#DC6803",key:"#DC6803",png:"#7F56D9",jpg:"#7F56D9",jpeg:"#7F56D9",gif:"#7F56D9",webp:"#7F56D9",svg:"#7F56D9",avif:"#7F56D9",mp3:"#DD2590",wav:"#DD2590",mp4:"#DD2590",mov:"#DD2590",webm:"#DD2590",zip:"#475467",tar:"#475467",gz:"#475467",rar:"#475467",html:"#DC6803",htm:"#DC6803",css:"#155EEF",js:"#155EEF",jsx:"#155EEF",ts:"#155EEF",tsx:"#155EEF",py:"#155EEF",sql:"#155EEF",sh:"#475467"},F="#475467",D={pdf:"PDF",doc:"Word document",docx:"Word document",txt:"Text file",md:"Markdown",xls:"Excel file",xlsx:"Excel file",csv:"CSV file",tsv:"TSV file",json:"JSON file",xml:"XML file",yaml:"YAML file",yml:"YAML file",ppt:"Presentation",pptx:"Presentation",key:"Presentation",png:"Image",jpg:"Image",jpeg:"Image",gif:"Image",webp:"Image",svg:"Image",avif:"Image",mp3:"Audio",wav:"Audio",mp4:"Video",mov:"Video",webm:"Video",zip:"Archive",tar:"Archive",gz:"Archive",rar:"Archive",html:"HTML file",htm:"HTML file"};function v(l){const e=f(l);return e?D[e]??`${e.toUpperCase()} file`:"File"}function f(l){const e=l.lastIndexOf(".");if(e<=0||e===l.length-1)return null;const t=l.slice(e+1).toLowerCase();return t.length>4||!/^[a-z0-9]+$/.test(t)?null:t}function u(l){const e=g.c(17);let t,n;e[0]!==l?({filename:t,...n}=l,e[0]=l,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s,i,a;e[3]!==t?(i=f(t),s=i?h[i]??F:null,a=i?.toUpperCase()??"",e[3]=t,e[4]=s,e[5]=i,e[6]=a):(s=e[4],i=e[5],a=e[6]);const c=a,m=Math.min(8+c.length*4.6,28);let p,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("path",{d:"M19.5 1H8a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V9.5L19.5 1Z",className:"fill-background stroke-border",strokeWidth:"1.5"}),x=o.jsx("path",{d:"M19.5 1v4.5a4 4 0 0 0 4 4H28",className:"stroke-border",strokeWidth:"1.5"}),e[7]=p,e[8]=x):(p=e[7],x=e[8]);let r;e[9]!==m||e[10]!==s||e[11]!==i||e[12]!==c?(r=i&&s&&o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"1",y:"20",width:m,height:"12",rx:"3",fill:s}),o.jsx("text",{x:1+m/2,y:"29",textAnchor:"middle",fontSize:"7",fontWeight:"700",letterSpacing:"0.2",fill:"#FFFFFF",style:{fontFamily:"inherit"},children:c})]}),e[9]=m,e[10]=s,e[11]=i,e[12]=c,e[13]=r):r=e[13];let d;return e[14]!==n||e[15]!==r?(d=o.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[p,x,r]}),e[14]=n,e[15]=r,e[16]=d):d=e[16],d}export{u as F,v as d};
1
+ import{c as g,j as o}from"./index-DJQUO_5F.js";const h={pdf:"#D92D20",doc:"#155EEF",docx:"#155EEF",txt:"#475467",md:"#475467",xls:"#099250",xlsx:"#099250",csv:"#099250",tsv:"#099250",json:"#475467",xml:"#475467",yaml:"#475467",yml:"#475467",ppt:"#DC6803",pptx:"#DC6803",key:"#DC6803",png:"#7F56D9",jpg:"#7F56D9",jpeg:"#7F56D9",gif:"#7F56D9",webp:"#7F56D9",svg:"#7F56D9",avif:"#7F56D9",mp3:"#DD2590",wav:"#DD2590",mp4:"#DD2590",mov:"#DD2590",webm:"#DD2590",zip:"#475467",tar:"#475467",gz:"#475467",rar:"#475467",html:"#DC6803",htm:"#DC6803",css:"#155EEF",js:"#155EEF",jsx:"#155EEF",ts:"#155EEF",tsx:"#155EEF",py:"#155EEF",sql:"#155EEF",sh:"#475467"},F="#475467",D={pdf:"PDF",doc:"Word document",docx:"Word document",txt:"Text file",md:"Markdown",xls:"Excel file",xlsx:"Excel file",csv:"CSV file",tsv:"TSV file",json:"JSON file",xml:"XML file",yaml:"YAML file",yml:"YAML file",ppt:"Presentation",pptx:"Presentation",key:"Presentation",png:"Image",jpg:"Image",jpeg:"Image",gif:"Image",webp:"Image",svg:"Image",avif:"Image",mp3:"Audio",wav:"Audio",mp4:"Video",mov:"Video",webm:"Video",zip:"Archive",tar:"Archive",gz:"Archive",rar:"Archive",html:"HTML file",htm:"HTML file"};function v(l){const e=f(l);return e?D[e]??`${e.toUpperCase()} file`:"File"}function f(l){const e=l.lastIndexOf(".");if(e<=0||e===l.length-1)return null;const t=l.slice(e+1).toLowerCase();return t.length>4||!/^[a-z0-9]+$/.test(t)?null:t}function u(l){const e=g.c(17);let t,n;e[0]!==l?({filename:t,...n}=l,e[0]=l,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s,i,a;e[3]!==t?(i=f(t),s=i?h[i]??F:null,a=i?.toUpperCase()??"",e[3]=t,e[4]=s,e[5]=i,e[6]=a):(s=e[4],i=e[5],a=e[6]);const c=a,m=Math.min(8+c.length*4.6,28);let p,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("path",{d:"M19.5 1H8a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V9.5L19.5 1Z",className:"fill-background stroke-border",strokeWidth:"1.5"}),x=o.jsx("path",{d:"M19.5 1v4.5a4 4 0 0 0 4 4H28",className:"stroke-border",strokeWidth:"1.5"}),e[7]=p,e[8]=x):(p=e[7],x=e[8]);let r;e[9]!==m||e[10]!==s||e[11]!==i||e[12]!==c?(r=i&&s&&o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"1",y:"20",width:m,height:"12",rx:"3",fill:s}),o.jsx("text",{x:1+m/2,y:"29",textAnchor:"middle",fontSize:"7",fontWeight:"700",letterSpacing:"0.2",fill:"#FFFFFF",style:{fontFamily:"inherit"},children:c})]}),e[9]=m,e[10]=s,e[11]=i,e[12]=c,e[13]=r):r=e[13];let d;return e[14]!==n||e[15]!==r?(d=o.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[p,x,r]}),e[14]=n,e[15]=r,e[16]=d):d=e[16],d}export{u as F,v as d};
@@ -1,2 +1,2 @@
1
- import{c as m,G as x,K as y,m as I,n as R,e as P,r as A,j as g}from"./index-DZsx-GLV.js";import{s as D}from"./Eye-ikYAyCJB.js";function nt(s){return s.contentHash??`${s.size}-${s.updatedAt}`}function S(s,t,e,n){const r=new URLSearchParams(n).toString();return`/api/${encodeURIComponent(s)}/fs/${encodeURIComponent(t)}/${e}${r?`?${r}`:""}`}async function F(s,t,e){const n=await fetch(s,t);if(n.ok||e?.allow404&&n.status===404)return n;let r="";try{r=(await n.json()).error??""}catch{}throw new Error(r||`HTTP ${n.status}`)}function rt(s,t){const e=m.c(15),{org:n}=x();let r;e[0]!==n.id||e[1]!==t||e[2]!==s?(r=y.orgFsList(n.id,s,t),e[0]=n.id,e[1]=t,e[2]=s,e[3]=r):r=e[3];let i;e[4]!==n.id||e[5]!==s?(i=(c,l)=>l?.queryKey[1]===n.id&&l.queryKey[2]===s?c:void 0,e[4]=n.id,e[5]=s,e[6]=i):i=e[6];let a;e[7]!==n.slug||e[8]!==t||e[9]!==s?(a=async()=>(await(await F(S(n.slug,s,"list",{path:t}))).json()).entries.toSorted(M),e[7]=n.slug,e[8]=t,e[9]=s,e[10]=a):a=e[10];let o;return e[11]!==r||e[12]!==i||e[13]!==a?(o={queryKey:r,placeholderData:i,queryFn:a},e[11]=r,e[12]=i,e[13]=a,e[14]=o):o=e[14],I(o)}function M(s,t){return s.kind!==t.kind?s.kind==="dir"?-1:1:s.path.localeCompare(t.path)}async function B(s,t,e){const n=await F(S(s,t,"stat",{path:e}),void 0,{allow404:!0});return n.status===404?null:(await n.json()).entry}function it(s,t,e){const n=m.c(15),{org:r}=x();let i;n[0]!==r.id||n[1]!==t||n[2]!==s?(i=y.orgFsStat(r.id,s??"",t),n[0]=r.id,n[1]=t,n[2]=s,n[3]=i):i=n[3];const a=s!==null;let o;n[4]!==e?(o=e?.refetchIntervalWhenAbsent?d=>d.state.data?!1:e.refetchIntervalWhenAbsent??!1:void 0,n[4]=e,n[5]=o):o=n[5];let c;n[6]!==r.slug||n[7]!==t||n[8]!==s?(c=()=>B(r.slug,s??"",t),n[6]=r.slug,n[7]=t,n[8]=s,n[9]=c):c=n[9];let l;return n[10]!==i||n[11]!==a||n[12]!==o||n[13]!==c?(l={queryKey:i,enabled:a,refetchInterval:o,queryFn:c},n[10]=i,n[11]=a,n[12]=o,n[13]=c,n[14]=l):l=n[14],I(l)}function ot(s){const t=m.c(9),{org:e}=x();let n;t[0]!==e.id||t[1]!==s?(n=y.orgFsUsage(e.id,s),t[0]=e.id,t[1]=s,t[2]=n):n=t[2];let r;t[3]!==e.slug||t[4]!==s?(r=async()=>await(await F(S(e.slug,s,"usage"))).json(),t[3]=e.slug,t[4]=s,t[5]=r):r=t[5];let i;return t[6]!==n||t[7]!==r?(i={queryKey:n,queryFn:r},t[6]=n,t[7]=r,t[8]=i):i=t[8],I(i)}function at(s,t){const e=m.c(9),n=s===void 0?60:s,{org:r}=x();let i;e[0]!==r.id?(i=y.orgFsRecent(r.id),e[0]=r.id,e[1]=i):i=e[1];const a=t?.enabled;let o;e[2]!==n||e[3]!==r.slug?(o=async()=>(await(await F(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${n}`)).json()).entries,e[2]=n,e[3]=r.slug,e[4]=o):o=e[4];let c;return e[5]!==i||e[6]!==a||e[7]!==o?(c={queryKey:i,enabled:a,queryFn:o},e[5]=i,e[6]=a,e[7]=o,e[8]=c):c=e[8],I(c)}const Q=50;function lt(s,t){const e=m.c(16),{org:n}=x();let r;e[0]!==n.id||e[1]!==s||e[2]!==t?.prefix||e[3]!==t?.volume?(r=y.orgFsSearch(n.id,s,t?.volume??"",t?.prefix??""),e[0]=n.id,e[1]=s,e[2]=t?.prefix,e[3]=t?.volume,e[4]=r):r=e[4];const i=s.length>0;let a;e[5]!==n.id?(a=(l,d)=>d?.queryKey[1]===n.id?l:void 0,e[5]=n.id,e[6]=a):a=e[6];let o;e[7]!==n.slug||e[8]!==s||e[9]!==t?(o=async()=>{const l=new URLSearchParams({q:s,limit:String(Q)});return t&&(l.set("volume",t.volume),t.prefix&&l.set("prefix",t.prefix)),(await(await F(`/api/${encodeURIComponent(n.slug)}/fs/search?${l}`)).json()).entries},e[7]=n.slug,e[8]=s,e[9]=t,e[10]=o):o=e[10];let c;return e[11]!==r||e[12]!==i||e[13]!==a||e[14]!==o?(c={queryKey:r,enabled:i,placeholderData:a,queryFn:o},e[11]=r,e[12]=i,e[13]=a,e[14]=o,e[15]=c):c=e[15],I(c)}function ct(s){const t=m.c(8),{org:e}=x();let n;t[0]!==e.id?(n=y.orgFsSkills(e.id),t[0]=e.id,t[1]=n):n=t[1];const r=s?.enabled;let i;t[2]!==e.slug?(i=async()=>{const o=await F(`/api/${encodeURIComponent(e.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(N)},t[2]=e.slug,t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a={queryKey:n,enabled:r,queryFn:i},t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],I(a)}function N(s){return{volume:s.volume,path:s.path}}async function W(s){const t=await F(`/api/${encodeURIComponent(s)}/fs/skills`),{skills:e}=await t.json();return e}function ft(){const s=m.c(7),{org:t}=x();let e;s[0]!==t.id?(e=y.slashSkills(t.id),s[0]=t.id,s[1]=e):e=s[1];let n;s[2]!==t.slug?(n=()=>W(t.slug),s[2]=t.slug,s[3]=n):n=s[3];let r;return s[4]!==e||s[5]!==n?(r={queryKey:e,queryFn:n,staleTime:6e4},s[4]=e,s[5]=n,s[6]=r):r=s[6],I(r)}async function H(s,t,e){return(await F(S(s,t,"read",{path:e}))).text()}function dt(s,t){const e=m.c(8);let n;e[0]!==s?(n=y.fileText(s),e[0]=s,e[1]=n):n=e[1];const r=t?.enabled!==!1&&s!=="";let i;e[2]!==s?(i=async()=>{const o=await fetch(s,{credentials:"include"});return o.ok?await o.text():null},e[2]=s,e[3]=i):i=e[3];let a;return e[4]!==n||e[5]!==r||e[6]!==i?(a={queryKey:n,enabled:r,staleTime:6e4,retry:!1,queryFn:i},e[4]=n,e[5]=r,e[6]=i,e[7]=a):a=e[7],I(a)}const X=new Set(["md","mdx","markdown","txt","text"]),G=25,V=64*1024,z=256*1024,Y=4;function J(s){const t=s.lastIndexOf(".");return t===-1?!1:X.has(s.slice(t+1).toLowerCase())}async function ut(s,t,e){const n=e?`${e}/`:"",r=f=>f.startsWith(n)?f.slice(n.length):f,i=[],a=[],o=[{path:e,depth:0}];for(;o.length>0;){const f=o.shift();if(!f)break;let h;try{h=(await(await F(S(s,t,"list",{path:f.path}))).json()).entries}catch{continue}for(const u of[...h].sort((b,w)=>b.path.localeCompare(w.path))){if(u.kind==="dir"){f.depth<Y&&o.push({path:u.path,depth:f.depth+1});continue}J(u.path)&&u.size<=V&&i.length<G?i.push(u.path):a.push(r(u.path))}}const c=await Promise.all(i.map(f=>H(s,t,f).catch(()=>null))),l=[];let d=0;return i.forEach((f,h)=>{const u=c[h];if(u==null||d+u.length>z){a.push(r(f));return}d+=u.length,l.push({relPath:r(f),content:u})}),l.sort((f,h)=>f.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:f.relPath.localeCompare(h.relPath)),a.sort(),{files:l,omittedPaths:a}}function ht(){const s=m.c(7),{org:t}=x();let e;s[0]!==t.id?(e=y.orgFsPublicSets(t.id),s[0]=t.id,s[1]=e):e=s[1];let n;s[2]!==t.slug?(n=async()=>(await(await F(`/api/${encodeURIComponent(t.slug)}/fs/public-sets`)).json()).sets,s[2]=t.slug,s[3]=n):n=s[3];let r;return s[4]!==e||s[5]!==n?(r={queryKey:e,staleTime:3e5,queryFn:n},s[4]=e,s[5]=n,s[6]=r):r=s[6],I(r)}function gt(s){const t=m.c(3),{org:e}=x();let n;return t[0]!==e.slug||t[1]!==s?(n=r=>S(e.slug,s,"read",{path:r}),t[0]=e.slug,t[1]=s,t[2]=n):n=t[2],n}function yt(){const s=m.c(2),{org:t}=x();let e;return s[0]!==t.slug?(e=(n,r)=>S(t.slug,n,"read",{path:r}),s[0]=t.slug,s[1]=e):e=s[1],e}function pt(s){const t=m.c(3),{org:e}=x();let n;return t[0]!==e||t[1]!==s?(n={mutationFn:async r=>(await(await F(S(e.slug,s,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},t[0]=e,t[1]=s,t[2]=n):n=t[2],P(n)}function Ft(s){const t=m.c(18),{org:e}=x(),n=R();let r;t[0]!==e||t[1]!==s?(r=async l=>(await(await F(S(e.slug,s,"public",{path:l.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:l.mode,password:l.password})})).json()).entry,t[0]=e,t[1]=s,t[2]=r):r=t[2];let i;t[3]!==e||t[4]!==n||t[5]!==s?(i=async l=>{const d=y.orgFsStat(e.id,s,l.path);await n.cancelQueries({queryKey:d});const f=n.getQueryData(d),h=l.mode!=="private";return n.setQueryData(d,u=>u&&{...u,readPublic:h,effectivePublic:h,shareMode:l.mode}),{key:d,previous:f}},t[3]=e,t[4]=n,t[5]=s,t[6]=i):i=t[6];let a;t[7]!==n?(a=(l,d,f)=>{f&&n.setQueryData(f.key,f.previous)},t[7]=n,t[8]=a):a=t[8];let o;t[9]!==e||t[10]!==n||t[11]!==s?(o=(l,d,f)=>{n.invalidateQueries({queryKey:y.orgFsStat(e.id,s,f.path)}),n.invalidateQueries({queryKey:y.orgFsVolume(e.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(e.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e.id)})},t[9]=e,t[10]=n,t[11]=s,t[12]=o):o=t[12];let c;return t[13]!==r||t[14]!==i||t[15]!==a||t[16]!==o?(c={mutationFn:r,onMutate:i,onError:a,onSettled:o},t[13]=r,t[14]=i,t[15]=a,t[16]=o,t[17]=c):c=t[17],P(c)}function mt(s){const t=m.c(33),{org:e}=x(),n=R();let r;t[0]!==e||t[1]!==n||t[2]!==s?(r=()=>{n.invalidateQueries({queryKey:y.orgFsVolume(e.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(e.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e.id)})},t[0]=e,t[1]=n,t[2]=s,t[3]=r):r=t[3];const i=r;let a;t[4]!==e||t[5]!==s?(a=async p=>{const C=(await Promise.allSettled(p.files.map(j=>{const q=p.dir?`${p.dir}/${j.name}`:j.name;return F(S(e.slug,s,"file",{path:q}),{method:"PUT",headers:{"content-type":j.type||"application/octet-stream"},body:j})}))).find(Z);if(C)throw C.reason},t[4]=e,t[5]=s,t[6]=a):a=t[6];let o;t[7]!==i||t[8]!==a?(o={mutationFn:a,onSettled:i},t[7]=i,t[8]=a,t[9]=o):o=t[9];const c=P(o);let l;t[10]!==e||t[11]!==s?(l=async p=>{await F(S(e.slug,s,"dir",{path:p}),{method:"POST"})},t[10]=e,t[11]=s,t[12]=l):l=t[12];let d;t[13]!==i||t[14]!==l?(d={mutationFn:l,onSuccess:i},t[13]=i,t[14]=l,t[15]=d):d=t[15];const f=P(d);let h;t[16]!==e||t[17]!==s?(h=async p=>{await F(S(e.slug,s,"file",{path:p}),{method:"DELETE"})},t[16]=e,t[17]=s,t[18]=h):h=t[18];let u;t[19]!==i||t[20]!==h?(u={mutationFn:h,onSuccess:i},t[19]=i,t[20]=h,t[21]=u):u=t[21];const b=P(u);let w;t[22]!==e||t[23]!==s?(w=async p=>{await F(S(e.slug,s,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(p)})},t[22]=e,t[23]=s,t[24]=w):w=t[24];let k;t[25]!==i||t[26]!==w?(k={mutationFn:w,onSuccess:i},t[25]=i,t[26]=w,t[27]=k):k=t[27];const T=P(k);let $;return t[28]!==f||t[29]!==T||t[30]!==b||t[31]!==c?($={upload:c,mkdir:f,remove:b,move:T},t[28]=f,t[29]=T,t[30]=b,t[31]=c,t[32]=$):$=t[32],$}function Z(s){return s.status==="rejected"}function v(s){const t={};for(const e of s.split(`
1
+ import{c as m,G as x,K as y,m as I,n as R,e as P,r as A,j as g}from"./index-DJQUO_5F.js";import{s as D}from"./Eye-DSfFTZ0l.js";function nt(s){return s.contentHash??`${s.size}-${s.updatedAt}`}function S(s,t,e,n){const r=new URLSearchParams(n).toString();return`/api/${encodeURIComponent(s)}/fs/${encodeURIComponent(t)}/${e}${r?`?${r}`:""}`}async function F(s,t,e){const n=await fetch(s,t);if(n.ok||e?.allow404&&n.status===404)return n;let r="";try{r=(await n.json()).error??""}catch{}throw new Error(r||`HTTP ${n.status}`)}function rt(s,t){const e=m.c(15),{org:n}=x();let r;e[0]!==n.id||e[1]!==t||e[2]!==s?(r=y.orgFsList(n.id,s,t),e[0]=n.id,e[1]=t,e[2]=s,e[3]=r):r=e[3];let i;e[4]!==n.id||e[5]!==s?(i=(c,l)=>l?.queryKey[1]===n.id&&l.queryKey[2]===s?c:void 0,e[4]=n.id,e[5]=s,e[6]=i):i=e[6];let a;e[7]!==n.slug||e[8]!==t||e[9]!==s?(a=async()=>(await(await F(S(n.slug,s,"list",{path:t}))).json()).entries.toSorted(M),e[7]=n.slug,e[8]=t,e[9]=s,e[10]=a):a=e[10];let o;return e[11]!==r||e[12]!==i||e[13]!==a?(o={queryKey:r,placeholderData:i,queryFn:a},e[11]=r,e[12]=i,e[13]=a,e[14]=o):o=e[14],I(o)}function M(s,t){return s.kind!==t.kind?s.kind==="dir"?-1:1:s.path.localeCompare(t.path)}async function B(s,t,e){const n=await F(S(s,t,"stat",{path:e}),void 0,{allow404:!0});return n.status===404?null:(await n.json()).entry}function it(s,t,e){const n=m.c(15),{org:r}=x();let i;n[0]!==r.id||n[1]!==t||n[2]!==s?(i=y.orgFsStat(r.id,s??"",t),n[0]=r.id,n[1]=t,n[2]=s,n[3]=i):i=n[3];const a=s!==null;let o;n[4]!==e?(o=e?.refetchIntervalWhenAbsent?d=>d.state.data?!1:e.refetchIntervalWhenAbsent??!1:void 0,n[4]=e,n[5]=o):o=n[5];let c;n[6]!==r.slug||n[7]!==t||n[8]!==s?(c=()=>B(r.slug,s??"",t),n[6]=r.slug,n[7]=t,n[8]=s,n[9]=c):c=n[9];let l;return n[10]!==i||n[11]!==a||n[12]!==o||n[13]!==c?(l={queryKey:i,enabled:a,refetchInterval:o,queryFn:c},n[10]=i,n[11]=a,n[12]=o,n[13]=c,n[14]=l):l=n[14],I(l)}function ot(s){const t=m.c(9),{org:e}=x();let n;t[0]!==e.id||t[1]!==s?(n=y.orgFsUsage(e.id,s),t[0]=e.id,t[1]=s,t[2]=n):n=t[2];let r;t[3]!==e.slug||t[4]!==s?(r=async()=>await(await F(S(e.slug,s,"usage"))).json(),t[3]=e.slug,t[4]=s,t[5]=r):r=t[5];let i;return t[6]!==n||t[7]!==r?(i={queryKey:n,queryFn:r},t[6]=n,t[7]=r,t[8]=i):i=t[8],I(i)}function at(s,t){const e=m.c(9),n=s===void 0?60:s,{org:r}=x();let i;e[0]!==r.id?(i=y.orgFsRecent(r.id),e[0]=r.id,e[1]=i):i=e[1];const a=t?.enabled;let o;e[2]!==n||e[3]!==r.slug?(o=async()=>(await(await F(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${n}`)).json()).entries,e[2]=n,e[3]=r.slug,e[4]=o):o=e[4];let c;return e[5]!==i||e[6]!==a||e[7]!==o?(c={queryKey:i,enabled:a,queryFn:o},e[5]=i,e[6]=a,e[7]=o,e[8]=c):c=e[8],I(c)}const Q=50;function lt(s,t){const e=m.c(16),{org:n}=x();let r;e[0]!==n.id||e[1]!==s||e[2]!==t?.prefix||e[3]!==t?.volume?(r=y.orgFsSearch(n.id,s,t?.volume??"",t?.prefix??""),e[0]=n.id,e[1]=s,e[2]=t?.prefix,e[3]=t?.volume,e[4]=r):r=e[4];const i=s.length>0;let a;e[5]!==n.id?(a=(l,d)=>d?.queryKey[1]===n.id?l:void 0,e[5]=n.id,e[6]=a):a=e[6];let o;e[7]!==n.slug||e[8]!==s||e[9]!==t?(o=async()=>{const l=new URLSearchParams({q:s,limit:String(Q)});return t&&(l.set("volume",t.volume),t.prefix&&l.set("prefix",t.prefix)),(await(await F(`/api/${encodeURIComponent(n.slug)}/fs/search?${l}`)).json()).entries},e[7]=n.slug,e[8]=s,e[9]=t,e[10]=o):o=e[10];let c;return e[11]!==r||e[12]!==i||e[13]!==a||e[14]!==o?(c={queryKey:r,enabled:i,placeholderData:a,queryFn:o},e[11]=r,e[12]=i,e[13]=a,e[14]=o,e[15]=c):c=e[15],I(c)}function ct(s){const t=m.c(8),{org:e}=x();let n;t[0]!==e.id?(n=y.orgFsSkills(e.id),t[0]=e.id,t[1]=n):n=t[1];const r=s?.enabled;let i;t[2]!==e.slug?(i=async()=>{const o=await F(`/api/${encodeURIComponent(e.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(N)},t[2]=e.slug,t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a={queryKey:n,enabled:r,queryFn:i},t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],I(a)}function N(s){return{volume:s.volume,path:s.path}}async function W(s){const t=await F(`/api/${encodeURIComponent(s)}/fs/skills`),{skills:e}=await t.json();return e}function ft(){const s=m.c(7),{org:t}=x();let e;s[0]!==t.id?(e=y.slashSkills(t.id),s[0]=t.id,s[1]=e):e=s[1];let n;s[2]!==t.slug?(n=()=>W(t.slug),s[2]=t.slug,s[3]=n):n=s[3];let r;return s[4]!==e||s[5]!==n?(r={queryKey:e,queryFn:n,staleTime:6e4},s[4]=e,s[5]=n,s[6]=r):r=s[6],I(r)}async function H(s,t,e){return(await F(S(s,t,"read",{path:e}))).text()}function dt(s,t){const e=m.c(8);let n;e[0]!==s?(n=y.fileText(s),e[0]=s,e[1]=n):n=e[1];const r=t?.enabled!==!1&&s!=="";let i;e[2]!==s?(i=async()=>{const o=await fetch(s,{credentials:"include"});return o.ok?await o.text():null},e[2]=s,e[3]=i):i=e[3];let a;return e[4]!==n||e[5]!==r||e[6]!==i?(a={queryKey:n,enabled:r,staleTime:6e4,retry:!1,queryFn:i},e[4]=n,e[5]=r,e[6]=i,e[7]=a):a=e[7],I(a)}const X=new Set(["md","mdx","markdown","txt","text"]),G=25,V=64*1024,z=256*1024,Y=4;function J(s){const t=s.lastIndexOf(".");return t===-1?!1:X.has(s.slice(t+1).toLowerCase())}async function ut(s,t,e){const n=e?`${e}/`:"",r=f=>f.startsWith(n)?f.slice(n.length):f,i=[],a=[],o=[{path:e,depth:0}];for(;o.length>0;){const f=o.shift();if(!f)break;let h;try{h=(await(await F(S(s,t,"list",{path:f.path}))).json()).entries}catch{continue}for(const u of[...h].sort((b,w)=>b.path.localeCompare(w.path))){if(u.kind==="dir"){f.depth<Y&&o.push({path:u.path,depth:f.depth+1});continue}J(u.path)&&u.size<=V&&i.length<G?i.push(u.path):a.push(r(u.path))}}const c=await Promise.all(i.map(f=>H(s,t,f).catch(()=>null))),l=[];let d=0;return i.forEach((f,h)=>{const u=c[h];if(u==null||d+u.length>z){a.push(r(f));return}d+=u.length,l.push({relPath:r(f),content:u})}),l.sort((f,h)=>f.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:f.relPath.localeCompare(h.relPath)),a.sort(),{files:l,omittedPaths:a}}function ht(){const s=m.c(7),{org:t}=x();let e;s[0]!==t.id?(e=y.orgFsPublicSets(t.id),s[0]=t.id,s[1]=e):e=s[1];let n;s[2]!==t.slug?(n=async()=>(await(await F(`/api/${encodeURIComponent(t.slug)}/fs/public-sets`)).json()).sets,s[2]=t.slug,s[3]=n):n=s[3];let r;return s[4]!==e||s[5]!==n?(r={queryKey:e,staleTime:3e5,queryFn:n},s[4]=e,s[5]=n,s[6]=r):r=s[6],I(r)}function gt(s){const t=m.c(3),{org:e}=x();let n;return t[0]!==e.slug||t[1]!==s?(n=r=>S(e.slug,s,"read",{path:r}),t[0]=e.slug,t[1]=s,t[2]=n):n=t[2],n}function yt(){const s=m.c(2),{org:t}=x();let e;return s[0]!==t.slug?(e=(n,r)=>S(t.slug,n,"read",{path:r}),s[0]=t.slug,s[1]=e):e=s[1],e}function pt(s){const t=m.c(3),{org:e}=x();let n;return t[0]!==e||t[1]!==s?(n={mutationFn:async r=>(await(await F(S(e.slug,s,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},t[0]=e,t[1]=s,t[2]=n):n=t[2],P(n)}function Ft(s){const t=m.c(18),{org:e}=x(),n=R();let r;t[0]!==e||t[1]!==s?(r=async l=>(await(await F(S(e.slug,s,"public",{path:l.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:l.mode,password:l.password})})).json()).entry,t[0]=e,t[1]=s,t[2]=r):r=t[2];let i;t[3]!==e||t[4]!==n||t[5]!==s?(i=async l=>{const d=y.orgFsStat(e.id,s,l.path);await n.cancelQueries({queryKey:d});const f=n.getQueryData(d),h=l.mode!=="private";return n.setQueryData(d,u=>u&&{...u,readPublic:h,effectivePublic:h,shareMode:l.mode}),{key:d,previous:f}},t[3]=e,t[4]=n,t[5]=s,t[6]=i):i=t[6];let a;t[7]!==n?(a=(l,d,f)=>{f&&n.setQueryData(f.key,f.previous)},t[7]=n,t[8]=a):a=t[8];let o;t[9]!==e||t[10]!==n||t[11]!==s?(o=(l,d,f)=>{n.invalidateQueries({queryKey:y.orgFsStat(e.id,s,f.path)}),n.invalidateQueries({queryKey:y.orgFsVolume(e.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(e.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e.id)})},t[9]=e,t[10]=n,t[11]=s,t[12]=o):o=t[12];let c;return t[13]!==r||t[14]!==i||t[15]!==a||t[16]!==o?(c={mutationFn:r,onMutate:i,onError:a,onSettled:o},t[13]=r,t[14]=i,t[15]=a,t[16]=o,t[17]=c):c=t[17],P(c)}function mt(s){const t=m.c(33),{org:e}=x(),n=R();let r;t[0]!==e||t[1]!==n||t[2]!==s?(r=()=>{n.invalidateQueries({queryKey:y.orgFsVolume(e.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(e.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e.id)})},t[0]=e,t[1]=n,t[2]=s,t[3]=r):r=t[3];const i=r;let a;t[4]!==e||t[5]!==s?(a=async p=>{const C=(await Promise.allSettled(p.files.map(j=>{const q=p.dir?`${p.dir}/${j.name}`:j.name;return F(S(e.slug,s,"file",{path:q}),{method:"PUT",headers:{"content-type":j.type||"application/octet-stream"},body:j})}))).find(Z);if(C)throw C.reason},t[4]=e,t[5]=s,t[6]=a):a=t[6];let o;t[7]!==i||t[8]!==a?(o={mutationFn:a,onSettled:i},t[7]=i,t[8]=a,t[9]=o):o=t[9];const c=P(o);let l;t[10]!==e||t[11]!==s?(l=async p=>{await F(S(e.slug,s,"dir",{path:p}),{method:"POST"})},t[10]=e,t[11]=s,t[12]=l):l=t[12];let d;t[13]!==i||t[14]!==l?(d={mutationFn:l,onSuccess:i},t[13]=i,t[14]=l,t[15]=d):d=t[15];const f=P(d);let h;t[16]!==e||t[17]!==s?(h=async p=>{await F(S(e.slug,s,"file",{path:p}),{method:"DELETE"})},t[16]=e,t[17]=s,t[18]=h):h=t[18];let u;t[19]!==i||t[20]!==h?(u={mutationFn:h,onSuccess:i},t[19]=i,t[20]=h,t[21]=u):u=t[21];const b=P(u);let w;t[22]!==e||t[23]!==s?(w=async p=>{await F(S(e.slug,s,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(p)})},t[22]=e,t[23]=s,t[24]=w):w=t[24];let k;t[25]!==i||t[26]!==w?(k={mutationFn:w,onSuccess:i},t[25]=i,t[26]=w,t[27]=k):k=t[27];const T=P(k);let $;return t[28]!==f||t[29]!==T||t[30]!==b||t[31]!==c?($={upload:c,mkdir:f,remove:b,move:T},t[28]=f,t[29]=T,t[30]=b,t[31]=c,t[32]=$):$=t[32],$}function Z(s){return s.status==="rejected"}function v(s){const t={};for(const e of s.split(`
2
2
  `)){const n=e.match(/^([A-Za-z][\w-]*):\s*(.*)$/);n?.[1]&&n[2]!==void 0&&(t[n[1].toLowerCase()]=n[2].trim())}return t}function U(s){for(const t of s.split(/\n\s*\n/)){const e=t.trim();if(!(!e||e.startsWith("#")))return e.replace(/\n/g," ")}return null}function wt(s){const t=s.match(/^---\n([\s\S]*?)\n---\n?/);if(!t||t[1]===void 0)return{name:null,description:U(s),body:s};const e=v(t[1]),n=s.slice(t[0].length);return{name:e.name||null,description:e.description||U(n),body:n}}const tt={default:{backFrom:"#4D87DF",backTo:"#296FE8",frontFrom:"#72B6FA",frontTo:"#5BB1EF",stripe:"#84CDFB",glyph:"#014AC9"},system:{backFrom:"#8A94A6",backTo:"#6B7687",frontFrom:"#B6BEC9",frontTo:"#A3ADBA",stripe:"#D5DBE3",glyph:"#3D4757"}};function St(s){const t=m.c(46);let e,n,r,i;t[0]!==s?({glyph:e,readOnly:r,tone:i,...n}=s,t[0]=s,t[1]=e,t[2]=n,t[3]=r,t[4]=i):(e=t[1],n=t[2],r=t[3],i=t[4]);const o=tt[i===void 0?"default":i],c=A.useId(),l=`${c}-back`,d=`${c}-front`,f=`url(#${l})`;let h;t[5]!==f?(h=g.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:f}),t[5]=f,t[6]=h):h=t[6];const u=`url(#${d})`;let b;t[7]!==u?(b=g.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:u}),t[7]=u,t[8]=b):b=t[8];let w;t[9]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),t[9]=w):w=t[9];let k,T;t[10]!==o.stripe?(k=g.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:o.stripe}),T=g.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:o.stripe}),t[10]=o.stripe,t[11]=k,t[12]=T):(k=t[11],T=t[12]);let $;t[13]!==e||t[14]!==o.glyph?($=e&&g.jsx(e,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:o.glyph,opacity:.55}}),t[13]=e,t[14]=o.glyph,t[15]=$):$=t[15];let p;t[16]!==r?(p=r&&g.jsxs(g.Fragment,{children:[g.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),g.jsx(D,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),t[16]=r,t[17]=p):p=t[17];let K;t[18]!==o.backFrom?(K=g.jsx("stop",{offset:"0.3",stopColor:o.backFrom}),t[18]=o.backFrom,t[19]=K):K=t[19];let C;t[20]!==o.backTo?(C=g.jsx("stop",{offset:"1",stopColor:o.backTo}),t[20]=o.backTo,t[21]=C):C=t[21];let j;t[22]!==l||t[23]!==K||t[24]!==C?(j=g.jsxs("linearGradient",{id:l,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[K,C]}),t[22]=l,t[23]=K,t[24]=C,t[25]=j):j=t[25];let q;t[26]!==o.frontFrom?(q=g.jsx("stop",{stopColor:o.frontFrom}),t[26]=o.frontFrom,t[27]=q):q=t[27];let O;t[28]!==o.frontTo?(O=g.jsx("stop",{offset:"1",stopColor:o.frontTo}),t[28]=o.frontTo,t[29]=O):O=t[29];let L;t[30]!==d||t[31]!==q||t[32]!==O?(L=g.jsxs("radialGradient",{id:d,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[q,O]}),t[30]=d,t[31]=q,t[32]=O,t[33]=L):L=t[33];let E;t[34]!==j||t[35]!==L?(E=g.jsxs("defs",{children:[j,L]}),t[34]=j,t[35]=L,t[36]=E):E=t[36];let _;return t[37]!==n||t[38]!==p||t[39]!==E||t[40]!==h||t[41]!==b||t[42]!==k||t[43]!==T||t[44]!==$?(_=g.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[h,b,w,k,T,$,p,E]}),t[37]=n,t[38]=p,t[39]=E,t[40]=h,t[41]=b,t[42]=k,t[43]=T,t[44]=$,t[45]=_):_=t[45],_}export{St as F,W as a,yt as b,at as c,ct as d,gt as e,ut as f,pt as g,nt as h,Ft as i,it as j,dt as k,rt as l,lt as m,ht as n,ot as o,wt as p,ft as q,B as r,mt as u};
@@ -1 +1 @@
1
- import{f9 as C,c as f,j as c,as as j,r as d,l as p,ca as b,fa as v,fb as h}from"./index-DZsx-GLV.js";import{L as N}from"./label-XljGvqhv.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,w as a,P as b,R as c,M as d,L as e,y as f};
1
+ import{fa as C,c as f,j as c,as as j,r as d,l as p,cf as b,fb as v,fc as h}from"./index-DJQUO_5F.js";import{L as N}from"./label-C5IuR8oP.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,w as a,P as b,R as c,M as d,L as e,y as f};
@@ -0,0 +1 @@
1
+ import{ae as re,ag as X,b as U,G as ie,n as le,aq as ce,ar as ge,e as ne,o as W,t as G,K as ee,j as i,b1 as se,b0 as oe,a$ as Q,as as de,c as Y,r as J,a7 as me,M as te,cS as ue,cT as fe,w as pe,B as he,P as M,b5 as xe}from"./index-DJQUO_5F.js";import{u as je}from"./use-org-auth-client-Dv5ggRPD.js";import{u as ze}from"./use-debounced-autosave-CyQ6phI-.js";import{A as Se}from"./avatar-8wWRKAWW.js";import{I as ae}from"./input-DAq8Cogd.js";import{C as ve}from"./review-settings-D7iT6mdL.js";import{D as Oe}from"./domain-settings-4DGH3ghA.js";import{c as be,d as ye,b as Ce,f as _e,g as Ae,e as De,a as Fe,A as we}from"./alert-dialog-BJoAnvTa.js";import{R as Ne}from"./require-capability-DZaP9GRG.js";import"./User01-BYo154It.js";import"./switch-wRuzhZCP.js";import"./UserSquare-B8muuAeC.js";import"./GitBranch01-CzoRmimO.js";import"./SearchLg-B8u5Z_-p.js";import"./use-organization-settings-Duntu8dc.js";import"./use-mcp-client-DOjgXsoM.js";import"./auth-DrTXT3NH.js";import"./schema-CXWi7OUE.js";import"./task-board-D0cF49Rr.js";import"./use-connection-Cj6jhInv.js";import"./badge-Dc8kcV5t.js";import"./select-zsrd2RiW.js";import"./Check-BRo4TcYL.js";import"./ChevronUp-DRrtPFPU.js";import"./access-gate-BUfTolQd.js";import"./capability-load-error-Bt-0_xjM.js";const Te=re({name:X().min(1,"Name is required").max(255,"Name is too long"),logo:X().optional()});function Ee(e){const t=Y.c(17),{value:n,onChange:g,name:r,disabled:l}=e,d=U(),m=J.useRef(null);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>m.current?.click(),t[0]=a):a=t[0];const h=a;let s;t[1]!==g||t[2]!==d?(s=Z=>{const z=Z.target.files?.[0];if(!z)return;if(z.size>2097152){G.error(d("settings.organizationForm.imageTooLarge"));return}const p=new FileReader;p.onerror=()=>G.error(d("settings.organizationForm.failedToReadImage")),p.onloadend=()=>{p.result&&g(p.result),m.current&&(m.current.value="")},p.readAsDataURL(z)},t[1]=g,t[2]=d,t[3]=s):s=t[3];const c=s;let o;t[4]!==d?(o=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=o):o=t[5];let u;t[6]!==l||t[7]!==c?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:c,className:"hidden",disabled:l}),t[6]=l,t[7]=c,t[8]=u):u=t[8];const x=n||void 0,j=r??"?";let f;t[9]!==x||t[10]!==j?(f=i.jsx(Se,{url:x,fallback:j,shape:"square",size:"base"}),t[9]=x,t[10]=j,t[11]=f):f=t[11];let S;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==f?(S=i.jsxs("button",{type:"button",onClick:h,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":o,children:[u,f]}),t[12]=l,t[13]=o,t[14]=u,t[15]=f,t[16]=S):S=t[16],S}function Pe(){const e=U(),{org:t}=ie(),n=je(),g=le(),r=ce({resolver:ge(Te),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async s=>{const c={name:s.name};s.logo&&(c.logo=s.logo);const o=await n.organization.update({data:c});if(o?.error)throw new Error(o.error.message||e("settings.organizationForm.failedToUpdateOrg"));return o},onSuccess:(s,c)=>{W("organization_settings_updated",{organization_id:t.id,fields:Object.keys(c)}),g.invalidateQueries({queryKey:ee.organizations()}),g.invalidateQueries({queryKey:ee.activeOrganization(t.slug)}),G.success(e("settings.organizationForm.updateSuccess"))},onError:(s,c)=>{W("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(c),error:s instanceof Error?s.message:String(s)}),G.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:m}=ze({save:async()=>{const s=r.control._formState.dirtyFields;if(Object.keys(s).length===0||!await r.trigger())return;const o=r.getValues(),u=r.control._defaultValues;r.reset(o,{keepValues:!0});try{await l.mutateAsync(o)}catch{r.reset(u,{keepValues:!0})}}}),a=r.formState.errors,h=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(se,{children:i.jsxs(oe,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ee,{value:r.watch("logo"),onChange:s=>{r.setValue("logo",s??"",{shouldDirty:!0}),m()},name:r.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(de,{control:r.control,name:"name",render:({field:s})=>i.jsx(ae,{id:"org-name",...s,onChange:c=>{s.onChange(c),d()},onBlur:()=>{s.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[h&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:h}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(a.name||a.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[a.name&&i.jsx("p",{className:"text-xs text-destructive",children:a.name.message}),a.logo&&i.jsx("p",{className:"text-xs text-destructive",children:a.logo.message})]})]})})}function Le(){const e=Y.c(86),t=U(),{org:n}=ie(),[g,r]=J.useState(!1),[l,d]=J.useState(""),m=me();let a;e[0]!==n.id||e[1]!==m?(a=async()=>{await m.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=m,e[2]=a):a=e[2];let h;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(h=()=>{W("organization_deleted",{organization_id:n.id}),localStorage.getItem(te.lastOrgSlug())===n.slug&&localStorage.removeItem(te.lastOrgSlug()),ue()?.org===n.slug&&fe(),pe(),G.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=h):h=e[6];let s;e[7]!==t?(s=v=>{G.error(v instanceof Error?v.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=s):s=e[8];let c;e[9]!==a||e[10]!==h||e[11]!==s?(c={mutationFn:a,onSuccess:h,onError:s},e[9]=a,e[10]=h,e[11]=s,e[12]=c):c=e[12];const o=ne(c);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let x;e[15]!==t?(x=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=x):x=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let f;e[19]!==t?(f=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=f):f=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=()=>r(!0),e[21]=S):S=e[21];const Z=o.isPending;let z;e[22]!==t?(z=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=z):z=e[23];let p;e[24]!==o.isPending||e[25]!==z?(p=i.jsx(he,{variant:"destructive",size:"sm",onClick:S,disabled:Z,children:z}),e[24]=o.isPending,e[25]=z,e[26]=p):p=e[26];let O;e[27]!==p||e[28]!==j||e[29]!==f?(O=i.jsx(oe,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:f,action:p})}),e[27]=p,e[28]=j,e[29]=f,e[30]=O):O=e[30];let b;e[31]!==O||e[32]!==u||e[33]!==x?(b=i.jsx(se,{title:u,description:x,children:O}),e[31]=O,e[32]=u,e[33]=x,e[34]=b):b=e[34];let $;e[35]===Symbol.for("react.memo_cache_sentinel")?($=v=>{r(v),v||d("")},e[35]=$):$=e[35];let y;e[36]!==t?(y=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=y):y=e[37];let C;e[38]!==y?(C=i.jsx(be,{children:y}),e[38]=y,e[39]=C):C=e[39];let _;e[40]!==n.name||e[41]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=_):_=e[42];let A;e[43]!==_?(A=i.jsx("p",{children:_}),e[43]=_,e[44]=A):A=e[44];let D;e[45]!==n.name||e[46]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=D):D=e[47];let F;e[48]!==D?(F=i.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[48]=D,e[49]=F):F=e[49];let K;e[50]===Symbol.for("react.memo_cache_sentinel")?(K=v=>d(v.target.value),e[50]=K):K=e[50];let w;e[51]!==l||e[52]!==n.name?(w=i.jsx(ae,{value:l,onChange:K,placeholder:n.name,autoFocus:!0}),e[51]=l,e[52]=n.name,e[53]=w):w=e[53];let N;e[54]!==A||e[55]!==F||e[56]!==w?(N=i.jsx(ye,{asChild:!0,children:i.jsxs("div",{children:[A,F,w]})}),e[54]=A,e[55]=F,e[56]=w,e[57]=N):N=e[57];let T;e[58]!==C||e[59]!==N?(T=i.jsxs(Ce,{children:[C,N]}),e[58]=C,e[59]=N,e[60]=T):T=e[60];let E;e[61]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=E):E=e[62];let P;e[63]!==E?(P=i.jsx(_e,{children:E}),e[63]=E,e[64]=P):P=e[64];let L;e[65]!==o?(L=()=>o.mutate(),e[65]=o,e[66]=L):L=e[66];const H=l!==n.name||o.isPending;let k;e[67]!==o.isPending||e[68]!==t?(k=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=o.isPending,e[68]=t,e[69]=k):k=e[69];let R;e[70]!==L||e[71]!==H||e[72]!==k?(R=i.jsx(Ae,{onClick:L,disabled:H,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=L,e[71]=H,e[72]=k,e[73]=R):R=e[73];let I;e[74]!==P||e[75]!==R?(I=i.jsxs(De,{children:[P,R]}),e[74]=P,e[75]=R,e[76]=I):I=e[76];let q;e[77]!==T||e[78]!==I?(q=i.jsxs(Fe,{children:[T,I]}),e[77]=T,e[78]=I,e[79]=q):q=e[79];let B;e[80]!==g||e[81]!==q?(B=i.jsx(we,{open:g,onOpenChange:$,children:q}),e[80]=g,e[81]=q,e[82]=B):B=e[82];let V;return e[83]!==b||e[84]!==B?(V=i.jsxs(i.Fragment,{children:[b,B]}),e[83]=b,e[84]=B,e[85]=V):V=e[85],V}function ke(){const e=Y.c(10),t=U();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let g;e[2]!==n?(g=i.jsx(M.Title,{children:n}),e[2]=n,e[3]=g):g=e[3];let r,l,d,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Pe,{}),l=i.jsx(ve,{}),d=i.jsx(Oe,{}),m=i.jsx(Le,{}),e[4]=r,e[5]=l,e[6]=d,e[7]=m):(r=e[4],l=e[5],d=e[6],m=e[7]);let a;return e[8]!==g?(a=i.jsx(M,{children:i.jsx(M.Content,{children:i.jsx(M.Body,{children:i.jsxs(xe,{children:[g,r,l,d,m]})})})}),e[8]=g,e[9]=a):a=e[9],a}function ct(){const e=Y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(Ne,{capability:"org:manage",area:"general settings",children:i.jsx(ke,{})}),e[0]=t):t=e[0],t}export{ct as default};
@@ -1 +1 @@
1
- import{c as n,j as o}from"./index-DZsx-GLV.js";function a(r){const e=n.c(4),{size:t,className:c}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=s):s=e[0];let i;return e[1]!==c||e[2]!==t?(i=o.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:c,children:s}),e[1]=c,e[2]=t,e[3]=i):i=e[3],i}export{a as G};
1
+ import{c as n,j as o}from"./index-DJQUO_5F.js";function a(r){const e=n.c(4),{size:t,className:c}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=s):s=e[0];let i;return e[1]!==c||e[2]!==t?(i=o.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:c,children:s}),e[1]=c,e[2]=t,e[3]=i):i=e[3],i}export{a as G};
@@ -1,4 +1,4 @@
1
- import{eH as It,eI as Et,ce as R,ag as c,eJ as de,cj as Je,eK as Tt,cd as wt,am as Mt,ah as O,ak as W,af as oe,ae as S,aj as m,ao as U,an as At,eL as I,ai as Ot,t as ge,r as J,c as Ee,G as Ct,j as Rt}from"./index-DZsx-GLV.js";import{S as Nt,u as xt}from"./use-mcp-client-CT68MaZf.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-AajGLnoQ.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));class L{constructor(e){this.value=e}value;subs=new Set;get=()=>this.value;set=e=>{Object.is(e,this.value)||(this.value=e,this.subs.forEach(a=>a()))};update=e=>{this.set(e(this.value))};subscribe=e=>(this.subs.add(e),()=>{this.subs.delete(e)})}var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
1
+ import{eI as It,eJ as Et,cj as R,ag as c,eK as de,co as Je,eL as Tt,ci as wt,am as Mt,ah as O,ak as W,af as oe,ae as S,aj as m,ao as U,an as At,eM as I,ai as Ot,t as ge,r as J,c as Ee,G as Ct,j as Rt}from"./index-DJQUO_5F.js";import{S as Nt,u as xt}from"./use-mcp-client-DOjgXsoM.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-CC8xuhpc.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));class L{constructor(e){this.value=e}value;subs=new Set;get=()=>this.value;set=e=>{Object.is(e,this.value)||(this.value=e,this.subs.forEach(a=>a()))};update=e=>{this.set(e(this.value))};subscribe=e=>(this.subs.add(e),()=>{this.subs.delete(e)})}var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${Ye(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Qe)}},Ke="AI_TypeValidationError",et=`vercel.ai.error.${Ke}`,Ft=Symbol.for(et),ke,je,q=class ve extends(je=Z,ke=Ft,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:Ke,message:`${s}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${Ye(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,et)}static wrap({value:e,cause:a,context:r}){var s,n,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new $t({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Bt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Vt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Bt.test(t)===!1&&Vt.test(t)===!1?e:zt(e)}function zt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&e.push(n)}}}return t}function Jt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=V(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(V):V(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(V)),t.allOf!=null&&(t.allOf=t.allOf.map(V)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(V));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=V(e[a]);return t}function V(t){return typeof t=="boolean"?t:Te(t)}var Wt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Gt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Yt(t,e){var a,r,s;const n={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(n.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function Ht(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function tt(t,e){return b(t.type._def,e)}var Xt=(t,e)=>b(t.innerType._def,e);function at(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>at(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Qt(t)}}var Qt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Kt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function ea(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ta(t){return{type:"string",enum:Array.from(t.values)}}var aa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ra(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(aa(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function sa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?oa(t):t}var na=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function oa(t){let e="";for(let a=0;a<t.length;a++)na.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,p=!1;for(let u=0;u<s.length;u++){if(i){n+=s[u],i=!1;continue}if(r.i){if(o){if(s[u].match(/[a-z]/)){p?(n+=s[u],n+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(n+=s[u],p=!0):n+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){n+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){n+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(s[u]==="$"){n+=`($|(?=[\r
@@ -0,0 +1 @@
1
+ import{c as Ee,b as cs,G as at,m as ms,K as Ue,j as s,n as Ss,r as ne,e as as,B as ce,b8 as Rs,t as de}from"./index-DJQUO_5F.js";import{i as ot}from"./AlertCircle-BMk6q2FA.js";import{t as rt}from"./ChevronUp-DRrtPFPU.js";import{i as ct}from"./ChevronRight-CL-1AW54.js";import{be as dt,bf as Us,aD as it,av as mt,aF as ft,aY as ht,bg as ut,k as As}from"./agent-icon-CaI0ggpq.js";import{a as gt}from"./Copy01-Cz84dNWo.js";import{i as Ns}from"./Globe01-DhXQEmKy.js";import{n as et}from"./LinkExternal01-CbmJH8Oa.js";import{s as qs}from"./Plus-CHPz10Kd.js";import{d as Bs}from"./UserSquare-B8muuAeC.js";import{s as Os}from"./Trash01-BV_RW_ot.js";import{i as xt}from"./Zap-u6tF2K1C.js";import{B as me}from"./badge-Dc8kcV5t.js";import{I as ls}from"./input-DAq8Cogd.js";import{L as hs}from"./label-C5IuR8oP.js";import{c as Cs,d as Ds,b as ws,f as $s,g as zs,e as Ls,a as _s,A as ks}from"./alert-dialog-BJoAnvTa.js";import{c as Hs,d as Ms,e as Ws,b as Ks,D as Qs}from"./dialog-Cz0TyjbB.js";import{S as Ys,b as Gs,a as Xs,d as Zs,c as js}from"./select-zsrd2RiW.js";import{c as ss,e as os,a as ye,d as I,b as ts,T as q}from"./table-DMgVyVQS.js";import{E as Ps}from"./empty-state-BcShOK8y.js";import{u as bt}from"./use-virtual-mcp-9JWM1UZv.js";import{r as Tt}from"./site-slug-uya6Wp4-.js";import"./Tool01-BEvJ_YW1.js";import"./ArrowUp-BrUqWSUA.js";import"./ArrowLeft-CBdaifdY.js";import"./Tool02-BJ6DrdG_.js";import"./ArrowRight-k7OlY3ZV.js";import"./TrendUp01-BQU61XVU.js";import"./ZoomOut-GAT73I28.js";import"./Users03-B3GcmkAW.js";import"./CheckCircle-ByifJ5DN.js";import"./Check-BRo4TcYL.js";import"./ChevronSelectorVertical-D89G1wQX.js";import"./DotsVertical-CUeujFxe.js";import"./CreditCard01-16ccuHl7.js";import"./Download01-BY5nFlV8.js";import"./Settings02-5Mu_nYD8.js";import"./Eye-DSfFTZ0l.js";import"./Share07-B8Aw6CDi.js";import"./GitBranch01-CzoRmimO.js";import"./XClose-BSY1lYTG.js";import"./HardDrive-Dz1jdiPQ.js";import"./Image01-ChEQz8oh.js";import"./Key01-BOmG8BKE.js";import"./Link01-DkfXBBhQ.js";import"./Monitor01-D0BOdaeR.js";import"./Sun-BzWxkbN5.js";import"./Package-BtdRPN0k.js";import"./Palette-D3howidE.js";import"./Play-BRZZbBP9.js";import"./SearchLg-B8u5Z_-p.js";import"./SearchMd-BfOW0ihr.js";import"./Shield01-BCG_3DYj.js";import"./Stars01-foIfuOVN.js";import"./Upload01-CzJgAWQf.js";import"./User01-BYo154It.js";import"./Users01-CCJxFqcF.js";import"./XCircle-B00jwioD.js";import"./use-mcp-client-DOjgXsoM.js";import"./auth-DrTXT3NH.js";function Is(r,e){return r.name===e.name&&(r.scope??"runtime")===e.scope}function ps(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 Js(r){return r==="deco-deno"?"Deco Deno":r==="deco-tanstack"?"Deco TanStack":r??null}function pt(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 st(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"}),i=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[a,c]of i)if(Math.abs(o)>=c)return l.format(-Math.round(o/c),a);return l.format(-o,"second")}function jt(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.floor(e/60),l=Math.round(e%60);return`${o}m ${l}s`}function Vs(r){const e=r instanceof Error?r.message.toLowerCase():"";return e.includes("unauthorized")||e.includes("401")}function ds(r){return r instanceof Error?r.message:String(r)}async function fs(r){const e=await fetch(r),o=await e.json().catch(()=>({}));if(!e.ok){const l=o&&typeof o=="object"&&"error"in o?String(o.error):`request failed (${e.status})`;throw new Error(l)}return o}async function rs(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}),i=await l.json().catch(()=>({}));if(!l.ok){const a=i&&typeof i=="object"&&"error"in i?String(i.error):`request failed (${l.status})`;throw new Error(a)}return i}function ys(r){const e=Ee.c(15),{title:o,count:l,action:i,children:a}=r;let c;e[0]!==o?(c=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:o}),e[0]=o,e[1]=c):c=e[1];let d;e[2]!==l?(d=typeof l=="number"&&l>0&&s.jsx(me,{variant:"secondary",className:"tabular-nums",children:l}),e[2]=l,e[3]=d):d=e[3];let t;e[4]!==i?(t=i&&s.jsx("div",{className:"ml-auto",children:i}),e[4]=i,e[5]=t):t=e[5];let n;e[6]!==c||e[7]!==d||e[8]!==t?(n=s.jsxs("header",{className:"flex items-center gap-2 px-4 py-3 border-b border-border",children:[c,d,t]}),e[6]=c,e[7]=d,e[8]=t,e[9]=n):n=e[9];let u;e[10]!==a?(u=s.jsx("div",{className:"p-2",children:a}),e[10]=a,e[11]=u):u=e[11];let v;return e[12]!==n||e[13]!==u?(v=s.jsxs("section",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[n,u]}),e[12]=n,e[13]=u,e[14]=v):v=e[14],v}function vs(r){const e=Ee.c(3),{cols:o}=r;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[0,1,2],e[0]=l):l=e[0];let i;return e[1]!==o?(i=s.jsx("div",{className:"flex flex-col gap-2 p-2",children:l.map(a=>s.jsx("div",{className:"flex gap-3",children:Array.from({length:o}).map(Pt)},a))}),e[1]=o,e[2]=i):i=e[2],i}function Pt(r,e){return s.jsx(Rs,{className:"h-4 flex-1"},e)}function Ye(r){const e=Ee.c(2),{children:o}=r;let l;return e[0]!==o?(l=s.jsx("div",{className:"px-3 py-6 text-sm text-muted-foreground",children:o}),e[0]=o,e[1]=l):l=e[1],l}function yt(r){const e=Ee.c(54),{base:o,orgSlug:l,site:i}=r,a=cs(),c=Ss(),[d,t]=ne.useState(!1);let n;e[0]!==o?(n=()=>rs(`${o}/deploy`,"POST",{mode:"current"}),e[0]=o,e[1]=n):n=e[1];let u;e[2]!==l||e[3]!==c||e[4]!==i||e[5]!==a?(u=()=>{c.invalidateQueries({queryKey:Ue.hostingDeployments(l,i)}),c.invalidateQueries({queryKey:Ue.hostingDeploymentHistory(l,i)}),de.success(a("mainPanelTabs.hostingTab.toastDeployQueued")),t(!1)},e[2]=l,e[3]=c,e[4]=i,e[5]=a,e[6]=u):u=e[6];let v;e[7]!==n||e[8]!==u?(v={mutationFn:n,onSuccess:u,onError:vt},e[7]=n,e[8]=u,e[9]=v):v=e[9];const m=as(v);let N;e[10]===Symbol.for("react.memo_cache_sentinel")?(N=()=>t(!0),e[10]=N):N=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Bs,{className:"size-4"}),e[11]=g):g=e[11];let p;e[12]!==m.isPending||e[13]!==a?(p=m.isPending?a("mainPanelTabs.hostingTab.deploying"):a("mainPanelTabs.hostingTab.deploy"),e[12]=m.isPending,e[13]=a,e[14]=p):p=e[14];let h;e[15]!==m.isPending||e[16]!==p?(h=s.jsxs(ce,{size:"sm",onClick:N,disabled:m.isPending,children:[g,p]}),e[15]=m.isPending,e[16]=p,e[17]=h):h=e[17];let y;e[18]!==a?(y=a("mainPanelTabs.hostingTab.deployConfirmTitle"),e[18]=a,e[19]=y):y=e[19];let j;e[20]!==y?(j=s.jsx(Cs,{children:y}),e[20]=y,e[21]=j):j=e[21];let w;e[22]!==a?(w=a("mainPanelTabs.hostingTab.deployConfirmDescription"),e[22]=a,e[23]=w):w=e[23];let T;e[24]!==w?(T=s.jsx(Ds,{children:w}),e[24]=w,e[25]=T):T=e[25];let S;e[26]!==T||e[27]!==j?(S=s.jsxs(ws,{children:[j,T]}),e[26]=T,e[27]=j,e[28]=S):S=e[28];const $=m.isPending;let z;e[29]!==a?(z=a("mainPanelTabs.hostingTab.cancel"),e[29]=a,e[30]=z):z=e[30];let C;e[31]!==m.isPending||e[32]!==z?(C=s.jsx($s,{disabled:$,children:z}),e[31]=m.isPending,e[32]=z,e[33]=C):C=e[33];let x;e[34]!==m?(x=f=>{f.preventDefault(),m.mutate()},e[34]=m,e[35]=x):x=e[35];const P=m.isPending;let L;e[36]!==a?(L=a("mainPanelTabs.hostingTab.deploy"),e[36]=a,e[37]=L):L=e[37];let _;e[38]!==m.isPending||e[39]!==x||e[40]!==L?(_=s.jsx(zs,{onClick:x,disabled:P,children:L}),e[38]=m.isPending,e[39]=x,e[40]=L,e[41]=_):_=e[41];let b;e[42]!==C||e[43]!==_?(b=s.jsxs(Ls,{children:[C,_]}),e[42]=C,e[43]=_,e[44]=b):b=e[44];let B;e[45]!==S||e[46]!==b?(B=s.jsxs(_s,{children:[S,b]}),e[45]=S,e[46]=b,e[47]=B):B=e[47];let A;e[48]!==d||e[49]!==B?(A=s.jsx(ks,{open:d,onOpenChange:t,children:B}),e[48]=d,e[49]=B,e[50]=A):A=e[50];let V;return e[51]!==A||e[52]!==h?(V=s.jsxs(s.Fragment,{children:[h,A]}),e[51]=A,e[52]=h,e[53]=V):V=e[53],V}function vt(r){return de.error(ds(r))}function Nt(r,e){const o=(r??"").toLowerCase();return o.includes("rollback")?s.jsxs(me,{variant:"warning",children:[s.jsx(ht,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionRollback")]}):o.includes("redeploy")?s.jsxs(me,{variant:"secondary",children:[s.jsx(ut,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionRedeploy")]}):s.jsxs(me,{variant:"secondary",children:[s.jsx(Bs,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionDeploy")]})}function St(r,e,o){const l=(r??"").toLowerCase();return l==="build"?s.jsxs(me,{variant:"secondary",children:[s.jsx(Us,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeBuild")]}):l==="fast-deploy"?s.jsxs(me,{variant:"secondary",children:[s.jsx(xt,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeFastDeploy")]}):l==="deploy"?s.jsxs(me,{variant:"secondary",children:[s.jsx(Bs,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeDeploy")]}):Nt(e,o)}function Ct(r,e){const o=(r??"").toLowerCase();return o==="success"?s.jsx(me,{variant:"success",children:e("mainPanelTabs.hostingTab.outcomeSuccess")}):o==="failure"?s.jsx(me,{variant:"destructive",children:e("mainPanelTabs.hostingTab.outcomeFailure")}):o==="pending"?s.jsxs(me,{variant:"secondary",children:[s.jsx(it,{className:"size-3"}),e("mainPanelTabs.hostingTab.outcomePending")]}):null}function Dt(r){const e=Ee.c(35),{base:o,orgSlug:l,site:i,target:a,onOpenChange:c}=r,d=cs(),t=a!=null,n=a?.commit??"",u=a?.env??"";let v;e[0]!==n||e[1]!==u||e[2]!==l||e[3]!==i?(v=Ue.hostingBuildLogs(l,i,n,u),e[0]=n,e[1]=u,e[2]=l,e[3]=i,e[4]=v):v=e[4];let m;e[5]!==o||e[6]!==n||e[7]!==u?(m=()=>fs(`${o}/deployments/logs?commit=${encodeURIComponent(n)}&env=${encodeURIComponent(u)}`),e[5]=o,e[6]=n,e[7]=u,e[8]=m):m=e[8];const N=t&&!!n;let g;e[9]!==v||e[10]!==m||e[11]!==N?(g={queryKey:v,queryFn:m,enabled:N,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[9]=v,e[10]=m,e[11]=N,e[12]=g):g=e[12];const p=ms(g),h=p.data;let y;e[13]!==d?(y=d("mainPanelTabs.hostingTab.buildLogsTitle"),e[13]=d,e[14]=y):y=e[14];let j;e[15]!==y?(j=s.jsx(Hs,{children:s.jsx(Ms,{children:y})}),e[15]=y,e[16]=j):j=e[16];let w;e[17]!==n||e[18]!==d?(w=d("mainPanelTabs.hostingTab.buildLogsCommit",{commit:n.slice(0,7)}),e[17]=n,e[18]=d,e[19]=w):w=e[19];let T;e[20]!==w?(T=s.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:w}),e[20]=w,e[21]=T):T=e[21];let S;e[22]!==h||e[23]!==p.error||e[24]!==p.isLoading||e[25]!==d?(S=Vs(p.error)?s.jsx(Ps,{icon:s.jsx(As,{className:"size-5"}),title:d("mainPanelTabs.hostingTab.notConnectedTitle"),description:d("mainPanelTabs.hostingTab.notConnectedDescription")}):p.isLoading?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx(Rs,{className:"h-4 w-full"}),s.jsx(Rs,{className:"h-4 w-full"}),s.jsx(Rs,{className:"h-4 w-2/3"})]}):p.error?s.jsx(Ye,{children:d("mainPanelTabs.hostingTab.buildLogsError")}):h&&h.configured===!1?s.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:[s.jsx(ot,{className:"size-5 text-muted-foreground"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:d("mainPanelTabs.hostingTab.buildLogsNotWiredTitle")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:h.reason??d("mainPanelTabs.hostingTab.buildLogsNotWiredDescription")})]}):h?.text?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("pre",{className:"max-h-[52vh] overflow-auto rounded-lg border border-border bg-muted/40 p-3 font-mono text-[11px] leading-relaxed text-foreground/80 whitespace-pre-wrap break-words",children:h.text}),h.truncated&&s.jsx("p",{className:"text-xs text-warning",children:d("mainPanelTabs.hostingTab.buildLogsTruncated")}),h.url&&s.jsxs("a",{href:h.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-xs text-primary hover:underline",children:[s.jsx(et,{className:"size-3.5"}),d("mainPanelTabs.hostingTab.buildLogsOpenFull")]})]}):h?.url?s.jsxs("a",{href:h.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-sm text-primary hover:underline",children:[s.jsx(et,{className:"size-4"}),d("mainPanelTabs.hostingTab.buildLogsOpenFull")]}):s.jsx(Ye,{children:d("mainPanelTabs.hostingTab.buildLogsEmpty")}),e[22]=h,e[23]=p.error,e[24]=p.isLoading,e[25]=d,e[26]=S):S=e[26];let $;e[27]!==j||e[28]!==T||e[29]!==S?($=s.jsxs(Ks,{className:"sm:max-w-2xl",children:[j,T,S]}),e[27]=j,e[28]=T,e[29]=S,e[30]=$):$=e[30];let z;return e[31]!==c||e[32]!==t||e[33]!==$?(z=s.jsx(Qs,{open:t,onOpenChange:c,children:$}),e[31]=c,e[32]=t,e[33]=$,e[34]=z):z=e[34],z}function wt(r){const e=Ee.c(52),{base:o,orgSlug:l,site:i,enabled:a,deployments:c,isLoading:d,error:t}=r,n=cs(),[u,v]=ne.useState(null),[m,N]=ne.useState(null);let g;e[0]!==l||e[1]!==i?(g=Ue.hostingDeploymentHistory(l,i),e[0]=l,e[1]=i,e[2]=g):g=e[2];let p;e[3]!==o?(p=()=>fs(`${o}/deployments/history?limit=50`),e[3]=o,e[4]=p):p=e[4];let h;e[5]!==a||e[6]!==g||e[7]!==p?(h={queryKey:g,queryFn:p,enabled:a,retry:!1,staleTime:3e4},e[5]=a,e[6]=g,e[7]=p,e[8]=h):h=e[8];const y=ms(h);let j,w,T,S,$;if(e[9]!==c||e[10]!==t||e[11]!==u||e[12]!==y.data||e[13]!==y.error||e[14]!==y.isLoading||e[15]!==d||e[16]!==n){const L=ps(y.data,"items"),_=c.find(zt)?.commitSha??c.find($t)?.commitSha??null;let b;e[22]===Symbol.for("react.memo_cache_sentinel")?(b=(f,G)=>{f&&N({commit:f,env:G??"production"})},e[22]=b):b=e[22];const B=b;let A;e[23]!==n?(A=n("mainPanelTabs.hostingTab.deployments"),e[23]=n,e[24]=A):A=e[24];let V;e[25]!==c||e[26]!==t||e[27]!==u||e[28]!==d||e[29]!==n?(V=d?s.jsx(vs,{cols:5}):t?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.deploymentsError")}):c.length===0?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.noDeployments")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colCommit")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colStatus")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colFramework")}),s.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDuration")}),s.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colUpdated")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:c.map(f=>{const G=!!f.buildMessage,Z=u===f.id;return s.jsxs(ne.Fragment,{children:[s.jsxs(ye,{children:[s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[G?s.jsx("button",{type:"button",onClick:()=>v(Z?null:f.id),"aria-label":n("mainPanelTabs.hostingTab.showBuildMessage"),className:"text-muted-foreground hover:text-foreground",children:Z?s.jsx(rt,{className:"size-4"}):s.jsx(ct,{className:"size-4"})}):s.jsx(dt,{className:"size-4 text-muted-foreground/60"}),s.jsx("span",{className:"font-mono text-xs",children:f.shortCommit??f.commitSha?.slice(0,7)??"—"}),f.production===!0&&s.jsx(me,{variant:"outline",children:n("mainPanelTabs.hostingTab.production")})]})}),s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(me,{variant:pt(f.phase),children:f.phase??"—"}),f.up===!0&&s.jsx(me,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),s.jsx(q,{className:"align-middle text-xs text-muted-foreground",children:Js(f.framework)??"—"}),s.jsx(q,{className:"text-right align-middle font-mono text-xs text-muted-foreground tabular-nums",children:jt(f.durationMs)}),s.jsx(q,{className:"text-right align-middle text-xs text-muted-foreground whitespace-nowrap",children:st(f.finishedAt??f.startedAt??f.createdAt)}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.buildLogs"),onClick:()=>B(f.commitSha,f.env),disabled:!f.commitSha,children:s.jsx(Us,{className:"size-4"})})})]}),G&&Z&&s.jsx(ye,{children:s.jsx(q,{colSpan:6,className:"bg-muted/10",children:s.jsx("p",{className:"whitespace-pre-wrap break-words px-2 py-1 font-mono text-xs text-muted-foreground",children:f.buildMessage})})})]},f.id)})})]}),e[25]=c,e[26]=t,e[27]=u,e[28]=d,e[29]=n,e[30]=V):V=e[30],e[31]!==c.length||e[32]!==V||e[33]!==A?($=s.jsx(ys,{title:A,count:c.length,children:V}),e[31]=c.length,e[32]=V,e[33]=A,e[34]=$):$=e[34],j=ys,e[35]!==n?(w=n("mainPanelTabs.hostingTab.deployHistory"),e[35]=n,e[36]=w):w=e[36],T=L.length,S=y.isLoading?s.jsx(vs,{cols:4}):y.error?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.deployHistoryError")}):L.length===0?s.jsx(Ps,{icon:s.jsx(Bs,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployHistory")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colAction")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colCommit")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colFramework")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colActor")}),s.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDate")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:L.map(f=>{const G=!!_&&f.commitSha===_;return s.jsxs(ye,{children:[s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[St(f.type,f.action,n),Ct(f.outcome,n)]})}),s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"font-mono text-xs",children:f.commitSha?.slice(0,7)??"—"}),G&&s.jsx(me,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),s.jsx(q,{className:"align-middle text-xs text-muted-foreground",children:Js(f.framework)??"—"}),s.jsx(q,{className:"align-middle text-xs text-muted-foreground",children:f.actor??"—"}),s.jsx(q,{className:"text-right align-middle text-xs text-muted-foreground whitespace-nowrap",children:s.jsxs("span",{className:"inline-flex items-center gap-1",children:[s.jsx(it,{className:"size-3"}),st(f.createdAt)]})}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.buildLogs"),onClick:()=>B(f.commitSha,f.env),disabled:!f.commitSha,children:s.jsx(Us,{className:"size-4"})})})]},f.id)})})]}),e[9]=c,e[10]=t,e[11]=u,e[12]=y.data,e[13]=y.error,e[14]=y.isLoading,e[15]=d,e[16]=n,e[17]=j,e[18]=w,e[19]=T,e[20]=S,e[21]=$}else j=e[17],w=e[18],T=e[19],S=e[20],$=e[21];let z;e[37]!==j||e[38]!==w||e[39]!==T||e[40]!==S?(z=s.jsx(j,{title:w,count:T,children:S}),e[37]=j,e[38]=w,e[39]=T,e[40]=S,e[41]=z):z=e[41];let C;e[42]===Symbol.for("react.memo_cache_sentinel")?(C=L=>{L||N(null)},e[42]=C):C=e[42];let x;e[43]!==o||e[44]!==m||e[45]!==l||e[46]!==i?(x=s.jsx(Dt,{base:o,orgSlug:l,site:i,target:m,onOpenChange:C}),e[43]=o,e[44]=m,e[45]=l,e[46]=i,e[47]=x):x=e[47];let P;return e[48]!==x||e[49]!==$||e[50]!==z?(P=s.jsxs(s.Fragment,{children:[$,z,x]}),e[48]=x,e[49]=$,e[50]=z,e[51]=P):P=e[51],P}function $t(r){return r.production===!0&&r.up}function zt(r){return r.up===!0}function Lt(r){const e=Ee.c(82),{base:o,orgSlug:l,site:i,envVars:a,codeVars:c,isLoading:d,error:t}=r,n=cs(),u=Ss(),[v,m]=ne.useState(""),[N,g]=ne.useState(""),[p,h]=ne.useState("runtime"),[y,j]=ne.useState(null),[w,T]=ne.useState(""),[S,$]=ne.useState(null);let z;e[0]!==o?(z=D=>rs(`${o}/env`,"PUT",{vars:D}),e[0]=o,e[1]=z):z=e[1];let C;e[2]!==l||e[3]!==u||e[4]!==i||e[5]!==n?(C=()=>{u.invalidateQueries({queryKey:Ue.hostingEnv(l,i)}),de.success(n("mainPanelTabs.hostingTab.toastEnvSaved"))},e[2]=l,e[3]=u,e[4]=i,e[5]=n,e[6]=C):C=e[6];let x;e[7]!==z||e[8]!==C?(x={mutationFn:z,onSuccess:C,onError:kt},e[7]=z,e[8]=C,e[9]=x):x=e[9];const P=as(x);let L;e[10]!==v||e[11]!==p||e[12]!==N||e[13]!==P||e[14]!==a||e[15]!==n?(L=()=>{const D=v.trim();if(!D){de.error(n("mainPanelTabs.hostingTab.errorEnvNameRequired"));return}if(a.some(O=>Is(O,{name:D,scope:p}))){de.error(n("mainPanelTabs.hostingTab.errorEnvNameDuplicate"));return}P.mutate([...a,{name:D,value:N,scope:p}],{onSuccess:()=>{m(""),g(""),h("runtime")}})},e[10]=v,e[11]=p,e[12]=N,e[13]=P,e[14]=a,e[15]=n,e[16]=L):L=e[16];const _=L;let b;e[17]!==w||e[18]!==P||e[19]!==a?(b=D=>{P.mutate(a.map(O=>Is(O,D)?{name:D.name,value:w,scope:D.scope}:O),{onSuccess:()=>j(null)})},e[17]=w,e[18]=P,e[19]=a,e[20]=b):b=e[20];const B=b;let A;e[21]!==S||e[22]!==P||e[23]!==a?(A=()=>{S&&P.mutate(a.filter(D=>!Is(D,S)),{onSuccess:()=>$(null)})},e[21]=S,e[22]=P,e[23]=a,e[24]=A):A=e[24];const V=A;let f;e[25]!==n?(f=n("mainPanelTabs.hostingTab.env"),e[25]=n,e[26]=f):f=e[26];const G=a.length;let Z;e[27]!==v||e[28]!==p||e[29]!==N||e[30]!==c||e[31]!==w||e[32]!==y?.name||e[33]!==y?.scope||e[34]!==P.isPending||e[35]!==a||e[36]!==t||e[37]!==_||e[38]!==B||e[39]!==d||e[40]!==n?(Z=d?s.jsx(vs,{cols:2}):t?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.envError")}):s.jsxs("div",{className:"flex flex-col gap-2",children:[a.length===0?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.noEnv")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colName")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colValue")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map(D=>{const O=D.scope==="build"?"build":"runtime",ze=y?.name===D.name&&y?.scope===O;return s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:s.jsxs("span",{className:"inline-flex items-center gap-2",children:[D.name,s.jsx(me,{variant:O==="build"?"outline":"secondary",className:"font-sans text-[10px] capitalize",children:n(O==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime")})]})}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground max-w-[360px] align-middle",children:ze?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ls,{value:w,onChange:fe=>T(fe.target.value),className:"h-7 font-mono text-xs"}),s.jsx(ce,{size:"xs",onClick:()=>B({name:D.name,scope:O}),disabled:P.isPending,children:n("mainPanelTabs.hostingTab.save")}),s.jsx(ce,{size:"xs",variant:"ghost",onClick:()=>j(null),disabled:P.isPending,children:n("mainPanelTabs.hostingTab.cancel")})]}):s.jsx("button",{type:"button",onClick:()=>{j({name:D.name,scope:O}),T(D.value)},className:"block w-full truncate text-left hover:underline","aria-label":n("mainPanelTabs.hostingTab.editValue"),children:D.value})}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.deleteVariable"),onClick:()=>$({name:D.name,scope:O}),disabled:P.isPending,children:s.jsx(Os,{className:"size-4"})})})]},`${D.name}:${O}`)})})]}),s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[s.jsx(ls,{placeholder:n("mainPanelTabs.hostingTab.envNamePlaceholder"),value:v,onChange:D=>m(D.target.value),className:"h-8 flex-1 font-mono text-xs"}),s.jsx(ls,{placeholder:n("mainPanelTabs.hostingTab.envValuePlaceholder"),value:N,onChange:D=>g(D.target.value),className:"h-8 flex-1 font-mono text-xs"}),s.jsxs(Ys,{value:p,onValueChange:D=>h(D==="build"?"build":"runtime"),disabled:P.isPending,children:[s.jsx(Gs,{className:"h-8 w-[110px]",children:s.jsx(Xs,{})}),s.jsxs(Zs,{children:[s.jsx(js,{value:"runtime",children:n("mainPanelTabs.hostingTab.secretScopeRuntime")}),s.jsx(js,{value:"build",children:n("mainPanelTabs.hostingTab.secretScopeBuild")})]})]}),s.jsxs(ce,{size:"sm","aria-label":n("mainPanelTabs.hostingTab.addVariable"),onClick:_,disabled:P.isPending||!v.trim(),children:[s.jsx(qs,{className:"size-4"}),n("mainPanelTabs.hostingTab.add")]})]}),c.length>0&&s.jsxs("div",{className:"mt-3 flex flex-col gap-1.5 border-t border-border pt-3",children:[s.jsx("p",{className:"px-2 text-xs text-muted-foreground",children:n("mainPanelTabs.hostingTab.codeVarsHint")}),s.jsx(ss,{children:s.jsx(ts,{children:c.map(_t)})})]})]}),e[27]=v,e[28]=p,e[29]=N,e[30]=c,e[31]=w,e[32]=y?.name,e[33]=y?.scope,e[34]=P.isPending,e[35]=a,e[36]=t,e[37]=_,e[38]=B,e[39]=d,e[40]=n,e[41]=Z):Z=e[41];const le=S!=null;let ae;e[42]===Symbol.for("react.memo_cache_sentinel")?(ae=D=>{D||$(null)},e[42]=ae):ae=e[42];let ve;e[43]!==n?(ve=n("mainPanelTabs.hostingTab.confirmDeleteVariableTitle"),e[43]=n,e[44]=ve):ve=e[44];let te;e[45]!==ve?(te=s.jsx(Cs,{children:ve}),e[45]=ve,e[46]=te):te=e[46];const re=S?.name??"";let M;e[47]!==n||e[48]!==re?(M=n("mainPanelTabs.hostingTab.confirmDeleteVariableDescription",{name:re}),e[47]=n,e[48]=re,e[49]=M):M=e[49];let U;e[50]!==M?(U=s.jsx(Ds,{children:M}),e[50]=M,e[51]=U):U=e[51];let X;e[52]!==te||e[53]!==U?(X=s.jsxs(ws,{children:[te,U]}),e[52]=te,e[53]=U,e[54]=X):X=e[54];const ee=P.isPending;let ie;e[55]!==n?(ie=n("mainPanelTabs.hostingTab.cancel"),e[55]=n,e[56]=ie):ie=e[56];let K;e[57]!==P.isPending||e[58]!==ie?(K=s.jsx($s,{disabled:ee,children:ie}),e[57]=P.isPending,e[58]=ie,e[59]=K):K=e[59];let J;e[60]!==V?(J=D=>{D.preventDefault(),V()},e[60]=V,e[61]=J):J=e[61];const se=P.isPending;let W;e[62]!==n?(W=n("mainPanelTabs.hostingTab.deleteVariable"),e[62]=n,e[63]=W):W=e[63];let E;e[64]!==P.isPending||e[65]!==J||e[66]!==W?(E=s.jsx(zs,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:J,disabled:se,children:W}),e[64]=P.isPending,e[65]=J,e[66]=W,e[67]=E):E=e[67];let k;e[68]!==K||e[69]!==E?(k=s.jsxs(Ls,{children:[K,E]}),e[68]=K,e[69]=E,e[70]=k):k=e[70];let F;e[71]!==X||e[72]!==k?(F=s.jsxs(_s,{children:[X,k]}),e[71]=X,e[72]=k,e[73]=F):F=e[73];let Q;e[74]!==le||e[75]!==F?(Q=s.jsx(ks,{open:le,onOpenChange:ae,children:F}),e[74]=le,e[75]=F,e[76]=Q):Q=e[76];let Y;return e[77]!==a.length||e[78]!==Q||e[79]!==f||e[80]!==Z?(Y=s.jsxs(ys,{title:f,count:G,children:[Z,Q]}),e[77]=a.length,e[78]=Q,e[79]=f,e[80]=Z,e[81]=Y):Y=e[81],Y}function _t(r){return s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:r.name}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground max-w-[360px] truncate align-middle",children:r.value})]},r.name)}function kt(r){return de.error(ds(r))}function Et(r){const e=Ee.c(176),{base:o,orgSlug:l,site:i,secrets:a,isLoading:c,error:d}=r,t=cs(),n=Ss(),[u,v]=ne.useState(!1),[m,N]=ne.useState(""),[g,p]=ne.useState(""),[h,y]=ne.useState("runtime"),[j,w]=ne.useState(null);let T;e[0]!==l||e[1]!==n||e[2]!==i?(T=()=>n.invalidateQueries({queryKey:Ue.hostingSecrets(l,i)}),e[0]=l,e[1]=n,e[2]=i,e[3]=T):T=e[3];const S=T;let $;e[4]!==o?($=oe=>rs(`${o}/secrets`,"PUT",oe),e[4]=o,e[5]=$):$=e[5];let z;e[6]!==S||e[7]!==t?(z=()=>{S(),de.success(t("mainPanelTabs.hostingTab.toastSecretSaved")),v(!1),N(""),p(""),y("runtime")},e[6]=S,e[7]=t,e[8]=z):z=e[8];let C;e[9]!==$||e[10]!==z?(C={mutationFn:$,onSuccess:z,onError:Rt},e[9]=$,e[10]=z,e[11]=C):C=e[11];const x=as(C);let P;e[12]!==o?(P=oe=>rs(`${o}/secrets/${encodeURIComponent(oe.name)}?scope=${oe.scope}`,"DELETE"),e[12]=o,e[13]=P):P=e[13];let L;e[14]!==S||e[15]!==t?(L=()=>{S(),de.success(t("mainPanelTabs.hostingTab.toastSecretDeleted")),w(null)},e[14]=S,e[15]=t,e[16]=L):L=e[16];let _;e[17]!==P||e[18]!==L?(_={mutationFn:P,onSuccess:L,onError:Ft},e[17]=P,e[18]=L,e[19]=_):_=e[19];const b=as(_);let B;e[20]!==m||e[21]!==h||e[22]!==g||e[23]!==x||e[24]!==t?(B=()=>{const oe=m.trim();if(!oe){de.error(t("mainPanelTabs.hostingTab.errorSecretNameRequired"));return}if(!g){de.error(t("mainPanelTabs.hostingTab.errorSecretValueRequired"));return}x.mutate({name:oe,value:g,scope:h})},e[20]=m,e[21]=h,e[22]=g,e[23]=x,e[24]=t,e[25]=B):B=e[25];const A=B;let V,f;e[26]===Symbol.for("react.memo_cache_sentinel")?(f=()=>v(!0),V=s.jsx(qs,{className:"size-4"}),e[26]=V,e[27]=f):(V=e[26],f=e[27]);let G;e[28]!==t?(G=t("mainPanelTabs.hostingTab.addSecret"),e[28]=t,e[29]=G):G=e[29];let Z;e[30]!==G?(Z=s.jsxs(ce,{size:"sm",variant:"secondary",onClick:f,children:[V,G]}),e[30]=G,e[31]=Z):Z=e[31];const le=Z;let ae;e[32]!==t?(ae=t("mainPanelTabs.hostingTab.secrets"),e[32]=t,e[33]=ae):ae=e[33];const ve=a.length;let te;e[34]!==b.isPending||e[35]!==d||e[36]!==c||e[37]!==a||e[38]!==t?(te=c?s.jsx(vs,{cols:2}):d?s.jsx(Ye,{children:t("mainPanelTabs.hostingTab.secretsError")}):a.length===0?s.jsx(Ye,{children:t("mainPanelTabs.hostingTab.noSecrets")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:t("mainPanelTabs.hostingTab.colName")}),s.jsx(I,{children:t("mainPanelTabs.hostingTab.colValue")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map(oe=>{const We=oe.scope==="build"?"build":"runtime";return s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:s.jsxs("span",{className:"inline-flex items-center gap-2",children:[oe.name,s.jsx(me,{variant:We==="build"?"outline":"secondary",className:"font-sans text-[10px] capitalize",children:t(We==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime")}),oe.origin==="worker"&&s.jsx(me,{variant:"secondary",className:"font-sans text-[10px]",children:t("mainPanelTabs.hostingTab.secretOnWorker")})]})}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground align-middle",children:t("mainPanelTabs.hostingTab.secretValueHidden")}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.deleteSecret"),onClick:()=>w({name:oe.name,scope:We}),disabled:b.isPending,children:s.jsx(Os,{className:"size-4"})})})]},`${oe.name}:${We}`)})})]}),e[34]=b.isPending,e[35]=d,e[36]=c,e[37]=a,e[38]=t,e[39]=te):te=e[39];let re;e[40]!==t?(re=t("mainPanelTabs.hostingTab.addSecretTitle"),e[40]=t,e[41]=re):re=e[41];let M;e[42]!==re?(M=s.jsx(Hs,{children:s.jsx(Ms,{children:re})}),e[42]=re,e[43]=M):M=e[43];let U;e[44]!==t?(U=t("mainPanelTabs.hostingTab.colName"),e[44]=t,e[45]=U):U=e[45];let X;e[46]!==U?(X=s.jsx(hs,{htmlFor:"secret-name",children:U}),e[46]=U,e[47]=X):X=e[47];let ee;e[48]!==t?(ee=t("mainPanelTabs.hostingTab.secretNamePlaceholder"),e[48]=t,e[49]=ee):ee=e[49];let ie;e[50]===Symbol.for("react.memo_cache_sentinel")?(ie=oe=>N(oe.target.value),e[50]=ie):ie=e[50];let K;e[51]!==m||e[52]!==x.isPending||e[53]!==ee?(K=s.jsx(ls,{id:"secret-name",placeholder:ee,value:m,onChange:ie,className:"font-mono text-xs",disabled:x.isPending}),e[51]=m,e[52]=x.isPending,e[53]=ee,e[54]=K):K=e[54];let J;e[55]!==X||e[56]!==K?(J=s.jsxs("div",{className:"flex flex-col gap-2",children:[X,K]}),e[55]=X,e[56]=K,e[57]=J):J=e[57];let se;e[58]!==t?(se=t("mainPanelTabs.hostingTab.colValue"),e[58]=t,e[59]=se):se=e[59];let W;e[60]!==se?(W=s.jsx(hs,{htmlFor:"secret-value",children:se}),e[60]=se,e[61]=W):W=e[61];let E;e[62]!==t?(E=t("mainPanelTabs.hostingTab.secretValuePlaceholder"),e[62]=t,e[63]=E):E=e[63];let k;e[64]===Symbol.for("react.memo_cache_sentinel")?(k=oe=>p(oe.target.value),e[64]=k):k=e[64];let F;e[65]!==g||e[66]!==x.isPending||e[67]!==E?(F=s.jsx(ls,{id:"secret-value",type:"password",placeholder:E,value:g,onChange:k,className:"font-mono text-xs",disabled:x.isPending}),e[65]=g,e[66]=x.isPending,e[67]=E,e[68]=F):F=e[68];let Q;e[69]!==W||e[70]!==F?(Q=s.jsxs("div",{className:"flex flex-col gap-2",children:[W,F]}),e[69]=W,e[70]=F,e[71]=Q):Q=e[71];let Y;e[72]!==t?(Y=t("mainPanelTabs.hostingTab.secretScope"),e[72]=t,e[73]=Y):Y=e[73];let D;e[74]!==Y?(D=s.jsx(hs,{children:Y}),e[74]=Y,e[75]=D):D=e[75];let O;e[76]===Symbol.for("react.memo_cache_sentinel")?(O=oe=>y(oe==="build"?"build":"runtime"),e[76]=O):O=e[76];const ze=x.isPending;let fe;e[77]===Symbol.for("react.memo_cache_sentinel")?(fe=s.jsx(Gs,{className:"w-full",children:s.jsx(Xs,{})}),e[77]=fe):fe=e[77];let Ne;e[78]!==t?(Ne=t("mainPanelTabs.hostingTab.secretScopeRuntime"),e[78]=t,e[79]=Ne):Ne=e[79];let he;e[80]!==Ne?(he=s.jsx(js,{value:"runtime",children:Ne}),e[80]=Ne,e[81]=he):he=e[81];let ue;e[82]!==t?(ue=t("mainPanelTabs.hostingTab.secretScopeBuild"),e[82]=t,e[83]=ue):ue=e[83];let Le;e[84]!==ue?(Le=s.jsx(js,{value:"build",children:ue}),e[84]=ue,e[85]=Le):Le=e[85];let Se;e[86]!==he||e[87]!==Le?(Se=s.jsxs(Zs,{children:[he,Le]}),e[86]=he,e[87]=Le,e[88]=Se):Se=e[88];let Ce;e[89]!==h||e[90]!==x.isPending||e[91]!==Se?(Ce=s.jsxs(Ys,{value:h,onValueChange:O,disabled:ze,children:[fe,Se]}),e[89]=h,e[90]=x.isPending,e[91]=Se,e[92]=Ce):Ce=e[92];let Fe;e[93]!==h||e[94]!==t?(Fe=t(h==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[93]=h,e[94]=t,e[95]=Fe):Fe=e[95];let Re;e[96]!==Fe?(Re=s.jsx("p",{className:"text-xs text-muted-foreground",children:Fe}),e[96]=Fe,e[97]=Re):Re=e[97];let ge;e[98]!==D||e[99]!==Ce||e[100]!==Re?(ge=s.jsxs("div",{className:"flex flex-col gap-2",children:[D,Ce,Re]}),e[98]=D,e[99]=Ce,e[100]=Re,e[101]=ge):ge=e[101];let xe;e[102]!==J||e[103]!==Q||e[104]!==ge?(xe=s.jsxs("div",{className:"flex flex-col gap-4",children:[J,Q,ge]}),e[102]=J,e[103]=Q,e[104]=ge,e[105]=xe):xe=e[105];let De;e[106]===Symbol.for("react.memo_cache_sentinel")?(De=()=>v(!1),e[106]=De):De=e[106];const Ge=x.isPending;let be;e[107]!==t?(be=t("mainPanelTabs.hostingTab.cancel"),e[107]=t,e[108]=be):be=e[108];let Te;e[109]!==x.isPending||e[110]!==be?(Te=s.jsx(ce,{variant:"outline",type:"button",onClick:De,disabled:Ge,children:be}),e[109]=x.isPending,e[110]=be,e[111]=Te):Te=e[111];let pe;e[112]!==m||e[113]!==g||e[114]!==x.isPending?(pe=x.isPending||!m.trim()||!g,e[112]=m,e[113]=g,e[114]=x.isPending,e[115]=pe):pe=e[115];let Ae;e[116]!==x.isPending||e[117]!==t?(Ae=x.isPending?t("mainPanelTabs.hostingTab.saving"):t("mainPanelTabs.hostingTab.add"),e[116]=x.isPending,e[117]=t,e[118]=Ae):Ae=e[118];let je;e[119]!==A||e[120]!==pe||e[121]!==Ae?(je=s.jsx(ce,{type:"button",onClick:A,disabled:pe,children:Ae}),e[119]=A,e[120]=pe,e[121]=Ae,e[122]=je):je=e[122];let we;e[123]!==Te||e[124]!==je?(we=s.jsxs(Ws,{children:[Te,je]}),e[123]=Te,e[124]=je,e[125]=we):we=e[125];let Ve;e[126]!==M||e[127]!==xe||e[128]!==we?(Ve=s.jsxs(Ks,{className:"sm:max-w-md",children:[M,xe,we]}),e[126]=M,e[127]=xe,e[128]=we,e[129]=Ve):Ve=e[129];let Pe;e[130]!==u||e[131]!==Ve?(Pe=s.jsx(Qs,{open:u,onOpenChange:v,children:Ve}),e[130]=u,e[131]=Ve,e[132]=Pe):Pe=e[132];const _e=j!=null;let ke;e[133]===Symbol.for("react.memo_cache_sentinel")?(ke=oe=>{oe||w(null)},e[133]=ke):ke=e[133];let R;e[134]!==t?(R=t("mainPanelTabs.hostingTab.confirmDeleteSecretTitle"),e[134]=t,e[135]=R):R=e[135];let $e;e[136]!==R?($e=s.jsx(Cs,{children:R}),e[136]=R,e[137]=$e):$e=e[137];const Xe=j?.name??"";let qe;e[138]!==t||e[139]!==Xe?(qe=t("mainPanelTabs.hostingTab.confirmDeleteSecretDescription",{name:Xe}),e[138]=t,e[139]=Xe,e[140]=qe):qe=e[140];let Be;e[141]!==qe?(Be=s.jsx(Ds,{children:qe}),e[141]=qe,e[142]=Be):Be=e[142];let Ze;e[143]!==$e||e[144]!==Be?(Ze=s.jsxs(ws,{children:[$e,Be]}),e[143]=$e,e[144]=Be,e[145]=Ze):Ze=e[145];const us=b.isPending;let Oe;e[146]!==t?(Oe=t("mainPanelTabs.hostingTab.cancel"),e[146]=t,e[147]=Oe):Oe=e[147];let He;e[148]!==b.isPending||e[149]!==Oe?(He=s.jsx($s,{disabled:us,children:Oe}),e[148]=b.isPending,e[149]=Oe,e[150]=He):He=e[150];let es;e[151]!==b||e[152]!==j?(es=oe=>{oe.preventDefault(),j&&b.mutate(j)},e[151]=b,e[152]=j,e[153]=es):es=e[153];const ns=b.isPending;let Me;e[154]!==t?(Me=t("mainPanelTabs.hostingTab.deleteSecret"),e[154]=t,e[155]=Me):Me=e[155];let Ke;e[156]!==b.isPending||e[157]!==es||e[158]!==Me?(Ke=s.jsx(zs,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:es,disabled:ns,children:Me}),e[156]=b.isPending,e[157]=es,e[158]=Me,e[159]=Ke):Ke=e[159];let is;e[160]!==He||e[161]!==Ke?(is=s.jsxs(Ls,{children:[He,Ke]}),e[160]=He,e[161]=Ke,e[162]=is):is=e[162];let Qe;e[163]!==Ze||e[164]!==is?(Qe=s.jsxs(_s,{children:[Ze,is]}),e[163]=Ze,e[164]=is,e[165]=Qe):Qe=e[165];let Ie;e[166]!==_e||e[167]!==Qe?(Ie=s.jsx(ks,{open:_e,onOpenChange:ke,children:Qe}),e[166]=_e,e[167]=Qe,e[168]=Ie):Ie=e[168];let Je;return e[169]!==le||e[170]!==a.length||e[171]!==ae||e[172]!==te||e[173]!==Pe||e[174]!==Ie?(Je=s.jsxs(ys,{title:ae,count:ve,action:le,children:[te,Pe,Ie]}),e[169]=le,e[170]=a.length,e[171]=ae,e[172]=te,e[173]=Pe,e[174]=Ie,e[175]=Je):Je=e[175],Je}function Ft(r){return de.error(ds(r))}function Rt(r){return de.error(ds(r))}const At=["16.148.147.194","52.32.122.94","52.35.156.199"];function Vt(r){return r.replace(/\.$/,"").split(".").filter(Boolean).length===2}function qt(r){return Vt(r)?"@":r}function lt(r){const e=Ee.c(9),{value:o,t:l}=r;let i;e[0]!==l?(i=l("mainPanelTabs.hostingTab.dnsCopy"),e[0]=l,e[1]=i):i=e[1];let a;e[2]!==l||e[3]!==o?(a=()=>{navigator.clipboard?.writeText(o),de.success(l("mainPanelTabs.hostingTab.dnsCopied"))},e[2]=l,e[3]=o,e[4]=a):a=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(gt,{className:"size-3.5"}),e[5]=c):c=e[5];let d;return e[6]!==i||e[7]!==a?(d=s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":i,onClick:a,children:c}),e[6]=i,e[7]=a,e[8]=d):d=e[8],d}function tt(r){const e=Ee.c(64),{from:o,source:l,t:i}=r;let a,c,d,t,n,u,v;if(e[0]!==o||e[1]!==l||e[2]!==i){const L=o.trim().replace(/\.$/,"");c=L?qt(L):"@",a=l==="both",n="flex flex-col gap-3 rounded-md border bg-muted/30 p-3";let _;e[10]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ns,{className:"size-4 text-muted-foreground"}),e[10]=_):_=e[10];let b;e[11]!==i?(b=i("mainPanelTabs.hostingTab.dnsSetupTitle"),e[11]=i,e[12]=b):b=e[12];let B;e[13]!==b?(B=s.jsx("span",{className:"text-xs font-medium",children:b}),e[13]=b,e[14]=B):B=e[14];const A=a?"secondary":"outline";let V;e[15]!==a||e[16]!==i?(V=i(a?"mainPanelTabs.hostingTab.dnsActive":"mainPanelTabs.hostingTab.dnsAwaiting"),e[15]=a,e[16]=i,e[17]=V):V=e[17];let f;e[18]!==V||e[19]!==A?(f=s.jsx(me,{variant:A,className:"ml-auto",children:V}),e[18]=V,e[19]=A,e[20]=f):f=e[20],e[21]!==f||e[22]!==B?(u=s.jsxs("div",{className:"flex items-center gap-2",children:[_,B,f]}),e[21]=f,e[22]=B,e[23]=u):u=e[23],v=s.jsx("p",{className:"text-xs text-muted-foreground",children:i("mainPanelTabs.hostingTab.dnsRedirectIntent",{from:L||"—"})}),d="text-xs text-muted-foreground",t=i("mainPanelTabs.hostingTab.dnsSetupDescription",{host:L||"—"}),e[0]=o,e[1]=l,e[2]=i,e[3]=a,e[4]=c,e[5]=d,e[6]=t,e[7]=n,e[8]=u,e[9]=v}else a=e[3],c=e[4],d=e[5],t=e[6],n=e[7],u=e[8],v=e[9];let m;e[24]!==d||e[25]!==t?(m=s.jsx("p",{className:d,children:t}),e[24]=d,e[25]=t,e[26]=m):m=e[26];let N;e[27]!==a||e[28]!==i?(N=i(a?"mainPanelTabs.hostingTab.dnsActiveHint":"mainPanelTabs.hostingTab.dnsAwaitingHint"),e[27]=a,e[28]=i,e[29]=N):N=e[29];let g;e[30]!==N?(g=s.jsx("p",{className:"text-xs text-muted-foreground",children:N}),e[30]=N,e[31]=g):g=e[31];let p;e[32]!==i?(p=i("mainPanelTabs.hostingTab.dnsColType"),e[32]=i,e[33]=p):p=e[33];let h;e[34]!==p?(h=s.jsx(I,{children:p}),e[34]=p,e[35]=h):h=e[35];let y;e[36]!==i?(y=i("mainPanelTabs.hostingTab.dnsColName"),e[36]=i,e[37]=y):y=e[37];let j;e[38]!==y?(j=s.jsx(I,{children:y}),e[38]=y,e[39]=j):j=e[39];let w;e[40]!==i?(w=i("mainPanelTabs.hostingTab.dnsColValue"),e[40]=i,e[41]=w):w=e[41];let T;e[42]!==w?(T=s.jsx(I,{children:w}),e[42]=w,e[43]=T):T=e[43];let S;e[44]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(I,{className:"w-[1%]"}),e[44]=S):S=e[44];let $;e[45]!==h||e[46]!==j||e[47]!==T?($=s.jsx(os,{children:s.jsxs(ye,{children:[h,j,T,S]})}),e[45]=h,e[46]=j,e[47]=T,e[48]=$):$=e[48];let z;e[49]!==c||e[50]!==i?(z=At.map(L=>s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:"A"}),s.jsx(q,{className:"font-mono text-xs align-middle",children:c}),s.jsx(q,{className:"font-mono text-xs align-middle",children:L}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(lt,{value:L,t:i})})]},L)),e[49]=c,e[50]=i,e[51]=z):z=e[51];let C;e[52]!==z?(C=s.jsx(ts,{children:z}),e[52]=z,e[53]=C):C=e[53];let x;e[54]!==$||e[55]!==C?(x=s.jsxs(ss,{children:[$,C]}),e[54]=$,e[55]=C,e[56]=x):x=e[56];let P;return e[57]!==x||e[58]!==n||e[59]!==u||e[60]!==v||e[61]!==m||e[62]!==g?(P=s.jsxs("div",{className:n,children:[u,v,m,g,x]}),e[57]=x,e[58]=n,e[59]=u,e[60]=v,e[61]=m,e[62]=g,e[63]=P):P=e[63],P}function Bt(r){const e=Ee.c(6),{type:o,t:l}=r,i=o==="permanent"?"secondary":"outline";let a;e[0]!==l||e[1]!==o?(a=l(o==="permanent"?"mainPanelTabs.hostingTab.permanent":"mainPanelTabs.hostingTab.temporary"),e[0]=l,e[1]=o,e[2]=a):a=e[2];let c;return e[3]!==i||e[4]!==a?(c=s.jsx(me,{variant:i,children:a}),e[3]=i,e[4]=a,e[5]=c):c=e[5],c}function Ot(r){const e=Ee.c(180),{base:o,orgSlug:l,site:i,redirects:a,isLoading:c,error:d}=r,t=cs(),n=Ss(),[u,v]=ne.useState(!1),[m,N]=ne.useState(null),[g,p]=ne.useState(""),[h,y]=ne.useState(""),[j,w]=ne.useState("permanent"),[T,S]=ne.useState(null),[$,z]=ne.useState(null);let C;e[0]!==l||e[1]!==n||e[2]!==i?(C=()=>n.invalidateQueries({queryKey:Ue.hostingRedirects(l,i)}),e[0]=l,e[1]=n,e[2]=i,e[3]=C):C=e[3];const x=C;let P;e[4]!==o?(P=H=>rs(`${o}/redirects`,"PUT",H),e[4]=o,e[5]=P):P=e[5];let L;e[6]!==x||e[7]!==t?(L=()=>{x(),de.success(t("mainPanelTabs.hostingTab.toastRedirectSaved")),v(!1)},e[6]=x,e[7]=t,e[8]=L):L=e[8];let _;e[9]!==P||e[10]!==L?(_={mutationFn:P,onSuccess:L,onError:Mt},e[9]=P,e[10]=L,e[11]=_):_=e[11];const b=as(_);let B;e[12]!==o?(B=H=>rs(`${o}/redirects/${encodeURIComponent(H)}`,"DELETE"),e[12]=o,e[13]=B):B=e[13];let A;e[14]!==x||e[15]!==t?(A=()=>{x(),de.success(t("mainPanelTabs.hostingTab.toastRedirectDeleted")),S(null)},e[14]=x,e[15]=t,e[16]=A):A=e[16];let V;e[17]!==B||e[18]!==A?(V={mutationFn:B,onSuccess:A,onError:Ht},e[17]=B,e[18]=A,e[19]=V):V=e[19];const f=as(V);let G;e[20]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{N(null),p(""),y(""),w("permanent"),v(!0)},e[20]=G):G=e[20];const Z=G;let le;e[21]===Symbol.for("react.memo_cache_sentinel")?(le=H=>{N(H.from),p(H.from),y(H.to),w(H.type==="temporary"?"temporary":"permanent"),v(!0)},e[21]=le):le=e[21];const ae=le;let ve;e[22]!==g||e[23]!==h||e[24]!==j||e[25]!==b||e[26]!==t?(ve=()=>{const H=g.trim(),Fs=h.trim();if(!H||!Fs){de.error(t("mainPanelTabs.hostingTab.errorRedirectFieldsRequired"));return}b.mutate({from:H,to:Fs,type:j})},e[22]=g,e[23]=h,e[24]=j,e[25]=b,e[26]=t,e[27]=ve):ve=e[27];const te=ve;let re;e[28]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(qs,{className:"size-4"}),e[28]=re):re=e[28];let M;e[29]!==t?(M=t("mainPanelTabs.hostingTab.addRedirect"),e[29]=t,e[30]=M):M=e[30];let U;e[31]!==M?(U=s.jsxs(ce,{size:"sm",variant:"secondary",onClick:Z,children:[re,M]}),e[31]=M,e[32]=U):U=e[32];const X=U;let ee;e[33]!==t?(ee=t("mainPanelTabs.hostingTab.redirects"),e[33]=t,e[34]=ee):ee=e[34];const ie=a.length;let K;e[35]!==f.isPending||e[36]!==$||e[37]!==d||e[38]!==c||e[39]!==b.isPending||e[40]!==a||e[41]!==t?(K=c?s.jsx(vs,{cols:3}):d?s.jsx(Ye,{children:t("mainPanelTabs.hostingTab.redirectsError")}):a.length===0?s.jsx(Ps,{icon:s.jsx(mt,{className:"size-5"}),title:t("mainPanelTabs.hostingTab.noRedirects")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:t("mainPanelTabs.hostingTab.colFrom")}),s.jsx(I,{children:t("mainPanelTabs.hostingTab.colTo")}),s.jsx(I,{children:t("mainPanelTabs.hostingTab.colType")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map((H,Fs)=>s.jsxs(ne.Fragment,{children:[s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:H.from}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground max-w-[280px] truncate align-middle",children:H.to}),s.jsx(q,{className:"align-middle",children:s.jsx(Bt,{type:H.type,t})}),s.jsxs(q,{className:"text-right align-middle whitespace-nowrap",children:[s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.dnsSetup"),onClick:()=>z($===H.from?null:H.from),children:s.jsx(Ns,{className:"size-4"})}),s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.editRedirect"),onClick:()=>ae(H),disabled:b.isPending,children:s.jsx(ft,{className:"size-4"})}),s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.deleteRedirect"),onClick:()=>S(H.from),disabled:f.isPending,children:s.jsx(Os,{className:"size-4"})})]})]}),$===H.from&&s.jsx(ye,{children:s.jsx(q,{colSpan:4,className:"bg-muted/10",children:s.jsx(tt,{from:H.from,source:H.source,t})})})]},H.id??`${H.from}-${Fs}`))})]}),e[35]=f.isPending,e[36]=$,e[37]=d,e[38]=c,e[39]=b.isPending,e[40]=a,e[41]=t,e[42]=K):K=e[42];let J;e[43]!==m||e[44]!==t?(J=m!=null?t("mainPanelTabs.hostingTab.editRedirectTitle"):t("mainPanelTabs.hostingTab.addRedirectTitle"),e[43]=m,e[44]=t,e[45]=J):J=e[45];let se;e[46]!==J?(se=s.jsx(Hs,{children:s.jsx(Ms,{children:J})}),e[46]=J,e[47]=se):se=e[47];let W;e[48]!==t?(W=t("mainPanelTabs.hostingTab.colFrom"),e[48]=t,e[49]=W):W=e[49];let E;e[50]!==W?(E=s.jsx(hs,{htmlFor:"redirect-from",children:W}),e[50]=W,e[51]=E):E=e[51];let k;e[52]!==t?(k=t("mainPanelTabs.hostingTab.redirectFromPlaceholder"),e[52]=t,e[53]=k):k=e[53];let F;e[54]===Symbol.for("react.memo_cache_sentinel")?(F=H=>p(H.target.value),e[54]=F):F=e[54];const Q=m!=null||b.isPending;let Y;e[55]!==g||e[56]!==k||e[57]!==Q?(Y=s.jsx(ls,{id:"redirect-from",placeholder:k,value:g,onChange:F,className:"font-mono text-xs",disabled:Q}),e[55]=g,e[56]=k,e[57]=Q,e[58]=Y):Y=e[58];let D;e[59]!==E||e[60]!==Y?(D=s.jsxs("div",{className:"flex flex-col gap-2",children:[E,Y]}),e[59]=E,e[60]=Y,e[61]=D):D=e[61];let O;e[62]!==t?(O=t("mainPanelTabs.hostingTab.colTo"),e[62]=t,e[63]=O):O=e[63];let ze;e[64]!==O?(ze=s.jsx(hs,{htmlFor:"redirect-to",children:O}),e[64]=O,e[65]=ze):ze=e[65];let fe;e[66]!==t?(fe=t("mainPanelTabs.hostingTab.redirectToPlaceholder"),e[66]=t,e[67]=fe):fe=e[67];let Ne;e[68]===Symbol.for("react.memo_cache_sentinel")?(Ne=H=>y(H.target.value),e[68]=Ne):Ne=e[68];let he;e[69]!==h||e[70]!==b.isPending||e[71]!==fe?(he=s.jsx(ls,{id:"redirect-to",placeholder:fe,value:h,onChange:Ne,className:"font-mono text-xs",disabled:b.isPending}),e[69]=h,e[70]=b.isPending,e[71]=fe,e[72]=he):he=e[72];let ue;e[73]!==ze||e[74]!==he?(ue=s.jsxs("div",{className:"flex flex-col gap-2",children:[ze,he]}),e[73]=ze,e[74]=he,e[75]=ue):ue=e[75];let Le;e[76]!==t?(Le=t("mainPanelTabs.hostingTab.colType"),e[76]=t,e[77]=Le):Le=e[77];let Se;e[78]!==Le?(Se=s.jsx(hs,{children:Le}),e[78]=Le,e[79]=Se):Se=e[79];let Ce;e[80]===Symbol.for("react.memo_cache_sentinel")?(Ce=H=>w(H==="temporary"?"temporary":"permanent"),e[80]=Ce):Ce=e[80];const Fe=b.isPending;let Re;e[81]===Symbol.for("react.memo_cache_sentinel")?(Re=s.jsx(Gs,{className:"w-full",children:s.jsx(Xs,{})}),e[81]=Re):Re=e[81];let ge;e[82]!==t?(ge=t("mainPanelTabs.hostingTab.permanent"),e[82]=t,e[83]=ge):ge=e[83];let xe;e[84]!==ge?(xe=s.jsx(js,{value:"permanent",children:ge}),e[84]=ge,e[85]=xe):xe=e[85];let De;e[86]!==t?(De=t("mainPanelTabs.hostingTab.temporary"),e[86]=t,e[87]=De):De=e[87];let Ge;e[88]!==De?(Ge=s.jsx(js,{value:"temporary",children:De}),e[88]=De,e[89]=Ge):Ge=e[89];let be;e[90]!==xe||e[91]!==Ge?(be=s.jsxs(Zs,{children:[xe,Ge]}),e[90]=xe,e[91]=Ge,e[92]=be):be=e[92];let Te;e[93]!==j||e[94]!==b.isPending||e[95]!==be?(Te=s.jsxs(Ys,{value:j,onValueChange:Ce,disabled:Fe,children:[Re,be]}),e[93]=j,e[94]=b.isPending,e[95]=be,e[96]=Te):Te=e[96];let pe;e[97]!==Se||e[98]!==Te?(pe=s.jsxs("div",{className:"flex flex-col gap-2",children:[Se,Te]}),e[97]=Se,e[98]=Te,e[99]=pe):pe=e[99];let Ae;e[100]!==m||e[101]!==g||e[102]!==a||e[103]!==t?(Ae=g.trim()&&s.jsx(tt,{from:g,source:a.find(H=>H.from===m)?.source,t}),e[100]=m,e[101]=g,e[102]=a,e[103]=t,e[104]=Ae):Ae=e[104];let je;e[105]!==D||e[106]!==ue||e[107]!==pe||e[108]!==Ae?(je=s.jsxs("div",{className:"flex flex-col gap-4",children:[D,ue,pe,Ae]}),e[105]=D,e[106]=ue,e[107]=pe,e[108]=Ae,e[109]=je):je=e[109];let we;e[110]===Symbol.for("react.memo_cache_sentinel")?(we=()=>v(!1),e[110]=we):we=e[110];const Ve=b.isPending;let Pe;e[111]!==t?(Pe=t("mainPanelTabs.hostingTab.cancel"),e[111]=t,e[112]=Pe):Pe=e[112];let _e;e[113]!==b.isPending||e[114]!==Pe?(_e=s.jsx(ce,{variant:"outline",type:"button",onClick:we,disabled:Ve,children:Pe}),e[113]=b.isPending,e[114]=Pe,e[115]=_e):_e=e[115];let ke;e[116]!==g||e[117]!==h||e[118]!==b.isPending?(ke=b.isPending||!g.trim()||!h.trim(),e[116]=g,e[117]=h,e[118]=b.isPending,e[119]=ke):ke=e[119];let R;e[120]!==b.isPending||e[121]!==t?(R=b.isPending?t("mainPanelTabs.hostingTab.saving"):t("mainPanelTabs.hostingTab.save"),e[120]=b.isPending,e[121]=t,e[122]=R):R=e[122];let $e;e[123]!==te||e[124]!==ke||e[125]!==R?($e=s.jsx(ce,{type:"button",onClick:te,disabled:ke,children:R}),e[123]=te,e[124]=ke,e[125]=R,e[126]=$e):$e=e[126];let Xe;e[127]!==_e||e[128]!==$e?(Xe=s.jsxs(Ws,{children:[_e,$e]}),e[127]=_e,e[128]=$e,e[129]=Xe):Xe=e[129];let qe;e[130]!==se||e[131]!==je||e[132]!==Xe?(qe=s.jsxs(Ks,{className:"sm:max-w-md",children:[se,je,Xe]}),e[130]=se,e[131]=je,e[132]=Xe,e[133]=qe):qe=e[133];let Be;e[134]!==u||e[135]!==qe?(Be=s.jsx(Qs,{open:u,onOpenChange:v,children:qe}),e[134]=u,e[135]=qe,e[136]=Be):Be=e[136];const Ze=T!=null;let us;e[137]===Symbol.for("react.memo_cache_sentinel")?(us=H=>{H||S(null)},e[137]=us):us=e[137];let Oe;e[138]!==t?(Oe=t("mainPanelTabs.hostingTab.confirmDeleteRedirectTitle"),e[138]=t,e[139]=Oe):Oe=e[139];let He;e[140]!==Oe?(He=s.jsx(Cs,{children:Oe}),e[140]=Oe,e[141]=He):He=e[141];const es=T??"";let ns;e[142]!==t||e[143]!==es?(ns=t("mainPanelTabs.hostingTab.confirmDeleteRedirectDescription",{from:es}),e[142]=t,e[143]=es,e[144]=ns):ns=e[144];let Me;e[145]!==ns?(Me=s.jsx(Ds,{children:ns}),e[145]=ns,e[146]=Me):Me=e[146];let Ke;e[147]!==He||e[148]!==Me?(Ke=s.jsxs(ws,{children:[He,Me]}),e[147]=He,e[148]=Me,e[149]=Ke):Ke=e[149];const is=f.isPending;let Qe;e[150]!==t?(Qe=t("mainPanelTabs.hostingTab.cancel"),e[150]=t,e[151]=Qe):Qe=e[151];let Ie;e[152]!==f.isPending||e[153]!==Qe?(Ie=s.jsx($s,{disabled:is,children:Qe}),e[152]=f.isPending,e[153]=Qe,e[154]=Ie):Ie=e[154];let Je;e[155]!==f||e[156]!==T?(Je=H=>{H.preventDefault(),T&&f.mutate(T)},e[155]=f,e[156]=T,e[157]=Je):Je=e[157];const oe=f.isPending;let We;e[158]!==t?(We=t("mainPanelTabs.hostingTab.deleteRedirect"),e[158]=t,e[159]=We):We=e[159];let gs;e[160]!==f.isPending||e[161]!==Je||e[162]!==We?(gs=s.jsx(zs,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:Je,disabled:oe,children:We}),e[160]=f.isPending,e[161]=Je,e[162]=We,e[163]=gs):gs=e[163];let xs;e[164]!==Ie||e[165]!==gs?(xs=s.jsxs(Ls,{children:[Ie,gs]}),e[164]=Ie,e[165]=gs,e[166]=xs):xs=e[166];let bs;e[167]!==Ke||e[168]!==xs?(bs=s.jsxs(_s,{children:[Ke,xs]}),e[167]=Ke,e[168]=xs,e[169]=bs):bs=e[169];let Ts;e[170]!==Ze||e[171]!==bs?(Ts=s.jsx(ks,{open:Ze,onOpenChange:us,children:bs}),e[170]=Ze,e[171]=bs,e[172]=Ts):Ts=e[172];let Es;return e[173]!==X||e[174]!==a.length||e[175]!==ee||e[176]!==K||e[177]!==Be||e[178]!==Ts?(Es=s.jsxs(ys,{title:ee,count:ie,action:X,children:[K,Be,Ts]}),e[173]=X,e[174]=a.length,e[175]=ee,e[176]=K,e[177]=Be,e[178]=Ts,e[179]=Es):Es=e[179],Es}function Ht(r){return de.error(ds(r))}function Mt(r){return de.error(ds(r))}function nt(r){const e=Ee.c(35),{records:o,t:l}=r;if(o.length===0)return null;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ns,{className:"size-4 text-muted-foreground"}),e[0]=i):i=e[0];let a;e[1]!==l?(a=l("mainPanelTabs.hostingTab.dnsSetupTitle"),e[1]=l,e[2]=a):a=e[2];let c;e[3]!==a?(c=s.jsxs("div",{className:"flex items-center gap-2",children:[i,s.jsx("span",{className:"text-xs font-medium",children:a})]}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==l?(d=l("mainPanelTabs.hostingTab.dnsColType"),e[5]=l,e[6]=d):d=e[6];let t;e[7]!==d?(t=s.jsx(I,{className:"w-14",children:d}),e[7]=d,e[8]=t):t=e[8];let n;e[9]!==l?(n=l("mainPanelTabs.hostingTab.dnsColName"),e[9]=l,e[10]=n):n=e[10];let u;e[11]!==n?(u=s.jsx(I,{children:n}),e[11]=n,e[12]=u):u=e[12];let v;e[13]!==l?(v=l("mainPanelTabs.hostingTab.dnsColValue"),e[13]=l,e[14]=v):v=e[14];let m;e[15]!==v?(m=s.jsx(I,{children:v}),e[15]=v,e[16]=m):m=e[16];let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(I,{className:"w-8"}),e[17]=N):N=e[17];let g;e[18]!==t||e[19]!==u||e[20]!==m?(g=s.jsx(os,{children:s.jsxs(ye,{children:[t,u,m,N]})}),e[18]=t,e[19]=u,e[20]=m,e[21]=g):g=e[21];let p;if(e[22]!==o||e[23]!==l){let w;e[25]!==l?(w=T=>s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-top",children:T.type}),s.jsx(q,{className:"break-all font-mono text-xs align-top",children:T.name}),s.jsx(q,{className:"break-all font-mono text-xs align-top",children:T.value}),s.jsx(q,{className:"text-right align-top",children:s.jsx(lt,{value:T.value,t:l})})]},`${T.type}-${T.name}-${T.value}`),e[25]=l,e[26]=w):w=e[26],p=o.map(w),e[22]=o,e[23]=l,e[24]=p}else p=e[24];let h;e[27]!==p?(h=s.jsx(ts,{children:p}),e[27]=p,e[28]=h):h=e[28];let y;e[29]!==g||e[30]!==h?(y=s.jsxs(ss,{className:"w-full table-fixed",children:[g,h]}),e[29]=g,e[30]=h,e[31]=y):y=e[31];let j;return e[32]!==y||e[33]!==c?(j=s.jsxs("div",{className:"flex min-w-0 flex-col gap-3 rounded-md border bg-muted/30 p-3",children:[c,y]}),e[32]=y,e[33]=c,e[34]=j):j=e[34],j}function Kt(r){const e=Ee.c(10),{domain:o,t:l}=r,i=o.status??"pending";let a;e[0]!==i||e[1]!==l?(a=l(i==="active"?"mainPanelTabs.hostingTab.statusActive":i==="action-required"?"mainPanelTabs.hostingTab.statusActionRequired":"mainPanelTabs.hostingTab.statusPending"),e[0]=i,e[1]=l,e[2]=a):a=e[2];const c=a;let d;e[3]!==o.detail||e[4]!==l?(d=o.detail==="zone-not-onboarded"?l("mainPanelTabs.hostingTab.detailZoneNotOnboarded"):void 0,e[3]=o.detail,e[4]=l,e[5]=d):d=e[5];const t=d,n=i==="active"?"secondary":"outline";let u;return e[6]!==t||e[7]!==c||e[8]!==n?(u=s.jsx(me,{variant:n,title:t,children:c}),e[6]=t,e[7]=c,e[8]=n,e[9]=u):u=e[9],u}function Qt(r){const e=Ee.c(138),{base:o,orgSlug:l,site:i,domains:a,dnsTemplate:c,isLoading:d,error:t}=r,n=cs(),u=Ss(),[v,m]=ne.useState(!1),[N,g]=ne.useState(""),[p,h]=ne.useState(null),[y,j]=ne.useState(null);let w;e[0]!==l||e[1]!==u||e[2]!==i?(w=()=>u.invalidateQueries({queryKey:Ue.hostingDomains(l,i)}),e[0]=l,e[1]=u,e[2]=i,e[3]=w):w=e[3];const T=w;let S;e[4]!==o?(S=R=>rs(`${o}/domains`,"PUT",R),e[4]=o,e[5]=S):S=e[5];let $;e[6]!==T||e[7]!==n?($=()=>{T(),de.success(n("mainPanelTabs.hostingTab.toastDomainSaved")),m(!1)},e[6]=T,e[7]=n,e[8]=$):$=e[8];let z;e[9]!==S||e[10]!==$?(z={mutationFn:S,onSuccess:$,onError:Ut},e[9]=S,e[10]=$,e[11]=z):z=e[11];const C=as(z);let x;e[12]!==o?(x=R=>rs(`${o}/domains/${encodeURIComponent(R)}`,"DELETE"),e[12]=o,e[13]=x):x=e[13];let P;e[14]!==T||e[15]!==n?(P=()=>{T(),de.success(n("mainPanelTabs.hostingTab.toastDomainDeleted")),h(null)},e[14]=T,e[15]=n,e[16]=P):P=e[16];let L;e[17]!==x||e[18]!==P?(L={mutationFn:x,onSuccess:P,onError:It},e[17]=x,e[18]=P,e[19]=L):L=e[19];const _=as(L);let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{g(""),m(!0)},e[20]=b):b=e[20];const B=b;let A;e[21]!==N||e[22]!==C||e[23]!==n?(A=()=>{const R=N.trim().toLowerCase();if(!R){de.error(n("mainPanelTabs.hostingTab.errorDomainHostRequired"));return}C.mutate({host:R})},e[21]=N,e[22]=C,e[23]=n,e[24]=A):A=e[24];const V=A;let f;if(e[25]!==c||e[26]!==N){let R;e[28]!==N?(R=$e=>({...$e,name:N.trim().toLowerCase()||$e.name}),e[28]=N,e[29]=R):R=e[29],f=c.map(R),e[25]=c,e[26]=N,e[27]=f}else f=e[27];const G=f;let Z;e[30]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(qs,{className:"size-4"}),e[30]=Z):Z=e[30];let le;e[31]!==n?(le=n("mainPanelTabs.hostingTab.addDomain"),e[31]=n,e[32]=le):le=e[32];let ae;e[33]!==le?(ae=s.jsxs(ce,{size:"sm",variant:"secondary",onClick:B,children:[Z,le]}),e[33]=le,e[34]=ae):ae=e[34];const ve=ae;let te;e[35]!==n?(te=n("mainPanelTabs.hostingTab.domains"),e[35]=n,e[36]=te):te=e[36];const re=a.length;let M;e[37]!==_.isPending||e[38]!==y||e[39]!==a||e[40]!==t||e[41]!==d||e[42]!==n?(M=d?s.jsx(vs,{cols:3}):t?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.domainsError")}):a.length===0?s.jsx(Ps,{icon:s.jsx(Ns,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDomains")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colHost")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colStatus")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map((R,$e)=>s.jsxs(ne.Fragment,{children:[s.jsxs(ye,{children:[s.jsxs(q,{className:"font-mono text-xs align-middle",children:[R.host,R.canonical&&s.jsx(me,{variant:"outline",className:"ml-2",children:n("mainPanelTabs.hostingTab.canonical")})]}),s.jsx(q,{className:"align-middle",children:s.jsx(Kt,{domain:R,t:n})}),s.jsx(q,{className:"text-right align-middle whitespace-nowrap",children:!R.canonical&&s.jsxs(s.Fragment,{children:[s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.dnsSetup"),onClick:()=>j(y===R.host?null:R.host),children:s.jsx(Ns,{className:"size-4"})}),s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.deleteDomain"),onClick:()=>h(R.host),disabled:_.isPending,children:s.jsx(Os,{className:"size-4"})})]})})]}),y===R.host&&s.jsx(ye,{children:s.jsx(q,{colSpan:3,className:"bg-muted/10",children:s.jsx(nt,{records:R.dns??[],t:n})})})]},`${R.host}-${$e}`))})]}),e[37]=_.isPending,e[38]=y,e[39]=a,e[40]=t,e[41]=d,e[42]=n,e[43]=M):M=e[43];let U;e[44]!==n?(U=n("mainPanelTabs.hostingTab.addDomainTitle"),e[44]=n,e[45]=U):U=e[45];let X;e[46]!==U?(X=s.jsx(Hs,{children:s.jsx(Ms,{children:U})}),e[46]=U,e[47]=X):X=e[47];let ee;e[48]!==n?(ee=n("mainPanelTabs.hostingTab.colHost"),e[48]=n,e[49]=ee):ee=e[49];let ie;e[50]!==ee?(ie=s.jsx(hs,{htmlFor:"domain-host",children:ee}),e[50]=ee,e[51]=ie):ie=e[51];let K;e[52]!==n?(K=n("mainPanelTabs.hostingTab.domainHostPlaceholder"),e[52]=n,e[53]=K):K=e[53];let J;e[54]===Symbol.for("react.memo_cache_sentinel")?(J=R=>g(R.target.value),e[54]=J):J=e[54];let se;e[55]!==N||e[56]!==C.isPending||e[57]!==K?(se=s.jsx(ls,{id:"domain-host",placeholder:K,value:N,onChange:J,className:"font-mono text-xs",disabled:C.isPending}),e[55]=N,e[56]=C.isPending,e[57]=K,e[58]=se):se=e[58];let W;e[59]!==ie||e[60]!==se?(W=s.jsxs("div",{className:"flex flex-col gap-2",children:[ie,se]}),e[59]=ie,e[60]=se,e[61]=W):W=e[61];let E;e[62]!==N||e[63]!==G||e[64]!==n?(E=N.trim()&&s.jsx(nt,{records:G,t:n}),e[62]=N,e[63]=G,e[64]=n,e[65]=E):E=e[65];let k;e[66]!==W||e[67]!==E?(k=s.jsxs("div",{className:"flex flex-col gap-4",children:[W,E]}),e[66]=W,e[67]=E,e[68]=k):k=e[68];let F;e[69]===Symbol.for("react.memo_cache_sentinel")?(F=()=>m(!1),e[69]=F):F=e[69];const Q=C.isPending;let Y;e[70]!==n?(Y=n("mainPanelTabs.hostingTab.cancel"),e[70]=n,e[71]=Y):Y=e[71];let D;e[72]!==C.isPending||e[73]!==Y?(D=s.jsx(ce,{variant:"outline",type:"button",onClick:F,disabled:Q,children:Y}),e[72]=C.isPending,e[73]=Y,e[74]=D):D=e[74];let O;e[75]!==N||e[76]!==C.isPending?(O=C.isPending||!N.trim(),e[75]=N,e[76]=C.isPending,e[77]=O):O=e[77];let ze;e[78]!==C.isPending||e[79]!==n?(ze=C.isPending?n("mainPanelTabs.hostingTab.saving"):n("mainPanelTabs.hostingTab.save"),e[78]=C.isPending,e[79]=n,e[80]=ze):ze=e[80];let fe;e[81]!==V||e[82]!==O||e[83]!==ze?(fe=s.jsx(ce,{type:"button",onClick:V,disabled:O,children:ze}),e[81]=V,e[82]=O,e[83]=ze,e[84]=fe):fe=e[84];let Ne;e[85]!==D||e[86]!==fe?(Ne=s.jsxs(Ws,{children:[D,fe]}),e[85]=D,e[86]=fe,e[87]=Ne):Ne=e[87];let he;e[88]!==X||e[89]!==k||e[90]!==Ne?(he=s.jsxs(Ks,{className:"sm:max-w-md",children:[X,k,Ne]}),e[88]=X,e[89]=k,e[90]=Ne,e[91]=he):he=e[91];let ue;e[92]!==v||e[93]!==he?(ue=s.jsx(Qs,{open:v,onOpenChange:m,children:he}),e[92]=v,e[93]=he,e[94]=ue):ue=e[94];const Le=p!=null;let Se;e[95]===Symbol.for("react.memo_cache_sentinel")?(Se=R=>{R||h(null)},e[95]=Se):Se=e[95];let Ce;e[96]!==n?(Ce=n("mainPanelTabs.hostingTab.confirmDeleteDomainTitle"),e[96]=n,e[97]=Ce):Ce=e[97];let Fe;e[98]!==Ce?(Fe=s.jsx(Cs,{children:Ce}),e[98]=Ce,e[99]=Fe):Fe=e[99];const Re=p??"";let ge;e[100]!==n||e[101]!==Re?(ge=n("mainPanelTabs.hostingTab.confirmDeleteDomainDescription",{host:Re}),e[100]=n,e[101]=Re,e[102]=ge):ge=e[102];let xe;e[103]!==ge?(xe=s.jsx(Ds,{children:ge}),e[103]=ge,e[104]=xe):xe=e[104];let De;e[105]!==Fe||e[106]!==xe?(De=s.jsxs(ws,{children:[Fe,xe]}),e[105]=Fe,e[106]=xe,e[107]=De):De=e[107];const Ge=_.isPending;let be;e[108]!==n?(be=n("mainPanelTabs.hostingTab.cancel"),e[108]=n,e[109]=be):be=e[109];let Te;e[110]!==_.isPending||e[111]!==be?(Te=s.jsx($s,{disabled:Ge,children:be}),e[110]=_.isPending,e[111]=be,e[112]=Te):Te=e[112];let pe;e[113]!==_||e[114]!==p?(pe=R=>{R.preventDefault(),p&&_.mutate(p)},e[113]=_,e[114]=p,e[115]=pe):pe=e[115];const Ae=_.isPending;let je;e[116]!==n?(je=n("mainPanelTabs.hostingTab.deleteDomain"),e[116]=n,e[117]=je):je=e[117];let we;e[118]!==_.isPending||e[119]!==pe||e[120]!==je?(we=s.jsx(zs,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:pe,disabled:Ae,children:je}),e[118]=_.isPending,e[119]=pe,e[120]=je,e[121]=we):we=e[121];let Ve;e[122]!==Te||e[123]!==we?(Ve=s.jsxs(Ls,{children:[Te,we]}),e[122]=Te,e[123]=we,e[124]=Ve):Ve=e[124];let Pe;e[125]!==De||e[126]!==Ve?(Pe=s.jsxs(_s,{children:[De,Ve]}),e[125]=De,e[126]=Ve,e[127]=Pe):Pe=e[127];let _e;e[128]!==Le||e[129]!==Pe?(_e=s.jsx(ks,{open:Le,onOpenChange:Se,children:Pe}),e[128]=Le,e[129]=Pe,e[130]=_e):_e=e[130];let ke;return e[131]!==ve||e[132]!==a.length||e[133]!==te||e[134]!==M||e[135]!==ue||e[136]!==_e?(ke=s.jsxs(ys,{title:te,count:re,action:ve,children:[M,ue,_e]}),e[131]=ve,e[132]=a.length,e[133]=te,e[134]=M,e[135]=ue,e[136]=_e,e[137]=ke):ke=e[137],ke}function It(r){return de.error(ds(r))}function Ut(r){return de.error(ds(r))}function ti(r){const e=Ee.c(118),{virtualMcpId:o}=r,l=cs(),{org:i}=at(),a=bt(o),c=Tt(a),d=!!c,t=c?`/api/${i.slug}/hosting/${encodeURIComponent(c)}`:"";let n;e[0]!==t?(n=()=>fs(`${t}/deployments`),e[0]=t,e[1]=n):n=e[1];const u=ms({queryKey:Ue.hostingDeployments(i.slug,c??""),queryFn:n,enabled:d,retry:!1,staleTime:3e4});let v;e[2]!==t?(v=()=>fs(`${t}/env`),e[2]=t,e[3]=v):v=e[3];const m=ms({queryKey:Ue.hostingEnv(i.slug,c??""),queryFn:v,enabled:d,retry:!1,staleTime:3e4});let N;e[4]!==t?(N=()=>fs(`${t}/secrets`),e[4]=t,e[5]=N):N=e[5];const g=ms({queryKey:Ue.hostingSecrets(i.slug,c??""),queryFn:N,enabled:d,retry:!1,staleTime:3e4});let p;e[6]!==t?(p=()=>fs(`${t}/redirects`),e[6]=t,e[7]=p):p=e[7];const h=ms({queryKey:Ue.hostingRedirects(i.slug,c??""),queryFn:p,enabled:d,retry:!1,staleTime:3e4});let y;e[8]!==t?(y=()=>fs(`${t}/domains`),e[8]=t,e[9]=y):y=e[9];const j=ms({queryKey:Ue.hostingDomains(i.slug,c??""),queryFn:y,enabled:d,retry:!1,staleTime:3e4});if(!c){let E;e[10]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(As,{className:"size-5"}),e[10]=E):E=e[10];let k;e[11]!==l?(k=l("mainPanelTabs.hostingTab.noSiteTitle"),e[11]=l,e[12]=k):k=e[12];let F;e[13]!==l?(F=l("mainPanelTabs.hostingTab.noSiteDescription"),e[13]=l,e[14]=F):F=e[14];let Q;return e[15]!==k||e[16]!==F?(Q=s.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:s.jsx(Ps,{icon:E,title:k,description:F})}),e[15]=k,e[16]=F,e[17]=Q):Q=e[17],Q}if(Vs(u.error)&&Vs(m.error)&&Vs(h.error)){let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(As,{className:"size-5"}),e[18]=E):E=e[18];let k;e[19]!==l?(k=l("mainPanelTabs.hostingTab.notConnectedTitle"),e[19]=l,e[20]=k):k=e[20];let F;e[21]!==l?(F=l("mainPanelTabs.hostingTab.notConnectedDescription"),e[21]=l,e[22]=F):F=e[22];let Q;return e[23]!==k||e[24]!==F?(Q=s.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:s.jsx(Ps,{icon:E,title:k,description:F})}),e[23]=k,e[24]=F,e[25]=Q):Q=e[25],Q}let T,S,$,z,C,x,P,L;if(e[26]!==u.data||e[27]!==j.data||e[28]!==m.data||e[29]!==h.data||e[30]!==g.data){S=ps(u.data,"items");let E;e[39]!==m.data?(E=ps(m.data,"vars"),e[39]=m.data,e[40]=E):E=e[40],C=E;let k;e[41]!==m.data?(k=ps(m.data,"codeVars"),e[41]=m.data,e[42]=k):k=e[42],T=k;let F;e[43]!==g.data?(F=ps(g.data,"secrets"),e[43]=g.data,e[44]=F):F=e[44],P=F;let Q;e[45]!==h.data?(Q=ps(h.data,"items"),e[45]=h.data,e[46]=Q):Q=e[46],x=Q;const Y=j.data;let D;e[47]!==Y?.items?(D=Y?.items??[],e[47]=Y?.items,e[48]=D):D=e[48],z=D;let O;e[49]!==Y?.dnsTemplate?(O=Y?.dnsTemplate??[],e[49]=Y?.dnsTemplate,e[50]=O):O=e[50],$=O,L=Js(S.find(Jt)?.framework),e[26]=u.data,e[27]=j.data,e[28]=m.data,e[29]=h.data,e[30]=g.data,e[31]=T,e[32]=S,e[33]=$,e[34]=z,e[35]=C,e[36]=x,e[37]=P,e[38]=L}else T=e[31],S=e[32],$=e[33],z=e[34],C=e[35],x=e[36],P=e[37],L=e[38];const _=L,b="h-full min-h-0 overflow-y-auto",B="mx-auto flex max-w-4xl flex-col gap-6 p-6",A="flex items-start justify-between gap-4",V="flex flex-col gap-1";let f;e[51]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(As,{className:"size-[18px] text-muted-foreground"}),e[51]=f):f=e[51];let G;e[52]!==l?(G=l("mainPanelTabs.hostingTab.title"),e[52]=l,e[53]=G):G=e[53];let Z;e[54]!==G?(Z=s.jsx("h2",{className:"text-base font-semibold text-foreground",children:G}),e[54]=G,e[55]=Z):Z=e[55];let le;e[56]!==_?(le=_&&s.jsx(me,{variant:"secondary",children:_}),e[56]=_,e[57]=le):le=e[57];let ae;e[58]!==Z||e[59]!==le?(ae=s.jsxs("div",{className:"flex items-center gap-2",children:[f,Z,le]}),e[58]=Z,e[59]=le,e[60]=ae):ae=e[60];const ve="text-sm text-muted-foreground",te=l("mainPanelTabs.hostingTab.subtitle",{site:c});let re;e[61]!==te?(re=s.jsx("p",{className:ve,children:te}),e[61]=te,e[62]=re):re=e[62];let M;e[63]!==ae||e[64]!==re?(M=s.jsxs("div",{className:V,children:[ae,re]}),e[63]=ae,e[64]=re,e[65]=M):M=e[65];let U;e[66]!==t||e[67]!==i.slug||e[68]!==c?(U=s.jsx(yt,{base:t,orgSlug:i.slug,site:c}),e[66]=t,e[67]=i.slug,e[68]=c,e[69]=U):U=e[69];let X;e[70]!==M||e[71]!==U?(X=s.jsxs("div",{className:A,children:[M,U]}),e[70]=M,e[71]=U,e[72]=X):X=e[72];let ee;e[73]!==t||e[74]!==S||e[75]!==u.error||e[76]!==u.isLoading||e[77]!==d||e[78]!==i.slug||e[79]!==c?(ee=s.jsx(wt,{base:t,orgSlug:i.slug,site:c,enabled:d,deployments:S,isLoading:u.isLoading,error:u.error}),e[73]=t,e[74]=S,e[75]=u.error,e[76]=u.isLoading,e[77]=d,e[78]=i.slug,e[79]=c,e[80]=ee):ee=e[80];let ie;e[81]!==t||e[82]!==T||e[83]!==m.error||e[84]!==m.isLoading||e[85]!==C||e[86]!==i.slug||e[87]!==c?(ie=s.jsx(Lt,{base:t,orgSlug:i.slug,site:c,envVars:C,codeVars:T,isLoading:m.isLoading,error:m.error}),e[81]=t,e[82]=T,e[83]=m.error,e[84]=m.isLoading,e[85]=C,e[86]=i.slug,e[87]=c,e[88]=ie):ie=e[88];let K;e[89]!==t||e[90]!==i.slug||e[91]!==P||e[92]!==g.error||e[93]!==g.isLoading||e[94]!==c?(K=s.jsx(Et,{base:t,orgSlug:i.slug,site:c,secrets:P,isLoading:g.isLoading,error:g.error}),e[89]=t,e[90]=i.slug,e[91]=P,e[92]=g.error,e[93]=g.isLoading,e[94]=c,e[95]=K):K=e[95];let J;e[96]!==t||e[97]!==$||e[98]!==z||e[99]!==j.error||e[100]!==j.isLoading||e[101]!==i.slug||e[102]!==c?(J=s.jsx(Qt,{base:t,orgSlug:i.slug,site:c,domains:z,dnsTemplate:$,isLoading:j.isLoading,error:j.error}),e[96]=t,e[97]=$,e[98]=z,e[99]=j.error,e[100]=j.isLoading,e[101]=i.slug,e[102]=c,e[103]=J):J=e[103];let se;e[104]!==t||e[105]!==i.slug||e[106]!==x||e[107]!==h.error||e[108]!==h.isLoading||e[109]!==c?(se=s.jsx(Ot,{base:t,orgSlug:i.slug,site:c,redirects:x,isLoading:h.isLoading,error:h.error}),e[104]=t,e[105]=i.slug,e[106]=x,e[107]=h.error,e[108]=h.isLoading,e[109]=c,e[110]=se):se=e[110];let W;return e[111]!==X||e[112]!==ee||e[113]!==ie||e[114]!==K||e[115]!==J||e[116]!==se?(W=s.jsx("div",{className:b,children:s.jsxs("div",{className:B,children:[X,ee,ie,K,J,se]})}),e[111]=X,e[112]=ee,e[113]=ie,e[114]=K,e[115]=J,e[116]=se,e[117]=W):W=e[117],W}function Jt(r){return r.framework}export{ti as HostingTab};