decocms 4.607.0 → 4.608.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (433) hide show
  1. package/dist/client/assets/{AlertCircle-Dj1nLpeQ.js → AlertCircle-RTyXmO4S.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CLN-25mh.js → AreaChart-B2bQb_eh.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DmJguptr.js → ArrowLeft-DG4fDVhc.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-CqqTatmK.js → ArrowRight-zK93byA1.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-C7Nj_q22.js → ArrowUp-D_1pjhTO.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-D_X9oQA_.js → BookOpen01-BBApUhG2.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-BLi-kdGq.js → CartesianChart-Dh6If1Rz.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-ugqRZsTG.js → CategoricalChart-DZcOvY0I.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-DLlDtZcO.js → CheckCircle-Clv58VvB.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-AhK2umcE.js → ChevronDown-kJLMLWQt.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-D4kPqkF6.js → ChevronSelectorVertical-CAB5uq58.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-CsP_ILbF.js → ChevronUp-BwUSkgn_.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-0W-8ixJb.js → CreditCard01-CfyzfKuU.js} +1 -1
  14. package/dist/client/assets/{Eye-2mlcak3o.js → Eye-Cuu5foEV.js} +1 -1
  15. package/dist/client/assets/{File02-MzjSapJn.js → File02-B2A02vx8.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-CxnXIcGK.js → Fingerprint04-CmYnXThy.js} +1 -1
  17. package/dist/client/assets/{Globe04-D_x1u0wl.js → Globe04-CXm51HyO.js} +1 -1
  18. package/dist/client/assets/{Image01-GkJc93Zv.js → Image01-DgYaWAoi.js} +1 -1
  19. package/dist/client/assets/{Key01-BFV7zbSI.js → Key01-DcRNW8u_.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-1eO49Ry-.js → LayoutLeft-CNsHb_wL.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-BrAFlEge.js → LinkBroken01-CSLR7LRd.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-TFr7w4y2.js → MessageCircle01-CbkPSNEW.js} +1 -1
  23. package/dist/client/assets/{Minus-DxV34wXb.js → Minus-C39SzM_F.js} +1 -1
  24. package/dist/client/assets/{Monitor01-C07iTkt5.js → Monitor01-ts8IiTjn.js} +1 -1
  25. package/dist/client/assets/{Play-DrgmXhZN.js → Play-LvYHhysf.js} +1 -1
  26. package/dist/client/assets/{Plus-BOy--mLV.js → Plus-vYAM1FOk.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-ahck2GxW.js → ReferenceLine-DH397phd.js} +1 -1
  28. package/dist/client/assets/{SearchMd-CUiS3-jY.js → SearchMd-D63wQvdr.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-BKR90dDm.js → ShoppingBag01-CQHwvDI-.js} +1 -1
  30. package/dist/client/assets/{Sun-D3TjGNFC.js → Sun-BiK6_8bw.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-CroZeibd.js → SwitchHorizontal01-Bi1W2ShO.js} +1 -1
  32. package/dist/client/assets/{Tool01-CvwNlUtp.js → Tool01-BkFRXcV-.js} +1 -1
  33. package/dist/client/assets/{Tooltip-CmEUdRi6.js → Tooltip-yMEK35j0.js} +1 -1
  34. package/dist/client/assets/{Trash01-AgFkfTH1.js → Trash01-CQYiV3HH.js} +1 -1
  35. package/dist/client/assets/{Upload01-DcKwrYYS.js → Upload01-MD8ZOSRI.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-DujPU17i.js → UserCheck01-Df2WX3uc.js} +1 -1
  37. package/dist/client/assets/{UserSquare-BQrpG0j5.js → UserSquare-DD4ifFen.js} +1 -1
  38. package/dist/client/assets/{Users01-CwiCCaQY.js → Users01-n6lj9nvW.js} +1 -1
  39. package/dist/client/assets/{XClose-CImZkJqv.js → XClose-CP7rsijJ.js} +1 -1
  40. package/dist/client/assets/{Zap-C66hTZO-.js → Zap-DEtHmWX1.js} +1 -1
  41. package/dist/client/assets/{access-gate-Ctr3VUps.js → access-gate-DuetUtR2.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-Ca21AwUf.js → add-connection-dialog-CUKpmanp.js} +1 -1
  43. package/dist/client/assets/agent-app-Bw4Y8PZ5.js +1 -0
  44. package/dist/client/assets/{agent-assets-DwAhDYhm.js → agent-assets-K5E_Xw5t.js} +1 -1
  45. package/dist/client/assets/{agent-automation-BuqQTBwO.js → agent-automation-DaNHP5_9.js} +1 -1
  46. package/dist/client/assets/{agent-automations-fi8FmqiX.js → agent-automations-CzoAy2Tq.js} +1 -1
  47. package/dist/client/assets/{agent-blog-Bioxq0nb.js → agent-blog-BEpi9Q_T.js} +2 -2
  48. package/dist/client/assets/{agent-blog-post-CmyjaHs6.js → agent-blog-post-BHcL0AqW.js} +2 -2
  49. package/dist/client/assets/{agent-business-case-BV-HjKMM.js → agent-business-case-UhHQI6k6.js} +1 -1
  50. package/dist/client/assets/{agent-calendar-CvgYIJIa.js → agent-calendar-CNoVwfoc.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-Bk2Nja92.js → agent-capabilities-C7yPkhZG.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-BH4aX2ip.js → agent-connect-sources-83NDE9GG.js} +1 -1
  53. package/dist/client/assets/agent-deck-pZetizr-.js +1 -0
  54. package/dist/client/assets/{agent-e2e-umEIfk1A.js → agent-e2e-B65D8_aD.js} +1 -1
  55. package/dist/client/assets/agent-experiments-BnzEPmkf.js +1 -0
  56. package/dist/client/assets/agent-file-DnTJ8RkC.js +1 -0
  57. package/dist/client/assets/{agent-hosting-BJ7lAQtt.js → agent-hosting-B0kVlXjT.js} +1 -1
  58. package/dist/client/assets/{agent-icon-C4ES7Kxt.js → agent-icon-CfC0W4dx.js} +1 -1
  59. package/dist/client/assets/agent-library-CyBik4RR.js +1 -0
  60. package/dist/client/assets/agent-library-file-CjQyTf1O.js +1 -0
  61. package/dist/client/assets/agent-overview-CYmw8xFk.js +1 -0
  62. package/dist/client/assets/{agent-releases-Bp6N4q4K.js → agent-releases-BBFJ39ts.js} +1 -1
  63. package/dist/client/assets/agent-settings-C46LJGuV.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-BFFJ5j5u.js → agent-site-editor-CFF2Q9Ui.js} +1 -1
  65. package/dist/client/assets/agent-site-editor-code-Csr38kGV.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-BRXb0240.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-DFBVQ6Pk.js +1 -0
  68. package/dist/client/assets/agent-view-B73eG2MX.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-Bxg034ZG.js → agent-view-guard-BMTiC6_P.js} +1 -1
  70. package/dist/client/assets/{ai-providers-8GZToBCd.js → ai-providers-yKkTYzvD.js} +1 -1
  71. package/dist/client/assets/{alert-C9ELUw9h.js → alert-CBECFrdm.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-w7qH1coK.js → analytics-sections-TN1OIobD.js} +1 -1
  73. package/dist/client/assets/api-keys-C3SOPeqR.js +1 -0
  74. package/dist/client/assets/{api-keys-WruRRTPs.js → api-keys-X0qV8osh.js} +1 -1
  75. package/dist/client/assets/{app-editor-BStZHrba.js → app-editor-ZPRwF4bJ.js} +1 -1
  76. package/dist/client/assets/{asset-utils-C4N9vCt1.js → asset-utils-DU-aW_1d.js} +1 -1
  77. package/dist/client/assets/{auth-CQZBevHD.js → auth-5QneqHw1.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-BM5f2LNw.js → auth-catchall-Cc0Nydyp.js} +1 -1
  79. package/dist/client/assets/{auth-entry-b4GyPWFI.js → auth-entry--a6EkDyS.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-Cbcs3Av0.js → auth-split-layout-aZhbq980.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-BFPfSLNp.js → authenticate-and-persist-oauth-DbQtX0HJ.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-HEL2qeoh.js → automation-list-row-CDqe1oCQ.js} +1 -1
  83. package/dist/client/assets/{automation-runs-A5Z6F3sq.js → automation-runs-2pl2hHM7.js} +1 -1
  84. package/dist/client/assets/{automations-0Lv0Qdm0.js → automations-Bg7ZzUcD.js} +1 -1
  85. package/dist/client/assets/{badge-Bt2wemt2.js → badge-DcNtdQVR.js} +1 -1
  86. package/dist/client/assets/{block-document-CZbF5elc.js → block-document-qFYSIRnJ.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-CkyTYWwt.js → blocks-preview-workspace-context-51d9D1M9.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-kdA6RJ4z.js → blocks-tab-states-CGtw7dij.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-D2xQzPk1.js → blog-preview-url-DSvzFaUu.js} +1 -1
  90. package/dist/client/assets/{blog-schema-DZF_bGj-.js → blog-schema-B011qG9L.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate-BqOwEv-L.js → blog-source-gate-_5x74XCi.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-SLFRQ26b.js → blog-view-gate-DvXkG0rS.js} +1 -1
  93. package/dist/client/assets/{buckets-8VeE6erM.js → buckets-Bw4nsPaF.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-D8zd88B1.js → build-improve-prompt-doc-DxmrO1x8.js} +1 -1
  95. package/dist/client/assets/{calendar-DDhjB8p8.js → calendar-7v0SWLxR.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-CCEkEyvk.js → capability-load-error-BYhrJ6W3.js} +1 -1
  97. package/dist/client/assets/{category-editor-Bdka3udP.js → category-editor-Dt1Mdk9Z.js} +1 -1
  98. package/dist/client/assets/{category-tree-HSe4uNpU.js → category-tree-CHfVd2sc.js} +1 -1
  99. package/dist/client/assets/{chart-DBOQ-ncW.js → chart-BwB2rZVg.js} +1 -1
  100. package/dist/client/assets/{chat-context-BBaFY4u8.js → chat-context-CwFvOLKs.js} +1 -1
  101. package/dist/client/assets/{chat-draft--Y0COItR.js → chat-draft-BWSEr7CB.js} +1 -1
  102. package/dist/client/assets/{checkbox-Det6_SEt.js → checkbox-Cp871DDi.js} +1 -1
  103. package/dist/client/assets/{choose-editor-euvsUDWB.js → choose-editor-Bk37bYiV.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-DtjNXO6I.js → cli-auth-success-DCm2-dYJ.js} +1 -1
  105. package/dist/client/assets/{cms-settings-editor-CZcVtlwf.js → cms-settings-editor-CubZ4fTj.js} +1 -1
  106. package/dist/client/assets/{cms-store-drafts-BBK2U3nx.js → cms-store-drafts-g8beklnh.js} +1 -1
  107. package/dist/client/assets/{collapsible-C-4EHi01.js → collapsible-Cl00AddF.js} +1 -1
  108. package/dist/client/assets/{collection-detail-D3M78fPO.js → collection-detail-DkHYWtsC.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-Dfvlf1-g.js → collection-display-button-Ce9nBkDZ.js} +1 -1
  110. package/dist/client/assets/{collection-search-B3SxTnpS.js → collection-search-yOcmEgJr.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-ytTVCXGH.js → collection-table-wrapper-BKW3Imkr.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-DBV0CA1j.js → collection-tabs-B-8iBMRa.js} +1 -1
  113. package/dist/client/assets/{combobox-DXQjZYp2.js → combobox-Db4YHiMx.js} +1 -1
  114. package/dist/client/assets/{command-By13hzA4.js → command-DZr2odLo.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-BtlFqaKj.js → companion-mcps-section-DfC0XYZw.js} +1 -1
  116. package/dist/client/assets/{config-BQIBahe7.js → config-R8s9dbvw.js} +1 -1
  117. package/dist/client/assets/{connect-key-CKwjN38W.js → connect-key-Dut4FDWB.js} +1 -1
  118. package/dist/client/assets/{connect-layout-DYgM4dwL.js → connect-layout-mL3uyUE9.js} +1 -1
  119. package/dist/client/assets/{connect-source-dialog-CmhMt29P.js → connect-source-dialog-BVxJYmrD.js} +1 -1
  120. package/dist/client/assets/{connect-MrS-Slqy.js → connect-y_KyPaB1.js} +1 -1
  121. package/dist/client/assets/{connection-CAWskHQ5.js → connection-D-mr4YqR.js} +1 -1
  122. package/dist/client/assets/{connection-card-Bgn28vEo.js → connection-card-DkNQ-38Q.js} +1 -1
  123. package/dist/client/assets/{connection-detail-CoSxIUij.js → connection-detail-C5cDcV79.js} +1 -1
  124. package/dist/client/assets/{connection-form-helpers-DxYbgQ9H.js → connection-form-helpers-BItuI9Tb.js} +1 -1
  125. package/dist/client/assets/{connection-slug-Bse2tT5A.js → connection-slug-BrJ-0Gj-.js} +1 -1
  126. package/dist/client/assets/{connections-hNQoxQgs.js → connections-40OD8h6t.js} +1 -1
  127. package/dist/client/assets/{content-changes-DZaOVCZm.js → content-changes-ZRsfM1wq.js} +1 -1
  128. package/dist/client/assets/{content-tab-CxbcdLDc.js → content-tab-x9mV4f9o.js} +3 -3
  129. package/dist/client/assets/{context-DDBQSdQw.js → context-DruXKATY.js} +1 -1
  130. package/dist/client/assets/{context-menu-DPPmF2fN.js → context-menu-CZavkcDC.js} +1 -1
  131. package/dist/client/assets/{context-shell-BM3RGe4E.js → context-shell-DzCiWVqK.js} +3 -3
  132. package/dist/client/assets/{create-organization-dialog-CTsbrzdD.js → create-organization-dialog-Bss3vLvA.js} +1 -1
  133. package/dist/client/assets/{daily-pulse-DaPnGqpC.js → daily-pulse-DkJfOcwA.js} +1 -1
  134. package/dist/client/assets/{delete-copy-BBSk97dM.js → delete-copy-xj1uIuvM.js} +1 -1
  135. package/dist/client/assets/{device-hint-DZRbOLRq.js → device-hint-CMe7TL2c.js} +1 -1
  136. package/dist/client/assets/{discover-D_R8Vs1T.js → discover-B92uo9Yw.js} +1 -1
  137. package/dist/client/assets/{domain-settings-D9eJ99Sl.js → domain-settings-JkyazPWz.js} +1 -1
  138. package/dist/client/assets/{drawer-M8eIsqmT.js → drawer-mYqYBdCv.js} +1 -1
  139. package/dist/client/assets/{editor-rTloof2p.js → editor-BGdnY1P3.js} +1 -1
  140. package/dist/client/assets/{editor-classes-DUlgPQpc.js → editor-classes-DItoayc5.js} +1 -1
  141. package/dist/client/assets/{empty-state-ChWzd37z.js → empty-state-Cdk0jQ6k.js} +1 -1
  142. package/dist/client/assets/{empty-state-vr86BCX-.js → empty-state-yL7wr7CT.js} +1 -1
  143. package/dist/client/assets/{experiments-tab-choice-MPNSNg_l.js → experiments-tab-choice-DN5IuHRe.js} +1 -1
  144. package/dist/client/assets/{extract-connection-data-BSZtQano.js → extract-connection-data-Co4GI14H.js} +1 -1
  145. package/dist/client/assets/{feature-gate-Nx4UAujE.js → feature-gate-CRg-kM9u.js} +1 -1
  146. package/dist/client/assets/{feature-paywall-DgfQg6cM.js → feature-paywall-FyLOI1QC.js} +1 -1
  147. package/dist/client/assets/{file-explorer-D2AOPoc6.js → file-explorer-DdYsA0AJ.js} +1 -1
  148. package/dist/client/assets/{file-preview-BSX-R5ep.js → file-preview-CIbQ2bq4.js} +1 -1
  149. package/dist/client/assets/{file-share-button-CGVz1YEB.js → file-share-button-DIKPB6tS.js} +1 -1
  150. package/dist/client/assets/{file-type-icon-P199V-QT.js → file-type-icon-DzIx-fos.js} +1 -1
  151. package/dist/client/assets/{folder-icon-BNjEOMC3.js → folder-icon-D8J8JZJn.js} +1 -1
  152. package/dist/client/assets/{form-B1Aa30Zl.js → form-kGHKXG62.js} +1 -1
  153. package/dist/client/assets/{frame-navigation-CbaqR1d8.js → frame-navigation-sBkQaVJs.js} +1 -1
  154. package/dist/client/assets/{gateway-client-ChEmLA24.js → gateway-client-DzolBOcM.js} +1 -1
  155. package/dist/client/assets/{general-DN7T6bSn.js → general-DR1G6i_F.js} +1 -1
  156. package/dist/client/assets/{github-icon-BHoWZzHA.js → github-icon-BKE2Zw7O.js} +1 -1
  157. package/dist/client/assets/{held-block-view-BrJjnIZp.js → held-block-view-CwuLkgqQ.js} +1 -1
  158. package/dist/client/assets/{home-CjotucZE.js → home-gTEVV7sQ.js} +1 -1
  159. package/dist/client/assets/{home-overview-ToEleHhA.js → home-overview-D9Uexp1F.js} +1 -1
  160. package/dist/client/assets/{hosted-reconcile-DXsbnUau.js → hosted-reconcile-CgLgXVcE.js} +1 -1
  161. package/dist/client/assets/{icon-button-BmTLgm0k.js → icon-button-BlJ-D4pm.js} +1 -1
  162. package/dist/client/assets/{index-DarC8ya_.js → index-B1KVwASF.js} +1 -1
  163. package/dist/client/assets/{index-CumGSGrn.js → index-BCdrqI8k.js} +1 -1
  164. package/dist/client/assets/{index-5V-W1nLv.js → index-BYkHleL6.js} +1 -1
  165. package/dist/client/assets/{index-AxtVWlRM.js → index-BiD9N9Wt.js} +1 -1
  166. package/dist/client/assets/{index-Bpd9IQHj.js → index-C6B9-dtF.js} +1 -1
  167. package/dist/client/assets/{index-DoYVjJcb.js → index-C9AVh0yp.js} +1 -1
  168. package/dist/client/assets/{index-C8ckyO41.js → index-CLh6LjPR.js} +1 -1
  169. package/dist/client/assets/{index-COb0XGLN.js → index-DB_E86GK.js} +1 -1
  170. package/dist/client/assets/{index-D18J8Xg_.js → index-DIpAMZwA.js} +1 -1
  171. package/dist/client/assets/{index-By3lEVdg.js → index-DOz5Ci2H.js} +1 -1
  172. package/dist/client/assets/{index-DSkOzE10.js → index-DRP6T_T9.js} +1 -1
  173. package/dist/client/assets/{index-Ds-qTNYO.js → index-Dwd1G4Vx.js} +3 -3
  174. package/dist/client/assets/{index-DIjWRIR0.js → index-DzRykHvn.js} +1 -1
  175. package/dist/client/assets/{index-ndk0wbCH.js → index-hJVKtURs.js} +1 -1
  176. package/dist/client/assets/{index-BfSfywg1.js → index-kmwsEBCf.js} +1 -1
  177. package/dist/client/assets/{index-D-MiiHuW.js → index-pfLEMtp2.js} +1 -1
  178. package/dist/client/assets/{index-redirect-BkRxh7Zx.js → index-redirect-DfGJjIyK.js} +1 -1
  179. package/dist/client/assets/{index-DP83u0GN.js → index-siNvPOEG.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-c2XxJCzK.js → infiniteQueryObserver-yySyT6qQ.js} +1 -1
  181. package/dist/client/assets/{infra-billing-Bc2ATTi7.js → infra-billing-rxOpTsEq.js} +1 -1
  182. package/dist/client/assets/{input-B0oZuA1h.js → input-B945lqrQ.js} +3 -3
  183. package/dist/client/assets/{input-sfZRU5fX.js → input-cF3TEvjA.js} +1 -1
  184. package/dist/client/assets/{integration-icon-S6KSerjv.js → integration-icon-CDwVUuU6.js} +1 -1
  185. package/dist/client/assets/{item-actions-_9w0aRt7.js → item-actions-DeDw88xQ.js} +1 -1
  186. package/dist/client/assets/{jira-icon-yJJHwkhp.js → jira-icon-jrWKNehZ.js} +1 -1
  187. package/dist/client/assets/{label-BtZ5pCPj.js → label-BUAx9KeM.js} +1 -1
  188. package/dist/client/assets/{layout-CHP5JEij.js → layout-imtv7d-S.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-CBHgAMqd.js → legacy-admin-welcome-dialog-OuqvJSNG.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-DAaS00tz.js → legacy-agents-deep-Dxl6zgEr.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-Dy8jKCrx.js → legacy-main-redirect-UL6N8nIG.js} +1 -1
  192. package/dist/client/assets/library-CxHW3R6L.js +1 -0
  193. package/dist/client/assets/{library-tab-Ct5wfd_D.js → library-tab-BOmlPaVy.js} +1 -1
  194. package/dist/client/assets/{login-BpRZWrcF.js → login-DyO3cYN_.js} +1 -1
  195. package/dist/client/assets/{markdown-CvFBis_P.js → markdown-BolIwd-E.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-Bx0lKBK4.js → mcp-app-renderer-DOSYQmw3.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-DZE7mPzr.js → mcp-oauth-BhYV5Jvy.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-CW3E7ztI.js → mcp-oauth-D8cls3N0.js} +1 -1
  199. package/dist/client/assets/{members-Dri4pfuw.js → members-BbwKLN_Q.js} +1 -1
  200. package/dist/client/assets/{memory-Brnu-TuX.js → memory-Cmb3GyJe.js} +1 -1
  201. package/dist/client/assets/mock-board-B2XtCkH-.js +10 -0
  202. package/dist/client/assets/{monaco-editor-DJxI9s-7.js → monaco-editor-Cr8jFNCg.js} +1 -1
  203. package/dist/client/assets/{monitoring-CCZDrOUU.js → monitoring-D0EtMJuM.js} +1 -1
  204. package/dist/client/assets/{monitoring-stats-row-Dv-rkDRb.js → monitoring-stats-row-DrbtmIOu.js} +1 -1
  205. package/dist/client/assets/{multi-select-lj0ZzSLo.js → multi-select-Cej093Z9.js} +1 -1
  206. package/dist/client/assets/{mustache-S-jC6dX2.js → mustache-BRjhQmod.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-CeDRyUVQ.js → named-rule-step-Cr2M_hFE.js} +1 -1
  208. package/dist/client/assets/{named-rule-view-zPMmEbEG.js → named-rule-view-BFtMCx9B.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-DZ44gqvX.js → new-project-dialog-CzHBs73d.js} +1 -1
  210. package/dist/client/assets/{new-project-store-CjS-rf0X.js → new-project-store-kU6bg1Ts.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-DYfltUce.js → oauth-callback-DDWOqgx-.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-ai-provider-BtyEv8gy.js → oauth-callback-ai-provider-AkL5xwYf.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-DPx5yQyC.js → oauth-consent-DdiMi8R7.js} +1 -1
  214. package/dist/client/assets/{onboarding-CZU4ULsb.js → onboarding-DtD_-_sr.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-DF2g47Dm.js → openai-conversation-CFVik4px.js} +1 -1
  216. package/dist/client/assets/{optimistic-project-sidebar-views-BIgSB6ju.js → optimistic-project-sidebar-views-BGSsas0Q.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-B89vXW-k.js → order-monitor-day-AM6MON2s.js} +1 -1
  218. package/dist/client/assets/{organization-choice-CgH2DEdr.js → organization-choice-D3dnoPh-.js} +1 -1
  219. package/dist/client/assets/{orgs-B3fVfpXs.js → orgs-BPiJ-f6d.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-D3p2yrtu.js → own-accounts-section-9i6fNkwu.js} +1 -1
  221. package/dist/client/assets/{pair-DcdtppQp.js → pair-CvtifeqY.js} +1 -1
  222. package/dist/client/assets/{parse-sections-Dce6sOH-.js → parse-sections-CqWkTU3g.js} +2 -2
  223. package/dist/client/assets/plan-DRrIv4dG.js +1 -0
  224. package/dist/client/assets/{plan-ladder-BVRDILy3.js → plan-ladder-DtUZi1Cg.js} +1 -1
  225. package/dist/client/assets/{plan-page-BGz7RxPw.js → plan-page-DjuDCxSo.js} +1 -1
  226. package/dist/client/assets/{plan-usage-card-m8dmDZY-.js → plan-usage-card-CmY2g3aS.js} +1 -1
  227. package/dist/client/assets/{popover-C5pxC1w-.js → popover-DVoEmukb.js} +1 -1
  228. package/dist/client/assets/{post-calendar-DMLGSl16.js → post-calendar-BMYGLXLJ.js} +1 -1
  229. package/dist/client/assets/{post-editor-BRYUQrED.js → post-editor-BJOeBpX5.js} +1 -1
  230. package/dist/client/assets/{preview-content-DyYfMGyu.js → preview-content-BlYV0mdr.js} +1 -1
  231. package/dist/client/assets/{preview-dialog-Duj2T4uC.js → preview-dialog-D3sqBtfM.js} +1 -1
  232. package/dist/client/assets/{preview-panel-DB7eeYIi.js → preview-panel-CdwJSZ_P.js} +1 -1
  233. package/dist/client/assets/{preview-tab-BMacxtYD.js → preview-tab-hD4cBio-.js} +3 -3
  234. package/dist/client/assets/{primitives-6S7fbYpb.js → primitives-DyCutN8c.js} +1 -1
  235. package/dist/client/assets/{product-picker-dialog-BmH2Xp0A.js → product-picker-dialog-CHVw7-eN.js} +1 -1
  236. package/dist/client/assets/{profile-DsSosIHm.js → profile-Cpcelc_Y.js} +1 -1
  237. package/dist/client/assets/{project-app-view-hcPuAdAM.js → project-app-view-BGX8hOFH.js} +1 -1
  238. package/dist/client/assets/{project-apps-DJve3Elo.js → project-apps-C_iredcr.js} +1 -1
  239. package/dist/client/assets/{project-icon-Bmnukyue.js → project-icon-GWaal0RG.js} +1 -1
  240. package/dist/client/assets/{project-index-DiWeUbXu.js → project-index-g8Mw58an.js} +1 -1
  241. package/dist/client/assets/project-reports-bqBzpu6o.js +1 -0
  242. package/dist/client/assets/project-tasks-D4JBJStb.js +1 -0
  243. package/dist/client/assets/{projects-Cto6BHbI.js → projects-BHdC0RL8.js} +1 -1
  244. package/dist/client/assets/{projects-empty-state-DWjlfNiG.js → projects-empty-state-B0D7t4Xu.js} +1 -1
  245. package/dist/client/assets/{prompts-CaYTgNH4.js → prompts-cefQsj7h.js} +1 -1
  246. package/dist/client/assets/record-editor-NVeSMkmJ.js +1 -0
  247. package/dist/client/assets/{redirect-editor-BnXFCZuT.js → redirect-editor-BOfbwEVn.js} +1 -1
  248. package/dist/client/assets/reports-BRv7A_qG.js +1 -0
  249. package/dist/client/assets/{reports-CKXuQV7d.js → reports-COfaXJg_.js} +1 -1
  250. package/dist/client/assets/{reports-onboarding-nA4_LiuD.js → reports-onboarding-D5klKlTt.js} +1 -1
  251. package/dist/client/assets/{reports-tab-Cty1hI2_.js → reports-tab-DcmyJXGZ.js} +2 -2
  252. package/dist/client/assets/{repositories-C_0JvLrh.js → repositories-Bj6TF9qR.js} +1 -1
  253. package/dist/client/assets/repositories-fjMCRAaG.js +1 -0
  254. package/dist/client/assets/{repository-binding-DFFJA38E.js → repository-binding-CMSQadKK.js} +1 -1
  255. package/dist/client/assets/{repository-picker-txpRHcwi.js → repository-picker-N35zzCix.js} +1 -1
  256. package/dist/client/assets/{require-capability-C-47XBvS.js → require-capability-DQ_r4wtG.js} +1 -1
  257. package/dist/client/assets/{required-auth-layout-AEPHH9so.js → required-auth-layout-TZMQr7bf.js} +1 -1
  258. package/dist/client/assets/{reset-password-BCAjmmoh.js → reset-password-CYpEEZ-3.js} +1 -1
  259. package/dist/client/assets/{resizable-Dx2kmSo6.js → resizable-CmTf4GA3.js} +1 -1
  260. package/dist/client/assets/{resolve-tab-icon-DqqvwGr3.js → resolve-tab-icon-DWH1n4wF.js} +1 -1
  261. package/dist/client/assets/{review-settings-D4mJ3LYJ.js → review-settings-C22dtF8p.js} +1 -1
  262. package/dist/client/assets/{role-color-C_RGrlkv.js → role-color-CCgDfgRp.js} +1 -1
  263. package/dist/client/assets/{roles-DUgNUsf6.js → roles-Bjw7dyg8.js} +1 -1
  264. package/dist/client/assets/{route-Cll-RN_h.js → route-Bz3syANj.js} +1 -1
  265. package/dist/client/assets/{route-DJ8cuA-j.js → route-D82yyBoI.js} +1 -1
  266. package/dist/client/assets/route-a_r3g0V_.js +1 -0
  267. package/dist/client/assets/{route-page-header-DtC3W5gY.js → route-page-header-CWWIM7PH.js} +1 -1
  268. package/dist/client/assets/{sandbox-git-api-D4KYB3KX.js → sandbox-git-api-CEMmGiNn.js} +1 -1
  269. package/dist/client/assets/{sandbox-lifecycle-context-ow5JZCS_.js → sandbox-lifecycle-context-CKWenWtc.js} +1 -1
  270. package/dist/client/assets/{save-status-C_ecsJ-7.js → save-status-GiKmsJnF.js} +1 -1
  271. package/dist/client/assets/{schema-DUI8QwTk.js → schema-DUnx0QAY.js} +1 -1
  272. package/dist/client/assets/{schema-Hqvmwy-B.js → schema-DgzUQT8_.js} +1 -1
  273. package/dist/client/assets/{scroll-area-DfnGGIdI.js → scroll-area-BXDulxhi.js} +1 -1
  274. package/dist/client/assets/{search-input-D9xDOrgF.js → search-input-OzZKVSLE.js} +1 -1
  275. package/dist/client/assets/{search-toggle-1k5Le1rx.js → search-toggle-DdEAKYnn.js} +1 -1
  276. package/dist/client/assets/{secret-picker-B3Cs3W1_.js → secret-picker-BwrmYYln.js} +1 -1
  277. package/dist/client/assets/{secrets-BivSOpzJ.js → secrets-gBTMatSj.js} +1 -1
  278. package/dist/client/assets/{section-array-field-TevVrRym.js → section-array-field-ByavA3ds.js} +1 -1
  279. package/dist/client/assets/{sections-D5Q3E-BA.js → sections-CXKGKqex.js} +1 -1
  280. package/dist/client/assets/{sections-editor-B36w0L3S.js → sections-editor-dmoDu4_D.js} +1 -1
  281. package/dist/client/assets/{select-CTM3NCiB.js → select-LVhKuHDN.js} +1 -1
  282. package/dist/client/assets/{select-model-vJb1bOe3.js → select-model-3b-bg3Q6.js} +1 -1
  283. package/dist/client/assets/{seo-editor-DTAmaX8c.js → seo-editor-pDcsD5xx.js} +1 -1
  284. package/dist/client/assets/{separator-C-oKgeen.js → separator-Ds7qEaIT.js} +1 -1
  285. package/dist/client/assets/{session-runtime-DOdOYILQ.js → session-runtime-DqiVON4P.js} +1 -1
  286. package/dist/client/assets/settings-tab-C3Ov4Z3l.js +1 -0
  287. package/dist/client/assets/{sheet-Bl5X71Uk.js → sheet-DKgQyvDB.js} +1 -1
  288. package/dist/client/assets/{shell-layout-xIizU4HL.js → shell-layout-DGKpZcNh.js} +1 -1
  289. package/dist/client/assets/{site-draft-actions-Cp99lkvn.js → site-draft-actions-DffweZl1.js} +1 -1
  290. package/dist/client/assets/{site-draft-view-CiJ5Weje.js → site-draft-view-2CycGPLz.js} +1 -1
  291. package/dist/client/assets/site-editor-B-f6Jmbn.js +1 -0
  292. package/dist/client/assets/{site-editor-toast-DnCbjslY.js → site-editor-toast-Df6Kxfe9.js} +1 -1
  293. package/dist/client/assets/{skills-C2pAR6Ro.js → skills-CYgzIgY1.js} +1 -1
  294. package/dist/client/assets/{slider-DVa9rRDE.js → slider-MLjF3yoX.js} +1 -1
  295. package/dist/client/assets/{sortable.esm-DzWvrQKz.js → sortable.esm-1f0ZLzna.js} +1 -1
  296. package/dist/client/assets/{sso-CjUAg3y7.js → sso-Bkj2AZcQ.js} +1 -1
  297. package/dist/client/assets/{suggestion-u7vKjcy7.js → suggestion-CZIPVi10.js} +1 -1
  298. package/dist/client/assets/{super-agent-icon-Dk7KmO3D.js → super-agent-icon-0AvrLXog.js} +1 -1
  299. package/dist/client/assets/{switch-BjltmdeW.js → switch-BDhLV3py.js} +1 -1
  300. package/dist/client/assets/{synced-repos-FqC42US7.js → synced-repos-CtuATY_D.js} +1 -1
  301. package/dist/client/assets/{tab-icon-glyph-Dpys_8ln.js → tab-icon-glyph-D7IpzZC6.js} +1 -1
  302. package/dist/client/assets/{table-Dfyxf02Y.js → table-BCIIR01S.js} +1 -1
  303. package/dist/client/assets/{tabs-ukxB2ssa.js → tabs-C8IPFNe7.js} +1 -1
  304. package/dist/client/assets/{task-board-bjQ27wf0.js → task-board-D6ORoPlw.js} +1 -1
  305. package/dist/client/assets/{task-key-Cdn6Qwo0.js → task-key-2qHmdB3_.js} +1 -1
  306. package/dist/client/assets/{task-route-DR-DR1t5.js → task-route-BAvFAOTn.js} +1 -1
  307. package/dist/client/assets/{task-status-CsBMzT3o.js → task-status-hlLUk1-0.js} +1 -1
  308. package/dist/client/assets/{taskboard-analytics-DO23ftqe.js → taskboard-analytics-Dw2Ns7fm.js} +1 -1
  309. package/dist/client/assets/tasks-O5g7WHVs.js +1 -0
  310. package/dist/client/assets/{tasks-C-4Mnp5Q.js → tasks-sNwkBeQC.js} +1 -1
  311. package/dist/client/assets/{textarea-Ds05hJCZ.js → textarea-CR5PTU5T.js} +1 -1
  312. package/dist/client/assets/{thread-analytics-CEzend_N.js → thread-analytics-DZqWlHnU.js} +1 -1
  313. package/dist/client/assets/{thread-button-DgwVH37_.js → thread-button-CU1baM8y.js} +1 -1
  314. package/dist/client/assets/{thread-intent-BUfn00qh.js → thread-intent-CZaVmTg_.js} +1 -1
  315. package/dist/client/assets/{thread-route-DSE9SySP.js → thread-route-DMPbMn6M.js} +1 -1
  316. package/dist/client/assets/{thread-route-Czas0Ahc.js → thread-route-TGRhgQNy.js} +1 -1
  317. package/dist/client/assets/{thread-sheet-body-B6lw8Jpx.js → thread-sheet-body-Bcr0PQmj.js} +1 -1
  318. package/dist/client/assets/{time-range-picker-kZqo7kkc.js → time-range-picker-CQTGxt-p.js} +1 -1
  319. package/dist/client/assets/{toggle-group-Cr0PLBvW.js → toggle-group-CRmRiewC.js} +1 -1
  320. package/dist/client/assets/{tool-set-selector-BeWfehAj.js → tool-set-selector-CHsU4MJb.js} +1 -1
  321. package/dist/client/assets/{toolbar-icon-button-5bOXXLM5.js → toolbar-icon-button-Dzn3oOcr.js} +1 -1
  322. package/dist/client/assets/{tooltip-Bqmntxnq.js → tooltip-CvVfagmL.js} +1 -1
  323. package/dist/client/assets/{tooltipContext-BYPONkxu.js → tooltipContext-DLoT9K7J.js} +1 -1
  324. package/dist/client/assets/{track-DldMjssU.js → track-0CjdYPnM.js} +1 -1
  325. package/dist/client/assets/{types-Bt_wph1s.js → types-DT4hY0oq.js} +1 -1
  326. package/dist/client/assets/{url-slug-ByKMROnh.js → url-slug-B07-97MR.js} +1 -1
  327. package/dist/client/assets/{usage-stats-bhxfI8nR.js → usage-stats-B8vQoGzD.js} +1 -1
  328. package/dist/client/assets/{use-ai-providers-X8UPV0jM.js → use-ai-providers-Dlo6-odm.js} +1 -1
  329. package/dist/client/assets/{use-api-keys-BW0ZixJC.js → use-api-keys-DeWBhZgH.js} +1 -1
  330. package/dist/client/assets/{use-apply-named-rule-CFLxi16A.js → use-apply-named-rule-BW43mJeU.js} +1 -1
  331. package/dist/client/assets/use-ask-in-chat-T0NIS61Q.js +1 -0
  332. package/dist/client/assets/{use-automations-CnEpk2rm.js → use-automations-DQtoKXnL.js} +1 -1
  333. package/dist/client/assets/{use-autosave-BNPcv4Ue.js → use-autosave-CtogWYoa.js} +1 -1
  334. package/dist/client/assets/use-blocks-v8-project-BwhI2-r1.js +1 -0
  335. package/dist/client/assets/use-blog-view-DMdXcMqx.js +1 -0
  336. package/dist/client/assets/{use-chat-layout-state-4WFzjt1Y.js → use-chat-layout-state-DhXm0vGG.js} +1 -1
  337. package/dist/client/assets/{use-cms-publish-actions-CYR0SLMh.js → use-cms-publish-actions-CB5plpB4.js} +1 -1
  338. package/dist/client/assets/{use-connect-companion-Bunoe0_9.js → use-connect-companion-kjN-lv25.js} +1 -1
  339. package/dist/client/assets/{use-connection-DTr7HsdN.js → use-connection-B7WpypFb.js} +1 -1
  340. package/dist/client/assets/{use-content-sync-DSoUgJN8.js → use-content-sync-DfuR2hYK.js} +1 -1
  341. package/dist/client/assets/{use-copy-Cjf6ljKb.js → use-copy-DTg3j6vt.js} +1 -1
  342. package/dist/client/assets/{use-current-view-nHeE_Oxf.js → use-current-view-DfvEKiBd.js} +1 -1
  343. package/dist/client/assets/{use-date-fns-locale-CoQs80si.js → use-date-fns-locale-Bwhy8GA8.js} +1 -1
  344. package/dist/client/assets/{use-debounced-autosave-BBvcEQ9m.js → use-debounced-autosave-DJg10-Wc.js} +1 -1
  345. package/dist/client/assets/{use-debounced-value-CtruecKk.js → use-debounced-value-DlIItvJB.js} +1 -1
  346. package/dist/client/assets/{use-deco-credits-wpVwK54P.js → use-deco-credits-CpuuHI0V.js} +1 -1
  347. package/dist/client/assets/{use-decopilot-events-CXTF0es-.js → use-decopilot-events-DBDyH8kF.js} +1 -1
  348. package/dist/client/assets/{use-delete-block-B6iAxjT_.js → use-delete-block-t5ezYjGT.js} +1 -1
  349. package/dist/client/assets/{use-delete-connection-C2ygGLB4.js → use-delete-connection-4WKSvCwE.js} +1 -1
  350. package/dist/client/assets/{use-deployment-admin-CHWqm3yj.js → use-deployment-admin-L_tn0M0Y.js} +1 -1
  351. package/dist/client/assets/{use-entitlements-BFCkglve.js → use-entitlements-DAkKf3N6.js} +1 -1
  352. package/dist/client/assets/{use-fast-preview-draft-url-BFb330m9.js → use-fast-preview-draft-url-Br_sVu2H.js} +1 -1
  353. package/dist/client/assets/{use-file-configs-CsLkFRPU.js → use-file-configs-B9NI7Xx-.js} +1 -1
  354. package/dist/client/assets/{use-id-selection-Ddc02WQv.js → use-id-selection-Dnmi9uZo.js} +1 -1
  355. package/dist/client/assets/{use-in-settings-DZVM6ZxX.js → use-in-settings-Cpepn6np.js} +1 -1
  356. package/dist/client/assets/{use-inbox-feed-D4P5nNI5.js → use-inbox-feed-Bhy9EWTg.js} +1 -1
  357. package/dist/client/assets/{use-infinite-scroll-CwrMEhd6.js → use-infinite-scroll-D7XavDmy.js} +1 -1
  358. package/dist/client/assets/{use-join-requests-D85dpZIJ.js → use-join-requests-CiqqX7Ck.js} +1 -1
  359. package/dist/client/assets/{use-main-panel-tabs-Bh7pmArw.js → use-main-panel-tabs-CTc8Fye2.js} +1 -1
  360. package/dist/client/assets/{use-mcp-auth-status-CzpofF4F.js → use-mcp-auth-status-DO-d1B17.js} +1 -1
  361. package/dist/client/assets/{use-mcp-client--TOHcD4E.js → use-mcp-client-CmpiHGcO.js} +1 -1
  362. package/dist/client/assets/{use-mcp-prompts-6a3IZkYE.js → use-mcp-prompts-Dmciokf4.js} +1 -1
  363. package/dist/client/assets/{use-mcp-tools-CCKr-xRO.js → use-mcp-tools-CeqduBZO.js} +1 -1
  364. package/dist/client/assets/{use-mobile-C5cF3CsA.js → use-mobile-B-odn_6M.js} +1 -1
  365. package/dist/client/assets/{use-move-blocks-2H1cGP-j.js → use-move-blocks-w8lbeWW1.js} +1 -1
  366. package/dist/client/assets/{use-navigate-to-agent-DcG9XPYG.js → use-navigate-to-agent-DjlUlml5.js} +1 -1
  367. package/dist/client/assets/{use-never-published-B-iD1H_H.js → use-never-published-BQUryuHl.js} +1 -1
  368. package/dist/client/assets/{use-org-fs-BQarrV3d.js → use-org-fs-C24WT7qs.js} +1 -1
  369. package/dist/client/assets/{use-org-notice-DPIYD1qV.js → use-org-notice-CoSSUTvu.js} +1 -1
  370. package/dist/client/assets/{use-org-repo-syncs-TXUzdbTb.js → use-org-repo-syncs-cI2g7olC.js} +1 -1
  371. package/dist/client/assets/{use-org-sso-C1dDt4bm.js → use-org-sso-CdRVY-WO.js} +1 -1
  372. package/dist/client/assets/{use-organization-settings-CeHEHcCT.js → use-organization-settings-Z97kIiyJ.js} +1 -1
  373. package/dist/client/assets/{use-panel-navigate-CibtHq9U.js → use-panel-navigate-wLblz5k_.js} +1 -1
  374. package/dist/client/assets/{use-project-native-view-presence-CxzHt9u-.js → use-project-native-view-presence-CjhMWHXl.js} +1 -1
  375. package/dist/client/assets/{use-project-scope-C5ltOcNu.js → use-project-scope-BhQSClTn.js} +1 -1
  376. package/dist/client/assets/{use-recent-apps-BaiNH2ly.js → use-recent-apps-DuZHJQ2X.js} +1 -1
  377. package/dist/client/assets/{use-reports-diagnostic-CoPuyo38.js → use-reports-diagnostic-cg_B2Lr6.js} +1 -1
  378. package/dist/client/assets/{use-sandbox-events-De79THM0.js → use-sandbox-events-B7dOcBPT.js} +1 -1
  379. package/dist/client/assets/{use-secrets-F6EEF0c8.js → use-secrets-DVImAcFs.js} +1 -1
  380. package/dist/client/assets/{use-section-preview-base-QvdCBEJw.js → use-section-preview-base-BYbPaheY.js} +1 -1
  381. package/dist/client/assets/{use-sidebar-collapsed-p7evhHE-.js → use-sidebar-collapsed-CM5RtZ9g.js} +1 -1
  382. package/dist/client/assets/{use-tags-leoSUSkv.js → use-tags-C6b2rsRB.js} +1 -1
  383. package/dist/client/assets/{use-task-board-analytics-BwS7X0DX.js → use-task-board-analytics-CBKOvH8z.js} +1 -1
  384. package/dist/client/assets/{use-task-board-item-prs-pYpUcS74.js → use-task-board-item-prs-CvU8IUL1.js} +1 -1
  385. package/dist/client/assets/{use-task-board-items-Cr__Mhsd.js → use-task-board-items-3N6HF4Kf.js} +1 -1
  386. package/dist/client/assets/{use-task-board-prompts-Cuya7XfN.js → use-task-board-prompts-BdDTTFLy.js} +1 -1
  387. package/dist/client/assets/{use-task-metadata-CG_ubPfh.js → use-task-metadata-_2s4pk3s.js} +1 -1
  388. package/dist/client/assets/{use-thread-outputs-Bjm2z7lV.js → use-thread-outputs-BcfNbIow.js} +1 -1
  389. package/dist/client/assets/{use-view-draft-kind-CyKK_7hM.js → use-view-draft-kind-DO3ACMBf.js} +1 -1
  390. package/dist/client/assets/{use-voice-input-Cw_jmpqz.js → use-voice-input-Ce-0jF5u.js} +1 -1
  391. package/dist/client/assets/useInfiniteQuery-BFVO4_Km.js +1 -0
  392. package/dist/client/assets/{useQueries-DxKE-Kwz.js → useQueries-By1JQP65.js} +1 -1
  393. package/dist/client/assets/useSuspenseInfiniteQuery-Dpm3fV_X.js +1 -0
  394. package/dist/client/assets/{users-BaqobwEM.js → users-CZGFn0nr.js} +1 -1
  395. package/dist/client/assets/{utils-mv_If7T8.js → utils-Bo7R17Ya.js} +1 -1
  396. package/dist/client/assets/{variant-calendar-Cns9556o.js → variant-calendar-DOFfOmWb.js} +1 -1
  397. package/dist/client/assets/{variant-matcher-override-qQP6G-xo.js → variant-matcher-override-Dq7DOitm.js} +1 -1
  398. package/dist/client/assets/{view-header-AM7xITE3.js → view-header-DX9UL4Ft.js} +1 -1
  399. package/dist/client/assets/{virtual-mcp-DuUWakAX.js → virtual-mcp-DIH4mOj3.js} +1 -1
  400. package/dist/client/assets/{watch-sse-pool-BIbbV9kx.js → watch-sse-pool-COP4NAhW.js} +1 -1
  401. package/dist/client/index.html +1 -1
  402. package/dist/server/server.js +1 -1
  403. package/package.json +1 -1
  404. package/dist/client/assets/agent-app-DT97MxKC.js +0 -1
  405. package/dist/client/assets/agent-deck-BrDMNo_b.js +0 -1
  406. package/dist/client/assets/agent-experiments-CXBMujSZ.js +0 -1
  407. package/dist/client/assets/agent-file-7P4XQ2-V.js +0 -1
  408. package/dist/client/assets/agent-library-BYIldo8C.js +0 -1
  409. package/dist/client/assets/agent-library-file-CtHYz6fc.js +0 -1
  410. package/dist/client/assets/agent-overview-D_-iaSnC.js +0 -1
  411. package/dist/client/assets/agent-settings-D01VEgAU.js +0 -1
  412. package/dist/client/assets/agent-site-editor-code-JGE3ubia.js +0 -2
  413. package/dist/client/assets/agent-site-editor-content-Dz6YmU4-.js +0 -1
  414. package/dist/client/assets/agent-site-editor-preview-DZ1mEzJJ.js +0 -1
  415. package/dist/client/assets/agent-view-CDMi3OUA.js +0 -1
  416. package/dist/client/assets/api-keys-B2RmaS4x.js +0 -1
  417. package/dist/client/assets/library-Bqc8gnQB.js +0 -1
  418. package/dist/client/assets/mock-board-CzkwVn5p.js +0 -10
  419. package/dist/client/assets/plan-DEoVIM_A.js +0 -1
  420. package/dist/client/assets/project-reports-DxhSeFHV.js +0 -1
  421. package/dist/client/assets/project-tasks-DFtM2yx9.js +0 -1
  422. package/dist/client/assets/record-editor-DHna-ZdT.js +0 -1
  423. package/dist/client/assets/reports-Z5m7hD0W.js +0 -1
  424. package/dist/client/assets/repositories-CjDwSFqL.js +0 -1
  425. package/dist/client/assets/route-DV2NnuG8.js +0 -1
  426. package/dist/client/assets/settings-tab-CqTExT-e.js +0 -1
  427. package/dist/client/assets/site-editor-BzrOcOHE.js +0 -1
  428. package/dist/client/assets/tasks-ClCyGX4n.js +0 -1
  429. package/dist/client/assets/use-ask-in-chat-Ce9h39TE.js +0 -1
  430. package/dist/client/assets/use-blocks-v8-project-CuPYYKmz.js +0 -1
  431. package/dist/client/assets/use-blog-view-BMLiqqRx.js +0 -1
  432. package/dist/client/assets/useInfiniteQuery-CsWuXCkN.js +0 -1
  433. package/dist/client/assets/useSuspenseInfiniteQuery-bhrOozcI.js +0 -1
