decocms 4.148.2 → 4.149.0

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 (219) hide show
  1. package/dist/client/assets/{AlertCircle-C0so9_2m.js → AlertCircle-038IKv3A.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BPndrmYp.js → AreaChart-D8m8ozpC.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-DqHZOLaH.js → ArrowUp-CsFpycBi.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-BeSitLtk.js → ArrowUpRight-XdfqUTFS.js} +1 -1
  5. package/dist/client/assets/{Check-Bo8E9P21.js → Check-Dj1oqMe7.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-BbUhtU6N.js → CheckCircle-BG5Ozkw7.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-LhncEFP2.js → ChevronDown-PtoGo_nJ.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BFNnjWyJ.js → ChevronRight-CtHjdGD9.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-BiY1fIT1.js → ChevronUp-Dou3tmY_.js} +1 -1
  10. package/dist/client/assets/{Copy01-2mNuGDMv.js → Copy01-B0suaC4H.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-B4rEjSEm.js → DotsVertical-BPXZyXy1.js} +1 -1
  12. package/dist/client/assets/{Eye-BTH5usrJ.js → Eye-DOt_iBKe.js} +1 -1
  13. package/dist/client/assets/{FilterLines-gOO19eIp.js → FilterLines-BcggFEBT.js} +1 -1
  14. package/dist/client/assets/{HardDrive-BwPhW4I-.js → HardDrive-DrWH_e7I.js} +1 -1
  15. package/dist/client/assets/{Key01-BGAAxzW1.js → Key01-BDQ-B_fA.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-CfUA3Gy4.js → LayoutLeft-CUrfErgE.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-DX9n1Q3H.js → LinkExternal01-ClrGcDvb.js} +1 -1
  18. package/dist/client/assets/{LogOut01-CWmPY0tk.js → LogOut01-Bjnp77Ht.js} +1 -1
  19. package/dist/client/assets/{Monitor01-BPH64z9I.js → Monitor01-Dqy0f1bW.js} +1 -1
  20. package/dist/client/assets/{Palette-BN_2bME6.js → Palette-DMlooxKn.js} +1 -1
  21. package/dist/client/assets/{Play-CXY0M3_s.js → Play-MfG0weWE.js} +1 -1
  22. package/dist/client/assets/{Plus-D0Dv9jPc.js → Plus-f_2Wo054.js} +1 -1
  23. package/dist/client/assets/{SearchLg-tmeXQ1lM.js → SearchLg-CkIXKEEx.js} +1 -1
  24. package/dist/client/assets/{SearchMd-CyOcTz8D.js → SearchMd-CTAk6WXU.js} +1 -1
  25. package/dist/client/assets/{Settings02-ChUOGGl4.js → Settings02-B1WEimn4.js} +1 -1
  26. package/dist/client/assets/{Shield01-Byq7vBeG.js → Shield01-qrZJgHQF.js} +1 -1
  27. package/dist/client/assets/{Star01-otAf03E1.js → Star01-CCtdoggu.js} +1 -1
  28. package/dist/client/assets/{Stars01-0Ay4O1GU.js → Stars01-Bt_qsRaS.js} +1 -1
  29. package/dist/client/assets/{Stars02-DEeje6sx.js → Stars02-Wn7oMhGJ.js} +1 -1
  30. package/dist/client/assets/{Sun-CZcQsQoW.js → Sun-DA0cLF5b.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-CmYE4bLM.js → SwitchHorizontal01-CH0riBTt.js} +1 -1
  32. package/dist/client/assets/{Tool01-CJqzdgTl.js → Tool01-C3L4IY43.js} +1 -1
  33. package/dist/client/assets/{Tool02-AS2smiaY.js → Tool02-CIJ7gO1t.js} +1 -1
  34. package/dist/client/assets/{Trash01-DHgDjjjd.js → Trash01-CNDRMJWw.js} +1 -1
  35. package/dist/client/assets/{TrendUp01-1KjOKz6O.js → TrendUp01-B85cPvEy.js} +1 -1
  36. package/dist/client/assets/{Upload01-L19nEZoE.js → Upload01-BaSKA6Sm.js} +1 -1
  37. package/dist/client/assets/{User01-CJiOnrLf.js → User01-p0o22wvJ.js} +1 -1
  38. package/dist/client/assets/{Users01-CFKiZjIC.js → Users01-B5ROKABz.js} +1 -1
  39. package/dist/client/assets/{Users03-CPACS1af.js → Users03-C2OZUuui.js} +1 -1
  40. package/dist/client/assets/{X-DoD_DFvd.js → X-CMmp1c2Y.js} +1 -1
  41. package/dist/client/assets/{XCircle-CBO54-W0.js → XCircle-ByUu-5ED.js} +1 -1
  42. package/dist/client/assets/{XClose-DUbqSiSS.js → XClose-aiBNKVQL.js} +1 -1
  43. package/dist/client/assets/{Zap-CXWrUVPS.js → Zap-B3mAfTrK.js} +1 -1
  44. package/dist/client/assets/{ZapSquare-BxR0CRbR.js → ZapSquare-Dq8mfWBk.js} +1 -1
  45. package/dist/client/assets/{access-gate-BHwRisLp.js → access-gate-DIId0uoS.js} +1 -1
  46. package/dist/client/assets/{add-section-modal-Cvg3xT7n.js → add-section-modal-ilSw12oN.js} +1 -1
  47. package/dist/client/assets/{agent-icon-CmLTEMEg.js → agent-icon-CAYkCIpV.js} +1 -1
  48. package/dist/client/assets/{agents-list-CZotFPfA.js → agents-list-y_Tz3f23.js} +1 -1
  49. package/dist/client/assets/{ai-providers-CEhisgz1.js → ai-providers-SqSW0hlq.js} +1 -1
  50. package/dist/client/assets/{alert-D9X5OP1t.js → alert-DAcFM45K.js} +1 -1
  51. package/dist/client/assets/{alert-dialog-E0cD0kfl.js → alert-dialog-DNhqmWqY.js} +1 -1
  52. package/dist/client/assets/{app-editor-B07FokK6.js → app-editor-D13wjjte.js} +1 -1
  53. package/dist/client/assets/{auth-BdFDZqih.js → auth-89cmcPCp.js} +1 -1
  54. package/dist/client/assets/{auth-catchall-B5j8JZ2i.js → auth-catchall-DGkjyf0S.js} +1 -1
  55. package/dist/client/assets/{auth-entry-vEuwDBaG.js → auth-entry-BiaDm9wg.js} +1 -1
  56. package/dist/client/assets/{auth-split-layout-7RhHRQQd.js → auth-split-layout-D-4Ir9zY.js} +1 -1
  57. package/dist/client/assets/{authenticate-and-persist-oauth-DoL91dD4.js → authenticate-and-persist-oauth-16Fj4T-3.js} +1 -1
  58. package/dist/client/assets/{automation-list-row-B0FfP8-p.js → automation-list-row-D7k-SvdL.js} +1 -1
  59. package/dist/client/assets/{automation-runs-B4eyGHgR.js → automation-runs-DZSZrBgO.js} +1 -1
  60. package/dist/client/assets/{automations-j-e_r4yw.js → automations-DLmhSESI.js} +1 -1
  61. package/dist/client/assets/{avatar-DuWgXO2d.js → avatar-Cgb26I3A.js} +1 -1
  62. package/dist/client/assets/{badge-DCswZD8z.js → badge-BMi6FGd1.js} +1 -1
  63. package/dist/client/assets/{block-document-Blt_HhA_.js → block-document-B5vuLuoX.js} +1 -1
  64. package/dist/client/assets/{brand-context-C_y6YDag.js → brand-context-CuJPAZAJ.js} +1 -1
  65. package/dist/client/assets/{buckets-BSrcIS-K.js → buckets-DYv6uyXP.js} +1 -1
  66. package/dist/client/assets/{bulk-category-panel-D1SciAxf.js → bulk-category-panel-DvY3clA-.js} +1 -1
  67. package/dist/client/assets/{calendar-CKyOFwa7.js → calendar-BFT-J2T7.js} +1 -1
  68. package/dist/client/assets/{capability-load-error-CSD9Ftrl.js → capability-load-error-CxVggXjU.js} +1 -1
  69. package/dist/client/assets/{card-DgOITwS1.js → card-ut_qamTv.js} +1 -1
  70. package/dist/client/assets/{category-editor-Cjer3VBt.js → category-editor-B2ML8uYk.js} +1 -1
  71. package/dist/client/assets/{chat-context-CkPi7zTy.js → chat-context-B_pnkWsG.js} +1 -1
  72. package/dist/client/assets/{checkbox-Bn2J7_lo.js → checkbox-CBBOqIoB.js} +1 -1
  73. package/dist/client/assets/{cli-auth-success-BiIJULdC.js → cli-auth-success-UquzMnHE.js} +1 -1
  74. package/dist/client/assets/{collection-detail-DpLj0ria.js → collection-detail-DzuAZKEu.js} +1 -1
  75. package/dist/client/assets/{collection-display-button-Pw9Wq9GY.js → collection-display-button-DhNKItsn.js} +1 -1
  76. package/dist/client/assets/{collection-search-Dbp_s2rT.js → collection-search-qVe38UVc.js} +1 -1
  77. package/dist/client/assets/{collection-table-wrapper-B3KBRGuW.js → collection-table-wrapper-Cc5wg79d.js} +1 -1
  78. package/dist/client/assets/{collection-tabs-DyS9THDh.js → collection-tabs-CO_Z57e-.js} +1 -1
  79. package/dist/client/assets/{command-COR4b3Ok.js → command-BFKFndvQ.js} +1 -1
  80. package/dist/client/assets/{commerce-onboarding-CJp0GJFq.js → commerce-onboarding-CJ0Eo9wt.js} +1 -1
  81. package/dist/client/assets/{companions-core-CbscgT8F.js → companions-core-DQaGhQZH.js} +1 -1
  82. package/dist/client/assets/{connect-BzkupHea.js → connect-B9BwcTSW.js} +1 -1
  83. package/dist/client/assets/{connection-BbotHSq-.js → connection-B3MLIIMQ.js} +1 -1
  84. package/dist/client/assets/{connection-card-CY6q6SPA.js → connection-card-C_32fnlN.js} +1 -1
  85. package/dist/client/assets/{connection-detail-DUGUSlQl.js → connection-detail-B7riQ94Z.js} +1 -1
  86. package/dist/client/assets/{connection-form-helpers-D8He2dB4.js → connection-form-helpers-CzPwKhlc.js} +1 -1
  87. package/dist/client/assets/{connections-BS7Y7wAN.js → connections-CT3Ilxg-.js} +1 -1
  88. package/dist/client/assets/{decopilot-sse-pool-DqLF5KUp.js → decopilot-sse-pool-DozV0dgv.js} +1 -1
  89. package/dist/client/assets/{dialog-BMWa5rTO.js → dialog-BKryi1Gv.js} +1 -1
  90. package/dist/client/assets/{domain-settings-BX_6HL16.js → domain-settings-RkudSB_r.js} +1 -1
  91. package/dist/client/assets/{drawer-B4EWz4bj.js → drawer-DRIZTKxe.js} +1 -1
  92. package/dist/client/assets/{dropdown-menu-CyBHXtJg.js → dropdown-menu-Z3F508Pt.js} +1 -1
  93. package/dist/client/assets/{empty-state-CLZE4W-w.js → empty-state-De4WLx8K.js} +1 -1
  94. package/dist/client/assets/{extract-connection-data-BdaYeDtS.js → extract-connection-data-CfQBYCiT.js} +1 -1
  95. package/dist/client/assets/{file-explorer-BirEDyQ4.js → file-explorer-G_mopUBW.js} +1 -1
  96. package/dist/client/assets/{form-DVxBP9Wb.js → form-CMsbq5pT.js} +1 -1
  97. package/dist/client/assets/{general-5bXXZayi.js → general-zFNkp2vY.js} +1 -1
  98. package/dist/client/assets/{github-repo-picker-BH5z2Hfp.js → github-repo-picker-BvlXxc5q.js} +1 -1
  99. package/dist/client/assets/{hooks-j34to70s.js → hooks-AJz1twZI.js} +1 -1
  100. package/dist/client/assets/{index-DecHQWhP.js → index-CAYTpxdT.js} +1 -1
  101. package/dist/client/assets/{index-CfEdc2K9.js → index-CK9dTs50.js} +3 -3
  102. package/dist/client/assets/{index-Hb7KD57V.js → index-CM5nxyCq.js} +3 -3
  103. package/dist/client/assets/{index-BqOcts6O.js → index-CeXBD3Ae.js} +5 -5
  104. package/dist/client/assets/{index-B4md6a64.js → index-Cj0udvFL.js} +1 -1
  105. package/dist/client/assets/{index-B3y0wiwd.js → index-D0EhOEAV.js} +1 -1
  106. package/dist/client/assets/{index-B_TpQwqY.js → index-DDGo9FBS.js} +1 -1
  107. package/dist/client/assets/{index-CmKxNNDw.js → index-DNc-8KH6.js} +1 -1
  108. package/dist/client/assets/{index-Bx_L6F1q.js → index-DZxjR5Rp.js} +1 -1
  109. package/dist/client/assets/{index-B7WRGid-.js → index-WU4RFSaG.js} +1 -1
  110. package/dist/client/assets/{index-DPCVDS3N.js → index-fdiH5RVL.js} +1 -1
  111. package/dist/client/assets/{index-redirect-xyg3oVCG.js → index-redirect-BH8ZV798.js} +1 -1
  112. package/dist/client/assets/{input-CTXfxbM4.js → input-B-oVQhen.js} +1 -1
  113. package/dist/client/assets/{integration-icon-Bu-QBCtu.js → integration-icon-BgcQga1i.js} +1 -1
  114. package/dist/client/assets/{invite-member-dialog-C0arNNNB.js → invite-member-dialog-ClDJ-5Du.js} +1 -1
  115. package/dist/client/assets/{label-C1mRnRJ3.js → label-sNcttRFS.js} +1 -1
  116. package/dist/client/assets/{layout-5NvFTc8b.js → layout-DRYw_34U.js} +1 -1
  117. package/dist/client/assets/{login-BrSgTV9U.js → login-CJHDh33o.js} +1 -1
  118. package/dist/client/assets/{mcp-oauth-DyETxrIW.js → mcp-oauth-DSryML_r.js} +1 -1
  119. package/dist/client/assets/{members-ZU4PO9Ga.js → members-Q3lGK4Yx.js} +1 -1
  120. package/dist/client/assets/{monaco-editor-BTROi4MJ.js → monaco-editor-BzMZhm2c.js} +1 -1
  121. package/dist/client/assets/{monitoring-stats-row-Bu5_xN6l.js → monitoring-stats-row-BnxkYasq.js} +1 -1
  122. package/dist/client/assets/{multi-select-CJIus-RO.js → multi-select-6QCuywvz.js} +1 -1
  123. package/dist/client/assets/{oauth-callback-D1dTY1Jl.js → oauth-callback-BCCL-CB-.js} +1 -1
  124. package/dist/client/assets/{oauth-callback-ai-provider-CXtnyoBA.js → oauth-callback-ai-provider-Cq8rhqbH.js} +1 -1
  125. package/dist/client/assets/{onboarding-BmMZeTuY.js → onboarding-DTWbGtDR.js} +1 -1
  126. package/dist/client/assets/{org-install-DPDIAENz.js → org-install-DqHg1oHg.js} +1 -1
  127. package/dist/client/assets/{org-layout-imAmd3f5.js → org-layout-DyoEen-P.js} +1 -1
  128. package/dist/client/assets/{organization-choice-5CEaBIYY.js → organization-choice-BDwu27K3.js} +1 -1
  129. package/dist/client/assets/{orgs-ClnVcy9U.js → orgs-CsQjpTj0.js} +1 -1
  130. package/dist/client/assets/{page-seo-form-Bur3ZT6l.js → page-seo-form-pLcf9jhZ.js} +1 -1
  131. package/dist/client/assets/{popover-BgU8baQn.js → popover-DDLGHIAH.js} +1 -1
  132. package/dist/client/assets/{post-editor-BkShHWlS.js → post-editor-CQmTh8Mo.js} +1 -1
  133. package/dist/client/assets/{primitives-CYkjWrYh.js → primitives-KbNW-TAn.js} +1 -1
  134. package/dist/client/assets/{profile-BahkGeoL.js → profile-BQDJTUCk.js} +1 -1
  135. package/dist/client/assets/project-app-view-B4JwGSmp.js +1 -0
  136. package/dist/client/assets/record-editor-BRAP8tpY.js +1 -0
  137. package/dist/client/assets/{redirect-editor-ChcVEdtu.js → redirect-editor-CDSkg4S-.js} +1 -1
  138. package/dist/client/assets/registry-IYlJDqzq.js +2 -0
  139. package/dist/client/assets/{registry-layout-DSduhBMj.js → registry-layout-BL8NB9ez.js} +1 -1
  140. package/dist/client/assets/{reports-BukRm1V7.js → reports-D8sg-B6o.js} +1 -1
  141. package/dist/client/assets/{require-capability-knNjn5gr.js → require-capability-CRpOItK8.js} +1 -1
  142. package/dist/client/assets/{required-auth-layout-wDRoa7JN.js → required-auth-layout-DR9K6ZF2.js} +1 -1
  143. package/dist/client/assets/{reset-password-Ubr6K3F9.js → reset-password-BsELIycm.js} +1 -1
  144. package/dist/client/assets/{roles-CJIZ7BQp.js → roles-gI2vaN1B.js} +1 -1
  145. package/dist/client/assets/{search-input-dQaNiafw.js → search-input-j3oIEFDR.js} +1 -1
  146. package/dist/client/assets/{secrets-BmOjpzSb.js → secrets-CvlRBFxe.js} +1 -1
  147. package/dist/client/assets/{sections-editor-CqQl4SYu.js → sections-editor-DUQM4z8z.js} +1 -1
  148. package/dist/client/assets/{select-k2EeHO9l.js → select-g7-dckNX.js} +1 -1
  149. package/dist/client/assets/{select-model-1Siilv7M.js → select-model-Ct5WCiKH.js} +1 -1
  150. package/dist/client/assets/{self-tool-result-CFrLzPMx.js → self-tool-result-DPtoB-Pj.js} +1 -1
  151. package/dist/client/assets/{seo-editor-DmpAP3rF.js → seo-editor-mQwLTBr_.js} +1 -1
  152. package/dist/client/assets/{settings-layout-BOrEv_K_.js → settings-layout-Bz9ypw_0.js} +1 -1
  153. package/dist/client/assets/{settings-section-DrUUe23v.js → settings-section-8k2hkLUQ.js} +1 -1
  154. package/dist/client/assets/{shell-controls-z87A-WDI.js → shell-controls-DpzGdII2.js} +1 -1
  155. package/dist/client/assets/{shell-layout-CBfdsiBY.js → shell-layout-CROKbses.js} +1 -1
  156. package/dist/client/assets/{sidebar-DXP1l81i.js → sidebar-DRkpnDNd.js} +1 -1
  157. package/dist/client/assets/{skeleton--WT5DZhr.js → skeleton-D7Jsm-Z7.js} +1 -1
  158. package/dist/client/assets/{sso-CE1MifOL.js → sso-BHPt8vOm.js} +1 -1
  159. package/dist/client/assets/{store-DOU3Ki6I.js → store-Cnjhl7tl.js} +1 -1
  160. package/dist/client/assets/store-registry-CBUCQmTZ.js +2 -0
  161. package/dist/client/assets/{studio-tools-Bo-8iGXW.js → studio-tools-C6MLyLhl.js} +1 -1
  162. package/dist/client/assets/{switch-DzZhqTYc.js → switch-CmQ0ji_s.js} +1 -1
  163. package/dist/client/assets/{tab-id-C1oIXjgX.js → tab-id-AAOMTjhD.js} +1 -1
  164. package/dist/client/assets/{table-BPfoRdss.js → table-D-RwY4NV.js} +1 -1
  165. package/dist/client/assets/{tabs-BhOuYjMR.js → tabs-ClTe2brv.js} +1 -1
  166. package/dist/client/assets/{textarea-CT44PbY8.js → textarea-CraN7iOf.js} +1 -1
  167. package/dist/client/assets/{toggle-group-DmO2BQmB.js → toggle-group-DljLSyK4.js} +1 -1
  168. package/dist/client/assets/{toolbar-CbFuW7wJ.js → toolbar-6McR9lj6.js} +1 -1
  169. package/dist/client/assets/{tooltip-BDLpwump.js → tooltip-CtPzwh4j.js} +1 -1
  170. package/dist/client/assets/{use-ai-providers-BRUIZyhQ.js → use-ai-providers-h4pn1-8s.js} +1 -1
  171. package/dist/client/assets/{use-automations-BJ_SHcgD.js → use-automations-DZG4ioM-.js} +1 -1
  172. package/dist/client/assets/{use-autosave-ClVxq8UI.js → use-autosave-DQBZiQNe.js} +1 -1
  173. package/dist/client/assets/{use-capability-BwUQZtZP.js → use-capability-ChUZ90ce.js} +1 -1
  174. package/dist/client/assets/{use-clock-tick-DKmTQcf_.js → use-clock-tick-CNVSG9EN.js} +1 -1
  175. package/dist/client/assets/{use-connection-BBaBgk6-.js → use-connection-D-JUM2l3.js} +1 -1
  176. package/dist/client/assets/{use-copy-CCRgk0iO.js → use-copy-DsFYv5Pu.js} +1 -1
  177. package/dist/client/assets/{use-create-virtual-mcp-CzjN66FV.js → use-create-virtual-mcp-C8QuX0sl.js} +1 -1
  178. package/dist/client/assets/{use-debounced-autosave-C2KDvdz1.js → use-debounced-autosave-CJVLhzok.js} +1 -1
  179. package/dist/client/assets/{use-debounced-value-hZzJokVa.js → use-debounced-value-B_KTqZOo.js} +1 -1
  180. package/dist/client/assets/{use-deco-credits-C75iZS7o.js → use-deco-credits-DCoqVGW1.js} +1 -1
  181. package/dist/client/assets/{use-decopilot-events-DQvGjZAU.js → use-decopilot-events-Bw52NX1D.js} +1 -1
  182. package/dist/client/assets/{use-delete-connection-BMZNhl0G.js → use-delete-connection-DMIXAye0.js} +1 -1
  183. package/dist/client/assets/{use-deployment-admin-BF04YULq.js → use-deployment-admin-DAbo2DTN.js} +1 -1
  184. package/dist/client/assets/{use-file-configs-N1vcjn4C.js → use-file-configs-fIe1Hv94.js} +1 -1
  185. package/dist/client/assets/{use-infinite-scroll-C5PxetSF.js → use-infinite-scroll-BWUU11Ox.js} +1 -1
  186. package/dist/client/assets/{use-join-requests-CjqTSHvi.js → use-join-requests-CJ1xRL_4.js} +1 -1
  187. package/dist/client/assets/{use-mcp-auth-status-CKTql3de.js → use-mcp-auth-status-BLdcl1Y9.js} +1 -1
  188. package/dist/client/assets/{use-mcp-client-SY0_edaG.js → use-mcp-client-DEtAGrl9.js} +1 -1
  189. package/dist/client/assets/{use-mcp-tools-dQrkPOmS.js → use-mcp-tools-tSDfN3aX.js} +1 -1
  190. package/dist/client/assets/{use-members-DeoSpBXO.js → use-members-CponNw45.js} +1 -1
  191. package/dist/client/assets/{use-mobile-BnhD7n0A.js → use-mobile-CAAF3NBH.js} +1 -1
  192. package/dist/client/assets/{use-navigate-to-agent-BLq3x7D4.js → use-navigate-to-agent-BpH5ied4.js} +1 -1
  193. package/dist/client/assets/{use-org-auth-client-Dez-dJ8K.js → use-org-auth-client-BWMIJg-Q.js} +1 -1
  194. package/dist/client/assets/{use-org-sso-I7jFf7PP.js → use-org-sso-BhTeYUMo.js} +1 -1
  195. package/dist/client/assets/{use-organization-roles-BzL4HZvR.js → use-organization-roles-CFUTu5PY.js} +1 -1
  196. package/dist/client/assets/{use-organization-settings-D2pwdgz-.js → use-organization-settings-DKNZzQHt.js} +1 -1
  197. package/dist/client/assets/{use-registry-connections-8em2016P.js → use-registry-connections-B1P8Kf3F.js} +1 -1
  198. package/dist/client/assets/{use-secrets-27w4K8f1.js → use-secrets-i0GcGZRR.js} +1 -1
  199. package/dist/client/assets/{use-status-sounds-BYg36g38.js → use-status-sounds-CD6r8HYv.js} +1 -1
  200. package/dist/client/assets/{use-tags-K48onVzI.js → use-tags-CvpGvXcQ.js} +1 -1
  201. package/dist/client/assets/{use-view-mode-vPAnPoPr.js → use-view-mode-DiHKAlTr.js} +1 -1
  202. package/dist/client/assets/{use-virtual-mcp-D1SxHXZE.js → use-virtual-mcp-DWQPxF97.js} +1 -1
  203. package/dist/client/assets/useInfiniteQuery-kBPblTzN.js +1 -0
  204. package/dist/client/assets/{useQueries-DjdTHmR7.js → useQueries-Cmh6hQYD.js} +1 -1
  205. package/dist/client/assets/{useRouterState-Dd7bf_BD.js → useRouterState-Fz5oiibO.js} +1 -1
  206. package/dist/client/assets/useSuspenseInfiniteQuery-0hnn4a1n.js +1 -0
  207. package/dist/client/assets/{users-BYzT4v7J.js → users-D0hPM7Bt.js} +1 -1
  208. package/dist/client/assets/{variant-calendar-regFe_N7.js → variant-calendar-G64qDfdU.js} +1 -1
  209. package/dist/client/assets/{view-mode-toggle-BE_V1GTO.js → view-mode-toggle-Bfnec4Mr.js} +1 -1
  210. package/dist/client/index.html +1 -1
  211. package/dist/server/cli.js +1 -1
  212. package/dist/server/server.js +1 -1
  213. package/package.json +1 -1
  214. package/dist/client/assets/project-app-view-D61UiuD_.js +0 -1
  215. package/dist/client/assets/record-editor-DlKesoxU.js +0 -1
  216. package/dist/client/assets/registry-eO_-yHjy.js +0 -2
  217. package/dist/client/assets/store-registry-Bex3muZs.js +0 -2
  218. package/dist/client/assets/useInfiniteQuery-CyLf_P7s.js +0 -1
  219. package/dist/client/assets/useSuspenseInfiniteQuery-DK-BqDXT.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as H,j as s,b as se,r as V,B as le,m as ie,af as yt,X as Ye,Y as ye,F as ve,o as _e,Z as Qe,_ as Je,e as ke,K as ce,t as oe,p as ne,D as jt,n as St,d as Nt,E as kt,z as Ct}from"./index-CfEdc2K9.js";import{e as Me,d as Ee,a as Ze,b as Oe,h as et,c as tt,D as wt}from"./dialog-BMWa5rTO.js";import{d as It,b as _t,a as Mt,D as Et}from"./drawer-B4EWz4bj.js";import{u as Ot}from"./use-mobile-BnhD7n0A.js";import{c as st,S as Ie,F as Lt,u as Le}from"./chat-context-CkPi7zTy.js";import{C as Tt}from"./checkbox-Bn2J7_lo.js";import{I as pe}from"./input-CTXfxbM4.js";import{S as At,a as Pt,b as zt,c as Dt,d as Rt}from"./select-k2EeHO9l.js";import{S as te}from"./skeleton--WT5DZhr.js";import{i as it,b as lt,c as Ft,a as Kt,s as $t}from"./Settings02-ChUOGGl4.js";import{d as Ut,a as Bt,b as Wt,i as Vt}from"./Tool01-CJqzdgTl.js";import{i as Ht}from"./Key01-BGAAxzW1.js";import{i as nt}from"./SearchMd-CyOcTz8D.js";import{d as Te,u as qt,b as Gt}from"./use-ai-providers-BRUIZyhQ.js";import{g as Ae}from"./ai-providers-logos-DD3qZ33J.js";import{i as Xt}from"./Monitor01-BPH64z9I.js";import{i as Yt}from"./AlertCircle-C0so9_2m.js";import{u as we}from"./studio-tools-Bo-8iGXW.js";import{i as Qt}from"./ChevronRight-BFNnjWyJ.js";import{A as Jt}from"./avatar-DuWgXO2d.js";import{S as De,a as Re,b as ot}from"./settings-section-DrUUe23v.js";import{s as rt}from"./Eye-BTH5usrJ.js";import{i as Zt}from"./Check-Bo8E9P21.js";import{a as es}from"./Copy01-2mNuGDMv.js";import{t as Fe}from"./ChevronDown-LhncEFP2.js";import{t as ts}from"./Stars01-0Ay4O1GU.js";function xe(l){const e=H.c(3),{size:t}=l,i=t===void 0?16:t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=n):n=e[0];let o;return e[1]!==i?(o=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:i,height:i,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n}),e[1]=i,e[2]=o):o=e[2],o}function ge(l){const e=H.c(3),{size:t}=l,i=t===void 0?16:t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=n):n=e[0];let o;return e[1]!==i?(o=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:i,height:i,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:n}),e[1]=i,e[2]=o):o=e[2],o}const ss={"claude-code":{labelKey:"chat.agentIcons.claudeCode",Icon:xe},codex:{labelKey:"chat.agentIcons.codex",Icon:ge}};function Zi(l){return(l&&ss[l])??null}const Ke="bunx decocms@latest link",is=[{capability:"claude-code",labelKey:"chat.connectDesktopDialog.agentClaudeCodeLabel",descriptionKey:"chat.connectDesktopDialog.agentClaudeCodeDescription",icon:s.jsx(xe,{size:18})},{capability:"codex",labelKey:"chat.connectDesktopDialog.agentCodexLabel",descriptionKey:"chat.connectDesktopDialog.agentCodexDescription",icon:s.jsx(ge,{size:18})}];function ls(l){const e=H.c(46),{open:t,onOpenChange:i}=l,n=se();let o;e[0]!==t?(o={fast:t},e[0]=t,e[1]=o):o=e[1];const r=st(o),[c,u]=V.useState(!1);let d,a,h,p,m,f,v,N;if(e[2]!==r.hostname||e[3]!==r.machineId||e[4]!==r.online||e[5]!==i||e[6]!==t||e[7]!==n){const C=r.hostname??r.machineId??n("chat.connectDesktopDialog.yourDesktop");p=Me,v=t,N=i,h=Ee,f="sm:max-w-md",a=Ze,d=Oe,m=r.online?n("chat.connectDesktopDialog.connectedTo",{desktopName:C}):n("chat.connectDesktopDialog.connectYourDesktop"),e[2]=r.hostname,e[3]=r.machineId,e[4]=r.online,e[5]=i,e[6]=t,e[7]=n,e[8]=d,e[9]=a,e[10]=h,e[11]=p,e[12]=m,e[13]=f,e[14]=v,e[15]=N}else d=e[8],a=e[9],h=e[10],p=e[11],m=e[12],f=e[13],v=e[14],N=e[15];let b;e[16]!==d||e[17]!==m?(b=s.jsx(d,{children:m}),e[16]=d,e[17]=m,e[18]=b):b=e[18];let j;e[19]!==r.online||e[20]!==n?(j=r.online?n("chat.connectDesktopDialog.machineAgentsDescription"):n("chat.connectDesktopDialog.runCommandDescription"),e[19]=r.online,e[20]=n,e[21]=j):j=e[21];let w;e[22]!==j?(w=s.jsx(et,{children:j}),e[22]=j,e[23]=w):w=e[23];let O;e[24]!==a||e[25]!==b||e[26]!==w?(O=s.jsxs(a,{children:[b,w]}),e[24]=a,e[25]=b,e[26]=w,e[27]=O):O=e[27];let _;e[28]!==c||e[29]!==r.online?(_=!r.online&&s.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[s.jsx("span",{className:"flex-1",children:Ke}),s.jsx(le,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(Ke).then(()=>{u(!0),setTimeout(()=>u(!1),1500)})},children:c?s.jsx(Zt,{size:14}):s.jsx(es,{size:14})})]}),e[28]=c,e[29]=r.online,e[30]=_):_=e[30];let I;e[31]!==r.capabilities||e[32]!==r.online||e[33]!==n?(I=r.online?s.jsx("div",{className:"flex flex-col gap-3 text-sm",children:s.jsx("div",{className:"flex flex-col gap-2",children:is.map(C=>{const M=r.capabilities.includes(C.capability);return s.jsxs("div",{className:ie("flex items-center gap-3 rounded-md border px-3 py-2",M?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[s.jsx("div",{className:ie("flex size-6 items-center justify-center",M?"text-foreground":"text-muted-foreground"),children:C.icon}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-medium",children:n(C.labelKey)}),s.jsx("p",{className:"text-xs text-muted-foreground",children:n(M?C.descriptionKey:"chat.connectDesktopDialog.notDetected")})]}),s.jsx("span",{className:ie("size-2 rounded-full",M?"bg-success":"bg-muted-foreground/30")})]},C.capability)})})}):s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Ie,{size:"sm"}),n("chat.connectDesktopDialog.waitingForDesktop")]}),e[31]=r.capabilities,e[32]=r.online,e[33]=n,e[34]=I):I=e[34];let x;e[35]!==h||e[36]!==_||e[37]!==I||e[38]!==f||e[39]!==O?(x=s.jsxs(h,{className:f,children:[O,_,I]}),e[35]=h,e[36]=_,e[37]=I,e[38]=f,e[39]=O,e[40]=x):x=e[40];let k;return e[41]!==p||e[42]!==x||e[43]!==v||e[44]!==N?(k=s.jsx(p,{open:v,onOpenChange:N,children:x}),e[41]=p,e[42]=x,e[43]=v,e[44]=N,e[45]=k):k=e[45],k}function fe(l,e,t){let i=t.initialDeps??[],n,o=!0;function r(){var c,u,d;let a;t.key&&((c=t.debug)!=null&&c.call(t))&&(a=Date.now());const h=l();if(!(h.length!==i.length||h.some((f,v)=>i[v]!==f)))return n;i=h;let m;if(t.key&&((u=t.debug)!=null&&u.call(t))&&(m=Date.now()),n=e(...h),t.key&&((d=t.debug)!=null&&d.call(t))){const f=Math.round((Date.now()-a)*100)/100,v=Math.round((Date.now()-m)*100)/100,N=v/16,b=(j,w)=>{for(j=String(j);j.length<w;)j=" "+j;return j};console.info(`%c⏱ ${b(v,5)} /${b(f,5)} ms`,`
1
+ import{c as H,j as s,b as se,r as V,B as le,m as ie,af as yt,X as Ye,Y as ye,F as ve,o as _e,Z as Qe,_ as Je,e as ke,K as ce,t as oe,p as ne,D as jt,n as St,d as Nt,E as kt,z as Ct}from"./index-CK9dTs50.js";import{e as Me,d as Ee,a as Ze,b as Oe,h as et,c as tt,D as wt}from"./dialog-BKryi1Gv.js";import{d as It,b as _t,a as Mt,D as Et}from"./drawer-DRIZTKxe.js";import{u as Ot}from"./use-mobile-CAAF3NBH.js";import{c as st,S as Ie,F as Lt,u as Le}from"./chat-context-B_pnkWsG.js";import{C as Tt}from"./checkbox-CBBOqIoB.js";import{I as pe}from"./input-B-oVQhen.js";import{S as At,a as Pt,b as zt,c as Dt,d as Rt}from"./select-g7-dckNX.js";import{S as te}from"./skeleton-D7Jsm-Z7.js";import{i as it,b as lt,c as Ft,a as Kt,s as $t}from"./Settings02-B1WEimn4.js";import{d as Ut,a as Bt,b as Wt,i as Vt}from"./Tool01-C3L4IY43.js";import{i as Ht}from"./Key01-BDQ-B_fA.js";import{i as nt}from"./SearchMd-CTAk6WXU.js";import{d as Te,u as qt,b as Gt}from"./use-ai-providers-h4pn1-8s.js";import{g as Ae}from"./ai-providers-logos-DD3qZ33J.js";import{i as Xt}from"./Monitor01-Dqy0f1bW.js";import{i as Yt}from"./AlertCircle-038IKv3A.js";import{u as we}from"./studio-tools-C6MLyLhl.js";import{i as Qt}from"./ChevronRight-CtHjdGD9.js";import{A as Jt}from"./avatar-Cgb26I3A.js";import{S as De,a as Re,b as ot}from"./settings-section-8k2hkLUQ.js";import{s as rt}from"./Eye-DOt_iBKe.js";import{i as Zt}from"./Check-Dj1oqMe7.js";import{a as es}from"./Copy01-B0suaC4H.js";import{t as Fe}from"./ChevronDown-PtoGo_nJ.js";import{t as ts}from"./Stars01-Bt_qsRaS.js";function xe(l){const e=H.c(3),{size:t}=l,i=t===void 0?16:t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=n):n=e[0];let o;return e[1]!==i?(o=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:i,height:i,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n}),e[1]=i,e[2]=o):o=e[2],o}function ge(l){const e=H.c(3),{size:t}=l,i=t===void 0?16:t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=n):n=e[0];let o;return e[1]!==i?(o=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:i,height:i,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:n}),e[1]=i,e[2]=o):o=e[2],o}const ss={"claude-code":{labelKey:"chat.agentIcons.claudeCode",Icon:xe},codex:{labelKey:"chat.agentIcons.codex",Icon:ge}};function Zi(l){return(l&&ss[l])??null}const Ke="bunx decocms@latest link",is=[{capability:"claude-code",labelKey:"chat.connectDesktopDialog.agentClaudeCodeLabel",descriptionKey:"chat.connectDesktopDialog.agentClaudeCodeDescription",icon:s.jsx(xe,{size:18})},{capability:"codex",labelKey:"chat.connectDesktopDialog.agentCodexLabel",descriptionKey:"chat.connectDesktopDialog.agentCodexDescription",icon:s.jsx(ge,{size:18})}];function ls(l){const e=H.c(46),{open:t,onOpenChange:i}=l,n=se();let o;e[0]!==t?(o={fast:t},e[0]=t,e[1]=o):o=e[1];const r=st(o),[c,u]=V.useState(!1);let d,a,h,p,m,f,v,N;if(e[2]!==r.hostname||e[3]!==r.machineId||e[4]!==r.online||e[5]!==i||e[6]!==t||e[7]!==n){const C=r.hostname??r.machineId??n("chat.connectDesktopDialog.yourDesktop");p=Me,v=t,N=i,h=Ee,f="sm:max-w-md",a=Ze,d=Oe,m=r.online?n("chat.connectDesktopDialog.connectedTo",{desktopName:C}):n("chat.connectDesktopDialog.connectYourDesktop"),e[2]=r.hostname,e[3]=r.machineId,e[4]=r.online,e[5]=i,e[6]=t,e[7]=n,e[8]=d,e[9]=a,e[10]=h,e[11]=p,e[12]=m,e[13]=f,e[14]=v,e[15]=N}else d=e[8],a=e[9],h=e[10],p=e[11],m=e[12],f=e[13],v=e[14],N=e[15];let b;e[16]!==d||e[17]!==m?(b=s.jsx(d,{children:m}),e[16]=d,e[17]=m,e[18]=b):b=e[18];let j;e[19]!==r.online||e[20]!==n?(j=r.online?n("chat.connectDesktopDialog.machineAgentsDescription"):n("chat.connectDesktopDialog.runCommandDescription"),e[19]=r.online,e[20]=n,e[21]=j):j=e[21];let w;e[22]!==j?(w=s.jsx(et,{children:j}),e[22]=j,e[23]=w):w=e[23];let O;e[24]!==a||e[25]!==b||e[26]!==w?(O=s.jsxs(a,{children:[b,w]}),e[24]=a,e[25]=b,e[26]=w,e[27]=O):O=e[27];let _;e[28]!==c||e[29]!==r.online?(_=!r.online&&s.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[s.jsx("span",{className:"flex-1",children:Ke}),s.jsx(le,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(Ke).then(()=>{u(!0),setTimeout(()=>u(!1),1500)})},children:c?s.jsx(Zt,{size:14}):s.jsx(es,{size:14})})]}),e[28]=c,e[29]=r.online,e[30]=_):_=e[30];let I;e[31]!==r.capabilities||e[32]!==r.online||e[33]!==n?(I=r.online?s.jsx("div",{className:"flex flex-col gap-3 text-sm",children:s.jsx("div",{className:"flex flex-col gap-2",children:is.map(C=>{const M=r.capabilities.includes(C.capability);return s.jsxs("div",{className:ie("flex items-center gap-3 rounded-md border px-3 py-2",M?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[s.jsx("div",{className:ie("flex size-6 items-center justify-center",M?"text-foreground":"text-muted-foreground"),children:C.icon}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-medium",children:n(C.labelKey)}),s.jsx("p",{className:"text-xs text-muted-foreground",children:n(M?C.descriptionKey:"chat.connectDesktopDialog.notDetected")})]}),s.jsx("span",{className:ie("size-2 rounded-full",M?"bg-success":"bg-muted-foreground/30")})]},C.capability)})})}):s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Ie,{size:"sm"}),n("chat.connectDesktopDialog.waitingForDesktop")]}),e[31]=r.capabilities,e[32]=r.online,e[33]=n,e[34]=I):I=e[34];let x;e[35]!==h||e[36]!==_||e[37]!==I||e[38]!==f||e[39]!==O?(x=s.jsxs(h,{className:f,children:[O,_,I]}),e[35]=h,e[36]=_,e[37]=I,e[38]=f,e[39]=O,e[40]=x):x=e[40];let k;return e[41]!==p||e[42]!==x||e[43]!==v||e[44]!==N?(k=s.jsx(p,{open:v,onOpenChange:N,children:x}),e[41]=p,e[42]=x,e[43]=v,e[44]=N,e[45]=k):k=e[45],k}function fe(l,e,t){let i=t.initialDeps??[],n,o=!0;function r(){var c,u,d;let a;t.key&&((c=t.debug)!=null&&c.call(t))&&(a=Date.now());const h=l();if(!(h.length!==i.length||h.some((f,v)=>i[v]!==f)))return n;i=h;let m;if(t.key&&((u=t.debug)!=null&&u.call(t))&&(m=Date.now()),n=e(...h),t.key&&((d=t.debug)!=null&&d.call(t))){const f=Math.round((Date.now()-a)*100)/100,v=Math.round((Date.now()-m)*100)/100,N=v/16,b=(j,w)=>{for(j=String(j);j.length<w;)j=" "+j;return j};console.info(`%c⏱ ${b(v,5)} /${b(f,5)} ms`,`
2
2
  font-size: .6rem;
3
3
  font-weight: bold;
4
4
  color: hsl(${Math.max(0,Math.min(120-120*N,120))}deg 100% 31%);`,t?.key)}return t?.onChange&&!(o&&t.skipInitialOnChange)&&t.onChange(n),o=!1,n}return r.updateDeps=c=>{i=c},r}function $e(l,e){if(l===void 0)throw new Error("Unexpected undefined");return l}const ns=(l,e)=>Math.abs(l-e)<1.01,os=(l,e,t)=>{let i;return function(...n){l.clearTimeout(i),i=l.setTimeout(()=>e.apply(this,n),t)}},Ue=l=>{const{offsetWidth:e,offsetHeight:t}=l;return{width:e,height:t}},rs=l=>l,as=l=>{const e=Math.max(l.startIndex-l.overscan,0),t=Math.min(l.endIndex+l.overscan,l.count-1),i=[];for(let n=e;n<=t;n++)i.push(n);return i},cs=(l,e)=>{const t=l.scrollElement;if(!t)return;const i=l.targetWindow;if(!i)return;const n=r=>{const{width:c,height:u}=r;e({width:Math.round(c),height:Math.round(u)})};if(n(Ue(t)),!i.ResizeObserver)return()=>{};const o=new i.ResizeObserver(r=>{const c=()=>{const u=r[0];if(u?.borderBoxSize){const d=u.borderBoxSize[0];if(d){n({width:d.inlineSize,height:d.blockSize});return}}n(Ue(t))};l.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return o.observe(t,{box:"border-box"}),()=>{o.unobserve(t)}},Be={passive:!0},We=typeof window>"u"?!0:"onscrollend"in window,ds=(l,e)=>{const t=l.scrollElement;if(!t)return;const i=l.targetWindow;if(!i)return;let n=0;const o=l.options.useScrollendEvent&&We?()=>{}:os(i,()=>{e(n,!1)},l.options.isScrollingResetDelay),r=a=>()=>{const{horizontal:h,isRtl:p}=l.options;n=h?t.scrollLeft*(p&&-1||1):t.scrollTop,o(),e(n,a)},c=r(!0),u=r(!1);t.addEventListener("scroll",c,Be);const d=l.options.useScrollendEvent&&We;return d&&t.addEventListener("scrollend",u,Be),()=>{t.removeEventListener("scroll",c),d&&t.removeEventListener("scrollend",u)}},us=(l,e,t)=>{if(e?.borderBoxSize){const i=e.borderBoxSize[0];if(i)return Math.round(i[t.options.horizontal?"inlineSize":"blockSize"])}return l[t.options.horizontal?"offsetWidth":"offsetHeight"]},ms=(l,{adjustments:e=0,behavior:t},i)=>{var n,o;const r=l+e;(o=(n=i.scrollElement)==null?void 0:n.scrollTo)==null||o.call(n,{[i.options.horizontal?"left":"top"]:r,behavior:t})};class hs{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var t,i,n;return((n=(i=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:i.now)==null?void 0:n.call(i))??Date.now()},this.observer=(()=>{let t=null;const i=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(n=>{n.forEach(o=>{const r=()=>{const c=o.target,u=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(u)&&this.resizeItem(u,this.options.measureElement(c,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var n;(n=i())==null||n.disconnect(),t=null},observe:n=>{var o;return(o=i())==null?void 0:o.observe(n,{box:"border-box"})},unobserve:n=>{var o;return(o=i())==null?void 0:o.unobserve(n)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([i,n])=>{typeof n>"u"&&delete t[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rs,rangeExtractor:as,onChange:()=>{},measureElement:us,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",...t}},this.notify=t=>{var i,n;(n=(i=this.options).onChange)==null||n.call(i,this,t)},this.maybeNotify=fe(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<n?"forward":"backward":null,this.scrollOffset=n,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,i)=>{const n=new Map,o=new Map;for(let r=i-1;r>=0;r--){const c=t[r];if(n.has(c.lane))continue;const u=o.get(c.lane);if(u==null||c.end>u.end?o.set(c.lane,c):c.end<u.end&&n.set(c.lane,!0),n.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,c)=>r.end===c.end?r.index-c.index:r.end-c.end)[0]:void 0},this.getMeasurementOptions=fe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(t,i,n,o,r,c,u)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:i,scrollMargin:n,getItemKey:o,enabled:r,lanes:c,laneAssignmentMode:u}),{key:!1}),this.getMeasurements=fe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:i,scrollMargin:n,getItemKey:o,enabled:r,lanes:c,laneAssignmentMode:u},d)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const m of this.laneAssignments.keys())m>=t&&this.laneAssignments.delete(m);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const a=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,a),p=new Array(c).fill(void 0);for(let m=0;m<a;m++){const f=h[m];f&&(p[f.lane]=m)}for(let m=a;m<t;m++){const f=o(m),v=this.laneAssignments.get(m);let N,b;const j=u==="estimate"||d.has(f);if(v!==void 0&&this.options.lanes>1){N=v;const I=p[N],x=I!==void 0?h[I]:void 0;b=x?x.end+this.options.gap:i+n}else{const I=this.options.lanes===1?h[m-1]:this.getFurthestMeasurement(h,m);b=I?I.end+this.options.gap:i+n,N=I?I.lane:m%this.options.lanes,this.options.lanes>1&&j&&this.laneAssignments.set(m,N)}const w=d.get(f),O=typeof w=="number"?w:this.options.estimateSize(m),_=b+O;h[m]={index:m,start:b,size:O,end:_,key:f,lane:N},p[N]=m}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=fe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,i,n,o)=>this.range=t.length>0&&i>0?fs({measurements:t,outerSize:i,scrollOffset:n,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=fe(()=>{let t=null,i=null;const n=this.calculateRange();return n&&(t=n.startIndex,i=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,i]},(t,i,n,o,r)=>o===null||r===null?[]:t({startIndex:o,endIndex:r,overscan:i,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const i=this.options.indexAttribute,n=t.getAttribute(i);return n?parseInt(n,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var i;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const n=this.scrollState.index??((i=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:i.index);if(n!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,n-o),c=Math.min(this.options.count-1,n+o);return t>=r&&t<=c}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((r,c)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(c))});return}const i=this.indexFromElement(t),n=this.options.getItemKey(i),o=this.elementsCache.get(n);o!==t&&(o&&this.observer.unobserve(o),this.observer.observe(t),this.elementsCache.set(n,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(i)&&this.resizeItem(i,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,i)=>{var n;const o=this.measurementsCache[t];if(!o)return;const r=this.itemSizeCache.get(o.key)??o.size,c=i-r;c!==0&&(((n=this.scrollState)==null?void 0:n.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,c,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,i)),this.notify(!1))},this.getVirtualItems=fe(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,i)=>{const n=[];for(let o=0,r=t.length;o<r;o++){const c=t[o],u=i[c];n.push(u)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const i=this.getMeasurements();if(i.length!==0)return $e(i[at(0,i.length-1,n=>$e(i[n]).start,t)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(t,i,n=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),r=this.getScrollOffset();i==="auto"&&(i=t>=r+o?"end":"start"),i==="center"?t+=(n-o)/2:i==="end"&&(t-=o);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,t),0)},this.getOffsetForIndex=(t,i="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const n=this.getSize(),o=this.getScrollOffset(),r=this.measurementsCache[t];if(!r)return;if(i==="auto")if(r.end>=o+n-this.options.scrollPaddingEnd)i="end";else if(r.start<=o+this.options.scrollPaddingStart)i="start";else return[o,i];if(i==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),i];const c=i==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,i,r.size),i]},this.scrollToOffset=(t,{align:i="start",behavior:n="auto"}={})=>{const o=this.getOffsetForAlignment(t,i),r=this.now();this.scrollState={index:null,align:i,behavior:n,startedAt:r,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:i="auto",behavior:n="auto"}={})=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getOffsetForIndex(t,i);if(!o)return;const[r,c]=o,u=this.now();this.scrollState={index:t,align:c,behavior:n,startedAt:u,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:i="auto"}={})=>{const n=this.getScrollOffset()+t,o=this.now();this.scrollState={index:null,align:"start",behavior:i,startedAt:o,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var t;const i=this.getMeasurements();let n;if(i.length===0)n=this.options.paddingStart;else if(this.options.lanes===1)n=((t=i[i.length-1])==null?void 0:t.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=i.length-1;for(;r>=0&&o.some(c=>c===null);){const c=i[r];o[c.lane]===null&&(o[c.lane]=c.end),r--}n=Math.max(...o.filter(c=>c!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:i,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const i=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,n=i?i[0]:this.scrollState.lastTargetOffset,o=1,r=n!==this.scrollState.lastTargetOffset;if(!r&&ns(n,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,r&&(this.scrollState.lastTargetOffset=n,this.scrollState.behavior="auto",this._scrollToOffset(n,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const at=(l,e,t,i)=>{for(;l<=e;){const n=(l+e)/2|0,o=t(n);if(o<i)l=n+1;else if(o>i)e=n-1;else return n}return l>0?l-1:0};function fs({measurements:l,outerSize:e,scrollOffset:t,lanes:i}){const n=l.length-1,o=u=>l[u].start;if(l.length<=i)return{startIndex:0,endIndex:n};let r=at(0,n,o,t),c=r;if(i===1)for(;c<n&&l[c].end<t+e;)c++;else if(i>1){const u=Array(i).fill(0);for(;c<n&&u.some(a=>a<t+e);){const a=l[c];u[a.lane]=a.end,c++}const d=Array(i).fill(t+e);for(;r>=0&&d.some(a=>a>=t);){const a=l[r];d[a.lane]=a.start,r--}r=Math.max(0,r-r%i),c=Math.min(n,c+(i-1-c%i))}return{startIndex:r,endIndex:c}}const Ve=typeof document<"u"?V.useLayoutEffect:V.useEffect;function ps({useFlushSync:l=!0,...e}){const t=V.useReducer(()=>({}),{})[1],i={...e,onChange:(o,r)=>{var c;l&&r?yt.flushSync(t):t(),(c=e.onChange)==null||c.call(e,o,r)}},[n]=V.useState(()=>new hs(i));return n.setOptions(i),Ve(()=>n._didMount(),[]),Ve(()=>n._willUpdate()),n}function xs(l){return ps({observeElementRect:cs,observeElementOffset:ds,scrollToFn:ms,...l})}const ct=[{id:"openai",name:"OpenAI",description:"GPT-4, GPT-5, and other OpenAI models",logo:"https://decoims.com/decocms/b51001ef-ae58-4db4-8a75-9e6d2df2dd8e/openai.png",baseUrlPlaceholder:"https://api.openai.com/v1",defaultBaseUrl:"https://api.openai.com/v1",apiKeyRecommended:!0,helpText:"Use your OpenAI API key (starts with sk-)."},{id:"litellm",name:"LiteLLM",description:"Connect to a LiteLLM gateway your team manages",logo:"https://decoims.com/decocms/e974ae05-ad64-4b4a-8444-d9705f019b85/litellm.png",baseUrlPlaceholder:"http://localhost:4000",apiKeyRecommended:!0,helpText:"Point at your LiteLLM proxy. The base URL should be the root of the proxy (we'll append /v1)."},{id:"ollama",name:"Ollama",description:"Run open-source models on your own computer",logo:"https://decoims.com/decocms/2bb2f822-5288-4b7c-a541-dcbef76525a0/ollama.png",baseUrlPlaceholder:"http://localhost:11434",apiKeyRecommended:!1,helpText:"Ollama exposes /v1 by default — no API key required for local use."},{id:"lm-studio",name:"LM Studio",description:"Open models running through LM Studio",logo:"https://decoims.com/decocms/9f0ab1a9-d2d5-4f3e-9de0-aadd4926428d/lmstudio.webp",baseUrlPlaceholder:"http://localhost:1234",apiKeyRecommended:!1,helpText:"Start the local server in LM Studio, then paste its base URL here."},{id:"vllm",name:"vLLM",description:"Connect to your team's self-hosted vLLM server",logo:"https://decoims.com/decocms/b6c60e4f-a4aa-443c-981f-ad0f31640e22/vllm.png",baseUrlPlaceholder:"http://localhost:8000",apiKeyRecommended:!1}];function je(l){if(l)return ct.find(e=>e.id===l)}const He=4;function be(l){const e=H.c(8),{logo:t,name:i,description:n,onClick:o}=l;let r;e[0]!==t||e[1]!==i?(r=t?s.jsx("img",{src:t,alt:i,className:"size-8 rounded-md object-contain dark:bg-white dark:p-0.5"}):s.jsx(Jt,{fallback:i.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[0]=t,e[1]=i,e[2]=r):r=e[2];let c;return e[3]!==n||e[4]!==i||e[5]!==o||e[6]!==r?(c=s.jsx(ot,{onClick:o,icon:r,title:i,description:n}),e[3]=n,e[4]=i,e[5]=o,e[6]=r,e[7]=c):c=e[7],c}function dt(l){const e=H.c(38),{providers:t,onSelect:i,onShowAll:n}=l,o=se();let r;e[0]!==t?(r=t.find(ys),e[0]=t,e[1]=r):r=e[1];const c=r;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u={openrouter:0,llmapi:1,anthropic:2,google:3},e[2]=u):u=e[2];const d=u;let a;if(e[3]!==i||e[4]!==t||e[5]!==o){let O;e[7]===Symbol.for("react.memo_cache_sentinel")?(O=(S,E)=>{const P=d[S.id]??Number.MAX_SAFE_INTEGER,A=d[E.id]??Number.MAX_SAFE_INTEGER;return P-A},e[7]=O):O=e[7];const _=t.filter(bs).sort(O);let I;e[8]!==t?(I=t.find(vs),e[8]=t,e[9]=I):I=e[9];const x=I;let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=je("openai"),e[10]=k):k=e[10];const C=k;let M;e[11]!==i?(M=S=>s.jsx(be,{logo:S.logo,name:S.name,description:S.description,onClick:()=>i({kind:"provider",provider:S})},S.id),e[11]=i,e[12]=M):M=e[12];let y;e[13]!==i||e[14]!==x?(y=x&&C?[s.jsx(be,{logo:C.logo,name:C.name,description:C.description,onClick:()=>i({kind:"openai-compatible",provider:x,preset:C})},C.id)]:[],e[13]=i,e[14]=x,e[15]=y):y=e[15];let g;e[16]!==i||e[17]!==x||e[18]!==o?(g=x?[...ct.filter(gs).map(S=>s.jsx(be,{logo:S.logo,name:S.name,description:S.description,onClick:()=>i({kind:"openai-compatible",provider:x,preset:S})},S.id)),s.jsx(be,{logo:x.logo,name:o("settings.aiProviders.customOpenAiCompatible"),description:o("settings.aiProviders.customOpenAiDescription"),onClick:()=>i({kind:"openai-compatible",provider:x,preset:null})},"custom")]:[],e[16]=i,e[17]=x,e[18]=o,e[19]=g):g=e[19],a=[..._.map(M),...y,...g],e[3]=i,e[4]=t,e[5]=o,e[6]=a}else a=e[6];const h=a,p=h.length-He,m=!!n&&p>0;let f;e[20]!==h||e[21]!==m?(f=m?h.slice(0,He):h,e[20]=h,e[21]=m,e[22]=f):f=e[22];const v=f;let N;e[23]!==c||e[24]!==i||e[25]!==o?(N=c&&s.jsx(De,{children:s.jsxs("div",{className:"relative rounded-xl border border-violet-400/30 bg-gradient-to-br from-violet-50/50 via-transparent to-lime-50/30 dark:from-violet-950/20 dark:to-lime-950/10 p-1.5",children:[s.jsx("div",{className:"absolute inset-0 rounded-xl bg-gradient-to-br from-violet-400/5 to-lime-400/5 pointer-events-none"}),s.jsx("p",{className:"text-xs font-medium text-violet-700 dark:text-violet-400 mb-1.5 px-2 pt-2 relative",children:o("settings.aiProviders.recommended")}),s.jsx(Re,{className:"relative",children:s.jsx(be,{logo:c.logo,name:c.name,description:c.description,onClick:()=>i({kind:"provider",provider:c})})})]})}),e[23]=c,e[24]=i,e[25]=o,e[26]=N):N=e[26];let b;e[27]!==p||e[28]!==n||e[29]!==m||e[30]!==o?(b=m&&s.jsx(ot,{onClick:n,title:o("settings.aiProviders.moreProviders",{count:p,plural:p===1?"":"s"}),action:s.jsx(Qt,{size:16,className:"text-muted-foreground"})}),e[27]=p,e[28]=n,e[29]=m,e[30]=o,e[31]=b):b=e[31];let j;e[32]!==b||e[33]!==v?(j=s.jsx(De,{children:s.jsxs(Re,{children:[v,b]})}),e[32]=b,e[33]=v,e[34]=j):j=e[34];let w;return e[35]!==N||e[36]!==j?(w=s.jsxs("div",{className:"flex flex-col gap-6",children:[N,j]}),e[35]=N,e[36]=j,e[37]=w):w=e[37],w}function gs(l){return l.id!=="openai"}function vs(l){return l.id==="openai-compatible"}function bs(l){return l.id!=="deco"&&l.id!=="openai-compatible"}function ys(l){return l.id==="deco"}const js=Ye({label:ye().optional(),apiKey:ye().min(1,"API key is required")});function Ss(l){const e=H.c(87),{providerId:t,onCancel:i,onSuccess:n}=l,{org:o}=ve(),r=we(),c=_e(),[u,d]=V.useState(!1),a=se();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={resolver:Qe(js),defaultValues:{label:"",apiKey:""}},e[0]=h):h=e[0];const{register:p,handleSubmit:m,formState:f}=Je(h),{errors:v}=f;let N;e[1]!==t||e[2]!==r||e[3]!==a?(N=async U=>{await r.call("AI_PROVIDER_KEY_CREATE",{providerId:t,label:U.label||a("settings.connectForms.defaultKeyLabel"),apiKey:U.apiKey})},e[1]=t,e[2]=r,e[3]=a,e[4]=N):N=e[4];let b;e[5]!==n||e[6]!==o||e[7]!==c||e[8]!==a?(b=()=>{c.invalidateQueries({queryKey:ce.aiProviderKeys(o.id)}),c.invalidateQueries({queryKey:ce.aiProviders(o.id)}),oe.success(a("settings.connectForms.keySavedSuccess")),n()},e[5]=n,e[6]=o,e[7]=c,e[8]=a,e[9]=b):b=e[9];let j;e[10]!==a?(j=U=>{oe.error(a("settings.connectForms.failedSaveKey",{error:U.message}))},e[10]=a,e[11]=j):j=e[11];let w;e[12]!==N||e[13]!==b||e[14]!==j?(w={mutationFn:N,onSuccess:b,onError:j},e[12]=N,e[13]=b,e[14]=j,e[15]=w):w=e[15];const{mutate:O,isPending:_,error:I}=ke(w);let x;e[16]!==O?(x=U=>O(U),e[16]=O,e[17]=x):x=e[17];let k;e[18]!==m||e[19]!==x?(k=m(x),e[18]=m,e[19]=x,e[20]=k):k=e[20];let C;e[21]!==a?(C=a("settings.connectForms.labelField"),e[21]=a,e[22]=C):C=e[22];let M;e[23]!==C?(M=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:C}),e[23]=C,e[24]=M):M=e[24];let y;e[25]!==a?(y=a("settings.connectForms.labelPlaceholder"),e[25]=a,e[26]=y):y=e[26];let g;e[27]!==p?(g=p("label"),e[27]=p,e[28]=g):g=e[28];let S;e[29]!==y||e[30]!==g?(S=s.jsx(pe,{placeholder:y,...g,className:"h-8 text-sm"}),e[29]=y,e[30]=g,e[31]=S):S=e[31];let E;e[32]!==M||e[33]!==S?(E=s.jsxs("div",{className:"space-y-1",children:[M,S]}),e[32]=M,e[33]=S,e[34]=E):E=e[34];let P;e[35]!==a?(P=a("settings.connectForms.apiKeyField"),e[35]=a,e[36]=P):P=e[36];let A;e[37]!==P?(A=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:P}),e[37]=P,e[38]=A):A=e[38];const L=u?"text":"password";let z;e[39]!==p?(z=p("apiKey"),e[39]=p,e[40]=z):z=e[40];let R;e[41]!==L||e[42]!==z?(R=s.jsx(pe,{type:L,placeholder:"sk-...",...z,className:"ph-no-capture h-8 text-sm pr-8"}),e[41]=L,e[42]=z,e[43]=R):R=e[43];let K;e[44]!==u?(K=()=>d(!u),e[44]=u,e[45]=K):K=e[45];let D;e[46]!==u||e[47]!==a?(D=a(u?"settings.connectForms.hideApiKey":"settings.connectForms.showApiKey"),e[46]=u,e[47]=a,e[48]=D):D=e[48];let W;e[49]!==u?(W=u?s.jsx(it,{size:14}):s.jsx(rt,{size:14}),e[49]=u,e[50]=W):W=e[50];let Q;e[51]!==K||e[52]!==D||e[53]!==W?(Q=s.jsx("button",{type:"button",onClick:K,"aria-label":D,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:W}),e[51]=K,e[52]=D,e[53]=W,e[54]=Q):Q=e[54];let J;e[55]!==R||e[56]!==Q?(J=s.jsxs("div",{className:"relative",children:[R,Q]}),e[55]=R,e[56]=Q,e[57]=J):J=e[57];let Z;e[58]!==v.apiKey?(Z=v.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:v.apiKey.message}),e[58]=v.apiKey,e[59]=Z):Z=e[59];let X;e[60]!==A||e[61]!==J||e[62]!==Z?(X=s.jsxs("div",{className:"space-y-1",children:[A,J,Z]}),e[60]=A,e[61]=J,e[62]=Z,e[63]=X):X=e[63];let ee;e[64]!==I?(ee=I&&s.jsx("p",{className:"text-xs text-destructive",children:I.message}),e[64]=I,e[65]=ee):ee=e[65];let q;e[66]!==a?(q=a("settings.connectForms.cancel"),e[66]=a,e[67]=q):q=e[67];let G;e[68]!==_||e[69]!==i||e[70]!==q?(G=s.jsx(le,{type:"button",variant:"ghost",size:"sm",onClick:i,disabled:_,children:q}),e[68]=_,e[69]=i,e[70]=q,e[71]=G):G=e[71];let Y;e[72]!==_||e[73]!==a?(Y=a(_?"settings.connectForms.saving":"settings.connectForms.saveKey"),e[72]=_,e[73]=a,e[74]=Y):Y=e[74];let T;e[75]!==_||e[76]!==Y?(T=s.jsx(le,{type:"submit",size:"sm",disabled:_,children:Y}),e[75]=_,e[76]=Y,e[77]=T):T=e[77];let F;e[78]!==G||e[79]!==T?(F=s.jsxs(tt,{children:[G,T]}),e[78]=G,e[79]=T,e[80]=F):F=e[80];let $;return e[81]!==E||e[82]!==X||e[83]!==ee||e[84]!==F||e[85]!==k?($=s.jsxs("form",{onSubmit:k,className:"space-y-3",children:[E,X,ee,F]}),e[81]=E,e[82]=X,e[83]=ee,e[84]=F,e[85]=k,e[86]=$):$=e[86],$}const Ns=Ye({label:ye().optional(),baseUrl:ye().min(1,"Base URL is required"),apiKey:ye().optional()});function ks(l){const e=H.c(105),{preset:t,onCancel:i,onSuccess:n}=l,{org:o}=ve(),r=we(),c=_e(),[u,d]=V.useState(!1),a=se();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=Qe(Ns),e[0]=h):h=e[0];const p=t?.defaultBaseUrl??"";let m;e[1]!==p?(m={resolver:h,defaultValues:{label:"",baseUrl:p,apiKey:""}},e[1]=p,e[2]=m):m=e[2];const{register:f,handleSubmit:v,formState:N}=Je(m),{errors:b}=N;let j;e[3]!==t||e[4]!==r?(j=async ae=>{const bt=JSON.stringify({baseUrl:ae.baseUrl,apiKey:ae.apiKey||""});await r.call("AI_PROVIDER_KEY_CREATE",{providerId:"openai-compatible",label:ae.label||t?.name||ae.baseUrl,apiKey:bt,...t?{presetId:t.id}:{}})},e[3]=t,e[4]=r,e[5]=j):j=e[5];let w;e[6]!==n||e[7]!==o||e[8]!==c||e[9]!==a?(w=()=>{c.invalidateQueries({queryKey:ce.aiProviderKeys(o.id)}),c.invalidateQueries({queryKey:ce.aiProviders(o.id)}),oe.success(a("settings.connectForms.connectionSavedSuccess")),n()},e[6]=n,e[7]=o,e[8]=c,e[9]=a,e[10]=w):w=e[10];let O;e[11]!==a?(O=ae=>{oe.error(a("settings.connectForms.failedSaveConnection",{error:ae.message}))},e[11]=a,e[12]=O):O=e[12];let _;e[13]!==j||e[14]!==w||e[15]!==O?(_={mutationFn:j,onSuccess:w,onError:O},e[13]=j,e[14]=w,e[15]=O,e[16]=_):_=e[16];const{mutate:I,isPending:x,error:k}=ke(_);let C;e[17]!==t||e[18]!==a?(C=t?a("settings.connectForms.labelPlaceholderPreset",{name:t.name}):a("settings.connectForms.labelPlaceholderOpenAiCompatible"),e[17]=t,e[18]=a,e[19]=C):C=e[19];const M=C;let y;e[20]!==t?.baseUrlPlaceholder||e[21]!==a?(y=t?.baseUrlPlaceholder??a("settings.connectForms.baseUrlPlaceholder"),e[20]=t?.baseUrlPlaceholder,e[21]=a,e[22]=y):y=e[22];const g=y;let S;e[23]!==I?(S=ae=>I(ae),e[23]=I,e[24]=S):S=e[24];let E;e[25]!==v||e[26]!==S?(E=v(S),e[25]=v,e[26]=S,e[27]=E):E=e[27];let P;e[28]!==a?(P=a("settings.connectForms.labelField"),e[28]=a,e[29]=P):P=e[29];let A;e[30]!==P?(A=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:P}),e[30]=P,e[31]=A):A=e[31];let L;e[32]!==f?(L=f("label"),e[32]=f,e[33]=L):L=e[33];let z;e[34]!==M||e[35]!==L?(z=s.jsx(pe,{placeholder:M,...L,className:"h-8 text-sm"}),e[34]=M,e[35]=L,e[36]=z):z=e[36];let R;e[37]!==A||e[38]!==z?(R=s.jsxs("div",{className:"space-y-1",children:[A,z]}),e[37]=A,e[38]=z,e[39]=R):R=e[39];let K;e[40]!==g||e[41]!==b||e[42]!==t?.defaultBaseUrl||e[43]!==f||e[44]!==a?(K=t?.defaultBaseUrl?s.jsx("input",{type:"hidden",...f("baseUrl")}):s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:a("settings.connectForms.baseUrlField")}),s.jsx(pe,{type:"url",placeholder:g,...f("baseUrl"),className:"h-8 text-sm"}),b.baseUrl&&s.jsx("p",{className:"text-xs text-destructive",children:b.baseUrl.message})]}),e[40]=g,e[41]=b,e[42]=t?.defaultBaseUrl,e[43]=f,e[44]=a,e[45]=K):K=e[45];let D;e[46]!==a?(D=a("settings.connectForms.apiKeyField"),e[46]=a,e[47]=D):D=e[47];let W;e[48]!==t?.apiKeyRecommended||e[49]!==a?(W=t?.apiKeyRecommended?a("settings.connectForms.recommended"):a("settings.connectForms.optional"),e[48]=t?.apiKeyRecommended,e[49]=a,e[50]=W):W=e[50];let Q;e[51]!==W?(Q=s.jsxs("span",{className:"text-muted-foreground/60",children:["(",W,")"]}),e[51]=W,e[52]=Q):Q=e[52];let J;e[53]!==D||e[54]!==Q?(J=s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[D," ",Q]}),e[53]=D,e[54]=Q,e[55]=J):J=e[55];const Z=u?"text":"password";let X;e[56]!==f?(X=f("apiKey"),e[56]=f,e[57]=X):X=e[57];let ee;e[58]!==Z||e[59]!==X?(ee=s.jsx(pe,{type:Z,placeholder:"sk-...",...X,className:"ph-no-capture h-8 text-sm pr-8"}),e[58]=Z,e[59]=X,e[60]=ee):ee=e[60];let q;e[61]!==u?(q=()=>d(!u),e[61]=u,e[62]=q):q=e[62];let G;e[63]!==u||e[64]!==a?(G=a(u?"settings.connectForms.hideApiKey":"settings.connectForms.showApiKey"),e[63]=u,e[64]=a,e[65]=G):G=e[65];let Y;e[66]!==u?(Y=u?s.jsx(it,{size:14}):s.jsx(rt,{size:14}),e[66]=u,e[67]=Y):Y=e[67];let T;e[68]!==q||e[69]!==G||e[70]!==Y?(T=s.jsx("button",{type:"button",onClick:q,"aria-label":G,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:Y}),e[68]=q,e[69]=G,e[70]=Y,e[71]=T):T=e[71];let F;e[72]!==ee||e[73]!==T?(F=s.jsxs("div",{className:"relative",children:[ee,T]}),e[72]=ee,e[73]=T,e[74]=F):F=e[74];let $;e[75]!==J||e[76]!==F?($=s.jsxs("div",{className:"space-y-1",children:[J,F]}),e[75]=J,e[76]=F,e[77]=$):$=e[77];let U;e[78]!==t?(U=t?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:t.helpText}),e[78]=t,e[79]=U):U=e[79];let B;e[80]!==k?(B=k&&s.jsx("p",{className:"text-xs text-destructive",children:k.message}),e[80]=k,e[81]=B):B=e[81];let re;e[82]!==a?(re=a("settings.connectForms.cancel"),e[82]=a,e[83]=re):re=e[83];let de;e[84]!==x||e[85]!==i||e[86]!==re?(de=s.jsx(le,{type:"button",variant:"ghost",size:"sm",onClick:i,disabled:x,children:re}),e[84]=x,e[85]=i,e[86]=re,e[87]=de):de=e[87];let ue;e[88]!==x||e[89]!==a?(ue=a(x?"settings.connectForms.saving":"settings.connectForms.saveConnection"),e[88]=x,e[89]=a,e[90]=ue):ue=e[90];let me;e[91]!==x||e[92]!==ue?(me=s.jsx(le,{type:"submit",size:"sm",disabled:x,children:ue}),e[91]=x,e[92]=ue,e[93]=me):me=e[93];let he;e[94]!==de||e[95]!==me?(he=s.jsxs(tt,{children:[de,me]}),e[94]=de,e[95]=me,e[96]=he):he=e[96];let Se;return e[97]!==E||e[98]!==R||e[99]!==K||e[100]!==$||e[101]!==U||e[102]!==B||e[103]!==he?(Se=s.jsxs("form",{onSubmit:E,className:"space-y-3",children:[R,K,$,U,B,he]}),e[97]=E,e[98]=R,e[99]=K,e[100]=$,e[101]=U,e[102]=B,e[103]=he,e[104]=Se):Se=e[104],Se}const Cs={kind:"closed"};function ws(l,e){switch(e.type){case"open":return l.kind==="closed"?{kind:"grid"}:l;case"close":return{kind:"closed"};case"back":switch(l.kind){case"form":case"oauth-pending":case"provision-pending":case"provision-error":return{kind:"grid"};default:return l}case"select-form":return l.kind!=="grid"?l:{kind:"form",providerId:e.providerId,presetId:e.presetId};case"select-oauth":return l.kind!=="grid"?l:{kind:"oauth-pending",providerId:e.providerId,stateToken:e.stateToken};case"oauth-failed":return l.kind==="oauth-pending"?{kind:"grid"}:l;case"select-provision":return l.kind!=="grid"?l:{kind:"provision-pending",providerId:e.providerId};case"provision-error":return l.kind!=="provision-pending"?l:{kind:"provision-error",providerId:l.providerId,error:e.error};case"retry-provision":return l.kind!=="provision-error"?l:{kind:"provision-pending",providerId:l.providerId}}}function Is(l){switch(l.kind){case"form":case"oauth-pending":case"provision-pending":case"provision-error":return l.providerId;default:return null}}function _s({open:l,onOpenChange:e,initialProvider:t}){const i=se(),o=Te()?.providers??[],{org:r}=ve(),c=we(),u=_e(),[d,a]=V.useReducer(ws,Cs),h=V.useRef(!1);V.useEffect(()=>{l&&d.kind==="closed"?a({type:"open"}):!l&&d.kind!=="closed"&&a({type:"close"})},[l,d.kind]);const p=()=>{h.current=!1,a({type:"close"}),e(!1)},m=()=>{u.invalidateQueries({queryKey:ce.aiProviderKeys(r.id)}),u.invalidateQueries({queryKey:ce.aiProviders(r.id)})},{mutate:f}=ke({mutationFn:async({providerId:y,code:g,stateToken:S,label:E})=>(await c.call("AI_PROVIDER_OAUTH_EXCHANGE",{providerId:y,code:g,stateToken:S,label:E}),y),onSuccess:y=>{ne("ai_provider_oauth_succeeded",{provider_id:y}),m();const g=o.find(S=>S.id===y);oe.success(i("settings.connectProviderDialog.oauthSuccessMessage",{provider:g?.name??i("settings.connectProviderDialog.defaultProviderName")})),p()},onError:(y,g)=>{ne("ai_provider_oauth_failed",{provider_id:g.providerId,error:y.message}),oe.error(i("settings.connectProviderDialog.oauthFailedMessage",{error:y.message})),a({type:"oauth-failed"})}}),{mutate:v}=ke({mutationFn:async y=>(await c.call("AI_PROVIDER_PROVISION_KEY",{providerId:y}),y),onSuccess:y=>{ne("ai_provider_provision_succeeded",{provider_id:y}),m();const g=o.find(S=>S.id===y);oe.success(i("settings.connectProviderDialog.provisionSuccessMessage",{provider:g?.name??i("settings.connectProviderDialog.defaultProviderName")})),p()},onError:(y,g)=>{ne("ai_provider_provision_failed",{provider_id:g,error:y.message}),a({type:"provision-error",error:y.message})}}),N=async y=>{const{provider:g}=y,S=y.kind==="openai-compatible"?y.preset?.id??null:null,E=g.supportedMethods.includes("oauth-pkce"),P=g.supportedMethods.includes("api-key");if(g.supportsProvision===!0){ne("ai_provider_connect_clicked",{provider_id:g.id,method:"provision"}),a({type:"select-provision",providerId:g.id}),v(g.id);return}if(E){ne("ai_provider_connect_clicked",{provider_id:g.id,method:"oauth-pkce"});try{const L=await c.call("AI_PROVIDER_OAUTH_URL",{providerId:g.id,callbackUrl:`${window.location.origin}/oauth/callback/ai-provider`});if(!L?.url)throw new Error("Invalid response from AI_PROVIDER_OAUTH_URL");a({type:"select-oauth",providerId:g.id,stateToken:L.stateToken}),window.open(L.url,"AiProviderOAuth","width=600,height=700")}catch(L){oe.error(i("settings.connectProviderDialog.startOAuthFailedMessage",{error:L instanceof Error?L.message:String(L)}))}return}P&&(ne("ai_provider_connect_clicked",{provider_id:g.id,...S!==null?{preset_id:S}:{},method:"api-key"}),a({type:"select-form",providerId:g.id,presetId:S}))},b=V.useRef(N);b.current=N;const j=V.useRef(t);j.current=t,V.useEffect(()=>{!j.current||d.kind!=="grid"||h.current||(h.current=!0,b.current(j.current))},[d.kind]);const w=d.kind==="oauth-pending"?d.stateToken:null,O=d.kind==="oauth-pending"?d.providerId:null;V.useEffect(()=>{if(d.kind!=="oauth-pending")return;let y=!1;const g=d.stateToken,S=d.providerId,E=A=>{if(A.origin!==window.location.origin||A.data?.type!=="AI_PROVIDER_OAUTH_CALLBACK")return;const{code:L,stateToken:z}=A.data;if(z!==g){oe.error(i("settings.connectProviderDialog.securityCheckFailedMessage")),a({type:"oauth-failed"});return}y=!0;const R=o.find(K=>K.id===S);f({providerId:S,code:L,stateToken:g,label:R?.name??S})};window.addEventListener("message",E);const P=setTimeout(()=>{y||(ne("ai_provider_oauth_timeout",{provider_id:S}),a({type:"oauth-failed"}),oe.error(i("settings.connectProviderDialog.connectionTimedOutMessage")))},12e4);return()=>{window.removeEventListener("message",E),clearTimeout(P)}},[d.kind,w,O,f]);const _=Is(d),I=_?o.find(y=>y.id===_):null,k=(d.kind==="form"&&d.presetId?je(d.presetId):null)?.name??I?.name??i("settings.connectProviderDialog.defaultTitle"),C=d.kind!=="grid"&&d.kind!=="closed",M=()=>{t?p():a({type:"back"})};return s.jsx(Me,{open:d.kind!=="closed",onOpenChange:y=>!y&&p(),children:s.jsxs(Ee,{className:"sm:max-w-md max-h-[90vh] overflow-y-auto",children:[s.jsxs(Ze,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[C&&s.jsx(le,{variant:"ghost",size:"icon","aria-label":i("settings.connectProviderDialog.backButtonLabel"),className:"h-7 w-7",onClick:M,children:s.jsx(lt,{size:16})}),s.jsx(Oe,{children:k})]}),d.kind==="grid"&&!t&&s.jsx(et,{children:i("settings.connectProviderDialog.gridDescription")})]}),d.kind==="grid"&&!t&&s.jsx(dt,{providers:o,onSelect:N}),d.kind==="form"&&(d.providerId==="openai-compatible"?s.jsx(ks,{preset:d.presetId?je(d.presetId):void 0,onCancel:()=>a({type:"back"}),onSuccess:()=>{m(),p()}}):s.jsx(Ss,{providerId:d.providerId,onCancel:()=>a({type:"back"}),onSuccess:()=>{m(),p()}})),d.kind==="oauth-pending"&&s.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[s.jsx(Ie,{size:"lg"}),s.jsx("p",{className:"text-sm text-muted-foreground text-center",children:i("settings.connectProviderDialog.oauthPendingMessage")})]}),d.kind==="provision-pending"&&s.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[s.jsx(Ie,{size:"lg"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:i("settings.connectProviderDialog.provisionPendingMessage")})]}),d.kind==="provision-error"&&s.jsxs("div",{className:"flex flex-col items-center gap-4 py-6",children:[s.jsx(Yt,{size:28,className:"text-destructive"}),s.jsx("p",{className:"text-sm text-foreground text-center",children:d.error}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(le,{variant:"outline",size:"sm",onClick:()=>a({type:"back"}),children:i("settings.connectProviderDialog.backButton")}),s.jsx(le,{size:"sm",onClick:()=>{a({type:"retry-provision"}),v(d.providerId)},children:i("settings.connectProviderDialog.retryButton")})]})]})]})})}function Ms(){const l=H.c(7),{org:e}=ve(),t=we();let i;l[0]!==e.id?(i=ce.defaultBrand(e.id),l[0]=e.id,l[1]=i):i=l[1];let n;l[2]!==t?(n=async()=>{const{items:c}=await t.call("BRAND_CONTEXT_LIST",{});return(Array.isArray(c)?c:[]).find(Es)??null},l[2]=t,l[3]=n):n=l[3];let o;l[4]!==i||l[5]!==n?(o={queryKey:i,queryFn:n},l[4]=i,l[5]=n,l[6]=o):o=l[6];const{data:r}=St(o);return r??null}function Es(l){return l.isDefault&&!l.archivedAt}function Os(l){const e=l.colors;if(!e)return null;if(Array.isArray(e)){const t=e.find(n=>typeof n=="object"&&n!==null&&"label"in n&&/primary|brand|main/i.test(n.label)),i=t?t.value:e[0]?.value;return typeof i=="string"?i:null}if(typeof e=="object"){const t=e;return t.primary??Object.values(t)[0]??null}return null}function Ls(l){const e=H.c(66);let t;e[0]!==l?(t=l===void 0?{}:l,e[0]=l,e[1]=t):t=e[1];const{title:i,description:n,onLocalRuntimePicked:o}=t,r=se(),{org:c}=ve(),{localMode:u}=jt(),d=Ms(),a=st(),h=Lt(),[p,m]=V.useState(null),[f,v]=V.useState(!1),[N,b]=V.useState(!1),j=Te();let w;e[2]!==j?.providers?(w=j?.providers??[],e[2]=j?.providers,e[3]=w):w=e[3];const O=w;let _,I,x;if(e[4]!==d||e[5]!==h||e[6]!==n||e[7]!==a.capabilities||e[8]!==a.online||e[9]!==u||e[10]!==o||e[11]!==c.name||e[12]!==r||e[13]!==i){const L=[];if(a.online){if(a.capabilities.includes("claude-code")){let B;e[17]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(xe,{size:16}),e[17]=B):B=e[17],L.push({option:"claude-code-desktop",label:"Claude Code",icon:B})}if(a.capabilities.includes("codex")){let B;e[18]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ge,{size:16}),e[18]=B):B=e[18],L.push({option:"codex-desktop",label:"Codex",icon:B})}}const z=L.length>0&&h!==null,R=c.name;let K;e[19]!==d?(K=d?Os(d):null,e[19]=d,e[20]=K):K=e[20];const D=K,W=d?.favicon??d?.logo??null;let Q;e[21]!==R||e[22]!==r||e[23]!==i?(Q=i??(R?r("chat.noAiProviderEmptyState.headingWithOrg",{org:R}):r("chat.noAiProviderEmptyState.headingDefault")),e[21]=R,e[22]=r,e[23]=i,e[24]=Q):Q=e[24];const J=Q;let Z;e[25]!==n||e[26]!==z||e[27]!==u||e[28]!==r?(Z=n??r(z?"chat.noAiProviderEmptyState.subtitleWithDesktop":u?"chat.noAiProviderEmptyState.subtitleLocalMode":"chat.noAiProviderEmptyState.subtitleDefault"),e[25]=n,e[26]=z,e[27]=u,e[28]=r,e[29]=Z):Z=e[29];const X=Z,ee=!!(W||D);let q;e[30]!==D?(q=D?{backgroundColor:`${D}18`,borderColor:`${D}30`}:void 0,e[30]=D,e[31]=q):q=e[31];const G=q,Y=ee?"flex items-center justify-center size-14 rounded-2xl border":"flex items-center justify-center size-14 rounded-2xl bg-muted border border-border";_="flex flex-col items-center gap-8 w-full max-w-3xl px-4";let T;e[32]!==Y||e[33]!==G||e[34]!==W||e[35]!==a.online||e[36]!==D||e[37]!==r?(T=W?s.jsx("div",{className:Y,style:G,children:s.jsx("img",{src:W,alt:"",className:"size-7 rounded object-contain"})}):s.jsx("button",{type:"button",onClick:()=>b(!0),"aria-label":a.online?r("chat.noAiProviderEmptyState.desktopLinkedLabel"):r("chat.noAiProviderEmptyState.connectDesktopLabel"),className:ie(Y,"cursor-pointer transition-colors hover:bg-accent"),style:G,children:s.jsxs("span",{className:"relative inline-flex items-center justify-center",children:[s.jsx(Xt,{size:24,style:D?{color:D}:void 0,className:ie(!D&&"text-muted-foreground")}),a.online&&s.jsx("span",{className:"absolute -top-0.5 -right-0.5 size-2.5 rounded-full bg-success ring-2 ring-background animate-pulse"})]})}),e[32]=Y,e[33]=G,e[34]=W,e[35]=a.online,e[36]=D,e[37]=r,e[38]=T):T=e[38];let F;e[39]!==J?(F=s.jsx("p",{className:"text-xl font-semibold text-foreground tracking-tight",children:J}),e[39]=J,e[40]=F):F=e[40];let $;e[41]!==X?($=s.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:X}),e[41]=X,e[42]=$):$=e[42];let U;e[43]!==F||e[44]!==$?(U=s.jsxs("div",{className:"space-y-2",children:[F,$]}),e[43]=F,e[44]=$,e[45]=U):U=e[45],e[46]!==T||e[47]!==U?(I=s.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[T,U]}),e[46]=T,e[47]=U,e[48]=I):I=e[48],x=z&&s.jsxs("div",{className:"flex flex-col items-center gap-3 w-full",children:[s.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2",children:L.map(B=>s.jsxs(le,{variant:"default",className:"gap-2",onClick:()=>{h?.setPendingAgentOption(B.option),o?.(B.option)},children:[B.icon,r("chat.noAiProviderEmptyState.useLabel",{label:B.label})]},B.option))}),s.jsxs("div",{className:"flex items-center gap-3 w-full max-w-xs text-xs text-muted-foreground",children:[s.jsx("span",{className:"h-px flex-1 bg-border"}),r("chat.noAiProviderEmptyState.orConnectProvider"),s.jsx("span",{className:"h-px flex-1 bg-border"})]})]}),e[4]=d,e[5]=h,e[6]=n,e[7]=a.capabilities,e[8]=a.online,e[9]=u,e[10]=o,e[11]=c.name,e[12]=r,e[13]=i,e[14]=_,e[15]=I,e[16]=x}else _=e[14],I=e[15],x=e[16];let k,C;e[49]===Symbol.for("react.memo_cache_sentinel")?(k=L=>m(L),C=()=>v(!0),e[49]=k,e[50]=C):(k=e[49],C=e[50]);let M;e[51]!==O?(M=s.jsx("div",{className:"w-full",children:s.jsx(dt,{providers:O,onSelect:k,onShowAll:C})}),e[51]=O,e[52]=M):M=e[52];const y=p!==null||f;let g;e[53]===Symbol.for("react.memo_cache_sentinel")?(g=L=>{L||(m(null),v(!1))},e[53]=g):g=e[53];const S=p??void 0;let E;e[54]!==S||e[55]!==y?(E=s.jsx(_s,{open:y,onOpenChange:g,initialProvider:S}),e[54]=S,e[55]=y,e[56]=E):E=e[56];let P;e[57]!==N?(P=s.jsx(ls,{open:N,onOpenChange:b}),e[57]=N,e[58]=P):P=e[58];let A;return e[59]!==E||e[60]!==P||e[61]!==_||e[62]!==I||e[63]!==x||e[64]!==M?(A=s.jsxs("div",{className:_,children:[I,x,M,E,P]}),e[59]=E,e[60]=P,e[61]=_,e[62]=I,e[63]=x,e[64]=M,e[65]=A):A=e[65],A}function Pe(l){const e=l.title.includes(": ");return{provider:e?l.title.split(": ")[0]??"":l.modelId.split("/")[0]??"",displayName:e?l.title.split(": ").slice(1).join(": "):l.title}}function Ts(l){return l<32e3?{level:1,labelKey:"chat.shared.contextLevelSmall",descriptionKey:"chat.shared.contextLevelSmallDesc"}:l<2e5?{level:2,labelKey:"chat.shared.contextLevelMedium",descriptionKey:"chat.shared.contextLevelMediumDesc"}:l<5e5?{level:3,labelKey:"chat.shared.contextLevelLarge",descriptionKey:"chat.shared.contextLevelLargeDesc"}:{level:4,labelKey:"chat.shared.contextLevelVeryLarge",descriptionKey:"chat.shared.contextLevelVeryLargeDesc"}}const As=["bg-destructive","bg-warning","bg-success","bg-success"],Ps=["text-success","text-warning","text-warning","text-destructive"];function zs(l,e){const t=Math.round(l*.75/1e3),i=t>=1?`${t}K`:`${Math.round(l*.75)}`;return e("chat.shared.approxWords",{wordCount:i})}function Ds(l){return l<1?{level:1,labelKey:"chat.shared.costLevelCheap"}:l<5?{level:2,labelKey:"chat.shared.costLevelModerate"}:l<15?{level:3,labelKey:"chat.shared.costLevelHigh"}:{level:4,labelKey:"chat.shared.costLevelExpensive"}}const Rs={text:{icon:s.jsx(Wt,{className:"size-3.5"}),labelKey:"chat.shared.capabilityText"},vision:{icon:s.jsx(Bt,{className:"size-3.5"}),labelKey:"chat.shared.capabilityVision"},image:{icon:s.jsx(Ft,{className:"size-3.5"}),labelKey:"chat.shared.capabilityImage"},tools:{icon:s.jsx(Ut,{className:"size-3.5"}),labelKey:"chat.shared.capabilityTools"},reasoning:{icon:s.jsx(ts,{className:"size-3.5"}),labelKey:"chat.shared.capabilityReasoning"},"web-search":{icon:s.jsx(nt,{className:"size-3.5"}),labelKey:"chat.shared.capabilityWebSearch"}};function Fs(l){const e=H.c(10),{capability:t}=l,i=se(),n=Rs[t];if(n){const u=n.icon;let d;e[0]!==n.labelKey||e[1]!==i?(d=i(n.labelKey),e[0]=n.labelKey,e[1]=i,e[2]=d):d=e[2];let a;return e[3]!==n.icon||e[4]!==d?(a=s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground border border-border rounded px-2 py-0.5",children:[u,d]}),e[3]=n.icon,e[4]=d,e[5]=a):a=e[5],a}let o;e[6]!==t?(o=t.charAt(0).toUpperCase(),e[6]=t,e[7]=o):o=e[7];const r=o+t.slice(1);let c;return e[8]!==r?(c=s.jsx("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground border border-border rounded px-2 py-0.5",children:r}),e[8]=r,e[9]=c):c=e[9],c}function Ks(l){const e=H.c(59),{model:t,compact:i}=l,n=i===void 0?!1:i,o=se();if(!t){let x;e[0]!==o?(x=o("chat.shared.hoverToPreview"),e[0]=o,e[1]=x):x=e[1];let k;return e[2]!==x?(k=s.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:x}),e[2]=x,e[3]=k):k=e[3],k}const r=t.costs?.input!=null?t.costs.input*1e6:null,c=t.costs?.output!=null?t.costs.output*1e6:null;let u;e[4]!==t?(u=Pe(t),e[4]=t,e[5]=u):u=e[5];const{provider:d,displayName:a}=u;if(n){let x;e[6]!==t.limits||e[7]!==o?(x=t.limits?.contextWindow&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:o("chat.shared.context")}),s.jsxs("span",{className:"text-foreground font-medium",children:[t.limits.contextWindow.toLocaleString()," ",o("chat.shared.tokens")]})]}),e[6]=t.limits,e[7]=o,e[8]=x):x=e[8];let k;e[9]!==r||e[10]!==o?(k=r!=null&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:o("chat.shared.input")}),s.jsxs("span",{className:"text-foreground font-medium",children:["$",r.toFixed(2)," / 1M"]})]}),e[9]=r,e[10]=o,e[11]=k):k=e[11];let C;e[12]!==c||e[13]!==o?(C=c!=null&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:o("chat.shared.output")}),s.jsxs("span",{className:"text-foreground font-medium",children:["$",c.toFixed(2)," / 1M"]})]}),e[12]=c,e[13]=o,e[14]=C):C=e[14];let M;e[15]!==t.limits||e[16]!==o?(M=t.limits?.maxOutputTokens&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:o("chat.shared.outputLimit")}),s.jsxs("span",{className:"text-foreground font-medium",children:[t.limits.maxOutputTokens.toLocaleString()," ",o("chat.shared.tokens")]})]}),e[15]=t.limits,e[16]=o,e[17]=M):M=e[17];let y;return e[18]!==x||e[19]!==k||e[20]!==C||e[21]!==M?(y=s.jsxs("div",{className:"flex flex-col gap-2 pt-3 pb-3 px-3 text-xs",children:[x,k,C,M]}),e[18]=x,e[19]=k,e[20]=C,e[21]=M,e[22]=y):y=e[22],y}let h;e[23]!==d?(h=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:d}),e[23]=d,e[24]=h):h=e[24];let p;e[25]!==t.logo||e[26]!==t.title?(p=t.logo&&s.jsx("img",{src:t.logo,className:"size-6 shrink-0 rounded-md dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[25]=t.logo,e[26]=t.title,e[27]=p):p=e[27];let m;e[28]!==a?(m=s.jsx("p",{className:"text-lg font-semibold leading-snug tracking-tight",children:a}),e[28]=a,e[29]=m):m=e[29];let f;e[30]!==p||e[31]!==m?(f=s.jsxs("div",{className:"flex items-center gap-2.5",children:[p,m]}),e[30]=p,e[31]=m,e[32]=f):f=e[32];let v;e[33]!==t.modelId?(v=s.jsx("p",{className:"text-xs text-muted-foreground/50 font-mono",children:t.modelId}),e[33]=t.modelId,e[34]=v):v=e[34];let N;e[35]!==h||e[36]!==f||e[37]!==v?(N=s.jsxs("div",{className:"flex flex-col gap-1 pt-1 pr-6",children:[h,f,v]}),e[35]=h,e[36]=f,e[37]=v,e[38]=N):N=e[38];let b;e[39]!==t.capabilities?(b=t.capabilities&&t.capabilities.length>0&&s.jsx("div",{className:"flex flex-wrap items-center gap-1.5 pb-4 border-b border-border",children:[...new Set(t.capabilities)].map($s)}),e[39]=t.capabilities,e[40]=b):b=e[40];let j;e[41]!==t.limits||e[42]!==o?(j=t.limits?.contextWindow&&(()=>{const{level:x,labelKey:k,descriptionKey:C}=Ts(t.limits.contextWindow);return s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:o("chat.shared.contextWindow")}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex items-center gap-0.5",children:[1,2,3,4].map(M=>s.jsx("div",{className:ie("w-2 h-2 rounded-full",M<=x?As[x-1]:"bg-muted")},M))}),s.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:o(k)}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["— ",o(C)]})]}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:[t.limits.contextWindow.toLocaleString()," ",o("chat.shared.tokens")]})]})})(),e[41]=t.limits,e[42]=o,e[43]=j):j=e[43];let w;e[44]!==t.limits||e[45]!==o?(w=t.limits?.maxOutputTokens&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:o("chat.shared.outputLimit")}),s.jsxs("div",{className:"flex items-baseline gap-2",children:[s.jsxs("span",{className:"text-sm text-foreground",children:[t.limits.maxOutputTokens.toLocaleString()," ",o("chat.shared.tokens")]}),s.jsx("span",{className:"text-sm text-muted-foreground",children:zs(t.limits.maxOutputTokens,o)})]})]}),e[44]=t.limits,e[45]=o,e[46]=w):w=e[46];let O;e[47]!==r||e[48]!==c||e[49]!==o?(O=(r!=null||c!=null)&&(()=>{const{level:x,labelKey:k}=r!=null?Ds(r):{level:0,labelKey:null};return s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:o("chat.shared.pricing")}),r!=null&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex items-center",children:[1,2,3,4].map(C=>s.jsx("span",{className:ie("text-sm font-bold leading-none",C<=x?Ps[x-1]:"text-muted-foreground/20"),children:"$"},C))}),s.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:k?o(k):""})]}),s.jsxs("div",{className:"flex flex-col gap-1",children:[r!=null&&s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:o("chat.shared.input")}),s.jsxs("span",{className:"text-xs text-foreground",children:["$",r.toFixed(2)," / 1M"," ",o("chat.shared.tokens")]})]}),c!=null&&s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:o("chat.shared.output")}),s.jsxs("span",{className:"text-xs text-foreground",children:["$",c.toFixed(2)," / 1M"," ",o("chat.shared.tokens")]})]})]})]})})(),e[47]=r,e[48]=c,e[49]=o,e[50]=O):O=e[50];let _;e[51]!==j||e[52]!==w||e[53]!==O?(_=s.jsxs("div",{className:"flex flex-col gap-6",children:[j,w,O]}),e[51]=j,e[52]=w,e[53]=O,e[54]=_):_=e[54];let I;return e[55]!==_||e[56]!==N||e[57]!==b?(I=s.jsxs("div",{className:"flex flex-col gap-5 py-1 px-1.5",children:[N,b,_]}),e[55]=_,e[56]=N,e[57]=b,e[58]=I):I=e[58],I}function $s(l){return s.jsx(Fs,{capability:l},l)}function ut(l){const e=H.c(22),{model:t,placeholder:i,isLoading:n}=l,o=n===void 0?!1:n,r=se();let c;e[0]!==i||e[1]!==r?(c=i??r("chat.shared.selectModel"),e[0]=i,e[1]=r,e[2]=c):c=e[2];const u=c;if(o){let b;return e[3]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(te,{className:"w-5 h-5 rounded-sm shrink-0"}),s.jsx(te,{className:"w-16 h-3 hidden md:block"})]}),e[3]=b):b=e[3],b}if(!t){let b;e[4]!==u?(b=s.jsx("span",{className:"text-sm text-muted-foreground",children:u}),e[4]=u,e[5]=b):b=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Fe,{size:14,className:"text-muted-foreground opacity-50 shrink-0"}),e[6]=j):j=e[6];let w;return e[7]!==b?(w=s.jsxs("div",{className:"flex items-center gap-1.5",children:[b,j]}),e[7]=b,e[8]=w):w=e[8],w}let d;e[9]!==t?(d=Pe(t),e[9]=t,e[10]=d):d=e[10];const{displayName:a}=d;let h;e[11]!==t?(h=Ae(t),e[11]=t,e[12]=h):h=e[12];const p=h;let m;e[13]!==t.title||e[14]!==p?(m=s.jsx("img",{src:p,className:"w-3.5 h-3.5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[13]=t.title,e[14]=p,e[15]=m):m=e[15];let f;e[16]!==a?(f=s.jsx("span",{className:"text-sm truncate whitespace-nowrap text-muted-foreground max-w-[100px] sm:max-w-none",children:a}),e[16]=a,e[17]=f):f=e[17];let v;e[18]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Fe,{size:14,className:"text-muted-foreground opacity-50 shrink-0"}),e[18]=v):v=e[18];let N;return e[19]!==m||e[20]!==f?(N=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 overflow-hidden",children:[m,f,v]}),e[19]=m,e[20]=f,e[21]=N):N=e[21],N}const Us=["vision","image","file","audio","video"],mt=["image/png","image/jpeg","image/gif","image/webp"],ht=["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"];function ze(l){const e=l?.capabilities;return e?Us.some(t=>e.includes(t)):!1}function el(l,e){if(!l)return!1;if(l.startsWith("text/"))return!0;const t=e?.capabilities??[],i=t.includes("vision")||t.includes("image"),n=t.includes("file"),o=t.includes("audio"),r=t.includes("video");return!!(i&&mt.includes(l)||n&&l==="application/pdf"||o&&l.startsWith("audio/")||r&&l.startsWith("video/")||ze(e)&&ht.includes(l))}function tl(l){const e=l?.capabilities??[],t=["text/*"];return(e.includes("vision")||e.includes("image"))&&t.push(...mt),e.includes("file")&&t.push("application/pdf"),e.includes("audio")&&t.push("audio/*"),e.includes("video")&&t.push("video/*"),ze(l)&&t.push(...ht),t.join(",")}function sl(l){const e=l?.capabilities??[],t=[];return(e.includes("vision")||e.includes("image"))&&t.push("chat.shared.fileTypeImages"),e.includes("file")&&t.push("chat.shared.fileTypePdfs"),e.includes("audio")&&t.push("chat.shared.fileTypeAudio"),e.includes("video")&&t.push("chat.shared.fileTypeVideo"),ze(l)&&t.push("chat.shared.fileTypeOffice"),{parts:t,count:t.length}}const ft=["smarter","faster","cheaper"],Bs={smarter:"chat.decopilot.tierSmarter",faster:"chat.decopilot.tierFaster",cheaper:"chat.decopilot.tierCheaper"},Ws=[{tier:"smarter",prefixes:["anthropic/claude-opus-4.8","anthropic/claude-sonnet-4.6","anthropic/claude-4.6-sonnet","openai/gpt-5.3-codex","google/gemini-3-pro","google/gemini-2.5-pro","cohere/command-r-plus","cohere/command-a"]},{tier:"faster",prefixes:["anthropic/claude-haiku-4.5","anthropic/claude-4.5-haiku","google/gemini-3-flash","openai/gpt-5.1-codex-mini","x-ai/grok-code-fast","x-ai/grok-3","mistralai/mistral-large","mistralai/codestral","mistralai/mistral-medium","minimax/minimax-m1"]},{tier:"cheaper",prefixes:["google/gemini-2.5-flash-lite","google/gemini-2.5-flash","google/gemini-2.0-flash","deepseek/deepseek-v3","openai/gpt-oss-120b","mistralai/mistral-small","mistralai/pixtral","cohere/command-r"]}],Vs=Ws.flatMap(({tier:l,prefixes:e})=>e.map(t=>({tier:l,prefix:t}))).sort((l,e)=>e.prefix.length-l.prefix.length),Hs="google/gemini-2.5-pro",qe=new Map;function qs(l){const e=qe.get(l);if(e!==void 0)return e;let t=null;if(l.endsWith(":free"))t="cheaper";else for(const{tier:i,prefix:n}of Vs)if(l.startsWith(n)){if(n===Hs&&l.length>n.length&&l[n.length]==="-"){const r=l[n.length+1];if(!r||!/\d/.test(r))continue}t=i;break}return qe.set(l,t),t}function Ge(l){const e={smarter:[],faster:[],cheaper:[],other:[]};for(const t of l){const i=qs(t.modelId);e[i??"other"].push(t)}for(const t of Object.keys(e))e[t].sort((i,n)=>i.title.localeCompare(n.title));return e}const pt="studio:model-shortlist:",Gs=new Set(["anthropic/claude-opus-4.8","anthropic/claude-sonnet-4.6","anthropic/claude-4.6-sonnet","anthropic/claude-sonnet-4.6:extended","openai/gpt-5.3-codex","google/gemini-3-pro-preview","google/gemini-2.5-pro","anthropic/claude-haiku-4.5","anthropic/claude-haiku-4.5-20251001","anthropic/claude-4.5-haiku","google/gemini-3-flash-preview","openai/gpt-5.1-codex-mini","x-ai/grok-code-fast-1","google/gemini-2.5-flash","deepseek/deepseek-v3.2","google/gemini-2.5-flash-lite","openai/gpt-oss-120b:free"]);function Xs(l){try{const e=localStorage.getItem(pt+l);return e?new Set(JSON.parse(e)):null}catch{return null}}function Ys(l,e){localStorage.setItem(pt+l,JSON.stringify([...e]))}function Qs(l){const e=H.c(21),{model:t,onHover:i}=l;let n;e[0]!==t?(n=Pe(t),e[0]=t,e[1]=n):n=e[1];const{displayName:o,provider:r}=n;let c;e[2]!==t?(c=Ae(t),e[2]=t,e[3]=c):c=e[3];const u=c;let d;e[4]!==t||e[5]!==i?(d=()=>i(t),e[4]=t,e[5]=i,e[6]=d):d=e[6];let a;e[7]!==t.title||e[8]!==u?(a=s.jsx("img",{src:u,className:"w-4 h-4 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[7]=t.title,e[8]=u,e[9]=a):a=e[9];let h;e[10]!==o?(h=s.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:o}),e[10]=o,e[11]=h):h=e[11];let p;e[12]!==r?(p=s.jsx("span",{className:"text-xs text-muted-foreground/60 leading-tight",children:r}),e[12]=r,e[13]=p):p=e[13];let m;e[14]!==h||e[15]!==p?(m=s.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[h,p]}),e[14]=h,e[15]=p,e[16]=m):m=e[16];let f;return e[17]!==d||e[18]!==a||e[19]!==m?(f=s.jsxs("div",{className:"flex items-center gap-2.5 py-2 px-3 hover:bg-accent cursor-pointer rounded-lg",onMouseEnter:d,children:[a,m]}),e[17]=d,e[18]=a,e[19]=m,e[20]=f):f=e[20],f}function Js(l){const e=H.c(16),{error:t,onRetry:i}=l,n=se();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"bg-destructive/10 p-2 rounded-full",children:s.jsx(Ct,{className:"size-5 text-destructive"})}),e[0]=o):o=e[0];const r=n("chat.decopilot.failedToLoadModels");let c;e[1]!==r?(c=s.jsx("p",{className:"text-sm font-medium text-foreground",children:r}),e[1]=r,e[2]=c):c=e[2];const u=t?.message||n("chat.decopilot.couldNotFetchModels"),d=" "+n("chat.decopilot.tryAnotherProviderOrRetry");let a;e[3]!==u||e[4]!==d?(a=s.jsxs("p",{className:"text-xs text-muted-foreground max-w-[260px]",children:[u,d]}),e[3]=u,e[4]=d,e[5]=a):a=e[5];let h;e[6]!==c||e[7]!==a?(h=s.jsxs("div",{className:"flex flex-col gap-1",children:[c,a]}),e[6]=c,e[7]=a,e[8]=h):h=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx($t,{className:"size-3.5"}),e[9]=p):p=e[9];const m=n("chat.decopilot.retry");let f;e[10]!==i||e[11]!==m?(f=s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs(le,{variant:"outline",size:"sm",onClick:i,className:"gap-1.5",children:[p,m]})}),e[10]=i,e[11]=m,e[12]=f):f=e[12];let v;return e[13]!==f||e[14]!==h?(v=s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-4 py-8 text-center",children:[o,h,f]}),e[13]=f,e[14]=h,e[15]=v):v=e[15],v}function Zs(){const l=H.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1",children:Array.from({length:6}).map(ei)}),l[0]=e):e=l[0],e}function ei(l,e){return s.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[s.jsx(te,{className:"size-5 shrink-0 rounded-sm"}),s.jsx(te,{className:"flex-1 h-4"}),s.jsx(te,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function Xe(l){const e=H.c(12),{label:t,models:i,onSelect:n,onHover:o}=l;if(i.length===0)return null;let r;e[0]!==t?(r=s.jsx("div",{className:"text-xs font-medium text-muted-foreground px-3 pt-3 pb-1",children:t}),e[0]=t,e[1]=r):r=e[1];let c;if(e[2]!==i||e[3]!==o||e[4]!==n){let d;e[6]!==o||e[7]!==n?(d=a=>s.jsx("div",{onClick:()=>n(a),className:"cursor-pointer",children:s.jsx(Qs,{model:a,onHover:o})},a.modelId),e[6]=o,e[7]=n,e[8]=d):d=e[8],c=i.map(d),e[2]=i,e[3]=o,e[4]=n,e[5]=c}else c=e[5];let u;return e[9]!==r||e[10]!==c?(u=s.jsxs("div",{children:[r,c]}),e[9]=r,e[10]=c,e[11]=u):u=e[11],u}function Ce(l,e){return e(l==="other"?"chat.decopilot.tierOther":Bs[l])}function ti(l){const e=H.c(21),{model:t,isChecked:i,onToggle:n,onHover:o}=l,[r,c]=V.useState(i);r!==i&&c(i);let u;e[0]!==t?(u=Ae(t),e[0]=t,e[1]=u):u=e[1];const d=u;let a;e[2]!==t||e[3]!==o?(a=()=>o(t),e[2]=t,e[3]=o,e[4]=a):a=e[4];let h;e[5]!==t.modelId||e[6]!==n?(h=()=>{c(si),n(t.modelId)},e[5]=t.modelId,e[6]=n,e[7]=h):h=e[7];let p;e[8]!==r||e[9]!==h?(p=s.jsx(Tt,{checked:r,onCheckedChange:h}),e[8]=r,e[9]=h,e[10]=p):p=e[10];let m;e[11]!==d||e[12]!==t.title?(m=s.jsx("img",{src:d,className:"w-5 h-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[11]=d,e[12]=t.title,e[13]=m):m=e[13];let f;e[14]!==t.title?(f=s.jsx("span",{className:"text-sm text-foreground flex-1 min-w-0 line-clamp-1",children:t.title}),e[14]=t.title,e[15]=f):f=e[15];let v;return e[16]!==a||e[17]!==p||e[18]!==m||e[19]!==f?(v=s.jsxs("label",{className:"flex items-center gap-3 min-h-8 py-2.5 px-3 hover:bg-accent cursor-pointer rounded-lg",onMouseEnter:a,children:[p,m,f]}),e[16]=a,e[17]=p,e[18]=m,e[19]=f,e[20]=v):v=e[20],v}function si(l){return!l}function ii(l,e){const t=[];for(const i of ft)if(l[i].length>0){t.push({type:"header",label:Ce(i,e)});for(const n of l[i])t.push({type:"model",model:n})}if(l.other.length>0){t.push({type:"header",label:Ce("other",e)});for(const i of l.other)t.push({type:"model",model:i})}return t}function li({items:l,shortlistSet:e,onToggle:t,onHover:i}){const n=V.useRef(null),o=xs({count:l.length,getScrollElement:()=>n.current,estimateSize:r=>l[r]?.type==="header"?36:44,overscan:6});return s.jsx("div",{ref:n,className:"flex-1 overflow-y-auto",children:s.jsx("div",{className:"relative",style:{height:o.getTotalSize()},children:o.getVirtualItems().map(r=>{const c=l[r.index];return c?s.jsx("div",{"data-index":r.index,ref:o.measureElement,className:"absolute left-0 right-0 top-0 px-0.5",style:{transform:`translateY(${r.start}px)`},children:c.type==="header"?s.jsx("div",{className:"text-xs font-medium text-muted-foreground px-3 pt-3 pb-1",children:c.label}):s.jsx(ti,{model:c.model,isChecked:e.has(c.model.modelId),onToggle:t,onHover:i})},r.key):null})})})}function ni(l){const e=H.c(30),{keyId:t,searchTerm:i,onHover:n,onModelSelect:o,managing:r,onToggleManage:c,filterModels:u}=l,d=se(),{models:a}=Gt(t),h=u?a.filter(u):a.filter(oi);let p;e[0]!==t?(p=()=>(t?Xs(t):null)??Gs,e[0]=t,e[1]=p):p=e[1];const[m,f]=V.useState(p),[,v]=V.useTransition();let N;e[2]!==t||e[3]!==v?(N=g=>{t&&v(()=>{f(S=>{const E=new Set(S);return E.has(g)?E.delete(g):E.add(g),Ys(t,E),E})})},e[2]=t,e[3]=v,e[4]=N):N=e[4];const b=N,j=i.toLowerCase().trim(),w=g=>j?g.filter(S=>S.title.toLowerCase().includes(j)||S.modelId.toLowerCase().includes(j)):g;if(r){const g=Ge(w(h)),S=ii(g,d);let E;e[5]!==m?(E=R=>m.has(R.modelId),e[5]=m,e[6]=E):E=e[6];const P=h.filter(E).length;let A;e[7]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(lt,{size:14}),e[7]=A):A=e[7];let L;e[8]!==d?(L=d("chat.decopilot.back"),e[8]=d,e[9]=L):L=e[9];let z;return e[10]!==c||e[11]!==L?(z=s.jsxs("button",{type:"button",onClick:c,className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground cursor-pointer",children:[A,L]}),e[10]=c,e[11]=L,e[12]=z):z=e[12],s.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[z,s.jsx("span",{className:"text-xs text-muted-foreground",children:d("chat.decopilot.selectedCount",{count:P})})]}),s.jsx(li,{items:S,shortlistSet:m,onToggle:b,onHover:n})]})}let O;e[13]!==m?(O=g=>m.has(g.modelId),e[13]=m,e[14]=O):O=e[14];const _=h.filter(O),I=_.length>0?_:h,x=Ge(w(I));let k;e[15]!==x||e[16]!==n||e[17]!==o||e[18]!==d?(k=ft.map(g=>s.jsx(Xe,{label:Ce(g,d),models:x[g],onSelect:o,onHover:n},g)),e[15]=x,e[16]=n,e[17]=o,e[18]=d,e[19]=k):k=e[19];let C;e[20]!==d?(C=Ce("other",d),e[20]=d,e[21]=C):C=e[21];let M;e[22]!==x.other||e[23]!==n||e[24]!==o||e[25]!==C?(M=s.jsx(Xe,{label:C,models:x.other,onSelect:o,onHover:n}),e[22]=x.other,e[23]=n,e[24]=o,e[25]=C,e[26]=M):M=e[26];let y;return e[27]!==k||e[28]!==M?(y=s.jsxs("div",{className:"flex-1 overflow-y-auto px-0.5 pt-1 [touch-action:pan-y]",children:[k,M]}),e[27]=k,e[28]=M,e[29]=y):y=e[29],y}function oi(l){return l.asyncResearch!==!0}function ri(){const l=H.c(6);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",children:s.jsxs("div",{className:"flex items-center gap-2.5 h-12 px-4",children:[s.jsx(te,{className:"size-4 shrink-0"}),s.jsx(te,{className:"flex-1 h-6"}),s.jsx(te,{className:"w-[140px] h-8 shrink-0"})]})}),l[0]=e):e=l[0];let t;l[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex-1 flex flex-col md:border-r md:w-[420px] md:min-w-[420px] min-h-0 overflow-hidden",children:[e,s.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1",children:Array.from({length:8}).map(ai)})]}),l[1]=t):t=l[1];let i;l[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx(te,{className:"size-6 shrink-0"}),s.jsx(te,{className:"h-6 w-32"})]}),l[2]=i):i=l[2];let n;l[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[i,s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(te,{className:"h-6 w-20 rounded-md"}),s.jsx(te,{className:"h-6 w-24 rounded-md"})]})]}),l[3]=n):n=l[3];let o;l[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(te,{className:"h-4 w-24"}),s.jsx(te,{className:"h-4 w-32"})]}),l[4]=o):o=l[4];let r;return l[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col md:flex-row h-full sm:h-[460px] min-h-0",children:[t,s.jsx("div",{className:"hidden md:block md:w-[320px] md:shrink-0 p-3",children:s.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[n,s.jsxs("div",{className:"flex flex-col gap-4",children:[o,s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(te,{className:"h-4 w-16"}),s.jsx(te,{className:"h-4 w-40"})]})]})]})})]}),l[5]=r):r=l[5],r}function ai(l,e){return s.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[s.jsx(te,{className:"size-5 shrink-0 rounded-sm"}),s.jsx(te,{className:"flex-1 h-4"}),s.jsx(te,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function xt(l){const e=H.c(66),{onClose:t,credentialId:i,onCredentialChange:n,selectedModel:o,onModelChange:r,filterModels:c,compact:u}=l,d=se(),[a,h]=V.useState(null),[p,m]=V.useState(""),[f,v]=V.useState(!1),N=V.useRef(null),b=Te(),j=qt();let w;e[0]!==b?.providers?(w=Object.fromEntries((b?.providers??[]).map(ui)),e[0]=b?.providers,e[1]=w):w=e[1];const O=w,_=Nt(),{org:I}=ve();let x;e[2]!==n?(x=T=>{n(T),h(null)},e[2]=n,e[3]=x):x=e[3];const k=x;let C;e[4]!==i||e[5]!==t||e[6]!==r?(C=T=>{i&&(r(T),m(""),t())},e[4]=i,e[5]=t,e[6]=r,e[7]=C):C=e[7];const M=C;if(j.length===0){const T=!u&&"sm:w-[740px]";let F;e[8]!==T?(F=ie("flex items-center justify-center p-8 w-full",T),e[8]=T,e[9]=F):F=e[9];let $;e[10]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(Ls,{}),e[10]=$):$=e[10];let U;return e[11]!==F?(U=s.jsx("div",{className:F,children:$}),e[11]=F,e[12]=U):U=e[12],U}const y=u?"sm:h-[420px]":"sm:h-[460px]";let g;e[13]!==y?(g=ie("flex flex-col md:flex-row h-full min-h-0",y),e[13]=y,e[14]=g):g=e[14];const S=u?"w-full":"md:border-r md:w-[420px] md:min-w-[420px]";let E;e[15]!==S?(E=ie("flex-1 flex flex-col min-h-0 overflow-hidden",S),e[15]=S,e[16]=E):E=e[16];let P;e[17]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(nt,{size:16,className:"text-muted-foreground shrink-0"}),e[17]=P):P=e[17];let A;e[18]!==f||e[19]!==d?(A=d(f?"chat.decopilot.searchAllModels":"chat.decopilot.searchForModel"),e[18]=f,e[19]=d,e[20]=A):A=e[20];let L;e[21]===Symbol.for("react.memo_cache_sentinel")?(L=T=>m(T.target.value),e[21]=L):L=e[21];let z;e[22]!==p||e[23]!==A?(z=s.jsx(pe,{ref:N,type:"text",placeholder:A,value:p,onChange:L,className:"flex-1 min-w-0 border-0 !shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[22]=p,e[23]=A,e[24]=z):z=e[24];let R;e[25]!==i||e[26]!==k||e[27]!==j||e[28]!==O||e[29]!==d?(R=j.length>0&&s.jsxs(At,{value:i??"",onValueChange:k,children:[s.jsxs(Pt,{size:"sm",className:"w-auto max-w-[140px] h-8 shrink-0 gap-1.5 px-2 [&>svg:last-child]:hidden",onClick:di,children:[s.jsx(zt,{placeholder:d("chat.decopilot.key"),children:(()=>{const T=j.find(re=>re.id===i),F=T?O[T.providerId]:void 0,$=je(T?.presetId),U=$?.logo??F?.logo,B=$?.name??F?.name??T?.providerId??"Key";return s.jsxs("span",{className:"flex items-center gap-1.5 min-w-0",children:[U?s.jsx("img",{src:U,alt:B,className:"w-4 h-4 rounded shrink-0 dark:bg-white dark:rounded-sm dark:p-px"}):s.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:B.slice(0,1).toUpperCase()}),s.jsx("span",{className:"text-xs truncate",children:B})]})})()}),s.jsx(Vt,{className:"size-4 opacity-50 shrink-0 pointer-events-none"})]}),s.jsx(Dt,{children:j.map(T=>{const F=O[T.providerId],$=je(T.presetId),U=$?.logo??F?.logo,B=$?.name??F?.name??T.providerId;return s.jsx(Rt,{value:T.id,children:s.jsxs("div",{className:"flex items-center gap-2",children:[U?s.jsx("img",{src:U,alt:B,className:"w-4 h-4 rounded dark:bg-white dark:rounded-sm dark:p-px"}):s.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:B.slice(0,1).toUpperCase()}),s.jsxs("span",{children:[B," — ",T.label]})]})},T.id)})})]}),e[25]=i,e[26]=k,e[27]=j,e[28]=O,e[29]=d,e[30]=R):R=e[30];let K;e[31]!==z||e[32]!==R?(K=s.jsx("div",{className:"border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 pr-12 md:pr-4 cursor-text",children:[P,z,R]})}),e[31]=z,e[32]=R,e[33]=K):K=e[33];let D;e[34]!==i?(D=T=>{const{error:F,resetError:$}=T;return s.jsx(Js,{error:F,onRetry:$,credentialId:i??void 0})},e[34]=i,e[35]=D):D=e[35];let W;e[36]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Zs,{}),e[36]=W):W=e[36];const Q=i??void 0;let J;e[37]===Symbol.for("react.memo_cache_sentinel")?(J=()=>v(ci),e[37]=J):J=e[37];let Z;e[38]!==c||e[39]!==M||e[40]!==f||e[41]!==p||e[42]!==Q?(Z=s.jsx(V.Suspense,{fallback:W,children:s.jsx(ni,{keyId:Q,searchTerm:p,onHover:h,onModelSelect:M,managing:f,onToggleManage:J,filterModels:c})}),e[38]=c,e[39]=M,e[40]=f,e[41]=p,e[42]=Q,e[43]=Z):Z=e[43];let X;e[44]!==i||e[45]!==D||e[46]!==Z?(X=s.jsx(kt,{fallback:D,children:Z},i),e[44]=i,e[45]=D,e[46]=Z,e[47]=X):X=e[47];let ee;e[48]!==f||e[49]!==_||e[50]!==I||e[51]!==d?(ee=!f&&s.jsxs("div",{className:"border-t border-border flex",children:[s.jsxs("button",{type:"button",onClick:()=>V.startTransition(()=>v(!0)),className:"flex items-center gap-2 flex-1 px-4 py-2.5 text-xs text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer",children:[s.jsx(Kt,{className:"size-3.5 shrink-0"}),d("chat.decopilot.manageModels")]}),s.jsx("div",{className:"w-px bg-border shrink-0"}),s.jsxs("button",{type:"button",onClick:()=>_({to:"/$org/settings/ai-providers",params:{org:I.slug}}),className:"flex items-center gap-2 flex-1 px-4 py-2.5 text-xs text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer",children:[s.jsx(Ht,{className:"size-3.5 shrink-0"}),d("chat.decopilot.manageApiKeys")]})]}),e[48]=f,e[49]=_,e[50]=I,e[51]=d,e[52]=ee):ee=e[52];let q;e[53]!==K||e[54]!==X||e[55]!==ee||e[56]!==E?(q=s.jsxs("div",{className:E,children:[K,X,ee]}),e[53]=K,e[54]=X,e[55]=ee,e[56]=E,e[57]=q):q=e[57];let G;e[58]!==u||e[59]!==a||e[60]!==o?(G=!u&&s.jsx("div",{className:"hidden md:flex md:flex-col md:w-[320px] md:shrink-0 p-3",children:s.jsx(Ks,{model:a??o??null})}),e[58]=u,e[59]=a,e[60]=o,e[61]=G):G=e[61];let Y;return e[62]!==q||e[63]!==G||e[64]!==g?(Y=s.jsxs("div",{className:g,children:[q,G]}),e[62]=q,e[63]=G,e[64]=g,e[65]=Y):Y=e[65],Y}function ci(l){return!l}function di(l){return l.stopPropagation()}function ui(l){return[l.id,l]}function mi(l){const e=H.c(12),{onClose:t}=l,{credentialId:i,setCredentialId:n,selectedModel:o,setModel:r}=Le();let c;e[0]!==n?(c=a=>{ne("chat_credential_changed",{credential_id:a}),n(a)},e[0]=n,e[1]=c):c=e[1];let u;e[2]!==i||e[3]!==o?.modelId||e[4]!==r?(u=a=>{i&&(ne("chat_model_changed",{from_model_id:o?.modelId??null,to_model_id:a.modelId,to_model_provider:a.providerId??null,credential_id:i}),r({...a,keyId:i}))},e[2]=i,e[3]=o?.modelId,e[4]=r,e[5]=u):u=e[5];let d;return e[6]!==i||e[7]!==t||e[8]!==o||e[9]!==c||e[10]!==u?(d=s.jsx(xt,{onClose:t,credentialId:i,onCredentialChange:c,selectedModel:o,onModelChange:u}),e[6]=i,e[7]=t,e[8]=o,e[9]=c,e[10]=u,e[11]=d):d=e[11],d}function hi(l){const e=H.c(2),{onClose:t}=l;let i;return e[0]!==t?(i=s.jsx(mi,{onClose:t}),e[0]=t,e[1]=i):i=e[1],i}function fi(l){const e=H.c(2);let t;return e[0]!==l?(t=s.jsx(xt,{...l}),e[0]=l,e[1]=t):t=e[1],t}const pi=[{tier:"fast",labelKey:"chat.desktopCli.tierFastDescription"},{tier:"smart",labelKey:"chat.desktopCli.tierSmartDescription"},{tier:"thinking",labelKey:"chat.desktopCli.tierThinkingDescription"}];function gt(l){const e=H.c(11),{modelSet:t,selectedModelId:i,onSelect:n}=l,o=se();let r,c;if(e[0]!==t.logo||e[1]!==t.models||e[2]!==t.tiers||e[3]!==n||e[4]!==i||e[5]!==o){const d=Object.fromEntries(t.models.map(xi));r="flex flex-col p-2 w-[320px]",c=pi.map(a=>{const{tier:h,labelKey:p}=a,m=t.tiers[h];if(!m.modelId)return null;const f=d[m.modelId];if(!f)return null;const v=i===m.modelId;return s.jsxs("button",{type:"button",onClick:()=>n(f),className:ie("flex items-center gap-3 px-3 py-2.5 rounded-lg text-left hover:bg-accent",v&&"bg-accent/50"),children:[s.jsx("img",{src:t.logo,alt:m.label,className:"size-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),s.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:m.label}),s.jsx("span",{className:"text-xs text-muted-foreground leading-tight",children:o(p)})]})]},h)}),e[0]=t.logo,e[1]=t.models,e[2]=t.tiers,e[3]=n,e[4]=i,e[5]=o,e[6]=r,e[7]=c}else r=e[6],c=e[7];let u;return e[8]!==r||e[9]!==c?(u=s.jsx("div",{className:r,children:c}),e[8]=r,e[9]=c,e[10]=u):u=e[10],u}function xi(l){return[l.modelId,l]}const gi=[{providerId:"claude-code",modelId:"claude-code:haiku",title:"Claude Code Haiku",description:"Fast and lightweight",capabilities:["text"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:sonnet",title:"Claude Code Sonnet 5",description:"Balanced performance",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus",title:"Claude Code Opus",description:"Most capable",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus-1m",title:"Claude Code Opus 5 1M",description:"Most capable, 1M context window",capabilities:["text","reasoning"],limits:{contextWindow:1e6,maxOutputTokens:null},costs:null}],Ne="https://assets.decocache.com/decocms/6ac44f1c-c0cf-4480-84b5-2ae6fe742d0b/codex-app.png.png",vi=[{providerId:"codex",modelId:"codex:gpt-5.6-sol",title:"GPT-5.6 Sol",description:"Frontier Codex model for deep reasoning, complex coding, and real-world work",capabilities:["text","reasoning"],logo:Ne,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.6-terra",title:"GPT-5.6 Terra",description:"Balanced Codex model for everyday coding and agent work",capabilities:["text","reasoning"],logo:Ne,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.6-luna",title:"GPT-5.6 Luna",description:"Fast Codex model for lightweight coding tasks and titles",capabilities:["text","reasoning"],logo:Ne,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.3-codex-spark",title:"GPT-5.3 Codex Spark",description:"Ultra-fast coding model",capabilities:["text","reasoning"],logo:Ne,limits:null,costs:null}],bi="https://decoims.com/decocms/93e4059c-e598-412b-87eb-54d72a946ec8/claude-stroke-rounded.svg",yi="https://decoims.com/decocms/9170ffd4-b9cc-4661-ad8f-ae2eea019e00/codex.svg";function ji(l){return{fast:{modelId:"claude-code:haiku",label:l("chat.agentModels.haikuLabel"),description:l("chat.agentModels.quickerResponses"),iconNode:s.jsx(xe,{size:16})},smart:{modelId:"claude-code:sonnet",label:l("chat.agentModels.sonnetLabel"),description:l("chat.agentModels.balancedQuality"),iconNode:s.jsx(xe,{size:16})},thinking:{modelId:"claude-code:opus-1m",label:l("chat.agentModels.opusLabel"),description:l("chat.agentModels.deeperReasoning"),iconNode:s.jsx(xe,{size:16})}}}function Si(l){return{fast:{modelId:"codex:gpt-5.6-luna",label:l("chat.agentModels.gptLunaLabel"),description:l("chat.agentModels.quickerResponses"),iconNode:s.jsx(ge,{size:16})},smart:{modelId:"codex:gpt-5.6-terra",label:l("chat.agentModels.gptTerraLabel"),description:l("chat.agentModels.balancedQuality"),iconNode:s.jsx(ge,{size:16})},thinking:{modelId:"codex:gpt-5.6-sol",label:l("chat.agentModels.gptSolLabel"),description:l("chat.agentModels.deeperReasoning"),iconNode:s.jsx(ge,{size:16})}}}function vt(l,e){return l==="claude-code"?{logo:bi,tiers:ji(e),models:gi}:l==="codex"?{logo:yi,tiers:Si(e),models:vi}:null}function Ni(l){const e=H.c(12),{onClose:t,agent:i}=l,n=se(),o=Le(),r=i??o.pendingHarnessId??"decopilot";let c;e[0]!==r||e[1]!==n?(c=vt(r,n),e[0]=r,e[1]=n,e[2]=c):c=e[2];const u=c;if(!u){let p;return e[3]!==t?(p=s.jsx(hi,{onClose:t}),e[3]=t,e[4]=p):p=e[4],p}const d=o.selectedModel?.modelId??u.tiers[o.simpleModeTier].modelId;let a;e[5]!==t||e[6]!==o?(a=p=>{o.setModel({...p,keyId:void 0}),t()},e[5]=t,e[6]=o,e[7]=a):a=e[7];let h;return e[8]!==u||e[9]!==d||e[10]!==a?(h=s.jsx(gt,{modelSet:u,selectedModelId:d,onSelect:a}),e[8]=u,e[9]=d,e[10]=a,e[11]=h):h=e[11],h}function ki(l){const e=H.c(14);let t,i;e[0]!==l?({agent:t,...i}=l,e[0]=l,e[1]=t,e[2]=i):(t=e[1],i=e[2]);const n=se();let o;e[3]!==t||e[4]!==n?(o=t?vt(t,n):null,e[3]=t,e[4]=n,e[5]=o):o=e[5];const r=o;if(!r){let a;return e[6]!==i?(a=s.jsx(fi,{...i}),e[6]=i,e[7]=a):a=e[7],a}const c=i.selectedModel?.modelId??r.tiers.smart.modelId;let u;e[8]!==i?(u=a=>{i.onModelChange(a),i.onClose()},e[8]=i,e[9]=u):u=e[9];let d;return e[10]!==r||e[11]!==c||e[12]!==u?(d=s.jsx(gt,{modelSet:r,selectedModelId:c,onSelect:u}),e[10]=r,e[11]=c,e[12]=u,e[13]=d):d=e[13],d}function il(l){const e=H.c(49),{variant:t,className:i,placeholder:n,model:o,isLoading:r,credentialId:c,onCredentialChange:u,onModelChange:d,filterModels:a,agent:h}=l,p=t===void 0?"borderless":t,m=n===void 0?"Select model":n,f=se(),[v,N]=V.useState(!1),b=d!==void 0,j=Ot(),w=p==="borderless"?"ghost":"outline",O=p==="borderless"&&"md:border-none";let _;e[0]!==i||e[1]!==O?(_=ie("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",O,i),e[0]=i,e[1]=O,e[2]=_):_=e[2];let I;e[3]!==r||e[4]!==o||e[5]!==m||e[6]!==b?(I=b?s.jsx(ut,{model:o??null,placeholder:m,isLoading:r}):s.jsx(wi,{placeholder:m}),e[3]=r,e[4]=o,e[5]=m,e[6]=b,e[7]=I):I=e[7];let x;e[8]!==w||e[9]!==_||e[10]!==I?(x=s.jsx(le,{variant:w,size:"sm",className:_,children:I}),e[8]=w,e[9]=_,e[10]=I,e[11]=x):x=e[11];const k=x;let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(ri,{}),e[12]=C):C=e[12];let M;e[13]!==h||e[14]!==c||e[15]!==a||e[16]!==o||e[17]!==u||e[18]!==d||e[19]!==b?(M=s.jsx(V.Suspense,{fallback:C,children:b?s.jsx(ki,{onClose:()=>N(!1),agent:h,credentialId:c??null,onCredentialChange:u??Ci,selectedModel:o??null,onModelChange:d,filterModels:a}):s.jsx(Ni,{onClose:()=>N(!1),agent:h})}),e[13]=h,e[14]=c,e[15]=a,e[16]=o,e[17]=u,e[18]=d,e[19]=b,e[20]=M):M=e[20];const y=M;if(j){let L;e[21]!==k?(L=s.jsx(It,{asChild:!0,children:k}),e[21]=k,e[22]=L):L=e[22];let z;e[23]!==f?(z=f("chat.selectModel.selectModel"),e[23]=f,e[24]=z):z=e[24];let R;e[25]!==z?(R=s.jsx(_t,{className:"sr-only",children:z}),e[25]=z,e[26]=R):R=e[26];let K;e[27]!==y?(K=s.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:y}),e[27]=y,e[28]=K):K=e[28];let D;e[29]!==R||e[30]!==K?(D=s.jsxs(Mt,{className:"p-0 flex flex-col max-h-[95vh]",children:[R,K]}),e[29]=R,e[30]=K,e[31]=D):D=e[31];let W;return e[32]!==v||e[33]!==L||e[34]!==D?(W=s.jsxs(Et,{open:v,onOpenChange:N,children:[L,D]}),e[32]=v,e[33]=L,e[34]=D,e[35]=W):W=e[35],W}let g;e[36]!==k?(g=s.jsx(wt,{asChild:!0,children:k}),e[36]=k,e[37]=g):g=e[37];let S;e[38]!==f?(S=f("chat.selectModel.selectModel"),e[38]=f,e[39]=S):S=e[39];let E;e[40]!==S?(E=s.jsx(Oe,{className:"sr-only",children:S}),e[40]=S,e[41]=E):E=e[41];let P;e[42]!==y||e[43]!==E?(P=s.jsxs(Ee,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[E,y]}),e[42]=y,e[43]=E,e[44]=P):P=e[44];let A;return e[45]!==v||e[46]!==g||e[47]!==P?(A=s.jsxs(Me,{open:v,onOpenChange:N,children:[g,P]}),e[45]=v,e[46]=g,e[47]=P,e[48]=A):A=e[48],A}function Ci(){}function wi(l){const e=H.c(4),{placeholder:t}=l,{selectedModel:i,isModelsLoading:n}=Le();let o;return e[0]!==n||e[1]!==i||e[2]!==t?(o=s.jsx(ut,{model:i,placeholder:t,isLoading:n}),e[0]=n,e[1]=i,e[2]=t,e[3]=o):o=e[3],o}export{ls as C,ri as M,Ls as N,dt as P,ki as a,xe as b,ge as c,tl as d,il as e,je as f,sl as g,_s as h,el as i,Zi as l,ze as m};