decocms 4.449.1 → 4.451.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 (367) hide show
  1. package/dist/client/assets/{AlertCircle-CZ2r-6fw.js → AlertCircle-DrwoGJpd.js} +1 -1
  2. package/dist/client/assets/{AreaChart-FS3XyoCE.js → AreaChart-BAAHWXOl.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-CUyvjw-L.js → ArrowLeft-DKYwT7KB.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-DL-SqfEN.js → ArrowUp-NsPNRi9p.js} +1 -1
  5. package/dist/client/assets/{Building02-DHvWrFPu.js → Building02-DlH3FV2M.js} +1 -1
  6. package/dist/client/assets/{CartesianChart--cOSR3Jk.js → CartesianChart-8XeONUcg.js} +1 -1
  7. package/dist/client/assets/{Check-Xxxm4n9N.js → Check-BcGsLSsp.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-BIdsej-O.js → CheckCircle-iXm3h-fF.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-CjbQc22U.js → ChevronUp-BAvbedXO.js} +1 -1
  10. package/dist/client/assets/{Copy01-BsGAkEj7.js → Copy01-C_KnfAlj.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-CdUq8Vzt.js → CreditCard01-B7CL5INn.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-B7TYh03O.js → DotsVertical-wjfpXF6W.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-R_14A7h7.js → ErrorBarContext-JpptrruU.js} +1 -1
  14. package/dist/client/assets/{Image01-Cm62Gz39.js → Image01-BVwA4uCp.js} +1 -1
  15. package/dist/client/assets/{Key01-ClO0ouA9.js → Key01-C3aJH3VU.js} +1 -1
  16. package/dist/client/assets/{Line-BMudRu9O.js → Line-CE2RR3X9.js} +1 -1
  17. package/dist/client/assets/{Link01-jFnxVzfa.js → Link01-BezCCi1I.js} +1 -1
  18. package/dist/client/assets/{LinkBroken01-DAzor-5J.js → LinkBroken01-CYAPpruG.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-CRGszGOd.js → LinkExternal01-D_cGFYPK.js} +1 -1
  20. package/dist/client/assets/{Monitor01-Cx1CPXa6.js → Monitor01-R0RI8JD-.js} +1 -1
  21. package/dist/client/assets/{Palette-Bw3lu3zp.js → Palette-Bh_thK5-.js} +1 -1
  22. package/dist/client/assets/{Plus-CB7d6UWu.js → Plus-GNsqHUli.js} +1 -1
  23. package/dist/client/assets/{SearchMd-L7QUcOTu.js → SearchMd-DeSQISfo.js} +1 -1
  24. package/dist/client/assets/{Sector-BfSkdIGm.js → Sector-CPFqrWxD.js} +1 -1
  25. package/dist/client/assets/{ShoppingBag01-sD-3dhUV.js → ShoppingBag01-P4dMHDVk.js} +1 -1
  26. package/dist/client/assets/{Sun-BY5kKfkJ.js → Sun-7PdNidQ5.js} +1 -1
  27. package/dist/client/assets/{Tool01-D45Ut_f6.js → Tool01-CWjV8YTI.js} +1 -1
  28. package/dist/client/assets/{Trash01-CDoa1NJh.js → Trash01-BJ_e57Kj.js} +1 -1
  29. package/dist/client/assets/{Upload01-B-X-AhmC.js → Upload01-3jf5OQDv.js} +1 -1
  30. package/dist/client/assets/{User01-DB2iYIZ6.js → User01-CN7JcgS_.js} +1 -1
  31. package/dist/client/assets/{UserSquare-C8QKc8iC.js → UserSquare-CEkD4_s5.js} +1 -1
  32. package/dist/client/assets/{Users01-CM8VThr8.js → Users01-B-RFC-RT.js} +1 -1
  33. package/dist/client/assets/{X-BB3WvJxy.js → X-DvEbwZ22.js} +1 -1
  34. package/dist/client/assets/{XAxis-qZdw3jBu.js → XAxis-DdJd7RhS.js} +1 -1
  35. package/dist/client/assets/{XClose-knQXpnnU.js → XClose-eArhRgkd.js} +1 -1
  36. package/dist/client/assets/{ZoomOut-Cq_Zt2ir.js → ZoomOut-B5FfXkUf.js} +1 -1
  37. package/dist/client/assets/{access-gate-CMQ4v3QC.js → access-gate-Cno0bRAg.js} +1 -1
  38. package/dist/client/assets/{add-connection-dialog-DlAKTxBm.js → add-connection-dialog-BRrDiP3N.js} +1 -1
  39. package/dist/client/assets/{agent-analytics-mlEzY5zy.js → agent-analytics-ZqkZ1GcW.js} +1 -1
  40. package/dist/client/assets/agent-app-DrzBZfr1.js +1 -0
  41. package/dist/client/assets/{agent-assets-Dd8Wyh0x.js → agent-assets-2FdntYeU.js} +1 -1
  42. package/dist/client/assets/{agent-automation-WHMHg6XB.js → agent-automation-DeOilbKj.js} +1 -1
  43. package/dist/client/assets/{agent-automations-B9OGThwg.js → agent-automations-CU5BfClm.js} +1 -1
  44. package/dist/client/assets/{agent-connect-sources-BOsscNwu.js → agent-connect-sources-BlWCNkZ9.js} +1 -1
  45. package/dist/client/assets/agent-deck-CMkJu0nT.js +1 -0
  46. package/dist/client/assets/{agent-e2e-C1js2PVO.js → agent-e2e-Dp5CImx5.js} +1 -1
  47. package/dist/client/assets/{agent-experiments-C8kLOiyW.js → agent-experiments-CT9FOKqn.js} +1 -1
  48. package/dist/client/assets/{agent-file-CF2jQWCf.js → agent-file-BWzZimsi.js} +1 -1
  49. package/dist/client/assets/{agent-git-BMtQgaRT.js → agent-git-C1iinKRI.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-Co798KFZ.js → agent-hosting-BsslI9uH.js} +1 -1
  51. package/dist/client/assets/agent-icon-CfuzWIKW.js +1 -0
  52. package/dist/client/assets/agent-library-BnziJi08.js +1 -0
  53. package/dist/client/assets/agent-library-file-Cf4X2sXR.js +1 -0
  54. package/dist/client/assets/{agent-monitor-BOIQ7Aqz.js → agent-monitor-C2aIDenY.js} +1 -1
  55. package/dist/client/assets/{agent-overview-DKSCuoWD.js → agent-overview-DDbsx1gU.js} +1 -1
  56. package/dist/client/assets/agent-settings-CXCG6lM5.js +1 -0
  57. package/dist/client/assets/agent-site-editor-code-BA8Iz10L.js +2 -0
  58. package/dist/client/assets/agent-site-editor-content-Cboi32wv.js +9 -0
  59. package/dist/client/assets/{agent-site-editor-preview-DjK1fgkE.js → agent-site-editor-preview-C9chmhlV.js} +3 -3
  60. package/dist/client/assets/{agent-site-editor-RvFdvBuC.js → agent-site-editor-xt5GtnuW.js} +1 -1
  61. package/dist/client/assets/agent-view-CWGAdnJH.js +1 -0
  62. package/dist/client/assets/{agent-view-guard-BW6hQdkX.js → agent-view-guard-Vq5CpblU.js} +1 -1
  63. package/dist/client/assets/{agents-list-CPKokLjm.js → agents-list-L_NaMW9r.js} +1 -1
  64. package/dist/client/assets/{ai-providers-lnTymIIa.js → ai-providers-C1Gld-NP.js} +1 -1
  65. package/dist/client/assets/{alert-CyIaIZtA.js → alert-DSDuF6qI.js} +1 -1
  66. package/dist/client/assets/{alert-dialog-Bkxa5kpY.js → alert-dialog-BbSmZoVi.js} +1 -1
  67. package/dist/client/assets/{analytics-sections-VpFg-3NF.js → analytics-sections-B7erlEU9.js} +1 -1
  68. package/dist/client/assets/{api-keys-BsUUQFi9.js → api-keys-DJHmuI-k.js} +1 -1
  69. package/dist/client/assets/api-keys-bQee7GZd.js +1 -0
  70. package/dist/client/assets/app-editor-BUUQAodh.js +1 -0
  71. package/dist/client/assets/{asset-utils-CEIfOX2f.js → asset-utils-CiYXoNyJ.js} +1 -1
  72. package/dist/client/assets/{auth-bIc0P9RV.js → auth-5kOh9gsa.js} +1 -1
  73. package/dist/client/assets/{auth-catchall-C58S_HOO.js → auth-catchall-DxlXq7tK.js} +1 -1
  74. package/dist/client/assets/{auth-entry-Dtfj-HKj.js → auth-entry-Exunf2v5.js} +1 -1
  75. package/dist/client/assets/{auth-split-layout-CotD4M6V.js → auth-split-layout-BAIpdvCx.js} +1 -1
  76. package/dist/client/assets/{authenticate-and-persist-oauth-CPk9K9qy.js → authenticate-and-persist-oauth-IbhNDJn9.js} +1 -1
  77. package/dist/client/assets/{automation-list-row-DmmPl7Bw.js → automation-list-row-BGPK9DDr.js} +1 -1
  78. package/dist/client/assets/{automation-runs-DVnZHoMd.js → automation-runs-79Bdx95q.js} +1 -1
  79. package/dist/client/assets/{automations-BCKWj8gN.js → automations-DEsgrDFl.js} +1 -1
  80. package/dist/client/assets/{autosend-Cgp0Kt47.js → autosend-CsHrH9Xo.js} +1 -1
  81. package/dist/client/assets/{avatar-BW3U9bUq.js → avatar-CrasAAzq.js} +1 -1
  82. package/dist/client/assets/{badge-DRtzW34c.js → badge-BrDXjbHd.js} +1 -1
  83. package/dist/client/assets/block-document-CWFqlSnH.js +3 -0
  84. package/dist/client/assets/{blocks-preview-workspace-context-CIe2ZImm.js → blocks-preview-workspace-context-DAcrAS0Y.js} +1 -1
  85. package/dist/client/assets/{blog-schema-BoXFEaF0.js → blog-schema-CpOSYi5o.js} +1 -1
  86. package/dist/client/assets/{buckets-B66lPPhY.js → buckets-CJHv6B92.js} +1 -1
  87. package/dist/client/assets/{build-improve-prompt-doc-ARaFWjqz.js → build-improve-prompt-doc-Dp9hBbaC.js} +1 -1
  88. package/dist/client/assets/{calendar-aTytw_rp.js → calendar-DJbd_Mk0.js} +1 -1
  89. package/dist/client/assets/{capability-load-error-B2aK95hA.js → capability-load-error-B8JQAANB.js} +1 -1
  90. package/dist/client/assets/category-editor-DdyY6pMr.js +1 -0
  91. package/dist/client/assets/{chart-BS6TSfxM.js → chart-CrYOX1s7.js} +1 -1
  92. package/dist/client/assets/{chat-context-D_aG2yAX.js → chat-context-CbVc7tEo.js} +1 -1
  93. package/dist/client/assets/{chat-draft-kw4JBxuT.js → chat-draft-DCJfKWx2.js} +1 -1
  94. package/dist/client/assets/{checkbox-DnZkZOM8.js → checkbox-C68xjrg5.js} +1 -1
  95. package/dist/client/assets/{choose-editor-C3yqk0fB.js → choose-editor-9DBH_8WX.js} +1 -1
  96. package/dist/client/assets/{claim-phase-copy-BoMuJBb0.js → claim-phase-copy-C42LUZgr.js} +1 -1
  97. package/dist/client/assets/{cli-auth-success-DbteZLq9.js → cli-auth-success-CQ-Ph_Z8.js} +1 -1
  98. package/dist/client/assets/{client-icons-uj1PKgBg.js → client-icons-B2afUpOp.js} +1 -1
  99. package/dist/client/assets/{collapsible-B1Xa1jKR.js → collapsible-BouI-hE9.js} +1 -1
  100. package/dist/client/assets/{collection-detail-D36i0K3U.js → collection-detail-BIyd346E.js} +1 -1
  101. package/dist/client/assets/{collection-display-button-uMlnRYuM.js → collection-display-button-CJGrnpdv.js} +1 -1
  102. package/dist/client/assets/{collection-search-BM261TmD.js → collection-search-FRa3rbYr.js} +1 -1
  103. package/dist/client/assets/{collection-table-wrapper-xxoxiw2q.js → collection-table-wrapper-CWM8G_TB.js} +1 -1
  104. package/dist/client/assets/{collection-tabs-CjB8WZDI.js → collection-tabs-JVe-o8Om.js} +1 -1
  105. package/dist/client/assets/{column-rules-DZ44MUki.js → column-rules-D2GeNGaF.js} +1 -1
  106. package/dist/client/assets/{combobox-BDneKP5k.js → combobox-BYzyVsfP.js} +1 -1
  107. package/dist/client/assets/{command-DRa5QzcI.js → command-DA3SiBwF.js} +1 -1
  108. package/dist/client/assets/{companion-mcps-section-CdCBY4T-.js → companion-mcps-section-nJ90DS7n.js} +1 -1
  109. package/dist/client/assets/{config-CAfwygQ8.js → config-CiQU6gsO.js} +1 -1
  110. package/dist/client/assets/{connect-CvjEKlf6.js → connect-BfDqgAhE.js} +1 -1
  111. package/dist/client/assets/{connect-layout-CAq_juBv.js → connect-layout-D9lxOI4T.js} +1 -1
  112. package/dist/client/assets/{connection-CcGTFKQt.js → connection-B1RIZdkW.js} +1 -1
  113. package/dist/client/assets/{connection-card-xm3ewa1i.js → connection-card-CBKnCj0k.js} +1 -1
  114. package/dist/client/assets/{connection-detail-BVWn0aEu.js → connection-detail-DCoDGHIg.js} +1 -1
  115. package/dist/client/assets/{connection-form-helpers-R9FNwPaA.js → connection-form-helpers-CTzk01jW.js} +1 -1
  116. package/dist/client/assets/{connections-DhDNHYXZ.js → connections-g7AYRhCW.js} +1 -1
  117. package/dist/client/assets/context-CtvGGIuc.js +1 -0
  118. package/dist/client/assets/{context-menu-CRrDeZev.js → context-menu-BHpyeRN3.js} +1 -1
  119. package/dist/client/assets/{create-organization-dialog-bjUb_uRH.js → create-organization-dialog-DM0EVF-D.js} +1 -1
  120. package/dist/client/assets/{daily-pulse-Io-Crvam.js → daily-pulse-BOdn-UxC.js} +1 -1
  121. package/dist/client/assets/{decopilot-CAfMXinP.js → decopilot-BEZXwH2l.js} +1 -1
  122. package/dist/client/assets/{device-hint-dLg0eqvh.js → device-hint-Bcob3UqV.js} +1 -1
  123. package/dist/client/assets/{dialog-CrYpY3Eq.js → dialog-BJny2srB.js} +1 -1
  124. package/dist/client/assets/{discover-O-E-uPSJ.js → discover-Be00RGyY.js} +1 -1
  125. package/dist/client/assets/{domain-settings-612gOLKf.js → domain-settings-ChkNgBLE.js} +1 -1
  126. package/dist/client/assets/{download-app-dialog-CssiauNE.js → download-app-dialog-CYxTt_wl.js} +1 -1
  127. package/dist/client/assets/{drawer-BoaD9rxZ.js → drawer-ugS5r2iQ.js} +1 -1
  128. package/dist/client/assets/{editor-B1yj_Rg3.js → editor-BFX6ra4l.js} +1 -1
  129. package/dist/client/assets/{empty-state-CC3oHvo4.js → empty-state-BgjT33mH.js} +1 -1
  130. package/dist/client/assets/{empty-state-BgRZvqsL.js → empty-state-CrLuHHe8.js} +1 -1
  131. package/dist/client/assets/{extract-connection-data-CeW7ej-C.js → extract-connection-data-DzRM76JF.js} +1 -1
  132. package/dist/client/assets/{feature-gate-DMDbne2B.js → feature-gate-D5RLRNV5.js} +1 -1
  133. package/dist/client/assets/{feature-paywall-CdbrbN16.js → feature-paywall-BOUIyLME.js} +1 -1
  134. package/dist/client/assets/{file-explorer-Cwsg0yOv.js → file-explorer-WHZll4h4.js} +1 -1
  135. package/dist/client/assets/{file-preview-CD-YG8wZ.js → file-preview-C0y1VI3d.js} +1 -1
  136. package/dist/client/assets/{file-share-button-CFtNWg9R.js → file-share-button-BIJj7BbT.js} +2 -2
  137. package/dist/client/assets/{file-type-icon-DHOlz79V.js → file-type-icon-CvWWoRAO.js} +1 -1
  138. package/dist/client/assets/flat-project-DklPJ7ot.js +1 -0
  139. package/dist/client/assets/{folder-icon-Dy8JE9nj.js → folder-icon-CMZRw_lE.js} +1 -1
  140. package/dist/client/assets/{form-uqvM1Jp0.js → form-BsbEXxEk.js} +1 -1
  141. package/dist/client/assets/{gateway-client-BMuj7uLa.js → gateway-client-DPQb-ray.js} +1 -1
  142. package/dist/client/assets/general-DcmU5ljh.js +1 -0
  143. package/dist/client/assets/{home-socKDX4c.js → home-Cluz7ZcZ.js} +1 -1
  144. package/dist/client/assets/{icon-button-D7O1wynv.js → icon-button-Cpld4nrH.js} +1 -1
  145. package/dist/client/assets/{index-SV7bFlbR.js → index-B7-3R-Wc.js} +1 -1
  146. package/dist/client/assets/{index-CpOfh4QE.js → index-BmjSoeeS.js} +1 -1
  147. package/dist/client/assets/{index-B3rJSOmg.js → index-BnLwnO1e.js} +1 -1
  148. package/dist/client/assets/{index-rnfQP0qj.js → index-Bnq5a3RF.js} +1 -1
  149. package/dist/client/assets/{index-ZD4Fz0cx.js → index-BsSf6-Tp.js} +1 -1
  150. package/dist/client/assets/{index-HWxR2Ep5.js → index-C5LlvZFc.js} +4 -4
  151. package/dist/client/assets/{index-DnVCHdD7.js → index-CFVUUkFw.js} +1 -1
  152. package/dist/client/assets/{index-DrLxpkVi.js → index-CMWyW-nP.js} +1 -1
  153. package/dist/client/assets/{index-BSPOgv2I.js → index-CMxk_Q0b.js} +3 -3
  154. package/dist/client/assets/{index-CyudKxKs.js → index-CeE78dnN.js} +1 -1
  155. package/dist/client/assets/{index-DfGHT-t4.js → index-DR8phzsm.js} +1 -1
  156. package/dist/client/assets/{index-lLNfJgr6.js → index-Dm8tF0P6.js} +1 -1
  157. package/dist/client/assets/{index-ClrFphBQ.js → index-DnCv4gDA.js} +1 -1
  158. package/dist/client/assets/{index-eKgwFeS5.js → index-LUzyiStE.js} +1 -1
  159. package/dist/client/assets/{index-redirect-xE_km-fe.js → index-redirect-2EYYlLWV.js} +1 -1
  160. package/dist/client/assets/{index-PwkDSqfp.js → index-svk4_uTN.js} +1 -1
  161. package/dist/client/assets/{infiniteQueryObserver-BQoespCm.js → infiniteQueryObserver-DS3r5RyQ.js} +1 -1
  162. package/dist/client/assets/{infra-billing-B0jRZLlu.js → infra-billing-BP0k6gQd.js} +1 -1
  163. package/dist/client/assets/{input-L6zRtw2u.js → input-BYbHl7fH.js} +1 -1
  164. package/dist/client/assets/{input-BDyBZ261.js → input-DtRnGymn.js} +7 -7
  165. package/dist/client/assets/{input-CxP1FO-T.js → input-NPHEwu7D.js} +1 -1
  166. package/dist/client/assets/{integration-icon-BmIuOhyq.js → integration-icon-Db99lv2a.js} +1 -1
  167. package/dist/client/assets/{label-CFAv__xD.js → label-DFV1EjGx.js} +1 -1
  168. package/dist/client/assets/{layout-DZyc2QyB.js → layout-DT9fBwIn.js} +1 -1
  169. package/dist/client/assets/{legacy-agents-deep-CU_wHsOn.js → legacy-agents-deep-CB9Z2QQP.js} +1 -1
  170. package/dist/client/assets/{legacy-main-redirect-3Gm3Yt2d.js → legacy-main-redirect-DL_OU_ve.js} +1 -1
  171. package/dist/client/assets/library-DVDKWOCj.js +1 -0
  172. package/dist/client/assets/{library-tab-ByN2HhqC.js → library-tab-zwg8I-zT.js} +1 -1
  173. package/dist/client/assets/{login-CUbYBhTN.js → login-B_u9hKdd.js} +1 -1
  174. package/dist/client/assets/{markdown-CqclEMlW.js → markdown-BNkxJvOO.js} +1 -1
  175. package/dist/client/assets/mcp-app-renderer-BEPdGRWf.js +11 -0
  176. package/dist/client/assets/{mcp-oauth-Cu8OJU0d.js → mcp-oauth-B9fQInjX.js} +1 -1
  177. package/dist/client/assets/{members-BOSDDP3d.js → members-BDa5FNmm.js} +1 -1
  178. package/dist/client/assets/{memory-hbzEO1t9.js → memory-DLlNfrtQ.js} +1 -1
  179. package/dist/client/assets/{message-templates-DzqE5_jI.js → message-templates-BfVwoNvk.js} +1 -1
  180. package/dist/client/assets/{mini-report-page-BJ96T-Ya.js → mini-report-page-Ci8p_7Qc.js} +1 -1
  181. package/dist/client/assets/{mock-board-7P2uFjO8.js → mock-board-CWXm4av0.js} +1 -1
  182. package/dist/client/assets/{monaco-editor-DIyyItcZ.js → monaco-editor-D29Kd2Kr.js} +1 -1
  183. package/dist/client/assets/{monitoring-stats-row-BG4-JAlt.js → monitoring-stats-row-slQbN1nA.js} +1 -1
  184. package/dist/client/assets/{multi-select-BopnODiG.js → multi-select-W9MlzeC1.js} +1 -1
  185. package/dist/client/assets/{mustache-XqAsCmLc.js → mustache-BgbWTbKV.js} +1 -1
  186. package/dist/client/assets/{new-project-dialog-VKI7H_TP.js → new-project-dialog-CJlermXp.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-D8an7xgw.js → oauth-callback-BuGfhU-z.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-ai-provider-DttkbgyU.js → oauth-callback-ai-provider-BAJwl5IS.js} +1 -1
  189. package/dist/client/assets/{onboarding-SeTEsrRv.js → onboarding-kTCKp428.js} +1 -1
  190. package/dist/client/assets/{openai-conversation-CTeax-iN.js → openai-conversation-C-yPKbTo.js} +1 -1
  191. package/dist/client/assets/{optimistic-project-sidebar-views-ColYeNGR.js → optimistic-project-sidebar-views-CIecA9o-.js} +1 -1
  192. package/dist/client/assets/{org-file-open-context-T9d_LmYT.js → org-file-open-context-C7-ltXbm.js} +1 -1
  193. package/dist/client/assets/{organization-choice-BgYRAOW5.js → organization-choice-D3SzAbEY.js} +1 -1
  194. package/dist/client/assets/{orgs-Dp05bfGb.js → orgs-BGO2o2om.js} +1 -1
  195. package/dist/client/assets/{page-seo-form--09pJM6C.js → page-seo-form-syG_NsyC.js} +1 -1
  196. package/dist/client/assets/{pair-BnYrih-e.js → pair-BXahrBJ-.js} +7 -7
  197. package/dist/client/assets/{plan-ladder-BNbJXBN6.js → plan-ladder-jHsL2xiU.js} +1 -1
  198. package/dist/client/assets/{popover-FL0SUsUE.js → popover-98ItoIiE.js} +1 -1
  199. package/dist/client/assets/{post-calendar-B-ch6tRM.js → post-calendar-DA7gf-iD.js} +1 -1
  200. package/dist/client/assets/{post-editor-BFIdye1u.js → post-editor-DJSWFkVZ.js} +2 -2
  201. package/dist/client/assets/{preview-content-DdGAiWOw.js → preview-content-B3SrY9U6.js} +1 -1
  202. package/dist/client/assets/{preview-dialog-Dfx7xRLA.js → preview-dialog-DtE8hySm.js} +1 -1
  203. package/dist/client/assets/{profile-CkGAuvwn.js → profile-BqkkPgHb.js} +1 -1
  204. package/dist/client/assets/{project-app-view-B4wg3-js.js → project-app-view-DJNcLbfl.js} +1 -1
  205. package/dist/client/assets/{project-feed-djzrblst.js → project-feed-5oGhucIT.js} +1 -1
  206. package/dist/client/assets/{project-icon-xPNeTbRo.js → project-icon-ss5TCI0R.js} +1 -1
  207. package/dist/client/assets/project-reports-BLn_609q.js +1 -0
  208. package/dist/client/assets/project-tasks-B2djFoeX.js +1 -0
  209. package/dist/client/assets/{projects-CwuTDH8z.js → projects-C0NE_8ue.js} +1 -1
  210. package/dist/client/assets/{projects-empty-state-9UvM93cC.js → projects-empty-state-AWojsVAU.js} +1 -1
  211. package/dist/client/assets/{prompts-DvvuLzj1.js → prompts-CkLT7Pp3.js} +1 -1
  212. package/dist/client/assets/record-editor-DyjHgKTD.js +1 -0
  213. package/dist/client/assets/{redirect-editor-x2got8qn.js → redirect-editor-Co-NnhcC.js} +1 -1
  214. package/dist/client/assets/{reports-DgxeoCiI.js → reports-BZp0upxy.js} +1 -1
  215. package/dist/client/assets/{reports-onboarding-Bwu9_9mO.js → reports-onboarding-BBsNQaBV.js} +1 -1
  216. package/dist/client/assets/{reports-tab-B6bOOGao.js → reports-tab-yZ-nVssc.js} +2 -2
  217. package/dist/client/assets/reports-z77dCvga.js +1 -0
  218. package/dist/client/assets/{repositories-Cu-pLRjV.js → repositories-DuKOCOxg.js} +1 -1
  219. package/dist/client/assets/{repository-binding-CMSObH6I.js → repository-binding-BzfYTDYg.js} +1 -1
  220. package/dist/client/assets/{repository-import-picker-B5uDnNQ_.js → repository-import-picker-BZ4SbZxQ.js} +1 -1
  221. package/dist/client/assets/{repository-picker-CHQX2zi4.js → repository-picker-Bzznh2XU.js} +1 -1
  222. package/dist/client/assets/{require-capability-C-J2G0JP.js → require-capability-ZVnNGQoT.js} +1 -1
  223. package/dist/client/assets/{required-auth-layout-C1HzYYkM.js → required-auth-layout-DanliwF9.js} +1 -1
  224. package/dist/client/assets/{reset-password-NZnIlfUQ.js → reset-password-DW3qLKpy.js} +1 -1
  225. package/dist/client/assets/{resizable-BWcGeSs4.js → resizable-DywAIc1-.js} +1 -1
  226. package/dist/client/assets/resolve-tab-icon-C5M35tEP.js +1 -0
  227. package/dist/client/assets/review-settings-Cu2P77Gp.js +1 -0
  228. package/dist/client/assets/{rich-text-link-control-B4yYmVrn.js → rich-text-link-control-DGgBIkoQ.js} +1 -1
  229. package/dist/client/assets/{roles-FlVitblA.js → roles-55Tdfjs_.js} +1 -1
  230. package/dist/client/assets/{route-UCSOp9Po.js → route-BSEkxVC-.js} +1 -1
  231. package/dist/client/assets/{route-BPxGCDd1.js → route-BvV_LTTA.js} +1 -1
  232. package/dist/client/assets/route-efW7oDD1.js +1 -0
  233. package/dist/client/assets/{runnable-block-editor-m1Qq5JeU.js → runnable-block-editor-246vsgYp.js} +1 -1
  234. package/dist/client/assets/{sandbox-lifecycle-context-RZq7OXus.js → sandbox-lifecycle-context-BvXjf7rx.js} +1 -1
  235. package/dist/client/assets/{schema-DJA56Znc.js → schema-DvFu1ToO.js} +1 -1
  236. package/dist/client/assets/{scroll-area-CqKR-j9d.js → scroll-area-DaBuMKS9.js} +1 -1
  237. package/dist/client/assets/{search-input-KkYEYKdn.js → search-input--Cs2kN0G.js} +1 -1
  238. package/dist/client/assets/{search-toggle-u0HPBSmW.js → search-toggle-C3WefJ2y.js} +1 -1
  239. package/dist/client/assets/{secret-picker-cKJXkGmK.js → secret-picker-CEdXEQdI.js} +1 -1
  240. package/dist/client/assets/{secrets-D73SLAhe.js → secrets-CqHQ9R62.js} +1 -1
  241. package/dist/client/assets/{sections-editor-DdB2ICl9.js → sections-editor-BBgqWNXJ.js} +1 -1
  242. package/dist/client/assets/{select-vA5aLKVe.js → select-BlojSjop.js} +1 -1
  243. package/dist/client/assets/{select-model-CeVR5Lsq.js → select-model-qkZsSZ-s.js} +1 -1
  244. package/dist/client/assets/{seo-editor-6NBXqyeG.js → seo-editor-vSFjIyB8.js} +1 -1
  245. package/dist/client/assets/{separator-DWmeqDpd.js → separator-DVd2LxRQ.js} +1 -1
  246. package/dist/client/assets/{settings-tab-D2HRWLjD.js → settings-tab-BB1cUOmY.js} +1 -1
  247. package/dist/client/assets/{sheet-DiRUSwQB.js → sheet-DhV5S-lN.js} +1 -1
  248. package/dist/client/assets/{shell-layout-d_sSLfND.js → shell-layout-BCgx5xUt.js} +1 -1
  249. package/dist/client/assets/{skills-BkZysL5d.js → skills-CGor4YeE.js} +1 -1
  250. package/dist/client/assets/{sso-BWvpwg2A.js → sso-DT447B-z.js} +1 -1
  251. package/dist/client/assets/{suggestion-BkCheNCW.js → suggestion-20OWsU93.js} +1 -1
  252. package/dist/client/assets/{switch-Oe1o4Jst.js → switch-CMfc7QV5.js} +1 -1
  253. package/dist/client/assets/{synced-repos-CsRh95sP.js → synced-repos-mHQN0OHN.js} +1 -1
  254. package/dist/client/assets/{tab-icon-glyph-USELPr6s.js → tab-icon-glyph-Cv2jvczH.js} +1 -1
  255. package/dist/client/assets/{table-CDMcGFDs.js → table-Dh5pobpb.js} +1 -1
  256. package/dist/client/assets/{tabs-DpX5BLsl.js → tabs-BQf21wqw.js} +1 -1
  257. package/dist/client/assets/{task-board-DQoxAg0z.js → task-board-DGnwsIns.js} +1 -1
  258. package/dist/client/assets/{task-route-BaUE_XMH.js → task-route-T3lqK1Fh.js} +1 -1
  259. package/dist/client/assets/{task-status-CayXiTCC.js → task-status-BXB-vdW8.js} +1 -1
  260. package/dist/client/assets/{taskboard-analytics-CN9qSipL.js → taskboard-analytics-DorE9nZU.js} +1 -1
  261. package/dist/client/assets/tasks-BCug_duM.js +1 -0
  262. package/dist/client/assets/{tasks-Dd_4KjmD.js → tasks-DJSTWu0I.js} +1 -1
  263. package/dist/client/assets/{textarea-BBDC4DVr.js → textarea-CVYfh0wC.js} +1 -1
  264. package/dist/client/assets/{thread-analytics-NwQ8ejQ_.js → thread-analytics-DnKw3wA2.js} +1 -1
  265. package/dist/client/assets/{thread-button-BAtfkAD5.js → thread-button-DLBvXKcS.js} +1 -1
  266. package/dist/client/assets/{thread-intent-DQKTpQfu.js → thread-intent-Cc5BAaIc.js} +1 -1
  267. package/dist/client/assets/{thread-route-ssC9pRVm.js → thread-route-BfHTBheT.js} +1 -1
  268. package/dist/client/assets/{thread-route-C62apffp.js → thread-route-CmSAw42O.js} +1 -1
  269. package/dist/client/assets/{thread-sheet-body-B_nVAoRK.js → thread-sheet-body-tvi3Cu-i.js} +1 -1
  270. package/dist/client/assets/{toggle-group-CjnaoGYT.js → toggle-group-D_XfPgvt.js} +1 -1
  271. package/dist/client/assets/{toolbar-icon-button-BtSeYwLl.js → toolbar-icon-button-CUSdjojs.js} +1 -1
  272. package/dist/client/assets/{tooltip-CBWyBQCl.js → tooltip-66nc6La-.js} +1 -1
  273. package/dist/client/assets/{track-bXEcNWqe.js → track-C-MP37D4.js} +1 -1
  274. package/dist/client/assets/{types-DBj9i1zi.js → types-Ch9SdRcv.js} +1 -1
  275. package/dist/client/assets/{usage-stats-MicZljk7.js → usage-stats-yiZ6SKAb.js} +1 -1
  276. package/dist/client/assets/{use-ai-providers-jUulD26_.js → use-ai-providers-M9Gfv9f8.js} +1 -1
  277. package/dist/client/assets/{use-automations-CEYClL9i.js → use-automations-CY_zEchX.js} +1 -1
  278. package/dist/client/assets/{use-autosave-CQfPajqv.js → use-autosave-Cn0WfmQ8.js} +1 -1
  279. package/dist/client/assets/{use-chat-layout-state-CbytSCzM.js → use-chat-layout-state-EbMrj1Yk.js} +1 -1
  280. package/dist/client/assets/{use-clock-tick-BUO999BZ.js → use-clock-tick-Db61eAzB.js} +1 -1
  281. package/dist/client/assets/{use-connect-companion-TYMdFN1j.js → use-connect-companion-DxqzImGI.js} +1 -1
  282. package/dist/client/assets/{use-connection-B9WHtxSO.js → use-connection-aogXB8HT.js} +1 -1
  283. package/dist/client/assets/{use-copy-BTWDFkjW.js → use-copy-B1c_EBRx.js} +1 -1
  284. package/dist/client/assets/{use-create-virtual-mcp-CyUZA-li.js → use-create-virtual-mcp-CV_Qkq--.js} +1 -1
  285. package/dist/client/assets/{use-date-fns-locale-BjWu6H9m.js → use-date-fns-locale-B2cpFjnp.js} +1 -1
  286. package/dist/client/assets/{use-debounced-autosave-BKR9kxYh.js → use-debounced-autosave-CNHp8gYO.js} +1 -1
  287. package/dist/client/assets/{use-debounced-value-XwsAZBkp.js → use-debounced-value-C3ROkLpe.js} +1 -1
  288. package/dist/client/assets/{use-deco-credits-CzkmZZZy.js → use-deco-credits-u3-i822p.js} +1 -1
  289. package/dist/client/assets/{use-decopilot-events-C2Pzma6G.js → use-decopilot-events-DSjzPVBT.js} +1 -1
  290. package/dist/client/assets/{use-delete-connection-BmpOu0M4.js → use-delete-connection-DUF2NW3l.js} +1 -1
  291. package/dist/client/assets/{use-deployment-admin-B94yEd9J.js → use-deployment-admin-Cc2a3wOb.js} +1 -1
  292. package/dist/client/assets/{use-fast-preview-draft-url-GddpS0DZ.js → use-fast-preview-draft-url-ClRKZFue.js} +1 -1
  293. package/dist/client/assets/{use-file-configs-BrMAMhvL.js → use-file-configs-CF1-8iPu.js} +1 -1
  294. package/dist/client/assets/{use-infinite-scroll-x37PMcqa.js → use-infinite-scroll-DwjxrCBI.js} +1 -1
  295. package/dist/client/assets/{use-join-requests-B-T0LPqg.js → use-join-requests-CX1Z0mNX.js} +1 -1
  296. package/dist/client/assets/{use-main-panel-tabs-D9roufQj.js → use-main-panel-tabs-D9RE-lnQ.js} +1 -1
  297. package/dist/client/assets/use-mcp-auth-status-BoAIHl4N.js +1 -0
  298. package/dist/client/assets/{use-mcp-client-DepMR5h0.js → use-mcp-client-B2Vh9Cd7.js} +1 -1
  299. package/dist/client/assets/{use-mcp-prompts-Bjb4h1TD.js → use-mcp-prompts-BBIzvKJ-.js} +1 -1
  300. package/dist/client/assets/{use-mcp-tools-ok1u563f.js → use-mcp-tools-BTm2d3TE.js} +1 -1
  301. package/dist/client/assets/{use-members-zL7ESsDH.js → use-members-C6qHLZqu.js} +1 -1
  302. package/dist/client/assets/{use-mobile-Bgz25Qmq.js → use-mobile-Du3isCXQ.js} +1 -1
  303. package/dist/client/assets/{use-navigate-to-agent-DRcEQJw4.js → use-navigate-to-agent-DeIS5d_A.js} +1 -1
  304. package/dist/client/assets/use-new-blocks-editor-Bq5-foqH.js +1 -0
  305. package/dist/client/assets/{use-open-billing-url-d7KMUwR_.js → use-open-billing-url-C43__85H.js} +1 -1
  306. package/dist/client/assets/{use-org-auth-client-G2KA5nw3.js → use-org-auth-client-BBNuWvcV.js} +1 -1
  307. package/dist/client/assets/{use-org-fs-zJoB2iqQ.js → use-org-fs-Can_Zv1k.js} +1 -1
  308. package/dist/client/assets/{use-org-repo-syncs-BLBkY1kx.js → use-org-repo-syncs-DSCXfgI7.js} +1 -1
  309. package/dist/client/assets/{use-org-sso-DhnTeWxC.js → use-org-sso-CW6lGteH.js} +1 -1
  310. package/dist/client/assets/{use-organization-roles-I2byl3QM.js → use-organization-roles-BawJTbcK.js} +1 -1
  311. package/dist/client/assets/{use-organization-settings-C39MKM-d.js → use-organization-settings-Bq69ux21.js} +1 -1
  312. package/dist/client/assets/{use-panel-navigate-CmDIq84u.js → use-panel-navigate-BVY-Wy0A.js} +1 -1
  313. package/dist/client/assets/{use-project-scope-OOD-YqtN.js → use-project-scope-Cg6fEvSs.js} +1 -1
  314. package/dist/client/assets/{use-releases-D5Ile4-b.js → use-releases-BKi-DdL8.js} +1 -1
  315. package/dist/client/assets/{use-reports-diagnostic-DWp2Tuua.js → use-reports-diagnostic-6cATxGHb.js} +1 -1
  316. package/dist/client/assets/{use-secrets-BANymk9v.js → use-secrets-BD6_VEse.js} +1 -1
  317. package/dist/client/assets/{use-section-preview-base-BGZ-85P3.js → use-section-preview-base-BGOkvMCT.js} +1 -1
  318. package/dist/client/assets/{use-session-runtime-BMxBtcXn.js → use-session-runtime-XVdydjwY.js} +1 -1
  319. package/dist/client/assets/{use-tags-CJVDMJxT.js → use-tags-BzBCpaxP.js} +1 -1
  320. package/dist/client/assets/{use-task-board-analytics-Bym1kFw6.js → use-task-board-analytics-OYMnbU1S.js} +1 -1
  321. package/dist/client/assets/{use-task-board-events-CEk5blpI.js → use-task-board-events-j6Gt2_bO.js} +1 -1
  322. package/dist/client/assets/{use-task-metadata-D-lB65bE.js → use-task-metadata-BJMv-ITR.js} +1 -1
  323. package/dist/client/assets/{use-thread-analytics-I29BXaCq.js → use-thread-analytics-2OqfjnUQ.js} +1 -1
  324. package/dist/client/assets/{use-thread-outputs-C9UtpCKG.js → use-thread-outputs-DqGdi_Az.js} +1 -1
  325. package/dist/client/assets/useInfiniteQuery-DpDVtLXw.js +1 -0
  326. package/dist/client/assets/{useQueries-C2htcIyy.js → useQueries-hEYaMROO.js} +1 -1
  327. package/dist/client/assets/useSuspenseInfiniteQuery-Exur-lii.js +1 -0
  328. package/dist/client/assets/{users-DdL6TyrV.js → users-CVUsc3a5.js} +1 -1
  329. package/dist/client/assets/{utils-CKNMlsNR.js → utils-DWTn-3pm.js} +1 -1
  330. package/dist/client/assets/{variant-calendar-IYfe0Ok0.js → variant-calendar-BwZCUSvP.js} +1 -1
  331. package/dist/client/assets/{variant-matcher-override-DeFpVA2m.js → variant-matcher-override-Dv_-MENJ.js} +1 -1
  332. package/dist/client/assets/{view-mode-toggle-Xs3q2g1G.js → view-mode-toggle-D-i9WhgV.js} +1 -1
  333. package/dist/client/assets/{virtual-mcp-D8XA_CG1.js → virtual-mcp-CYrVMkY_.js} +1 -1
  334. package/dist/client/index.html +1 -1
  335. package/dist/server/cli.js +14 -14
  336. package/dist/server/server.js +14 -14
  337. package/package.json +1 -1
  338. package/dist/client/assets/agent-app-B5jUA0Bn.js +0 -1
  339. package/dist/client/assets/agent-deck-DBkOmZCZ.js +0 -1
  340. package/dist/client/assets/agent-icon-Ncp9jZCj.js +0 -1
  341. package/dist/client/assets/agent-library-Dqbt3v2J.js +0 -1
  342. package/dist/client/assets/agent-library-file-BKsMUnRd.js +0 -1
  343. package/dist/client/assets/agent-settings-mn6p1y5w.js +0 -1
  344. package/dist/client/assets/agent-site-editor-code-DYFKAxNM.js +0 -2
  345. package/dist/client/assets/agent-site-editor-content-2o8hHnLT.js +0 -9
  346. package/dist/client/assets/agent-view-BFlErvoh.js +0 -1
  347. package/dist/client/assets/api-keys-q7UewISa.js +0 -1
  348. package/dist/client/assets/app-editor-CdUH-3-4.js +0 -1
  349. package/dist/client/assets/block-document-BsnWmc6a.js +0 -3
  350. package/dist/client/assets/category-editor-CCVIKYQL.js +0 -1
  351. package/dist/client/assets/context-CG40wvqE.js +0 -1
  352. package/dist/client/assets/flat-project-C-rxP_2v.js +0 -1
  353. package/dist/client/assets/general-K5AW1rsS.js +0 -1
  354. package/dist/client/assets/library-Dz-ZWmvM.js +0 -1
  355. package/dist/client/assets/mcp-app-renderer-C1kN5ekK.js +0 -11
  356. package/dist/client/assets/project-reports-pmeTAKhL.js +0 -1
  357. package/dist/client/assets/project-tasks-BZ6hadae.js +0 -1
  358. package/dist/client/assets/record-editor-BmYmQ65G.js +0 -1
  359. package/dist/client/assets/reports-DR6TkE0h.js +0 -1
  360. package/dist/client/assets/resolve-tab-icon-57uNahWH.js +0 -1
  361. package/dist/client/assets/review-settings-DTZPZBmj.js +0 -1
  362. package/dist/client/assets/route-Cyq6kSz7.js +0 -1
  363. package/dist/client/assets/tasks-B3-owb_p.js +0 -1
  364. package/dist/client/assets/use-mcp-auth-status-BNqQlCcI.js +0 -1
  365. package/dist/client/assets/use-new-blocks-editor-qEa50N_M.js +0 -1
  366. package/dist/client/assets/useInfiniteQuery-ak-p-B-L.js +0 -1
  367. package/dist/client/assets/useSuspenseInfiniteQuery-BzpL8p-T.js +0 -1
