decocms 4.582.0 → 4.582.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (412) hide show
  1. package/dist/client/assets/{AlertCircle-D-4TK36c.js → AlertCircle-DT2ZDuIl.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CkFdSy1i.js → AreaChart-DcNurrpT.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-B34wRVvp.js → ArrowLeft-DR_MRxUB.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-Cf_Jm-4W.js → ArrowUp-BdtMKnAz.js} +1 -1
  5. package/dist/client/assets/{BookOpen01-Cu2i97yZ.js → BookOpen01-DejCO54_.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-gyi9lPG0.js → CartesianChart-43C3tGyF.js} +1 -1
  7. package/dist/client/assets/{CategoricalChart-DplIvctj.js → CategoricalChart-GawOpO41.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-D-W30b_A.js → CheckCircle-CM--cqi0.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-BORaKUYt.js → ChevronSelectorVertical-BJDM_s_Z.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-s7k4XU_p.js → ChevronUp-DM7pn8nV.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-C2QL2326.js → CreditCard01-BKZ9QJb-.js} +1 -1
  12. package/dist/client/assets/{Globe04-dU-sELuJ.js → Globe04-BZJYx7x5.js} +1 -1
  13. package/dist/client/assets/{Key01-zay6mYZz.js → Key01-CC_tghZO.js} +1 -1
  14. package/dist/client/assets/{LinkBroken01-D4Fzd5qu.js → LinkBroken01-4l2zZef9.js} +1 -1
  15. package/dist/client/assets/{Minus-BikCplhC.js → Minus-Bj5yI5D8.js} +1 -1
  16. package/dist/client/assets/{Monitor01-DLndo6aP.js → Monitor01-DeK03po-.js} +1 -1
  17. package/dist/client/assets/{Play-D_FIXuay.js → Play-kYcUI1An.js} +1 -1
  18. package/dist/client/assets/{Plus-D2V2-fTF.js → Plus-DEeR8qC2.js} +1 -1
  19. package/dist/client/assets/{ReferenceLine-BHHh91iS.js → ReferenceLine-DbQts9AQ.js} +1 -1
  20. package/dist/client/assets/{SearchMd-DUXCcvZJ.js → SearchMd-DVpGBR2l.js} +1 -1
  21. package/dist/client/assets/{ShoppingBag01-Dak2svm7.js → ShoppingBag01-BV5nZGeU.js} +1 -1
  22. package/dist/client/assets/{Sun-BFXO9tQN.js → Sun-Ba2OXmDv.js} +1 -1
  23. package/dist/client/assets/{SwitchHorizontal01-2Pb5aRtq.js → SwitchHorizontal01-Cp1oX99F.js} +1 -1
  24. package/dist/client/assets/{Tool01-s83oNDoy.js → Tool01-BlUlKjGy.js} +1 -1
  25. package/dist/client/assets/{Tooltip-D91NYjQw.js → Tooltip-DNR0eew9.js} +1 -1
  26. package/dist/client/assets/{Trash01-Bu2u0WVA.js → Trash01-CgZrkZ3U.js} +1 -1
  27. package/dist/client/assets/{Upload01-mgXAmijc.js → Upload01-DDoiK0tv.js} +1 -1
  28. package/dist/client/assets/{UserSquare-DE5Uc7_R.js → UserSquare-DEjJtCDR.js} +1 -1
  29. package/dist/client/assets/{Users01-C3CmvyvK.js → Users01-DVMhWmct.js} +1 -1
  30. package/dist/client/assets/{XClose-l5OHkJlr.js → XClose-xYIhBL8b.js} +1 -1
  31. package/dist/client/assets/{Zap-DN6rNQ1C.js → Zap-BsuEhLd3.js} +1 -1
  32. package/dist/client/assets/{access-gate-CLxhnjg9.js → access-gate-BYQd4796.js} +1 -1
  33. package/dist/client/assets/{add-connection-dialog-ZYFX175e.js → add-connection-dialog-C86xZwTt.js} +1 -1
  34. package/dist/client/assets/agent-app-qCE6mpox.js +1 -0
  35. package/dist/client/assets/{agent-assets-CXtexOn6.js → agent-assets-BERkZgBg.js} +1 -1
  36. package/dist/client/assets/{agent-automation-DnUzn_Xt.js → agent-automation-B3znFoJv.js} +1 -1
  37. package/dist/client/assets/{agent-automations-D4hO7Hf6.js → agent-automations-BI5n1DEk.js} +1 -1
  38. package/dist/client/assets/{agent-blog-C6-P3uCx.js → agent-blog-DFA4iTY2.js} +2 -2
  39. package/dist/client/assets/{agent-blog-post-tCR4iQAk.js → agent-blog-post-CJzR6SRp.js} +2 -2
  40. package/dist/client/assets/{agent-calendar-DqwMJ6TI.js → agent-calendar-DCBRCsam.js} +1 -1
  41. package/dist/client/assets/{agent-capabilities-DWTuevMP.js → agent-capabilities-B40k722B.js} +1 -1
  42. package/dist/client/assets/{agent-connect-sources-CQDMgwdR.js → agent-connect-sources-BvH_YwiD.js} +1 -1
  43. package/dist/client/assets/agent-deck-C_9xRnWL.js +1 -0
  44. package/dist/client/assets/{agent-e2e-CgIk5HXH.js → agent-e2e-B2FpHDAG.js} +1 -1
  45. package/dist/client/assets/agent-experiments-BDFLMLOM.js +1 -0
  46. package/dist/client/assets/{agent-file-C8OplG41.js → agent-file-CAkn0Q5x.js} +1 -1
  47. package/dist/client/assets/{agent-hosting-DZwc-hYc.js → agent-hosting-D0d8gHPR.js} +1 -1
  48. package/dist/client/assets/{agent-icon-DHk7TnW1.js → agent-icon-CpMz1pSC.js} +1 -1
  49. package/dist/client/assets/agent-library-Cs6jlCDK.js +1 -0
  50. package/dist/client/assets/agent-library-file-DV2qsJC9.js +1 -0
  51. package/dist/client/assets/agent-overview-IBMGymrh.js +1 -0
  52. package/dist/client/assets/{agent-releases-DJXEsnr4.js → agent-releases-k0DaB9LQ.js} +1 -1
  53. package/dist/client/assets/agent-settings-DF71XJZP.js +1 -0
  54. package/dist/client/assets/{agent-site-editor-LnCUJUlb.js → agent-site-editor-CS9MMMbk.js} +1 -1
  55. package/dist/client/assets/agent-site-editor-code-gfgfb7xF.js +2 -0
  56. package/dist/client/assets/agent-site-editor-content-C07hh63_.js +1 -0
  57. package/dist/client/assets/agent-site-editor-preview-CFg2FnqN.js +1 -0
  58. package/dist/client/assets/agent-view-CzQtfKwQ.js +1 -0
  59. package/dist/client/assets/{agent-view-guard-BkBbWqXx.js → agent-view-guard-XdI97YrW.js} +1 -1
  60. package/dist/client/assets/{ai-providers-CPyrRCb2.js → ai-providers-DoacYpUR.js} +1 -1
  61. package/dist/client/assets/{alert-I1_CrCmh.js → alert-DFQMLwuf.js} +1 -1
  62. package/dist/client/assets/{analytics-sections-BrNKTJt8.js → analytics-sections-DNjeT1Pf.js} +1 -1
  63. package/dist/client/assets/{api-keys-CQiDxx3i.js → api-keys-Bbyyi1IV.js} +1 -1
  64. package/dist/client/assets/api-keys-CLzhmgUv.js +1 -0
  65. package/dist/client/assets/{app-editor-Bu-6D-sg.js → app-editor-Cd7oWsvo.js} +1 -1
  66. package/dist/client/assets/{asset-utils-B-KuVMuY.js → asset-utils-DxQXeDgB.js} +1 -1
  67. package/dist/client/assets/{auth-Dh-2aYdX.js → auth-Br21RAsk.js} +1 -1
  68. package/dist/client/assets/{auth-catchall-DXrxcWBf.js → auth-catchall-ChHXwieU.js} +1 -1
  69. package/dist/client/assets/{auth-entry-NtnP78Ol.js → auth-entry-BUy5eNSm.js} +1 -1
  70. package/dist/client/assets/{auth-split-layout-FNYje5VL.js → auth-split-layout-DXcvh-93.js} +1 -1
  71. package/dist/client/assets/{authenticate-and-persist-oauth-DOEkiQ_u.js → authenticate-and-persist-oauth-CTJV9ez5.js} +1 -1
  72. package/dist/client/assets/{automation-list-row-CE7SXhaQ.js → automation-list-row-COaiktOt.js} +1 -1
  73. package/dist/client/assets/{automation-runs-C2quHBYd.js → automation-runs-BluUkmKT.js} +1 -1
  74. package/dist/client/assets/{automations-DPaT01e7.js → automations-BvZ8wxJr.js} +1 -1
  75. package/dist/client/assets/{badge-BGmWPELn.js → badge-C2zO_tAX.js} +1 -1
  76. package/dist/client/assets/{block-document-CuBMSVVn.js → block-document-DTM21O-Q.js} +1 -1
  77. package/dist/client/assets/{blocks-preview-workspace-context-MbfgZRXf.js → blocks-preview-workspace-context-0qX3i0Hw.js} +1 -1
  78. package/dist/client/assets/{blocks-tab-states-DdvH_zgH.js → blocks-tab-states-BZoxOO-H.js} +1 -1
  79. package/dist/client/assets/{blog-preview-url-BoKhflQE.js → blog-preview-url-Bcn3MddY.js} +1 -1
  80. package/dist/client/assets/{blog-schema-EWcl-SDU.js → blog-schema-PWQlG4FM.js} +1 -1
  81. package/dist/client/assets/{blog-source-gate-ChrbmkH2.js → blog-source-gate-DcD3mNPu.js} +1 -1
  82. package/dist/client/assets/{blog-view-gate-BPhH6bKz.js → blog-view-gate-BpiHsFQi.js} +1 -1
  83. package/dist/client/assets/{buckets-lH8mvjw2.js → buckets-r-Vn310N.js} +1 -1
  84. package/dist/client/assets/{build-improve-prompt-doc-ZkNhFh73.js → build-improve-prompt-doc-BYTmOiJ8.js} +1 -1
  85. package/dist/client/assets/{calendar-DD1b_D7F.js → calendar-DkvAGmxG.js} +1 -1
  86. package/dist/client/assets/{capability-load-error-CmORVXZR.js → capability-load-error-CHW06qRY.js} +1 -1
  87. package/dist/client/assets/{category-editor-CIxCWDky.js → category-editor-D53-0-dG.js} +1 -1
  88. package/dist/client/assets/{category-tree-ArvPlYX5.js → category-tree-EQNjX_vh.js} +1 -1
  89. package/dist/client/assets/{chart-q3aX-DjJ.js → chart-DP-afdSL.js} +1 -1
  90. package/dist/client/assets/{chat-context-B9rZ1ojJ.js → chat-context-Na_9rQo_.js} +1 -1
  91. package/dist/client/assets/{chat-draft-BsgbOfj3.js → chat-draft-BnT_bTVf.js} +1 -1
  92. package/dist/client/assets/{checkbox-JFndFNuZ.js → checkbox-Dn6r2X61.js} +1 -1
  93. package/dist/client/assets/{choose-editor-DvmC-iMO.js → choose-editor-DFYfaLQ4.js} +1 -1
  94. package/dist/client/assets/{cli-auth-success-CTMmXIbK.js → cli-auth-success-BWjEoABt.js} +1 -1
  95. package/dist/client/assets/{client-icons-CvP_xTjP.js → client-icons-B7ckFhTB.js} +1 -1
  96. package/dist/client/assets/{cms-settings-editor-9nWJpKcE.js → cms-settings-editor-BLtwrg_Q.js} +1 -1
  97. package/dist/client/assets/{cms-store-drafts-Cp0f_S-1.js → cms-store-drafts-DC7_MPeX.js} +1 -1
  98. package/dist/client/assets/{collapsible-B4lmmxiu.js → collapsible-waKUBV3F.js} +1 -1
  99. package/dist/client/assets/collection-detail-BdQUzwBw.js +1 -0
  100. package/dist/client/assets/{collection-display-button-L-gJFCO8.js → collection-display-button-CpOX39FE.js} +1 -1
  101. package/dist/client/assets/{collection-search-j-a5PWZI.js → collection-search-CKJ8zcS9.js} +1 -1
  102. package/dist/client/assets/{collection-table-wrapper-BbdjpVWW.js → collection-table-wrapper-DX64SyX5.js} +1 -1
  103. package/dist/client/assets/{collection-tabs-DHj6Urx3.js → collection-tabs-DL3FYMaD.js} +1 -1
  104. package/dist/client/assets/{combobox-CBPCAqF_.js → combobox-CZTRaybI.js} +1 -1
  105. package/dist/client/assets/{command-DCUf4RGf.js → command-B0-oLV0k.js} +1 -1
  106. package/dist/client/assets/{companion-mcps-section-C-0h9QLB.js → companion-mcps-section-CAkQdc3e.js} +1 -1
  107. package/dist/client/assets/{config-gK1vyYpA.js → config-DhSdzr_l.js} +1 -1
  108. package/dist/client/assets/{connect-BjmhjHJY.js → connect-DwtFEmWa.js} +1 -1
  109. package/dist/client/assets/{connect-layout-BiGf7x_Q.js → connect-layout-By1LwNsY.js} +1 -1
  110. package/dist/client/assets/{connect-source-dialog-C9cU78Fo.js → connect-source-dialog-Clx35W2U.js} +1 -1
  111. package/dist/client/assets/{connection-CG7u8AbM.js → connection-CwOP2DkA.js} +1 -1
  112. package/dist/client/assets/{connection-card-C5XxA3Cv.js → connection-card-DxEnheWw.js} +1 -1
  113. package/dist/client/assets/{connection-detail-DpiK53yx.js → connection-detail-Bm5pNgz3.js} +1 -1
  114. package/dist/client/assets/{connection-form-helpers-B2Vjms_B.js → connection-form-helpers-DsiTws_r.js} +1 -1
  115. package/dist/client/assets/{connection-slug-C9_jBSFl.js → connection-slug-CqKJM07D.js} +1 -1
  116. package/dist/client/assets/{connections-COV9Ow5m.js → connections-8N6-U8BU.js} +1 -1
  117. package/dist/client/assets/{content-tab-Ct80gvFF.js → content-tab-D3gTzU_j.js} +3 -3
  118. package/dist/client/assets/{context-BvzzvYU9.js → context-CdMMXT5s.js} +1 -1
  119. package/dist/client/assets/{context-menu-B7ywEyjT.js → context-menu-BAywIeQG.js} +1 -1
  120. package/dist/client/assets/{context-shell-C6vXZZrB.js → context-shell-C8ZPCYjw.js} +3 -3
  121. package/dist/client/assets/{core.esm-B-QMfivo.js → core.esm-YEEWezEY.js} +1 -1
  122. package/dist/client/assets/{create-organization-dialog-CfD4gWck.js → create-organization-dialog-BpL43B76.js} +1 -1
  123. package/dist/client/assets/{delete-copy-CPJVDDbB.js → delete-copy-UjfjjP4_.js} +1 -1
  124. package/dist/client/assets/{device-hint-CwVsFX34.js → device-hint-AWxEadtg.js} +1 -1
  125. package/dist/client/assets/{discover-BoR_YGj-.js → discover-DhvRjqxh.js} +1 -1
  126. package/dist/client/assets/{domain-settings-Dgpsy8Ru.js → domain-settings-BCvvef40.js} +1 -1
  127. package/dist/client/assets/{drawer-DRyRdlMw.js → drawer-CfOCKnhq.js} +1 -1
  128. package/dist/client/assets/{editor-FceeQfS7.js → editor-COFIs9XE.js} +1 -1
  129. package/dist/client/assets/{editor-classes-D9FopdtJ.js → editor-classes-aqVUSPbm.js} +1 -1
  130. package/dist/client/assets/{empty-message-ILKuHEfQ.js → empty-message-CirmMDhM.js} +1 -1
  131. package/dist/client/assets/{empty-state-BmCMJHsS.js → empty-state-C7Sg1bax.js} +1 -1
  132. package/dist/client/assets/{empty-state-GIO1CyUk.js → empty-state-CFvQY7HR.js} +1 -1
  133. package/dist/client/assets/{experiments-tab-choice-CAU_bLj1.js → experiments-tab-choice-Ch-KXcUZ.js} +1 -1
  134. package/dist/client/assets/{extract-connection-data-BKW6jN3t.js → extract-connection-data-CFxfI9gN.js} +1 -1
  135. package/dist/client/assets/{feature-gate-2lTAc4xs.js → feature-gate-BsIQ70jm.js} +1 -1
  136. package/dist/client/assets/{feature-paywall-DrXSdvNQ.js → feature-paywall-AtUr_EOu.js} +1 -1
  137. package/dist/client/assets/{file-explorer-SB0BRdQa.js → file-explorer-DpEdUCiL.js} +1 -1
  138. package/dist/client/assets/{file-preview-mmsBTOqH.js → file-preview-PSKf9fIz.js} +1 -1
  139. package/dist/client/assets/{file-share-button-BmXIU90b.js → file-share-button-D9sAYI1R.js} +1 -1
  140. package/dist/client/assets/{file-type-icon-CLz3IVP9.js → file-type-icon-3Zm8W435.js} +1 -1
  141. package/dist/client/assets/{folder-icon-DczOK4X3.js → folder-icon-D4-RUOt8.js} +1 -1
  142. package/dist/client/assets/{form-B_7ux469.js → form-BZ7xdssd.js} +1 -1
  143. package/dist/client/assets/{frame-navigation-BFx5wDUC.js → frame-navigation-8oPGH7NY.js} +1 -1
  144. package/dist/client/assets/{general-CPM5iXZa.js → general-Bt-teqGz.js} +1 -1
  145. package/dist/client/assets/{github-icon-1x8ZI6aO.js → github-icon-DH5Sm3NR.js} +1 -1
  146. package/dist/client/assets/{held-block-view-CwWI05W1.js → held-block-view-BR-UYX4S.js} +1 -1
  147. package/dist/client/assets/{home-CYIjoH-m.js → home-CIpHO2ej.js} +1 -1
  148. package/dist/client/assets/{home-overview-BvhVg2vV.js → home-overview-9H7C1hoB.js} +1 -1
  149. package/dist/client/assets/{hosted-reconcile-J9x487tr.js → hosted-reconcile-C5UVxzTP.js} +1 -1
  150. package/dist/client/assets/{icon-button-DoWTRkdN.js → icon-button-BfibpDoO.js} +1 -1
  151. package/dist/client/assets/{index-D9wygnbU.js → index-BP527m3V.js} +4 -4
  152. package/dist/client/assets/{index-CITQS6NN.js → index-BXpXjiyK.js} +1 -1
  153. package/dist/client/assets/{index-rmNLmONI.js → index-BpLEscAk.js} +1 -1
  154. package/dist/client/assets/index-BqWale_V.css +1 -0
  155. package/dist/client/assets/{index-OqiiY1Yn.js → index-CQ7e2YEj.js} +1 -1
  156. package/dist/client/assets/{index-mxlRzmxc.js → index-CmzG_GaM.js} +1 -1
  157. package/dist/client/assets/{index-DT6cEtD6.js → index-DCl7HPjQ.js} +1 -1
  158. package/dist/client/assets/{index-CFoO-AVG.js → index-DF1Gszum.js} +1 -1
  159. package/dist/client/assets/{index-D4fWOfQV.js → index-DN9fxTzN.js} +1 -1
  160. package/dist/client/assets/{index-BW4kEj0q.js → index-DZi8I8ot.js} +1 -1
  161. package/dist/client/assets/{index-BcW9W_hK.js → index-Db96seLi.js} +1 -1
  162. package/dist/client/assets/{index-DpIy5MwJ.js → index-DoH06YKc.js} +1 -1
  163. package/dist/client/assets/{index-3FmhyOXc.js → index-Ds3fsbcX.js} +1 -1
  164. package/dist/client/assets/{index-D-5KT7YJ.js → index-DuYneP0E.js} +1 -1
  165. package/dist/client/assets/{index-BWer9hfc.js → index-dsAQGF7D.js} +1 -1
  166. package/dist/client/assets/{index-B-Ig6PCZ.js → index-jQ2gY_fm.js} +1 -1
  167. package/dist/client/assets/{index-249EXZ6B.js → index-n1AjR0vt.js} +1 -1
  168. package/dist/client/assets/{index-redirect-CJIC9mkE.js → index-redirect-QRKsjVCi.js} +1 -1
  169. package/dist/client/assets/{index-CFMb9ZoK.js → index-tLhNg31B.js} +1 -1
  170. package/dist/client/assets/{infiniteQueryObserver-oJohchTM.js → infiniteQueryObserver-BFZQsptZ.js} +1 -1
  171. package/dist/client/assets/{infra-billing-BmRwy4ol.js → infra-billing-C3ShZZOT.js} +1 -1
  172. package/dist/client/assets/{input-BKW9wk8M.js → input-C1HwcZTs.js} +1 -1
  173. package/dist/client/assets/{input-8RS_xi7t.js → input-GqBshPf5.js} +3 -3
  174. package/dist/client/assets/{integration-icon-BPaLmZuD.js → integration-icon-XUOEUOb8.js} +1 -1
  175. package/dist/client/assets/item-actions-BfBBT1Qz.js +1 -0
  176. package/dist/client/assets/{jira-icon-DjiAFXC-.js → jira-icon-B48lqxRs.js} +1 -1
  177. package/dist/client/assets/{label-CzgbmbQw.js → label-DSlWCd9e.js} +1 -1
  178. package/dist/client/assets/{layout-CUqOdrCT.js → layout-QjOyVmz4.js} +1 -1
  179. package/dist/client/assets/{legacy-admin-welcome-dialog-D_Hj5ND0.js → legacy-admin-welcome-dialog-DWeHIzCA.js} +1 -1
  180. package/dist/client/assets/{legacy-agents-deep-CzKSWS31.js → legacy-agents-deep-COHFWDWb.js} +1 -1
  181. package/dist/client/assets/{legacy-main-redirect-DS2vLtmG.js → legacy-main-redirect-h5ds91_H.js} +1 -1
  182. package/dist/client/assets/library-BMXElwFo.js +1 -0
  183. package/dist/client/assets/{library-tab-CH65a0_i.js → library-tab-DI2mHZkf.js} +1 -1
  184. package/dist/client/assets/{login-BB30sN9A.js → login-DgKeSKz2.js} +1 -1
  185. package/dist/client/assets/{markdown-Ck8Lzm4U.js → markdown-BTKw4nl8.js} +1 -1
  186. package/dist/client/assets/{mcp-app-renderer-Bo8RWBFo.js → mcp-app-renderer-BT9_tzyT.js} +1 -1
  187. package/dist/client/assets/{mcp-oauth-3agwb6e9.js → mcp-oauth-1Tp9szFm.js} +1 -1
  188. package/dist/client/assets/{mcp-oauth-D2OwpRg0.js → mcp-oauth-BQRDLkqA.js} +1 -1
  189. package/dist/client/assets/{members-ChISvAMj.js → members-DQZtkBei.js} +1 -1
  190. package/dist/client/assets/{memory-C27haG4J.js → memory-B82F2Q7k.js} +1 -1
  191. package/dist/client/assets/{mock-board-BywyOk2L.js → mock-board-B7BOXAS7.js} +3 -3
  192. package/dist/client/assets/{monaco-editor-Dfffv6IO.js → monaco-editor-DTLNzmeB.js} +1 -1
  193. package/dist/client/assets/{monitoring-CHShsrek.js → monitoring-CRmBvi8F.js} +1 -1
  194. package/dist/client/assets/{monitoring-stats-row-D7LX-cE_.js → monitoring-stats-row-G2RBze7B.js} +1 -1
  195. package/dist/client/assets/{multi-select-B4TjM0bb.js → multi-select-ykLyfeEh.js} +1 -1
  196. package/dist/client/assets/{mustache-DTIKPLCX.js → mustache-p2j_fCOZ.js} +1 -1
  197. package/dist/client/assets/{named-rule-step-DvAWHM_a.js → named-rule-step-BJ5LyK07.js} +1 -1
  198. package/dist/client/assets/{named-rule-view-BNe6XoGj.js → named-rule-view-BBEm0z_K.js} +1 -1
  199. package/dist/client/assets/{new-project-dialog-MxeroDTr.js → new-project-dialog-C3JFSI1q.js} +1 -1
  200. package/dist/client/assets/{oauth-callback-BAHxkyHL.js → oauth-callback-Cg1KjIf_.js} +1 -1
  201. package/dist/client/assets/{oauth-callback-ai-provider-0HSc9az8.js → oauth-callback-ai-provider-hOquTBPU.js} +1 -1
  202. package/dist/client/assets/{oauth-consent-B6XJ_dp8.js → oauth-consent-CzhJum4d.js} +1 -1
  203. package/dist/client/assets/{onboarding-CpC02gHH.js → onboarding-FLu6ztJj.js} +1 -1
  204. package/dist/client/assets/{openai-conversation-PDrYjlY3.js → openai-conversation-DhsFXaEr.js} +1 -1
  205. package/dist/client/assets/{optimistic-project-sidebar-views-DEmaeFuw.js → optimistic-project-sidebar-views-D6axz004.js} +1 -1
  206. package/dist/client/assets/{order-monitor-day-CWMt_zZN.js → order-monitor-day-CQJg9ymu.js} +1 -1
  207. package/dist/client/assets/{organization-choice-DJG3VWvN.js → organization-choice-dV-mJr-d.js} +1 -1
  208. package/dist/client/assets/{orgs-Dk0Ii4jK.js → orgs-DafOcWKJ.js} +1 -1
  209. package/dist/client/assets/{own-accounts-section-h1niaKS8.js → own-accounts-section-BitxRWkd.js} +1 -1
  210. package/dist/client/assets/{pair-Cd8NH003.js → pair-Dsc6GXhQ.js} +1 -1
  211. package/dist/client/assets/{parse-sections-C45nXdFm.js → parse-sections-Cy8SKsEh.js} +3 -3
  212. package/dist/client/assets/{plan-D9R1-AZQ.js → plan-5t2sCqh-.js} +1 -1
  213. package/dist/client/assets/{plan-ladder-ClYEg_1y.js → plan-ladder-xVKcSuhD.js} +1 -1
  214. package/dist/client/assets/{plan-usage-card-DmepxGNe.js → plan-usage-card-Cxjcl-tF.js} +1 -1
  215. package/dist/client/assets/{popover-DbdL41A-.js → popover-CelLmvH8.js} +1 -1
  216. package/dist/client/assets/{post-calendar-BodpNGCL.js → post-calendar-DkUmj6jK.js} +1 -1
  217. package/dist/client/assets/{post-editor-CVR7WxMp.js → post-editor-DkdXE0U4.js} +1 -1
  218. package/dist/client/assets/{preview-content-CAIaH_bT.js → preview-content-Di9jV9fD.js} +1 -1
  219. package/dist/client/assets/{preview-dialog-CAVf21hW.js → preview-dialog-BTVSDgVC.js} +1 -1
  220. package/dist/client/assets/{preview-panel-DcRdLvZD.js → preview-panel-COaKD6oK.js} +1 -1
  221. package/dist/client/assets/preview-tab-BFi8NHe-.js +557 -0
  222. package/dist/client/assets/{product-picker-dialog-n0_PqHbz.js → product-picker-dialog-tqTphLK7.js} +1 -1
  223. package/dist/client/assets/{profile-C2zVoVuX.js → profile-ItK6hTrx.js} +1 -1
  224. package/dist/client/assets/{project-app-view-DL5XMDyp.js → project-app-view-CMAf9Mlz.js} +1 -1
  225. package/dist/client/assets/{project-apps-Oyn1Gnz0.js → project-apps-ByyLejju.js} +1 -1
  226. package/dist/client/assets/{project-icon-D3VravgB.js → project-icon-TEwy-duh.js} +1 -1
  227. package/dist/client/assets/{project-index-CZL_Bcej.js → project-index-DqRiC0zN.js} +1 -1
  228. package/dist/client/assets/project-reports-CPvLPQcs.js +1 -0
  229. package/dist/client/assets/project-tasks-B88cPPXW.js +1 -0
  230. package/dist/client/assets/{projects-3knV1Wr_.js → projects-FY3sblQl.js} +1 -1
  231. package/dist/client/assets/{projects-empty-state-ChOzUybQ.js → projects-empty-state-OMTDG8SV.js} +1 -1
  232. package/dist/client/assets/{prompts-Cs8yzamL.js → prompts-TP7YCuz6.js} +1 -1
  233. package/dist/client/assets/{record-editor-CkMBdekB.js → record-editor-IJLTcCdR.js} +1 -1
  234. package/dist/client/assets/{redirect-editor-DhGl9GBV.js → redirect-editor-B2-M7doi.js} +1 -1
  235. package/dist/client/assets/{reports-DDPJwQn7.js → reports-CvxegUiQ.js} +1 -1
  236. package/dist/client/assets/reports-ODcJFAP-.js +1 -0
  237. package/dist/client/assets/{reports-onboarding-DMi5ETfa.js → reports-onboarding-BicRsxJF.js} +1 -1
  238. package/dist/client/assets/{reports-tab-tHGof2FW.js → reports-tab-CCY5hBR2.js} +2 -2
  239. package/dist/client/assets/repositories-C0edGPcS.js +1 -0
  240. package/dist/client/assets/{repositories-BTQbxkj9.js → repositories-V6vmPwSM.js} +1 -1
  241. package/dist/client/assets/{repository-binding-C2KfYomQ.js → repository-binding-DGc5VhVW.js} +1 -1
  242. package/dist/client/assets/{repository-picker-BQc3OAcG.js → repository-picker-DO5Hy-o-.js} +1 -1
  243. package/dist/client/assets/{require-capability-BQcAZUwY.js → require-capability-CCGZ96D-.js} +1 -1
  244. package/dist/client/assets/{required-auth-layout-BszE36jh.js → required-auth-layout-DoMwdVaZ.js} +1 -1
  245. package/dist/client/assets/{reset-password-BVb2l5We.js → reset-password-B672rI1V.js} +1 -1
  246. package/dist/client/assets/{resizable-B34lmUXk.js → resizable-DrLaW_Jl.js} +1 -1
  247. package/dist/client/assets/{resolve-tab-icon-DGM8yJyS.js → resolve-tab-icon-CfRdrLF-.js} +1 -1
  248. package/dist/client/assets/{review-settings-BacW9etz.js → review-settings-B8FCs2a_.js} +1 -1
  249. package/dist/client/assets/{role-color-DUV_b0hq.js → role-color-CPDxseg4.js} +1 -1
  250. package/dist/client/assets/{roles-Ce95RFET.js → roles-BYqU9-We.js} +1 -1
  251. package/dist/client/assets/{route-CZrJA2Du.js → route-BXYvPulM.js} +1 -1
  252. package/dist/client/assets/route-Bh9fCZXT.js +1 -0
  253. package/dist/client/assets/{route-ByQoYEQ1.js → route-a1KQq-lz.js} +1 -1
  254. package/dist/client/assets/{sandbox-git-api-Bxa573Th.js → sandbox-git-api-3zULVhcU.js} +1 -1
  255. package/dist/client/assets/{sandbox-lifecycle-context-oW4CAFSP.js → sandbox-lifecycle-context-BEzUu66E.js} +1 -1
  256. package/dist/client/assets/{save-status-Cf9701GC.js → save-status-Cx3aKwGu.js} +1 -1
  257. package/dist/client/assets/{schema-DqcJORUD.js → schema-BtzAS_P2.js} +1 -1
  258. package/dist/client/assets/{schema-gnANfn26.js → schema-DIJe3qA1.js} +1 -1
  259. package/dist/client/assets/{scroll-area-mLdPDQZk.js → scroll-area-mVo2jhxQ.js} +1 -1
  260. package/dist/client/assets/{search-input-DbkaTSNM.js → search-input-ChnwrZA6.js} +1 -1
  261. package/dist/client/assets/{search-toggle-yUKGBwRs.js → search-toggle-CC4Rs40x.js} +1 -1
  262. package/dist/client/assets/{secret-picker-C8Xe_qFX.js → secret-picker-CWGbJrCR.js} +1 -1
  263. package/dist/client/assets/{secrets-7vsHBI_C.js → secrets-DE59ARp-.js} +1 -1
  264. package/dist/client/assets/{section-array-field-ah4STHLi.js → section-array-field-4mOiVd7b.js} +1 -1
  265. package/dist/client/assets/{sections-DwAaRTqc.js → sections-B1sv3rvB.js} +1 -1
  266. package/dist/client/assets/sections-editor-sTEVWcAy.js +1 -0
  267. package/dist/client/assets/{select-C2TZ6w0T.js → select-BNoZ1cwH.js} +1 -1
  268. package/dist/client/assets/{select-model-CfeDs1cS.js → select-model-BqTl5eD-.js} +1 -1
  269. package/dist/client/assets/{seo-editor-BtwYLJ0f.js → seo-editor-iaqzR9NS.js} +1 -1
  270. package/dist/client/assets/{separator-D7JbMKRF.js → separator-CwN-gidC.js} +1 -1
  271. package/dist/client/assets/settings-tab-H1Nf96Yz.js +1 -0
  272. package/dist/client/assets/{sheet-mGT77pmX.js → sheet-1BLiVjE3.js} +1 -1
  273. package/dist/client/assets/{shell-layout-DElHwXzP.js → shell-layout-BHtZVBED.js} +1 -1
  274. package/dist/client/assets/{site-draft-actions-BWcvrVJJ.js → site-draft-actions-GLib44bU.js} +1 -1
  275. package/dist/client/assets/{site-draft-view-BYRbX7hq.js → site-draft-view-CKK7PKoH.js} +1 -1
  276. package/dist/client/assets/site-editor-Bl3uFRW-.js +1 -0
  277. package/dist/client/assets/{site-editor-toast-fJQVfqa6.js → site-editor-toast-BXRGIPuY.js} +1 -1
  278. package/dist/client/assets/{skills-BVBJsFpt.js → skills-Q6l6j9x7.js} +1 -1
  279. package/dist/client/assets/{slider-_L8nnrvM.js → slider-BKrw7nqs.js} +1 -1
  280. package/dist/client/assets/{sortable.esm-Dw4xFH50.js → sortable.esm-CA_k0RaZ.js} +1 -1
  281. package/dist/client/assets/{sso-jLEvOfRs.js → sso-C4bCFgaT.js} +1 -1
  282. package/dist/client/assets/{suggestion-CV5YiylC.js → suggestion-BdOz28RC.js} +1 -1
  283. package/dist/client/assets/{super-agent-icon-tF39Whlb.js → super-agent-icon-DExAOD4i.js} +1 -1
  284. package/dist/client/assets/{switch-B0tv99B3.js → switch-B60LgmjA.js} +1 -1
  285. package/dist/client/assets/{synced-repos-BOeEsDnA.js → synced-repos-DfFbkdSN.js} +1 -1
  286. package/dist/client/assets/{tab-icon-glyph-BgVegBho.js → tab-icon-glyph-MzzsG5oc.js} +1 -1
  287. package/dist/client/assets/{table-CV4RoALe.js → table-KEskYvtS.js} +1 -1
  288. package/dist/client/assets/{tabs-DgvT8Pj5.js → tabs-DXm_rA9S.js} +1 -1
  289. package/dist/client/assets/{task-board-DvkfyL0D.js → task-board-CdhOR9bl.js} +1 -1
  290. package/dist/client/assets/{task-route-DvThF15k.js → task-route-DeSbQRkP.js} +1 -1
  291. package/dist/client/assets/{task-status-B4zkOwKe.js → task-status-Bn4DeOrT.js} +1 -1
  292. package/dist/client/assets/{taskboard-analytics-wmnzdjd1.js → taskboard-analytics-CRI_d1NW.js} +1 -1
  293. package/dist/client/assets/tasks-DGRURa32.js +1 -0
  294. package/dist/client/assets/{tasks-B0KKqEdX.js → tasks-fWq-fqoJ.js} +1 -1
  295. package/dist/client/assets/{textarea-DM0e8Qi7.js → textarea-CRgCAK3p.js} +1 -1
  296. package/dist/client/assets/{thread-analytics-BhQM5Fjz.js → thread-analytics-aoAc3KR6.js} +1 -1
  297. package/dist/client/assets/{thread-intent-CaGJ1BhS.js → thread-intent-DrRX6nG0.js} +1 -1
  298. package/dist/client/assets/{thread-route-B-GLI-gf.js → thread-route-D404Xl1w.js} +1 -1
  299. package/dist/client/assets/{thread-route-DgzeVZc_.js → thread-route-L_F2dRjs.js} +1 -1
  300. package/dist/client/assets/{thread-sheet-body-CtA9qKg3.js → thread-sheet-body-D3DOFB6A.js} +1 -1
  301. package/dist/client/assets/{time-range-picker-CngcAO-k.js → time-range-picker-DouTd8PJ.js} +1 -1
  302. package/dist/client/assets/{toggle-group-Cu1mfNzX.js → toggle-group-JYZ1PCaE.js} +1 -1
  303. package/dist/client/assets/{tool-namespace-DBtCIV7f.js → tool-namespace-BBpCD9sF.js} +1 -1
  304. package/dist/client/assets/{tool-set-selector-CKA5xrb6.js → tool-set-selector-DTAr1xzz.js} +1 -1
  305. package/dist/client/assets/{toolbar-icon-button-VHIAKSnc.js → toolbar-icon-button-B0M5XFng.js} +1 -1
  306. package/dist/client/assets/{tooltip-CVxFMGcO.js → tooltip-D9qNlq6S.js} +1 -1
  307. package/dist/client/assets/{tooltipContext-BptH8Zj7.js → tooltipContext-B94TDN-Q.js} +1 -1
  308. package/dist/client/assets/{track-vSgJeDn7.js → track-DJVHN5Lv.js} +1 -1
  309. package/dist/client/assets/{types-Bz47I97G.js → types-BfPC7vnd.js} +1 -1
  310. package/dist/client/assets/{url-slug-BR0vmMxN.js → url-slug-Bts08KOo.js} +1 -1
  311. package/dist/client/assets/{usage-stats-Dr1e2NVB.js → usage-stats-CK4hgSt6.js} +1 -1
  312. package/dist/client/assets/{use-ai-providers-DTX4zdTq.js → use-ai-providers-CxZCPqVC.js} +1 -1
  313. package/dist/client/assets/{use-apply-named-rule-OLP0GHWV.js → use-apply-named-rule-h1W6SPpC.js} +1 -1
  314. package/dist/client/assets/use-ask-in-chat-D4gRql_N.js +1 -0
  315. package/dist/client/assets/{use-automations-8WbgZhli.js → use-automations-B7d02VWl.js} +1 -1
  316. package/dist/client/assets/{use-autosave-rNMlQ4zg.js → use-autosave-DOc72aWE.js} +1 -1
  317. package/dist/client/assets/use-blocks-v8-project-BLLvbZl2.js +1 -0
  318. package/dist/client/assets/{use-chat-layout-state-DM5US5qS.js → use-chat-layout-state-DQhX2zdi.js} +1 -1
  319. package/dist/client/assets/{use-cms-publish-actions-B-aKIQS2.js → use-cms-publish-actions-DimSJzWP.js} +1 -1
  320. package/dist/client/assets/{use-connect-companion-BcVm5W-r.js → use-connect-companion-CqTyzSlz.js} +1 -1
  321. package/dist/client/assets/{use-connection-Lv1GX4XO.js → use-connection-CFmR-X06.js} +1 -1
  322. package/dist/client/assets/{use-content-sync-CSFDJJ2I.js → use-content-sync-BEqIA-0g.js} +1 -1
  323. package/dist/client/assets/{use-copy-B2pKd0TM.js → use-copy-PziytufC.js} +1 -1
  324. package/dist/client/assets/{use-date-fns-locale-D1sid-Du.js → use-date-fns-locale-BVsHKqDt.js} +1 -1
  325. package/dist/client/assets/{use-debounced-autosave-yF8PgiVs.js → use-debounced-autosave-CU3dUlJX.js} +1 -1
  326. package/dist/client/assets/{use-debounced-value-BAQPYGcf.js → use-debounced-value-DJ5YZsat.js} +1 -1
  327. package/dist/client/assets/{use-deco-credits-DHv1UkQ9.js → use-deco-credits-_9aC49vI.js} +1 -1
  328. package/dist/client/assets/{use-decopilot-events-DGoOKMj0.js → use-decopilot-events-B84nN_Z6.js} +1 -1
  329. package/dist/client/assets/{use-delete-block-y2vOypSK.js → use-delete-block-BbJuByhU.js} +1 -1
  330. package/dist/client/assets/{use-delete-connection-TX_vnMiY.js → use-delete-connection-Bp9D22pQ.js} +1 -1
  331. package/dist/client/assets/{use-deployment-admin-BTOwWmd_.js → use-deployment-admin-D8TSoW7b.js} +1 -1
  332. package/dist/client/assets/{use-entitlements-DpylFAUx.js → use-entitlements-Chh3D10H.js} +1 -1
  333. package/dist/client/assets/{use-fast-preview-draft-url-OHnSoOh2.js → use-fast-preview-draft-url-DRtzWCS3.js} +1 -1
  334. package/dist/client/assets/{use-file-configs-CG-6B_hv.js → use-file-configs-8VTVKs7P.js} +1 -1
  335. package/dist/client/assets/{use-id-selection-DufR_IM-.js → use-id-selection-LGL3_97F.js} +1 -1
  336. package/dist/client/assets/{use-inbox-feed-C9Mwe9dc.js → use-inbox-feed-DjVLN02v.js} +1 -1
  337. package/dist/client/assets/{use-infinite-scroll-uPmbLXy7.js → use-infinite-scroll-BBVWbqWO.js} +1 -1
  338. package/dist/client/assets/{use-join-requests-C9270cag.js → use-join-requests-4dddz-2V.js} +1 -1
  339. package/dist/client/assets/{use-main-panel-tabs-DUVnwi3u.js → use-main-panel-tabs-Bq834oWY.js} +1 -1
  340. package/dist/client/assets/{use-mcp-auth-status-DENAEdO_.js → use-mcp-auth-status-ewp8JzH8.js} +1 -1
  341. package/dist/client/assets/{use-mcp-client-BZnIK-Y4.js → use-mcp-client-CaYmuD4l.js} +1 -1
  342. package/dist/client/assets/{use-mcp-prompts-Dtbvjt4h.js → use-mcp-prompts-lHtFGIni.js} +1 -1
  343. package/dist/client/assets/{use-mcp-tools-ubXBMl6b.js → use-mcp-tools-COoBOTb8.js} +1 -1
  344. package/dist/client/assets/{use-mobile-C5u1Qie9.js → use-mobile-B0YlxBUo.js} +1 -1
  345. package/dist/client/assets/{use-move-blocks-FpNNMdYb.js → use-move-blocks-CRsMTnFT.js} +1 -1
  346. package/dist/client/assets/{use-navigate-to-agent-DtRhmnlg.js → use-navigate-to-agent-D9u86crS.js} +1 -1
  347. package/dist/client/assets/{use-never-published-CqQvHtX-.js → use-never-published-BRSQAhRd.js} +1 -1
  348. package/dist/client/assets/{use-org-fs-Cd0Vep23.js → use-org-fs-Cv09aZqm.js} +1 -1
  349. package/dist/client/assets/{use-org-repo-syncs-SJRy46mf.js → use-org-repo-syncs-CKUvsIrW.js} +1 -1
  350. package/dist/client/assets/{use-org-sso-COBiertF.js → use-org-sso-CBrdU305.js} +1 -1
  351. package/dist/client/assets/{use-organization-settings-CRwm0586.js → use-organization-settings-BWLJTTpw.js} +1 -1
  352. package/dist/client/assets/{use-project-native-view-presence-BnSN9oER.js → use-project-native-view-presence-D5R7YysD.js} +1 -1
  353. package/dist/client/assets/{use-project-scope-lI2ukIh1.js → use-project-scope-Dzg0nsjs.js} +1 -1
  354. package/dist/client/assets/{use-recent-apps-CnCq1w_A.js → use-recent-apps-BKAftwoT.js} +1 -1
  355. package/dist/client/assets/{use-reports-diagnostic-DgRjbmEf.js → use-reports-diagnostic-CgjecoRR.js} +1 -1
  356. package/dist/client/assets/{use-sandbox-events-BZs_wcMW.js → use-sandbox-events-BtXLDGZr.js} +1 -1
  357. package/dist/client/assets/{use-secrets-jhGB5cvg.js → use-secrets-D46GKExN.js} +1 -1
  358. package/dist/client/assets/{use-section-preview-base-CxqwLEJO.js → use-section-preview-base-BO578O9L.js} +1 -1
  359. package/dist/client/assets/{use-sidebar-collapsed-BWtKakyD.js → use-sidebar-collapsed-x7SsKYNl.js} +1 -1
  360. package/dist/client/assets/{use-tags-CBIw_9wj.js → use-tags-LwHF4ikl.js} +1 -1
  361. package/dist/client/assets/{use-task-board-analytics-DVdYIVtB.js → use-task-board-analytics-TZTLLgky.js} +1 -1
  362. package/dist/client/assets/{use-task-board-events-n_cm8Gyp.js → use-task-board-events-U_kvLTo1.js} +1 -1
  363. package/dist/client/assets/{use-task-board-item-prs-KjQVKJGy.js → use-task-board-item-prs-BW_n16vt.js} +1 -1
  364. package/dist/client/assets/{use-task-board-items-gM-MOBw8.js → use-task-board-items-B66t-aAy.js} +1 -1
  365. package/dist/client/assets/{use-task-board-prompts-5OmBV-BO.js → use-task-board-prompts-CHIblyN4.js} +1 -1
  366. package/dist/client/assets/{use-task-metadata-xW_FzRqh.js → use-task-metadata-DdKhuIQ3.js} +1 -1
  367. package/dist/client/assets/{use-thread-outputs-CN7E968n.js → use-thread-outputs-DsjZa1n5.js} +1 -1
  368. package/dist/client/assets/{use-view-draft-kind-BsykP2yK.js → use-view-draft-kind-BtHf66Jj.js} +1 -1
  369. package/dist/client/assets/{use-voice-input-seZQKt1s.js → use-voice-input-Li611DFd.js} +1 -1
  370. package/dist/client/assets/useInfiniteQuery-CN2uIy97.js +1 -0
  371. package/dist/client/assets/{useQueries-BruvTC1j.js → useQueries-B8jtB-RW.js} +1 -1
  372. package/dist/client/assets/useSuspenseInfiniteQuery-ECHIzp7d.js +1 -0
  373. package/dist/client/assets/{users-ByNwcAJI.js → users-zlgoDQuW.js} +1 -1
  374. package/dist/client/assets/{utils-BoDmGD4u.js → utils-DONok1LX.js} +1 -1
  375. package/dist/client/assets/{variant-calendar-BsyPkd78.js → variant-calendar-CjAgTw5u.js} +1 -1
  376. package/dist/client/assets/{variant-matcher-override-CbZkMadE.js → variant-matcher-override-BKIrGg8S.js} +1 -1
  377. package/dist/client/assets/{view-header-tBobsCC8.js → view-header-OfKMmhb0.js} +1 -1
  378. package/dist/client/assets/{virtual-mcp-BJ1dRL5Y.js → virtual-mcp-BKUZFB3-.js} +1 -1
  379. package/dist/client/assets/{watch-sse-pool-HKLsGoUY.js → watch-sse-pool-B39Ow5tK.js} +1 -1
  380. package/dist/client/index.html +2 -2
  381. package/dist/server/server.js +1 -1
  382. package/package.json +1 -1
  383. package/dist/client/assets/agent-app-Cimvv1NW.js +0 -1
  384. package/dist/client/assets/agent-deck-CTEHtbNm.js +0 -1
  385. package/dist/client/assets/agent-experiments-DWa03yYa.js +0 -1
  386. package/dist/client/assets/agent-library-Bhlc7QbZ.js +0 -1
  387. package/dist/client/assets/agent-library-file-NZe3W-xa.js +0 -1
  388. package/dist/client/assets/agent-overview-BjxnoHtS.js +0 -1
  389. package/dist/client/assets/agent-settings-IyhNx_G4.js +0 -1
  390. package/dist/client/assets/agent-site-editor-code-B371nTRh.js +0 -2
  391. package/dist/client/assets/agent-site-editor-content-B6-iieBO.js +0 -1
  392. package/dist/client/assets/agent-site-editor-preview-Dt3bOYz8.js +0 -1
  393. package/dist/client/assets/agent-view-BIybMP8S.js +0 -1
  394. package/dist/client/assets/api-keys-BFjbEQH6.js +0 -1
  395. package/dist/client/assets/collection-detail-DLSsSNsw.js +0 -1
  396. package/dist/client/assets/index-BtRGS8vq.css +0 -1
  397. package/dist/client/assets/item-actions-1298TOwC.js +0 -1
  398. package/dist/client/assets/library-Brt6n-TA.js +0 -1
  399. package/dist/client/assets/preview-tab-Da5MFmuu.js +0 -557
  400. package/dist/client/assets/project-reports-CC7ptk4l.js +0 -1
  401. package/dist/client/assets/project-tasks-DMyDSLCM.js +0 -1
  402. package/dist/client/assets/reports-x6uGEsmu.js +0 -1
  403. package/dist/client/assets/repositories-W2INiIpb.js +0 -1
  404. package/dist/client/assets/route-DwOjJhPU.js +0 -1
  405. package/dist/client/assets/sections-editor-Cw7rVBET.js +0 -1
  406. package/dist/client/assets/settings-tab-Bt6v_h7A.js +0 -1
  407. package/dist/client/assets/site-editor-DtYKhDUe.js +0 -1
  408. package/dist/client/assets/tasks-x5QR56dC.js +0 -1
  409. package/dist/client/assets/use-ask-in-chat-Dom4oae3.js +0 -1
  410. package/dist/client/assets/use-blocks-v8-project-Ol6SuT-M.js +0 -1
  411. package/dist/client/assets/useInfiniteQuery-Bz8irSN1.js +0 -1
  412. package/dist/client/assets/useSuspenseInfiniteQuery-DKXKbUjm.js +0 -1