@@ -1 +1 @@
1
- import{c as M,b as Z,J as X,a as V,r as z,j as r,as as re,n as R,a6 as oe,h as ie}from"./index-Ds-qTNYO.js";import{ChatLayout as ne}from"./index-D-MiiHuW.js";import{b as se}from"./input-B0oZuA1h.js";import{D as ae,a as me}from"./chat-context-BBaFY4u8.js";import{u as le}from"./use-organization-settings-CeHEHcCT.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-ToEleHhA.js";import{I as de}from"./icon-button-BmTLgm0k.js";import{T as he,a as W}from"./toggle-group-Cr0PLBvW.js";import{a as xe}from"./MessageCircle01-TFr7w4y2.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-BSX-R5ep.js";import{u as q,a as je}from"./use-org-fs-BQarrV3d.js";import{L as Se}from"./preview-dialog-Duj2T4uC.js";import{t as _e,r as we,s as De}from"./daily-pulse-DaPnGqpC.js";import{N as ke}from"./new-project-dialog-DZ44gqvX.js";import{P as ve}from"./projects-empty-state-DWjlfNiG.js";import{b as Be}from"./project-index-DiWeUbXu.js";import{u as Ce}from"./use-inbox-feed-D4P5nNI5.js";import{b as Ne}from"./use-recent-apps-BaiNH2ly.js";import{s as Pe}from"./use-project-scope-C5ltOcNu.js";import{u as $e}from"./repository-binding-DFFJA38E.js";import"./use-mobile-C5cF3CsA.js";import"./tooltip-Bqmntxnq.js";import"./index-CumGSGrn.js";import"./XClose-CImZkJqv.js";import"./thread-button-DgwVH37_.js";import"./use-sidebar-collapsed-p7evhHE-.js";import"./sheet-Bl5X71Uk.js";import"./use-chat-layout-state-4WFzjt1Y.js";import"./use-panel-navigate-CibtHq9U.js";import"./thread-route-Czas0Ahc.js";import"./toolbar-icon-button-5bOXXLM5.js";import"./use-in-settings-DZVM6ZxX.js";import"./resizable-Dx2kmSo6.js";import"./route-page-header-DtC3W5gY.js";import"./LayoutLeft-1eO49Ry-.js";import"./use-current-view-nHeE_Oxf.js";import"./usage-stats-bhxfI8nR.js";import"./utils-CVEq3hMx.js";import"./markdown-CvFBis_P.js";import"./use-copy-Cjf6ljKb.js";import"./agent-icon-C4ES7Kxt.js";import"./AlertCircle-Dj1nLpeQ.js";import"./UserCheck01-DujPU17i.js";import"./Tool01-CvwNlUtp.js";import"./ArrowUp-C7Nj_q22.js";import"./ArrowLeft-DmJguptr.js";import"./ArrowRight-CqqTatmK.js";import"./BookOpen01-D_X9oQA_.js";import"./Globe04-D_x1u0wl.js";import"./CheckCircle-DLlDtZcO.js";import"./ChevronDown-AhK2umcE.js";import"./ChevronSelectorVertical-D4kPqkF6.js";import"./ChevronUp-CsP_ILbF.js";import"./UserSquare-BQrpG0j5.js";import"./LinkBroken01-BrAFlEge.js";import"./CreditCard01-0W-8ixJb.js";import"./File02-MzjSapJn.js";import"./SwitchHorizontal01-CroZeibd.js";import"./Eye-2mlcak3o.js";import"./Fingerprint04-CxnXIcGK.js";import"./Image01-GkJc93Zv.js";import"./Key01-BFV7zbSI.js";import"./Minus-DxV34wXb.js";import"./Monitor01-C07iTkt5.js";import"./Sun-D3TjGNFC.js";import"./Play-DrgmXhZN.js";import"./Plus-BOy--mLV.js";import"./SearchMd-CUiS3-jY.js";import"./ShoppingBag01-BKR90dDm.js";import"./Trash01-AgFkfTH1.js";import"./Upload01-DcKwrYYS.js";import"./Users01-CwiCCaQY.js";import"./Zap-C66hTZO-.js";import"./task-board-bjQ27wf0.js";import"./schema-Hqvmwy-B.js";import"./gateway-client-ChEmLA24.js";import"./form-B1Aa30Zl.js";import"./label-BtZ5pCPj.js";import"./use-entitlements-BFCkglve.js";import"./file-type-icon-P199V-QT.js";import"./use-view-draft-kind-CyKK_7hM.js";import"./use-blog-view-BMLiqqRx.js";import"./thread-intent-BUfn00qh.js";import"./use-mcp-client--TOHcD4E.js";import"./auth-CQZBevHD.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BIbbV9kx.js";import"./session-runtime-DOdOYILQ.js";import"./chat-draft--Y0COItR.js";import"./use-voice-input-Cw_jmpqz.js";import"./popover-C5pxC1w-.js";import"./drawer-M8eIsqmT.js";import"./use-ai-providers-X8UPV0jM.js";import"./index-DIjWRIR0.js";import"./checkbox-Det6_SEt.js";import"./select-CTM3NCiB.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-ukxB2ssa.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-wpVwK54P.js";import"./input-sfZRU5fX.js";import"./suggestion-u7vKjcy7.js";import"./use-mcp-prompts-6a3IZkYE.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DgfQg6cM.js";import"./plan-ladder-BVRDILy3.js";import"./add-connection-dialog-Ca21AwUf.js";import"./collection-search-B3SxTnpS.js";import"./extract-connection-data-BSZtQano.js";import"./metadata-D72DunRR.js";import"./connection-CAWskHQ5.js";import"./url-slug-ByKMROnh.js";import"./connection-card-Bgn28vEo.js";import"./useInfiniteQuery-CsWuXCkN.js";import"./infiniteQueryObserver-c2XxJCzK.js";import"./connection-slug-Bse2tT5A.js";import"./integration-icon-S6KSerjv.js";import"./textarea-Ds05hJCZ.js";import"./use-connection-DTr7HsdN.js";import"./schema-DUI8QwTk.js";import"./connection-form-helpers-DxYbgQ9H.js";import"./authenticate-and-persist-oauth-BFPfSLNp.js";import"./mcp-oauth-DZE7mPzr.js";import"./mcp-oauth-CW3E7ztI.js";import"./collection-tabs-DBV0CA1j.js";import"./badge-Bt2wemt2.js";import"./use-infinite-scroll-CwrMEhd6.js";import"./useSuspenseInfiniteQuery-bhrOozcI.js";import"./use-task-board-items-Cr__Mhsd.js";import"./use-decopilot-events-CXTF0es-.js";import"./connect-key-CKwjN38W.js";import"./use-api-keys-BW0ZixJC.js";import"./chart-DBOQ-ncW.js";import"./CategoricalChart-ugqRZsTG.js";import"./index-Bpd9IQHj.js";import"./tooltipContext-BYPONkxu.js";import"./CartesianChart-BLi-kdGq.js";import"./project-icon-Bmnukyue.js";import"./project-apps-DJve3Elo.js";import"./config-BQIBahe7.js";import"./task-key-Cdn6Qwo0.js";import"./task-route-DR-DR1t5.js";import"./ReferenceLine-ahck2GxW.js";import"./utils-mv_If7T8.js";import"./editor-rTloof2p.js";import"./preview-content-DyYfMGyu.js";import"./file-share-button-CGVz1YEB.js";import"./use-navigate-to-agent-DcG9XPYG.js";import"./repository-picker-txpRHcwi.js";import"./github-icon-BHoWZzHA.js";import"./use-debounced-value-CtruecKk.js";import"./new-project-store-CjS-rf0X.js";const O="home",Q="brief";function ee(e){return`users/${e}/brief`}function Ee(e,t){return`${e}/${t}.html`}function Fe(e){const t=String(e.getFullYear()).padStart(4,"0"),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Ie(e){if(!e.endsWith(".html"))return null;const t=e.slice(0,-5);return be(t)?t:null}const Te=7;function te(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}function Me(e,t){let i=null;for(const s of e){const a=Ie(s);if(!a||i&&a<=i.day)continue;const n=te(a,t);n>=0&&n<Te&&(i={name:s,day:a})}return i}const K=e=>e.slice(e.lastIndexOf("/")+1);function J(e,t,i,s){const a=i.filter(o=>o.kind==="file"),n=Me(a.map(o=>K(o.path)),s),l=n&&a.find(o=>K(o.path)===n.name);return n&&l?{scope:e,path:Ee(t,n.day),filename:n.name,size:l.size,day:n.day,ageDays:te(n.day,s)}:null}function Ae({userId:e,personal:t,org:i,today:s}){return[e?J("personal",ee(e),t,s):null,J("org",Q,i,s)].filter(a=>a!==null)}function Le(e,t){return t===0?e("home.dailyBrief.today"):t===1?e("home.dailyBrief.yesterday"):e("home.dailyBrief.daysAgo",{count:t})}function He(e,t){return new Date(`${t}T12:00:00Z`).toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})}function Re(){const e=M.c(54),t=Z(),[i]=X(),{data:s}=V.useSession(),a=s?.user?.id,n=q(O,Q),l=a??"";let o;e[0]!==l?(o=ee(l),e[0]=l,e[1]=o):o=e[1];const D=!!a;let h;e[2]!==D?(h={enabled:D},e[2]=D,e[3]=h):h=e[3];const d=q(O,o,h),p=je(O),[k,v]=z.useState(null),[x,u]=z.useState(!1);let f,m,c,b,g,y,j,B,S,_;if(e[4]!==n.data||e[5]!==d.data||e[6]!==i||e[7]!==p||e[8]!==k||e[9]!==t||e[10]!==a){b=Symbol.for("react.early_return_sentinel");e:{const G=Ae({userId:a,personal:d.data??[],org:n.data??[],today:Fe(new Date)});if(m=G.find(T=>T.scope===k)??G[0],!m){b=null;break e}_="flex flex-col overflow-hidden surface";let A;e[21]!==t?(A=t("home.dailyBrief.title"),e[21]=t,e[22]=A):A=e[22];const U=r.jsxs("h2",{className:"flex min-w-0 items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[A,r.jsxs("span",{className:"truncate text-xs font-normal text-muted-foreground",children:[Le(t,m.ageDays)," ·"," ",He(i.language,m.day)]})]}),Y=G.length>1&&r.jsxs(he,{type:"single",variant:"segmented",size:"sm",value:m.scope,onValueChange:T=>{(T==="personal"||T==="org")&&v(T)},children:[r.jsx(W,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(W,{value:"org",className:"px-2.5 text-xs",children:t("home.dailyBrief.org")})]});let E;e[23]!==t?(E=t("home.dailyBrief.fullscreen"),e[23]=t,e[24]=E):E=e[24];let L,H;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!0),H=r.jsx(xe,{size:14}),e[25]=L,e[26]=H):(L=e[25],H=e[26]);let F;e[27]!==E?(F=r.jsx(de,{label:E,onClick:L,children:H}),e[27]=E,e[28]=F):F=e[28];let I;e[29]!==Y||e[30]!==F?(I=r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Y,F]}),e[29]=Y,e[30]=F,e[31]=I):I=e[31],e[32]!==U||e[33]!==I?(c=r.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[U,I]}),e[32]=U,e[33]=I,e[34]=c):c=e[34],S="h-[32rem]",f=ye,g=m.path,y=m.filename,j=m.size,B=p(m.path)}e[4]=n.data,e[5]=d.data,e[6]=i,e[7]=p,e[8]=k,e[9]=t,e[10]=a,e[11]=f,e[12]=m,e[13]=c,e[14]=b,e[15]=g,e[16]=y,e[17]=j,e[18]=B,e[19]=S,e[20]=_}else f=e[11],m=e[12],c=e[13],b=e[14],g=e[15],y=e[16],j=e[17],B=e[18],S=e[19],_=e[20];if(b!==Symbol.for("react.early_return_sentinel"))return b;let w;e[35]!==g||e[36]!==y||e[37]!==j||e[38]!==B?(w={key:g,filename:y,size:j,downloadUrl:B},e[35]=g,e[36]=y,e[37]=j,e[38]=B,e[39]=w):w=e[39];let C;e[40]!==f||e[41]!==w?(C=r.jsx(f,{file:w}),e[40]=f,e[41]=w,e[42]=C):C=e[42];let N;e[43]!==C||e[44]!==S?(N=r.jsx("div",{className:S,children:C}),e[43]=C,e[44]=S,e[45]=N):N=e[45];let $;e[46]!==m||e[47]!==x?($=x&&r.jsx(Se,{previewPath:`${O}/${m.path}`,onClose:()=>u(!1),showSeeInLibrary:!0}),e[46]=m,e[47]=x,e[48]=$):$=e[48];let P;return e[49]!==c||e[50]!==N||e[51]!==$||e[52]!==_?(P=r.jsxs("section",{className:_,children:[c,N,$]}),e[49]=c,e[50]=N,e[51]=$,e[52]=_,e[53]=P):P=e[53],P}function Oe(e){return e<12?"morning":e<18?"afternoon":"evening"}function ze(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}function Ge(e,t){return t.toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long"})}function Ue(e){return e==="morning"?"overnight":"today"}function Ye(e,t){const i=new Date(t);return i.setHours(0,0,0,0),e==="morning"&&i.setHours(-6),i.getTime()}const Ze={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function Ve(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex min-h-64 items-center justify-center",children:r.jsx(ie,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function We(e,t,i,s,a){const n=Ue(i)==="overnight",l=[];if(t>0){const o=e(t===1?"home.brief.changeOne":"home.brief.changeMany",{count:t});l.push(e(n?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else s===0&&l.push(e(a>0?"home.brief.working":n?"home.brief.quietNight":"home.brief.quietDay"));return l.push(s===0?e("home.brief.waitingNone"):e(s===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:s})),l.join(" ")}function qe(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,l=Z(),{org:o}=oe(),{data:D}=V.useSession();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={pageSize:1e3},t[0]=h):h=t[0];const d=$e(h),p=ce(),k=Ce(),{recent:v}=Ne(o.slug);let x,u;if(t[1]!==d||t[2]!==i||t[3]!==o.id){u=Symbol.for("react.early_return_sentinel");e:{let N;t[6]!==o.id?(N=P=>P.id!==o.id,t[6]=o.id,t[7]=N):N=t[7];const $=Pe(d).filter(N);if($.length===0){let P;t[8]!==i?(P=r.jsx(ve,{canCreate:i}),t[8]=i,t[9]=P):P=t[9],u=P;break e}x=Be($)}t[1]=d,t[2]=i,t[3]=o.id,t[4]=x,t[5]=u}else x=t[4],u=t[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;const f=x;let m,c;t[10]!==D?.user?.id||t[11]!==n||t[12]!==l||t[13]!==p?(c=_e(p,D?.user?.id),m=We(l,De(p,Ye(n,new Date)),n,c.length,we(p).length),t[10]=D?.user?.id,t[11]=n,t[12]=l,t[13]=p,t[14]=m,t[15]=c):(m=t[14],c=t[15]);const b=m;let g;t[16]!==s?(g=r.jsx("span",{className:"text-xs text-muted-foreground",children:s}),t[16]=s,t[17]=g):g=t[17];let y;t[18]!==b||t[19]!==a?(y=r.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[a," ",b]}),t[18]=b,t[19]=a,t[20]=y):y=t[20];let j;t[21]!==g||t[22]!==y?(j=r.jsxs("div",{className:"flex flex-col gap-1",children:[g,y]}),t[21]=g,t[22]=y,t[23]=j):j=t[23];let B;t[24]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx(Re,{}),t[24]=B):B=t[24];let S;t[25]!==k.updates||t[26]!==f||t[27]!==o.slug||t[28]!==p||t[29]!==c?(S=r.jsx(fe,{waiting:c,tasks:p,mentions:k.updates,index:f,orgSlug:o.slug}),t[25]=k.updates,t[26]=f,t[27]=o.slug,t[28]=p,t[29]=c,t[30]=S):S=t[30];let _;t[31]!==o.slug||t[32]!==v?(_=r.jsx(ue,{recent:v,orgSlug:o.slug}),t[31]=o.slug,t[32]=v,t[33]=_):_=t[33];let w;t[34]!==p?(w=r.jsx(ge,{tasks:p}),t[34]=p,t[35]=w):w=t[35];let C;return t[36]!==_||t[37]!==w||t[38]!==j||t[39]!==S?(C=r.jsxs("div",{className:"flex flex-col gap-8",children:[j,B,S,_,w]}),t[36]=_,t[37]=w,t[38]=j,t[39]=S,t[40]=C):C=t[40],C}function Ke(){const e=M.c(25),t=Z(),[i]=X(),s=le("home_task_intake_enabled"),{data:a}=V.useSession(),{granted:n}=re("agents:manage");let l,o,D;if(e[0]!==i.language||e[1]!==a?.user?.name||e[2]!==t){const c=new Date,b=ze(a?.user?.name);o=Oe(c.getHours());const g=Ze[o];l=Ge(i.language,c),D=b?t(g.named,{name:b}):t(g.bare),e[0]=i.language,e[1]=a?.user?.name,e[2]=t,e[3]=l,e[4]=o,e[5]=D}else l=e[3],o=e[4],D=e[5];const h=D;let d;e[6]!==n?(d=n&&r.jsx(ke,{source:"org_home_header"}),e[6]=n,e[7]=d):d=e[7];let p;e[8]!==d?(p=r.jsx(R.Actions,{children:d}),e[8]=d,e[9]=p):p=e[9];let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(pe,{}),e[10]=k):k=e[10];let v;e[11]!==s?(v=s&&r.jsx(z.Suspense,{fallback:null,children:r.jsx(ae,{children:r.jsx(me,{children:r.jsx(se,{homeTaskComposer:!0})})})}),e[11]=s,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Ve,{}),e[13]=x):x=e[13];let u;e[14]!==n||e[15]!==l||e[16]!==h||e[17]!==o?(u=r.jsx(z.Suspense,{fallback:x,children:r.jsx(qe,{canManageProjects:n,eyebrow:l,greeting:h,slot:o})}),e[14]=n,e[15]=l,e[16]=h,e[17]=o,e[18]=u):u=e[18];let f;e[19]!==v||e[20]!==u?(f=r.jsx(R.Content,{children:r.jsxs(R.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[k,v,u]})}),e[19]=v,e[20]=u,e[21]=f):f=e[21];let m;return e[22]!==p||e[23]!==f?(m=r.jsxs(R,{children:[p,f]}),e[22]=p,e[23]=f,e[24]=m):m=e[24],m}function Zo(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(ne.Content,{children:r.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Zo as default};
1
+ import{c as M,b as Z,J as X,a as V,r as z,j as r,as as re,n as R,a6 as oe,h as ie}from"./index-Dwd1G4Vx.js";import{ChatLayout as ne}from"./index-pfLEMtp2.js";import{b as se}from"./input-B945lqrQ.js";import{D as ae,a as me}from"./chat-context-CwFvOLKs.js";import{u as le}from"./use-organization-settings-Z97kIiyJ.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-D9Uexp1F.js";import{I as de}from"./icon-button-BlJ-D4pm.js";import{T as he,a as W}from"./toggle-group-CRmRiewC.js";import{a as xe}from"./MessageCircle01-CbkPSNEW.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-CIbQ2bq4.js";import{u as q,a as je}from"./use-org-fs-C24WT7qs.js";import{L as Se}from"./preview-dialog-D3sqBtfM.js";import{t as _e,r as we,s as De}from"./daily-pulse-DkJfOcwA.js";import{N as ke}from"./new-project-dialog-CzHBs73d.js";import{P as ve}from"./projects-empty-state-B0D7t4Xu.js";import{b as Be}from"./project-index-g8Mw58an.js";import{u as Ce}from"./use-inbox-feed-Bhy9EWTg.js";import{b as Ne}from"./use-recent-apps-DuZHJQ2X.js";import{s as Pe}from"./use-project-scope-BhQSClTn.js";import{u as $e}from"./repository-binding-CMSQadKK.js";import"./use-mobile-B-odn_6M.js";import"./tooltip-CvVfagmL.js";import"./index-BCdrqI8k.js";import"./XClose-CP7rsijJ.js";import"./thread-button-CU1baM8y.js";import"./use-sidebar-collapsed-CM5RtZ9g.js";import"./sheet-DKgQyvDB.js";import"./use-chat-layout-state-DhXm0vGG.js";import"./use-panel-navigate-wLblz5k_.js";import"./thread-route-TGRhgQNy.js";import"./toolbar-icon-button-Dzn3oOcr.js";import"./use-in-settings-Cpepn6np.js";import"./resizable-CmTf4GA3.js";import"./route-page-header-CWWIM7PH.js";import"./LayoutLeft-CNsHb_wL.js";import"./use-current-view-DfvEKiBd.js";import"./usage-stats-B8vQoGzD.js";import"./utils-CVEq3hMx.js";import"./markdown-BolIwd-E.js";import"./use-copy-DTg3j6vt.js";import"./agent-icon-CfC0W4dx.js";import"./AlertCircle-RTyXmO4S.js";import"./UserCheck01-Df2WX3uc.js";import"./Tool01-BkFRXcV-.js";import"./ArrowUp-D_1pjhTO.js";import"./ArrowLeft-DG4fDVhc.js";import"./ArrowRight-zK93byA1.js";import"./BookOpen01-BBApUhG2.js";import"./Globe04-CXm51HyO.js";import"./CheckCircle-Clv58VvB.js";import"./ChevronDown-kJLMLWQt.js";import"./ChevronSelectorVertical-CAB5uq58.js";import"./ChevronUp-BwUSkgn_.js";import"./UserSquare-DD4ifFen.js";import"./LinkBroken01-CSLR7LRd.js";import"./CreditCard01-CfyzfKuU.js";import"./File02-B2A02vx8.js";import"./SwitchHorizontal01-Bi1W2ShO.js";import"./Eye-Cuu5foEV.js";import"./Fingerprint04-CmYnXThy.js";import"./Image01-DgYaWAoi.js";import"./Key01-DcRNW8u_.js";import"./Minus-C39SzM_F.js";import"./Monitor01-ts8IiTjn.js";import"./Sun-BiK6_8bw.js";import"./Play-LvYHhysf.js";import"./Plus-vYAM1FOk.js";import"./SearchMd-D63wQvdr.js";import"./ShoppingBag01-CQHwvDI-.js";import"./Trash01-CQYiV3HH.js";import"./Upload01-MD8ZOSRI.js";import"./Users01-n6lj9nvW.js";import"./Zap-DEtHmWX1.js";import"./task-board-D6ORoPlw.js";import"./schema-DgzUQT8_.js";import"./gateway-client-DzolBOcM.js";import"./form-kGHKXG62.js";import"./label-BUAx9KeM.js";import"./use-entitlements-DAkKf3N6.js";import"./file-type-icon-DzIx-fos.js";import"./use-view-draft-kind-DO3ACMBf.js";import"./use-blog-view-DMdXcMqx.js";import"./thread-intent-CZaVmTg_.js";import"./use-mcp-client-CmpiHGcO.js";import"./auth-5QneqHw1.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-COP4NAhW.js";import"./session-runtime-DqiVON4P.js";import"./chat-draft-BWSEr7CB.js";import"./use-voice-input-Ce-0jF5u.js";import"./popover-DVoEmukb.js";import"./drawer-mYqYBdCv.js";import"./use-ai-providers-Dlo6-odm.js";import"./index-DzRykHvn.js";import"./checkbox-Cp871DDi.js";import"./select-LVhKuHDN.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-C8IPFNe7.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-CpuuHI0V.js";import"./input-cF3TEvjA.js";import"./suggestion-CZIPVi10.js";import"./use-mcp-prompts-Dmciokf4.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-FyLOI1QC.js";import"./plan-ladder-DtUZi1Cg.js";import"./add-connection-dialog-CUKpmanp.js";import"./collection-search-yOcmEgJr.js";import"./extract-connection-data-Co4GI14H.js";import"./metadata-D72DunRR.js";import"./connection-D-mr4YqR.js";import"./url-slug-B07-97MR.js";import"./connection-card-DkNQ-38Q.js";import"./useInfiniteQuery-BFVO4_Km.js";import"./infiniteQueryObserver-yySyT6qQ.js";import"./connection-slug-BrJ-0Gj-.js";import"./integration-icon-CDwVUuU6.js";import"./textarea-CR5PTU5T.js";import"./use-connection-B7WpypFb.js";import"./schema-DUnx0QAY.js";import"./connection-form-helpers-BItuI9Tb.js";import"./authenticate-and-persist-oauth-DbQtX0HJ.js";import"./mcp-oauth-BhYV5Jvy.js";import"./mcp-oauth-D8cls3N0.js";import"./collection-tabs-B-8iBMRa.js";import"./badge-DcNtdQVR.js";import"./use-infinite-scroll-D7XavDmy.js";import"./useSuspenseInfiniteQuery-Dpm3fV_X.js";import"./use-task-board-items-3N6HF4Kf.js";import"./use-decopilot-events-DBDyH8kF.js";import"./connect-key-Dut4FDWB.js";import"./use-api-keys-DeWBhZgH.js";import"./chart-BwB2rZVg.js";import"./CategoricalChart-DZcOvY0I.js";import"./index-C6B9-dtF.js";import"./tooltipContext-DLoT9K7J.js";import"./CartesianChart-Dh6If1Rz.js";import"./project-icon-GWaal0RG.js";import"./project-apps-C_iredcr.js";import"./config-R8s9dbvw.js";import"./task-key-2qHmdB3_.js";import"./task-route-BAvFAOTn.js";import"./ReferenceLine-DH397phd.js";import"./utils-Bo7R17Ya.js";import"./editor-BGdnY1P3.js";import"./preview-content-BlYV0mdr.js";import"./file-share-button-DIKPB6tS.js";import"./use-navigate-to-agent-DjlUlml5.js";import"./repository-picker-N35zzCix.js";import"./github-icon-BKE2Zw7O.js";import"./use-debounced-value-DlIItvJB.js";import"./new-project-store-kU6bg1Ts.js";const O="home",Q="brief";function ee(e){return`users/${e}/brief`}function Ee(e,t){return`${e}/${t}.html`}function Fe(e){const t=String(e.getFullYear()).padStart(4,"0"),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Ie(e){if(!e.endsWith(".html"))return null;const t=e.slice(0,-5);return be(t)?t:null}const Te=7;function te(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}function Me(e,t){let i=null;for(const s of e){const a=Ie(s);if(!a||i&&a<=i.day)continue;const n=te(a,t);n>=0&&n<Te&&(i={name:s,day:a})}return i}const K=e=>e.slice(e.lastIndexOf("/")+1);function J(e,t,i,s){const a=i.filter(o=>o.kind==="file"),n=Me(a.map(o=>K(o.path)),s),l=n&&a.find(o=>K(o.path)===n.name);return n&&l?{scope:e,path:Ee(t,n.day),filename:n.name,size:l.size,day:n.day,ageDays:te(n.day,s)}:null}function Ae({userId:e,personal:t,org:i,today:s}){return[e?J("personal",ee(e),t,s):null,J("org",Q,i,s)].filter(a=>a!==null)}function Le(e,t){return t===0?e("home.dailyBrief.today"):t===1?e("home.dailyBrief.yesterday"):e("home.dailyBrief.daysAgo",{count:t})}function He(e,t){return new Date(`${t}T12:00:00Z`).toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})}function Re(){const e=M.c(54),t=Z(),[i]=X(),{data:s}=V.useSession(),a=s?.user?.id,n=q(O,Q),l=a??"";let o;e[0]!==l?(o=ee(l),e[0]=l,e[1]=o):o=e[1];const D=!!a;let h;e[2]!==D?(h={enabled:D},e[2]=D,e[3]=h):h=e[3];const d=q(O,o,h),p=je(O),[k,v]=z.useState(null),[x,u]=z.useState(!1);let f,m,c,b,g,y,j,B,S,_;if(e[4]!==n.data||e[5]!==d.data||e[6]!==i||e[7]!==p||e[8]!==k||e[9]!==t||e[10]!==a){b=Symbol.for("react.early_return_sentinel");e:{const G=Ae({userId:a,personal:d.data??[],org:n.data??[],today:Fe(new Date)});if(m=G.find(T=>T.scope===k)??G[0],!m){b=null;break e}_="flex flex-col overflow-hidden surface";let A;e[21]!==t?(A=t("home.dailyBrief.title"),e[21]=t,e[22]=A):A=e[22];const U=r.jsxs("h2",{className:"flex min-w-0 items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[A,r.jsxs("span",{className:"truncate text-xs font-normal text-muted-foreground",children:[Le(t,m.ageDays)," ·"," ",He(i.language,m.day)]})]}),Y=G.length>1&&r.jsxs(he,{type:"single",variant:"segmented",size:"sm",value:m.scope,onValueChange:T=>{(T==="personal"||T==="org")&&v(T)},children:[r.jsx(W,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(W,{value:"org",className:"px-2.5 text-xs",children:t("home.dailyBrief.org")})]});let E;e[23]!==t?(E=t("home.dailyBrief.fullscreen"),e[23]=t,e[24]=E):E=e[24];let L,H;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!0),H=r.jsx(xe,{size:14}),e[25]=L,e[26]=H):(L=e[25],H=e[26]);let F;e[27]!==E?(F=r.jsx(de,{label:E,onClick:L,children:H}),e[27]=E,e[28]=F):F=e[28];let I;e[29]!==Y||e[30]!==F?(I=r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Y,F]}),e[29]=Y,e[30]=F,e[31]=I):I=e[31],e[32]!==U||e[33]!==I?(c=r.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[U,I]}),e[32]=U,e[33]=I,e[34]=c):c=e[34],S="h-[32rem]",f=ye,g=m.path,y=m.filename,j=m.size,B=p(m.path)}e[4]=n.data,e[5]=d.data,e[6]=i,e[7]=p,e[8]=k,e[9]=t,e[10]=a,e[11]=f,e[12]=m,e[13]=c,e[14]=b,e[15]=g,e[16]=y,e[17]=j,e[18]=B,e[19]=S,e[20]=_}else f=e[11],m=e[12],c=e[13],b=e[14],g=e[15],y=e[16],j=e[17],B=e[18],S=e[19],_=e[20];if(b!==Symbol.for("react.early_return_sentinel"))return b;let w;e[35]!==g||e[36]!==y||e[37]!==j||e[38]!==B?(w={key:g,filename:y,size:j,downloadUrl:B},e[35]=g,e[36]=y,e[37]=j,e[38]=B,e[39]=w):w=e[39];let C;e[40]!==f||e[41]!==w?(C=r.jsx(f,{file:w}),e[40]=f,e[41]=w,e[42]=C):C=e[42];let N;e[43]!==C||e[44]!==S?(N=r.jsx("div",{className:S,children:C}),e[43]=C,e[44]=S,e[45]=N):N=e[45];let $;e[46]!==m||e[47]!==x?($=x&&r.jsx(Se,{previewPath:`${O}/${m.path}`,onClose:()=>u(!1),showSeeInLibrary:!0}),e[46]=m,e[47]=x,e[48]=$):$=e[48];let P;return e[49]!==c||e[50]!==N||e[51]!==$||e[52]!==_?(P=r.jsxs("section",{className:_,children:[c,N,$]}),e[49]=c,e[50]=N,e[51]=$,e[52]=_,e[53]=P):P=e[53],P}function Oe(e){return e<12?"morning":e<18?"afternoon":"evening"}function ze(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}function Ge(e,t){return t.toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long"})}function Ue(e){return e==="morning"?"overnight":"today"}function Ye(e,t){const i=new Date(t);return i.setHours(0,0,0,0),e==="morning"&&i.setHours(-6),i.getTime()}const Ze={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function Ve(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex min-h-64 items-center justify-center",children:r.jsx(ie,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function We(e,t,i,s,a){const n=Ue(i)==="overnight",l=[];if(t>0){const o=e(t===1?"home.brief.changeOne":"home.brief.changeMany",{count:t});l.push(e(n?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else s===0&&l.push(e(a>0?"home.brief.working":n?"home.brief.quietNight":"home.brief.quietDay"));return l.push(s===0?e("home.brief.waitingNone"):e(s===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:s})),l.join(" ")}function qe(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,l=Z(),{org:o}=oe(),{data:D}=V.useSession();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={pageSize:1e3},t[0]=h):h=t[0];const d=$e(h),p=ce(),k=Ce(),{recent:v}=Ne(o.slug);let x,u;if(t[1]!==d||t[2]!==i||t[3]!==o.id){u=Symbol.for("react.early_return_sentinel");e:{let N;t[6]!==o.id?(N=P=>P.id!==o.id,t[6]=o.id,t[7]=N):N=t[7];const $=Pe(d).filter(N);if($.length===0){let P;t[8]!==i?(P=r.jsx(ve,{canCreate:i}),t[8]=i,t[9]=P):P=t[9],u=P;break e}x=Be($)}t[1]=d,t[2]=i,t[3]=o.id,t[4]=x,t[5]=u}else x=t[4],u=t[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;const f=x;let m,c;t[10]!==D?.user?.id||t[11]!==n||t[12]!==l||t[13]!==p?(c=_e(p,D?.user?.id),m=We(l,De(p,Ye(n,new Date)),n,c.length,we(p).length),t[10]=D?.user?.id,t[11]=n,t[12]=l,t[13]=p,t[14]=m,t[15]=c):(m=t[14],c=t[15]);const b=m;let g;t[16]!==s?(g=r.jsx("span",{className:"text-xs text-muted-foreground",children:s}),t[16]=s,t[17]=g):g=t[17];let y;t[18]!==b||t[19]!==a?(y=r.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[a," ",b]}),t[18]=b,t[19]=a,t[20]=y):y=t[20];let j;t[21]!==g||t[22]!==y?(j=r.jsxs("div",{className:"flex flex-col gap-1",children:[g,y]}),t[21]=g,t[22]=y,t[23]=j):j=t[23];let B;t[24]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx(Re,{}),t[24]=B):B=t[24];let S;t[25]!==k.updates||t[26]!==f||t[27]!==o.slug||t[28]!==p||t[29]!==c?(S=r.jsx(fe,{waiting:c,tasks:p,mentions:k.updates,index:f,orgSlug:o.slug}),t[25]=k.updates,t[26]=f,t[27]=o.slug,t[28]=p,t[29]=c,t[30]=S):S=t[30];let _;t[31]!==o.slug||t[32]!==v?(_=r.jsx(ue,{recent:v,orgSlug:o.slug}),t[31]=o.slug,t[32]=v,t[33]=_):_=t[33];let w;t[34]!==p?(w=r.jsx(ge,{tasks:p}),t[34]=p,t[35]=w):w=t[35];let C;return t[36]!==_||t[37]!==w||t[38]!==j||t[39]!==S?(C=r.jsxs("div",{className:"flex flex-col gap-8",children:[j,B,S,_,w]}),t[36]=_,t[37]=w,t[38]=j,t[39]=S,t[40]=C):C=t[40],C}function Ke(){const e=M.c(25),t=Z(),[i]=X(),s=le("home_task_intake_enabled"),{data:a}=V.useSession(),{granted:n}=re("agents:manage");let l,o,D;if(e[0]!==i.language||e[1]!==a?.user?.name||e[2]!==t){const c=new Date,b=ze(a?.user?.name);o=Oe(c.getHours());const g=Ze[o];l=Ge(i.language,c),D=b?t(g.named,{name:b}):t(g.bare),e[0]=i.language,e[1]=a?.user?.name,e[2]=t,e[3]=l,e[4]=o,e[5]=D}else l=e[3],o=e[4],D=e[5];const h=D;let d;e[6]!==n?(d=n&&r.jsx(ke,{source:"org_home_header"}),e[6]=n,e[7]=d):d=e[7];let p;e[8]!==d?(p=r.jsx(R.Actions,{children:d}),e[8]=d,e[9]=p):p=e[9];let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(pe,{}),e[10]=k):k=e[10];let v;e[11]!==s?(v=s&&r.jsx(z.Suspense,{fallback:null,children:r.jsx(ae,{children:r.jsx(me,{children:r.jsx(se,{homeTaskComposer:!0})})})}),e[11]=s,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Ve,{}),e[13]=x):x=e[13];let u;e[14]!==n||e[15]!==l||e[16]!==h||e[17]!==o?(u=r.jsx(z.Suspense,{fallback:x,children:r.jsx(qe,{canManageProjects:n,eyebrow:l,greeting:h,slot:o})}),e[14]=n,e[15]=l,e[16]=h,e[17]=o,e[18]=u):u=e[18];let f;e[19]!==v||e[20]!==u?(f=r.jsx(R.Content,{children:r.jsxs(R.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[k,v,u]})}),e[19]=v,e[20]=u,e[21]=f):f=e[21];let m;return e[22]!==p||e[23]!==f?(m=r.jsxs(R,{children:[p,f]}),e[22]=p,e[23]=f,e[24]=m):m=e[24],m}function Zo(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(ne.Content,{children:r.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Zo as default};
@@ -1 +1 @@
1
- import{c as A,b as B,a6 as q,as as ne,j as o,m as K,L as P,E as V,am as oe,V as re,h as ae,ag as ie,$ as le,o as ce}from"./index-Ds-qTNYO.js";import{i as Z}from"./ArrowRight-CqqTatmK.js";import{C as me,a as fe,b as de,c as ue}from"./connect-key-CKwjN38W.js";import{u as xe}from"./use-api-keys-BW0ZixJC.js";import{u as pe,t as ge}from"./use-task-board-items-Cr__Mhsd.js";import{i as he}from"./AlertCircle-Dj1nLpeQ.js";import{i as Q}from"./CheckCircle-DLlDtZcO.js";import{s as je}from"./Eye-2mlcak3o.js";import{v as ve,A as ke}from"./agent-icon-C4ES7Kxt.js";import{C as be,a as we,B as ye,b as Ne,c as _e}from"./chart-DBOQ-ncW.js";import{P as Se}from"./project-icon-Bmnukyue.js";import{T as X,P as Ce,A as Ie}from"./project-apps-DJve3Elo.js";import{a as Te}from"./config-BQIBahe7.js";import{t as ze}from"./task-route-DR-DR1t5.js";import{p as $e}from"./project-index-DiWeUbXu.js";import{a as Re,b as Ee,c as Ae,d as Me,R as F,f as G}from"./daily-pulse-DaPnGqpC.js";import{R as De}from"./ReferenceLine-ahck2GxW.js";import{C as Le,X as Be,Y as Ke}from"./CartesianChart-BLi-kdGq.js";const ee=[{name:"Claude",Icon:me,size:[11,14],bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:fe,size:[10,12],bg:"#000",fg:"#fff"},{name:"Codex",Icon:de,size:[10,12],bg:"#4F46E5",fg:"#fff"}];function wt(t){const e=A.c(22),{dense:a}=t,s=a===void 0?!0:a,l=B(),{org:n}=q();let i;e[0]!==n.slug?(i={org:n.slug},e[0]=n.slug,e[1]=i):i=e[1];const c=s?"h-7 shrink-0 gap-x-2 whitespace-nowrap pl-3 pr-1.5":"flex-wrap gap-x-3 gap-y-2 py-1.5 pl-4 pr-2.5";let r;e[2]!==c?(r=K("group hidden max-w-full @3xl/panel-header:inline-flex items-center justify-center rounded-full bg-card text-sm shadow-edge transition-colors hover:bg-accent",c),e[2]=c,e[3]=r):r=e[3];let m;e[4]!==l?(m=l("home.orgHome.connectPill"),e[4]=l,e[5]=m):m=e[5];let d;e[6]!==m?(d=o.jsx("span",{className:"font-medium text-foreground",children:m}),e[6]=m,e[7]=d):d=e[7];let f;e[8]!==s?(f=ee.map(j=>{const{name:v,Icon:z,size:_,bg:S,fg:$}=j;return o.jsx("span",{title:v,className:K("flex items-center justify-center rounded-full",s?"size-5":"size-6"),style:{backgroundColor:S,color:$},children:o.jsx(z,{size:s?_[0]:_[1]})},v)}),e[8]=s,e[9]=f):f=e[9];let u;e[10]!==f?(u=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:f}),e[10]=f,e[11]=u):u=e[11];const x=s?"size-3":"size-3.5";let p;e[12]!==x?(p=K(x,"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"),e[12]=x,e[13]=p):p=e[13];let g;e[14]!==p?(g=o.jsx(Z,{className:p}),e[14]=p,e[15]=g):g=e[15];let h;return e[16]!==g||e[17]!==i||e[18]!==r||e[19]!==d||e[20]!==u?(h=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Oe,className:r,children:[d,u,g]}),e[16]=g,e[17]=i,e[18]=r,e[19]=d,e[20]=u,e[21]=h):h=e[21],h}function Oe(){return V("connect_clients_opened",{source:"org_home"})}function yt(){const t=A.c(13),e=B(),{org:a}=q(),{granted:s}=ne("api-keys:manage");let l;t[0]!==s?(l={enabled:s},t[0]=s,t[1]=l):l=t[1];const{data:n}=xe(l);if(s&&!n||n?.some(Fe))return null;let i;t[2]!==a.slug?(i={org:a.slug},t[2]=a.slug,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:ee.map(Ye)}),t[4]=c):c=t[4];let r;t[5]!==e?(r=e("home.orgHome.connectPill"),t[5]=e,t[6]=r):r=t[6];let m;t[7]!==r?(m=o.jsx("span",{className:"font-medium text-foreground",children:r}),t[7]=r,t[8]=m):m=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Z,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),t[9]=d):d=t[9];let f;return t[10]!==i||t[11]!==m?(f=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Pe,className:"group hidden items-center gap-3 rounded-xl bg-card px-4 py-2.5 text-sm shadow-edge transition-colors hover:bg-accent md:flex",children:[c,m,d]}),t[10]=i,t[11]=m,t[12]=f):f=t[12],f}function Ye(t){const{name:e,Icon:a,size:s,bg:l,fg:n}=t;return o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full",style:{backgroundColor:l,color:n},children:o.jsx(a,{size:s[0]})},e)}function Pe(){return V("connect_clients_opened",{source:"org_home"})}function Fe(t){return t.name.startsWith(ue)}function Nt(){const t=A.c(3),{locator:e}=q(),a=oe();pe();let s;t[0]!==e||t[1]!==a?(s=ge(e,a),t[0]=e,t[1]=a,t[2]=s):s=t[2];const{data:l}=re(s);return l.items}function _t(t){const e=A.c(16),{recent:a,orgSlug:s}=t,l=B();let n,i,c,r;if(e[0]!==s||e[1]!==a||e[2]!==l){r=Symbol.for("react.early_return_sentinel");e:{let d;e[7]!==s||e[8]!==l?(d=u=>{const x={org:s,agentId:u.projectId};if(u.connection){const{label:g,icon:h,id:j,toolName:v}=u.connection;return[{key:`${j}:${v}:${u.projectId}`,label:g,project:u.projectTitle,link:{to:le.app,params:{...x,connectionId:j,toolName:v}},glyph:o.jsx(ke,{icon:h,name:g,size:"md",className:X})}]}const p=Ce[u.app];return p?[{key:`${u.app}:${u.projectId}`,label:l(p.labelKey),project:u.projectTitle,link:{to:p.to,params:x},glyph:o.jsx("span",{className:K(X,"flex items-center",p.tone),children:o.jsx(p.Icon,{size:24})})}]:[]},e[7]=s,e[8]=l,e[9]=d):d=e[9];const f=a.slice(0,8).flatMap(d);if(f.length===0){r=null;break e}n=Ie,e[10]!==l?(i=l("home.overview.recentApps"),e[10]=l,e[11]=i):i=e[11],c=f.map(Ue)}e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r}else n=e[3],i=e[4],c=e[5],r=e[6];if(r!==Symbol.for("react.early_return_sentinel"))return r;let m;return e[12]!==n||e[13]!==i||e[14]!==c?(m=o.jsx(n,{title:i,children:c}),e[12]=n,e[13]=i,e[14]=c,e[15]=m):m=e[15],m}function Ue(t){return o.jsxs(P,{to:t.link.to,params:t.link.params,className:"group flex shrink-0 flex-col items-center gap-2.5 rounded-xl p-3 text-center transition-[background-color,transform] duration-150 ease-out hover:bg-accent active:scale-[0.97]",children:[t.glyph,o.jsxs("span",{className:"flex w-full min-w-0 flex-col",children:[o.jsx("span",{className:"line-clamp-2 text-xs font-medium break-words text-foreground",children:t.label}),o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.project})]})]},t.key)}function He(t,e){return{to:ie.tasks,params:{org:t,taskKey:ze(t,e)}}}const Qe={answer:{Icon:ve,tone:"text-warning",reasonKey:"home.needsYou.reasonAnswer"},failed:{Icon:he,tone:"text-destructive",reasonKey:"home.overview.reasonFailed"},review:{Icon:je,tone:"text-warning",reasonKey:"home.needsYou.reasonReview"},running:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.needsYou.reasonAssigned"}},J=["answer","failed","review","running","assigned"];function qe(t,e){const a=new Set,s=[],l=(n,i)=>{a.has(n.id)||(a.add(n.id),s.push({task:n,kind:i}))};for(const n of t)l(n,Re(n));for(const n of e){if(n.status==="done"||n.status==="archived")continue;const i=Te(n);i==="failed"?l(n,"failed"):i==="running"&&l(n,"running")}return s.sort((n,i)=>J.indexOf(n.kind)-J.indexOf(i.kind))}function Xe(t,e){const a=new Map;for(const r of e){if(r.action!=="mentioned"&&r.action!=="commented")continue;const m=a.get(r.taskBoardItemId);(!m||m.action!=="mentioned"&&r.action==="mentioned")&&a.set(r.taskBoardItemId,r)}const s=new Set(t.map(r=>r.task.id)),l=[...a.values()].filter(r=>!s.has(r.taskBoardItemId)).map(r=>({kind:"mention",task:null,mention:r})),n=t.map(({task:r,kind:m})=>({kind:m,task:r,mention:a.get(r.id)??null})),i=n.filter(r=>r.kind==="answer"),c=n.filter(r=>r.kind!=="answer");return[...i,...l,...c]}const Ge=7;function W(t){const e=A.c(6),{mention:a}=t,s=B();let l;e[0]!==a.actorName||e[1]!==s?(l=a.actorName??s("home.overview.someone"),e[0]=a.actorName,e[1]=s,e[2]=l):l=e[2];const n=l,i=a.actorImage??void 0;let c;return e[3]!==n||e[4]!==i?(c=o.jsx(ce,{url:i,fallback:n,shape:"circle",size:"2xs"}),e[3]=n,e[4]=i,e[5]=c):c=e[5],c}function Je(t,e){const a=t.actorName??e("home.overview.someone");return e(t.action==="mentioned"?"home.overview.mentioned":"home.overview.commented",{actor:a})}function St(t){const e=A.c(12),{waiting:a,tasks:s,mentions:l,index:n,orgSlug:i}=t,c=B();let r;if(e[0]!==n||e[1]!==l||e[2]!==i||e[3]!==c||e[4]!==s||e[5]!==a){const m=Xe(qe(a,s),l);let d;e[7]!==c?(d=c("home.overview.forYou"),e[7]=c,e[8]=d):d=e[8];const f=m.length>0&&o.jsx("span",{className:"text-muted-foreground tabular-nums",children:m.length});let u;e[9]!==d||e[10]!==f?(u=o.jsxs("h2",{className:"flex items-center gap-2 px-2 pt-1 pb-1 text-sm font-medium text-foreground",children:[d,f]}),e[9]=d,e[10]=f,e[11]=u):u=e[11],r=o.jsxs("section",{className:"flex flex-col gap-2 surface p-3",children:[u,m.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-3 px-2 py-10 text-center",children:[o.jsx("span",{className:"flex size-10 items-center justify-center rounded-full bg-success/10 text-success",children:o.jsx(Q,{size:20})}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:c("home.overview.allClearTitle")}),o.jsx("p",{className:"text-sm text-muted-foreground",children:c("home.overview.allClearDescription")})]})]}):o.jsx("div",{className:"flex flex-col",children:m.slice(0,Ge).map(x=>{const p=x.kind==="mention"?{id:x.mention.taskBoardItemId,keySeq:x.mention.taskKeySeq,title:x.mention.taskTitle}:x.task,g=x.task?$e(x.task,n):null,h=x.kind==="mention"?null:Qe[x.kind],j=x.mention?Je(x.mention,c):h?c(h.reasonKey):"";return o.jsxs(P,{...He(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[o.jsx("span",{"aria-hidden":"true",className:K("flex size-4 shrink-0 items-center justify-center",h?.tone),children:x.kind==="mention"?o.jsx(W,{mention:x.mention}):x.kind==="running"?o.jsx(ae,{className:"size-3.5"}):h?o.jsx(h.Icon,{size:16}):null}),o.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:p.title}),o.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-sm text-muted-foreground",children:[x.kind!=="mention"&&x.mention&&o.jsx("span",{"aria-hidden":"true",children:o.jsx(W,{mention:x.mention})}),o.jsx("span",{className:"truncate",children:j})]}),g&&o.jsxs("span",{className:"hidden max-w-48 shrink-0 items-center gap-1.5 text-xs text-muted-foreground md:flex",children:[o.jsx(Se,{icon:g.icon,name:g.title}),o.jsx("span",{className:"truncate",children:g.title})]})]},p.id)})})]}),e[0]=n,e[1]=l,e[2]=i,e[3]=c,e[4]=s,e[5]=a,e[6]=r}else r=e[6];return r}function We(t){if(t<=0)return 1;const e=10**Math.floor(Math.log10(t));for(const a of[1,2,2.5,5,10])if(a*e>=t)return a*e;return 10*e}const Ve=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function U(t){const e=A.c(52),{series:a,start:s,format:l,label:n,averageLabel:i}=t,c=We(Math.max(...a,0));let r;e[0]!==a?(r=a.length===0?0:a.reduce(et,0)/a.length,e[0]=a,e[1]=r):r=e[1];const m=r;let d;if(e[2]!==a||e[3]!==s){let E;e[5]!==s?(E=(te,se)=>({day:Ve.format(new Date(s.getTime()+se*864e5)),value:te}),e[5]=s,e[6]=E):E=e[6],d=a.map(E),e[2]=a,e[3]=s,e[4]=d}else d=e[4];const f=d,u=Math.max(f.length-1,0),x=f[0]?.day;let p;e[7]!==u||e[8]!==f?(p=f[Math.round(u/2)]?.day,e[7]=u,e[8]=f,e[9]=p):p=e[9];const g=f[u]?.day;let h;e[10]!==x||e[11]!==p||e[12]!==g?(h=[x,p,g].filter(Ze),e[10]=x,e[11]=p,e[12]=g,e[13]=h):h=e[13];const j=h;let v;e[14]!==n?(v={value:{label:n,color:"var(--chart-1)"}},e[14]=n,e[15]=v):v=e[15];const z=v;let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_={top:8,right:0,bottom:0,left:0},e[16]=_):_=e[16];let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Le,{vertical:!1,strokeDasharray:"4 4",stroke:"var(--border)"}),e[17]=S):S=e[17];let $,R;e[18]===Symbol.for("react.memo_cache_sentinel")?($={stroke:"var(--border)"},R={fontSize:12,fill:"var(--muted-foreground)"},e[18]=$,e[19]=R):($=e[18],R=e[19]);let b;e[20]!==j?(b=o.jsx(Be,{dataKey:"day",ticks:j,interval:"preserveStartEnd",tickLine:!1,axisLine:$,tick:R,tickMargin:8}),e[20]=j,e[21]=b):b=e[21];let I;e[22]!==c?(I=[0,c],e[22]=c,e[23]=I):I=e[23];const T=c/2;let w;e[24]!==c||e[25]!==T?(w=[0,T,c],e[24]=c,e[25]=T,e[26]=w):w=e[26];let y;e[27]!==l?(y=E=>E===0?"0":l(E),e[27]=l,e[28]=y):y=e[28];let M;e[29]===Symbol.for("react.memo_cache_sentinel")?(M={fontSize:12,fill:"var(--muted-foreground)"},e[29]=M):M=e[29];let N;e[30]!==I||e[31]!==w||e[32]!==y?(N=o.jsx(Ke,{orientation:"right",domain:I,ticks:w,tickFormatter:y,tickLine:!1,axisLine:!1,tick:M,width:44}),e[30]=I,e[31]=w,e[32]=y,e[33]=N):N=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C={fill:"var(--muted)",opacity:.6},e[34]=C):C=e[34];let k;e[35]!==l||e[36]!==n?(k=o.jsx(be,{cursor:C,content:o.jsx(we,{indicator:"line",formatter:E=>o.jsxs("div",{className:"flex flex-1 items-center justify-between gap-3 leading-none",children:[o.jsx("span",{className:"text-muted-foreground",children:n}),o.jsx("span",{className:"font-medium text-foreground tabular-nums",children:l(Number(E))})]})})}),e[35]=l,e[36]=n,e[37]=k):k=e[37];let D;e[38]!==m||e[39]!==i||e[40]!==l?(D=m>0&&o.jsx(De,{y:m,stroke:"var(--foreground)",strokeOpacity:.6,strokeDasharray:"2 2",label:{value:i(l(m)),position:"insideBottomLeft",fontSize:12,fill:"var(--foreground)"}}),e[38]=m,e[39]=i,e[40]=l,e[41]=D):D=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx(ye,{dataKey:"value",fill:"var(--color-value)",radius:[2,2,0,0],maxBarSize:4,animationDuration:300}),e[42]=O):O=e[42];let L;e[43]!==f||e[44]!==b||e[45]!==N||e[46]!==k||e[47]!==D?(L=o.jsxs(Ne,{data:f,margin:_,barCategoryGap:"30%",children:[S,b,N,k,D,O]}),e[43]=f,e[44]=b,e[45]=N,e[46]=k,e[47]=D,e[48]=L):L=e[48];let Y;return e[49]!==z||e[50]!==L?(Y=o.jsx(_e,{config:z,className:"aspect-auto h-[159px] w-full",children:L}),e[49]=z,e[50]=L,e[51]=Y):Y=e[51],Y}function Ze(t){return!!t}function et(t,e){return t+e}function H(t){const e=A.c(10),{label:a,value:s,chart:l}=t;let n;e[0]!==a?(n=o.jsx("span",{className:"text-sm font-medium text-foreground",children:a}),e[0]=a,e[1]=n):n=e[1];let i;e[2]!==s?(i=o.jsx("span",{className:"text-[32px] leading-none font-medium tracking-tight tabular-nums text-foreground",children:s}),e[2]=s,e[3]=i):i=e[3];let c;e[4]!==n||e[5]!==i?(c=o.jsxs("div",{className:"flex flex-col gap-2.5",children:[n,i]}),e[4]=n,e[5]=i,e[6]=c):c=e[6];let r;return e[7]!==l||e[8]!==c?(r=o.jsxs("section",{className:"flex flex-col gap-6 surface p-5",children:[c,l]}),e[7]=l,e[8]=c,e[9]=r):r=e[9],r}function Ct(t){const e=A.c(58),{tasks:a}=t,s=B();let l,n,i,c,r,m,d,f,u;if(e[0]!==s||e[1]!==a){const j=Ee(a,F),v=Ae(a,F);i=Me(a);const z=st;let _,S;if(e[11]===Symbol.for("react.memo_cache_sentinel")){const k=new Date;S=new Date(k.getFullYear(),k.getMonth(),k.getDate()-(F-1)),_=new Date(k.getFullYear(),k.getMonth(),1),e[11]=_,e[12]=S}else _=e[11],S=e[12];c=_;const $=tt;let R;e[13]!==s?(R=k=>s("home.overview.average",{value:k}),e[13]=s,e[14]=R):R=e[14],n=R,d="grid gap-4 md:grid-cols-3";let b;e[15]!==s?(b=s("home.overview.delivered"),e[15]=s,e[16]=b):b=e[16];const I=String(z(j));let T;e[17]!==s?(T=s("home.overview.delivered"),e[17]=s,e[18]=T):T=e[18];let w;e[19]!==n||e[20]!==j||e[21]!==T?(w=o.jsx(U,{label:T,series:j,start:S,format:$,averageLabel:n}),e[19]=n,e[20]=j,e[21]=T,e[22]=w):w=e[22],e[23]!==w||e[24]!==b||e[25]!==I?(f=o.jsx(H,{label:b,value:I,chart:w}),e[23]=w,e[24]=b,e[25]=I,e[26]=f):f=e[26];let y;e[27]!==s?(y=s("home.overview.agentRuns"),e[27]=s,e[28]=y):y=e[28];const M=String(z(v));let N;e[29]!==s?(N=s("home.overview.agentRuns"),e[29]=s,e[30]=N):N=e[30];let C;e[31]!==n||e[32]!==v||e[33]!==N?(C=o.jsx(U,{label:N,series:v,start:S,format:$,averageLabel:n}),e[31]=n,e[32]=v,e[33]=N,e[34]=C):C=e[34],e[35]!==y||e[36]!==M||e[37]!==C?(u=o.jsx(H,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=u):u=e[38],l=H,e[39]!==s?(r=s("home.overview.agentCost"),e[39]=s,e[40]=r):r=e[40],m=G(z(i)),e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r,e[7]=m,e[8]=d,e[9]=f,e[10]=u}else l=e[2],n=e[3],i=e[4],c=e[5],r=e[6],m=e[7],d=e[8],f=e[9],u=e[10];let x;e[41]!==s?(x=s("home.overview.agentCost"),e[41]=s,e[42]=x):x=e[42];let p;e[43]!==n||e[44]!==i||e[45]!==c||e[46]!==x?(p=o.jsx(U,{label:x,series:i,start:c,format:G,averageLabel:n}),e[43]=n,e[44]=i,e[45]=c,e[46]=x,e[47]=p):p=e[47];let g;e[48]!==l||e[49]!==r||e[50]!==m||e[51]!==p?(g=o.jsx(l,{label:r,value:m,chart:p}),e[48]=l,e[49]=r,e[50]=m,e[51]=p,e[52]=g):g=e[52];let h;return e[53]!==d||e[54]!==f||e[55]!==u||e[56]!==g?(h=o.jsxs("div",{className:d,children:[f,u,g]}),e[53]=d,e[54]=f,e[55]=u,e[56]=g,e[57]=h):h=e[57],h}function tt(t){return String(Math.round(t*10)/10)}function st(t){return t.reduce(nt,0)}function nt(t,e){return t+e}export{yt as C,St as F,Ct as M,_t as R,wt as a,Nt as u};
1
+ import{c as A,b as B,a6 as q,as as ne,j as o,m as K,L as P,E as V,am as oe,V as re,h as ae,ag as ie,$ as le,o as ce}from"./index-Dwd1G4Vx.js";import{i as Z}from"./ArrowRight-zK93byA1.js";import{C as me,a as fe,b as de,c as ue}from"./connect-key-Dut4FDWB.js";import{u as xe}from"./use-api-keys-DeWBhZgH.js";import{u as pe,t as ge}from"./use-task-board-items-3N6HF4Kf.js";import{i as he}from"./AlertCircle-RTyXmO4S.js";import{i as Q}from"./CheckCircle-Clv58VvB.js";import{s as je}from"./Eye-Cuu5foEV.js";import{v as ve,A as ke}from"./agent-icon-CfC0W4dx.js";import{C as be,a as we,B as ye,b as Ne,c as _e}from"./chart-BwB2rZVg.js";import{P as Se}from"./project-icon-GWaal0RG.js";import{T as X,P as Ce,A as Ie}from"./project-apps-C_iredcr.js";import{a as Te}from"./config-R8s9dbvw.js";import{t as ze}from"./task-route-BAvFAOTn.js";import{p as $e}from"./project-index-g8Mw58an.js";import{a as Re,b as Ee,c as Ae,d as Me,R as F,f as G}from"./daily-pulse-DkJfOcwA.js";import{R as De}from"./ReferenceLine-DH397phd.js";import{C as Le,X as Be,Y as Ke}from"./CartesianChart-Dh6If1Rz.js";const ee=[{name:"Claude",Icon:me,size:[11,14],bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:fe,size:[10,12],bg:"#000",fg:"#fff"},{name:"Codex",Icon:de,size:[10,12],bg:"#4F46E5",fg:"#fff"}];function wt(t){const e=A.c(22),{dense:a}=t,s=a===void 0?!0:a,l=B(),{org:n}=q();let i;e[0]!==n.slug?(i={org:n.slug},e[0]=n.slug,e[1]=i):i=e[1];const c=s?"h-7 shrink-0 gap-x-2 whitespace-nowrap pl-3 pr-1.5":"flex-wrap gap-x-3 gap-y-2 py-1.5 pl-4 pr-2.5";let r;e[2]!==c?(r=K("group hidden max-w-full @3xl/panel-header:inline-flex items-center justify-center rounded-full bg-card text-sm shadow-edge transition-colors hover:bg-accent",c),e[2]=c,e[3]=r):r=e[3];let m;e[4]!==l?(m=l("home.orgHome.connectPill"),e[4]=l,e[5]=m):m=e[5];let d;e[6]!==m?(d=o.jsx("span",{className:"font-medium text-foreground",children:m}),e[6]=m,e[7]=d):d=e[7];let f;e[8]!==s?(f=ee.map(j=>{const{name:v,Icon:z,size:_,bg:S,fg:$}=j;return o.jsx("span",{title:v,className:K("flex items-center justify-center rounded-full",s?"size-5":"size-6"),style:{backgroundColor:S,color:$},children:o.jsx(z,{size:s?_[0]:_[1]})},v)}),e[8]=s,e[9]=f):f=e[9];let u;e[10]!==f?(u=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:f}),e[10]=f,e[11]=u):u=e[11];const x=s?"size-3":"size-3.5";let p;e[12]!==x?(p=K(x,"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"),e[12]=x,e[13]=p):p=e[13];let g;e[14]!==p?(g=o.jsx(Z,{className:p}),e[14]=p,e[15]=g):g=e[15];let h;return e[16]!==g||e[17]!==i||e[18]!==r||e[19]!==d||e[20]!==u?(h=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Oe,className:r,children:[d,u,g]}),e[16]=g,e[17]=i,e[18]=r,e[19]=d,e[20]=u,e[21]=h):h=e[21],h}function Oe(){return V("connect_clients_opened",{source:"org_home"})}function yt(){const t=A.c(13),e=B(),{org:a}=q(),{granted:s}=ne("api-keys:manage");let l;t[0]!==s?(l={enabled:s},t[0]=s,t[1]=l):l=t[1];const{data:n}=xe(l);if(s&&!n||n?.some(Fe))return null;let i;t[2]!==a.slug?(i={org:a.slug},t[2]=a.slug,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:ee.map(Ye)}),t[4]=c):c=t[4];let r;t[5]!==e?(r=e("home.orgHome.connectPill"),t[5]=e,t[6]=r):r=t[6];let m;t[7]!==r?(m=o.jsx("span",{className:"font-medium text-foreground",children:r}),t[7]=r,t[8]=m):m=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Z,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),t[9]=d):d=t[9];let f;return t[10]!==i||t[11]!==m?(f=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Pe,className:"group hidden items-center gap-3 rounded-xl bg-card px-4 py-2.5 text-sm shadow-edge transition-colors hover:bg-accent md:flex",children:[c,m,d]}),t[10]=i,t[11]=m,t[12]=f):f=t[12],f}function Ye(t){const{name:e,Icon:a,size:s,bg:l,fg:n}=t;return o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full",style:{backgroundColor:l,color:n},children:o.jsx(a,{size:s[0]})},e)}function Pe(){return V("connect_clients_opened",{source:"org_home"})}function Fe(t){return t.name.startsWith(ue)}function Nt(){const t=A.c(3),{locator:e}=q(),a=oe();pe();let s;t[0]!==e||t[1]!==a?(s=ge(e,a),t[0]=e,t[1]=a,t[2]=s):s=t[2];const{data:l}=re(s);return l.items}function _t(t){const e=A.c(16),{recent:a,orgSlug:s}=t,l=B();let n,i,c,r;if(e[0]!==s||e[1]!==a||e[2]!==l){r=Symbol.for("react.early_return_sentinel");e:{let d;e[7]!==s||e[8]!==l?(d=u=>{const x={org:s,agentId:u.projectId};if(u.connection){const{label:g,icon:h,id:j,toolName:v}=u.connection;return[{key:`${j}:${v}:${u.projectId}`,label:g,project:u.projectTitle,link:{to:le.app,params:{...x,connectionId:j,toolName:v}},glyph:o.jsx(ke,{icon:h,name:g,size:"md",className:X})}]}const p=Ce[u.app];return p?[{key:`${u.app}:${u.projectId}`,label:l(p.labelKey),project:u.projectTitle,link:{to:p.to,params:x},glyph:o.jsx("span",{className:K(X,"flex items-center",p.tone),children:o.jsx(p.Icon,{size:24})})}]:[]},e[7]=s,e[8]=l,e[9]=d):d=e[9];const f=a.slice(0,8).flatMap(d);if(f.length===0){r=null;break e}n=Ie,e[10]!==l?(i=l("home.overview.recentApps"),e[10]=l,e[11]=i):i=e[11],c=f.map(Ue)}e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r}else n=e[3],i=e[4],c=e[5],r=e[6];if(r!==Symbol.for("react.early_return_sentinel"))return r;let m;return e[12]!==n||e[13]!==i||e[14]!==c?(m=o.jsx(n,{title:i,children:c}),e[12]=n,e[13]=i,e[14]=c,e[15]=m):m=e[15],m}function Ue(t){return o.jsxs(P,{to:t.link.to,params:t.link.params,className:"group flex shrink-0 flex-col items-center gap-2.5 rounded-xl p-3 text-center transition-[background-color,transform] duration-150 ease-out hover:bg-accent active:scale-[0.97]",children:[t.glyph,o.jsxs("span",{className:"flex w-full min-w-0 flex-col",children:[o.jsx("span",{className:"line-clamp-2 text-xs font-medium break-words text-foreground",children:t.label}),o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.project})]})]},t.key)}function He(t,e){return{to:ie.tasks,params:{org:t,taskKey:ze(t,e)}}}const Qe={answer:{Icon:ve,tone:"text-warning",reasonKey:"home.needsYou.reasonAnswer"},failed:{Icon:he,tone:"text-destructive",reasonKey:"home.overview.reasonFailed"},review:{Icon:je,tone:"text-warning",reasonKey:"home.needsYou.reasonReview"},running:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.needsYou.reasonAssigned"}},J=["answer","failed","review","running","assigned"];function qe(t,e){const a=new Set,s=[],l=(n,i)=>{a.has(n.id)||(a.add(n.id),s.push({task:n,kind:i}))};for(const n of t)l(n,Re(n));for(const n of e){if(n.status==="done"||n.status==="archived")continue;const i=Te(n);i==="failed"?l(n,"failed"):i==="running"&&l(n,"running")}return s.sort((n,i)=>J.indexOf(n.kind)-J.indexOf(i.kind))}function Xe(t,e){const a=new Map;for(const r of e){if(r.action!=="mentioned"&&r.action!=="commented")continue;const m=a.get(r.taskBoardItemId);(!m||m.action!=="mentioned"&&r.action==="mentioned")&&a.set(r.taskBoardItemId,r)}const s=new Set(t.map(r=>r.task.id)),l=[...a.values()].filter(r=>!s.has(r.taskBoardItemId)).map(r=>({kind:"mention",task:null,mention:r})),n=t.map(({task:r,kind:m})=>({kind:m,task:r,mention:a.get(r.id)??null})),i=n.filter(r=>r.kind==="answer"),c=n.filter(r=>r.kind!=="answer");return[...i,...l,...c]}const Ge=7;function W(t){const e=A.c(6),{mention:a}=t,s=B();let l;e[0]!==a.actorName||e[1]!==s?(l=a.actorName??s("home.overview.someone"),e[0]=a.actorName,e[1]=s,e[2]=l):l=e[2];const n=l,i=a.actorImage??void 0;let c;return e[3]!==n||e[4]!==i?(c=o.jsx(ce,{url:i,fallback:n,shape:"circle",size:"2xs"}),e[3]=n,e[4]=i,e[5]=c):c=e[5],c}function Je(t,e){const a=t.actorName??e("home.overview.someone");return e(t.action==="mentioned"?"home.overview.mentioned":"home.overview.commented",{actor:a})}function St(t){const e=A.c(12),{waiting:a,tasks:s,mentions:l,index:n,orgSlug:i}=t,c=B();let r;if(e[0]!==n||e[1]!==l||e[2]!==i||e[3]!==c||e[4]!==s||e[5]!==a){const m=Xe(qe(a,s),l);let d;e[7]!==c?(d=c("home.overview.forYou"),e[7]=c,e[8]=d):d=e[8];const f=m.length>0&&o.jsx("span",{className:"text-muted-foreground tabular-nums",children:m.length});let u;e[9]!==d||e[10]!==f?(u=o.jsxs("h2",{className:"flex items-center gap-2 px-2 pt-1 pb-1 text-sm font-medium text-foreground",children:[d,f]}),e[9]=d,e[10]=f,e[11]=u):u=e[11],r=o.jsxs("section",{className:"flex flex-col gap-2 surface p-3",children:[u,m.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-3 px-2 py-10 text-center",children:[o.jsx("span",{className:"flex size-10 items-center justify-center rounded-full bg-success/10 text-success",children:o.jsx(Q,{size:20})}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:c("home.overview.allClearTitle")}),o.jsx("p",{className:"text-sm text-muted-foreground",children:c("home.overview.allClearDescription")})]})]}):o.jsx("div",{className:"flex flex-col",children:m.slice(0,Ge).map(x=>{const p=x.kind==="mention"?{id:x.mention.taskBoardItemId,keySeq:x.mention.taskKeySeq,title:x.mention.taskTitle}:x.task,g=x.task?$e(x.task,n):null,h=x.kind==="mention"?null:Qe[x.kind],j=x.mention?Je(x.mention,c):h?c(h.reasonKey):"";return o.jsxs(P,{...He(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[o.jsx("span",{"aria-hidden":"true",className:K("flex size-4 shrink-0 items-center justify-center",h?.tone),children:x.kind==="mention"?o.jsx(W,{mention:x.mention}):x.kind==="running"?o.jsx(ae,{className:"size-3.5"}):h?o.jsx(h.Icon,{size:16}):null}),o.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:p.title}),o.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-sm text-muted-foreground",children:[x.kind!=="mention"&&x.mention&&o.jsx("span",{"aria-hidden":"true",children:o.jsx(W,{mention:x.mention})}),o.jsx("span",{className:"truncate",children:j})]}),g&&o.jsxs("span",{className:"hidden max-w-48 shrink-0 items-center gap-1.5 text-xs text-muted-foreground md:flex",children:[o.jsx(Se,{icon:g.icon,name:g.title}),o.jsx("span",{className:"truncate",children:g.title})]})]},p.id)})})]}),e[0]=n,e[1]=l,e[2]=i,e[3]=c,e[4]=s,e[5]=a,e[6]=r}else r=e[6];return r}function We(t){if(t<=0)return 1;const e=10**Math.floor(Math.log10(t));for(const a of[1,2,2.5,5,10])if(a*e>=t)return a*e;return 10*e}const Ve=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function U(t){const e=A.c(52),{series:a,start:s,format:l,label:n,averageLabel:i}=t,c=We(Math.max(...a,0));let r;e[0]!==a?(r=a.length===0?0:a.reduce(et,0)/a.length,e[0]=a,e[1]=r):r=e[1];const m=r;let d;if(e[2]!==a||e[3]!==s){let E;e[5]!==s?(E=(te,se)=>({day:Ve.format(new Date(s.getTime()+se*864e5)),value:te}),e[5]=s,e[6]=E):E=e[6],d=a.map(E),e[2]=a,e[3]=s,e[4]=d}else d=e[4];const f=d,u=Math.max(f.length-1,0),x=f[0]?.day;let p;e[7]!==u||e[8]!==f?(p=f[Math.round(u/2)]?.day,e[7]=u,e[8]=f,e[9]=p):p=e[9];const g=f[u]?.day;let h;e[10]!==x||e[11]!==p||e[12]!==g?(h=[x,p,g].filter(Ze),e[10]=x,e[11]=p,e[12]=g,e[13]=h):h=e[13];const j=h;let v;e[14]!==n?(v={value:{label:n,color:"var(--chart-1)"}},e[14]=n,e[15]=v):v=e[15];const z=v;let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_={top:8,right:0,bottom:0,left:0},e[16]=_):_=e[16];let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Le,{vertical:!1,strokeDasharray:"4 4",stroke:"var(--border)"}),e[17]=S):S=e[17];let $,R;e[18]===Symbol.for("react.memo_cache_sentinel")?($={stroke:"var(--border)"},R={fontSize:12,fill:"var(--muted-foreground)"},e[18]=$,e[19]=R):($=e[18],R=e[19]);let b;e[20]!==j?(b=o.jsx(Be,{dataKey:"day",ticks:j,interval:"preserveStartEnd",tickLine:!1,axisLine:$,tick:R,tickMargin:8}),e[20]=j,e[21]=b):b=e[21];let I;e[22]!==c?(I=[0,c],e[22]=c,e[23]=I):I=e[23];const T=c/2;let w;e[24]!==c||e[25]!==T?(w=[0,T,c],e[24]=c,e[25]=T,e[26]=w):w=e[26];let y;e[27]!==l?(y=E=>E===0?"0":l(E),e[27]=l,e[28]=y):y=e[28];let M;e[29]===Symbol.for("react.memo_cache_sentinel")?(M={fontSize:12,fill:"var(--muted-foreground)"},e[29]=M):M=e[29];let N;e[30]!==I||e[31]!==w||e[32]!==y?(N=o.jsx(Ke,{orientation:"right",domain:I,ticks:w,tickFormatter:y,tickLine:!1,axisLine:!1,tick:M,width:44}),e[30]=I,e[31]=w,e[32]=y,e[33]=N):N=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C={fill:"var(--muted)",opacity:.6},e[34]=C):C=e[34];let k;e[35]!==l||e[36]!==n?(k=o.jsx(be,{cursor:C,content:o.jsx(we,{indicator:"line",formatter:E=>o.jsxs("div",{className:"flex flex-1 items-center justify-between gap-3 leading-none",children:[o.jsx("span",{className:"text-muted-foreground",children:n}),o.jsx("span",{className:"font-medium text-foreground tabular-nums",children:l(Number(E))})]})})}),e[35]=l,e[36]=n,e[37]=k):k=e[37];let D;e[38]!==m||e[39]!==i||e[40]!==l?(D=m>0&&o.jsx(De,{y:m,stroke:"var(--foreground)",strokeOpacity:.6,strokeDasharray:"2 2",label:{value:i(l(m)),position:"insideBottomLeft",fontSize:12,fill:"var(--foreground)"}}),e[38]=m,e[39]=i,e[40]=l,e[41]=D):D=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx(ye,{dataKey:"value",fill:"var(--color-value)",radius:[2,2,0,0],maxBarSize:4,animationDuration:300}),e[42]=O):O=e[42];let L;e[43]!==f||e[44]!==b||e[45]!==N||e[46]!==k||e[47]!==D?(L=o.jsxs(Ne,{data:f,margin:_,barCategoryGap:"30%",children:[S,b,N,k,D,O]}),e[43]=f,e[44]=b,e[45]=N,e[46]=k,e[47]=D,e[48]=L):L=e[48];let Y;return e[49]!==z||e[50]!==L?(Y=o.jsx(_e,{config:z,className:"aspect-auto h-[159px] w-full",children:L}),e[49]=z,e[50]=L,e[51]=Y):Y=e[51],Y}function Ze(t){return!!t}function et(t,e){return t+e}function H(t){const e=A.c(10),{label:a,value:s,chart:l}=t;let n;e[0]!==a?(n=o.jsx("span",{className:"text-sm font-medium text-foreground",children:a}),e[0]=a,e[1]=n):n=e[1];let i;e[2]!==s?(i=o.jsx("span",{className:"text-[32px] leading-none font-medium tracking-tight tabular-nums text-foreground",children:s}),e[2]=s,e[3]=i):i=e[3];let c;e[4]!==n||e[5]!==i?(c=o.jsxs("div",{className:"flex flex-col gap-2.5",children:[n,i]}),e[4]=n,e[5]=i,e[6]=c):c=e[6];let r;return e[7]!==l||e[8]!==c?(r=o.jsxs("section",{className:"flex flex-col gap-6 surface p-5",children:[c,l]}),e[7]=l,e[8]=c,e[9]=r):r=e[9],r}function Ct(t){const e=A.c(58),{tasks:a}=t,s=B();let l,n,i,c,r,m,d,f,u;if(e[0]!==s||e[1]!==a){const j=Ee(a,F),v=Ae(a,F);i=Me(a);const z=st;let _,S;if(e[11]===Symbol.for("react.memo_cache_sentinel")){const k=new Date;S=new Date(k.getFullYear(),k.getMonth(),k.getDate()-(F-1)),_=new Date(k.getFullYear(),k.getMonth(),1),e[11]=_,e[12]=S}else _=e[11],S=e[12];c=_;const $=tt;let R;e[13]!==s?(R=k=>s("home.overview.average",{value:k}),e[13]=s,e[14]=R):R=e[14],n=R,d="grid gap-4 md:grid-cols-3";let b;e[15]!==s?(b=s("home.overview.delivered"),e[15]=s,e[16]=b):b=e[16];const I=String(z(j));let T;e[17]!==s?(T=s("home.overview.delivered"),e[17]=s,e[18]=T):T=e[18];let w;e[19]!==n||e[20]!==j||e[21]!==T?(w=o.jsx(U,{label:T,series:j,start:S,format:$,averageLabel:n}),e[19]=n,e[20]=j,e[21]=T,e[22]=w):w=e[22],e[23]!==w||e[24]!==b||e[25]!==I?(f=o.jsx(H,{label:b,value:I,chart:w}),e[23]=w,e[24]=b,e[25]=I,e[26]=f):f=e[26];let y;e[27]!==s?(y=s("home.overview.agentRuns"),e[27]=s,e[28]=y):y=e[28];const M=String(z(v));let N;e[29]!==s?(N=s("home.overview.agentRuns"),e[29]=s,e[30]=N):N=e[30];let C;e[31]!==n||e[32]!==v||e[33]!==N?(C=o.jsx(U,{label:N,series:v,start:S,format:$,averageLabel:n}),e[31]=n,e[32]=v,e[33]=N,e[34]=C):C=e[34],e[35]!==y||e[36]!==M||e[37]!==C?(u=o.jsx(H,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=u):u=e[38],l=H,e[39]!==s?(r=s("home.overview.agentCost"),e[39]=s,e[40]=r):r=e[40],m=G(z(i)),e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r,e[7]=m,e[8]=d,e[9]=f,e[10]=u}else l=e[2],n=e[3],i=e[4],c=e[5],r=e[6],m=e[7],d=e[8],f=e[9],u=e[10];let x;e[41]!==s?(x=s("home.overview.agentCost"),e[41]=s,e[42]=x):x=e[42];let p;e[43]!==n||e[44]!==i||e[45]!==c||e[46]!==x?(p=o.jsx(U,{label:x,series:i,start:c,format:G,averageLabel:n}),e[43]=n,e[44]=i,e[45]=c,e[46]=x,e[47]=p):p=e[47];let g;e[48]!==l||e[49]!==r||e[50]!==m||e[51]!==p?(g=o.jsx(l,{label:r,value:m,chart:p}),e[48]=l,e[49]=r,e[50]=m,e[51]=p,e[52]=g):g=e[52];let h;return e[53]!==d||e[54]!==f||e[55]!==u||e[56]!==g?(h=o.jsxs("div",{className:d,children:[f,u,g]}),e[53]=d,e[54]=f,e[55]=u,e[56]=g,e[57]=h):h=e[57],h}function tt(t){return String(Math.round(t*10)/10)}function st(t){return t.reduce(nt,0)}function nt(t,e){return t+e}export{yt as C,St as F,Ct as M,_t as R,wt as a,Nt as u};
@@ -1 +1 @@
1
- import{fY as T,eB as q,fZ as W,c as Y,r as J,fO as P,fP as S,fU as K,fQ as N,K as F,fR as Z,fT as z,fS as G,fM as R}from"./index-Ds-qTNYO.js";import{ax as X,au as x,aF as ee,av as te,aw as C,aJ as ne,ay as re,aA as se}from"./site-editor-toast-DnCbjslY.js";import{a5 as V,ak as oe,a8 as ie,a4 as ae}from"./blocks-tab-states-kdA6RJ4z.js";async function ce(e,t){return e.inDraft?e.value===void 0?q:W(e.value):await T(null,e.value,t)??null}class Ce{constructor(t){this.now=t,this.loaded=t()}now;copies=new Map;generations=new Map;loaded;settle(){this.loaded||(this.loaded=this.now())}get(t){const n=this.copies.get(t);if(n)return n;if(this.loaded)return{value:this.loaded.blocks[t],inDraft:this.loaded.versionOf(t)!==null}}generation(t){return this.generations.get(t)??0}edited(t){return{generation:this.generation(t),copy:this.get(t)}}guardOf(t,n){return n&&n.generation!==this.generation(t)?n.copy:this.get(t)}hold(t){this.generations.set(t,this.generation(t)+1);const n=this.now();!n||!Object.hasOwn(n.blocks,t)||this.copies.set(t,{value:n.blocks[t],inDraft:n.versionOf(t)!==null})}saved(t,n){this.copies.set(t,{value:n,inDraft:!0})}}const g=new Map,k=new Set,E=new Map;function ke(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Ee(e,t){const n=new Map(g.get(e)??E);n.set(t,(n.get(t)??0)+1),g.set(e,n);for(const s of k)s()}function le(e){return k.add(e),()=>k.delete(e)}const A=new WeakMap;function fe(e){let t=A.get(e);return t||(t=n=>e.get(n)??0,A.set(e,t)),t}function De(e){const t=Y.c(5);let n,s;t[0]!==e?(n=()=>g.get(e)??E,s=()=>g.get(e)??E,t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);const r=J.useSyncExternalStore(le,n,s);let o;return t[3]!==r?(o=fe(r),t[3]=r,t[4]=o):o=t[4],o}class p extends Error{constructor(t){super("kept their version"),this.deleted=t,this.name="HostedKeptTheirsError"}deleted}const ue=3;function de(e,t,n,s){const r={},o={},i={};for(const a of e)t&&Object.hasOwn(t,a)&&(r[a]=t[a]),Object.hasOwn(n.writes,a)&&(o[a]=n.writes[a]),Object.hasOwn(s,a)&&(i[a]=s[a]);return Z({ancestor:r,mine:o,theirs:i})}function he(e,t,n){const s={},r=[];for(const o of e){const i=t[o];$(i)?s[o]=i:Object.hasOwn(n,o)&&r.push(o)}return{writes:s,deletes:r}}function we(e,t){for(const[n,s]of Object.entries(e.writes))if(!Object.hasOwn(t,n)||R(t[n])!==R(s))return!1;return e.deletes.every(n=>!Object.hasOwn(t,n))}function Oe(e,t){if(!$(t))return null;if(V(e,t))return oe(t);const n=typeof t.name=="string"?t.name.trim():"";return n&&n!==e?n:I(e)}function I(e){const t=V(e);if(t)return ie(t);const n=e.split("/").pop()??e;return ae(n).trim()||n}function Q(e,...t){for(const n of t){const s=Oe(e,n);if(s)return s}return I(e)}function B(e,t,n){return Object.keys(e.writes).some(r=>!t||!Object.hasOwn(t,r))?e.deletes.filter(r=>!Object.hasOwn(e.writes,r)&&n(r)):[]}async function H(e,t,n){const s=Object.keys(e.writes).filter(i=>!t||!Object.hasOwn(t,i)).map(i=>e.writes[i]),r=n[0];if(await N({kind:"theyDeleted",label:Q(r,t?.[r],...s)})==="theirs")throw new p(!0);return{writes:e.writes,deletes:e.deletes.filter(i=>!n.includes(i))}}function _(e){if(e.pointers.length!==1)return null;const t=e.pointers[0],n=t.split("/");if(n.length!==2)return null;const s=n[1].replaceAll("~1","/").replaceAll("~0","~"),r=e.mine[s],o=e.theirs[s];return r===void 0==(o===void 0)?null:{pointer:t,conflict:{kind:o===void 0?"theyDeleted":"youDeleted",label:Q(s,r,o,e.ancestor[s])}}}async function pe(e,t,n,s){const r=_(e);if(r)return{[r.pointer]:await N(r.conflict)};const o=z(e,t);return G(e,s?o.map(s):o,n?.author?{...n,author:{...n.author,keyed:!0}}:n)}function Me(e){const t=e.split("/")[1];return t?t.replaceAll("~1","/").replaceAll("~0","~"):null}function ge(e){const t=Object.values(e);return t.length>0&&t.every(n=>n==="theirs")}async function ve(e,t,n){const s=o=>se(e.queryClient,e.cacheKey,o,e.backend);if(t.some(o=>s(o)===void 0))try{await te(e.queryClient,e.backend,e.params,e.cacheKey)}catch{throw new C}const r={};for(const o of t){const i=s(o);if(i===void 0)throw new C;const a=n&&Object.hasOwn(n,o)?await T(i,n[o],P(e.queryClient,e.cacheKey,o)):i;if(a===void 0)throw new C;r[o]=a}return r}async function me(e,t,n,s){if(s&&w(e,t,r=>Object.hasOwn(s,r)?{value:s[r]}:null),!ne(e.queryClient,e.backend,e.cacheKey,n))for(const r of t)await re(e.queryClient,e.backend,e.params,e.cacheKey,r,n);return e.queryClient.getQueryData(F.decofile(e.cacheKey))??{}}async function Se(e,t,n,s){let r=t;const o=s?Object.keys(s):[];let i=o.length===0?n:{...n,...Object.fromEntries(o.map(a=>[a,s[a].value]))};for(let a=0;;a++){const v=r.deletes.filter(l=>!Object.hasOwn(r.writes,l)),d=[...Object.keys(r.writes),...v],O=await ve(e,d,a===0?i:void 0);if(a===0)for(const l of o)Object.hasOwn(O,l)&&(O[l]=await ce(s[l],P(e.queryClient,e.cacheKey,l)));const m=B(r,i,l=>O[l]===q);if(m.length>0){try{if(!S())throw new p(!0);r=await H(r,i,m)}catch(l){throw w(e,d,c=>m.includes(c)||!i||!Object.hasOwn(i,c)?null:{value:i[c]}),l}continue}try{const l=await X(e.queryClient,e.backend,e.params,e.cacheKey,{set:r.writes,...v.length>0?{delete:v}:{}},O);return w(e,d,c=>Object.hasOwn(r.writes,c)?{value:r.writes[c]}:null),{...l,change:r}}catch(l){if(!x(l))throw l;const c=await me(e,d,l,i);if(a+1>=ue)throw new ee;if(!S())throw l;const D=Object.keys(r.writes).filter(u=>!i||!Object.hasOwn(i,u)),L=r;w(e,D,u=>({value:L.writes[u]}));const M=()=>w(e,D,u=>Object.hasOwn(c,u)?{value:c[u]}:null);try{const u=B(r,i,f=>!!i&&Object.hasOwn(i,f)&&!Object.hasOwn(c,f));if(u.length>0){r=await H(r,i,u),i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]));continue}const h=de(d,i,r,c),b=h.pointers.length===0?{}:await pe(h),y=_(h);if(y&&b[y.pointer]==="theirs")throw new p(y.conflict.kind==="theyDeleted");const U=h.pointers.length===0?h.merged:K(h,b),j=he(d,U,c);if(we(j,c)){if(ge(b))throw new p(d.some(f=>!Object.hasOwn(c,f)));return M(),{revision:"",versions:{},change:j}}r=j,i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]))}catch(u){throw M(),u}}}}function w(e,t,n){e.queryClient.setQueryData(F.decofile(e.cacheKey),s=>{if(!s)return s;const r={...s};for(const o of t){const i=n(o);i?r[o]=i.value:delete r[o]}return r})}function $(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}export{p as H,ve as a,Ee as b,ke as c,ue as d,Q as e,ge as f,Ce as g,ce as h,Se as i,pe as j,Me as k,he as l,we as m,de as p,De as u};
1
+ import{fY as T,eB as q,fZ as W,c as Y,r as J,fO as P,fP as S,fU as K,fQ as N,K as F,fR as Z,fT as z,fS as G,fM as R}from"./index-Dwd1G4Vx.js";import{ax as X,au as x,aF as ee,av as te,aw as C,aJ as ne,ay as re,aA as se}from"./site-editor-toast-Df6Kxfe9.js";import{a5 as V,ak as oe,a8 as ie,a4 as ae}from"./blocks-tab-states-CGtw7dij.js";async function ce(e,t){return e.inDraft?e.value===void 0?q:W(e.value):await T(null,e.value,t)??null}class Ce{constructor(t){this.now=t,this.loaded=t()}now;copies=new Map;generations=new Map;loaded;settle(){this.loaded||(this.loaded=this.now())}get(t){const n=this.copies.get(t);if(n)return n;if(this.loaded)return{value:this.loaded.blocks[t],inDraft:this.loaded.versionOf(t)!==null}}generation(t){return this.generations.get(t)??0}edited(t){return{generation:this.generation(t),copy:this.get(t)}}guardOf(t,n){return n&&n.generation!==this.generation(t)?n.copy:this.get(t)}hold(t){this.generations.set(t,this.generation(t)+1);const n=this.now();!n||!Object.hasOwn(n.blocks,t)||this.copies.set(t,{value:n.blocks[t],inDraft:n.versionOf(t)!==null})}saved(t,n){this.copies.set(t,{value:n,inDraft:!0})}}const g=new Map,k=new Set,E=new Map;function ke(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Ee(e,t){const n=new Map(g.get(e)??E);n.set(t,(n.get(t)??0)+1),g.set(e,n);for(const s of k)s()}function le(e){return k.add(e),()=>k.delete(e)}const A=new WeakMap;function fe(e){let t=A.get(e);return t||(t=n=>e.get(n)??0,A.set(e,t)),t}function De(e){const t=Y.c(5);let n,s;t[0]!==e?(n=()=>g.get(e)??E,s=()=>g.get(e)??E,t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);const r=J.useSyncExternalStore(le,n,s);let o;return t[3]!==r?(o=fe(r),t[3]=r,t[4]=o):o=t[4],o}class p extends Error{constructor(t){super("kept their version"),this.deleted=t,this.name="HostedKeptTheirsError"}deleted}const ue=3;function de(e,t,n,s){const r={},o={},i={};for(const a of e)t&&Object.hasOwn(t,a)&&(r[a]=t[a]),Object.hasOwn(n.writes,a)&&(o[a]=n.writes[a]),Object.hasOwn(s,a)&&(i[a]=s[a]);return Z({ancestor:r,mine:o,theirs:i})}function he(e,t,n){const s={},r=[];for(const o of e){const i=t[o];$(i)?s[o]=i:Object.hasOwn(n,o)&&r.push(o)}return{writes:s,deletes:r}}function we(e,t){for(const[n,s]of Object.entries(e.writes))if(!Object.hasOwn(t,n)||R(t[n])!==R(s))return!1;return e.deletes.every(n=>!Object.hasOwn(t,n))}function Oe(e,t){if(!$(t))return null;if(V(e,t))return oe(t);const n=typeof t.name=="string"?t.name.trim():"";return n&&n!==e?n:I(e)}function I(e){const t=V(e);if(t)return ie(t);const n=e.split("/").pop()??e;return ae(n).trim()||n}function Q(e,...t){for(const n of t){const s=Oe(e,n);if(s)return s}return I(e)}function B(e,t,n){return Object.keys(e.writes).some(r=>!t||!Object.hasOwn(t,r))?e.deletes.filter(r=>!Object.hasOwn(e.writes,r)&&n(r)):[]}async function H(e,t,n){const s=Object.keys(e.writes).filter(i=>!t||!Object.hasOwn(t,i)).map(i=>e.writes[i]),r=n[0];if(await N({kind:"theyDeleted",label:Q(r,t?.[r],...s)})==="theirs")throw new p(!0);return{writes:e.writes,deletes:e.deletes.filter(i=>!n.includes(i))}}function _(e){if(e.pointers.length!==1)return null;const t=e.pointers[0],n=t.split("/");if(n.length!==2)return null;const s=n[1].replaceAll("~1","/").replaceAll("~0","~"),r=e.mine[s],o=e.theirs[s];return r===void 0==(o===void 0)?null:{pointer:t,conflict:{kind:o===void 0?"theyDeleted":"youDeleted",label:Q(s,r,o,e.ancestor[s])}}}async function pe(e,t,n,s){const r=_(e);if(r)return{[r.pointer]:await N(r.conflict)};const o=z(e,t);return G(e,s?o.map(s):o,n?.author?{...n,author:{...n.author,keyed:!0}}:n)}function Me(e){const t=e.split("/")[1];return t?t.replaceAll("~1","/").replaceAll("~0","~"):null}function ge(e){const t=Object.values(e);return t.length>0&&t.every(n=>n==="theirs")}async function ve(e,t,n){const s=o=>se(e.queryClient,e.cacheKey,o,e.backend);if(t.some(o=>s(o)===void 0))try{await te(e.queryClient,e.backend,e.params,e.cacheKey)}catch{throw new C}const r={};for(const o of t){const i=s(o);if(i===void 0)throw new C;const a=n&&Object.hasOwn(n,o)?await T(i,n[o],P(e.queryClient,e.cacheKey,o)):i;if(a===void 0)throw new C;r[o]=a}return r}async function me(e,t,n,s){if(s&&w(e,t,r=>Object.hasOwn(s,r)?{value:s[r]}:null),!ne(e.queryClient,e.backend,e.cacheKey,n))for(const r of t)await re(e.queryClient,e.backend,e.params,e.cacheKey,r,n);return e.queryClient.getQueryData(F.decofile(e.cacheKey))??{}}async function Se(e,t,n,s){let r=t;const o=s?Object.keys(s):[];let i=o.length===0?n:{...n,...Object.fromEntries(o.map(a=>[a,s[a].value]))};for(let a=0;;a++){const v=r.deletes.filter(l=>!Object.hasOwn(r.writes,l)),d=[...Object.keys(r.writes),...v],O=await ve(e,d,a===0?i:void 0);if(a===0)for(const l of o)Object.hasOwn(O,l)&&(O[l]=await ce(s[l],P(e.queryClient,e.cacheKey,l)));const m=B(r,i,l=>O[l]===q);if(m.length>0){try{if(!S())throw new p(!0);r=await H(r,i,m)}catch(l){throw w(e,d,c=>m.includes(c)||!i||!Object.hasOwn(i,c)?null:{value:i[c]}),l}continue}try{const l=await X(e.queryClient,e.backend,e.params,e.cacheKey,{set:r.writes,...v.length>0?{delete:v}:{}},O);return w(e,d,c=>Object.hasOwn(r.writes,c)?{value:r.writes[c]}:null),{...l,change:r}}catch(l){if(!x(l))throw l;const c=await me(e,d,l,i);if(a+1>=ue)throw new ee;if(!S())throw l;const D=Object.keys(r.writes).filter(u=>!i||!Object.hasOwn(i,u)),L=r;w(e,D,u=>({value:L.writes[u]}));const M=()=>w(e,D,u=>Object.hasOwn(c,u)?{value:c[u]}:null);try{const u=B(r,i,f=>!!i&&Object.hasOwn(i,f)&&!Object.hasOwn(c,f));if(u.length>0){r=await H(r,i,u),i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]));continue}const h=de(d,i,r,c),b=h.pointers.length===0?{}:await pe(h),y=_(h);if(y&&b[y.pointer]==="theirs")throw new p(y.conflict.kind==="theyDeleted");const U=h.pointers.length===0?h.merged:K(h,b),j=he(d,U,c);if(we(j,c)){if(ge(b))throw new p(d.some(f=>!Object.hasOwn(c,f)));return M(),{revision:"",versions:{},change:j}}r=j,i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]))}catch(u){throw M(),u}}}}function w(e,t,n){e.queryClient.setQueryData(F.decofile(e.cacheKey),s=>{if(!s)return s;const r={...s};for(const o of t){const i=n(o);i?r[o]=i.value:delete r[o]}return r})}function $(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}export{p as H,ve as a,Ee as b,ke as c,ue as d,Q as e,ge as f,Ce as g,ce as h,Se as i,pe as j,Me as k,he as l,we as m,de as p,De as u};
@@ -1 +1 @@
1
- import{c as f,j as p,B as h}from"./index-Ds-qTNYO.js";import{T as j,a as v,c as T}from"./tooltip-Bqmntxnq.js";function B(d){const t=f.c(19);let e,o,i,n,r,a;t[0]!==d?({label:o,tooltipSide:n,variant:r,size:a,children:e,...i}=d,t[0]=d,t[1]=e,t[2]=o,t[3]=i,t[4]=n,t[5]=r,t[6]=a):(e=t[1],o=t[2],i=t[3],n=t[4],r=t[5],a=t[6]);const m=n===void 0?"top":n,u=r===void 0?"ghost":r,x=a===void 0?"icon-sm":a;let s;t[7]!==e||t[8]!==o||t[9]!==i||t[10]!==x||t[11]!==u?(s=p.jsx(j,{asChild:!0,children:p.jsx(h,{"data-slot":"icon-button","aria-label":o,variant:u,size:x,...i,children:e})}),t[7]=e,t[8]=o,t[9]=i,t[10]=x,t[11]=u,t[12]=s):s=t[12];let l;t[13]!==o||t[14]!==m?(l=p.jsx(v,{side:m,children:o}),t[13]=o,t[14]=m,t[15]=l):l=t[15];let c;return t[16]!==s||t[17]!==l?(c=p.jsxs(T,{children:[s,l]}),t[16]=s,t[17]=l,t[18]=c):c=t[18],c}export{B as I};
1
+ import{c as f,j as p,B as h}from"./index-Dwd1G4Vx.js";import{T as j,a as v,c as T}from"./tooltip-CvVfagmL.js";function B(d){const t=f.c(19);let e,o,i,n,r,a;t[0]!==d?({label:o,tooltipSide:n,variant:r,size:a,children:e,...i}=d,t[0]=d,t[1]=e,t[2]=o,t[3]=i,t[4]=n,t[5]=r,t[6]=a):(e=t[1],o=t[2],i=t[3],n=t[4],r=t[5],a=t[6]);const m=n===void 0?"top":n,u=r===void 0?"ghost":r,x=a===void 0?"icon-sm":a;let s;t[7]!==e||t[8]!==o||t[9]!==i||t[10]!==x||t[11]!==u?(s=p.jsx(j,{asChild:!0,children:p.jsx(h,{"data-slot":"icon-button","aria-label":o,variant:u,size:x,...i,children:e})}),t[7]=e,t[8]=o,t[9]=i,t[10]=x,t[11]=u,t[12]=s):s=t[12];let l;t[13]!==o||t[14]!==m?(l=p.jsx(v,{side:m,children:o}),t[13]=o,t[14]=m,t[15]=l):l=t[15];let c;return t[16]!==s||t[17]!==l?(c=p.jsxs(T,{children:[s,l]}),t[16]=s,t[17]=l,t[18]=c):c=t[18],c}export{B as I};
@@ -1,4 +1,4 @@
1
- import{c as ue,r as xe,d as ns,a6 as ht,b as _e,j as t,B as je,t as dt,aY as Yt,am as as,K as bt,i as Et,a7 as As,m as ot,gH as _s,o as cs,h as Us,e0 as Ks,ad as Vs,u as qs,n as _t,E as Wt,R as Hs,dW as Bs,hh as Js,T as Gs,W as Qs,I as Xt}from"./index-Ds-qTNYO.js";import{S as Ys}from"./search-input-D9xDOrgF.js";import{E as Ht}from"./empty-state-ChWzd37z.js";import{R as Ws}from"./require-capability-C-47XBvS.js";import{f as js}from"./pair-DcdtppQp.js";import{b as ts}from"./use-connection-DTr7HsdN.js";import{g as Ps}from"./connection-slug-Bse2tT5A.js";import{B as Lt}from"./badge-Bt2wemt2.js";import{P as ds,a as ms,b as us}from"./popover-C5pxC1w-.js";import{c as Pt,T as Dt,a as Rt,b as Xs}from"./tooltip-Bqmntxnq.js";import{B as fs,e as Kt,bA as Zs,aw as Ns,L as el}from"./agent-icon-C4ES7Kxt.js";import{i as tl}from"./Key01-BFV7zbSI.js";import{i as sl}from"./Play-DrgmXhZN.js";import{MonacoCodeEditor as bs}from"./monaco-editor-DJxI9s-7.js";import{u as ll}from"./use-mcp-client--TOHcD4E.js";import{u as rl}from"./repository-binding-DFFJA38E.js";import{n as Ot}from"./LinkBroken01-BrAFlEge.js";import{c as il}from"./SwitchHorizontal01-CroZeibd.js";import{s as ol}from"./Plus-BOy--mLV.js";import{s as nl}from"./Trash01-AgFkfTH1.js";import{M as $t}from"./multi-select-lj0ZzSLo.js";import{b as yt,a as wt,c as $e,d as St,S as It}from"./select-CTM3NCiB.js";import{e as ys,T as al}from"./time-range-picker-kZqo7kkc.js";import{T as cl}from"./textarea-Ds05hJCZ.js";import{C as Ds}from"./collection-tabs-DBV0CA1j.js";import{S as dl}from"./switch-BjltmdeW.js";import{L as ml}from"./label-BtZ5pCPj.js";import{I as Ct}from"./integration-icon-S6KSerjv.js";import{A as ul,a as fl,b as xl}from"./alert-C9ELUw9h.js";import{K as gt}from"./monitoring-stats-row-Dv-rkDRb.js";import{b as Bt}from"./use-entitlements-BFCkglve.js";import{g as pl,b as ws,f as Nt,c as Zt,d as gl,e as Ss,a as xs,h as hl,i as ps,T as vl,j as jl,r as Nl,k as bl}from"./thread-sheet-body-B6lw8Jpx.js";import{u as yl}from"./useSuspenseInfiniteQuery-bhrOozcI.js";import{c as wl,S as Sl,b as Rs,a as Ls}from"./sheet-Bl5X71Uk.js";import{c as De,b as vt,d as Jt,e as Gt,T as he,a as Qt}from"./table-Dfyxf02Y.js";import{t as ss}from"./ChevronDown-AhK2umcE.js";import{n as ls}from"./ChevronUp-CsP_ILbF.js";import{u as Os}from"./use-id-selection-Ddc02WQv.js";import{u as Fs}from"./use-infinite-scroll-CwrMEhd6.js";import{u as Il}from"./useInfiniteQuery-CsWuXCkN.js";import{g as Cl}from"./task-status-CsBMzT3o.js";import{u as Tl,d as kl}from"./use-automations-CnEpk2rm.js";import{A as Ml}from"./automation-runs-A5Z6F3sq.js";import{i as _l}from"./ArrowLeft-DmJguptr.js";import{E as Is}from"./empty-state-vr86BCX-.js";import{O as zs}from"./watch-sse-pool-BIbbV9kx.js";import{b as Pl,r as Dl,O as Rl,e as Ll}from"./order-monitor-day-B89vXW-k.js";import{F as Ol}from"./feature-gate-Nx4UAujE.js";import"./SearchMd-CUiS3-jY.js";import"./access-gate-Ctr3VUps.js";import"./capability-load-error-CCEkEyvk.js";import"./Tool01-CvwNlUtp.js";import"./ArrowRight-CqqTatmK.js";import"./collapsible-C-4EHi01.js";import"./use-copy-Cjf6ljKb.js";import"./usage-stats-bhxfI8nR.js";import"./utils-CVEq3hMx.js";import"./markdown-CvFBis_P.js";import"./chat-context-BBaFY4u8.js";import"./use-panel-navigate-CibtHq9U.js";import"./thread-route-Czas0Ahc.js";import"./use-project-scope-C5ltOcNu.js";import"./use-view-draft-kind-CyKK_7hM.js";import"./use-blog-view-BMLiqqRx.js";import"./use-organization-settings-CeHEHcCT.js";import"./schema-Hqvmwy-B.js";import"./task-board-bjQ27wf0.js";import"./thread-intent-BUfn00qh.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./session-runtime-DOdOYILQ.js";import"./use-ai-providers-X8UPV0jM.js";import"./use-current-view-nHeE_Oxf.js";import"./use-in-settings-DZVM6ZxX.js";import"./use-decopilot-events-CXTF0es-.js";import"./use-org-fs-BQarrV3d.js";import"./use-mobile-C5cF3CsA.js";import"./File02-MzjSapJn.js";import"./gateway-client-ChEmLA24.js";import"./form-B1Aa30Zl.js";import"./UserCheck01-DujPU17i.js";import"./task-key-Cdn6Qwo0.js";import"./use-task-board-items-Cr__Mhsd.js";import"./config-BQIBahe7.js";import"./AlertCircle-Dj1nLpeQ.js";import"./CheckCircle-DLlDtZcO.js";import"./Eye-2mlcak3o.js";import"./task-route-DR-DR1t5.js";import"./project-index-DiWeUbXu.js";import"./UserSquare-BQrpG0j5.js";import"./shell-layout-xIizU4HL.js";import"./Globe04-D_x1u0wl.js";import"./use-deployment-admin-CHWqm3yj.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-CImZkJqv.js";import"./use-org-notice-DPIYD1qV.js";import"./Monitor01-C07iTkt5.js";import"./Zap-C66hTZO-.js";import"./command-By13hzA4.js";import"./index-DSkOzE10.js";import"./project-icon-Bmnukyue.js";import"./use-navigate-to-agent-DcG9XPYG.js";import"./use-debounced-value-CtruecKk.js";import"./new-project-dialog-DZ44gqvX.js";import"./repository-picker-txpRHcwi.js";import"./github-icon-BHoWZzHA.js";import"./collection-search-B3SxTnpS.js";import"./BookOpen01-D_X9oQA_.js";import"./ShoppingBag01-BKR90dDm.js";import"./new-project-store-CjS-rf0X.js";import"./legacy-admin-welcome-dialog-CBHgAMqd.js";import"./drawer-M8eIsqmT.js";import"./required-auth-layout-AEPHH9so.js";import"./use-org-sso-C1dDt4bm.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Bx0lKBK4.js";import"./types-Bt_wph1s.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./Image01-GkJc93Zv.js";import"./use-mcp-prompts-6a3IZkYE.js";import"./use-thread-outputs-Bjm2z7lV.js";import"./file-type-icon-P199V-QT.js";import"./index-CumGSGrn.js";import"./ArrowUp-C7Nj_q22.js";import"./ChevronSelectorVertical-D4kPqkF6.js";import"./CreditCard01-0W-8ixJb.js";import"./MessageCircle01-TFr7w4y2.js";import"./Fingerprint04-CxnXIcGK.js";import"./LayoutLeft-1eO49Ry-.js";import"./Minus-DxV34wXb.js";import"./Sun-D3TjGNFC.js";import"./Upload01-DcKwrYYS.js";import"./Users01-CwiCCaQY.js";import"./editor-rTloof2p.js";import"./auth-CQZBevHD.js";import"./checkbox-Det6_SEt.js";import"./index-BdQq_4o_.js";import"./scroll-area-DfnGGIdI.js";import"./calendar-DDhjB8p8.js";import"./chart-DBOQ-ncW.js";import"./CategoricalChart-ugqRZsTG.js";import"./index-Bpd9IQHj.js";import"./tooltipContext-BYPONkxu.js";import"./CartesianChart-BLi-kdGq.js";import"./AreaChart-CLN-25mh.js";import"./infiniteQueryObserver-c2XxJCzK.js";import"./useQueries-DxKE-Kwz.js";import"./ReferenceLine-ahck2GxW.js";import"./feature-paywall-DgfQg6cM.js";import"./plan-ladder-BVRDILy3.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Fl=["eq","contains","exists","in"];function zl(s){return Fl.includes(s)}function jt(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function $l(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),o=l?decodeURIComponent(l):"";if(o.trim())return{key:o,operator:i&&zl(i)?i:"eq",value:decodeURIComponent(m.join(":")||"")}}).filter(e=>e!==void 0)}function Vt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{c as ue,r as xe,d as ns,a6 as ht,b as _e,j as t,B as je,t as dt,aY as Yt,am as as,K as bt,i as Et,a7 as As,m as ot,gH as _s,o as cs,h as Us,e0 as Ks,ad as Vs,u as qs,n as _t,E as Wt,R as Hs,dW as Bs,hh as Js,T as Gs,W as Qs,I as Xt}from"./index-Dwd1G4Vx.js";import{S as Ys}from"./search-input-OzZKVSLE.js";import{E as Ht}from"./empty-state-Cdk0jQ6k.js";import{R as Ws}from"./require-capability-DQ_r4wtG.js";import{f as js}from"./pair-CvtifeqY.js";import{b as ts}from"./use-connection-B7WpypFb.js";import{g as Ps}from"./connection-slug-BrJ-0Gj-.js";import{B as Lt}from"./badge-DcNtdQVR.js";import{P as ds,a as ms,b as us}from"./popover-DVoEmukb.js";import{c as Pt,T as Dt,a as Rt,b as Xs}from"./tooltip-CvVfagmL.js";import{B as fs,e as Kt,bA as Zs,aw as Ns,L as el}from"./agent-icon-CfC0W4dx.js";import{i as tl}from"./Key01-DcRNW8u_.js";import{i as sl}from"./Play-LvYHhysf.js";import{MonacoCodeEditor as bs}from"./monaco-editor-Cr8jFNCg.js";import{u as ll}from"./use-mcp-client-CmpiHGcO.js";import{u as rl}from"./repository-binding-CMSQadKK.js";import{n as Ot}from"./LinkBroken01-CSLR7LRd.js";import{c as il}from"./SwitchHorizontal01-Bi1W2ShO.js";import{s as ol}from"./Plus-vYAM1FOk.js";import{s as nl}from"./Trash01-CQYiV3HH.js";import{M as $t}from"./multi-select-Cej093Z9.js";import{b as yt,a as wt,c as $e,d as St,S as It}from"./select-LVhKuHDN.js";import{e as ys,T as al}from"./time-range-picker-CQTGxt-p.js";import{T as cl}from"./textarea-CR5PTU5T.js";import{C as Ds}from"./collection-tabs-B-8iBMRa.js";import{S as dl}from"./switch-BDhLV3py.js";import{L as ml}from"./label-BUAx9KeM.js";import{I as Ct}from"./integration-icon-CDwVUuU6.js";import{A as ul,a as fl,b as xl}from"./alert-CBECFrdm.js";import{K as gt}from"./monitoring-stats-row-DrbtmIOu.js";import{b as Bt}from"./use-entitlements-DAkKf3N6.js";import{g as pl,b as ws,f as Nt,c as Zt,d as gl,e as Ss,a as xs,h as hl,i as ps,T as vl,j as jl,r as Nl,k as bl}from"./thread-sheet-body-Bcr0PQmj.js";import{u as yl}from"./useSuspenseInfiniteQuery-Dpm3fV_X.js";import{c as wl,S as Sl,b as Rs,a as Ls}from"./sheet-DKgQyvDB.js";import{c as De,b as vt,d as Jt,e as Gt,T as he,a as Qt}from"./table-BCIIR01S.js";import{t as ss}from"./ChevronDown-kJLMLWQt.js";import{n as ls}from"./ChevronUp-BwUSkgn_.js";import{u as Os}from"./use-id-selection-Dnmi9uZo.js";import{u as Fs}from"./use-infinite-scroll-D7XavDmy.js";import{u as Il}from"./useInfiniteQuery-BFVO4_Km.js";import{g as Cl}from"./task-status-hlLUk1-0.js";import{u as Tl,d as kl}from"./use-automations-DQtoKXnL.js";import{A as Ml}from"./automation-runs-2pl2hHM7.js";import{i as _l}from"./ArrowLeft-DG4fDVhc.js";import{E as Is}from"./empty-state-yL7wr7CT.js";import{O as zs}from"./watch-sse-pool-COP4NAhW.js";import{b as Pl,r as Dl,O as Rl,e as Ll}from"./order-monitor-day-AM6MON2s.js";import{F as Ol}from"./feature-gate-CRg-kM9u.js";import"./SearchMd-D63wQvdr.js";import"./access-gate-DuetUtR2.js";import"./capability-load-error-BYhrJ6W3.js";import"./Tool01-BkFRXcV-.js";import"./ArrowRight-zK93byA1.js";import"./collapsible-Cl00AddF.js";import"./use-copy-DTg3j6vt.js";import"./usage-stats-B8vQoGzD.js";import"./utils-CVEq3hMx.js";import"./markdown-BolIwd-E.js";import"./chat-context-CwFvOLKs.js";import"./use-panel-navigate-wLblz5k_.js";import"./thread-route-TGRhgQNy.js";import"./use-project-scope-BhQSClTn.js";import"./use-view-draft-kind-DO3ACMBf.js";import"./use-blog-view-DMdXcMqx.js";import"./use-organization-settings-Z97kIiyJ.js";import"./schema-DgzUQT8_.js";import"./task-board-D6ORoPlw.js";import"./thread-intent-CZaVmTg_.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./session-runtime-DqiVON4P.js";import"./use-ai-providers-Dlo6-odm.js";import"./use-current-view-DfvEKiBd.js";import"./use-in-settings-Cpepn6np.js";import"./use-decopilot-events-DBDyH8kF.js";import"./use-org-fs-C24WT7qs.js";import"./use-mobile-B-odn_6M.js";import"./File02-B2A02vx8.js";import"./gateway-client-DzolBOcM.js";import"./form-kGHKXG62.js";import"./UserCheck01-Df2WX3uc.js";import"./task-key-2qHmdB3_.js";import"./use-task-board-items-3N6HF4Kf.js";import"./config-R8s9dbvw.js";import"./AlertCircle-RTyXmO4S.js";import"./CheckCircle-Clv58VvB.js";import"./Eye-Cuu5foEV.js";import"./task-route-BAvFAOTn.js";import"./project-index-g8Mw58an.js";import"./UserSquare-DD4ifFen.js";import"./shell-layout-DGKpZcNh.js";import"./Globe04-CXm51HyO.js";import"./use-deployment-admin-L_tn0M0Y.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-CP7rsijJ.js";import"./use-org-notice-CoSSUTvu.js";import"./Monitor01-ts8IiTjn.js";import"./Zap-DEtHmWX1.js";import"./command-DZr2odLo.js";import"./index-DRP6T_T9.js";import"./project-icon-GWaal0RG.js";import"./use-navigate-to-agent-DjlUlml5.js";import"./use-debounced-value-DlIItvJB.js";import"./new-project-dialog-CzHBs73d.js";import"./repository-picker-N35zzCix.js";import"./github-icon-BKE2Zw7O.js";import"./collection-search-yOcmEgJr.js";import"./BookOpen01-BBApUhG2.js";import"./ShoppingBag01-CQHwvDI-.js";import"./new-project-store-kU6bg1Ts.js";import"./legacy-admin-welcome-dialog-OuqvJSNG.js";import"./drawer-mYqYBdCv.js";import"./required-auth-layout-TZMQr7bf.js";import"./use-org-sso-CdRVY-WO.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DOSYQmw3.js";import"./types-DT4hY0oq.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./Image01-DgYaWAoi.js";import"./use-mcp-prompts-Dmciokf4.js";import"./use-thread-outputs-BcfNbIow.js";import"./file-type-icon-DzIx-fos.js";import"./index-BCdrqI8k.js";import"./ArrowUp-D_1pjhTO.js";import"./ChevronSelectorVertical-CAB5uq58.js";import"./CreditCard01-CfyzfKuU.js";import"./MessageCircle01-CbkPSNEW.js";import"./Fingerprint04-CmYnXThy.js";import"./LayoutLeft-CNsHb_wL.js";import"./Minus-C39SzM_F.js";import"./Sun-BiK6_8bw.js";import"./Upload01-MD8ZOSRI.js";import"./Users01-n6lj9nvW.js";import"./editor-BGdnY1P3.js";import"./auth-5QneqHw1.js";import"./checkbox-Cp871DDi.js";import"./index-BdQq_4o_.js";import"./scroll-area-BXDulxhi.js";import"./calendar-7v0SWLxR.js";import"./chart-BwB2rZVg.js";import"./CategoricalChart-DZcOvY0I.js";import"./index-C6B9-dtF.js";import"./tooltipContext-DLoT9K7J.js";import"./CartesianChart-Dh6If1Rz.js";import"./AreaChart-B2bQb_eh.js";import"./infiniteQueryObserver-yySyT6qQ.js";import"./useQueries-By1JQP65.js";import"./ReferenceLine-DH397phd.js";import"./feature-paywall-FyLOI1QC.js";import"./plan-ladder-DtUZi1Cg.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Fl=["eq","contains","exists","in"];function zl(s){return Fl.includes(s)}function jt(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function $l(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),o=l?decodeURIComponent(l):"";if(o.trim())return{key:o,operator:i&&zl(i)?i:"eq",value:decodeURIComponent(m.join(":")||"")}}).filter(e=>e!==void 0)}function Vt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function Cs(s){return s.trim()?s.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...i]=e.split("=");return{key:l||"",operator:"eq",value:i.join("=")}}if(e.includes("~")){const[l,...i]=e.split("~");return{key:l||"",operator:"contains",value:i.join("~")}}if(e.includes("@")){const[l,...i]=e.split("@");return{key:l||"",operator:"in",value:i.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function El(s){const e={},l={},i=[],m={};for(const o of s)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(l[o.key]=`%${o.value}%`);break;case"exists":i.push(o.key);break;case"in":o.value&&(m[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:i.length>0?i:void 0,propertyInValues:Object.keys(m).length>0?m:void 0}}function Ts(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const i=l.length;return i<=rs.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:i}:{content:l.slice(0,rs.maxJsonRenderSize)+`
4
4
 
@@ -1 +1 @@
1
- import{r as i,j as t,c6 as o}from"./index-Ds-qTNYO.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var n=e;export{n as R,s as V};
1
+ import{r as i,j as t,c6 as o}from"./index-Dwd1G4Vx.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var n=e;export{n as R,s as V};
@@ -1 +1 @@
1
- import{r as s,c0 as L,c1 as B,j as c,g1 as q,c6 as y,c4 as b,g0 as K,c7 as E,g2 as _,e1 as T,ck as g,cd as U,co as V}from"./index-Ds-qTNYO.js";var I="Radio",[z,k]=g(I),[H,W]=z(I),w=s.forwardRef((t,d)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=b(d,x=>m(x)),u=s.useRef(!1),h=p?R||!!p.closest("form"):!0;return c.jsxs(H,{scope:o,checked:e,disabled:a,children:[c.jsx(y.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:E(t.onClick,x=>{e||f?.(),h&&(u.current=x.isPropagationStopped(),u.current||x.stopPropagation())})}),h&&c.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});w.displayName=I;var P="RadioIndicator",G=s.forwardRef((t,d)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(P,o);return c.jsx(T,{present:n||r.checked,children:c.jsx(y.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:d})})});G.displayName=P;var X="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:d,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=b(a,r),f=U(o),R=V(d);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),c.jsx(y.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=X;function A(t){return t?"checked":"unchecked"}var Y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[J]=g(C,[_,k]),j=_(),N=k(),[Q,Z]=J(C),D=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=L(R),[h,x]=B({prop:r,defaultProp:e??null,onChange:p,caller:C});return c.jsx(Q,{scope:o,name:n,required:a,disabled:l,value:h,onValueChange:x,children:c.jsx(q,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:c.jsx(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:d})})})});D.displayName=C;var M="RadioGroupItem",O=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=b(d,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=h=>{Y.includes(h.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),c.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:c.jsx(w,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:E(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:E(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return c.jsx(G,{...e,...n,ref:d})});F.displayName=$;var oe=D,re=O,te=F;export{re as I,oe as R,te as a};
1
+ import{r as s,c0 as L,c1 as B,j as c,g1 as q,c6 as y,c4 as b,g0 as K,c7 as E,g2 as _,e1 as T,ck as g,cd as U,co as V}from"./index-Dwd1G4Vx.js";var I="Radio",[z,k]=g(I),[H,W]=z(I),w=s.forwardRef((t,d)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=b(d,x=>m(x)),u=s.useRef(!1),h=p?R||!!p.closest("form"):!0;return c.jsxs(H,{scope:o,checked:e,disabled:a,children:[c.jsx(y.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:E(t.onClick,x=>{e||f?.(),h&&(u.current=x.isPropagationStopped(),u.current||x.stopPropagation())})}),h&&c.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});w.displayName=I;var P="RadioIndicator",G=s.forwardRef((t,d)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(P,o);return c.jsx(T,{present:n||r.checked,children:c.jsx(y.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:d})})});G.displayName=P;var X="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:d,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=b(a,r),f=U(o),R=V(d);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),c.jsx(y.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=X;function A(t){return t?"checked":"unchecked"}var Y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[J]=g(C,[_,k]),j=_(),N=k(),[Q,Z]=J(C),D=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=L(R),[h,x]=B({prop:r,defaultProp:e??null,onChange:p,caller:C});return c.jsx(Q,{scope:o,name:n,required:a,disabled:l,value:h,onValueChange:x,children:c.jsx(q,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:c.jsx(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:d})})})});D.displayName=C;var M="RadioGroupItem",O=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=b(d,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=h=>{Y.includes(h.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),c.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:c.jsx(w,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:E(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:E(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return c.jsx(G,{...e,...n,ref:d})});F.displayName=$;var oe=D,re=O,te=F;export{re as I,oe as R,te as a};
@@ -1 +1 @@
1
- import{B as H,v as U,ab as S,H as Z,ac as X,f as R,ad as J,ae as Q,p as z}from"./usage-stats-bhxfI8nR.js";import{gB as M,hm as C,gA as P,hn as x,ho as L,hp as V,hq as K,hr as _,gD as A,eU as B,r as p,ca as N}from"./index-Ds-qTNYO.js";import{C as k}from"./index-DP83u0GN.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&X(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const $=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[$({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,q=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function j(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){q.has(e)||t.style.removeProperty(j(e))}function mt(t,e,i){q.has(e)||t.style.setProperty(j(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=B.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=$({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),N.createPortal(g,o.current)});B.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),N.createPortal(d,u.current)});export{Tt as B};
1
+ import{B as H,v as U,ab as S,H as Z,ac as X,f as R,ad as J,ae as Q,p as z}from"./usage-stats-B8vQoGzD.js";import{gB as M,hm as C,gA as P,hn as x,ho as L,hp as V,hq as K,hr as _,gD as A,eU as B,r as p,ca as N}from"./index-Dwd1G4Vx.js";import{C as k}from"./index-siNvPOEG.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&X(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const $=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[$({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,q=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function j(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){q.has(e)||t.style.removeProperty(j(e))}function mt(t,e,i){q.has(e)||t.style.setProperty(j(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=B.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=$({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),N.createPortal(g,o.current)});B.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),N.createPortal(d,u.current)});export{Tt as B};
@@ -1 +1 @@
1
- import{d5 as _}from"./index-Ds-qTNYO.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
1
+ import{d5 as _}from"./index-Dwd1G4Vx.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
@@ -1,4 +1,4 @@
1
- import{c as $,b as j,r as _,j as f,m as B,aY as at,t as se,b5 as Oe,a6 as ot,hl as lt,i as ct,K as ut,ca as ht,h as De,o as pt}from"./index-Ds-qTNYO.js";import{u as dt,v as Be,f as ue,B as ft,w as gt,_ as P,$ as mt,a0 as kt,J as xt,K as D,a1 as ve,a2 as bt,e as wt,a3 as Se,a4 as yt,a5 as G,N as Fe,a6 as he,c as qe,a7 as pe,a8 as Tt,a9 as vt,s as St,aa as Mt,a as Et,E as At}from"./usage-stats-bhxfI8nR.js";import{T as C,n as Rt,i as _t,E as $t}from"./editor-classes-DUlgPQpc.js";import{a as Ct,e as Ue,s as Lt,S as It}from"./suggestion-u7vKjcy7.js";import{B as zt}from"./index-AxtVWlRM.js";import{aF as Pt,aj as jt,ak as Nt,am as Ht,L as Ot,aZ as Dt,aK as Bt}from"./agent-icon-C4ES7Kxt.js";import{i as Ft}from"./SwitchHorizontal01-CroZeibd.js";import{s as qt}from"./Trash01-AgFkfTH1.js";import{k as Ut,a as Zt}from"./use-org-fs-BQarrV3d.js";import{E as Me,i as Ze,b as Gt,c as Kt,d as Ge,A as Wt,e as Qt,f as Xt,g as Vt,j as Jt}from"./markdown-CvFBis_P.js";import{s as Yt,T as en}from"./index-DP83u0GN.js";import{f as tn,a as nn,c as rn,C as sn,b as Ee}from"./command-By13hzA4.js";import{I as an}from"./icon-button-BmTLgm0k.js";function on(t){const e=$.c(30),{editor:n}=t,s=j(),[r,a]=_.useState(!1),[i,l]=_.useState(""),[o,h]=_.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const u=c;let p;e[2]!==n||e[3]!==r?(p=()=>{if(r){a(!1);return}const T=n.getAttributes("link").href;l(typeof T=="string"?T:""),h(!1),a(!0)},e[2]=n,e[3]=r,e[4]=p):p=e[4];const d=p;let g;e[5]!==n?(g=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),a(!1)},e[5]=n,e[6]=g):g=e[6];const x=g;let w;e[7]!==i||e[8]!==n||e[9]!==x?(w=()=>{const T=Rt(i);if(T===""){x();return}if(!_t(T)){h(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:T}).run(),a(!1)},e[7]=i,e[8]=n,e[9]=x,e[10]=w):w=e[10];const b=w;let y;e[11]!==s?(y=s("markdownEditor.link"),e[11]=s,e[12]=y):y=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=f.jsx(Pt,{size:14}),e[13]=v):v=e[13];let M;e[14]!==u||e[15]!==y||e[16]!==d?(M=f.jsx(C,{active:u,label:y,onClick:d,children:v}),e[14]=u,e[15]=y,e[16]=d,e[17]=M):M=e[17];let m;e[18]!==u||e[19]!==b||e[20]!==i||e[21]!==n||e[22]!==o||e[23]!==r||e[24]!==x||e[25]!==s?(m=r&&f.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||a(!1)},children:[f.jsx("input",{autoFocus:!0,type:"text","aria-label":s("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:s("markdownEditor.linkPlaceholder"),value:i,onChange:T=>{l(T.target.value),h(!1)},onKeyDown:T=>{T.key==="Enter"?(T.preventDefault(),b()):T.key==="Escape"&&(T.preventDefault(),a(!1),n.chain().focus().run())},className:B("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),f.jsx(C,{active:!1,label:s("markdownEditor.linkApply"),onClick:b,children:f.jsx(at,{size:14})}),u&&f.jsx(C,{active:!1,label:s("markdownEditor.linkRemove"),onClick:x,children:f.jsx(qt,{size:14})})]}),e[18]=u,e[19]=b,e[20]=i,e[21]=n,e[22]=o,e[23]=r,e[24]=x,e[25]=s,e[26]=m):m=e[26];let k;return e[27]!==M||e[28]!==m?(k=f.jsxs("div",{className:"relative",children:[M,m]}),e[27]=M,e[28]=m,e[29]=k):k=e[29],k}const ne=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=f.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},Ae=t=>{const e=$.c(2),{children:n}=t;let s;return e[0]!==n?(s=f.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=s):s=e[1],s},Ke=[1,2,3],ln=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function cn(t){const e=$.c(20),{editor:n}=t,s=j(),[r,a]=_.useState(null);let i;e[0]!==n?(i={editor:n,selector:un},e[0]=n,e[1]=i):i=e[1];const l=dt(i);let o;e[2]!==s?(o=s("markdownEditor.heading1"),e[2]=s,e[3]=o):o=e[3];let h;e[4]!==s?(h=s("markdownEditor.heading2"),e[4]=s,e[5]=h):h=e[5];let c;e[6]!==s?(c=s("markdownEditor.heading3"),e[6]=s,e[7]=c):c=e[7];let u;e[8]!==o||e[9]!==h||e[10]!==c?(u={1:o,2:h,3:c},e[8]=o,e[9]=h,e[10]=c,e[11]=u):u=e[11];const p=u;let d;e[12]!==n||e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==s?(d=r&&f.jsxs(zt,{editor:n,shouldShow:ln,appendTo:r,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":s("markdownEditor.toolbarAriaLabel"),children:[f.jsx(C,{active:l.bold,label:s("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:f.jsx(jt,{size:14})}),f.jsx(C,{active:l.italic,label:s("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:f.jsx(Nt,{size:14})}),f.jsx(C,{active:l.strike,label:s("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:f.jsx(Ht,{size:14})}),f.jsx(C,{active:l.code,label:s("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:f.jsx(Ot,{size:14})}),f.jsx(ne,{}),Ke.map((x,w)=>f.jsx(C,{active:l.headings[w]??!1,label:p[x],onClick:()=>n.chain().focus().toggleHeading({level:x}).run(),children:f.jsx(Ae,{children:`H${x}`})},x)),f.jsx(ne,{}),f.jsx(C,{active:l.bulletList,label:s("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:f.jsx(Ft,{size:14})}),f.jsx(C,{active:l.orderedList,label:s("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:f.jsx(Ae,{children:"1."})}),f.jsx(C,{active:l.blockquote,label:s("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:f.jsx(Dt,{size:14})}),f.jsx(ne,{}),f.jsx(on,{editor:n})]}),e[12]=n,e[13]=p,e[14]=r,e[15]=l,e[16]=s,e[17]=d):d=e[17];let g;return e[18]!==d?(g=f.jsx("div",{ref:a,className:"relative z-20",children:d}),e[18]=d,e[19]=g):g=e[19],g}function un(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Ke.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const hn=10,pn=25,dn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function fn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??dn[t.type]??""}function gn(){const t=$.c(4),e=j(),{upload:n}=Ut(Me),s=Zt(Me);let r;return t[0]!==s||t[1]!==e||t[2]!==n?(r={uploadFile:async i=>{const l=Ze(i),o=l?hn:pn;if(i.size>o*1024*1024)return se.error(e("markdownEditor.fileTooLarge",{name:i.name,max:String(o)})),null;const h=l?Gt:Kt,c=`${crypto.randomUUID()}${fn(i)}`;try{return await n.mutateAsync({dir:h,files:[new File([i],c,{type:i.type})]}),s(`${h}/${c}`)}catch{return se.error(e("markdownEditor.uploadFailed",{name:i.name})),null}}},t[0]=s,t[1]=e,t[2]=n,t[3]=r):r=t[3],r}const X=new Be("uploadSlots"),mn=ue.create({name:"uploadSlots",addProseMirrorPlugins(){return[new ft({key:X,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(X);if(!t.docChanged&&!n)return e;const s=new Map;for(const[r,a]of e)s.set(r,t.mapping.map(a));if(n){const[r,a]=n;a===null?s.delete(r):s.set(r,a)}return s}}})]}});function ie(t,e,n){return t.setMeta(X,[e,n])}function kn(t,e){return X.getState(t)?.get(e)}function xn(t,e,n,s,r){const{schema:a}=t.state,i=a.nodes[n];if(!i)return;const l=i.create(s),o=t.state.selection.to===e,h=t.state.doc.resolve(e),c=h.parent.textBetween(Math.max(0,h.parentOffset-1),h.parentOffset,void 0,""),u=()=>a.text(" "),p=l.isInline?[...c&&!/\s/.test(c)?[u()]:[],l,u()]:l,d=t.state.tr.replaceWith(e,e,p);let g=e,x=e;d.mapping.maps.at(-1)?.forEach((M,m,k,T)=>{g=k,x=T});let w;d.doc.nodesBetween(g,x,(M,m)=>{M===l&&(w=m+M.nodeSize)});let b=w??x;w!==void 0&&l.isInline&&(b+=1);const y=a.nodes.paragraph;w!==void 0&&l.isBlock&&y&&(d.doc.resolve(w).nodeAfter?.isTextblock||d.insert(w,y.create()),b=w+1);const v=gt.near(d.doc.resolve(b));o&&d.setSelection(v),r&&ie(d,r,v.to),t.dispatch(d)}function bn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function wn(t=!0){const e=j(),{uploadFile:n}=gn(),s=_.useRef(n);s.current=n;const[r,a]=_.useState(0),i=_.useRef(0),l=u=>{i.current+=u,a(i.current)},o=(u,p,d)=>{if(!t||p.length===0)return!1;l(p.length);const g=Symbol("upload");return u.dispatch(ie(u.state.tr,g,d)),(async()=>{for(const x of p)try{const w=await s.current(x);if(!w||u.isDestroyed)continue;const b=Ze(x);xn(u,kn(u.state,g)??u.state.selection.to,b?"image":"attachment",b?{src:w,alt:x.name}:{href:w,name:x.name},g)}catch{se.error(e("markdownEditor.uploadFailed",{name:x.name}))}finally{l(-1)}u.isDestroyed||u.dispatch(ie(u.state.tr,g,null))})(),!0};return{pending:r,uploading:()=>i.current>0,uploadInto:o,handlePaste:(u,p)=>{const d=bn(p.clipboardData);return d.length===0?!1:(p.stopPropagation(),o(u,d,u.state.selection.to))},handleDrop:(u,p,d,g)=>{if(g)return!1;const x=Array.from(p.dataTransfer?.files??[]);if(x.length===0)return!1;const w=u.posAtCoords({left:p.clientX,top:p.clientY})?.pos;return w===void 0?!1:(p.stopPropagation(),o(u,x,w))}}}function de(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=de();function We(t){O=t}var N={exec:()=>null};function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(R.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,e)};return s}var yn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Tn=/^(?:[ \t]*(?:\n|$))+/,vn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Sn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fe=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xe=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),En=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ge=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,An=/^[^\n]+/,me=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rn=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",me).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_n=S(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fe).getRegex(),ee="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ke=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$n=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ke).replace("tag",ee).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ve=S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),Cn=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ve).getRegex(),xe={blockquote:Cn,code:vn,def:Rn,fences:Sn,heading:Mn,hr:K,html:$n,lheading:Xe,list:_n,newline:Tn,paragraph:Ve,table:N,text:An},Re=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),Ln={...xe,lheading:En,table:Re,paragraph:S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Re).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex()},In={...xe,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ke).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:N,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(ge).replace("hr",K).replace("heading",` *#{1,6} *[^
1
+ import{c as $,b as j,r as _,j as f,m as B,aY as at,t as se,b5 as Oe,a6 as ot,hl as lt,i as ct,K as ut,ca as ht,h as De,o as pt}from"./index-Dwd1G4Vx.js";import{u as dt,v as Be,f as ue,B as ft,w as gt,_ as P,$ as mt,a0 as kt,J as xt,K as D,a1 as ve,a2 as bt,e as wt,a3 as Se,a4 as yt,a5 as G,N as Fe,a6 as he,c as qe,a7 as pe,a8 as Tt,a9 as vt,s as St,aa as Mt,a as Et,E as At}from"./usage-stats-B8vQoGzD.js";import{T as C,n as Rt,i as _t,E as $t}from"./editor-classes-DItoayc5.js";import{a as Ct,e as Ue,s as Lt,S as It}from"./suggestion-CZIPVi10.js";import{B as zt}from"./index-BiD9N9Wt.js";import{aF as Pt,aj as jt,ak as Nt,am as Ht,L as Ot,aZ as Dt,aK as Bt}from"./agent-icon-CfC0W4dx.js";import{i as Ft}from"./SwitchHorizontal01-Bi1W2ShO.js";import{s as qt}from"./Trash01-CQYiV3HH.js";import{k as Ut,a as Zt}from"./use-org-fs-C24WT7qs.js";import{E as Me,i as Ze,b as Gt,c as Kt,d as Ge,A as Wt,e as Qt,f as Xt,g as Vt,j as Jt}from"./markdown-BolIwd-E.js";import{s as Yt,T as en}from"./index-siNvPOEG.js";import{f as tn,a as nn,c as rn,C as sn,b as Ee}from"./command-DZr2odLo.js";import{I as an}from"./icon-button-BlJ-D4pm.js";function on(t){const e=$.c(30),{editor:n}=t,s=j(),[r,a]=_.useState(!1),[i,l]=_.useState(""),[o,h]=_.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const u=c;let p;e[2]!==n||e[3]!==r?(p=()=>{if(r){a(!1);return}const T=n.getAttributes("link").href;l(typeof T=="string"?T:""),h(!1),a(!0)},e[2]=n,e[3]=r,e[4]=p):p=e[4];const d=p;let g;e[5]!==n?(g=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),a(!1)},e[5]=n,e[6]=g):g=e[6];const x=g;let w;e[7]!==i||e[8]!==n||e[9]!==x?(w=()=>{const T=Rt(i);if(T===""){x();return}if(!_t(T)){h(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:T}).run(),a(!1)},e[7]=i,e[8]=n,e[9]=x,e[10]=w):w=e[10];const b=w;let y;e[11]!==s?(y=s("markdownEditor.link"),e[11]=s,e[12]=y):y=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=f.jsx(Pt,{size:14}),e[13]=v):v=e[13];let M;e[14]!==u||e[15]!==y||e[16]!==d?(M=f.jsx(C,{active:u,label:y,onClick:d,children:v}),e[14]=u,e[15]=y,e[16]=d,e[17]=M):M=e[17];let m;e[18]!==u||e[19]!==b||e[20]!==i||e[21]!==n||e[22]!==o||e[23]!==r||e[24]!==x||e[25]!==s?(m=r&&f.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||a(!1)},children:[f.jsx("input",{autoFocus:!0,type:"text","aria-label":s("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:s("markdownEditor.linkPlaceholder"),value:i,onChange:T=>{l(T.target.value),h(!1)},onKeyDown:T=>{T.key==="Enter"?(T.preventDefault(),b()):T.key==="Escape"&&(T.preventDefault(),a(!1),n.chain().focus().run())},className:B("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),f.jsx(C,{active:!1,label:s("markdownEditor.linkApply"),onClick:b,children:f.jsx(at,{size:14})}),u&&f.jsx(C,{active:!1,label:s("markdownEditor.linkRemove"),onClick:x,children:f.jsx(qt,{size:14})})]}),e[18]=u,e[19]=b,e[20]=i,e[21]=n,e[22]=o,e[23]=r,e[24]=x,e[25]=s,e[26]=m):m=e[26];let k;return e[27]!==M||e[28]!==m?(k=f.jsxs("div",{className:"relative",children:[M,m]}),e[27]=M,e[28]=m,e[29]=k):k=e[29],k}const ne=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=f.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},Ae=t=>{const e=$.c(2),{children:n}=t;let s;return e[0]!==n?(s=f.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=s):s=e[1],s},Ke=[1,2,3],ln=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function cn(t){const e=$.c(20),{editor:n}=t,s=j(),[r,a]=_.useState(null);let i;e[0]!==n?(i={editor:n,selector:un},e[0]=n,e[1]=i):i=e[1];const l=dt(i);let o;e[2]!==s?(o=s("markdownEditor.heading1"),e[2]=s,e[3]=o):o=e[3];let h;e[4]!==s?(h=s("markdownEditor.heading2"),e[4]=s,e[5]=h):h=e[5];let c;e[6]!==s?(c=s("markdownEditor.heading3"),e[6]=s,e[7]=c):c=e[7];let u;e[8]!==o||e[9]!==h||e[10]!==c?(u={1:o,2:h,3:c},e[8]=o,e[9]=h,e[10]=c,e[11]=u):u=e[11];const p=u;let d;e[12]!==n||e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==s?(d=r&&f.jsxs(zt,{editor:n,shouldShow:ln,appendTo:r,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":s("markdownEditor.toolbarAriaLabel"),children:[f.jsx(C,{active:l.bold,label:s("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:f.jsx(jt,{size:14})}),f.jsx(C,{active:l.italic,label:s("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:f.jsx(Nt,{size:14})}),f.jsx(C,{active:l.strike,label:s("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:f.jsx(Ht,{size:14})}),f.jsx(C,{active:l.code,label:s("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:f.jsx(Ot,{size:14})}),f.jsx(ne,{}),Ke.map((x,w)=>f.jsx(C,{active:l.headings[w]??!1,label:p[x],onClick:()=>n.chain().focus().toggleHeading({level:x}).run(),children:f.jsx(Ae,{children:`H${x}`})},x)),f.jsx(ne,{}),f.jsx(C,{active:l.bulletList,label:s("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:f.jsx(Ft,{size:14})}),f.jsx(C,{active:l.orderedList,label:s("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:f.jsx(Ae,{children:"1."})}),f.jsx(C,{active:l.blockquote,label:s("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:f.jsx(Dt,{size:14})}),f.jsx(ne,{}),f.jsx(on,{editor:n})]}),e[12]=n,e[13]=p,e[14]=r,e[15]=l,e[16]=s,e[17]=d):d=e[17];let g;return e[18]!==d?(g=f.jsx("div",{ref:a,className:"relative z-20",children:d}),e[18]=d,e[19]=g):g=e[19],g}function un(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Ke.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const hn=10,pn=25,dn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function fn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??dn[t.type]??""}function gn(){const t=$.c(4),e=j(),{upload:n}=Ut(Me),s=Zt(Me);let r;return t[0]!==s||t[1]!==e||t[2]!==n?(r={uploadFile:async i=>{const l=Ze(i),o=l?hn:pn;if(i.size>o*1024*1024)return se.error(e("markdownEditor.fileTooLarge",{name:i.name,max:String(o)})),null;const h=l?Gt:Kt,c=`${crypto.randomUUID()}${fn(i)}`;try{return await n.mutateAsync({dir:h,files:[new File([i],c,{type:i.type})]}),s(`${h}/${c}`)}catch{return se.error(e("markdownEditor.uploadFailed",{name:i.name})),null}}},t[0]=s,t[1]=e,t[2]=n,t[3]=r):r=t[3],r}const X=new Be("uploadSlots"),mn=ue.create({name:"uploadSlots",addProseMirrorPlugins(){return[new ft({key:X,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(X);if(!t.docChanged&&!n)return e;const s=new Map;for(const[r,a]of e)s.set(r,t.mapping.map(a));if(n){const[r,a]=n;a===null?s.delete(r):s.set(r,a)}return s}}})]}});function ie(t,e,n){return t.setMeta(X,[e,n])}function kn(t,e){return X.getState(t)?.get(e)}function xn(t,e,n,s,r){const{schema:a}=t.state,i=a.nodes[n];if(!i)return;const l=i.create(s),o=t.state.selection.to===e,h=t.state.doc.resolve(e),c=h.parent.textBetween(Math.max(0,h.parentOffset-1),h.parentOffset,void 0,""),u=()=>a.text(" "),p=l.isInline?[...c&&!/\s/.test(c)?[u()]:[],l,u()]:l,d=t.state.tr.replaceWith(e,e,p);let g=e,x=e;d.mapping.maps.at(-1)?.forEach((M,m,k,T)=>{g=k,x=T});let w;d.doc.nodesBetween(g,x,(M,m)=>{M===l&&(w=m+M.nodeSize)});let b=w??x;w!==void 0&&l.isInline&&(b+=1);const y=a.nodes.paragraph;w!==void 0&&l.isBlock&&y&&(d.doc.resolve(w).nodeAfter?.isTextblock||d.insert(w,y.create()),b=w+1);const v=gt.near(d.doc.resolve(b));o&&d.setSelection(v),r&&ie(d,r,v.to),t.dispatch(d)}function bn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function wn(t=!0){const e=j(),{uploadFile:n}=gn(),s=_.useRef(n);s.current=n;const[r,a]=_.useState(0),i=_.useRef(0),l=u=>{i.current+=u,a(i.current)},o=(u,p,d)=>{if(!t||p.length===0)return!1;l(p.length);const g=Symbol("upload");return u.dispatch(ie(u.state.tr,g,d)),(async()=>{for(const x of p)try{const w=await s.current(x);if(!w||u.isDestroyed)continue;const b=Ze(x);xn(u,kn(u.state,g)??u.state.selection.to,b?"image":"attachment",b?{src:w,alt:x.name}:{href:w,name:x.name},g)}catch{se.error(e("markdownEditor.uploadFailed",{name:x.name}))}finally{l(-1)}u.isDestroyed||u.dispatch(ie(u.state.tr,g,null))})(),!0};return{pending:r,uploading:()=>i.current>0,uploadInto:o,handlePaste:(u,p)=>{const d=bn(p.clipboardData);return d.length===0?!1:(p.stopPropagation(),o(u,d,u.state.selection.to))},handleDrop:(u,p,d,g)=>{if(g)return!1;const x=Array.from(p.dataTransfer?.files??[]);if(x.length===0)return!1;const w=u.posAtCoords({left:p.clientX,top:p.clientY})?.pos;return w===void 0?!1:(p.stopPropagation(),o(u,x,w))}}}function de(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=de();function We(t){O=t}var N={exec:()=>null};function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(R.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,e)};return s}var yn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Tn=/^(?:[ \t]*(?:\n|$))+/,vn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Sn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fe=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xe=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),En=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ge=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,An=/^[^\n]+/,me=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rn=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",me).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_n=S(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fe).getRegex(),ee="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ke=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$n=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ke).replace("tag",ee).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ve=S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),Cn=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ve).getRegex(),xe={blockquote:Cn,code:vn,def:Rn,fences:Sn,heading:Mn,hr:K,html:$n,lheading:Xe,list:_n,newline:Tn,paragraph:Ve,table:N,text:An},Re=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),Ln={...xe,lheading:En,table:Re,paragraph:S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Re).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex()},In={...xe,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ke).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:N,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(ge).replace("hr",K).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Xe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Je=/^( {2,}|\\)\n(?!\s*$)/,jn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,F=/[\p{P}\p{S}]/u,te=/[\s\p{P}\p{S}]/u,be=/[^\s\p{P}\p{S}]/u,Nn=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,te).getRegex(),Ye=/(?!~)[\p{P}\p{S}]/u,Hn=/(?!~)[\s\p{P}\p{S}]/u,On=/(?:[^\s\p{P}\p{S}]|~)/u,Dn=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",yn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),et=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Bn=S(et,"u").replace(/punct/g,F).getRegex(),Fn=S(et,"u").replace(/punct/g,Ye).getRegex(),tt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",qn=S(tt,"gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Un=S(tt,"gu").replace(/notPunctSpace/g,On).replace(/punctSpace/g,Hn).replace(/punct/g,Ye).getRegex(),Zn=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Gn=S(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,F).getRegex(),Kn="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Wn=S(Kn,"gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Qn=S(/\\(punct)/,"gu").replace(/punct/g,F).getRegex(),Xn=S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Vn=S(ke).replace("(?:-->|$)","-->").getRegex(),Jn=S("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Vn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),V=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Yn=S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",V).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),nt=S(/^!?\[(label)\]\[(ref)\]/).replace("label",V).replace("ref",me).getRegex(),rt=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",me).getRegex(),er=S("reflink|nolink(?!\\()","g").replace("reflink",nt).replace("nolink",rt).getRegex(),_e=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,we={_backpedal:N,anyPunctuation:Qn,autolink:Xn,blockSkip:Dn,br:Je,code:Pn,del:N,delLDelim:N,delRDelim:N,emStrongLDelim:Bn,emStrongRDelimAst:qn,emStrongRDelimUnd:Zn,escape:zn,link:Yn,nolink:rt,punctuation:Nn,reflink:nt,reflinkSearch:er,tag:Jn,text:jn,url:N},tr={...we,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",V).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V).getRegex()},ae={...we,emStrongRDelimAst:Un,emStrongLDelim:Fn,delLDelim:Gn,delRDelim:Wn,url:S(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",_e).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:S(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",_e).getRegex()},nr={...ae,br:S(Je).replace("{2,}","*").getRegex(),text:S(ae.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},W={normal:xe,gfm:Ln,pedantic:In},q={normal:we,gfm:ae,breaks:nr,pedantic:tr},rr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$e=t=>rr[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,$e)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,$e);return t}function Ce(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function Le(t,e){let n=t.replace(R.findPipe,(a,i,l)=>{let o=!1,h=i;for(;--h>=0&&l[h]==="\\";)o=!o;return o?"|":" |"}),s=n.split(R.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(R.slashPipe,"|");return s}function U(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function sr(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function ir(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let a=4-n%4;s+=" ".repeat(a),n+=a}else s+=r,n++;return s}function Ie(t,e,n,s,r){let a=e.href,i=e.title||null,l=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:i,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,o}function ar(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
3
3
  `).map(a=>{let i=a.match(n.other.beginningSpace);if(i===null)return a;let[l]=i;return l.length>=r.length?a.slice(r.length):a}).join(`
4
4
  `)}var J=class{options;rules;lexer;constructor(t){this.options=t||O}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:U(n,`