decocms 4.524.0 → 4.524.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (407) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-gwLrBsiR.js → ActiveShapeUtils-Bp4fmUBo.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-COLuN3Qe.js → AlertCircle-Bq5T03B8.js} +1 -1
  3. package/dist/client/assets/{AreaChart-Dud7jvcC.js → AreaChart-CCyND0Jp.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-BYNlToA0.js → ArrowLeft-Bwi_Jr7f.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CRFAWnPc.js → ArrowUp-CzX0fTk7.js} +1 -1
  6. package/dist/client/assets/{BarChart-JFNliGSV.js → BarChart-wLDzzyOQ.js} +1 -1
  7. package/dist/client/assets/{Building02-DinMBe3_.js → Building02-A_MT9tNO.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-Cjgu2ECY.js → CartesianChart-B0qX_dpC.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-Bx8yFu23.js → CategoricalChart-BDZ_2Tmn.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-DCMOdEuL.js → CheckCircle-BE1i_X4b.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-Dwu4Nr-2.js → ChevronSelectorVertical-DNrt0MHW.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-4EkxqYyz.js → ChevronUp-RlBkcpdd.js} +1 -1
  13. package/dist/client/assets/{Copy01-Tog1jA1S.js → Copy01-B9x501ud.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-B7MC6SfH.js → CreditCard01-Bu_qRR36.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-qUaZHjqd.js → DotsVertical-D9231JAc.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-C1p765z-.js → ErrorBarContext-PGp8cmoe.js} +1 -1
  17. package/dist/client/assets/{Globe04-CGEgYyKw.js → Globe04-DQlP6Nhr.js} +1 -1
  18. package/dist/client/assets/{Image01-CW7Pcq-W.js → Image01-ClayPF_a.js} +1 -1
  19. package/dist/client/assets/{Key01-D_nzK0xg.js → Key01-CxKYO-oQ.js} +1 -1
  20. package/dist/client/assets/{Link01-CpcYQ7Qt.js → Link01-B7BHRxIW.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-Ctb4MZUK.js → LinkBroken01-XqJUgSE7.js} +1 -1
  22. package/dist/client/assets/{Minus-DoRDGpun.js → Minus-Bh6ogRng.js} +1 -1
  23. package/dist/client/assets/{Monitor01-L9jyZGZ2.js → Monitor01-BpzvJnXA.js} +1 -1
  24. package/dist/client/assets/{Play-Du5BNsRy.js → Play-w4omVTRa.js} +1 -1
  25. package/dist/client/assets/{Plus-BfnmJh1R.js → Plus-CcJNnBya.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-DCCnHWMQ.js → ReferenceLine-CI6ZmeJ0.js} +1 -1
  27. package/dist/client/assets/{SearchMd-JUAl7Zv6.js → SearchMd-5lGv5a5H.js} +1 -1
  28. package/dist/client/assets/{Sector-DL6Ad47o.js → Sector-gkUUnvA4.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-usYkWunw.js → ShoppingBag01-C82UeRR9.js} +1 -1
  30. package/dist/client/assets/{Sun-B7TolJAG.js → Sun-IvvKZ51n.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-DcP8c_x_.js → SwitchHorizontal01-B1MoYKPo.js} +1 -1
  32. package/dist/client/assets/{Tool01-Bon-ixH5.js → Tool01-BvlRH5Ln.js} +1 -1
  33. package/dist/client/assets/{Trash01-cH2tYIUn.js → Trash01-C9E8l_mI.js} +1 -1
  34. package/dist/client/assets/{Upload01-Bo60o4T6.js → Upload01-mlw10ZK-.js} +1 -1
  35. package/dist/client/assets/{UserSquare-DsAVH788.js → UserSquare-DwNuAluZ.js} +1 -1
  36. package/dist/client/assets/{Users01-Bo_9DitT.js → Users01-DcHPIKgH.js} +1 -1
  37. package/dist/client/assets/{XClose-DhoOL-T1.js → XClose-BBReaSBA.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-B1U_CHeD.js → ZoomOut-CnbxUNSo.js} +1 -1
  39. package/dist/client/assets/{access-gate-CGDwkzkf.js → access-gate-BNOWXoYR.js} +1 -1
  40. package/dist/client/assets/{add-connection-dialog-8gQOdlVv.js → add-connection-dialog-CEj8kbGq.js} +1 -1
  41. package/dist/client/assets/agent-analytics-DcqQcnI_.js +1 -0
  42. package/dist/client/assets/agent-app-BWM9EEcJ.js +1 -0
  43. package/dist/client/assets/{agent-assets-Q4lV98mF.js → agent-assets-CppO2yKd.js} +1 -1
  44. package/dist/client/assets/{agent-automation-Dsupi3DF.js → agent-automation-BtSTyUKu.js} +1 -1
  45. package/dist/client/assets/{agent-automations-BonoDEyJ.js → agent-automations-Bf-0_57T.js} +1 -1
  46. package/dist/client/assets/agent-calendar-Bp6Y1tPy.js +1 -0
  47. package/dist/client/assets/{agent-connect-sources-C0oR1IIZ.js → agent-connect-sources-C_0x6Udu.js} +1 -1
  48. package/dist/client/assets/agent-deck-BOaej8yV.js +1 -0
  49. package/dist/client/assets/{agent-e2e-nbY2lllw.js → agent-e2e-DokyQFgS.js} +1 -1
  50. package/dist/client/assets/agent-experiments-7O17P9sC.js +1 -0
  51. package/dist/client/assets/{agent-file-DKmgj6b-.js → agent-file-B5Z-mSXW.js} +1 -1
  52. package/dist/client/assets/{agent-hosting-BC5YnVoX.js → agent-hosting-v3_GHpmO.js} +1 -1
  53. package/dist/client/assets/{agent-icon-CVEMdYFU.js → agent-icon-KvVT3fA8.js} +1 -1
  54. package/dist/client/assets/agent-library-B3W6CGJl.js +1 -0
  55. package/dist/client/assets/agent-library-file-CHgoG2j3.js +1 -0
  56. package/dist/client/assets/agent-monitor-C9pMT5KA.js +1 -0
  57. package/dist/client/assets/{agent-overview-DU1IP4XS.js → agent-overview-9FhsI0nk.js} +1 -1
  58. package/dist/client/assets/{agent-releases-BuXXsH8W.js → agent-releases-CRh6y5DW.js} +1 -1
  59. package/dist/client/assets/agent-settings-CfNarIdW.js +1 -0
  60. package/dist/client/assets/{agent-site-editor-DSqJlDXx.js → agent-site-editor-BALtgla6.js} +1 -1
  61. package/dist/client/assets/agent-site-editor-code-D6BBbIl8.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content-DAMOp9X5.js +1 -0
  63. package/dist/client/assets/agent-site-editor-preview-B0IbykqU.js +1 -0
  64. package/dist/client/assets/agent-view-B5q0EqmS.js +1 -0
  65. package/dist/client/assets/{agent-view-guard-Bvqt9A7d.js → agent-view-guard-bPXLqLsK.js} +1 -1
  66. package/dist/client/assets/{agents-list-BV-RY6eO.js → agents-list-DrT_0gVh.js} +1 -1
  67. package/dist/client/assets/{ai-providers-D8opLVHp.js → ai-providers-DorJXBZe.js} +1 -1
  68. package/dist/client/assets/{alert-CYZdSIKq.js → alert-DEw5BVAh.js} +1 -1
  69. package/dist/client/assets/{analytics-sections-BqhdlzKZ.js → analytics-sections-g9foqwY5.js} +1 -1
  70. package/dist/client/assets/{analytics-tab-BWgFTW72.js → analytics-tab-D5KshkAH.js} +1 -1
  71. package/dist/client/assets/api-keys-B-qwgNok.js +1 -0
  72. package/dist/client/assets/{api-keys-Dj50tYQ9.js → api-keys-CIPiPSYY.js} +1 -1
  73. package/dist/client/assets/app-editor-ChUXEXt-.js +1 -0
  74. package/dist/client/assets/{asset-utils-DcPLl2K6.js → asset-utils-DRJP317P.js} +1 -1
  75. package/dist/client/assets/{auth-CEIITB7d.js → auth-Dqt9menC.js} +1 -1
  76. package/dist/client/assets/{auth-catchall-CEBn1SGS.js → auth-catchall-B5Em8iaq.js} +1 -1
  77. package/dist/client/assets/{auth-entry-iXHgBQJV.js → auth-entry-CNtzQsix.js} +1 -1
  78. package/dist/client/assets/{auth-split-layout-CsXqgaOS.js → auth-split-layout-BoWG-no5.js} +1 -1
  79. package/dist/client/assets/{authenticate-and-persist-oauth-CN-ocXe3.js → authenticate-and-persist-oauth-BziZaG_M.js} +1 -1
  80. package/dist/client/assets/{automation-list-row-JOMePUFR.js → automation-list-row-BRtPLrxX.js} +1 -1
  81. package/dist/client/assets/{automation-runs-KPGkDZAM.js → automation-runs-C0-BhIZn.js} +1 -1
  82. package/dist/client/assets/{automations-BTtfVGNa.js → automations-CXOQ5gKM.js} +1 -1
  83. package/dist/client/assets/{autosend-CbkP_bEt.js → autosend-BRUzWk70.js} +1 -1
  84. package/dist/client/assets/{badge-DeNt4-FX.js → badge-Ckz5LqgP.js} +1 -1
  85. package/dist/client/assets/{block-document-BzAW7wGZ.js → block-document-BPaZQC5L.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-aUwmyorT.js → blocks-preview-workspace-context-C-uj3YG0.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-PBqE8hLO.js → blocks-tab-states-BcxrQPOR.js} +1 -1
  88. package/dist/client/assets/{blog-schema-BYLQdC9S.js → blog-schema-Du7ILh7Q.js} +1 -1
  89. package/dist/client/assets/{buckets-CFL4z0d-.js → buckets-CKZYh6Ij.js} +1 -1
  90. package/dist/client/assets/{build-improve-prompt-doc-BpkVMxpg.js → build-improve-prompt-doc-DJhZN8lj.js} +1 -1
  91. package/dist/client/assets/{calendar-GMyXKkbA.js → calendar-DkZz5VlH.js} +1 -1
  92. package/dist/client/assets/{campaigns-view-iaGM9YLd.js → campaigns-view-Dc88Zs16.js} +1 -1
  93. package/dist/client/assets/{capability-load-error-juzFeQ-_.js → capability-load-error-CRB9otZt.js} +1 -1
  94. package/dist/client/assets/category-editor-CSPe0t_-.js +1 -0
  95. package/dist/client/assets/{cdn-tab-QH34WF_J.js → cdn-tab-KPAxnC3T.js} +1 -1
  96. package/dist/client/assets/{chart-D9k22T0E.js → chart-Bp6om7lj.js} +1 -1
  97. package/dist/client/assets/{chat-context-C56OVvQP.js → chat-context-CIOqAIIy.js} +1 -1
  98. package/dist/client/assets/{chat-draft-DNgi8tda.js → chat-draft-OR83_S8w.js} +1 -1
  99. package/dist/client/assets/{checkbox-B6N4ay58.js → checkbox-BQ7Ebuar.js} +1 -1
  100. package/dist/client/assets/{choose-editor-CcEH03W4.js → choose-editor-CspgtGFS.js} +1 -1
  101. package/dist/client/assets/{cli-auth-success-CkyWspHU.js → cli-auth-success-CGyir_iF.js} +1 -1
  102. package/dist/client/assets/{client-icons-DyjyTud6.js → client-icons-BOMFh2QS.js} +1 -1
  103. package/dist/client/assets/cms-settings-editor-DbU_3ksB.js +1 -0
  104. package/dist/client/assets/{collapsible-D3gNdr7N.js → collapsible-BB8_usPT.js} +1 -1
  105. package/dist/client/assets/{collection-detail-D66AIxA0.js → collection-detail-H-UqYky8.js} +1 -1
  106. package/dist/client/assets/{collection-display-button-C28fH98T.js → collection-display-button-CulG1s8m.js} +1 -1
  107. package/dist/client/assets/{collection-search-BIuQ3VPN.js → collection-search-Cf4li4kg.js} +1 -1
  108. package/dist/client/assets/{collection-table-wrapper-7w5ciWB4.js → collection-table-wrapper-DnZHa5Lt.js} +1 -1
  109. package/dist/client/assets/{collection-tabs-m2567Q_Z.js → collection-tabs-x8ccQUAC.js} +1 -1
  110. package/dist/client/assets/{column-rules-DsLrWs5p.js → column-rules-C_DWUbCh.js} +1 -1
  111. package/dist/client/assets/{combobox-BEVN0Tvl.js → combobox-BZoZToki.js} +1 -1
  112. package/dist/client/assets/{command-N9BazZHl.js → command-MmMDew8i.js} +1 -1
  113. package/dist/client/assets/{companion-mcps-section-BQyuFD3F.js → companion-mcps-section-By8_AO07.js} +1 -1
  114. package/dist/client/assets/{config-BmN9tmsx.js → config-DBn3iCC3.js} +1 -1
  115. package/dist/client/assets/{connect-CefgSXIv.js → connect-DbK_vN0J.js} +1 -1
  116. package/dist/client/assets/{connect-layout-CUTmKBkE.js → connect-layout-9tsE00M7.js} +1 -1
  117. package/dist/client/assets/{connect-source-dialog-CBjVXCAe.js → connect-source-dialog-DqWilbbC.js} +1 -1
  118. package/dist/client/assets/{connection-CQKYiXol.js → connection-QGwhnKZn.js} +1 -1
  119. package/dist/client/assets/{connection-card-CvmG6XsV.js → connection-card-DEMVrMsW.js} +1 -1
  120. package/dist/client/assets/{connection-detail-BloLauxz.js → connection-detail-4PyaBO0_.js} +1 -1
  121. package/dist/client/assets/{connection-form-helpers-ytOA1Nl6.js → connection-form-helpers-DCRY9s0M.js} +1 -1
  122. package/dist/client/assets/{connections-BxS3FS9g.js → connections-CpcdB3jc.js} +1 -1
  123. package/dist/client/assets/{content-tab-BwyJP-DI.js → content-tab-YME7HMCb.js} +3 -3
  124. package/dist/client/assets/{context-menu-C4h1P6Vl.js → context-menu-Cpvztbef.js} +1 -1
  125. package/dist/client/assets/context-oSwYvz9P.js +1 -0
  126. package/dist/client/assets/{context-shell-BxB7W0br.js → context-shell-BVBpRdKB.js} +3 -3
  127. package/dist/client/assets/{core.esm-BYOMVmVh.js → core.esm-B2cbbV3O.js} +1 -1
  128. package/dist/client/assets/{create-organization-dialog-DqU6G9od.js → create-organization-dialog-NLldLLor.js} +1 -1
  129. package/dist/client/assets/{daily-pulse-BlxIy31E.js → daily-pulse-ClSeB_Ta.js} +1 -1
  130. package/dist/client/assets/{discover-DMRyKZWE.js → discover-DmBynuR0.js} +1 -1
  131. package/dist/client/assets/{domain-settings-Cj-cRa8T.js → domain-settings-Cu3Pj63v.js} +1 -1
  132. package/dist/client/assets/{drawer-B7ajVnwC.js → drawer-GssD8cb3.js} +1 -1
  133. package/dist/client/assets/{editor-B7sIq_vQ.js → editor-BTovmEAS.js} +1 -1
  134. package/dist/client/assets/{editor-classes-BinXFbFk.js → editor-classes-CcPgajKG.js} +1 -1
  135. package/dist/client/assets/{empty-state-Cc_qF1X6.js → empty-state-D86P1Giw.js} +1 -1
  136. package/dist/client/assets/{empty-state-RpLaBfip.js → empty-state-DLNzdrwg.js} +1 -1
  137. package/dist/client/assets/{experiments-tab-BlgfPezU.js → experiments-tab-CjpJzYQ9.js} +1 -1
  138. package/dist/client/assets/{experiments-tab-choice-DZqY092h.js → experiments-tab-choice-pVOiMOWe.js} +1 -1
  139. package/dist/client/assets/{extract-connection-data-ClMH8dL9.js → extract-connection-data-DwkOg2rJ.js} +1 -1
  140. package/dist/client/assets/{feature-gate-Wo8Dn-M0.js → feature-gate-BIwsQPiQ.js} +1 -1
  141. package/dist/client/assets/{feature-paywall-C1_xpbwO.js → feature-paywall-DpVlsq5a.js} +1 -1
  142. package/dist/client/assets/{file-explorer-DCgzwH3u.js → file-explorer-B9Wz0lPl.js} +1 -1
  143. package/dist/client/assets/{file-preview-DFHvVsCR.js → file-preview-CX5xfaHR.js} +1 -1
  144. package/dist/client/assets/{file-share-button-DMtXDXf3.js → file-share-button-Cx66riM5.js} +1 -1
  145. package/dist/client/assets/{file-type-icon-may_hs3N.js → file-type-icon-tAeiI9_2.js} +1 -1
  146. package/dist/client/assets/{folder-icon-DREaQWIx.js → folder-icon-C25vLo5g.js} +1 -1
  147. package/dist/client/assets/{form-Gz8fbLdb.js → form-CKF06Eu0.js} +1 -1
  148. package/dist/client/assets/{general-DBULqBSQ.js → general-CA7uhFzP.js} +1 -1
  149. package/dist/client/assets/{held-block-view-DTUWWRfL.js → held-block-view-CU5t1B8c.js} +7 -7
  150. package/dist/client/assets/{home-DnXsGhyo.js → home-BuPVKVzx.js} +1 -1
  151. package/dist/client/assets/{icon-button-TQkFyvqB.js → icon-button-5JlhYc9R.js} +1 -1
  152. package/dist/client/assets/{index-CqFACk2B.js → index-AY0yzUAx.js} +1 -1
  153. package/dist/client/assets/{index-CaH8ekvn.js → index-B0Hb2bUK.js} +1 -1
  154. package/dist/client/assets/{index-C6_m0mjP.js → index-B8bCJ3Gm.js} +1 -1
  155. package/dist/client/assets/{index-DENKa8lW.js → index-BLRFIWph.js} +1 -1
  156. package/dist/client/assets/{index-BEX8cmtV.js → index-BerfNxBu.js} +1 -1
  157. package/dist/client/assets/{index-B9NLvHLf.js → index-Bz0XRw1e.js} +1 -1
  158. package/dist/client/assets/{index-BNmzMNlZ.js → index-C4tYnNih.js} +5 -5
  159. package/dist/client/assets/{index-DusHyRie.js → index-CDfG-oXn.js} +1 -1
  160. package/dist/client/assets/{index-BNtuHmZB.js → index-CJ8-jtJ3.js} +1 -1
  161. package/dist/client/assets/{index-bf-OLKAU.js → index-CMXP-HlZ.js} +1 -1
  162. package/dist/client/assets/{index-BGcfYf5c.js → index-CieIETkx.js} +1 -1
  163. package/dist/client/assets/{index-iynQP1if.js → index-D8kI0oe2.js} +1 -1
  164. package/dist/client/assets/{index-kd3fyZ9a.js → index-DG_Aoo8H.js} +1 -1
  165. package/dist/client/assets/{index-DgWAoWIc.js → index-DMcUJv3F.js} +1 -1
  166. package/dist/client/assets/{index-DNHxXhrW.js → index-DQ4MCRAi.js} +1 -1
  167. package/dist/client/assets/{index-redirect-DAPRiYQw.js → index-redirect-DSkhUiz1.js} +1 -1
  168. package/dist/client/assets/{infiniteQueryObserver-ClGIthQz.js → infiniteQueryObserver-CyNcT3qz.js} +1 -1
  169. package/dist/client/assets/{infra-billing-Bn8rlKTp.js → infra-billing-OmwhvZsy.js} +1 -1
  170. package/dist/client/assets/{input-BS4EACP3.js → input-C0IBlV9i.js} +3 -3
  171. package/dist/client/assets/{input-DZSiMfCa.js → input-Drj3v1Rm.js} +1 -1
  172. package/dist/client/assets/{integration-icon-BrTM8z-s.js → integration-icon-wG7mou98.js} +1 -1
  173. package/dist/client/assets/{jira-icon-CvveHm37.js → jira-icon-Ct9neMH3.js} +1 -1
  174. package/dist/client/assets/{label-BCxqhVIq.js → label-Kngegn1Y.js} +1 -1
  175. package/dist/client/assets/{layout-C_-T37yU.js → layout-D1PXm8wr.js} +1 -1
  176. package/dist/client/assets/{legacy-agents-deep-HN0h-Vgf.js → legacy-agents-deep-CqqR00U7.js} +1 -1
  177. package/dist/client/assets/{legacy-main-redirect-HqwAGFUC.js → legacy-main-redirect-j5rWQTR7.js} +1 -1
  178. package/dist/client/assets/library-BB_eexuL.js +1 -0
  179. package/dist/client/assets/{login-D25rkjo_.js → login-dCZC1OIS.js} +1 -1
  180. package/dist/client/assets/{markdown-P8cO0xLZ.js → markdown-C-J5-sTt.js} +1 -1
  181. package/dist/client/assets/{mcp-app-renderer-CKUvsXnq.js → mcp-app-renderer-vHEVQIZL.js} +1 -1
  182. package/dist/client/assets/{mcp-oauth-C9hLQucs.js → mcp-oauth-5QMuPFQa.js} +1 -1
  183. package/dist/client/assets/{mcp-oauth-DBMA8wIh.js → mcp-oauth-CnB7EPe0.js} +1 -1
  184. package/dist/client/assets/{members-C_tx9w5g.js → members-D62Ns7xb.js} +1 -1
  185. package/dist/client/assets/{memory-CsXGZJq1.js → memory-BRnI6IWM.js} +1 -1
  186. package/dist/client/assets/{mini-report-page-DGZYey3l.js → mini-report-page-RV5HcY13.js} +1 -1
  187. package/dist/client/assets/{mock-board-BWzTY2k-.js → mock-board-C5ljPU5m.js} +3 -3
  188. package/dist/client/assets/{monaco-editor-CBJkBgIU.js → monaco-editor-CG1RPml4.js} +1 -1
  189. package/dist/client/assets/{monitoring-BLnrFAQj.js → monitoring-kGWQYp7Z.js} +1 -1
  190. package/dist/client/assets/{monitoring-stats-row-vWHUOUB3.js → monitoring-stats-row-BpfaRq5_.js} +1 -1
  191. package/dist/client/assets/{multi-select-BNfLnIfI.js → multi-select-D79TIC6v.js} +1 -1
  192. package/dist/client/assets/{mustache-Crsi4VAX.js → mustache-BdHuXtQC.js} +1 -1
  193. package/dist/client/assets/{named-rule-uses-D5gjZwOp.js → named-rule-uses-DDsPTKwP.js} +1 -1
  194. package/dist/client/assets/{named-rule-view-BVCpec2I.js → named-rule-view-CelDjugE.js} +1 -1
  195. package/dist/client/assets/{new-project-dialog-BzJmdXI6.js → new-project-dialog-DQPlctqf.js} +1 -1
  196. package/dist/client/assets/{oauth-callback-CwZ-b3nE.js → oauth-callback-ah6cR8xQ.js} +1 -1
  197. package/dist/client/assets/{oauth-callback-ai-provider-CujNNAU2.js → oauth-callback-ai-provider-C5jhPG9E.js} +1 -1
  198. package/dist/client/assets/{onboarding-Csy3KW6h.js → onboarding-BPgxXbEy.js} +1 -1
  199. package/dist/client/assets/{openai-conversation-DJfgyA82.js → openai-conversation-COLqoqqY.js} +1 -1
  200. package/dist/client/assets/{optimistic-project-sidebar-views-XzUayXF_.js → optimistic-project-sidebar-views-BXm7Dv06.js} +1 -1
  201. package/dist/client/assets/{order-monitor-day-BUk1fjA6.js → order-monitor-day-DzTTlxAw.js} +1 -1
  202. package/dist/client/assets/{organization-choice-BG-EMl8L.js → organization-choice-CMYQUq77.js} +1 -1
  203. package/dist/client/assets/{orgs-BOi51Yxa.js → orgs-Cb-j6SHO.js} +1 -1
  204. package/dist/client/assets/{page-seo-form-D4gneorY.js → page-seo-form-CCa1Xirx.js} +1 -1
  205. package/dist/client/assets/{pair-Dh_1oqHi.js → pair-CRFLUGB-.js} +1 -1
  206. package/dist/client/assets/{parse-sections-B30A8ECY.js → parse-sections-CBOr5TcU.js} +1 -1
  207. package/dist/client/assets/{plan-BXu8SQ3T.js → plan-CZiCKWsL.js} +1 -1
  208. package/dist/client/assets/{plan-ladder-CN5p5ylK.js → plan-ladder-Clu_D1dM.js} +1 -1
  209. package/dist/client/assets/{popover-DauDBkON.js → popover-7hw0_Cgu.js} +1 -1
  210. package/dist/client/assets/post-calendar-oSfCtk_Z.js +1 -0
  211. package/dist/client/assets/{post-editor-BChaRDNt.js → post-editor-DqdLoENq.js} +1 -1
  212. package/dist/client/assets/{preview-content-BvhoJjFR.js → preview-content-tpqwn9DV.js} +1 -1
  213. package/dist/client/assets/{preview-dialog-iRKqzeeN.js → preview-dialog-DDUA3zbn.js} +1 -1
  214. package/dist/client/assets/{preview-panel-DcbhbW1H.js → preview-panel-B7KDfk34.js} +1 -1
  215. package/dist/client/assets/{preview-tab-ClK0lOMy.js → preview-tab-CwHbL-uL.js} +3 -3
  216. package/dist/client/assets/{product-picker-dialog-CsTqbwXT.js → product-picker-dialog-q_j-OMur.js} +1 -1
  217. package/dist/client/assets/{profile-DE1V4tEF.js → profile--UpTdMEW.js} +1 -1
  218. package/dist/client/assets/{project-app-view-BpeI5cMf.js → project-app-view-BDtUwetx.js} +1 -1
  219. package/dist/client/assets/{project-apps-CNRV3DAE.js → project-apps-M24hPHW2.js} +1 -1
  220. package/dist/client/assets/{project-feed-BcaTqzKD.js → project-feed-Dm5w30sM.js} +1 -1
  221. package/dist/client/assets/{project-icon-9kbQzXfH.js → project-icon-BlULUcrw.js} +1 -1
  222. package/dist/client/assets/project-reports-BXESPzCU.js +1 -0
  223. package/dist/client/assets/project-tasks-CRajXa6Z.js +1 -0
  224. package/dist/client/assets/{projects-Kz2HQD_e.js → projects-C9fr3jni.js} +1 -1
  225. package/dist/client/assets/{projects-empty-state-Df7eS0pA.js → projects-empty-state-DRas-7X9.js} +1 -1
  226. package/dist/client/assets/{prompts-B4KLkb4I.js → prompts-CiGgpCOz.js} +1 -1
  227. package/dist/client/assets/record-editor-Dw_A1nYV.js +1 -0
  228. package/dist/client/assets/redirect-editor-DbPiIIKk.js +1 -0
  229. package/dist/client/assets/{releases-api-BDl7LEw1.js → releases-api-DA_Oz9WG.js} +1 -1
  230. package/dist/client/assets/{reports-Cp14zg57.js → reports-Czva0tSD.js} +1 -1
  231. package/dist/client/assets/reports-I3thcjRj.js +1 -0
  232. package/dist/client/assets/{reports-onboarding-D2UqC4mS.js → reports-onboarding-BsOWdPaY.js} +1 -1
  233. package/dist/client/assets/{reports-tab-C51R-6vi.js → reports-tab-C2STfD1k.js} +2 -2
  234. package/dist/client/assets/repositories-B5BeE82u.js +1 -0
  235. package/dist/client/assets/{repositories-CHKGn0VU.js → repositories-Dp2o7kK8.js} +1 -1
  236. package/dist/client/assets/{repository-binding-BZ7FmJ0X.js → repository-binding-C7GXruB1.js} +1 -1
  237. package/dist/client/assets/{repository-import-picker-Bjws7k2-.js → repository-import-picker-BIFRKH2H.js} +1 -1
  238. package/dist/client/assets/{repository-picker-DkvIZLAj.js → repository-picker-D6fEwnOk.js} +1 -1
  239. package/dist/client/assets/{require-capability-Bm5pde_M.js → require-capability-DSeRbn1u.js} +1 -1
  240. package/dist/client/assets/{required-auth-layout-Dn8nNstE.js → required-auth-layout-D4yn4VOg.js} +1 -1
  241. package/dist/client/assets/{reset-password-CHMCFAp9.js → reset-password-CLlk4Qyg.js} +1 -1
  242. package/dist/client/assets/{resizable-BYZDi11K.js → resizable-B3zVq59U.js} +1 -1
  243. package/dist/client/assets/{resolve-tab-icon-DLcHhSBW.js → resolve-tab-icon-NGCKQk4u.js} +1 -1
  244. package/dist/client/assets/{review-settings-DEFTQSp0.js → review-settings-ChOJMpqj.js} +1 -1
  245. package/dist/client/assets/{roles-BIj8m30-.js → roles-034YEIy0.js} +1 -1
  246. package/dist/client/assets/route-B9sbaFmI.js +1 -0
  247. package/dist/client/assets/{route-CwIKlFpH.js → route-D3_kGiYP.js} +1 -1
  248. package/dist/client/assets/{route-DQxiKHs8.js → route-DixoE7S2.js} +1 -1
  249. package/dist/client/assets/{sandbox-lifecycle-context-DMfngoi-.js → sandbox-lifecycle-context-DS1zxfZb.js} +1 -1
  250. package/dist/client/assets/{schema-DEyBWI2y.js → schema-DIZqRcY2.js} +1 -1
  251. package/dist/client/assets/{schema-DoiqvTL7.js → schema-DXQBt-Da.js} +1 -1
  252. package/dist/client/assets/{scroll-area-Cfsm1vBV.js → scroll-area-BYOXOcFm.js} +1 -1
  253. package/dist/client/assets/{search-input-DBKkXR0y.js → search-input-CM9T7koR.js} +1 -1
  254. package/dist/client/assets/{search-toggle-CzYTwp_L.js → search-toggle-BA_oiAdj.js} +1 -1
  255. package/dist/client/assets/{secret-picker-CqxG24X7.js → secret-picker-D2Cr-oRZ.js} +1 -1
  256. package/dist/client/assets/{secrets-CtByih4R.js → secrets-BRbaixQo.js} +1 -1
  257. package/dist/client/assets/section-array-field-TQFJqwVV.js +1 -0
  258. package/dist/client/assets/{sections-CCcpB_PT.js → sections-05hBo9NL.js} +1 -1
  259. package/dist/client/assets/sections-editor-BR_A8Bqr.js +1 -0
  260. package/dist/client/assets/{select-CTAm_W2d.js → select-BZ2tKCpr.js} +1 -1
  261. package/dist/client/assets/{select-model-Cvj2OnbU.js → select-model-DskJe0jJ.js} +1 -1
  262. package/dist/client/assets/seo-editor-DWsRiK1b.js +1 -0
  263. package/dist/client/assets/{separator-BeYssz5V.js → separator-DdBbm1xl.js} +1 -1
  264. package/dist/client/assets/settings-tab-5QV5D7iT.js +1 -0
  265. package/dist/client/assets/{sheet-C52S-h6R.js → sheet-DYw2VD7L.js} +1 -1
  266. package/dist/client/assets/{shell-layout-DYY0I41_.js → shell-layout-DQPoLlFW.js} +1 -1
  267. package/dist/client/assets/{site-draft-actions-DwqQ-cQC.js → site-draft-actions-dD4jyBUz.js} +7 -7
  268. package/dist/client/assets/site-draft-view-Ds5aQAqU.js +2 -0
  269. package/dist/client/assets/site-editor-D8vmphjE.js +1 -0
  270. package/dist/client/assets/{site-editor-toast-CT4NtD1f.js → site-editor-toast-gO0geSY6.js} +1 -1
  271. package/dist/client/assets/{skills-_WDetSCi.js → skills-BG0VOLIN.js} +1 -1
  272. package/dist/client/assets/{slider-rNbrBC-4.js → slider-ApiojjsY.js} +1 -1
  273. package/dist/client/assets/{sortable.esm-Cw5kBwgn.js → sortable.esm-DPfgkRcd.js} +1 -1
  274. package/dist/client/assets/{sso-DSG3YPMw.js → sso-CfSDpa9Z.js} +1 -1
  275. package/dist/client/assets/{suggestion-Dd_Uy5Bv.js → suggestion-DTo0Z5su.js} +1 -1
  276. package/dist/client/assets/{switch-nUFQi60k.js → switch-B3v6apDN.js} +1 -1
  277. package/dist/client/assets/{symbol-C3kEOGZ_.js → symbol-pDh9bf5z.js} +1 -1
  278. package/dist/client/assets/{synced-repos-DBmibobg.js → synced-repos-oiGV5Ihu.js} +1 -1
  279. package/dist/client/assets/{tab-icon-glyph-Bzpngl6a.js → tab-icon-glyph-BzFDI553.js} +1 -1
  280. package/dist/client/assets/{table-CxQHf5NT.js → table-CANIhtsr.js} +1 -1
  281. package/dist/client/assets/{tabs-BwD6LFyC.js → tabs-B5O9VNwn.js} +1 -1
  282. package/dist/client/assets/{task-assignee-avatar-Bg9ijzoY.js → task-assignee-avatar-BOAf_3H_.js} +1 -1
  283. package/dist/client/assets/{task-board-DreQgJBj.js → task-board-CBBaN9ua.js} +1 -1
  284. package/dist/client/assets/{task-route-B6QYswnx.js → task-route-1lojPQeZ.js} +1 -1
  285. package/dist/client/assets/{task-status-DcCdeelW.js → task-status-DM1NBqlc.js} +1 -1
  286. package/dist/client/assets/{taskboard-analytics-C_aUAX7S.js → taskboard-analytics-DK79qp1-.js} +1 -1
  287. package/dist/client/assets/tasks--LaoDxg8.js +1 -0
  288. package/dist/client/assets/{tasks-CYY9XlJ3.js → tasks-Czi5B_ZB.js} +1 -1
  289. package/dist/client/assets/{textarea-y7TWtoua.js → textarea-CAZh8Kr5.js} +1 -1
  290. package/dist/client/assets/{thread-analytics-BD8n1a8E.js → thread-analytics-K9PkKnHr.js} +1 -1
  291. package/dist/client/assets/{thread-intent-cB2EtHpg.js → thread-intent-B9ceQWmI.js} +1 -1
  292. package/dist/client/assets/{thread-route-D01w_vQB.js → thread-route-_-Jo9yAq.js} +1 -1
  293. package/dist/client/assets/{thread-route-Cr5f3jw8.js → thread-route-gmMlW4oz.js} +1 -1
  294. package/dist/client/assets/{thread-sheet-body-C0IyWshl.js → thread-sheet-body-ClyiLZhS.js} +1 -1
  295. package/dist/client/assets/{time-range-picker-bp6BeGMC.js → time-range-picker-m7OMfbU0.js} +1 -1
  296. package/dist/client/assets/{toggle-group-BIu6qfZV.js → toggle-group-8XrNtMoS.js} +1 -1
  297. package/dist/client/assets/{tool-namespace-Crbzrqv8.js → tool-namespace-cn6zTT0m.js} +1 -1
  298. package/dist/client/assets/{toolbar-icon-button-ByMmG3VL.js → toolbar-icon-button-fBm5AosV.js} +1 -1
  299. package/dist/client/assets/{tooltip-DibJz0Jl.js → tooltip-B1eS9Khq.js} +1 -1
  300. package/dist/client/assets/{tooltipContext-BzrsG1UN.js → tooltipContext-DMiC5t9-.js} +1 -1
  301. package/dist/client/assets/{track-C-8tVJFa.js → track-BcscPlt3.js} +1 -1
  302. package/dist/client/assets/{types-BdOsWOEi.js → types-C_LaIhQe.js} +1 -1
  303. package/dist/client/assets/{url-slug-CPCergXm.js → url-slug-BEmF9qH1.js} +1 -1
  304. package/dist/client/assets/{usage-stats-DDafRqWC.js → usage-stats-DtO_zGwF.js} +1 -1
  305. package/dist/client/assets/{use-ai-providers-Bsehd5pg.js → use-ai-providers-C315xBlf.js} +1 -1
  306. package/dist/client/assets/{use-apply-named-rule-CeNTU7vM.js → use-apply-named-rule-9ihG8ELj.js} +1 -1
  307. package/dist/client/assets/{use-automations-BscjsX1o.js → use-automations-BpSvam4M.js} +1 -1
  308. package/dist/client/assets/{use-autosave-D0y0c0lt.js → use-autosave-CRCl3eTr.js} +1 -1
  309. package/dist/client/assets/{use-chat-layout-state-DpOxQYv4.js → use-chat-layout-state-ByIICjWr.js} +1 -1
  310. package/dist/client/assets/{use-clock-tick-jRUiEK1v.js → use-clock-tick-QAJndZ00.js} +1 -1
  311. package/dist/client/assets/{use-connect-companion-BGtpVGmA.js → use-connect-companion-rEYy0Kcd.js} +1 -1
  312. package/dist/client/assets/{use-connection-CAR6Cxbr.js → use-connection-CBlLT-Gl.js} +1 -1
  313. package/dist/client/assets/{use-content-sync-bYlxy6np.js → use-content-sync-TKItZ8SP.js} +1 -1
  314. package/dist/client/assets/{use-copy-Dpm_jhm-.js → use-copy-C9NYM8DB.js} +1 -1
  315. package/dist/client/assets/{use-create-virtual-mcp-DcCX7uo7.js → use-create-virtual-mcp-DFsMYI92.js} +1 -1
  316. package/dist/client/assets/{use-date-fns-locale-hUyExEVb.js → use-date-fns-locale-bL-I5mOj.js} +1 -1
  317. package/dist/client/assets/{use-debounced-autosave-By6os5xD.js → use-debounced-autosave-DfJudaYl.js} +1 -1
  318. package/dist/client/assets/{use-debounced-value-BtR2lyTj.js → use-debounced-value-DOPKXMfX.js} +1 -1
  319. package/dist/client/assets/{use-deco-credits-DRIA1g3T.js → use-deco-credits-DL_DG4I5.js} +1 -1
  320. package/dist/client/assets/{use-decopilot-events-C4OBhauN.js → use-decopilot-events-4yDcDH2I.js} +1 -1
  321. package/dist/client/assets/{use-delete-connection-BM5PcuGQ.js → use-delete-connection-3ef0jZgj.js} +1 -1
  322. package/dist/client/assets/{use-deployment-admin-BmDeutjQ.js → use-deployment-admin-C2GaZpz9.js} +1 -1
  323. package/dist/client/assets/{use-fast-preview-draft-url-BUDoPHon.js → use-fast-preview-draft-url-CN-8cYCq.js} +1 -1
  324. package/dist/client/assets/{use-file-configs-CuVchUT-.js → use-file-configs-Dfr8whNN.js} +1 -1
  325. package/dist/client/assets/{use-inbox-feed-Bi03vVLM.js → use-inbox-feed-UXhkZ9eS.js} +1 -1
  326. package/dist/client/assets/{use-infinite-scroll-0YRynoMy.js → use-infinite-scroll-WEv8wBk9.js} +1 -1
  327. package/dist/client/assets/{use-join-requests-BhMSzUBO.js → use-join-requests-Bf1nx4BW.js} +1 -1
  328. package/dist/client/assets/{use-main-panel-tabs-QcdwwtJ8.js → use-main-panel-tabs-CnvhH3AB.js} +1 -1
  329. package/dist/client/assets/{use-mcp-auth-status-Ddp-NElL.js → use-mcp-auth-status-Dxn8Kcei.js} +1 -1
  330. package/dist/client/assets/{use-mcp-client-ClU7gdfw.js → use-mcp-client-BkBWhGyj.js} +1 -1
  331. package/dist/client/assets/{use-mcp-prompts-CFFfSPcj.js → use-mcp-prompts-DWjSk3XQ.js} +1 -1
  332. package/dist/client/assets/{use-mcp-tools-CsGOzrhW.js → use-mcp-tools-Cq-ES3mk.js} +1 -1
  333. package/dist/client/assets/{use-mobile-nW9hYb6L.js → use-mobile-BADuLdb7.js} +1 -1
  334. package/dist/client/assets/{use-move-blocks-BKlQlSno.js → use-move-blocks-Ds_0OJ4H.js} +1 -1
  335. package/dist/client/assets/{use-navigate-to-agent-CvuO-uuz.js → use-navigate-to-agent-B3bMlZK-.js} +1 -1
  336. package/dist/client/assets/{use-open-billing-url-6zduD8ZA.js → use-open-billing-url-Dfpg8Tio.js} +1 -1
  337. package/dist/client/assets/{use-org-fs-BcT14y41.js → use-org-fs-Dt6mQNyr.js} +1 -1
  338. package/dist/client/assets/{use-org-repo-syncs-BdTpYW4-.js → use-org-repo-syncs-D2j2_BKY.js} +1 -1
  339. package/dist/client/assets/{use-org-sso-DdzTjSOo.js → use-org-sso-CWvWEDQk.js} +1 -1
  340. package/dist/client/assets/{use-organization-roles-DQlsWqEE.js → use-organization-roles-DsjUZx1i.js} +1 -1
  341. package/dist/client/assets/{use-organization-settings-DeXdcCtZ.js → use-organization-settings-DBQ6GIch.js} +1 -1
  342. package/dist/client/assets/{use-panel-navigate-BrjENNrA.js → use-panel-navigate-DZO4-0o6.js} +1 -1
  343. package/dist/client/assets/{use-project-native-view-presence-OgGOYaV4.js → use-project-native-view-presence-Y3Sopx8q.js} +1 -1
  344. package/dist/client/assets/{use-project-scope-DryffHrf.js → use-project-scope-CKNjz3VB.js} +1 -1
  345. package/dist/client/assets/{use-recent-apps-CMgGjBH4.js → use-recent-apps-TrfPEwKE.js} +1 -1
  346. package/dist/client/assets/{use-releases-BQePeR_j.js → use-releases-DSFeRsP3.js} +1 -1
  347. package/dist/client/assets/{use-reports-diagnostic-KZB3C_26.js → use-reports-diagnostic-YBAEN0Wc.js} +1 -1
  348. package/dist/client/assets/{use-sandbox-events-ClbDdVRn.js → use-sandbox-events-C6ionJ0p.js} +1 -1
  349. package/dist/client/assets/{use-secrets-Cjihb12f.js → use-secrets-xwuuJgHg.js} +1 -1
  350. package/dist/client/assets/{use-section-preview-base-go9VMYa4.js → use-section-preview-base-BdMX2uY9.js} +1 -1
  351. package/dist/client/assets/{use-session-runtime-CQOTzbKn.js → use-session-runtime-CtTWKH1c.js} +1 -1
  352. package/dist/client/assets/{use-sidebar-collapsed-CUSnfCt-.js → use-sidebar-collapsed-DXyrU3VA.js} +1 -1
  353. package/dist/client/assets/{use-tags-CMyUN8Qd.js → use-tags-CwZHa3pE.js} +1 -1
  354. package/dist/client/assets/{use-task-board-analytics-BWzR51Kh.js → use-task-board-analytics-BzPvlYE9.js} +1 -1
  355. package/dist/client/assets/{use-task-board-events-DlFBtyOL.js → use-task-board-events-qI_skUMm.js} +1 -1
  356. package/dist/client/assets/{use-task-board-item-prs-D9Aj6NRX.js → use-task-board-item-prs-CiXpN6jW.js} +1 -1
  357. package/dist/client/assets/{use-task-metadata-DcdDwiSS.js → use-task-metadata-E8aNM85o.js} +1 -1
  358. package/dist/client/assets/{use-thread-analytics-cLhxQI8B.js → use-thread-analytics-DKupwFaR.js} +1 -1
  359. package/dist/client/assets/{use-thread-outputs-D8Bvo55q.js → use-thread-outputs-Di1RSISN.js} +1 -1
  360. package/dist/client/assets/useInfiniteQuery-CtWUiDbh.js +1 -0
  361. package/dist/client/assets/{useQueries-B8DPRYfS.js → useQueries-BOzKsoXi.js} +1 -1
  362. package/dist/client/assets/useSuspenseInfiniteQuery-Diw12fEI.js +1 -0
  363. package/dist/client/assets/{users-BIP3dsuH.js → users-Cup6bGNw.js} +1 -1
  364. package/dist/client/assets/{utils-DeFulDMz.js → utils-wTX1Gyo-.js} +1 -1
  365. package/dist/client/assets/{variant-calendar-C37bfPDk.js → variant-calendar-Doi5lHFb.js} +1 -1
  366. package/dist/client/assets/{variant-matcher-override-B4pYtxaz.js → variant-matcher-override-LGFgaSJn.js} +1 -1
  367. package/dist/client/assets/{virtual-mcp-D_aBBfQL.js → virtual-mcp-DO56RLOP.js} +1 -1
  368. package/dist/client/assets/{watch-sse-pool-Bk0Yni6j.js → watch-sse-pool-BBTCM7MS.js} +1 -1
  369. package/dist/client/index.html +1 -1
  370. package/dist/server/server.js +741 -741
  371. package/package.json +2 -2
  372. package/dist/client/assets/agent-analytics-Bd5QSkcr.js +0 -1
  373. package/dist/client/assets/agent-app-DSGhLy_N.js +0 -1
  374. package/dist/client/assets/agent-calendar-WpcQ_E3l.js +0 -1
  375. package/dist/client/assets/agent-deck-Y0SX6UB9.js +0 -1
  376. package/dist/client/assets/agent-experiments-XS7LGaQh.js +0 -1
  377. package/dist/client/assets/agent-library-CYxkIVFl.js +0 -1
  378. package/dist/client/assets/agent-library-file-DPhxbUtG.js +0 -1
  379. package/dist/client/assets/agent-monitor-C01cwPL-.js +0 -1
  380. package/dist/client/assets/agent-settings-B7CchDfJ.js +0 -1
  381. package/dist/client/assets/agent-site-editor-code-uiPbclqT.js +0 -2
  382. package/dist/client/assets/agent-site-editor-content-B9B2SztQ.js +0 -1
  383. package/dist/client/assets/agent-site-editor-preview-CQGXtn5w.js +0 -1
  384. package/dist/client/assets/agent-view-BNK8YJ86.js +0 -1
  385. package/dist/client/assets/api-keys-MofJBQfW.js +0 -1
  386. package/dist/client/assets/app-editor-BcJaA3eR.js +0 -1
  387. package/dist/client/assets/category-editor-lTx7E71S.js +0 -1
  388. package/dist/client/assets/cms-settings-editor-CjDcV3Uq.js +0 -1
  389. package/dist/client/assets/context-BakNzIE5.js +0 -1
  390. package/dist/client/assets/library-D2Mrm5WM.js +0 -1
  391. package/dist/client/assets/post-calendar-Ceopsk1u.js +0 -1
  392. package/dist/client/assets/project-reports-DZCmLCmE.js +0 -1
  393. package/dist/client/assets/project-tasks-D6qNETK3.js +0 -1
  394. package/dist/client/assets/record-editor-C5XOx_LV.js +0 -1
  395. package/dist/client/assets/redirect-editor-BxKT3ntE.js +0 -1
  396. package/dist/client/assets/reports-DBFNTtm-.js +0 -1
  397. package/dist/client/assets/repositories-C77B6dOt.js +0 -1
  398. package/dist/client/assets/route-L2EzRsks.js +0 -1
  399. package/dist/client/assets/secret-ciphertext-cTA7BSVY.js +0 -1
  400. package/dist/client/assets/sections-editor-DpO_mTF7.js +0 -1
  401. package/dist/client/assets/seo-editor-BPToAJRY.js +0 -1
  402. package/dist/client/assets/settings-tab-BRtykuoH.js +0 -1
  403. package/dist/client/assets/site-draft-view-CiKU2Icp.js +0 -2
  404. package/dist/client/assets/site-editor-CuXmo07G.js +0 -1
  405. package/dist/client/assets/tasks-CeouZ3tS.js +0 -1
  406. package/dist/client/assets/useInfiniteQuery-DWVaUM2t.js +0 -1
  407. package/dist/client/assets/useSuspenseInfiniteQuery-6Ovi3jRe.js +0 -1