@@ -1 +1 @@
1
- import{e1 as g,e2 as d,e3 as v}from"./index-D9wygnbU.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=a&&r==="forward",o=c&&r==="forward",n=a&&r==="backward",f=c&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
1
+ import{e1 as g,e2 as d,e3 as v}from"./index-BP527m3V.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=a&&r==="forward",o=c&&r==="forward",n=a&&r==="backward",f=c&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
@@ -1 +1 @@
1
- import{c as k,j as s,i2 as de,b as G,i3 as ue,r as le,i4 as xe,i5 as re,gE as T,gT as W,B as J,dZ as V,a7 as pe}from"./index-D9wygnbU.js";import{i as he}from"./CreditCard01-C2QL2326.js";import{B as L}from"./badge-BGmWPELn.js";import{M as je}from"./multi-select-B4TjM0bb.js";import{S as be,d as ve,c as Be,a as Ne,b as Se}from"./select-C2TZ6w0T.js";import{T as $,a as ye,b as ie,c as F,d as Te,e as we}from"./table-CV4RoALe.js";import{C as ke,X as Ue,Y as Ce}from"./CartesianChart-gyi9lPG0.js";import{T as De}from"./Tooltip-D91NYjQw.js";import{a as _e,A as Me}from"./AreaChart-CkFdSy1i.js";import{c2 as Re}from"./CategoricalChart-DplIvctj.js";import{R as Le}from"./require-capability-BQcAZUwY.js";import"./checkbox-JFndFNuZ.js";import"./Minus-BikCplhC.js";import"./ChevronUp-s7k4XU_p.js";import"./command-DCUf4RGf.js";import"./index-mxlRzmxc.js";import"./SearchMd-DUXCcvZJ.js";import"./popover-DbdL41A-.js";import"./index-BdQq_4o_.js";import"./index-3FmhyOXc.js";import"./index-BW4kEj0q.js";import"./access-gate-CLxhnjg9.js";import"./capability-load-error-CmORVXZR.js";const Q=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),ne=["B","KB","MB","GB","TB","PB"];function oe(t){if(t<=0)return"0 B";const e=Math.min(ne.length-1,Math.floor(Math.log(t)/Math.log(1024))),n=t/1024**e;return`${n.toFixed(n>=100||e===0?0:1)} ${ne[e]}`}const X=50,$e="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",Fe=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function ce(t){return new Date(`${t.slice(0,10)}T00:00:00Z`)}function ee(t){return ce(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}function Ie(){const t=new Date;return Array.from({length:12},(e,n)=>{const l=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()-n,1));return{value:l.toISOString().slice(0,10),label:l.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function Pe(t){return new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function ae(t){const e=k.c(30),{usage:n,metric:l,colorNum:o,formatValue:f,height:i}=t,a=`var(--chart-${o})`,d=`infra-billing-${l}`;let g;e[0]!==n?(g=n.map(Ae),e[0]=n,e[1]=g):g=e[1];const x=g;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b={left:0,right:4,top:8,bottom:0},e[2]=b):b=e[2];let r,p;e[3]!==a?(r=s.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:.25}),p=s.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:0}),e[3]=a,e[4]=r,e[5]=p):(r=e[4],p=e[5]);let h;e[6]!==d||e[7]!==r||e[8]!==p?(h=s.jsx("defs",{children:s.jsxs("linearGradient",{id:d,x1:"0",y1:"0",x2:"0",y2:"1",children:[r,p]})}),e[6]=d,e[7]=r,e[8]=p,e[9]=h):h=e[9];let u;e[10]!==f||e[11]!==i?(u=i>100&&s.jsxs(s.Fragment,{children:[s.jsx(ke,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(Ue,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),s.jsx(Ce,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:f,width:68})]}),e[10]=f,e[11]=i,e[12]=u):u=e[12];let B,v;e[13]===Symbol.for("react.memo_cache_sentinel")?(B={stroke:"var(--border)",strokeDasharray:"4 4"},v={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},e[13]=B,e[14]=v):(B=e[13],v=e[14]);let j;e[15]!==f?(j=s.jsx(De,{cursor:B,contentStyle:v,formatter:C=>f(Number(C)||0)}),e[15]=f,e[16]=j):j=e[16];const y=`url(#${d})`;let N;e[17]!==a||e[18]!==l||e[19]!==y?(N=s.jsx(_e,{type:"linear",dataKey:l,stroke:a,strokeWidth:2,fill:y,dot:!1}),e[17]=a,e[18]=l,e[19]=y,e[20]=N):N=e[20];let m;e[21]!==x||e[22]!==N||e[23]!==h||e[24]!==u||e[25]!==j?(m=s.jsxs(Me,{data:x,margin:b,children:[h,u,j,N]}),e[21]=x,e[22]=N,e[23]=h,e[24]=u,e[25]=j,e[26]=m):m=e[26];let S;return e[27]!==i||e[28]!==m?(S=s.jsx(Re,{width:"100%",height:i,children:m}),e[27]=i,e[28]=m,e[29]=S):S=e[29],S}function Ae(t){return{...t,label:Pe(t.date)}}function Z(t,e){return t.reduce((n,l)=>n+l[e],0)}function Ee(){const t=k.c(39),e=G(),{sites:n,isLoading:l}=ue(),[o,f]=le.useState(null),i=Ie(),[a,d]=le.useState(i[0].value);let g;t[0]!==o||t[1]!==n?(g=o??n.slice(0,X),t[0]=o,t[1]=n,t[2]=g):g=t[2];const x=g,b=!o&&n.length>X,{data:r,isLoading:p}=xe(x,a),h=re();if(l){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(V,{className:"h-64 w-full"}),t[3]=c):c=t[3],c}if(n.length===0){let c;t[4]!==e?(c=e("settings.infraBilling.noSites"),t[4]=e,t[5]=c):c=t[5];let w;return t[6]!==c?(w=s.jsx(T,{className:"p-6 text-sm text-muted-foreground",children:c}),t[6]=c,t[7]=w):w=t[7],w}const u=r?.usage??[],B=r?.pageviewsAvailable??!1,v=!!r&&!r.usageUnavailable,j=(c,w)=>v?w(Z(u,c)):"—",y=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:B&&v?Q.format(Z(u,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:j("requests",Ze)},{key:"dataTransferBytes",title:e("settings.infraBilling.dataTransfer"),description:e("settings.infraBilling.dataTransferDescription"),colorNum:3,total:j("dataTransferBytes",oe)}],N=Oe;let m;t[8]!==r?.teams?(m=r?.teams??[],t[8]=r?.teams,t[9]=m):m=t[9];const S=m;let C;t[10]!==r?.siteSlugsWithoutTeam?(C=r?.siteSlugsWithoutTeam??[],t[10]=r?.siteSlugsWithoutTeam,t[11]=C):C=t[11];const Y=C,U=S.length===1?S[0]:void 0,D=U?.billing??null,te=S.length+(Y.length>0?1:0)>1,K=Z(u,"pageviews"),se=K>0?Z(u,"requests")/K:0,me=B&&v&&K>0?se.toFixed(se<10?1:0):"—";let I;t[12]!==r?.billingUnavailable||t[13]!==U||t[14]!==e||t[15]!==S.length?(I=r?.billingUnavailable?e("settings.infraBilling.billingUnavailable"):S.length>1?e("settings.infraBilling.multipleTeams",{count:String(S.length)}):U?fe(U,e):e("settings.infraBilling.noTeam"),t[12]=r?.billingUnavailable,t[13]=U,t[14]=e,t[15]=S.length,t[16]=I):I=t[16];const ge=I;let _;t[17]!==n?(_=n.map(qe),t[17]=n,t[18]=_):_=t[18];let M;t[19]!==e?(M=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=M):M=t[20];let P;t[21]!==x||t[22]!==_||t[23]!==M?(P=s.jsx(je,{className:"w-auto min-w-56 max-w-full",options:_,defaultValue:x,maxCount:2,placeholder:M,onValueChange:f}),t[21]=x,t[22]=_,t[23]=M,t[24]=P):P=t[24];let R;t[25]!==e?(R=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=R):R=t[26];let A;t[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{}),t[27]=A):A=t[27];let E;t[28]!==R?(E=s.jsx(Se,{className:"w-48","aria-label":R,children:A}),t[28]=R,t[29]=E):E=t[29];let z;t[30]!==x.length||t[31]!==e?(z=x.length===0&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.pickASite")}),t[30]=x.length,t[31]=e,t[32]=z):z=t[32];let q;t[33]!==e||t[34]!==b?(q=b&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.tooManySites",{count:String(X)})}),t[33]=e,t[34]=b,t[35]=q):q=t[35];let O;return t[36]!==r?.usageUnavailable||t[37]!==e?(O=r?.usageUnavailable&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.warehouseUnavailable")}),t[36]=r?.usageUnavailable,t[37]=e,t[38]=O):O=t[38],s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[P,s.jsxs(be,{value:a,onValueChange:d,children:[E,s.jsx(ve,{children:i.map(ze)})]})]}),z,q,O,x.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(W,{title:e("settings.infraBilling.summaryTitle"),children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[s.jsxs(T,{className:"flex-1 flex flex-col gap-4 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(he,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:e("settings.infraBilling.detailsTitle")})]}),U&&D?.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:h.isPending,onClick:()=>h.mutate(U.siteSlugs),children:e("settings.infraBilling.manageButton")})]}),s.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[D?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.currentPlan")}),p?s.jsx(V,{className:"h-5 w-16"}):s.jsx(L,{variant:D.planType==="free"?"secondary":"success",children:e(`settings.infraBilling.plan.${D.planType}`)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:D.nextBillingDate?ee(D.nextBillingDate):"—"})]})]}):!p&&s.jsx("p",{className:"text-xs text-muted-foreground",children:ge}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.requestsPerPageview")}),s.jsx("span",{className:"font-medium tabular-nums",children:me})]})]})]}),y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-2 p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:i.find(w=>w.value===a)?.label})]}),p?s.jsx(V,{className:"h-8 w-24"}):s.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:c.total}),s.jsx("div",{className:"-mx-2",children:s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:64})})]},c.key))]})}),s.jsx(W,{title:e("settings.infraBilling.metricsTitle"),children:s.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-3 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:c.description})]}),s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:220})]},c.key))})}),s.jsx(W,{title:e("settings.infraBilling.invoicesTitle"),children:s.jsx("div",{className:"flex flex-col gap-4 px-4",children:r?r.billingUnavailable?s.jsx(T,{className:"p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.billingUnavailable")}):s.jsxs(s.Fragment,{children:[S.map(c=>s.jsx(Ge,{team:c,showSites:te},c.siteSlugs.join(","))),Y.length>0&&s.jsxs(T,{className:"flex flex-col gap-1 p-4",children:[te&&s.jsx("span",{className:"text-sm font-medium",children:Y.join(", ")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.infraBilling.noTeam")})]})]}):s.jsx(T,{size:"flush",children:s.jsx(V,{className:"m-4 h-24"})})})})]})]})}function ze(t){return s.jsx(Be,{value:t.value,children:t.label},t.value)}function qe(t){return{label:t,value:t}}function Oe(t){return t==="dataTransferBytes"?oe:Ve}function Ve(t){return Q.format(t)}function Ze(t){return Q.format(t)}function fe(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Ge(t){const e=k.c(13),{team:n,showSites:l}=t,o=G(),f=re(),i=n.billing;let a;e[0]!==i||e[1]!==f||e[2]!==l||e[3]!==o||e[4]!==n.siteSlugs?(a=l&&s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border p-4",children:[s.jsx("span",{className:"text-sm font-medium",children:n.siteSlugs.join(", ")}),i&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[s.jsx(L,{variant:i.planType==="free"?"secondary":"success",children:o(`settings.infraBilling.plan.${i.planType}`)}),i.nextBillingDate&&s.jsxs("span",{className:"flex gap-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:o("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:ee(i.nextBillingDate)})]}),i.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:f.isPending,onClick:()=>f.mutate(n.siteSlugs),children:o("settings.infraBilling.manageButton")})]})]}),e[0]=i,e[1]=f,e[2]=l,e[3]=o,e[4]=n.siteSlugs,e[5]=a):a=e[5];let d;e[6]!==i||e[7]!==o||e[8]!==n?(d=i?i.invoices.length===0?s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:o("settings.infraBilling.noInvoices")}):s.jsx(Ye,{invoices:i.invoices}):s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:fe(n,o)}),e[6]=i,e[7]=o,e[8]=n,e[9]=d):d=e[9];let g;return e[10]!==a||e[11]!==d?(g=s.jsxs(T,{size:"flush",className:"gap-0 overflow-x-auto",children:[a,d]}),e[10]=a,e[11]=d,e[12]=g):g=e[12],g}function Ye(t){const e=k.c(40),{invoices:n}=t,l=G();let o;e[0]!==n?(o=n.some(Ke),e[0]=n,e[1]=o):o=e[1];const f=o;let i;e[2]!==l?(i=l("settings.infraBilling.invoiceReference"),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==i?(a=s.jsx($,{children:i}),e[4]=i,e[5]=a):a=e[5];let d;e[6]!==l?(d=l("settings.infraBilling.invoiceDue"),e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=s.jsx($,{children:d}),e[8]=d,e[9]=g):g=e[9];let x;e[10]!==l?(x=l("settings.infraBilling.invoiceAmount"),e[10]=l,e[11]=x):x=e[11];let b;e[12]!==x?(b=s.jsx($,{children:x}),e[12]=x,e[13]=b):b=e[13];let r;e[14]!==l?(r=l("settings.infraBilling.invoiceStatus"),e[14]=l,e[15]=r):r=e[15];let p;e[16]!==r?(p=s.jsx($,{children:r}),e[16]=r,e[17]=p):p=e[17];let h;e[18]!==l?(h=l("settings.infraBilling.invoiceDocuments"),e[18]=l,e[19]=h):h=e[19];let u;e[20]!==h?(u=s.jsx($,{children:h}),e[20]=h,e[21]=u):u=e[21];let B;e[22]!==u||e[23]!==a||e[24]!==g||e[25]!==b||e[26]!==p?(B=s.jsx(ye,{children:s.jsxs(ie,{children:[a,g,b,p,u]})}),e[22]=u,e[23]=a,e[24]=g,e[25]=b,e[26]=p,e[27]=B):B=e[27];let v;if(e[28]!==n||e[29]!==l||e[30]!==f){let N;e[32]!==l||e[33]!==f?(N=m=>s.jsxs(ie,{children:[s.jsx(F,{children:m.referenceMonth?ce(m.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),s.jsx(F,{children:m.dueDate?ee(m.dueDate):"—"}),s.jsx(F,{className:"tabular-nums",children:Fe.format(m.value)}),s.jsx(F,{children:s.jsx(We,{status:m.status})}),s.jsxs(F,{className:"flex gap-2",children:[m.nfUrl&&s.jsx(H,{href:m.nfUrl,label:l("settings.infraBilling.invoiceNf")}),m.bankSlipUrl&&s.jsx(H,{href:m.bankSlipUrl,label:l("settings.infraBilling.invoiceBankSlip")}),!m.bankSlipUrl&&!f&&m.nfUrl&&s.jsx(H,{href:$e,label:l("settings.infraBilling.invoiceBankTransfer")}),!m.nfUrl&&!m.bankSlipUrl&&"—"]})]},m.id),e[32]=l,e[33]=f,e[34]=N):N=e[34],v=n.map(N),e[28]=n,e[29]=l,e[30]=f,e[31]=v}else v=e[31];let j;e[35]!==v?(j=s.jsx(Te,{children:v}),e[35]=v,e[36]=j):j=e[36];let y;return e[37]!==B||e[38]!==j?(y=s.jsxs(we,{children:[B,j]}),e[37]=B,e[38]=j,e[39]=y):y=e[39],y}function Ke(t){return!!t.bankSlipUrl}function H(t){const e=k.c(4),{href:n,label:l}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(pe,{size:14}),e[0]=o):o=e[0];let f;return e[1]!==n||e[2]!==l?(f=s.jsx(J,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",children:[o,l]})}),e[1]=n,e[2]=l,e[3]=f):f=e[3],f}function We(t){const e=k.c(14),{status:n}=t,l=G(),o=n.toLowerCase();if(o==="paid"){let i;e[0]!==l?(i=l("settings.infraBilling.statusPaid"),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==i?(a=s.jsx(L,{variant:"success",children:i}),e[2]=i,e[3]=a):a=e[3],a}if(o==="overdue"){let i;e[4]!==l?(i=l("settings.infraBilling.statusOverdue"),e[4]=l,e[5]=i):i=e[5];let a;return e[6]!==i?(a=s.jsx(L,{variant:"destructive",children:i}),e[6]=i,e[7]=a):a=e[7],a}if(o==="registered"){let i;e[8]!==l?(i=l("settings.infraBilling.statusPending"),e[8]=l,e[9]=i):i=e[9];let a;return e[10]!==i?(a=s.jsx(L,{variant:"warning",children:i}),e[10]=i,e[11]=a):a=e[11],a}let f;return e[12]!==n?(f=s.jsx(L,{variant:"secondary",children:n}),e[12]=n,e[13]=f):f=e[13],f}function Xe(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(de,{group:"billing",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function vt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Le,{capability:"members:manage",area:"billing",children:s.jsx(Xe,{})}),t[0]=e):e=t[0],e}export{vt as default};
1
+ import{c as k,j as s,i2 as de,b as G,i3 as ue,r as le,i4 as xe,i5 as re,gE as T,gT as W,B as J,dZ as V,a7 as pe}from"./index-BP527m3V.js";import{i as he}from"./CreditCard01-BKZ9QJb-.js";import{B as L}from"./badge-C2zO_tAX.js";import{M as je}from"./multi-select-ykLyfeEh.js";import{S as be,d as ve,c as Be,a as Ne,b as Se}from"./select-BNoZ1cwH.js";import{T as $,a as ye,b as ie,c as F,d as Te,e as we}from"./table-KEskYvtS.js";import{C as ke,X as Ue,Y as Ce}from"./CartesianChart-43C3tGyF.js";import{T as De}from"./Tooltip-DNR0eew9.js";import{a as _e,A as Me}from"./AreaChart-DcNurrpT.js";import{c2 as Re}from"./CategoricalChart-GawOpO41.js";import{R as Le}from"./require-capability-CCGZ96D-.js";import"./checkbox-Dn6r2X61.js";import"./Minus-Bj5yI5D8.js";import"./ChevronUp-DM7pn8nV.js";import"./command-B0-oLV0k.js";import"./index-CmzG_GaM.js";import"./SearchMd-DVpGBR2l.js";import"./popover-CelLmvH8.js";import"./index-BdQq_4o_.js";import"./index-Ds3fsbcX.js";import"./index-DZi8I8ot.js";import"./access-gate-BYQd4796.js";import"./capability-load-error-CHW06qRY.js";const Q=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),ne=["B","KB","MB","GB","TB","PB"];function oe(t){if(t<=0)return"0 B";const e=Math.min(ne.length-1,Math.floor(Math.log(t)/Math.log(1024))),n=t/1024**e;return`${n.toFixed(n>=100||e===0?0:1)} ${ne[e]}`}const X=50,$e="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",Fe=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function ce(t){return new Date(`${t.slice(0,10)}T00:00:00Z`)}function ee(t){return ce(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}function Ie(){const t=new Date;return Array.from({length:12},(e,n)=>{const l=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()-n,1));return{value:l.toISOString().slice(0,10),label:l.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function Pe(t){return new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function ae(t){const e=k.c(30),{usage:n,metric:l,colorNum:o,formatValue:f,height:i}=t,a=`var(--chart-${o})`,d=`infra-billing-${l}`;let g;e[0]!==n?(g=n.map(Ae),e[0]=n,e[1]=g):g=e[1];const x=g;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b={left:0,right:4,top:8,bottom:0},e[2]=b):b=e[2];let r,p;e[3]!==a?(r=s.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:.25}),p=s.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:0}),e[3]=a,e[4]=r,e[5]=p):(r=e[4],p=e[5]);let h;e[6]!==d||e[7]!==r||e[8]!==p?(h=s.jsx("defs",{children:s.jsxs("linearGradient",{id:d,x1:"0",y1:"0",x2:"0",y2:"1",children:[r,p]})}),e[6]=d,e[7]=r,e[8]=p,e[9]=h):h=e[9];let u;e[10]!==f||e[11]!==i?(u=i>100&&s.jsxs(s.Fragment,{children:[s.jsx(ke,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(Ue,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),s.jsx(Ce,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:f,width:68})]}),e[10]=f,e[11]=i,e[12]=u):u=e[12];let B,v;e[13]===Symbol.for("react.memo_cache_sentinel")?(B={stroke:"var(--border)",strokeDasharray:"4 4"},v={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},e[13]=B,e[14]=v):(B=e[13],v=e[14]);let j;e[15]!==f?(j=s.jsx(De,{cursor:B,contentStyle:v,formatter:C=>f(Number(C)||0)}),e[15]=f,e[16]=j):j=e[16];const y=`url(#${d})`;let N;e[17]!==a||e[18]!==l||e[19]!==y?(N=s.jsx(_e,{type:"linear",dataKey:l,stroke:a,strokeWidth:2,fill:y,dot:!1}),e[17]=a,e[18]=l,e[19]=y,e[20]=N):N=e[20];let m;e[21]!==x||e[22]!==N||e[23]!==h||e[24]!==u||e[25]!==j?(m=s.jsxs(Me,{data:x,margin:b,children:[h,u,j,N]}),e[21]=x,e[22]=N,e[23]=h,e[24]=u,e[25]=j,e[26]=m):m=e[26];let S;return e[27]!==i||e[28]!==m?(S=s.jsx(Re,{width:"100%",height:i,children:m}),e[27]=i,e[28]=m,e[29]=S):S=e[29],S}function Ae(t){return{...t,label:Pe(t.date)}}function Z(t,e){return t.reduce((n,l)=>n+l[e],0)}function Ee(){const t=k.c(39),e=G(),{sites:n,isLoading:l}=ue(),[o,f]=le.useState(null),i=Ie(),[a,d]=le.useState(i[0].value);let g;t[0]!==o||t[1]!==n?(g=o??n.slice(0,X),t[0]=o,t[1]=n,t[2]=g):g=t[2];const x=g,b=!o&&n.length>X,{data:r,isLoading:p}=xe(x,a),h=re();if(l){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(V,{className:"h-64 w-full"}),t[3]=c):c=t[3],c}if(n.length===0){let c;t[4]!==e?(c=e("settings.infraBilling.noSites"),t[4]=e,t[5]=c):c=t[5];let w;return t[6]!==c?(w=s.jsx(T,{className:"p-6 text-sm text-muted-foreground",children:c}),t[6]=c,t[7]=w):w=t[7],w}const u=r?.usage??[],B=r?.pageviewsAvailable??!1,v=!!r&&!r.usageUnavailable,j=(c,w)=>v?w(Z(u,c)):"—",y=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:B&&v?Q.format(Z(u,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:j("requests",Ze)},{key:"dataTransferBytes",title:e("settings.infraBilling.dataTransfer"),description:e("settings.infraBilling.dataTransferDescription"),colorNum:3,total:j("dataTransferBytes",oe)}],N=Oe;let m;t[8]!==r?.teams?(m=r?.teams??[],t[8]=r?.teams,t[9]=m):m=t[9];const S=m;let C;t[10]!==r?.siteSlugsWithoutTeam?(C=r?.siteSlugsWithoutTeam??[],t[10]=r?.siteSlugsWithoutTeam,t[11]=C):C=t[11];const Y=C,U=S.length===1?S[0]:void 0,D=U?.billing??null,te=S.length+(Y.length>0?1:0)>1,K=Z(u,"pageviews"),se=K>0?Z(u,"requests")/K:0,me=B&&v&&K>0?se.toFixed(se<10?1:0):"—";let I;t[12]!==r?.billingUnavailable||t[13]!==U||t[14]!==e||t[15]!==S.length?(I=r?.billingUnavailable?e("settings.infraBilling.billingUnavailable"):S.length>1?e("settings.infraBilling.multipleTeams",{count:String(S.length)}):U?fe(U,e):e("settings.infraBilling.noTeam"),t[12]=r?.billingUnavailable,t[13]=U,t[14]=e,t[15]=S.length,t[16]=I):I=t[16];const ge=I;let _;t[17]!==n?(_=n.map(qe),t[17]=n,t[18]=_):_=t[18];let M;t[19]!==e?(M=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=M):M=t[20];let P;t[21]!==x||t[22]!==_||t[23]!==M?(P=s.jsx(je,{className:"w-auto min-w-56 max-w-full",options:_,defaultValue:x,maxCount:2,placeholder:M,onValueChange:f}),t[21]=x,t[22]=_,t[23]=M,t[24]=P):P=t[24];let R;t[25]!==e?(R=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=R):R=t[26];let A;t[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{}),t[27]=A):A=t[27];let E;t[28]!==R?(E=s.jsx(Se,{className:"w-48","aria-label":R,children:A}),t[28]=R,t[29]=E):E=t[29];let z;t[30]!==x.length||t[31]!==e?(z=x.length===0&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.pickASite")}),t[30]=x.length,t[31]=e,t[32]=z):z=t[32];let q;t[33]!==e||t[34]!==b?(q=b&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.tooManySites",{count:String(X)})}),t[33]=e,t[34]=b,t[35]=q):q=t[35];let O;return t[36]!==r?.usageUnavailable||t[37]!==e?(O=r?.usageUnavailable&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.warehouseUnavailable")}),t[36]=r?.usageUnavailable,t[37]=e,t[38]=O):O=t[38],s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[P,s.jsxs(be,{value:a,onValueChange:d,children:[E,s.jsx(ve,{children:i.map(ze)})]})]}),z,q,O,x.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(W,{title:e("settings.infraBilling.summaryTitle"),children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[s.jsxs(T,{className:"flex-1 flex flex-col gap-4 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(he,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:e("settings.infraBilling.detailsTitle")})]}),U&&D?.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:h.isPending,onClick:()=>h.mutate(U.siteSlugs),children:e("settings.infraBilling.manageButton")})]}),s.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[D?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.currentPlan")}),p?s.jsx(V,{className:"h-5 w-16"}):s.jsx(L,{variant:D.planType==="free"?"secondary":"success",children:e(`settings.infraBilling.plan.${D.planType}`)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:D.nextBillingDate?ee(D.nextBillingDate):"—"})]})]}):!p&&s.jsx("p",{className:"text-xs text-muted-foreground",children:ge}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.requestsPerPageview")}),s.jsx("span",{className:"font-medium tabular-nums",children:me})]})]})]}),y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-2 p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:i.find(w=>w.value===a)?.label})]}),p?s.jsx(V,{className:"h-8 w-24"}):s.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:c.total}),s.jsx("div",{className:"-mx-2",children:s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:64})})]},c.key))]})}),s.jsx(W,{title:e("settings.infraBilling.metricsTitle"),children:s.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-3 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:c.description})]}),s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:220})]},c.key))})}),s.jsx(W,{title:e("settings.infraBilling.invoicesTitle"),children:s.jsx("div",{className:"flex flex-col gap-4 px-4",children:r?r.billingUnavailable?s.jsx(T,{className:"p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.billingUnavailable")}):s.jsxs(s.Fragment,{children:[S.map(c=>s.jsx(Ge,{team:c,showSites:te},c.siteSlugs.join(","))),Y.length>0&&s.jsxs(T,{className:"flex flex-col gap-1 p-4",children:[te&&s.jsx("span",{className:"text-sm font-medium",children:Y.join(", ")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.infraBilling.noTeam")})]})]}):s.jsx(T,{size:"flush",children:s.jsx(V,{className:"m-4 h-24"})})})})]})]})}function ze(t){return s.jsx(Be,{value:t.value,children:t.label},t.value)}function qe(t){return{label:t,value:t}}function Oe(t){return t==="dataTransferBytes"?oe:Ve}function Ve(t){return Q.format(t)}function Ze(t){return Q.format(t)}function fe(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Ge(t){const e=k.c(13),{team:n,showSites:l}=t,o=G(),f=re(),i=n.billing;let a;e[0]!==i||e[1]!==f||e[2]!==l||e[3]!==o||e[4]!==n.siteSlugs?(a=l&&s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border p-4",children:[s.jsx("span",{className:"text-sm font-medium",children:n.siteSlugs.join(", ")}),i&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[s.jsx(L,{variant:i.planType==="free"?"secondary":"success",children:o(`settings.infraBilling.plan.${i.planType}`)}),i.nextBillingDate&&s.jsxs("span",{className:"flex gap-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:o("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:ee(i.nextBillingDate)})]}),i.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:f.isPending,onClick:()=>f.mutate(n.siteSlugs),children:o("settings.infraBilling.manageButton")})]})]}),e[0]=i,e[1]=f,e[2]=l,e[3]=o,e[4]=n.siteSlugs,e[5]=a):a=e[5];let d;e[6]!==i||e[7]!==o||e[8]!==n?(d=i?i.invoices.length===0?s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:o("settings.infraBilling.noInvoices")}):s.jsx(Ye,{invoices:i.invoices}):s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:fe(n,o)}),e[6]=i,e[7]=o,e[8]=n,e[9]=d):d=e[9];let g;return e[10]!==a||e[11]!==d?(g=s.jsxs(T,{size:"flush",className:"gap-0 overflow-x-auto",children:[a,d]}),e[10]=a,e[11]=d,e[12]=g):g=e[12],g}function Ye(t){const e=k.c(40),{invoices:n}=t,l=G();let o;e[0]!==n?(o=n.some(Ke),e[0]=n,e[1]=o):o=e[1];const f=o;let i;e[2]!==l?(i=l("settings.infraBilling.invoiceReference"),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==i?(a=s.jsx($,{children:i}),e[4]=i,e[5]=a):a=e[5];let d;e[6]!==l?(d=l("settings.infraBilling.invoiceDue"),e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=s.jsx($,{children:d}),e[8]=d,e[9]=g):g=e[9];let x;e[10]!==l?(x=l("settings.infraBilling.invoiceAmount"),e[10]=l,e[11]=x):x=e[11];let b;e[12]!==x?(b=s.jsx($,{children:x}),e[12]=x,e[13]=b):b=e[13];let r;e[14]!==l?(r=l("settings.infraBilling.invoiceStatus"),e[14]=l,e[15]=r):r=e[15];let p;e[16]!==r?(p=s.jsx($,{children:r}),e[16]=r,e[17]=p):p=e[17];let h;e[18]!==l?(h=l("settings.infraBilling.invoiceDocuments"),e[18]=l,e[19]=h):h=e[19];let u;e[20]!==h?(u=s.jsx($,{children:h}),e[20]=h,e[21]=u):u=e[21];let B;e[22]!==u||e[23]!==a||e[24]!==g||e[25]!==b||e[26]!==p?(B=s.jsx(ye,{children:s.jsxs(ie,{children:[a,g,b,p,u]})}),e[22]=u,e[23]=a,e[24]=g,e[25]=b,e[26]=p,e[27]=B):B=e[27];let v;if(e[28]!==n||e[29]!==l||e[30]!==f){let N;e[32]!==l||e[33]!==f?(N=m=>s.jsxs(ie,{children:[s.jsx(F,{children:m.referenceMonth?ce(m.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),s.jsx(F,{children:m.dueDate?ee(m.dueDate):"—"}),s.jsx(F,{className:"tabular-nums",children:Fe.format(m.value)}),s.jsx(F,{children:s.jsx(We,{status:m.status})}),s.jsxs(F,{className:"flex gap-2",children:[m.nfUrl&&s.jsx(H,{href:m.nfUrl,label:l("settings.infraBilling.invoiceNf")}),m.bankSlipUrl&&s.jsx(H,{href:m.bankSlipUrl,label:l("settings.infraBilling.invoiceBankSlip")}),!m.bankSlipUrl&&!f&&m.nfUrl&&s.jsx(H,{href:$e,label:l("settings.infraBilling.invoiceBankTransfer")}),!m.nfUrl&&!m.bankSlipUrl&&"—"]})]},m.id),e[32]=l,e[33]=f,e[34]=N):N=e[34],v=n.map(N),e[28]=n,e[29]=l,e[30]=f,e[31]=v}else v=e[31];let j;e[35]!==v?(j=s.jsx(Te,{children:v}),e[35]=v,e[36]=j):j=e[36];let y;return e[37]!==B||e[38]!==j?(y=s.jsxs(we,{children:[B,j]}),e[37]=B,e[38]=j,e[39]=y):y=e[39],y}function Ke(t){return!!t.bankSlipUrl}function H(t){const e=k.c(4),{href:n,label:l}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(pe,{size:14}),e[0]=o):o=e[0];let f;return e[1]!==n||e[2]!==l?(f=s.jsx(J,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",children:[o,l]})}),e[1]=n,e[2]=l,e[3]=f):f=e[3],f}function We(t){const e=k.c(14),{status:n}=t,l=G(),o=n.toLowerCase();if(o==="paid"){let i;e[0]!==l?(i=l("settings.infraBilling.statusPaid"),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==i?(a=s.jsx(L,{variant:"success",children:i}),e[2]=i,e[3]=a):a=e[3],a}if(o==="overdue"){let i;e[4]!==l?(i=l("settings.infraBilling.statusOverdue"),e[4]=l,e[5]=i):i=e[5];let a;return e[6]!==i?(a=s.jsx(L,{variant:"destructive",children:i}),e[6]=i,e[7]=a):a=e[7],a}if(o==="registered"){let i;e[8]!==l?(i=l("settings.infraBilling.statusPending"),e[8]=l,e[9]=i):i=e[9];let a;return e[10]!==i?(a=s.jsx(L,{variant:"warning",children:i}),e[10]=i,e[11]=a):a=e[11],a}let f;return e[12]!==n?(f=s.jsx(L,{variant:"secondary",children:n}),e[12]=n,e[13]=f):f=e[13],f}function Xe(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(de,{group:"billing",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function vt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Le,{capability:"members:manage",area:"billing",children:s.jsx(Xe,{})}),t[0]=e):e=t[0],e}export{vt as default};
@@ -1 +1 @@
1
- import{c as H,r as C,b as G,j as h,t as A,a5 as ye,x as xe,aT as ke,w as we,B as be,v as Pe,D as Ce,q as le,a4 as ce,K as Y,E as Q,gj as ue,gk as re,gl as z,m as _e}from"./index-D9wygnbU.js";import{S as de,s as Se}from"./suggestion-CV5YiylC.js";import{K as Fe,t as De,A as Ie,p as B,L as je,P as ne,O as ve,h as Me,a as Le,Q as Re,o as Ee,l as Ae,F as Ne,s as Te,E as Qe}from"./usage-stats-Dr1e2NVB.js";import{b0 as Oe}from"./agent-icon-DHk7TnW1.js";import"./chat-context-B9rZ1ojJ.js";import{m as Ue,i as $e,b as qe}from"./index-CFoO-AVG.js";import{u as me}from"./use-mcp-client-BZnIK-Y4.js";import{a as Ke}from"./repository-binding-C2KfYomQ.js";import{g as se,s as fe}from"./tool-namespace-DBtCIV7f.js";import{l as oe,g as pe}from"./use-mcp-prompts-Dtbvjt4h.js";import{f as ze,b as Be}from"./use-org-fs-Cd0Vep23.js";async function He(t,e,r,s,i,o){if(!Ue(e)){A.error("Selected model does not support file uploads");return}const l=r.type||"application/octet-stream";if(!$e(l,e)){const g=qe(e).parts.map(m=>o(m)).join(", "),k=e?.title??"This model";i?i({fileName:r.name,modelName:k,accepted:g}):A.error(`"${r.name}" can't be attached`,{description:`${k} accepts ${g}.`});return}const c=10*1024*1024;if(r.size>c){A.error(`File "${r.name}" exceeds 10MB limit`);return}try{const g=new FileReader,k=new Promise((n,u)=>{g.onload=()=>{const d=g.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const b=d.includes(",")?d.split(",")[1]??d:d;n(b)},g.onerror=u});g.readAsDataURL(r);const m=await k,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:m};Fe(t,{from:s,to:s},p)}catch(g){console.error("Failed to process file:",g),A.error(`Failed to load file "${r.name}"`)}}function Je(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const l=Array.from(i);return(async()=>{let c=o.pos;for(const g of l)await s(g,c),c=t.state.selection.to})(),!0}function Ve(t){const e=H.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=G(),l=C.useRef(Xe);let c,g;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(c=()=>{l.current=async(p,n)=>{await He(r,s,p,n,i,o)}},g=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=c,e[5]=g):(c=e[4],g=e[5]),C.useEffect(c,g);let k,m;return e[6]!==r?(k=()=>{if(r?.isDestroyed)return;const p=new De("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new Ie({key:p,props:{handleDrop:(d,b,F,S)=>Je(d,b,S,(_,j)=>l.current(_,j)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const S=Array.from(F).filter(We);return S.length===0?!1:(b.preventDefault(),(async()=>{let _=d.state.selection.from;for(const j of S){const I=j.getAsFile();I&&(await l.current?.(I,_),_=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},m=[r],e[6]=r,e[7]=k,e[8]=m):(k=e[7],m=e[8]),C.useEffect(k,m),null}function We(t){return t.kind==="file"}function Xe(){return Promise.resolve()}function bt(t){const e=H.c(43),{info:r,onClose:s}=t,i=G(),o=r!==null;let l;e[0]!==s?(l=v=>!v&&s(),e[0]=s,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=c):c=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=g):g=e[3];let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(ye,{size:18})}),e[4]=k):k=e[4];let m;e[5]!==i?(m=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=m):m=e[6];let p;e[7]!==m?(p=h.jsx(xe,{className:"text-xl font-semibold tracking-tight",children:m}),e[7]=m,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let b;e[13]!==d||e[14]!==u?(b=h.jsxs(ke,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=b):b=e[15];let F;e[16]!==b||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[g,h.jsxs(we,{className:"relative gap-4",children:[k,h.jsxs("div",{children:[p,b]})]})]}),e[16]=b,e[17]=p,e[18]=F):F=e[18];const S=r?.modelName??"";let _;e[19]!==i||e[20]!==S?(_=i("chat.uploader.accepts",{modelName:S}),e[19]=i,e[20]=S,e[21]=_):_=e[21];let j;e[22]!==_?(j=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:_}),e[22]=_,e[23]=j):j=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=h.jsx(Oe,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const L=r?.accepted;let D;e[25]!==L?(D=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,h.jsx("span",{className:"capitalize",children:L})]}),e[25]=L,e[26]=D):D=e[26];let a;e[27]!==j||e[28]!==D?(a=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"surface p-4",children:[j,D]})}),e[27]=j,e[28]=D,e[29]=a):a=e[29];let f;e[30]!==i?(f=i("chat.uploader.gotIt"),e[30]=i,e[31]=f):f=e[31];let x;e[32]!==s||e[33]!==f?(x=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(be,{onClick:s,children:f})}),e[32]=s,e[33]=f,e[34]=x):x=e[34];let P;e[35]!==F||e[36]!==a||e[37]!==x?(P=h.jsxs(Pe,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ye,children:[F,a,x]}),e[35]=F,e[36]=a,e[37]=x,e[38]=P):P=e[38];let M;return e[39]!==o||e[40]!==l||e[41]!==P?(M=h.jsx(Ce,{open:o,onOpenChange:l,children:P}),e[39]=o,e[40]=l,e[41]=P,e[42]=M):M=e[42],M}function Ye(t){return t.preventDefault()}function Pt(){const t=H.c(3),[e,r]=C.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}function he(t,e){return e||t}const Ge=t=>{const e=H.c(50),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=G(),l=le(),{org:c}=ce(),g=Ke();let k;e[0]!==c.id||e[1]!==c.slug||e[2]!==s?(k={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=c.id,e[1]=c.slug,e[2]=s,e[3]=k):k=e[3];const m=me(k);let p;e[4]!==c.id||e[5]!==s?(p=Y.virtualMcpResources(s,c.id),e[4]=c.id,e[5]=s,e[6]=p):p=e[6];const n=p,[u,d]=C.useState("categories");let b;e[7]!==u?(b=()=>u,e[7]=u,e[8]=b):b=e[8];const F=C.useEffectEvent(b),S=C.useRef(null),_=C.useRef(!1),j=s??"default";let I;e[9]!==u||e[10]!==c.id||e[11]!==j?(I=["at-mention",c.id,j,u],e[9]=u,e[10]=c.id,e[11]=j,e[12]=I):I=e[12];const L=I;let D;e[13]!==o?(D=o("chat.mentionAt.agentsTitle"),e[13]=o,e[14]=D):D=e[14];let a;e[15]!==o?(a=o("chat.mentionAt.agentsDescription"),e[15]=o,e[16]=a):a=e[16];let f;e[17]!==D||e[18]!==a?(f={name:"agents",title:D,description:a,kind:"category",drillable:!0},e[17]=D,e[18]=a,e[19]=f):f=e[19];let x;e[20]!==o?(x=o("chat.mentionAt.resourcesTitle"),e[20]=o,e[21]=x):x=e[21];let P;e[22]!==o?(P=o("chat.mentionAt.resourcesDescription"),e[22]=o,e[23]=P):P=e[23];let M;e[24]!==P||e[25]!==x?(M={name:"resources",title:x,description:P,kind:"category",drillable:!0},e[24]=P,e[25]=x,e[26]=M):M=e[26];let v;e[27]!==M||e[28]!==f?(v=[f,M],e[27]=M,e[28]=f,e[29]=v):v=e[29];const $=v;let O;e[30]!==m||e[31]!==r||e[32]!==o?(O=async U=>{const{item:w,range:K}=U;if(Q("chat_picker_item_selected",{picker:"@",item_kind:w.kind,item_name:w.name}),w.kind!=="category"&&(_.current=!0),w.kind==="category")return d(w.name==="agents"?"agents":"resources"),!1;if(w.kind==="agent"&&w.agentId){B(r,K,{id:w.agentId,name:w.name,metadata:{agentId:w.agentId,title:w.name},char:"@"}),d("categories");return}if(w.kind==="resource"&&w.uri&&m){try{const T=await ue(m,w.uri);B(r,K,{id:w.uri,name:w.uri,metadata:T.contents,char:"@"})}catch(T){console.error("[at-mention] Failed to fetch resource:",T),A.error(o("chat.mentionAt.failedToLoadResource"))}d("categories");return}},e[30]=m,e[31]=r,e[32]=o,e[33]=O):O=e[33];const q=O;let y;e[34]!==g||e[35]!==$||e[36]!==m||e[37]!==F||e[38]!==l||e[39]!==n||e[40]!==s?(y=async U=>{const{query:w}=U,K=F();if(K==="categories"){if(!w.trim())return $;const R=w.toLowerCase(),E=g.filter(N=>N.status==="active"&&(!N.id||!re(N.id))&&N.id!==s&&(N.title.toLowerCase().includes(R)||N.description?.toLowerCase().includes(R))).map(Ze),X=await(async()=>{if(!m)return[];let N=l.getQueryData(n);return N||(N=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4})),(N?.resources??[]).filter(te=>te.uri.toLowerCase().includes(R)||te.name?.toLowerCase().includes(R)||te.description?.toLowerCase().includes(R)).map(et)})();return[...E,...X]}if(K==="agents"){let R=g.filter(E=>E.status==="active"&&(!E.id||!re(E.id))&&E.id!==s);if(w.trim()){const E=w.toLowerCase();R=R.filter(X=>X.title.toLowerCase().includes(E)||X.description?.toLowerCase().includes(E))}return R.map(tt)}if(!m)return[];let T=l.getQueryData(n);T?l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4}).catch(st):T=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4});let W=T?.resources??[];if(w.trim()){const R=w.toLowerCase();W=W.filter(E=>E.uri.toLowerCase().includes(R)||E.name?.toLowerCase().includes(R)||E.description?.toLowerCase().includes(R))}return W.map(rt)},e[34]=g,e[35]=$,e[36]=m,e[37]=F,e[38]=l,e[39]=n,e[40]=s,e[41]=y):y=e[41];const Z=y;let J;e[42]!==i?(J=U=>{if(i&&(i.current=U),U)S.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"@"});else{const w=S.current;Q("chat_picker_closed",{picker:"@",outcome:_.current?"selected":"dismissed",duration_ms:w?Date.now()-w:null}),S.current=null,d("categories")}},e[42]=i,e[43]=J):J=e[43];const ee=J;let V;return e[44]!==r||e[45]!==Z||e[46]!==q||e[47]!==ee||e[48]!==L?(V=h.jsx(de,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:L,queryFn:Z,onSelect:q,onOpenChange:ee}),e[44]=r,e[45]=Z,e[46]=q,e[47]=ee,e[48]=L,e[49]=V):V=e[49],V};function Ze(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function et(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}function tt(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function st(){}function rt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function ie(t,e,r,s,i,o,l){try{const c=await pe(r,s,o);B(t,e,{id:s,name:fe(s,i),metadata:c.messages,char:"/",kind:"prompt",args:o})}catch(c){console.error("[slash] Failed to fetch prompt:",c),A.error(l.t("chat.mentionSlash.failedLoadPrompt"))}}async function nt(t,e,r,s,i){try{const o=await ue(r,s);B(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),A.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function ot(t,e,r,s,i){try{const{files:o,omittedPaths:l}=await ze(r,s.volume,s.path),c={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:l};B(t,e,{id:s.id,name:s.name,metadata:c,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),A.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const it=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=G(),i=le(),{org:o}=ce(),l=me({connectionId:e,orgId:o.id,orgSlug:o.slug}),c=Y.virtualMcpPrompts(e,o.id),g=Y.virtualMcpResources(e,o.id),k=Y.slashSkills(o.id),m=["slash-mention",o.id,e??"default"],[p,n]=C.useState(null),[u,d]=C.useState(null),b=je(t);b&&(b.onEditChip=async a=>{if(l)try{const x=(await ae(i,c,l)).find(P=>P.name===a.promptId);if(!x?.arguments||x.arguments.length===0)return;d({...a,prompt:x})}catch(f){console.error("[slash] Failed to load prompt for editing:",f),A.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),S=C.useRef(!1),_=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),S.current=!0,!!l)if(a.kind==="prompt"){if(a.arguments&&a.arguments.length>0){n({range:f,item:a});return}const x=se(a._meta);await ie(t,f,l,a.name,x,void 0,{t:s})}else a.kind==="skill"?a.skill&&await ot(t,f,o.slug,a.skill,{t:s}):a.uri&&await nt(t,f,l,a.uri,{t:s})},j=async a=>{if(!p||!l)return;const{range:f,item:x}=p,P=se(x._meta);await ie(t,f,l,x.name,P,a,{t:s}),n(null)},I=async a=>{if(!(!u||!l)){if(!ve(t,u.pos,u.promptId)){A.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const f=await pe(l,u.promptId,a),x=se(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Me({id:u.promptId,name:fe(u.promptId,x),metadata:f.messages,char:"/",kind:"prompt",args:a})).run(),Q("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(f){console.error("[slash] Failed to update prompt:",f),A.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},L=async a=>{const{query:f}=a;if(!l)return[];const[x,P,M]=await Promise.all([ae(i,c,l),lt(i,g,l),at(i,k,o.slug)]),v=f.trim().toLowerCase(),$=(x??[]).filter(y=>!v||y.name.toLowerCase().includes(v)||y.title?.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name,title:y.title,description:y.description,kind:"prompt",arguments:y.arguments,_meta:y._meta})),O=(P??[]).filter(y=>!v||y.uri.toLowerCase().includes(v)||y.name?.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name??y.uri,title:y.name,description:y.description,kind:"resource",uri:y.uri})),q=(M??[]).filter(y=>!v||y.name.toLowerCase().includes(v)||y.id.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name,title:y.name,description:y.description??void 0,kind:"skill",skill:y}));return[...$,...O,...q]},D=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(de,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:m,queryFn:L,onSelect:_,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),S.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:S.current?"selected":"dismissed",duration_ms:f?Date.now()-f:null}),F.current=null}}}),h.jsx(ne,{prompt:D,setPrompt:()=>n(null),onSubmit:j}),h.jsx(ne,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:I,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ae(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function at(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Be(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function lt(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ge="Ask anything, / for prompts & skills, @ for agents & resources...";function ct(t){return[Te.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),Se.configure({placeholder:()=>t.current??ge,showOnlyWhenEditable:!1}),Ae,Ne]}function Ct({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:l,children:c}){const g=C.useRef(o),k=C.useRef(e),m=C.useRef(s),p=C.useRef(i),n=Le({extensions:ct(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ge,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-base p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&m.current&&!l?.current?(d.preventDefault(),g.current?.(),!0):!1},onUpdate:({editor:u})=>{k.current(u?.getJSON())}});return C.useEffect(()=>{n?.setEditable(!r)},[n,r]),C.useEffect(()=>{g.current=o},[o]),C.useEffect(()=>{k.current=e},[e]),C.useEffect(()=>{m.current=s},[s]),C.useEffect(()=>{p.current=i},[i]),C.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Re.Provider,{value:{editor:n},children:c})}function _t(t){const e=H.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:l,suggestionOpenRef:c,ref:g,className:k}=t,m=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Ee();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:x=>{if(!n)return;const P=n.state.doc.textContent.trim()==="";n.commands.focus("end"),P||n.commands.insertContent(" "),n.commands.insertContent(x)},syncVoiceText:(x,P)=>{if(n&&(n.commands.setContent(x||{type:"doc",content:[]}),P)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+P:P})}},restoreContent:x=>{n&&n.commands.setContent(x||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),C.useImperativeHandle(g??null,u,d),!n)return null;const b=m&&"cursor-not-allowed opacity-70",F=m&&"[&_.ProseMirror]:cursor-not-allowed";let S;e[3]!==k||e[4]!==b||e[5]!==F?(S=_e("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",k,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",b,F),e[3]=k,e[4]=b,e[5]=F,e[6]=S):S=e[6];let _;e[7]!==n||e[8]!==S?(_=h.jsx(Qe,{editor:n,className:S}),e[7]=n,e[8]=S,e[9]=_):_=e[9];const j=s??null;let I;e[10]!==n||e[11]!==c||e[12]!==j?(I=h.jsx(C.Suspense,{fallback:null,children:h.jsx(it,{editor:n,virtualMcpId:j,suggestionOpenRef:c})}),e[10]=n,e[11]=c,e[12]=j,e[13]=I):I=e[13];const L=s??null;let D;e[14]!==n||e[15]!==c||e[16]!==L?(D=h.jsx(C.Suspense,{fallback:null,children:h.jsx(Ge,{editor:n,virtualMcpId:L,suggestionOpenRef:c})}),e[14]=n,e[15]=c,e[16]=L,e[17]=D):D=e[17];let a;e[18]!==m||e[19]!==n||e[20]!==l||e[21]!==o||e[22]!==p?(a=p&&o&&!m?h.jsx(Ve,{editor:n,selectedModel:o,onUnsupportedFile:l}):null,e[18]=m,e[19]=n,e[20]=l,e[21]=o,e[22]=p,e[23]=a):a=e[23];let f;return e[24]!==I||e[25]!==D||e[26]!==a||e[27]!==_?(f=h.jsxs(h.Fragment,{children:[_,I,D,a]}),e[24]=I,e[25]=D,e[26]=a,e[27]=_,e[28]=f):f=e[28],f}export{Ct as T,bt as U,_t as a,He as p,Pt as u};
1
+ import{c as H,r as C,b as G,j as h,t as A,a5 as ye,x as xe,aT as ke,w as we,B as be,v as Pe,D as Ce,q as le,a4 as ce,K as Y,E as Q,gj as ue,gk as re,gl as z,m as _e}from"./index-BP527m3V.js";import{S as de,s as Se}from"./suggestion-BdOz28RC.js";import{K as Fe,t as De,A as Ie,p as B,L as je,P as ne,O as ve,h as Me,a as Le,Q as Re,o as Ee,l as Ae,F as Ne,s as Te,E as Qe}from"./usage-stats-CK4hgSt6.js";import{b0 as Oe}from"./agent-icon-CpMz1pSC.js";import"./chat-context-Na_9rQo_.js";import{m as Ue,i as $e,b as qe}from"./index-DF1Gszum.js";import{u as me}from"./use-mcp-client-CaYmuD4l.js";import{a as Ke}from"./repository-binding-DGc5VhVW.js";import{g as se,s as fe}from"./tool-namespace-BBpCD9sF.js";import{l as oe,g as pe}from"./use-mcp-prompts-lHtFGIni.js";import{f as ze,b as Be}from"./use-org-fs-Cv09aZqm.js";async function He(t,e,r,s,i,o){if(!Ue(e)){A.error("Selected model does not support file uploads");return}const l=r.type||"application/octet-stream";if(!$e(l,e)){const g=qe(e).parts.map(m=>o(m)).join(", "),k=e?.title??"This model";i?i({fileName:r.name,modelName:k,accepted:g}):A.error(`"${r.name}" can't be attached`,{description:`${k} accepts ${g}.`});return}const c=10*1024*1024;if(r.size>c){A.error(`File "${r.name}" exceeds 10MB limit`);return}try{const g=new FileReader,k=new Promise((n,u)=>{g.onload=()=>{const d=g.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const b=d.includes(",")?d.split(",")[1]??d:d;n(b)},g.onerror=u});g.readAsDataURL(r);const m=await k,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:m};Fe(t,{from:s,to:s},p)}catch(g){console.error("Failed to process file:",g),A.error(`Failed to load file "${r.name}"`)}}function Je(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const l=Array.from(i);return(async()=>{let c=o.pos;for(const g of l)await s(g,c),c=t.state.selection.to})(),!0}function Ve(t){const e=H.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=G(),l=C.useRef(Xe);let c,g;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(c=()=>{l.current=async(p,n)=>{await He(r,s,p,n,i,o)}},g=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=c,e[5]=g):(c=e[4],g=e[5]),C.useEffect(c,g);let k,m;return e[6]!==r?(k=()=>{if(r?.isDestroyed)return;const p=new De("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new Ie({key:p,props:{handleDrop:(d,b,F,S)=>Je(d,b,S,(_,j)=>l.current(_,j)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const S=Array.from(F).filter(We);return S.length===0?!1:(b.preventDefault(),(async()=>{let _=d.state.selection.from;for(const j of S){const I=j.getAsFile();I&&(await l.current?.(I,_),_=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},m=[r],e[6]=r,e[7]=k,e[8]=m):(k=e[7],m=e[8]),C.useEffect(k,m),null}function We(t){return t.kind==="file"}function Xe(){return Promise.resolve()}function bt(t){const e=H.c(43),{info:r,onClose:s}=t,i=G(),o=r!==null;let l;e[0]!==s?(l=v=>!v&&s(),e[0]=s,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=c):c=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=g):g=e[3];let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(ye,{size:18})}),e[4]=k):k=e[4];let m;e[5]!==i?(m=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=m):m=e[6];let p;e[7]!==m?(p=h.jsx(xe,{className:"text-xl font-semibold tracking-tight",children:m}),e[7]=m,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let b;e[13]!==d||e[14]!==u?(b=h.jsxs(ke,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=b):b=e[15];let F;e[16]!==b||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[g,h.jsxs(we,{className:"relative gap-4",children:[k,h.jsxs("div",{children:[p,b]})]})]}),e[16]=b,e[17]=p,e[18]=F):F=e[18];const S=r?.modelName??"";let _;e[19]!==i||e[20]!==S?(_=i("chat.uploader.accepts",{modelName:S}),e[19]=i,e[20]=S,e[21]=_):_=e[21];let j;e[22]!==_?(j=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:_}),e[22]=_,e[23]=j):j=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=h.jsx(Oe,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const L=r?.accepted;let D;e[25]!==L?(D=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,h.jsx("span",{className:"capitalize",children:L})]}),e[25]=L,e[26]=D):D=e[26];let a;e[27]!==j||e[28]!==D?(a=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"surface p-4",children:[j,D]})}),e[27]=j,e[28]=D,e[29]=a):a=e[29];let f;e[30]!==i?(f=i("chat.uploader.gotIt"),e[30]=i,e[31]=f):f=e[31];let x;e[32]!==s||e[33]!==f?(x=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(be,{onClick:s,children:f})}),e[32]=s,e[33]=f,e[34]=x):x=e[34];let P;e[35]!==F||e[36]!==a||e[37]!==x?(P=h.jsxs(Pe,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ye,children:[F,a,x]}),e[35]=F,e[36]=a,e[37]=x,e[38]=P):P=e[38];let M;return e[39]!==o||e[40]!==l||e[41]!==P?(M=h.jsx(Ce,{open:o,onOpenChange:l,children:P}),e[39]=o,e[40]=l,e[41]=P,e[42]=M):M=e[42],M}function Ye(t){return t.preventDefault()}function Pt(){const t=H.c(3),[e,r]=C.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}function he(t,e){return e||t}const Ge=t=>{const e=H.c(50),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=G(),l=le(),{org:c}=ce(),g=Ke();let k;e[0]!==c.id||e[1]!==c.slug||e[2]!==s?(k={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=c.id,e[1]=c.slug,e[2]=s,e[3]=k):k=e[3];const m=me(k);let p;e[4]!==c.id||e[5]!==s?(p=Y.virtualMcpResources(s,c.id),e[4]=c.id,e[5]=s,e[6]=p):p=e[6];const n=p,[u,d]=C.useState("categories");let b;e[7]!==u?(b=()=>u,e[7]=u,e[8]=b):b=e[8];const F=C.useEffectEvent(b),S=C.useRef(null),_=C.useRef(!1),j=s??"default";let I;e[9]!==u||e[10]!==c.id||e[11]!==j?(I=["at-mention",c.id,j,u],e[9]=u,e[10]=c.id,e[11]=j,e[12]=I):I=e[12];const L=I;let D;e[13]!==o?(D=o("chat.mentionAt.agentsTitle"),e[13]=o,e[14]=D):D=e[14];let a;e[15]!==o?(a=o("chat.mentionAt.agentsDescription"),e[15]=o,e[16]=a):a=e[16];let f;e[17]!==D||e[18]!==a?(f={name:"agents",title:D,description:a,kind:"category",drillable:!0},e[17]=D,e[18]=a,e[19]=f):f=e[19];let x;e[20]!==o?(x=o("chat.mentionAt.resourcesTitle"),e[20]=o,e[21]=x):x=e[21];let P;e[22]!==o?(P=o("chat.mentionAt.resourcesDescription"),e[22]=o,e[23]=P):P=e[23];let M;e[24]!==P||e[25]!==x?(M={name:"resources",title:x,description:P,kind:"category",drillable:!0},e[24]=P,e[25]=x,e[26]=M):M=e[26];let v;e[27]!==M||e[28]!==f?(v=[f,M],e[27]=M,e[28]=f,e[29]=v):v=e[29];const $=v;let O;e[30]!==m||e[31]!==r||e[32]!==o?(O=async U=>{const{item:w,range:K}=U;if(Q("chat_picker_item_selected",{picker:"@",item_kind:w.kind,item_name:w.name}),w.kind!=="category"&&(_.current=!0),w.kind==="category")return d(w.name==="agents"?"agents":"resources"),!1;if(w.kind==="agent"&&w.agentId){B(r,K,{id:w.agentId,name:w.name,metadata:{agentId:w.agentId,title:w.name},char:"@"}),d("categories");return}if(w.kind==="resource"&&w.uri&&m){try{const T=await ue(m,w.uri);B(r,K,{id:w.uri,name:w.uri,metadata:T.contents,char:"@"})}catch(T){console.error("[at-mention] Failed to fetch resource:",T),A.error(o("chat.mentionAt.failedToLoadResource"))}d("categories");return}},e[30]=m,e[31]=r,e[32]=o,e[33]=O):O=e[33];const q=O;let y;e[34]!==g||e[35]!==$||e[36]!==m||e[37]!==F||e[38]!==l||e[39]!==n||e[40]!==s?(y=async U=>{const{query:w}=U,K=F();if(K==="categories"){if(!w.trim())return $;const R=w.toLowerCase(),E=g.filter(N=>N.status==="active"&&(!N.id||!re(N.id))&&N.id!==s&&(N.title.toLowerCase().includes(R)||N.description?.toLowerCase().includes(R))).map(Ze),X=await(async()=>{if(!m)return[];let N=l.getQueryData(n);return N||(N=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4})),(N?.resources??[]).filter(te=>te.uri.toLowerCase().includes(R)||te.name?.toLowerCase().includes(R)||te.description?.toLowerCase().includes(R)).map(et)})();return[...E,...X]}if(K==="agents"){let R=g.filter(E=>E.status==="active"&&(!E.id||!re(E.id))&&E.id!==s);if(w.trim()){const E=w.toLowerCase();R=R.filter(X=>X.title.toLowerCase().includes(E)||X.description?.toLowerCase().includes(E))}return R.map(tt)}if(!m)return[];let T=l.getQueryData(n);T?l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4}).catch(st):T=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4});let W=T?.resources??[];if(w.trim()){const R=w.toLowerCase();W=W.filter(E=>E.uri.toLowerCase().includes(R)||E.name?.toLowerCase().includes(R)||E.description?.toLowerCase().includes(R))}return W.map(rt)},e[34]=g,e[35]=$,e[36]=m,e[37]=F,e[38]=l,e[39]=n,e[40]=s,e[41]=y):y=e[41];const Z=y;let J;e[42]!==i?(J=U=>{if(i&&(i.current=U),U)S.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"@"});else{const w=S.current;Q("chat_picker_closed",{picker:"@",outcome:_.current?"selected":"dismissed",duration_ms:w?Date.now()-w:null}),S.current=null,d("categories")}},e[42]=i,e[43]=J):J=e[43];const ee=J;let V;return e[44]!==r||e[45]!==Z||e[46]!==q||e[47]!==ee||e[48]!==L?(V=h.jsx(de,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:L,queryFn:Z,onSelect:q,onOpenChange:ee}),e[44]=r,e[45]=Z,e[46]=q,e[47]=ee,e[48]=L,e[49]=V):V=e[49],V};function Ze(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function et(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}function tt(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function st(){}function rt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function ie(t,e,r,s,i,o,l){try{const c=await pe(r,s,o);B(t,e,{id:s,name:fe(s,i),metadata:c.messages,char:"/",kind:"prompt",args:o})}catch(c){console.error("[slash] Failed to fetch prompt:",c),A.error(l.t("chat.mentionSlash.failedLoadPrompt"))}}async function nt(t,e,r,s,i){try{const o=await ue(r,s);B(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),A.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function ot(t,e,r,s,i){try{const{files:o,omittedPaths:l}=await ze(r,s.volume,s.path),c={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:l};B(t,e,{id:s.id,name:s.name,metadata:c,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),A.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const it=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=G(),i=le(),{org:o}=ce(),l=me({connectionId:e,orgId:o.id,orgSlug:o.slug}),c=Y.virtualMcpPrompts(e,o.id),g=Y.virtualMcpResources(e,o.id),k=Y.slashSkills(o.id),m=["slash-mention",o.id,e??"default"],[p,n]=C.useState(null),[u,d]=C.useState(null),b=je(t);b&&(b.onEditChip=async a=>{if(l)try{const x=(await ae(i,c,l)).find(P=>P.name===a.promptId);if(!x?.arguments||x.arguments.length===0)return;d({...a,prompt:x})}catch(f){console.error("[slash] Failed to load prompt for editing:",f),A.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),S=C.useRef(!1),_=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),S.current=!0,!!l)if(a.kind==="prompt"){if(a.arguments&&a.arguments.length>0){n({range:f,item:a});return}const x=se(a._meta);await ie(t,f,l,a.name,x,void 0,{t:s})}else a.kind==="skill"?a.skill&&await ot(t,f,o.slug,a.skill,{t:s}):a.uri&&await nt(t,f,l,a.uri,{t:s})},j=async a=>{if(!p||!l)return;const{range:f,item:x}=p,P=se(x._meta);await ie(t,f,l,x.name,P,a,{t:s}),n(null)},I=async a=>{if(!(!u||!l)){if(!ve(t,u.pos,u.promptId)){A.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const f=await pe(l,u.promptId,a),x=se(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Me({id:u.promptId,name:fe(u.promptId,x),metadata:f.messages,char:"/",kind:"prompt",args:a})).run(),Q("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(f){console.error("[slash] Failed to update prompt:",f),A.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},L=async a=>{const{query:f}=a;if(!l)return[];const[x,P,M]=await Promise.all([ae(i,c,l),lt(i,g,l),at(i,k,o.slug)]),v=f.trim().toLowerCase(),$=(x??[]).filter(y=>!v||y.name.toLowerCase().includes(v)||y.title?.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name,title:y.title,description:y.description,kind:"prompt",arguments:y.arguments,_meta:y._meta})),O=(P??[]).filter(y=>!v||y.uri.toLowerCase().includes(v)||y.name?.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name??y.uri,title:y.name,description:y.description,kind:"resource",uri:y.uri})),q=(M??[]).filter(y=>!v||y.name.toLowerCase().includes(v)||y.id.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name,title:y.name,description:y.description??void 0,kind:"skill",skill:y}));return[...$,...O,...q]},D=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(de,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:m,queryFn:L,onSelect:_,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),S.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:S.current?"selected":"dismissed",duration_ms:f?Date.now()-f:null}),F.current=null}}}),h.jsx(ne,{prompt:D,setPrompt:()=>n(null),onSubmit:j}),h.jsx(ne,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:I,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ae(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function at(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Be(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function lt(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ge="Ask anything, / for prompts & skills, @ for agents & resources...";function ct(t){return[Te.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),Se.configure({placeholder:()=>t.current??ge,showOnlyWhenEditable:!1}),Ae,Ne]}function Ct({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:l,children:c}){const g=C.useRef(o),k=C.useRef(e),m=C.useRef(s),p=C.useRef(i),n=Le({extensions:ct(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ge,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-base p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&m.current&&!l?.current?(d.preventDefault(),g.current?.(),!0):!1},onUpdate:({editor:u})=>{k.current(u?.getJSON())}});return C.useEffect(()=>{n?.setEditable(!r)},[n,r]),C.useEffect(()=>{g.current=o},[o]),C.useEffect(()=>{k.current=e},[e]),C.useEffect(()=>{m.current=s},[s]),C.useEffect(()=>{p.current=i},[i]),C.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Re.Provider,{value:{editor:n},children:c})}function _t(t){const e=H.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:l,suggestionOpenRef:c,ref:g,className:k}=t,m=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Ee();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:x=>{if(!n)return;const P=n.state.doc.textContent.trim()==="";n.commands.focus("end"),P||n.commands.insertContent(" "),n.commands.insertContent(x)},syncVoiceText:(x,P)=>{if(n&&(n.commands.setContent(x||{type:"doc",content:[]}),P)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+P:P})}},restoreContent:x=>{n&&n.commands.setContent(x||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),C.useImperativeHandle(g??null,u,d),!n)return null;const b=m&&"cursor-not-allowed opacity-70",F=m&&"[&_.ProseMirror]:cursor-not-allowed";let S;e[3]!==k||e[4]!==b||e[5]!==F?(S=_e("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",k,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",b,F),e[3]=k,e[4]=b,e[5]=F,e[6]=S):S=e[6];let _;e[7]!==n||e[8]!==S?(_=h.jsx(Qe,{editor:n,className:S}),e[7]=n,e[8]=S,e[9]=_):_=e[9];const j=s??null;let I;e[10]!==n||e[11]!==c||e[12]!==j?(I=h.jsx(C.Suspense,{fallback:null,children:h.jsx(it,{editor:n,virtualMcpId:j,suggestionOpenRef:c})}),e[10]=n,e[11]=c,e[12]=j,e[13]=I):I=e[13];const L=s??null;let D;e[14]!==n||e[15]!==c||e[16]!==L?(D=h.jsx(C.Suspense,{fallback:null,children:h.jsx(Ge,{editor:n,virtualMcpId:L,suggestionOpenRef:c})}),e[14]=n,e[15]=c,e[16]=L,e[17]=D):D=e[17];let a;e[18]!==m||e[19]!==n||e[20]!==l||e[21]!==o||e[22]!==p?(a=p&&o&&!m?h.jsx(Ve,{editor:n,selectedModel:o,onUnsupportedFile:l}):null,e[18]=m,e[19]=n,e[20]=l,e[21]=o,e[22]=p,e[23]=a):a=e[23];let f;return e[24]!==I||e[25]!==D||e[26]!==a||e[27]!==_?(f=h.jsxs(h.Fragment,{children:[_,I,D,a]}),e[24]=I,e[25]=D,e[26]=a,e[27]=_,e[28]=f):f=e[28],f}export{Ct as T,bt as U,_t as a,He as p,Pt as u};