decocms 4.365.0 → 4.365.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/dist/client/assets/{AlertCircle-bl0yU7gy.js → AlertCircle-BPZWT1gc.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CHPDNuDf.js → AreaChart-CxCPUfZu.js} +3 -3
  3. package/dist/client/assets/{ArrowLeft-CpbUCYpB.js → ArrowLeft-c3HIgil5.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-CkVUmxaa.js → ArrowRight-BHzAyFwu.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BQQdFypM.js → ArrowUp-DywwLYcR.js} +1 -1
  6. package/dist/client/assets/{Check-BJaMheL7.js → Check-PyGET9iL.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-BNNyBNMK.js → CheckCircle-4Be5K85Z.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-2Ti1evDh.js → ChevronRight-vY_5m8VB.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-Cp-tcsrs.js → ChevronUp-B9QGJbr0.js} +1 -1
  10. package/dist/client/assets/{Copy01-BrL9ZrVF.js → Copy01-BbtQlTnV.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-_mwanoIZ.js → CreditCard01-2jrzrshR.js} +1 -1
  12. package/dist/client/assets/{Database01-Dm_V08L3.js → Database01-B8rfUUUF.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-B8slOnrw.js → DotsVertical-zFAA_as9.js} +1 -1
  14. package/dist/client/assets/{Download01-Bl2-HJHJ.js → Download01-CSiLQIib.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-nVgseQIz.js → ErrorBarContext-D7xML5iT.js} +1 -1
  16. package/dist/client/assets/{Eye-B_BMkWWc.js → Eye-BRXlESxS.js} +1 -1
  17. package/dist/client/assets/{File02-3fotvfyl.js → File02-D4JZqTxD.js} +1 -1
  18. package/dist/client/assets/{GitBranch01-Dr0NRbj6.js → GitBranch01-95kZh6WB.js} +1 -1
  19. package/dist/client/assets/{Globe01-DMnQmvOn.js → Globe01-Dej65_H6.js} +1 -1
  20. package/dist/client/assets/{HardDrive-CxNWrsuq.js → HardDrive-DCLQ4vdy.js} +1 -1
  21. package/dist/client/assets/{Image01-DMAKgzzX.js → Image01-Dd-Rx_B5.js} +1 -1
  22. package/dist/client/assets/{Key01-CVfJV98q.js → Key01-CQFO2R8H.js} +1 -1
  23. package/dist/client/assets/{Link01-CKw3sRrv.js → Link01-pGxgI9VT.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-OjBTsG9L.js → LinkExternal01-Jetqi62I.js} +1 -1
  25. package/dist/client/assets/MessageCircle01-D2dDPrBD.js +1 -0
  26. package/dist/client/assets/{Monitor01-Bc6Zvq9B.js → Monitor01-Bw-h-DKp.js} +1 -1
  27. package/dist/client/assets/{Package-DTeqx5ul.js → Package-CF-S4NRB.js} +1 -1
  28. package/dist/client/assets/{Palette-CiXH5EXK.js → Palette-DuCZiZH-.js} +1 -1
  29. package/dist/client/assets/{Play-BPdpqeiE.js → Play-BTJRmkRf.js} +1 -1
  30. package/dist/client/assets/{Plus-kQ9d0PiA.js → Plus-BUGmioCX.js} +1 -1
  31. package/dist/client/assets/Printer-B2Ij2s1c.js +1 -0
  32. package/dist/client/assets/{SearchLg-Cecpe6x9.js → SearchLg-De3yWxzK.js} +1 -1
  33. package/dist/client/assets/{SearchMd-hBr_biLL.js → SearchMd-DanltqT5.js} +1 -1
  34. package/dist/client/assets/{Sector-B0yBxg4a.js → Sector-DqvqR1iU.js} +2 -2
  35. package/dist/client/assets/{Settings02-BqKUeA5H.js → Settings02-C-HNbNsn.js} +1 -1
  36. package/dist/client/assets/{Share07-D8xQrAsX.js → Share07-C4Gw_nzw.js} +1 -1
  37. package/dist/client/assets/{Shield01-Dav77ssu.js → Shield01-7bhnSYVs.js} +1 -1
  38. package/dist/client/assets/{Stars01-DWjpdjKn.js → Stars01-BmtGexbk.js} +1 -1
  39. package/dist/client/assets/{Sun-wxsl7cI_.js → Sun-D5AClOdh.js} +1 -1
  40. package/dist/client/assets/{SwitchHorizontal01-CCraiYIJ.js → SwitchHorizontal01-CCmSX-Ww.js} +1 -1
  41. package/dist/client/assets/{Tool01-E6Rv0Nbs.js → Tool01-C1VYYGhf.js} +1 -1
  42. package/dist/client/assets/{Tool02-Darwb8nP.js → Tool02-A5gv-OOO.js} +1 -1
  43. package/dist/client/assets/{Trash01-BB2ymX9J.js → Trash01-DkwdEhkp.js} +1 -1
  44. package/dist/client/assets/{TrendUp01-PJuAXI74.js → TrendUp01-CQWL_vX5.js} +1 -1
  45. package/dist/client/assets/{Upload01-BtBtAyal.js → Upload01-BlEOH700.js} +1 -1
  46. package/dist/client/assets/{User01-CtDIPHIF.js → User01-C2ILPAHc.js} +1 -1
  47. package/dist/client/assets/{UserSquare-BflxhZ_l.js → UserSquare-DY1wI6ZR.js} +1 -1
  48. package/dist/client/assets/{Users01-9HTYv5bx.js → Users01-bydaoxbh.js} +1 -1
  49. package/dist/client/assets/{Users03-D8RoJqiC.js → Users03-3yW32m45.js} +1 -1
  50. package/dist/client/assets/X-DejWyAyX.js +1 -0
  51. package/dist/client/assets/{XCircle-Dvf0BUKb.js → XCircle-SVZraRfE.js} +1 -1
  52. package/dist/client/assets/{XClose-DPfGLo7I.js → XClose-wkdnmhrB.js} +1 -1
  53. package/dist/client/assets/{Zap-ChgjHdxL.js → Zap-0km1-ru7.js} +1 -1
  54. package/dist/client/assets/{ZoomOut-BAhVAzy1.js → ZoomOut-BA2ZiotX.js} +1 -1
  55. package/dist/client/assets/access-gate-DpZqBld0.js +1 -0
  56. package/dist/client/assets/add-connection-dialog-DB5JJjad.js +1 -0
  57. package/dist/client/assets/agent-analytics-CAHUVirD.js +2 -0
  58. package/dist/client/assets/agent-app-BeMC8z8k.js +1 -0
  59. package/dist/client/assets/agent-assets-DsMv2xEg.js +1 -0
  60. package/dist/client/assets/agent-automation-BY5j9rqa.js +20 -0
  61. package/dist/client/assets/agent-automations-1_XWI0cB.js +1 -0
  62. package/dist/client/assets/agent-connect-sources-CGYs_l_4.js +1 -0
  63. package/dist/client/assets/agent-deck-BqKNWwGC.js +1 -0
  64. package/dist/client/assets/agent-e2e-DSg6pAM6.js +1 -0
  65. package/dist/client/assets/agent-file-QzuIvb2U.js +1 -0
  66. package/dist/client/assets/agent-git-B5SGdxwk.js +3 -0
  67. package/dist/client/assets/agent-hosting-CWM0TAgK.js +1 -0
  68. package/dist/client/assets/agent-icon-BjknPEfN.js +1 -0
  69. package/dist/client/assets/agent-library-file-DOj4Pso1.js +1 -0
  70. package/dist/client/assets/agent-monitor-D0SLtbEO.js +1 -0
  71. package/dist/client/assets/agent-overview-4MzJb6Tv.js +1 -0
  72. package/dist/client/assets/agent-settings-D4SL-PIa.js +1 -0
  73. package/dist/client/assets/agent-site-editor-BDP-vSUl.js +24 -0
  74. package/dist/client/assets/agent-site-editor-code-C2z-Az-Y.js +2 -0
  75. package/dist/client/assets/agent-site-editor-content-JPYekiK_.js +2 -0
  76. package/dist/client/assets/agent-site-editor-preview-CFLjaarK.js +504 -0
  77. package/dist/client/assets/agent-view-Bp9ooHxf.js +1 -0
  78. package/dist/client/assets/agent-view-guard-B7qYW-b3.js +1 -0
  79. package/dist/client/assets/agents-list-h96XaSKk.js +1 -0
  80. package/dist/client/assets/ai-providers-COWdzwzu.js +1 -0
  81. package/dist/client/assets/{alert-DkgzGFz6.js → alert-CvK2RkF3.js} +1 -1
  82. package/dist/client/assets/{alert-dialog-BdwUra4d.js → alert-dialog-CDARhUOh.js} +2 -2
  83. package/dist/client/assets/{api-keys-Bl99t7Nm.js → api-keys-Ba-S9F5Y.js} +1 -1
  84. package/dist/client/assets/api-keys-DeCwNgs3.js +1 -0
  85. package/dist/client/assets/app-editor-CsOLGnt4.js +1 -0
  86. package/dist/client/assets/asset-utils-DQpbxjwd.js +1 -0
  87. package/dist/client/assets/{auth-vfqjjrgv.js → auth-Cyjh0UQp.js} +1 -1
  88. package/dist/client/assets/{auth-catchall-CZ_cFv3z.js → auth-catchall-BbOJ2FpE.js} +1 -1
  89. package/dist/client/assets/{auth-entry-Cp4v6AT2.js → auth-entry-CIc1-YG9.js} +1 -1
  90. package/dist/client/assets/{auth-split-layout-BB-yAg-2.js → auth-split-layout-WGnYlU-M.js} +1 -1
  91. package/dist/client/assets/{authenticate-and-persist-oauth-CpB-R1LO.js → authenticate-and-persist-oauth-Dgc5b4Jr.js} +1 -1
  92. package/dist/client/assets/{automation-list-row-DKusfCau.js → automation-list-row-Dyqat6cE.js} +1 -1
  93. package/dist/client/assets/automation-runs-DkHp_jZr.js +1 -0
  94. package/dist/client/assets/automations-BSGRkynt.js +1 -0
  95. package/dist/client/assets/{autosend-u-W4xgi7.js → autosend-BBoss6Ia.js} +1 -1
  96. package/dist/client/assets/{avatar-BpU54ct-.js → avatar-CO3n6wLC.js} +1 -1
  97. package/dist/client/assets/backoff-8mStPHYB.js +1 -0
  98. package/dist/client/assets/{badge-DJ5ezE5-.js → badge-DUpgRwQu.js} +1 -1
  99. package/dist/client/assets/{block-document-7Ngv587f.js → block-document-CVyeCLBq.js} +3 -3
  100. package/dist/client/assets/blocks-preview-workspace-context-CLQbGv9t.js +1 -0
  101. package/dist/client/assets/{breadcrumb-Dlcs3jWo.js → breadcrumb-FJ1G6kmP.js} +1 -1
  102. package/dist/client/assets/buckets-BTZUX3pR.js +1 -0
  103. package/dist/client/assets/build-improve-prompt-doc-CcAYvBOj.js +2 -0
  104. package/dist/client/assets/bulk-category-panel-9cEfFq4L.js +1 -0
  105. package/dist/client/assets/{calendar-B8BrEMls.js → calendar-Bb8OUNd8.js} +1 -1
  106. package/dist/client/assets/{capability-load-error-CdMFNpdR.js → capability-load-error-Ctg9pY-k.js} +1 -1
  107. package/dist/client/assets/{cards-BfP1wflC.js → cards-CbRL3hJc.js} +1 -1
  108. package/dist/client/assets/category-editor-DLB1OCyq.js +1 -0
  109. package/dist/client/assets/{chart-zbtN9_7R.js → chart-DqNrc8dZ.js} +1 -1
  110. package/dist/client/assets/{chat-context-CD1rWX64.js → chat-context-B40ngn3f.js} +9 -9
  111. package/dist/client/assets/{checkbox-DwVdLA7e.js → checkbox-STVvKX8k.js} +1 -1
  112. package/dist/client/assets/choose-editor-DVdbAy2O.js +1 -0
  113. package/dist/client/assets/claim-phase-copy-0btUuJoC.js +1 -0
  114. package/dist/client/assets/{cli-auth-success-BtBj1xJE.js → cli-auth-success-DmTxFaq5.js} +1 -1
  115. package/dist/client/assets/{client-icons-BcSFyY79.js → client-icons-CR99ZCoE.js} +1 -1
  116. package/dist/client/assets/collapsible-Cf4ZreOo.js +1 -0
  117. package/dist/client/assets/collection-detail-oWaNi-hD.js +1 -0
  118. package/dist/client/assets/collection-display-button-CkKXuKd-.js +1 -0
  119. package/dist/client/assets/{collection-search-Bi-DttH4.js → collection-search-CDaDEv2c.js} +1 -1
  120. package/dist/client/assets/{collection-table-wrapper-DfAhVjGn.js → collection-table-wrapper-B036tBOl.js} +1 -1
  121. package/dist/client/assets/{collection-tabs-BZkkvpP_.js → collection-tabs-CkeFxbT3.js} +1 -1
  122. package/dist/client/assets/{command-cJVGaRa3.js → command-D7YFT70c.js} +1 -1
  123. package/dist/client/assets/{command-palette-store-BNo0UXiS.js → command-palette-store-BcwFt5eE.js} +1 -1
  124. package/dist/client/assets/commerce-onboarding-BcoYZTQG.js +1 -0
  125. package/dist/client/assets/{companion-mcps-section-smAU7jYC.js → companion-mcps-section-CS9qQ8v0.js} +1 -1
  126. package/dist/client/assets/{connect-Bn7h46Ea.js → connect-BM6ZfhOz.js} +2 -2
  127. package/dist/client/assets/connect-layout-De5w9TxQ.js +1 -0
  128. package/dist/client/assets/{connection-card-DCMUv-0w.js → connection-card-kANJRcvf.js} +1 -1
  129. package/dist/client/assets/connection-detail-Ckkh02Py.js +1 -0
  130. package/dist/client/assets/{connection-D6f54N4w.js → connection-di4Fldx3.js} +1 -1
  131. package/dist/client/assets/{connection-form-helpers-BiJdmlDA.js → connection-form-helpers-fWne-kOd.js} +1 -1
  132. package/dist/client/assets/connections-BKm7IMTt.js +1 -0
  133. package/dist/client/assets/{create-organization-dialog-IR2z5bIs.js → create-organization-dialog-BmgLNeEx.js} +1 -1
  134. package/dist/client/assets/decofile-api-BhjpITFN.js +1 -0
  135. package/dist/client/assets/{decopilot-CK3rN_ad.js → decopilot-ClO0uusm.js} +2 -2
  136. package/dist/client/assets/dialog-Dxe0Jgna.js +1 -0
  137. package/dist/client/assets/discover-BdugM7FR.js +1 -0
  138. package/dist/client/assets/domain-settings-Dp-mWih8.js +1 -0
  139. package/dist/client/assets/{download-app-dialog-CNd8ka-x.js → download-app-dialog-lwMMuYsF.js} +1 -1
  140. package/dist/client/assets/{drawer-DsG6Si3V.js → drawer-1GzYkddr.js} +1 -1
  141. package/dist/client/assets/{dropdown-menu-4cRHTbic.js → dropdown-menu-Bws_0K_q.js} +1 -1
  142. package/dist/client/assets/{editor-NTP5Xcj9.js → editor-U5ucetu-.js} +1 -1
  143. package/dist/client/assets/{empty-state-DmTochCH.js → empty-state-BjMIbq91.js} +1 -1
  144. package/dist/client/assets/{empty-state-D86Jkx4H.js → empty-state-C3Z_6q55.js} +1 -1
  145. package/dist/client/assets/{extract-connection-data-B3hIAjiC.js → extract-connection-data-BAjOM4U5.js} +1 -1
  146. package/dist/client/assets/file-explorer-LFC3Ac60.js +2 -0
  147. package/dist/client/assets/{file-preview-BbFH5cdB.js → file-preview-n35lcg8c.js} +1 -1
  148. package/dist/client/assets/{file-share-button-ChoXQdlr.js → file-share-button-D04rfik7.js} +2 -2
  149. package/dist/client/assets/{file-type-icon-DJQFeBpV.js → file-type-icon-C4dI9q_n.js} +1 -1
  150. package/dist/client/assets/{folder-icon-BRLOuEpt.js → folder-icon-pWHmymOf.js} +1 -1
  151. package/dist/client/assets/{form-DhUF_Mtg.js → form-CRSWplOb.js} +1 -1
  152. package/dist/client/assets/{gateway-client-Cb37izH_.js → gateway-client-D45uHvIc.js} +1 -1
  153. package/dist/client/assets/general-C7RGB0Oj.js +1 -0
  154. package/dist/client/assets/{github-icon-cJDFDEm7.js → github-icon-CsH29e4W.js} +1 -1
  155. package/dist/client/assets/{github-repo-C0igpkr9.js → github-repo-BknN0SVI.js} +1 -1
  156. package/dist/client/assets/home-CpLcM3nB.js +1 -0
  157. package/dist/client/assets/hooks-CE7d6Dy1.js +15 -0
  158. package/dist/client/assets/{hooks-BrcP19Uo.js → hooks-CxBYuMc8.js} +2 -2
  159. package/dist/client/assets/{index-epfDD3H5.js → index-4fsCOuPz.js} +2 -2
  160. package/dist/client/assets/index-B53DWiGz.js +1 -0
  161. package/dist/client/assets/{index-BQzHGsvt.js → index-BJDZS0O4.js} +11 -11
  162. package/dist/client/assets/index-BQwroePl.js +1 -0
  163. package/dist/client/assets/{index-Df6f9kP3.js → index-BRigOSQu.js} +1 -1
  164. package/dist/client/assets/{index-CoYeuRng.js → index-CBcq1VSB.js} +1 -1
  165. package/dist/client/assets/index-CFUteTrc.js +1 -0
  166. package/dist/client/assets/{index-gctAQu2T.js → index-CVJEcf37.js} +74 -74
  167. package/dist/client/assets/{index-DQ6uuKpF.js → index-CblYf_yB.js} +8 -8
  168. package/dist/client/assets/{index-BywxOh2e.js → index-CcEd_wWL.js} +1 -1
  169. package/dist/client/assets/index-Clbrhj--.js +1 -0
  170. package/dist/client/assets/{index-CImKKZ20.js → index-CxOPSFx9.js} +1 -1
  171. package/dist/client/assets/index-CyYEAXEU.js +1 -0
  172. package/dist/client/assets/{index-eVyHwFa9.js → index-DAN6A7hZ.js} +1 -1
  173. package/dist/client/assets/{index-DJADaZ4J.css → index-DUflXgSu.css} +1 -1
  174. package/dist/client/assets/index-Dio39w6e.js +26 -0
  175. package/dist/client/assets/index-DsI9yqDT.js +1 -0
  176. package/dist/client/assets/{index-redirect-DxBD4sTo.js → index-redirect-Bw20Ba6Y.js} +1 -1
  177. package/dist/client/assets/{infiniteQueryObserver-Da0v0sXC.js → infiniteQueryObserver-BSmIgXE3.js} +1 -1
  178. package/dist/client/assets/infra-billing-DFEuQtvU.js +1 -0
  179. package/dist/client/assets/{input-eBmoU-9D.js → input-C8MQoDCb.js} +1 -1
  180. package/dist/client/assets/{input-DlvEXkej.js → input-CQyA0V5b.js} +1 -1
  181. package/dist/client/assets/{input-C9QH7mMV.js → input-DD_DI_Km.js} +2 -2
  182. package/dist/client/assets/{integration-icon-YYg8l_RW.js → integration-icon-BV7Q9XOu.js} +1 -1
  183. package/dist/client/assets/{label-DGkzLfNU.js → label-Cfl8uGDP.js} +1 -1
  184. package/dist/client/assets/last-preview-page-B_KVLuYW.js +1 -0
  185. package/dist/client/assets/layout-Dm4T-Vne.js +1 -0
  186. package/dist/client/assets/legacy-agents-deep-Dd57JUEI.js +1 -0
  187. package/dist/client/assets/legacy-main-redirect-CWvMqmhB.js +1 -0
  188. package/dist/client/assets/{library-CKrgioQu.js → library-3DHQWojm.js} +4 -4
  189. package/dist/client/assets/login-CupMnybl.js +1 -0
  190. package/dist/client/assets/{markdown-BV0XgGTq.js → markdown-BvSl7QX1.js} +3 -3
  191. package/dist/client/assets/{mcp-app-renderer-Bv46PiO3.js → mcp-app-renderer-DJ7Ve9Yy.js} +2 -2
  192. package/dist/client/assets/{mcp-oauth-i7PCjbNf.js → mcp-oauth-OvlzbMCP.js} +1 -1
  193. package/dist/client/assets/members-Cuiahh5G.js +1 -0
  194. package/dist/client/assets/message-templates-wocfrCJF.js +1 -0
  195. package/dist/client/assets/{mini-report-page-k88VT2C2.js → mini-report-page-4Bd0cMlr.js} +1 -1
  196. package/dist/client/assets/{monaco-editor-kRD7y0Pc.js → monaco-editor-B2KCfh7a.js} +1 -1
  197. package/dist/client/assets/{monitoring-stats-row-CuCuR7PQ.js → monitoring-stats-row-CufhVlNy.js} +1 -1
  198. package/dist/client/assets/{multi-select-CltjjMwX.js → multi-select-BHFunwbq.js} +1 -1
  199. package/dist/client/assets/{mustache-Db7x-4gI.js → mustache-DyjElMuJ.js} +1 -1
  200. package/dist/client/assets/{oauth-callback-CT29B8-5.js → oauth-callback-4BOm__rV.js} +1 -1
  201. package/dist/client/assets/{oauth-callback-ai-provider-3CPoYshC.js → oauth-callback-ai-provider-Czk5gVgf.js} +1 -1
  202. package/dist/client/assets/{onboarding-DEm51GnF.js → onboarding-D2PsWH4h.js} +1 -1
  203. package/dist/client/assets/{optimistic-project-sidebar-views-Drtbh9Ui.js → optimistic-project-sidebar-views-B3vU1qR8.js} +1 -1
  204. package/dist/client/assets/{organization-choice-BdqJqB_v.js → organization-choice-C-PRPVPc.js} +1 -1
  205. package/dist/client/assets/orgs-DpmY6dw4.js +1 -0
  206. package/dist/client/assets/{page-seo-form-BXvLQ5tk.js → page-seo-form-gUB5sB3u.js} +1 -1
  207. package/dist/client/assets/{pair-BIPkH5eA.js → pair-98UY-0wm.js} +8 -8
  208. package/dist/client/assets/{popover-BfKN_4aI.js → popover-DAJR0ej2.js} +1 -1
  209. package/dist/client/assets/post-calendar-4XiTJrif.js +1 -0
  210. package/dist/client/assets/post-editor-CXRn_RK8.js +1 -0
  211. package/dist/client/assets/preview-content-Tw_jYCgT.js +1 -0
  212. package/dist/client/assets/{preview-dialog-CYbL8r4H.js → preview-dialog-Bg_Wo7YI.js} +1 -1
  213. package/dist/client/assets/{primitives-BXcg67BS.js → primitives-BfIYsPoI.js} +1 -1
  214. package/dist/client/assets/profile-CDs1X-Le.js +1 -0
  215. package/dist/client/assets/project-app-view-BPLB01Cj.js +1 -0
  216. package/dist/client/assets/project-feed-CeGbFvMT.js +1 -0
  217. package/dist/client/assets/{project-icon-Dk1HaDIZ.js → project-icon-D1x6NEST.js} +1 -1
  218. package/dist/client/assets/project-reports-fH8-r6df.js +1 -0
  219. package/dist/client/assets/project-tasks-tas6EPem.js +1 -0
  220. package/dist/client/assets/prompts-B-VqD1p-.js +1 -0
  221. package/dist/client/assets/record-editor-LOQZDk0V.js +1 -0
  222. package/dist/client/assets/redirect-editor-CgXt_KHn.js +1 -0
  223. package/dist/client/assets/registry-YMo7WLlx.js +2 -0
  224. package/dist/client/assets/{registry-layout-CRM-FBei.js → registry-layout-SseogjtO.js} +3 -3
  225. package/dist/client/assets/reports-DC8tSFj3.js +1 -0
  226. package/dist/client/assets/{reports-B1FmmHPo.js → reports-Q6oueood.js} +2 -2
  227. package/dist/client/assets/reports-tab-DE-TYPly.js +2 -0
  228. package/dist/client/assets/repositories-BoiOgwFm.js +1 -0
  229. package/dist/client/assets/repository-import-picker-DyEfEliR.js +1 -0
  230. package/dist/client/assets/repository-picker-DWJtJkZW.js +1 -0
  231. package/dist/client/assets/require-capability-DljrHpsM.js +1 -0
  232. package/dist/client/assets/{required-auth-layout-CraNNSBi.js → required-auth-layout-TTElzhIM.js} +1 -1
  233. package/dist/client/assets/{reset-password-DcO8_P05.js → reset-password-B1ylDKoe.js} +1 -1
  234. package/dist/client/assets/resizable-DOW_fL7z.js +1 -0
  235. package/dist/client/assets/retry-i8LvYSZg.js +1 -0
  236. package/dist/client/assets/{review-settings-CANg_Nan.js → review-settings-DHvMG4G0.js} +1 -1
  237. package/dist/client/assets/{rich-text-link-control-CCig2s9-.js → rich-text-link-control-HLhFAha7.js} +1 -1
  238. package/dist/client/assets/roles-BWbTlJZc.js +1 -0
  239. package/dist/client/assets/route-D26IsMv1.js +1 -0
  240. package/dist/client/assets/route-D_kbg4iH.js +1 -0
  241. package/dist/client/assets/route-jdsFbZW7.js +1 -0
  242. package/dist/client/assets/runnable-block-editor-Bi0Cv7yD.js +16 -0
  243. package/dist/client/assets/sandbox-git-api-CMdpE2TE.js +1 -0
  244. package/dist/client/assets/{sandbox-lifecycle-context-Beua1bNX.js → sandbox-lifecycle-context-BbTDNpeS.js} +2 -2
  245. package/dist/client/assets/save-changes-debug-nBi-n9eV.js +1 -0
  246. package/dist/client/assets/{schema-BzgrQmAY.js → schema-BegvnGCM.js} +1 -1
  247. package/dist/client/assets/{scroll-area-tBZq-ZvJ.js → scroll-area-CxxMejtk.js} +1 -1
  248. package/dist/client/assets/{search-input-CYERWjWv.js → search-input-axkgbTZ7.js} +1 -1
  249. package/dist/client/assets/secrets-kzqIbFmd.js +1 -0
  250. package/dist/client/assets/section-preview-url-Csj0_ZDg.js +1 -0
  251. package/dist/client/assets/sections-editor-B_t9OrnC.js +2 -0
  252. package/dist/client/assets/select-B2GRzoG3.js +1 -0
  253. package/dist/client/assets/select-model-BRHN792B.js +1 -0
  254. package/dist/client/assets/seo-editor-DvngP1ti.js +1 -0
  255. package/dist/client/assets/settings-tab-DFjZ-Fkn.js +5 -0
  256. package/dist/client/assets/sheet-BePDARR0.js +1 -0
  257. package/dist/client/assets/shell-layout-D2wS-FNX.js +1 -0
  258. package/dist/client/assets/sidebar-IspuJbto.js +1 -0
  259. package/dist/client/assets/skill-preview-BdtuUFgV.js +1 -0
  260. package/dist/client/assets/skills-QJ3mhNvI.js +1 -0
  261. package/dist/client/assets/sso-DKhL-ARh.js +1 -0
  262. package/dist/client/assets/{store-CjL9y_7d.js → store-B9Az6md3.js} +1 -1
  263. package/dist/client/assets/store-registry-hcgHbNGW.js +2 -0
  264. package/dist/client/assets/switch-DJ4Dr2_V.js +1 -0
  265. package/dist/client/assets/synced-repos-flbNGs20.js +1 -0
  266. package/dist/client/assets/{table-aIDGrvqv.js → table-CrJ9LOSc.js} +1 -1
  267. package/dist/client/assets/{tabs-Sr-wlkg3.js → tabs-DVMaAAMA.js} +1 -1
  268. package/dist/client/assets/{task-board-CazuPR-U.js → task-board-SlBuwhrX.js} +1 -1
  269. package/dist/client/assets/task-route-B4hPzw6u.js +1 -0
  270. package/dist/client/assets/{task-status-Cj8IGjJC.js → task-status-DhZZzZ6G.js} +1 -1
  271. package/dist/client/assets/{tasks-DzatESzy.js → tasks-B_rqCvr1.js} +4 -4
  272. package/dist/client/assets/tasks-CViGtGHm.js +1 -0
  273. package/dist/client/assets/{textarea-6VvdKhvF.js → textarea-BDMLJ5G-.js} +1 -1
  274. package/dist/client/assets/{thread-intent-DPwCeeGE.js → thread-intent-C7DpKTRQ.js} +1 -1
  275. package/dist/client/assets/thread-route-Bc63tvFc.js +1 -0
  276. package/dist/client/assets/{thread-route-BsrvgyVU.js → thread-route-BzWllNYG.js} +1 -1
  277. package/dist/client/assets/thread-sheet-body-CiausLhX.js +1 -0
  278. package/dist/client/assets/toggle-group-BW8cP6lf.js +1 -0
  279. package/dist/client/assets/{toolbar-icon-button-CSTgB2Je.js → toolbar-icon-button-A2ebiBUr.js} +1 -1
  280. package/dist/client/assets/tooltip-B7VLfO9w.js +1 -0
  281. package/dist/client/assets/{track-CDfY4FZL.js → track-BGU8HJCB.js} +1 -1
  282. package/dist/client/assets/{types-8hWP_tsZ.js → types-CrAbOCy3.js} +6 -6
  283. package/dist/client/assets/usage-stats-Bf1Ukas_.js +1 -0
  284. package/dist/client/assets/use-ai-providers-R1Jac-4Q.js +1 -0
  285. package/dist/client/assets/use-automations-BzLd_Cf7.js +1 -0
  286. package/dist/client/assets/{use-autosave-DRlRuq5e.js → use-autosave-BezKrA6F.js} +1 -1
  287. package/dist/client/assets/use-commerce-diagnostic-DTGIqIpu.js +1 -0
  288. package/dist/client/assets/use-connect-companion-CgerJAPe.js +1 -0
  289. package/dist/client/assets/{use-connection-tOIuuLKJ.js → use-connection-B4t4VJEN.js} +1 -1
  290. package/dist/client/assets/{use-copy-B4PUMZjo.js → use-copy-DQwrjGi4.js} +1 -1
  291. package/dist/client/assets/{use-create-virtual-mcp-x2IPUAAO.js → use-create-virtual-mcp-CHEKOqdh.js} +1 -1
  292. package/dist/client/assets/{use-date-fns-locale-use6rm0l.js → use-date-fns-locale-m0Q-8AAg.js} +1 -1
  293. package/dist/client/assets/{use-debounced-autosave-CWLgAozd.js → use-debounced-autosave-C82NqRut.js} +1 -1
  294. package/dist/client/assets/{use-debounced-value-BHZw1Wtv.js → use-debounced-value-SjJ8k_tD.js} +1 -1
  295. package/dist/client/assets/use-deco-credits-CIfhJ3OU.js +1 -0
  296. package/dist/client/assets/use-decopilot-events-DDnHJjGY.js +1 -0
  297. package/dist/client/assets/use-delete-connection-BWW3Qwe4.js +1 -0
  298. package/dist/client/assets/{use-deployment-admin-PTBGIrMl.js → use-deployment-admin-D4Et99Id.js} +1 -1
  299. package/dist/client/assets/use-fast-preview-draft-url-B8C-G0p2.js +1 -0
  300. package/dist/client/assets/use-file-configs-CKcyFOK-.js +1 -0
  301. package/dist/client/assets/{use-infinite-scroll-DnRzNQQc.js → use-infinite-scroll-C88xvDJq.js} +1 -1
  302. package/dist/client/assets/use-join-requests-CtMSd2H7.js +1 -0
  303. package/dist/client/assets/use-main-panel-tabs-BLf-yD79.js +1 -0
  304. package/dist/client/assets/use-mcp-auth-status-CF5e5Swp.js +1 -0
  305. package/dist/client/assets/{use-mcp-client-CzGi1Gun.js → use-mcp-client-DmOwsV3f.js} +6 -6
  306. package/dist/client/assets/{use-mcp-prompts-BJsq63pG.js → use-mcp-prompts-BKFfTbQi.js} +1 -1
  307. package/dist/client/assets/{use-mcp-tools-I4ahUYGD.js → use-mcp-tools-eOThR6gd.js} +1 -1
  308. package/dist/client/assets/{use-members-xjztJVBn.js → use-members-mw1URW2v.js} +1 -1
  309. package/dist/client/assets/use-mobile-WPuOYoIV.js +1 -0
  310. package/dist/client/assets/{use-navigate-to-agent-CBQsYRLL.js → use-navigate-to-agent-zGc1-u-z.js} +1 -1
  311. package/dist/client/assets/use-open-billing-url-BYWSUicc.js +1 -0
  312. package/dist/client/assets/use-org-auth-client-mMTl8cKp.js +1 -0
  313. package/dist/client/assets/{use-org-fs-Cm8FYvYP.js → use-org-fs-Ck9VysIz.js} +1 -1
  314. package/dist/client/assets/use-org-notice-Cb7z4nA0.js +1 -0
  315. package/dist/client/assets/{use-org-sso-CP_t4LLU.js → use-org-sso-CvkPQsKr.js} +1 -1
  316. package/dist/client/assets/{use-organization-roles-Cnixvt9H.js → use-organization-roles-wnmrYWSM.js} +1 -1
  317. package/dist/client/assets/use-organization-settings-CRw6qdb3.js +1 -0
  318. package/dist/client/assets/use-panel-navigate-ez3OqVq8.js +1 -0
  319. package/dist/client/assets/{use-project-native-view-presence-CJ7vLSBz.js → use-project-native-view-presence-DFjsPIlC.js} +1 -1
  320. package/dist/client/assets/use-project-scope-D9t-w7F3.js +1 -0
  321. package/dist/client/assets/use-registry-connections-BC1Pt8V1.js +1 -0
  322. package/dist/client/assets/use-releases-B_ioEYcb.js +1 -0
  323. package/dist/client/assets/use-route-default-main-B8Ci266p.js +1 -0
  324. package/dist/client/assets/use-secrets-BZEH47Ed.js +1 -0
  325. package/dist/client/assets/use-section-preview-base-D8ddLJeY.js +1 -0
  326. package/dist/client/assets/{use-session-runtime-Cs4eGT9k.js → use-session-runtime-CKDTMwlz.js} +1 -1
  327. package/dist/client/assets/use-tags-BnnveSvi.js +1 -0
  328. package/dist/client/assets/use-task-metadata-DQ-jzCVZ.js +1 -0
  329. package/dist/client/assets/{use-thread-outputs-DtpQGqCf.js → use-thread-outputs-ChimPCUk.js} +1 -1
  330. package/dist/client/assets/use-view-mode-CpyVGfy9.js +1 -0
  331. package/dist/client/assets/use-virtual-mcp-DvSX4N6q.js +1 -0
  332. package/dist/client/assets/useInfiniteQuery-CuoCKqDV.js +1 -0
  333. package/dist/client/assets/{useQueries-CnHkVL7d.js → useQueries-CCVXh4wK.js} +1 -1
  334. package/dist/client/assets/useSuspenseInfiniteQuery-BGyZ2Zcs.js +1 -0
  335. package/dist/client/assets/{users-CWHZPvdU.js → users-DgkJfwRz.js} +1 -1
  336. package/dist/client/assets/{utils-CdxSjBly.js → utils-D06E4WDv.js} +2 -2
  337. package/dist/client/assets/variant-calendar-B2YQFxru.js +1 -0
  338. package/dist/client/assets/{variant-matcher-override-BLTbL0Nb.js → variant-matcher-override-POFwaaTG.js} +1 -1
  339. package/dist/client/assets/view-mode-toggle-B09x-ETl.js +1 -0
  340. package/dist/client/assets/{virtual-mcp-CIE6gIFV.js → virtual-mcp-D-br_N6s.js} +1 -1
  341. package/dist/client/index.html +2 -2
  342. package/dist/server/cli.js +1 -1
  343. package/dist/server/server.js +1 -1
  344. package/package.json +1 -1
  345. package/dist/client/assets/Printer-Nban-oJk.js +0 -1
  346. package/dist/client/assets/access-gate-aVhmxNUP.js +0 -1
  347. package/dist/client/assets/add-connection-dialog-C2-znERG.js +0 -1
  348. package/dist/client/assets/agent-analytics-CLObAM6S.js +0 -2
  349. package/dist/client/assets/agent-app-DtLxy7iB.js +0 -1
  350. package/dist/client/assets/agent-assets-5J9H4wgC.js +0 -1
  351. package/dist/client/assets/agent-automation-DTYBStDc.js +0 -20
  352. package/dist/client/assets/agent-automations-DYZPALXC.js +0 -1
  353. package/dist/client/assets/agent-connect-sources-DJFWziK9.js +0 -1
  354. package/dist/client/assets/agent-deck-De0Y6qk5.js +0 -1
  355. package/dist/client/assets/agent-e2e-MVQ6vmAy.js +0 -1
  356. package/dist/client/assets/agent-file-IBnKf7Fw.js +0 -1
  357. package/dist/client/assets/agent-git-DjVoKiR8.js +0 -3
  358. package/dist/client/assets/agent-hosting-DbC8wvCr.js +0 -1
  359. package/dist/client/assets/agent-icon-DsGBCBNv.js +0 -1
  360. package/dist/client/assets/agent-library-file-CySHm683.js +0 -1
  361. package/dist/client/assets/agent-monitor-Duc2QTVQ.js +0 -1
  362. package/dist/client/assets/agent-overview-DAVTPrgq.js +0 -1
  363. package/dist/client/assets/agent-settings-DBEnACPy.js +0 -1
  364. package/dist/client/assets/agent-site-editor-CJ_722sF.js +0 -1
  365. package/dist/client/assets/agent-site-editor-code-CBPV2yNN.js +0 -2
  366. package/dist/client/assets/agent-site-editor-content-C-fwwsI7.js +0 -2
  367. package/dist/client/assets/agent-site-editor-preview-Be-uG2hV.js +0 -504
  368. package/dist/client/assets/agent-view-B3DdbJTr.js +0 -1
  369. package/dist/client/assets/agent-view-guard-DTG6Ut5n.js +0 -1
  370. package/dist/client/assets/agents-list-DNaOFYAO.js +0 -1
  371. package/dist/client/assets/ai-providers-BPcl_qgT.js +0 -1
  372. package/dist/client/assets/api-keys-CYMMtT0P.js +0 -1
  373. package/dist/client/assets/app-editor-_27_2g82.js +0 -1
  374. package/dist/client/assets/asset-utils-DTfzHa9m.js +0 -1
  375. package/dist/client/assets/automation-runs-Dt50JHCo.js +0 -1
  376. package/dist/client/assets/automations-DDydXmIK.js +0 -1
  377. package/dist/client/assets/backoff-CrEUbyZT.js +0 -1
  378. package/dist/client/assets/buckets-Wx6DtJNT.js +0 -1
  379. package/dist/client/assets/build-improve-prompt-doc-4aKzyTWA.js +0 -2
  380. package/dist/client/assets/bulk-category-panel-CclTC40F.js +0 -1
  381. package/dist/client/assets/category-editor-CuGxUDVJ.js +0 -1
  382. package/dist/client/assets/choose-editor-CE7aKrQp.js +0 -1
  383. package/dist/client/assets/collapsible-BDifv-q9.js +0 -1
  384. package/dist/client/assets/collection-detail-ec9sW8Ey.js +0 -1
  385. package/dist/client/assets/collection-display-button-C3CfuUhX.js +0 -1
  386. package/dist/client/assets/commerce-onboarding-Dxc7EEsL.js +0 -1
  387. package/dist/client/assets/connect-layout-Bby2uYqZ.js +0 -1
  388. package/dist/client/assets/connection-detail-C-Fe9wui.js +0 -1
  389. package/dist/client/assets/connections-CxSK9S4W.js +0 -1
  390. package/dist/client/assets/decode-html-entities-B4Qel6ov.js +0 -1
  391. package/dist/client/assets/decopilot-sse-pool-czpSFI9L.js +0 -1
  392. package/dist/client/assets/delay-CnY5UFtP.js +0 -1
  393. package/dist/client/assets/dialog--Jkwvpx1.js +0 -1
  394. package/dist/client/assets/discover-C7-JIKhR.js +0 -1
  395. package/dist/client/assets/domain-settings-Dh029s1M.js +0 -1
  396. package/dist/client/assets/file-explorer-B4d-xz4q.js +0 -2
  397. package/dist/client/assets/general-BY1zbaWS.js +0 -1
  398. package/dist/client/assets/home-CeJo7q7K.js +0 -1
  399. package/dist/client/assets/hooks-CxPd9b6i.js +0 -15
  400. package/dist/client/assets/index-1yGxjvng.js +0 -24
  401. package/dist/client/assets/index-C7tZKQ5s.js +0 -1
  402. package/dist/client/assets/index-CklK0EA_.js +0 -1
  403. package/dist/client/assets/index-D5CXQ9x9.js +0 -1
  404. package/dist/client/assets/index-Og5m3t85.js +0 -26
  405. package/dist/client/assets/index-Y6pd1REu.js +0 -1
  406. package/dist/client/assets/infra-billing-ChvPe0pr.js +0 -1
  407. package/dist/client/assets/invite-member-dialog-CeSVAfZq.js +0 -1
  408. package/dist/client/assets/layout-BIIr_imR.js +0 -1
  409. package/dist/client/assets/legacy-agents-deep-CdZo4h4A.js +0 -1
  410. package/dist/client/assets/legacy-main-redirect-CWWHewM6.js +0 -1
  411. package/dist/client/assets/login-svGY2sKo.js +0 -1
  412. package/dist/client/assets/members-BOTXfNHf.js +0 -1
  413. package/dist/client/assets/org-layout-BiRvLqL-.js +0 -1
  414. package/dist/client/assets/orgs-CMf-H7HH.js +0 -1
  415. package/dist/client/assets/post-calendar-BAQtpQvh.js +0 -1
  416. package/dist/client/assets/post-editor-DBJMHXYe.js +0 -1
  417. package/dist/client/assets/preview-content-CICx8Frq.js +0 -1
  418. package/dist/client/assets/profile-CUkJFM3_.js +0 -1
  419. package/dist/client/assets/project-app-view-BSYHmGj3.js +0 -1
  420. package/dist/client/assets/project-feed-BEGVLizK.js +0 -1
  421. package/dist/client/assets/project-reports-BozhFElP.js +0 -1
  422. package/dist/client/assets/project-tasks-DVexwc9x.js +0 -1
  423. package/dist/client/assets/prompts-Df-P8Zuz.js +0 -1
  424. package/dist/client/assets/record-editor-9YdHcAWO.js +0 -1
  425. package/dist/client/assets/redirect-editor-BohyWJXT.js +0 -1
  426. package/dist/client/assets/registry-BbkHDIpk.js +0 -2
  427. package/dist/client/assets/reports-SeFGRJSZ.js +0 -1
  428. package/dist/client/assets/reports-tab-D5rlmWEp.js +0 -2
  429. package/dist/client/assets/repositories-BXEjUV3F.js +0 -1
  430. package/dist/client/assets/repository-import-picker-Bc_O4k0-.js +0 -1
  431. package/dist/client/assets/repository-picker-DC97O6OK.js +0 -1
  432. package/dist/client/assets/require-capability-CoB1D-Ih.js +0 -1
  433. package/dist/client/assets/retry-CErkP7V6.js +0 -1
  434. package/dist/client/assets/roles-DEMri9Kk.js +0 -1
  435. package/dist/client/assets/runnable-block-editor-BD-IThSC.js +0 -16
  436. package/dist/client/assets/secrets-7Z0pTBUq.js +0 -1
  437. package/dist/client/assets/sections-editor-DoMH-fks.js +0 -2
  438. package/dist/client/assets/select-C9ZnmbzX.js +0 -1
  439. package/dist/client/assets/select-model-FK_tmltz.js +0 -1
  440. package/dist/client/assets/seo-editor-DNovpojV.js +0 -1
  441. package/dist/client/assets/settings-layout-Cd8jASua.js +0 -1
  442. package/dist/client/assets/settings-sidebar-DP80M_GR.js +0 -1
  443. package/dist/client/assets/settings-tab-DE3XUo7h.js +0 -5
  444. package/dist/client/assets/shell-controls-CnE-Tn5l.js +0 -1
  445. package/dist/client/assets/shell-layout-DMp5UdGb.js +0 -1
  446. package/dist/client/assets/skill-preview-D2lK4hU9.js +0 -1
  447. package/dist/client/assets/skills-xXfBybxi.js +0 -1
  448. package/dist/client/assets/source-system-tabs-CnEGUb4r.js +0 -1
  449. package/dist/client/assets/sso-DdBxRFrm.js +0 -1
  450. package/dist/client/assets/store-registry-BFRxGHgD.js +0 -2
  451. package/dist/client/assets/switch-DADMizS1.js +0 -1
  452. package/dist/client/assets/synced-repos-Cp7R03Jp.js +0 -1
  453. package/dist/client/assets/task-route-_NgFGVoT.js +0 -1
  454. package/dist/client/assets/tasks-BvZdYZ5R.js +0 -1
  455. package/dist/client/assets/thread-sheet-body-S2AS0IdJ.js +0 -1
  456. package/dist/client/assets/toggle-group-CHZjV-1n.js +0 -1
  457. package/dist/client/assets/toolbar-DAhC4RMM.js +0 -1
  458. package/dist/client/assets/usage-stats-B38oXMbk.js +0 -1
  459. package/dist/client/assets/use-ai-providers-DYf552qv.js +0 -1
  460. package/dist/client/assets/use-automations-DSRSDlyo.js +0 -1
  461. package/dist/client/assets/use-commerce-diagnostic-pXwQBZmy.js +0 -1
  462. package/dist/client/assets/use-connect-companion-Bt171l5d.js +0 -1
  463. package/dist/client/assets/use-deco-credits-Coxc4dyp.js +0 -1
  464. package/dist/client/assets/use-decopilot-events-V4xtyk7c.js +0 -1
  465. package/dist/client/assets/use-delete-connection-geT4L5Ed.js +0 -1
  466. package/dist/client/assets/use-file-configs-BLWnBKpa.js +0 -1
  467. package/dist/client/assets/use-join-requests-DL4guRSR.js +0 -1
  468. package/dist/client/assets/use-main-panel-tabs-BtAksZ1f.js +0 -1
  469. package/dist/client/assets/use-mcp-auth-status-CpecQqEX.js +0 -1
  470. package/dist/client/assets/use-open-billing-url-DaC9_MxZ.js +0 -1
  471. package/dist/client/assets/use-org-auth-client-DuxSmx0x.js +0 -1
  472. package/dist/client/assets/use-org-notice-lWz1PPs-.js +0 -1
  473. package/dist/client/assets/use-organization-settings-C-LQvPpq.js +0 -1
  474. package/dist/client/assets/use-panel-navigate-D2RT2tc_.js +0 -1
  475. package/dist/client/assets/use-project-scope-Ch_4TfMQ.js +0 -1
  476. package/dist/client/assets/use-registry-connections-CuDWC28C.js +0 -1
  477. package/dist/client/assets/use-secrets-BJDccjnS.js +0 -1
  478. package/dist/client/assets/use-section-preview-base-SCqBiLMF.js +0 -1
  479. package/dist/client/assets/use-status-sounds-BG-lkYEo.js +0 -1
  480. package/dist/client/assets/use-tags-DhkHJc7C.js +0 -1
  481. package/dist/client/assets/use-task-metadata-COSUQhUk.js +0 -1
  482. package/dist/client/assets/use-view-mode-CUARubnx.js +0 -1
  483. package/dist/client/assets/use-virtual-mcp-BMRFgR9g.js +0 -1
  484. package/dist/client/assets/useInfiniteQuery-DOeboQGx.js +0 -1
  485. package/dist/client/assets/useSuspenseInfiniteQuery-B5UzTlHS.js +0 -1
  486. package/dist/client/assets/variant-calendar-f9XxiGiP.js +0 -1
  487. package/dist/client/assets/view-mode-toggle-D31fXZcw.js +0 -1
  488. /package/dist/client/assets/{index-DDGTF8rc.css → agent-site-editor-DDGTF8rc.css} +0 -0