@@ -1 +1 @@
1
- import{a as z,R as Fe,r as w,e as ue,q as V,j as t,l as I,B as te,o as ze,m as Ve,K as ge,c as le,b as be,h as _e}from"./index-HWxR2Ep5.js";import{I as ee}from"./input-CxP1FO-T.js";import{i as Qe}from"./use-is-desktop-app-BNujXJc_.js";import{d as He,e as Ke}from"./backoff-8mStPHYB.js";class Le extends Error{constructor(e,a){super(`Retrying exceeded the maxAttempts (${a}).`),this.name="RetryError",this.cause=e}}async function Ye(n,e){const{multiplier:a=2,maxTimeout:u=6e4,maxAttempts:f=5,minTimeout:o=1e3,jitter:i=1,isRetriable:m=()=>!0,signal:g}=e??{};if(!Number.isInteger(f)||f<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${f}`);if(!Number.isFinite(a)||a<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${a}`);if(Number.isNaN(u)||u<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${u}`);if(Number.isNaN(o)||o<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${o}`);if(o>u)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${o}', 'maxTimeout=${u}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let N=0;for(;;){g?.throwIfAborted();try{return await n()}catch(v){if(!m(v))throw v;if(N+1>=f)throw new Le(v,f);const P=Ke(u,o,N,a,i);await He(P,g?{signal:g}:void 0)}N++}}const Oe={submitEmailPassword:({mode:n,email:e,password:a,name:u})=>n==="sign_up"?z.signUp.email({email:e,password:a,name:u||""}):z.signIn.email({email:e,password:a}),requestPasswordReset:({email:n,redirectTo:e})=>z.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>z.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>z.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>z.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>z.signIn.sso({providerId:n,callbackURL:e}),onAuthenticated:n=>{window.location.href=n}},he="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ge={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Je({redirectUrl:n,callbackUrl:e="/",title:a,subtitle:u,brand:f,copy:o,variant:i="default",allowedSocialProviders:m,allowPassword:g=!0,onAuthEvent:N,actions:v}){const{emailAndPassword:P,resetPassword:E,emailOtp:y,socialProviders:A}=Fe(),d={...Oe,...v},h=s=>{try{N?.(s)}catch{}},j=i==="compact",se=m?A.providers.filter(s=>m.includes(s.name)):A.providers,ne=A.enabled&&se.length>0,de=P.enabled&&(g||!y.enabled&&!ne),ce=A.enabled&&A.providers.length>0&&!ne&&!y.enabled&&!de?A.providers:se,p=A.enabled&&ce.length>0,F=P.enabled&&(g||!y.enabled&&!p),[b,_]=w.useState(""),[L,Q]=w.useState(""),[U,O]=w.useState(""),[D,l]=w.useState(""),[x,$]=w.useState(!1),[M,W]=w.useState(()=>y.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[C,H]=w.useState(""),[ye,we]=w.useState(!1),[Re,pe]=w.useState(null),r={...Ge,...o},re=w.useId(),K=`${re}-email`,Y=`${re}-email-error`,ve=`${re}-name`,Ee=`${re}-password`,Se=`${re}-otp`,k=M==="signUp",q=M==="forgotPassword",T=M==="emailOtp",ie=ue({mutationFn:async({email:s,password:c,name:R})=>{try{const Z=await d.submitEmailPassword({mode:k?"sign_up":"sign_in",email:s,password:c,name:R});if(Z.error)throw new Error(Z.error.message||(k?r.signUpFailed:r.signInFailed));return Z}catch(Z){throw Z instanceof Error?Z:new Error(r.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:k?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:k?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),V(k?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ae=ue({mutationFn:async({email:s})=>{const c=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(c.error)throw new Error(c.error.message||r.resetEmailFailed);return c},onSuccess:()=>{V("password_reset_requested"),we(!0)},onError:s=>{V("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),G=ue({mutationFn:async({email:s})=>{const c=await d.sendOtp({email:s});if(c.error)throw new Error(c.error.message||r.otpSendFailed);return c},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),V("email_otp_sent"),$(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),V("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),J=ue({mutationFn:async({email:s,otp:c})=>{const R=await d.submitOtp({email:s,otp:c});if(R.error)throw new Error(R.error.message||r.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),V("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),me=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),xe=()=>{b.trim()&&!me(b)&&H(r.invalidEmail)},De=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail),h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}ie.mutate({email:b,password:L,name:U})},$e=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail);return}ae.mutate({email:b})},Me=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}G.mutate({email:b})},We=s=>{s.preventDefault(),J.mutate({email:b,otp:D})},X=s=>c=>{s(c.target.value),je&&ie.reset(),Ne&&ae.reset(),Ae&&(G.reset(),J.reset()),s===_&&C&&H("")},oe=s=>{W(s),O(""),l(""),$(!1),H(""),we(!1),pe(null),ie.reset(),ae.reset(),G.reset(),J.reset()},S=ie.isPending||ae.isPending||G.isPending||J.isPending,je=ie.error,Ne=ae.error,Ae=G.error||J.error,B=k?b.trim()&&L.trim()&&U.trim():q?b.trim():T?x?D.trim():b.trim():b.trim()&&L.trim(),qe=s=>{if(!s)return null;const c=s.message.toLowerCase();return c.includes("unauthorized")||c.includes("401")?r.invalidEmailOrPassword:c.includes("already exists")||c.includes("409")?r.accountExists:c.includes("network")||c.includes("fetch")?r.networkError:c.includes("rate limit")||c.includes("429")?r.tooManyAttempts:c.includes("invalid")&&c.includes("otp")?r.invalidOrExpiredCode:s.message||r.genericError},Ce=je||Ne||Ae||Re,Ue=async s=>{h({type:"started",method:"social",provider:s}),pe(null);try{const c=await d.socialSignIn({provider:s,callbackURL:n??e});if(c.error)throw new Error(c.error.message||r.authenticationFailed)}catch(c){const R=c instanceof Error?c.message:String(c);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),V("social_signin_failed",{provider:s,error:R}),pe(c instanceof Error?c:new Error(R))}},Be=q?r.resetPasswordTitle:T&&x?r.verificationCodeTitle:a??r.welcomeTitle,Pe=q?r.resetPasswordSubtitle:T&&x?r.codeSentTo(b):u===void 0?r.defaultSubtitle:u;return t.jsxs("div",{className:I("grid w-full",j?"gap-5":"gap-10"),children:[f??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:I("font-medium",j?"text-xl leading-7":"text-2xl leading-8"),children:Be}),Pe&&t.jsx("p",{className:I("text-muted-foreground",j?"text-sm leading-5":"text-base leading-6"),children:Pe})]}),Ce&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Ce)}),ye&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:r.resetEmailSent}),!q&&!(T&&x)&&p&&t.jsx("div",{className:"grid gap-2",children:ce.map(s=>t.jsxs(te,{type:"button",variant:"outline",size:j?"lg":"xl",disabled:S,onClick:()=>{Ue(s.name)},className:I("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 rounded-lg",j?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:I("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),r.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!q&&!(T&&x)&&p&&(F||y.enabled)&&t.jsxs("div",{className:I("flex items-center gap-2.5",j?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:I("text-muted-foreground",j?"text-sm":"text-base"),children:r.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),T&&y.enabled&&t.jsx(t.Fragment,{children:x?t.jsxs("form",{onSubmit:We,className:I("grid gap-2",j&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:I("text-sm font-medium text-foreground",j&&"sr-only"),children:r.verificationCodeLabel}),t.jsx(ee,{id:Se,type:"text",placeholder:r.enterCodePlaceholder,value:D,onChange:X(l),required:!0,disabled:S,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx(te,{type:"submit",size:j?"lg":"xl",disabled:S||!B,className:I(j?"sm:w-auto":"w-full"),children:S?r.verifying:r.verify}),t.jsx("button",{type:"button",onClick:()=>{$(!1),l(""),G.reset(),J.reset()},disabled:S,className:I("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",j&&"sm:col-span-2"),children:r.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Me,className:I("grid gap-2",j&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:K,className:I("text-sm font-medium text-foreground",j&&"sr-only"),children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:r.emailPlaceholder,value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive",children:C})]}),t.jsx(te,{type:"submit",size:j?"lg":"xl",disabled:S||!B,className:I(j?"sm:w-auto":"w-full"),children:S?r.sending:r.sendCode})]})}),q&&F&&!ye&&t.jsxs("form",{onSubmit:$e,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsx(te,{type:"submit",disabled:S||!B,className:"w-full font-semibold",size:"xl",children:S?r.sending:r.sendResetLink})]}),!q&&!T&&F&&t.jsxs("form",{onSubmit:De,className:"grid gap-5",children:[k&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:r.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:r.namePlaceholder,value:U,onChange:X(O),required:!0,disabled:S,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:r.passwordLabel}),!k&&E.enabled&&t.jsx("button",{type:"button",onClick:()=>oe("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r.forgotPassword})]}),t.jsx(ee,{id:Ee,type:"password",placeholder:"••••••••",value:L,onChange:X(Q),required:!0,disabled:S,autoComplete:k?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:I("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",B?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:I("p-1",!B&&"pointer-events-none"),children:t.jsx(te,{type:"submit",disabled:S||!B,className:I("w-full font-semibold"),size:"xl","aria-hidden":!B,children:S?k?r.creatingAccount:r.signingIn:r.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:q?t.jsx("button",{type:"button",onClick:()=>oe("signIn"),disabled:S,className:he,children:r.backToSignIn}):T&&F?t.jsx("button",{type:"button",onClick:()=>oe("signIn"),disabled:S,className:he,children:r.signInWithPassword}):!T&&F?t.jsxs(t.Fragment,{children:[k?r.alreadyHaveAccount:r.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>oe(k?"signIn":"signUp"),disabled:S,className:he,children:k?r.signIn:r.signUp}),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>oe("emailOtp"),disabled:S,className:he,children:r.signInWithEmailCode})]})]}):null})]})}async function fe(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Xe(){const n=ze(),e=Qe(),a=Ve({queryKey:ge.desktopAuthStatus(),queryFn:async()=>(await fe()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[u,f]=w.useState(!1),[o,i]=w.useState(null),[m,g]=w.useState(!1),[N,v]=w.useState(null);w.useEffect(()=>{},[e,n]);async function P(){f(!0),i(null);try{const d=await fe();await d.performAuthLogin();const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{f(!1)}}async function E(){f(!0);try{const d=await fe();await d.performAuthLogout();const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}finally{f(!1)}}async function y(){g(!0),v(null);let d;try{d=await fe()}catch(h){v(h instanceof Error?h.message:"Sign-in failed"),g(!1);return}try{await d.performAuthCompleteSession()}catch(h){v(h instanceof Error?h.message:"Sign-in failed")}finally{try{const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}finally{g(!1)}}}async function A(){await a.refetch()}return{status:a.data,isChecking:a.isLoading,isRetryingStatus:a.isFetching,isPending:u,loginError:o,login:P,logout:E,isCompletingSession:m,completeSessionError:N,completeSession:y,retryStatus:A}}function Ze(n){return!(n.emailAndPassword.enabled||n.emailOtp.enabled||n.socialProviders.enabled)&&!n.sso.enabled&&n.magicLink.enabled}function et(){return le.c(10),Xe(),null}function tt(n){const e=le.c(25),{onContinue:a,isPending:u,error:f}=n,o=be();let i;e[0]!==o?(i=o("common.authEntry.browserOnlyTitle"),e[0]=o,e[1]=i):i=e[1];let m;e[2]!==i?(m=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=m):m=e[3];let g;e[4]!==o?(g=o("common.authEntry.browserOnlyDescription"),e[4]=o,e[5]=g):g=e[5];let N;e[6]!==g?(N=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g}),e[6]=g,e[7]=N):N=e[7];let v;e[8]!==m||e[9]!==N?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),e[8]=m,e[9]=N,e[10]=v):v=e[10];let P;e[11]!==a?(P=()=>{a()},e[11]=a,e[12]=P):P=e[12];let E;e[13]!==o?(E=o("common.authEntry.browserOnlyCta"),e[13]=o,e[14]=E):E=e[14];let y;e[15]!==u||e[16]!==P||e[17]!==E?(y=t.jsx(te,{onClick:P,disabled:u,children:E}),e[15]=u,e[16]=P,e[17]=E,e[18]=y):y=e[18];let A;e[19]!==f?(A=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[19]=f,e[20]=A):A=e[20];let d;return e[21]!==v||e[22]!==y||e[23]!==A?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[v,y,A]}),e[21]=v,e[22]=y,e[23]=A,e[24]=d):d=e[24],d}function Ie(n){const e=le.c(8),{label:a,error:u}=n;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(_e,{size:"lg"}),e[0]=f):f=e[0];let o;e[1]!==a?(o=a&&t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[1]=a,e[2]=o):o=e[2];let i;e[3]!==u?(i=u&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:u}),e[3]=u,e[4]=i):i=e[4];let m;return e[5]!==o||e[6]!==i?(m=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,o,i]}),e[5]=o,e[6]=i,e[7]=m):m=e[7],m}class ke{constructor(e){this.response=e}response}function st(n){return n.startsWith("/")&&!n.startsWith("//")?n:"/"}function nt({redirectTo:n,onAuthEvent:e}){const a=be(),[u,f]=w.useState(null),o=w.useEffectEvent(i=>{try{e?.(i)}catch{}});return w.useEffect(()=>{let i=!1;return(async()=>{o({type:"started",method:"local"});try{let m;try{m=await Ye(async()=>{const g=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(g.status>=500)throw new ke(g);return g},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(g){if(g instanceof Le&&g.cause instanceof ke)m=g.cause.response;else throw g}if(!m.ok){const g=await m.json().catch(()=>({}));throw new Error(g?.error||a("common.authEntry.autoLoginFailed"))}i||(o({type:"succeeded",method:"local"}),window.location.href=st(n))}catch(m){i||(o({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),f(m instanceof Error?m.message:a("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),u?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:a("common.authEntry.autoLoginFailedWithError",{error:u})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:a("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=le.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(_e,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:a,onAuthEvent:u}){const f=w.useEffectEvent(i=>{try{u?.(i)}catch{}}),o=w.useEffectEvent(a);return w.useEffect(()=>{(async()=>{f({type:"started",method:"sso",provider:e});try{const i=await o({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){f({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function dt(n){const e=le.c(51),{callbackUrl:a,redirectUrl:u,allowAutoLogin:f,title:o,subtitle:i,brand:m,copy:g,variant:N,allowedSocialProviders:v,allowPassword:P,onAuthEvent:E,onAuthenticated:y}=n,A=f===void 0?!0:f,d=be(),{sso:h,emailAndPassword:j,magicLink:se,emailOtp:ne,socialProviders:de,localMode:ce}=Fe(),p=et(),F=u||a;let b;e[0]!==y?(b=y?{onAuthenticated:y}:void 0,e[0]=y,e[1]=b):b=e[1];const _=b,L=p?.actions;let Q;e[2]!==_||e[3]!==L?(Q={...Oe,..._,...L},e[2]=_,e[3]=L,e[4]=Q):Q=e[4];const U=Q;if(p?.isPending){let l;e[5]!==d?(l=d("common.authEntry.finishSignInInBrowser"),e[5]=d,e[6]=l):l=e[6];let x;return e[7]!==p.loginError||e[8]!==l?(x=t.jsx(Ie,{label:l,error:p.loginError}),e[7]=p.loginError,e[8]=l,e[9]=x):x=e[9],x}if(p?.isCompletingSession){let l;e[10]!==d?(l=d("common.authEntry.finishingSignIn"),e[10]=d,e[11]=l):l=e[11];let x;return e[12]!==p.completeSessionError||e[13]!==l?(x=t.jsx(Ie,{label:l,error:p.completeSessionError}),e[12]=p.completeSessionError,e[13]=l,e[14]=x):x=e[14],x}if(ce&&A){let l;return e[15]!==E||e[16]!==F?(l=t.jsx(nt,{redirectTo:F,onAuthEvent:E}),e[15]=E,e[16]=F,e[17]=l):l=e[17],l}if(h.enabled){let l;return e[18]!==E||e[19]!==F||e[20]!==U.ssoSignIn||e[21]!==h.providerId?(l=t.jsx(rt,{callbackURL:F,providerId:h.providerId,ssoSignIn:U.ssoSignIn,onAuthEvent:E}),e[18]=E,e[19]=F,e[20]=U.ssoSignIn,e[21]=h.providerId,e[22]=l):l=e[22],l}if(p&&Ze({emailAndPassword:j,emailOtp:ne,socialProviders:de,magicLink:se,sso:h})){let l;return e[23]!==p.isPending||e[24]!==p.login||e[25]!==p.loginError?(l=t.jsx(tt,{onContinue:p.login,isPending:p.isPending,error:p.loginError}),e[23]=p.isPending,e[24]=p.login,e[25]=p.loginError,e[26]=l):l=e[26],l}if(j.enabled||se.enabled||ne.enabled||de.enabled){const l=p?.loginError??p?.completeSessionError??null;let x;e[27]!==_||e[28]!==L?(x={..._,...L},e[27]=_,e[28]=L,e[29]=x):x=e[29];let $;e[30]!==P||e[31]!==v||e[32]!==m||e[33]!==a||e[34]!==g||e[35]!==E||e[36]!==u||e[37]!==i||e[38]!==x||e[39]!==o||e[40]!==N?($=t.jsx(Je,{redirectUrl:u,callbackUrl:a,title:o,subtitle:i,brand:m,copy:g,variant:N,allowedSocialProviders:v,allowPassword:P,onAuthEvent:E,actions:x}),e[30]=P,e[31]=v,e[32]=m,e[33]=a,e[34]=g,e[35]=E,e[36]=u,e[37]=i,e[38]=x,e[39]=o,e[40]=N,e[41]=$):$=e[41];const M=$;if(!l)return M;let W;e[42]!==l?(W=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:l}),e[42]=l,e[43]=W):W=e[43];let C;return e[44]!==M||e[45]!==W?(C=t.jsxs("div",{className:"grid gap-4",children:[W,M]}),e[44]=M,e[45]=W,e[46]=C):C=e[46],C}let O;e[47]!==d?(O=d("common.authEntry.noLoginOptions"),e[47]=d,e[48]=O):O=e[48];let D;return e[49]!==O?(D=t.jsx("div",{children:O}),e[49]=O,e[50]=D):D=e[50],D}export{Te as A,dt as a,Xe as u};
1
+ import{a as z,R as Fe,r as w,e as ue,q as V,j as t,l as I,B as te,o as ze,m as Ve,K as ge,c as le,b as be,h as _e}from"./index-C5LlvZFc.js";import{I as ee}from"./input-NPHEwu7D.js";import{i as Qe}from"./use-is-desktop-app-BNujXJc_.js";import{d as He,e as Ke}from"./backoff-8mStPHYB.js";class Le extends Error{constructor(e,a){super(`Retrying exceeded the maxAttempts (${a}).`),this.name="RetryError",this.cause=e}}async function Ye(n,e){const{multiplier:a=2,maxTimeout:u=6e4,maxAttempts:f=5,minTimeout:o=1e3,jitter:i=1,isRetriable:m=()=>!0,signal:g}=e??{};if(!Number.isInteger(f)||f<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${f}`);if(!Number.isFinite(a)||a<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${a}`);if(Number.isNaN(u)||u<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${u}`);if(Number.isNaN(o)||o<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${o}`);if(o>u)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${o}', 'maxTimeout=${u}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let N=0;for(;;){g?.throwIfAborted();try{return await n()}catch(v){if(!m(v))throw v;if(N+1>=f)throw new Le(v,f);const P=Ke(u,o,N,a,i);await He(P,g?{signal:g}:void 0)}N++}}const Oe={submitEmailPassword:({mode:n,email:e,password:a,name:u})=>n==="sign_up"?z.signUp.email({email:e,password:a,name:u||""}):z.signIn.email({email:e,password:a}),requestPasswordReset:({email:n,redirectTo:e})=>z.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>z.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>z.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>z.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>z.signIn.sso({providerId:n,callbackURL:e}),onAuthenticated:n=>{window.location.href=n}},he="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ge={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Je({redirectUrl:n,callbackUrl:e="/",title:a,subtitle:u,brand:f,copy:o,variant:i="default",allowedSocialProviders:m,allowPassword:g=!0,onAuthEvent:N,actions:v}){const{emailAndPassword:P,resetPassword:E,emailOtp:y,socialProviders:A}=Fe(),d={...Oe,...v},h=s=>{try{N?.(s)}catch{}},j=i==="compact",se=m?A.providers.filter(s=>m.includes(s.name)):A.providers,ne=A.enabled&&se.length>0,de=P.enabled&&(g||!y.enabled&&!ne),ce=A.enabled&&A.providers.length>0&&!ne&&!y.enabled&&!de?A.providers:se,p=A.enabled&&ce.length>0,F=P.enabled&&(g||!y.enabled&&!p),[b,_]=w.useState(""),[L,Q]=w.useState(""),[U,O]=w.useState(""),[D,l]=w.useState(""),[x,$]=w.useState(!1),[M,W]=w.useState(()=>y.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[C,H]=w.useState(""),[ye,we]=w.useState(!1),[Re,pe]=w.useState(null),r={...Ge,...o},re=w.useId(),K=`${re}-email`,Y=`${re}-email-error`,ve=`${re}-name`,Ee=`${re}-password`,Se=`${re}-otp`,k=M==="signUp",q=M==="forgotPassword",T=M==="emailOtp",ie=ue({mutationFn:async({email:s,password:c,name:R})=>{try{const Z=await d.submitEmailPassword({mode:k?"sign_up":"sign_in",email:s,password:c,name:R});if(Z.error)throw new Error(Z.error.message||(k?r.signUpFailed:r.signInFailed));return Z}catch(Z){throw Z instanceof Error?Z:new Error(r.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:k?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:k?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),V(k?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ae=ue({mutationFn:async({email:s})=>{const c=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(c.error)throw new Error(c.error.message||r.resetEmailFailed);return c},onSuccess:()=>{V("password_reset_requested"),we(!0)},onError:s=>{V("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),G=ue({mutationFn:async({email:s})=>{const c=await d.sendOtp({email:s});if(c.error)throw new Error(c.error.message||r.otpSendFailed);return c},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),V("email_otp_sent"),$(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),V("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),J=ue({mutationFn:async({email:s,otp:c})=>{const R=await d.submitOtp({email:s,otp:c});if(R.error)throw new Error(R.error.message||r.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),V("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),me=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),xe=()=>{b.trim()&&!me(b)&&H(r.invalidEmail)},De=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail),h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}ie.mutate({email:b,password:L,name:U})},$e=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail);return}ae.mutate({email:b})},Me=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}G.mutate({email:b})},We=s=>{s.preventDefault(),J.mutate({email:b,otp:D})},X=s=>c=>{s(c.target.value),je&&ie.reset(),Ne&&ae.reset(),Ae&&(G.reset(),J.reset()),s===_&&C&&H("")},oe=s=>{W(s),O(""),l(""),$(!1),H(""),we(!1),pe(null),ie.reset(),ae.reset(),G.reset(),J.reset()},S=ie.isPending||ae.isPending||G.isPending||J.isPending,je=ie.error,Ne=ae.error,Ae=G.error||J.error,B=k?b.trim()&&L.trim()&&U.trim():q?b.trim():T?x?D.trim():b.trim():b.trim()&&L.trim(),qe=s=>{if(!s)return null;const c=s.message.toLowerCase();return c.includes("unauthorized")||c.includes("401")?r.invalidEmailOrPassword:c.includes("already exists")||c.includes("409")?r.accountExists:c.includes("network")||c.includes("fetch")?r.networkError:c.includes("rate limit")||c.includes("429")?r.tooManyAttempts:c.includes("invalid")&&c.includes("otp")?r.invalidOrExpiredCode:s.message||r.genericError},Ce=je||Ne||Ae||Re,Ue=async s=>{h({type:"started",method:"social",provider:s}),pe(null);try{const c=await d.socialSignIn({provider:s,callbackURL:n??e});if(c.error)throw new Error(c.error.message||r.authenticationFailed)}catch(c){const R=c instanceof Error?c.message:String(c);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),V("social_signin_failed",{provider:s,error:R}),pe(c instanceof Error?c:new Error(R))}},Be=q?r.resetPasswordTitle:T&&x?r.verificationCodeTitle:a??r.welcomeTitle,Pe=q?r.resetPasswordSubtitle:T&&x?r.codeSentTo(b):u===void 0?r.defaultSubtitle:u;return t.jsxs("div",{className:I("grid w-full",j?"gap-5":"gap-10"),children:[f??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:I("font-medium",j?"text-xl leading-7":"text-2xl leading-8"),children:Be}),Pe&&t.jsx("p",{className:I("text-muted-foreground",j?"text-sm leading-5":"text-base leading-6"),children:Pe})]}),Ce&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Ce)}),ye&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:r.resetEmailSent}),!q&&!(T&&x)&&p&&t.jsx("div",{className:"grid gap-2",children:ce.map(s=>t.jsxs(te,{type:"button",variant:"outline",size:j?"lg":"xl",disabled:S,onClick:()=>{Ue(s.name)},className:I("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 rounded-lg",j?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:I("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),r.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!q&&!(T&&x)&&p&&(F||y.enabled)&&t.jsxs("div",{className:I("flex items-center gap-2.5",j?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:I("text-muted-foreground",j?"text-sm":"text-base"),children:r.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),T&&y.enabled&&t.jsx(t.Fragment,{children:x?t.jsxs("form",{onSubmit:We,className:I("grid gap-2",j&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:I("text-sm font-medium text-foreground",j&&"sr-only"),children:r.verificationCodeLabel}),t.jsx(ee,{id:Se,type:"text",placeholder:r.enterCodePlaceholder,value:D,onChange:X(l),required:!0,disabled:S,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx(te,{type:"submit",size:j?"lg":"xl",disabled:S||!B,className:I(j?"sm:w-auto":"w-full"),children:S?r.verifying:r.verify}),t.jsx("button",{type:"button",onClick:()=>{$(!1),l(""),G.reset(),J.reset()},disabled:S,className:I("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",j&&"sm:col-span-2"),children:r.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Me,className:I("grid gap-2",j&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:K,className:I("text-sm font-medium text-foreground",j&&"sr-only"),children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:r.emailPlaceholder,value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive",children:C})]}),t.jsx(te,{type:"submit",size:j?"lg":"xl",disabled:S||!B,className:I(j?"sm:w-auto":"w-full"),children:S?r.sending:r.sendCode})]})}),q&&F&&!ye&&t.jsxs("form",{onSubmit:$e,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsx(te,{type:"submit",disabled:S||!B,className:"w-full font-semibold",size:"xl",children:S?r.sending:r.sendResetLink})]}),!q&&!T&&F&&t.jsxs("form",{onSubmit:De,className:"grid gap-5",children:[k&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:r.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:r.namePlaceholder,value:U,onChange:X(O),required:!0,disabled:S,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:r.passwordLabel}),!k&&E.enabled&&t.jsx("button",{type:"button",onClick:()=>oe("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r.forgotPassword})]}),t.jsx(ee,{id:Ee,type:"password",placeholder:"••••••••",value:L,onChange:X(Q),required:!0,disabled:S,autoComplete:k?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:I("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",B?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:I("p-1",!B&&"pointer-events-none"),children:t.jsx(te,{type:"submit",disabled:S||!B,className:I("w-full font-semibold"),size:"xl","aria-hidden":!B,children:S?k?r.creatingAccount:r.signingIn:r.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:q?t.jsx("button",{type:"button",onClick:()=>oe("signIn"),disabled:S,className:he,children:r.backToSignIn}):T&&F?t.jsx("button",{type:"button",onClick:()=>oe("signIn"),disabled:S,className:he,children:r.signInWithPassword}):!T&&F?t.jsxs(t.Fragment,{children:[k?r.alreadyHaveAccount:r.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>oe(k?"signIn":"signUp"),disabled:S,className:he,children:k?r.signIn:r.signUp}),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>oe("emailOtp"),disabled:S,className:he,children:r.signInWithEmailCode})]})]}):null})]})}async function fe(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Xe(){const n=ze(),e=Qe(),a=Ve({queryKey:ge.desktopAuthStatus(),queryFn:async()=>(await fe()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[u,f]=w.useState(!1),[o,i]=w.useState(null),[m,g]=w.useState(!1),[N,v]=w.useState(null);w.useEffect(()=>{},[e,n]);async function P(){f(!0),i(null);try{const d=await fe();await d.performAuthLogin();const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{f(!1)}}async function E(){f(!0);try{const d=await fe();await d.performAuthLogout();const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}finally{f(!1)}}async function y(){g(!0),v(null);let d;try{d=await fe()}catch(h){v(h instanceof Error?h.message:"Sign-in failed"),g(!1);return}try{await d.performAuthCompleteSession()}catch(h){v(h instanceof Error?h.message:"Sign-in failed")}finally{try{const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}finally{g(!1)}}}async function A(){await a.refetch()}return{status:a.data,isChecking:a.isLoading,isRetryingStatus:a.isFetching,isPending:u,loginError:o,login:P,logout:E,isCompletingSession:m,completeSessionError:N,completeSession:y,retryStatus:A}}function Ze(n){return!(n.emailAndPassword.enabled||n.emailOtp.enabled||n.socialProviders.enabled)&&!n.sso.enabled&&n.magicLink.enabled}function et(){return le.c(10),Xe(),null}function tt(n){const e=le.c(25),{onContinue:a,isPending:u,error:f}=n,o=be();let i;e[0]!==o?(i=o("common.authEntry.browserOnlyTitle"),e[0]=o,e[1]=i):i=e[1];let m;e[2]!==i?(m=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=m):m=e[3];let g;e[4]!==o?(g=o("common.authEntry.browserOnlyDescription"),e[4]=o,e[5]=g):g=e[5];let N;e[6]!==g?(N=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g}),e[6]=g,e[7]=N):N=e[7];let v;e[8]!==m||e[9]!==N?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),e[8]=m,e[9]=N,e[10]=v):v=e[10];let P;e[11]!==a?(P=()=>{a()},e[11]=a,e[12]=P):P=e[12];let E;e[13]!==o?(E=o("common.authEntry.browserOnlyCta"),e[13]=o,e[14]=E):E=e[14];let y;e[15]!==u||e[16]!==P||e[17]!==E?(y=t.jsx(te,{onClick:P,disabled:u,children:E}),e[15]=u,e[16]=P,e[17]=E,e[18]=y):y=e[18];let A;e[19]!==f?(A=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[19]=f,e[20]=A):A=e[20];let d;return e[21]!==v||e[22]!==y||e[23]!==A?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[v,y,A]}),e[21]=v,e[22]=y,e[23]=A,e[24]=d):d=e[24],d}function Ie(n){const e=le.c(8),{label:a,error:u}=n;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(_e,{size:"lg"}),e[0]=f):f=e[0];let o;e[1]!==a?(o=a&&t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[1]=a,e[2]=o):o=e[2];let i;e[3]!==u?(i=u&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:u}),e[3]=u,e[4]=i):i=e[4];let m;return e[5]!==o||e[6]!==i?(m=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,o,i]}),e[5]=o,e[6]=i,e[7]=m):m=e[7],m}class ke{constructor(e){this.response=e}response}function st(n){return n.startsWith("/")&&!n.startsWith("//")?n:"/"}function nt({redirectTo:n,onAuthEvent:e}){const a=be(),[u,f]=w.useState(null),o=w.useEffectEvent(i=>{try{e?.(i)}catch{}});return w.useEffect(()=>{let i=!1;return(async()=>{o({type:"started",method:"local"});try{let m;try{m=await Ye(async()=>{const g=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(g.status>=500)throw new ke(g);return g},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(g){if(g instanceof Le&&g.cause instanceof ke)m=g.cause.response;else throw g}if(!m.ok){const g=await m.json().catch(()=>({}));throw new Error(g?.error||a("common.authEntry.autoLoginFailed"))}i||(o({type:"succeeded",method:"local"}),window.location.href=st(n))}catch(m){i||(o({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),f(m instanceof Error?m.message:a("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),u?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:a("common.authEntry.autoLoginFailedWithError",{error:u})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:a("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=le.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(_e,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:a,onAuthEvent:u}){const f=w.useEffectEvent(i=>{try{u?.(i)}catch{}}),o=w.useEffectEvent(a);return w.useEffect(()=>{(async()=>{f({type:"started",method:"sso",provider:e});try{const i=await o({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){f({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function dt(n){const e=le.c(51),{callbackUrl:a,redirectUrl:u,allowAutoLogin:f,title:o,subtitle:i,brand:m,copy:g,variant:N,allowedSocialProviders:v,allowPassword:P,onAuthEvent:E,onAuthenticated:y}=n,A=f===void 0?!0:f,d=be(),{sso:h,emailAndPassword:j,magicLink:se,emailOtp:ne,socialProviders:de,localMode:ce}=Fe(),p=et(),F=u||a;let b;e[0]!==y?(b=y?{onAuthenticated:y}:void 0,e[0]=y,e[1]=b):b=e[1];const _=b,L=p?.actions;let Q;e[2]!==_||e[3]!==L?(Q={...Oe,..._,...L},e[2]=_,e[3]=L,e[4]=Q):Q=e[4];const U=Q;if(p?.isPending){let l;e[5]!==d?(l=d("common.authEntry.finishSignInInBrowser"),e[5]=d,e[6]=l):l=e[6];let x;return e[7]!==p.loginError||e[8]!==l?(x=t.jsx(Ie,{label:l,error:p.loginError}),e[7]=p.loginError,e[8]=l,e[9]=x):x=e[9],x}if(p?.isCompletingSession){let l;e[10]!==d?(l=d("common.authEntry.finishingSignIn"),e[10]=d,e[11]=l):l=e[11];let x;return e[12]!==p.completeSessionError||e[13]!==l?(x=t.jsx(Ie,{label:l,error:p.completeSessionError}),e[12]=p.completeSessionError,e[13]=l,e[14]=x):x=e[14],x}if(ce&&A){let l;return e[15]!==E||e[16]!==F?(l=t.jsx(nt,{redirectTo:F,onAuthEvent:E}),e[15]=E,e[16]=F,e[17]=l):l=e[17],l}if(h.enabled){let l;return e[18]!==E||e[19]!==F||e[20]!==U.ssoSignIn||e[21]!==h.providerId?(l=t.jsx(rt,{callbackURL:F,providerId:h.providerId,ssoSignIn:U.ssoSignIn,onAuthEvent:E}),e[18]=E,e[19]=F,e[20]=U.ssoSignIn,e[21]=h.providerId,e[22]=l):l=e[22],l}if(p&&Ze({emailAndPassword:j,emailOtp:ne,socialProviders:de,magicLink:se,sso:h})){let l;return e[23]!==p.isPending||e[24]!==p.login||e[25]!==p.loginError?(l=t.jsx(tt,{onContinue:p.login,isPending:p.isPending,error:p.loginError}),e[23]=p.isPending,e[24]=p.login,e[25]=p.loginError,e[26]=l):l=e[26],l}if(j.enabled||se.enabled||ne.enabled||de.enabled){const l=p?.loginError??p?.completeSessionError??null;let x;e[27]!==_||e[28]!==L?(x={..._,...L},e[27]=_,e[28]=L,e[29]=x):x=e[29];let $;e[30]!==P||e[31]!==v||e[32]!==m||e[33]!==a||e[34]!==g||e[35]!==E||e[36]!==u||e[37]!==i||e[38]!==x||e[39]!==o||e[40]!==N?($=t.jsx(Je,{redirectUrl:u,callbackUrl:a,title:o,subtitle:i,brand:m,copy:g,variant:N,allowedSocialProviders:v,allowPassword:P,onAuthEvent:E,actions:x}),e[30]=P,e[31]=v,e[32]=m,e[33]=a,e[34]=g,e[35]=E,e[36]=u,e[37]=i,e[38]=x,e[39]=o,e[40]=N,e[41]=$):$=e[41];const M=$;if(!l)return M;let W;e[42]!==l?(W=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:l}),e[42]=l,e[43]=W):W=e[43];let C;return e[44]!==M||e[45]!==W?(C=t.jsxs("div",{className:"grid gap-4",children:[W,M]}),e[44]=M,e[45]=W,e[46]=C):C=e[46],C}let O;e[47]!==d?(O=d("common.authEntry.noLoginOptions"),e[47]=d,e[48]=O):O=e[48];let D;return e[49]!==O?(D=t.jsx("div",{children:O}),e[49]=O,e[50]=D):D=e[50],D}export{Te as A,dt as a,Xe as u};
@@ -1 +1 @@
1
- import{c as g,l as p,j as f}from"./index-HWxR2Ep5.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
1
+ import{c as g,l as p,j as f}from"./index-C5LlvZFc.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
@@ -1 +1 @@
1
- import"./index-HWxR2Ep5.js";import{i as u,a as p}from"./mcp-oauth-Cu8OJU0d.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await u({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await p({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
1
+ import"./index-C5LlvZFc.js";import{i as u,a as p}from"./mcp-oauth-B9fQInjX.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await u({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await p({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
@@ -1 +1 @@
1
- import{c as q,b as J,r as U,l as W,j as t,F as X,B as Y,I as Z,H as ee,G as te}from"./index-HWxR2Ep5.js";import{A as se,a as ie,b as ne,c as oe,g as ae,d as re,e as le,f as ce}from"./alert-dialog-Bkxa5kpY.js";import{A as me,K as ue}from"./agent-icon-Ncp9jZCj.js";import{i as de}from"./DotsVertical-B7TYh03O.js";import{s as fe}from"./Trash01-CDoa1NJh.js";import{i as ge}from"./ZoomOut-Cq_Zt2ir.js";import{a as xe}from"./repository-binding-CMSObH6I.js";import{a as pe}from"./use-automations-CEYClL9i.js";function Ce(c){const e=q.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,I]=U.useState(!1),r=xe(a?s.virtual_mcp_id:void 0);let M;e[0]!==s.id||e[1]!==o?(M=()=>{o.mutate(s.id),I(!1)},e[0]=s.id,e[1]=o,e[2]=M):M=e[2];const O=M;let S;e[3]!==n?(S=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=S):S=e[4];const H=S,G=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==G?(u=W("inline-block size-2 rounded-full shrink-0",G),e[5]=G,e[6]=u):u=e[6];const V=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==V?(d=i(V),e[7]=i,e[8]=V,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(me,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let E;e[32]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(X,{asChild:!0,children:t.jsx(Y,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(de,{size:16})})}),e[32]=E):E=e[32];let K,$;e[33]===Symbol.for("react.memo_cache_sentinel")?(K=m=>{m.stopPropagation(),I(!0)},$=t.jsx(fe,{size:16}),e[33]=K,e[34]=$):(K=e[33],$=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(Z,{children:[E,t.jsx(ee,{align:"end",children:t.jsxs(te,{variant:"destructive",onClick:K,children:[$,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let A;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(A=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=A):A=e[45];let b;e[46]!==i?(b=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=b):b=e[47];let D;e[48]!==b?(D=t.jsx(se,{children:b}),e[48]=b,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(ie,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ne,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(oe,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==O||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(ae,{onClick:O,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=O,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(re,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(le,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let F;e[74]!==l||e[75]!==z?(F=t.jsx(ce,{open:l,onOpenChange:I,children:z}),e[74]=l,e[75]=z,e[76]=F):F=e[76];let B;return e[77]!==A||e[78]!==F?(B=t.jsxs(t.Fragment,{children:[A,F]}),e[77]=A,e[78]=F,e[79]=B):B=e[79],B}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=q.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(ue,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(ge,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{Ce as A};
1
+ import{c as q,b as J,r as U,l as W,j as t,F as X,B as Y,I as Z,H as ee,G as te}from"./index-C5LlvZFc.js";import{A as se,a as ie,b as ne,c as oe,g as ae,d as re,e as le,f as ce}from"./alert-dialog-BbSmZoVi.js";import{A as me,K as ue}from"./agent-icon-CfuzWIKW.js";import{i as de}from"./DotsVertical-wjfpXF6W.js";import{s as fe}from"./Trash01-BJ_e57Kj.js";import{i as ge}from"./ZoomOut-B5FfXkUf.js";import{a as xe}from"./repository-binding-BzfYTDYg.js";import{a as pe}from"./use-automations-CY_zEchX.js";function Ce(c){const e=q.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,I]=U.useState(!1),r=xe(a?s.virtual_mcp_id:void 0);let M;e[0]!==s.id||e[1]!==o?(M=()=>{o.mutate(s.id),I(!1)},e[0]=s.id,e[1]=o,e[2]=M):M=e[2];const O=M;let S;e[3]!==n?(S=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=S):S=e[4];const H=S,G=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==G?(u=W("inline-block size-2 rounded-full shrink-0",G),e[5]=G,e[6]=u):u=e[6];const V=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==V?(d=i(V),e[7]=i,e[8]=V,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(me,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let E;e[32]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(X,{asChild:!0,children:t.jsx(Y,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(de,{size:16})})}),e[32]=E):E=e[32];let K,$;e[33]===Symbol.for("react.memo_cache_sentinel")?(K=m=>{m.stopPropagation(),I(!0)},$=t.jsx(fe,{size:16}),e[33]=K,e[34]=$):(K=e[33],$=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(Z,{children:[E,t.jsx(ee,{align:"end",children:t.jsxs(te,{variant:"destructive",onClick:K,children:[$,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let A;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(A=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=A):A=e[45];let b;e[46]!==i?(b=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=b):b=e[47];let D;e[48]!==b?(D=t.jsx(se,{children:b}),e[48]=b,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(ie,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ne,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(oe,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==O||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(ae,{onClick:O,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=O,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(re,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(le,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let F;e[74]!==l||e[75]!==z?(F=t.jsx(ce,{open:l,onOpenChange:I,children:z}),e[74]=l,e[75]=z,e[76]=F):F=e[76];let B;return e[77]!==A||e[78]!==F?(B=t.jsxs(t.Fragment,{children:[A,F]}),e[77]=A,e[78]=F,e[79]=B):B=e[79],B}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=q.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(ue,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(ge,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{Ce as A};
@@ -1 +1 @@
1
- import{c as z,r as lt,b as W,X as it,z as rt,a2 as ct,K as tt,j as s,l as ut,m as dt,e_ as mt}from"./index-HWxR2Ep5.js";import{u as ft}from"./useInfiniteQuery-ak-p-B-L.js";import{u as xt}from"./use-connection-B9WHtxSO.js";import{u as pt}from"./use-mcp-client-DepMR5h0.js";import{b as gt}from"./repository-binding-CMSObH6I.js";import{b as ht,a as Rt}from"./sheet-DiRUSwQB.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as V}from"./table-CDMcGFDs.js";import{E as et}from"./empty-state-CC3oHvo4.js";import{u as Tt}from"./use-infinite-scroll-x37PMcqa.js";import{a as St}from"./use-members-zL7ESsDH.js";import{g as vt}from"./task-status-CayXiTCC.js";import{e as wt}from"./use-automations-CEYClL9i.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-B_nVAoRK.js";function It(c){const t=z.c(15),[i,r]=lt.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,o=a!==-1?c[a]:null,n=o!==null;let l,w;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=u=>r(u),w=()=>r(null),t[3]=l,t[4]=w):(l=t[3],w=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let m;return t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==f||t[13]!==x?(m={selected:o,index:a,isOpen:n,select:l,close:w,prev:f,next:x},t[9]=a,t[10]=o,t[11]=n,t[12]=f,t[13]=x,t[14]=m):m=t[14],m}const Z=50;function X(c){const t=z.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let o;t[2]!==r?(o=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=o):o=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let l;return t[6]!==a||t[7]!==o||t[8]!==n?(l=s.jsxs(mt,{className:"pt-4 px-4 pb-5 gap-1",children:[a,o,n]}),t[6]=a,t[7]=o,t[8]=n,t[9]=l):l=t[9],l}function kt(c){const t=z.c(45),{automationId:i,range:r}=c,e=W(),{data:a,isLoading:o}=wt(i,r),n=a?.runs,l=a?.usage;let w;t[0]!==n?(w=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=w):w=t[1];const f=w;let x;t[2]!==e||t[3]!==l?(x=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=x):x=t[4];const m=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==o||t[8]!==n?.total?(g=o?"…":n?.total.toLocaleString()??"0",t[7]=o,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(X,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const k=o?"…":f;let C;t[19]!==T||t[20]!==k?(C=s.jsx(X,{title:T,value:k}),t[19]=T,t[20]=k,t[21]=C):C=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==o||t[25]!==l?.totalTokens?(p=o?"…":at(l?.totalTokens??0),t[24]=o,t[25]=l?.totalTokens,t[26]=p):p=t[26];let I;t[27]!==S||t[28]!==p||t[29]!==m?(I=s.jsx(X,{title:S,value:p,subtitle:m}),t[27]=S,t[28]=p,t[29]=m,t[30]=I):I=t[30];let d;t[31]!==e?(d=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=d):d=t[32];let j;t[33]!==o||t[34]!==l?(j=o?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=o,t[34]=l,t[35]=j):j=t[35];let v;t[36]!==d||t[37]!==j||t[38]!==m?(v=s.jsx(X,{title:d,value:j,subtitle:m}),t[36]=d,t[37]=j,t[38]=m,t[39]=v):v=t[39];let N;return t[40]!==I||t[41]!==v||t[42]!==R||t[43]!==C?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,C,I,v]}),t[40]=I,t[41]=v,t[42]=R,t[43]=C,t[44]=N):N=t[44],N}function yt(c){const t=z.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,o=W();let n,l;if(t[0]!==i.created_at){const P=new Date(i.created_at);n=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=l}else n=t[1],l=t[2];const w=l;let f,x,m,u,g,h,R,T,k,C,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==o){const P=vt(i.status),U=P.icon;x=st,k=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(V,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=m):m=t[20],f=V,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:P.iconClassName}),u=ut("text-sm",P.labelColor),g=o(P.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=o,t[8]=f,t[9]=x,t[10]=m,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=k,t[17]=C,t[18]=S}else f=t[8],x=t[9],m=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],k=t[16],C=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let I;t[24]!==p||t[25]!==h||t[26]!==R?(I=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=I):I=t[27];let d;t[28]!==f||t[29]!==I||t[30]!==T?(d=s.jsx(f,{className:T,children:I}),t[28]=f,t[29]=I,t[30]=T,t[31]=d):d=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let y;t[38]!==N?(y=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=y):y=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let _;t[42]!==w?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:w}),t[42]=w,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(V,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==y||t[52]!==E||t[53]!==k||t[54]!==C||t[55]!==S?($=s.jsxs(x,{ref:k,className:C,onClick:S,children:[m,d,v,y,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=y,t[52]=E,t[53]=k,t[54]=C,t[55]=S,t[56]=$):$=t[56],$}function Bt(c){const t=z.c(73),{automationId:i,triggerIds:r,range:e}=c,a=W(),{org:o,locator:n}=it();let l;t[0]!==o.id||t[1]!==o.slug?(l={connectionId:rt,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=l):l=t[2];const w=pt(l),f=ct(),x=xt(),m=gt(),{data:u}=St(),g=r.length>0;let h;t[3]!==i||t[4]!==o.id||t[5]!==r?(h=tt.automationRuns(o.id,i,r),t[3]=i,t[4]=o.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:J}=M,ot=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:Z,offset:ot,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:k,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==k?.pages||t[15]!==n||t[16]!==e?(d=(k?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=k?.pages,t[15]=n,t[16]=e,t[17]=d,t[18]=j,t[19]=v,t[20]=N):(d=t[17],j=t[18],v=t[19],N=t[20]);let y;t[21]!==e||t[22]!==f||t[23]!==N?(y=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=y):y=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==y||t[27]!==D?(_={queryKey:j,queryFn:y,enabled:D,staleTime:3e4},t[25]=j,t[26]=y,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=$):$=t[30];const P=$;let U;t[31]!==C||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&C()},t[31]=C,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Y=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(kt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==I||t[40]!==Y||t[41]!==d||t[42]!==b||t[43]!==a||t[44]!==P?(O=g?I?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):d.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(bt,{children:d.map((M,J)=>s.jsx(yt,{run:M,usage:P.get(M.id),onClick:()=>b.select(M.id),lastRowRef:J===d.length-1?Y:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=I,t[40]=Y,t[41]=d,t[42]=b,t[43]=a,t[44]=P,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=M=>{M||b.close()},t[49]=b,t[50]=H):H=t[50];let K;t[51]!==x||t[52]!==m||t[53]!==w||t[54]!==n||t[55]!==u||t[56]!==d||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(K=B&&s.jsx(Ct,{thread:B,client:w,locator:n,connections:x,virtualMcps:m,members:u,nav:{index:b.index,total:d.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=m,t[53]=w,t[54]=n,t[55]=u,t[56]=d,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let Q;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(Q=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=Q):Q=t[72],Q}function _t(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function Pt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<Z))return r.length*Z}export{Bt as A,It as u};
1
+ import{c as z,r as lt,b as W,X as it,z as rt,a2 as ct,K as tt,j as s,l as ut,m as dt,e_ as mt}from"./index-C5LlvZFc.js";import{u as ft}from"./useInfiniteQuery-DpDVtLXw.js";import{u as xt}from"./use-connection-aogXB8HT.js";import{u as pt}from"./use-mcp-client-B2Vh9Cd7.js";import{b as gt}from"./repository-binding-BzfYTDYg.js";import{b as ht,a as Rt}from"./sheet-DhV5S-lN.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as V}from"./table-Dh5pobpb.js";import{E as et}from"./empty-state-BgjT33mH.js";import{u as Tt}from"./use-infinite-scroll-DwjxrCBI.js";import{a as St}from"./use-members-C6qHLZqu.js";import{g as vt}from"./task-status-BXB-vdW8.js";import{e as wt}from"./use-automations-CY_zEchX.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-tvi3Cu-i.js";function It(c){const t=z.c(15),[i,r]=lt.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,o=a!==-1?c[a]:null,n=o!==null;let l,w;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=u=>r(u),w=()=>r(null),t[3]=l,t[4]=w):(l=t[3],w=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let m;return t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==f||t[13]!==x?(m={selected:o,index:a,isOpen:n,select:l,close:w,prev:f,next:x},t[9]=a,t[10]=o,t[11]=n,t[12]=f,t[13]=x,t[14]=m):m=t[14],m}const Z=50;function X(c){const t=z.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let o;t[2]!==r?(o=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=o):o=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let l;return t[6]!==a||t[7]!==o||t[8]!==n?(l=s.jsxs(mt,{className:"pt-4 px-4 pb-5 gap-1",children:[a,o,n]}),t[6]=a,t[7]=o,t[8]=n,t[9]=l):l=t[9],l}function kt(c){const t=z.c(45),{automationId:i,range:r}=c,e=W(),{data:a,isLoading:o}=wt(i,r),n=a?.runs,l=a?.usage;let w;t[0]!==n?(w=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=w):w=t[1];const f=w;let x;t[2]!==e||t[3]!==l?(x=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=x):x=t[4];const m=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==o||t[8]!==n?.total?(g=o?"…":n?.total.toLocaleString()??"0",t[7]=o,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(X,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const k=o?"…":f;let C;t[19]!==T||t[20]!==k?(C=s.jsx(X,{title:T,value:k}),t[19]=T,t[20]=k,t[21]=C):C=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==o||t[25]!==l?.totalTokens?(p=o?"…":at(l?.totalTokens??0),t[24]=o,t[25]=l?.totalTokens,t[26]=p):p=t[26];let I;t[27]!==S||t[28]!==p||t[29]!==m?(I=s.jsx(X,{title:S,value:p,subtitle:m}),t[27]=S,t[28]=p,t[29]=m,t[30]=I):I=t[30];let d;t[31]!==e?(d=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=d):d=t[32];let j;t[33]!==o||t[34]!==l?(j=o?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=o,t[34]=l,t[35]=j):j=t[35];let v;t[36]!==d||t[37]!==j||t[38]!==m?(v=s.jsx(X,{title:d,value:j,subtitle:m}),t[36]=d,t[37]=j,t[38]=m,t[39]=v):v=t[39];let N;return t[40]!==I||t[41]!==v||t[42]!==R||t[43]!==C?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,C,I,v]}),t[40]=I,t[41]=v,t[42]=R,t[43]=C,t[44]=N):N=t[44],N}function yt(c){const t=z.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,o=W();let n,l;if(t[0]!==i.created_at){const P=new Date(i.created_at);n=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=l}else n=t[1],l=t[2];const w=l;let f,x,m,u,g,h,R,T,k,C,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==o){const P=vt(i.status),U=P.icon;x=st,k=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(V,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=m):m=t[20],f=V,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:P.iconClassName}),u=ut("text-sm",P.labelColor),g=o(P.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=o,t[8]=f,t[9]=x,t[10]=m,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=k,t[17]=C,t[18]=S}else f=t[8],x=t[9],m=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],k=t[16],C=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let I;t[24]!==p||t[25]!==h||t[26]!==R?(I=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=I):I=t[27];let d;t[28]!==f||t[29]!==I||t[30]!==T?(d=s.jsx(f,{className:T,children:I}),t[28]=f,t[29]=I,t[30]=T,t[31]=d):d=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let y;t[38]!==N?(y=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=y):y=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let _;t[42]!==w?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:w}),t[42]=w,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(V,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==y||t[52]!==E||t[53]!==k||t[54]!==C||t[55]!==S?($=s.jsxs(x,{ref:k,className:C,onClick:S,children:[m,d,v,y,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=y,t[52]=E,t[53]=k,t[54]=C,t[55]=S,t[56]=$):$=t[56],$}function Bt(c){const t=z.c(73),{automationId:i,triggerIds:r,range:e}=c,a=W(),{org:o,locator:n}=it();let l;t[0]!==o.id||t[1]!==o.slug?(l={connectionId:rt,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=l):l=t[2];const w=pt(l),f=ct(),x=xt(),m=gt(),{data:u}=St(),g=r.length>0;let h;t[3]!==i||t[4]!==o.id||t[5]!==r?(h=tt.automationRuns(o.id,i,r),t[3]=i,t[4]=o.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:J}=M,ot=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:Z,offset:ot,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:k,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==k?.pages||t[15]!==n||t[16]!==e?(d=(k?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=k?.pages,t[15]=n,t[16]=e,t[17]=d,t[18]=j,t[19]=v,t[20]=N):(d=t[17],j=t[18],v=t[19],N=t[20]);let y;t[21]!==e||t[22]!==f||t[23]!==N?(y=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=y):y=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==y||t[27]!==D?(_={queryKey:j,queryFn:y,enabled:D,staleTime:3e4},t[25]=j,t[26]=y,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=$):$=t[30];const P=$;let U;t[31]!==C||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&C()},t[31]=C,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Y=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(kt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==I||t[40]!==Y||t[41]!==d||t[42]!==b||t[43]!==a||t[44]!==P?(O=g?I?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):d.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(bt,{children:d.map((M,J)=>s.jsx(yt,{run:M,usage:P.get(M.id),onClick:()=>b.select(M.id),lastRowRef:J===d.length-1?Y:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=I,t[40]=Y,t[41]=d,t[42]=b,t[43]=a,t[44]=P,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=M=>{M||b.close()},t[49]=b,t[50]=H):H=t[50];let K;t[51]!==x||t[52]!==m||t[53]!==w||t[54]!==n||t[55]!==u||t[56]!==d||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(K=B&&s.jsx(Ct,{thread:B,client:w,locator:n,connections:x,virtualMcps:m,members:u,nav:{index:b.index,total:d.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=m,t[53]=w,t[54]=n,t[55]=u,t[56]=d,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let Q;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(Q=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=Q):Q=t[72],Q}function _t(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function Pt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<Z))return r.length*Z}export{Bt as A,It as u};
@@ -1 +1 @@
1
- import{c as k,j as e,b as $,X as D,d as M,r as q,n as d,B as O,fO as V,q as R}from"./index-HWxR2Ep5.js";import{s as X}from"./Plus-CB7d6UWu.js";import{i as S}from"./ZoomOut-Cq_Zt2ir.js";import{S as F}from"./search-input-KkYEYKdn.js";import{E as T}from"./empty-state-CC3oHvo4.js";import{u as G}from"./use-automations-CEYClL9i.js";import{u as H}from"./use-navigate-to-agent-DRcEQJw4.js";import{A as J}from"./automation-list-row-DmmPl7Bw.js";import{b as K}from"./repository-binding-CMSObH6I.js";import{R as Q}from"./require-capability-C-J2G0JP.js";import"./SearchMd-L7QUcOTu.js";import"./use-mcp-client-DepMR5h0.js";import"./auth-bIc0P9RV.js";import"./thread-intent-DQKTpQfu.js";import"./backoff-8mStPHYB.js";import"./task-board-DQoxAg0z.js";import"./schema-DJA56Znc.js";import"./slugify-CEUa2lfQ.js";import"./alert-dialog-Bkxa5kpY.js";import"./agent-icon-Ncp9jZCj.js";import"./AlertCircle-CZ2r-6fw.js";import"./Tool01-D45Ut_f6.js";import"./ArrowUp-DL-SqfEN.js";import"./ArrowLeft-CUyvjw-L.js";import"./LinkBroken01-DAzor-5J.js";import"./ShoppingBag01-sD-3dhUV.js";import"./Building02-DHvWrFPu.js";import"./CheckCircle-BIdsej-O.js";import"./Check-Xxxm4n9N.js";import"./ChevronUp-CjbQc22U.js";import"./UserSquare-C8QKc8iC.js";import"./Copy01-BsGAkEj7.js";import"./CreditCard01-CdUq8Vzt.js";import"./DotsVertical-B7TYh03O.js";import"./Image01-Cm62Gz39.js";import"./Palette-Bw3lu3zp.js";import"./XClose-knQXpnnU.js";import"./Key01-ClO0ouA9.js";import"./Link01-jFnxVzfa.js";import"./LinkExternal01-CRGszGOd.js";import"./Monitor01-Cx1CPXa6.js";import"./Sun-BY5kKfkJ.js";import"./Trash01-CDoa1NJh.js";import"./Upload01-B-X-AhmC.js";import"./User01-DB2iYIZ6.js";import"./Users01-CM8VThr8.js";import"./X-BB3WvJxy.js";import"./access-gate-CMQ4v3QC.js";import"./capability-load-error-B2aK95hA.js";function U(){const t=k.c(20),o=$(),{org:c}=D(),{data:y}=G(void 0),g=y===void 0?[]:y,E=K(),P=H(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),b=new Map(E.map(W)),A=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=b.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const N=l&&b.has(l)?l:V(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let p;t[0]!==f||t[1]!==c.slug?(p=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=p):p=t[2];const L=p,j=d,C=d,v=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const w=g.length>0&&e.jsx(F,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==w?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,w]}),t[7]=r,t[8]=w,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(O,{size:"sm",onClick:L,children:[e.jsx(X,{size:14}),o("settings.automations.browseAgentsButton")]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(i=>e.jsx(J,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==v.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(v.Container,{children:[n,_]}),t[10]=v.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==C.Content||t[15]!==a?(m=e.jsx(C.Content,{children:a}),t[14]=C.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function W(t){return[t.id,t]}function Jt(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(Q,{capability:"automations:manage",area:"automations",children:e.jsx(U,{})}),t[0]=o):o=t[0],o}export{Jt as default};
1
+ import{c as k,j as e,b as $,X as D,d as M,r as q,n as d,B as O,fO as V,q as R}from"./index-C5LlvZFc.js";import{s as X}from"./Plus-GNsqHUli.js";import{i as S}from"./ZoomOut-B5FfXkUf.js";import{S as F}from"./search-input--Cs2kN0G.js";import{E as T}from"./empty-state-BgjT33mH.js";import{u as G}from"./use-automations-CY_zEchX.js";import{u as H}from"./use-navigate-to-agent-DeIS5d_A.js";import{A as J}from"./automation-list-row-BGPK9DDr.js";import{b as K}from"./repository-binding-BzfYTDYg.js";import{R as Q}from"./require-capability-ZVnNGQoT.js";import"./SearchMd-DeSQISfo.js";import"./use-mcp-client-B2Vh9Cd7.js";import"./auth-5kOh9gsa.js";import"./thread-intent-Cc5BAaIc.js";import"./backoff-8mStPHYB.js";import"./task-board-DGnwsIns.js";import"./schema-DvFu1ToO.js";import"./slugify-CEUa2lfQ.js";import"./alert-dialog-BbSmZoVi.js";import"./agent-icon-CfuzWIKW.js";import"./AlertCircle-DrwoGJpd.js";import"./Tool01-CWjV8YTI.js";import"./ArrowUp-NsPNRi9p.js";import"./ArrowLeft-DKYwT7KB.js";import"./LinkBroken01-CYAPpruG.js";import"./ShoppingBag01-P4dMHDVk.js";import"./Building02-DlH3FV2M.js";import"./CheckCircle-iXm3h-fF.js";import"./Check-BcGsLSsp.js";import"./ChevronUp-BAvbedXO.js";import"./UserSquare-CEkD4_s5.js";import"./Copy01-C_KnfAlj.js";import"./CreditCard01-B7CL5INn.js";import"./DotsVertical-wjfpXF6W.js";import"./Image01-BVwA4uCp.js";import"./Palette-Bh_thK5-.js";import"./XClose-eArhRgkd.js";import"./Key01-C3aJH3VU.js";import"./Link01-BezCCi1I.js";import"./LinkExternal01-D_cGFYPK.js";import"./Monitor01-R0RI8JD-.js";import"./Sun-7PdNidQ5.js";import"./Trash01-BJ_e57Kj.js";import"./Upload01-3jf5OQDv.js";import"./User01-CN7JcgS_.js";import"./Users01-B-RFC-RT.js";import"./X-DvEbwZ22.js";import"./access-gate-Cno0bRAg.js";import"./capability-load-error-B8JQAANB.js";function U(){const t=k.c(20),o=$(),{org:c}=D(),{data:y}=G(void 0),g=y===void 0?[]:y,E=K(),P=H(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),b=new Map(E.map(W)),A=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=b.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const N=l&&b.has(l)?l:V(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let p;t[0]!==f||t[1]!==c.slug?(p=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=p):p=t[2];const L=p,j=d,C=d,v=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const w=g.length>0&&e.jsx(F,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==w?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,w]}),t[7]=r,t[8]=w,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(O,{size:"sm",onClick:L,children:[e.jsx(X,{size:14}),o("settings.automations.browseAgentsButton")]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(i=>e.jsx(J,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==v.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(v.Container,{children:[n,_]}),t[10]=v.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==C.Content||t[15]!==a?(m=e.jsx(C.Content,{children:a}),t[14]=C.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function W(t){return[t.id,t]}function Jt(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(Q,{capability:"automations:manage",area:"automations",children:e.jsx(U,{})}),t[0]=o):o=t[0],o}export{Jt as default};
@@ -1 +1 @@
1
- import{V as d}from"./index-HWxR2Ep5.js";const m=1e4,y="true",i=2;function a(t,n){return d.chatAutosend(t,n)}function l(t){return t==="pending"||t==="sending"}function f(t){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object")return null;const e=n;let o=0;e.status==="sending"?o=e.retryAt===void 0?1:i:e.retryAt!==void 0&&(o=1);const r=e.attempt===void 0?o:e.attempt;return typeof e.createdAt!="number"||typeof e.message!="object"||!l(e.status)||e.retryAt!==void 0&&typeof e.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>i?null:{...n,attempt:r}}function S(t,n,e,o,r=Date.now()){const s={message:o,createdAt:r,status:"pending",attempt:0};return t.setItem(a(n,e),JSON.stringify(s)),s}function p(t,n,e){const o=a(n,e),r=f(t.getItem(o));return r||(t.removeItem(o),null)}function g(t,n,e,o=Date.now()){const r=a(n,e),s=p(t,n,e);if(!s||s.status!=="pending")return null;if(s.attempt>=i)return t.removeItem(r),null;const c=s.retryAt??s.createdAt;if(o-c>=m)return t.removeItem(r),null;const u={...s,status:"sending",attempt:s.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function T(t,n,e){t.removeItem(a(n,e))}export{y as A,T as a,g as c,S as w};
1
+ import{V as d}from"./index-C5LlvZFc.js";const m=1e4,y="true",i=2;function a(t,n){return d.chatAutosend(t,n)}function l(t){return t==="pending"||t==="sending"}function f(t){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object")return null;const e=n;let o=0;e.status==="sending"?o=e.retryAt===void 0?1:i:e.retryAt!==void 0&&(o=1);const r=e.attempt===void 0?o:e.attempt;return typeof e.createdAt!="number"||typeof e.message!="object"||!l(e.status)||e.retryAt!==void 0&&typeof e.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>i?null:{...n,attempt:r}}function S(t,n,e,o,r=Date.now()){const s={message:o,createdAt:r,status:"pending",attempt:0};return t.setItem(a(n,e),JSON.stringify(s)),s}function p(t,n,e){const o=a(n,e),r=f(t.getItem(o));return r||(t.removeItem(o),null)}function g(t,n,e,o=Date.now()){const r=a(n,e),s=p(t,n,e);if(!s||s.status!=="pending")return null;if(s.attempt>=i)return t.removeItem(r),null;const c=s.retryAt??s.createdAt;if(o-c>=m)return t.removeItem(r),null;const u={...s,status:"sending",attempt:s.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function T(t,n,e){t.removeItem(a(n,e))}export{y as A,T as a,g as c,S as w};
@@ -1 +1 @@
1
- import{c as k,j as i,l as f,aH as R,ba as V,bb as I,bc as $}from"./index-HWxR2Ep5.js";import{s as O}from"./User01-DB2iYIZ6.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function H(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const b=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==m||e[20]!==h?(w=f(S({shape:m,size:h}),s),e[18]=s,e[19]=m,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==b||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:b})]}),e[22]=z,e[23]=b,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function W(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let b;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==m||e[15]!==x||e[16]!==l?(b=i.jsx(H,{shape:m,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=m,e[15]=x,e[16]=l,e[17]=b):b=e[17],b}W.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{W as A};
1
+ import{c as k,j as i,l as f,aH as R,ba as V,bb as I,bc as $}from"./index-C5LlvZFc.js";import{s as O}from"./User01-CN7JcgS_.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function H(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const b=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==m||e[20]!==h?(w=f(S({shape:m,size:h}),s),e[18]=s,e[19]=m,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==b||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:b})]}),e[22]=z,e[23]=b,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function W(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let b;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==m||e[15]!==x||e[16]!==l?(b=i.jsx(H,{shape:m,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=m,e[15]=x,e[16]=l,e[17]=b):b=e[17],b}W.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{W as A};
@@ -1 +1 @@
1
- import{c as u,l as g,j as l,bd as v,aH as b}from"./index-HWxR2Ep5.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"border-transparent bg-muted text-muted-foreground [a&]:hover:bg-muted/80"},size:{default:"px-2 py-0.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg border-transparent bg-card p-0 card-shadow"}},defaultVariants:{variant:"default",size:"default"}});function x(d){const e=u.c(14);let r,s,t,n,a;e[0]!==d?({className:r,variant:a,size:t,asChild:n,...s}=d,e[0]=d,e[1]=r,e[2]=s,e[3]=t,e[4]=n,e[5]=a):(r=e[1],s=e[2],t=e[3],n=e[4],a=e[5]);const c=(n===void 0?!1:n)?v:"span";let i;e[6]!==r||e[7]!==t||e[8]!==a?(i=g(f({variant:a,size:t}),r),e[6]=r,e[7]=t,e[8]=a,e[9]=i):i=e[9];let o;return e[10]!==c||e[11]!==s||e[12]!==i?(o=l.jsx(c,{"data-slot":"badge",className:i,...s}),e[10]=c,e[11]=s,e[12]=i,e[13]=o):o=e[13],o}export{x as B};
1
+ import{c as u,l as g,j as l,bd as v,aH as b}from"./index-C5LlvZFc.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"border-transparent bg-muted text-muted-foreground [a&]:hover:bg-muted/80"},size:{default:"px-2 py-0.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg border-transparent bg-card p-0 card-shadow"}},defaultVariants:{variant:"default",size:"default"}});function x(d){const e=u.c(14);let r,s,t,n,a;e[0]!==d?({className:r,variant:a,size:t,asChild:n,...s}=d,e[0]=d,e[1]=r,e[2]=s,e[3]=t,e[4]=n,e[5]=a):(r=e[1],s=e[2],t=e[3],n=e[4],a=e[5]);const c=(n===void 0?!1:n)?v:"span";let i;e[6]!==r||e[7]!==t||e[8]!==a?(i=g(f({variant:a,size:t}),r),e[6]=r,e[7]=t,e[8]=a,e[9]=i):i=e[9];let o;return e[10]!==c||e[11]!==s||e[12]!==i?(o=l.jsx(c,{"data-slot":"badge",className:i,...s}),e[10]=c,e[11]=s,e[12]=i,e[13]=o):o=e[13],o}export{x as B};