@@ -1 +1 @@
1
- import{c as $,b as O,H as re,a as D,ap as G,j as s,n as M,r as R,a4 as B,h as q,l as I,L as ie,C as F,aq as ne,K as le,m as ae,B as ce,ad as me}from"./index-BNmzMNlZ.js";import{C as fe}from"./index-DusHyRie.js";import{b as Y}from"./input-BS4EACP3.js";import{D as W,a as U}from"./chat-context-C56OVvQP.js";import{a as J}from"./use-organization-settings-DeXdcCtZ.js";import{C as X,u as pe,F as ue,R as de,M as ge,a as he,b as xe,P as je}from"./project-feed-BcaTqzKD.js";import{a as be,r as ye,s as _e}from"./daily-pulse-BlxIy31E.js";import{N as Ne}from"./new-project-dialog-BzJmdXI6.js";import{P as ve}from"./projects-empty-state-Df7eS0pA.js";import{b as Z}from"./task-route-B6QYswnx.js";import{u as Se}from"./use-inbox-feed-Bi03vVLM.js";import{b as ke}from"./use-recent-apps-CMgGjBH4.js";import{s as Q}from"./use-project-scope-DryffHrf.js";import{b as V}from"./repository-binding-BZ7FmJ0X.js";import{s as we}from"./Plus-BfnmJh1R.js";import{i as He}from"./UserSquare-DsAVH788.js";import{E as Ce}from"./empty-state-Cc_qF1X6.js";import{R as $e}from"./repository-import-picker-Bjws7k2-.js";import{o as Ae}from"./shell-layout-DYY0I41_.js";import{i as Te,n as Pe}from"./ArrowUp-CRFAWnPc.js";import{A as Ee}from"./agent-icon-CVEMdYFU.js";import{u as Me}from"./use-navigate-to-agent-CvuO-uuz.js";import{s as Oe,r as Re}from"./project-profile-Cc4MG3QN.js";import{i as Be}from"./LinkBroken01-Ctb4MZUK.js";import"./use-mobile-nW9hYb6L.js";import"./use-sidebar-collapsed-CUSnfCt-.js";import"./use-chat-layout-state-DpOxQYv4.js";import"./thread-route-D01w_vQB.js";import"./use-panel-navigate-BrjENNrA.js";import"./thread-intent-cB2EtHpg.js";import"./use-mcp-client-ClU7gdfw.js";import"./auth-CEIITB7d.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Bk0Yni6j.js";import"./task-board-DreQgJBj.js";import"./schema-DoiqvTL7.js";import"./slugify-CEUa2lfQ.js";import"./tooltip-DibJz0Jl.js";import"./index-CaH8ekvn.js";import"./toolbar-icon-button-ByMmG3VL.js";import"./sheet-C52S-h6R.js";import"./resizable-BYZDi11K.js";import"./usage-stats-DDafRqWC.js";import"./tool-namespace-Crbzrqv8.js";import"./form-Gz8fbLdb.js";import"./label-BCxqhVIq.js";import"./utils-CVEq3hMx.js";import"./markdown-P8cO0xLZ.js";import"./use-copy-Dpm_jhm-.js";import"./Copy01-Tog1jA1S.js";import"./ZoomOut-B1U_CHeD.js";import"./location-V0VwTJTt.js";import"./use-decopilot-events-C4OBhauN.js";import"./XClose-DhoOL-T1.js";import"./icon-button-TQkFyvqB.js";import"./file-type-icon-may_hs3N.js";import"./autosend-CbkP_bEt.js";import"./chat-draft-DNgi8tda.js";import"./use-session-runtime-CQOTzbKn.js";import"./ShoppingBag01-usYkWunw.js";import"./Image01-CW7Pcq-W.js";import"./Upload01-Bo60o4T6.js";import"./AlertCircle-COLuN3Qe.js";import"./select-CTAm_W2d.js";import"./index-BdQq_4o_.js";import"./ChevronUp-4EkxqYyz.js";import"./ArrowLeft-BYNlToA0.js";import"./tabs-BwD6LFyC.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-DRIA1g3T.js";import"./use-ai-providers-Bsehd5pg.js";import"./toggle-group-BIu6qfZV.js";import"./use-open-billing-url-6zduD8ZA.js";import"./index-BNtuHmZB.js";import"./checkbox-B6N4ay58.js";import"./Minus-DoRDGpun.js";import"./ChevronSelectorVertical-Dwu4Nr-2.js";import"./Key01-D_nzK0xg.js";import"./Tool01-Bon-ixH5.js";import"./SearchMd-JUAl7Zv6.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-L9jyZGZ2.js";import"./popover-DauDBkON.js";import"./drawer-B7ajVnwC.js";import"./input-DZSiMfCa.js";import"./suggestion-Dd_Uy5Bv.js";import"./use-mcp-prompts-CFFfSPcj.js";import"./use-org-fs-BcT14y41.js";import"./useInfiniteQuery-DWVaUM2t.js";import"./infiniteQueryObserver-ClGIthQz.js";import"./Link01-CpcYQ7Qt.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-C1_xpbwO.js";import"./plan-ladder-CN5p5ylK.js";import"./add-connection-dialog-8gQOdlVv.js";import"./collection-search-BIuQ3VPN.js";import"./extract-connection-data-ClMH8dL9.js";import"./metadata-D72DunRR.js";import"./connection-CQKYiXol.js";import"./url-slug-CPCergXm.js";import"./connection-card-CvmG6XsV.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-BrTM8z-s.js";import"./textarea-y7TWtoua.js";import"./use-connection-CAR6Cxbr.js";import"./schema-DEyBWI2y.js";import"./connection-form-helpers-ytOA1Nl6.js";import"./Trash01-cH2tYIUn.js";import"./authenticate-and-persist-oauth-CN-ocXe3.js";import"./mcp-oauth-DBMA8wIh.js";import"./mcp-oauth-C9hLQucs.js";import"./collection-tabs-m2567Q_Z.js";import"./badge-DeNt4-FX.js";import"./use-infinite-scroll-0YRynoMy.js";import"./useSuspenseInfiniteQuery-6Ovi3jRe.js";import"./use-task-board-events-DlFBtyOL.js";import"./client-icons-DyjyTud6.js";import"./CheckCircle-DCMOdEuL.js";import"./chart-D9k22T0E.js";import"./index-DgWAoWIc.js";import"./symbol-C3kEOGZ_.js";import"./CategoricalChart-Bx8yFu23.js";import"./project-icon-9kbQzXfH.js";import"./project-apps-CNRV3DAE.js";import"./config-BmN9tmsx.js";import"./core.esm-BYOMVmVh.js";import"./ReferenceLine-DCCnHWMQ.js";import"./CartesianChart-Cjgu2ECY.js";import"./BarChart-JFNliGSV.js";import"./tooltipContext-BzrsG1UN.js";import"./ActiveShapeUtils-gwLrBsiR.js";import"./Sector-DL6Ad47o.js";import"./ErrorBarContext-C1p765z-.js";import"./repository-picker-DkvIZLAj.js";import"./use-debounced-value-BtR2lyTj.js";import"./task-assignee-avatar-Bg9ijzoY.js";import"./task-key-BCHdFiOO.js";import"./Building02-DinMBe3_.js";import"./use-clock-tick-jRUiEK1v.js";import"./command-N9BazZHl.js";import"./index-kd3fyZ9a.js";import"./required-auth-layout-Dn8nNstE.js";import"./use-org-sso-DdzTjSOo.js";import"./CreditCard01-B7MC6SfH.js";import"./DotsVertical-qUaZHjqd.js";import"./Globe04-CGEgYyKw.js";import"./SwitchHorizontal01-DcP8c_x_.js";import"./Sun-B7TolJAG.js";import"./Play-Du5BNsRy.js";import"./Users01-Bo_9DitT.js";function ee(t){return t<12?"morning":t<18?"afternoon":"evening"}function te(t){const e=(t??"").trim().split(/\s+/)[0];return e||null}function Ie(t,e){return e.toLocaleDateString(t,{weekday:"long",day:"numeric",month:"long"})}function Fe(t){return t==="morning"?"overnight":"today"}function Le(t,e){const r=new Date(e);return r.setHours(0,0,0,0),t==="morning"&&r.setHours(-6),r.getTime()}const De={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 ze(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex min-h-64 items-center justify-center",children:s.jsx(q,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function Ke(t,e,r,i,n){const l=Fe(r)==="overnight",a=[];if(e>0){const o=t(e===1?"home.brief.changeOne":"home.brief.changeMany",{count:e});a.push(t(l?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else i===0&&a.push(t(n>0?"home.brief.working":l?"home.brief.quietNight":"home.brief.quietDay"));return a.push(i===0?t("home.brief.waitingNone"):t(i===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:i})),a.join(" ")}function Ge(t){const e=$.c(40),{canManageProjects:r,eyebrow:i,greeting:n,slot:l}=t,a=O(),{org:o}=B(),{data:c}=D.useSession();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={pageSize:1e3},e[0]=m):m=e[0];const f=V(m),p=pe(),d=Se(),{recent:u}=ke(o.slug);let x,g;if(e[1]!==f||e[2]!==r||e[3]!==o.id){g=Symbol.for("react.early_return_sentinel");e:{let C;e[6]!==o.id?(C=A=>A.id!==o.id,e[6]=o.id,e[7]=C):C=e[7];const T=Q(f).filter(C);if(T.length===0){let A;e[8]!==r?(A=s.jsx(ve,{canCreate:r}),e[8]=r,e[9]=A):A=e[9],g=A;break e}x=Z(T)}e[1]=f,e[2]=r,e[3]=o.id,e[4]=x,e[5]=g}else x=e[4],g=e[5];if(g!==Symbol.for("react.early_return_sentinel"))return g;const j=x;let b,h;e[10]!==c?.user?.id||e[11]!==l||e[12]!==a||e[13]!==p?(h=be(p,c?.user?.id),b=Ke(a,_e(p,Le(l,new Date)),l,h.length,ye(p).length),e[10]=c?.user?.id,e[11]=l,e[12]=a,e[13]=p,e[14]=b,e[15]=h):(b=e[14],h=e[15]);const _=b;let y;e[16]!==i?(y=s.jsx("span",{className:"text-xs text-muted-foreground",children:i}),e[16]=i,e[17]=y):y=e[17];let N;e[18]!==_||e[19]!==n?(N=s.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[n," ",_]}),e[18]=_,e[19]=n,e[20]=N):N=e[20];let v;e[21]!==y||e[22]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[y,N]}),e[21]=y,e[22]=N,e[23]=v):v=e[23];let k;e[24]!==d.updates||e[25]!==j||e[26]!==o.slug||e[27]!==p||e[28]!==h?(k=s.jsx(ue,{waiting:h,tasks:p,mentions:d.updates,index:j,orgSlug:o.slug}),e[24]=d.updates,e[25]=j,e[26]=o.slug,e[27]=p,e[28]=h,e[29]=k):k=e[29];let S;e[30]!==o.slug||e[31]!==u?(S=s.jsx(de,{recent:u,orgSlug:o.slug}),e[30]=o.slug,e[31]=u,e[32]=S):S=e[32];let w;e[33]!==p?(w=s.jsx(ge,{tasks:p}),e[33]=p,e[34]=w):w=e[34];let H;return e[35]!==w||e[36]!==v||e[37]!==k||e[38]!==S?(H=s.jsxs("div",{className:"flex flex-col gap-8",children:[v,k,S,w]}),e[35]=w,e[36]=v,e[37]=k,e[38]=S,e[39]=H):H=e[39],H}function qe(){const t=$.c(25),e=O(),[r]=re(),i=J("home_task_intake_enabled"),{data:n}=D.useSession(),{granted:l}=G("agents:manage");let a,o,c;if(t[0]!==r.language||t[1]!==n?.user?.name||t[2]!==e){const h=new Date,_=te(n?.user?.name);o=ee(h.getHours());const y=De[o];a=Ie(r.language,h),c=_?e(y.named,{name:_}):e(y.bare),t[0]=r.language,t[1]=n?.user?.name,t[2]=e,t[3]=a,t[4]=o,t[5]=c}else a=t[3],o=t[4],c=t[5];const m=c;let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(X,{}),t[6]=f):f=t[6];let p;t[7]!==l?(p=l&&s.jsx(Ne,{source:"org_home_header"}),t[7]=l,t[8]=p):p=t[8];let d;t[9]!==p?(d=s.jsx(M.Actions,{secondary:f,children:p}),t[9]=p,t[10]=d):d=t[10];let u;t[11]!==i?(u=i&&s.jsx(R.Suspense,{fallback:null,children:s.jsx(W,{children:s.jsx(U,{children:s.jsx(Y,{homeTaskComposer:!0})})})}),t[11]=i,t[12]=u):u=t[12];let x;t[13]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ze,{}),t[13]=x):x=t[13];let g;t[14]!==l||t[15]!==a||t[16]!==m||t[17]!==o?(g=s.jsx(R.Suspense,{fallback:x,children:s.jsx(Ge,{canManageProjects:l,eyebrow:a,greeting:m,slot:o})}),t[14]=l,t[15]=a,t[16]=m,t[17]=o,t[18]=g):g=t[18];let j;t[19]!==u||t[20]!==g?(j=s.jsx(M.Content,{children:s.jsxs(M.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[u,g]})}),t[19]=u,t[20]=g,t[21]=j):j=t[21];let b;return t[22]!==d||t[23]!==j?(b=s.jsxs(M,{children:[d,j]}),t[22]=d,t[23]=j,t[24]=b):b=t[24],b}function Ye(t){const e=$.c(13),{label:r,count:i,action:n,children:l}=t;let a;e[0]!==i?(a=i!==void 0&&i>0&&s.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:i}),e[0]=i,e[1]=a):a=e[1];let o;e[2]!==r||e[3]!==a?(o=s.jsxs("h2",{className:"flex items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[r,a]}),e[2]=r,e[3]=a,e[4]=o):o=e[4];let c;e[5]!==n||e[6]!==o?(c=s.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[o,n]}),e[5]=n,e[6]=o,e[7]=c):c=e[7];let m;e[8]!==l?(m=s.jsx("ul",{className:"flex flex-col divide-y divide-border/70",children:l}),e[8]=l,e[9]=m):m=e[9];let f;return e[10]!==c||e[11]!==m?(f=s.jsxs("section",{className:"@container flex flex-col overflow-hidden surface",children:[c,m]}),e[10]=c,e[11]=m,e[12]=f):f=e[12],f}function se(t){const e=$.c(5),{children:r,className:i}=t;let n;e[0]!==i?(n=I("px-5 py-3.5 transition-colors hover:bg-accent",i),e[0]=i,e[1]=n):n=e[1];let l;return e[2]!==r||e[3]!==n?(l=s.jsx("li",{className:n,children:r}),e[2]=r,e[3]=n,e[4]=l):l=e[4],l}const We=56,Ue=16;function Je(t){const e=$.c(28),{series:r,className:i,label:n,height:l,stretch:a}=t,o=l===void 0?Ue:l,c=a===void 0?!1:a,m=Math.max(...r);if(r.length<2||m<=0)return null;const f=c?r.length*8:We,p=f/(r.length-1);let d;if(e[0]!==o||e[1]!==m||e[2]!==r||e[3]!==p){let v;e[5]!==o||e[6]!==m||e[7]!==p?(v=(S,w)=>({x:w*p,y:o-1-S/m*(o-2)}),e[5]=o,e[6]=m,e[7]=p,e[8]=v):v=e[8],d=r.map(v).map(Xe).join(" "),e[0]=o,e[1]=m,e[2]=r,e[3]=p,e[4]=d}else d=e[4];const u=d,x=`0 0 ${f} ${o}`,g=c?void 0:f,j=c?"none":void 0,b=c?"w-full":"shrink-0 overflow-visible";let h;e[9]!==i||e[10]!==b?(h=I(b,i),e[9]=i,e[10]=b,e[11]=h):h=e[11];let _;e[12]!==o||e[13]!==u||e[14]!==c||e[15]!==f?(_=c&&s.jsx("polygon",{points:`0,${o} ${u} ${f},${o}`,fill:"currentColor",opacity:.12}),e[12]=o,e[13]=u,e[14]=c,e[15]=f,e[16]=_):_=e[16];let y;e[17]!==u?(y=s.jsx("polyline",{points:u,fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"}),e[17]=u,e[18]=y):y=e[18];let N;return e[19]!==o||e[20]!==n||e[21]!==y||e[22]!==x||e[23]!==g||e[24]!==j||e[25]!==h||e[26]!==_?(N=s.jsxs("svg",{viewBox:x,width:g,height:o,role:"img","aria-label":n,preserveAspectRatio:j,className:h,children:[_,y]}),e[19]=o,e[20]=n,e[21]=y,e[22]=x,e[23]=g,e[24]=j,e[25]=h,e[26]=_,e[27]=N):N=e[27],N}function Xe(t){const{x:e,y:r}=t;return`${e.toFixed(1)},${r.toFixed(1)}`}const Ze={waiting:{labelKey:"home.projects.headlineWaiting",className:"text-foreground"},failed:{labelKey:"home.projects.headlineFailed",className:"text-destructive"},shipped:{labelKey:"home.projects.headlineShipped",className:"text-muted-foreground"},open:{labelKey:"home.projects.headlineOpen",className:"text-muted-foreground"}},z=6;function Qe(t){const e=$.c(10),{value:r,previous:i}=t,n=r-i;if(n===0)return null;const l=n>0?Te:Pe,a=n>0?"text-success":"text-muted-foreground";let o;e[0]!==a?(o=I("inline-flex items-center text-xs tabular-nums",a),e[0]=a,e[1]=o):o=e[1];let c;e[2]!==l?(c=s.jsx(l,{width:11,height:11,"aria-hidden":!0}),e[2]=l,e[3]=c):c=e[3];let m;e[4]!==n?(m=Math.abs(n),e[4]=n,e[5]=m):m=e[5];let f;return e[6]!==o||e[7]!==c||e[8]!==m?(f=s.jsxs("span",{className:o,children:[c,m]}),e[6]=o,e[7]=c,e[8]=m,e[9]=f):f=e[9],f}function Ve(t){const e=$.c(52),{project:r,summary:i,series:n}=t,l=O(),a=Me();let o;e[0]!==r?(o=Oe(Re(r).storeUrl),e[0]=r,e[1]=o):o=e[1];const c=o,m=i&&i.kind!=="quiet"?Ze[i.kind]:null,f=n.reduce(st,0),p=Math.floor(n.length/2);let d;e[2]!==p||e[3]!==n?(d=n.slice(0,p).reduce(tt,0),e[2]=p,e[3]=n,e[4]=d):d=e[4];const u=d;let x;e[5]!==p||e[6]!==n?(x=n.slice(p).reduce(et,0),e[5]=p,e[6]=n,e[7]=x):x=e[7];const g=x,j=r.title;let b;e[8]!==a||e[9]!==r.id?(b=()=>{F("org_home_project_clicked"),a(r.id)},e[8]=a,e[9]=r.id,e[10]=b):b=e[10];let h;e[11]!==r.icon||e[12]!==r.title?(h=s.jsx(Ee,{icon:r.icon,name:r.title,size:"xs"}),e[11]=r.icon,e[12]=r.title,e[13]=h):h=e[13];let _;e[14]!==r.title?(_=s.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:r.title}),e[14]=r.title,e[15]=_):_=e[15];let y;e[16]!==m||e[17]!==c||e[18]!==i||e[19]!==l?(y=m&&i?l(m.labelKey,{count:i.count}):c??l("home.projects.quiet"),e[16]=m,e[17]=c,e[18]=i,e[19]=l,e[20]=y):y=e[20];let N;e[21]!==y?(N=s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:y}),e[21]=y,e[22]=N):N=e[22];let v;e[23]!==_||e[24]!==N?(v=s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[_,N]}),e[23]=_,e[24]=N,e[25]=v):v=e[25];let k;e[26]!==r.title||e[27]!==l?(k=l("home.projects.rhythm",{name:r.title}),e[26]=r.title,e[27]=l,e[28]=k):k=e[28];let S;e[29]!==n||e[30]!==k?(S=s.jsx(Je,{series:n,className:"text-muted-foreground/60",label:k}),e[29]=n,e[30]=k,e[31]=S):S=e[31];const w=f>0?"text-foreground":"text-muted-foreground";let H;e[32]!==w?(H=I("text-sm tabular-nums",w),e[32]=w,e[33]=H):H=e[33];let C;e[34]!==f||e[35]!==H?(C=s.jsx("span",{className:H,children:f}),e[34]=f,e[35]=H,e[36]=C):C=e[36];let T;e[37]!==g||e[38]!==u?(T=s.jsx(Qe,{value:g,previous:u}),e[37]=g,e[38]=u,e[39]=T):T=e[39];let A;e[40]!==C||e[41]!==T?(A=s.jsxs("span",{className:"flex w-10 shrink-0 flex-col items-end",children:[C,T]}),e[40]=C,e[41]=T,e[42]=A):A=e[42];let P;e[43]!==S||e[44]!==A?(P=s.jsxs("span",{className:"flex shrink-0 items-center gap-2.5",children:[S,A]}),e[43]=S,e[44]=A,e[45]=P):P=e[45];let E;return e[46]!==r.title||e[47]!==v||e[48]!==P||e[49]!==b||e[50]!==h?(E=s.jsx(se,{className:"transition-colors hover:bg-accent",children:s.jsxs("button",{type:"button","aria-label":j,onClick:b,className:"flex w-full min-w-0 items-center gap-3 text-left",children:[h,v,P]})}),e[46]=r.title,e[47]=v,e[48]=P,e[49]=b,e[50]=h,e[51]=E):E=e[51],E}function et(t,e){return t+e}function tt(t,e){return t+e}function st(t,e){return t+e}const ot=new Map,rt=new Map;function it(t){const e=$.c(30),{projects:r,summaries:i,series:n}=t,l=i===void 0?ot:i,a=n===void 0?rt:n,o=O(),{org:c}=B();let m,f,p,d,u,x;if(e[0]!==r||e[1]!==a||e[2]!==l||e[3]!==o){const b=[...r].sort(nt).slice(0,z);f=r.length>z,m=Ye,e[10]!==o?(p=o("home.projects.heading"),e[10]=o,e[11]=p):p=e[11],d=r.length;let h;e[12]!==o?(h=o("home.projects.shippedCaption"),e[12]=o,e[13]=h):h=e[13],e[14]!==h?(u=s.jsx("span",{className:"hidden whitespace-nowrap text-xs text-muted-foreground @[19rem]:inline",children:h}),e[14]=h,e[15]=u):u=e[15];let _;e[16]!==a||e[17]!==l?(_=y=>s.jsx(Ve,{project:y,summary:l.get(y.id),series:a.get(y.id)??[]},y.id),e[16]=a,e[17]=l,e[18]=_):_=e[18],x=b.map(_),e[0]=r,e[1]=a,e[2]=l,e[3]=o,e[4]=m,e[5]=f,e[6]=p,e[7]=d,e[8]=u,e[9]=x}else m=e[4],f=e[5],p=e[6],d=e[7],u=e[8],x=e[9];let g;e[19]!==f||e[20]!==c||e[21]!==o?(g=f&&s.jsx(se,{className:"py-2",children:s.jsx(ie,{to:"/$org/settings/projects",params:{org:c.slug},className:"text-xs text-muted-foreground hover:text-foreground hover:underline",children:o("home.projects.seeAll")})}),e[19]=f,e[20]=c,e[21]=o,e[22]=g):g=e[22];let j;return e[23]!==m||e[24]!==p||e[25]!==d||e[26]!==u||e[27]!==x||e[28]!==g?(j=s.jsxs(m,{label:p,count:d,action:u,children:[x,g]}),e[23]=m,e[24]=p,e[25]=d,e[26]=u,e[27]=x,e[28]=g,e[29]=j):j=e[29],j}function nt(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function lt(){const t=$.c(10),{org:e}=B(),r=ne();let i;t[0]!==e.id?(i=le.orgHasSite(e.id),t[0]=e.id,t[1]=i):i=t[1];const n=!!e.id;let l;t[2]!==r?(l=()=>r.call("ORGANIZATION_HAS_SITE",{}),t[2]=r,t[3]=l):l=t[3];let a;t[4]!==i||t[5]!==n||t[6]!==l?(a={queryKey:i,staleTime:3e5,enabled:n,queryFn:l},t[4]=i,t[5]=n,t[6]=l,t[7]=a):a=t[7];const{data:o}=ae(a),c=o?.hasSite??!1;let m;return t[8]!==c?(m={hasSite:c},t[8]=c,t[9]=m):m=t[9],m}const at="https://www.youtube.com/playlist?list=PLZ4WtTgnJfBw";function ct(t){const e=$.c(4),{className:r}=t;let i,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("path",{fill:"#FF0000",d:"M27.4 3.1c-.3-1.2-1.3-2.2-2.5-2.5C22.7 0 14 0 14 0S5.3 0 3.1.6C1.9.9.9 1.9.6 3.1.1 5.3 0 8 0 10s.1 4.7.6 6.9c.3 1.2 1.3 2.2 2.5 2.5C5.3 20 14 20 14 20s8.7 0 10.9-.6c1.2-.3 2.2-1.3 2.5-2.5.5-2.2.6-4.9.6-6.9s-.1-4.7-.6-6.9z"}),n=s.jsx("path",{fill:"#fff",d:"M11.2 14.3l7.3-4.3-7.3-4.3z"}),e[0]=i,e[1]=n):(i=e[0],n=e[1]);let l;return e[2]!==r?(l=s.jsxs("svg",{viewBox:"0 0 28 20",className:r,"aria-hidden":"true",focusable:"false",children:[i,n]}),e[2]=r,e[3]=l):l=e[3],l}function mt(){const t=$.c(27),e=O(),{hasSite:r}=lt();if(!r)return null;let i;t[0]!==e?(i=e("home.orgHome.trainingThumbnailAlt"),t[0]=e,t[1]=i):i=t[1];let n;t[2]!==i?(n=s.jsx("img",{src:"/cms-training.jpg",alt:i,className:"size-full object-cover"}),t[2]=i,t[3]=n):n=t[3];let l;t[4]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20",children:s.jsx(ct,{className:"w-9"})}),t[4]=l):l=t[4];let a;t[5]!==n?(a=s.jsxs("div",{className:"relative aspect-video w-40 shrink-0 overflow-hidden rounded-lg",children:[n,l]}),t[5]=n,t[6]=a):a=t[6];let o;t[7]!==e?(o=e("home.orgHome.trainingEyebrow"),t[7]=e,t[8]=o):o=t[8];let c;t[9]!==o?(c=s.jsx("p",{className:"text-xs text-muted-foreground",children:o}),t[9]=o,t[10]=c):c=t[10];let m;t[11]!==e?(m=e("home.orgHome.trainingTitle"),t[11]=e,t[12]=m):m=t[12];let f;t[13]!==m?(f=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:m}),t[13]=m,t[14]=f):f=t[14];let p;t[15]!==e?(p=e("home.orgHome.trainingDescription"),t[15]=e,t[16]=p):p=t[16];let d;t[17]!==p?(d=s.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs text-muted-foreground",children:p}),t[17]=p,t[18]=d):d=t[18];let u;t[19]!==c||t[20]!==f||t[21]!==d?(u=s.jsxs("div",{className:"min-w-0 flex-1",children:[c,f,d]}),t[19]=c,t[20]=f,t[21]=d,t[22]=u):u=t[22];let x;t[23]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Be,{className:"size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),t[23]=x):x=t[23];let g;return t[24]!==u||t[25]!==a?(g=s.jsxs("a",{href:at,target:"_blank",rel:"noreferrer",onClick:ft,className:"group shadow-edge flex w-full items-center gap-4 rounded-2xl bg-card p-4 text-left transition-colors hover:bg-accent",children:[a,u,x]}),t[24]=u,t[25]=a,t[26]=g):g=t[26],g}function ft(){return F("cms_training_opened",{source:"org_home"})}const pt={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 ut(){const t=$.c(8),e=O();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(He,{className:"size-4 shrink-0 text-muted-foreground"}),t[0]=r):r=t[0];let i;t[1]!==e?(i=e("home.orgHome.searchPlaceholder"),t[1]=e,t[2]=i):i=t[2];let n;t[3]!==i?(n=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:i}),t[3]=i,t[4]=n):n=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("kbd",{className:"shrink-0 rounded-md border border-border bg-muted px-1.5 py-0.5 text-2xs font-medium text-muted-foreground",children:"⌘K"}),t[5]=l):l=t[5];let a;return t[6]!==n?(a=s.jsxs("button",{type:"button","data-testid":"org-home-search",onClick:dt,className:"shadow-edge flex w-full items-center gap-2 rounded-xl bg-card px-3 py-2.5 text-left transition-colors hover:bg-accent",children:[r,n,l]}),t[6]=n,t[7]=a):a=t[7],a}function dt(){F("command_palette_opened",{source:"org_home_search"}),Ae()}function K(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex min-h-64 items-center justify-center",children:s.jsx(q,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function gt(t){const e=$.c(28),{canManageAgents:r}=t,i=O(),{org:n}=B();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={pageSize:1e3},e[0]=l):l=e[0];const a=V(l),o=he();let c,m,f;if(e[1]!==a||e[2]!==r||e[3]!==n||e[4]!==i||e[5]!==o){f=Symbol.for("react.early_return_sentinel");e:{let g;if(e[9]!==n?(g=j=>j.id!==n.id,e[9]=n,e[10]=g):g=e[10],c=Q(a).filter(g),c.length===0){let j;e[11]!==i?(j=i("routes.agentsList.noAgentsYet"),e[11]=i,e[12]=j):j=e[12];let b;e[13]!==r||e[14]!==i?(b=i(r?"home.orgAgents.importToGetStarted":"routes.agentsList.askAdminToCreate"),e[13]=r,e[14]=i,e[15]=b):b=e[15];let h;e[16]!==j||e[17]!==b?(h=s.jsx("div",{className:"flex items-center justify-center py-10",children:s.jsx(Ce,{actions:!1,image:null,title:j,description:b})}),e[16]=j,e[17]=b,e[18]=h):h=e[18],f=h;break e}m=xe(Z(c),o,null)}e[1]=a,e[2]=r,e[3]=n,e[4]=i,e[5]=o,e[6]=c,e[7]=m,e[8]=f}else c=e[6],m=e[7],f=e[8];if(f!==Symbol.for("react.early_return_sentinel"))return f;const p=m.length>0;let d;e[19]!==c?(d=s.jsx(it,{projects:c}),e[19]=c,e[20]=d):d=e[20];let u;e[21]!==c||e[22]!==p||e[23]!==o?(u=p&&s.jsx(je,{projects:c,tasks:o}),e[21]=c,e[22]=p,e[23]=o,e[24]=u):u=e[24];let x;return e[25]!==d||e[26]!==u?(x=s.jsxs("div",{className:"flex flex-col gap-12",children:[d,u]}),e[25]=d,e[26]=u,e[27]=x):x=e[27],x}function ht(){const t=$.c(55),e=O(),r=J("home_task_intake_enabled"),{data:i}=D.useSession(),[n,l]=R.useState(!1),{granted:a}=G("agents:manage");let o,c,m,f,p,d,u,x,g,j,b,h;if(t[0]!==a||t[1]!==i?.user?.name||t[2]!==e){const A=te(i?.user?.name),P=pt[ee(new Date().getHours())];let E;t[15]!==e?(E=oe=>s.jsxs(ce,{size:"sm",variant:"default",onClick:()=>{F("agent_create_clicked",{source:oe,method:"github"}),l(!0)},children:[s.jsx(we,{size:14}),e("home.orgAgents.importFromGitHub")]}),t[15]=e,t[16]=E):E=t[16];const L=E;m=M,t[17]!==a||t[18]!==L?(h=a&&s.jsx(M.Actions,{children:L("org_home")}),t[17]=a,t[18]=L,t[19]=h):h=t[19],c=M.Content,o=M.Container,j="reading",b="flex flex-col gap-12",u="flex flex-col items-center gap-12 text-center",t[20]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(X,{dense:!1}),g=s.jsx(mt,{}),t[20]=x,t[21]=g):(x=t[20],g=t[21]),d="flex w-full flex-col items-center gap-5",f="text-3xl font-medium tracking-tight text-foreground",p=A?e(P.named,{name:A}):e(P.bare),t[0]=a,t[1]=i?.user?.name,t[2]=e,t[3]=o,t[4]=c,t[5]=m,t[6]=f,t[7]=p,t[8]=d,t[9]=u,t[10]=x,t[11]=g,t[12]=j,t[13]=b,t[14]=h}else o=t[3],c=t[4],m=t[5],f=t[6],p=t[7],d=t[8],u=t[9],x=t[10],g=t[11],j=t[12],b=t[13],h=t[14];let _;t[22]!==f||t[23]!==p?(_=s.jsx("h2",{className:f,children:p}),t[22]=f,t[23]=p,t[24]=_):_=t[24];let y;t[25]!==r?(y=r?s.jsx(R.Suspense,{fallback:s.jsx(K,{}),children:s.jsx(W,{children:s.jsx(U,{children:s.jsx(Y,{homeTaskComposer:!0})})})}):s.jsx(ut,{}),t[25]=r,t[26]=y):y=t[26];let N;t[27]!==y||t[28]!==d||t[29]!==_?(N=s.jsxs("div",{className:d,children:[_,y]}),t[27]=y,t[28]=d,t[29]=_,t[30]=N):N=t[30];let v;t[31]!==N||t[32]!==u||t[33]!==x||t[34]!==g?(v=s.jsxs("div",{className:u,children:[x,g,N]}),t[31]=N,t[32]=u,t[33]=x,t[34]=g,t[35]=v):v=t[35];let k;t[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(K,{}),t[36]=k):k=t[36];let S;t[37]!==a?(S=s.jsx(R.Suspense,{fallback:k,children:s.jsx(gt,{canManageAgents:a})}),t[37]=a,t[38]=S):S=t[38];let w;t[39]!==o||t[40]!==v||t[41]!==S||t[42]!==j||t[43]!==b?(w=s.jsxs(o,{width:j,className:b,children:[v,S]}),t[39]=o,t[40]=v,t[41]=S,t[42]=j,t[43]=b,t[44]=w):w=t[44];let H;t[45]!==c||t[46]!==w?(H=s.jsx(c,{children:w}),t[45]=c,t[46]=w,t[47]=H):H=t[47];let C;t[48]!==n?(C=s.jsx($e,{open:n,onOpenChange:l}),t[48]=n,t[49]=C):C=t[49];let T;return t[50]!==m||t[51]!==H||t[52]!==C||t[53]!==h?(T=s.jsxs(m,{children:[h,H,C]}),t[50]=m,t[51]=H,t[52]=C,t[53]=h,t[54]=T):T=t[54],T}function xt(){return me()?s.jsx(qe,{}):s.jsx(ht,{})}function ar(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(fe.Content,{children:s.jsx(xt,{})}),t[0]=e):e=t[0],e}export{ar as default};
1
+ import{c as $,b as O,H as re,a as D,ap as G,j as s,n as M,r as R,a4 as B,h as q,l as I,L as ie,C as F,aq as ne,K as le,m as ae,B as ce,ad as me}from"./index-C4tYnNih.js";import{C as fe}from"./index-CDfG-oXn.js";import{b as Y}from"./input-C0IBlV9i.js";import{D as W,a as U}from"./chat-context-CIOqAIIy.js";import{a as J}from"./use-organization-settings-DBQ6GIch.js";import{C as X,u as pe,F as ue,R as de,M as ge,a as he,b as xe,P as je}from"./project-feed-Dm5w30sM.js";import{a as be,r as ye,s as _e}from"./daily-pulse-ClSeB_Ta.js";import{N as Ne}from"./new-project-dialog-DQPlctqf.js";import{P as ve}from"./projects-empty-state-DRas-7X9.js";import{b as Z}from"./task-route-1lojPQeZ.js";import{u as Se}from"./use-inbox-feed-UXhkZ9eS.js";import{b as ke}from"./use-recent-apps-TrfPEwKE.js";import{s as Q}from"./use-project-scope-CKNjz3VB.js";import{b as V}from"./repository-binding-C7GXruB1.js";import{s as we}from"./Plus-CcJNnBya.js";import{i as He}from"./UserSquare-DwNuAluZ.js";import{E as Ce}from"./empty-state-D86P1Giw.js";import{R as $e}from"./repository-import-picker-BIFRKH2H.js";import{o as Ae}from"./shell-layout-DQPoLlFW.js";import{i as Te,n as Pe}from"./ArrowUp-CzX0fTk7.js";import{A as Ee}from"./agent-icon-KvVT3fA8.js";import{u as Me}from"./use-navigate-to-agent-B3bMlZK-.js";import{s as Oe,r as Re}from"./project-profile-Cc4MG3QN.js";import{i as Be}from"./LinkBroken01-XqJUgSE7.js";import"./use-mobile-BADuLdb7.js";import"./use-sidebar-collapsed-DXyrU3VA.js";import"./use-chat-layout-state-ByIICjWr.js";import"./thread-route-_-Jo9yAq.js";import"./use-panel-navigate-DZO4-0o6.js";import"./thread-intent-B9ceQWmI.js";import"./use-mcp-client-BkBWhGyj.js";import"./auth-Dqt9menC.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BBTCM7MS.js";import"./task-board-CBBaN9ua.js";import"./schema-DXQBt-Da.js";import"./slugify-CEUa2lfQ.js";import"./tooltip-B1eS9Khq.js";import"./index-B0Hb2bUK.js";import"./toolbar-icon-button-fBm5AosV.js";import"./sheet-DYw2VD7L.js";import"./resizable-B3zVq59U.js";import"./usage-stats-DtO_zGwF.js";import"./tool-namespace-cn6zTT0m.js";import"./form-CKF06Eu0.js";import"./label-Kngegn1Y.js";import"./utils-CVEq3hMx.js";import"./markdown-C-J5-sTt.js";import"./use-copy-C9NYM8DB.js";import"./Copy01-B9x501ud.js";import"./ZoomOut-CnbxUNSo.js";import"./location-V0VwTJTt.js";import"./use-decopilot-events-4yDcDH2I.js";import"./XClose-BBReaSBA.js";import"./icon-button-5JlhYc9R.js";import"./file-type-icon-tAeiI9_2.js";import"./autosend-BRUzWk70.js";import"./chat-draft-OR83_S8w.js";import"./use-session-runtime-CtTWKH1c.js";import"./ShoppingBag01-C82UeRR9.js";import"./Image01-ClayPF_a.js";import"./Upload01-mlw10ZK-.js";import"./AlertCircle-Bq5T03B8.js";import"./select-BZ2tKCpr.js";import"./index-BdQq_4o_.js";import"./ChevronUp-RlBkcpdd.js";import"./ArrowLeft-Bwi_Jr7f.js";import"./tabs-B5O9VNwn.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-DL_DG4I5.js";import"./use-ai-providers-C315xBlf.js";import"./toggle-group-8XrNtMoS.js";import"./use-open-billing-url-Dfpg8Tio.js";import"./index-CJ8-jtJ3.js";import"./checkbox-BQ7Ebuar.js";import"./Minus-Bh6ogRng.js";import"./ChevronSelectorVertical-DNrt0MHW.js";import"./Key01-CxKYO-oQ.js";import"./Tool01-BvlRH5Ln.js";import"./SearchMd-5lGv5a5H.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-BpzvJnXA.js";import"./popover-7hw0_Cgu.js";import"./drawer-GssD8cb3.js";import"./input-Drj3v1Rm.js";import"./suggestion-DTo0Z5su.js";import"./use-mcp-prompts-DWjSk3XQ.js";import"./use-org-fs-Dt6mQNyr.js";import"./useInfiniteQuery-CtWUiDbh.js";import"./infiniteQueryObserver-CyNcT3qz.js";import"./Link01-B7BHRxIW.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DpVlsq5a.js";import"./plan-ladder-Clu_D1dM.js";import"./add-connection-dialog-CEj8kbGq.js";import"./collection-search-Cf4li4kg.js";import"./extract-connection-data-DwkOg2rJ.js";import"./metadata-D72DunRR.js";import"./connection-QGwhnKZn.js";import"./url-slug-BEmF9qH1.js";import"./connection-card-DEMVrMsW.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-wG7mou98.js";import"./textarea-CAZh8Kr5.js";import"./use-connection-CBlLT-Gl.js";import"./schema-DIZqRcY2.js";import"./connection-form-helpers-DCRY9s0M.js";import"./Trash01-C9E8l_mI.js";import"./authenticate-and-persist-oauth-BziZaG_M.js";import"./mcp-oauth-CnB7EPe0.js";import"./mcp-oauth-5QMuPFQa.js";import"./collection-tabs-x8ccQUAC.js";import"./badge-Ckz5LqgP.js";import"./use-infinite-scroll-WEv8wBk9.js";import"./useSuspenseInfiniteQuery-Diw12fEI.js";import"./use-task-board-events-qI_skUMm.js";import"./client-icons-BOMFh2QS.js";import"./CheckCircle-BE1i_X4b.js";import"./chart-Bp6om7lj.js";import"./index-DMcUJv3F.js";import"./symbol-pDh9bf5z.js";import"./CategoricalChart-BDZ_2Tmn.js";import"./project-icon-BlULUcrw.js";import"./project-apps-M24hPHW2.js";import"./config-DBn3iCC3.js";import"./core.esm-B2cbbV3O.js";import"./ReferenceLine-CI6ZmeJ0.js";import"./CartesianChart-B0qX_dpC.js";import"./BarChart-wLDzzyOQ.js";import"./tooltipContext-DMiC5t9-.js";import"./ActiveShapeUtils-Bp4fmUBo.js";import"./Sector-gkUUnvA4.js";import"./ErrorBarContext-PGp8cmoe.js";import"./repository-picker-D6fEwnOk.js";import"./use-debounced-value-DOPKXMfX.js";import"./task-assignee-avatar-BOAf_3H_.js";import"./task-key-BCHdFiOO.js";import"./Building02-A_MT9tNO.js";import"./use-clock-tick-QAJndZ00.js";import"./command-MmMDew8i.js";import"./index-DG_Aoo8H.js";import"./required-auth-layout-D4yn4VOg.js";import"./use-org-sso-CWvWEDQk.js";import"./CreditCard01-Bu_qRR36.js";import"./DotsVertical-D9231JAc.js";import"./Globe04-DQlP6Nhr.js";import"./SwitchHorizontal01-B1MoYKPo.js";import"./Sun-IvvKZ51n.js";import"./Play-w4omVTRa.js";import"./Users01-DcHPIKgH.js";function ee(t){return t<12?"morning":t<18?"afternoon":"evening"}function te(t){const e=(t??"").trim().split(/\s+/)[0];return e||null}function Ie(t,e){return e.toLocaleDateString(t,{weekday:"long",day:"numeric",month:"long"})}function Fe(t){return t==="morning"?"overnight":"today"}function Le(t,e){const r=new Date(e);return r.setHours(0,0,0,0),t==="morning"&&r.setHours(-6),r.getTime()}const De={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 ze(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex min-h-64 items-center justify-center",children:s.jsx(q,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function Ke(t,e,r,i,n){const l=Fe(r)==="overnight",a=[];if(e>0){const o=t(e===1?"home.brief.changeOne":"home.brief.changeMany",{count:e});a.push(t(l?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else i===0&&a.push(t(n>0?"home.brief.working":l?"home.brief.quietNight":"home.brief.quietDay"));return a.push(i===0?t("home.brief.waitingNone"):t(i===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:i})),a.join(" ")}function Ge(t){const e=$.c(40),{canManageProjects:r,eyebrow:i,greeting:n,slot:l}=t,a=O(),{org:o}=B(),{data:c}=D.useSession();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={pageSize:1e3},e[0]=m):m=e[0];const f=V(m),p=pe(),d=Se(),{recent:u}=ke(o.slug);let x,g;if(e[1]!==f||e[2]!==r||e[3]!==o.id){g=Symbol.for("react.early_return_sentinel");e:{let C;e[6]!==o.id?(C=A=>A.id!==o.id,e[6]=o.id,e[7]=C):C=e[7];const T=Q(f).filter(C);if(T.length===0){let A;e[8]!==r?(A=s.jsx(ve,{canCreate:r}),e[8]=r,e[9]=A):A=e[9],g=A;break e}x=Z(T)}e[1]=f,e[2]=r,e[3]=o.id,e[4]=x,e[5]=g}else x=e[4],g=e[5];if(g!==Symbol.for("react.early_return_sentinel"))return g;const j=x;let b,h;e[10]!==c?.user?.id||e[11]!==l||e[12]!==a||e[13]!==p?(h=be(p,c?.user?.id),b=Ke(a,_e(p,Le(l,new Date)),l,h.length,ye(p).length),e[10]=c?.user?.id,e[11]=l,e[12]=a,e[13]=p,e[14]=b,e[15]=h):(b=e[14],h=e[15]);const _=b;let y;e[16]!==i?(y=s.jsx("span",{className:"text-xs text-muted-foreground",children:i}),e[16]=i,e[17]=y):y=e[17];let N;e[18]!==_||e[19]!==n?(N=s.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[n," ",_]}),e[18]=_,e[19]=n,e[20]=N):N=e[20];let v;e[21]!==y||e[22]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[y,N]}),e[21]=y,e[22]=N,e[23]=v):v=e[23];let k;e[24]!==d.updates||e[25]!==j||e[26]!==o.slug||e[27]!==p||e[28]!==h?(k=s.jsx(ue,{waiting:h,tasks:p,mentions:d.updates,index:j,orgSlug:o.slug}),e[24]=d.updates,e[25]=j,e[26]=o.slug,e[27]=p,e[28]=h,e[29]=k):k=e[29];let S;e[30]!==o.slug||e[31]!==u?(S=s.jsx(de,{recent:u,orgSlug:o.slug}),e[30]=o.slug,e[31]=u,e[32]=S):S=e[32];let w;e[33]!==p?(w=s.jsx(ge,{tasks:p}),e[33]=p,e[34]=w):w=e[34];let H;return e[35]!==w||e[36]!==v||e[37]!==k||e[38]!==S?(H=s.jsxs("div",{className:"flex flex-col gap-8",children:[v,k,S,w]}),e[35]=w,e[36]=v,e[37]=k,e[38]=S,e[39]=H):H=e[39],H}function qe(){const t=$.c(25),e=O(),[r]=re(),i=J("home_task_intake_enabled"),{data:n}=D.useSession(),{granted:l}=G("agents:manage");let a,o,c;if(t[0]!==r.language||t[1]!==n?.user?.name||t[2]!==e){const h=new Date,_=te(n?.user?.name);o=ee(h.getHours());const y=De[o];a=Ie(r.language,h),c=_?e(y.named,{name:_}):e(y.bare),t[0]=r.language,t[1]=n?.user?.name,t[2]=e,t[3]=a,t[4]=o,t[5]=c}else a=t[3],o=t[4],c=t[5];const m=c;let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(X,{}),t[6]=f):f=t[6];let p;t[7]!==l?(p=l&&s.jsx(Ne,{source:"org_home_header"}),t[7]=l,t[8]=p):p=t[8];let d;t[9]!==p?(d=s.jsx(M.Actions,{secondary:f,children:p}),t[9]=p,t[10]=d):d=t[10];let u;t[11]!==i?(u=i&&s.jsx(R.Suspense,{fallback:null,children:s.jsx(W,{children:s.jsx(U,{children:s.jsx(Y,{homeTaskComposer:!0})})})}),t[11]=i,t[12]=u):u=t[12];let x;t[13]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ze,{}),t[13]=x):x=t[13];let g;t[14]!==l||t[15]!==a||t[16]!==m||t[17]!==o?(g=s.jsx(R.Suspense,{fallback:x,children:s.jsx(Ge,{canManageProjects:l,eyebrow:a,greeting:m,slot:o})}),t[14]=l,t[15]=a,t[16]=m,t[17]=o,t[18]=g):g=t[18];let j;t[19]!==u||t[20]!==g?(j=s.jsx(M.Content,{children:s.jsxs(M.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[u,g]})}),t[19]=u,t[20]=g,t[21]=j):j=t[21];let b;return t[22]!==d||t[23]!==j?(b=s.jsxs(M,{children:[d,j]}),t[22]=d,t[23]=j,t[24]=b):b=t[24],b}function Ye(t){const e=$.c(13),{label:r,count:i,action:n,children:l}=t;let a;e[0]!==i?(a=i!==void 0&&i>0&&s.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:i}),e[0]=i,e[1]=a):a=e[1];let o;e[2]!==r||e[3]!==a?(o=s.jsxs("h2",{className:"flex items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[r,a]}),e[2]=r,e[3]=a,e[4]=o):o=e[4];let c;e[5]!==n||e[6]!==o?(c=s.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[o,n]}),e[5]=n,e[6]=o,e[7]=c):c=e[7];let m;e[8]!==l?(m=s.jsx("ul",{className:"flex flex-col divide-y divide-border/70",children:l}),e[8]=l,e[9]=m):m=e[9];let f;return e[10]!==c||e[11]!==m?(f=s.jsxs("section",{className:"@container flex flex-col overflow-hidden surface",children:[c,m]}),e[10]=c,e[11]=m,e[12]=f):f=e[12],f}function se(t){const e=$.c(5),{children:r,className:i}=t;let n;e[0]!==i?(n=I("px-5 py-3.5 transition-colors hover:bg-accent",i),e[0]=i,e[1]=n):n=e[1];let l;return e[2]!==r||e[3]!==n?(l=s.jsx("li",{className:n,children:r}),e[2]=r,e[3]=n,e[4]=l):l=e[4],l}const We=56,Ue=16;function Je(t){const e=$.c(28),{series:r,className:i,label:n,height:l,stretch:a}=t,o=l===void 0?Ue:l,c=a===void 0?!1:a,m=Math.max(...r);if(r.length<2||m<=0)return null;const f=c?r.length*8:We,p=f/(r.length-1);let d;if(e[0]!==o||e[1]!==m||e[2]!==r||e[3]!==p){let v;e[5]!==o||e[6]!==m||e[7]!==p?(v=(S,w)=>({x:w*p,y:o-1-S/m*(o-2)}),e[5]=o,e[6]=m,e[7]=p,e[8]=v):v=e[8],d=r.map(v).map(Xe).join(" "),e[0]=o,e[1]=m,e[2]=r,e[3]=p,e[4]=d}else d=e[4];const u=d,x=`0 0 ${f} ${o}`,g=c?void 0:f,j=c?"none":void 0,b=c?"w-full":"shrink-0 overflow-visible";let h;e[9]!==i||e[10]!==b?(h=I(b,i),e[9]=i,e[10]=b,e[11]=h):h=e[11];let _;e[12]!==o||e[13]!==u||e[14]!==c||e[15]!==f?(_=c&&s.jsx("polygon",{points:`0,${o} ${u} ${f},${o}`,fill:"currentColor",opacity:.12}),e[12]=o,e[13]=u,e[14]=c,e[15]=f,e[16]=_):_=e[16];let y;e[17]!==u?(y=s.jsx("polyline",{points:u,fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"}),e[17]=u,e[18]=y):y=e[18];let N;return e[19]!==o||e[20]!==n||e[21]!==y||e[22]!==x||e[23]!==g||e[24]!==j||e[25]!==h||e[26]!==_?(N=s.jsxs("svg",{viewBox:x,width:g,height:o,role:"img","aria-label":n,preserveAspectRatio:j,className:h,children:[_,y]}),e[19]=o,e[20]=n,e[21]=y,e[22]=x,e[23]=g,e[24]=j,e[25]=h,e[26]=_,e[27]=N):N=e[27],N}function Xe(t){const{x:e,y:r}=t;return`${e.toFixed(1)},${r.toFixed(1)}`}const Ze={waiting:{labelKey:"home.projects.headlineWaiting",className:"text-foreground"},failed:{labelKey:"home.projects.headlineFailed",className:"text-destructive"},shipped:{labelKey:"home.projects.headlineShipped",className:"text-muted-foreground"},open:{labelKey:"home.projects.headlineOpen",className:"text-muted-foreground"}},z=6;function Qe(t){const e=$.c(10),{value:r,previous:i}=t,n=r-i;if(n===0)return null;const l=n>0?Te:Pe,a=n>0?"text-success":"text-muted-foreground";let o;e[0]!==a?(o=I("inline-flex items-center text-xs tabular-nums",a),e[0]=a,e[1]=o):o=e[1];let c;e[2]!==l?(c=s.jsx(l,{width:11,height:11,"aria-hidden":!0}),e[2]=l,e[3]=c):c=e[3];let m;e[4]!==n?(m=Math.abs(n),e[4]=n,e[5]=m):m=e[5];let f;return e[6]!==o||e[7]!==c||e[8]!==m?(f=s.jsxs("span",{className:o,children:[c,m]}),e[6]=o,e[7]=c,e[8]=m,e[9]=f):f=e[9],f}function Ve(t){const e=$.c(52),{project:r,summary:i,series:n}=t,l=O(),a=Me();let o;e[0]!==r?(o=Oe(Re(r).storeUrl),e[0]=r,e[1]=o):o=e[1];const c=o,m=i&&i.kind!=="quiet"?Ze[i.kind]:null,f=n.reduce(st,0),p=Math.floor(n.length/2);let d;e[2]!==p||e[3]!==n?(d=n.slice(0,p).reduce(tt,0),e[2]=p,e[3]=n,e[4]=d):d=e[4];const u=d;let x;e[5]!==p||e[6]!==n?(x=n.slice(p).reduce(et,0),e[5]=p,e[6]=n,e[7]=x):x=e[7];const g=x,j=r.title;let b;e[8]!==a||e[9]!==r.id?(b=()=>{F("org_home_project_clicked"),a(r.id)},e[8]=a,e[9]=r.id,e[10]=b):b=e[10];let h;e[11]!==r.icon||e[12]!==r.title?(h=s.jsx(Ee,{icon:r.icon,name:r.title,size:"xs"}),e[11]=r.icon,e[12]=r.title,e[13]=h):h=e[13];let _;e[14]!==r.title?(_=s.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:r.title}),e[14]=r.title,e[15]=_):_=e[15];let y;e[16]!==m||e[17]!==c||e[18]!==i||e[19]!==l?(y=m&&i?l(m.labelKey,{count:i.count}):c??l("home.projects.quiet"),e[16]=m,e[17]=c,e[18]=i,e[19]=l,e[20]=y):y=e[20];let N;e[21]!==y?(N=s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:y}),e[21]=y,e[22]=N):N=e[22];let v;e[23]!==_||e[24]!==N?(v=s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[_,N]}),e[23]=_,e[24]=N,e[25]=v):v=e[25];let k;e[26]!==r.title||e[27]!==l?(k=l("home.projects.rhythm",{name:r.title}),e[26]=r.title,e[27]=l,e[28]=k):k=e[28];let S;e[29]!==n||e[30]!==k?(S=s.jsx(Je,{series:n,className:"text-muted-foreground/60",label:k}),e[29]=n,e[30]=k,e[31]=S):S=e[31];const w=f>0?"text-foreground":"text-muted-foreground";let H;e[32]!==w?(H=I("text-sm tabular-nums",w),e[32]=w,e[33]=H):H=e[33];let C;e[34]!==f||e[35]!==H?(C=s.jsx("span",{className:H,children:f}),e[34]=f,e[35]=H,e[36]=C):C=e[36];let T;e[37]!==g||e[38]!==u?(T=s.jsx(Qe,{value:g,previous:u}),e[37]=g,e[38]=u,e[39]=T):T=e[39];let A;e[40]!==C||e[41]!==T?(A=s.jsxs("span",{className:"flex w-10 shrink-0 flex-col items-end",children:[C,T]}),e[40]=C,e[41]=T,e[42]=A):A=e[42];let P;e[43]!==S||e[44]!==A?(P=s.jsxs("span",{className:"flex shrink-0 items-center gap-2.5",children:[S,A]}),e[43]=S,e[44]=A,e[45]=P):P=e[45];let E;return e[46]!==r.title||e[47]!==v||e[48]!==P||e[49]!==b||e[50]!==h?(E=s.jsx(se,{className:"transition-colors hover:bg-accent",children:s.jsxs("button",{type:"button","aria-label":j,onClick:b,className:"flex w-full min-w-0 items-center gap-3 text-left",children:[h,v,P]})}),e[46]=r.title,e[47]=v,e[48]=P,e[49]=b,e[50]=h,e[51]=E):E=e[51],E}function et(t,e){return t+e}function tt(t,e){return t+e}function st(t,e){return t+e}const ot=new Map,rt=new Map;function it(t){const e=$.c(30),{projects:r,summaries:i,series:n}=t,l=i===void 0?ot:i,a=n===void 0?rt:n,o=O(),{org:c}=B();let m,f,p,d,u,x;if(e[0]!==r||e[1]!==a||e[2]!==l||e[3]!==o){const b=[...r].sort(nt).slice(0,z);f=r.length>z,m=Ye,e[10]!==o?(p=o("home.projects.heading"),e[10]=o,e[11]=p):p=e[11],d=r.length;let h;e[12]!==o?(h=o("home.projects.shippedCaption"),e[12]=o,e[13]=h):h=e[13],e[14]!==h?(u=s.jsx("span",{className:"hidden whitespace-nowrap text-xs text-muted-foreground @[19rem]:inline",children:h}),e[14]=h,e[15]=u):u=e[15];let _;e[16]!==a||e[17]!==l?(_=y=>s.jsx(Ve,{project:y,summary:l.get(y.id),series:a.get(y.id)??[]},y.id),e[16]=a,e[17]=l,e[18]=_):_=e[18],x=b.map(_),e[0]=r,e[1]=a,e[2]=l,e[3]=o,e[4]=m,e[5]=f,e[6]=p,e[7]=d,e[8]=u,e[9]=x}else m=e[4],f=e[5],p=e[6],d=e[7],u=e[8],x=e[9];let g;e[19]!==f||e[20]!==c||e[21]!==o?(g=f&&s.jsx(se,{className:"py-2",children:s.jsx(ie,{to:"/$org/settings/projects",params:{org:c.slug},className:"text-xs text-muted-foreground hover:text-foreground hover:underline",children:o("home.projects.seeAll")})}),e[19]=f,e[20]=c,e[21]=o,e[22]=g):g=e[22];let j;return e[23]!==m||e[24]!==p||e[25]!==d||e[26]!==u||e[27]!==x||e[28]!==g?(j=s.jsxs(m,{label:p,count:d,action:u,children:[x,g]}),e[23]=m,e[24]=p,e[25]=d,e[26]=u,e[27]=x,e[28]=g,e[29]=j):j=e[29],j}function nt(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function lt(){const t=$.c(10),{org:e}=B(),r=ne();let i;t[0]!==e.id?(i=le.orgHasSite(e.id),t[0]=e.id,t[1]=i):i=t[1];const n=!!e.id;let l;t[2]!==r?(l=()=>r.call("ORGANIZATION_HAS_SITE",{}),t[2]=r,t[3]=l):l=t[3];let a;t[4]!==i||t[5]!==n||t[6]!==l?(a={queryKey:i,staleTime:3e5,enabled:n,queryFn:l},t[4]=i,t[5]=n,t[6]=l,t[7]=a):a=t[7];const{data:o}=ae(a),c=o?.hasSite??!1;let m;return t[8]!==c?(m={hasSite:c},t[8]=c,t[9]=m):m=t[9],m}const at="https://www.youtube.com/playlist?list=PLZ4WtTgnJfBw";function ct(t){const e=$.c(4),{className:r}=t;let i,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("path",{fill:"#FF0000",d:"M27.4 3.1c-.3-1.2-1.3-2.2-2.5-2.5C22.7 0 14 0 14 0S5.3 0 3.1.6C1.9.9.9 1.9.6 3.1.1 5.3 0 8 0 10s.1 4.7.6 6.9c.3 1.2 1.3 2.2 2.5 2.5C5.3 20 14 20 14 20s8.7 0 10.9-.6c1.2-.3 2.2-1.3 2.5-2.5.5-2.2.6-4.9.6-6.9s-.1-4.7-.6-6.9z"}),n=s.jsx("path",{fill:"#fff",d:"M11.2 14.3l7.3-4.3-7.3-4.3z"}),e[0]=i,e[1]=n):(i=e[0],n=e[1]);let l;return e[2]!==r?(l=s.jsxs("svg",{viewBox:"0 0 28 20",className:r,"aria-hidden":"true",focusable:"false",children:[i,n]}),e[2]=r,e[3]=l):l=e[3],l}function mt(){const t=$.c(27),e=O(),{hasSite:r}=lt();if(!r)return null;let i;t[0]!==e?(i=e("home.orgHome.trainingThumbnailAlt"),t[0]=e,t[1]=i):i=t[1];let n;t[2]!==i?(n=s.jsx("img",{src:"/cms-training.jpg",alt:i,className:"size-full object-cover"}),t[2]=i,t[3]=n):n=t[3];let l;t[4]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20",children:s.jsx(ct,{className:"w-9"})}),t[4]=l):l=t[4];let a;t[5]!==n?(a=s.jsxs("div",{className:"relative aspect-video w-40 shrink-0 overflow-hidden rounded-lg",children:[n,l]}),t[5]=n,t[6]=a):a=t[6];let o;t[7]!==e?(o=e("home.orgHome.trainingEyebrow"),t[7]=e,t[8]=o):o=t[8];let c;t[9]!==o?(c=s.jsx("p",{className:"text-xs text-muted-foreground",children:o}),t[9]=o,t[10]=c):c=t[10];let m;t[11]!==e?(m=e("home.orgHome.trainingTitle"),t[11]=e,t[12]=m):m=t[12];let f;t[13]!==m?(f=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:m}),t[13]=m,t[14]=f):f=t[14];let p;t[15]!==e?(p=e("home.orgHome.trainingDescription"),t[15]=e,t[16]=p):p=t[16];let d;t[17]!==p?(d=s.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs text-muted-foreground",children:p}),t[17]=p,t[18]=d):d=t[18];let u;t[19]!==c||t[20]!==f||t[21]!==d?(u=s.jsxs("div",{className:"min-w-0 flex-1",children:[c,f,d]}),t[19]=c,t[20]=f,t[21]=d,t[22]=u):u=t[22];let x;t[23]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Be,{className:"size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),t[23]=x):x=t[23];let g;return t[24]!==u||t[25]!==a?(g=s.jsxs("a",{href:at,target:"_blank",rel:"noreferrer",onClick:ft,className:"group shadow-edge flex w-full items-center gap-4 rounded-2xl bg-card p-4 text-left transition-colors hover:bg-accent",children:[a,u,x]}),t[24]=u,t[25]=a,t[26]=g):g=t[26],g}function ft(){return F("cms_training_opened",{source:"org_home"})}const pt={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 ut(){const t=$.c(8),e=O();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(He,{className:"size-4 shrink-0 text-muted-foreground"}),t[0]=r):r=t[0];let i;t[1]!==e?(i=e("home.orgHome.searchPlaceholder"),t[1]=e,t[2]=i):i=t[2];let n;t[3]!==i?(n=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:i}),t[3]=i,t[4]=n):n=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("kbd",{className:"shrink-0 rounded-md border border-border bg-muted px-1.5 py-0.5 text-2xs font-medium text-muted-foreground",children:"⌘K"}),t[5]=l):l=t[5];let a;return t[6]!==n?(a=s.jsxs("button",{type:"button","data-testid":"org-home-search",onClick:dt,className:"shadow-edge flex w-full items-center gap-2 rounded-xl bg-card px-3 py-2.5 text-left transition-colors hover:bg-accent",children:[r,n,l]}),t[6]=n,t[7]=a):a=t[7],a}function dt(){F("command_palette_opened",{source:"org_home_search"}),Ae()}function K(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex min-h-64 items-center justify-center",children:s.jsx(q,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function gt(t){const e=$.c(28),{canManageAgents:r}=t,i=O(),{org:n}=B();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={pageSize:1e3},e[0]=l):l=e[0];const a=V(l),o=he();let c,m,f;if(e[1]!==a||e[2]!==r||e[3]!==n||e[4]!==i||e[5]!==o){f=Symbol.for("react.early_return_sentinel");e:{let g;if(e[9]!==n?(g=j=>j.id!==n.id,e[9]=n,e[10]=g):g=e[10],c=Q(a).filter(g),c.length===0){let j;e[11]!==i?(j=i("routes.agentsList.noAgentsYet"),e[11]=i,e[12]=j):j=e[12];let b;e[13]!==r||e[14]!==i?(b=i(r?"home.orgAgents.importToGetStarted":"routes.agentsList.askAdminToCreate"),e[13]=r,e[14]=i,e[15]=b):b=e[15];let h;e[16]!==j||e[17]!==b?(h=s.jsx("div",{className:"flex items-center justify-center py-10",children:s.jsx(Ce,{actions:!1,image:null,title:j,description:b})}),e[16]=j,e[17]=b,e[18]=h):h=e[18],f=h;break e}m=xe(Z(c),o,null)}e[1]=a,e[2]=r,e[3]=n,e[4]=i,e[5]=o,e[6]=c,e[7]=m,e[8]=f}else c=e[6],m=e[7],f=e[8];if(f!==Symbol.for("react.early_return_sentinel"))return f;const p=m.length>0;let d;e[19]!==c?(d=s.jsx(it,{projects:c}),e[19]=c,e[20]=d):d=e[20];let u;e[21]!==c||e[22]!==p||e[23]!==o?(u=p&&s.jsx(je,{projects:c,tasks:o}),e[21]=c,e[22]=p,e[23]=o,e[24]=u):u=e[24];let x;return e[25]!==d||e[26]!==u?(x=s.jsxs("div",{className:"flex flex-col gap-12",children:[d,u]}),e[25]=d,e[26]=u,e[27]=x):x=e[27],x}function ht(){const t=$.c(55),e=O(),r=J("home_task_intake_enabled"),{data:i}=D.useSession(),[n,l]=R.useState(!1),{granted:a}=G("agents:manage");let o,c,m,f,p,d,u,x,g,j,b,h;if(t[0]!==a||t[1]!==i?.user?.name||t[2]!==e){const A=te(i?.user?.name),P=pt[ee(new Date().getHours())];let E;t[15]!==e?(E=oe=>s.jsxs(ce,{size:"sm",variant:"default",onClick:()=>{F("agent_create_clicked",{source:oe,method:"github"}),l(!0)},children:[s.jsx(we,{size:14}),e("home.orgAgents.importFromGitHub")]}),t[15]=e,t[16]=E):E=t[16];const L=E;m=M,t[17]!==a||t[18]!==L?(h=a&&s.jsx(M.Actions,{children:L("org_home")}),t[17]=a,t[18]=L,t[19]=h):h=t[19],c=M.Content,o=M.Container,j="reading",b="flex flex-col gap-12",u="flex flex-col items-center gap-12 text-center",t[20]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(X,{dense:!1}),g=s.jsx(mt,{}),t[20]=x,t[21]=g):(x=t[20],g=t[21]),d="flex w-full flex-col items-center gap-5",f="text-3xl font-medium tracking-tight text-foreground",p=A?e(P.named,{name:A}):e(P.bare),t[0]=a,t[1]=i?.user?.name,t[2]=e,t[3]=o,t[4]=c,t[5]=m,t[6]=f,t[7]=p,t[8]=d,t[9]=u,t[10]=x,t[11]=g,t[12]=j,t[13]=b,t[14]=h}else o=t[3],c=t[4],m=t[5],f=t[6],p=t[7],d=t[8],u=t[9],x=t[10],g=t[11],j=t[12],b=t[13],h=t[14];let _;t[22]!==f||t[23]!==p?(_=s.jsx("h2",{className:f,children:p}),t[22]=f,t[23]=p,t[24]=_):_=t[24];let y;t[25]!==r?(y=r?s.jsx(R.Suspense,{fallback:s.jsx(K,{}),children:s.jsx(W,{children:s.jsx(U,{children:s.jsx(Y,{homeTaskComposer:!0})})})}):s.jsx(ut,{}),t[25]=r,t[26]=y):y=t[26];let N;t[27]!==y||t[28]!==d||t[29]!==_?(N=s.jsxs("div",{className:d,children:[_,y]}),t[27]=y,t[28]=d,t[29]=_,t[30]=N):N=t[30];let v;t[31]!==N||t[32]!==u||t[33]!==x||t[34]!==g?(v=s.jsxs("div",{className:u,children:[x,g,N]}),t[31]=N,t[32]=u,t[33]=x,t[34]=g,t[35]=v):v=t[35];let k;t[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(K,{}),t[36]=k):k=t[36];let S;t[37]!==a?(S=s.jsx(R.Suspense,{fallback:k,children:s.jsx(gt,{canManageAgents:a})}),t[37]=a,t[38]=S):S=t[38];let w;t[39]!==o||t[40]!==v||t[41]!==S||t[42]!==j||t[43]!==b?(w=s.jsxs(o,{width:j,className:b,children:[v,S]}),t[39]=o,t[40]=v,t[41]=S,t[42]=j,t[43]=b,t[44]=w):w=t[44];let H;t[45]!==c||t[46]!==w?(H=s.jsx(c,{children:w}),t[45]=c,t[46]=w,t[47]=H):H=t[47];let C;t[48]!==n?(C=s.jsx($e,{open:n,onOpenChange:l}),t[48]=n,t[49]=C):C=t[49];let T;return t[50]!==m||t[51]!==H||t[52]!==C||t[53]!==h?(T=s.jsxs(m,{children:[h,H,C]}),t[50]=m,t[51]=H,t[52]=C,t[53]=h,t[54]=T):T=t[54],T}function xt(){return me()?s.jsx(qe,{}):s.jsx(ht,{})}function ar(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(fe.Content,{children:s.jsx(xt,{})}),t[0]=e):e=t[0],e}export{ar as default};
@@ -1 +1 @@
1
- import{c as f,j as p,B as h}from"./index-BNmzMNlZ.js";import{T as j,a as v,c as T}from"./tooltip-DibJz0Jl.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-C4tYnNih.js";import{T as j,a as v,c as T}from"./tooltip-B1eS9Khq.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,a4 as ht,b as Pe,j as t,B as je,t as dt,ai as Yt,aq as as,K as bt,m as Et,a5 as As,l as ot,gn as _s,o as cs,h as Ks,bA as Us,ab as Vs,L as qs,u as Hs,n as _t,C as Wt,M as Bs,bT as Js,gT as Gs,R as Qs,W as Ys,I as Xt}from"./index-BNmzMNlZ.js";import{S as Ws}from"./search-input-DBKkXR0y.js";import{E as Ht}from"./empty-state-Cc_qF1X6.js";import{R as Xs}from"./require-capability-Bm5pde_M.js";import{f as js}from"./pair-Dh_1oqHi.js";import{u as ts}from"./use-connection-CAR6Cxbr.js";import{g as Ps}from"./connection-slug-CITJ0kGN.js";import{B as Lt}from"./badge-DeNt4-FX.js";import{P as ds,a as ms,b as us}from"./popover-DauDBkON.js";import{c as Pt,T as Dt,a as Rt,b as Zs}from"./tooltip-DibJz0Jl.js";import{a as Ut}from"./Copy01-Tog1jA1S.js";import{n as Ns}from"./ZoomOut-B1U_CHeD.js";import{I as fs,bM as el,a0 as tl}from"./agent-icon-CVEMdYFU.js";import{i as sl}from"./Key01-D_nzK0xg.js";import{i as ll}from"./Play-Du5BNsRy.js";import{MonacoCodeEditor as bs}from"./monaco-editor-CBJkBgIU.js";import{u as rl}from"./use-mcp-client-ClU7gdfw.js";import{b as il}from"./repository-binding-BZ7FmJ0X.js";import{n as Ot}from"./LinkBroken01-Ctb4MZUK.js";import{c as ol}from"./SwitchHorizontal01-DcP8c_x_.js";import{s as nl}from"./Plus-BfnmJh1R.js";import{s as al}from"./Trash01-cH2tYIUn.js";import{M as zt}from"./multi-select-BNfLnIfI.js";import{b as yt,a as wt,c as ze,d as St,S as Ct}from"./select-CTAm_W2d.js";import{e as ys,T as cl}from"./time-range-picker-bp6BeGMC.js";import{T as dl}from"./textarea-y7TWtoua.js";import{C as Ds}from"./collection-tabs-m2567Q_Z.js";import{S as ml}from"./switch-nUFQi60k.js";import{L as ul}from"./label-BCxqhVIq.js";import{I as It}from"./integration-icon-BrTM8z-s.js";import{A as fl,a as xl,b as pl}from"./alert-CYZdSIKq.js";import{K as gt}from"./monitoring-stats-row-vWHUOUB3.js";import{c as Bt}from"./use-decopilot-events-C4OBhauN.js";import{g as gl,b as ws,f as Nt,c as Zt,d as hl,e as Ss,a as xs,h as vl,i as ps,T as jl,j as Nl,r as bl,k as yl}from"./thread-sheet-body-C0IyWshl.js";import{u as wl}from"./useSuspenseInfiniteQuery-6Ovi3jRe.js";import{c as Sl,S as Cl,b as Rs,a as Ls}from"./sheet-C52S-h6R.js";import{c as _e,b as vt,d as Jt,e as Gt,T as ge,a as Qt}from"./table-CxQHf5NT.js";import{n as ss,t as ls}from"./ChevronUp-4EkxqYyz.js";import{u as Os,A as Il}from"./automation-runs-KPGkDZAM.js";import{u as Fs}from"./use-infinite-scroll-0YRynoMy.js";import{u as Tl}from"./useInfiniteQuery-DWVaUM2t.js";import{g as kl}from"./task-status-DcCdeelW.js";import{u as Ml,d as _l}from"./use-automations-BscjsX1o.js";import{i as Pl}from"./ArrowLeft-BYNlToA0.js";import{E as Cs}from"./empty-state-RpLaBfip.js";import{O as $s}from"./watch-sse-pool-Bk0Yni6j.js";import{t as Dl}from"./task-key-BCHdFiOO.js";import{u as Rl,r as Ll,O as Ol,d as Fl}from"./order-monitor-day-BUk1fjA6.js";import{F as $l}from"./feature-gate-Wo8Dn-M0.js";import"./SearchMd-JUAl7Zv6.js";import"./access-gate-CGDwkzkf.js";import"./capability-load-error-juzFeQ-_.js";import"./Tool01-Bon-ixH5.js";import"./collapsible-D3gNdr7N.js";import"./use-copy-Dpm_jhm-.js";import"./usage-stats-DDafRqWC.js";import"./tool-namespace-Crbzrqv8.js";import"./form-Gz8fbLdb.js";import"./utils-CVEq3hMx.js";import"./markdown-P8cO0xLZ.js";import"./location-V0VwTJTt.js";import"./use-mobile-nW9hYb6L.js";import"./use-panel-navigate-BrjENNrA.js";import"./thread-route-D01w_vQB.js";import"./use-project-scope-DryffHrf.js";import"./chat-context-C56OVvQP.js";import"./autosend-CbkP_bEt.js";import"./thread-intent-cB2EtHpg.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./slugify-CEUa2lfQ.js";import"./use-ai-providers-Bsehd5pg.js";import"./use-organization-settings-DeXdcCtZ.js";import"./schema-DoiqvTL7.js";import"./task-board-DreQgJBj.js";import"./use-clock-tick-jRUiEK1v.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CKUvsXnq.js";import"./types-BdOsWOEi.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./AlertCircle-COLuN3Qe.js";import"./Image01-CW7Pcq-W.js";import"./XClose-DhoOL-T1.js";import"./ShoppingBag01-usYkWunw.js";import"./shell-layout-DYY0I41_.js";import"./Building02-DinMBe3_.js";import"./UserSquare-DsAVH788.js";import"./CheckCircle-DCMOdEuL.js";import"./Monitor01-L9jyZGZ2.js";import"./command-N9BazZHl.js";import"./index-kd3fyZ9a.js";import"./project-icon-9kbQzXfH.js";import"./new-project-dialog-BzJmdXI6.js";import"./repository-import-picker-Bjws7k2-.js";import"./use-navigate-to-agent-CvuO-uuz.js";import"./repository-picker-DkvIZLAj.js";import"./collection-search-BIuQ3VPN.js";import"./use-debounced-value-BtR2lyTj.js";import"./required-auth-layout-Dn8nNstE.js";import"./use-org-sso-DdzTjSOo.js";import"./Link01-CpcYQ7Qt.js";import"./use-mcp-prompts-CFFfSPcj.js";import"./use-thread-outputs-D8Bvo55q.js";import"./file-type-icon-may_hs3N.js";import"./index-CaH8ekvn.js";import"./ArrowUp-CRFAWnPc.js";import"./ChevronSelectorVertical-Dwu4Nr-2.js";import"./CreditCard01-B7MC6SfH.js";import"./DotsVertical-qUaZHjqd.js";import"./Globe04-CGEgYyKw.js";import"./Minus-DoRDGpun.js";import"./Sun-B7TolJAG.js";import"./Upload01-Bo60o4T6.js";import"./Users01-Bo_9DitT.js";import"./editor-B7sIq_vQ.js";import"./auth-CEIITB7d.js";import"./checkbox-B6N4ay58.js";import"./index-BdQq_4o_.js";import"./scroll-area-Cfsm1vBV.js";import"./calendar-GMyXKkbA.js";import"./chart-D9k22T0E.js";import"./index-DgWAoWIc.js";import"./symbol-C3kEOGZ_.js";import"./CategoricalChart-Bx8yFu23.js";import"./CartesianChart-Cjgu2ECY.js";import"./AreaChart-Dud7jvcC.js";import"./tooltipContext-BzrsG1UN.js";import"./BarChart-JFNliGSV.js";import"./ActiveShapeUtils-gwLrBsiR.js";import"./Sector-DL6Ad47o.js";import"./ErrorBarContext-C1p765z-.js";import"./infiniteQueryObserver-ClGIthQz.js";import"./useQueries-B8DPRYfS.js";import"./ReferenceLine-DCCnHWMQ.js";import"./feature-paywall-C1_xpbwO.js";import"./plan-ladder-CN5p5ylK.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},zl=["eq","contains","exists","in"];function El(s){return zl.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 Al(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:i&&El(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,a4 as ht,b as Pe,j as t,B as je,t as dt,ai as Yt,aq as as,K as bt,m as Et,a5 as As,l as ot,gn as _s,o as cs,h as Ks,bA as Us,ab as Vs,L as qs,u as Hs,n as _t,C as Wt,M as Bs,bT as Js,gT as Gs,R as Qs,W as Ys,I as Xt}from"./index-C4tYnNih.js";import{S as Ws}from"./search-input-CM9T7koR.js";import{E as Ht}from"./empty-state-D86P1Giw.js";import{R as Xs}from"./require-capability-DSeRbn1u.js";import{f as js}from"./pair-CRFLUGB-.js";import{u as ts}from"./use-connection-CBlLT-Gl.js";import{g as Ps}from"./connection-slug-CITJ0kGN.js";import{B as Lt}from"./badge-Ckz5LqgP.js";import{P as ds,a as ms,b as us}from"./popover-7hw0_Cgu.js";import{c as Pt,T as Dt,a as Rt,b as Zs}from"./tooltip-B1eS9Khq.js";import{a as Ut}from"./Copy01-B9x501ud.js";import{n as Ns}from"./ZoomOut-CnbxUNSo.js";import{I as fs,bM as el,a0 as tl}from"./agent-icon-KvVT3fA8.js";import{i as sl}from"./Key01-CxKYO-oQ.js";import{i as ll}from"./Play-w4omVTRa.js";import{MonacoCodeEditor as bs}from"./monaco-editor-CG1RPml4.js";import{u as rl}from"./use-mcp-client-BkBWhGyj.js";import{b as il}from"./repository-binding-C7GXruB1.js";import{n as Ot}from"./LinkBroken01-XqJUgSE7.js";import{c as ol}from"./SwitchHorizontal01-B1MoYKPo.js";import{s as nl}from"./Plus-CcJNnBya.js";import{s as al}from"./Trash01-C9E8l_mI.js";import{M as zt}from"./multi-select-D79TIC6v.js";import{b as yt,a as wt,c as ze,d as St,S as Ct}from"./select-BZ2tKCpr.js";import{e as ys,T as cl}from"./time-range-picker-m7OMfbU0.js";import{T as dl}from"./textarea-CAZh8Kr5.js";import{C as Ds}from"./collection-tabs-x8ccQUAC.js";import{S as ml}from"./switch-B3v6apDN.js";import{L as ul}from"./label-Kngegn1Y.js";import{I as It}from"./integration-icon-wG7mou98.js";import{A as fl,a as xl,b as pl}from"./alert-DEw5BVAh.js";import{K as gt}from"./monitoring-stats-row-BpfaRq5_.js";import{c as Bt}from"./use-decopilot-events-4yDcDH2I.js";import{g as gl,b as ws,f as Nt,c as Zt,d as hl,e as Ss,a as xs,h as vl,i as ps,T as jl,j as Nl,r as bl,k as yl}from"./thread-sheet-body-ClyiLZhS.js";import{u as wl}from"./useSuspenseInfiniteQuery-Diw12fEI.js";import{c as Sl,S as Cl,b as Rs,a as Ls}from"./sheet-DYw2VD7L.js";import{c as _e,b as vt,d as Jt,e as Gt,T as ge,a as Qt}from"./table-CANIhtsr.js";import{n as ss,t as ls}from"./ChevronUp-RlBkcpdd.js";import{u as Os,A as Il}from"./automation-runs-C0-BhIZn.js";import{u as Fs}from"./use-infinite-scroll-WEv8wBk9.js";import{u as Tl}from"./useInfiniteQuery-CtWUiDbh.js";import{g as kl}from"./task-status-DM1NBqlc.js";import{u as Ml,d as _l}from"./use-automations-BpSvam4M.js";import{i as Pl}from"./ArrowLeft-Bwi_Jr7f.js";import{E as Cs}from"./empty-state-DLNzdrwg.js";import{O as $s}from"./watch-sse-pool-BBTCM7MS.js";import{t as Dl}from"./task-key-BCHdFiOO.js";import{u as Rl,r as Ll,O as Ol,d as Fl}from"./order-monitor-day-DzTTlxAw.js";import{F as $l}from"./feature-gate-BIwsQPiQ.js";import"./SearchMd-5lGv5a5H.js";import"./access-gate-BNOWXoYR.js";import"./capability-load-error-CRB9otZt.js";import"./Tool01-BvlRH5Ln.js";import"./collapsible-BB8_usPT.js";import"./use-copy-C9NYM8DB.js";import"./usage-stats-DtO_zGwF.js";import"./tool-namespace-cn6zTT0m.js";import"./form-CKF06Eu0.js";import"./utils-CVEq3hMx.js";import"./markdown-C-J5-sTt.js";import"./location-V0VwTJTt.js";import"./use-mobile-BADuLdb7.js";import"./use-panel-navigate-DZO4-0o6.js";import"./thread-route-_-Jo9yAq.js";import"./use-project-scope-CKNjz3VB.js";import"./chat-context-CIOqAIIy.js";import"./autosend-BRUzWk70.js";import"./thread-intent-B9ceQWmI.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./slugify-CEUa2lfQ.js";import"./use-ai-providers-C315xBlf.js";import"./use-organization-settings-DBQ6GIch.js";import"./schema-DXQBt-Da.js";import"./task-board-CBBaN9ua.js";import"./use-clock-tick-QAJndZ00.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-vHEVQIZL.js";import"./types-C_LaIhQe.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./AlertCircle-Bq5T03B8.js";import"./Image01-ClayPF_a.js";import"./XClose-BBReaSBA.js";import"./ShoppingBag01-C82UeRR9.js";import"./shell-layout-DQPoLlFW.js";import"./Building02-A_MT9tNO.js";import"./UserSquare-DwNuAluZ.js";import"./CheckCircle-BE1i_X4b.js";import"./Monitor01-BpzvJnXA.js";import"./command-MmMDew8i.js";import"./index-DG_Aoo8H.js";import"./project-icon-BlULUcrw.js";import"./new-project-dialog-DQPlctqf.js";import"./repository-import-picker-BIFRKH2H.js";import"./use-navigate-to-agent-B3bMlZK-.js";import"./repository-picker-D6fEwnOk.js";import"./collection-search-Cf4li4kg.js";import"./use-debounced-value-DOPKXMfX.js";import"./required-auth-layout-D4yn4VOg.js";import"./use-org-sso-CWvWEDQk.js";import"./Link01-B7BHRxIW.js";import"./use-mcp-prompts-DWjSk3XQ.js";import"./use-thread-outputs-Di1RSISN.js";import"./file-type-icon-tAeiI9_2.js";import"./index-B0Hb2bUK.js";import"./ArrowUp-CzX0fTk7.js";import"./ChevronSelectorVertical-DNrt0MHW.js";import"./CreditCard01-Bu_qRR36.js";import"./DotsVertical-D9231JAc.js";import"./Globe04-DQlP6Nhr.js";import"./Minus-Bh6ogRng.js";import"./Sun-IvvKZ51n.js";import"./Upload01-mlw10ZK-.js";import"./Users01-DcHPIKgH.js";import"./editor-BTovmEAS.js";import"./auth-Dqt9menC.js";import"./checkbox-BQ7Ebuar.js";import"./index-BdQq_4o_.js";import"./scroll-area-BYOXOcFm.js";import"./calendar-DkZz5VlH.js";import"./chart-Bp6om7lj.js";import"./index-DMcUJv3F.js";import"./symbol-pDh9bf5z.js";import"./CategoricalChart-BDZ_2Tmn.js";import"./CartesianChart-B0qX_dpC.js";import"./AreaChart-CCyND0Jp.js";import"./tooltipContext-DMiC5t9-.js";import"./BarChart-wLDzzyOQ.js";import"./ActiveShapeUtils-Bp4fmUBo.js";import"./Sector-gkUUnvA4.js";import"./ErrorBarContext-PGp8cmoe.js";import"./infiniteQueryObserver-CyNcT3qz.js";import"./useQueries-BOzKsoXi.js";import"./ReferenceLine-CI6ZmeJ0.js";import"./feature-paywall-DpVlsq5a.js";import"./plan-ladder-Clu_D1dM.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},zl=["eq","contains","exists","in"];function El(s){return zl.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 Al(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:i&&El(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 Is(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 Kl(s){const e={},l={},i=[],m={};for(const n of s)if(n.key.trim())switch(n.operator){case"eq":n.value&&(e[n.key]=n.value);break;case"contains":n.value&&(l[n.key]=`%${n.value}%`);break;case"exists":i.push(n.key);break;case"in":n.value&&(m[n.key]=n.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,cz as o}from"./index-BNmzMNlZ.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,cz as o}from"./index-C4tYnNih.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 l,cu as ce,j as p,cA as _,cz as T,cx as C,cE as le,ct as de,cQ as ue,cM as fe,cF as me}from"./index-BNmzMNlZ.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,V]=W(M),Q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),j=l.useRef(S);function B(b){const y=ye(S,b);A(b,y)}function se(b){A(b,f.current)}function ae(){const b=j.current[f.current];S[f.current]!==b&&d(S)}function A(b,y,{commit:k}={commit:!1}){const F=_e(c),z=Ce(Math.round((b-n)/c)*c+n,F),I=Y(z,[n,s]);K((D=[])=>{const P=be(D,I,y);if(De(P,u*c)){f.current=P.indexOf(I);const U=String(P)!==String(D);return U&&k&&d(P),U?P:D}else return D})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(j.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:B,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&A(n,0,{commit:!0}),onEndKeyDown:()=>!a&&A(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const z=$.includes(b.key)||b.shiftKey&&X.includes(b.key)?10:1,I=f.current,D=S[I],P=c*z*y;A(D+P,I,{commit:!0})}}})})})})});Q.displayName=M;var[q,J]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function E(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],B=O(K,f?[o,n]:[n,o]);return R.current=S,B(x-S.left)}return p.jsx(q,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=E(x.clientX);r?.(S)},onSlideMove:x=>{const S=E(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(q,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=V(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(X).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(N,o),c=J(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=V(L,o),a=J(L,o),[u,w]=l.useState(null),h=C(t,E=>w(E)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function Ee(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function De(e,t){if(t>0){const o=Ee(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ae=Q,Ie=te,Te=ne,Ve=oe;export{Te as R,Ie as T,Ae as a,Ve as b};
1
+ import{r as l,cu as ce,j as p,cA as _,cz as T,cx as C,cE as le,ct as de,cQ as ue,cM as fe,cF as me}from"./index-C4tYnNih.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,V]=W(M),Q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),j=l.useRef(S);function B(b){const y=ye(S,b);A(b,y)}function se(b){A(b,f.current)}function ae(){const b=j.current[f.current];S[f.current]!==b&&d(S)}function A(b,y,{commit:k}={commit:!1}){const F=_e(c),z=Ce(Math.round((b-n)/c)*c+n,F),I=Y(z,[n,s]);K((D=[])=>{const P=be(D,I,y);if(De(P,u*c)){f.current=P.indexOf(I);const U=String(P)!==String(D);return U&&k&&d(P),U?P:D}else return D})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(j.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:B,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&A(n,0,{commit:!0}),onEndKeyDown:()=>!a&&A(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const z=$.includes(b.key)||b.shiftKey&&X.includes(b.key)?10:1,I=f.current,D=S[I],P=c*z*y;A(D+P,I,{commit:!0})}}})})})})});Q.displayName=M;var[q,J]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function E(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],B=O(K,f?[o,n]:[n,o]);return R.current=S,B(x-S.left)}return p.jsx(q,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=E(x.clientX);r?.(S)},onSlideMove:x=>{const S=E(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(q,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=V(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(X).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(N,o),c=J(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=V(L,o),a=J(L,o),[u,w]=l.useState(null),h=C(t,E=>w(E)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function Ee(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function De(e,t){if(t>0){const o=Ee(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ae=Q,Ie=te,Te=ne,Ve=oe;export{Te as R,Ie as T,Ae as a,Ve as b};
@@ -1,4 +1,4 @@
1
- import{c as $,b as j,r as E,j as b,l as q,ai as vt,t as ue,b7 as Xe,a4 as At,gC as Mt,m as St,K as Ct,bP as Rt,h as Je,o as Et}from"./index-BNmzMNlZ.js";import{a as $t,n as Ye,E as ie,o as _t,x as Lt,y as P,z as It,A as zt,B as et,C as N,G as Ee,H as Pt,I as Ht,J as $e,K as jt,L as V,N as D,m as H,O as Y,T as tt,R as ke,Q as xe,U as Nt,V as Ot,W as Bt,X as Dt,Y as Ft,s as qt,Z as Wt,u as Ut,b as Gt}from"./usage-stats-DDafRqWC.js";import{T as _,n as Zt,i as Vt,E as Kt}from"./editor-classes-BinXFbFk.js";import{a as Qt,e as nt,s as Xt,S as Jt}from"./suggestion-Dd_Uy5Bv.js";import{B as Yt,c as en,t as tn,C as rt,f as nn,g as _e,s as rn,m as Le,a as Ie,b as sn,d as ze,e as an,h as on,i as ln,j as cn,k as un,l as hn,n as dn}from"./index-iynQP1if.js";import{ai as pn,aj as fn,al as gn,a0 as mn,be as kn,aW as xn}from"./agent-icon-CVEMdYFU.js";import{i as bn}from"./SwitchHorizontal01-DcP8c_x_.js";import{i as wn}from"./Link01-CpcYQ7Qt.js";import{s as yn}from"./Trash01-cH2tYIUn.js";import{i as Tn,b as vn}from"./use-org-fs-BcT14y41.js";import{E as Pe,i as st,b as An,c as Mn,d as it,A as Sn,e as Cn,m as Rn,f as En}from"./markdown-P8cO0xLZ.js";import{d as $n,e as _n,c as Ln,C as In,b as zn}from"./command-N9BazZHl.js";import{I as Pn}from"./icon-button-TQkFyvqB.js";function Hn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const M=n.getAttributes("link").href;l(typeof M=="string"?M:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const M=Zt(a);if(M===""){g();return}if(!Vt(M)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:M}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let w;e[11]!==r?(w=r("markdownEditor.link"),e[11]=r,e[12]=w):w=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=b.jsx(wn,{size:14}),e[13]=y):y=e[13];let T;e[14]!==h||e[15]!==w||e[16]!==f?(T=b.jsx(_,{active:h,label:w,onClick:f,children:y}),e[14]=h,e[15]=w,e[16]=f,e[17]=T):T=e[17];let x;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(x=s&&b.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:M=>{M.currentTarget.contains(M.relatedTarget)||i(!1)},children:[b.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:M=>{l(M.target.value),u(!1)},onKeyDown:M=>{M.key==="Enter"?(M.preventDefault(),k()):M.key==="Escape"&&(M.preventDefault(),i(!1),n.chain().focus().run())},className:q("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")}),b.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:b.jsx(vt,{size:14})}),h&&b.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:b.jsx(yn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=x):x=e[26];let v;return e[27]!==T||e[28]!==x?(v=b.jsxs("div",{className:"relative",children:[T,x]}),e[27]=T,e[28]=x,e[29]=v):v=e[29],v}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=b.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},He=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=b.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},at=[1,2,3],jn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function Nn(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:On},e[0]=n,e[1]=a):a=e[1];const l=$t(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&b.jsxs(Yt,{editor:n,shouldShow:jn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[b.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:b.jsx(pn,{size:14})}),b.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:b.jsx(fn,{size:14})}),b.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:b.jsx(gn,{size:14})}),b.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:b.jsx(mn,{size:14})}),b.jsx(le,{}),at.map((g,m)=>b.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:b.jsx(He,{children:`H${g}`})},g)),b.jsx(le,{}),b.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:b.jsx(bn,{size:14})}),b.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:b.jsx(He,{children:"1."})}),b.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:b.jsx(kn,{size:14})}),b.jsx(le,{}),b.jsx(Hn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=b.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function On(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:at.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Bn=10,Dn=25,Fn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function qn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??Fn[t.type]??""}function Wn(){const t=$.c(4),e=j(),{upload:n}=Tn(Pe),r=vn(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=st(a),o=l?Bn:Dn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?An:Mn,c=`${crypto.randomUUID()}${qn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new Ye("uploadSlots"),Un=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new _t({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Gn(t,e){return ee.getState(t)?.get(e)}function Zn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((T,x,v,M)=>{p=v,g=M});let m;f.doc.nodesBetween(p,g,(T,x)=>{T===l&&(m=x+T.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const w=i.nodes.paragraph;m!==void 0&&l.isBlock&&w&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,w.create()),k=m+1);const y=Lt.near(f.doc.resolve(k));o&&f.setSelection(y),s&&he(f,s,y.to),t.dispatch(f)}function Vn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Kn(t=!0){const e=j(),{uploadFile:n}=Wn(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=st(g);Zn(h,Gn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Vn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function be(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=be();function ot(t){F=t}var O={exec:()=>null};function A(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Qn=(()=>{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)}}>`)},Xn=/^(?:[ \t]*(?:\n|$))+/,Jn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yn=/^ {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+|$)/,er=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,lt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ct=A(lt).replace(/bull/g,we).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(),tr=A(lt).replace(/bull/g,we).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(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,nr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sr=A(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="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",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ir=A("^ {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",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ut=A(ye).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",ae).getRegex(),ar=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ut).getRegex(),Ae={blockquote:ar,code:Jn,def:rr,fences:Yn,heading:er,hr:K,html:ir,lheading:ct,list:sr,newline:Xn,paragraph:ut,table:O,text:nr},je=A("^ *([^\\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",ae).getRegex(),or={...Ae,lheading:tr,table:je,paragraph:A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je).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",ae).getRegex()},lr={...Ae,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).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:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
1
+ import{c as $,b as j,r as E,j as b,l as q,ai as vt,t as ue,b7 as Xe,a4 as At,gC as Mt,m as St,K as Ct,bP as Rt,h as Je,o as Et}from"./index-C4tYnNih.js";import{a as $t,n as Ye,E as ie,o as _t,x as Lt,y as P,z as It,A as zt,B as et,C as N,G as Ee,H as Pt,I as Ht,J as $e,K as jt,L as V,N as D,m as H,O as Y,T as tt,R as ke,Q as xe,U as Nt,V as Ot,W as Bt,X as Dt,Y as Ft,s as qt,Z as Wt,u as Ut,b as Gt}from"./usage-stats-DtO_zGwF.js";import{T as _,n as Zt,i as Vt,E as Kt}from"./editor-classes-CcPgajKG.js";import{a as Qt,e as nt,s as Xt,S as Jt}from"./suggestion-DTo0Z5su.js";import{B as Yt,c as en,t as tn,C as rt,f as nn,g as _e,s as rn,m as Le,a as Ie,b as sn,d as ze,e as an,h as on,i as ln,j as cn,k as un,l as hn,n as dn}from"./index-D8kI0oe2.js";import{ai as pn,aj as fn,al as gn,a0 as mn,be as kn,aW as xn}from"./agent-icon-KvVT3fA8.js";import{i as bn}from"./SwitchHorizontal01-B1MoYKPo.js";import{i as wn}from"./Link01-B7BHRxIW.js";import{s as yn}from"./Trash01-C9E8l_mI.js";import{i as Tn,b as vn}from"./use-org-fs-Dt6mQNyr.js";import{E as Pe,i as st,b as An,c as Mn,d as it,A as Sn,e as Cn,m as Rn,f as En}from"./markdown-C-J5-sTt.js";import{d as $n,e as _n,c as Ln,C as In,b as zn}from"./command-MmMDew8i.js";import{I as Pn}from"./icon-button-5JlhYc9R.js";function Hn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const M=n.getAttributes("link").href;l(typeof M=="string"?M:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const M=Zt(a);if(M===""){g();return}if(!Vt(M)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:M}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let w;e[11]!==r?(w=r("markdownEditor.link"),e[11]=r,e[12]=w):w=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=b.jsx(wn,{size:14}),e[13]=y):y=e[13];let T;e[14]!==h||e[15]!==w||e[16]!==f?(T=b.jsx(_,{active:h,label:w,onClick:f,children:y}),e[14]=h,e[15]=w,e[16]=f,e[17]=T):T=e[17];let x;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(x=s&&b.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:M=>{M.currentTarget.contains(M.relatedTarget)||i(!1)},children:[b.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:M=>{l(M.target.value),u(!1)},onKeyDown:M=>{M.key==="Enter"?(M.preventDefault(),k()):M.key==="Escape"&&(M.preventDefault(),i(!1),n.chain().focus().run())},className:q("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")}),b.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:b.jsx(vt,{size:14})}),h&&b.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:b.jsx(yn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=x):x=e[26];let v;return e[27]!==T||e[28]!==x?(v=b.jsxs("div",{className:"relative",children:[T,x]}),e[27]=T,e[28]=x,e[29]=v):v=e[29],v}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=b.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},He=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=b.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},at=[1,2,3],jn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function Nn(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:On},e[0]=n,e[1]=a):a=e[1];const l=$t(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&b.jsxs(Yt,{editor:n,shouldShow:jn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[b.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:b.jsx(pn,{size:14})}),b.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:b.jsx(fn,{size:14})}),b.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:b.jsx(gn,{size:14})}),b.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:b.jsx(mn,{size:14})}),b.jsx(le,{}),at.map((g,m)=>b.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:b.jsx(He,{children:`H${g}`})},g)),b.jsx(le,{}),b.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:b.jsx(bn,{size:14})}),b.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:b.jsx(He,{children:"1."})}),b.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:b.jsx(kn,{size:14})}),b.jsx(le,{}),b.jsx(Hn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=b.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function On(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:at.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Bn=10,Dn=25,Fn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function qn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??Fn[t.type]??""}function Wn(){const t=$.c(4),e=j(),{upload:n}=Tn(Pe),r=vn(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=st(a),o=l?Bn:Dn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?An:Mn,c=`${crypto.randomUUID()}${qn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new Ye("uploadSlots"),Un=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new _t({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Gn(t,e){return ee.getState(t)?.get(e)}function Zn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((T,x,v,M)=>{p=v,g=M});let m;f.doc.nodesBetween(p,g,(T,x)=>{T===l&&(m=x+T.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const w=i.nodes.paragraph;m!==void 0&&l.isBlock&&w&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,w.create()),k=m+1);const y=Lt.near(f.doc.resolve(k));o&&f.setSelection(y),s&&he(f,s,y.to),t.dispatch(f)}function Vn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Kn(t=!0){const e=j(),{uploadFile:n}=Wn(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=st(g);Zn(h,Gn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Vn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function be(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=be();function ot(t){F=t}var O={exec:()=>null};function A(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Qn=(()=>{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)}}>`)},Xn=/^(?:[ \t]*(?:\n|$))+/,Jn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yn=/^ {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+|$)/,er=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,lt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ct=A(lt).replace(/bull/g,we).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(),tr=A(lt).replace(/bull/g,we).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(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,nr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sr=A(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="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",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ir=A("^ {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",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ut=A(ye).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",ae).getRegex(),ar=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ut).getRegex(),Ae={blockquote:ar,code:Jn,def:rr,fences:Yn,heading:er,hr:K,html:ir,lheading:ct,list:sr,newline:Xn,paragraph:ut,table:O,text:nr},je=A("^ *([^\\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",ae).getRegex(),or={...Ae,lheading:tr,table:je,paragraph:A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je).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",ae).getRegex()},lr={...Ae,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).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:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",ct).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},cr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ur=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ht=/^( {2,}|\\)\n(?!\s*$)/,hr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,W=/[\p{P}\p{S}]/u,oe=/[\s\p{P}\p{S}]/u,Me=/[^\s\p{P}\p{S}]/u,dr=A(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,oe).getRegex(),dt=/(?!~)[\p{P}\p{S}]/u,pr=/(?!~)[\s\p{P}\p{S}]/u,fr=/(?:[^\s\p{P}\p{S}]|~)/u,gr=A(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Qn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,mr=A(pt,"u").replace(/punct/g,W).getRegex(),kr=A(pt,"u").replace(/punct/g,dt).getRegex(),ft="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xr=A(ft,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),br=A(ft,"gu").replace(/notPunctSpace/g,fr).replace(/punctSpace/g,pr).replace(/punct/g,dt).getRegex(),wr=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),yr=A(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,W).getRegex(),Tr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",vr=A(Tr,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),Ar=A(/\\(punct)/,"gu").replace(/punct/g,W).getRegex(),Mr=A(/^<(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(),Sr=A(ve).replace("(?:-->|$)","-->").getRegex(),Cr=A("^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",Sr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Rr=A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gt=A(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",Te).getRegex(),mt=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",Te).getRegex(),Er=A("reflink|nolink(?!\\()","g").replace("reflink",gt).replace("nolink",mt).getRegex(),Ne=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Se={_backpedal:O,anyPunctuation:Ar,autolink:Mr,blockSkip:gr,br:ht,code:ur,del:O,delLDelim:O,delRDelim:O,emStrongLDelim:mr,emStrongRDelimAst:xr,emStrongRDelimUnd:wr,escape:cr,link:Rr,nolink:mt,punctuation:dr,reflink:gt,reflinkSearch:Er,tag:Cr,text:hr,url:O},$r={...Se,link:A(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},de={...Se,emStrongRDelimAst:br,emStrongLDelim:kr,delLDelim:yr,delRDelim:vr,url:A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ne).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:A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ne).getRegex()},_r={...de,br:A(ht).replace("{2,}","*").getRegex(),text:A(de.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:Ae,gfm:or,pedantic:lr},U={normal:Se,gfm:de,breaks:_r,pedantic:$r},Lr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Oe=t=>Lr[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,Oe)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,Oe);return t}function Be(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function De(t,e){let n=t.replace(R.findPipe,(i,a,l)=>{let o=!1,u=a;for(;--u>=0&&l[u]==="\\";)o=!o;return o?"|":" |"}),r=n.split(R.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(R.slashPipe,"|");return r}function G(t,e,n){let r=t.length;if(r===0)return"";let s=0;for(;s<r&&t.charAt(r-s-1)===e;)s++;return t.slice(0,r-s)}function Ir(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function zr(t,e=0){let n=e,r="";for(let s of t)if(s===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=s,n++;return r}function Fe(t,e,n,r,s){let i=e.href,a=e.title||null,l=t[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,o}function Pr(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let s=r[1];return e.split(`
3
3
  `).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[l]=a;return l.length>=s.length?i.slice(s.length):i}).join(`
4
4
  `)}var ne=class{options;rules;lexer;constructor(t){this.options=t||F}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:G(n,`
@@ -1 +1 @@
1
- import{c as H,j as i,o as Ge,b as U,r as q,B as Ne,a as be,t as de,J as Xe,ax as ye,az as _e,l as Y,m as qe,K as Ye,ah as Je,a4 as Le,d as Ue,aH as Ve,k as Qe,G as Ze,L as ke,_ as et,C as je,ad as Pe,P as tt}from"./index-BNmzMNlZ.js";import{u as Ce,c as De,i as st,j as nt,k as it,l as rt}from"./use-sidebar-collapsed-CUSnfCt-.js";import{S as ot,a as lt,b as at}from"./sheet-C52S-h6R.js";import{u as ct}from"./use-mobile-nW9hYb6L.js";import{u as dt,a as ut,D as ft,c as ht,C as mt,P as gt}from"./core.esm-BYOMVmVh.js";import{S as pt,v as xt,u as bt}from"./sortable.esm-Cw5kBwgn.js";import{i as jt}from"./Tool01-Bon-ixH5.js";import{D as yt,A as vt,E as Ae,F as St}from"./agent-icon-CVEMdYFU.js";import{s as wt}from"./Plus-BfnmJh1R.js";import{s as Me}from"./XClose-DhoOL-T1.js";import{T as he,a as me,c as ge}from"./tooltip-DibJz0Jl.js";import{C as ze,f as zt,g as Ot,e as _t}from"./context-menu-C4h1P6Vl.js";import{C as Ct}from"./create-organization-dialog-DqU6G9od.js";import{P as Rt}from"./project-apps-CNRV3DAE.js";import{u as Nt,a as At}from"./use-recent-apps-CMgGjBH4.js";import{b as Et}from"./use-navigate-to-agent-CvuO-uuz.js";import{u as Tt,a as It}from"./use-project-scope-DryffHrf.js";import{i as Lt}from"./UserSquare-DsAVH788.js";import{C as Ee,e as kt,b as Pt,c as Dt,f as Mt}from"./command-N9BazZHl.js";import{u as $t}from"./use-debounced-value-BtR2lyTj.js";const Kt={xs:"xs",sm:"xs",lg:"md"};function Re(t){const e=H.c(4),{org:s,size:o}=t,r=o===void 0?"sm":o,l=s.logo??void 0,n=Kt[r];let a;return e[0]!==s.name||e[1]!==l||e[2]!==n?(a=i.jsx(Ge,{url:l,fallback:s.name,size:n,tone:"solid"}),e[0]=s.name,e[1]=l,e[2]=n,e[3]=a):a=e[3],a}function Bs({invitation:t,onChanged:e}){const s=U(),[o,r]=q.useState(!1),l=t.organizationName??s("header.orgSwitcher.unknownOrganization"),n=async()=>{r(!0);try{const d=await be.organization.acceptInvitation({invitationId:t.id});if(d.error){de.error(d.error.message),r(!1);return}}catch{de.error(s("header.orgSwitcher.failedToAcceptInvitation")),r(!1);return}de.success(s("header.orgSwitcher.joined",{name:l})),Xe();let c;try{c=(await be.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},a=async()=>{r(!0);try{const c=await be.organization.rejectInvitation({invitationId:t.id});if(c.error){de.error(c.error.message),r(!1);return}de.success(s("header.orgSwitcher.invitationDeclined")),r(!1),e()}catch{de.error(s("header.orgSwitcher.failedToDeclineInvitation")),r(!1)}};return i.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[i.jsx(Re,{org:{name:l},size:"sm"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"truncate text-sm font-medium",children:l}),i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),i.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[i.jsx(Ne,{size:"sm",variant:"default",onClick:n,disabled:o,children:s("header.orgSwitcher.accept")}),i.jsx(Ne,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground",onClick:a,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:l}),children:i.jsx(Me,{size:14})})]})]})}const Wt=3,$e=10,Ft=440,Bt=55;function Ke(t){const e=Math.floor((t-Ft)/Bt);return Math.min($e,Math.max(Wt,e))}function Ht(t,e,s=$e*3,o=[]){return[...new Set([e,...o,...t])].slice(0,s)}function Gt(t,e){return!e.id||t.some(s=>s.slug===e.slug)?[...t]:[...t,e]}function Xt(t,e,s,o,r=[]){if(t.length<=o)return{shown:[...t],hidden:[]};const l=new Map(t.map(a=>[a.slug,a])),n=new Set;s&&l.has(s)&&n.add(s);for(const a of r)l.has(a)&&n.add(a);for(const a of e){if(n.size>=o)break;l.has(a)&&n.add(a)}for(const a of t){if(n.size>=o)break;n.add(a.slug)}return{shown:t.filter(a=>n.has(a.slug)),hidden:t.filter(a=>!n.has(a.slug))}}const Te=[];function qt(){const t=H.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=_e.recentOrgs(),t[0]=e):e=t[0];const[s,o]=ye(e,Te),r=Array.isArray(s)?s:Te;let l;t[1]!==o?(l=(a,c)=>o(d=>Ht(Array.isArray(d)?d:[],a,void 0,c)),t[1]=o,t[2]=l):l=t[2];let n;return t[3]!==r||t[4]!==l?(n={recent:r,remember:l},t[3]=r,t[4]=l,t[5]=n):n=t[5],n}const We={hidden:[],pinned:[],order:[]},fe=(t,e)=>t.filter(s=>s!==e);function ue(t){if(typeof t!="object"||t===null)return We;const e=o=>Array.isArray(o)?o.filter(r=>typeof r=="string"):[],s=t;return{hidden:e(s.hidden),pinned:e(s.pinned),order:e(s.order)}}function Yt(t,e){return{...t,hidden:[...fe(t.hidden,e),e],pinned:fe(t.pinned,e)}}function Jt(t,e){return{...t,hidden:fe(t.hidden,e)}}function Ut(t,e){return t.pinned.includes(e)?{...t,pinned:fe(t.pinned,e)}:{...t,hidden:fe(t.hidden,e),pinned:[...t.pinned,e]}}function Vt(t,e,s){const o=r=>{const l=e.order.indexOf(r);return l===-1?Number.MAX_SAFE_INTEGER:l};return t.filter(r=>r.slug===s||!e.hidden.includes(r.slug)).map((r,l)=>({org:r,index:l})).sort((r,l)=>Number(e.pinned.includes(l.org.slug))-Number(e.pinned.includes(r.org.slug))||o(r.org.slug)-o(l.org.slug)||r.index-l.index).map(({org:r})=>r)}function Qt(t,e,s,o){const r=e.indexOf(s),l=e.indexOf(o);if(r===-1||l===-1||r===l||t.pinned.includes(s)!==t.pinned.includes(o))return t;const n=[...e];return n.splice(r,1),n.splice(l,0,s),{...t,order:[...n,...t.order.filter(a=>!n.includes(a))]}}function ve(t){const e=H.c(11),{active:s,label:o,children:r}=t,l=s?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let n;e[0]!==l?(n=Y("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",l),e[0]=l,e[1]=n):n=e[1];let a;e[2]!==n?(a=i.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:i.jsx("span",{className:n})}),e[2]=n,e[3]=a):a=e[3];let c;e[4]!==s||e[5]!==o?(c=o&&i.jsx("span",{"aria-hidden":!0,className:Y("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",s?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:o}),e[4]=s,e[5]=o,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==a||e[9]!==c?(d=i.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[a,r,c]}),e[7]=r,e[8]=a,e[9]=c,e[10]=d):d=e[10],d}function Zt(t){return typeof t=="object"&&t!==null&&Array.isArray(t.items)}function es(t){const e=H.c(13),s=t.trim(),{data:o}=be.useSession(),r=o?.user?.id??"",l=s.length>0&&!!r,n=Ye.organizationSearch(r,s);let a;e[0]!==s?(a=async w=>{const{signal:O}=w,p=await fetch(`/api/_me/organizations/search?q=${encodeURIComponent(s)}`,{signal:O});if(!p.ok)throw new Error(`Organization search failed: ${p.status}`);const y=await p.json();if(!Zt(y))throw new Error("Invalid organization search response");return y},e[0]=s,e[1]=a):a=e[1];let c;e[2]!==l||e[3]!==n||e[4]!==a?(c={queryKey:n,queryFn:a,enabled:l,placeholderData:Je,staleTime:3e4,retry:!1},e[2]=l,e[3]=n,e[4]=a,e[5]=c):c=e[5];const{data:d,isFetching:g,isPlaceholderData:m,isError:h}=qe(c);let f;e[6]!==d?.items?(f=d?.items??[],e[6]=d?.items,e[7]=f):f=e[7];const u=l&&g,x=l&&m;let j;return e[8]!==h||e[9]!==f||e[10]!==u||e[11]!==x?(j={hits:f,isSearching:u,isStale:x,isError:h},e[8]=h,e[9]=f,e[10]=u,e[11]=x,e[12]=j):j=e[12],j}function ts(t){const e=H.c(61),{orgs:s,currentSlug:o,hiddenCount:r,onSelect:l}=t,n=U(),[a,c]=q.useState(!1),[d,g]=q.useState("");let m;e[0]!==d?(m=d.trim(),e[0]=d,e[1]=m):m=e[1];const h=m,f=$t(h,150),u=h.length>0,x=f===h,{hits:j,isSearching:w,isStale:O,isError:p}=es(u?f:""),y=u?j:s;let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=G=>{c(G),G||g("")},e[2]=v):v=e[2];const z=v;let b;e[3]!==n?(b=n("sidebar.rail.searchOrganizations"),e[3]=n,e[4]=b):b=e[4];let A;e[5]===Symbol.for("react.memo_cache_sentinel")?(A=()=>z(!0),e[5]=A):A=e[5];let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=i.jsx(Lt,{size:18}),e[6]=I):I=e[6];let _;e[7]!==b?(_=i.jsx(he,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":b,onClick:A,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:I})}),e[7]=b,e[8]=_):_=e[8];let E;e[9]!==r||e[10]!==n?(E=r>0?n("sidebar.rail.searchMoreOrganizations",{count:r}):n("sidebar.rail.searchOrganizations"),e[9]=r,e[10]=n,e[11]=E):E=e[11];let C;e[12]!==E?(C=i.jsx(me,{side:"right",children:E}),e[12]=E,e[13]=C):C=e[13];let T;e[14]!==_||e[15]!==C?(T=i.jsx(ve,{active:!1,children:i.jsxs(ge,{children:[_,C]})}),e[14]=_,e[15]=C,e[16]=T):T=e[16];let P;e[17]!==n?(P=n("sidebar.rail.searchOrganizations"),e[17]=n,e[18]=P):P=e[18];let S;e[19]!==n?(S=n("sidebar.rail.searchPlaceholder"),e[19]=n,e[20]=S):S=e[20];let R;e[21]!==n?(R=n("sidebar.rail.searchPlaceholder"),e[21]=n,e[22]=R):R=e[22];let M;e[23]!==d||e[24]!==R?(M=i.jsx(kt,{value:d,onValueChange:g,placeholder:R}),e[23]=d,e[24]=R,e[25]=M):M=e[25];const F=u&&(O||!x)&&"opacity-50";let K;e[26]!==F?(K=Y(F),e[26]=F,e[27]=K):K=e[27];let D;e[28]!==p||e[29]!==u||e[30]!==n?(D=u&&p&&i.jsx(Ee,{children:n("sidebar.rail.searchFailed")}),e[28]=p,e[29]=u,e[30]=n,e[31]=D):D=e[31];let $;e[32]!==p||e[33]!==w||e[34]!==y.length||e[35]!==x||e[36]!==n?($=!p&&x&&!w&&y.length===0&&i.jsx(Ee,{children:n("sidebar.rail.searchEmpty")}),e[32]=p,e[33]=w,e[34]=y.length,e[35]=x,e[36]=n,e[37]=$):$=e[37];let L;if(e[38]!==o||e[39]!==l||e[40]!==y||e[41]!==n){let G;e[43]!==o||e[44]!==l||e[45]!==n?(G=X=>i.jsxs(Pt,{value:X.slug,onSelect:()=>{z(!1),X.slug!==o&&l(X.slug)},className:"gap-2.5",children:[i.jsx(Re,{org:X,size:"sm"}),i.jsx("span",{className:"min-w-0 flex-1 truncate",children:X.name}),X.slug===o&&i.jsx("span",{className:"text-meta shrink-0",children:n("sidebar.rail.currentOrganization")})]},X.id),e[43]=o,e[44]=l,e[45]=n,e[46]=G):G=e[46],L=y.map(G),e[38]=o,e[39]=l,e[40]=y,e[41]=n,e[42]=L}else L=e[42];let k;e[47]!==K||e[48]!==D||e[49]!==$||e[50]!==L?(k=i.jsxs(Dt,{className:K,children:[D,$,L]}),e[47]=K,e[48]=D,e[49]=$,e[50]=L,e[51]=k):k=e[51];let W;e[52]!==a||e[53]!==P||e[54]!==S||e[55]!==M||e[56]!==k?(W=i.jsxs(Mt,{open:a,onOpenChange:z,title:P,description:S,shouldFilter:!1,children:[M,k]}),e[52]=a,e[53]=P,e[54]=S,e[55]=M,e[56]=k,e[57]=W):W=e[57];let J;return e[58]!==W||e[59]!==T?(J=i.jsxs(i.Fragment,{children:[T,W]}),e[58]=W,e[59]=T,e[60]=J):J=e[60],J}function ss(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const ns=()=>Ke(globalThis.innerHeight),is=()=>Ke(0);function rs(t){const e=H.c(59),{org:s,active:o,onSelect:r,pinned:l,onOpenSettings:n,onTogglePin:a,onHide:c}=t,d=U();let g;e[0]!==s.slug?(g={id:s.slug},e[0]=s.slug,e[1]=g):g=e[1];const{setNodeRef:m,listeners:h,transform:f,transition:u,isDragging:x}=bt(g);let j;e[2]!==f?(j=mt.Transform.toString(f?{...f,x:0}:null),e[2]=f,e[3]=j):j=e[3];const w=x?1:void 0,O=`rail-org-${s.slug}`;let p;e[4]!==j||e[5]!==w||e[6]!==O||e[7]!==u?(p={transform:j,transition:u,zIndex:w,viewTransitionName:O},e[4]=j,e[5]=w,e[6]=O,e[7]=u,e[8]=p):p=e[8];const y=s.name,v=o||void 0,z=o?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",b=r&&"cursor-pointer";let A;e[9]!==z||e[10]!==b?(A=Y("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",z,b),e[9]=z,e[10]=b,e[11]=A):A=e[11];let I;e[12]!==s?(I=i.jsx(Re,{org:s,size:"lg"}),e[12]=s,e[13]=I):I=e[13];let _;e[14]!==l?(_=l&&i.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:i.jsx(Ae,{size:9})}),e[14]=l,e[15]=_):_=e[15];let E;e[16]!==r||e[17]!==s.name||e[18]!==A||e[19]!==I||e[20]!==_||e[21]!==v?(E=i.jsx(he,{asChild:!0,children:i.jsx(zt,{asChild:!0,children:i.jsxs("button",{type:"button","aria-label":y,"aria-current":v,onClick:r,className:A,children:[I,_]})})}),e[16]=r,e[17]=s.name,e[18]=A,e[19]=I,e[20]=_,e[21]=v,e[22]=E):E=e[22];let C;e[23]!==s.name?(C=i.jsx(me,{side:"right",children:s.name}),e[23]=s.name,e[24]=C):C=e[24];let T;e[25]!==E||e[26]!==C?(T=i.jsxs(ge,{children:[E,C]}),e[25]=E,e[26]=C,e[27]=T):T=e[27];let P;e[28]===Symbol.for("react.memo_cache_sentinel")?(P=i.jsx(St,{}),e[28]=P):P=e[28];let S;e[29]!==d?(S=d("sidebar.rail.organizationSettings"),e[29]=d,e[30]=S):S=e[30];let R;e[31]!==n||e[32]!==S?(R=i.jsxs(ze,{onSelect:n,children:[P,S]}),e[31]=n,e[32]=S,e[33]=R):R=e[33];let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=i.jsx(Ae,{}),e[34]=M):M=e[34];let F;e[35]!==l||e[36]!==d?(F=d(l?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=l,e[36]=d,e[37]=F):F=e[37];let K;e[38]!==a||e[39]!==F?(K=i.jsxs(ze,{onSelect:a,children:[M,F]}),e[38]=a,e[39]=F,e[40]=K):K=e[40];let D;e[41]!==c||e[42]!==d?(D=c&&i.jsxs(ze,{onSelect:c,children:[i.jsx(jt,{}),d("sidebar.rail.hideOrganization")]}),e[41]=c,e[42]=d,e[43]=D):D=e[43];let $;e[44]!==R||e[45]!==K||e[46]!==D?($=i.jsxs(Ot,{children:[R,K,D]}),e[44]=R,e[45]=K,e[46]=D,e[47]=$):$=e[47];let L;e[48]!==T||e[49]!==$?(L=i.jsxs(_t,{children:[T,$]}),e[48]=T,e[49]=$,e[50]=L):L=e[50];let k;e[51]!==o||e[52]!==L?(k=i.jsx(ve,{active:o,children:L}),e[51]=o,e[52]=L,e[53]=k):k=e[53];let W;return e[54]!==h||e[55]!==m||e[56]!==k||e[57]!==p?(W=i.jsx("div",{ref:m,...h,style:p,className:"w-full shrink-0 touch-none",children:k}),e[54]=h,e[55]=m,e[56]=k,e[57]=p,e[58]=W):W=e[58],W}function os(t){const e=H.c(64),{project:s,orgSlug:o,active:r,onClose:l,onNavigate:n}=t,a=U();let c,d,g,m,h,f,u,x,j,w,O;if(e[0]!==r||e[1]!==n||e[2]!==o||e[3]!==s.icon||e[4]!==s.id||e[5]!==s.title){const M=yt(s.icon,s.title);O="group/rail relative flex w-full flex-col items-center gap-1",g=ge,d=he,w=!0,c=ke,m=et.root,e[17]!==o||e[18]!==s.id?(h={org:o,agentId:s.id},e[17]=o,e[18]=s.id,e[19]=h):h=e[19],f=s.title,u=r||void 0,e[20]!==n?(x=()=>{je("org_rail_recent_project_opened"),n?.()},e[20]=n,e[21]=x):x=e[21],j=Y("flex shrink-0 rounded-lg focus-ring",M.text,r&&"ring-[1.5px] ring-current"),e[0]=r,e[1]=n,e[2]=o,e[3]=s.icon,e[4]=s.id,e[5]=s.title,e[6]=c,e[7]=d,e[8]=g,e[9]=m,e[10]=h,e[11]=f,e[12]=u,e[13]=x,e[14]=j,e[15]=w,e[16]=O}else c=e[6],d=e[7],g=e[8],m=e[9],h=e[10],f=e[11],u=e[12],x=e[13],j=e[14],w=e[15],O=e[16];let p;e[22]!==s.icon||e[23]!==s.title?(p=i.jsx(vt,{icon:s.icon,name:s.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=s.icon,e[23]=s.title,e[24]=p):p=e[24];let y;e[25]!==c||e[26]!==m||e[27]!==h||e[28]!==f||e[29]!==u||e[30]!==x||e[31]!==j||e[32]!==p?(y=i.jsx(c,{to:m,params:h,"aria-label":f,"aria-current":u,onClick:x,className:j,children:p}),e[25]=c,e[26]=m,e[27]=h,e[28]=f,e[29]=u,e[30]=x,e[31]=j,e[32]=p,e[33]=y):y=e[33];let v;e[34]!==d||e[35]!==y||e[36]!==w?(v=i.jsx(d,{asChild:w,children:y}),e[34]=d,e[35]=y,e[36]=w,e[37]=v):v=e[37];let z;e[38]!==s.title?(z=i.jsx(me,{side:"right",children:s.title}),e[38]=s.title,e[39]=z):z=e[39];let b;e[40]!==g||e[41]!==v||e[42]!==z?(b=i.jsxs(g,{children:[v,z]}),e[40]=g,e[41]=v,e[42]=z,e[43]=b):b=e[43];const A=r?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let I;e[44]!==A?(I=Y("line-clamp-2 w-full text-center text-2xs break-words transition-colors",A),e[44]=A,e[45]=I):I=e[45];let _;e[46]!==s.title||e[47]!==I?(_=i.jsx("span",{"aria-hidden":!0,className:I,children:s.title}),e[46]=s.title,e[47]=I,e[48]=_):_=e[48];let E;e[49]!==s.title||e[50]!==a?(E=a("sidebar.rail.closeApp",{name:s.title}),e[49]=s.title,e[50]=a,e[51]=E):E=e[51];let C;e[52]!==l?(C=()=>{je("org_rail_recent_project_closed"),l()},e[52]=l,e[53]=C):C=e[53];let T,P;e[54]===Symbol.for("react.memo_cache_sentinel")?(T=Y("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),P=i.jsx(Me,{size:10}),e[54]=T,e[55]=P):(T=e[54],P=e[55]);let S;e[56]!==E||e[57]!==C?(S=i.jsx("button",{type:"button","aria-label":E,onClick:C,className:T,children:P}),e[56]=E,e[57]=C,e[58]=S):S=e[58];let R;return e[59]!==b||e[60]!==_||e[61]!==S||e[62]!==O?(R=i.jsxs("div",{className:O,children:[b,_,S]}),e[59]=b,e[60]=_,e[61]=S,e[62]=O,e[63]=R):R=e[63],R}const ls={"site-editor":"/site-editor"};function as(t){const e=H.c(26),{app:s}=t,o=U(),r=Rt[s],l=ls[s];if(!r||!l)return null;let n;e[0]!==r.labelKey||e[1]!==o?(n=o(r.labelKey),e[0]=r.labelKey,e[1]=o,e[2]=n):n=e[2];let a;e[3]!==r.labelKey||e[4]!==o?(a=o(r.labelKey),e[3]=r.labelKey,e[4]=o,e[5]=a):a=e[5];let c;e[6]!==r.tone?(c=Y("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",r.tone),e[6]=r.tone,e[7]=c):c=e[7];let d;e[8]!==r.Icon?(d=i.jsx(r.Icon,{size:18}),e[8]=r.Icon,e[9]=d):d=e[9];let g;e[10]!==a||e[11]!==c||e[12]!==d||e[13]!==l?(g=i.jsx(he,{asChild:!0,children:i.jsx(ke,{to:l,"aria-label":a,"aria-current":"page","data-testid":"org-rail-local-app",className:c,children:d})}),e[10]=a,e[11]=c,e[12]=d,e[13]=l,e[14]=g):g=e[14];let m;e[15]!==r.labelKey||e[16]!==o?(m=o(r.labelKey),e[15]=r.labelKey,e[16]=o,e[17]=m):m=e[17];let h;e[18]!==m?(h=i.jsx(me,{side:"right",children:m}),e[18]=m,e[19]=h):h=e[19];let f;e[20]!==g||e[21]!==h?(f=i.jsxs(ge,{children:[g,h]}),e[20]=g,e[21]=h,e[22]=f):f=e[22];let u;return e[23]!==n||e[24]!==f?(u=i.jsx(ve,{active:!0,label:n,children:f}),e[23]=n,e[24]=f,e[25]=u):u=e[25],u}function cs(){const{org:t}=Le();return Nt(t.slug),null}function Fe(t){const e=H.c(56),{onNavigate:s}=t===void 0?{}:t,o=U(),r=Ue(),{org:l}=Le(),n=Ve();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:hs},e[0]=a):a=e[0];const c=Qe(a);let d;e[1]!==c||e[2]!==n?(d=c?n({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=c,e[2]=n,e[3]=d):d=e[3];const g=d,m=g?g.org:l.slug,{data:h}=Ze(),[f,u]=q.useState(!1),x=Ce(),{recent:j,forget:w}=Et(l.slug),{projects:O}=Tt(),p=It(),y=At(),v=y&&y.projectId===null?y.app:null,z=v?[]:j.flatMap(N=>O.filter(B=>B.id===N)),b=Gt(h??[],l),{recent:A,remember:I}=qt();let _;e[4]===Symbol.for("react.memo_cache_sentinel")?(_=_e.railOrgPrefs(),e[4]=_):_=e[4];const[E,C]=ye(_,We),T=ue(E),P=q.useSyncExternalStore(ss,ns,is),{shown:S}=Xt(Vt(b,T,l.slug),A,l.slug,P,T.pinned);let R;e[5]===Symbol.for("react.memo_cache_sentinel")?(R={activationConstraint:{distance:8}},e[5]=R):R=e[5];const M=dt(ut(gt,R)),F=N=>{const{active:B,over:ce}=N;ce&&(je("org_rail_reordered"),C(He=>Qt(ue(He),S.map(fs),String(B.id),String(ce.id))))},K=N=>{s?.(),r({to:"/$org/home",params:{org:N},viewTransition:!0})},D=N=>{je("org_rail_travel");const B=S.some(ce=>ce.slug===N);C(ce=>Jt(ue(ce),N)),I(N,B?S.map(us):void 0),K(N)},$=!x&&"border-r border-sidebar-border";let L;e[6]!==$?(L=Y("flex w-[68px] shrink-0 flex-col items-center gap-2.5 overflow-y-auto bg-sidebar px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",$),e[6]=$,e[7]=L):L=e[7];let k;e[8]!==o?(k=o("sidebar.rail.ariaLabel"),e[8]=o,e[9]=k):k=e[9];const W=ft,J=ht,G=pt,X=S.map(ds),Se=xt,we=S.map(N=>i.jsxs(q.Fragment,{children:[i.jsx(rs,{org:N,active:N.slug===m,pinned:T.pinned.includes(N.slug),onSelect:N.slug!==l.slug?()=>D(N.slug):p?()=>K(N.slug):void 0,onOpenSettings:()=>{s?.(),r({to:"/$org/settings",params:{org:N.slug}})},onTogglePin:()=>C(B=>Ut(ue(B),N.slug)),onHide:N.slug===l.slug?void 0:()=>C(B=>Yt(ue(B),N.slug))}),N.slug===l.slug&&z.length>0&&i.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:z.map(B=>i.jsx(os,{project:B,orgSlug:l.slug,active:p===B.id,onClose:()=>w(B.id),onNavigate:s},B.id))})]},N.id));let V;e[10]!==G||e[11]!==X||e[12]!==Se||e[13]!==we?(V=i.jsx(G,{items:X,strategy:Se,children:we}),e[10]=G,e[11]=X,e[12]=Se,e[13]=we,e[14]=V):V=e[14];let Q;e[15]!==W||e[16]!==F||e[17]!==M||e[18]!==V||e[19]!==J?(Q=i.jsx(W,{sensors:M,collisionDetection:J,onDragEnd:F,children:V}),e[15]=W,e[16]=F,e[17]=M,e[18]=V,e[19]=J,e[20]=Q):Q=e[20];let Z;e[21]!==l.slug||e[22]!==b||e[23]!==S.length||e[24]!==D?(Z=b.length>S.length&&i.jsx(ts,{orgs:b,currentSlug:l.slug,hiddenCount:b.length-S.length,onSelect:D}),e[21]=l.slug,e[22]=b,e[23]=S.length,e[24]=D,e[25]=Z):Z=e[25];let ee;e[26]!==o?(ee=o("sidebar.picker.newOrganization"),e[26]=o,e[27]=ee):ee=e[27];let te;e[28]!==u?(te=()=>u(!0),e[28]=u,e[29]=te):te=e[29];let pe;e[30]===Symbol.for("react.memo_cache_sentinel")?(pe=i.jsx(wt,{size:18}),e[30]=pe):pe=e[30];let se;e[31]!==ee||e[32]!==te?(se=i.jsx(he,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":ee,onClick:te,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:pe})}),e[31]=ee,e[32]=te,e[33]=se):se=e[33];let ne;e[34]!==o?(ne=o("sidebar.picker.newOrganization"),e[34]=o,e[35]=ne):ne=e[35];let ie;e[36]!==ne?(ie=i.jsx(me,{side:"right",children:ne}),e[36]=ne,e[37]=ie):ie=e[37];let re;e[38]!==se||e[39]!==ie?(re=i.jsx(ve,{active:!1,children:i.jsxs(ge,{children:[se,ie]})}),e[38]=se,e[39]=ie,e[40]=re):re=e[40];let oe;e[41]!==v?(oe=v&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),i.jsx(as,{app:v})]}),e[41]=v,e[42]=oe):oe=e[42];let le;e[43]!==Q||e[44]!==Z||e[45]!==re||e[46]!==oe||e[47]!==L||e[48]!==k?(le=i.jsxs("div",{className:L,"aria-label":k,children:[Q,Z,re,oe]}),e[43]=Q,e[44]=Z,e[45]=re,e[46]=oe,e[47]=L,e[48]=k,e[49]=le):le=e[49];let ae;e[50]!==f||e[51]!==u?(ae=i.jsx(Ct,{open:f,onOpenChange:u}),e[50]=f,e[51]=u,e[52]=ae):ae=e[52];let xe;return e[53]!==le||e[54]!==ae?(xe=i.jsxs(i.Fragment,{children:[le,ae]}),e[53]=le,e[54]=ae,e[55]=xe):xe=e[55],xe}function ds(t){return t.slug}function us(t){return t.slug}function fs(t){return t.slug}function hs(t){return t.isLoading}function ms(t){const e=H.c(15),{width:s,minWidth:o,maxWidth:r,onPointerDown:l,onKeyDown:n,onDoubleClick:a}=t,c=U(),{isMobile:d}=De(),g=Ce();if(d||g)return null;let m;e[0]!==c?(m=c("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=c,e[1]=m):m=e[1];let h;e[2]!==c?(h=c("sidebar.sidebarResizeHandle.title"),e[2]=c,e[3]=h):h=e[3];let f,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(f={left:"var(--sidebar-width)"},u=i.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=f,e[5]=u):(f=e[4],u=e[5]);let x;return e[6]!==r||e[7]!==o||e[8]!==a||e[9]!==n||e[10]!==l||e[11]!==m||e[12]!==h||e[13]!==s?(x=i.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":m,"aria-valuenow":s,"aria-valuemin":o,"aria-valuemax":r,title:h,tabIndex:0,onPointerDown:l,onKeyDown:n,onDoubleClick:a,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:f,children:u}),e[6]=r,e[7]=o,e[8]=a,e[9]=n,e[10]=l,e[11]=m,e[12]=h,e[13]=s,e[14]=x):x=e[14],x}const Oe=400,Ie=16,gs="sidebar.width.v2";function ps(){const t=H.c(14),e=xs;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=u=>typeof u=="number"?e(u):192,t[0]=s):s=t[0];const[o,r]=ye(gs,s),l=q.useRef(null);let n;t[1]!==r||t[2]!==o?(n=u=>{u.preventDefault();const x=u.clientX,j=e(o),w=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),O=w?Array.from(w.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const v of O)v.style.transition="none";const p=v=>{const z=e(j+(v.clientX-x));w?.style.setProperty("--sidebar-width",`${z}px`)},y=v=>{const z=e(j+(v.clientX-x));r(z);for(const b of O)b.style.transition="";window.removeEventListener("pointermove",p),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",p),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y)},t[1]=r,t[2]=o,t[3]=n):n=t[3];const a=n;let c;t[4]!==r?(c=()=>{r(192)},t[4]=r,t[5]=c):c=t[5];const d=c;let g;t[6]!==r||t[7]!==o?(g=u=>{if(u.key==="ArrowLeft")r(e(o-Ie));else if(u.key==="ArrowRight")r(e(o+Ie));else if(u.key==="Home")r(192);else if(u.key==="End")r(Oe);else return;u.preventDefault()},t[6]=r,t[7]=o,t[8]=g):g=t[8];const m=g,h=e(o);let f;return t[9]!==m||t[10]!==a||t[11]!==d||t[12]!==h?(f={width:h,minWidth:192,maxWidth:Oe,wrapperRef:l,onStartResize:a,onKeyDownResize:m,resetWidth:d},t[9]=m,t[10]=a,t[11]=d,t[12]=h,t[13]=f):f=t[13],f}function xs(t){return Math.max(192,Math.min(Oe,t))}const Be=q.createContext(null);function bs(){const t=q.use(Be);if(!t)throw new Error("Layout regions require a Layout");return t}function js({children:t,notice:e,outsideOrg:s}){const o=ct(),[r,l]=ye(_e.sidebarOpen(),!0),n=ps(),a=Pe();return i.jsx(Be,{value:{isMobile:o,resize:n},children:i.jsx(st,{open:r,onOpenChange:l,children:i.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,i.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[a&&!s&&i.jsx(cs,{}),!o&&a&&(s?.rail??!0)&&i.jsx(Fe,{}),i.jsx(nt,{ref:n.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${n.width}px`,"--sidebar-width-icon":a?"0px":"3.125rem"},children:i.jsx(it,{children:t})})]})]})})})}function ys(t){const e=H.c(37),{children:s,renderMobile:o}=t,r=U(),{isMobile:l,resize:n}=bs(),{openMobile:a,setOpenMobile:c}=De(),d=Ce(),g=Pe();let m;e[0]!==c?(m=()=>c(!1),e[0]=c,e[1]=m):m=e[1];const h=m;if(!l){const v=g&&d;let z;e[2]!==s||e[3]!==v?(z=i.jsx("div",{className:"contents",inert:v,children:s}),e[2]=s,e[3]=v,e[4]=z):z=e[4];let b;e[5]!==n.maxWidth||e[6]!==n.minWidth||e[7]!==n.onKeyDownResize||e[8]!==n.onStartResize||e[9]!==n.resetWidth||e[10]!==n.width?(b=i.jsx(ms,{width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,onPointerDown:n.onStartResize,onKeyDown:n.onKeyDownResize,onDoubleClick:n.resetWidth}),e[5]=n.maxWidth,e[6]=n.minWidth,e[7]=n.onKeyDownResize,e[8]=n.onStartResize,e[9]=n.resetWidth,e[10]=n.width,e[11]=b):b=e[11];let A;return e[12]!==z||e[13]!==b?(A=i.jsxs(i.Fragment,{children:[z,b]}),e[12]=z,e[13]=b,e[14]=A):A=e[14],A}let f;e[15]!==r?(f=r("layouts.shellControls.navigationTitle"),e[15]=r,e[16]=f):f=e[16];let u;e[17]!==f?(u=i.jsx(ot,{className:"sr-only",children:f}),e[17]=f,e[18]=u):u=e[18];let x;e[19]!==h||e[20]!==g?(x=g&&i.jsx(Fe,{onNavigate:h}),e[19]=h,e[20]=g,e[21]=x):x=e[21];let j;e[22]!==h||e[23]!==o?(j=o({onClose:h}),e[22]=h,e[23]=o,e[24]=j):j=e[24];let w;e[25]!==j?(w=i.jsx("div",{className:"min-w-0 flex-1",children:j}),e[25]=j,e[26]=w):w=e[26];let O;e[27]!==x||e[28]!==w?(O=i.jsxs("div",{className:"flex h-full min-h-0",children:[x,w]}),e[27]=x,e[28]=w,e[29]=O):O=e[29];let p;e[30]!==u||e[31]!==O?(p=i.jsxs(lt,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:vs,children:[u,O]}),e[30]=u,e[31]=O,e[32]=p):p=e[32];let y;return e[33]!==a||e[34]!==c||e[35]!==p?(y=i.jsx(at,{open:a,onOpenChange:c,children:p}),e[33]=a,e[34]=c,e[35]=p,e[36]=y):y=e[36],y}function vs(t){return t.preventDefault()}function Ss(t){const e=H.c(3),{children:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={background:"transparent",containerType:"inline-size"},e[0]=o):o=e[0];let r;return e[1]!==s?(r=i.jsx(rt,{className:"flex flex-col min-h-0",style:o,children:i.jsx(tt,{variant:"plain",className:"bg-sidebar",children:i.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s})})}),e[1]=s,e[2]=r):r=e[2],r}const Hs=Object.assign(js,{Sidebar:ys,Content:Ss});export{Bs as I,Hs as L,Re as O,es as u,Gt as w};
1
+ import{c as H,j as i,o as Ge,b as U,r as q,B as Ne,a as be,t as de,J as Xe,ax as ye,az as _e,l as Y,m as qe,K as Ye,ah as Je,a4 as Le,d as Ue,aH as Ve,k as Qe,G as Ze,L as ke,_ as et,C as je,ad as Pe,P as tt}from"./index-C4tYnNih.js";import{u as Ce,c as De,i as st,j as nt,k as it,l as rt}from"./use-sidebar-collapsed-DXyrU3VA.js";import{S as ot,a as lt,b as at}from"./sheet-DYw2VD7L.js";import{u as ct}from"./use-mobile-BADuLdb7.js";import{u as dt,a as ut,D as ft,c as ht,C as mt,P as gt}from"./core.esm-B2cbbV3O.js";import{S as pt,v as xt,u as bt}from"./sortable.esm-DPfgkRcd.js";import{i as jt}from"./Tool01-BvlRH5Ln.js";import{D as yt,A as vt,E as Ae,F as St}from"./agent-icon-KvVT3fA8.js";import{s as wt}from"./Plus-CcJNnBya.js";import{s as Me}from"./XClose-BBReaSBA.js";import{T as he,a as me,c as ge}from"./tooltip-B1eS9Khq.js";import{C as ze,f as zt,g as Ot,e as _t}from"./context-menu-Cpvztbef.js";import{C as Ct}from"./create-organization-dialog-NLldLLor.js";import{P as Rt}from"./project-apps-M24hPHW2.js";import{u as Nt,a as At}from"./use-recent-apps-TrfPEwKE.js";import{b as Et}from"./use-navigate-to-agent-B3bMlZK-.js";import{u as Tt,a as It}from"./use-project-scope-CKNjz3VB.js";import{i as Lt}from"./UserSquare-DwNuAluZ.js";import{C as Ee,e as kt,b as Pt,c as Dt,f as Mt}from"./command-MmMDew8i.js";import{u as $t}from"./use-debounced-value-DOPKXMfX.js";const Kt={xs:"xs",sm:"xs",lg:"md"};function Re(t){const e=H.c(4),{org:s,size:o}=t,r=o===void 0?"sm":o,l=s.logo??void 0,n=Kt[r];let a;return e[0]!==s.name||e[1]!==l||e[2]!==n?(a=i.jsx(Ge,{url:l,fallback:s.name,size:n,tone:"solid"}),e[0]=s.name,e[1]=l,e[2]=n,e[3]=a):a=e[3],a}function Bs({invitation:t,onChanged:e}){const s=U(),[o,r]=q.useState(!1),l=t.organizationName??s("header.orgSwitcher.unknownOrganization"),n=async()=>{r(!0);try{const d=await be.organization.acceptInvitation({invitationId:t.id});if(d.error){de.error(d.error.message),r(!1);return}}catch{de.error(s("header.orgSwitcher.failedToAcceptInvitation")),r(!1);return}de.success(s("header.orgSwitcher.joined",{name:l})),Xe();let c;try{c=(await be.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},a=async()=>{r(!0);try{const c=await be.organization.rejectInvitation({invitationId:t.id});if(c.error){de.error(c.error.message),r(!1);return}de.success(s("header.orgSwitcher.invitationDeclined")),r(!1),e()}catch{de.error(s("header.orgSwitcher.failedToDeclineInvitation")),r(!1)}};return i.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[i.jsx(Re,{org:{name:l},size:"sm"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"truncate text-sm font-medium",children:l}),i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),i.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[i.jsx(Ne,{size:"sm",variant:"default",onClick:n,disabled:o,children:s("header.orgSwitcher.accept")}),i.jsx(Ne,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground",onClick:a,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:l}),children:i.jsx(Me,{size:14})})]})]})}const Wt=3,$e=10,Ft=440,Bt=55;function Ke(t){const e=Math.floor((t-Ft)/Bt);return Math.min($e,Math.max(Wt,e))}function Ht(t,e,s=$e*3,o=[]){return[...new Set([e,...o,...t])].slice(0,s)}function Gt(t,e){return!e.id||t.some(s=>s.slug===e.slug)?[...t]:[...t,e]}function Xt(t,e,s,o,r=[]){if(t.length<=o)return{shown:[...t],hidden:[]};const l=new Map(t.map(a=>[a.slug,a])),n=new Set;s&&l.has(s)&&n.add(s);for(const a of r)l.has(a)&&n.add(a);for(const a of e){if(n.size>=o)break;l.has(a)&&n.add(a)}for(const a of t){if(n.size>=o)break;n.add(a.slug)}return{shown:t.filter(a=>n.has(a.slug)),hidden:t.filter(a=>!n.has(a.slug))}}const Te=[];function qt(){const t=H.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=_e.recentOrgs(),t[0]=e):e=t[0];const[s,o]=ye(e,Te),r=Array.isArray(s)?s:Te;let l;t[1]!==o?(l=(a,c)=>o(d=>Ht(Array.isArray(d)?d:[],a,void 0,c)),t[1]=o,t[2]=l):l=t[2];let n;return t[3]!==r||t[4]!==l?(n={recent:r,remember:l},t[3]=r,t[4]=l,t[5]=n):n=t[5],n}const We={hidden:[],pinned:[],order:[]},fe=(t,e)=>t.filter(s=>s!==e);function ue(t){if(typeof t!="object"||t===null)return We;const e=o=>Array.isArray(o)?o.filter(r=>typeof r=="string"):[],s=t;return{hidden:e(s.hidden),pinned:e(s.pinned),order:e(s.order)}}function Yt(t,e){return{...t,hidden:[...fe(t.hidden,e),e],pinned:fe(t.pinned,e)}}function Jt(t,e){return{...t,hidden:fe(t.hidden,e)}}function Ut(t,e){return t.pinned.includes(e)?{...t,pinned:fe(t.pinned,e)}:{...t,hidden:fe(t.hidden,e),pinned:[...t.pinned,e]}}function Vt(t,e,s){const o=r=>{const l=e.order.indexOf(r);return l===-1?Number.MAX_SAFE_INTEGER:l};return t.filter(r=>r.slug===s||!e.hidden.includes(r.slug)).map((r,l)=>({org:r,index:l})).sort((r,l)=>Number(e.pinned.includes(l.org.slug))-Number(e.pinned.includes(r.org.slug))||o(r.org.slug)-o(l.org.slug)||r.index-l.index).map(({org:r})=>r)}function Qt(t,e,s,o){const r=e.indexOf(s),l=e.indexOf(o);if(r===-1||l===-1||r===l||t.pinned.includes(s)!==t.pinned.includes(o))return t;const n=[...e];return n.splice(r,1),n.splice(l,0,s),{...t,order:[...n,...t.order.filter(a=>!n.includes(a))]}}function ve(t){const e=H.c(11),{active:s,label:o,children:r}=t,l=s?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let n;e[0]!==l?(n=Y("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",l),e[0]=l,e[1]=n):n=e[1];let a;e[2]!==n?(a=i.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:i.jsx("span",{className:n})}),e[2]=n,e[3]=a):a=e[3];let c;e[4]!==s||e[5]!==o?(c=o&&i.jsx("span",{"aria-hidden":!0,className:Y("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",s?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:o}),e[4]=s,e[5]=o,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==a||e[9]!==c?(d=i.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[a,r,c]}),e[7]=r,e[8]=a,e[9]=c,e[10]=d):d=e[10],d}function Zt(t){return typeof t=="object"&&t!==null&&Array.isArray(t.items)}function es(t){const e=H.c(13),s=t.trim(),{data:o}=be.useSession(),r=o?.user?.id??"",l=s.length>0&&!!r,n=Ye.organizationSearch(r,s);let a;e[0]!==s?(a=async w=>{const{signal:O}=w,p=await fetch(`/api/_me/organizations/search?q=${encodeURIComponent(s)}`,{signal:O});if(!p.ok)throw new Error(`Organization search failed: ${p.status}`);const y=await p.json();if(!Zt(y))throw new Error("Invalid organization search response");return y},e[0]=s,e[1]=a):a=e[1];let c;e[2]!==l||e[3]!==n||e[4]!==a?(c={queryKey:n,queryFn:a,enabled:l,placeholderData:Je,staleTime:3e4,retry:!1},e[2]=l,e[3]=n,e[4]=a,e[5]=c):c=e[5];const{data:d,isFetching:g,isPlaceholderData:m,isError:h}=qe(c);let f;e[6]!==d?.items?(f=d?.items??[],e[6]=d?.items,e[7]=f):f=e[7];const u=l&&g,x=l&&m;let j;return e[8]!==h||e[9]!==f||e[10]!==u||e[11]!==x?(j={hits:f,isSearching:u,isStale:x,isError:h},e[8]=h,e[9]=f,e[10]=u,e[11]=x,e[12]=j):j=e[12],j}function ts(t){const e=H.c(61),{orgs:s,currentSlug:o,hiddenCount:r,onSelect:l}=t,n=U(),[a,c]=q.useState(!1),[d,g]=q.useState("");let m;e[0]!==d?(m=d.trim(),e[0]=d,e[1]=m):m=e[1];const h=m,f=$t(h,150),u=h.length>0,x=f===h,{hits:j,isSearching:w,isStale:O,isError:p}=es(u?f:""),y=u?j:s;let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=G=>{c(G),G||g("")},e[2]=v):v=e[2];const z=v;let b;e[3]!==n?(b=n("sidebar.rail.searchOrganizations"),e[3]=n,e[4]=b):b=e[4];let A;e[5]===Symbol.for("react.memo_cache_sentinel")?(A=()=>z(!0),e[5]=A):A=e[5];let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=i.jsx(Lt,{size:18}),e[6]=I):I=e[6];let _;e[7]!==b?(_=i.jsx(he,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":b,onClick:A,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:I})}),e[7]=b,e[8]=_):_=e[8];let E;e[9]!==r||e[10]!==n?(E=r>0?n("sidebar.rail.searchMoreOrganizations",{count:r}):n("sidebar.rail.searchOrganizations"),e[9]=r,e[10]=n,e[11]=E):E=e[11];let C;e[12]!==E?(C=i.jsx(me,{side:"right",children:E}),e[12]=E,e[13]=C):C=e[13];let T;e[14]!==_||e[15]!==C?(T=i.jsx(ve,{active:!1,children:i.jsxs(ge,{children:[_,C]})}),e[14]=_,e[15]=C,e[16]=T):T=e[16];let P;e[17]!==n?(P=n("sidebar.rail.searchOrganizations"),e[17]=n,e[18]=P):P=e[18];let S;e[19]!==n?(S=n("sidebar.rail.searchPlaceholder"),e[19]=n,e[20]=S):S=e[20];let R;e[21]!==n?(R=n("sidebar.rail.searchPlaceholder"),e[21]=n,e[22]=R):R=e[22];let M;e[23]!==d||e[24]!==R?(M=i.jsx(kt,{value:d,onValueChange:g,placeholder:R}),e[23]=d,e[24]=R,e[25]=M):M=e[25];const F=u&&(O||!x)&&"opacity-50";let K;e[26]!==F?(K=Y(F),e[26]=F,e[27]=K):K=e[27];let D;e[28]!==p||e[29]!==u||e[30]!==n?(D=u&&p&&i.jsx(Ee,{children:n("sidebar.rail.searchFailed")}),e[28]=p,e[29]=u,e[30]=n,e[31]=D):D=e[31];let $;e[32]!==p||e[33]!==w||e[34]!==y.length||e[35]!==x||e[36]!==n?($=!p&&x&&!w&&y.length===0&&i.jsx(Ee,{children:n("sidebar.rail.searchEmpty")}),e[32]=p,e[33]=w,e[34]=y.length,e[35]=x,e[36]=n,e[37]=$):$=e[37];let L;if(e[38]!==o||e[39]!==l||e[40]!==y||e[41]!==n){let G;e[43]!==o||e[44]!==l||e[45]!==n?(G=X=>i.jsxs(Pt,{value:X.slug,onSelect:()=>{z(!1),X.slug!==o&&l(X.slug)},className:"gap-2.5",children:[i.jsx(Re,{org:X,size:"sm"}),i.jsx("span",{className:"min-w-0 flex-1 truncate",children:X.name}),X.slug===o&&i.jsx("span",{className:"text-meta shrink-0",children:n("sidebar.rail.currentOrganization")})]},X.id),e[43]=o,e[44]=l,e[45]=n,e[46]=G):G=e[46],L=y.map(G),e[38]=o,e[39]=l,e[40]=y,e[41]=n,e[42]=L}else L=e[42];let k;e[47]!==K||e[48]!==D||e[49]!==$||e[50]!==L?(k=i.jsxs(Dt,{className:K,children:[D,$,L]}),e[47]=K,e[48]=D,e[49]=$,e[50]=L,e[51]=k):k=e[51];let W;e[52]!==a||e[53]!==P||e[54]!==S||e[55]!==M||e[56]!==k?(W=i.jsxs(Mt,{open:a,onOpenChange:z,title:P,description:S,shouldFilter:!1,children:[M,k]}),e[52]=a,e[53]=P,e[54]=S,e[55]=M,e[56]=k,e[57]=W):W=e[57];let J;return e[58]!==W||e[59]!==T?(J=i.jsxs(i.Fragment,{children:[T,W]}),e[58]=W,e[59]=T,e[60]=J):J=e[60],J}function ss(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const ns=()=>Ke(globalThis.innerHeight),is=()=>Ke(0);function rs(t){const e=H.c(59),{org:s,active:o,onSelect:r,pinned:l,onOpenSettings:n,onTogglePin:a,onHide:c}=t,d=U();let g;e[0]!==s.slug?(g={id:s.slug},e[0]=s.slug,e[1]=g):g=e[1];const{setNodeRef:m,listeners:h,transform:f,transition:u,isDragging:x}=bt(g);let j;e[2]!==f?(j=mt.Transform.toString(f?{...f,x:0}:null),e[2]=f,e[3]=j):j=e[3];const w=x?1:void 0,O=`rail-org-${s.slug}`;let p;e[4]!==j||e[5]!==w||e[6]!==O||e[7]!==u?(p={transform:j,transition:u,zIndex:w,viewTransitionName:O},e[4]=j,e[5]=w,e[6]=O,e[7]=u,e[8]=p):p=e[8];const y=s.name,v=o||void 0,z=o?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",b=r&&"cursor-pointer";let A;e[9]!==z||e[10]!==b?(A=Y("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",z,b),e[9]=z,e[10]=b,e[11]=A):A=e[11];let I;e[12]!==s?(I=i.jsx(Re,{org:s,size:"lg"}),e[12]=s,e[13]=I):I=e[13];let _;e[14]!==l?(_=l&&i.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:i.jsx(Ae,{size:9})}),e[14]=l,e[15]=_):_=e[15];let E;e[16]!==r||e[17]!==s.name||e[18]!==A||e[19]!==I||e[20]!==_||e[21]!==v?(E=i.jsx(he,{asChild:!0,children:i.jsx(zt,{asChild:!0,children:i.jsxs("button",{type:"button","aria-label":y,"aria-current":v,onClick:r,className:A,children:[I,_]})})}),e[16]=r,e[17]=s.name,e[18]=A,e[19]=I,e[20]=_,e[21]=v,e[22]=E):E=e[22];let C;e[23]!==s.name?(C=i.jsx(me,{side:"right",children:s.name}),e[23]=s.name,e[24]=C):C=e[24];let T;e[25]!==E||e[26]!==C?(T=i.jsxs(ge,{children:[E,C]}),e[25]=E,e[26]=C,e[27]=T):T=e[27];let P;e[28]===Symbol.for("react.memo_cache_sentinel")?(P=i.jsx(St,{}),e[28]=P):P=e[28];let S;e[29]!==d?(S=d("sidebar.rail.organizationSettings"),e[29]=d,e[30]=S):S=e[30];let R;e[31]!==n||e[32]!==S?(R=i.jsxs(ze,{onSelect:n,children:[P,S]}),e[31]=n,e[32]=S,e[33]=R):R=e[33];let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=i.jsx(Ae,{}),e[34]=M):M=e[34];let F;e[35]!==l||e[36]!==d?(F=d(l?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=l,e[36]=d,e[37]=F):F=e[37];let K;e[38]!==a||e[39]!==F?(K=i.jsxs(ze,{onSelect:a,children:[M,F]}),e[38]=a,e[39]=F,e[40]=K):K=e[40];let D;e[41]!==c||e[42]!==d?(D=c&&i.jsxs(ze,{onSelect:c,children:[i.jsx(jt,{}),d("sidebar.rail.hideOrganization")]}),e[41]=c,e[42]=d,e[43]=D):D=e[43];let $;e[44]!==R||e[45]!==K||e[46]!==D?($=i.jsxs(Ot,{children:[R,K,D]}),e[44]=R,e[45]=K,e[46]=D,e[47]=$):$=e[47];let L;e[48]!==T||e[49]!==$?(L=i.jsxs(_t,{children:[T,$]}),e[48]=T,e[49]=$,e[50]=L):L=e[50];let k;e[51]!==o||e[52]!==L?(k=i.jsx(ve,{active:o,children:L}),e[51]=o,e[52]=L,e[53]=k):k=e[53];let W;return e[54]!==h||e[55]!==m||e[56]!==k||e[57]!==p?(W=i.jsx("div",{ref:m,...h,style:p,className:"w-full shrink-0 touch-none",children:k}),e[54]=h,e[55]=m,e[56]=k,e[57]=p,e[58]=W):W=e[58],W}function os(t){const e=H.c(64),{project:s,orgSlug:o,active:r,onClose:l,onNavigate:n}=t,a=U();let c,d,g,m,h,f,u,x,j,w,O;if(e[0]!==r||e[1]!==n||e[2]!==o||e[3]!==s.icon||e[4]!==s.id||e[5]!==s.title){const M=yt(s.icon,s.title);O="group/rail relative flex w-full flex-col items-center gap-1",g=ge,d=he,w=!0,c=ke,m=et.root,e[17]!==o||e[18]!==s.id?(h={org:o,agentId:s.id},e[17]=o,e[18]=s.id,e[19]=h):h=e[19],f=s.title,u=r||void 0,e[20]!==n?(x=()=>{je("org_rail_recent_project_opened"),n?.()},e[20]=n,e[21]=x):x=e[21],j=Y("flex shrink-0 rounded-lg focus-ring",M.text,r&&"ring-[1.5px] ring-current"),e[0]=r,e[1]=n,e[2]=o,e[3]=s.icon,e[4]=s.id,e[5]=s.title,e[6]=c,e[7]=d,e[8]=g,e[9]=m,e[10]=h,e[11]=f,e[12]=u,e[13]=x,e[14]=j,e[15]=w,e[16]=O}else c=e[6],d=e[7],g=e[8],m=e[9],h=e[10],f=e[11],u=e[12],x=e[13],j=e[14],w=e[15],O=e[16];let p;e[22]!==s.icon||e[23]!==s.title?(p=i.jsx(vt,{icon:s.icon,name:s.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=s.icon,e[23]=s.title,e[24]=p):p=e[24];let y;e[25]!==c||e[26]!==m||e[27]!==h||e[28]!==f||e[29]!==u||e[30]!==x||e[31]!==j||e[32]!==p?(y=i.jsx(c,{to:m,params:h,"aria-label":f,"aria-current":u,onClick:x,className:j,children:p}),e[25]=c,e[26]=m,e[27]=h,e[28]=f,e[29]=u,e[30]=x,e[31]=j,e[32]=p,e[33]=y):y=e[33];let v;e[34]!==d||e[35]!==y||e[36]!==w?(v=i.jsx(d,{asChild:w,children:y}),e[34]=d,e[35]=y,e[36]=w,e[37]=v):v=e[37];let z;e[38]!==s.title?(z=i.jsx(me,{side:"right",children:s.title}),e[38]=s.title,e[39]=z):z=e[39];let b;e[40]!==g||e[41]!==v||e[42]!==z?(b=i.jsxs(g,{children:[v,z]}),e[40]=g,e[41]=v,e[42]=z,e[43]=b):b=e[43];const A=r?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let I;e[44]!==A?(I=Y("line-clamp-2 w-full text-center text-2xs break-words transition-colors",A),e[44]=A,e[45]=I):I=e[45];let _;e[46]!==s.title||e[47]!==I?(_=i.jsx("span",{"aria-hidden":!0,className:I,children:s.title}),e[46]=s.title,e[47]=I,e[48]=_):_=e[48];let E;e[49]!==s.title||e[50]!==a?(E=a("sidebar.rail.closeApp",{name:s.title}),e[49]=s.title,e[50]=a,e[51]=E):E=e[51];let C;e[52]!==l?(C=()=>{je("org_rail_recent_project_closed"),l()},e[52]=l,e[53]=C):C=e[53];let T,P;e[54]===Symbol.for("react.memo_cache_sentinel")?(T=Y("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),P=i.jsx(Me,{size:10}),e[54]=T,e[55]=P):(T=e[54],P=e[55]);let S;e[56]!==E||e[57]!==C?(S=i.jsx("button",{type:"button","aria-label":E,onClick:C,className:T,children:P}),e[56]=E,e[57]=C,e[58]=S):S=e[58];let R;return e[59]!==b||e[60]!==_||e[61]!==S||e[62]!==O?(R=i.jsxs("div",{className:O,children:[b,_,S]}),e[59]=b,e[60]=_,e[61]=S,e[62]=O,e[63]=R):R=e[63],R}const ls={"site-editor":"/site-editor"};function as(t){const e=H.c(26),{app:s}=t,o=U(),r=Rt[s],l=ls[s];if(!r||!l)return null;let n;e[0]!==r.labelKey||e[1]!==o?(n=o(r.labelKey),e[0]=r.labelKey,e[1]=o,e[2]=n):n=e[2];let a;e[3]!==r.labelKey||e[4]!==o?(a=o(r.labelKey),e[3]=r.labelKey,e[4]=o,e[5]=a):a=e[5];let c;e[6]!==r.tone?(c=Y("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",r.tone),e[6]=r.tone,e[7]=c):c=e[7];let d;e[8]!==r.Icon?(d=i.jsx(r.Icon,{size:18}),e[8]=r.Icon,e[9]=d):d=e[9];let g;e[10]!==a||e[11]!==c||e[12]!==d||e[13]!==l?(g=i.jsx(he,{asChild:!0,children:i.jsx(ke,{to:l,"aria-label":a,"aria-current":"page","data-testid":"org-rail-local-app",className:c,children:d})}),e[10]=a,e[11]=c,e[12]=d,e[13]=l,e[14]=g):g=e[14];let m;e[15]!==r.labelKey||e[16]!==o?(m=o(r.labelKey),e[15]=r.labelKey,e[16]=o,e[17]=m):m=e[17];let h;e[18]!==m?(h=i.jsx(me,{side:"right",children:m}),e[18]=m,e[19]=h):h=e[19];let f;e[20]!==g||e[21]!==h?(f=i.jsxs(ge,{children:[g,h]}),e[20]=g,e[21]=h,e[22]=f):f=e[22];let u;return e[23]!==n||e[24]!==f?(u=i.jsx(ve,{active:!0,label:n,children:f}),e[23]=n,e[24]=f,e[25]=u):u=e[25],u}function cs(){const{org:t}=Le();return Nt(t.slug),null}function Fe(t){const e=H.c(56),{onNavigate:s}=t===void 0?{}:t,o=U(),r=Ue(),{org:l}=Le(),n=Ve();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:hs},e[0]=a):a=e[0];const c=Qe(a);let d;e[1]!==c||e[2]!==n?(d=c?n({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=c,e[2]=n,e[3]=d):d=e[3];const g=d,m=g?g.org:l.slug,{data:h}=Ze(),[f,u]=q.useState(!1),x=Ce(),{recent:j,forget:w}=Et(l.slug),{projects:O}=Tt(),p=It(),y=At(),v=y&&y.projectId===null?y.app:null,z=v?[]:j.flatMap(N=>O.filter(B=>B.id===N)),b=Gt(h??[],l),{recent:A,remember:I}=qt();let _;e[4]===Symbol.for("react.memo_cache_sentinel")?(_=_e.railOrgPrefs(),e[4]=_):_=e[4];const[E,C]=ye(_,We),T=ue(E),P=q.useSyncExternalStore(ss,ns,is),{shown:S}=Xt(Vt(b,T,l.slug),A,l.slug,P,T.pinned);let R;e[5]===Symbol.for("react.memo_cache_sentinel")?(R={activationConstraint:{distance:8}},e[5]=R):R=e[5];const M=dt(ut(gt,R)),F=N=>{const{active:B,over:ce}=N;ce&&(je("org_rail_reordered"),C(He=>Qt(ue(He),S.map(fs),String(B.id),String(ce.id))))},K=N=>{s?.(),r({to:"/$org/home",params:{org:N},viewTransition:!0})},D=N=>{je("org_rail_travel");const B=S.some(ce=>ce.slug===N);C(ce=>Jt(ue(ce),N)),I(N,B?S.map(us):void 0),K(N)},$=!x&&"border-r border-sidebar-border";let L;e[6]!==$?(L=Y("flex w-[68px] shrink-0 flex-col items-center gap-2.5 overflow-y-auto bg-sidebar px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",$),e[6]=$,e[7]=L):L=e[7];let k;e[8]!==o?(k=o("sidebar.rail.ariaLabel"),e[8]=o,e[9]=k):k=e[9];const W=ft,J=ht,G=pt,X=S.map(ds),Se=xt,we=S.map(N=>i.jsxs(q.Fragment,{children:[i.jsx(rs,{org:N,active:N.slug===m,pinned:T.pinned.includes(N.slug),onSelect:N.slug!==l.slug?()=>D(N.slug):p?()=>K(N.slug):void 0,onOpenSettings:()=>{s?.(),r({to:"/$org/settings",params:{org:N.slug}})},onTogglePin:()=>C(B=>Ut(ue(B),N.slug)),onHide:N.slug===l.slug?void 0:()=>C(B=>Yt(ue(B),N.slug))}),N.slug===l.slug&&z.length>0&&i.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:z.map(B=>i.jsx(os,{project:B,orgSlug:l.slug,active:p===B.id,onClose:()=>w(B.id),onNavigate:s},B.id))})]},N.id));let V;e[10]!==G||e[11]!==X||e[12]!==Se||e[13]!==we?(V=i.jsx(G,{items:X,strategy:Se,children:we}),e[10]=G,e[11]=X,e[12]=Se,e[13]=we,e[14]=V):V=e[14];let Q;e[15]!==W||e[16]!==F||e[17]!==M||e[18]!==V||e[19]!==J?(Q=i.jsx(W,{sensors:M,collisionDetection:J,onDragEnd:F,children:V}),e[15]=W,e[16]=F,e[17]=M,e[18]=V,e[19]=J,e[20]=Q):Q=e[20];let Z;e[21]!==l.slug||e[22]!==b||e[23]!==S.length||e[24]!==D?(Z=b.length>S.length&&i.jsx(ts,{orgs:b,currentSlug:l.slug,hiddenCount:b.length-S.length,onSelect:D}),e[21]=l.slug,e[22]=b,e[23]=S.length,e[24]=D,e[25]=Z):Z=e[25];let ee;e[26]!==o?(ee=o("sidebar.picker.newOrganization"),e[26]=o,e[27]=ee):ee=e[27];let te;e[28]!==u?(te=()=>u(!0),e[28]=u,e[29]=te):te=e[29];let pe;e[30]===Symbol.for("react.memo_cache_sentinel")?(pe=i.jsx(wt,{size:18}),e[30]=pe):pe=e[30];let se;e[31]!==ee||e[32]!==te?(se=i.jsx(he,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":ee,onClick:te,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:pe})}),e[31]=ee,e[32]=te,e[33]=se):se=e[33];let ne;e[34]!==o?(ne=o("sidebar.picker.newOrganization"),e[34]=o,e[35]=ne):ne=e[35];let ie;e[36]!==ne?(ie=i.jsx(me,{side:"right",children:ne}),e[36]=ne,e[37]=ie):ie=e[37];let re;e[38]!==se||e[39]!==ie?(re=i.jsx(ve,{active:!1,children:i.jsxs(ge,{children:[se,ie]})}),e[38]=se,e[39]=ie,e[40]=re):re=e[40];let oe;e[41]!==v?(oe=v&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),i.jsx(as,{app:v})]}),e[41]=v,e[42]=oe):oe=e[42];let le;e[43]!==Q||e[44]!==Z||e[45]!==re||e[46]!==oe||e[47]!==L||e[48]!==k?(le=i.jsxs("div",{className:L,"aria-label":k,children:[Q,Z,re,oe]}),e[43]=Q,e[44]=Z,e[45]=re,e[46]=oe,e[47]=L,e[48]=k,e[49]=le):le=e[49];let ae;e[50]!==f||e[51]!==u?(ae=i.jsx(Ct,{open:f,onOpenChange:u}),e[50]=f,e[51]=u,e[52]=ae):ae=e[52];let xe;return e[53]!==le||e[54]!==ae?(xe=i.jsxs(i.Fragment,{children:[le,ae]}),e[53]=le,e[54]=ae,e[55]=xe):xe=e[55],xe}function ds(t){return t.slug}function us(t){return t.slug}function fs(t){return t.slug}function hs(t){return t.isLoading}function ms(t){const e=H.c(15),{width:s,minWidth:o,maxWidth:r,onPointerDown:l,onKeyDown:n,onDoubleClick:a}=t,c=U(),{isMobile:d}=De(),g=Ce();if(d||g)return null;let m;e[0]!==c?(m=c("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=c,e[1]=m):m=e[1];let h;e[2]!==c?(h=c("sidebar.sidebarResizeHandle.title"),e[2]=c,e[3]=h):h=e[3];let f,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(f={left:"var(--sidebar-width)"},u=i.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=f,e[5]=u):(f=e[4],u=e[5]);let x;return e[6]!==r||e[7]!==o||e[8]!==a||e[9]!==n||e[10]!==l||e[11]!==m||e[12]!==h||e[13]!==s?(x=i.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":m,"aria-valuenow":s,"aria-valuemin":o,"aria-valuemax":r,title:h,tabIndex:0,onPointerDown:l,onKeyDown:n,onDoubleClick:a,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:f,children:u}),e[6]=r,e[7]=o,e[8]=a,e[9]=n,e[10]=l,e[11]=m,e[12]=h,e[13]=s,e[14]=x):x=e[14],x}const Oe=400,Ie=16,gs="sidebar.width.v2";function ps(){const t=H.c(14),e=xs;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=u=>typeof u=="number"?e(u):192,t[0]=s):s=t[0];const[o,r]=ye(gs,s),l=q.useRef(null);let n;t[1]!==r||t[2]!==o?(n=u=>{u.preventDefault();const x=u.clientX,j=e(o),w=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),O=w?Array.from(w.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const v of O)v.style.transition="none";const p=v=>{const z=e(j+(v.clientX-x));w?.style.setProperty("--sidebar-width",`${z}px`)},y=v=>{const z=e(j+(v.clientX-x));r(z);for(const b of O)b.style.transition="";window.removeEventListener("pointermove",p),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",p),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y)},t[1]=r,t[2]=o,t[3]=n):n=t[3];const a=n;let c;t[4]!==r?(c=()=>{r(192)},t[4]=r,t[5]=c):c=t[5];const d=c;let g;t[6]!==r||t[7]!==o?(g=u=>{if(u.key==="ArrowLeft")r(e(o-Ie));else if(u.key==="ArrowRight")r(e(o+Ie));else if(u.key==="Home")r(192);else if(u.key==="End")r(Oe);else return;u.preventDefault()},t[6]=r,t[7]=o,t[8]=g):g=t[8];const m=g,h=e(o);let f;return t[9]!==m||t[10]!==a||t[11]!==d||t[12]!==h?(f={width:h,minWidth:192,maxWidth:Oe,wrapperRef:l,onStartResize:a,onKeyDownResize:m,resetWidth:d},t[9]=m,t[10]=a,t[11]=d,t[12]=h,t[13]=f):f=t[13],f}function xs(t){return Math.max(192,Math.min(Oe,t))}const Be=q.createContext(null);function bs(){const t=q.use(Be);if(!t)throw new Error("Layout regions require a Layout");return t}function js({children:t,notice:e,outsideOrg:s}){const o=ct(),[r,l]=ye(_e.sidebarOpen(),!0),n=ps(),a=Pe();return i.jsx(Be,{value:{isMobile:o,resize:n},children:i.jsx(st,{open:r,onOpenChange:l,children:i.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,i.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[a&&!s&&i.jsx(cs,{}),!o&&a&&(s?.rail??!0)&&i.jsx(Fe,{}),i.jsx(nt,{ref:n.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${n.width}px`,"--sidebar-width-icon":a?"0px":"3.125rem"},children:i.jsx(it,{children:t})})]})]})})})}function ys(t){const e=H.c(37),{children:s,renderMobile:o}=t,r=U(),{isMobile:l,resize:n}=bs(),{openMobile:a,setOpenMobile:c}=De(),d=Ce(),g=Pe();let m;e[0]!==c?(m=()=>c(!1),e[0]=c,e[1]=m):m=e[1];const h=m;if(!l){const v=g&&d;let z;e[2]!==s||e[3]!==v?(z=i.jsx("div",{className:"contents",inert:v,children:s}),e[2]=s,e[3]=v,e[4]=z):z=e[4];let b;e[5]!==n.maxWidth||e[6]!==n.minWidth||e[7]!==n.onKeyDownResize||e[8]!==n.onStartResize||e[9]!==n.resetWidth||e[10]!==n.width?(b=i.jsx(ms,{width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,onPointerDown:n.onStartResize,onKeyDown:n.onKeyDownResize,onDoubleClick:n.resetWidth}),e[5]=n.maxWidth,e[6]=n.minWidth,e[7]=n.onKeyDownResize,e[8]=n.onStartResize,e[9]=n.resetWidth,e[10]=n.width,e[11]=b):b=e[11];let A;return e[12]!==z||e[13]!==b?(A=i.jsxs(i.Fragment,{children:[z,b]}),e[12]=z,e[13]=b,e[14]=A):A=e[14],A}let f;e[15]!==r?(f=r("layouts.shellControls.navigationTitle"),e[15]=r,e[16]=f):f=e[16];let u;e[17]!==f?(u=i.jsx(ot,{className:"sr-only",children:f}),e[17]=f,e[18]=u):u=e[18];let x;e[19]!==h||e[20]!==g?(x=g&&i.jsx(Fe,{onNavigate:h}),e[19]=h,e[20]=g,e[21]=x):x=e[21];let j;e[22]!==h||e[23]!==o?(j=o({onClose:h}),e[22]=h,e[23]=o,e[24]=j):j=e[24];let w;e[25]!==j?(w=i.jsx("div",{className:"min-w-0 flex-1",children:j}),e[25]=j,e[26]=w):w=e[26];let O;e[27]!==x||e[28]!==w?(O=i.jsxs("div",{className:"flex h-full min-h-0",children:[x,w]}),e[27]=x,e[28]=w,e[29]=O):O=e[29];let p;e[30]!==u||e[31]!==O?(p=i.jsxs(lt,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:vs,children:[u,O]}),e[30]=u,e[31]=O,e[32]=p):p=e[32];let y;return e[33]!==a||e[34]!==c||e[35]!==p?(y=i.jsx(at,{open:a,onOpenChange:c,children:p}),e[33]=a,e[34]=c,e[35]=p,e[36]=y):y=e[36],y}function vs(t){return t.preventDefault()}function Ss(t){const e=H.c(3),{children:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={background:"transparent",containerType:"inline-size"},e[0]=o):o=e[0];let r;return e[1]!==s?(r=i.jsx(rt,{className:"flex flex-col min-h-0",style:o,children:i.jsx(tt,{variant:"plain",className:"bg-sidebar",children:i.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s})})}),e[1]=s,e[2]=r):r=e[2],r}const Hs=Object.assign(js,{Sidebar:ys,Content:Ss});export{Bs as I,Hs as L,Re as O,es as u,Gt as w};