@@ -0,0 +1 @@
1
+ import{c as _,f as h,u as x,M as j,dC as S,ag as b,eZ as v,j as p,N as d}from"./index-CVJEcf37.js";import{L}from"./legacy-main-redirect-CWvMqmhB.js";import"./thread-route-BzWllNYG.js";function R(){const e=_.c(16);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const g=h(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const s=x(n),{org:t}=j(),f="_splat"in g&&typeof g._splat=="string"?g._splat:"";let c,a;if(e[2]!==t.id||e[3]!==t.slug||e[4]!==s||e[5]!==f){a=Symbol.for("react.early_return_sentinel");e:{const m=f.split("/").find(Boolean);if(!m){let r;e[8]!==t.slug?(r={org:t.slug},e[8]=t.slug,e[9]=r):r=e[9];let u;e[10]!==s||e[11]!==r?(u=p.jsx(d,{to:"/$org/projects",params:r,search:s,hash:!0,replace:!0}),e[10]=s,e[11]=r,e[12]=u):u=e[12],a=u;break e}const y=S({virtualMcpIdSearch:s.virtualmcpid,fallbackAgentId:b(t.id).id});c=v({org:t.slug,agentId:y,panel:m,source:"view-first",search:s})}e[2]=t.id,e[3]=t.slug,e[4]=s,e[5]=f,e[6]=c,e[7]=a}else c=e[6],a=e[7];if(a!==Symbol.for("react.early_return_sentinel"))return a;const l=c;let i;return e[13]!==t.slug||e[14]!==l?(i=l?.kind==="canonical"?p.jsx(L,{target:{route:l.route,search:l.search}}):p.jsx(d,{to:"/$org/home",params:{org:t.slug},replace:!0}),e[13]=t.slug,e[14]=l,e[15]=i):i=e[15],i}export{R as default};
@@ -0,0 +1 @@
1
+ import{c as v,C as t,j as p,N as m,a1 as c,f as y,u as I,R as E,dC as k,dD as R,dE as S,dF as b}from"./index-CVJEcf37.js";import{b as C}from"./thread-route-BzWllNYG.js";function L(x){const a=v.c(78),{target:h}=x,{route:s,search:r}=h;switch(s.to){case c.home:{let e;return a[0]!==s.params||a[1]!==r?(e=p.jsx(m,{to:c.home,params:s.params,search:r,hash:!0,replace:!0}),a[0]=s.params,a[1]=r,a[2]=e):e=a[2],e}case c.tasks:{let e;return a[3]!==s.params||a[4]!==r?(e=p.jsx(m,{to:c.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[3]=s.params,a[4]=r,a[5]=e):e=a[5],e}case c.reports:{let e;return a[6]!==s.params||a[7]!==r?(e=p.jsx(m,{to:c.reports,params:s.params,search:r,hash:!0,replace:!0}),a[6]=s.params,a[7]=r,a[8]=e):e=a[8],e}case c.discover:{let e;return a[9]!==s.params||a[10]!==r?(e=p.jsx(m,{to:c.discover,params:s.params,search:r,hash:!0,replace:!0}),a[9]=s.params,a[10]=r,a[11]=e):e=a[11],e}case c.library:{let e;return a[12]!==s.params||a[13]!==r?(e=p.jsx(m,{to:c.library,params:s.params,search:r,hash:!0,replace:!0}),a[12]=s.params,a[13]=r,a[14]=e):e=a[14],e}case t.root:{let e;return a[15]!==s.params||a[16]!==r?(e=p.jsx(m,{to:t.root,params:s.params,search:r,hash:!0,replace:!0}),a[15]=s.params,a[16]=r,a[17]=e):e=a[17],e}case t.tasks:{let e;return a[18]!==s.params||a[19]!==r?(e=p.jsx(m,{to:t.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[18]=s.params,a[19]=r,a[20]=e):e=a[20],e}case t.reports:{let e;return a[21]!==s.params||a[22]!==r?(e=p.jsx(m,{to:t.reports,params:s.params,search:r,hash:!0,replace:!0}),a[21]=s.params,a[22]=r,a[23]=e):e=a[23],e}case t.siteEditor:{let e;return a[24]!==s.params||a[25]!==r?(e=p.jsx(m,{to:t.siteEditor,params:s.params,search:r,hash:!0,replace:!0}),a[24]=s.params,a[25]=r,a[26]=e):e=a[26],e}case t.siteEditorContent:{let e;return a[27]!==s.params||a[28]!==r?(e=p.jsx(m,{to:t.siteEditorContent,params:s.params,search:r,hash:!0,replace:!0}),a[27]=s.params,a[28]=r,a[29]=e):e=a[29],e}case t.siteEditorCode:{let e;return a[30]!==s.params||a[31]!==r?(e=p.jsx(m,{to:t.siteEditorCode,params:s.params,search:r,hash:!0,replace:!0}),a[30]=s.params,a[31]=r,a[32]=e):e=a[32],e}case t.settings:{let e;return a[33]!==s.params||a[34]!==r?(e=p.jsx(m,{to:t.settings,params:s.params,search:r,hash:!0,replace:!0}),a[33]=s.params,a[34]=r,a[35]=e):e=a[35],e}case t.assets:{let e;return a[36]!==s.params||a[37]!==r?(e=p.jsx(m,{to:t.assets,params:s.params,search:r,hash:!0,replace:!0}),a[36]=s.params,a[37]=r,a[38]=e):e=a[38],e}case t.git:{let e;return a[39]!==s.params||a[40]!==r?(e=p.jsx(m,{to:t.git,params:s.params,search:r,hash:!0,replace:!0}),a[39]=s.params,a[40]=r,a[41]=e):e=a[41],e}case t.hosting:{let e;return a[42]!==s.params||a[43]!==r?(e=p.jsx(m,{to:t.hosting,params:s.params,search:r,hash:!0,replace:!0}),a[42]=s.params,a[43]=r,a[44]=e):e=a[44],e}case t.e2e:{let e;return a[45]!==s.params||a[46]!==r?(e=p.jsx(m,{to:t.e2e,params:s.params,search:r,hash:!0,replace:!0}),a[45]=s.params,a[46]=r,a[47]=e):e=a[47],e}case t.analytics:{let e;return a[48]!==s.params||a[49]!==r?(e=p.jsx(m,{to:t.analytics,params:s.params,search:r,hash:!0,replace:!0}),a[48]=s.params,a[49]=r,a[50]=e):e=a[50],e}case t.monitor:{let e;return a[51]!==s.params||a[52]!==r?(e=p.jsx(m,{to:t.monitor,params:s.params,search:r,hash:!0,replace:!0}),a[51]=s.params,a[52]=r,a[53]=e):e=a[53],e}case t.automations:{let e;return a[54]!==s.params||a[55]!==r?(e=p.jsx(m,{to:t.automations,params:s.params,search:r,hash:!0,replace:!0}),a[54]=s.params,a[55]=r,a[56]=e):e=a[56],e}case t.automation:{let e;return a[57]!==s.params||a[58]!==r?(e=p.jsx(m,{to:t.automation,params:s.params,search:r,hash:!0,replace:!0}),a[57]=s.params,a[58]=r,a[59]=e):e=a[59],e}case t.app:{let e;return a[60]!==s.params||a[61]!==r?(e=p.jsx(m,{to:t.app,params:s.params,search:r,hash:!0,replace:!0}),a[60]=s.params,a[61]=r,a[62]=e):e=a[62],e}case t.view:{let e;return a[63]!==s.params||a[64]!==r?(e=p.jsx(m,{to:t.view,params:s.params,search:r,hash:!0,replace:!0}),a[63]=s.params,a[64]=r,a[65]=e):e=a[65],e}case t.outputFile:{let e;return a[66]!==s.params||a[67]!==r?(e=p.jsx(m,{to:t.outputFile,params:s.params,search:r,hash:!0,replace:!0}),a[66]=s.params,a[67]=r,a[68]=e):e=a[68],e}case t.outputDeck:{let e;return a[69]!==s.params||a[70]!==r?(e=p.jsx(m,{to:t.outputDeck,params:s.params,search:r,hash:!0,replace:!0}),a[69]=s.params,a[70]=r,a[71]=e):e=a[71],e}case t.libraryFile:{let e;return a[72]!==s.params||a[73]!==r?(e=p.jsx(m,{to:t.libraryFile,params:s.params,search:r,hash:!0,replace:!0}),a[72]=s.params,a[73]=r,a[74]=e):e=a[74],e}case t.connectSources:{let e;return a[75]!==s.params||a[76]!==r?(e=p.jsx(m,{to:t.connectSources,params:s.params,search:r,hash:!0,replace:!0}),a[75]=s.params,a[76]=r,a[77]=e):e=a[77],e}}}function A(x){const a=v.c(17),{children:h}=x;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},a[0]=s):s=a[0];const r=y(s);let e;a[1]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},a[1]=e):e=a[1];const u=I(e),j=C(),g=E(),i=r.org;if(!i||r.taskId!==void 0||r._splat!==void 0)return h??null;let n,f;a[2]!==j||a[3]!==g||a[4]!==i||a[5]!==r.agentId||a[6]!==u?(n=k({agentIdParam:r.agentId,virtualMcpIdSearch:u.virtualmcpid,fallbackAgentId:j}),f=(u.main!==void 0?R({org:i,agentId:n,main:u.main,search:u}):null)??S({org:i,routePath:g,search:u}),a[2]=j,a[3]=g,a[4]=i,a[5]=r.agentId,a[6]=u,a[7]=n,a[8]=f):(n=a[7],f=a[8]);const o=f;if(o?.kind==="same-route"){let l;return a[9]!==o.search?(l=p.jsx(m,{to:".",search:o.search,hash:!0,replace:!0}),a[9]=o.search,a[10]=l):l=a[10],l}if(o?.kind==="canonical"){let l;return a[11]!==o?(l=p.jsx(L,{target:o}),a[11]=o,a[12]=l):l=a[12],l}if(r.agentId!==void 0&&r.agentId===n&&u.virtualmcpid!==void 0){let l;a[13]!==u?(l=b(u),a[13]=u,a[14]=l):l=a[14];let d;return a[15]!==l?(d=p.jsx(m,{to:".",search:l,hash:!0,replace:!0}),a[15]=l,a[16]=d):d=a[16],d}return h??null}export{L,A as a};
@@ -1,4 +1,4 @@
1
- import{c as F,b as X,j as t,as as te,I as de,n as Xe,r as T,B as H,ap as Qe,l as De,K as _,t as L,d as dt,R as ut,u as pt,aq as mt,eb as ft}from"./index-gctAQu2T.js";import{s as ht}from"./Eye-B_BMkWWc.js";import{s as bt}from"./Plus-kQ9d0PiA.js";import{i as xt}from"./SearchLg-Cecpe6x9.js";import{i as $e}from"./Upload01-BtBtAyal.js";import{s as gt}from"./XClose-DPfGLo7I.js";import{A as yt,a as vt,b as jt,c as wt,d as kt,e as St,f as Nt,g as Pt}from"./alert-dialog-BdwUra4d.js";import{b as Le,D as Me,d as Ve,i as Ct,c as Ye,h as Ge,e as We}from"./dialog--Jkwvpx1.js";import{I as ye}from"./input-eBmoU-9D.js";import{p as Ze,b as M,s as ce,H as je,h as we,a as oe,c as _e,d as et}from"./location-oTTXFrSF.js";import{u as Ot}from"./use-debounced-value-BHZw1Wtv.js";import{c as ke,i as Fe,d as Dt,h as Ue,l as tt,m as $t,n as rt,j as Ft,o as Tt}from"./use-org-fs-Cm8FYvYP.js";import{f as Et,p as At,g as Rt,u as zt,e as Bt,a as Lt,F as Se,t as st,S as Mt,B as Vt,b as at,R as Ut,c as Ht}from"./cards-BfP1wflC.js";import{T as Kt}from"./textarea-6VvdKhvF.js";import{t as qt,n as It}from"./ChevronUp-Cp-tcsrs.js";import{a as Je}from"./Palette-CiXH5EXK.js";import{b as Qt}from"./Printer-Nban-oJk.js";import{a as Yt}from"./markdown-BV0XgGTq.js";import{S as Gt}from"./file-share-button-ChoXQdlr.js";import{L as Wt}from"./preview-dialog-CYbL8r4H.js";import{S as lt}from"./skill-preview-D2lK4hU9.js";import{i as Jt}from"./ChevronRight-2Ti1evDh.js";import{t as Xt}from"./Stars01-DWjpdjKn.js";import{i as Zt}from"./Zap-ChgjHdxL.js";import{i as _t}from"./GitBranch01-Dr0NRbj6.js";import{b as er}from"./use-panel-navigate-D2RT2tc_.js";import"./DotsVertical-B8slOnrw.js";import"./Download01-Bl2-HJHJ.js";import"./Share07-D8xQrAsX.js";import"./Globe01-DMnQmvOn.js";import"./Key01-CVfJV98q.js";import"./Trash01-BB2ymX9J.js";import"./dropdown-menu-4cRHTbic.js";import"./Check-BJaMheL7.js";import"./file-type-icon-DJQFeBpV.js";import"./folder-icon-BRLOuEpt.js";import"./skill-md-ChfVs4uF.js";import"./Copy01-BrL9ZrVF.js";import"./ZoomOut-BAhVAzy1.js";import"./thread-route-BsrvgyVU.js";import"./LinkExternal01-OjBTsG9L.js";import"./popover-BfKN_4aI.js";import"./preview-content-CICx8Frq.js";import"./file-preview-BbFH5cdB.js";import"./utils-CdxSjBly.js";import"./File02-3fotvfyl.js";import"./Image01-DMAKgzzX.js";import"./editor-NTP5Xcj9.js";import"./use-project-scope-Ch_4TfMQ.js";import"./use-virtual-mcp-BMRFgR9g.js";import"./use-mcp-client-CzGi1Gun.js";import"./auth-vfqjjrgv.js";import"./github-repo-C0igpkr9.js";function tr(l){const e=l("library.brandComponentsPreview.title"),s=l("library.brandComponentsPreview.subtitle"),r=l("library.brandComponentsPreview.monthlySavingsLabel"),u=l("library.brandComponentsPreview.primaryButton"),n=l("library.brandComponentsPreview.secondaryButton"),o=l("library.brandComponentsPreview.ghostButton"),d=l("library.brandComponentsPreview.successBadge"),i=l("library.brandComponentsPreview.warningBadge"),c=l("library.brandComponentsPreview.errorBadge"),p=l("library.brandComponentsPreview.infoBadge"),h=l("library.brandComponentsPreview.allChip"),m=l("library.brandComponentsPreview.incomeChip"),w=l("library.brandComponentsPreview.spendingChip"),x=l("library.brandComponentsPreview.emailPlaceholder");return`
1
+ import{c as F,b as X,j as t,ax as te,M as de,n as Xe,r as T,B as H,l as De,K as _,t as L,d as dt,u as ut,as as pt,dI as mt}from"./index-CVJEcf37.js";import{C as ft}from"./index-CyYEAXEU.js";import{s as ht}from"./Eye-BRXlESxS.js";import{s as bt}from"./Plus-BUGmioCX.js";import{i as xt}from"./SearchLg-De3yWxzK.js";import{i as $e}from"./Upload01-BlEOH700.js";import{s as gt}from"./XClose-wkdnmhrB.js";import{u as yt}from"./use-mobile-WPuOYoIV.js";import{f as vt,e as jt,b as wt,A as kt,a as St,d as Nt,c as Pt,g as Ct}from"./alert-dialog-CDARhUOh.js";import{b as Le,D as Me,d as Ve,i as Ot,c as Qe,h as Ye,e as Ge}from"./dialog-Dxe0Jgna.js";import{I as ye}from"./input-C8MQoDCb.js";import{p as Ze,b as M,s as ce,H as je,h as we,a as oe,c as _e,d as et}from"./location-oTTXFrSF.js";import{u as Dt}from"./use-debounced-value-SjJ8k_tD.js";import{c as ke,i as Fe,d as $t,h as Ue,l as tt,m as Ft,n as rt,j as Tt,o as Et}from"./use-org-fs-Ck9VysIz.js";import{f as At,p as Rt,g as zt,u as Bt,e as Lt,a as Mt,F as Se,t as st,S as Vt,B as Ut,b as at,R as Ht,c as Kt}from"./cards-CbRL3hJc.js";import{T as qt}from"./textarea-BDMLJ5G-.js";import{t as It,n as Qt}from"./ChevronUp-B9QGJbr0.js";import{a as We}from"./Palette-DuCZiZH-.js";import{c as Yt}from"./Printer-B2Ij2s1c.js";import{i as Je}from"./X-DejWyAyX.js";import{M as Gt}from"./markdown-BvSl7QX1.js";import{S as Wt}from"./file-share-button-D04rfik7.js";import{L as Jt}from"./preview-dialog-Bg_Wo7YI.js";import{S as lt}from"./skill-preview-BdtuUFgV.js";import{i as Xt}from"./ChevronRight-vY_5m8VB.js";import{t as Zt}from"./Stars01-BmtGexbk.js";import{i as _t}from"./Zap-0km1-ru7.js";import{i as er}from"./GitBranch01-95kZh6WB.js";import{a as tr}from"./use-panel-navigate-ez3OqVq8.js";import"./index-Clbrhj--.js";import"./resizable-DOW_fL7z.js";import"./MessageCircle01-D2dDPrBD.js";import"./thread-route-BzWllNYG.js";import"./use-route-default-main-B8Ci266p.js";import"./hooks-CE7d6Dy1.js";import"./use-mcp-client-DmOwsV3f.js";import"./auth-Cyjh0UQp.js";import"./backoff-8mStPHYB.js";import"./task-board-SlBuwhrX.js";import"./schema-BegvnGCM.js";import"./tooltip-B7VLfO9w.js";import"./index-CFUteTrc.js";import"./toolbar-icon-button-A2ebiBUr.js";import"./DotsVertical-zFAA_as9.js";import"./Download01-CSiLQIib.js";import"./Share07-C4Gw_nzw.js";import"./Globe01-Dej65_H6.js";import"./Key01-CQFO2R8H.js";import"./Trash01-DkwdEhkp.js";import"./dropdown-menu-Bws_0K_q.js";import"./Check-PyGET9iL.js";import"./file-type-icon-C4dI9q_n.js";import"./folder-icon-pWHmymOf.js";import"./skill-md-ChfVs4uF.js";import"./Copy01-BbtQlTnV.js";import"./ZoomOut-BA2ZiotX.js";import"./LinkExternal01-Jetqi62I.js";import"./popover-DAJR0ej2.js";import"./preview-content-Tw_jYCgT.js";import"./file-preview-n35lcg8c.js";import"./utils-D06E4WDv.js";import"./File02-D4JZqTxD.js";import"./Image01-Dd-Rx_B5.js";import"./editor-U5ucetu-.js";import"./use-project-scope-D9t-w7F3.js";import"./use-virtual-mcp-DvSX4N6q.js";import"./github-repo-BknN0SVI.js";function rr(l){const e=l("library.brandComponentsPreview.title"),s=l("library.brandComponentsPreview.subtitle"),r=l("library.brandComponentsPreview.monthlySavingsLabel"),u=l("library.brandComponentsPreview.primaryButton"),n=l("library.brandComponentsPreview.secondaryButton"),o=l("library.brandComponentsPreview.ghostButton"),d=l("library.brandComponentsPreview.successBadge"),i=l("library.brandComponentsPreview.warningBadge"),c=l("library.brandComponentsPreview.errorBadge"),p=l("library.brandComponentsPreview.infoBadge"),h=l("library.brandComponentsPreview.allChip"),m=l("library.brandComponentsPreview.incomeChip"),w=l("library.brandComponentsPreview.spendingChip"),x=l("library.brandComponentsPreview.emailPlaceholder");return`
2
2
  <div class="stack">
3
3
  <div>
4
4
  <h1>${e}</h1>
@@ -26,7 +26,7 @@ import{c as F,b as X,j as t,as as te,I as de,n as Xe,r as T,B as H,ap as Qe,l as
26
26
  <span class="chip">${w}</span>
27
27
  </div>
28
28
  </div>
29
- `}const rr=`
29
+ `}const sr=`
30
30
  *{box-sizing:border-box}
31
31
  body{margin:0;padding:24px;background:var(--brand-bg,#0b0f1a);color:var(--brand-fg,#f5f7ff);font-family:var(--brand-font-body,system-ui,sans-serif);font-size:14px;line-height:1.5}
32
32
  .stack{display:flex;flex-direction:column;gap:18px;max-width:760px}
@@ -47,7 +47,7 @@ import{c as F,b as X,j as t,as as te,I as de,n as Xe,r as T,B as H,ap as Qe,l as
47
47
  .badge-info{background:var(--brand-info-bg,#e8f1ff);color:var(--brand-info-fg,#0b54a8)}
48
48
  .chip{border:1.5px solid var(--brand-border-strong,rgba(255,255,255,.22));border-radius:999px;padding:6px 14px;font-size:13px}
49
49
  .chip-active{background:var(--brand-primary,#0a84ff);border-color:transparent;color:#fff}
50
- `;function sr(l,e){return`<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><style>${l??""}</style><style>${rr}</style></head><body>${e}</body></html>`}function ar(l){const e=F.c(11),{tokensUrl:s}=l,r=X(),u=ke(s??"");if(s&&u.isPending){let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(te,{className:"h-full w-full rounded-xl"})}),e[0]=p):p=e[0],p}let n;e[1]!==r?(n=r("library.brandComponentsPreview.iframeTitle"),e[1]=r,e[2]=n):n=e[2];const o=n;let d,i;if(e[3]!==o||e[4]!==r||e[5]!==u.data){const p=tr(r);d=o,i=sr(u.data??null,p),e[3]=o,e[4]=r,e[5]=u.data,e[6]=d,e[7]=i}else d=e[6],i=e[7];let c;return e[8]!==d||e[9]!==i?(c=t.jsx("iframe",{title:d,srcDoc:i,sandbox:"",className:"block h-full w-full border-0 bg-white"}),e[8]=d,e[9]=i,e[10]=c):c=e[10],c}const lr="Theme preview",nr=[`<section class="slide-center">
50
+ `;function ar(l,e){return`<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><style>${l??""}</style><style>${sr}</style></head><body>${e}</body></html>`}function lr(l){const e=F.c(11),{tokensUrl:s}=l,r=X(),u=ke(s??"");if(s&&u.isPending){let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(te,{className:"h-full w-full rounded-xl"})}),e[0]=p):p=e[0],p}let n;e[1]!==r?(n=r("library.brandComponentsPreview.iframeTitle"),e[1]=r,e[2]=n):n=e[2];const o=n;let d,i;if(e[3]!==o||e[4]!==r||e[5]!==u.data){const p=rr(r);d=o,i=ar(u.data??null,p),e[3]=o,e[4]=r,e[5]=u.data,e[6]=d,e[7]=i}else d=e[6],i=e[7];let c;return e[8]!==d||e[9]!==i?(c=t.jsx("iframe",{title:d,srcDoc:i,sandbox:"",className:"block h-full w-full border-0 bg-white"}),e[8]=d,e[9]=i,e[10]=c):c=e[10],c}const nr="Theme preview",ir=[`<section class="slide-center">
51
51
  <p class="eyebrow">Brand deck</p>
52
52
  <h1 class="deck-h1">Your brand, on every slide</h1>
53
53
  <p class="deck-sub">A live preview of each slide layout in your brand style.</p>
@@ -158,4 +158,4 @@ import{c as F,b as X,j as t,as as te,I as de,n as Xe,r as T,B as H,ap as Qe,l as
158
158
  <p class="cta">slides-create --theme &hellip;</p>
159
159
  </section>`].join(`
160
160
 
161
- `);function ir(l,e){const s=e?`<style>${e}</style>`:"";return l.replaceAll("{{{slides}}}",nr).replaceAll("{{title}}",lr).replace(/(src=")(\/deck-runtime\/)/g,`$1${window.location.origin}$2`).replace("</head>",`${s}</head>`)}function or(l){const e=F.c(8),{readUrl:s,title:r,tokensUrl:u}=l,n=ke(s),o=ke(u??"");if(n.isPending||u&&o.isPending){let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(te,{className:"aspect-[16/9] w-full max-w-3xl rounded-xl"})}),e[0]=p):p=e[0],p}if(n.isError||!n.data){let p;return e[1]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This theme is no longer available."}),e[1]=p):p=e[1],p}const d=o.data??null;let i;e[2]!==d||e[3]!==n.data?(i=ir(n.data,d),e[2]=d,e[3]=n.data,e[4]=i):i=e[4];let c;return e[5]!==i||e[6]!==r?(c=t.jsx("iframe",{title:r,srcDoc:i,sandbox:"allow-scripts",className:"block h-full w-full border-0 bg-white"}),e[5]=i,e[6]=r,e[7]=c):c=e[7],c}function ge(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-sm font-medium text-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function cr(l){const e=F.c(16),{family:s,tokens:r,editing:u,valueOf:n,onEdit:o}=l;let d;e[0]!==s?(d=t.jsx("span",{className:"text-xs text-muted-foreground",children:s}),e[0]=s,e[1]=d):d=e[1];let i;if(e[2]!==u||e[3]!==o||e[4]!==r||e[5]!==n){let h;e[7]!==u||e[8]!==o||e[9]!==n?(h=m=>{const w=n(m),x=`${m.name.replace(/^--brand-/,"")}: ${w}`;return u&&/^#/.test(w)?t.jsx("input",{type:"color","aria-label":m.name,title:x,value:Bt(w),onChange:y=>o(m.name,y.target.value),className:"size-7 cursor-pointer rounded-md border border-border/60 bg-transparent p-0.5"},m.name):t.jsx("span",{title:x,className:"size-7 rounded-md border border-border/60",style:{backgroundColor:w}},m.name)},e[7]=u,e[8]=o,e[9]=n,e[10]=h):h=e[10],i=r.map(h),e[2]=u,e[3]=o,e[4]=r,e[5]=n,e[6]=i}else i=e[6];let c;e[11]!==i?(c=t.jsx("div",{className:"flex flex-wrap gap-1",children:i}),e[11]=i,e[12]=c):c=e[12];let p;return e[13]!==d||e[14]!==c?(p=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15],p}function dr(l){const e=F.c(9),{token:s,value:r}=l;if(s.kind==="space"){let n;return e[0]!==r?(n=t.jsx("span",{className:"flex h-7 w-16 shrink-0 items-center",children:t.jsx("span",{className:"h-1.5 rounded-full bg-primary",style:{width:r,maxWidth:"100%"}})}),e[0]=r,e[1]=n):n=e[1],n}if(s.kind==="radius"){let n;return e[2]!==r?(n=t.jsx("span",{className:"size-7 shrink-0 border border-border bg-muted/50",style:{borderRadius:r}}),e[2]=r,e[3]=n):n=e[3],n}if(s.kind==="shadow"){let n;return e[4]!==r?(n=t.jsx("span",{className:"size-7 shrink-0 rounded-md bg-background",style:{boxShadow:r}}),e[4]=r,e[5]=n):n=e[5],n}if(s.kind==="type"&&/^--brand-text-/.test(s.name)){const n=`min(${r}, 22px)`;let o;return e[6]!==n?(o=t.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden leading-none text-foreground",style:{fontSize:n},children:"Ag"}),e[6]=n,e[7]=o):o=e[7],o}let u;return e[8]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"size-7 shrink-0"}),e[8]=u):u=e[8],u}function nt(l){const e=F.c(17),{token:s,value:r,editing:u,onEdit:n}=l;let o;e[0]!==s||e[1]!==r?(o=t.jsx(dr,{token:s,value:r}),e[0]=s,e[1]=r,e[2]=o):o=e[2];let d;if(e[3]!==s.name){let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=/^--brand-/,e[5]=h):h=e[5],d=s.name.replace(h,""),e[3]=s.name,e[4]=d}else d=e[4];let i;e[6]!==d?(i=t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:d}),e[6]=d,e[7]=i):i=e[7];let c;e[8]!==u||e[9]!==n||e[10]!==s.name||e[11]!==r?(c=u?t.jsx(ye,{value:r,onChange:h=>n(s.name,h.target.value),className:"h-8 w-40 font-mono text-xs"}):t.jsx("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:r}),e[8]=u,e[9]=n,e[10]=s.name,e[11]=r,e[12]=c):c=e[12];let p;return e[13]!==o||e[14]!==i||e[15]!==c?(p=t.jsxs("div",{className:"flex items-center gap-3",children:[o,i,c]}),e[13]=o,e[14]=i,e[15]=c,e[16]=p):p=e[16],p}function xe(l){const e=F.c(16),{label:s,tokens:r,editing:u,valueOf:n,onEdit:o}=l;if(r.length===0)return null;let d;e[0]!==s?(d=t.jsx(ge,{children:s}),e[0]=s,e[1]=d):d=e[1];let i;if(e[2]!==u||e[3]!==o||e[4]!==r||e[5]!==n){let h;e[7]!==u||e[8]!==o||e[9]!==n?(h=m=>t.jsx(nt,{token:m,value:n(m),editing:u,onEdit:o},m.name),e[7]=u,e[8]=o,e[9]=n,e[10]=h):h=e[10],i=r.map(h),e[2]=u,e[3]=o,e[4]=r,e[5]=n,e[6]=i}else i=e[6];let c;e[11]!==i?(c=t.jsx("div",{className:"flex flex-col gap-2.5",children:i}),e[11]=i,e[12]=c):c=e[12];let p;return e[13]!==d||e[14]!==c?(p=t.jsxs("div",{className:"flex flex-col gap-3",children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15],p}function ur({brandPath:l,onClose:e,variant:s}){const r=X(),{org:u}=de(),n=Ze(l),o=n.volume??"",d=n.dirPath,i=M(d),c=n.readOnly,p=Xe(),h=Fe(),m=Dt(o),{upload:w,remove:x}=Ue(o),y=T.useRef(null),C=tt(o,d),D=C.data??[],N=a=>D.some(b=>b.kind==="file"&&M(b.path)===a),k=N("tokens.css"),P=N("brand.md"),g=N("slides-theme.html"),$=Et(D),S=h(o,`${d}/tokens.css`),j=h(o,`${d}/brand.md`),O=h(o,`${d}/slides-theme.html`),V=ke(S,{enabled:k}),Y=ke(j,{enabled:P}),[v,E]=T.useState(!1),[z,G]=T.useState({}),[I,W]=T.useState(null),[U,A]=T.useState(!1),[K,f]=T.useState(!1),[q,se]=T.useState("deck"),Q=V.data?At(V.data):[],ue=a=>Q.find(b=>b.name===a)?.value,B=a=>z[a.name]??a.value,Z=Rt(Q),ae=Q.filter(a=>a.kind==="font"),pe=Q.filter(a=>a.kind==="type"),me=Q.filter(a=>a.kind==="space"),Ee=Q.filter(a=>a.kind==="radius"),Ne=Q.filter(a=>a.kind==="shadow"),le=Q.filter(a=>a.kind==="motion"),Pe=Q.filter(a=>a.kind==="other"),J=(a,b)=>G(R=>({...R,[a]:b})),ne=g&&q==="deck",fe=I??Y.data??"",he=Object.entries(z).filter(([a,b])=>ue(a)!==b),be=I!==null&&I!==(Y.data??""),Ae=he.length>0||be;function Ce(){G({}),W(null),E(!1)}async function Re(){A(!0);try{if(he.length>0){let a=V.data??"";for(const[b,R]of he)a=zt(a,b,R);await m.mutateAsync({path:`${d}/tokens.css`,body:a,contentType:"text/css; charset=utf-8"}),p.invalidateQueries({queryKey:_.fileText(S)})}be&&I!==null&&(await m.mutateAsync({path:`${d}/brand.md`,body:I,contentType:"text/markdown; charset=utf-8"}),p.invalidateQueries({queryKey:_.fileText(j)})),p.invalidateQueries({queryKey:_.orgFsVolume(u.id,o)}),p.invalidateQueries({queryKey:_.orgFsRecent(u.id)}),G({}),W(null),E(!1),L.success(r("library.brandPreview.brandSaved"))}catch(a){L.error(a instanceof Error?a.message:r("library.brandPreview.failedSaveBrand"))}finally{A(!1)}}async function ze(a){const b=a?.[0];if(!b)return;const ie=`logo.${(b.name.split(".").pop()??"png").toLowerCase()}`;try{await w.mutateAsync({dir:d,files:[new File([b],ie,{type:b.type})]}),$&&M($)!==ie&&await x.mutateAsync($),L.success(r("library.brandPreview.logoUpdated"))}catch(Ie){L.error(Ie instanceof Error?Ie.message:r("library.brandPreview.logoUploadFailed"))}finally{y.current&&(y.current.value="")}}const Be=!C.isPending&&!k&&!P&&!$;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(Je,{size:18})}),s==="dialog"?t.jsx(Ve,{className:"flex-1 truncate text-base font-medium text-foreground",children:i}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:i}),!c&&(v?t.jsxs(t.Fragment,{children:[t.jsx(H,{variant:"ghost",size:"sm",onClick:Ce,disabled:U,children:r("library.brandPreview.cancel")}),t.jsx(H,{size:"sm",disabled:!Ae||U,onClick:()=>{Re()},children:r(U?"library.brandPreview.saving":"library.brandPreview.save")})]}):t.jsxs(H,{variant:"outline",size:"sm",onClick:()=>E(!0),children:[t.jsx(Qt,{size:14}),r("library.brandPreview.edit")]})),s==="dialog"?t.jsx(Ct,{asChild:!0,children:t.jsx(H,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(Qe,{size:16})})}):t.jsx(H,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:e,children:t.jsx(Qe,{size:16})})]}),t.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:C.isPending?t.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[t.jsx(te,{className:"h-40 w-full rounded-xl"}),t.jsx(te,{className:"h-4 w-1/3"}),t.jsx(te,{className:"h-4 w-2/3"})]}):Be?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:r("library.brandPreview.brandNotAvailable")}):t.jsxs(t.Fragment,{children:[(g||k)&&t.jsxs("div",{className:"shrink-0 border-b border-border",children:[t.jsxs("div",{role:"button",tabIndex:0,"aria-label":r(K?"library.brandPreview.showPreview":"library.brandPreview.hidePreview"),onClick:()=>f(a=>!a),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),f(b=>!b))},className:"flex cursor-pointer items-center justify-between gap-2 px-4 py-2.5 hover:bg-muted/40",children:[t.jsxs("div",{className:"flex gap-0.5 rounded-lg bg-muted p-0.5 text-xs font-medium",onClick:a=>a.stopPropagation(),children:[g&&t.jsx("button",{type:"button",onClick:()=>{se("deck"),f(!1)},className:De("rounded-md px-2.5 py-1",ne?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:r("library.brandPreview.deck")}),t.jsx("button",{type:"button",onClick:()=>{se("components"),f(!1)},className:De("rounded-md px-2.5 py-1",ne?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm"),children:r("library.brandPreview.components")})]}),K?t.jsx(qt,{size:16,className:"shrink-0 text-muted-foreground"}):t.jsx(It,{size:16,className:"shrink-0 text-muted-foreground"})]}),!K&&t.jsx("div",{className:"px-4 pb-4",children:t.jsx("div",{className:De("w-full overflow-hidden rounded-xl border border-border bg-muted/30",ne?"aspect-[16/9]":"h-96"),children:ne?t.jsx(or,{readUrl:O,title:`${i} deck theme`,tokensUrl:S}):t.jsx(ar,{tokensUrl:S})})})]}),t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto p-6",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.logo")}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:"flex size-24 items-center justify-center overflow-hidden rounded-xl border border-border bg-muted/30",children:$?t.jsx("img",{src:h(o,$),alt:`${i} logo`,className:"max-h-full max-w-full object-contain"}):t.jsx(Je,{size:28,className:"text-muted-foreground/50"})}),v&&t.jsxs("div",{children:[t.jsxs(H,{variant:"outline",size:"sm",disabled:w.isPending,onClick:()=>y.current?.click(),children:[t.jsx($e,{size:14}),r($?"library.brandPreview.replaceLogo":"library.brandPreview.addLogo")]}),t.jsx("input",{ref:y,type:"file",accept:"image/*",className:"hidden",onChange:a=>{ze(a.target.files)}})]})]})]}),Z.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.colors")}),Z.map(a=>t.jsx(cr,{family:a.family,tokens:a.tokens,editing:v,valueOf:B,onEdit:J},a.family))]}),(ae.length>0||pe.length>0)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.typography")}),ae.map(a=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:a.name.replace(/^--brand-font-?/,"")||r("library.brandPreview.defaultFont")}),v?t.jsx(ye,{value:B(a),onChange:b=>J(a.name,b.target.value),className:"h-9"}):t.jsx("span",{className:"truncate text-lg text-foreground",style:{fontFamily:B(a)},children:B(a)})]},a.name)),pe.map(a=>t.jsx(nt,{token:a,value:B(a),editing:v,onEdit:J},a.name))]}),t.jsx(xe,{label:r("library.brandPreview.spacing"),tokens:me,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.radius"),tokens:Ee,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.shadows"),tokens:Ne,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.motion"),tokens:le,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.tokens"),tokens:Pe,editing:v,valueOf:B,onEdit:J}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.voiceGuidelines")}),v?t.jsx(Kt,{value:fe,onChange:a=>W(a.target.value),placeholder:r("library.brandPreview.voicePlaceholder"),className:"min-h-48 font-mono text-sm"}):Y.isPending&&P?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(te,{className:"h-3 w-full"}),t.jsx(te,{className:"h-3 w-5/6"})]}):fe.trim()?t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:t.jsx(Yt,{id:`brand-preview-${l}`,text:fe})}):t.jsx("p",{className:"text-sm text-muted-foreground",children:r("library.brandPreview.noVoiceYet")})]})]})]})})]})}function it(l){const e=F.c(8),{brandPath:s,onClose:r}=l;let u;e[0]!==r?(u=d=>{d||r()},e[0]=r,e[1]=u):u=e[1];let n;e[2]!==s||e[3]!==r?(n=t.jsx(Le,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl!",closeButtonClassName:"hidden",children:t.jsx(ur,{brandPath:s,onClose:r,variant:"dialog"})}),e[2]=s,e[3]=r,e[4]=n):n=e[4];let o;return e[5]!==u||e[6]!==n?(o=t.jsx(Me,{open:!0,onOpenChange:u,children:n}),e[5]=u,e[6]=n,e[7]=o):o=e[7],o}function pr(l){const e=F.c(11),{onOpenDir:s}=l,r=X(),u=Lt();let n;e[0]!==u.data?(n=u.data??[],e[0]=u.data,e[1]=n):n=e[1];let o;if(e[2]!==s||e[3]!==r||e[4]!==n){let i;e[6]!==s||e[7]!==r?(i=c=>t.jsx(Se,{name:c.volume,glyph:_t,tone:"system",readOnly:!0,meta:`${c.repoOwner}/${c.repoName}`,subtitle:c.lastSyncError?r("library.syncedRepos.syncFailed"):c.lastSyncedAt?r("library.syncedRepos.syncedAgo",{ago:st(c.lastSyncedAt)}):r("library.syncedRepos.waitingFirstSync"),onOpen:()=>s(c.volume)},c.id),e[6]=s,e[7]=r,e[8]=i):i=e[8],o=n.map(i),e[2]=s,e[3]=r,e[4]=n,e[5]=o}else o=e[5];let d;return e[9]!==o?(d=t.jsx(t.Fragment,{children:o}),e[9]=o,e[10]=d):d=e[10],d}function Ke(l){return`${window.location.origin}${l}`}function ve(l){if(l.shareMode==="password")return"password";if(l.shareMode==="public"||l.readPublic)return"public";if(l.effectivePublic)return"inherited"}const mr=[je,"uploads","outputs"],ot=[{volume:"uploads",descriptionKey:"library.libraryViews.volumeUploadsDescription",glyph:$e},{volume:"outputs",descriptionKey:"library.libraryViews.volumeOutputsDescription",glyph:Xt}],He=new Set([...ot.map(l=>l.volume),ce("public")]),fr=6;function ct(l,e,s){const r=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"",u=_e(l),n=u?`public/${u}`:l==="home"?we(s):l;return r?`${n}/${r}`:n}function Oe(l,e,s){return{onDragStart:r=>{s.onDragStart?.(l),r.dataTransfer.effectAllowed="move",r.dataTransfer.setData("application/x-studio-library-path",l)},onContextMenu:r=>{r.preventDefault(),s.onContextMenu?.(l,e)},onDrop:s.onDrop?r=>{r.preventDefault();const u=r.dataTransfer.getData("application/x-studio-library-path");u&&u!==l&&!l.startsWith(u+"/")&&s.onDrop(u,l)}:void 0}}function re(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-[13px] text-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function ee(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("div",{className:"@container",children:t.jsx("div",{className:"grid grid-cols-1 gap-3 @[440px]:grid-cols-2 @[660px]:grid-cols-3",children:s})}),e[0]=s,e[1]=r):r=e[1],r}function Te(l){const e=F.c(2),{rows:s}=l,r=s===void 0?1:s;let u;return e[0]!==r?(u=t.jsx(ee,{children:Array.from({length:r*3},hr)}),e[0]=r,e[1]=u):u=e[1],u}function hr(l,e){return t.jsx(te,{className:"h-16 rounded-2xl"},e)}function qe(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function br(l){const e=F.c(12),{volume:s,descriptionKey:r,glyph:u,onOpen:n}=l,o=X(),d=Tt(s);let i;e[0]!==o||e[1]!==d.data?(i=d.data?o("library.libraryViews.filesCount",{count:d.data.files}):void 0,e[0]=o,e[1]=d.data,e[2]=i):i=e[2];let c;e[3]!==r||e[4]!==o?(c=o(r),e[3]=r,e[4]=o,e[5]=c):c=e[5];let p;return e[6]!==u||e[7]!==n||e[8]!==i||e[9]!==c||e[10]!==s?(p=t.jsx(Se,{name:s,meta:i,subtitle:c,glyph:u,tone:"system",onOpen:n}),e[6]=u,e[7]=n,e[8]=i,e[9]=c,e[10]=s,e[11]=p):p=e[11],p}function xr(l){const e=F.c(12),{onOpenDir:s}=l,r=X(),n=rt().data?.length??0;let o;e[0]!==s?(o=ot.map(p=>t.jsx(br,{volume:p.volume,descriptionKey:p.descriptionKey,glyph:p.glyph,onOpen:()=>s(p.volume)},p.volume)),e[0]=s,e[1]=o):o=e[1];let d;e[2]!==s||e[3]!==n||e[4]!==r?(d=n>0&&t.jsx(Se,{name:ce("public"),meta:r("library.libraryViews.skillSetsCount",{count:n}),subtitle:r("library.libraryViews.curatedSkillSetsReadOnly"),glyph:Zt,tone:"system",readOnly:!0,onOpen:()=>s("public")}),e[2]=s,e[3]=n,e[4]=r,e[5]=d):d=e[5];let i;e[6]!==s?(i=t.jsx(pr,{onOpenDir:s}),e[6]=s,e[7]=i):i=e[7];let c;return e[8]!==o||e[9]!==d||e[10]!==i?(c=t.jsxs(t.Fragment,{children:[o,d,i]}),e[8]=o,e[9]=d,e[10]=i,e[11]=c):c=e[11],c}function gr(l){const e=F.c(19),{segments:s,onNavigate:r}=l,{org:u}=de();let n;e[0]!==s?(n=s[0]===je?s.slice(1):s,e[0]=s,e[1]=n):n=e[1];const o=n,d=s.length-o.length,i=o.length===0;let c;e[2]!==i||e[3]!==r||e[4]!==u.slug?(c=i?t.jsx("span",{className:"truncate font-medium text-foreground",children:we(u.slug)}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>r(je),children:we(u.slug)}),e[2]=i,e[3]=r,e[4]=u.slug,e[5]=c):c=e[5];let p;if(e[6]!==d||e[7]!==r||e[8]!==o||e[9]!==s){let m;e[11]!==d||e[12]!==r||e[13]!==o.length||e[14]!==s?(m=(w,x)=>{const y=s.slice(0,d+x+1).join("/"),C=x===o.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(Jt,{size:12,className:"shrink-0 text-muted-foreground"}),C?t.jsx("span",{className:"truncate font-medium text-foreground",children:ce(w)}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>r(y),children:ce(w)})]},y)},e[11]=d,e[12]=r,e[13]=o.length,e[14]=s,e[15]=m):m=e[15],p=o.map(m),e[6]=d,e[7]=r,e[8]=o,e[9]=s,e[10]=p}else p=e[10];let h;return e[16]!==c||e[17]!==p?(h=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[c,p]}),e[16]=c,e[17]=p,e[18]=h):h=e[18],h}function yr(l){const e=F.c(43),{query:s,scope:r,stale:u,onOpenFile:n,onShare:o,onDelete:d}=l,i=X(),{org:c}=de(),p=Fe(),h=$t(s,r);let m;e[0]!==p||e[1]!==o?(m=S=>o({volume:S.volume,path:S.path,kind:"file",shareMode:S.shareMode??"private",effectivePublic:S.effectivePublic??!1,url:Ke(p(S.volume,S.path))}),e[0]=p,e[1]=o,e[2]=m):m=e[2];const w=m;if(h.isPending){let S;return e[3]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Te,{rows:2}),e[3]=S):S=e[3],S}let x,y,C,D,N;if(e[4]!==s||e[5]!==h.data||e[6]!==h.isPlaceholderData||e[7]!==u||e[8]!==i){N=Symbol.for("react.early_return_sentinel");e:{if(y=h.data??[],y.length===0){let j;e[14]!==s||e[15]!==i?(j=i("library.libraryViews.noFilesMatch",{query:s}),e[14]=s,e[15]=i,e[16]=j):j=e[16];let O;e[17]!==j?(O=t.jsx(qe,{children:j}),e[17]=j,e[18]=O):O=e[18],N=O;break e}const S=(u||h.isPlaceholderData)&&"opacity-50";e[19]!==S?(D=De("flex flex-col gap-3",S),e[19]=S,e[20]=D):D=e[20],x=re,C=i("library.libraryViews.searchResults",{count:y.length})}e[4]=s,e[5]=h.data,e[6]=h.isPlaceholderData,e[7]=u,e[8]=i,e[9]=x,e[10]=y,e[11]=C,e[12]=D,e[13]=N}else x=e[9],y=e[10],C=e[11],D=e[12],N=e[13];if(N!==Symbol.for("react.early_return_sentinel"))return N;let k;e[21]!==x||e[22]!==C?(k=t.jsx(x,{children:C}),e[21]=x,e[22]=C,e[23]=k):k=e[23];let P;if(e[24]!==p||e[25]!==d||e[26]!==n||e[27]!==c||e[28]!==y||e[29]!==w){let S;e[31]!==p||e[32]!==d||e[33]!==n||e[34]!==c||e[35]!==w?(S=j=>{const O=_e(j.volume)!==null;return t.jsx(at,{filename:M(j.path),updatedAt:j.updatedAt,downloadUrl:p(j.volume,j.path),subtitle:ct(j.volume,j.path,c.slug),publicState:ve(j),onOpen:()=>n(et(j.volume,j.path)),onShare:O?void 0:()=>w(j),onDelete:O?void 0:()=>d({volume:j.volume,path:j.path,kind:"file"})},`${j.volume}/${j.path}`)},e[31]=p,e[32]=d,e[33]=n,e[34]=c,e[35]=w,e[36]=S):S=e[36],P=y.map(S),e[24]=p,e[25]=d,e[26]=n,e[27]=c,e[28]=y,e[29]=w,e[30]=P}else P=e[30];let g;e[37]!==P?(g=t.jsx(ee,{children:P}),e[37]=P,e[38]=g):g=e[38];let $;return e[39]!==D||e[40]!==k||e[41]!==g?($=t.jsxs("div",{className:D,children:[k,g]}),e[39]=D,e[40]=k,e[41]=g,e[42]=$):$=e[42],$}function vr(l){const e=F.c(39),{onOpenFile:s,onShare:r,onDelete:u}=l,n=X(),{org:o}=de(),d=Ft(),i=Fe();let c;e[0]!==i||e[1]!==r?(c=N=>r({volume:N.volume,path:N.path,kind:"file",shareMode:N.shareMode??"private",effectivePublic:N.effectivePublic??!1,url:Ke(i(N.volume,N.path))}),e[0]=i,e[1]=r,e[2]=c):c=e[2];const p=c;if(d.isPending){let N;e[3]!==n?(N=n("library.libraryViews.recentlyAdded"),e[3]=n,e[4]=N):N=e[4];let k;e[5]!==N?(k=t.jsx(re,{children:N}),e[5]=N,e[6]=k):k=e[6];let P;e[7]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Te,{}),e[7]=P):P=e[7];let g;return e[8]!==k?(g=t.jsxs("div",{className:"flex flex-col gap-3",children:[k,P]}),e[8]=k,e[9]=g):g=e[9],g}let h,m,w,x,y;if(e[10]!==i||e[11]!==u||e[12]!==s||e[13]!==o||e[14]!==d.data||e[15]!==p||e[16]!==n){y=Symbol.for("react.early_return_sentinel");e:{const N=(d.data??[]).slice(0,fr);if(N.length===0){y=null;break e}w="flex flex-col gap-3";let k;e[22]!==n?(k=n("library.libraryViews.recentlyAdded"),e[22]=n,e[23]=k):k=e[23],e[24]!==k?(x=t.jsx(re,{children:k}),e[24]=k,e[25]=x):x=e[25],h=ee;let P;e[26]!==i||e[27]!==u||e[28]!==s||e[29]!==o||e[30]!==p?(P=g=>t.jsx(Ut,{filename:M(g.path),updatedAt:g.updatedAt,size:g.size,downloadUrl:i(g.volume,g.path),subtitle:ct(g.volume,g.path,o.slug),publicState:ve(g),onOpen:()=>s(et(g.volume,g.path)),onShare:()=>p(g),onDelete:()=>u({volume:g.volume,path:g.path,kind:"file"})},`${g.volume}/${g.path}`),e[26]=i,e[27]=u,e[28]=s,e[29]=o,e[30]=p,e[31]=P):P=e[31],m=N.map(P)}e[10]=i,e[11]=u,e[12]=s,e[13]=o,e[14]=d.data,e[15]=p,e[16]=n,e[17]=h,e[18]=m,e[19]=w,e[20]=x,e[21]=y}else h=e[17],m=e[18],w=e[19],x=e[20],y=e[21];if(y!==Symbol.for("react.early_return_sentinel"))return y;let C;e[32]!==h||e[33]!==m?(C=t.jsx(h,{children:m}),e[32]=h,e[33]=m,e[34]=C):C=e[34];let D;return e[35]!==w||e[36]!==x||e[37]!==C?(D=t.jsxs("div",{className:w,children:[x,C]}),e[35]=w,e[36]=x,e[37]=C,e[38]=D):D=e[38],D}function jr(l){const e=F.c(16),{onOpenDir:s}=l,r=X(),u=rt();if(u.isPending){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Te,{}),e[0]=c):c=e[0],c}let n;e[1]!==u.data?(n=u.data??[],e[1]=u.data,e[2]=n):n=e[2];const o=n;if(o.length===0){let c;e[3]!==r?(c=r("library.libraryViews.noPublicSkillSetsConfigured"),e[3]=r,e[4]=c):c=e[4];let p;return e[5]!==c?(p=t.jsx(qe,{children:c}),e[5]=c,e[6]=p):p=e[6],p}let d;if(e[7]!==s||e[8]!==o||e[9]!==r){let c;e[11]!==s||e[12]!==r?(c=p=>t.jsx(Se,{name:p,subtitle:r("library.libraryViews.readOnly"),readOnly:!0,onOpen:()=>s(`public/${p}`)},p),e[11]=s,e[12]=r,e[13]=c):c=e[13],d=o.map(c),e[7]=s,e[8]=o,e[9]=r,e[10]=d}else d=e[10];let i;return e[14]!==d?(i=t.jsx(ee,{children:d}),e[14]=d,e[15]=i):i=e[15],i}function wr(l){const e=F.c(63),{location:s,onOpenDir:r,onOpenFile:u,onOpenSkill:n,onOpenBrand:o,onShare:d,onDelete:i,onDragStart:c,onContextMenu:p,onMove:h}=l,m=X(),{org:w}=de(),x=s.volume??"",y=tt(x,s.dirPath),C=Fe();let D;e[0]!==s.isHomeRoot||e[1]!==w?(D=v=>s.isHomeRoot&&He.has(v.toLowerCase())?`${we(w.slug)}/${v}`:void 0,e[0]=s.isHomeRoot,e[1]=w,e[2]=D):D=e[2];const N=D;let k;e[3]!==s.isHomeRoot||e[4]!==r?(k=s.isHomeRoot?t.jsx(xr,{onOpenDir:r}):null,e[3]=s.isHomeRoot,e[4]=r,e[5]=k):k=e[5];const P=k;if(y.isPending){let v;e[6]!==P||e[7]!==m?(v=P&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.folders")}),t.jsx(ee,{children:P})]}),e[6]=P,e[7]=m,e[8]=v):v=e[8];let E;e[9]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Te,{rows:2}),e[9]=E):E=e[9];let z;return e[10]!==v?(z=t.jsxs(t.Fragment,{children:[v,E]}),e[10]=v,e[11]=z):z=e[11],z}if(y.isError){let v;e[12]!==y.error||e[13]!==m?(v=y.error instanceof Error?y.error.message:m("library.libraryViews.failedToLoad"),e[12]=y.error,e[13]=m,e[14]=v):v=e[14];let E;return e[15]!==v?(E=t.jsx("p",{className:"text-sm text-destructive",children:v}),e[15]=v,e[16]=E):E=e[16],E}let g,$,S,j,O;if(e[17]!==N||e[18]!==C||e[19]!==y.data||e[20]!==s||e[21]!==p||e[22]!==i||e[23]!==c||e[24]!==h||e[25]!==o||e[26]!==r||e[27]!==u||e[28]!==n||e[29]!==d||e[30]!==P||e[31]!==m||e[32]!==x){O=Symbol.for("react.early_return_sentinel");e:{const v=y.data??[],E=v.filter(Pr),z=v.filter(Nr),G=v.filter(Sr),I=v.filter(kr);if(v.length===0&&!s.isHomeRoot){let f;e[38]!==s.readOnly||e[39]!==m?(f=s.readOnly?m("library.libraryViews.emptyReadOnlySet"):m("library.libraryViews.emptyFolder"),e[38]=s.readOnly,e[39]=m,e[40]=f):f=e[40];let q;e[41]!==f?(q=t.jsx(qe,{children:f}),e[41]=f,e[42]=q):q=e[42],O=q;break e}let W;e[43]!==s.readOnly||e[44]!==i||e[45]!==x?(W=f=>s.readOnly?void 0:()=>i({volume:x,path:f.path,kind:f.kind}),e[43]=s.readOnly,e[44]=i,e[45]=x,e[46]=W):W=e[46];const U=W;let A;e[47]!==C||e[48]!==s.readOnly||e[49]!==d||e[50]!==x?(A=f=>s.readOnly?void 0:()=>d({volume:x,path:f.path,kind:f.kind,shareMode:f.shareMode??"private",effectivePublic:f.effectivePublic??!1,url:f.kind==="file"?Ke(C(x,f.path)):void 0}),e[47]=C,e[48]=s.readOnly,e[49]=d,e[50]=x,e[51]=A):A=e[51];const K=A;g=E.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.skills")}),t.jsx(ee,{children:E.map(f=>t.jsx(Mt,{dirName:M(f.path),updatedAt:f.updatedAt,skillMdUrl:C(x,`${f.path}/SKILL.md`),publicState:ve(f),onOpen:()=>n(oe(s,f.path)),onBrowse:()=>r(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p})},f.path))})]}),$=z.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.brands")}),t.jsx(ee,{children:z.map(f=>t.jsx(Vt,{dirName:M(f.path),updatedAt:f.updatedAt,tokensUrl:C(x,`${f.path}/tokens.css`),onOpen:()=>o(oe(s,f.path)),onBrowse:()=>r(oe(s,f.path)),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p})},f.path))})]}),S=(G.length>0||P)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.folders")}),t.jsxs(ee,{children:[P,G.map(f=>t.jsx(Se,{name:M(f.path),meta:st(f.updatedAt),subtitle:N(M(f.path)),readOnly:s.readOnly,publicState:ve(f),onOpen:()=>r(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p,onDrop:h})},f.path))]})]}),j=I.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.files")}),t.jsx(ee,{children:I.map(f=>t.jsx(at,{filename:M(f.path),updatedAt:f.updatedAt,downloadUrl:C(x,f.path),publicState:ve(f),onOpen:()=>u(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"file",{onDragStart:c,onContextMenu:p})},f.path))})]})}e[17]=N,e[18]=C,e[19]=y.data,e[20]=s,e[21]=p,e[22]=i,e[23]=c,e[24]=h,e[25]=o,e[26]=r,e[27]=u,e[28]=n,e[29]=d,e[30]=P,e[31]=m,e[32]=x,e[33]=g,e[34]=$,e[35]=S,e[36]=j,e[37]=O}else g=e[33],$=e[34],S=e[35],j=e[36],O=e[37];if(O!==Symbol.for("react.early_return_sentinel"))return O;let V;e[52]!==s.isHomeRoot||e[53]!==i||e[54]!==u||e[55]!==d?(V=s.isHomeRoot&&t.jsx(vr,{onOpenFile:u,onShare:d,onDelete:i}),e[52]=s.isHomeRoot,e[53]=i,e[54]=u,e[55]=d,e[56]=V):V=e[56];let Y;return e[57]!==g||e[58]!==$||e[59]!==S||e[60]!==j||e[61]!==V?(Y=t.jsxs(t.Fragment,{children:[g,$,S,j,V]}),e[57]=g,e[58]=$,e[59]=S,e[60]=j,e[61]=V,e[62]=Y):Y=e[62],Y}function kr(l){return l.kind==="file"}function Sr(l){return l.kind==="dir"&&!l.hasSkill&&!l.hasBrand}function Nr(l){return l.kind==="dir"&&l.hasBrand&&!l.hasSkill}function Pr(l){return l.kind==="dir"&&l.hasSkill}function Cr({onOpenFile:l,onOpenSkill:e,onOpenBrand:s}={}){const r=X(),{org:u}=de(),n=Xe(),o=dt(),d=ut(),i=pt({strict:!1}),c=i.path||je,p=Ze(c),h=Ht(),m=p.volume!==null&&h.has(p.volume)?{...p,readOnly:!0}:p,w=(a,b)=>o({to:".",search:R=>({...R,[a]:b||void 0})}),x=a=>w("path",a),y=(a,b)=>o({to:".",search:R=>({...R,preview:void 0,skill:void 0,brand:void 0,[a]:b})}),C=l??(a=>y("preview",a)),D=e??(a=>y("skill",a)),N=s??(a=>y("brand",a)),[k,P]=T.useState(""),g=Ot(k.trim(),300),$=!m.isHomeRoot&&m.volume!==null?{volume:m.volume,prefix:m.dirPath}:void 0,S=$?r("library.library.searchInPlaceholder",{folder:ce(m.segments.at(-1)??"")}):r("library.library.searchPlaceholder"),j=m.isHomeRoot?we(u.slug):ce(m.segments.at(-1)??""),[O,V]=T.useState(null),[Y,v]=T.useState(null),[E,z]=T.useState(!1),[G,I]=T.useState(""),[W,U]=T.useState(!1),[A,K]=T.useState(null),[f,q]=T.useState(""),se=T.useRef(null),[Q,ue]=T.useState(!1),B=T.useRef(0),Z=m.readOnly?null:m.volume,{upload:ae,mkdir:pe,move:me}=Ue(Z??je),{remove:Ee}=Ue(O?.volume??"uploads");async function Ne(a){if(!(!Z||!a||a.length===0))try{await ae.mutateAsync({dir:m.dirPath,files:[...a]}),L.success(a.length===1?r("library.library.uploadedSingle",{filename:a[0]?.name??""}):r("library.library.uploadedMultiple",{count:a.length}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.uploadFailed"))}finally{se.current&&(se.current.value="")}}const le=Z!==null;function Pe(a){return a.dataTransfer.types.includes("Files")}function J(a){!le||!Pe(a)||(a.preventDefault(),B.current+=1,ue(!0))}function ne(a){!le||!Pe(a)||a.preventDefault()}function fe(){le&&(B.current=Math.max(0,B.current-1),B.current===0&&ue(!1))}function he(a){le&&(a.preventDefault(),a.stopPropagation(),B.current=0,ue(!1),a.dataTransfer.files.length>0&&Ne(a.dataTransfer.files))}async function be(){const a=G.trim();if(!(!Z||!a)){if(m.isHomeRoot&&He.has(a.toLowerCase())){L.error(r("library.library.folderNameReserved",{name:a}));return}try{const b=m.dirPath;await pe.mutateAsync(b?`${b}/${a}`:a),L.success(r("library.library.folderCreated",{name:a})),z(!1),I("")}catch(b){L.error(b instanceof Error?b.message:r("library.library.folderCreateFailed"))}}}async function Ae(){if(!O)return;const a=O;try{await Ee.mutateAsync(a.path),L.success(r("library.library.deleted",{name:M(a.path)}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.deleteFailed"))}finally{V(null)}}async function Ce(){if(!A)return;const a=f.trim();if(!a||a.includes("/")||a.includes("..")||a===M(A.path)){U(!1),K(null),q("");return}if(A.kind==="dir"&&m.isHomeRoot&&He.has(a.toLowerCase())){L.error(r("library.library.folderNameReserved",{name:a}));return}try{const b=A.path.includes("/")?A.path.slice(0,A.path.lastIndexOf("/")):"",R=b?`${b}/${a}`:a;await me.mutateAsync({from:A.path,to:R});const ie=a.replace(/[<>]/g,"");L.success(r("library.library.renamed",{name:ie}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.renameFailed"))}finally{U(!1),K(null),q("")}}async function Re(a,b){try{const R=M(a),ie=b?`${b}/${R}`:R;await me.mutateAsync({from:a,to:ie}),L.success(r("library.library.moved",{name:R,destination:b||r("library.library.theLibrary")}))}catch(R){L.error(R instanceof Error?R.message:r("library.library.moveFailed"))}}function ze(){for(const a of mr)n.invalidateQueries({queryKey:_.orgFsVolume(u.id,a)});m.volume&&n.invalidateQueries({queryKey:_.orgFsVolume(u.id,m.volume)}),n.invalidateQueries({queryKey:_.orgFsRecent(u.id)}),n.invalidateQueries({queryKey:_.orgFsSearchRoot(u.id)}),n.invalidateQueries({queryKey:_.orgFsPublicSets(u.id)})}function Be(a){a.defaultPrevented||!Z||a.target.closest("input, textarea, button, a, [role='button']")||(a.preventDefault(),z(!0))}return t.jsxs("div",{className:"relative h-full",onDragEnter:J,onDragOver:ne,onDragLeave:fe,onDrop:he,onContextMenu:Be,children:[Q&&t.jsx("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-background/80 p-6 backdrop-blur-sm",children:t.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-2xl border-2 border-dashed border-primary px-10 py-8 text-center",children:[t.jsx($e,{size:28,className:"text-primary"}),t.jsx("p",{className:"text-sm font-medium text-foreground",children:r("library.library.dropToUpload",{location:j})})]})}),t.jsx("div",{className:"h-full overflow-y-auto",children:t.jsxs("div",{className:"mx-auto flex w-full max-w-[900px] flex-col gap-10 px-6 py-10 lg:px-10",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("div",{className:"min-w-0 flex-1 basis-full sm:basis-auto",children:t.jsx(gr,{segments:m.segments,onNavigate:x})}),t.jsxs("div",{className:"relative w-full shrink-0 sm:w-56",children:[t.jsx(xt,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted-foreground"}),t.jsx(ye,{value:k,onChange:a=>P(a.target.value),onKeyDown:a=>{a.key==="Escape"&&P("")},placeholder:S,className:"h-9 rounded-xl pr-9 pl-9"}),k&&t.jsx(H,{variant:"ghost",size:"icon",className:"absolute top-1/2 right-1.5 size-7 -translate-y-1/2",onClick:()=>P(""),"aria-label":r("library.library.clearSearch"),children:t.jsx(gt,{size:14})})]}),t.jsx(H,{variant:"ghost",size:"icon",onClick:ze,"aria-label":r("library.library.refresh"),children:t.jsx(mt,{size:14})}),Z&&t.jsxs(H,{variant:"outline",size:"sm",onClick:()=>z(!0),children:[t.jsx(bt,{size:14}),r("library.library.newFolder")]}),m.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(ht,{size:12}),r("library.library.readOnly")]}):t.jsxs(H,{size:"sm",disabled:ae.isPending,onClick:()=>se.current?.click(),children:[t.jsx($e,{size:14}),ae.isPending?r("library.library.uploading"):r("library.library.uploadFile")]}),t.jsx("input",{ref:se,type:"file",multiple:!0,className:"hidden",onChange:a=>{Ne(a.target.files)}})]}),g?t.jsx(yr,{query:g,scope:$,stale:k.trim()!==g,onOpenFile:C,onShare:v,onDelete:V}):m.volume===null?t.jsx(jr,{onOpenDir:x}):t.jsx(wr,{location:m,onOpenDir:x,onOpenFile:C,onOpenSkill:D,onOpenBrand:N,onShare:v,onDelete:V,onContextMenu:(a,b)=>{K({path:a,kind:b}),q(M(a)),U(!0)},onMove:Re},m.volume)]})}),d&&(i.preview?t.jsx(Wt,{previewPath:i.preview,onClose:()=>w("preview",null)}):i.skill?t.jsx(lt,{skillPath:i.skill,onClose:()=>w("skill",null)},i.skill):i.brand?t.jsx(it,{brandPath:i.brand,onClose:()=>w("brand",null)},i.brand):null),t.jsx(Me,{open:E,onOpenChange:z,children:t.jsxs(Le,{children:[t.jsxs(Ye,{children:[t.jsx(Ve,{children:r("library.library.newFolderTitle")}),t.jsx(Ge,{children:r("library.library.newFolderDescription",{path:j||r("library.library.theLibrary")})})]}),t.jsx(ye,{autoFocus:!0,placeholder:r("library.library.folderNamePlaceholder"),value:G,onChange:a=>I(a.target.value),onKeyDown:a=>{a.key==="Enter"&&be()}}),t.jsxs(We,{children:[t.jsx(H,{variant:"outline",onClick:()=>z(!1),children:r("library.library.cancel")}),t.jsx(H,{disabled:!G.trim()||pe.isPending,onClick:()=>{be()},children:r("library.library.create")})]})]})}),t.jsx(Me,{open:W,onOpenChange:a=>{U(a),a||(K(null),q(""))},children:t.jsxs(Le,{children:[t.jsxs(Ye,{children:[t.jsx(Ve,{children:A&&r("library.library.renameTitle",{name:M(A.path)})}),t.jsx(Ge,{children:r("library.library.renameDescription")})]}),t.jsx(ye,{autoFocus:!0,value:f,onChange:a=>q(a.target.value),onKeyDown:a=>{a.key==="Enter"&&Ce()}}),t.jsxs(We,{children:[t.jsx(H,{variant:"outline",onClick:()=>U(!1),children:r("library.library.cancel")}),t.jsx(H,{disabled:!f.trim()||me.isPending,onClick:()=>{Ce()},children:r("library.library.rename")})]})]})}),t.jsx(Gt,{target:Y,onOpenChange:a=>{a||v(null)}}),t.jsx(yt,{open:O!==null,onOpenChange:a=>{a||V(null)},children:t.jsxs(vt,{children:[t.jsxs(jt,{children:[t.jsx(wt,{children:r("library.library.deleteTitle",{name:O?M(O.path):""})}),t.jsx(kt,{children:O?.kind==="dir"?r("library.library.deleteDirectoryDescription"):r("library.library.deleteFileDescription")})]}),t.jsxs(St,{children:[t.jsx(Nt,{children:r("library.library.cancel")}),t.jsx(Pt,{onClick:()=>{Ae()},children:r("library.library.delete")})]})]})})]})}function Or(){const l=F.c(10),{openPanel:e}=er(),[s,r]=T.useState(null),[u,n]=T.useState(null);let o;l[0]!==e?(o=t.jsx(Cr,{onOpenFile:p=>e(ft(p)),onOpenSkill:r,onOpenBrand:n}),l[0]=e,l[1]=o):o=l[1];let d;l[2]!==s?(d=s&&t.jsx(lt,{skillPath:s,onClose:()=>r(null)},s),l[2]=s,l[3]=d):d=l[3];let i;l[4]!==u?(i=u&&t.jsx(it,{brandPath:u,onClose:()=>n(null)},u),l[4]=u,l[5]=i):i=l[5];let c;return l[6]!==o||l[7]!==d||l[8]!==i?(c=t.jsxs("div",{className:"flex flex-col h-full min-h-0 overflow-hidden",children:[o,d,i]}),l[6]=o,l[7]=d,l[8]=i,l[9]=c):c=l[9],c}function Os(){const l=F.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Or,{}),l[0]=e):e=l[0],e}export{Os as default};
161
+ `);function or(l,e){const s=e?`<style>${e}</style>`:"";return l.replaceAll("{{{slides}}}",ir).replaceAll("{{title}}",nr).replace(/(src=")(\/deck-runtime\/)/g,`$1${window.location.origin}$2`).replace("</head>",`${s}</head>`)}function cr(l){const e=F.c(8),{readUrl:s,title:r,tokensUrl:u}=l,n=ke(s),o=ke(u??"");if(n.isPending||u&&o.isPending){let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(te,{className:"aspect-[16/9] w-full max-w-3xl rounded-xl"})}),e[0]=p):p=e[0],p}if(n.isError||!n.data){let p;return e[1]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This theme is no longer available."}),e[1]=p):p=e[1],p}const d=o.data??null;let i;e[2]!==d||e[3]!==n.data?(i=or(n.data,d),e[2]=d,e[3]=n.data,e[4]=i):i=e[4];let c;return e[5]!==i||e[6]!==r?(c=t.jsx("iframe",{title:r,srcDoc:i,sandbox:"allow-scripts",className:"block h-full w-full border-0 bg-white"}),e[5]=i,e[6]=r,e[7]=c):c=e[7],c}function ge(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-sm font-medium text-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function dr(l){const e=F.c(16),{family:s,tokens:r,editing:u,valueOf:n,onEdit:o}=l;let d;e[0]!==s?(d=t.jsx("span",{className:"text-xs text-muted-foreground",children:s}),e[0]=s,e[1]=d):d=e[1];let i;if(e[2]!==u||e[3]!==o||e[4]!==r||e[5]!==n){let h;e[7]!==u||e[8]!==o||e[9]!==n?(h=m=>{const w=n(m),x=`${m.name.replace(/^--brand-/,"")}: ${w}`;return u&&/^#/.test(w)?t.jsx("input",{type:"color","aria-label":m.name,title:x,value:Lt(w),onChange:y=>o(m.name,y.target.value),className:"size-7 cursor-pointer rounded-md border border-border/60 bg-transparent p-0.5"},m.name):t.jsx("span",{title:x,className:"size-7 rounded-md border border-border/60",style:{backgroundColor:w}},m.name)},e[7]=u,e[8]=o,e[9]=n,e[10]=h):h=e[10],i=r.map(h),e[2]=u,e[3]=o,e[4]=r,e[5]=n,e[6]=i}else i=e[6];let c;e[11]!==i?(c=t.jsx("div",{className:"flex flex-wrap gap-1",children:i}),e[11]=i,e[12]=c):c=e[12];let p;return e[13]!==d||e[14]!==c?(p=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15],p}function ur(l){const e=F.c(9),{token:s,value:r}=l;if(s.kind==="space"){let n;return e[0]!==r?(n=t.jsx("span",{className:"flex h-7 w-16 shrink-0 items-center",children:t.jsx("span",{className:"h-1.5 rounded-full bg-primary",style:{width:r,maxWidth:"100%"}})}),e[0]=r,e[1]=n):n=e[1],n}if(s.kind==="radius"){let n;return e[2]!==r?(n=t.jsx("span",{className:"size-7 shrink-0 border border-border bg-muted/50",style:{borderRadius:r}}),e[2]=r,e[3]=n):n=e[3],n}if(s.kind==="shadow"){let n;return e[4]!==r?(n=t.jsx("span",{className:"size-7 shrink-0 rounded-md bg-background",style:{boxShadow:r}}),e[4]=r,e[5]=n):n=e[5],n}if(s.kind==="type"&&/^--brand-text-/.test(s.name)){const n=`min(${r}, 22px)`;let o;return e[6]!==n?(o=t.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden leading-none text-foreground",style:{fontSize:n},children:"Ag"}),e[6]=n,e[7]=o):o=e[7],o}let u;return e[8]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"size-7 shrink-0"}),e[8]=u):u=e[8],u}function nt(l){const e=F.c(17),{token:s,value:r,editing:u,onEdit:n}=l;let o;e[0]!==s||e[1]!==r?(o=t.jsx(ur,{token:s,value:r}),e[0]=s,e[1]=r,e[2]=o):o=e[2];let d;if(e[3]!==s.name){let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=/^--brand-/,e[5]=h):h=e[5],d=s.name.replace(h,""),e[3]=s.name,e[4]=d}else d=e[4];let i;e[6]!==d?(i=t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:d}),e[6]=d,e[7]=i):i=e[7];let c;e[8]!==u||e[9]!==n||e[10]!==s.name||e[11]!==r?(c=u?t.jsx(ye,{value:r,onChange:h=>n(s.name,h.target.value),className:"h-8 w-40 font-mono text-xs"}):t.jsx("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:r}),e[8]=u,e[9]=n,e[10]=s.name,e[11]=r,e[12]=c):c=e[12];let p;return e[13]!==o||e[14]!==i||e[15]!==c?(p=t.jsxs("div",{className:"flex items-center gap-3",children:[o,i,c]}),e[13]=o,e[14]=i,e[15]=c,e[16]=p):p=e[16],p}function xe(l){const e=F.c(16),{label:s,tokens:r,editing:u,valueOf:n,onEdit:o}=l;if(r.length===0)return null;let d;e[0]!==s?(d=t.jsx(ge,{children:s}),e[0]=s,e[1]=d):d=e[1];let i;if(e[2]!==u||e[3]!==o||e[4]!==r||e[5]!==n){let h;e[7]!==u||e[8]!==o||e[9]!==n?(h=m=>t.jsx(nt,{token:m,value:n(m),editing:u,onEdit:o},m.name),e[7]=u,e[8]=o,e[9]=n,e[10]=h):h=e[10],i=r.map(h),e[2]=u,e[3]=o,e[4]=r,e[5]=n,e[6]=i}else i=e[6];let c;e[11]!==i?(c=t.jsx("div",{className:"flex flex-col gap-2.5",children:i}),e[11]=i,e[12]=c):c=e[12];let p;return e[13]!==d||e[14]!==c?(p=t.jsxs("div",{className:"flex flex-col gap-3",children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15],p}function pr({brandPath:l,onClose:e,variant:s}){const r=X(),{org:u}=de(),n=Ze(l),o=n.volume??"",d=n.dirPath,i=M(d),c=n.readOnly,p=Xe(),h=Fe(),m=$t(o),{upload:w,remove:x}=Ue(o),y=T.useRef(null),C=tt(o,d),D=C.data??[],N=a=>D.some(b=>b.kind==="file"&&M(b.path)===a),k=N("tokens.css"),P=N("brand.md"),g=N("slides-theme.html"),$=At(D),S=h(o,`${d}/tokens.css`),j=h(o,`${d}/brand.md`),O=h(o,`${d}/slides-theme.html`),V=ke(S,{enabled:k}),Y=ke(j,{enabled:P}),[v,E]=T.useState(!1),[z,G]=T.useState({}),[I,W]=T.useState(null),[U,A]=T.useState(!1),[K,f]=T.useState(!1),[q,se]=T.useState("deck"),Q=V.data?Rt(V.data):[],ue=a=>Q.find(b=>b.name===a)?.value,B=a=>z[a.name]??a.value,Z=zt(Q),ae=Q.filter(a=>a.kind==="font"),pe=Q.filter(a=>a.kind==="type"),me=Q.filter(a=>a.kind==="space"),Ee=Q.filter(a=>a.kind==="radius"),Ne=Q.filter(a=>a.kind==="shadow"),le=Q.filter(a=>a.kind==="motion"),Pe=Q.filter(a=>a.kind==="other"),J=(a,b)=>G(R=>({...R,[a]:b})),ne=g&&q==="deck",fe=I??Y.data??"",he=Object.entries(z).filter(([a,b])=>ue(a)!==b),be=I!==null&&I!==(Y.data??""),Ae=he.length>0||be;function Ce(){G({}),W(null),E(!1)}async function Re(){A(!0);try{if(he.length>0){let a=V.data??"";for(const[b,R]of he)a=Bt(a,b,R);await m.mutateAsync({path:`${d}/tokens.css`,body:a,contentType:"text/css; charset=utf-8"}),p.invalidateQueries({queryKey:_.fileText(S)})}be&&I!==null&&(await m.mutateAsync({path:`${d}/brand.md`,body:I,contentType:"text/markdown; charset=utf-8"}),p.invalidateQueries({queryKey:_.fileText(j)})),p.invalidateQueries({queryKey:_.orgFsVolume(u.id,o)}),p.invalidateQueries({queryKey:_.orgFsRecent(u.id)}),G({}),W(null),E(!1),L.success(r("library.brandPreview.brandSaved"))}catch(a){L.error(a instanceof Error?a.message:r("library.brandPreview.failedSaveBrand"))}finally{A(!1)}}async function ze(a){const b=a?.[0];if(!b)return;const ie=`logo.${(b.name.split(".").pop()??"png").toLowerCase()}`;try{await w.mutateAsync({dir:d,files:[new File([b],ie,{type:b.type})]}),$&&M($)!==ie&&await x.mutateAsync($),L.success(r("library.brandPreview.logoUpdated"))}catch(Ie){L.error(Ie instanceof Error?Ie.message:r("library.brandPreview.logoUploadFailed"))}finally{y.current&&(y.current.value="")}}const Be=!C.isPending&&!k&&!P&&!$;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(We,{size:18})}),s==="dialog"?t.jsx(Ve,{className:"flex-1 truncate text-base font-medium text-foreground",children:i}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:i}),!c&&(v?t.jsxs(t.Fragment,{children:[t.jsx(H,{variant:"ghost",size:"sm",onClick:Ce,disabled:U,children:r("library.brandPreview.cancel")}),t.jsx(H,{size:"sm",disabled:!Ae||U,onClick:()=>{Re()},children:r(U?"library.brandPreview.saving":"library.brandPreview.save")})]}):t.jsxs(H,{variant:"outline",size:"sm",onClick:()=>E(!0),children:[t.jsx(Yt,{size:14}),r("library.brandPreview.edit")]})),s==="dialog"?t.jsx(Ot,{asChild:!0,children:t.jsx(H,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(Je,{size:16})})}):t.jsx(H,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:e,children:t.jsx(Je,{size:16})})]}),t.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:C.isPending?t.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[t.jsx(te,{className:"h-40 w-full rounded-xl"}),t.jsx(te,{className:"h-4 w-1/3"}),t.jsx(te,{className:"h-4 w-2/3"})]}):Be?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:r("library.brandPreview.brandNotAvailable")}):t.jsxs(t.Fragment,{children:[(g||k)&&t.jsxs("div",{className:"shrink-0 border-b border-border",children:[t.jsxs("div",{role:"button",tabIndex:0,"aria-label":r(K?"library.brandPreview.showPreview":"library.brandPreview.hidePreview"),onClick:()=>f(a=>!a),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),f(b=>!b))},className:"flex cursor-pointer items-center justify-between gap-2 px-4 py-2.5 hover:bg-muted/40",children:[t.jsxs("div",{className:"flex gap-0.5 rounded-lg bg-muted p-0.5 text-xs font-medium",onClick:a=>a.stopPropagation(),children:[g&&t.jsx("button",{type:"button",onClick:()=>{se("deck"),f(!1)},className:De("rounded-md px-2.5 py-1",ne?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:r("library.brandPreview.deck")}),t.jsx("button",{type:"button",onClick:()=>{se("components"),f(!1)},className:De("rounded-md px-2.5 py-1",ne?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm"),children:r("library.brandPreview.components")})]}),K?t.jsx(It,{size:16,className:"shrink-0 text-muted-foreground"}):t.jsx(Qt,{size:16,className:"shrink-0 text-muted-foreground"})]}),!K&&t.jsx("div",{className:"px-4 pb-4",children:t.jsx("div",{className:De("w-full overflow-hidden rounded-xl border border-border bg-muted/30",ne?"aspect-[16/9]":"h-96"),children:ne?t.jsx(cr,{readUrl:O,title:`${i} deck theme`,tokensUrl:S}):t.jsx(lr,{tokensUrl:S})})})]}),t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto p-6",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.logo")}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:"flex size-24 items-center justify-center overflow-hidden rounded-xl border border-border bg-muted/30",children:$?t.jsx("img",{src:h(o,$),alt:`${i} logo`,className:"max-h-full max-w-full object-contain"}):t.jsx(We,{size:28,className:"text-muted-foreground/50"})}),v&&t.jsxs("div",{children:[t.jsxs(H,{variant:"outline",size:"sm",disabled:w.isPending,onClick:()=>y.current?.click(),children:[t.jsx($e,{size:14}),r($?"library.brandPreview.replaceLogo":"library.brandPreview.addLogo")]}),t.jsx("input",{ref:y,type:"file",accept:"image/*",className:"hidden",onChange:a=>{ze(a.target.files)}})]})]})]}),Z.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.colors")}),Z.map(a=>t.jsx(dr,{family:a.family,tokens:a.tokens,editing:v,valueOf:B,onEdit:J},a.family))]}),(ae.length>0||pe.length>0)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.typography")}),ae.map(a=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:a.name.replace(/^--brand-font-?/,"")||r("library.brandPreview.defaultFont")}),v?t.jsx(ye,{value:B(a),onChange:b=>J(a.name,b.target.value),className:"h-9"}):t.jsx("span",{className:"truncate text-lg text-foreground",style:{fontFamily:B(a)},children:B(a)})]},a.name)),pe.map(a=>t.jsx(nt,{token:a,value:B(a),editing:v,onEdit:J},a.name))]}),t.jsx(xe,{label:r("library.brandPreview.spacing"),tokens:me,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.radius"),tokens:Ee,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.shadows"),tokens:Ne,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.motion"),tokens:le,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.tokens"),tokens:Pe,editing:v,valueOf:B,onEdit:J}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.voiceGuidelines")}),v?t.jsx(qt,{value:fe,onChange:a=>W(a.target.value),placeholder:r("library.brandPreview.voicePlaceholder"),className:"min-h-48 font-mono text-sm"}):Y.isPending&&P?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(te,{className:"h-3 w-full"}),t.jsx(te,{className:"h-3 w-5/6"})]}):fe.trim()?t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:t.jsx(Gt,{id:`brand-preview-${l}`,text:fe})}):t.jsx("p",{className:"text-sm text-muted-foreground",children:r("library.brandPreview.noVoiceYet")})]})]})]})})]})}function it(l){const e=F.c(8),{brandPath:s,onClose:r}=l;let u;e[0]!==r?(u=d=>{d||r()},e[0]=r,e[1]=u):u=e[1];let n;e[2]!==s||e[3]!==r?(n=t.jsx(Le,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl!",closeButtonClassName:"hidden",children:t.jsx(pr,{brandPath:s,onClose:r,variant:"dialog"})}),e[2]=s,e[3]=r,e[4]=n):n=e[4];let o;return e[5]!==u||e[6]!==n?(o=t.jsx(Me,{open:!0,onOpenChange:u,children:n}),e[5]=u,e[6]=n,e[7]=o):o=e[7],o}function mr(l){const e=F.c(11),{onOpenDir:s}=l,r=X(),u=Mt();let n;e[0]!==u.data?(n=u.data??[],e[0]=u.data,e[1]=n):n=e[1];let o;if(e[2]!==s||e[3]!==r||e[4]!==n){let i;e[6]!==s||e[7]!==r?(i=c=>t.jsx(Se,{name:c.volume,glyph:er,tone:"system",readOnly:!0,meta:`${c.repoOwner}/${c.repoName}`,subtitle:c.lastSyncError?r("library.syncedRepos.syncFailed"):c.lastSyncedAt?r("library.syncedRepos.syncedAgo",{ago:st(c.lastSyncedAt)}):r("library.syncedRepos.waitingFirstSync"),onOpen:()=>s(c.volume)},c.id),e[6]=s,e[7]=r,e[8]=i):i=e[8],o=n.map(i),e[2]=s,e[3]=r,e[4]=n,e[5]=o}else o=e[5];let d;return e[9]!==o?(d=t.jsx(t.Fragment,{children:o}),e[9]=o,e[10]=d):d=e[10],d}function Ke(l){return`${window.location.origin}${l}`}function ve(l){if(l.shareMode==="password")return"password";if(l.shareMode==="public"||l.readPublic)return"public";if(l.effectivePublic)return"inherited"}const fr=[je,"uploads","outputs"],ot=[{volume:"uploads",descriptionKey:"library.libraryViews.volumeUploadsDescription",glyph:$e},{volume:"outputs",descriptionKey:"library.libraryViews.volumeOutputsDescription",glyph:Zt}],He=new Set([...ot.map(l=>l.volume),ce("public")]),hr=6;function ct(l,e,s){const r=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"",u=_e(l),n=u?`public/${u}`:l==="home"?we(s):l;return r?`${n}/${r}`:n}function Oe(l,e,s){return{onDragStart:r=>{s.onDragStart?.(l),r.dataTransfer.effectAllowed="move",r.dataTransfer.setData("application/x-studio-library-path",l)},onContextMenu:r=>{r.preventDefault(),s.onContextMenu?.(l,e)},onDrop:s.onDrop?r=>{r.preventDefault();const u=r.dataTransfer.getData("application/x-studio-library-path");u&&u!==l&&!l.startsWith(u+"/")&&s.onDrop(u,l)}:void 0}}function re(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-[13px] text-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function ee(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("div",{className:"@container",children:t.jsx("div",{className:"grid grid-cols-1 gap-3 @[440px]:grid-cols-2 @[660px]:grid-cols-3",children:s})}),e[0]=s,e[1]=r):r=e[1],r}function Te(l){const e=F.c(2),{rows:s}=l,r=s===void 0?1:s;let u;return e[0]!==r?(u=t.jsx(ee,{children:Array.from({length:r*3},br)}),e[0]=r,e[1]=u):u=e[1],u}function br(l,e){return t.jsx(te,{className:"h-16 rounded-2xl"},e)}function qe(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function xr(l){const e=F.c(12),{volume:s,descriptionKey:r,glyph:u,onOpen:n}=l,o=X(),d=Et(s);let i;e[0]!==o||e[1]!==d.data?(i=d.data?o("library.libraryViews.filesCount",{count:d.data.files}):void 0,e[0]=o,e[1]=d.data,e[2]=i):i=e[2];let c;e[3]!==r||e[4]!==o?(c=o(r),e[3]=r,e[4]=o,e[5]=c):c=e[5];let p;return e[6]!==u||e[7]!==n||e[8]!==i||e[9]!==c||e[10]!==s?(p=t.jsx(Se,{name:s,meta:i,subtitle:c,glyph:u,tone:"system",onOpen:n}),e[6]=u,e[7]=n,e[8]=i,e[9]=c,e[10]=s,e[11]=p):p=e[11],p}function gr(l){const e=F.c(12),{onOpenDir:s}=l,r=X(),n=rt().data?.length??0;let o;e[0]!==s?(o=ot.map(p=>t.jsx(xr,{volume:p.volume,descriptionKey:p.descriptionKey,glyph:p.glyph,onOpen:()=>s(p.volume)},p.volume)),e[0]=s,e[1]=o):o=e[1];let d;e[2]!==s||e[3]!==n||e[4]!==r?(d=n>0&&t.jsx(Se,{name:ce("public"),meta:r("library.libraryViews.skillSetsCount",{count:n}),subtitle:r("library.libraryViews.curatedSkillSetsReadOnly"),glyph:_t,tone:"system",readOnly:!0,onOpen:()=>s("public")}),e[2]=s,e[3]=n,e[4]=r,e[5]=d):d=e[5];let i;e[6]!==s?(i=t.jsx(mr,{onOpenDir:s}),e[6]=s,e[7]=i):i=e[7];let c;return e[8]!==o||e[9]!==d||e[10]!==i?(c=t.jsxs(t.Fragment,{children:[o,d,i]}),e[8]=o,e[9]=d,e[10]=i,e[11]=c):c=e[11],c}function yr(l){const e=F.c(19),{segments:s,onNavigate:r}=l,{org:u}=de();let n;e[0]!==s?(n=s[0]===je?s.slice(1):s,e[0]=s,e[1]=n):n=e[1];const o=n,d=s.length-o.length,i=o.length===0;let c;e[2]!==i||e[3]!==r||e[4]!==u.slug?(c=i?t.jsx("span",{className:"truncate font-medium text-foreground",children:we(u.slug)}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>r(je),children:we(u.slug)}),e[2]=i,e[3]=r,e[4]=u.slug,e[5]=c):c=e[5];let p;if(e[6]!==d||e[7]!==r||e[8]!==o||e[9]!==s){let m;e[11]!==d||e[12]!==r||e[13]!==o.length||e[14]!==s?(m=(w,x)=>{const y=s.slice(0,d+x+1).join("/"),C=x===o.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(Xt,{size:12,className:"shrink-0 text-muted-foreground"}),C?t.jsx("span",{className:"truncate font-medium text-foreground",children:ce(w)}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>r(y),children:ce(w)})]},y)},e[11]=d,e[12]=r,e[13]=o.length,e[14]=s,e[15]=m):m=e[15],p=o.map(m),e[6]=d,e[7]=r,e[8]=o,e[9]=s,e[10]=p}else p=e[10];let h;return e[16]!==c||e[17]!==p?(h=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[c,p]}),e[16]=c,e[17]=p,e[18]=h):h=e[18],h}function vr(l){const e=F.c(43),{query:s,scope:r,stale:u,onOpenFile:n,onShare:o,onDelete:d}=l,i=X(),{org:c}=de(),p=Fe(),h=Ft(s,r);let m;e[0]!==p||e[1]!==o?(m=S=>o({volume:S.volume,path:S.path,kind:"file",shareMode:S.shareMode??"private",effectivePublic:S.effectivePublic??!1,url:Ke(p(S.volume,S.path))}),e[0]=p,e[1]=o,e[2]=m):m=e[2];const w=m;if(h.isPending){let S;return e[3]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Te,{rows:2}),e[3]=S):S=e[3],S}let x,y,C,D,N;if(e[4]!==s||e[5]!==h.data||e[6]!==h.isPlaceholderData||e[7]!==u||e[8]!==i){N=Symbol.for("react.early_return_sentinel");e:{if(y=h.data??[],y.length===0){let j;e[14]!==s||e[15]!==i?(j=i("library.libraryViews.noFilesMatch",{query:s}),e[14]=s,e[15]=i,e[16]=j):j=e[16];let O;e[17]!==j?(O=t.jsx(qe,{children:j}),e[17]=j,e[18]=O):O=e[18],N=O;break e}const S=(u||h.isPlaceholderData)&&"opacity-50";e[19]!==S?(D=De("flex flex-col gap-3",S),e[19]=S,e[20]=D):D=e[20],x=re,C=i("library.libraryViews.searchResults",{count:y.length})}e[4]=s,e[5]=h.data,e[6]=h.isPlaceholderData,e[7]=u,e[8]=i,e[9]=x,e[10]=y,e[11]=C,e[12]=D,e[13]=N}else x=e[9],y=e[10],C=e[11],D=e[12],N=e[13];if(N!==Symbol.for("react.early_return_sentinel"))return N;let k;e[21]!==x||e[22]!==C?(k=t.jsx(x,{children:C}),e[21]=x,e[22]=C,e[23]=k):k=e[23];let P;if(e[24]!==p||e[25]!==d||e[26]!==n||e[27]!==c||e[28]!==y||e[29]!==w){let S;e[31]!==p||e[32]!==d||e[33]!==n||e[34]!==c||e[35]!==w?(S=j=>{const O=_e(j.volume)!==null;return t.jsx(at,{filename:M(j.path),updatedAt:j.updatedAt,downloadUrl:p(j.volume,j.path),subtitle:ct(j.volume,j.path,c.slug),publicState:ve(j),onOpen:()=>n(et(j.volume,j.path)),onShare:O?void 0:()=>w(j),onDelete:O?void 0:()=>d({volume:j.volume,path:j.path,kind:"file"})},`${j.volume}/${j.path}`)},e[31]=p,e[32]=d,e[33]=n,e[34]=c,e[35]=w,e[36]=S):S=e[36],P=y.map(S),e[24]=p,e[25]=d,e[26]=n,e[27]=c,e[28]=y,e[29]=w,e[30]=P}else P=e[30];let g;e[37]!==P?(g=t.jsx(ee,{children:P}),e[37]=P,e[38]=g):g=e[38];let $;return e[39]!==D||e[40]!==k||e[41]!==g?($=t.jsxs("div",{className:D,children:[k,g]}),e[39]=D,e[40]=k,e[41]=g,e[42]=$):$=e[42],$}function jr(l){const e=F.c(39),{onOpenFile:s,onShare:r,onDelete:u}=l,n=X(),{org:o}=de(),d=Tt(),i=Fe();let c;e[0]!==i||e[1]!==r?(c=N=>r({volume:N.volume,path:N.path,kind:"file",shareMode:N.shareMode??"private",effectivePublic:N.effectivePublic??!1,url:Ke(i(N.volume,N.path))}),e[0]=i,e[1]=r,e[2]=c):c=e[2];const p=c;if(d.isPending){let N;e[3]!==n?(N=n("library.libraryViews.recentlyAdded"),e[3]=n,e[4]=N):N=e[4];let k;e[5]!==N?(k=t.jsx(re,{children:N}),e[5]=N,e[6]=k):k=e[6];let P;e[7]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Te,{}),e[7]=P):P=e[7];let g;return e[8]!==k?(g=t.jsxs("div",{className:"flex flex-col gap-3",children:[k,P]}),e[8]=k,e[9]=g):g=e[9],g}let h,m,w,x,y;if(e[10]!==i||e[11]!==u||e[12]!==s||e[13]!==o||e[14]!==d.data||e[15]!==p||e[16]!==n){y=Symbol.for("react.early_return_sentinel");e:{const N=(d.data??[]).slice(0,hr);if(N.length===0){y=null;break e}w="flex flex-col gap-3";let k;e[22]!==n?(k=n("library.libraryViews.recentlyAdded"),e[22]=n,e[23]=k):k=e[23],e[24]!==k?(x=t.jsx(re,{children:k}),e[24]=k,e[25]=x):x=e[25],h=ee;let P;e[26]!==i||e[27]!==u||e[28]!==s||e[29]!==o||e[30]!==p?(P=g=>t.jsx(Ht,{filename:M(g.path),updatedAt:g.updatedAt,size:g.size,downloadUrl:i(g.volume,g.path),subtitle:ct(g.volume,g.path,o.slug),publicState:ve(g),onOpen:()=>s(et(g.volume,g.path)),onShare:()=>p(g),onDelete:()=>u({volume:g.volume,path:g.path,kind:"file"})},`${g.volume}/${g.path}`),e[26]=i,e[27]=u,e[28]=s,e[29]=o,e[30]=p,e[31]=P):P=e[31],m=N.map(P)}e[10]=i,e[11]=u,e[12]=s,e[13]=o,e[14]=d.data,e[15]=p,e[16]=n,e[17]=h,e[18]=m,e[19]=w,e[20]=x,e[21]=y}else h=e[17],m=e[18],w=e[19],x=e[20],y=e[21];if(y!==Symbol.for("react.early_return_sentinel"))return y;let C;e[32]!==h||e[33]!==m?(C=t.jsx(h,{children:m}),e[32]=h,e[33]=m,e[34]=C):C=e[34];let D;return e[35]!==w||e[36]!==x||e[37]!==C?(D=t.jsxs("div",{className:w,children:[x,C]}),e[35]=w,e[36]=x,e[37]=C,e[38]=D):D=e[38],D}function wr(l){const e=F.c(16),{onOpenDir:s}=l,r=X(),u=rt();if(u.isPending){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Te,{}),e[0]=c):c=e[0],c}let n;e[1]!==u.data?(n=u.data??[],e[1]=u.data,e[2]=n):n=e[2];const o=n;if(o.length===0){let c;e[3]!==r?(c=r("library.libraryViews.noPublicSkillSetsConfigured"),e[3]=r,e[4]=c):c=e[4];let p;return e[5]!==c?(p=t.jsx(qe,{children:c}),e[5]=c,e[6]=p):p=e[6],p}let d;if(e[7]!==s||e[8]!==o||e[9]!==r){let c;e[11]!==s||e[12]!==r?(c=p=>t.jsx(Se,{name:p,subtitle:r("library.libraryViews.readOnly"),readOnly:!0,onOpen:()=>s(`public/${p}`)},p),e[11]=s,e[12]=r,e[13]=c):c=e[13],d=o.map(c),e[7]=s,e[8]=o,e[9]=r,e[10]=d}else d=e[10];let i;return e[14]!==d?(i=t.jsx(ee,{children:d}),e[14]=d,e[15]=i):i=e[15],i}function kr(l){const e=F.c(63),{location:s,onOpenDir:r,onOpenFile:u,onOpenSkill:n,onOpenBrand:o,onShare:d,onDelete:i,onDragStart:c,onContextMenu:p,onMove:h}=l,m=X(),{org:w}=de(),x=s.volume??"",y=tt(x,s.dirPath),C=Fe();let D;e[0]!==s.isHomeRoot||e[1]!==w?(D=v=>s.isHomeRoot&&He.has(v.toLowerCase())?`${we(w.slug)}/${v}`:void 0,e[0]=s.isHomeRoot,e[1]=w,e[2]=D):D=e[2];const N=D;let k;e[3]!==s.isHomeRoot||e[4]!==r?(k=s.isHomeRoot?t.jsx(gr,{onOpenDir:r}):null,e[3]=s.isHomeRoot,e[4]=r,e[5]=k):k=e[5];const P=k;if(y.isPending){let v;e[6]!==P||e[7]!==m?(v=P&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.folders")}),t.jsx(ee,{children:P})]}),e[6]=P,e[7]=m,e[8]=v):v=e[8];let E;e[9]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Te,{rows:2}),e[9]=E):E=e[9];let z;return e[10]!==v?(z=t.jsxs(t.Fragment,{children:[v,E]}),e[10]=v,e[11]=z):z=e[11],z}if(y.isError){let v;e[12]!==y.error||e[13]!==m?(v=y.error instanceof Error?y.error.message:m("library.libraryViews.failedToLoad"),e[12]=y.error,e[13]=m,e[14]=v):v=e[14];let E;return e[15]!==v?(E=t.jsx("p",{className:"text-sm text-destructive",children:v}),e[15]=v,e[16]=E):E=e[16],E}let g,$,S,j,O;if(e[17]!==N||e[18]!==C||e[19]!==y.data||e[20]!==s||e[21]!==p||e[22]!==i||e[23]!==c||e[24]!==h||e[25]!==o||e[26]!==r||e[27]!==u||e[28]!==n||e[29]!==d||e[30]!==P||e[31]!==m||e[32]!==x){O=Symbol.for("react.early_return_sentinel");e:{const v=y.data??[],E=v.filter(Cr),z=v.filter(Pr),G=v.filter(Nr),I=v.filter(Sr);if(v.length===0&&!s.isHomeRoot){let f;e[38]!==s.readOnly||e[39]!==m?(f=s.readOnly?m("library.libraryViews.emptyReadOnlySet"):m("library.libraryViews.emptyFolder"),e[38]=s.readOnly,e[39]=m,e[40]=f):f=e[40];let q;e[41]!==f?(q=t.jsx(qe,{children:f}),e[41]=f,e[42]=q):q=e[42],O=q;break e}let W;e[43]!==s.readOnly||e[44]!==i||e[45]!==x?(W=f=>s.readOnly?void 0:()=>i({volume:x,path:f.path,kind:f.kind}),e[43]=s.readOnly,e[44]=i,e[45]=x,e[46]=W):W=e[46];const U=W;let A;e[47]!==C||e[48]!==s.readOnly||e[49]!==d||e[50]!==x?(A=f=>s.readOnly?void 0:()=>d({volume:x,path:f.path,kind:f.kind,shareMode:f.shareMode??"private",effectivePublic:f.effectivePublic??!1,url:f.kind==="file"?Ke(C(x,f.path)):void 0}),e[47]=C,e[48]=s.readOnly,e[49]=d,e[50]=x,e[51]=A):A=e[51];const K=A;g=E.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.skills")}),t.jsx(ee,{children:E.map(f=>t.jsx(Vt,{dirName:M(f.path),updatedAt:f.updatedAt,skillMdUrl:C(x,`${f.path}/SKILL.md`),publicState:ve(f),onOpen:()=>n(oe(s,f.path)),onBrowse:()=>r(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p})},f.path))})]}),$=z.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.brands")}),t.jsx(ee,{children:z.map(f=>t.jsx(Ut,{dirName:M(f.path),updatedAt:f.updatedAt,tokensUrl:C(x,`${f.path}/tokens.css`),onOpen:()=>o(oe(s,f.path)),onBrowse:()=>r(oe(s,f.path)),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p})},f.path))})]}),S=(G.length>0||P)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.folders")}),t.jsxs(ee,{children:[P,G.map(f=>t.jsx(Se,{name:M(f.path),meta:st(f.updatedAt),subtitle:N(M(f.path)),readOnly:s.readOnly,publicState:ve(f),onOpen:()=>r(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p,onDrop:h})},f.path))]})]}),j=I.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.files")}),t.jsx(ee,{children:I.map(f=>t.jsx(at,{filename:M(f.path),updatedAt:f.updatedAt,downloadUrl:C(x,f.path),publicState:ve(f),onOpen:()=>u(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"file",{onDragStart:c,onContextMenu:p})},f.path))})]})}e[17]=N,e[18]=C,e[19]=y.data,e[20]=s,e[21]=p,e[22]=i,e[23]=c,e[24]=h,e[25]=o,e[26]=r,e[27]=u,e[28]=n,e[29]=d,e[30]=P,e[31]=m,e[32]=x,e[33]=g,e[34]=$,e[35]=S,e[36]=j,e[37]=O}else g=e[33],$=e[34],S=e[35],j=e[36],O=e[37];if(O!==Symbol.for("react.early_return_sentinel"))return O;let V;e[52]!==s.isHomeRoot||e[53]!==i||e[54]!==u||e[55]!==d?(V=s.isHomeRoot&&t.jsx(jr,{onOpenFile:u,onShare:d,onDelete:i}),e[52]=s.isHomeRoot,e[53]=i,e[54]=u,e[55]=d,e[56]=V):V=e[56];let Y;return e[57]!==g||e[58]!==$||e[59]!==S||e[60]!==j||e[61]!==V?(Y=t.jsxs(t.Fragment,{children:[g,$,S,j,V]}),e[57]=g,e[58]=$,e[59]=S,e[60]=j,e[61]=V,e[62]=Y):Y=e[62],Y}function Sr(l){return l.kind==="file"}function Nr(l){return l.kind==="dir"&&!l.hasSkill&&!l.hasBrand}function Pr(l){return l.kind==="dir"&&l.hasBrand&&!l.hasSkill}function Cr(l){return l.kind==="dir"&&l.hasSkill}function Or({onOpenFile:l,onOpenSkill:e,onOpenBrand:s}={}){const r=X(),{org:u}=de(),n=Xe(),o=dt(),d=yt(),i=ut({strict:!1}),c=i.path||je,p=Ze(c),h=Kt(),m=p.volume!==null&&h.has(p.volume)?{...p,readOnly:!0}:p,w=(a,b)=>o({to:".",search:R=>({...R,[a]:b||void 0})}),x=a=>w("path",a),y=(a,b)=>o({to:".",search:R=>({...R,preview:void 0,skill:void 0,brand:void 0,[a]:b})}),C=l??(a=>y("preview",a)),D=e??(a=>y("skill",a)),N=s??(a=>y("brand",a)),[k,P]=T.useState(""),g=Dt(k.trim(),300),$=!m.isHomeRoot&&m.volume!==null?{volume:m.volume,prefix:m.dirPath}:void 0,S=$?r("library.library.searchInPlaceholder",{folder:ce(m.segments.at(-1)??"")}):r("library.library.searchPlaceholder"),j=m.isHomeRoot?we(u.slug):ce(m.segments.at(-1)??""),[O,V]=T.useState(null),[Y,v]=T.useState(null),[E,z]=T.useState(!1),[G,I]=T.useState(""),[W,U]=T.useState(!1),[A,K]=T.useState(null),[f,q]=T.useState(""),se=T.useRef(null),[Q,ue]=T.useState(!1),B=T.useRef(0),Z=m.readOnly?null:m.volume,{upload:ae,mkdir:pe,move:me}=Ue(Z??je),{remove:Ee}=Ue(O?.volume??"uploads");async function Ne(a){if(!(!Z||!a||a.length===0))try{await ae.mutateAsync({dir:m.dirPath,files:[...a]}),L.success(a.length===1?r("library.library.uploadedSingle",{filename:a[0]?.name??""}):r("library.library.uploadedMultiple",{count:a.length}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.uploadFailed"))}finally{se.current&&(se.current.value="")}}const le=Z!==null;function Pe(a){return a.dataTransfer.types.includes("Files")}function J(a){!le||!Pe(a)||(a.preventDefault(),B.current+=1,ue(!0))}function ne(a){!le||!Pe(a)||a.preventDefault()}function fe(){le&&(B.current=Math.max(0,B.current-1),B.current===0&&ue(!1))}function he(a){le&&(a.preventDefault(),a.stopPropagation(),B.current=0,ue(!1),a.dataTransfer.files.length>0&&Ne(a.dataTransfer.files))}async function be(){const a=G.trim();if(!(!Z||!a)){if(m.isHomeRoot&&He.has(a.toLowerCase())){L.error(r("library.library.folderNameReserved",{name:a}));return}try{const b=m.dirPath;await pe.mutateAsync(b?`${b}/${a}`:a),L.success(r("library.library.folderCreated",{name:a})),z(!1),I("")}catch(b){L.error(b instanceof Error?b.message:r("library.library.folderCreateFailed"))}}}async function Ae(){if(!O)return;const a=O;try{await Ee.mutateAsync(a.path),L.success(r("library.library.deleted",{name:M(a.path)}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.deleteFailed"))}finally{V(null)}}async function Ce(){if(!A)return;const a=f.trim();if(!a||a.includes("/")||a.includes("..")||a===M(A.path)){U(!1),K(null),q("");return}if(A.kind==="dir"&&m.isHomeRoot&&He.has(a.toLowerCase())){L.error(r("library.library.folderNameReserved",{name:a}));return}try{const b=A.path.includes("/")?A.path.slice(0,A.path.lastIndexOf("/")):"",R=b?`${b}/${a}`:a;await me.mutateAsync({from:A.path,to:R});const ie=a.replace(/[<>]/g,"");L.success(r("library.library.renamed",{name:ie}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.renameFailed"))}finally{U(!1),K(null),q("")}}async function Re(a,b){try{const R=M(a),ie=b?`${b}/${R}`:R;await me.mutateAsync({from:a,to:ie}),L.success(r("library.library.moved",{name:R,destination:b||r("library.library.theLibrary")}))}catch(R){L.error(R instanceof Error?R.message:r("library.library.moveFailed"))}}function ze(){for(const a of fr)n.invalidateQueries({queryKey:_.orgFsVolume(u.id,a)});m.volume&&n.invalidateQueries({queryKey:_.orgFsVolume(u.id,m.volume)}),n.invalidateQueries({queryKey:_.orgFsRecent(u.id)}),n.invalidateQueries({queryKey:_.orgFsSearchRoot(u.id)}),n.invalidateQueries({queryKey:_.orgFsPublicSets(u.id)})}function Be(a){a.defaultPrevented||!Z||a.target.closest("input, textarea, button, a, [role='button']")||(a.preventDefault(),z(!0))}return t.jsxs("div",{className:"relative h-full",onDragEnter:J,onDragOver:ne,onDragLeave:fe,onDrop:he,onContextMenu:Be,children:[Q&&t.jsx("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-background/80 p-6 backdrop-blur-sm",children:t.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-2xl border-2 border-dashed border-primary px-10 py-8 text-center",children:[t.jsx($e,{size:28,className:"text-primary"}),t.jsx("p",{className:"text-sm font-medium text-foreground",children:r("library.library.dropToUpload",{location:j})})]})}),t.jsx("div",{className:"h-full overflow-y-auto",children:t.jsxs("div",{className:"mx-auto flex w-full max-w-[900px] flex-col gap-10 px-6 py-10 lg:px-10",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("div",{className:"min-w-0 flex-1 basis-full sm:basis-auto",children:t.jsx(yr,{segments:m.segments,onNavigate:x})}),t.jsxs("div",{className:"relative w-full shrink-0 sm:w-56",children:[t.jsx(xt,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted-foreground"}),t.jsx(ye,{value:k,onChange:a=>P(a.target.value),onKeyDown:a=>{a.key==="Escape"&&P("")},placeholder:S,className:"h-9 rounded-xl pr-9 pl-9"}),k&&t.jsx(H,{variant:"ghost",size:"icon",className:"absolute top-1/2 right-1.5 size-7 -translate-y-1/2",onClick:()=>P(""),"aria-label":r("library.library.clearSearch"),children:t.jsx(gt,{size:14})})]}),t.jsx(H,{variant:"ghost",size:"icon",onClick:ze,"aria-label":r("library.library.refresh"),children:t.jsx(pt,{size:14})}),Z&&t.jsxs(H,{variant:"outline",size:"sm",onClick:()=>z(!0),children:[t.jsx(bt,{size:14}),r("library.library.newFolder")]}),m.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(ht,{size:12}),r("library.library.readOnly")]}):t.jsxs(H,{size:"sm",disabled:ae.isPending,onClick:()=>se.current?.click(),children:[t.jsx($e,{size:14}),ae.isPending?r("library.library.uploading"):r("library.library.uploadFile")]}),t.jsx("input",{ref:se,type:"file",multiple:!0,className:"hidden",onChange:a=>{Ne(a.target.files)}})]}),g?t.jsx(vr,{query:g,scope:$,stale:k.trim()!==g,onOpenFile:C,onShare:v,onDelete:V}):m.volume===null?t.jsx(wr,{onOpenDir:x}):t.jsx(kr,{location:m,onOpenDir:x,onOpenFile:C,onOpenSkill:D,onOpenBrand:N,onShare:v,onDelete:V,onContextMenu:(a,b)=>{K({path:a,kind:b}),q(M(a)),U(!0)},onMove:Re},m.volume)]})}),d&&(i.preview?t.jsx(Jt,{previewPath:i.preview,onClose:()=>w("preview",null)}):i.skill?t.jsx(lt,{skillPath:i.skill,onClose:()=>w("skill",null)},i.skill):i.brand?t.jsx(it,{brandPath:i.brand,onClose:()=>w("brand",null)},i.brand):null),t.jsx(Me,{open:E,onOpenChange:z,children:t.jsxs(Le,{children:[t.jsxs(Qe,{children:[t.jsx(Ve,{children:r("library.library.newFolderTitle")}),t.jsx(Ye,{children:r("library.library.newFolderDescription",{path:j||r("library.library.theLibrary")})})]}),t.jsx(ye,{autoFocus:!0,placeholder:r("library.library.folderNamePlaceholder"),value:G,onChange:a=>I(a.target.value),onKeyDown:a=>{a.key==="Enter"&&be()}}),t.jsxs(Ge,{children:[t.jsx(H,{variant:"outline",onClick:()=>z(!1),children:r("library.library.cancel")}),t.jsx(H,{disabled:!G.trim()||pe.isPending,onClick:()=>{be()},children:r("library.library.create")})]})]})}),t.jsx(Me,{open:W,onOpenChange:a=>{U(a),a||(K(null),q(""))},children:t.jsxs(Le,{children:[t.jsxs(Qe,{children:[t.jsx(Ve,{children:A&&r("library.library.renameTitle",{name:M(A.path)})}),t.jsx(Ye,{children:r("library.library.renameDescription")})]}),t.jsx(ye,{autoFocus:!0,value:f,onChange:a=>q(a.target.value),onKeyDown:a=>{a.key==="Enter"&&Ce()}}),t.jsxs(Ge,{children:[t.jsx(H,{variant:"outline",onClick:()=>U(!1),children:r("library.library.cancel")}),t.jsx(H,{disabled:!f.trim()||me.isPending,onClick:()=>{Ce()},children:r("library.library.rename")})]})]})}),t.jsx(Wt,{target:Y,onOpenChange:a=>{a||v(null)}}),t.jsx(vt,{open:O!==null,onOpenChange:a=>{a||V(null)},children:t.jsxs(jt,{children:[t.jsxs(wt,{children:[t.jsx(kt,{children:r("library.library.deleteTitle",{name:O?M(O.path):""})}),t.jsx(St,{children:O?.kind==="dir"?r("library.library.deleteDirectoryDescription"):r("library.library.deleteFileDescription")})]}),t.jsxs(Nt,{children:[t.jsx(Pt,{children:r("library.library.cancel")}),t.jsx(Ct,{onClick:()=>{Ae()},children:r("library.library.delete")})]})]})})]})}function Dr(){const l=F.c(10),{openPanel:e}=tr(),[s,r]=T.useState(null),[u,n]=T.useState(null);let o;l[0]!==e?(o=t.jsx(Or,{onOpenFile:p=>e(mt(p)),onOpenSkill:r,onOpenBrand:n}),l[0]=e,l[1]=o):o=l[1];let d;l[2]!==s?(d=s&&t.jsx(lt,{skillPath:s,onClose:()=>r(null)},s),l[2]=s,l[3]=d):d=l[3];let i;l[4]!==u?(i=u&&t.jsx(it,{brandPath:u,onClose:()=>n(null)},u),l[4]=u,l[5]=i):i=l[5];let c;return l[6]!==o||l[7]!==d||l[8]!==i?(c=t.jsxs("div",{className:"flex flex-col h-full min-h-0 overflow-hidden",children:[o,d,i]}),l[6]=o,l[7]=d,l[8]=i,l[9]=c):c=l[9],c}function Ks(){const l=F.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ft.Content,{children:t.jsx(Dr,{})}),l[0]=e):e=l[0],e}export{Ks as default};
@@ -0,0 +1 @@
1
+ import{c as R,a as m,r as _,u as C,j as u,N as y}from"./index-CVJEcf37.js";import{u as U,A as j,a as k}from"./auth-entry-CIc1-YG9.js";import{A as N}from"./auth-split-layout-WGnYlU-M.js";import"./input-C8MQoDCb.js";import"./use-is-desktop-app-BNujXJc_.js";import"./retry-i8LvYSZg.js";import"./backoff-8mStPHYB.js";function O(){const e=R.c(5),t=U(),o=m.useSession();_.useRef(null);const i=t.status,c=o.data!=null,r=o.isPending;let n,s;e[0]!==c||e[1]!==r||e[2]!==i?(n=()=>{},s=[i,c,r],e[0]=c,e[1]=r,e[2]=i,e[3]=n,e[4]=s):(n=e[3],s=e[4]),_.useEffect(n,s)}const h="studio_signup_ref",a="studio_signup_src",$=720*60*60,f=128;function p(e){const t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?.[1]?decodeURIComponent(t[1]):null}function g(e,t){document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=${$}; samesite=lax`}function b(e){e.ref&&e.ref.length<=f&&!p(h)&&g(h,e.ref),e.src&&e.src.length<=f&&!p(a)&&g(a,e.src)}function w(e){if(!e.client_id||e.response_type!=="code")return null;const t=new URLSearchParams;return e.client_id&&t.set("client_id",e.client_id),e.redirect_uri&&t.set("redirect_uri",e.redirect_uri),e.response_type&&t.set("response_type",e.response_type),e.state&&t.set("state",e.state),e.scope&&t.set("scope",e.scope),e.code_challenge&&t.set("code_challenge",e.code_challenge),e.code_challenge_method&&t.set("code_challenge_method",e.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function D(){const e=m.useSession();O();const t=C({from:"/login"}),{next:o="/",client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:x,code_challenge_method:A,src:S,ref:E}=t;b({src:S,ref:E});const d=o.startsWith("/")&&!o.startsWith("//")?o:"/",l=w({client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:x,code_challenge_method:A});return e.data?l?(window.location.href=l,u.jsx(j,{})):u.jsx(y,{to:d}):u.jsx(N,{children:u.jsx(k,{callbackUrl:d,redirectUrl:l})})}export{D as default};