decocms 4.454.0 → 4.455.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/dist/client/assets/{AlertCircle-Drwzhghj.js → AlertCircle-BOPAUEgU.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DsflNjr7.js → AreaChart-CJHdSsRl.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-CezG2Zdv.js → ArrowLeft-DGlO1CKr.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-CXufssbA.js → ArrowUp-Duh-8Vv0.js} +1 -1
  5. package/dist/client/assets/{Building02-DJChT5jT.js → Building02-D_rXBsfQ.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-750aOc14.js → CartesianChart-DIS9sPOp.js} +1 -1
  7. package/dist/client/assets/{Check-B92DFtap.js → Check-CcPSzxsY.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-BGmiRP6E.js → CheckCircle-CxJ9MBI3.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-8UK2xKJB.js → ChevronUp-C9klasvw.js} +1 -1
  10. package/dist/client/assets/{Copy01-FP69RgAk.js → Copy01-ByHdq7k3.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-qt3NXy8K.js → CreditCard01-D7Ll8vXp.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-B9RYKc4i.js → DotsVertical-CXVrXTYw.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-DsbpoCZl.js → ErrorBarContext-D4SFBJLe.js} +1 -1
  14. package/dist/client/assets/{Image01-B0kn2JYt.js → Image01-DAe5wd3u.js} +1 -1
  15. package/dist/client/assets/{Key01-BUKK8w6G.js → Key01-Dje7twgn.js} +1 -1
  16. package/dist/client/assets/{Line-DHeHa034.js → Line-p8cNw9wz.js} +1 -1
  17. package/dist/client/assets/{Link01-BbnnJlOr.js → Link01-BFa5_pnw.js} +1 -1
  18. package/dist/client/assets/{LinkBroken01-HNmPQH95.js → LinkBroken01-BQ3rvf4O.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-C6etEW45.js → LinkExternal01-ChFFafWR.js} +1 -1
  20. package/dist/client/assets/{Monitor01-CjYpbYaq.js → Monitor01-tvCvi4o_.js} +1 -1
  21. package/dist/client/assets/{Palette-Dz5PD9w1.js → Palette-BFtTwWPg.js} +1 -1
  22. package/dist/client/assets/{Plus-BS3PCfRW.js → Plus-Dk5G0eGJ.js} +1 -1
  23. package/dist/client/assets/{SearchMd-6QdHMDck.js → SearchMd-DJptVqPP.js} +1 -1
  24. package/dist/client/assets/{Sector-DHfiPoK8.js → Sector-CoYmht1l.js} +1 -1
  25. package/dist/client/assets/{ShoppingBag01-C_KZKFWK.js → ShoppingBag01-mUPmqGRd.js} +1 -1
  26. package/dist/client/assets/{Sun-BZOwobi1.js → Sun-Bl8Ky_if.js} +1 -1
  27. package/dist/client/assets/{Tool01-CbigwhjL.js → Tool01-CGCC9pfF.js} +1 -1
  28. package/dist/client/assets/{Trash01-CeldIlnM.js → Trash01-BA-bFjuS.js} +1 -1
  29. package/dist/client/assets/{Upload01-BZ3RgHZy.js → Upload01-C13aB89v.js} +1 -1
  30. package/dist/client/assets/{User01-aDNYrgVN.js → User01-B42bcRzQ.js} +1 -1
  31. package/dist/client/assets/{UserSquare-oYAuXebt.js → UserSquare-B6-k4uk5.js} +1 -1
  32. package/dist/client/assets/{Users01-J4x1K2Pz.js → Users01-BmXeKAri.js} +1 -1
  33. package/dist/client/assets/{X-BrQj6eYr.js → X-BdtW9stL.js} +1 -1
  34. package/dist/client/assets/{XAxis-BArQNKvn.js → XAxis-G213xRid.js} +1 -1
  35. package/dist/client/assets/{XClose-CGysFXHn.js → XClose-Bsj_jKUE.js} +1 -1
  36. package/dist/client/assets/{ZoomOut-DDm2Rukv.js → ZoomOut-BQf_lYpX.js} +1 -1
  37. package/dist/client/assets/{access-gate-ze-kwibq.js → access-gate-BtTwTt-9.js} +1 -1
  38. package/dist/client/assets/{add-connection-dialog-xnDQ-mvA.js → add-connection-dialog-CwnC8yt-.js} +1 -1
  39. package/dist/client/assets/{agent-analytics-f5lAh8Ui.js → agent-analytics-CPj4bxgs.js} +1 -1
  40. package/dist/client/assets/agent-app-CjNO2lXq.js +1 -0
  41. package/dist/client/assets/{agent-assets-BPwpUoCi.js → agent-assets-D5PkhLx3.js} +1 -1
  42. package/dist/client/assets/{agent-automation-BcFEp6Cl.js → agent-automation-Cd6QYcZt.js} +1 -1
  43. package/dist/client/assets/{agent-automations-CxIQwk4T.js → agent-automations-WUChl97S.js} +1 -1
  44. package/dist/client/assets/{agent-connect-sources-CXHnSeL8.js → agent-connect-sources-BTKe88uu.js} +1 -1
  45. package/dist/client/assets/agent-deck-BBsYONOP.js +1 -0
  46. package/dist/client/assets/{agent-e2e-CW1LlImt.js → agent-e2e-D92Tz-G3.js} +1 -1
  47. package/dist/client/assets/{agent-experiments-D0cBSCP5.js → agent-experiments-B5NLiDa9.js} +1 -1
  48. package/dist/client/assets/{agent-file-DF93yklk.js → agent-file-BlaR5see.js} +1 -1
  49. package/dist/client/assets/{agent-hosting-CpL0F6Gk.js → agent-hosting-CoW01d6P.js} +1 -1
  50. package/dist/client/assets/{agent-icon-pwgAjvSj.js → agent-icon-QobcC4y1.js} +1 -1
  51. package/dist/client/assets/agent-library-DJDlIAqS.js +1 -0
  52. package/dist/client/assets/agent-library-file-CZjl7KSc.js +1 -0
  53. package/dist/client/assets/{agent-monitor-DTVepCuV.js → agent-monitor-B-qOXS0c.js} +1 -1
  54. package/dist/client/assets/{agent-overview-Q5ZJtcbK.js → agent-overview-CLWCQeaZ.js} +1 -1
  55. package/dist/client/assets/agent-settings-DhGEY9it.js +1 -0
  56. package/dist/client/assets/{agent-site-editor-CuhoA0JN.js → agent-site-editor-DFNItXi0.js} +16 -16
  57. package/dist/client/assets/agent-site-editor-code-D1HLX1NJ.js +2 -0
  58. package/dist/client/assets/{agent-site-editor-content-Djj53kW8.js → agent-site-editor-content-DeSoO3Vu.js} +3 -3
  59. package/dist/client/assets/{agent-site-editor-preview-6DKgIt8I.js → agent-site-editor-preview-BQKa6vcQ.js} +3 -3
  60. package/dist/client/assets/agent-view-YbbJ0c-k.js +1 -0
  61. package/dist/client/assets/{agent-view-guard-Bfl-tAeJ.js → agent-view-guard-BggSlJ4I.js} +1 -1
  62. package/dist/client/assets/{agents-list-9TajvM2T.js → agents-list-Ckh7S6i4.js} +1 -1
  63. package/dist/client/assets/{ai-providers-XQa_Yqk4.js → ai-providers-KNbVRi9R.js} +2 -2
  64. package/dist/client/assets/{alert-C1kaDeHU.js → alert-BZ6uRdL8.js} +1 -1
  65. package/dist/client/assets/{alert-dialog-BNM4GspY.js → alert-dialog-13GPwGkk.js} +1 -1
  66. package/dist/client/assets/{analytics-sections-BmUgF32Q.js → analytics-sections-C4iGKBOV.js} +1 -1
  67. package/dist/client/assets/{api-keys-P48b-XKM.js → api-keys-Btl9HmTY.js} +1 -1
  68. package/dist/client/assets/api-keys-C1C00ELj.js +1 -0
  69. package/dist/client/assets/app-editor-Cr-wsjho.js +1 -0
  70. package/dist/client/assets/{asset-utils-Bt5Mmhr4.js → asset-utils-B4wnf4gp.js} +1 -1
  71. package/dist/client/assets/{auth-DloMQRn-.js → auth-BMIwdKU8.js} +1 -1
  72. package/dist/client/assets/{auth-catchall-CX92fpaf.js → auth-catchall-CsvXshlN.js} +1 -1
  73. package/dist/client/assets/{auth-entry-DP8FUcNp.js → auth-entry-BuNH69Nv.js} +1 -1
  74. package/dist/client/assets/{auth-split-layout-B3bbs-Up.js → auth-split-layout-rkoJUdAV.js} +1 -1
  75. package/dist/client/assets/{authenticate-and-persist-oauth-B9ZUK6d8.js → authenticate-and-persist-oauth-DWogyy0B.js} +1 -1
  76. package/dist/client/assets/{automation-list-row-DHgnXxXe.js → automation-list-row-db5LJ5pV.js} +1 -1
  77. package/dist/client/assets/{automation-runs-DO3KmJWd.js → automation-runs-_74LLZTB.js} +1 -1
  78. package/dist/client/assets/automations-qyXzvoeZ.js +1 -0
  79. package/dist/client/assets/{autosend-DMdU4D_q.js → autosend-B5Obavo-.js} +1 -1
  80. package/dist/client/assets/{avatar-tshBeT_k.js → avatar-Bpp_lL_f.js} +1 -1
  81. package/dist/client/assets/{badge-kYz8xLCj.js → badge-DTNkOzY0.js} +1 -1
  82. package/dist/client/assets/{block-document-B-f7MqNI.js → block-document-BLOu51_T.js} +1 -1
  83. package/dist/client/assets/{blocks-preview-workspace-context-Bo-qKmmq.js → blocks-preview-workspace-context-BmjkHogK.js} +1 -1
  84. package/dist/client/assets/{blog-schema-CpX8G3P9.js → blog-schema-B4_qQgjF.js} +1 -1
  85. package/dist/client/assets/{buckets-sS8QOpbY.js → buckets-CCNSYAgt.js} +1 -1
  86. package/dist/client/assets/{build-improve-prompt-doc-Mqcr44H3.js → build-improve-prompt-doc-oJt1CVIT.js} +1 -1
  87. package/dist/client/assets/{calendar-C6vCy5td.js → calendar-BRUBvVES.js} +1 -1
  88. package/dist/client/assets/{capability-load-error-Bv5lZoOI.js → capability-load-error-th8zEGOp.js} +1 -1
  89. package/dist/client/assets/{category-editor-BxW3qwMj.js → category-editor-CRqB5ots.js} +1 -1
  90. package/dist/client/assets/{chart-DtZz1D74.js → chart-DBFqaeAD.js} +1 -1
  91. package/dist/client/assets/{chat-context-C15Zggsw.js → chat-context-BHWxNMFT.js} +6 -6
  92. package/dist/client/assets/{chat-draft-CNPGBGtE.js → chat-draft-SnGEiSWm.js} +1 -1
  93. package/dist/client/assets/{checkbox-CoB5GNar.js → checkbox-DuccoC4e.js} +1 -1
  94. package/dist/client/assets/{choose-editor-CcnH8Yfu.js → choose-editor-Blu_E7S8.js} +1 -1
  95. package/dist/client/assets/{claim-phase-copy-D98vtebL.js → claim-phase-copy-J9IiJiw_.js} +1 -1
  96. package/dist/client/assets/{cli-auth-success-DOKwgUAF.js → cli-auth-success-g5vIj6jD.js} +1 -1
  97. package/dist/client/assets/{client-icons-D8157nhh.js → client-icons-ByIvBqps.js} +1 -1
  98. package/dist/client/assets/collapsible-qdaAxaaw.js +1 -0
  99. package/dist/client/assets/{collection-detail-Bskh3jLk.js → collection-detail-CRpVPceB.js} +1 -1
  100. package/dist/client/assets/{collection-display-button-Cko2EHEn.js → collection-display-button-CAE4H1Z5.js} +1 -1
  101. package/dist/client/assets/{collection-search-B6GyRPQj.js → collection-search-BG7vK4NS.js} +1 -1
  102. package/dist/client/assets/{collection-table-wrapper-pcI6kq1c.js → collection-table-wrapper-C-F_T5Eb.js} +1 -1
  103. package/dist/client/assets/{collection-tabs-Ce2hPfhA.js → collection-tabs-DrZNeSEC.js} +1 -1
  104. package/dist/client/assets/{column-rules-RRaWiepd.js → column-rules-C1VVvSzv.js} +1 -1
  105. package/dist/client/assets/{combobox-J3uaIqpo.js → combobox-B0tRCuGZ.js} +1 -1
  106. package/dist/client/assets/{command-C6GsqANI.js → command-D4xFqyr9.js} +1 -1
  107. package/dist/client/assets/{companion-mcps-section-BCooAxKl.js → companion-mcps-section-Cz5vCHft.js} +1 -1
  108. package/dist/client/assets/{config-C6IjEPlY.js → config-DPczwNxh.js} +1 -1
  109. package/dist/client/assets/{connect-layout-Wq72HKKB.js → connect-layout-B5AnMnce.js} +1 -1
  110. package/dist/client/assets/{connect-D1Ak2mZu.js → connect-pk9RQf7E.js} +1 -1
  111. package/dist/client/assets/{connection-CbAiARog.js → connection-BBVDOaSM.js} +1 -1
  112. package/dist/client/assets/{connection-card-CAnO7yXs.js → connection-card-D1TMmLIT.js} +1 -1
  113. package/dist/client/assets/{connection-detail-C-r6COZx.js → connection-detail-DQ776dHS.js} +1 -1
  114. package/dist/client/assets/{connection-form-helpers-5Mx8EuPh.js → connection-form-helpers-CFQwZ1sv.js} +1 -1
  115. package/dist/client/assets/{connections-I8Yzo-IM.js → connections-D5_-1i7h.js} +1 -1
  116. package/dist/client/assets/{context-3KrwueMi.js → context-BzZmRn5A.js} +1 -1
  117. package/dist/client/assets/{context-menu-L6q2T3zU.js → context-menu-Dt0_Wi5C.js} +1 -1
  118. package/dist/client/assets/{create-organization-dialog-C0W5g_-F.js → create-organization-dialog-SVvYPMqI.js} +1 -1
  119. package/dist/client/assets/{daily-pulse-BtVhdtym.js → daily-pulse-Dy2ScJNC.js} +1 -1
  120. package/dist/client/assets/{decopilot-CxKuS7Hl.js → decopilot-Bh5nOuj8.js} +1 -1
  121. package/dist/client/assets/{device-hint-Dkx-hrme.js → device-hint-BWrI1ZAV.js} +1 -1
  122. package/dist/client/assets/{dialog-m22Y6h7g.js → dialog-CwJ0Tacd.js} +1 -1
  123. package/dist/client/assets/{discover-zFlKIWtn.js → discover-BN5fZmxX.js} +1 -1
  124. package/dist/client/assets/{domain-settings-O3FdSB4T.js → domain-settings-C0ggYD-b.js} +1 -1
  125. package/dist/client/assets/{download-app-dialog-B8SQurhW.js → download-app-dialog-BlTQi4L1.js} +1 -1
  126. package/dist/client/assets/{drawer-CClleQMp.js → drawer-LGekY388.js} +1 -1
  127. package/dist/client/assets/{editor-DdNAJ5w-.js → editor-DIJFF-Rn.js} +3 -3
  128. package/dist/client/assets/{empty-state-CgvAfnKE.js → empty-state-Db66egMr.js} +1 -1
  129. package/dist/client/assets/{empty-state-Bj2d1wbp.js → empty-state-DdDKihxt.js} +1 -1
  130. package/dist/client/assets/{extract-connection-data-BQXe1mLC.js → extract-connection-data-BZKTCWVm.js} +1 -1
  131. package/dist/client/assets/{feature-gate-CJEZJ1-O.js → feature-gate-DIpT85T7.js} +1 -1
  132. package/dist/client/assets/{feature-paywall-kAWAXYwN.js → feature-paywall--RganMza.js} +1 -1
  133. package/dist/client/assets/{file-explorer-BwQIZf-P.js → file-explorer-B0caqImY.js} +1 -1
  134. package/dist/client/assets/{file-preview-xm9h33DS.js → file-preview-BVUwkvqy.js} +1 -1
  135. package/dist/client/assets/{file-share-button-D6-oxZSz.js → file-share-button-Dfx-yCi-.js} +1 -1
  136. package/dist/client/assets/{file-type-icon-dSRM1l-h.js → file-type-icon-CYHSeMg9.js} +1 -1
  137. package/dist/client/assets/flat-project-CXofx1Tp.js +1 -0
  138. package/dist/client/assets/{folder-icon-B8eTpc38.js → folder-icon-Bz05bjxQ.js} +1 -1
  139. package/dist/client/assets/{form-D725QIdH.js → form-DXEENu_8.js} +1 -1
  140. package/dist/client/assets/{gateway-client-BUCIKZM8.js → gateway-client-DafKkh5Q.js} +1 -1
  141. package/dist/client/assets/{general-ByFmb3LK.js → general-P5nYRAWt.js} +1 -1
  142. package/dist/client/assets/{home-B4qpUxV8.js → home-C9qFKdi5.js} +1 -1
  143. package/dist/client/assets/{icon-button-B41a8eEz.js → icon-button-c-SlONOU.js} +1 -1
  144. package/dist/client/assets/{index-BFNzK42a.js → index-0glLJTM3.js} +1 -1
  145. package/dist/client/assets/{index-DcL61QpW.js → index-BOGZM7Pw.js} +55 -55
  146. package/dist/client/assets/{index-C5h6-hF2.js → index-CaP5SDB2.js} +1 -1
  147. package/dist/client/assets/{index-CLIILOVs.js → index-Ccz5AaI_.js} +1 -1
  148. package/dist/client/assets/index-Cj9p5mwA.css +1 -0
  149. package/dist/client/assets/{index-CtaZIKyn.js → index-D9bgHbh-.js} +1 -1
  150. package/dist/client/assets/{index-BkXFyUcd.js → index-DGWe6sla.js} +1 -1
  151. package/dist/client/assets/{index-CSL-CGai.js → index-DK7oXPIL.js} +1 -1
  152. package/dist/client/assets/{index-DLgtk0KZ.js → index-Dl3JXElC.js} +1 -1
  153. package/dist/client/assets/{index-CLaEyrGG.js → index-DlDzsxeJ.js} +1 -1
  154. package/dist/client/assets/{index-BBcMw6O4.js → index-DuKSozhT.js} +1 -1
  155. package/dist/client/assets/{index-iHhJjaOn.js → index-KD5FDUeP.js} +1 -1
  156. package/dist/client/assets/{index-DKbxAirp.js → index-ZDbB-PVr.js} +1 -1
  157. package/dist/client/assets/{index-DYZWZkq_.js → index-ehY3MQSN.js} +3 -3
  158. package/dist/client/assets/{index-HSZJgFJQ.js → index-mRG9os_M.js} +1 -1
  159. package/dist/client/assets/{index-redirect-D70MJD8b.js → index-redirect-zukIYzlP.js} +1 -1
  160. package/dist/client/assets/{index-hq3ghq-n.js → index-txkdKzZ6.js} +1 -1
  161. package/dist/client/assets/{infiniteQueryObserver-E5UmFb9W.js → infiniteQueryObserver-CHVbl4Al.js} +1 -1
  162. package/dist/client/assets/{infra-billing-BDBT59J7.js → infra-billing-D94tvu0v.js} +1 -1
  163. package/dist/client/assets/{input-gsvsf3Co.js → input-C0ZWiiGy.js} +1 -1
  164. package/dist/client/assets/{input-Bci42A7F.js → input-Cbyu0LGy.js} +1 -1
  165. package/dist/client/assets/{input-DrEZw_Cf.js → input-qBVmxar0.js} +3 -3
  166. package/dist/client/assets/{integration-icon-YnKsYYgL.js → integration-icon-DUuPtqFs.js} +1 -1
  167. package/dist/client/assets/{label-Cnn1c71K.js → label-CKukDnnz.js} +1 -1
  168. package/dist/client/assets/{layout-DB80gFtZ.js → layout-DZr1Z4Vi.js} +1 -1
  169. package/dist/client/assets/{legacy-agents-deep-B1sxdLWT.js → legacy-agents-deep-O_a0ihqp.js} +1 -1
  170. package/dist/client/assets/legacy-main-redirect-B6sO18wU.js +1 -0
  171. package/dist/client/assets/library-DOnOZswk.js +1 -0
  172. package/dist/client/assets/{library-tab-BX_xJUsg.js → library-tab-CGsiOX6E.js} +1 -1
  173. package/dist/client/assets/{login-CgAc07is.js → login-hdkcuXfq.js} +1 -1
  174. package/dist/client/assets/{markdown-a1CGabs6.js → markdown-DNk_PyOf.js} +32 -32
  175. package/dist/client/assets/{mcp-app-renderer-BrwAxgBj.js → mcp-app-renderer-CJ5u3TPG.js} +1 -1
  176. package/dist/client/assets/{mcp-oauth-BZX4UPME.js → mcp-oauth-cSH4PfZY.js} +1 -1
  177. package/dist/client/assets/{members-CcMMF0NL.js → members-C-_zRkLX.js} +1 -1
  178. package/dist/client/assets/{memory-pg1dZiT-.js → memory-DLRzHb1w.js} +2 -2
  179. package/dist/client/assets/{mini-report-page-BETdoOkU.js → mini-report-page-CFzUUmyT.js} +1 -1
  180. package/dist/client/assets/{mock-board-actUMbvT.js → mock-board-Si0mPE9y.js} +1 -1
  181. package/dist/client/assets/{monaco-editor-sVwfHt7G.js → monaco-editor-C4uDUO_q.js} +1 -1
  182. package/dist/client/assets/{monitoring-stats-row-bUN3dxIQ.js → monitoring-stats-row-CllZiW9E.js} +1 -1
  183. package/dist/client/assets/{multi-select-Cn492ZDh.js → multi-select-DiHVOPXR.js} +1 -1
  184. package/dist/client/assets/{mustache-D3mbJm7W.js → mustache-C7f92o5k.js} +1 -1
  185. package/dist/client/assets/{new-project-dialog-Jz7zmURx.js → new-project-dialog-CiCMTA1C.js} +1 -1
  186. package/dist/client/assets/{oauth-callback-B10WevpB.js → oauth-callback-Cb4S9fwE.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-ai-provider-Dtb1OqHn.js → oauth-callback-ai-provider-CD_A5mvP.js} +1 -1
  188. package/dist/client/assets/{onboarding-BczsKDsS.js → onboarding-B2wyTbOl.js} +1 -1
  189. package/dist/client/assets/{openai-conversation-DSQtUBxA.js → openai-conversation-WSjKAhvH.js} +1 -1
  190. package/dist/client/assets/{optimistic-project-sidebar-views-D5frg7n9.js → optimistic-project-sidebar-views-BBFtzDV4.js} +1 -1
  191. package/dist/client/assets/{org-file-open-context-Cl1fDQD_.js → org-file-open-context--_UQSpdl.js} +1 -1
  192. package/dist/client/assets/{organization-choice-DNzCKBtX.js → organization-choice-Bs4XFXgS.js} +1 -1
  193. package/dist/client/assets/{orgs-BQLNxD6c.js → orgs-DzdQslwf.js} +1 -1
  194. package/dist/client/assets/{page-seo-form-BthwIqFI.js → page-seo-form-vON-l1GZ.js} +1 -1
  195. package/dist/client/assets/{pair-94agu_Ki.js → pair-IorbWgZn.js} +1 -1
  196. package/dist/client/assets/{plan-ladder-BeVPeoez.js → plan-ladder-DSodyL3Q.js} +1 -1
  197. package/dist/client/assets/{popover-C4iPRS4r.js → popover-DvKxqM1r.js} +1 -1
  198. package/dist/client/assets/{post-calendar-Qv9D1Jws.js → post-calendar-DiEfiKrj.js} +1 -1
  199. package/dist/client/assets/{post-editor-C6t9_mME.js → post-editor-HV3DNHNH.js} +1 -1
  200. package/dist/client/assets/{preview-content-B8P7Syk7.js → preview-content-Bd42BahA.js} +1 -1
  201. package/dist/client/assets/{preview-dialog-DHzjjtT4.js → preview-dialog-DBXVi9mo.js} +1 -1
  202. package/dist/client/assets/{profile-C568R4pX.js → profile-C62VIFSL.js} +1 -1
  203. package/dist/client/assets/{project-app-view-DSvkUq-N.js → project-app-view-DYaaNrnC.js} +1 -1
  204. package/dist/client/assets/{project-feed-Drklkiu3.js → project-feed-DDiBGrsP.js} +1 -1
  205. package/dist/client/assets/{project-icon-KgUuj1jh.js → project-icon-DQrOXeEW.js} +1 -1
  206. package/dist/client/assets/project-reports-HuiRnlkO.js +1 -0
  207. package/dist/client/assets/project-tasks-Ck5F7vye.js +1 -0
  208. package/dist/client/assets/{projects-Cdq5NGy5.js → projects-C-62vsjh.js} +1 -1
  209. package/dist/client/assets/{projects-empty-state-DNf8--Pu.js → projects-empty-state-DllkKglW.js} +1 -1
  210. package/dist/client/assets/{prompts-p9nLaPDL.js → prompts-53mGvQlZ.js} +1 -1
  211. package/dist/client/assets/record-editor-BAdOwM42.js +1 -0
  212. package/dist/client/assets/{redirect-editor-CvpXgZ7O.js → redirect-editor-C2CflIXw.js} +1 -1
  213. package/dist/client/assets/{reports--3Iv8T-X.js → reports-DQcmX2XK.js} +1 -1
  214. package/dist/client/assets/reports-Dyr-R6yJ.js +1 -0
  215. package/dist/client/assets/{reports-onboarding-BEzpouJd.js → reports-onboarding-DRfSptAM.js} +1 -1
  216. package/dist/client/assets/{reports-tab-CIgxZBfw.js → reports-tab-BGRnmmWF.js} +2 -2
  217. package/dist/client/assets/{repositories-C7iwSzf0.js → repositories-ltvP9f3v.js} +1 -1
  218. package/dist/client/assets/{repository-binding-hTPljaf8.js → repository-binding-CEDkA6og.js} +1 -1
  219. package/dist/client/assets/{repository-import-picker-CTPX1DQP.js → repository-import-picker-BT060hhl.js} +1 -1
  220. package/dist/client/assets/{repository-picker-7U4CHQ4P.js → repository-picker-Bowb7b9f.js} +1 -1
  221. package/dist/client/assets/{require-capability-BzYAsNFY.js → require-capability-DN9BJlNM.js} +1 -1
  222. package/dist/client/assets/{required-auth-layout-DjdOvVTG.js → required-auth-layout-CKgEUo-z.js} +1 -1
  223. package/dist/client/assets/{reset-password-BTpCbzGB.js → reset-password-B6iTpX4u.js} +1 -1
  224. package/dist/client/assets/{resizable-BywOOcFk.js → resizable-Cd8jDRB7.js} +1 -1
  225. package/dist/client/assets/resolve-tab-icon-X0M-w-vv.js +1 -0
  226. package/dist/client/assets/{review-settings-B4981DGs.js → review-settings-CsnvQ-Qq.js} +1 -1
  227. package/dist/client/assets/{rich-text-link-control-C25TVX1m.js → rich-text-link-control-ClsuTwdo.js} +1 -1
  228. package/dist/client/assets/{roles-DEvo8fPk.js → roles-CU8q7gVb.js} +1 -1
  229. package/dist/client/assets/{route-BYw8XTUB.js → route-CIn0WnXQ.js} +1 -1
  230. package/dist/client/assets/route-NLnkR9WP.js +1 -0
  231. package/dist/client/assets/route-qm6cYbsf.js +1 -0
  232. package/dist/client/assets/{runnable-block-editor-giWS8w8s.js → runnable-block-editor-2ItVAsl7.js} +1 -1
  233. package/dist/client/assets/{sandbox-git-api-N7TWg65m.js → sandbox-git-api-DTIjDZTr.js} +1 -1
  234. package/dist/client/assets/{sandbox-lifecycle-context-CH1QALAe.js → sandbox-lifecycle-context-C0vkuH66.js} +1 -1
  235. package/dist/client/assets/{schema-B1Xr6nHt.js → schema-W3hqtN1B.js} +1 -1
  236. package/dist/client/assets/{scroll-area-BpTqtdVg.js → scroll-area-BN7R6f0c.js} +1 -1
  237. package/dist/client/assets/{search-input-Dx9yRlJi.js → search-input-dP8TWy_f.js} +1 -1
  238. package/dist/client/assets/{search-toggle-De7zTGad.js → search-toggle-BY33vUyT.js} +1 -1
  239. package/dist/client/assets/{secret-picker-Czn4WuWR.js → secret-picker-Bw0HhGwk.js} +1 -1
  240. package/dist/client/assets/{secrets-Dpkx9T4K.js → secrets-D3WU-wHx.js} +1 -1
  241. package/dist/client/assets/{sections-editor-kIOTC_6U.js → sections-editor-Bnb_Ii_2.js} +1 -1
  242. package/dist/client/assets/{select-BWJrfhuu.js → select-CGC5E9nf.js} +1 -1
  243. package/dist/client/assets/{select-model-Mdv-A2JR.js → select-model-B24PK9T9.js} +1 -1
  244. package/dist/client/assets/{seo-editor-qfnZgRp-.js → seo-editor-C0eExFGM.js} +1 -1
  245. package/dist/client/assets/{separator-C628kCEI.js → separator-CJCi7EK2.js} +1 -1
  246. package/dist/client/assets/settings-tab-6YGWJaPP.js +5 -0
  247. package/dist/client/assets/{sheet-i6OdPROw.js → sheet-DOIzAtMq.js} +1 -1
  248. package/dist/client/assets/{shell-layout-Daayzqr1.js → shell-layout-B9OaioSj.js} +1 -1
  249. package/dist/client/assets/{skills-bKlf7NOA.js → skills-DdHXbE4c.js} +1 -1
  250. package/dist/client/assets/{sso-CENohvGC.js → sso-WAQdj9Pk.js} +1 -1
  251. package/dist/client/assets/{suggestion-BWu5XPQx.js → suggestion-CotdwSyy.js} +2 -2
  252. package/dist/client/assets/{switch-D3OVMEG_.js → switch-Ctdc8it1.js} +1 -1
  253. package/dist/client/assets/{synced-repos-Dl3ygy-q.js → synced-repos-DFq2CK-H.js} +1 -1
  254. package/dist/client/assets/{tab-icon-glyph-DqktAKdY.js → tab-icon-glyph-CXhMb9aF.js} +1 -1
  255. package/dist/client/assets/{table-GYsBXU5j.js → table-BCWfTyhH.js} +1 -1
  256. package/dist/client/assets/{tabs-DBcyQJHV.js → tabs-BCc9oqWy.js} +1 -1
  257. package/dist/client/assets/{task-board-B7B7hL1D.js → task-board-Dh6sWb9t.js} +1 -1
  258. package/dist/client/assets/{task-route-BCrTutbo.js → task-route-BGcHuycG.js} +1 -1
  259. package/dist/client/assets/{task-status-DVgcTIUw.js → task-status-CjAgmdGY.js} +1 -1
  260. package/dist/client/assets/{taskboard-analytics-DDEcgYtQ.js → taskboard-analytics-CgboMqfv.js} +1 -1
  261. package/dist/client/assets/{tasks-DbSH0x5_.js → tasks-CQrn-rBP.js} +1 -1
  262. package/dist/client/assets/tasks-L9jj-kWQ.js +1 -0
  263. package/dist/client/assets/{textarea-DWLtCIjy.js → textarea-e3h0PKfc.js} +1 -1
  264. package/dist/client/assets/{thread-analytics-D-vj2NBR.js → thread-analytics-u-mhBpUO.js} +1 -1
  265. package/dist/client/assets/{thread-button-DXUHGnaQ.js → thread-button-D5H005fQ.js} +1 -1
  266. package/dist/client/assets/{thread-intent-CirCeNTL.js → thread-intent-CNOpHUCE.js} +1 -1
  267. package/dist/client/assets/{thread-route-DuzeT05u.js → thread-route-DU2TTrlu.js} +1 -1
  268. package/dist/client/assets/{thread-route-DiSxO6jm.js → thread-route-esGiDSRu.js} +1 -1
  269. package/dist/client/assets/{thread-sheet-body-CljMyBUr.js → thread-sheet-body-Bn55RhIb.js} +1 -1
  270. package/dist/client/assets/{toggle-group-ClfsxZi8.js → toggle-group-BUS82Kqf.js} +1 -1
  271. package/dist/client/assets/{toolbar-icon-button-DgR8rjka.js → toolbar-icon-button-B8tRovqj.js} +1 -1
  272. package/dist/client/assets/{tooltip-Dj3JLNmI.js → tooltip-DoWVDYxv.js} +1 -1
  273. package/dist/client/assets/{track-ChJV1haK.js → track-slrdEZ2N.js} +1 -1
  274. package/dist/client/assets/{types-BpElZvfU.js → types-BlCCVKMl.js} +3 -3
  275. package/dist/client/assets/{usage-stats-PAJqTdmY.js → usage-stats-ELYwp3GN.js} +1 -1
  276. package/dist/client/assets/{use-ai-providers-LsqI_NDS.js → use-ai-providers-BuwFLwdC.js} +1 -1
  277. package/dist/client/assets/{use-automations-BvFvyYLv.js → use-automations-B8HKsWEy.js} +1 -1
  278. package/dist/client/assets/{use-autosave-Demsd_Bp.js → use-autosave-77sC71ka.js} +1 -1
  279. package/dist/client/assets/{use-chat-layout-state-CSfibNl5.js → use-chat-layout-state-Cd1SDWUO.js} +1 -1
  280. package/dist/client/assets/{use-clock-tick-B_y_vQik.js → use-clock-tick-DkYE6iX2.js} +1 -1
  281. package/dist/client/assets/{use-connect-companion-CyEd-0U-.js → use-connect-companion-sjR8VGIZ.js} +1 -1
  282. package/dist/client/assets/{use-connection-BCpL6TUI.js → use-connection-C4j2pJbz.js} +1 -1
  283. package/dist/client/assets/{use-copy-Ch-XSDTy.js → use-copy-BiyQhtNG.js} +1 -1
  284. package/dist/client/assets/{use-create-virtual-mcp-Drl_crNg.js → use-create-virtual-mcp-C0a_KTOz.js} +1 -1
  285. package/dist/client/assets/{use-date-fns-locale-CwfVVkAv.js → use-date-fns-locale-dFt0Hwsj.js} +1 -1
  286. package/dist/client/assets/{use-debounced-autosave-DBHawyU4.js → use-debounced-autosave-D58XDw_5.js} +1 -1
  287. package/dist/client/assets/{use-debounced-value-DcoaAHVw.js → use-debounced-value-C1TKx6na.js} +1 -1
  288. package/dist/client/assets/{use-deco-credits-dNOqCRVG.js → use-deco-credits--by3KJXE.js} +1 -1
  289. package/dist/client/assets/{use-decopilot-events-C7xIpTnG.js → use-decopilot-events-DL6Ppxgb.js} +1 -1
  290. package/dist/client/assets/{use-delete-connection-ClL2rL2F.js → use-delete-connection-Cc8dNIWp.js} +1 -1
  291. package/dist/client/assets/{use-deployment-admin-CliDsND2.js → use-deployment-admin-D0_O_QSr.js} +1 -1
  292. package/dist/client/assets/{use-fast-preview-draft-url-UIUx90se.js → use-fast-preview-draft-url-KJgu2gHZ.js} +1 -1
  293. package/dist/client/assets/{use-file-configs-y9HNrasc.js → use-file-configs-j21JL3yE.js} +1 -1
  294. package/dist/client/assets/{use-infinite-scroll-KLtLLDtq.js → use-infinite-scroll-BAQqTty_.js} +1 -1
  295. package/dist/client/assets/{use-join-requests-BSdSmmLg.js → use-join-requests-B2449AYt.js} +1 -1
  296. package/dist/client/assets/use-main-panel-tabs-NhZJRbOq.js +1 -0
  297. package/dist/client/assets/{use-mcp-auth-status-BI7IKa-y.js → use-mcp-auth-status-CG-b2BD1.js} +1 -1
  298. package/dist/client/assets/{use-mcp-client-ChAILH13.js → use-mcp-client-9jF2B0Tz.js} +1 -1
  299. package/dist/client/assets/{use-mcp-prompts-DsWsUQb0.js → use-mcp-prompts-DNAsQeJA.js} +1 -1
  300. package/dist/client/assets/{use-mcp-tools-jtYDVZVr.js → use-mcp-tools-Dbm0kb0W.js} +1 -1
  301. package/dist/client/assets/{use-members-COnUcl-q.js → use-members-CmQfPBAn.js} +1 -1
  302. package/dist/client/assets/{use-mobile-C8m3pXWu.js → use-mobile-9GiVme_1.js} +1 -1
  303. package/dist/client/assets/use-navigate-to-agent-CSgL519X.js +1 -0
  304. package/dist/client/assets/use-new-blocks-editor-CQ_89Cdt.js +1 -0
  305. package/dist/client/assets/{use-open-billing-url-xzoCKaHk.js → use-open-billing-url-CIF0WByS.js} +1 -1
  306. package/dist/client/assets/{use-org-auth-client-CmeJjjLJ.js → use-org-auth-client-BBAyh5Tz.js} +1 -1
  307. package/dist/client/assets/{use-org-fs-ys9LE3L7.js → use-org-fs-DF_BlZtj.js} +1 -1
  308. package/dist/client/assets/{use-org-repo-syncs-C5w7qsMQ.js → use-org-repo-syncs-kX31P2gW.js} +1 -1
  309. package/dist/client/assets/{use-org-sso-Cl2ofNpa.js → use-org-sso-BmivjhbI.js} +1 -1
  310. package/dist/client/assets/{use-organization-roles-1Scsi0yQ.js → use-organization-roles-DEPf_2N_.js} +1 -1
  311. package/dist/client/assets/{use-organization-settings-mrHm62_c.js → use-organization-settings-BgEtBsl7.js} +1 -1
  312. package/dist/client/assets/{use-panel-navigate-CnuAGCN6.js → use-panel-navigate-4MoLzTpw.js} +1 -1
  313. package/dist/client/assets/{use-project-scope-BfZMgRO8.js → use-project-scope-CUYDg9gO.js} +1 -1
  314. package/dist/client/assets/{use-releases-Bt3pzO9D.js → use-releases-Dgq67fk3.js} +1 -1
  315. package/dist/client/assets/{use-reports-diagnostic-tmoQEBFX.js → use-reports-diagnostic-D9eBWCCe.js} +1 -1
  316. package/dist/client/assets/{use-secrets-CamZv5L6.js → use-secrets-D-qkpxrJ.js} +1 -1
  317. package/dist/client/assets/{use-section-preview-base-BEFcAhKu.js → use-section-preview-base-LT3afhUQ.js} +1 -1
  318. package/dist/client/assets/{use-session-runtime-DN1EalSS.js → use-session-runtime-C1jT9-WF.js} +1 -1
  319. package/dist/client/assets/{use-tags-D_80Nz1Z.js → use-tags-D0iZ2cgD.js} +1 -1
  320. package/dist/client/assets/{use-task-board-analytics-1A2IZS7o.js → use-task-board-analytics-B0Mv4i0Z.js} +1 -1
  321. package/dist/client/assets/{use-task-board-events--3b_oYqD.js → use-task-board-events-Q5BqAnUD.js} +1 -1
  322. package/dist/client/assets/{use-task-metadata-bXN1a1ia.js → use-task-metadata-B9tqJ9GP.js} +1 -1
  323. package/dist/client/assets/{use-thread-analytics-DAFG92HR.js → use-thread-analytics-D5tK9O4P.js} +1 -1
  324. package/dist/client/assets/{use-thread-outputs-CjN4G6Qe.js → use-thread-outputs-CDQWo15F.js} +1 -1
  325. package/dist/client/assets/useInfiniteQuery-pxyjNhep.js +1 -0
  326. package/dist/client/assets/{useQueries-JjGHGN44.js → useQueries-DvMDA4qD.js} +1 -1
  327. package/dist/client/assets/useSuspenseInfiniteQuery-Cf0qcKEf.js +1 -0
  328. package/dist/client/assets/{users-DMG1ObhA.js → users-BE1CJVdF.js} +1 -1
  329. package/dist/client/assets/{utils-CTFhJwon.js → utils-CZW3O45l.js} +1 -1
  330. package/dist/client/assets/{variant-calendar-Dp9Xjf6s.js → variant-calendar-C_oSHjpD.js} +1 -1
  331. package/dist/client/assets/{variant-matcher-override-CSX703eN.js → variant-matcher-override-B9Dx0Ujt.js} +1 -1
  332. package/dist/client/assets/{view-mode-toggle-DDxJvhXS.js → view-mode-toggle-BjrOeE_u.js} +1 -1
  333. package/dist/client/assets/{virtual-mcp-BYTHR2--.js → virtual-mcp-DkCjKqhT.js} +1 -1
  334. package/dist/client/index.html +2 -2
  335. package/dist/server/cli.js +1 -1
  336. package/dist/server/server.js +1 -1
  337. package/package.json +1 -1
  338. package/dist/client/assets/agent-app-DKrEjVcd.js +0 -1
  339. package/dist/client/assets/agent-deck-DjJP2Dqo.js +0 -1
  340. package/dist/client/assets/agent-git-DJJxJGe9.js +0 -3
  341. package/dist/client/assets/agent-library-DBKTnXrB.js +0 -1
  342. package/dist/client/assets/agent-library-file-BdjP7M97.js +0 -1
  343. package/dist/client/assets/agent-settings-RuGKA4Bf.js +0 -1
  344. package/dist/client/assets/agent-site-editor-code-D7cHIapT.js +0 -2
  345. package/dist/client/assets/agent-view-CPb-P5wa.js +0 -1
  346. package/dist/client/assets/api-keys-DJs8hkJr.js +0 -1
  347. package/dist/client/assets/app-editor-iDpReCh1.js +0 -1
  348. package/dist/client/assets/automations-D6KjhYRv.js +0 -1
  349. package/dist/client/assets/collapsible-n3zGanAW.js +0 -1
  350. package/dist/client/assets/flat-project-Cr2ZLPWX.js +0 -1
  351. package/dist/client/assets/index-D62n7mh5.css +0 -1
  352. package/dist/client/assets/legacy-main-redirect-Z0AkiGlr.js +0 -1
  353. package/dist/client/assets/library-DlTO_bX3.js +0 -1
  354. package/dist/client/assets/message-templates-rojffDUc.js +0 -1
  355. package/dist/client/assets/project-reports-DRNVoDrz.js +0 -1
  356. package/dist/client/assets/project-tasks-ClhyZ2vF.js +0 -1
  357. package/dist/client/assets/record-editor-DedOHUHL.js +0 -1
  358. package/dist/client/assets/reports-B01Qv5dk.js +0 -1
  359. package/dist/client/assets/resolve-tab-icon-_-o9HGxh.js +0 -1
  360. package/dist/client/assets/route-B3ONXdU4.js +0 -1
  361. package/dist/client/assets/route-GnVMxwVm.js +0 -1
  362. package/dist/client/assets/settings-tab-CaPbZv3W.js +0 -5
  363. package/dist/client/assets/tasks-CQzkuoAf.js +0 -1
  364. package/dist/client/assets/use-main-panel-tabs-m9gZrRtp.js +0 -1
  365. package/dist/client/assets/use-navigate-to-agent-B5Azt3lu.js +0 -1
  366. package/dist/client/assets/use-new-blocks-editor-DaNq-zRT.js +0 -1
  367. package/dist/client/assets/useInfiniteQuery-w91VrWRO.js +0 -1
  368. package/dist/client/assets/useSuspenseInfiniteQuery-D8oSI1Qa.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as R,c as E,b as U,j as a,ak as tt,l as G,X as ge,o as es,a2 as ts,e as ss,K as he,t as ze,m as dt,ab as ns,E as ls,h as as,B as He,aJ as ft,aa as os,ea as mt,s as rs,p as qe,d as We,d0 as is,d$ as cs,eb as us}from"./index-DcL61QpW.js";import{aP as ds,aQ as fs,aA as ms,R as ps,a as st,ar as gs,h as xs,a2 as hs,aR as bs,aS as pt,aT as ys,q as De,aL as js,aK as vs,aU as gt,aV as xt,A as ht,aW as fe,X as Ns,b as Ss,F as ks,f as _s}from"./agent-icon-pwgAjvSj.js";import{t as Ie,f as ws,c as Cs}from"./Tool01-CbigwhjL.js";import{i as bt}from"./LinkBroken01-HNmPQH95.js";import{i as yt}from"./Check-B92DFtap.js";import{a as Ts}from"./Copy01-FP69RgAk.js";import{b as je,c as Ke,d as nt}from"./format-time-CjIPQhCN.js";import{b as Is,C as $s,a as As}from"./collapsible-n3zGanAW.js";import{u as Ms}from"./use-copy-Ch-XSDTy.js";import{a as jt,M as $e,b as Es}from"./usage-stats-PAJqTdmY.js";import{v as Ls,u as Ps,x as Rs,y as zs}from"./thread-intent-CirCeNTL.js";import{f as ve,r as Ds,u as Ne,v as Fs,a as Bs,w as Os,x as Us}from"./chat-context-C15Zggsw.js";import{u as Ge}from"./use-clock-tick-B_y_vQik.js";import{c as Hs}from"./content-blocks-o63cs2vh.js";import{M as qs}from"./mcp-app-renderer-BrwAxgBj.js";import{g as vt}from"./types-BpElZvfU.js";import{o as Ws}from"./omit-sandbox-map-jj4lCB2U.js";import{T as Nt,a as St,b as kt}from"./tooltip-Dj3JLNmI.js";import{c as Ks,u as _t}from"./use-mcp-client-ChAILH13.js";import{g as wt,s as Ct}from"./gateway-client-BUCIKZM8.js";import{s as Tt}from"./tool-namespace-DmnQIdtF.js";import{t as Gs,g as pe,u as be}from"./utils-CVEq3hMx.js";import{i as It}from"./AlertCircle-Drwzhghj.js";import{s as Vs,a as _e,n as Js}from"./Image01-B0kn2JYt.js";import{s as Xs}from"./XClose-CGysFXHn.js";import{n as Fe}from"./ShoppingBag01-C_KZKFWK.js";import{i as Qs}from"./SearchMd-6QdHMDck.js";import{a as Ys,d as Zs}from"./shell-layout-Daayzqr1.js";import{a as Ve}from"./use-panel-navigate-CnuAGCN6.js";import{c as $t}from"./use-decopilot-events-C7xIpTnG.js";import{I as en,M as At}from"./markdown-a1CGabs6.js";import{n as Mt}from"./LinkExternal01-C6etEW45.js";import{c as tn,S as sn,a as nn,b as ln}from"./sheet-i6OdPROw.js";import{I as Se}from"./integration-icon-YnKsYYgL.js";import{a as Et}from"./use-connection-BCpL6TUI.js";import{a as me}from"./Palette-Dz5PD9w1.js";import{u as Lt}from"./use-navigate-to-agent-B5Azt3lu.js";import{i as we}from"./Link01-BbnnJlOr.js";import{g as an}from"./use-mcp-prompts-DsWsUQb0.js";import{c as on,P as rn,u as cn,e as un,F as dn,s as fn,b as mn}from"./index-BBcMw6O4.js";import{i as pn}from"./Monitor01-CjYpbYaq.js";import{a as gn}from"./use-thread-outputs-CjN4G6Qe.js";import{F as xn}from"./file-type-icon-dSRM1l-h.js";import{t as hn}from"./ChevronUp-8UK2xKJB.js";const bn={damping:.7,stiffness:.05,mass:1.25},yn=70,jn=1e3/60,vn=350;let Ae=!1;globalThis.document?.addEventListener("mousedown",()=>{Ae=!0});globalThis.document?.addEventListener("mouseup",()=>{Ae=!1});globalThis.document?.addEventListener("click",()=>{Ae=!1});const Nn=(s={})=>{const[e,t]=R.useState(!1),[l,n]=R.useState(s.initial!==!1),[c,u]=R.useState(!1),i=R.useRef(null);i.current=s;const r=R.useCallback(()=>{if(!Ae)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),o=R.useCallback(b=>{d.isAtBottom=b,n(b)},[]),m=R.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:l,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:j}=getComputedStyle(x.current);j!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,j!=="auto"&&(x.current.style.scrollBehavior=j)}},get targetScrollTop(){return!x.current||!v.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!v.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:x.current,contentElement:v.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=yn}}},[]),f=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||o(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:_=!1}=b;let y,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{y=Date.now()}):y=k+(b.duration??0);const N=async()=>{const w=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,M=performance.now(),A=(M-(d.lastTick??M))/jn;if(d.animation||(d.animation={behavior:j,promise:w,ignoreEscapes:_}),d.animation.behavior===j&&(d.lastTick=M),r()||k>Date.now())return N();if(C<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,N();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*A,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return N()}return y>Date.now()?(S=d.calculatedTargetScrollTop,N()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Le(i.current,i.current.resize),ignoreEscapes:_,duration:Math.max(0,y-Date.now())||void 0}):d.isAtBottom)});return w.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:N()},[o,r,d]),p=R.useCallback(()=>{m(!0),o(!1)},[m,o]),g=R.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:_=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(_=j),u(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(r()){m(!0),o(!1);return}const y=k>_,S=k<_;if(d.animation?.ignoreEscapes){d.scrollTop=_;return}S&&(m(!0),o(!1)),y&&m(!1),!d.escapedFromLock&&d.isNearBottom&&o(!0)},1)},[m,o,r,d]),h=R.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),o(!1))},[m,o,d]),x=lt(b=>{x.current?.removeEventListener("scroll",g),x.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),v=lt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:_}=j.contentRect,y=_-(k??_);if(d.resizeDifference=y,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),u(d.isNearBottom),y>=0){const S=Le(i.current,k?i.current.resize:i.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:vn})}else d.isNearBottom&&(m(!1),o(!0));k=_,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===y&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:v,scrollRef:x,scrollToBottom:f,stopScroll:p,isAtBottom:l||c,isNearBottom:c,escapedFromLock:e,state:d}};function lt(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const Ee=new Map;function Le(...s){const e={...bn};let t=!1;for(const n of s){if(n==="instant"){t=!0;continue}typeof n=="object"&&(t=!1,e.damping=n.damping??e.damping,e.stiffness=n.stiffness??e.stiffness,e.mass=n.mass??e.mass)}const l=JSON.stringify(e);return Ee.has(l)||Ee.set(l,Object.freeze(e)),t?"instant":Ee.get(l)}function H({icon:s,title:e,usage:t,summary:l,state:n,detail:c,detailVariant:u="code",forceOpen:i,variant:r="default",trailing:o,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=U(),[h,x]=R.useState(f??!1),{handleCopy:v,copied:b}=Ms(),k=n==="loading",j=n==="error",y=!!(c&&c.trim())||!!p,S=r==="subtask",N=(i??!1)||h,w=Nn({initial:k?"instant":!1}),C=a.jsxs(Is,{open:N,onOpenChange:i?void 0:x,className:"min-w-0",children:[a.jsxs($s,{disabled:!y,className:G("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",y&&"[@media(hover:hover)]:hover:bg-accent/30",!y&&"cursor-default",k&&"shimmer"),"aria-disabled":!y,children:[a.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?a.jsx(tt,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:G("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",y&&(N?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),y&&a.jsx("div",{className:G("absolute inset-0 flex items-center justify-center transition-opacity duration-150",N?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:a.jsx(tt,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")})})]})}),a.jsx("span",{className:G("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),l?a.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l})}):a.jsx("div",{className:"flex-1"}),o&&a.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:o}),a.jsx(jt,{usage:t})]}),y&&a.jsx(As,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(u==="prose"?a.jsx("div",{className:"mt-1 mb-1",children:a.jsx("div",{ref:w.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a.jsx("p",{ref:w.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:c})})}):a.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:a.jsx("div",{ref:w.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:a.jsxs("div",{ref:w.contentRef,className:"flex items-start justify-between gap-2",children:[a.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:a.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:c})}),a.jsx("button",{type:"button",onClick:()=>v(c),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?a.jsx(yt,{className:"size-3.5"}):a.jsx(Ts,{className:"size-3.5"})})]})})}))})]});return S?a.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:C}):C}function ne(s){const e=E.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=je(t),e[0]=t,e[1]=l):l=e[1];let n;return e[2]!==l?(n=a.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=n):n=e[3],n}const Pt=4;function Rt(s){const e=E.c(8),{count:t,noun:l,onClick:n}=s,c=U();let u;e[0]!==t||e[1]!==l||e[2]!==c?(u=c("common.seeAll",{count:t,noun:l}),e[0]=t,e[1]=l,e[2]=c,e[3]=u):u=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(bt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==u?(r=a.jsxs("button",{type:"button",onClick:n,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[u,i]}),e[5]=n,e[6]=u,e[7]=r):r=e[7],r}function zt(s){const e=E.c(12),{message:t,className:l}=s,n=t.created_at??t.metadata?.created_at??null;let c,u,i,r;if(e[0]!==l||e[1]!==n){r=Symbol.for("react.early_return_sentinel");e:{const m=Ke(n);if(m===null){r=null;break e}const d=new Date(m);c=d.toLocaleString(),e[6]!==l?(u=G("text-[11px] text-muted-foreground/60 select-none",l),e[6]=l,e[7]=u):u=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=n,e[2]=c,e[3]=u,e[4]=i,e[5]=r}else c=e[2],u=e[3],i=e[4],r=e[5];if(r!==Symbol.for("react.early_return_sentinel"))return r;let o;return e[8]!==c||e[9]!==u||e[10]!==i?(o=a.jsx("span",{title:c,className:u,children:i}),e[8]=c,e[9]=u,e[10]=i,e[11]=o):o=e[11],o}function Be(s){const e=E.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>nt(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[n,c]=R.useState(l);let u,i;e[2]!==t?(u=()=>{const d=setInterval(()=>c(nt(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=u,e[4]=i):(u=e[3],i=e[4]),R.useEffect(u,i);const r=n/1e3;let o;e[5]!==r?(o=je(r),e[5]=r,e[6]=o):o=e[6];let m;return e[7]!==o?(m=a.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:o}),e[7]=o,e[8]=m):m=e[8],m}const Dt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=E.c(5),[e]=R.useState(kn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let l;s[1]!==e?(l=Dt.map((c,u)=>{const{delay:i}=c;return a.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[u],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},u)}),s[1]=e,s[2]=l):l=s[2];let n;return s[3]!==l?(n=a.jsx("div",{className:"grid",style:t,children:l}),s[3]=l,s[4]=n):n=s[4],n}function kn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Dt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function _n(s){return{planning:{icon:a.jsx(fs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:a.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const wn=1200;function Oe(s){const e=E.c(8),{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:i,trailing:r}=s,o=i===void 0?"prose":i;let m;return e[0]!==c||e[1]!==o||e[2]!==t||e[3]!==u||e[4]!==n||e[5]!==l||e[6]!==r?(m=a.jsx(H,{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:o,trailing:r}),e[0]=c,e[1]=o,e[2]=t,e[3]=u,e[4]=n,e[5]=l,e[6]=r,e[7]=m):m=e[7],m}function Cn(s){const e=E.c(22),{startedAt:t}=s,l=U(),n=ve()?.runStatusStage??null,[c,u]=R.useState("planning");let i,r;if(e[0]!==n?(i=()=>{if(n!==null)return;const h=setTimeout(()=>{u("thinking")},wn);return()=>{clearTimeout(h)}},r=[n],e[0]=n,e[1]=i,e[2]=r):(i=e[1],r=e[2]),R.useEffect(i,r),n!==null){let h;e[3]!==n||e[4]!==l?(h=Ls(l,n),e[3]=n,e[4]=l,e[5]=h):h=e[5];const x=h;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(Ie,{className:"size-4"}),e[6]=v):v=e[6];const b=`${x.label}...`;let k;e[7]!==t?(k=t!==null&&a.jsx(Be,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==x.detail||e[10]!==b||e[11]!==k?(j=a.jsx(Oe,{icon:v,title:b,summary:x.detail,state:"loading",trailing:k}),e[9]=x.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let o;e[13]!==l?(o=_n(l),e[13]=l,e[14]=o):o=e[14];const d=o[c],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&a.jsx(Be,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=a.jsx(Oe,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function Tn(s){const e=E.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(Sn,{}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=a.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[l,a.jsx(Be,{since:t})]}),e[1]=t,e[2]=n):n=e[2],n}const In=2e4;function $n(s){const e=E.c(9),{startedAt:t}=s,l=U(),n=Ge(1e3),c=ve(),i=(t!==null?n-t:0)>=In;let r;e[0]!==t?(r=a.jsx(Cn,{startedAt:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==i||e[3]!==c||e[4]!==l?(o=i&&c?.stop&&a.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[a.jsx("span",{children:l("chat.thinkingIndicator.takingLonger")}),a.jsx("button",{type:"button",onClick:()=>c.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:l("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=c,e[4]=l,e[5]=o):o=e[5];let m;return e[6]!==r||e[7]!==o?(m=a.jsxs("div",{className:"flex flex-col gap-0.5",children:[r,o]}),e[6]=r,e[7]=o,e[8]=m):m=e[8],m}function An(s){const e=E.c(24),{duration:t,parts:l,isStreaming:n}=s,c=U();let u;e[0]!==l?(u=l.every(Ln),e[0]=l,e[1]=u):u=e[1];const i=u;let r;e[2]!==t||e[3]!==c?(r=t&&t/1e3>1?c("chat.thinkingIndicator.thoughtFor",{duration:je(t/1e3)}):c("chat.thinkingIndicator.thought"),e[2]=t,e[3]=c,e[4]=r):r=e[4];const o=r;let m;if(e[5]!==i||e[6]!==n||e[7]!==l){const k=l.map(En).join(`
1
+ import{r as R,c as E,b as U,j as a,ak as tt,l as G,X as ge,o as es,a2 as ts,e as ss,K as he,t as ze,m as dt,ab as ns,E as ls,h as as,B as He,aJ as ft,aa as os,eb as mt,s as rs,p as qe,d as We,d0 as is,e0 as cs,ec as us}from"./index-BOGZM7Pw.js";import{aP as ds,aQ as fs,aA as ms,R as ps,a as st,ar as gs,h as xs,a2 as hs,aR as bs,aS as pt,aT as ys,q as De,aL as js,aK as vs,aU as gt,aV as xt,A as ht,aW as fe,X as Ns,b as Ss,F as ks,f as _s}from"./agent-icon-QobcC4y1.js";import{t as Ie,f as ws,c as Cs}from"./Tool01-CGCC9pfF.js";import{i as bt}from"./LinkBroken01-BQ3rvf4O.js";import{i as yt}from"./Check-CcPSzxsY.js";import{a as Ts}from"./Copy01-ByHdq7k3.js";import{b as je,c as Ke,d as nt}from"./format-time-CjIPQhCN.js";import{b as Is,C as $s,a as As}from"./collapsible-qdaAxaaw.js";import{u as Ms}from"./use-copy-BiyQhtNG.js";import{a as jt,M as $e,b as Es}from"./usage-stats-ELYwp3GN.js";import{v as Ls,u as Ps,x as Rs,y as zs}from"./thread-intent-CNOpHUCE.js";import{f as ve,r as Ds,u as Ne,v as Fs,a as Bs,w as Os,x as Us}from"./chat-context-BHWxNMFT.js";import{u as Ge}from"./use-clock-tick-DkYE6iX2.js";import{c as Hs}from"./content-blocks-o63cs2vh.js";import{M as qs}from"./mcp-app-renderer-CJ5u3TPG.js";import{g as vt}from"./types-BlCCVKMl.js";import{o as Ws}from"./omit-sandbox-map-jj4lCB2U.js";import{T as Nt,a as St,b as kt}from"./tooltip-DoWVDYxv.js";import{c as Ks,u as _t}from"./use-mcp-client-9jF2B0Tz.js";import{g as wt,s as Ct}from"./gateway-client-DafKkh5Q.js";import{s as Tt}from"./tool-namespace-DmnQIdtF.js";import{t as Gs,g as pe,u as be}from"./utils-CVEq3hMx.js";import{i as It}from"./AlertCircle-BOPAUEgU.js";import{s as Vs,a as _e,n as Js}from"./Image01-DAe5wd3u.js";import{s as Xs}from"./XClose-Bsj_jKUE.js";import{n as Fe}from"./ShoppingBag01-mUPmqGRd.js";import{i as Qs}from"./SearchMd-DJptVqPP.js";import{a as Ys,d as Zs}from"./shell-layout-B9OaioSj.js";import{a as Ve}from"./use-panel-navigate-4MoLzTpw.js";import{c as $t}from"./use-decopilot-events-DL6Ppxgb.js";import{I as en,M as At}from"./markdown-DNk_PyOf.js";import{n as Mt}from"./LinkExternal01-ChFFafWR.js";import{c as tn,S as sn,a as nn,b as ln}from"./sheet-DOIzAtMq.js";import{I as Se}from"./integration-icon-DUuPtqFs.js";import{a as Et}from"./use-connection-C4j2pJbz.js";import{a as me}from"./Palette-BFtTwWPg.js";import{u as Lt}from"./use-navigate-to-agent-CSgL519X.js";import{i as we}from"./Link01-BFa5_pnw.js";import{g as an}from"./use-mcp-prompts-DNAsQeJA.js";import{c as on,P as rn,u as cn,e as un,F as dn,s as fn,b as mn}from"./index-DuKSozhT.js";import{i as pn}from"./Monitor01-tvCvi4o_.js";import{a as gn}from"./use-thread-outputs-CDQWo15F.js";import{F as xn}from"./file-type-icon-CYHSeMg9.js";import{t as hn}from"./ChevronUp-C9klasvw.js";const bn={damping:.7,stiffness:.05,mass:1.25},yn=70,jn=1e3/60,vn=350;let Ae=!1;globalThis.document?.addEventListener("mousedown",()=>{Ae=!0});globalThis.document?.addEventListener("mouseup",()=>{Ae=!1});globalThis.document?.addEventListener("click",()=>{Ae=!1});const Nn=(s={})=>{const[e,t]=R.useState(!1),[l,n]=R.useState(s.initial!==!1),[c,u]=R.useState(!1),i=R.useRef(null);i.current=s;const r=R.useCallback(()=>{if(!Ae)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),o=R.useCallback(b=>{d.isAtBottom=b,n(b)},[]),m=R.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:l,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:j}=getComputedStyle(x.current);j!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,j!=="auto"&&(x.current.style.scrollBehavior=j)}},get targetScrollTop(){return!x.current||!v.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!v.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:x.current,contentElement:v.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=yn}}},[]),f=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||o(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:_=!1}=b;let y,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{y=Date.now()}):y=k+(b.duration??0);const N=async()=>{const w=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,M=performance.now(),A=(M-(d.lastTick??M))/jn;if(d.animation||(d.animation={behavior:j,promise:w,ignoreEscapes:_}),d.animation.behavior===j&&(d.lastTick=M),r()||k>Date.now())return N();if(C<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,N();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*A,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return N()}return y>Date.now()?(S=d.calculatedTargetScrollTop,N()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Le(i.current,i.current.resize),ignoreEscapes:_,duration:Math.max(0,y-Date.now())||void 0}):d.isAtBottom)});return w.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:N()},[o,r,d]),p=R.useCallback(()=>{m(!0),o(!1)},[m,o]),g=R.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:_=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(_=j),u(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(r()){m(!0),o(!1);return}const y=k>_,S=k<_;if(d.animation?.ignoreEscapes){d.scrollTop=_;return}S&&(m(!0),o(!1)),y&&m(!1),!d.escapedFromLock&&d.isNearBottom&&o(!0)},1)},[m,o,r,d]),h=R.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),o(!1))},[m,o,d]),x=lt(b=>{x.current?.removeEventListener("scroll",g),x.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),v=lt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:_}=j.contentRect,y=_-(k??_);if(d.resizeDifference=y,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),u(d.isNearBottom),y>=0){const S=Le(i.current,k?i.current.resize:i.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:vn})}else d.isNearBottom&&(m(!1),o(!0));k=_,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===y&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:v,scrollRef:x,scrollToBottom:f,stopScroll:p,isAtBottom:l||c,isNearBottom:c,escapedFromLock:e,state:d}};function lt(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const Ee=new Map;function Le(...s){const e={...bn};let t=!1;for(const n of s){if(n==="instant"){t=!0;continue}typeof n=="object"&&(t=!1,e.damping=n.damping??e.damping,e.stiffness=n.stiffness??e.stiffness,e.mass=n.mass??e.mass)}const l=JSON.stringify(e);return Ee.has(l)||Ee.set(l,Object.freeze(e)),t?"instant":Ee.get(l)}function H({icon:s,title:e,usage:t,summary:l,state:n,detail:c,detailVariant:u="code",forceOpen:i,variant:r="default",trailing:o,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=U(),[h,x]=R.useState(f??!1),{handleCopy:v,copied:b}=Ms(),k=n==="loading",j=n==="error",y=!!(c&&c.trim())||!!p,S=r==="subtask",N=(i??!1)||h,w=Nn({initial:k?"instant":!1}),C=a.jsxs(Is,{open:N,onOpenChange:i?void 0:x,className:"min-w-0",children:[a.jsxs($s,{disabled:!y,className:G("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",y&&"[@media(hover:hover)]:hover:bg-accent/30",!y&&"cursor-default",k&&"shimmer"),"aria-disabled":!y,children:[a.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?a.jsx(tt,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:G("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",y&&(N?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),y&&a.jsx("div",{className:G("absolute inset-0 flex items-center justify-center transition-opacity duration-150",N?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:a.jsx(tt,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")})})]})}),a.jsx("span",{className:G("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),l?a.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l})}):a.jsx("div",{className:"flex-1"}),o&&a.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:o}),a.jsx(jt,{usage:t})]}),y&&a.jsx(As,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(u==="prose"?a.jsx("div",{className:"mt-1 mb-1",children:a.jsx("div",{ref:w.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a.jsx("p",{ref:w.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:c})})}):a.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:a.jsx("div",{ref:w.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:a.jsxs("div",{ref:w.contentRef,className:"flex items-start justify-between gap-2",children:[a.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:a.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:c})}),a.jsx("button",{type:"button",onClick:()=>v(c),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?a.jsx(yt,{className:"size-3.5"}):a.jsx(Ts,{className:"size-3.5"})})]})})}))})]});return S?a.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:C}):C}function ne(s){const e=E.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=je(t),e[0]=t,e[1]=l):l=e[1];let n;return e[2]!==l?(n=a.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=n):n=e[3],n}const Pt=4;function Rt(s){const e=E.c(8),{count:t,noun:l,onClick:n}=s,c=U();let u;e[0]!==t||e[1]!==l||e[2]!==c?(u=c("common.seeAll",{count:t,noun:l}),e[0]=t,e[1]=l,e[2]=c,e[3]=u):u=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(bt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==u?(r=a.jsxs("button",{type:"button",onClick:n,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[u,i]}),e[5]=n,e[6]=u,e[7]=r):r=e[7],r}function zt(s){const e=E.c(12),{message:t,className:l}=s,n=t.created_at??t.metadata?.created_at??null;let c,u,i,r;if(e[0]!==l||e[1]!==n){r=Symbol.for("react.early_return_sentinel");e:{const m=Ke(n);if(m===null){r=null;break e}const d=new Date(m);c=d.toLocaleString(),e[6]!==l?(u=G("text-[11px] text-muted-foreground/60 select-none",l),e[6]=l,e[7]=u):u=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=n,e[2]=c,e[3]=u,e[4]=i,e[5]=r}else c=e[2],u=e[3],i=e[4],r=e[5];if(r!==Symbol.for("react.early_return_sentinel"))return r;let o;return e[8]!==c||e[9]!==u||e[10]!==i?(o=a.jsx("span",{title:c,className:u,children:i}),e[8]=c,e[9]=u,e[10]=i,e[11]=o):o=e[11],o}function Be(s){const e=E.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>nt(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[n,c]=R.useState(l);let u,i;e[2]!==t?(u=()=>{const d=setInterval(()=>c(nt(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=u,e[4]=i):(u=e[3],i=e[4]),R.useEffect(u,i);const r=n/1e3;let o;e[5]!==r?(o=je(r),e[5]=r,e[6]=o):o=e[6];let m;return e[7]!==o?(m=a.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:o}),e[7]=o,e[8]=m):m=e[8],m}const Dt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=E.c(5),[e]=R.useState(kn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let l;s[1]!==e?(l=Dt.map((c,u)=>{const{delay:i}=c;return a.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[u],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},u)}),s[1]=e,s[2]=l):l=s[2];let n;return s[3]!==l?(n=a.jsx("div",{className:"grid",style:t,children:l}),s[3]=l,s[4]=n):n=s[4],n}function kn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Dt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function _n(s){return{planning:{icon:a.jsx(fs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:a.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const wn=1200;function Oe(s){const e=E.c(8),{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:i,trailing:r}=s,o=i===void 0?"prose":i;let m;return e[0]!==c||e[1]!==o||e[2]!==t||e[3]!==u||e[4]!==n||e[5]!==l||e[6]!==r?(m=a.jsx(H,{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:o,trailing:r}),e[0]=c,e[1]=o,e[2]=t,e[3]=u,e[4]=n,e[5]=l,e[6]=r,e[7]=m):m=e[7],m}function Cn(s){const e=E.c(22),{startedAt:t}=s,l=U(),n=ve()?.runStatusStage??null,[c,u]=R.useState("planning");let i,r;if(e[0]!==n?(i=()=>{if(n!==null)return;const h=setTimeout(()=>{u("thinking")},wn);return()=>{clearTimeout(h)}},r=[n],e[0]=n,e[1]=i,e[2]=r):(i=e[1],r=e[2]),R.useEffect(i,r),n!==null){let h;e[3]!==n||e[4]!==l?(h=Ls(l,n),e[3]=n,e[4]=l,e[5]=h):h=e[5];const x=h;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(Ie,{className:"size-4"}),e[6]=v):v=e[6];const b=`${x.label}...`;let k;e[7]!==t?(k=t!==null&&a.jsx(Be,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==x.detail||e[10]!==b||e[11]!==k?(j=a.jsx(Oe,{icon:v,title:b,summary:x.detail,state:"loading",trailing:k}),e[9]=x.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let o;e[13]!==l?(o=_n(l),e[13]=l,e[14]=o):o=e[14];const d=o[c],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&a.jsx(Be,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=a.jsx(Oe,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function Tn(s){const e=E.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(Sn,{}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=a.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[l,a.jsx(Be,{since:t})]}),e[1]=t,e[2]=n):n=e[2],n}const In=2e4;function $n(s){const e=E.c(9),{startedAt:t}=s,l=U(),n=Ge(1e3),c=ve(),i=(t!==null?n-t:0)>=In;let r;e[0]!==t?(r=a.jsx(Cn,{startedAt:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==i||e[3]!==c||e[4]!==l?(o=i&&c?.stop&&a.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[a.jsx("span",{children:l("chat.thinkingIndicator.takingLonger")}),a.jsx("button",{type:"button",onClick:()=>c.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:l("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=c,e[4]=l,e[5]=o):o=e[5];let m;return e[6]!==r||e[7]!==o?(m=a.jsxs("div",{className:"flex flex-col gap-0.5",children:[r,o]}),e[6]=r,e[7]=o,e[8]=m):m=e[8],m}function An(s){const e=E.c(24),{duration:t,parts:l,isStreaming:n}=s,c=U();let u;e[0]!==l?(u=l.every(Ln),e[0]=l,e[1]=u):u=e[1];const i=u;let r;e[2]!==t||e[3]!==c?(r=t&&t/1e3>1?c("chat.thinkingIndicator.thoughtFor",{duration:je(t/1e3)}):c("chat.thinkingIndicator.thought"),e[2]=t,e[3]=c,e[4]=r):r=e[4];const o=r;let m;if(e[5]!==i||e[6]!==n||e[7]!==l){const k=l.map(En).join(`
2
2
  `).trim().split(`
3
3
  `).filter(Boolean),j=n?k[k.length-1]??"":k[0]??"";m=!i&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=i,e[6]=n,e[7]=l,e[8]=m}else m=e[8];const d=m;let f;if(e[9]!==i||e[10]!==l){const b=l.map(Mn).join(`
4
4
 
@@ -1 +1 @@
1
- import{c as f,X as g,a2 as y,K as P,m as _,l as h,j as d}from"./index-DcL61QpW.js";import{u as A}from"./use-decopilot-events-C7xIpTnG.js";function I(){const e=f.c(6),t=y(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],_(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const E=new Set(["custom","ai_service"]);function j(e){return!!e&&E.has(e)}const w="mailto:sales@deco.cx";function O(){const e=f.c(8),{org:t}=g(),a=y(),o=A();let n;e[0]!==t.id?(n=P.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(N)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],_(r)}function N(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function q(e){return b(e).color}function b(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:x,color:S}=b(a);n=x,s="0 0 16 16",r="true",c=h("size-8 shrink-0",S,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{F,K as P,w as S,I as a,q as b,v as f,j as i,R as p,O as u};
1
+ import{c as f,X as g,a2 as y,K as P,m as _,l as h,j as d}from"./index-BOGZM7Pw.js";import{u as A}from"./use-decopilot-events-DL6Ppxgb.js";function I(){const e=f.c(6),t=y(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],_(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const E=new Set(["custom","ai_service"]);function j(e){return!!e&&E.has(e)}const w="mailto:sales@deco.cx";function O(){const e=f.c(8),{org:t}=g(),a=y(),o=A();let n;e[0]!==t.id?(n=P.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(N)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],_(r)}function N(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function q(e){return b(e).color}function b(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:x,color:S}=b(a);n=x,s="0 0 16 16",r="true",c=h("size-8 shrink-0",S,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{F,K as P,w as S,I as a,q as b,v as f,j as i,R as p,O as u};
@@ -1 +1 @@
1
- import{r as i,bm as A,j as c,bo as O,bp as h,bt as _,br as G,bs as H,bn as L,bx as j,dc as E,bF as z,bA as K,bC as B,bG as U,bB as V,bD as W,bE as Z,bH as q,bI as J,bv as Q,c as C,l as X}from"./index-DcL61QpW.js";var m="Popover",[w]=z(m,[j]),x=j(),[Y,v]=w(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=x(e),d=i.useRef(null),[l,u]=i.useState(!1),[f,P]=G({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(H,{...p,children:c.jsx(Y,{scope:e,contentId:L(),triggerRef:d,open:f,onOpenChange:P,onOpenToggle:i.useCallback(()=>P(R=>!R),[P]),hasCustomAnchor:l,onCustomAnchorAdd:i.useCallback(()=>u(!0),[]),onCustomAnchorRemove:i.useCallback(()=>u(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(F,o),s=x(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(y,o),s=x(o),a=A(e,n.triggerRef),p=c.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:a,onClick:h(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});D.displayName=y;var b="PopoverPortal",[ee,oe]=w(b,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=v(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(E,{present:o||s.open,children:c.jsx(Q,{asChild:!0,container:n,children:r})})})};M.displayName=b;var g="PopoverContent",I=i.forwardRef((t,e)=>{const o=oe(g,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=v(g,t.__scopePopover);return c.jsx(E,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});I.displayName=g;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return K(a)},[]),c.jsx(B,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:h(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,d=p.button===0&&p.ctrlKey===!0,l=p.button===2||d;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:h(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:u,...f}=t,P=v(g,o),R=x(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onDismiss:()=>P.onOpenChange(!1),children:c.jsx(q,{"data-state":$(P.open),role:"dialog",id:P.contentId,...R,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(k,o);return c.jsx(O.button,{type:"button",...r,ref:e,onClick:h(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=x(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=I;function ve(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(16);let o,r,n,s,a;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5]);const p=s===void 0?"center":s,d=a===void 0?4:a;let l;e[6]!==o?(l=X("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden border p-4 shadow-md outline-hidden",o),e[6]=o,e[7]=l):l=e[7];let u;e[8]!==p||e[9]!==n||e[10]!==d||e[11]!==l?(u=c.jsx(de,{"data-slot":"popover-content",align:p,sideOffset:d,translate:"no",className:l,...n}),e[8]=p,e[9]=n,e[10]=d,e[11]=l,e[12]=u):u=e[12];let f;return e[13]!==r||e[14]!==u?(f=c.jsx(ue,{container:r,children:u}),e[13]=r,e[14]=u,e[15]=f):f=e[15],f}function he(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
1
+ import{r as i,bm as A,j as c,bo as O,bp as h,bt as _,br as G,bs as H,bn as L,bx as j,dd as E,bF as z,bA as K,bC as B,bG as U,bB as V,bD as W,bE as Z,bH as q,bI as J,bv as Q,c as C,l as X}from"./index-BOGZM7Pw.js";var m="Popover",[w]=z(m,[j]),x=j(),[Y,v]=w(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=x(e),d=i.useRef(null),[l,u]=i.useState(!1),[f,P]=G({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(H,{...p,children:c.jsx(Y,{scope:e,contentId:L(),triggerRef:d,open:f,onOpenChange:P,onOpenToggle:i.useCallback(()=>P(R=>!R),[P]),hasCustomAnchor:l,onCustomAnchorAdd:i.useCallback(()=>u(!0),[]),onCustomAnchorRemove:i.useCallback(()=>u(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(F,o),s=x(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(y,o),s=x(o),a=A(e,n.triggerRef),p=c.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:a,onClick:h(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});D.displayName=y;var b="PopoverPortal",[ee,oe]=w(b,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=v(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(E,{present:o||s.open,children:c.jsx(Q,{asChild:!0,container:n,children:r})})})};M.displayName=b;var g="PopoverContent",I=i.forwardRef((t,e)=>{const o=oe(g,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=v(g,t.__scopePopover);return c.jsx(E,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});I.displayName=g;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return K(a)},[]),c.jsx(B,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:h(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,d=p.button===0&&p.ctrlKey===!0,l=p.button===2||d;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:h(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:u,...f}=t,P=v(g,o),R=x(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onDismiss:()=>P.onOpenChange(!1),children:c.jsx(q,{"data-state":$(P.open),role:"dialog",id:P.contentId,...R,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(k,o);return c.jsx(O.button,{type:"button",...r,ref:e,onClick:h(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=x(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=I;function ve(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(16);let o,r,n,s,a;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5]);const p=s===void 0?"center":s,d=a===void 0?4:a;let l;e[6]!==o?(l=X("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden border p-4 shadow-md outline-hidden",o),e[6]=o,e[7]=l):l=e[7];let u;e[8]!==p||e[9]!==n||e[10]!==d||e[11]!==l?(u=c.jsx(de,{"data-slot":"popover-content",align:p,sideOffset:d,translate:"no",className:l,...n}),e[8]=p,e[9]=n,e[10]=d,e[11]=l,e[12]=u):u=e[12];let f;return e[13]!==r||e[14]!==u?(f=c.jsx(ue,{container:r,children:u}),e[13]=r,e[14]=u,e[15]=f):f=e[15],f}function he(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
@@ -1 +1 @@
1
- import{c as it,b as pt,r as mt,x as vt,j as e,l as et,B as tt,ak as Nt}from"./index-DcL61QpW.js";import{Z as Ct,z as kt}from"./agent-icon-pwgAjvSj.js";import{s as Dt}from"./Plus-BS3PCfRW.js";import{S as St}from"./scroll-area-BpTqtdVg.js";import{ae as wt,l as zt,a9 as Tt,aa as Et,af as Pt,a8 as ct,ac as dt}from"./agent-site-editor-content-Djj53kW8.js";import"./AlertCircle-Drwzhghj.js";import"./Tool01-CbigwhjL.js";import"./ArrowUp-CXufssbA.js";import"./ArrowLeft-CezG2Zdv.js";import"./LinkBroken01-HNmPQH95.js";import"./ShoppingBag01-C_KZKFWK.js";import"./ZoomOut-DDm2Rukv.js";import"./Building02-DJChT5jT.js";import"./CheckCircle-BGmiRP6E.js";import"./Check-B92DFtap.js";import"./ChevronUp-8UK2xKJB.js";import"./UserSquare-oYAuXebt.js";import"./Copy01-FP69RgAk.js";import"./CreditCard01-qt3NXy8K.js";import"./DotsVertical-B9RYKc4i.js";import"./Image01-B0kn2JYt.js";import"./Palette-Dz5PD9w1.js";import"./XClose-CGysFXHn.js";import"./Key01-BUKK8w6G.js";import"./Link01-BbnnJlOr.js";import"./LinkExternal01-C6etEW45.js";import"./Monitor01-CjYpbYaq.js";import"./Sun-BZOwobi1.js";import"./SearchMd-6QdHMDck.js";import"./Trash01-CeldIlnM.js";import"./Upload01-BZ3RgHZy.js";import"./User01-aDNYrgVN.js";import"./Users01-J4x1K2Pz.js";import"./X-BrQj6eYr.js";import"./select-BWJrfhuu.js";import"./index-BFNzK42a.js";import"./agent-view-guard-Bfl-tAeJ.js";import"./use-main-panel-tabs-m9gZrRtp.js";import"./use-chat-layout-state-CSfibNl5.js";import"./use-file-configs-y9HNrasc.js";import"./use-organization-settings-mrHm62_c.js";import"./schema-B1Xr6nHt.js";import"./task-board-B7B7hL1D.js";import"./site-slug-DebpOoQq.js";import"./thread-route-DiSxO6jm.js";import"./use-panel-navigate-CnuAGCN6.js";import"./use-project-scope-BfZMgRO8.js";import"./repository-binding-hTPljaf8.js";import"./use-mcp-client-ChAILH13.js";import"./auth-DloMQRn-.js";import"./thread-intent-CirCeNTL.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./use-connection-BCpL6TUI.js";import"./use-mcp-tools-jtYDVZVr.js";import"./types-BpElZvfU.js";import"./utils-CVEq3hMx.js";import"./index-CSL-CGai.js";import"./chat-context-C15Zggsw.js";import"./autosend-DMdU4D_q.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-C7xIpTnG.js";import"./use-ai-providers-LsqI_NDS.js";import"./location-DPIrGNp7.js";import"./gateway-client-BUCIKZM8.js";import"./tooltip-Dj3JLNmI.js";import"./dialog-m22Y6h7g.js";import"./drawer-CClleQMp.js";import"./collection-search-B6GyRPQj.js";import"./use-mobile-C8m3pXWu.js";import"./use-mcp-prompts-DsWsUQb0.js";import"./index-BBcMw6O4.js";import"./form-D725QIdH.js";import"./label-Cnn1c71K.js";import"./input-gsvsf3Co.js";import"./org-file-open-context-Cl1fDQD_.js";import"./input-DrEZw_Cf.js";import"./shell-layout-Daayzqr1.js";import"./avatar-tshBeT_k.js";import"./download-app-dialog-B8SQurhW.js";import"./use-clock-tick-B_y_vQik.js";import"./command-C6GsqANI.js";import"./index-CLIILOVs.js";import"./integration-icon-YnKsYYgL.js";import"./project-icon-KgUuj1jh.js";import"./new-project-dialog-Jz7zmURx.js";import"./repository-import-picker-CTPX1DQP.js";import"./use-navigate-to-agent-B5Azt3lu.js";import"./repository-picker-7U4CHQ4P.js";import"./useInfiniteQuery-w91VrWRO.js";import"./infiniteQueryObserver-E5UmFb9W.js";import"./use-debounced-value-DcoaAHVw.js";import"./required-auth-layout-DjdOvVTG.js";import"./use-org-sso-Cl2ofNpa.js";import"./chat-draft-CNPGBGtE.js";import"./use-session-runtime-DN1EalSS.js";import"./usage-stats-PAJqTdmY.js";import"./use-copy-Ch-XSDTy.js";import"./markdown-a1CGabs6.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs-DBcyQJHV.js";import"./use-deco-credits-dNOqCRVG.js";import"./toggle-group-ClfsxZi8.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-xzoCKaHk.js";import"./decopilot-CxKuS7Hl.js";import"./checkbox-CoB5GNar.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-C4iPRS4r.js";import"./index-CtaZIKyn.js";import"./input-Bci42A7F.js";import"./suggestion-BWu5XPQx.js";import"./use-org-fs-ys9LE3L7.js";import"./question-004-sINsf4GQ.js";import"./use-members-COnUcl-q.js";import"./use-org-auth-client-CmeJjjLJ.js";import"./feature-paywall-kAWAXYwN.js";import"./plan-ladder-BeVPeoez.js";import"./add-connection-dialog-xnDQ-mvA.js";import"./extract-connection-data-BQXe1mLC.js";import"./metadata-D72DunRR.js";import"./connection-CbAiARog.js";import"./connection-card-CAnO7yXs.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-DWLtCIjy.js";import"./connection-form-helpers-5Mx8EuPh.js";import"./authenticate-and-persist-oauth-B9ZUK6d8.js";import"./mcp-oauth-BZX4UPME.js";import"./collection-tabs-Ce2hPfhA.js";import"./badge-kYz8xLCj.js";import"./use-infinite-scroll-KLtLLDtq.js";import"./useSuspenseInfiniteQuery-D8oSI1Qa.js";import"./use-task-board-events--3b_oYqD.js";import"./pair-94agu_Ki.js";import"./collapsible-n3zGanAW.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BrwAxgBj.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-i6OdPROw.js";import"./use-thread-outputs-CjN4G6Qe.js";import"./file-type-icon-dSRM1l-h.js";import"./sandbox-lifecycle-context-CH1QALAe.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resolve-tab-icon-_-o9HGxh.js";import"./use-task-metadata-bXN1a1ia.js";import"./virtual-mcp-BYTHR2--.js";import"./feature-gate-CJEZJ1-O.js";import"./alert-dialog-BNM4GspY.js";import"./runnable-block-editor-giWS8w8s.js";import"./claim-phase-copy-D98vtebL.js";import"./utils-CTFhJwon.js";import"./monaco-editor-sVwfHt7G.js";import"./editor-DdNAJ5w-.js";import"./calendar-C6vCy5td.js";import"./use-new-blocks-editor-DaNq-zRT.js";import"./rich-text-link-control-C25TVX1m.js";import"./switch-D3OVMEG_.js";import"./combobox-J3uaIqpo.js";import"./search-input-Dx9yRlJi.js";import"./asset-utils-Bt5Mmhr4.js";import"./sandbox-git-api-N7TWg65m.js";import"./mustache-D3mbJm7W.js";import"./empty-state-CgvAfnKE.js";import"./empty-state-Bj2d1wbp.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",xt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Bo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:l,onReschedule:i,isCreating:k}=h,s=k===void 0?!1:k,r=pt(),[v,N]=mt.useState(null),[rt]=vt(),[n,f]=mt.useState(It),p=rt.language;let C;t[0]!==n||t[1]!==p?(C=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=C):C=t[2];const y=C;let x,u,a,c,j,D,S,w,z,T;if(t[3]!==n||t[4]!==b||t[5]!==v||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==l||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const ut=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=wt(zt(b)),st=Tt(n),bt=Et(new Date);u="flex h-full w-full flex-col";let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(ct(new Date)),t[24]=G):G=t[24];let I;t[25]!==r?(I=r("sandbox.postCalendar.today"),t[25]=r,t[26]=I):I=t[26];let H;t[27]!==I?(H=e.jsx(tt,{variant:"outline",size:"sm",onClick:G,children:I}),t[27]=I,t[28]=H):H=t[28];let J;t[29]===Symbol.for("react.memo_cache_sentinel")?(J=()=>f(Mt),t[29]=J):J=t[29];let U;t[30]!==r?(U=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=U):U=t[31];let Q;t[32]===Symbol.for("react.memo_cache_sentinel")?(Q=e.jsx(kt,{size:16}),t[32]=Q):Q=t[32];let _;t[33]!==U?(_=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:J,"aria-label":U,children:Q}),t[33]=U,t[34]=_):_=t[34];let V;t[35]===Symbol.for("react.memo_cache_sentinel")?(V=()=>f(Lt),t[35]=V):V=t[35];let $;t[36]!==r?($=r("sandbox.postCalendar.next"),t[36]=r,t[37]=$):$=t[37];let X;t[38]===Symbol.for("react.memo_cache_sentinel")?(X=e.jsx(Nt,{size:16}),t[38]=X):X=t[38];let O;t[39]!==$?(O=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:V,"aria-label":$,children:X}),t[39]=$,t[40]=O):O=t[40];let B;t[41]!==y?(B=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=B):B=t[42];let F;t[43]!==r?(F=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=F):F=t[44];let R;t[45]!==F?(R=e.jsx(lt,{className:ft,label:F}),t[45]=F,t[46]=R):R=t[46];let A;t[47]!==r?(A=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=A):A=t[48];let K;t[49]!==A?(K=e.jsx(lt,{className:xt,label:A}),t[49]=A,t[50]=K):K=t[50];let W;t[51]!==R||t[52]!==K?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[R,K]}),t[51]=R,t[52]=K,t[53]=W):W=t[53],t[54]!==H||t[55]!==_||t[56]!==O||t[57]!==B||t[58]!==W?(a=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[H,_,O,B,W]}),t[54]=H,t[55]=_,t[56]=O,t[57]=B,t[58]=W,t[59]=a):a=t[59],T="relative flex-1 min-h-0",x=St,z="h-full",S="flex min-w-[880px] gap-4 p-4";let Z;t[60]!==r?(Z=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=Z):Z=t[61];let Y;t[62]!==Z?(Y=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Z}),t[62]=Z,t[63]=Y):Y=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(m=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:ut.format(m)},m.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(m=>{const yt=m.getMonth()===n.getMonth(),jt=ht.get(Pt(m))??[];return e.jsxs("div",{onDragOver:g=>{v&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const at=g.dataTransfer.getData("text/plain");N(null),at&&i(at,m)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",v&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",m.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:m.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>l(m),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(m)}),children:e.jsx(Dt,{size:14})})]}),jt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:N},g.post.key))]},m.getTime())})}),Y]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",j=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),D=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Ct,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(m=>e.jsx(nt,{entry:m,active:m.post.key===d,draggable:!1,onSelect:o,onDragStateChange:N},m.post.key)),t[3]=n,t[4]=b,t[5]=v,t[6]=s,t[7]=p,t[8]=y,t[9]=l,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=x,t[15]=u,t[16]=a,t[17]=c,t[18]=j,t[19]=D,t[20]=S,t[21]=w,t[22]=z,t[23]=T}else x=t[14],u=t[15],a=t[16],c=t[17],j=t[18],D=t[19],S=t[20],w=t[21],z=t[22],T=t[23];let E;t[64]!==c||t[65]!==j||t[66]!==D?(E=e.jsxs("div",{className:c,children:[j,D]}),t[64]=c,t[65]=j,t[66]=D,t[67]=E):E=t[67];let P;t[68]!==E||t[69]!==S||t[70]!==w?(P=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=P):P=t[71];let L;t[72]!==x||t[73]!==P||t[74]!==z?(L=e.jsx(x,{className:z,children:P}),t[72]=x,t[73]=P,t[74]=z,t[75]=L):L=t[75];let M;t[76]!==L||t[77]!==T?(M=e.jsx("div",{className:T,children:L}),t[76]=L,t[77]=T,t[78]=M):M=t[78];let q;return t[79]!==u||t[80]!==a||t[81]!==M?(q=e.jsxs("div",{className:u,children:[a,M]}),t[79]=u,t[80]=a,t[81]=M,t[82]=q):q=t[82],q}function Lt(h){return dt(h,1)}function Mt(h){return dt(h,-1)}function It(){return ct(new Date)}function lt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let l;t[2]!==o?(l=e.jsx("span",{className:o}),t[2]=o,t[3]=l):l=t[3];let i;return t[4]!==d||t[5]!==l?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,d]}),t[4]=d,t[5]=l,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:l,onDragStateChange:i}=h,k=pt(),{post:s,scheduled:r}=b,v=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let N;t[0]!==k||t[1]!==v?(N=k(v),t[0]=k,t[1]=v,t[2]=N):N=t[2];const rt=N;let n;t[3]!==i||t[4]!==s.key?(n=j=>{j.dataTransfer.setData("text/plain",s.key),j.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==l||t[9]!==s.key?(p=()=>l(s.key),t[8]=l,t[9]=s.key,t[10]=p):p=t[10];const C=`${s.title} · ${rt}`,y=r?ft:xt,x=o&&"cursor-grab active:cursor-grabbing",u=d&&"ring-2 ring-primary";let a;t[11]!==y||t[12]!==x||t[13]!==u?(a=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,x,u),t[11]=y,t[12]=x,t[13]=u,t[14]=a):a=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==a||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==C?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:C,className:a,children:s.title}),t[15]=o,t[16]=s.title,t[17]=a,t[18]=n,t[19]=f,t[20]=p,t[21]=C,t[22]=c):c=t[22],c}export{Bo as PostCalendar};
1
+ import{c as it,b as pt,r as mt,x as vt,j as e,l as et,B as tt,ak as Nt}from"./index-BOGZM7Pw.js";import{Z as Ct,z as kt}from"./agent-icon-QobcC4y1.js";import{s as Dt}from"./Plus-Dk5G0eGJ.js";import{S as St}from"./scroll-area-BN7R6f0c.js";import{ae as wt,l as zt,a9 as Tt,aa as Et,af as Pt,a8 as ct,ac as dt}from"./agent-site-editor-content-DeSoO3Vu.js";import"./AlertCircle-BOPAUEgU.js";import"./Tool01-CGCC9pfF.js";import"./ArrowUp-Duh-8Vv0.js";import"./ArrowLeft-DGlO1CKr.js";import"./LinkBroken01-BQ3rvf4O.js";import"./ShoppingBag01-mUPmqGRd.js";import"./ZoomOut-BQf_lYpX.js";import"./Building02-D_rXBsfQ.js";import"./CheckCircle-CxJ9MBI3.js";import"./Check-CcPSzxsY.js";import"./ChevronUp-C9klasvw.js";import"./UserSquare-B6-k4uk5.js";import"./Copy01-ByHdq7k3.js";import"./CreditCard01-D7Ll8vXp.js";import"./DotsVertical-CXVrXTYw.js";import"./Image01-DAe5wd3u.js";import"./Palette-BFtTwWPg.js";import"./XClose-Bsj_jKUE.js";import"./Key01-Dje7twgn.js";import"./Link01-BFa5_pnw.js";import"./LinkExternal01-ChFFafWR.js";import"./Monitor01-tvCvi4o_.js";import"./Sun-Bl8Ky_if.js";import"./SearchMd-DJptVqPP.js";import"./Trash01-BA-bFjuS.js";import"./Upload01-C13aB89v.js";import"./User01-B42bcRzQ.js";import"./Users01-BmXeKAri.js";import"./X-BdtW9stL.js";import"./select-CGC5E9nf.js";import"./index-0glLJTM3.js";import"./agent-view-guard-BggSlJ4I.js";import"./use-main-panel-tabs-NhZJRbOq.js";import"./use-chat-layout-state-Cd1SDWUO.js";import"./use-file-configs-j21JL3yE.js";import"./use-organization-settings-BgEtBsl7.js";import"./schema-W3hqtN1B.js";import"./task-board-Dh6sWb9t.js";import"./site-slug-DebpOoQq.js";import"./thread-route-esGiDSRu.js";import"./use-panel-navigate-4MoLzTpw.js";import"./use-project-scope-CUYDg9gO.js";import"./repository-binding-CEDkA6og.js";import"./use-mcp-client-9jF2B0Tz.js";import"./auth-BMIwdKU8.js";import"./thread-intent-CNOpHUCE.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./use-connection-C4j2pJbz.js";import"./use-mcp-tools-Dbm0kb0W.js";import"./types-BlCCVKMl.js";import"./utils-CVEq3hMx.js";import"./index-DK7oXPIL.js";import"./chat-context-BHWxNMFT.js";import"./autosend-B5Obavo-.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-DL6Ppxgb.js";import"./use-ai-providers-BuwFLwdC.js";import"./location-DPIrGNp7.js";import"./gateway-client-DafKkh5Q.js";import"./tooltip-DoWVDYxv.js";import"./dialog-CwJ0Tacd.js";import"./drawer-LGekY388.js";import"./collection-search-BG7vK4NS.js";import"./use-mobile-9GiVme_1.js";import"./use-mcp-prompts-DNAsQeJA.js";import"./index-DuKSozhT.js";import"./form-DXEENu_8.js";import"./label-CKukDnnz.js";import"./input-C0ZWiiGy.js";import"./org-file-open-context--_UQSpdl.js";import"./input-qBVmxar0.js";import"./shell-layout-B9OaioSj.js";import"./avatar-Bpp_lL_f.js";import"./download-app-dialog-BlTQi4L1.js";import"./use-clock-tick-DkYE6iX2.js";import"./command-D4xFqyr9.js";import"./index-Ccz5AaI_.js";import"./integration-icon-DUuPtqFs.js";import"./project-icon-DQrOXeEW.js";import"./new-project-dialog-CiCMTA1C.js";import"./repository-import-picker-BT060hhl.js";import"./use-navigate-to-agent-CSgL519X.js";import"./repository-picker-Bowb7b9f.js";import"./useInfiniteQuery-pxyjNhep.js";import"./infiniteQueryObserver-CHVbl4Al.js";import"./use-debounced-value-C1TKx6na.js";import"./required-auth-layout-CKgEUo-z.js";import"./use-org-sso-BmivjhbI.js";import"./chat-draft-SnGEiSWm.js";import"./use-session-runtime-C1jT9-WF.js";import"./usage-stats-ELYwp3GN.js";import"./use-copy-BiyQhtNG.js";import"./markdown-DNk_PyOf.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs-BCc9oqWy.js";import"./use-deco-credits--by3KJXE.js";import"./toggle-group-BUS82Kqf.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-CIF0WByS.js";import"./decopilot-Bh5nOuj8.js";import"./checkbox-DuccoC4e.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-DvKxqM1r.js";import"./index-D9bgHbh-.js";import"./input-Cbyu0LGy.js";import"./suggestion-CotdwSyy.js";import"./use-org-fs-DF_BlZtj.js";import"./question-004-sINsf4GQ.js";import"./use-members-CmQfPBAn.js";import"./use-org-auth-client-BBAyh5Tz.js";import"./feature-paywall--RganMza.js";import"./plan-ladder-DSodyL3Q.js";import"./add-connection-dialog-CwnC8yt-.js";import"./extract-connection-data-BZKTCWVm.js";import"./metadata-D72DunRR.js";import"./connection-BBVDOaSM.js";import"./connection-card-D1TMmLIT.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-e3h0PKfc.js";import"./connection-form-helpers-CFQwZ1sv.js";import"./authenticate-and-persist-oauth-DWogyy0B.js";import"./mcp-oauth-cSH4PfZY.js";import"./collection-tabs-DrZNeSEC.js";import"./badge-DTNkOzY0.js";import"./use-infinite-scroll-BAQqTty_.js";import"./useSuspenseInfiniteQuery-Cf0qcKEf.js";import"./use-task-board-events-Q5BqAnUD.js";import"./pair-IorbWgZn.js";import"./collapsible-qdaAxaaw.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CJ5u3TPG.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-DOIzAtMq.js";import"./use-thread-outputs-CDQWo15F.js";import"./file-type-icon-CYHSeMg9.js";import"./sandbox-lifecycle-context-C0vkuH66.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resolve-tab-icon-X0M-w-vv.js";import"./use-task-metadata-B9tqJ9GP.js";import"./virtual-mcp-DkCjKqhT.js";import"./feature-gate-DIpT85T7.js";import"./alert-dialog-13GPwGkk.js";import"./runnable-block-editor-2ItVAsl7.js";import"./claim-phase-copy-J9IiJiw_.js";import"./utils-CZW3O45l.js";import"./monaco-editor-C4uDUO_q.js";import"./editor-DIJFF-Rn.js";import"./calendar-BRUBvVES.js";import"./use-new-blocks-editor-CQ_89Cdt.js";import"./rich-text-link-control-ClsuTwdo.js";import"./switch-Ctdc8it1.js";import"./combobox-B0tRCuGZ.js";import"./search-input-dP8TWy_f.js";import"./asset-utils-B4wnf4gp.js";import"./sandbox-git-api-DTIjDZTr.js";import"./mustache-C7f92o5k.js";import"./empty-state-Db66egMr.js";import"./empty-state-DdDKihxt.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",xt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Bo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:l,onReschedule:i,isCreating:k}=h,s=k===void 0?!1:k,r=pt(),[v,N]=mt.useState(null),[rt]=vt(),[n,f]=mt.useState(It),p=rt.language;let C;t[0]!==n||t[1]!==p?(C=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=C):C=t[2];const y=C;let x,u,a,c,j,D,S,w,z,T;if(t[3]!==n||t[4]!==b||t[5]!==v||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==l||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const ut=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=wt(zt(b)),st=Tt(n),bt=Et(new Date);u="flex h-full w-full flex-col";let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(ct(new Date)),t[24]=G):G=t[24];let I;t[25]!==r?(I=r("sandbox.postCalendar.today"),t[25]=r,t[26]=I):I=t[26];let H;t[27]!==I?(H=e.jsx(tt,{variant:"outline",size:"sm",onClick:G,children:I}),t[27]=I,t[28]=H):H=t[28];let J;t[29]===Symbol.for("react.memo_cache_sentinel")?(J=()=>f(Mt),t[29]=J):J=t[29];let U;t[30]!==r?(U=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=U):U=t[31];let Q;t[32]===Symbol.for("react.memo_cache_sentinel")?(Q=e.jsx(kt,{size:16}),t[32]=Q):Q=t[32];let _;t[33]!==U?(_=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:J,"aria-label":U,children:Q}),t[33]=U,t[34]=_):_=t[34];let V;t[35]===Symbol.for("react.memo_cache_sentinel")?(V=()=>f(Lt),t[35]=V):V=t[35];let $;t[36]!==r?($=r("sandbox.postCalendar.next"),t[36]=r,t[37]=$):$=t[37];let X;t[38]===Symbol.for("react.memo_cache_sentinel")?(X=e.jsx(Nt,{size:16}),t[38]=X):X=t[38];let O;t[39]!==$?(O=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:V,"aria-label":$,children:X}),t[39]=$,t[40]=O):O=t[40];let B;t[41]!==y?(B=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=B):B=t[42];let F;t[43]!==r?(F=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=F):F=t[44];let R;t[45]!==F?(R=e.jsx(lt,{className:ft,label:F}),t[45]=F,t[46]=R):R=t[46];let A;t[47]!==r?(A=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=A):A=t[48];let K;t[49]!==A?(K=e.jsx(lt,{className:xt,label:A}),t[49]=A,t[50]=K):K=t[50];let W;t[51]!==R||t[52]!==K?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[R,K]}),t[51]=R,t[52]=K,t[53]=W):W=t[53],t[54]!==H||t[55]!==_||t[56]!==O||t[57]!==B||t[58]!==W?(a=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[H,_,O,B,W]}),t[54]=H,t[55]=_,t[56]=O,t[57]=B,t[58]=W,t[59]=a):a=t[59],T="relative flex-1 min-h-0",x=St,z="h-full",S="flex min-w-[880px] gap-4 p-4";let Z;t[60]!==r?(Z=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=Z):Z=t[61];let Y;t[62]!==Z?(Y=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Z}),t[62]=Z,t[63]=Y):Y=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(m=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:ut.format(m)},m.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(m=>{const yt=m.getMonth()===n.getMonth(),jt=ht.get(Pt(m))??[];return e.jsxs("div",{onDragOver:g=>{v&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const at=g.dataTransfer.getData("text/plain");N(null),at&&i(at,m)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",v&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",m.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:m.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>l(m),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(m)}),children:e.jsx(Dt,{size:14})})]}),jt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:N},g.post.key))]},m.getTime())})}),Y]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",j=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),D=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Ct,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(m=>e.jsx(nt,{entry:m,active:m.post.key===d,draggable:!1,onSelect:o,onDragStateChange:N},m.post.key)),t[3]=n,t[4]=b,t[5]=v,t[6]=s,t[7]=p,t[8]=y,t[9]=l,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=x,t[15]=u,t[16]=a,t[17]=c,t[18]=j,t[19]=D,t[20]=S,t[21]=w,t[22]=z,t[23]=T}else x=t[14],u=t[15],a=t[16],c=t[17],j=t[18],D=t[19],S=t[20],w=t[21],z=t[22],T=t[23];let E;t[64]!==c||t[65]!==j||t[66]!==D?(E=e.jsxs("div",{className:c,children:[j,D]}),t[64]=c,t[65]=j,t[66]=D,t[67]=E):E=t[67];let P;t[68]!==E||t[69]!==S||t[70]!==w?(P=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=P):P=t[71];let L;t[72]!==x||t[73]!==P||t[74]!==z?(L=e.jsx(x,{className:z,children:P}),t[72]=x,t[73]=P,t[74]=z,t[75]=L):L=t[75];let M;t[76]!==L||t[77]!==T?(M=e.jsx("div",{className:T,children:L}),t[76]=L,t[77]=T,t[78]=M):M=t[78];let q;return t[79]!==u||t[80]!==a||t[81]!==M?(q=e.jsxs("div",{className:u,children:[a,M]}),t[79]=u,t[80]=a,t[81]=M,t[82]=q):q=t[82],q}function Lt(h){return dt(h,1)}function Mt(h){return dt(h,-1)}function It(){return ct(new Date)}function lt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let l;t[2]!==o?(l=e.jsx("span",{className:o}),t[2]=o,t[3]=l):l=t[3];let i;return t[4]!==d||t[5]!==l?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,d]}),t[4]=d,t[5]=l,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:l,onDragStateChange:i}=h,k=pt(),{post:s,scheduled:r}=b,v=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let N;t[0]!==k||t[1]!==v?(N=k(v),t[0]=k,t[1]=v,t[2]=N):N=t[2];const rt=N;let n;t[3]!==i||t[4]!==s.key?(n=j=>{j.dataTransfer.setData("text/plain",s.key),j.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==l||t[9]!==s.key?(p=()=>l(s.key),t[8]=l,t[9]=s.key,t[10]=p):p=t[10];const C=`${s.title} · ${rt}`,y=r?ft:xt,x=o&&"cursor-grab active:cursor-grabbing",u=d&&"ring-2 ring-primary";let a;t[11]!==y||t[12]!==x||t[13]!==u?(a=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,x,u),t[11]=y,t[12]=x,t[13]=u,t[14]=a):a=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==a||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==C?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:C,className:a,children:s.title}),t[15]=o,t[16]=s.title,t[17]=a,t[18]=n,t[19]=f,t[20]=p,t[21]=C,t[22]=c):c=t[22],c}export{Bo as PostCalendar};
@@ -1,2 +1,2 @@
1
- import{b as Z,a2 as st,r as Q,j as t,B as Te,l as Ye,t as De,h as ot,c as Be}from"./index-DcL61QpW.js";import{u as it}from"./chat-context-C15Zggsw.js";import{i as $e}from"./AlertCircle-Drwzhghj.js";import{a3 as lt,ap as at,am as rt,_ as nt}from"./agent-icon-pwgAjvSj.js";import{n as ct}from"./LinkExternal01-C6etEW45.js";import{d as dt}from"./UserSquare-oYAuXebt.js";import{s as pt}from"./Trash01-CeldIlnM.js";import{s as mt}from"./XClose-CGysFXHn.js";import{f as ut,e as xt,b as ft,A as gt,a as ht,d as bt,c as jt,g as vt}from"./alert-dialog-BNM4GspY.js";import{I as we}from"./input-gsvsf3Co.js";import{L as J}from"./label-Cnn1c71K.js";import{M as yt}from"./multi-select-Cn492ZDh.js";import{b as St,a as Et,T as He,c as Ve}from"./tabs-DBcyQJHV.js";import{S as Nt}from"./switch-D3OVMEG_.js";import{T as Ke}from"./textarea-DWLtCIjy.js";import{u as kt,aq as Ct,d as Pt,ar as Ie,as as Tt,at as Dt}from"./runnable-block-editor-giWS8w8s.js";import{f as Lt,a as wt,b as Bt,c as Ue,B as At,R as Ft}from"./block-document-B-f7MqNI.js";import{b as zt,C as It,K as $t}from"./blog-schema-CpX8G3P9.js";import{b as Rt,l as qt,g as Ot,a as _t,s as Mt,h as Ht,c as F,d as Vt,m as Ut,e as We,E as Wt,p as Qe,f as Gt,i as Je,R as Yt,j as Kt,u as Qt,k as Jt,A as Xt,P as Zt,o as es}from"./agent-site-editor-content-Djj53kW8.js";import{b as Re,T as qe,a as Oe}from"./tooltip-Dj3JLNmI.js";import{i as ts}from"./Check-B92DFtap.js";import{i as ss}from"./Link01-BbnnJlOr.js";import{D as os,b as is,c as ls,d as as,h as rs,e as ns}from"./dialog-m22Y6h7g.js";import{u as cs}from"./use-ai-providers-LsqI_NDS.js";import{u as ds}from"./mustache-D3mbJm7W.js";import{a as ps}from"./use-fast-preview-draft-url-UIUx90se.js";import{u as ms}from"./use-autosave-Demsd_Bp.js";import"./use-panel-navigate-CnuAGCN6.js";import"./thread-route-DiSxO6jm.js";import"./use-project-scope-BfZMgRO8.js";import"./repository-binding-hTPljaf8.js";import"./use-mcp-client-ChAILH13.js";import"./auth-DloMQRn-.js";import"./autosend-DMdU4D_q.js";import"./thread-intent-CirCeNTL.js";import"./backoff-8mStPHYB.js";import"./task-board-B7B7hL1D.js";import"./schema-B1Xr6nHt.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-C7xIpTnG.js";import"./location-DPIrGNp7.js";import"./use-organization-settings-mrHm62_c.js";import"./Tool01-CbigwhjL.js";import"./ArrowUp-CXufssbA.js";import"./ArrowLeft-CezG2Zdv.js";import"./LinkBroken01-HNmPQH95.js";import"./ShoppingBag01-C_KZKFWK.js";import"./ZoomOut-DDm2Rukv.js";import"./Building02-DJChT5jT.js";import"./CheckCircle-BGmiRP6E.js";import"./ChevronUp-8UK2xKJB.js";import"./Copy01-FP69RgAk.js";import"./CreditCard01-qt3NXy8K.js";import"./DotsVertical-B9RYKc4i.js";import"./Image01-B0kn2JYt.js";import"./Palette-Dz5PD9w1.js";import"./Key01-BUKK8w6G.js";import"./Monitor01-CjYpbYaq.js";import"./Sun-BZOwobi1.js";import"./Plus-BS3PCfRW.js";import"./SearchMd-6QdHMDck.js";import"./Upload01-BZ3RgHZy.js";import"./User01-aDNYrgVN.js";import"./Users01-J4x1K2Pz.js";import"./X-BrQj6eYr.js";import"./badge-kYz8xLCj.js";import"./checkbox-CoB5GNar.js";import"./command-C6GsqANI.js";import"./index-CLIILOVs.js";import"./popover-C4iPRS4r.js";import"./use-session-runtime-DN1EalSS.js";import"./claim-phase-copy-D98vtebL.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-94agu_Ki.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-n3zGanAW.js";import"./use-copy-Ch-XSDTy.js";import"./usage-stats-PAJqTdmY.js";import"./markdown-a1CGabs6.js";import"./org-file-open-context-Cl1fDQD_.js";import"./use-mobile-C8m3pXWu.js";import"./use-clock-tick-B_y_vQik.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BrwAxgBj.js";import"./types-BpElZvfU.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-BUCIKZM8.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./shell-layout-Daayzqr1.js";import"./avatar-tshBeT_k.js";import"./download-app-dialog-B8SQurhW.js";import"./integration-icon-YnKsYYgL.js";import"./project-icon-KgUuj1jh.js";import"./new-project-dialog-Jz7zmURx.js";import"./repository-import-picker-CTPX1DQP.js";import"./use-navigate-to-agent-B5Azt3lu.js";import"./repository-picker-7U4CHQ4P.js";import"./useInfiniteQuery-w91VrWRO.js";import"./infiniteQueryObserver-E5UmFb9W.js";import"./collection-search-B6GyRPQj.js";import"./use-debounced-value-DcoaAHVw.js";import"./required-auth-layout-DjdOvVTG.js";import"./use-org-sso-Cl2ofNpa.js";import"./sheet-i6OdPROw.js";import"./use-connection-BCpL6TUI.js";import"./use-mcp-prompts-DsWsUQb0.js";import"./index-BBcMw6O4.js";import"./form-D725QIdH.js";import"./use-thread-outputs-CjN4G6Qe.js";import"./file-type-icon-dSRM1l-h.js";import"./utils-CTFhJwon.js";import"./scroll-area-BpTqtdVg.js";import"./select-BWJrfhuu.js";import"./index-BFNzK42a.js";import"./monaco-editor-sVwfHt7G.js";import"./editor-DdNAJ5w-.js";import"./calendar-C6vCy5td.js";import"./use-new-blocks-editor-DaNq-zRT.js";import"./rich-text-link-control-C25TVX1m.js";import"./combobox-J3uaIqpo.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-Dx9yRlJi.js";import"./use-file-configs-y9HNrasc.js";import"./asset-utils-Bt5Mmhr4.js";import"./use-chat-layout-state-CSfibNl5.js";import"./site-slug-DebpOoQq.js";import"./toggle-group-ClfsxZi8.js";import"./sandbox-git-api-N7TWg65m.js";import"./suggestion-BWu5XPQx.js";import"./section-preview-url-7zfngvgW.js";import"./index-iHhJjaOn.js";import"./agent-view-guard-Bfl-tAeJ.js";import"./use-main-panel-tabs-m9gZrRtp.js";import"./use-mcp-tools-jtYDVZVr.js";import"./index-CSL-CGai.js";import"./drawer-CClleQMp.js";import"./input-DrEZw_Cf.js";import"./chat-draft-CNPGBGtE.js";import"./use-deco-credits-dNOqCRVG.js";import"./use-open-billing-url-xzoCKaHk.js";import"./decopilot-CxKuS7Hl.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-CtaZIKyn.js";import"./input-Bci42A7F.js";import"./use-org-fs-ys9LE3L7.js";import"./question-004-sINsf4GQ.js";import"./use-members-COnUcl-q.js";import"./use-org-auth-client-CmeJjjLJ.js";import"./feature-paywall-kAWAXYwN.js";import"./plan-ladder-BeVPeoez.js";import"./add-connection-dialog-xnDQ-mvA.js";import"./extract-connection-data-BQXe1mLC.js";import"./metadata-D72DunRR.js";import"./connection-CbAiARog.js";import"./connection-card-CAnO7yXs.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-5Mx8EuPh.js";import"./authenticate-and-persist-oauth-B9ZUK6d8.js";import"./mcp-oauth-BZX4UPME.js";import"./collection-tabs-Ce2hPfhA.js";import"./use-infinite-scroll-KLtLLDtq.js";import"./useSuspenseInfiniteQuery-D8oSI1Qa.js";import"./use-task-board-events--3b_oYqD.js";import"./sandbox-lifecycle-context-CH1QALAe.js";import"./resolve-tab-icon-_-o9HGxh.js";import"./use-task-metadata-bXN1a1ia.js";import"./virtual-mcp-BYTHR2--.js";import"./feature-gate-CJEZJ1-O.js";import"./empty-state-CgvAfnKE.js";import"./empty-state-Bj2d1wbp.js";const Le=n=>typeof n=="string"?n:"",us={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&#39;":"'"};function Xe(n){const e=[];let o=0,r=!1;for(;o<n.length;){if(n[o]==="<"){const p=n.indexOf(">",o);o=p<0?n.length:p+1;continue}let s=n[o]??"",l=o+1;if(n[o]==="&"){const p=n.indexOf(";",o);if(p>=0&&p-o<=10){const i=us[n.slice(o,p+1).toLowerCase()];i!==void 0&&(s=i,l=p+1)}}const c=o;if(o=l,/\s/.test(s)){if(r){const p=e[e.length-1];p&&(p.end=l);continue}e.push({ch:" ",start:c,end:l}),r=!0}else e.push({ch:s,start:c,end:l}),r=!1}return{text:e.map(s=>s.ch).join(""),chars:e}}function xs(n){return Xe(n).text.trim()}function fs(n){const e=[];for(const o of n)switch(Rt(Le(o.__resolveType))){case"Paragraph":e.push(xs(Le(o.html)));break;case"Heading":e.push(Le(o.text));break;case"Quote":e.push(Le(o.quote));break;case"List":e.push(Le(o.items));break}return e.filter(Boolean).join(`
1
+ import{b as Z,a2 as st,r as Q,j as t,B as Te,l as Ye,t as De,h as ot,c as Be}from"./index-BOGZM7Pw.js";import{u as it}from"./chat-context-BHWxNMFT.js";import{i as $e}from"./AlertCircle-BOPAUEgU.js";import{a3 as lt,ap as at,am as rt,_ as nt}from"./agent-icon-QobcC4y1.js";import{n as ct}from"./LinkExternal01-ChFFafWR.js";import{d as dt}from"./UserSquare-B6-k4uk5.js";import{s as pt}from"./Trash01-BA-bFjuS.js";import{s as mt}from"./XClose-Bsj_jKUE.js";import{f as ut,e as xt,b as ft,A as gt,a as ht,d as bt,c as jt,g as vt}from"./alert-dialog-13GPwGkk.js";import{I as we}from"./input-C0ZWiiGy.js";import{L as J}from"./label-CKukDnnz.js";import{M as yt}from"./multi-select-DiHVOPXR.js";import{b as St,a as Et,T as He,c as Ve}from"./tabs-BCc9oqWy.js";import{S as Nt}from"./switch-Ctdc8it1.js";import{T as Ke}from"./textarea-e3h0PKfc.js";import{u as kt,aq as Ct,d as Pt,ar as Ie,as as Tt,at as Dt}from"./runnable-block-editor-2ItVAsl7.js";import{f as Lt,a as wt,b as Bt,c as Ue,B as At,R as Ft}from"./block-document-BLOu51_T.js";import{b as zt,C as It,K as $t}from"./blog-schema-B4_qQgjF.js";import{b as Rt,l as qt,g as Ot,a as _t,s as Mt,h as Ht,c as F,d as Vt,m as Ut,e as We,E as Wt,p as Qe,f as Gt,i as Je,R as Yt,j as Kt,u as Qt,k as Jt,A as Xt,P as Zt,o as es}from"./agent-site-editor-content-DeSoO3Vu.js";import{b as Re,T as qe,a as Oe}from"./tooltip-DoWVDYxv.js";import{i as ts}from"./Check-CcPSzxsY.js";import{i as ss}from"./Link01-BFa5_pnw.js";import{D as os,b as is,c as ls,d as as,h as rs,e as ns}from"./dialog-CwJ0Tacd.js";import{u as cs}from"./use-ai-providers-BuwFLwdC.js";import{u as ds}from"./mustache-C7f92o5k.js";import{a as ps}from"./use-fast-preview-draft-url-KJgu2gHZ.js";import{u as ms}from"./use-autosave-77sC71ka.js";import"./use-panel-navigate-4MoLzTpw.js";import"./thread-route-esGiDSRu.js";import"./use-project-scope-CUYDg9gO.js";import"./repository-binding-CEDkA6og.js";import"./use-mcp-client-9jF2B0Tz.js";import"./auth-BMIwdKU8.js";import"./autosend-B5Obavo-.js";import"./thread-intent-CNOpHUCE.js";import"./backoff-8mStPHYB.js";import"./task-board-Dh6sWb9t.js";import"./schema-W3hqtN1B.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-DL6Ppxgb.js";import"./location-DPIrGNp7.js";import"./use-organization-settings-BgEtBsl7.js";import"./Tool01-CGCC9pfF.js";import"./ArrowUp-Duh-8Vv0.js";import"./ArrowLeft-DGlO1CKr.js";import"./LinkBroken01-BQ3rvf4O.js";import"./ShoppingBag01-mUPmqGRd.js";import"./ZoomOut-BQf_lYpX.js";import"./Building02-D_rXBsfQ.js";import"./CheckCircle-CxJ9MBI3.js";import"./ChevronUp-C9klasvw.js";import"./Copy01-ByHdq7k3.js";import"./CreditCard01-D7Ll8vXp.js";import"./DotsVertical-CXVrXTYw.js";import"./Image01-DAe5wd3u.js";import"./Palette-BFtTwWPg.js";import"./Key01-Dje7twgn.js";import"./Monitor01-tvCvi4o_.js";import"./Sun-Bl8Ky_if.js";import"./Plus-Dk5G0eGJ.js";import"./SearchMd-DJptVqPP.js";import"./Upload01-C13aB89v.js";import"./User01-B42bcRzQ.js";import"./Users01-BmXeKAri.js";import"./X-BdtW9stL.js";import"./badge-DTNkOzY0.js";import"./checkbox-DuccoC4e.js";import"./command-D4xFqyr9.js";import"./index-Ccz5AaI_.js";import"./popover-DvKxqM1r.js";import"./use-session-runtime-C1jT9-WF.js";import"./claim-phase-copy-J9IiJiw_.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-IorbWgZn.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-qdaAxaaw.js";import"./use-copy-BiyQhtNG.js";import"./usage-stats-ELYwp3GN.js";import"./markdown-DNk_PyOf.js";import"./org-file-open-context--_UQSpdl.js";import"./use-mobile-9GiVme_1.js";import"./use-clock-tick-DkYE6iX2.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CJ5u3TPG.js";import"./types-BlCCVKMl.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-DafKkh5Q.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./shell-layout-B9OaioSj.js";import"./avatar-Bpp_lL_f.js";import"./download-app-dialog-BlTQi4L1.js";import"./integration-icon-DUuPtqFs.js";import"./project-icon-DQrOXeEW.js";import"./new-project-dialog-CiCMTA1C.js";import"./repository-import-picker-BT060hhl.js";import"./use-navigate-to-agent-CSgL519X.js";import"./repository-picker-Bowb7b9f.js";import"./useInfiniteQuery-pxyjNhep.js";import"./infiniteQueryObserver-CHVbl4Al.js";import"./collection-search-BG7vK4NS.js";import"./use-debounced-value-C1TKx6na.js";import"./required-auth-layout-CKgEUo-z.js";import"./use-org-sso-BmivjhbI.js";import"./sheet-DOIzAtMq.js";import"./use-connection-C4j2pJbz.js";import"./use-mcp-prompts-DNAsQeJA.js";import"./index-DuKSozhT.js";import"./form-DXEENu_8.js";import"./use-thread-outputs-CDQWo15F.js";import"./file-type-icon-CYHSeMg9.js";import"./utils-CZW3O45l.js";import"./scroll-area-BN7R6f0c.js";import"./select-CGC5E9nf.js";import"./index-0glLJTM3.js";import"./monaco-editor-C4uDUO_q.js";import"./editor-DIJFF-Rn.js";import"./calendar-BRUBvVES.js";import"./use-new-blocks-editor-CQ_89Cdt.js";import"./rich-text-link-control-ClsuTwdo.js";import"./combobox-B0tRCuGZ.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-dP8TWy_f.js";import"./use-file-configs-j21JL3yE.js";import"./asset-utils-B4wnf4gp.js";import"./use-chat-layout-state-Cd1SDWUO.js";import"./site-slug-DebpOoQq.js";import"./toggle-group-BUS82Kqf.js";import"./sandbox-git-api-DTIjDZTr.js";import"./suggestion-CotdwSyy.js";import"./section-preview-url-7zfngvgW.js";import"./index-KD5FDUeP.js";import"./agent-view-guard-BggSlJ4I.js";import"./use-main-panel-tabs-NhZJRbOq.js";import"./use-mcp-tools-Dbm0kb0W.js";import"./index-DK7oXPIL.js";import"./drawer-LGekY388.js";import"./input-qBVmxar0.js";import"./chat-draft-SnGEiSWm.js";import"./use-deco-credits--by3KJXE.js";import"./use-open-billing-url-CIF0WByS.js";import"./decopilot-Bh5nOuj8.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-D9bgHbh-.js";import"./input-Cbyu0LGy.js";import"./use-org-fs-DF_BlZtj.js";import"./question-004-sINsf4GQ.js";import"./use-members-CmQfPBAn.js";import"./use-org-auth-client-BBAyh5Tz.js";import"./feature-paywall--RganMza.js";import"./plan-ladder-DSodyL3Q.js";import"./add-connection-dialog-CwnC8yt-.js";import"./extract-connection-data-BZKTCWVm.js";import"./metadata-D72DunRR.js";import"./connection-BBVDOaSM.js";import"./connection-card-D1TMmLIT.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-CFQwZ1sv.js";import"./authenticate-and-persist-oauth-DWogyy0B.js";import"./mcp-oauth-cSH4PfZY.js";import"./collection-tabs-DrZNeSEC.js";import"./use-infinite-scroll-BAQqTty_.js";import"./useSuspenseInfiniteQuery-Cf0qcKEf.js";import"./use-task-board-events-Q5BqAnUD.js";import"./sandbox-lifecycle-context-C0vkuH66.js";import"./resolve-tab-icon-X0M-w-vv.js";import"./use-task-metadata-B9tqJ9GP.js";import"./virtual-mcp-DkCjKqhT.js";import"./feature-gate-DIpT85T7.js";import"./empty-state-Db66egMr.js";import"./empty-state-DdDKihxt.js";const Le=n=>typeof n=="string"?n:"",us={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&#39;":"'"};function Xe(n){const e=[];let o=0,r=!1;for(;o<n.length;){if(n[o]==="<"){const p=n.indexOf(">",o);o=p<0?n.length:p+1;continue}let s=n[o]??"",l=o+1;if(n[o]==="&"){const p=n.indexOf(";",o);if(p>=0&&p-o<=10){const i=us[n.slice(o,p+1).toLowerCase()];i!==void 0&&(s=i,l=p+1)}}const c=o;if(o=l,/\s/.test(s)){if(r){const p=e[e.length-1];p&&(p.end=l);continue}e.push({ch:" ",start:c,end:l}),r=!0}else e.push({ch:s,start:c,end:l}),r=!1}return{text:e.map(s=>s.ch).join(""),chars:e}}function xs(n){return Xe(n).text.trim()}function fs(n){const e=[];for(const o of n)switch(Rt(Le(o.__resolveType))){case"Paragraph":e.push(xs(Le(o.html)));break;case"Heading":e.push(Le(o.text));break;case"Quote":e.push(Le(o.quote));break;case"List":e.push(Le(o.items));break}return e.filter(Boolean).join(`
2
2
  `)}function gs(n){return n.replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function hs(n,e){const o=n.slice(0,e);return o.lastIndexOf("<a")>o.lastIndexOf("</a")}function bs(n,e,o){const r=e.trim();if(!r||!o)return{blocks:n,applied:!1};for(let s=0;s<n.length;s++){const l=n[s];if(!l||typeof l.html!="string")continue;const c=l.html,{text:p,chars:i}=Xe(c);let d=p.indexOf(r);for(;d>=0;){const g=i[d],x=i[d+r.length-1];if(g&&x){const a=g.start,h=x.end,m=c.slice(a,h);if(!m.includes("<")&&!hs(c,a)){const b=c.slice(0,a)+`<a href="${gs(o)}">${m}</a>`+c.slice(h),f=n.slice();return f[s]={...l,html:b},{blocks:f,applied:!0}}}d=p.indexOf(r,d+1)}}return{blocks:n,applied:!1}}function js(n,e){let o=n,r=0;for(const s of e){const l=bs(o,s.quote,s.href);l.applied&&(o=l.blocks,r++)}return{blocks:o,applied:r}}function vs({decofile:n,sections:e,currentKey:o,hasAi:r,onApply:s}){const l=Z(),c=st(),[p,i]=Q.useState(!1),[d,g]=Q.useState(!1),[x,a]=Q.useState([]),[h,m]=Q.useState(new Set),b=Lt(n),f=qt(n).filter(u=>u.key!==o&&u.slug),E=async()=>{g(!0);try{const u=fs(e),k=await c.call("BLOG_LINK_SUGGEST",{body:u,posts:f.map(N=>({title:N.title,slug:N.slug}))}),y=[],T=new Set;for(const N of k.suggestions){const P=f.find(V=>V.slug===N.slug);if(!P||!b)continue;const D=wt(b,{category:P.categorySlugs[0]??"",slug:P.slug});if(!D||!u.includes(N.quote))continue;const w=`${N.quote}→${P.slug}`;T.has(w)||(T.add(w),y.push({quote:N.quote,href:D,title:P.title}))}a(y),m(new Set(y.map((N,P)=>P))),i(!0),y.length===0&&De.info(l("sandbox.linkSuggest.none"))}catch(u){De.error(u instanceof Error?u.message:l("sandbox.linkSuggest.failed"))}finally{g(!1)}},C=u=>m(k=>{const y=new Set(k);return y.has(u)?y.delete(u):y.add(u),y}),v=()=>{const u=x.filter((T,N)=>h.has(N)).map(T=>({quote:T.quote,href:T.href})),{blocks:k,applied:y}=js(e,u);s(k),i(!1),De.success(l("sandbox.linkSuggest.applied",{count:String(y)}))};return t.jsxs(t.Fragment,{children:[t.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:d||!r||f.length===0,title:r?f.length===0?l("sandbox.linkSuggest.noCandidates"):l("sandbox.linkSuggest.hint"):l("sandbox.autonomous.noAiProvider"),onClick:()=>{E()},children:[d?t.jsx(lt,{size:14,className:"animate-spin"}):t.jsx(ss,{size:14}),l("sandbox.linkSuggest.button")]}),t.jsx(os,{open:p,onOpenChange:i,children:t.jsxs(is,{className:"max-h-[85vh] sm:max-w-lg",children:[t.jsxs(ls,{children:[t.jsx(as,{children:l("sandbox.linkSuggest.title")}),t.jsx(rs,{children:l("sandbox.linkSuggest.description")})]}),x.length===0?t.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:l("sandbox.linkSuggest.none")}):t.jsx("ul",{className:"max-h-[50vh] space-y-1 overflow-y-auto",children:x.map((u,k)=>{const y=h.has(k);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>C(k),"aria-pressed":y,className:"flex w-full items-start gap-2.5 rounded-lg border p-2.5 text-left transition-colors hover:bg-muted/50",children:[t.jsx("span",{className:Ye("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border",y?"border-primary bg-primary text-primary-foreground":"border-input"),children:y&&t.jsx(ts,{size:11})}),t.jsxs("span",{className:"min-w-0 flex-1 text-sm",children:[t.jsxs("span",{className:"font-medium",children:["“",u.quote,"”"]}),t.jsxs("span",{className:"text-muted-foreground",children:[" → ",u.title]})]})]})},`${u.quote}-${u.href}`)})}),t.jsx(ns,{children:t.jsx(Te,{type:"button",disabled:h.size===0,onClick:v,children:l("sandbox.linkSuggest.apply",{count:String(h.size)})})})]})})]})}function ys(n){return Array.isArray(n)?n.map(e=>({key:F(e?.key),value:F(e?.value)})):[]}function _l({orgSlug:n,virtualMcpId:e,branch:o,blockKey:r,block:s,decofile:l,meta:c,previewBaseUrl:p,move:i,onClose:d,expanded:g,onToggleExpand:x}){const a=Z(),h=it()?.taskId??null,m=kt({orgSlug:n,virtualMcpId:e,branch:o}),b=ds({orgSlug:n,virtualMcpId:e,branch:o}),f=cs().length>0,E=ps({orgSlug:n,virtualMcpId:e,branch:o}),C=Ot(s,"posts"),[v,u,k,y]=ms(C,j=>{m.mutate({blockKey:r,data:_t(r,Mt(j))})},{isSaving:m.isPending}),[T,N]=Q.useState(r);T!==r&&(N(r),k(C));const P=j=>{k(v),i.apply(r,j,v)},D=(j,I)=>u({...v,[j]:I}),w=zt("posts",c,$t),V=Pt((j,I)=>m.mutate({blockKey:j,data:I})),[$,R]=Q.useState(0),B=Bt({decofile:l,post:v,previewBaseUrl:p,draftPointer:E}),q=Ht(l,"posts",r,F(v.title)),O=Vt(v),[_,z]=Q.useState(!1),U=async()=>{k(v);try{await b.mutateAsync({blockKey:r}),De.success(a("sandbox.postEditor.deletePostSuccess",{title:F(v.title)})),z(!1),d?.()}catch(j){De.error(j instanceof Error?j.message:a("sandbox.postEditor.deletePostFailed"))}},L=Ut(v),M=L.length>0,H=L.length===1?a("sandbox.postEditor.missingFieldSingular",{fields:We(L,a)}):a("sandbox.postEditor.missingFieldPlural",{fields:We(L,a)});return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsx("div",{className:"absolute inset-x-0 top-0 z-10 bg-background/80 backdrop-blur-sm",children:t.jsxs("div",{className:"mx-auto flex max-w-4xl items-center justify-between gap-2 px-8 py-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(Ct,{isPending:m.isPending||y,isError:m.isError}),M&&t.jsxs(Re,{children:[t.jsx(qe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx($e,{size:14}),L.length," ",L.length===1?a("sandbox.postEditor.issueSingular"):a("sandbox.postEditor.issuePlural")]})}),t.jsx(Oe,{side:"bottom",children:H})]})]}),(x||d)&&t.jsxs("div",{className:"-mr-2 flex items-center gap-0.5",children:[x&&t.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:x,title:a(g?"sandbox.postBoard.collapse":"sandbox.postBoard.expand"),children:g?t.jsx(at,{size:16}):t.jsx(rt,{size:16})}),d&&t.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:d,title:a("sandbox.postBoard.close"),children:t.jsx(mt,{size:16})})]})]})}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 pb-6 pt-14",children:[t.jsx(Wt,{value:F(v.title),onChange:j=>D("title",j),placeholder:a("sandbox.postEditor.postTitlePlaceholder"),className:"py-1 text-4xl font-bold text-foreground"}),q&&t.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-xs text-warning",children:[t.jsx($e,{size:14,className:"mt-px shrink-0"}),a("sandbox.postEditor.duplicateTitleWarning")]}),t.jsxs(St,{defaultValue:"content",className:"mt-6 gap-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs(Et,{children:[t.jsxs(He,{value:"content",children:[t.jsx(dt,{}),a("sandbox.postEditor.contentTab")]}),t.jsxs(He,{value:"settings",children:[t.jsx(nt,{}),a("sandbox.postEditor.settingsTab")]})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[O&&t.jsxs(Re,{children:[t.jsx(qe,{asChild:!0,children:t.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground hover:text-destructive","aria-label":a("sandbox.postEditor.deletePost"),onClick:()=>z(!0),children:t.jsx(pt,{size:14})})}),t.jsx(Oe,{side:"bottom",children:a("sandbox.postEditor.deletePost")})]}),t.jsx(vs,{decofile:l,sections:Ue(v.sections),currentKey:r,hasAi:f,onApply:j=>{D("sections",j),R(I=>I+1)}}),t.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:!B,title:a(B?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),onClick:()=>{B&&window.open(B,"_blank","noopener,noreferrer")},children:[t.jsx(ct,{size:14}),a("sandbox.postEditor.seePreview")]})]})]}),t.jsx(Ve,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(At,{value:Ue(v.sections),onChange:j=>D("sections",j),meta:c,decofile:l,sandboxRef:{orgSlug:n,virtualMcpId:e,branch:o,threadId:h},previewBaseUrl:p,onSaveReferencedBlock:V,emptyMessage:a("sandbox.postEditor.noContentYet")},$)})}),t.jsx(Ve,{value:"settings",children:t.jsxs("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:[t.jsx(Es,{post:v,decofile:l,onChange:D,blockKey:r,move:i,onMoveStatus:P}),t.jsx(It,{schema:w,value:v,onChange:u,basePath:"post",meta:c,decofile:l,sandbox:{orgSlug:n,virtualMcpId:e,branch:o,threadId:h},onSaveReferencedBlock:V})]})})]})]})}),t.jsx(ut,{open:_,onOpenChange:j=>{!j&&!b.isPending&&z(!1)},children:t.jsxs(xt,{children:[t.jsxs(ft,{children:[t.jsx(gt,{children:a("sandbox.postEditor.deletePostConfirmTitle")}),t.jsx(ht,{children:a("sandbox.postEditor.deletePostConfirmBody",{title:F(v.title)||a("sandbox.postBoard.untitled")})})]}),t.jsxs(bt,{children:[t.jsx(jt,{disabled:b.isPending,children:a("sandbox.postEditor.deletePostCancel")}),t.jsx(vt,{onClick:j=>{j.preventDefault(),U()},disabled:b.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:b.isPending?t.jsxs(t.Fragment,{children:[t.jsx(ot,{className:"size-3.5"}),a("sandbox.postEditor.deletingPost")]}):a("sandbox.postEditor.deletePost")})]})]})})]})}function Ss(n){const e=Be.c(15),{blockKey:o,post:r,move:s,onMoveStatus:l}=n,c=Z();let p;e[0]!==r?(p=Qe(r),e[0]=r,e[1]=p):p=e[1];const i=p;let d,g;if(e[2]!==o||e[3]!==i||e[4]!==s||e[5]!==l||e[6]!==r||e[7]!==c){let a;e[10]!==i?(a=m=>m!=="generating"||i==="generating",e[10]=i,e[11]=a):a=e[11];const h=Zt.filter(a);d="flex flex-wrap gap-1.5",g=h.map(m=>{const b=m===i,f=b?null:s.refuse(o,m,r);return t.jsxs(Re,{children:[t.jsx(qe,{asChild:!0,children:t.jsx("span",{children:t.jsx("button",{type:"button",disabled:!!f,"aria-pressed":b,onClick:()=>l(m),className:Ye("rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",b?"border-primary bg-primary text-primary-foreground":"cursor-pointer bg-card hover:bg-muted",f&&"cursor-not-allowed opacity-50"),children:c(es[m])})})}),f&&t.jsx(Oe,{side:"bottom",children:s.reasonText(f)})]},m)}),e[2]=o,e[3]=i,e[4]=s,e[5]=l,e[6]=r,e[7]=c,e[8]=d,e[9]=g}else d=e[8],g=e[9];let x;return e[12]!==d||e[13]!==g?(x=t.jsx("div",{className:d,children:g}),e[12]=d,e[13]=g,e[14]=x):x=e[14],x}function Es(n){const e=Be.c(166),{post:o,decofile:r,onChange:s,blockKey:l,move:c,onMoveStatus:p}=n,i=Z();let d;e[0]!==o?(d=Qe(o),e[0]=o,e[1]=d):d=e[1];const x=d==="scheduled";let a;e[2]!==o.slug?(a=F(o.slug),e[2]=o.slug,e[3]=a):a=e[3];const h=a,[m,b]=Q.useState(h),[f,E]=Q.useState(null),[C,v]=Q.useState(h);C!==h&&(v(h),b(h));let u;e[4]!==l||e[5]!==h||e[6]!==r||e[7]!==s||e[8]!==m||e[9]!==i?(u=()=>{const S=Kt(m);if(b(S),S===h)return;if(!S){E(null),s("slug","");return}const _e=Je(r,"posts").filter(tt=>tt.key!==l).map(Cs).filter(Boolean);if(!_e.includes(S)){E(null),s("slug",S);return}const ze=Qt(S,_e),Me=i("sandbox.postEditor.slugDeduped",{slug:ze});b(ze),E(Me),De.info(Me),s("slug",ze)},e[4]=l,e[5]=h,e[6]=r,e[7]=s,e[8]=m,e[9]=i,e[10]=u):u=e[10];const k=u;let y;e[11]!==i?(y=i("sandbox.postEditor.statusLabel"),e[11]=i,e[12]=y):y=e[12];let T;e[13]!==y?(T=t.jsx(J,{children:y}),e[13]=y,e[14]=T):T=e[14];let N;e[15]!==l||e[16]!==c||e[17]!==p||e[18]!==o?(N=t.jsx(Ss,{blockKey:l,post:o,move:c,onMoveStatus:p}),e[15]=l,e[16]=c,e[17]=p,e[18]=o,e[19]=N):N=e[19];let P;e[20]!==T||e[21]!==N?(P=t.jsxs("div",{className:"space-y-2",children:[T,N]}),e[20]=T,e[21]=N,e[22]=P):P=e[22];let D;e[23]!==x||e[24]!==s||e[25]!==o.scheduledDatetime||e[26]!==i?(D=x&&t.jsx(Ie,{schema:{type:"string",format:"date-time",title:i("sandbox.postEditor.scheduledDatetimeLabel"),description:i("sandbox.postEditor.scheduledDatetimeDescription")},value:F(o.scheduledDatetime),onChange:S=>s("scheduledDatetime",S),path:"post-scheduled-datetime",label:i("sandbox.postEditor.scheduledDatetimeLabel")}),e[23]=x,e[24]=s,e[25]=o.scheduledDatetime,e[26]=i,e[27]=D):D=e[27];let w;e[28]!==P||e[29]!==D?(w=t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[P,D]}),e[28]=P,e[29]=D,e[30]=w):w=e[30];let V;e[31]!==i?(V=i("sandbox.postEditor.excerptLabel"),e[31]=i,e[32]=V):V=e[32];let $;e[33]!==V?($=t.jsx(J,{htmlFor:"post-excerpt",children:V}),e[33]=V,e[34]=$):$=e[34];let R;e[35]!==o.excerpt?(R=F(o.excerpt),e[35]=o.excerpt,e[36]=R):R=e[36];let B;e[37]!==s?(B=S=>s("excerpt",S.target.value),e[37]=s,e[38]=B):B=e[38];let q;e[39]!==R||e[40]!==B?(q=t.jsx(Ke,{id:"post-excerpt",value:R,onChange:B,rows:2}),e[39]=R,e[40]=B,e[41]=q):q=e[41];let O;e[42]!==$||e[43]!==q?(O=t.jsxs("div",{className:"space-y-2",children:[$,q]}),e[42]=$,e[43]=q,e[44]=O):O=e[44];let _;e[45]!==i?(_=i("sandbox.postEditor.slugLabel"),e[45]=i,e[46]=_):_=e[46];let z;e[47]!==_?(z=t.jsx(J,{htmlFor:"post-slug",children:_}),e[47]=_,e[48]=z):z=e[48];let U;e[49]===Symbol.for("react.memo_cache_sentinel")?(U=S=>{E(null),b(Jt(S.target.value))},e[49]=U):U=e[49];let L;e[50]!==i?(L=i("sandbox.postEditor.slugPlaceholder"),e[50]=i,e[51]=L):L=e[51];let M;e[52]!==k||e[53]!==m||e[54]!==L?(M=t.jsx(we,{id:"post-slug",value:m,onChange:U,onBlur:k,placeholder:L,maxLength:80,className:"h-10"}),e[52]=k,e[53]=m,e[54]=L,e[55]=M):M=e[55];let H;e[56]!==f?(H=f&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx($e,{size:14,className:"mt-px shrink-0"}),f]}),e[56]=f,e[57]=H):H=e[57];let j;e[58]!==z||e[59]!==M||e[60]!==H?(j=t.jsxs("div",{className:"space-y-2",children:[z,M,H]}),e[58]=z,e[59]=M,e[60]=H,e[61]=j):j=e[61];let I;e[62]!==i?(I=i("sandbox.postEditor.dateLabel"),e[62]=i,e[63]=I):I=e[63];let W;e[64]!==I?(W={type:"string",format:"date",title:I},e[64]=I,e[65]=W):W=e[65];let G;e[66]!==o.date?(G=F(o.date),e[66]=o.date,e[67]=G):G=e[67];let Y;e[68]!==s?(Y=S=>s("date",S),e[68]=s,e[69]=Y):Y=e[69];let K;e[70]!==i?(K=i("sandbox.postEditor.dateLabel"),e[70]=i,e[71]=K):K=e[71];let A;e[72]!==W||e[73]!==G||e[74]!==Y||e[75]!==K?(A=t.jsx(Ie,{schema:W,value:G,onChange:Y,path:"post-date",label:K}),e[72]=W,e[73]=G,e[74]=Y,e[75]=K,e[76]=A):A=e[76];let X;e[77]!==i?(X=i("sandbox.postEditor.readTimeLabel"),e[77]=i,e[78]=X):X=e[78];let ee;e[79]!==X?(ee={type:"integer",title:X},e[79]=X,e[80]=ee):ee=e[80];const Fe=typeof o.readTime=="number"?o.readTime:void 0;let te;e[81]!==s?(te=S=>s("readTime",S),e[81]=s,e[82]=te):te=e[82];let se;e[83]!==i?(se=i("sandbox.postEditor.readTimeLabel"),e[83]=i,e[84]=se):se=e[84];let oe;e[85]!==ee||e[86]!==Fe||e[87]!==te||e[88]!==se?(oe=t.jsx(Tt,{schema:ee,value:Fe,onChange:te,path:"post-read-time",label:se}),e[85]=ee,e[86]=Fe,e[87]=te,e[88]=se,e[89]=oe):oe=e[89];let ie;e[90]!==j||e[91]!==A||e[92]!==oe?(ie=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[j,A,oe]}),e[90]=j,e[91]=A,e[92]=oe,e[93]=ie):ie=e[93];const Ze=o.image,et=o.mobileImage;let le,ae;e[94]!==s?(le=S=>s("image",S),ae=S=>s("mobileImage",S),e[94]=s,e[95]=le,e[96]=ae):(le=e[95],ae=e[96]);let re;e[97]!==o.alt?(re=F(o.alt),e[97]=o.alt,e[98]=re):re=e[98];let ne;e[99]!==i?(ne=i("sandbox.postEditor.coverImageLabel"),e[99]=i,e[100]=ne):ne=e[100];let ce;e[101]!==o.image||e[102]!==o.mobileImage||e[103]!==le||e[104]!==ae||e[105]!==re||e[106]!==ne?(ce=t.jsx(Ft,{value:Ze,mobileValue:et,onChange:le,onMobileChange:ae,alt:re,label:ne}),e[101]=o.image,e[102]=o.mobileImage,e[103]=le,e[104]=ae,e[105]=re,e[106]=ne,e[107]=ce):ce=e[107];let de;e[108]!==i?(de=i("sandbox.postEditor.coverAltLabel"),e[108]=i,e[109]=de):de=e[109];let pe;e[110]!==i?(pe=i("sandbox.postEditor.coverAltDescription"),e[110]=i,e[111]=pe):pe=e[111];let me;e[112]!==de||e[113]!==pe?(me={type:"string",title:de,description:pe},e[112]=de,e[113]=pe,e[114]=me):me=e[114];let ue;e[115]!==o.alt?(ue=F(o.alt),e[115]=o.alt,e[116]=ue):ue=e[116];let xe;e[117]!==s?(xe=S=>s("alt",S),e[117]=s,e[118]=xe):xe=e[118];let fe;e[119]!==i?(fe=i("sandbox.postEditor.coverAltLabel"),e[119]=i,e[120]=fe):fe=e[120];let ge;e[121]!==me||e[122]!==ue||e[123]!==xe||e[124]!==fe?(ge=t.jsx(Ie,{schema:me,value:ue,onChange:xe,path:"post-alt",label:fe}),e[121]=me,e[122]=ue,e[123]=xe,e[124]=fe,e[125]=ge):ge=e[125];let he;e[126]!==ce||e[127]!==ge?(he=t.jsxs("div",{className:"space-y-2",children:[ce,ge]}),e[126]=ce,e[127]=ge,e[128]=he):he=e[128];let be;e[129]!==i?(be=i("sandbox.postEditor.authorsLabel"),e[129]=i,e[130]=be):be=e[130];let je;e[131]!==s?(je=S=>s("authors",S),e[131]=s,e[132]=je):je=e[132];let ve;e[133]!==r||e[134]!==o.authors||e[135]!==be||e[136]!==je?(ve=t.jsx(Ge,{label:be,decofile:r,kind:"authors",valueField:"email",toRef:ks,selected:o.authors,onChange:je}),e[133]=r,e[134]=o.authors,e[135]=be,e[136]=je,e[137]=ve):ve=e[137];let ye;e[138]!==i?(ye=i("sandbox.postEditor.categoriesLabel"),e[138]=i,e[139]=ye):ye=e[139];let Se;e[140]!==s?(Se=S=>s("categories",S),e[140]=s,e[141]=Se):Se=e[141];let Ee;e[142]!==r||e[143]!==o.categories||e[144]!==ye||e[145]!==Se?(Ee=t.jsx(Ge,{label:ye,decofile:r,kind:"categories",valueField:"slug",toRef:Ns,selected:o.categories,onChange:Se}),e[142]=r,e[143]=o.categories,e[144]=ye,e[145]=Se,e[146]=Ee):Ee=e[146];let Ne;e[147]!==s?(Ne=S=>s("extraProps",S),e[147]=s,e[148]=Ne):Ne=e[148];let ke;e[149]!==o.extraProps||e[150]!==Ne?(ke=t.jsx(Ts,{value:o.extraProps,onChange:Ne}),e[149]=o.extraProps,e[150]=Ne,e[151]=ke):ke=e[151];let Ce;e[152]!==s?(Ce=S=>s("seo",S),e[152]=s,e[153]=Ce):Ce=e[153];let Pe;e[154]!==o.seo||e[155]!==Ce?(Pe=t.jsx(Ps,{value:o.seo,onChange:Ce}),e[154]=o.seo,e[155]=Ce,e[156]=Pe):Pe=e[156];let Ae;return e[157]!==O||e[158]!==ie||e[159]!==he||e[160]!==ve||e[161]!==Ee||e[162]!==ke||e[163]!==Pe||e[164]!==w?(Ae=t.jsxs("div",{className:"space-y-5",children:[w,O,ie,he,ve,Ee,ke,Pe]}),e[157]=O,e[158]=ie,e[159]=he,e[160]=ve,e[161]=Ee,e[162]=ke,e[163]=Pe,e[164]=w,e[165]=Ae):Ae=e[165],Ae}function Ns(n){return{name:F(n.name),slug:F(n.slug)}}function ks(n){return{...n}}function Cs(n){return F(n.payload.slug)}function Ps(n){const e=Be.c(93),{value:o,onChange:r}=n,s=Z();let l;e[0]!==o?(l=o&&typeof o=="object"&&!Array.isArray(o)?o:{},e[0]=o,e[1]=l):l=e[1];const c=l;let p;e[2]!==r||e[3]!==c?(p=(A,X)=>r({...c,[A]:X}),e[2]=r,e[3]=c,e[4]=p):p=e[4];const i=p;let d;e[5]!==s?(d=s("sandbox.postEditor.seoSectionLabel"),e[5]=s,e[6]=d):d=e[6];let g;e[7]!==d?(g=t.jsx("p",{className:"text-sm font-medium",children:d}),e[7]=d,e[8]=g):g=e[8];let x;e[9]!==s?(x=s("sandbox.postEditor.seoSectionHint"),e[9]=s,e[10]=x):x=e[10];let a;e[11]!==x?(a=t.jsx("p",{className:"text-xs text-muted-foreground",children:x}),e[11]=x,e[12]=a):a=e[12];let h;e[13]!==g||e[14]!==a?(h=t.jsxs("div",{className:"space-y-1",children:[g,a]}),e[13]=g,e[14]=a,e[15]=h):h=e[15];let m;e[16]!==s?(m=s("sandbox.postEditor.seoTitleLabel"),e[16]=s,e[17]=m):m=e[17];let b;e[18]!==m?(b=t.jsx(J,{htmlFor:"post-seo-title",children:m}),e[18]=m,e[19]=b):b=e[19];let f;e[20]!==c.title?(f=F(c.title),e[20]=c.title,e[21]=f):f=e[21];let E;e[22]!==i?(E=A=>i("title",A.target.value),e[22]=i,e[23]=E):E=e[23];let C;e[24]!==f||e[25]!==E?(C=t.jsx(we,{id:"post-seo-title",value:f,onChange:E,className:"h-10"}),e[24]=f,e[25]=E,e[26]=C):C=e[26];let v;e[27]!==C||e[28]!==b?(v=t.jsxs("div",{className:"space-y-2",children:[b,C]}),e[27]=C,e[28]=b,e[29]=v):v=e[29];let u;e[30]!==s?(u=s("sandbox.postEditor.seoDescriptionLabel"),e[30]=s,e[31]=u):u=e[31];let k;e[32]!==u?(k=t.jsx(J,{htmlFor:"post-seo-description",children:u}),e[32]=u,e[33]=k):k=e[33];let y;e[34]!==c.description?(y=F(c.description),e[34]=c.description,e[35]=y):y=e[35];let T;e[36]!==i?(T=A=>i("description",A.target.value),e[36]=i,e[37]=T):T=e[37];let N;e[38]!==y||e[39]!==T?(N=t.jsx(Ke,{id:"post-seo-description",value:y,onChange:T,rows:2}),e[38]=y,e[39]=T,e[40]=N):N=e[40];let P;e[41]!==k||e[42]!==N?(P=t.jsxs("div",{className:"space-y-2",children:[k,N]}),e[41]=k,e[42]=N,e[43]=P):P=e[43];let D;e[44]!==s?(D=s("sandbox.postEditor.seoImageLabel"),e[44]=s,e[45]=D):D=e[45];let w;e[46]!==D?(w={type:"string",format:"image-uri",title:D},e[46]=D,e[47]=w):w=e[47];const V=c.image;let $;e[48]!==i?($=A=>i("image",A),e[48]=i,e[49]=$):$=e[49];let R;e[50]!==s?(R=s("sandbox.postEditor.seoImageLabel"),e[50]=s,e[51]=R):R=e[51];let B;e[52]!==c.image||e[53]!==w||e[54]!==$||e[55]!==R?(B=t.jsx(Dt,{schema:w,value:V,onChange:$,path:"post-seo-image",label:R}),e[52]=c.image,e[53]=w,e[54]=$,e[55]=R,e[56]=B):B=e[56];let q;e[57]!==s?(q=s("sandbox.postEditor.seoCanonicalLabel"),e[57]=s,e[58]=q):q=e[58];let O;e[59]!==q?(O=t.jsx(J,{htmlFor:"post-seo-canonical",children:q}),e[59]=q,e[60]=O):O=e[60];let _;e[61]!==c.canonical?(_=F(c.canonical),e[61]=c.canonical,e[62]=_):_=e[62];let z;e[63]!==i?(z=A=>i("canonical",A.target.value),e[63]=i,e[64]=z):z=e[64];let U;e[65]!==s?(U=s("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=s,e[66]=U):U=e[66];let L;e[67]!==_||e[68]!==z||e[69]!==U?(L=t.jsx(we,{id:"post-seo-canonical",value:_,onChange:z,placeholder:U,className:"h-10"}),e[67]=_,e[68]=z,e[69]=U,e[70]=L):L=e[70];let M;e[71]!==O||e[72]!==L?(M=t.jsxs("div",{className:"space-y-2",children:[O,L]}),e[71]=O,e[72]=L,e[73]=M):M=e[73];let H;e[74]!==s?(H=s("sandbox.postEditor.seoNoIndexingLabel"),e[74]=s,e[75]=H):H=e[75];let j;e[76]!==H?(j=t.jsx(J,{htmlFor:"post-seo-no-indexing",children:H}),e[76]=H,e[77]=j):j=e[77];const I=c.noIndexing===!0;let W;e[78]!==i?(W=A=>i("noIndexing",A),e[78]=i,e[79]=W):W=e[79];let G;e[80]!==I||e[81]!==W?(G=t.jsx(Nt,{id:"post-seo-no-indexing",checked:I,onCheckedChange:W}),e[80]=I,e[81]=W,e[82]=G):G=e[82];let Y;e[83]!==j||e[84]!==G?(Y=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[j,G]}),e[83]=j,e[84]=G,e[85]=Y):Y=e[85];let K;return e[86]!==v||e[87]!==P||e[88]!==B||e[89]!==M||e[90]!==Y||e[91]!==h?(K=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[h,v,P,B,M,Y]}),e[86]=v,e[87]=P,e[88]=B,e[89]=M,e[90]=Y,e[91]=h,e[92]=K):K=e[92],K}function Ts(n){const e=Be.c(24),{value:o,onChange:r}=n,s=Z();let l,c,p,i;if(e[0]!==r||e[1]!==s||e[2]!==o){l=ys(o);const h=(b,f)=>r(l.map((E,C)=>C===b?{...E,...f}:E));c="space-y-2";let m;e[7]!==s?(m=s("sandbox.postEditor.extraPropsLabel"),e[7]=s,e[8]=m):m=e[8],e[9]!==m?(p=t.jsx(J,{children:m}),e[9]=m,e[10]=p):p=e[10],i=l.length>0&&t.jsx("ul",{className:"space-y-2",children:l.map((b,f)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(we,{value:b.key,onChange:E=>h(f,{key:E.target.value}),placeholder:s("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(we,{value:b.value,onChange:E=>h(f,{value:E.target.value}),placeholder:s("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(Yt,{label:s("sandbox.postEditor.removePropLabel"),onClick:()=>r(l.filter((E,C)=>C!==f))})]},f))}),e[0]=r,e[1]=s,e[2]=o,e[3]=l,e[4]=c,e[5]=p,e[6]=i}else l=e[3],c=e[4],p=e[5],i=e[6];let d;e[11]!==s?(d=s("sandbox.postEditor.addPropLabel"),e[11]=s,e[12]=d):d=e[12];let g;e[13]!==l||e[14]!==r?(g=()=>r([...l,{key:"",value:""}]),e[13]=l,e[14]=r,e[15]=g):g=e[15];let x;e[16]!==d||e[17]!==g?(x=t.jsx(Xt,{label:d,onClick:g}),e[16]=d,e[17]=g,e[18]=x):x=e[18];let a;return e[19]!==c||e[20]!==p||e[21]!==i||e[22]!==x?(a=t.jsxs("div",{className:c,children:[p,i,x]}),e[19]=c,e[20]=p,e[21]=i,e[22]=x,e[23]=a):a=e[23],a}function Ge(n){const e=Be.c(24),{label:o,decofile:r,kind:s,valueField:l,toRef:c,selected:p,onChange:i}=n,d=Z();let g;e[0]!==r||e[1]!==s||e[2]!==p||e[3]!==c||e[4]!==l?(g=Gt({records:Je(r,s),selected:p,valueField:l,toRef:c}),e[0]=r,e[1]=s,e[2]=p,e[3]=c,e[4]=l,e[5]=g):g=e[5];const{options:x,selectedValues:a,refsForValues:h}=g;let m;e[6]!==s||e[7]!==d?(m=d(s==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=s,e[7]=d,e[8]=m):m=e[8];const b=m;let f;e[9]!==s||e[10]!==d?(f=d(s==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=s,e[10]=d,e[11]=f):f=e[11];const E=f;let C;e[12]!==o?(C=t.jsx(J,{children:o}),e[12]=o,e[13]=C):C=e[13];let v;e[14]!==b||e[15]!==i||e[16]!==x||e[17]!==h||e[18]!==E||e[19]!==a?(v=x.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:b}):t.jsx(yt,{options:x,defaultValue:a,onValueChange:k=>i(h(k)),placeholder:E,maxCount:4}),e[14]=b,e[15]=i,e[16]=x,e[17]=h,e[18]=E,e[19]=a,e[20]=v):v=e[20];let u;return e[21]!==C||e[22]!==v?(u=t.jsxs("div",{className:"space-y-2",children:[C,v]}),e[21]=C,e[22]=v,e[23]=u):u=e[23],u}export{_l as PostEditor};
@@ -1 +1 @@
1
- import{c as J,b as K,d as Z,f as ee,a6 as te,j as t,B as L,l as se}from"./index-DcL61QpW.js";import{d as Q}from"./dialog-m22Y6h7g.js";import{b as A,T as q,a as G}from"./tooltip-Dj3JLNmI.js";import{n as ie}from"./Image01-B0kn2JYt.js";import{n as le}from"./LinkExternal01-C6etEW45.js";import{s as re}from"./XClose-CGysFXHn.js";import{h as ne}from"./agent-icon-pwgAjvSj.js";import{f as oe,F as ae,a as ce}from"./file-preview-xm9h33DS.js";import{F as V,H as de}from"./file-share-button-D6-oxZSz.js";import{F as W}from"./file-type-icon-dSRM1l-h.js";import{u as fe,b as me,e as he}from"./use-org-fs-ys9LE3L7.js";import{p as xe,b as pe}from"./location-DPIrGNp7.js";function ue(u){const e=J.c(13),{previewPath:i}=u,a=K(),x=Z(),c=ee({strict:!1}).org??"";let o;e[0]!==i?(o=i.split("/").slice(0,-1).join("/"),e[0]=i,e[1]=o):o=e[1];const r=o;let d;e[2]!==x||e[3]!==c||e[4]!==r||e[5]!==i?(d=()=>{x({to:te.library,params:{org:c},search:{path:r||void 0,preview:i}})},e[2]=x,e[3]=c,e[4]=r,e[5]=i,e[6]=d):d=e[6];const S=d;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ne,{size:14}),e[7]=f):f=e[7];let n;e[8]!==a?(n=a("library.seeInLibrary.label"),e[8]=a,e[9]=n):n=e[9];let s;return e[10]!==S||e[11]!==n?(s=t.jsxs(L,{variant:"ghost",size:"sm",onClick:S,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:[f,n]}),e[10]=S,e[11]=n,e[12]=s):s=e[12],s}const je=u=>/\.html?$/i.test(u);function X(u){const e=J.c(10),{onClose:i}=u,a=K();let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(re,{size:14}),e[0]=x):x=e[0];let c;e[1]!==i?(c=t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:i,children:x})}),e[1]=i,e[2]=c):c=e[2];let o;e[3]!==a?(o=a("library.previewContent.close"),e[3]=a,e[4]=o):o=e[4];let r;e[5]!==o?(r=t.jsx(G,{side:"bottom",children:o}),e[5]=o,e[6]=r):r=e[6];let d;return e[7]!==c||e[8]!==r?(d=t.jsxs(A,{children:[c,r]}),e[7]=c,e[8]=r,e[9]=d):d=e[9],d}function Te(u){const e=J.c(67),{previewPath:i,onClose:a,showSeeInLibrary:x,variant:c}=u,o=x===void 0?!1:x,r=K();let d;e[0]!==i?(d=xe(i),e[0]=i,e[1]=d):d=e[1];const S=d,{volume:f,dirPath:n}=S,{data:s,isPending:M}=fe(f,n),$=me(f??"");let l,m,h,j,b,v,g,p,w;if(e[2]!==$||e[3]!==s||e[4]!==n||e[5]!==a||e[6]!==i||e[7]!==o||e[8]!==c||e[9]!==f){w=Symbol.for("react.early_return_sentinel");e:{m=pe(n),h=c==="dialog";let U;e[19]!==i||e[20]!==o?(U=o?t.jsx(ue,{previewPath:i}):null,e[19]=i,e[20]=o,e[21]=U):U=e[21];const B=U;if(l=s&&s.kind==="file"?{key:i,filename:m,size:s.size,downloadUrl:$(s.path)}:null,l&&s&&je(m)){const Y=l.downloadUrl;let _;e[22]!==s?(_=he(s),e[22]=s,e[23]=_):_=e[23];const E=f??"",O=s.shareMode??"private",H=s.effectivePublic??!1,R=window.location.origin+l.downloadUrl;let F;e[24]!==n||e[25]!==E||e[26]!==O||e[27]!==H||e[28]!==R?(F=t.jsx(V,{volume:E,path:n,shareMode:O,effectivePublic:H,url:R}),e[24]=n,e[25]=E,e[26]=O,e[27]=H,e[28]=R,e[29]=F):F=e[29];let z;e[30]!==h||e[31]!==a?(z=h?t.jsx("div",{className:"w-8 shrink-0"}):t.jsx(X,{onClose:a}),e[30]=h,e[31]=a,e[32]=z):z=e[32];let I;e[33]!==B||e[34]!==F||e[35]!==z?(I=t.jsxs(t.Fragment,{children:[F,B,z]}),e[33]=B,e[34]=F,e[35]=z,e[36]=I):I=e[36],w=t.jsxs(t.Fragment,{children:[h&&t.jsx(Q,{className:"sr-only",children:m}),t.jsx(de,{readUrl:Y,marker:_,title:m,savePath:f==="home"?n:void 0,trailing:I},i)]});break e}const D=h?"h-11 py-1 pr-12 pl-2":"h-9 px-2";e[37]!==D?(p=se("flex shrink-0 items-center gap-1 border-b border-border/60",D),e[37]=D,e[38]=p):p=e[38],j="flex min-w-0 flex-1 items-center gap-2 px-2",b=t.jsx(W,{filename:m,className:"h-4.5 w-3.5 shrink-0"}),v=h?t.jsx(Q,{className:"truncate text-xs font-medium text-foreground",children:m}):t.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:m}),g=l&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:oe(l.size)})}e[2]=$,e[3]=s,e[4]=n,e[5]=a,e[6]=i,e[7]=o,e[8]=c,e[9]=f,e[10]=l,e[11]=m,e[12]=h,e[13]=j,e[14]=b,e[15]=v,e[16]=g,e[17]=p,e[18]=w}else l=e[10],m=e[11],h=e[12],j=e[13],b=e[14],v=e[15],g=e[16],p=e[17],w=e[18];if(w!==Symbol.for("react.early_return_sentinel"))return w;let y;e[39]!==j||e[40]!==b||e[41]!==v||e[42]!==g?(y=t.jsxs("div",{className:j,children:[b,v,g]}),e[39]=j,e[40]=b,e[41]=v,e[42]=g,e[43]=y):y=e[43];let P;e[44]!==s?.effectivePublic||e[45]!==s?.shareMode||e[46]!==l||e[47]!==n||e[48]!==r||e[49]!==f?(P=l&&t.jsxs(t.Fragment,{children:[t.jsx(V,{volume:f??"",path:n,shareMode:s?.shareMode??"private",effectivePublic:s?.effectivePublic??!1,url:window.location.origin+l.downloadUrl}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",asChild:!0,children:t.jsx("a",{href:l.downloadUrl,download:l.filename,children:t.jsx(ie,{size:14})})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.download")})]}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:()=>window.open(l.downloadUrl,"_blank","noopener"),children:t.jsx(le,{size:14})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.openInNewTab")})]})]}),e[44]=s?.effectivePublic,e[45]=s?.shareMode,e[46]=l,e[47]=n,e[48]=r,e[49]=f,e[50]=P):P=e[50];let N;e[51]!==h||e[52]!==a?(N=!h&&t.jsx(X,{onClose:a}),e[51]=h,e[52]=a,e[53]=N):N=e[53];let k;e[54]!==P||e[55]!==N||e[56]!==p||e[57]!==y?(k=t.jsxs("div",{className:p,children:[y,P,N]}),e[54]=P,e[55]=N,e[56]=p,e[57]=y,e[58]=k):k=e[58];let C;e[59]!==l||e[60]!==m||e[61]!==M||e[62]!==r?(C=t.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:l?t.jsx(ae,{file:l}):M?t.jsx(ce,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(W,{filename:m,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:r("library.previewContent.fileNotAvailable")})]})}),e[59]=l,e[60]=m,e[61]=M,e[62]=r,e[63]=C):C=e[63];let T;return e[64]!==k||e[65]!==C?(T=t.jsxs(t.Fragment,{children:[k,C]}),e[64]=k,e[65]=C,e[66]=T):T=e[66],T}export{Te as L};
1
+ import{c as J,b as K,d as Z,f as ee,a6 as te,j as t,B as L,l as se}from"./index-BOGZM7Pw.js";import{d as Q}from"./dialog-CwJ0Tacd.js";import{b as A,T as q,a as G}from"./tooltip-DoWVDYxv.js";import{n as ie}from"./Image01-DAe5wd3u.js";import{n as le}from"./LinkExternal01-ChFFafWR.js";import{s as re}from"./XClose-Bsj_jKUE.js";import{h as ne}from"./agent-icon-QobcC4y1.js";import{f as oe,F as ae,a as ce}from"./file-preview-BVUwkvqy.js";import{F as V,H as de}from"./file-share-button-Dfx-yCi-.js";import{F as W}from"./file-type-icon-CYHSeMg9.js";import{u as fe,b as me,e as he}from"./use-org-fs-DF_BlZtj.js";import{p as xe,b as pe}from"./location-DPIrGNp7.js";function ue(u){const e=J.c(13),{previewPath:i}=u,a=K(),x=Z(),c=ee({strict:!1}).org??"";let o;e[0]!==i?(o=i.split("/").slice(0,-1).join("/"),e[0]=i,e[1]=o):o=e[1];const r=o;let d;e[2]!==x||e[3]!==c||e[4]!==r||e[5]!==i?(d=()=>{x({to:te.library,params:{org:c},search:{path:r||void 0,preview:i}})},e[2]=x,e[3]=c,e[4]=r,e[5]=i,e[6]=d):d=e[6];const S=d;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ne,{size:14}),e[7]=f):f=e[7];let n;e[8]!==a?(n=a("library.seeInLibrary.label"),e[8]=a,e[9]=n):n=e[9];let s;return e[10]!==S||e[11]!==n?(s=t.jsxs(L,{variant:"ghost",size:"sm",onClick:S,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:[f,n]}),e[10]=S,e[11]=n,e[12]=s):s=e[12],s}const je=u=>/\.html?$/i.test(u);function X(u){const e=J.c(10),{onClose:i}=u,a=K();let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(re,{size:14}),e[0]=x):x=e[0];let c;e[1]!==i?(c=t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:i,children:x})}),e[1]=i,e[2]=c):c=e[2];let o;e[3]!==a?(o=a("library.previewContent.close"),e[3]=a,e[4]=o):o=e[4];let r;e[5]!==o?(r=t.jsx(G,{side:"bottom",children:o}),e[5]=o,e[6]=r):r=e[6];let d;return e[7]!==c||e[8]!==r?(d=t.jsxs(A,{children:[c,r]}),e[7]=c,e[8]=r,e[9]=d):d=e[9],d}function Te(u){const e=J.c(67),{previewPath:i,onClose:a,showSeeInLibrary:x,variant:c}=u,o=x===void 0?!1:x,r=K();let d;e[0]!==i?(d=xe(i),e[0]=i,e[1]=d):d=e[1];const S=d,{volume:f,dirPath:n}=S,{data:s,isPending:M}=fe(f,n),$=me(f??"");let l,m,h,j,b,v,g,p,w;if(e[2]!==$||e[3]!==s||e[4]!==n||e[5]!==a||e[6]!==i||e[7]!==o||e[8]!==c||e[9]!==f){w=Symbol.for("react.early_return_sentinel");e:{m=pe(n),h=c==="dialog";let U;e[19]!==i||e[20]!==o?(U=o?t.jsx(ue,{previewPath:i}):null,e[19]=i,e[20]=o,e[21]=U):U=e[21];const B=U;if(l=s&&s.kind==="file"?{key:i,filename:m,size:s.size,downloadUrl:$(s.path)}:null,l&&s&&je(m)){const Y=l.downloadUrl;let _;e[22]!==s?(_=he(s),e[22]=s,e[23]=_):_=e[23];const E=f??"",O=s.shareMode??"private",H=s.effectivePublic??!1,R=window.location.origin+l.downloadUrl;let F;e[24]!==n||e[25]!==E||e[26]!==O||e[27]!==H||e[28]!==R?(F=t.jsx(V,{volume:E,path:n,shareMode:O,effectivePublic:H,url:R}),e[24]=n,e[25]=E,e[26]=O,e[27]=H,e[28]=R,e[29]=F):F=e[29];let z;e[30]!==h||e[31]!==a?(z=h?t.jsx("div",{className:"w-8 shrink-0"}):t.jsx(X,{onClose:a}),e[30]=h,e[31]=a,e[32]=z):z=e[32];let I;e[33]!==B||e[34]!==F||e[35]!==z?(I=t.jsxs(t.Fragment,{children:[F,B,z]}),e[33]=B,e[34]=F,e[35]=z,e[36]=I):I=e[36],w=t.jsxs(t.Fragment,{children:[h&&t.jsx(Q,{className:"sr-only",children:m}),t.jsx(de,{readUrl:Y,marker:_,title:m,savePath:f==="home"?n:void 0,trailing:I},i)]});break e}const D=h?"h-11 py-1 pr-12 pl-2":"h-9 px-2";e[37]!==D?(p=se("flex shrink-0 items-center gap-1 border-b border-border/60",D),e[37]=D,e[38]=p):p=e[38],j="flex min-w-0 flex-1 items-center gap-2 px-2",b=t.jsx(W,{filename:m,className:"h-4.5 w-3.5 shrink-0"}),v=h?t.jsx(Q,{className:"truncate text-xs font-medium text-foreground",children:m}):t.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:m}),g=l&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:oe(l.size)})}e[2]=$,e[3]=s,e[4]=n,e[5]=a,e[6]=i,e[7]=o,e[8]=c,e[9]=f,e[10]=l,e[11]=m,e[12]=h,e[13]=j,e[14]=b,e[15]=v,e[16]=g,e[17]=p,e[18]=w}else l=e[10],m=e[11],h=e[12],j=e[13],b=e[14],v=e[15],g=e[16],p=e[17],w=e[18];if(w!==Symbol.for("react.early_return_sentinel"))return w;let y;e[39]!==j||e[40]!==b||e[41]!==v||e[42]!==g?(y=t.jsxs("div",{className:j,children:[b,v,g]}),e[39]=j,e[40]=b,e[41]=v,e[42]=g,e[43]=y):y=e[43];let P;e[44]!==s?.effectivePublic||e[45]!==s?.shareMode||e[46]!==l||e[47]!==n||e[48]!==r||e[49]!==f?(P=l&&t.jsxs(t.Fragment,{children:[t.jsx(V,{volume:f??"",path:n,shareMode:s?.shareMode??"private",effectivePublic:s?.effectivePublic??!1,url:window.location.origin+l.downloadUrl}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",asChild:!0,children:t.jsx("a",{href:l.downloadUrl,download:l.filename,children:t.jsx(ie,{size:14})})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.download")})]}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:()=>window.open(l.downloadUrl,"_blank","noopener"),children:t.jsx(le,{size:14})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.openInNewTab")})]})]}),e[44]=s?.effectivePublic,e[45]=s?.shareMode,e[46]=l,e[47]=n,e[48]=r,e[49]=f,e[50]=P):P=e[50];let N;e[51]!==h||e[52]!==a?(N=!h&&t.jsx(X,{onClose:a}),e[51]=h,e[52]=a,e[53]=N):N=e[53];let k;e[54]!==P||e[55]!==N||e[56]!==p||e[57]!==y?(k=t.jsxs("div",{className:p,children:[y,P,N]}),e[54]=P,e[55]=N,e[56]=p,e[57]=y,e[58]=k):k=e[58];let C;e[59]!==l||e[60]!==m||e[61]!==M||e[62]!==r?(C=t.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:l?t.jsx(ae,{file:l}):M?t.jsx(ce,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(W,{filename:m,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:r("library.previewContent.fileNotAvailable")})]})}),e[59]=l,e[60]=m,e[61]=M,e[62]=r,e[63]=C):C=e[63];let T;return e[64]!==k||e[65]!==C?(T=t.jsxs(t.Fragment,{children:[k,C]}),e[64]=k,e[65]=C,e[66]=T):T=e[66],T}export{Te as L};
@@ -1 +1 @@
1
- import{c as p,j as n}from"./index-DcL61QpW.js";import{b as x,D as c}from"./dialog-m22Y6h7g.js";import{L as w}from"./preview-content-B8P7Syk7.js";function g(m){const e=p.c(9),{previewPath:t,onClose:o,showSeeInLibrary:l}=m,a=l===void 0?!1:l;let i;e[0]!==o?(i=f=>{f||o()},e[0]=o,e[1]=i):i=e[1];let r;e[2]!==o||e[3]!==t||e[4]!==a?(r=n.jsx(x,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:n.jsx(w,{previewPath:t,onClose:o,showSeeInLibrary:a,variant:"dialog"})}),e[2]=o,e[3]=t,e[4]=a,e[5]=r):r=e[5];let s;return e[6]!==i||e[7]!==r?(s=n.jsx(c,{open:!0,onOpenChange:i,children:r}),e[6]=i,e[7]=r,e[8]=s):s=e[8],s}export{g as L};
1
+ import{c as p,j as n}from"./index-BOGZM7Pw.js";import{b as x,D as c}from"./dialog-CwJ0Tacd.js";import{L as w}from"./preview-content-Bd42BahA.js";function g(m){const e=p.c(9),{previewPath:t,onClose:o,showSeeInLibrary:l}=m,a=l===void 0?!1:l;let i;e[0]!==o?(i=f=>{f||o()},e[0]=o,e[1]=i):i=e[1];let r;e[2]!==o||e[3]!==t||e[4]!==a?(r=n.jsx(x,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:n.jsx(w,{previewPath:t,onClose:o,showSeeInLibrary:a,variant:"dialog"})}),e[2]=o,e[3]=t,e[4]=a,e[5]=r):r=e[5];let s;return e[6]!==i||e[7]!==r?(s=n.jsx(c,{open:!0,onOpenChange:i,children:r}),e[6]=i,e[7]=r,e[8]=s):s=e[8],s}export{g as L};
@@ -1 +1 @@
1
- import{c as O,b as De,o as Je,m as et,K as Ke,a as Ue,t as R,l as ze,j as s,r as I,B as Oe,h as tt,n as Ee,fn as st,at,aU as lt,x as it,q as M,ee as T,ec as Ye,ed as Xe}from"./index-DcL61QpW.js";import{A as nt}from"./avatar-tshBeT_k.js";import{D as rt,b as ot,c as ct,d as ft,h as dt,e as ut}from"./dialog-m22Y6h7g.js";import{T as pt,a as mt,R as gt,b as ht}from"./index-DLgtk0KZ.js";import{s as xt}from"./Trash01-CeldIlnM.js";import{i as vt}from"./Upload01-BZ3RgHZy.js";import{S as Fe}from"./switch-D3OVMEG_.js";import{d as qe,S as Be,c as $e,b as He}from"./select-BWJrfhuu.js";import{T as Ie,a as bt}from"./toggle-group-ClfsxZi8.js";import{I as jt}from"./input-gsvsf3Co.js";import{i as yt}from"./Monitor01-CjYpbYaq.js";import{n as wt,a as Nt,i as _t}from"./Sun-BZOwobi1.js";import{u as St}from"./use-debounced-autosave-DBHawyU4.js";import{p as At,q as Ct}from"./question-004-sINsf4GQ.js";import"./User01-aDNYrgVN.js";import"./X-BrQj6eYr.js";import"./index-BFNzK42a.js";import"./Check-B92DFtap.js";import"./ChevronUp-8UK2xKJB.js";const kt=2*1024*1024,Ut=["image/png","image/jpeg","image/gif","image/webp"];async function Dt(e){try{return(await e.json()).error??""}catch{return""}}async function Me(e){if(!e.ok)throw new Error(await Dt(e));return e}function Pt(e){const t=O.c(3);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=Ke.userAvatars(),t[0]=l):l=t[0];let a;return t[1]!==e?(a={queryKey:l,enabled:e,queryFn:zt},t[1]=e,t[2]=a):a=t[2],et(a)}async function zt(){return(await(await Me(await fetch("/api/_users/avatars"))).json()).avatars}function Mt(){const e=O.c(22),t=De(),l=Je();let a;e[0]!==l?(a=async()=>{await Promise.all([l.invalidateQueries({queryKey:Ke.userAvatars()}),Ue.getSession({query:{disableCookieCache:!0}})])},e[0]=l,e[1]=a):a=e[1];const i=a;let o;e[2]!==i||e[3]!==t?(o=async(f,b)=>{try{return await f(),await i(),R.success(b),!0}catch(j){const x=j;return R.error(x instanceof Error&&x.message?x.message:t("settings.profile.avatarUploadError")),!1}},e[2]=i,e[3]=t,e[4]=o):o=e[4];const r=o;let p;e[5]!==t||e[6]!==r?(p=async f=>{let b=null;return await r(async()=>{b=(await(await Me(await fetch("/api/_users/avatar",{method:"POST",headers:{"content-type":f.type||"image/webp"},body:f}))).json()).url,await Ue.updateUser({image:b})},t("settings.profile.avatarUpdated"))?b:null},e[5]=t,e[6]=r,e[7]=p):p=e[7];const m=p;let h;e[8]!==t||e[9]!==r?(h=f=>r(async()=>{const b=await Me(await fetch("/api/_users/avatar/select",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:f})})),{url:j}=await b.json();await Ue.updateUser({image:j})},t("settings.profile.avatarUpdated")),e[8]=t,e[9]=r,e[10]=h):h=e[10];const d=h;let _;e[11]!==t||e[12]!==r?(_=f=>r(async()=>{await Me(await fetch(`/api/_users/avatar?path=${encodeURIComponent(f)}`,{method:"DELETE"}))},t("settings.profile.avatarDeleted")),e[11]=t,e[12]=r,e[13]=_):_=e[13];const g=_;let c;e[14]!==t||e[15]!==r?(c=()=>r(Tt,t("settings.profile.avatarRemoved")),e[14]=t,e[15]=r,e[16]=c):c=e[16];const v=c;let u;return e[17]!==g||e[18]!==v||e[19]!==d||e[20]!==m?(u={uploadAvatar:m,selectAvatar:d,deleteStoredAvatar:g,removeAvatar:v},e[17]=g,e[18]=v,e[19]=d,e[20]=m,e[21]=u):u=e[21],u}async function Tt(){await Ue.updateUser({image:null}),await Me(await fetch("/api/_users/avatar",{method:"DELETE"}))}function Rt(e){const t=O.c(26);let l,a,i,o,r,p;t[0]!==e?({className:l,defaultValue:a,value:p,min:o,max:r,...i}=e,t[0]=e,t[1]=l,t[2]=a,t[3]=i,t[4]=o,t[5]=r,t[6]=p):(l=t[1],a=t[2],i=t[3],o=t[4],r=t[5],p=t[6]);const m=o===void 0?0:o,h=r===void 0?100:r;let d;t[7]!==a||t[8]!==h||t[9]!==m||t[10]!==p?(d=Array.isArray(p)?p:Array.isArray(a)?a:[m,h],t[7]=a,t[8]=h,t[9]=m,t[10]=p,t[11]=d):d=t[11];const _=d;let g;t[12]!==l?(g=ze("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",l),t[12]=l,t[13]=g):g=t[13];let c;t[14]===Symbol.for("react.memo_cache_sentinel")?(c=ze("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),t[14]=c):c=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(pt,{"data-slot":"slider-track",className:c,children:s.jsx(mt,{"data-slot":"slider-range",className:ze("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),t[15]=v):v=t[15];let u;t[16]!==_.length?(u=Array.from({length:_.length},Et),t[16]=_.length,t[17]=u):u=t[17];let f;return t[18]!==a||t[19]!==h||t[20]!==m||t[21]!==i||t[22]!==g||t[23]!==u||t[24]!==p?(f=s.jsxs(gt,{"data-slot":"slider",defaultValue:a,value:p,min:m,max:h,className:g,...i,children:[v,u]}),t[18]=a,t[19]=h,t[20]=m,t[21]=i,t[22]=g,t[23]=u,t[24]=p,t[25]=f):f=t[25],f}function Et(e,t){return s.jsx(ht,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t)}function Ve(e){return Math.max(e.viewport/e.imageWidth,e.viewport/e.imageHeight)}function Ot(e){const t=Ve(e)*e.zoom;return{x:Math.max(0,(e.imageWidth*t-e.viewport)/2),y:Math.max(0,(e.imageHeight*t-e.viewport)/2)}}function Qe(e){const t=Ot(e);return{x:Math.min(t.x,Math.max(-t.x,e.offset.x)),y:Math.min(t.y,Math.max(-t.y,e.offset.y))}}function Ft(e){const t=Ve(e)*e.zoom,l=Qe(e),a=e.viewport/t,i=e.imageWidth/2-a/2-l.x/t,o=e.imageHeight/2-a/2-l.y/t;return{sx:Math.min(Math.max(0,i),Math.max(0,e.imageWidth-a)),sy:Math.min(Math.max(0,o),Math.max(0,e.imageHeight-a)),size:a}}function It(e,t){return Math.max(1,Math.round(Math.min(t,e.size)))}const Le=288,Pe=1,We=4;function Lt(e){return new Promise((t,l)=>{const a=URL.createObjectURL(e),i=new Image;i.onload=()=>t({element:i,url:a,width:i.naturalWidth,height:i.naturalHeight}),i.onerror=()=>{URL.revokeObjectURL(a),l(new Error("decode failed"))},i.src=a})}function $t(e,t,l){const a=Ft(t),i=It(a,l),o=document.createElement("canvas");o.width=i,o.height=i;const r=o.getContext("2d");return r?(r.drawImage(e.element,a.sx,a.sy,a.size,a.size,0,0,i,i),new Promise(p=>{o.toBlob(m=>p(m),"image/webp",.92)})):Promise.resolve(null)}function Vt({open:e,onOpenChange:t,title:l,description:a,shape:i="circle",maxOutputSize:o=512,accept:r,maxBytes:p,onUpload:m,gallery:h}){const d=De(),_=I.useRef(null),g=I.useRef(null),[c,v]=I.useState(null),[u,f]=I.useState(Pe),[b,j]=I.useState({x:0,y:0}),[x,w]=I.useState(!1),A=i==="circle"?"rounded-full":"rounded-xl";function y(){c&&URL.revokeObjectURL(c.url),v(null),f(Pe),j({x:0,y:0})}function N(){y(),t(!1)}async function P(n){if(!r.includes(n.type)){R.error(d("imageUpload.unsupportedType"));return}if(n.size>p){R.error(d("imageUpload.tooLarge",{max:String(Math.round(p/(1024*1024)))}));return}try{y(),v(await Lt(n))}catch{R.error(d("imageUpload.decodeFailed"))}}const C=c&&{imageWidth:c.width,imageHeight:c.height,viewport:Le,zoom:u,offset:b},k=C?Qe(C):{x:0,y:0},U=C?Ve(C)*u:1;async function E(){if(!(!c||!C)){w(!0);try{const n=await $t(c,C,o);if(!n){R.error(d("imageUpload.encodeFailed"));return}await m(n)&&N()}finally{w(!1)}}}async function F(n){w(!0);try{await n}finally{w(!1)}}return s.jsx(rt,{open:e,onOpenChange:n=>n?t(!0):N(),children:s.jsxs(ot,{className:"sm:max-w-[26rem]",children:[s.jsxs(ct,{children:[s.jsx(ft,{children:l}),a?s.jsx(dt,{children:a}):null]}),c&&C?s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx("div",{className:ze("relative overflow-hidden bg-muted touch-none cursor-grab active:cursor-grabbing",A),style:{width:Le,height:Le},onPointerDown:n=>{g.current={x:n.clientX-k.x,y:n.clientY-k.y},n.currentTarget.setPointerCapture(n.pointerId)},onPointerMove:n=>{const D=g.current;D&&j({x:n.clientX-D.x,y:n.clientY-D.y})},onPointerUp:n=>{g.current=null,n.currentTarget.releasePointerCapture(n.pointerId)},onPointerCancel:()=>{g.current=null},onWheel:n=>{const D=u-n.deltaY*.002;f(Math.min(We,Math.max(Pe,D)))},children:s.jsx("img",{src:c.url,alt:"",draggable:!1,className:"absolute left-1/2 top-1/2 max-w-none select-none",style:{width:c.width*U,height:c.height*U,transform:`translate(calc(-50% + ${k.x}px), calc(-50% + ${k.y}px))`}})}),s.jsxs("div",{className:"flex w-full items-center gap-3 px-1",children:[s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:d("imageUpload.zoom")}),s.jsx(Rt,{value:[u],min:Pe,max:We,step:.01,onValueChange:([n])=>f(n??Pe),"aria-label":d("imageUpload.zoom")})]})]}):s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("button",{type:"button",onClick:()=>_.current?.click(),className:"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border py-10 text-sm text-muted-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[s.jsx(vt,{className:"size-5"}),d("imageUpload.choose")]}),h&&h.items.length>0?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:d("imageUpload.recent")}),s.jsx("div",{className:"flex flex-wrap gap-2",children:h.items.map(n=>s.jsxs("div",{className:"group relative",children:[s.jsx("button",{type:"button",disabled:x,onClick:()=>{F(h.onSelect(n.path)).then(N)},"aria-label":d("imageUpload.usePicture"),className:ze("size-14 overflow-hidden border transition-opacity hover:opacity-80 disabled:opacity-50",A,n.current?"border-primary ring-2 ring-primary/40":"border-border"),children:s.jsx("img",{src:n.url,alt:"",className:"size-full object-cover"})}),h.onDelete&&!n.current?s.jsx("button",{type:"button",disabled:x,onClick:()=>{F(h.onDelete(n.path))},"aria-label":d("imageUpload.deletePicture"),className:"absolute -right-1 -top-1 hidden rounded-lg bg-background p-1 text-muted-foreground shadow-sm hover:text-destructive group-hover:block",children:s.jsx(xt,{className:"size-3"})}):null]},n.path))})]}):null]}),s.jsx("input",{ref:_,type:"file",accept:r.join(","),className:"hidden",onChange:n=>{const D=n.target.files?.[0];n.target.value="",D&&P(D)}}),s.jsx(ut,{children:c?s.jsxs(s.Fragment,{children:[s.jsx(Oe,{variant:"ghost",onClick:y,disabled:x,children:d("imageUpload.back")}),s.jsxs(Oe,{onClick:()=>{E()},disabled:x,children:[x?s.jsx(tt,{size:"sm"}):null,d("imageUpload.save")]})]}):s.jsx(Oe,{variant:"ghost",onClick:N,children:d("imageUpload.cancel")})})]})})}const Ge=[{value:"en",label:"English"},{value:"pt-BR",label:"Português (Brasil)"}];function qt(e){const t=O.c(36),{url:l,fallback:a}=e,i=De(),[o,r]=I.useState(!1),{uploadAvatar:p,selectAvatar:m,deleteStoredAvatar:h,removeAvatar:d}=Mt(),_=Pt(o);let g;t[0]!==d||t[1]!==i||t[2]!==l?(g=l?s.jsx(Oe,{variant:"ghost",size:"sm",onClick:()=>{d()},children:i("settings.profile.avatarRemove")}):null,t[0]=d,t[1]=i,t[2]=l,t[3]=g):g=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>r(!0),t[4]=c):c=t[4];let v;t[5]!==i?(v=i("settings.profile.avatarUpload"),t[5]=i,t[6]=v):v=t[6];let u;t[7]!==i?(u=i("settings.profile.avatarUpload"),t[7]=i,t[8]=u):u=t[8];let f;t[9]!==a||t[10]!==l?(f=s.jsx(nt,{url:l,fallback:a,shape:"circle",size:"base"}),t[9]=a,t[10]=l,t[11]=f):f=t[11];let b;t[12]!==v||t[13]!==u||t[14]!==f?(b=s.jsx("button",{type:"button",onClick:c,"aria-label":v,title:u,className:"rounded-full transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:f}),t[12]=v,t[13]=u,t[14]=f,t[15]=b):b=t[15];let j;t[16]!==i?(j=i("settings.profile.avatarDialogTitle"),t[16]=i,t[17]=j):j=t[17];let x;t[18]!==i?(x=i("settings.profile.avatarDialogDescription"),t[18]=i,t[19]=x):x=t[19];let w;t[20]!==_.data?(w=_.data??[],t[20]=_.data,t[21]=w):w=t[21];let A;t[22]!==h||t[23]!==m||t[24]!==w?(A={items:w,onSelect:m,onDelete:h},t[22]=h,t[23]=m,t[24]=w,t[25]=A):A=t[25];let y;t[26]!==o||t[27]!==A||t[28]!==j||t[29]!==x||t[30]!==p?(y=s.jsx(Vt,{open:o,onOpenChange:r,title:j,description:x,shape:"circle",accept:Ut,maxBytes:kt,onUpload:p,gallery:A}),t[26]=o,t[27]=A,t[28]=j,t[29]=x,t[30]=p,t[31]=y):y=t[31];let N;return t[32]!==g||t[33]!==y||t[34]!==b?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[g,b,y]}),t[32]=g,t[33]=y,t[34]=b,t[35]=N):N=t[35],N}function Bt(){const e=O.c(36),t=De(),{data:l,isPending:a}=Ue.useSession(),i=l?.user,o=i?.image,r=i?.name??"";let p;e[0]!==r?(p={values:{name:r}},e[0]=r,e[1]=p):p=e[1];const m=at(p);let h;e[2]!==m||e[3]!==t?(h={save:async()=>{const C=m.control._formState.dirtyFields;if(Object.keys(C).length===0)return;const k=m.getValues(),U=m.control._defaultValues;m.reset(k,{keepValues:!0});try{await Ue.updateUser({name:k.name}),M("profile_updated",{fields:["name"]}),R.success(t("settings.profile.updateSuccess"))}catch{m.reset(U,{keepValues:!0}),R.error(t("settings.profile.updateError"))}}},e[2]=m,e[3]=t,e[4]=h):h=e[4];const{schedule:d,flush:_}=St(h);if(a)return null;let g;e[5]!==t?(g=t("settings.profile.avatar"),e[5]=t,e[6]=g):g=e[6];const c=i?.name??"U";let v;e[7]!==c||e[8]!==o?(v=s.jsx(qt,{url:o,fallback:c}),e[7]=c,e[8]=o,e[9]=v):v=e[9];let u;e[10]!==g||e[11]!==v?(u=s.jsx(T,{title:g,action:v}),e[10]=g,e[11]=v,e[12]=u):u=e[12];let f;e[13]!==t?(f=t("settings.profile.displayName"),e[13]=t,e[14]=f):f=e[14];let b;e[15]!==_||e[16]!==d||e[17]!==t?(b=C=>{const{field:k}=C;return s.jsx(jt,{id:"display-name",...k,onChange:U=>{k.onChange(U),d()},onBlur:()=>{k.onBlur(),_()},onKeyDown:U=>{U.key==="Enter"&&_()},placeholder:t("settings.profile.displayNamePlaceholder"),className:"w-[280px]"})},e[15]=_,e[16]=d,e[17]=t,e[18]=b):b=e[18];let j;e[19]!==m.control||e[20]!==b?(j=s.jsx(lt,{control:m.control,name:"name",render:b}),e[19]=m.control,e[20]=b,e[21]=j):j=e[21];let x;e[22]!==f||e[23]!==j?(x=s.jsx(T,{title:f,action:j}),e[22]=f,e[23]=j,e[24]=x):x=e[24];let w;e[25]!==t?(w=t("settings.profile.email"),e[25]=t,e[26]=w):w=e[26];const A=i?.email;let y;e[27]!==A?(y=s.jsx("span",{className:"text-sm text-muted-foreground",children:A}),e[27]=A,e[28]=y):y=e[28];let N;e[29]!==w||e[30]!==y?(N=s.jsx(T,{title:w,action:y}),e[29]=w,e[30]=y,e[31]=N):N=e[31];let P;return e[32]!==x||e[33]!==N||e[34]!==u?(P=s.jsx(Ye,{children:s.jsxs(Xe,{children:[u,x,N]})}),e[32]=x,e[33]=N,e[34]=u,e[35]=P):P=e[35],P}function Ht(){const e=O.c(180),t=De(),[l,a]=it();let i;e[0]!==a||e[1]!==t?(i=async S=>{if(S&&await Notification.requestPermission()!=="granted"){M("preferences_notifications_permission_denied"),R.error(t("settings.preferences.notificationsDenied")),a(Xt);return}M("preferences_notifications_toggled",{enabled:S}),a(z=>({...z,enableNotifications:S}))},e[0]=a,e[1]=t,e[2]=i):i=e[2];const o=i;let r;e[3]!==a?(r=S=>{M("preferences_project_first_nav_toggled",{enabled:S}),a(z=>({...z,projectFirstNav:S}))},e[3]=a,e[4]=r):r=e[4];const p=r;let m;e[5]!==t?(m=t("settings.preferences.title"),e[5]=t,e[6]=m):m=e[6];let h;e[7]!==t?(h=t("settings.preferences.theme"),e[7]=t,e[8]=h):h=e[8];let d;e[9]!==t?(d=t("settings.preferences.themeDescription"),e[9]=t,e[10]=d):d=e[10];const _=l.theme;let g;e[11]!==a?(g=S=>{S&&(M("preferences_theme_changed",{to_value:S}),a(z=>({...z,theme:S})))},e[11]=a,e[12]=g):g=e[12];let c;e[13]!==t?(c=t("settings.preferences.themeLight"),e[13]=t,e[14]=c):c=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(wt,{size:14}),e[15]=v):v=e[15];let u;e[16]!==c?(u=s.jsx(Ie,{value:"light",className:"rounded-lg data-[variant=outline]:border-l","aria-label":c,children:v}),e[16]=c,e[17]=u):u=e[17];let f;e[18]!==t?(f=t("settings.preferences.themeDark"),e[18]=t,e[19]=f):f=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Nt,{size:14}),e[20]=b):b=e[20];let j;e[21]!==f?(j=s.jsx(Ie,{value:"dark",className:"rounded-lg data-[variant=outline]:border-l","aria-label":f,children:b}),e[21]=f,e[22]=j):j=e[22];let x;e[23]!==t?(x=t("settings.preferences.themeSystem"),e[23]=t,e[24]=x):x=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(yt,{size:14}),e[25]=w):w=e[25];let A;e[26]!==x?(A=s.jsx(Ie,{value:"system",className:"rounded-lg data-[variant=outline]:border-l","aria-label":x,children:w}),e[26]=x,e[27]=A):A=e[27];let y;e[28]!==l.theme||e[29]!==j||e[30]!==A||e[31]!==g||e[32]!==u?(y=s.jsxs(bt,{type:"single",size:"sm",variant:"outline",className:"gap-2 data-[variant=outline]:shadow-none",value:_,onValueChange:g,children:[u,j,A]}),e[28]=l.theme,e[29]=j,e[30]=A,e[31]=g,e[32]=u,e[33]=y):y=e[33];let N;e[34]!==y||e[35]!==h||e[36]!==d?(N=s.jsx(T,{title:h,description:d,action:y}),e[34]=y,e[35]=h,e[36]=d,e[37]=N):N=e[37];let P;e[38]!==t?(P=t("settings.preferences.language"),e[38]=t,e[39]=P):P=e[39];let C;e[40]!==t?(C=t("settings.preferences.languageDescription"),e[40]=t,e[41]=C):C=e[41];let k;e[42]!==a?(k=S=>{M("preferences_language_changed",{to_value:S}),a(z=>({...z,language:S}))},e[42]=a,e[43]=k):k=e[43];let U;e[44]!==l.language?(U=Ge.find(S=>S.value===l.language)?.label,e[44]=l.language,e[45]=U):U=e[45];let E;e[46]!==U?(E=s.jsx(He,{className:"w-44 h-7 text-xs",children:s.jsx("span",{children:U})}),e[46]=U,e[47]=E):E=e[47];let F;e[48]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(qe,{children:Ge.map(Yt)}),e[48]=F):F=e[48];let n;e[49]!==l.language||e[50]!==k||e[51]!==E?(n=s.jsxs(Be,{value:l.language,onValueChange:k,children:[E,F]}),e[49]=l.language,e[50]=k,e[51]=E,e[52]=n):n=e[52];let D;e[53]!==P||e[54]!==C||e[55]!==n?(D=s.jsx(T,{title:P,description:C,action:n}),e[53]=P,e[54]=C,e[55]=n,e[56]=D):D=e[56];let L;e[57]!==t?(L=t("settings.preferences.notifications"),e[57]=t,e[58]=L):L=e[58];let $;e[59]!==t?($=t("settings.preferences.notificationsDescription"),e[59]=t,e[60]=$):$=e[60];let V;e[61]!==o||e[62]!==l.enableNotifications?(V=typeof Notification<"u"?()=>o(!l.enableNotifications):void 0,e[61]=o,e[62]=l.enableNotifications,e[63]=V):V=e[63];let q;e[64]!==o||e[65]!==l.enableNotifications?(q=s.jsx(Fe,{disabled:typeof Notification>"u",checked:l.enableNotifications,onCheckedChange:o}),e[64]=o,e[65]=l.enableNotifications,e[66]=q):q=e[66];let B;e[67]!==L||e[68]!==$||e[69]!==V||e[70]!==q?(B=s.jsx(T,{title:L,description:$,onClick:V,action:q}),e[67]=L,e[68]=$,e[69]=V,e[70]=q,e[71]=B):B=e[71];let H;e[72]!==t?(H=t("settings.preferences.sounds"),e[72]=t,e[73]=H):H=e[73];let W;e[74]!==t?(W=t("settings.preferences.soundsDescription"),e[74]=t,e[75]=W):W=e[75];let G;e[76]!==l.enableSounds||e[77]!==a?(G=()=>{M("preferences_sounds_toggled",{enabled:!l.enableSounds}),a(Kt)},e[76]=l.enableSounds,e[77]=a,e[78]=G):G=e[78];let K;e[79]!==t?(K=t("settings.preferences.soundsPreview"),e[79]=t,e[80]=K):K=e[80];let Te;e[81]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(_t,{size:11}),e[81]=Te):Te=e[81];let Y;e[82]!==K?(Y=s.jsx("button",{type:"button","aria-label":K,onClick:Wt,className:"size-6 flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer rounded-lg",children:Te}),e[82]=K,e[83]=Y):Y=e[83];let X;e[84]!==a?(X=S=>{M("preferences_sounds_toggled",{enabled:S}),a(z=>({...z,enableSounds:S}))},e[84]=a,e[85]=X):X=e[85];let Q;e[86]!==l.enableSounds||e[87]!==X?(Q=s.jsx(Fe,{checked:l.enableSounds,onCheckedChange:X}),e[86]=l.enableSounds,e[87]=X,e[88]=Q):Q=e[88];let Z;e[89]!==Y||e[90]!==Q?(Z=s.jsxs("div",{className:"flex items-center gap-2",children:[Y,Q]}),e[89]=Y,e[90]=Q,e[91]=Z):Z=e[91];let J;e[92]!==H||e[93]!==W||e[94]!==G||e[95]!==Z?(J=s.jsx(T,{title:H,description:W,onClick:G,action:Z}),e[92]=H,e[93]=W,e[94]=G,e[95]=Z,e[96]=J):J=e[96];let ee;e[97]!==t?(ee=t("settings.preferences.projectFirstNav"),e[97]=t,e[98]=ee):ee=e[98];let te;e[99]!==t?(te=t("settings.preferences.projectFirstNavDescription"),e[99]=t,e[100]=te):te=e[100];let se;e[101]!==p||e[102]!==l.projectFirstNav?(se=()=>p(!l.projectFirstNav),e[101]=p,e[102]=l.projectFirstNav,e[103]=se):se=e[103];let ae;e[104]!==t?(ae=t("settings.preferences.projectFirstNav"),e[104]=t,e[105]=ae):ae=e[105];let le;e[106]!==p||e[107]!==l.projectFirstNav||e[108]!==ae?(le=s.jsx(Fe,{"aria-label":ae,checked:l.projectFirstNav,onCheckedChange:p}),e[106]=p,e[107]=l.projectFirstNav,e[108]=ae,e[109]=le):le=e[109];let ie;e[110]!==ee||e[111]!==te||e[112]!==se||e[113]!==le?(ie=s.jsx(T,{title:ee,description:te,onClick:se,action:le}),e[110]=ee,e[111]=te,e[112]=se,e[113]=le,e[114]=ie):ie=e[114];let ne;e[115]!==t?(ne=t("settings.preferences.toolApproval"),e[115]=t,e[116]=ne):ne=e[116];let re;e[117]!==t?(re=t("settings.preferences.toolApprovalDescription"),e[117]=t,e[118]=re):re=e[118];const Ze=l.toolApprovalLevel;let oe;e[119]!==a?(oe=S=>{M("preferences_tool_approval_changed",{to_value:S}),a(z=>({...z,toolApprovalLevel:S}))},e[119]=a,e[120]=oe):oe=e[120];let ce;e[121]!==l.toolApprovalLevel||e[122]!==t?(ce={readonly:t("settings.preferences.toolApprovalAsk"),auto:t("settings.preferences.toolApprovalAuto")}[l.toolApprovalLevel]??t("settings.preferences.toolApprovalAsk"),e[121]=l.toolApprovalLevel,e[122]=t,e[123]=ce):ce=e[123];let fe;e[124]!==ce?(fe=s.jsx(He,{className:"w-36 h-7 text-xs",children:s.jsx("span",{children:ce})}),e[124]=ce,e[125]=fe):fe=e[125];let de;e[126]!==t?(de=t("settings.preferences.toolApprovalAsk"),e[126]=t,e[127]=de):de=e[127];let ue;e[128]!==t?(ue=t("settings.preferences.toolApprovalAsk"),e[128]=t,e[129]=ue):ue=e[129];let pe;e[130]!==ue?(pe=s.jsx("span",{className:"font-medium",children:ue}),e[130]=ue,e[131]=pe):pe=e[131];let me;e[132]!==t?(me=t("settings.preferences.toolApprovalAskDescription"),e[132]=t,e[133]=me):me=e[133];let ge;e[134]!==me?(ge=s.jsx("span",{className:"text-xs text-muted-foreground",children:me}),e[134]=me,e[135]=ge):ge=e[135];let he;e[136]!==pe||e[137]!==ge?(he=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[pe,ge]}),e[136]=pe,e[137]=ge,e[138]=he):he=e[138];let xe;e[139]!==de||e[140]!==he?(xe=s.jsx($e,{value:"readonly",textValue:de,children:he}),e[139]=de,e[140]=he,e[141]=xe):xe=e[141];let ve;e[142]!==t?(ve=t("settings.preferences.toolApprovalAuto"),e[142]=t,e[143]=ve):ve=e[143];let be;e[144]!==t?(be=t("settings.preferences.toolApprovalAuto"),e[144]=t,e[145]=be):be=e[145];let je;e[146]!==be?(je=s.jsx("span",{className:"font-medium",children:be}),e[146]=be,e[147]=je):je=e[147];let ye;e[148]!==t?(ye=t("settings.preferences.toolApprovalAutoDescription"),e[148]=t,e[149]=ye):ye=e[149];let we;e[150]!==ye?(we=s.jsx("span",{className:"text-xs text-muted-foreground",children:ye}),e[150]=ye,e[151]=we):we=e[151];let Ne;e[152]!==je||e[153]!==we?(Ne=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[je,we]}),e[152]=je,e[153]=we,e[154]=Ne):Ne=e[154];let _e;e[155]!==ve||e[156]!==Ne?(_e=s.jsx($e,{value:"auto",textValue:ve,children:Ne}),e[155]=ve,e[156]=Ne,e[157]=_e):_e=e[157];let Se;e[158]!==xe||e[159]!==_e?(Se=s.jsxs(qe,{children:[xe,_e]}),e[158]=xe,e[159]=_e,e[160]=Se):Se=e[160];let Ae;e[161]!==l.toolApprovalLevel||e[162]!==oe||e[163]!==fe||e[164]!==Se?(Ae=s.jsxs(Be,{value:Ze,onValueChange:oe,children:[fe,Se]}),e[161]=l.toolApprovalLevel,e[162]=oe,e[163]=fe,e[164]=Se,e[165]=Ae):Ae=e[165];let Ce;e[166]!==ne||e[167]!==re||e[168]!==Ae?(Ce=s.jsx(T,{title:ne,description:re,action:Ae}),e[166]=ne,e[167]=re,e[168]=Ae,e[169]=Ce):Ce=e[169];let ke;e[170]!==N||e[171]!==D||e[172]!==B||e[173]!==J||e[174]!==ie||e[175]!==Ce?(ke=s.jsxs(Xe,{children:[N,D,B,J,ie,Ce]}),e[170]=N,e[171]=D,e[172]=B,e[173]=J,e[174]=ie,e[175]=Ce,e[176]=ke):ke=e[176];let Re;return e[177]!==m||e[178]!==ke?(Re=s.jsx(Ye,{title:m,children:ke}),e[177]=m,e[178]=ke,e[179]=Re):Re=e[179],Re}function Wt(){M("preferences_sounds_previewed"),At(Ct.dataUri).catch(Gt)}function Gt(){}function Kt(e){return{...e,enableSounds:!e.enableSounds}}function Yt(e){return s.jsx($e,{value:e.value,textValue:e.label,children:e.label},e.value)}function Xt(e){return{...e,enableNotifications:!1}}function Qt(){const e=O.c(8),t=De();let l;e[0]!==t?(l=t("settings.title"),e[0]=t,e[1]=l):l=e[1];let a;e[2]!==l?(a=s.jsx(Ee.Title,{children:l}),e[2]=l,e[3]=a):a=e[3];let i,o;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Bt,{}),o=s.jsx(Ht,{}),e[4]=i,e[5]=o):(i=e[4],o=e[5]);let r;return e[6]!==a?(r=s.jsx(Ee,{children:s.jsx(Ee.Content,{children:s.jsx(Ee.Container,{children:s.jsxs(st,{children:[a,i,o]})})})}),e[6]=a,e[7]=r):r=e[7],r}function xs(){const e=O.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Qt,{}),e[0]=t):t=e[0],t}export{xs as default};
1
+ import{c as O,b as De,o as Je,m as et,K as Ke,a as Ue,t as R,l as ze,j as s,r as I,B as Oe,h as tt,n as Ee,fo as st,at,aU as lt,x as it,q as M,ef as T,ed as Ye,ee as Xe}from"./index-BOGZM7Pw.js";import{A as nt}from"./avatar-Bpp_lL_f.js";import{D as rt,b as ot,c as ct,d as ft,h as dt,e as ut}from"./dialog-CwJ0Tacd.js";import{T as pt,a as mt,R as gt,b as ht}from"./index-Dl3JXElC.js";import{s as xt}from"./Trash01-BA-bFjuS.js";import{i as vt}from"./Upload01-C13aB89v.js";import{S as Fe}from"./switch-Ctdc8it1.js";import{d as qe,S as Be,c as $e,b as He}from"./select-CGC5E9nf.js";import{T as Ie,a as bt}from"./toggle-group-BUS82Kqf.js";import{I as jt}from"./input-C0ZWiiGy.js";import{i as yt}from"./Monitor01-tvCvi4o_.js";import{n as wt,a as Nt,i as _t}from"./Sun-Bl8Ky_if.js";import{u as St}from"./use-debounced-autosave-D58XDw_5.js";import{p as At,q as Ct}from"./question-004-sINsf4GQ.js";import"./User01-B42bcRzQ.js";import"./X-BdtW9stL.js";import"./index-0glLJTM3.js";import"./Check-CcPSzxsY.js";import"./ChevronUp-C9klasvw.js";const kt=2*1024*1024,Ut=["image/png","image/jpeg","image/gif","image/webp"];async function Dt(e){try{return(await e.json()).error??""}catch{return""}}async function Me(e){if(!e.ok)throw new Error(await Dt(e));return e}function Pt(e){const t=O.c(3);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=Ke.userAvatars(),t[0]=l):l=t[0];let a;return t[1]!==e?(a={queryKey:l,enabled:e,queryFn:zt},t[1]=e,t[2]=a):a=t[2],et(a)}async function zt(){return(await(await Me(await fetch("/api/_users/avatars"))).json()).avatars}function Mt(){const e=O.c(22),t=De(),l=Je();let a;e[0]!==l?(a=async()=>{await Promise.all([l.invalidateQueries({queryKey:Ke.userAvatars()}),Ue.getSession({query:{disableCookieCache:!0}})])},e[0]=l,e[1]=a):a=e[1];const i=a;let o;e[2]!==i||e[3]!==t?(o=async(f,b)=>{try{return await f(),await i(),R.success(b),!0}catch(j){const x=j;return R.error(x instanceof Error&&x.message?x.message:t("settings.profile.avatarUploadError")),!1}},e[2]=i,e[3]=t,e[4]=o):o=e[4];const r=o;let p;e[5]!==t||e[6]!==r?(p=async f=>{let b=null;return await r(async()=>{b=(await(await Me(await fetch("/api/_users/avatar",{method:"POST",headers:{"content-type":f.type||"image/webp"},body:f}))).json()).url,await Ue.updateUser({image:b})},t("settings.profile.avatarUpdated"))?b:null},e[5]=t,e[6]=r,e[7]=p):p=e[7];const m=p;let h;e[8]!==t||e[9]!==r?(h=f=>r(async()=>{const b=await Me(await fetch("/api/_users/avatar/select",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:f})})),{url:j}=await b.json();await Ue.updateUser({image:j})},t("settings.profile.avatarUpdated")),e[8]=t,e[9]=r,e[10]=h):h=e[10];const d=h;let _;e[11]!==t||e[12]!==r?(_=f=>r(async()=>{await Me(await fetch(`/api/_users/avatar?path=${encodeURIComponent(f)}`,{method:"DELETE"}))},t("settings.profile.avatarDeleted")),e[11]=t,e[12]=r,e[13]=_):_=e[13];const g=_;let c;e[14]!==t||e[15]!==r?(c=()=>r(Tt,t("settings.profile.avatarRemoved")),e[14]=t,e[15]=r,e[16]=c):c=e[16];const v=c;let u;return e[17]!==g||e[18]!==v||e[19]!==d||e[20]!==m?(u={uploadAvatar:m,selectAvatar:d,deleteStoredAvatar:g,removeAvatar:v},e[17]=g,e[18]=v,e[19]=d,e[20]=m,e[21]=u):u=e[21],u}async function Tt(){await Ue.updateUser({image:null}),await Me(await fetch("/api/_users/avatar",{method:"DELETE"}))}function Rt(e){const t=O.c(26);let l,a,i,o,r,p;t[0]!==e?({className:l,defaultValue:a,value:p,min:o,max:r,...i}=e,t[0]=e,t[1]=l,t[2]=a,t[3]=i,t[4]=o,t[5]=r,t[6]=p):(l=t[1],a=t[2],i=t[3],o=t[4],r=t[5],p=t[6]);const m=o===void 0?0:o,h=r===void 0?100:r;let d;t[7]!==a||t[8]!==h||t[9]!==m||t[10]!==p?(d=Array.isArray(p)?p:Array.isArray(a)?a:[m,h],t[7]=a,t[8]=h,t[9]=m,t[10]=p,t[11]=d):d=t[11];const _=d;let g;t[12]!==l?(g=ze("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",l),t[12]=l,t[13]=g):g=t[13];let c;t[14]===Symbol.for("react.memo_cache_sentinel")?(c=ze("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),t[14]=c):c=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(pt,{"data-slot":"slider-track",className:c,children:s.jsx(mt,{"data-slot":"slider-range",className:ze("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),t[15]=v):v=t[15];let u;t[16]!==_.length?(u=Array.from({length:_.length},Et),t[16]=_.length,t[17]=u):u=t[17];let f;return t[18]!==a||t[19]!==h||t[20]!==m||t[21]!==i||t[22]!==g||t[23]!==u||t[24]!==p?(f=s.jsxs(gt,{"data-slot":"slider",defaultValue:a,value:p,min:m,max:h,className:g,...i,children:[v,u]}),t[18]=a,t[19]=h,t[20]=m,t[21]=i,t[22]=g,t[23]=u,t[24]=p,t[25]=f):f=t[25],f}function Et(e,t){return s.jsx(ht,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t)}function Ve(e){return Math.max(e.viewport/e.imageWidth,e.viewport/e.imageHeight)}function Ot(e){const t=Ve(e)*e.zoom;return{x:Math.max(0,(e.imageWidth*t-e.viewport)/2),y:Math.max(0,(e.imageHeight*t-e.viewport)/2)}}function Qe(e){const t=Ot(e);return{x:Math.min(t.x,Math.max(-t.x,e.offset.x)),y:Math.min(t.y,Math.max(-t.y,e.offset.y))}}function Ft(e){const t=Ve(e)*e.zoom,l=Qe(e),a=e.viewport/t,i=e.imageWidth/2-a/2-l.x/t,o=e.imageHeight/2-a/2-l.y/t;return{sx:Math.min(Math.max(0,i),Math.max(0,e.imageWidth-a)),sy:Math.min(Math.max(0,o),Math.max(0,e.imageHeight-a)),size:a}}function It(e,t){return Math.max(1,Math.round(Math.min(t,e.size)))}const Le=288,Pe=1,We=4;function Lt(e){return new Promise((t,l)=>{const a=URL.createObjectURL(e),i=new Image;i.onload=()=>t({element:i,url:a,width:i.naturalWidth,height:i.naturalHeight}),i.onerror=()=>{URL.revokeObjectURL(a),l(new Error("decode failed"))},i.src=a})}function $t(e,t,l){const a=Ft(t),i=It(a,l),o=document.createElement("canvas");o.width=i,o.height=i;const r=o.getContext("2d");return r?(r.drawImage(e.element,a.sx,a.sy,a.size,a.size,0,0,i,i),new Promise(p=>{o.toBlob(m=>p(m),"image/webp",.92)})):Promise.resolve(null)}function Vt({open:e,onOpenChange:t,title:l,description:a,shape:i="circle",maxOutputSize:o=512,accept:r,maxBytes:p,onUpload:m,gallery:h}){const d=De(),_=I.useRef(null),g=I.useRef(null),[c,v]=I.useState(null),[u,f]=I.useState(Pe),[b,j]=I.useState({x:0,y:0}),[x,w]=I.useState(!1),A=i==="circle"?"rounded-full":"rounded-xl";function y(){c&&URL.revokeObjectURL(c.url),v(null),f(Pe),j({x:0,y:0})}function N(){y(),t(!1)}async function P(n){if(!r.includes(n.type)){R.error(d("imageUpload.unsupportedType"));return}if(n.size>p){R.error(d("imageUpload.tooLarge",{max:String(Math.round(p/(1024*1024)))}));return}try{y(),v(await Lt(n))}catch{R.error(d("imageUpload.decodeFailed"))}}const C=c&&{imageWidth:c.width,imageHeight:c.height,viewport:Le,zoom:u,offset:b},k=C?Qe(C):{x:0,y:0},U=C?Ve(C)*u:1;async function E(){if(!(!c||!C)){w(!0);try{const n=await $t(c,C,o);if(!n){R.error(d("imageUpload.encodeFailed"));return}await m(n)&&N()}finally{w(!1)}}}async function F(n){w(!0);try{await n}finally{w(!1)}}return s.jsx(rt,{open:e,onOpenChange:n=>n?t(!0):N(),children:s.jsxs(ot,{className:"sm:max-w-[26rem]",children:[s.jsxs(ct,{children:[s.jsx(ft,{children:l}),a?s.jsx(dt,{children:a}):null]}),c&&C?s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx("div",{className:ze("relative overflow-hidden bg-muted touch-none cursor-grab active:cursor-grabbing",A),style:{width:Le,height:Le},onPointerDown:n=>{g.current={x:n.clientX-k.x,y:n.clientY-k.y},n.currentTarget.setPointerCapture(n.pointerId)},onPointerMove:n=>{const D=g.current;D&&j({x:n.clientX-D.x,y:n.clientY-D.y})},onPointerUp:n=>{g.current=null,n.currentTarget.releasePointerCapture(n.pointerId)},onPointerCancel:()=>{g.current=null},onWheel:n=>{const D=u-n.deltaY*.002;f(Math.min(We,Math.max(Pe,D)))},children:s.jsx("img",{src:c.url,alt:"",draggable:!1,className:"absolute left-1/2 top-1/2 max-w-none select-none",style:{width:c.width*U,height:c.height*U,transform:`translate(calc(-50% + ${k.x}px), calc(-50% + ${k.y}px))`}})}),s.jsxs("div",{className:"flex w-full items-center gap-3 px-1",children:[s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:d("imageUpload.zoom")}),s.jsx(Rt,{value:[u],min:Pe,max:We,step:.01,onValueChange:([n])=>f(n??Pe),"aria-label":d("imageUpload.zoom")})]})]}):s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("button",{type:"button",onClick:()=>_.current?.click(),className:"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border py-10 text-sm text-muted-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[s.jsx(vt,{className:"size-5"}),d("imageUpload.choose")]}),h&&h.items.length>0?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:d("imageUpload.recent")}),s.jsx("div",{className:"flex flex-wrap gap-2",children:h.items.map(n=>s.jsxs("div",{className:"group relative",children:[s.jsx("button",{type:"button",disabled:x,onClick:()=>{F(h.onSelect(n.path)).then(N)},"aria-label":d("imageUpload.usePicture"),className:ze("size-14 overflow-hidden border transition-opacity hover:opacity-80 disabled:opacity-50",A,n.current?"border-primary ring-2 ring-primary/40":"border-border"),children:s.jsx("img",{src:n.url,alt:"",className:"size-full object-cover"})}),h.onDelete&&!n.current?s.jsx("button",{type:"button",disabled:x,onClick:()=>{F(h.onDelete(n.path))},"aria-label":d("imageUpload.deletePicture"),className:"absolute -right-1 -top-1 hidden rounded-lg bg-background p-1 text-muted-foreground shadow-sm hover:text-destructive group-hover:block",children:s.jsx(xt,{className:"size-3"})}):null]},n.path))})]}):null]}),s.jsx("input",{ref:_,type:"file",accept:r.join(","),className:"hidden",onChange:n=>{const D=n.target.files?.[0];n.target.value="",D&&P(D)}}),s.jsx(ut,{children:c?s.jsxs(s.Fragment,{children:[s.jsx(Oe,{variant:"ghost",onClick:y,disabled:x,children:d("imageUpload.back")}),s.jsxs(Oe,{onClick:()=>{E()},disabled:x,children:[x?s.jsx(tt,{size:"sm"}):null,d("imageUpload.save")]})]}):s.jsx(Oe,{variant:"ghost",onClick:N,children:d("imageUpload.cancel")})})]})})}const Ge=[{value:"en",label:"English"},{value:"pt-BR",label:"Português (Brasil)"}];function qt(e){const t=O.c(36),{url:l,fallback:a}=e,i=De(),[o,r]=I.useState(!1),{uploadAvatar:p,selectAvatar:m,deleteStoredAvatar:h,removeAvatar:d}=Mt(),_=Pt(o);let g;t[0]!==d||t[1]!==i||t[2]!==l?(g=l?s.jsx(Oe,{variant:"ghost",size:"sm",onClick:()=>{d()},children:i("settings.profile.avatarRemove")}):null,t[0]=d,t[1]=i,t[2]=l,t[3]=g):g=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>r(!0),t[4]=c):c=t[4];let v;t[5]!==i?(v=i("settings.profile.avatarUpload"),t[5]=i,t[6]=v):v=t[6];let u;t[7]!==i?(u=i("settings.profile.avatarUpload"),t[7]=i,t[8]=u):u=t[8];let f;t[9]!==a||t[10]!==l?(f=s.jsx(nt,{url:l,fallback:a,shape:"circle",size:"base"}),t[9]=a,t[10]=l,t[11]=f):f=t[11];let b;t[12]!==v||t[13]!==u||t[14]!==f?(b=s.jsx("button",{type:"button",onClick:c,"aria-label":v,title:u,className:"rounded-full transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:f}),t[12]=v,t[13]=u,t[14]=f,t[15]=b):b=t[15];let j;t[16]!==i?(j=i("settings.profile.avatarDialogTitle"),t[16]=i,t[17]=j):j=t[17];let x;t[18]!==i?(x=i("settings.profile.avatarDialogDescription"),t[18]=i,t[19]=x):x=t[19];let w;t[20]!==_.data?(w=_.data??[],t[20]=_.data,t[21]=w):w=t[21];let A;t[22]!==h||t[23]!==m||t[24]!==w?(A={items:w,onSelect:m,onDelete:h},t[22]=h,t[23]=m,t[24]=w,t[25]=A):A=t[25];let y;t[26]!==o||t[27]!==A||t[28]!==j||t[29]!==x||t[30]!==p?(y=s.jsx(Vt,{open:o,onOpenChange:r,title:j,description:x,shape:"circle",accept:Ut,maxBytes:kt,onUpload:p,gallery:A}),t[26]=o,t[27]=A,t[28]=j,t[29]=x,t[30]=p,t[31]=y):y=t[31];let N;return t[32]!==g||t[33]!==y||t[34]!==b?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[g,b,y]}),t[32]=g,t[33]=y,t[34]=b,t[35]=N):N=t[35],N}function Bt(){const e=O.c(36),t=De(),{data:l,isPending:a}=Ue.useSession(),i=l?.user,o=i?.image,r=i?.name??"";let p;e[0]!==r?(p={values:{name:r}},e[0]=r,e[1]=p):p=e[1];const m=at(p);let h;e[2]!==m||e[3]!==t?(h={save:async()=>{const C=m.control._formState.dirtyFields;if(Object.keys(C).length===0)return;const k=m.getValues(),U=m.control._defaultValues;m.reset(k,{keepValues:!0});try{await Ue.updateUser({name:k.name}),M("profile_updated",{fields:["name"]}),R.success(t("settings.profile.updateSuccess"))}catch{m.reset(U,{keepValues:!0}),R.error(t("settings.profile.updateError"))}}},e[2]=m,e[3]=t,e[4]=h):h=e[4];const{schedule:d,flush:_}=St(h);if(a)return null;let g;e[5]!==t?(g=t("settings.profile.avatar"),e[5]=t,e[6]=g):g=e[6];const c=i?.name??"U";let v;e[7]!==c||e[8]!==o?(v=s.jsx(qt,{url:o,fallback:c}),e[7]=c,e[8]=o,e[9]=v):v=e[9];let u;e[10]!==g||e[11]!==v?(u=s.jsx(T,{title:g,action:v}),e[10]=g,e[11]=v,e[12]=u):u=e[12];let f;e[13]!==t?(f=t("settings.profile.displayName"),e[13]=t,e[14]=f):f=e[14];let b;e[15]!==_||e[16]!==d||e[17]!==t?(b=C=>{const{field:k}=C;return s.jsx(jt,{id:"display-name",...k,onChange:U=>{k.onChange(U),d()},onBlur:()=>{k.onBlur(),_()},onKeyDown:U=>{U.key==="Enter"&&_()},placeholder:t("settings.profile.displayNamePlaceholder"),className:"w-[280px]"})},e[15]=_,e[16]=d,e[17]=t,e[18]=b):b=e[18];let j;e[19]!==m.control||e[20]!==b?(j=s.jsx(lt,{control:m.control,name:"name",render:b}),e[19]=m.control,e[20]=b,e[21]=j):j=e[21];let x;e[22]!==f||e[23]!==j?(x=s.jsx(T,{title:f,action:j}),e[22]=f,e[23]=j,e[24]=x):x=e[24];let w;e[25]!==t?(w=t("settings.profile.email"),e[25]=t,e[26]=w):w=e[26];const A=i?.email;let y;e[27]!==A?(y=s.jsx("span",{className:"text-sm text-muted-foreground",children:A}),e[27]=A,e[28]=y):y=e[28];let N;e[29]!==w||e[30]!==y?(N=s.jsx(T,{title:w,action:y}),e[29]=w,e[30]=y,e[31]=N):N=e[31];let P;return e[32]!==x||e[33]!==N||e[34]!==u?(P=s.jsx(Ye,{children:s.jsxs(Xe,{children:[u,x,N]})}),e[32]=x,e[33]=N,e[34]=u,e[35]=P):P=e[35],P}function Ht(){const e=O.c(180),t=De(),[l,a]=it();let i;e[0]!==a||e[1]!==t?(i=async S=>{if(S&&await Notification.requestPermission()!=="granted"){M("preferences_notifications_permission_denied"),R.error(t("settings.preferences.notificationsDenied")),a(Xt);return}M("preferences_notifications_toggled",{enabled:S}),a(z=>({...z,enableNotifications:S}))},e[0]=a,e[1]=t,e[2]=i):i=e[2];const o=i;let r;e[3]!==a?(r=S=>{M("preferences_project_first_nav_toggled",{enabled:S}),a(z=>({...z,projectFirstNav:S}))},e[3]=a,e[4]=r):r=e[4];const p=r;let m;e[5]!==t?(m=t("settings.preferences.title"),e[5]=t,e[6]=m):m=e[6];let h;e[7]!==t?(h=t("settings.preferences.theme"),e[7]=t,e[8]=h):h=e[8];let d;e[9]!==t?(d=t("settings.preferences.themeDescription"),e[9]=t,e[10]=d):d=e[10];const _=l.theme;let g;e[11]!==a?(g=S=>{S&&(M("preferences_theme_changed",{to_value:S}),a(z=>({...z,theme:S})))},e[11]=a,e[12]=g):g=e[12];let c;e[13]!==t?(c=t("settings.preferences.themeLight"),e[13]=t,e[14]=c):c=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(wt,{size:14}),e[15]=v):v=e[15];let u;e[16]!==c?(u=s.jsx(Ie,{value:"light",className:"rounded-lg data-[variant=outline]:border-l","aria-label":c,children:v}),e[16]=c,e[17]=u):u=e[17];let f;e[18]!==t?(f=t("settings.preferences.themeDark"),e[18]=t,e[19]=f):f=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Nt,{size:14}),e[20]=b):b=e[20];let j;e[21]!==f?(j=s.jsx(Ie,{value:"dark",className:"rounded-lg data-[variant=outline]:border-l","aria-label":f,children:b}),e[21]=f,e[22]=j):j=e[22];let x;e[23]!==t?(x=t("settings.preferences.themeSystem"),e[23]=t,e[24]=x):x=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(yt,{size:14}),e[25]=w):w=e[25];let A;e[26]!==x?(A=s.jsx(Ie,{value:"system",className:"rounded-lg data-[variant=outline]:border-l","aria-label":x,children:w}),e[26]=x,e[27]=A):A=e[27];let y;e[28]!==l.theme||e[29]!==j||e[30]!==A||e[31]!==g||e[32]!==u?(y=s.jsxs(bt,{type:"single",size:"sm",variant:"outline",className:"gap-2 data-[variant=outline]:shadow-none",value:_,onValueChange:g,children:[u,j,A]}),e[28]=l.theme,e[29]=j,e[30]=A,e[31]=g,e[32]=u,e[33]=y):y=e[33];let N;e[34]!==y||e[35]!==h||e[36]!==d?(N=s.jsx(T,{title:h,description:d,action:y}),e[34]=y,e[35]=h,e[36]=d,e[37]=N):N=e[37];let P;e[38]!==t?(P=t("settings.preferences.language"),e[38]=t,e[39]=P):P=e[39];let C;e[40]!==t?(C=t("settings.preferences.languageDescription"),e[40]=t,e[41]=C):C=e[41];let k;e[42]!==a?(k=S=>{M("preferences_language_changed",{to_value:S}),a(z=>({...z,language:S}))},e[42]=a,e[43]=k):k=e[43];let U;e[44]!==l.language?(U=Ge.find(S=>S.value===l.language)?.label,e[44]=l.language,e[45]=U):U=e[45];let E;e[46]!==U?(E=s.jsx(He,{className:"w-44 h-7 text-xs",children:s.jsx("span",{children:U})}),e[46]=U,e[47]=E):E=e[47];let F;e[48]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(qe,{children:Ge.map(Yt)}),e[48]=F):F=e[48];let n;e[49]!==l.language||e[50]!==k||e[51]!==E?(n=s.jsxs(Be,{value:l.language,onValueChange:k,children:[E,F]}),e[49]=l.language,e[50]=k,e[51]=E,e[52]=n):n=e[52];let D;e[53]!==P||e[54]!==C||e[55]!==n?(D=s.jsx(T,{title:P,description:C,action:n}),e[53]=P,e[54]=C,e[55]=n,e[56]=D):D=e[56];let L;e[57]!==t?(L=t("settings.preferences.notifications"),e[57]=t,e[58]=L):L=e[58];let $;e[59]!==t?($=t("settings.preferences.notificationsDescription"),e[59]=t,e[60]=$):$=e[60];let V;e[61]!==o||e[62]!==l.enableNotifications?(V=typeof Notification<"u"?()=>o(!l.enableNotifications):void 0,e[61]=o,e[62]=l.enableNotifications,e[63]=V):V=e[63];let q;e[64]!==o||e[65]!==l.enableNotifications?(q=s.jsx(Fe,{disabled:typeof Notification>"u",checked:l.enableNotifications,onCheckedChange:o}),e[64]=o,e[65]=l.enableNotifications,e[66]=q):q=e[66];let B;e[67]!==L||e[68]!==$||e[69]!==V||e[70]!==q?(B=s.jsx(T,{title:L,description:$,onClick:V,action:q}),e[67]=L,e[68]=$,e[69]=V,e[70]=q,e[71]=B):B=e[71];let H;e[72]!==t?(H=t("settings.preferences.sounds"),e[72]=t,e[73]=H):H=e[73];let W;e[74]!==t?(W=t("settings.preferences.soundsDescription"),e[74]=t,e[75]=W):W=e[75];let G;e[76]!==l.enableSounds||e[77]!==a?(G=()=>{M("preferences_sounds_toggled",{enabled:!l.enableSounds}),a(Kt)},e[76]=l.enableSounds,e[77]=a,e[78]=G):G=e[78];let K;e[79]!==t?(K=t("settings.preferences.soundsPreview"),e[79]=t,e[80]=K):K=e[80];let Te;e[81]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(_t,{size:11}),e[81]=Te):Te=e[81];let Y;e[82]!==K?(Y=s.jsx("button",{type:"button","aria-label":K,onClick:Wt,className:"size-6 flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer rounded-lg",children:Te}),e[82]=K,e[83]=Y):Y=e[83];let X;e[84]!==a?(X=S=>{M("preferences_sounds_toggled",{enabled:S}),a(z=>({...z,enableSounds:S}))},e[84]=a,e[85]=X):X=e[85];let Q;e[86]!==l.enableSounds||e[87]!==X?(Q=s.jsx(Fe,{checked:l.enableSounds,onCheckedChange:X}),e[86]=l.enableSounds,e[87]=X,e[88]=Q):Q=e[88];let Z;e[89]!==Y||e[90]!==Q?(Z=s.jsxs("div",{className:"flex items-center gap-2",children:[Y,Q]}),e[89]=Y,e[90]=Q,e[91]=Z):Z=e[91];let J;e[92]!==H||e[93]!==W||e[94]!==G||e[95]!==Z?(J=s.jsx(T,{title:H,description:W,onClick:G,action:Z}),e[92]=H,e[93]=W,e[94]=G,e[95]=Z,e[96]=J):J=e[96];let ee;e[97]!==t?(ee=t("settings.preferences.projectFirstNav"),e[97]=t,e[98]=ee):ee=e[98];let te;e[99]!==t?(te=t("settings.preferences.projectFirstNavDescription"),e[99]=t,e[100]=te):te=e[100];let se;e[101]!==p||e[102]!==l.projectFirstNav?(se=()=>p(!l.projectFirstNav),e[101]=p,e[102]=l.projectFirstNav,e[103]=se):se=e[103];let ae;e[104]!==t?(ae=t("settings.preferences.projectFirstNav"),e[104]=t,e[105]=ae):ae=e[105];let le;e[106]!==p||e[107]!==l.projectFirstNav||e[108]!==ae?(le=s.jsx(Fe,{"aria-label":ae,checked:l.projectFirstNav,onCheckedChange:p}),e[106]=p,e[107]=l.projectFirstNav,e[108]=ae,e[109]=le):le=e[109];let ie;e[110]!==ee||e[111]!==te||e[112]!==se||e[113]!==le?(ie=s.jsx(T,{title:ee,description:te,onClick:se,action:le}),e[110]=ee,e[111]=te,e[112]=se,e[113]=le,e[114]=ie):ie=e[114];let ne;e[115]!==t?(ne=t("settings.preferences.toolApproval"),e[115]=t,e[116]=ne):ne=e[116];let re;e[117]!==t?(re=t("settings.preferences.toolApprovalDescription"),e[117]=t,e[118]=re):re=e[118];const Ze=l.toolApprovalLevel;let oe;e[119]!==a?(oe=S=>{M("preferences_tool_approval_changed",{to_value:S}),a(z=>({...z,toolApprovalLevel:S}))},e[119]=a,e[120]=oe):oe=e[120];let ce;e[121]!==l.toolApprovalLevel||e[122]!==t?(ce={readonly:t("settings.preferences.toolApprovalAsk"),auto:t("settings.preferences.toolApprovalAuto")}[l.toolApprovalLevel]??t("settings.preferences.toolApprovalAsk"),e[121]=l.toolApprovalLevel,e[122]=t,e[123]=ce):ce=e[123];let fe;e[124]!==ce?(fe=s.jsx(He,{className:"w-36 h-7 text-xs",children:s.jsx("span",{children:ce})}),e[124]=ce,e[125]=fe):fe=e[125];let de;e[126]!==t?(de=t("settings.preferences.toolApprovalAsk"),e[126]=t,e[127]=de):de=e[127];let ue;e[128]!==t?(ue=t("settings.preferences.toolApprovalAsk"),e[128]=t,e[129]=ue):ue=e[129];let pe;e[130]!==ue?(pe=s.jsx("span",{className:"font-medium",children:ue}),e[130]=ue,e[131]=pe):pe=e[131];let me;e[132]!==t?(me=t("settings.preferences.toolApprovalAskDescription"),e[132]=t,e[133]=me):me=e[133];let ge;e[134]!==me?(ge=s.jsx("span",{className:"text-xs text-muted-foreground",children:me}),e[134]=me,e[135]=ge):ge=e[135];let he;e[136]!==pe||e[137]!==ge?(he=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[pe,ge]}),e[136]=pe,e[137]=ge,e[138]=he):he=e[138];let xe;e[139]!==de||e[140]!==he?(xe=s.jsx($e,{value:"readonly",textValue:de,children:he}),e[139]=de,e[140]=he,e[141]=xe):xe=e[141];let ve;e[142]!==t?(ve=t("settings.preferences.toolApprovalAuto"),e[142]=t,e[143]=ve):ve=e[143];let be;e[144]!==t?(be=t("settings.preferences.toolApprovalAuto"),e[144]=t,e[145]=be):be=e[145];let je;e[146]!==be?(je=s.jsx("span",{className:"font-medium",children:be}),e[146]=be,e[147]=je):je=e[147];let ye;e[148]!==t?(ye=t("settings.preferences.toolApprovalAutoDescription"),e[148]=t,e[149]=ye):ye=e[149];let we;e[150]!==ye?(we=s.jsx("span",{className:"text-xs text-muted-foreground",children:ye}),e[150]=ye,e[151]=we):we=e[151];let Ne;e[152]!==je||e[153]!==we?(Ne=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[je,we]}),e[152]=je,e[153]=we,e[154]=Ne):Ne=e[154];let _e;e[155]!==ve||e[156]!==Ne?(_e=s.jsx($e,{value:"auto",textValue:ve,children:Ne}),e[155]=ve,e[156]=Ne,e[157]=_e):_e=e[157];let Se;e[158]!==xe||e[159]!==_e?(Se=s.jsxs(qe,{children:[xe,_e]}),e[158]=xe,e[159]=_e,e[160]=Se):Se=e[160];let Ae;e[161]!==l.toolApprovalLevel||e[162]!==oe||e[163]!==fe||e[164]!==Se?(Ae=s.jsxs(Be,{value:Ze,onValueChange:oe,children:[fe,Se]}),e[161]=l.toolApprovalLevel,e[162]=oe,e[163]=fe,e[164]=Se,e[165]=Ae):Ae=e[165];let Ce;e[166]!==ne||e[167]!==re||e[168]!==Ae?(Ce=s.jsx(T,{title:ne,description:re,action:Ae}),e[166]=ne,e[167]=re,e[168]=Ae,e[169]=Ce):Ce=e[169];let ke;e[170]!==N||e[171]!==D||e[172]!==B||e[173]!==J||e[174]!==ie||e[175]!==Ce?(ke=s.jsxs(Xe,{children:[N,D,B,J,ie,Ce]}),e[170]=N,e[171]=D,e[172]=B,e[173]=J,e[174]=ie,e[175]=Ce,e[176]=ke):ke=e[176];let Re;return e[177]!==m||e[178]!==ke?(Re=s.jsx(Ye,{title:m,children:ke}),e[177]=m,e[178]=ke,e[179]=Re):Re=e[179],Re}function Wt(){M("preferences_sounds_previewed"),At(Ct.dataUri).catch(Gt)}function Gt(){}function Kt(e){return{...e,enableSounds:!e.enableSounds}}function Yt(e){return s.jsx($e,{value:e.value,textValue:e.label,children:e.label},e.value)}function Xt(e){return{...e,enableNotifications:!1}}function Qt(){const e=O.c(8),t=De();let l;e[0]!==t?(l=t("settings.title"),e[0]=t,e[1]=l):l=e[1];let a;e[2]!==l?(a=s.jsx(Ee.Title,{children:l}),e[2]=l,e[3]=a):a=e[3];let i,o;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Bt,{}),o=s.jsx(Ht,{}),e[4]=i,e[5]=o):(i=e[4],o=e[5]);let r;return e[6]!==a?(r=s.jsx(Ee,{children:s.jsx(Ee.Content,{children:s.jsx(Ee.Container,{children:s.jsxs(st,{children:[a,i,o]})})})}),e[6]=a,e[7]=r):r=e[7],r}function xs(){const e=O.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Qt,{}),e[0]=t):t=e[0],t}export{xs as default};