decocms 3.106.1 → 3.108.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/dist/client/assets/{AlertCircle-Xqr6j1ec.js → AlertCircle-CXfHCFxW.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-JIM5EKmo.js → ArrowUpRight-DrIFBuVF.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-0YWte2gD.js → CheckCircle-V4cMbp7k.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-BynJeIwt.js → ChevronDown-yYhj5xP_.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-DQiHQWQL.js → ChevronLeft-eYxyU36o.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-D9yn8jpR.js → ChevronRight-B69CKZdN.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-Cw2uQynG.js → ChevronUp-BYmO7ni8.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-s-I-SeMs.js → DotsVertical-OVel04b-.js} +1 -1
  9. package/dist/client/assets/{Eye-Dy66amqx.js → Eye-DJDSbP4d.js} +1 -1
  10. package/dist/client/assets/{FilterLines-CKjQJFz5.js → FilterLines-Ch9sNilm.js} +1 -1
  11. package/dist/client/assets/{Globe01-ClbfJyVj.js → Globe01-YUd_dhFu.js} +1 -1
  12. package/dist/client/assets/{Globe04-2CK2mPg1.js → Globe04-Bn_dGrXD.js} +1 -1
  13. package/dist/client/assets/{HardDrive-Dx19OIYm.js → HardDrive-i1NQBY0F.js} +1 -1
  14. package/dist/client/assets/{Key01-CYpto-hP.js → Key01-CzuZ2YNH.js} +1 -1
  15. package/dist/client/assets/{LayoutLeft-DfuPk5zB.js → LayoutLeft-DQ4hyaOy.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-BY6pxfcE.js → LinkExternal01-CUaKk4PO.js} +1 -1
  17. package/dist/client/assets/{Monitor01-DIakRasc.js → Monitor01-BMQf5bju.js} +1 -1
  18. package/dist/client/assets/{Palette-BiMvnm3j.js → Palette-DVMpwycK.js} +1 -1
  19. package/dist/client/assets/{Play-RNy-gHCT.js → Play-Da7BpsHX.js} +1 -1
  20. package/dist/client/assets/{Plus-BUzQUcBo.js → Plus-DLu0p3LB.js} +1 -1
  21. package/dist/client/assets/{SearchLg-BrFHn1VQ.js → SearchLg-BG10mFZp.js} +1 -1
  22. package/dist/client/assets/{SearchMd-BCWqgdhj.js → SearchMd-TgGSUo83.js} +1 -1
  23. package/dist/client/assets/{Settings02-e1tD5mMi.js → Settings02-C_i5syXv.js} +1 -1
  24. package/dist/client/assets/{Shield01-CCbPTO_T.js → Shield01-DWhnEyqf.js} +1 -1
  25. package/dist/client/assets/{Star01-K-8uJAnL.js → Star01-DIQdWhPq.js} +1 -1
  26. package/dist/client/assets/{Stars01-DC5B5fh3.js → Stars01-D34hqc6C.js} +1 -1
  27. package/dist/client/assets/{Stars02-D2H5PbBg.js → Stars02-C1ilg1eR.js} +1 -1
  28. package/dist/client/assets/{Sun-BEU2sOPn.js → Sun-DPvbuD5f.js} +1 -1
  29. package/dist/client/assets/{SwitchHorizontal01-CuuAQB1I.js → SwitchHorizontal01-Bp6ZXj5h.js} +1 -1
  30. package/dist/client/assets/{Tool01-CfYPNw_C.js → Tool01--3NfnsTB.js} +1 -1
  31. package/dist/client/assets/{Trash01-mBWH2_eT.js → Trash01-BktfczUu.js} +1 -1
  32. package/dist/client/assets/{Upload01-C5TCL0j-.js → Upload01-BWZGJ0bu.js} +1 -1
  33. package/dist/client/assets/{User01-DLp0deex.js → User01-BE-MaNNT.js} +1 -1
  34. package/dist/client/assets/{Users01-fyeOJNBU.js → Users01-DRAatqmi.js} +1 -1
  35. package/dist/client/assets/{Users03-6gLyEuGv.js → Users03-DNP40ou1.js} +1 -1
  36. package/dist/client/assets/{X-BICfxl5D.js → X-D4V_xKxB.js} +1 -1
  37. package/dist/client/assets/{XCircle-CKou8mpC.js → XCircle-Zk6uYFNc.js} +1 -1
  38. package/dist/client/assets/{XClose-xV2ZQDrx.js → XClose-CJbbgFu-.js} +1 -1
  39. package/dist/client/assets/{Zap-Dc5VDOja.js → Zap-DOCsW5bs.js} +1 -1
  40. package/dist/client/assets/{ZapSquare-O2LJAU94.js → ZapSquare-ZiXXTR85.js} +1 -1
  41. package/dist/client/assets/{ZoomOut-TulSR7oT.js → ZoomOut-CBydRAMI.js} +1 -1
  42. package/dist/client/assets/{access-gate-BgsOEZrK.js → access-gate-Bsc7QUw1.js} +1 -1
  43. package/dist/client/assets/{add-section-modal-BZfRz2dr.js → add-section-modal-DxNRWOxr.js} +1 -1
  44. package/dist/client/assets/{agent-icon-CmJIYKNa.js → agent-icon-Codzh2dR.js} +1 -1
  45. package/dist/client/assets/{agents-list-ClT2kfHF.js → agents-list-D9ga9IUz.js} +1 -1
  46. package/dist/client/assets/{ai-providers-DMmN4ueH.js → ai-providers-BzO5It1w.js} +1 -1
  47. package/dist/client/assets/{alert-BCNR7EVx.js → alert-B08OvpyD.js} +1 -1
  48. package/dist/client/assets/{alert-dialog-ZMN4L58U.js → alert-dialog-Cey7j4CE.js} +1 -1
  49. package/dist/client/assets/app-editor-B_z3STUJ.js +1 -0
  50. package/dist/client/assets/{auth-Ci0maryd.js → auth-D-VB6PXw.js} +1 -1
  51. package/dist/client/assets/{auth-catchall-BZbp3bDE.js → auth-catchall-dvMxAJYZ.js} +1 -1
  52. package/dist/client/assets/{auth-entry-DoyiD20Z.js → auth-entry-Sc8ZEToz.js} +1 -1
  53. package/dist/client/assets/{auth-split-layout-IB7BGkE-.js → auth-split-layout-D1BIRB9g.js} +1 -1
  54. package/dist/client/assets/{authenticate-and-persist-oauth-CZPX5X5k.js → authenticate-and-persist-oauth-CIVGnsAG.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-wzlcI0kv.js → automation-list-row-7n10xHBN.js} +1 -1
  56. package/dist/client/assets/{automation-runs-Cz-auyir.js → automation-runs-DsB-LYLH.js} +1 -1
  57. package/dist/client/assets/{automations-C3n--i43.js → automations-BPKkcs0G.js} +1 -1
  58. package/dist/client/assets/{avatar-Cd0xwXxq.js → avatar-D50rXO9q.js} +1 -1
  59. package/dist/client/assets/{badge-US-X-4MC.js → badge-DuPrh-k9.js} +1 -1
  60. package/dist/client/assets/{block-document-BiB4Wr2c.js → block-document-By66RUPt.js} +1 -1
  61. package/dist/client/assets/{brand-context-BEutrZxI.js → brand-context-4Vmk5sXu.js} +1 -1
  62. package/dist/client/assets/{buckets-DUN5ldCC.js → buckets-aEEOw89Q.js} +1 -1
  63. package/dist/client/assets/{capability-load-error-B8GWHwlL.js → capability-load-error-CKrEiZ0g.js} +1 -1
  64. package/dist/client/assets/{card-B200otkw.js → card-CSk11DrN.js} +1 -1
  65. package/dist/client/assets/category-editor-C8SeZ2oM.js +1 -0
  66. package/dist/client/assets/chat-context-CYJD3lpS.js +28 -0
  67. package/dist/client/assets/{checkbox-DA-oWLyy.js → checkbox-DhghRz0V.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-BLTFgffv.js → cli-auth-success-C7Z3uy0J.js} +1 -1
  69. package/dist/client/assets/{collection-detail-ksU3fola.js → collection-detail-27aQ6HrN.js} +1 -1
  70. package/dist/client/assets/{collection-display-button-CdmxMOBW.js → collection-display-button-BjZ3KkPT.js} +1 -1
  71. package/dist/client/assets/{collection-search-BvmQJq8P.js → collection-search-3g2v_4Ig.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-BLB5SWZa.js → collection-tabs-NH0QHVtb.js} +1 -1
  73. package/dist/client/assets/{command-esgtnpD6.js → command-DuFRSin9.js} +1 -1
  74. package/dist/client/assets/{commerce-onboarding-CmxbKnuZ.js → commerce-onboarding-Fg1zVI63.js} +1 -1
  75. package/dist/client/assets/{connect-desktop-dialog-BBGOPoIq.js → connect-desktop-dialog-C4RGGomP.js} +1 -1
  76. package/dist/client/assets/{connection-card-BH-OGmTu.js → connection-card-Bxwr78j_.js} +1 -1
  77. package/dist/client/assets/{connection-detail-BqcZ4rre.js → connection-detail-CnruFFRa.js} +1 -1
  78. package/dist/client/assets/{connection-form-helpers-Bi2tQByg.js → connection-form-helpers-N3pDB096.js} +1 -1
  79. package/dist/client/assets/{connections-rl2xlhQn.js → connections-C-pSski3.js} +1 -1
  80. package/dist/client/assets/{context-menu-zwWLAMxe.js → context-menu-D_t5y3rp.js} +1 -1
  81. package/dist/client/assets/{decopilot-bUCWwVB7.js → decopilot-D2kjmvQ8.js} +1 -1
  82. package/dist/client/assets/{decopilot-sse-pool-IAlPSPK_.js → decopilot-sse-pool-DaS9jANP.js} +1 -1
  83. package/dist/client/assets/{dialog-BxPiF5oN.js → dialog-59pZJLRI.js} +1 -1
  84. package/dist/client/assets/{domain-settings-CeRsMV94.js → domain-settings-B_IJ176N.js} +1 -1
  85. package/dist/client/assets/{drawer-DaarKmto.js → drawer-CardDBvQ.js} +1 -1
  86. package/dist/client/assets/{dropdown-menu-CZpb3eYC.js → dropdown-menu-KRYgKsut.js} +1 -1
  87. package/dist/client/assets/{empty-state-CAlFsQdU.js → empty-state-DdjF8vs8.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-Dsj4pa-O.js → extract-connection-data-C3rg-zH0.js} +1 -1
  89. package/dist/client/assets/file-explorer-Dbf1GYee.js +2 -0
  90. package/dist/client/assets/{file-type-icon-BwBw9jgA.js → file-type-icon-DE5lANHh.js} +1 -1
  91. package/dist/client/assets/{files-Ywa5pDAk.js → files-ChV7PLN8.js} +1 -1
  92. package/dist/client/assets/{form-Bf2ApXQo.js → form-D9GCz4p7.js} +1 -1
  93. package/dist/client/assets/{general-C7ye12K0.js → general-Dt3BDK6z.js} +1 -1
  94. package/dist/client/assets/{github-repo-picker--XFvpeLm.js → github-repo-picker-CH_d9yqP.js} +1 -1
  95. package/dist/client/assets/{hooks-B9L41m_Y.js → hooks-DXPWHoBZ.js} +1 -1
  96. package/dist/client/assets/{import-from-deco-dialog-CZYRrcZ4.js → import-from-deco-dialog-CaK-LsBV.js} +1 -1
  97. package/dist/client/assets/index-B0PhVd0n.js +1 -0
  98. package/dist/client/assets/{index-B8k191tl.js → index-BNIB-FKU.js} +1 -1
  99. package/dist/client/assets/{index-DBTxlw_P.js → index-BRTT5sEO.js} +1 -1
  100. package/dist/client/assets/{index-Dxw7KXbh.js → index-BkE4vJGC.js} +1 -1
  101. package/dist/client/assets/{index-DqbKvpBX.js → index-C3LTWsPC.js} +1 -1
  102. package/dist/client/assets/{index-CvGS2PsG.js → index-CU99baeo.js} +12 -12
  103. package/dist/client/assets/{index-Q6pGpUHX.js → index-CUeWfuiR.js} +1 -1
  104. package/dist/client/assets/index-D7FZbpdh.js +3 -0
  105. package/dist/client/assets/{index-PCJmXHv-.js → index-DEb9cZMY.js} +1 -1
  106. package/dist/client/assets/{index-gHhgmmKj.js → index-DHU91und.js} +1 -1
  107. package/dist/client/assets/{index-OO3MJk0K.js → index-DxlSlPki.js} +1 -1
  108. package/dist/client/assets/{index-BWgKDEIC.js → index-K4SWWTMm.js} +5 -5
  109. package/dist/client/assets/{index-D9z3Q7j8.js → index-clvydX21.js} +1 -1
  110. package/dist/client/assets/{index-BSJueg0-.js → index-kan1E63X.js} +4 -4
  111. package/dist/client/assets/{index-redirect-B85UW6J0.js → index-redirect-K7OU_kx0.js} +1 -1
  112. package/dist/client/assets/{input-cp_TKu2Y.js → input-CWK_KDxP.js} +1 -1
  113. package/dist/client/assets/{integration-icon-CmIcxQej.js → integration-icon-C9tNQbt4.js} +1 -1
  114. package/dist/client/assets/{label-Bqc_uyUQ.js → label-CShBo-xr.js} +1 -1
  115. package/dist/client/assets/{login-D-sAQcuc.js → login-CLs68272.js} +1 -1
  116. package/dist/client/assets/{mcp-oauth-C63GAzZt.js → mcp-oauth-CRmn6hwI.js} +1 -1
  117. package/dist/client/assets/{members-Cm4EmLJ1.js → members-CX3tAqjr.js} +1 -1
  118. package/dist/client/assets/{monaco-editor-CpkaOm7i.js → monaco-editor-DCdpc6i0.js} +1 -1
  119. package/dist/client/assets/{monitoring-stats-row-DNfFrBf6.js → monitoring-stats-row-CadxzAo4.js} +1 -1
  120. package/dist/client/assets/{oauth-callback-B6xjzh36.js → oauth-callback-CjuKHJXG.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-ai-provider-C4bzhTUi.js → oauth-callback-ai-provider-BWRJmgDm.js} +1 -1
  122. package/dist/client/assets/{onboarding-BOmFCgNY.js → onboarding-red4rHCD.js} +1 -1
  123. package/dist/client/assets/{org-install-DJi_hBJB.js → org-install-Bsn3y6Z3.js} +1 -1
  124. package/dist/client/assets/{org-layout-Dist7T6X.js → org-layout-al_5BNwo.js} +1 -1
  125. package/dist/client/assets/{organization-choice-COX5rRn1.js → organization-choice-DJNr5D-D.js} +1 -1
  126. package/dist/client/assets/{page-seo-form-DeC7xkG4.js → page-seo-form-BuiEAYj4.js} +1 -1
  127. package/dist/client/assets/page-seo-sheet-CCQj63mK.js +1 -0
  128. package/dist/client/assets/{popover-C5HgpX4x.js → popover-Dhad0x9g.js} +1 -1
  129. package/dist/client/assets/post-editor-BQmK2uFu.js +1 -0
  130. package/dist/client/assets/preview-dialog-BvNzeY3T.js +5 -0
  131. package/dist/client/assets/{primitives-DTGB3Mts.js → primitives-Dr1eHlQS.js} +1 -1
  132. package/dist/client/assets/{profile-B3f7KSDE.js → profile-e6Bm5lWR.js} +1 -1
  133. package/dist/client/assets/project-app-view-DYSfhAgu.js +1 -0
  134. package/dist/client/assets/record-editor-bF_UstVB.js +1 -0
  135. package/dist/client/assets/registry-Dm6eGhVz.js +2 -0
  136. package/dist/client/assets/{registry-layout-BuBeN6w1.js → registry-layout-CymZuomq.js} +1 -1
  137. package/dist/client/assets/{require-capability-Ddee1AmI.js → require-capability-B1rUcboM.js} +1 -1
  138. package/dist/client/assets/{required-auth-layout-C5MLQuQM.js → required-auth-layout-s2Bxat9U.js} +1 -1
  139. package/dist/client/assets/{reset-password-BqewD2Xb.js → reset-password-DY5g84O-.js} +1 -1
  140. package/dist/client/assets/{roles-D2yEgJSq.js → roles-Iy3MXVa3.js} +1 -1
  141. package/dist/client/assets/{scroll-area-DQp5D973.js → scroll-area-Xtfwdb7m.js} +2 -2
  142. package/dist/client/assets/{search-input-Be3BJ5YO.js → search-input-DQ6UrvBE.js} +1 -1
  143. package/dist/client/assets/{secrets-yrIWdsoK.js → secrets-CIe2s2f1.js} +1 -1
  144. package/dist/client/assets/{sections-editor-DqTPco-Q.js → sections-editor-DsFaeF53.js} +2 -2
  145. package/dist/client/assets/{select-DTMty5cI.js → select-Do7P1LSG.js} +1 -1
  146. package/dist/client/assets/{select-model-Cv0Zl4px.js → select-model-DlSLJO4Y.js} +1 -1
  147. package/dist/client/assets/seo-editor-Shj7XB4v.js +1 -0
  148. package/dist/client/assets/{settings-layout-CooyVDE-.js → settings-layout-BEHXbjxx.js} +1 -1
  149. package/dist/client/assets/{settings-section-Czv-RCDl.js → settings-section-ZqpVSrVJ.js} +1 -1
  150. package/dist/client/assets/{sheet-BYUn2G0P.js → sheet-CwpMGMQ9.js} +1 -1
  151. package/dist/client/assets/{shell-controls-aiEu-oNo.js → shell-controls-DROWNa_M.js} +1 -1
  152. package/dist/client/assets/{shell-layout-DlX3hQOg.js → shell-layout-BBvvEdo0.js} +1 -1
  153. package/dist/client/assets/{shell-route-loading-B5fcdA3q.js → shell-route-loading-XVhs5R31.js} +1 -1
  154. package/dist/client/assets/{sidebar-bM2CxBRy.js → sidebar-DS_youLc.js} +1 -1
  155. package/dist/client/assets/{skeleton-DGyuQcWM.js → skeleton-Bvrl2WPh.js} +1 -1
  156. package/dist/client/assets/{sortable.esm-BpfhpFW8.js → sortable.esm-LdSILUfx.js} +1 -1
  157. package/dist/client/assets/{sso-4AoXSWbM.js → sso-c2vK4RMY.js} +1 -1
  158. package/dist/client/assets/{store-Di9pgKIN.js → store-DoxveVdc.js} +1 -1
  159. package/dist/client/assets/store-registry-BNTE3Ckc.js +2 -0
  160. package/dist/client/assets/{studio-tools-FVMOC3DG.js → studio-tools-BMwxp5pS.js} +1 -1
  161. package/dist/client/assets/{switch-RrT6wLYL.js → switch-H7aX0suB.js} +1 -1
  162. package/dist/client/assets/{table-FgURfELI.js → table-qhDDbEpO.js} +1 -1
  163. package/dist/client/assets/{tabs-Dyn89gKO.js → tabs-B6eIa2zt.js} +1 -1
  164. package/dist/client/assets/{task-status-ClaTWvtm.js → task-status-D9utHgZw.js} +1 -1
  165. package/dist/client/assets/{textarea-Sgn1Re8l.js → textarea-PSzbbOkb.js} +1 -1
  166. package/dist/client/assets/{toggle-group-DLGm3J-b.js → toggle-group-Bz1hQE3a.js} +1 -1
  167. package/dist/client/assets/{toolbar-CSosPZ4D.js → toolbar-DCCrTBZW.js} +1 -1
  168. package/dist/client/assets/{tooltip-h0yvcJt8.js → tooltip-Ct27xL12.js} +1 -1
  169. package/dist/client/assets/{types-BRex8hoG.js → types-BwDuw3G9.js} +1 -1
  170. package/dist/client/assets/{use-ai-providers-hvnDjM8p.js → use-ai-providers-DFaFMw_I.js} +1 -1
  171. package/dist/client/assets/{use-automations-BKwvpJAo.js → use-automations-uZj9fR0Z.js} +1 -1
  172. package/dist/client/assets/{use-capability-CFzya3JS.js → use-capability-CSJPfpi0.js} +1 -1
  173. package/dist/client/assets/{use-clock-tick-DMIcMeX9.js → use-clock-tick-uQ0gKwJZ.js} +1 -1
  174. package/dist/client/assets/{use-collections-_UlIpgjP.js → use-collections-B6Y5SE5i.js} +1 -1
  175. package/dist/client/assets/{use-connection-BxSCzh2E.js → use-connection-CCYwDyNR.js} +1 -1
  176. package/dist/client/assets/{use-copy-BvBAqh5C.js → use-copy-Y55SDaZL.js} +1 -1
  177. package/dist/client/assets/{use-create-virtual-mcp-DjQWwvK4.js → use-create-virtual-mcp-CuoNkLte.js} +1 -1
  178. package/dist/client/assets/{use-debounced-autosave-BHDQ7RHW.js → use-debounced-autosave-BL-N3Gnu.js} +1 -1
  179. package/dist/client/assets/{use-debounced-value-BB2O7NbI.js → use-debounced-value-DpZKy_Iw.js} +1 -1
  180. package/dist/client/assets/{use-decopilot-events-CRfiqA6B.js → use-decopilot-events-EyZW0ScP.js} +1 -1
  181. package/dist/client/assets/{use-delete-connection-Pw6IkYwM.js → use-delete-connection-CPSKVnox.js} +1 -1
  182. package/dist/client/assets/{use-file-configs-BasVpNvI.js → use-file-configs-hHuL8QEC.js} +1 -1
  183. package/dist/client/assets/{use-infinite-scroll-BSMoGR4k.js → use-infinite-scroll-BW9P8xBl.js} +1 -1
  184. package/dist/client/assets/{use-join-requests-Df5JF2iE.js → use-join-requests-CTzuXwK-.js} +1 -1
  185. package/dist/client/assets/{use-mcp-client-Bcb6PO24.js → use-mcp-client-B0s_8EVJ.js} +1 -1
  186. package/dist/client/assets/{use-mcp-prompts-AJeQrCqj.js → use-mcp-prompts-C9WyhCpr.js} +1 -1
  187. package/dist/client/assets/{use-mcp-tools-qTvFx3Nb.js → use-mcp-tools-BTQ51TI6.js} +1 -1
  188. package/dist/client/assets/{use-members-zes1mdlJ.js → use-members-Cho9vXKF.js} +1 -1
  189. package/dist/client/assets/{use-mobile-CMJi7yoD.js → use-mobile-CHScOeMy.js} +1 -1
  190. package/dist/client/assets/{use-navigate-to-agent-C83xFoxW.js → use-navigate-to-agent-BLrW4hmi.js} +1 -1
  191. package/dist/client/assets/{use-org-auth-client-DJhVKhdJ.js → use-org-auth-client-T24QkUeZ.js} +1 -1
  192. package/dist/client/assets/use-org-fs-BbjnF7sq.js +1 -0
  193. package/dist/client/assets/{use-org-sso-C1crpljI.js → use-org-sso-CoPgbTky.js} +1 -1
  194. package/dist/client/assets/{use-organization-roles-m3zsO9Ct.js → use-organization-roles-uXtY0vKk.js} +1 -1
  195. package/dist/client/assets/{use-organization-settings-D1Ju0RBO.js → use-organization-settings-BdRr72qh.js} +1 -1
  196. package/dist/client/assets/{use-registry-connections-iyE_-Lc9.js → use-registry-connections-HtzalUOh.js} +1 -1
  197. package/dist/client/assets/{use-secrets-DnspbGKA.js → use-secrets-CnXSg99O.js} +1 -1
  198. package/dist/client/assets/{use-status-sounds-HySek8pC.js → use-status-sounds-CFfhXfZc.js} +1 -1
  199. package/dist/client/assets/{use-view-mode-ZGLIhwLE.js → use-view-mode-1gUAJUA2.js} +1 -1
  200. package/dist/client/assets/{use-virtual-mcp-co7b_FD9.js → use-virtual-mcp-BN8buKcT.js} +1 -1
  201. package/dist/client/assets/useInfiniteQuery-D-FFXkXU.js +1 -0
  202. package/dist/client/assets/useSuspenseInfiniteQuery-BfIitBar.js +1 -0
  203. package/dist/client/assets/{useSuspenseQueries-DnuDPZjI.js → useSuspenseQueries-qD79q_C-.js} +1 -1
  204. package/dist/client/assets/{variant-calendar-DDApZRGI.js → variant-calendar-D0oFAKUu.js} +1 -1
  205. package/dist/client/assets/{view-mode-toggle-BChdPYXY.js → view-mode-toggle-PleSLbFB.js} +1 -1
  206. package/dist/client/index.html +1 -1
  207. package/dist/server/cli.js +361 -361
  208. package/dist/server/server.js +249 -249
  209. package/package.json +1 -1
  210. package/dist/client/assets/app-editor-CnqMwcfe.js +0 -1
  211. package/dist/client/assets/category-editor-DSfTPN75.js +0 -1
  212. package/dist/client/assets/chat-context-GFFBEPEU.js +0 -21
  213. package/dist/client/assets/file-explorer-CQwIfJcQ.js +0 -2
  214. package/dist/client/assets/index-DiptY5jt.js +0 -3
  215. package/dist/client/assets/index-_pdBi5yI.js +0 -1
  216. package/dist/client/assets/page-seo-sheet-F5FfJolP.js +0 -1
  217. package/dist/client/assets/post-editor-DSFBqpu_.js +0 -1
  218. package/dist/client/assets/preview-dialog-BdwQBPGz.js +0 -5
  219. package/dist/client/assets/project-app-view-By8MOEIa.js +0 -1
  220. package/dist/client/assets/record-editor-Bos57gw5.js +0 -1
  221. package/dist/client/assets/registry-DxM4RNob.js +0 -2
  222. package/dist/client/assets/seo-editor-DqNZ_ieG.js +0 -1
  223. package/dist/client/assets/store-registry-D-YwJpzW.js +0 -2
  224. package/dist/client/assets/useInfiniteQuery-CuzY8zzZ.js +0 -1
  225. package/dist/client/assets/useSuspenseInfiniteQuery-BpUXD3KF.js +0 -1
@@ -1,12 +1,12 @@
1
- import{c as $,r as B,j as t,k as Y,B as q,K as L,l as Z,D as Ne,m as st,t as W,b as lt,u as nt,E as Me,ae as Pt}from"./index-BSJueg0-.js";import{i as Ft}from"./ChevronRight-D9yn8jpR.js";import{s as it}from"./Eye-Dy66amqx.js";import{n as Ot,i as rt}from"./Globe01-ClbfJyVj.js";import{a as at,e as Et,f as At,i as Mt}from"./ZoomOut-TulSR7oT.js";import{a as ye}from"./Palette-BiMvnm3j.js";import{s as Ut}from"./Plus-BUzQUcBo.js";import{i as Bt}from"./SearchLg-BrFHn1VQ.js";import{t as Lt}from"./Stars01-DC5B5fh3.js";import{i as je}from"./Upload01-C5TCL0j-.js";import{s as qt}from"./XClose-xV2ZQDrx.js";import{i as Le}from"./Zap-Dc5VDOja.js";import{u as ot}from"./use-mobile-CMJi7yoD.js";import{f as Rt,a as _t,b as It,c as Kt,d as Vt,e as Ht,A as Gt,g as Qt}from"./alert-dialog-ZMN4L58U.js";import{d as qe,e as Re,a as _e,f as ct,c as Wt,b as Yt,D as Xt}from"./dialog-BxPiF5oN.js";import{I as we}from"./input-cp_TKu2Y.js";import{S as V}from"./skeleton-DGyuQcWM.js";import{F as ne,d as dt,M as ft}from"./file-type-icon-BwBw9jgA.js";import{a as Zt}from"./toolbar-CSosPZ4D.js";import{r as Ie,s as A,a as de,t as Jt,u as Be,v as Ke,h as es,L as ts,o as ss,p as ls,n as ns,R as Ye,q as is,S as rs,w as as,b as os,x as ut,y as le,z as mt,A as cs,B as ds}from"./preview-dialog-BdwQBPGz.js";import{u as fs}from"./use-debounced-value-BB2O7NbI.js";import{a as Se}from"./DotsVertical-s-I-SeMs.js";import{i as us}from"./Key01-CYpto-hP.js";import{s as $e}from"./Trash01-mBWH2_eT.js";import{a as Ce,c as te,b as De,D as ze}from"./dropdown-menu-CZpb3eYC.js";import{T as ms}from"./textarea-Sgn1Re8l.js";import{t as hs}from"./ChevronDown-BynJeIwt.js";import{n as ps}from"./ChevronUp-Cw2uQynG.js";import{i as ke}from"./X-BICfxl5D.js";import"./tab-id-BptcWVWa.js";import"./ChevronLeft-DQiHQWQL.js";import"./tooltip-h0yvcJt8.js";import"./LinkExternal01-BY6pxfcE.js";import"./index-gHhgmmKj.js";import"./LayoutLeft-DfuPk5zB.js";import"./popover-C5HgpX4x.js";const xs=new Set(["output","upload","public","home"]),gs=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function ht(s){return xs.has(s)||!gs.test(s)?"home":s}function bs(s){const e=$.c(33);let l,i,n;e[0]!==s?({glyph:l,readOnly:n,...i}=s,e[0]=s,e[1]=l,e[2]=i,e[3]=n):(l=e[1],i=e[2],n=e[3]);const r=B.useId(),a=`${r}-back`,c=`${r}-front`,o=`url(#${a})`;let d;e[4]!==o?(d=t.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:o}),e[4]=o,e[5]=d):d=e[5];const u=`url(#${c})`;let f;e[6]!==u?(f=t.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:u}),e[6]=u,e[7]=f):f=e[7];let m,h,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),h=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:"#84CDFB"}),x=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:"#84CDFB"}),e[8]=m,e[9]=h,e[10]=x):(m=e[8],h=e[9],x=e[10]);let b;e[11]!==l?(b=l&&t.jsx(l,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:"#014AC9",opacity:.55}}),e[11]=l,e[12]=b):b=e[12];let y;e[13]!==n?(y=n&&t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),t.jsx(it,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[13]=n,e[14]=y):y=e[14];let v,g;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("stop",{offset:"0.3",stopColor:"#4D87DF"}),g=t.jsx("stop",{offset:"1",stopColor:"#296FE8"}),e[15]=v,e[16]=g):(v=e[15],g=e[16]);let w;e[17]!==a?(w=t.jsxs("linearGradient",{id:a,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[v,g]}),e[17]=a,e[18]=w):w=e[18];let C,k;e[19]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("stop",{stopColor:"#72B6FA"}),k=t.jsx("stop",{offset:"1",stopColor:"#5BB1EF"}),e[19]=C,e[20]=k):(C=e[19],k=e[20]);let S;e[21]!==c?(S=t.jsxs("radialGradient",{id:c,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[C,k]}),e[21]=c,e[22]=S):S=e[22];let D;e[23]!==w||e[24]!==S?(D=t.jsxs("defs",{children:[w,S]}),e[23]=w,e[24]=S,e[25]=D):D=e[25];let z;return e[26]!==i||e[27]!==D||e[28]!==d||e[29]!==f||e[30]!==b||e[31]!==y?(z=t.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...i,children:[d,f,m,h,x,b,y,D]}),e[26]=i,e[27]=D,e[28]=d,e[29]=f,e[30]=b,e[31]=y,e[32]=z):z=e[32],z}function vs(s,e,l){return e?"color":l?"font":/^--brand-(text|fw|leading|tracking)/i.test(s)?"type":/^--brand-space/i.test(s)?"space":/^--brand-radius/i.test(s)?"radius":/^--brand-shadow/i.test(s)?"shadow":/^--brand-(duration|delay|ease)/i.test(s)?"motion":"other"}const ys=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,js=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,ws=["svg","png","jpg","jpeg","webp","avif","gif"];function ks(s){return s.split(".").pop()?.toLowerCase()??""}function Ns(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ss(s){const e=s.trim();return js.test(e)||ys.test(e)}function $s(s){const e=s.trim(),l=e.match(/^#([0-9a-f]{3})$/i);return l?.[1]?`#${[...l[1]].map(i=>i+i).join("")}`:e}function pt(s){const e=[],l=new Map,i=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let n;for(;(n=i.exec(s))!==null;){const r=n[1],a=n[2].trim();l.has(r)||e.push(r),l.set(r,a)}return e.map(r=>{const a=l.get(r),c=Ss(a),o=/^--brand-font/i.test(r);return{name:r,value:a,isColor:c,isFont:o,kind:vs(r,c,o)}})}const Xe=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function Cs(s){return s.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??s}function Ds(s){const e=[],l=new Map;for(const n of s){if(n.kind!=="color")continue;const r=Cs(n.name);l.has(r)||(e.push(r),l.set(r,[])),l.get(r).push(n)}return e.map(n=>{const r=l.get(n);return{family:n,tokens:r,isRamp:r.filter(a=>/-\d+$/.test(a.name)).length>=5}}).sort((n,r)=>{const a=Xe.indexOf(n.family),c=Xe.indexOf(r.family);return a===-1&&c===-1?0:a===-1?1:c===-1?-1:a-c})}function zs(s,e,l){const i=new RegExp(`(${Ns(e)}\\s*:\\s*)[^;]+(;)`);if(i.test(s))return s.replace(i,(a,c,o)=>`${c}${l}${o}`);const n=s.search(/:root\s*\{/);if(n!==-1){const a=s.indexOf("{",n)+1;return`${s.slice(0,a)}
1
+ import{c as $,r as B,j as t,k as Y,B as R,K as L,l as Z,D as Ne,m as st,t as W,b as lt,u as nt,E as Me,ae as Pt}from"./index-kan1E63X.js";import{i as Ft}from"./ChevronRight-B69CKZdN.js";import{s as it}from"./Eye-DJDSbP4d.js";import{n as Ot,i as rt}from"./Globe01-YUd_dhFu.js";import{a as at,e as Et,f as At,i as Mt}from"./ZoomOut-CBydRAMI.js";import{a as je}from"./Palette-DVMpwycK.js";import{s as Ut}from"./Plus-DLu0p3LB.js";import{i as Bt}from"./SearchLg-BG10mFZp.js";import{t as Lt}from"./Stars01-D34hqc6C.js";import{i as ye}from"./Upload01-BWZGJ0bu.js";import{s as Rt}from"./XClose-CJbbgFu-.js";import{i as Le}from"./Zap-DOCsW5bs.js";import{u as ot}from"./use-mobile-CHScOeMy.js";import{f as _t,a as qt,b as It,c as Kt,d as Vt,e as Ht,A as Gt,g as Qt}from"./alert-dialog-Cey7j4CE.js";import{d as Re,e as _e,a as qe,f as ct,c as Wt,b as Yt,D as Xt}from"./dialog-59pZJLRI.js";import{I as we}from"./input-CWK_KDxP.js";import{S as V}from"./skeleton-Bvrl2WPh.js";import{F as ne,d as dt,M as ft}from"./file-type-icon-DE5lANHh.js";import{a as Zt}from"./toolbar-DCCrTBZW.js";import{p as Ie,l as A,c as Jt,L as es,i as ts,j as ss,h as ls,R as Ye,k as ns,S as is,m as le,n as ut,o as rs}from"./preview-dialog-BvNzeY3T.js";import{u as as}from"./use-debounced-value-DpZKy_Iw.js";import{a as de,i as os,u as Be,j as Ke,k as cs,b as ds,l as mt,m as fs}from"./use-org-fs-BbjnF7sq.js";import{a as Se}from"./DotsVertical-OVel04b-.js";import{i as us}from"./Key01-CzuZ2YNH.js";import{s as $e}from"./Trash01-BktfczUu.js";import{a as Ce,c as te,b as De,D as Te}from"./dropdown-menu-KRYgKsut.js";import{T as ms}from"./textarea-PSzbbOkb.js";import{t as hs}from"./ChevronDown-yYhj5xP_.js";import{n as ps}from"./ChevronUp-BYmO7ni8.js";import{i as ke}from"./X-D4V_xKxB.js";import"./tab-id-BptcWVWa.js";import"./ChevronLeft-eYxyU36o.js";import"./tooltip-Ct27xL12.js";import"./LinkExternal01-CUaKk4PO.js";import"./index-DHU91und.js";import"./LayoutLeft-DQ4hyaOy.js";import"./popover-Dhad0x9g.js";const xs=new Set(["output","upload","public","home"]),gs=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function ht(s){return xs.has(s)||!gs.test(s)?"home":s}function bs(s){const e=$.c(33);let l,i,n;e[0]!==s?({glyph:l,readOnly:n,...i}=s,e[0]=s,e[1]=l,e[2]=i,e[3]=n):(l=e[1],i=e[2],n=e[3]);const r=B.useId(),a=`${r}-back`,c=`${r}-front`,o=`url(#${a})`;let d;e[4]!==o?(d=t.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:o}),e[4]=o,e[5]=d):d=e[5];const u=`url(#${c})`;let f;e[6]!==u?(f=t.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:u}),e[6]=u,e[7]=f):f=e[7];let m,h,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),h=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:"#84CDFB"}),x=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:"#84CDFB"}),e[8]=m,e[9]=h,e[10]=x):(m=e[8],h=e[9],x=e[10]);let b;e[11]!==l?(b=l&&t.jsx(l,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:"#014AC9",opacity:.55}}),e[11]=l,e[12]=b):b=e[12];let j;e[13]!==n?(j=n&&t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),t.jsx(it,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[13]=n,e[14]=j):j=e[14];let v,g;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("stop",{offset:"0.3",stopColor:"#4D87DF"}),g=t.jsx("stop",{offset:"1",stopColor:"#296FE8"}),e[15]=v,e[16]=g):(v=e[15],g=e[16]);let w;e[17]!==a?(w=t.jsxs("linearGradient",{id:a,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[v,g]}),e[17]=a,e[18]=w):w=e[18];let C,k;e[19]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("stop",{stopColor:"#72B6FA"}),k=t.jsx("stop",{offset:"1",stopColor:"#5BB1EF"}),e[19]=C,e[20]=k):(C=e[19],k=e[20]);let S;e[21]!==c?(S=t.jsxs("radialGradient",{id:c,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[C,k]}),e[21]=c,e[22]=S):S=e[22];let D;e[23]!==w||e[24]!==S?(D=t.jsxs("defs",{children:[w,S]}),e[23]=w,e[24]=S,e[25]=D):D=e[25];let T;return e[26]!==i||e[27]!==D||e[28]!==d||e[29]!==f||e[30]!==b||e[31]!==j?(T=t.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...i,children:[d,f,m,h,x,b,j,D]}),e[26]=i,e[27]=D,e[28]=d,e[29]=f,e[30]=b,e[31]=j,e[32]=T):T=e[32],T}function vs(s,e,l){return e?"color":l?"font":/^--brand-(text|fw|leading|tracking)/i.test(s)?"type":/^--brand-space/i.test(s)?"space":/^--brand-radius/i.test(s)?"radius":/^--brand-shadow/i.test(s)?"shadow":/^--brand-(duration|delay|ease)/i.test(s)?"motion":"other"}const js=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,ys=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,ws=["svg","png","jpg","jpeg","webp","avif","gif"];function ks(s){return s.split(".").pop()?.toLowerCase()??""}function Ns(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ss(s){const e=s.trim();return ys.test(e)||js.test(e)}function $s(s){const e=s.trim(),l=e.match(/^#([0-9a-f]{3})$/i);return l?.[1]?`#${[...l[1]].map(i=>i+i).join("")}`:e}function pt(s){const e=[],l=new Map,i=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let n;for(;(n=i.exec(s))!==null;){const r=n[1],a=n[2].trim();l.has(r)||e.push(r),l.set(r,a)}return e.map(r=>{const a=l.get(r),c=Ss(a),o=/^--brand-font/i.test(r);return{name:r,value:a,isColor:c,isFont:o,kind:vs(r,c,o)}})}const Xe=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function Cs(s){return s.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??s}function Ds(s){const e=[],l=new Map;for(const n of s){if(n.kind!=="color")continue;const r=Cs(n.name);l.has(r)||(e.push(r),l.set(r,[])),l.get(r).push(n)}return e.map(n=>{const r=l.get(n);return{family:n,tokens:r,isRamp:r.filter(a=>/-\d+$/.test(a.name)).length>=5}}).sort((n,r)=>{const a=Xe.indexOf(n.family),c=Xe.indexOf(r.family);return a===-1&&c===-1?0:a===-1?1:c===-1?-1:a-c})}function Ts(s,e,l){const i=new RegExp(`(${Ns(e)}\\s*:\\s*)[^;]+(;)`);if(i.test(s))return s.replace(i,(a,c,o)=>`${c}${l}${o}`);const n=s.search(/:root\s*\{/);if(n!==-1){const a=s.indexOf("{",n)+1;return`${s.slice(0,a)}
2
2
  ${e}: ${l};${s.slice(a)}`}const r=s.length>0&&!s.endsWith(`
3
3
  `)?`
4
4
  `:"";return`${s}${r}:root {
5
5
  ${e}: ${l};
6
6
  }
7
- `}function Ts(s){const e=s.filter(i=>i.kind==="file"),l=e.find(i=>/(^|\/)logo\.(svg|png|jpe?g|webp|avif|gif)$/i.test(i.path));return l?l.path:e.find(i=>ws.includes(ks(i.path)))?.path??null}function Ps(s){const e={};for(const l of s.split(`
8
- `)){const i=l.match(/^([A-Za-z][\w-]*):\s*(.*)$/);i?.[1]&&i[2]!==void 0&&(e[i[1].toLowerCase()]=i[2].trim())}return e}function Ze(s){for(const e of s.split(/\n\s*\n/)){const l=e.trim();if(!(!l||l.startsWith("#")))return l.replace(/\n/g," ")}return null}function xt(s){const e=s.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:Ze(s),body:s};const l=Ps(e[1]),i=s.slice(e[0].length);return{name:l.name||null,description:l.description||Ze(i),body:i}}const Fs=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Os=new Set(["csv","tsv"]),Es=new Set(["mp4","webm","mov","m4v"]),As=new Set(["txt","md","markdown","json","log","yaml","yml","xml","html","htm"]),Ms=256*1024;function fe(s){const e=new Date(s);if(Number.isNaN(e.getTime()))return"";const l=Date.now()-e.getTime(),i=Math.floor(l/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const n=Math.floor(i/60);if(n<24)return`${n}h ago`;const r=Math.floor(n/24);return r<30?`${r}d ago`:e.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Us(s){return s.split(".").pop()?.toLowerCase()??""}function Ve(s){const e=$.c(3),{onShare:l}=s;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Et,{size:14}),e[0]=i):i=e[0];let n;return e[1]!==l?(n=t.jsxs(te,{onClick:l,children:[i,"Share"]}),e[1]=l,e[2]=n):n=e[2],n}function Bs(s){const e=$.c(9),{state:l}=s,i=l==="password"?"Password-protected — link + password to view":l==="inherited"?"Shared via a parent folder":"Public — anyone with the link can view",n=l==="password"?us:rt,r=l==="inherited"?"text-muted-foreground/60":"text-primary";let a;e[0]!==r?(a=Z(r),e[0]=r,e[1]=a):a=e[1];let c;e[2]!==n||e[3]!==i||e[4]!==a?(c=t.jsx(n,{size:12,className:a,"aria-label":i}),e[2]=n,e[3]=i,e[4]=a,e[5]=c):c=e[5];let o;return e[6]!==i||e[7]!==c?(o=t.jsx("span",{title:i,className:"mt-0.5 flex shrink-0 items-center",children:c}),e[6]=i,e[7]=c,e[8]=o):o=e[8],o}function gt(s){const e=$.c(18),{downloadUrl:l,filename:i,onShare:n,onDelete:r}=s,a=`Actions for ${i}`;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Se,{size:14}),e[0]=c):c=e[0];let o;e[1]!==a?(o=t.jsx(Ce,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:qs,"aria-label":a,children:c})}),e[1]=a,e[2]=o):o=e[2];let d;e[3]!==n?(d=n&&t.jsx(Ve,{onShare:n}),e[3]=n,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ot,{size:14}),e[5]=u):u=e[5];let f;e[6]!==l||e[7]!==i?(f=t.jsx(te,{asChild:!0,children:t.jsxs("a",{href:l,download:i,children:[u,"Download"]})}),e[6]=l,e[7]=i,e[8]=f):f=e[8];let m;e[9]!==r?(m=r&&t.jsxs(te,{variant:"destructive",onClick:r,children:[t.jsx($e,{size:14}),"Delete"]}),e[9]=r,e[10]=m):m=e[10];let h;e[11]!==d||e[12]!==f||e[13]!==m?(h=t.jsxs(De,{align:"end",onClick:Ls,children:[d,f,m]}),e[11]=d,e[12]=f,e[13]=m,e[14]=h):h=e[14];let x;return e[15]!==o||e[16]!==h?(x=t.jsxs(ze,{children:[o,h]}),e[15]=o,e[16]=h,e[17]=x):x=e[17],x}function Ls(s){return s.stopPropagation()}function qs(s){return s.stopPropagation()}function ue(s){const e=$.c(9),{onOpen:l,children:i,className:n}=s;let r;e[0]!==l?(r=o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),l())},e[0]=l,e[1]=r):r=e[1];let a;e[2]!==n?(a=Z("group/card flex cursor-pointer flex-col gap-3 rounded-2xl border border-border bg-background p-4 text-left transition-colors hover:border-border hover:bg-muted/40",n),e[2]=n,e[3]=a):a=e[3];let c;return e[4]!==i||e[5]!==l||e[6]!==r||e[7]!==a?(c=t.jsx("div",{role:"button",tabIndex:0,onClick:l,onKeyDown:r,className:a,children:i}),e[4]=i,e[5]=l,e[6]=r,e[7]=a,e[8]=c):c=e[8],c}function me(s){const e=$.c(19),{icon:l,name:i,meta:n,subtitle:r,publicState:a,actions:c}=s;let o;e[0]!==i?(o=t.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",title:i,children:i}),e[0]=i,e[1]=o):o=e[1];let d;e[2]!==a?(d=a&&t.jsx(Bs,{state:a}),e[2]=a,e[3]=d):d=e[3];let u;e[4]!==n?(u=n&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:n}),e[4]=n,e[5]=u):u=e[5];let f;e[6]!==o||e[7]!==d||e[8]!==u?(f=t.jsxs("div",{className:"flex items-start gap-3",children:[o,d,u]}),e[6]=o,e[7]=d,e[8]=u,e[9]=f):f=e[9];let m;e[10]!==r?(m=r&&t.jsx("span",{className:"truncate text-xs text-muted-foreground",title:r,children:r}),e[10]=r,e[11]=m):m=e[11];let h;e[12]!==f||e[13]!==m?(h=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col justify-center",children:[f,m]}),e[12]=f,e[13]=m,e[14]=h):h=e[14];let x;return e[15]!==c||e[16]!==l||e[17]!==h?(x=t.jsxs("div",{className:"flex w-full items-center gap-2.5",children:[l,h,c]}),e[15]=c,e[16]=l,e[17]=h,e[18]=x):x=e[18],x}function Te(s){const e=$.c(17),{name:l,meta:i,subtitle:n,glyph:r,readOnly:a,publicState:c,onOpen:o,onShare:d,onDelete:u}=s;let f;e[0]!==r||e[1]!==a?(f=t.jsx(bs,{glyph:r,readOnly:a,className:"size-8 shrink-0"}),e[0]=r,e[1]=a,e[2]=f):f=e[2];let m;e[3]!==l||e[4]!==u||e[5]!==d?(m=d||u?t.jsxs(ze,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:_s,"aria-label":`Actions for ${l}`,children:t.jsx(Se,{size:14})})}),t.jsxs(De,{align:"end",onClick:Rs,children:[d&&t.jsx(Ve,{onShare:d}),u&&t.jsxs(te,{variant:"destructive",onClick:u,children:[t.jsx($e,{size:14}),"Delete"]})]})]}):void 0,e[3]=l,e[4]=u,e[5]=d,e[6]=m):m=e[6];let h;e[7]!==i||e[8]!==l||e[9]!==c||e[10]!==n||e[11]!==f||e[12]!==m?(h=t.jsx(me,{icon:f,name:l,meta:i,subtitle:n,publicState:c,actions:m}),e[7]=i,e[8]=l,e[9]=c,e[10]=n,e[11]=f,e[12]=m,e[13]=h):h=e[13];let x;return e[14]!==o||e[15]!==h?(x=t.jsx(ue,{onOpen:o,children:h}),e[14]=o,e[15]=h,e[16]=x):x=e[16],x}function Rs(s){return s.stopPropagation()}function _s(s){return s.stopPropagation()}function bt(s){const e=$.c(22),{filename:l,updatedAt:i,downloadUrl:n,subtitle:r,publicState:a,onOpen:c,onShare:o,onDelete:d}=s;let u;e[0]!==l?(u=t.jsx(ne,{filename:l,className:"h-8 w-6.5 shrink-0"}),e[0]=l,e[1]=u):u=e[1];let f;e[2]!==i?(f=fe(i),e[2]=i,e[3]=f):f=e[3];let m;e[4]!==l||e[5]!==r?(m=r??dt(l),e[4]=l,e[5]=r,e[6]=m):m=e[6];let h;e[7]!==n||e[8]!==l||e[9]!==d||e[10]!==o?(h=t.jsx(gt,{downloadUrl:n,filename:l,onShare:o,onDelete:d}),e[7]=n,e[8]=l,e[9]=d,e[10]=o,e[11]=h):h=e[11];let x;e[12]!==l||e[13]!==a||e[14]!==u||e[15]!==f||e[16]!==m||e[17]!==h?(x=t.jsx(me,{icon:u,name:l,meta:f,subtitle:m,publicState:a,actions:h}),e[12]=l,e[13]=a,e[14]=u,e[15]=f,e[16]=m,e[17]=h,e[18]=x):x=e[18];let b;return e[19]!==c||e[20]!==x?(b=t.jsx(ue,{onOpen:c,children:x}),e[19]=c,e[20]=x,e[21]=b):b=e[21],b}function Is(s){const e=$.c(40),{dirName:l,updatedAt:i,skillMdUrl:n,publicState:r,onOpen:a,onBrowse:c,onShare:o,onDelete:d}=s;let u;e[0]!==n?(u=L.fileText(n),e[0]=n,e[1]=u):u=e[1];let f;e[2]!==n?(f=async()=>{const _=await fetch(n,{credentials:"include"});if(!_.ok)throw new Error(`fetch failed: ${_.status}`);return _.text()},e[2]=n,e[3]=f):f=e[3];let m;e[4]!==u||e[5]!==f?(m={queryKey:u,queryFn:f,staleTime:6e4,retry:!1},e[4]=u,e[5]=f,e[6]=m):m=e[6];const{data:h}=Y(m);let x;e[7]!==h?(x=h?xt(h):null,e[7]=h,e[8]=x):x=e[8];const b=x;let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(Le,{size:16})}),e[9]=y):y=e[9];const v=b?.name??l;let g;e[10]!==i?(g=fe(i),e[10]=i,e[11]=g):g=e[11];const w=`Actions for ${l}`;let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Se,{size:14}),e[12]=C):C=e[12];let k;e[13]!==w?(k=t.jsx(Ce,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Vs,"aria-label":w,children:C})}),e[13]=w,e[14]=k):k=e[14];let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(at,{size:14}),e[15]=S):S=e[15];let D;e[16]!==c?(D=t.jsxs(te,{onClick:c,children:[S,"Browse files"]}),e[16]=c,e[17]=D):D=e[17];let z;e[18]!==o?(z=o&&t.jsx(Ve,{onShare:o}),e[18]=o,e[19]=z):z=e[19];let P;e[20]!==d?(P=d&&t.jsxs(te,{variant:"destructive",onClick:d,children:[t.jsx($e,{size:14}),"Delete"]}),e[20]=d,e[21]=P):P=e[21];let F;e[22]!==D||e[23]!==z||e[24]!==P?(F=t.jsxs(De,{align:"end",onClick:Ks,children:[D,z,P]}),e[22]=D,e[23]=z,e[24]=P,e[25]=F):F=e[25];let p;e[26]!==k||e[27]!==F?(p=t.jsxs(ze,{children:[k,F]}),e[26]=k,e[27]=F,e[28]=p):p=e[28];let T;e[29]!==r||e[30]!==p||e[31]!==v||e[32]!==g?(T=t.jsx(me,{icon:y,name:v,meta:g,subtitle:"Skill",publicState:r,actions:p}),e[29]=r,e[30]=p,e[31]=v,e[32]=g,e[33]=T):T=e[33];const O=b?.description??"";let M;e[34]!==O?(M=t.jsx("p",{className:"line-clamp-2 min-h-8 text-xs leading-4 text-muted-foreground",children:O}),e[34]=O,e[35]=M):M=e[35];let R;return e[36]!==a||e[37]!==T||e[38]!==M?(R=t.jsxs(ue,{onOpen:a,children:[T,M]}),e[36]=a,e[37]=T,e[38]=M,e[39]=R):R=e[39],R}function Ks(s){return s.stopPropagation()}function Vs(s){return s.stopPropagation()}function Hs(s){const e=$.c(47),{dirName:l,updatedAt:i,tokensUrl:n,onOpen:r,onBrowse:a,onDelete:c}=s;let o;e[0]!==n?(o=L.fileText(n),e[0]=n,e[1]=o):o=e[1];let d;e[2]!==n?(d=async()=>{const w=await fetch(n,{credentials:"include"});if(!w.ok)throw new Error(`fetch failed: ${w.status}`);return w.text()},e[2]=n,e[3]=d):d=e[3];let u;e[4]!==o||e[5]!==d?(u={queryKey:o,queryFn:d,staleTime:6e4,retry:!1},e[4]=o,e[5]=d,e[6]=u):u=e[6];const{data:f}=Y(u);let m,h,x,b,y;if(e[7]!==f||e[8]!==l||e[9]!==a||e[10]!==c||e[11]!==r||e[12]!==i){const w=f?pt(f).filter(Ys).slice(0,6):[];m=ue,b=r;let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(ye,{size:16})}),e[18]=C):C=e[18];let k;e[19]!==i?(k=fe(i),e[19]=i,e[20]=k):k=e[20];const S=`Actions for ${l}`;let D;e[21]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(Se,{size:14}),e[21]=D):D=e[21];let z;e[22]!==S?(z=t.jsx(Ce,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Ws,"aria-label":S,children:D})}),e[22]=S,e[23]=z):z=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(at,{size:14}),e[24]=P):P=e[24];let F;e[25]!==a?(F=t.jsxs(te,{onClick:a,children:[P,"Browse files"]}),e[25]=a,e[26]=F):F=e[26];let p;e[27]!==c?(p=c&&t.jsxs(te,{variant:"destructive",onClick:c,children:[t.jsx($e,{size:14}),"Delete"]}),e[27]=c,e[28]=p):p=e[28];let T;e[29]!==F||e[30]!==p?(T=t.jsxs(De,{align:"end",onClick:Qs,children:[F,p]}),e[29]=F,e[30]=p,e[31]=T):T=e[31];let O;e[32]!==z||e[33]!==T?(O=t.jsxs(ze,{children:[z,T]}),e[32]=z,e[33]=T,e[34]=O):O=e[34],e[35]!==l||e[36]!==O||e[37]!==k?(y=t.jsx(me,{icon:C,name:l,meta:k,subtitle:"Brand",actions:O}),e[35]=l,e[36]=O,e[37]=k,e[38]=y):y=e[38],h="flex min-h-5 items-center gap-1.5",x=w.map(Gs),e[7]=f,e[8]=l,e[9]=a,e[10]=c,e[11]=r,e[12]=i,e[13]=m,e[14]=h,e[15]=x,e[16]=b,e[17]=y}else m=e[13],h=e[14],x=e[15],b=e[16],y=e[17];let v;e[39]!==h||e[40]!==x?(v=t.jsx("div",{className:h,children:x}),e[39]=h,e[40]=x,e[41]=v):v=e[41];let g;return e[42]!==m||e[43]!==b||e[44]!==y||e[45]!==v?(g=t.jsxs(m,{onOpen:b,children:[y,v]}),e[42]=m,e[43]=b,e[44]=y,e[45]=v,e[46]=g):g=e[46],g}function Gs(s){return t.jsx("span",{className:"size-5 rounded-full border border-border/60",style:{backgroundColor:s.value},title:`${s.name}: ${s.value}`},s.name)}function Qs(s){return s.stopPropagation()}function Ws(s){return s.stopPropagation()}function Ys(s){return s.isColor}function Ue(s){const e=$.c(4),{children:l}=s,[i,n]=B.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>o=>{if(!o)return;const d=new IntersectionObserver(u=>{const[f]=u;f?.isIntersecting&&(n(!0),d.disconnect())},{rootMargin:"200px"});d.observe(o)},e[0]=r):r=e[0];const[a]=B.useState(r);if(i){let o;return e[1]!==l?(o=t.jsx(t.Fragment,{children:l}),e[1]=l,e[2]=o):o=e[2],o}let c;return e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{ref:a,className:"h-full w-full"}),e[3]=c):c=e[3],c}function Xs(s){const e=$.c(11),{url:l}=s;let i;e[0]!==l?(i=L.fileText(l),e[0]=l,e[1]=i):i=e[1];let n;e[2]!==l?(n=async()=>{const d=await fetch(l,{credentials:"include"});if(!d.ok)throw new Error(`fetch failed: ${d.status}`);return d.text()},e[2]=l,e[3]=n):n=e[3];let r;e[4]!==i||e[5]!==n?(r={queryKey:i,queryFn:n,staleTime:6e4,retry:!1},e[4]=i,e[5]=n,e[6]=r):r=e[6];const{data:a}=Y(r);if(!a)return null;let c;e[7]!==a?(c=a.slice(0,2e3),e[7]=a,e[8]=c):c=e[8];let o;return e[9]!==c?(o=t.jsx("pre",{className:"pointer-events-none h-full w-full overflow-hidden bg-background p-3 font-mono text-[9px] leading-[1.5] text-muted-foreground select-none",children:c}),e[9]=c,e[10]=o):o=e[10],o}function Zs(s){const e=$.c(23),{url:l,ext:i}=s;let n;e[0]!==l?(n=L.csvThumb(l),e[0]=l,e[1]=n):n=e[1];let r;e[2]!==l?(r=async()=>{const y=await fetch(l,{credentials:"include",headers:{Range:"bytes=0-8191"}});if(!y.ok)throw new Error(`fetch failed: ${y.status}`);return y.text()},e[2]=l,e[3]=r):r=e[3];let a;e[4]!==n||e[5]!==r?(a={queryKey:n,queryFn:r,staleTime:6e4,retry:!1},e[4]=n,e[5]=r,e[6]=a):a=e[6];const{data:c}=Y(a);if(!c)return null;const o=i==="tsv"?" ":",";let d,u,f,m;if(e[7]!==c||e[8]!==o){m=Symbol.for("react.early_return_sentinel");e:{let y;e[13]!==o?(y=g=>g.split(o).slice(0,6).map(tl),e[13]=o,e[14]=y):y=e[14];const v=c.split(`
9
- `).filter(Boolean).slice(0,7).map(y);if(v.length===0){m=null;break e}f="pointer-events-none h-full w-full overflow-hidden bg-background p-2 select-none",u="w-full border-collapse",d=v.map(Js)}e[7]=c,e[8]=o,e[9]=d,e[10]=u,e[11]=f,e[12]=m}else d=e[9],u=e[10],f=e[11],m=e[12];if(m!==Symbol.for("react.early_return_sentinel"))return m;let h;e[15]!==d?(h=t.jsx("tbody",{children:d}),e[15]=d,e[16]=h):h=e[16];let x;e[17]!==u||e[18]!==h?(x=t.jsx("table",{className:u,children:h}),e[17]=u,e[18]=h,e[19]=x):x=e[19];let b;return e[20]!==f||e[21]!==x?(b=t.jsx("div",{className:f,children:x}),e[20]=f,e[21]=x,e[22]=b):b=e[22],b}function Js(s,e){return t.jsx("tr",{className:Z(e===0&&"bg-muted/50 font-medium"),children:s.map(el)},e)}function el(s,e){return t.jsx("td",{className:"max-w-[56px] overflow-hidden border border-border/30 px-1 py-px text-[7px] leading-[1.4] text-muted-foreground",style:{maxWidth:56},children:t.jsx("span",{className:"block truncate",children:s})},e)}function tl(s){return s.trim().replace(/^"|"$/g,"")}function sl(s){const e=$.c(14),{filename:l,size:i,downloadUrl:n}=s;let r;if(e[0]!==n||e[1]!==l||e[2]!==i){const a=Us(l);let c;if(Fs.has(a)){let o;e[4]!==n?(o=t.jsx("img",{src:n,alt:"",loading:"lazy",className:"h-full w-full object-cover"}),e[4]=n,e[5]=o):o=e[5],c=o}else if(Es.has(a)){const o=`${n}#t=0.1`;let d;e[6]!==o?(d=t.jsx(Ue,{children:t.jsx("video",{src:o,preload:"metadata",muted:!0,playsInline:!0,className:"pointer-events-none h-full w-full object-cover"})}),e[6]=o,e[7]=d):d=e[7],c=d}else if(a==="pdf"){let o;e[8]!==l?(o=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(ne,{filename:l,className:"h-14 w-11 opacity-60"})}),e[8]=l,e[9]=o):o=e[9],c=o}else if(Os.has(a))c=t.jsx(Ue,{children:t.jsx(Zs,{url:n,ext:a})});else if(As.has(a)&&i<=Ms){let o;e[10]!==n?(o=t.jsx(Ue,{children:t.jsx(Xs,{url:n})}),e[10]=n,e[11]=o):o=e[11],c=o}else{let o;e[12]!==l?(o=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(ne,{filename:l,className:"h-14 w-11 opacity-60"})}),e[12]=l,e[13]=o):o=e[13],c=o}r=t.jsx("div",{className:"aspect-[400/265] w-full overflow-hidden rounded-lg border border-border/60 bg-muted/30",children:c}),e[0]=n,e[1]=l,e[2]=i,e[3]=r}else r=e[3];return r}function ll(s){const e=$.c(27),l=s.onOpen;let i;e[0]!==s.filename?(i=t.jsx(ne,{filename:s.filename,className:"h-8 w-6.5 shrink-0"}),e[0]=s.filename,e[1]=i):i=e[1];const n=s.filename;let r;e[2]!==s.updatedAt?(r=fe(s.updatedAt),e[2]=s.updatedAt,e[3]=r):r=e[3];let a;e[4]!==s.filename||e[5]!==s.subtitle?(a=s.subtitle??dt(s.filename),e[4]=s.filename,e[5]=s.subtitle,e[6]=a):a=e[6];let c;e[7]!==s.downloadUrl||e[8]!==s.filename||e[9]!==s.onDelete||e[10]!==s.onShare?(c=t.jsx(gt,{downloadUrl:s.downloadUrl,filename:s.filename,onShare:s.onShare,onDelete:s.onDelete}),e[7]=s.downloadUrl,e[8]=s.filename,e[9]=s.onDelete,e[10]=s.onShare,e[11]=c):c=e[11];let o;e[12]!==s.filename||e[13]!==s.publicState||e[14]!==i||e[15]!==r||e[16]!==a||e[17]!==c?(o=t.jsx(me,{icon:i,name:n,meta:r,subtitle:a,publicState:s.publicState,actions:c}),e[12]=s.filename,e[13]=s.publicState,e[14]=i,e[15]=r,e[16]=a,e[17]=c,e[18]=o):o=e[18];let d;e[19]!==s.downloadUrl||e[20]!==s.filename||e[21]!==s.size?(d=t.jsx(sl,{filename:s.filename,size:s.size,downloadUrl:s.downloadUrl}),e[19]=s.downloadUrl,e[20]=s.filename,e[21]=s.size,e[22]=d):d=e[22];let u;return e[23]!==s.onOpen||e[24]!==o||e[25]!==d?(u=t.jsxs(ue,{onOpen:l,children:[o,d]}),e[23]=s.onOpen,e[24]=o,e[25]=d,e[26]=u):u=e[26],u}async function nl(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}const il=`
7
+ `}function zs(s){const e=s.filter(i=>i.kind==="file"),l=e.find(i=>/(^|\/)logo\.(svg|png|jpe?g|webp|avif|gif)$/i.test(i.path));return l?l.path:e.find(i=>ws.includes(ks(i.path)))?.path??null}function Ps(s){const e={};for(const l of s.split(`
8
+ `)){const i=l.match(/^([A-Za-z][\w-]*):\s*(.*)$/);i?.[1]&&i[2]!==void 0&&(e[i[1].toLowerCase()]=i[2].trim())}return e}function Ze(s){for(const e of s.split(/\n\s*\n/)){const l=e.trim();if(!(!l||l.startsWith("#")))return l.replace(/\n/g," ")}return null}function xt(s){const e=s.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:Ze(s),body:s};const l=Ps(e[1]),i=s.slice(e[0].length);return{name:l.name||null,description:l.description||Ze(i),body:i}}const Fs=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Os=new Set(["csv","tsv"]),Es=new Set(["mp4","webm","mov","m4v"]),As=new Set(["txt","md","markdown","json","log","yaml","yml","xml","html","htm"]),Ms=256*1024;function fe(s){const e=new Date(s);if(Number.isNaN(e.getTime()))return"";const l=Date.now()-e.getTime(),i=Math.floor(l/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const n=Math.floor(i/60);if(n<24)return`${n}h ago`;const r=Math.floor(n/24);return r<30?`${r}d ago`:e.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Us(s){return s.split(".").pop()?.toLowerCase()??""}function Ve(s){const e=$.c(3),{onShare:l}=s;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Et,{size:14}),e[0]=i):i=e[0];let n;return e[1]!==l?(n=t.jsxs(te,{onClick:l,children:[i,"Share"]}),e[1]=l,e[2]=n):n=e[2],n}function Bs(s){const e=$.c(9),{state:l}=s,i=l==="password"?"Password-protected — link + password to view":l==="inherited"?"Shared via a parent folder":"Public — anyone with the link can view",n=l==="password"?us:rt,r=l==="inherited"?"text-muted-foreground/60":"text-primary";let a;e[0]!==r?(a=Z(r),e[0]=r,e[1]=a):a=e[1];let c;e[2]!==n||e[3]!==i||e[4]!==a?(c=t.jsx(n,{size:12,className:a,"aria-label":i}),e[2]=n,e[3]=i,e[4]=a,e[5]=c):c=e[5];let o;return e[6]!==i||e[7]!==c?(o=t.jsx("span",{title:i,className:"mt-0.5 flex shrink-0 items-center",children:c}),e[6]=i,e[7]=c,e[8]=o):o=e[8],o}function gt(s){const e=$.c(18),{downloadUrl:l,filename:i,onShare:n,onDelete:r}=s,a=`Actions for ${i}`;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Se,{size:14}),e[0]=c):c=e[0];let o;e[1]!==a?(o=t.jsx(Ce,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Rs,"aria-label":a,children:c})}),e[1]=a,e[2]=o):o=e[2];let d;e[3]!==n?(d=n&&t.jsx(Ve,{onShare:n}),e[3]=n,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ot,{size:14}),e[5]=u):u=e[5];let f;e[6]!==l||e[7]!==i?(f=t.jsx(te,{asChild:!0,children:t.jsxs("a",{href:l,download:i,children:[u,"Download"]})}),e[6]=l,e[7]=i,e[8]=f):f=e[8];let m;e[9]!==r?(m=r&&t.jsxs(te,{variant:"destructive",onClick:r,children:[t.jsx($e,{size:14}),"Delete"]}),e[9]=r,e[10]=m):m=e[10];let h;e[11]!==d||e[12]!==f||e[13]!==m?(h=t.jsxs(De,{align:"end",onClick:Ls,children:[d,f,m]}),e[11]=d,e[12]=f,e[13]=m,e[14]=h):h=e[14];let x;return e[15]!==o||e[16]!==h?(x=t.jsxs(Te,{children:[o,h]}),e[15]=o,e[16]=h,e[17]=x):x=e[17],x}function Ls(s){return s.stopPropagation()}function Rs(s){return s.stopPropagation()}function ue(s){const e=$.c(9),{onOpen:l,children:i,className:n}=s;let r;e[0]!==l?(r=o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),l())},e[0]=l,e[1]=r):r=e[1];let a;e[2]!==n?(a=Z("group/card flex cursor-pointer flex-col gap-3 rounded-2xl border border-border bg-background p-4 text-left transition-colors hover:border-border hover:bg-muted/40",n),e[2]=n,e[3]=a):a=e[3];let c;return e[4]!==i||e[5]!==l||e[6]!==r||e[7]!==a?(c=t.jsx("div",{role:"button",tabIndex:0,onClick:l,onKeyDown:r,className:a,children:i}),e[4]=i,e[5]=l,e[6]=r,e[7]=a,e[8]=c):c=e[8],c}function me(s){const e=$.c(19),{icon:l,name:i,meta:n,subtitle:r,publicState:a,actions:c}=s;let o;e[0]!==i?(o=t.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",title:i,children:i}),e[0]=i,e[1]=o):o=e[1];let d;e[2]!==a?(d=a&&t.jsx(Bs,{state:a}),e[2]=a,e[3]=d):d=e[3];let u;e[4]!==n?(u=n&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:n}),e[4]=n,e[5]=u):u=e[5];let f;e[6]!==o||e[7]!==d||e[8]!==u?(f=t.jsxs("div",{className:"flex items-start gap-3",children:[o,d,u]}),e[6]=o,e[7]=d,e[8]=u,e[9]=f):f=e[9];let m;e[10]!==r?(m=r&&t.jsx("span",{className:"truncate text-xs text-muted-foreground",title:r,children:r}),e[10]=r,e[11]=m):m=e[11];let h;e[12]!==f||e[13]!==m?(h=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col justify-center",children:[f,m]}),e[12]=f,e[13]=m,e[14]=h):h=e[14];let x;return e[15]!==c||e[16]!==l||e[17]!==h?(x=t.jsxs("div",{className:"flex w-full items-center gap-2.5",children:[l,h,c]}),e[15]=c,e[16]=l,e[17]=h,e[18]=x):x=e[18],x}function ze(s){const e=$.c(17),{name:l,meta:i,subtitle:n,glyph:r,readOnly:a,publicState:c,onOpen:o,onShare:d,onDelete:u}=s;let f;e[0]!==r||e[1]!==a?(f=t.jsx(bs,{glyph:r,readOnly:a,className:"size-8 shrink-0"}),e[0]=r,e[1]=a,e[2]=f):f=e[2];let m;e[3]!==l||e[4]!==u||e[5]!==d?(m=d||u?t.jsxs(Te,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:qs,"aria-label":`Actions for ${l}`,children:t.jsx(Se,{size:14})})}),t.jsxs(De,{align:"end",onClick:_s,children:[d&&t.jsx(Ve,{onShare:d}),u&&t.jsxs(te,{variant:"destructive",onClick:u,children:[t.jsx($e,{size:14}),"Delete"]})]})]}):void 0,e[3]=l,e[4]=u,e[5]=d,e[6]=m):m=e[6];let h;e[7]!==i||e[8]!==l||e[9]!==c||e[10]!==n||e[11]!==f||e[12]!==m?(h=t.jsx(me,{icon:f,name:l,meta:i,subtitle:n,publicState:c,actions:m}),e[7]=i,e[8]=l,e[9]=c,e[10]=n,e[11]=f,e[12]=m,e[13]=h):h=e[13];let x;return e[14]!==o||e[15]!==h?(x=t.jsx(ue,{onOpen:o,children:h}),e[14]=o,e[15]=h,e[16]=x):x=e[16],x}function _s(s){return s.stopPropagation()}function qs(s){return s.stopPropagation()}function bt(s){const e=$.c(22),{filename:l,updatedAt:i,downloadUrl:n,subtitle:r,publicState:a,onOpen:c,onShare:o,onDelete:d}=s;let u;e[0]!==l?(u=t.jsx(ne,{filename:l,className:"h-8 w-6.5 shrink-0"}),e[0]=l,e[1]=u):u=e[1];let f;e[2]!==i?(f=fe(i),e[2]=i,e[3]=f):f=e[3];let m;e[4]!==l||e[5]!==r?(m=r??dt(l),e[4]=l,e[5]=r,e[6]=m):m=e[6];let h;e[7]!==n||e[8]!==l||e[9]!==d||e[10]!==o?(h=t.jsx(gt,{downloadUrl:n,filename:l,onShare:o,onDelete:d}),e[7]=n,e[8]=l,e[9]=d,e[10]=o,e[11]=h):h=e[11];let x;e[12]!==l||e[13]!==a||e[14]!==u||e[15]!==f||e[16]!==m||e[17]!==h?(x=t.jsx(me,{icon:u,name:l,meta:f,subtitle:m,publicState:a,actions:h}),e[12]=l,e[13]=a,e[14]=u,e[15]=f,e[16]=m,e[17]=h,e[18]=x):x=e[18];let b;return e[19]!==c||e[20]!==x?(b=t.jsx(ue,{onOpen:c,children:x}),e[19]=c,e[20]=x,e[21]=b):b=e[21],b}function Is(s){const e=$.c(40),{dirName:l,updatedAt:i,skillMdUrl:n,publicState:r,onOpen:a,onBrowse:c,onShare:o,onDelete:d}=s;let u;e[0]!==n?(u=L.fileText(n),e[0]=n,e[1]=u):u=e[1];let f;e[2]!==n?(f=async()=>{const q=await fetch(n,{credentials:"include"});if(!q.ok)throw new Error(`fetch failed: ${q.status}`);return q.text()},e[2]=n,e[3]=f):f=e[3];let m;e[4]!==u||e[5]!==f?(m={queryKey:u,queryFn:f,staleTime:6e4,retry:!1},e[4]=u,e[5]=f,e[6]=m):m=e[6];const{data:h}=Y(m);let x;e[7]!==h?(x=h?xt(h):null,e[7]=h,e[8]=x):x=e[8];const b=x;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(Le,{size:16})}),e[9]=j):j=e[9];const v=b?.name??l;let g;e[10]!==i?(g=fe(i),e[10]=i,e[11]=g):g=e[11];const w=`Actions for ${l}`;let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Se,{size:14}),e[12]=C):C=e[12];let k;e[13]!==w?(k=t.jsx(Ce,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Vs,"aria-label":w,children:C})}),e[13]=w,e[14]=k):k=e[14];let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(at,{size:14}),e[15]=S):S=e[15];let D;e[16]!==c?(D=t.jsxs(te,{onClick:c,children:[S,"Browse files"]}),e[16]=c,e[17]=D):D=e[17];let T;e[18]!==o?(T=o&&t.jsx(Ve,{onShare:o}),e[18]=o,e[19]=T):T=e[19];let P;e[20]!==d?(P=d&&t.jsxs(te,{variant:"destructive",onClick:d,children:[t.jsx($e,{size:14}),"Delete"]}),e[20]=d,e[21]=P):P=e[21];let F;e[22]!==D||e[23]!==T||e[24]!==P?(F=t.jsxs(De,{align:"end",onClick:Ks,children:[D,T,P]}),e[22]=D,e[23]=T,e[24]=P,e[25]=F):F=e[25];let p;e[26]!==k||e[27]!==F?(p=t.jsxs(Te,{children:[k,F]}),e[26]=k,e[27]=F,e[28]=p):p=e[28];let z;e[29]!==r||e[30]!==p||e[31]!==v||e[32]!==g?(z=t.jsx(me,{icon:j,name:v,meta:g,subtitle:"Skill",publicState:r,actions:p}),e[29]=r,e[30]=p,e[31]=v,e[32]=g,e[33]=z):z=e[33];const O=b?.description??"";let M;e[34]!==O?(M=t.jsx("p",{className:"line-clamp-2 min-h-8 text-xs leading-4 text-muted-foreground",children:O}),e[34]=O,e[35]=M):M=e[35];let _;return e[36]!==a||e[37]!==z||e[38]!==M?(_=t.jsxs(ue,{onOpen:a,children:[z,M]}),e[36]=a,e[37]=z,e[38]=M,e[39]=_):_=e[39],_}function Ks(s){return s.stopPropagation()}function Vs(s){return s.stopPropagation()}function Hs(s){const e=$.c(47),{dirName:l,updatedAt:i,tokensUrl:n,onOpen:r,onBrowse:a,onDelete:c}=s;let o;e[0]!==n?(o=L.fileText(n),e[0]=n,e[1]=o):o=e[1];let d;e[2]!==n?(d=async()=>{const w=await fetch(n,{credentials:"include"});if(!w.ok)throw new Error(`fetch failed: ${w.status}`);return w.text()},e[2]=n,e[3]=d):d=e[3];let u;e[4]!==o||e[5]!==d?(u={queryKey:o,queryFn:d,staleTime:6e4,retry:!1},e[4]=o,e[5]=d,e[6]=u):u=e[6];const{data:f}=Y(u);let m,h,x,b,j;if(e[7]!==f||e[8]!==l||e[9]!==a||e[10]!==c||e[11]!==r||e[12]!==i){const w=f?pt(f).filter(Ys).slice(0,6):[];m=ue,b=r;let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(je,{size:16})}),e[18]=C):C=e[18];let k;e[19]!==i?(k=fe(i),e[19]=i,e[20]=k):k=e[20];const S=`Actions for ${l}`;let D;e[21]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(Se,{size:14}),e[21]=D):D=e[21];let T;e[22]!==S?(T=t.jsx(Ce,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Ws,"aria-label":S,children:D})}),e[22]=S,e[23]=T):T=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(at,{size:14}),e[24]=P):P=e[24];let F;e[25]!==a?(F=t.jsxs(te,{onClick:a,children:[P,"Browse files"]}),e[25]=a,e[26]=F):F=e[26];let p;e[27]!==c?(p=c&&t.jsxs(te,{variant:"destructive",onClick:c,children:[t.jsx($e,{size:14}),"Delete"]}),e[27]=c,e[28]=p):p=e[28];let z;e[29]!==F||e[30]!==p?(z=t.jsxs(De,{align:"end",onClick:Qs,children:[F,p]}),e[29]=F,e[30]=p,e[31]=z):z=e[31];let O;e[32]!==T||e[33]!==z?(O=t.jsxs(Te,{children:[T,z]}),e[32]=T,e[33]=z,e[34]=O):O=e[34],e[35]!==l||e[36]!==O||e[37]!==k?(j=t.jsx(me,{icon:C,name:l,meta:k,subtitle:"Brand",actions:O}),e[35]=l,e[36]=O,e[37]=k,e[38]=j):j=e[38],h="flex min-h-5 items-center gap-1.5",x=w.map(Gs),e[7]=f,e[8]=l,e[9]=a,e[10]=c,e[11]=r,e[12]=i,e[13]=m,e[14]=h,e[15]=x,e[16]=b,e[17]=j}else m=e[13],h=e[14],x=e[15],b=e[16],j=e[17];let v;e[39]!==h||e[40]!==x?(v=t.jsx("div",{className:h,children:x}),e[39]=h,e[40]=x,e[41]=v):v=e[41];let g;return e[42]!==m||e[43]!==b||e[44]!==j||e[45]!==v?(g=t.jsxs(m,{onOpen:b,children:[j,v]}),e[42]=m,e[43]=b,e[44]=j,e[45]=v,e[46]=g):g=e[46],g}function Gs(s){return t.jsx("span",{className:"size-5 rounded-full border border-border/60",style:{backgroundColor:s.value},title:`${s.name}: ${s.value}`},s.name)}function Qs(s){return s.stopPropagation()}function Ws(s){return s.stopPropagation()}function Ys(s){return s.isColor}function Ue(s){const e=$.c(4),{children:l}=s,[i,n]=B.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>o=>{if(!o)return;const d=new IntersectionObserver(u=>{const[f]=u;f?.isIntersecting&&(n(!0),d.disconnect())},{rootMargin:"200px"});d.observe(o)},e[0]=r):r=e[0];const[a]=B.useState(r);if(i){let o;return e[1]!==l?(o=t.jsx(t.Fragment,{children:l}),e[1]=l,e[2]=o):o=e[2],o}let c;return e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{ref:a,className:"h-full w-full"}),e[3]=c):c=e[3],c}function Xs(s){const e=$.c(11),{url:l}=s;let i;e[0]!==l?(i=L.fileText(l),e[0]=l,e[1]=i):i=e[1];let n;e[2]!==l?(n=async()=>{const d=await fetch(l,{credentials:"include"});if(!d.ok)throw new Error(`fetch failed: ${d.status}`);return d.text()},e[2]=l,e[3]=n):n=e[3];let r;e[4]!==i||e[5]!==n?(r={queryKey:i,queryFn:n,staleTime:6e4,retry:!1},e[4]=i,e[5]=n,e[6]=r):r=e[6];const{data:a}=Y(r);if(!a)return null;let c;e[7]!==a?(c=a.slice(0,2e3),e[7]=a,e[8]=c):c=e[8];let o;return e[9]!==c?(o=t.jsx("pre",{className:"pointer-events-none h-full w-full overflow-hidden bg-background p-3 font-mono text-[9px] leading-[1.5] text-muted-foreground select-none",children:c}),e[9]=c,e[10]=o):o=e[10],o}function Zs(s){const e=$.c(23),{url:l,ext:i}=s;let n;e[0]!==l?(n=L.csvThumb(l),e[0]=l,e[1]=n):n=e[1];let r;e[2]!==l?(r=async()=>{const j=await fetch(l,{credentials:"include",headers:{Range:"bytes=0-8191"}});if(!j.ok)throw new Error(`fetch failed: ${j.status}`);return j.text()},e[2]=l,e[3]=r):r=e[3];let a;e[4]!==n||e[5]!==r?(a={queryKey:n,queryFn:r,staleTime:6e4,retry:!1},e[4]=n,e[5]=r,e[6]=a):a=e[6];const{data:c}=Y(a);if(!c)return null;const o=i==="tsv"?" ":",";let d,u,f,m;if(e[7]!==c||e[8]!==o){m=Symbol.for("react.early_return_sentinel");e:{let j;e[13]!==o?(j=g=>g.split(o).slice(0,6).map(tl),e[13]=o,e[14]=j):j=e[14];const v=c.split(`
9
+ `).filter(Boolean).slice(0,7).map(j);if(v.length===0){m=null;break e}f="pointer-events-none h-full w-full overflow-hidden bg-background p-2 select-none",u="w-full border-collapse",d=v.map(Js)}e[7]=c,e[8]=o,e[9]=d,e[10]=u,e[11]=f,e[12]=m}else d=e[9],u=e[10],f=e[11],m=e[12];if(m!==Symbol.for("react.early_return_sentinel"))return m;let h;e[15]!==d?(h=t.jsx("tbody",{children:d}),e[15]=d,e[16]=h):h=e[16];let x;e[17]!==u||e[18]!==h?(x=t.jsx("table",{className:u,children:h}),e[17]=u,e[18]=h,e[19]=x):x=e[19];let b;return e[20]!==f||e[21]!==x?(b=t.jsx("div",{className:f,children:x}),e[20]=f,e[21]=x,e[22]=b):b=e[22],b}function Js(s,e){return t.jsx("tr",{className:Z(e===0&&"bg-muted/50 font-medium"),children:s.map(el)},e)}function el(s,e){return t.jsx("td",{className:"max-w-[56px] overflow-hidden border border-border/30 px-1 py-px text-[7px] leading-[1.4] text-muted-foreground",style:{maxWidth:56},children:t.jsx("span",{className:"block truncate",children:s})},e)}function tl(s){return s.trim().replace(/^"|"$/g,"")}function sl(s){const e=$.c(14),{filename:l,size:i,downloadUrl:n}=s;let r;if(e[0]!==n||e[1]!==l||e[2]!==i){const a=Us(l);let c;if(Fs.has(a)){let o;e[4]!==n?(o=t.jsx("img",{src:n,alt:"",loading:"lazy",className:"h-full w-full object-cover"}),e[4]=n,e[5]=o):o=e[5],c=o}else if(Es.has(a)){const o=`${n}#t=0.1`;let d;e[6]!==o?(d=t.jsx(Ue,{children:t.jsx("video",{src:o,preload:"metadata",muted:!0,playsInline:!0,className:"pointer-events-none h-full w-full object-cover"})}),e[6]=o,e[7]=d):d=e[7],c=d}else if(a==="pdf"){let o;e[8]!==l?(o=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(ne,{filename:l,className:"h-14 w-11 opacity-60"})}),e[8]=l,e[9]=o):o=e[9],c=o}else if(Os.has(a))c=t.jsx(Ue,{children:t.jsx(Zs,{url:n,ext:a})});else if(As.has(a)&&i<=Ms){let o;e[10]!==n?(o=t.jsx(Ue,{children:t.jsx(Xs,{url:n})}),e[10]=n,e[11]=o):o=e[11],c=o}else{let o;e[12]!==l?(o=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(ne,{filename:l,className:"h-14 w-11 opacity-60"})}),e[12]=l,e[13]=o):o=e[13],c=o}r=t.jsx("div",{className:"aspect-[400/265] w-full overflow-hidden rounded-lg border border-border/60 bg-muted/30",children:c}),e[0]=n,e[1]=l,e[2]=i,e[3]=r}else r=e[3];return r}function ll(s){const e=$.c(27),l=s.onOpen;let i;e[0]!==s.filename?(i=t.jsx(ne,{filename:s.filename,className:"h-8 w-6.5 shrink-0"}),e[0]=s.filename,e[1]=i):i=e[1];const n=s.filename;let r;e[2]!==s.updatedAt?(r=fe(s.updatedAt),e[2]=s.updatedAt,e[3]=r):r=e[3];let a;e[4]!==s.filename||e[5]!==s.subtitle?(a=s.subtitle??dt(s.filename),e[4]=s.filename,e[5]=s.subtitle,e[6]=a):a=e[6];let c;e[7]!==s.downloadUrl||e[8]!==s.filename||e[9]!==s.onDelete||e[10]!==s.onShare?(c=t.jsx(gt,{downloadUrl:s.downloadUrl,filename:s.filename,onShare:s.onShare,onDelete:s.onDelete}),e[7]=s.downloadUrl,e[8]=s.filename,e[9]=s.onDelete,e[10]=s.onShare,e[11]=c):c=e[11];let o;e[12]!==s.filename||e[13]!==s.publicState||e[14]!==i||e[15]!==r||e[16]!==a||e[17]!==c?(o=t.jsx(me,{icon:i,name:n,meta:r,subtitle:a,publicState:s.publicState,actions:c}),e[12]=s.filename,e[13]=s.publicState,e[14]=i,e[15]=r,e[16]=a,e[17]=c,e[18]=o):o=e[18];let d;e[19]!==s.downloadUrl||e[20]!==s.filename||e[21]!==s.size?(d=t.jsx(sl,{filename:s.filename,size:s.size,downloadUrl:s.downloadUrl}),e[19]=s.downloadUrl,e[20]=s.filename,e[21]=s.size,e[22]=d):d=e[22];let u;return e[23]!==s.onOpen||e[24]!==o||e[25]!==d?(u=t.jsxs(ue,{onOpen:l,children:[o,d]}),e[23]=s.onOpen,e[24]=o,e[25]=d,e[26]=u):u=e[26],u}async function nl(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}const il=`
10
10
  *{box-sizing:border-box}
11
11
  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}
12
12
  .stack{display:flex;flex-direction:column;gap:18px;max-width:760px}
@@ -166,4 +166,4 @@ import{c as $,r as B,j as t,k as Y,B as q,K as L,l as Z,D as Ne,m as st,t as W,b
166
166
  <p class="cta">slides-create --theme &hellip;</p>
167
167
  </section>`].join(`
168
168
 
169
- `);async function Je(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function fl(s,e){const l=e?`<style>${e}</style>`:"";return s.replaceAll("{{{slides}}}",dl).replaceAll("{{title}}",cl).replace(/(src=")(\/deck-runtime\/)/g,`$1${window.location.origin}$2`).replace("</head>",`${l}</head>`)}function ul(s){const e=$.c(23),{readUrl:l,title:i,tokensUrl:n}=s;let r;e[0]!==l?(r=L.fileText(l),e[0]=l,e[1]=r):r=e[1];let a;e[2]!==l?(a=()=>Je(l),e[2]=l,e[3]=a):a=e[3];let c;e[4]!==r||e[5]!==a?(c={queryKey:r,queryFn:a,staleTime:6e4,retry:!1},e[4]=r,e[5]=a,e[6]=c):c=e[6];const o=Y(c);let d;e[7]!==n?(d=L.fileText(n??""),e[7]=n,e[8]=d):d=e[8];const u=!!n;let f;e[9]!==n?(f=()=>Je(n??""),e[9]=n,e[10]=f):f=e[10];let m;e[11]!==d||e[12]!==u||e[13]!==f?(m={queryKey:d,enabled:u,queryFn:f,staleTime:6e4,retry:!1},e[11]=d,e[12]=u,e[13]=f,e[14]=m):m=e[14];const h=Y(m);if(o.isPending||n&&h.isPending){let v;return e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(V,{className:"aspect-[16/9] w-full max-w-3xl rounded-xl"})}),e[15]=v):v=e[15],v}if(o.isError||!o.data){let v;return e[16]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This theme is no longer available."}),e[16]=v):v=e[16],v}const x=h.data??null;let b;e[17]!==x||e[18]!==o.data?(b=fl(o.data,x),e[17]=x,e[18]=o.data,e[19]=b):b=e[19];let y;return e[20]!==b||e[21]!==i?(y=t.jsx("iframe",{title:i,srcDoc:b,sandbox:"allow-scripts",className:"block h-full w-full border-0 bg-white"}),e[20]=b,e[21]=i,e[22]=y):y=e[22],y}async function et(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function oe(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=t.jsx("p",{className:"text-sm font-medium text-foreground",children:l}),e[0]=l,e[1]=i):i=e[1],i}function ml(s){const e=$.c(16),{family:l,tokens:i,editing:n,valueOf:r,onEdit:a}=s;let c;e[0]!==l?(c=t.jsx("span",{className:"text-xs text-muted-foreground",children:l}),e[0]=l,e[1]=c):c=e[1];let o;if(e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==n||e[8]!==a||e[9]!==r?(f=m=>{const h=r(m),x=`${m.name.replace(/^--brand-/,"")}: ${h}`;return n&&/^#/.test(h)?t.jsx("input",{type:"color","aria-label":m.name,title:x,value:$s(h),onChange:b=>a(m.name,b.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:h}},m.name)},e[7]=n,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=n,e[3]=a,e[4]=i,e[5]=r,e[6]=o}else o=e[6];let d;e[11]!==o?(d=t.jsx("div",{className:"flex flex-wrap gap-1",children:o}),e[11]=o,e[12]=d):d=e[12];let u;return e[13]!==c||e[14]!==d?(u=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[c,d]}),e[13]=c,e[14]=d,e[15]=u):u=e[15],u}function hl(s){const e=$.c(9),{token:l,value:i}=s;if(l.kind==="space"){let r;return e[0]!==i?(r=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:i,maxWidth:"100%"}})}),e[0]=i,e[1]=r):r=e[1],r}if(l.kind==="radius"){let r;return e[2]!==i?(r=t.jsx("span",{className:"size-7 shrink-0 border border-border bg-muted/50",style:{borderRadius:i}}),e[2]=i,e[3]=r):r=e[3],r}if(l.kind==="shadow"){let r;return e[4]!==i?(r=t.jsx("span",{className:"size-7 shrink-0 rounded-md bg-background",style:{boxShadow:i}}),e[4]=i,e[5]=r):r=e[5],r}if(l.kind==="type"&&/^--brand-text-/.test(l.name)){const r=`min(${i}, 22px)`;let a;return e[6]!==r?(a=t.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden leading-none text-foreground",style:{fontSize:r},children:"Ag"}),e[6]=r,e[7]=a):a=e[7],a}let n;return e[8]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("span",{className:"size-7 shrink-0"}),e[8]=n):n=e[8],n}function vt(s){const e=$.c(17),{token:l,value:i,editing:n,onEdit:r}=s;let a;e[0]!==l||e[1]!==i?(a=t.jsx(hl,{token:l,value:i}),e[0]=l,e[1]=i,e[2]=a):a=e[2];let c;if(e[3]!==l.name){let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=/^--brand-/,e[5]=f):f=e[5],c=l.name.replace(f,""),e[3]=l.name,e[4]=c}else c=e[4];let o;e[6]!==c?(o=t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:c}),e[6]=c,e[7]=o):o=e[7];let d;e[8]!==n||e[9]!==r||e[10]!==l.name||e[11]!==i?(d=n?t.jsx(we,{value:i,onChange:f=>r(l.name,f.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:i}),e[8]=n,e[9]=r,e[10]=l.name,e[11]=i,e[12]=d):d=e[12];let u;return e[13]!==a||e[14]!==o||e[15]!==d?(u=t.jsxs("div",{className:"flex items-center gap-3",children:[a,o,d]}),e[13]=a,e[14]=o,e[15]=d,e[16]=u):u=e[16],u}function ae(s){const e=$.c(16),{label:l,tokens:i,editing:n,valueOf:r,onEdit:a}=s;if(i.length===0)return null;let c;e[0]!==l?(c=t.jsx(oe,{children:l}),e[0]=l,e[1]=c):c=e[1];let o;if(e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==n||e[8]!==a||e[9]!==r?(f=m=>t.jsx(vt,{token:m,value:r(m),editing:n,onEdit:a},m.name),e[7]=n,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=n,e[3]=a,e[4]=i,e[5]=r,e[6]=o}else o=e[6];let d;e[11]!==o?(d=t.jsx("div",{className:"flex flex-col gap-2.5",children:o}),e[11]=o,e[12]=d):d=e[12];let u;return e[13]!==c||e[14]!==d?(u=t.jsxs("div",{className:"flex flex-col gap-3",children:[c,d]}),e[13]=c,e[14]=d,e[15]=u):u=e[15],u}function yt({brandPath:s,onClose:e,variant:l}){const{org:i}=Ne(),n=Ie(s),r=n.volume??"",a=n.dirPath,c=A(a),o=n.readOnly,d=st(),u=de(),f=Jt(r),{upload:m,remove:h}=Be(r),x=B.useRef(null),b=Ke(r,a),y=b.data??[],v=j=>y.some(U=>U.kind==="file"&&A(U.path)===j),g=v("tokens.css"),w=v("brand.md"),C=v("slides-theme.html"),k=Ts(y),S=u(r,`${a}/tokens.css`),D=u(r,`${a}/brand.md`),z=u(r,`${a}/slides-theme.html`),P=Y({queryKey:L.fileText(S),enabled:g,queryFn:()=>et(S),staleTime:6e4,retry:!1}),F=Y({queryKey:L.fileText(D),enabled:w,queryFn:()=>et(D),staleTime:6e4,retry:!1}),[p,T]=B.useState(!1),[O,M]=B.useState({}),[R,_]=B.useState(null),[Q,E]=B.useState(!1),[I,se]=B.useState(!1),[he,pe]=B.useState("deck"),G=P.data?pt(P.data):[],Oe=j=>G.find(U=>U.name===j)?.value,H=j=>O[j.name]??j.value,ie=Ds(G),xe=G.filter(j=>j.kind==="font"),ge=G.filter(j=>j.kind==="type"),N=G.filter(j=>j.kind==="space"),K=G.filter(j=>j.kind==="radius"),re=G.filter(j=>j.kind==="shadow"),Nt=G.filter(j=>j.kind==="motion"),St=G.filter(j=>j.kind==="other"),J=(j,U)=>M(ve=>({...ve,[j]:U})),be=C&&he==="deck",Ee=R??F.data??"",Ae=Object.entries(O).filter(([j,U])=>Oe(j)!==U),Ge=R!==null&&R!==(F.data??""),$t=Ae.length>0||Ge;function Ct(){M({}),_(null),T(!1)}async function Dt(){E(!0);try{if(Ae.length>0){let j=P.data??"";for(const[U,ve]of Ae)j=zs(j,U,ve);await f.mutateAsync({path:`${a}/tokens.css`,body:j,contentType:"text/css; charset=utf-8"}),d.invalidateQueries({queryKey:L.fileText(S)})}Ge&&R!==null&&(await f.mutateAsync({path:`${a}/brand.md`,body:R,contentType:"text/markdown; charset=utf-8"}),d.invalidateQueries({queryKey:L.fileText(D)})),d.invalidateQueries({queryKey:L.orgFsVolume(i.id,r)}),d.invalidateQueries({queryKey:L.orgFsRecent(i.id)}),M({}),_(null),T(!1),W.success("Brand saved")}catch(j){W.error(j instanceof Error?j.message:"Failed to save brand")}finally{E(!1)}}async function zt(j){const U=j?.[0];if(!U)return;const Qe=`logo.${(U.name.split(".").pop()??"png").toLowerCase()}`;try{await m.mutateAsync({dir:a,files:[new File([U],Qe,{type:U.type})]}),k&&A(k)!==Qe&&await h.mutateAsync(k),W.success("Logo updated")}catch(We){W.error(We instanceof Error?We.message:"Logo upload failed")}finally{x.current&&(x.current.value="")}}const Tt=!b.isPending&&!g&&!w&&!k;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(ye,{size:18})}),l==="dialog"?t.jsx(_e,{className:"flex-1 truncate text-base font-medium text-foreground",children:c}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:c}),!o&&(p?t.jsxs(t.Fragment,{children:[t.jsx(q,{variant:"ghost",size:"sm",onClick:Ct,disabled:Q,children:"Cancel"}),t.jsx(q,{size:"sm",disabled:!$t||Q,onClick:()=>{Dt()},children:Q?"Saving…":"Save"})]}):t.jsxs(q,{variant:"outline",size:"sm",onClick:()=>T(!0),children:[t.jsx(At,{size:14}),"Edit"]})),l==="dialog"?t.jsx(ct,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ke,{size:16})})}):t.jsx(q,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:e,children:t.jsx(ke,{size:16})})]}),t.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:b.isPending?t.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[t.jsx(V,{className:"h-40 w-full rounded-xl"}),t.jsx(V,{className:"h-4 w-1/3"}),t.jsx(V,{className:"h-4 w-2/3"})]}):Tt?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This brand is no longer available."}):t.jsxs(t.Fragment,{children:[(C||g)&&t.jsxs("div",{className:"shrink-0 border-b border-border",children:[t.jsxs("div",{role:"button",tabIndex:0,"aria-label":I?"Show preview":"Hide preview",onClick:()=>se(j=>!j),onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),se(U=>!U))},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:j=>j.stopPropagation(),children:[C&&t.jsx("button",{type:"button",onClick:()=>{pe("deck"),se(!1)},className:Z("rounded-md px-2.5 py-1",be?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Deck"}),t.jsx("button",{type:"button",onClick:()=>{pe("components"),se(!1)},className:Z("rounded-md px-2.5 py-1",be?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm"),children:"Components"})]}),I?t.jsx(hs,{size:16,className:"shrink-0 text-muted-foreground"}):t.jsx(ps,{size:16,className:"shrink-0 text-muted-foreground"})]}),!I&&t.jsx("div",{className:"px-4 pb-4",children:t.jsx("div",{className:Z("w-full overflow-hidden rounded-xl border border-border bg-muted/30",be?"aspect-[16/9]":"h-96"),children:be?t.jsx(ul,{readUrl:z,title:`${c} deck theme`,tokensUrl:S}):t.jsx(ol,{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(oe,{children:"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:k?t.jsx("img",{src:u(r,k),alt:`${c} logo`,className:"max-h-full max-w-full object-contain"}):t.jsx(ye,{size:28,className:"text-muted-foreground/50"})}),p&&t.jsxs("div",{children:[t.jsxs(q,{variant:"outline",size:"sm",disabled:m.isPending,onClick:()=>x.current?.click(),children:[t.jsx(je,{size:14}),k?"Replace logo":"Add logo"]}),t.jsx("input",{ref:x,type:"file",accept:"image/*",className:"hidden",onChange:j=>{zt(j.target.files)}})]})]})]}),ie.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(oe,{children:"Colors"}),ie.map(j=>t.jsx(ml,{family:j.family,tokens:j.tokens,editing:p,valueOf:H,onEdit:J},j.family))]}),(xe.length>0||ge.length>0)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(oe,{children:"Typography"}),xe.map(j=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:j.name.replace(/^--brand-font-?/,"")||"font"}),p?t.jsx(we,{value:H(j),onChange:U=>J(j.name,U.target.value),className:"h-9"}):t.jsx("span",{className:"truncate text-lg text-foreground",style:{fontFamily:H(j)},children:H(j)})]},j.name)),ge.map(j=>t.jsx(vt,{token:j,value:H(j),editing:p,onEdit:J},j.name))]}),t.jsx(ae,{label:"Spacing",tokens:N,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Radius",tokens:K,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Shadows",tokens:re,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Motion",tokens:Nt,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Tokens",tokens:St,editing:p,valueOf:H,onEdit:J}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(oe,{children:"Voice & guidelines"}),p?t.jsx(ms,{value:Ee,onChange:j=>_(j.target.value),placeholder:"Describe the brand voice, tone, do's and don'ts…",className:"min-h-48 font-mono text-sm"}):F.isPending&&w?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(V,{className:"h-3 w-full"}),t.jsx(V,{className:"h-3 w-5/6"})]}):Ee.trim()?t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:t.jsx(ft,{id:`brand-preview-${s}`,text:Ee})}):t.jsx("p",{className:"text-sm text-muted-foreground",children:"No brand voice written yet."})]})]})]})})]})}function pl(s){const e=$.c(8),{brandPath:l,onClose:i}=s;let n;e[0]!==i?(n=c=>{c||i()},e[0]=i,e[1]=n):n=e[1];let r;e[2]!==l||e[3]!==i?(r=t.jsx(qe,{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(yt,{brandPath:l,onClose:i,variant:"dialog"})}),e[2]=l,e[3]=i,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==r?(a=t.jsx(Re,{open:!0,onOpenChange:n,children:r}),e[5]=n,e[6]=r,e[7]=a):a=e[7],a}function xl(s){const e=$.c(3),{brandPath:l,onClose:i}=s;let n;return e[0]!==l||e[1]!==i?(n=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(yt,{brandPath:l,onClose:i,variant:"panel"})}),e[0]=l,e[1]=i,e[2]=n):n=e[2],n}function jt(s){const e=$.c(23),{skillPath:l,onClose:i,variant:n}=s,r=Ie(l),{volume:a,dirPath:c}=r,o=de(),d=o(a??"",`${c}/SKILL.md`),u=L.fileText(d);let f;e[0]!==d?(f=async()=>{const E=await fetch(d,{credentials:"include"});if(!E.ok)throw new Error(`fetch failed: ${E.status}`);return E.text()},e[0]=d,e[1]=f):f=e[1];let m;e[2]!==u||e[3]!==f?(m={queryKey:u,queryFn:f,staleTime:6e4,retry:!1},e[2]=u,e[3]=f,e[4]=m):m=e[4];const h=Y(m),x=Ke(a??"",c);let b;e[5]!==c?(b=A(c),e[5]=c,e[6]=b):b=e[6];const y=b;let v;e[7]!==h.data?(v=h.data?xt(h.data):null,e[7]=h.data,e[8]=v):v=e[8];const g=v,w=bl;let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=(E,I)=>w(E.path)?-1:w(I.path)?1:A(E.path).localeCompare(A(I.path)),e[9]=C):C=e[9];const k=(x.data??[]).filter(gl).sort(C),[S,D]=B.useState(null),z=S===null?null:k.find(E=>E.path===S)??null,P=g?.name??y;let F;e[10]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(Le,{size:18})}),e[10]=F):F=e[10];let p;e[11]!==P||e[12]!==n?(p=n==="dialog"?t.jsx(_e,{className:"flex-1 truncate text-base font-medium text-foreground",children:P}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:P}),e[11]=P,e[12]=n,e[13]=p):p=e[13];let T;e[14]!==i||e[15]!==n?(T=n==="dialog"?t.jsx(ct,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ke,{size:16})})}):t.jsx(q,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:i,children:t.jsx(ke,{size:16})}),e[14]=i,e[15]=n,e[16]=T):T=e[16];let O;e[17]!==p||e[18]!==T?(O=t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[F,p,T]}),e[17]=p,e[18]=T,e[19]=O):O=e[19];let M;e[20]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[20]=M):M=e[20];const R="relative flex min-w-0 flex-1 flex-col overflow-y-auto",_=z?t.jsx(es,{file:{key:z.path,filename:A(z.path),size:z.size,downloadUrl:o(a??"",z.path)}}):h.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(V,{className:"h-4 w-1/3"}),t.jsx(V,{className:"h-3 w-full"}),t.jsx(V,{className:"h-3 w-5/6"}),t.jsx(V,{className:"h-3 w-2/3"})]}):h.isError||!g?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),t.jsx("p",{className:"text-base text-muted-foreground",children:g.description??"Claude Code skill"})]}),t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:t.jsx(ft,{id:`skill-preview-${l}`,text:g.body})})]});let Q;return e[21]!==_?(Q=t.jsx("div",{className:R,children:_}),e[21]=_,e[22]=Q):Q=e[22],t.jsxs(t.Fragment,{children:[O,t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[M,x.isPending?t.jsx(V,{className:"mx-2 h-4 w-24"}):k.map(E=>{const I=w(E.path)?z===null:S===E.path;return t.jsxs("button",{type:"button",onClick:()=>D(w(E.path)?null:E.path),className:Z("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",I?"bg-background shadow-sm":"hover:bg-muted/60"),children:[t.jsx(ne,{filename:A(E.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:Z("truncate text-sm",I?"text-foreground":"text-muted-foreground"),children:A(E.path)})]},E.path)})]}),Q]})]})}function gl(s){return s.kind==="file"}function bl(s){return A(s)==="SKILL.md"}function vl(s){const e=$.c(8),{skillPath:l,onClose:i}=s;let n;e[0]!==i?(n=c=>{c||i()},e[0]=i,e[1]=n):n=e[1];let r;e[2]!==i||e[3]!==l?(r=t.jsx(qe,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:t.jsx(jt,{skillPath:l,onClose:i,variant:"dialog"})}),e[2]=i,e[3]=l,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==r?(a=t.jsx(Re,{open:!0,onOpenChange:n,children:r}),e[5]=n,e[6]=r,e[7]=a):a=e[7],a}function yl(s){const e=$.c(3),{skillPath:l,onClose:i}=s;let n;return e[0]!==i||e[1]!==l?(n=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(jt,{skillPath:l,onClose:i,variant:"panel"})}),e[0]=i,e[1]=l,e[2]=n):n=e[2],n}function He(s){return`${window.location.origin}${s}`}function ce(s){if(s.shareMode==="password")return"password";if(s.shareMode==="public"||s.readPublic)return"public";if(s.effectivePublic)return"inherited"}const wt=[{id:"home",description:"Your organization's home folder",glyph:Mt},{id:"uploads",description:"Files your team uploads",glyph:je},{id:"outputs",description:"Agent run outputs",glyph:Lt}],jl=6;function kt(s,e,l){const i=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"",n=mt(s),r=n?`public/${n}`:s==="home"?ht(l):s;return i?`${r}/${i}`:r}function ee(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=t.jsx("p",{className:"text-[13px] text-foreground",children:l}),e[0]=l,e[1]=i):i=e[1],i}function X(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=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:l})}),e[0]=l,e[1]=i):i=e[1],i}function Pe(s){const e=$.c(2),{rows:l}=s,i=l===void 0?1:l;let n;return e[0]!==i?(n=t.jsx(X,{children:Array.from({length:i*3},wl)}),e[0]=i,e[1]=n):n=e[1],n}function wl(s,e){return t.jsx(V,{className:"h-16 rounded-2xl"},e)}function Fe(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:l}),e[0]=l,e[1]=i):i=e[1],i}function kl(s){const e=$.c(6),{volume:l,displayName:i,description:n,glyph:r,onOpen:a}=s,c=cs(l),o=i??l,d=c.data?`${c.data.files} files`:void 0;let u;return e[0]!==n||e[1]!==r||e[2]!==a||e[3]!==o||e[4]!==d?(u=t.jsx(Te,{name:o,meta:d,subtitle:n,glyph:r,onOpen:a}),e[0]=n,e[1]=r,e[2]=a,e[3]=o,e[4]=d,e[5]=u):u=e[5],u}function Nl(s){const e=$.c(8),{segments:l,onNavigate:i}=s;let n;e[0]!==i?(n=t.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(""),children:"Library"}),e[0]=i,e[1]=n):n=e[1];let r;e[2]!==i||e[3]!==l?(r=l.map((c,o)=>{const d=l.slice(0,o+1).join("/"),u=o===l.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(Ft,{size:12,className:"shrink-0 text-muted-foreground"}),u?t.jsx("span",{className:"truncate font-medium text-foreground",children:c}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(d),children:c})]},d)}),e[2]=i,e[3]=l,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==r?(a=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[n,r]}),e[5]=n,e[6]=r,e[7]=a):a=e[7],a}function Sl(s){const e=$.c(32),{query:l,stale:i,onOpenFile:n,onShare:r,onDelete:a}=s,{org:c}=Ne(),o=de(),d=as(l);let u;e[0]!==o||e[1]!==r?(u=k=>r({volume:k.volume,path:k.path,kind:"file",shareMode:k.shareMode??"private",effectivePublic:k.effectivePublic??!1,url:He(o(k.volume,k.path))}),e[0]=o,e[1]=r,e[2]=u):u=e[2];const f=u;if(d.isPending){let k;return e[3]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Pe,{rows:2}),e[3]=k):k=e[3],k}let m;e[4]!==d.data?(m=d.data??[],e[4]=d.data,e[5]=m):m=e[5];const h=m;if(h.length===0){let k;return e[6]!==l?(k=t.jsxs(Fe,{children:["No files match “",l,"”."]}),e[6]=l,e[7]=k):k=e[7],k}const x=(i||d.isPlaceholderData)&&"opacity-50";let b;e[8]!==x?(b=Z("flex flex-col gap-3",x),e[8]=x,e[9]=b):b=e[9];const y=h.length===1?"result":"results";let v;e[10]!==h.length||e[11]!==y?(v=t.jsxs(ee,{children:[h.length," ",y]}),e[10]=h.length,e[11]=y,e[12]=v):v=e[12];let g;if(e[13]!==o||e[14]!==a||e[15]!==n||e[16]!==c||e[17]!==h||e[18]!==f){let k;e[20]!==o||e[21]!==a||e[22]!==n||e[23]!==c||e[24]!==f?(k=S=>{const D=mt(S.volume)!==null;return t.jsx(bt,{filename:A(S.path),updatedAt:S.updatedAt,downloadUrl:o(S.volume,S.path),subtitle:kt(S.volume,S.path,c.slug),publicState:ce(S),onOpen:()=>n(ds(S.volume,S.path)),onShare:D?void 0:()=>f(S),onDelete:D?void 0:()=>a({volume:S.volume,path:S.path,kind:"file"})},`${S.volume}/${S.path}`)},e[20]=o,e[21]=a,e[22]=n,e[23]=c,e[24]=f,e[25]=k):k=e[25],g=h.map(k),e[13]=o,e[14]=a,e[15]=n,e[16]=c,e[17]=h,e[18]=f,e[19]=g}else g=e[19];let w;e[26]!==g?(w=t.jsx(X,{children:g}),e[26]=g,e[27]=w):w=e[27];let C;return e[28]!==b||e[29]!==v||e[30]!==w?(C=t.jsxs("div",{className:b,children:[v,w]}),e[28]=b,e[29]=v,e[30]=w,e[31]=C):C=e[31],C}function $l(s){const e=$.c(24),{onOpenDir:l,onOpenFile:i,onShare:n,onDelete:r}=s,{org:a}=Ne(),c=os(),o=ut(),d=de();let u;e[0]!==d||e[1]!==n?(u=g=>n({volume:g.volume,path:g.path,kind:"file",shareMode:g.shareMode??"private",effectivePublic:g.effectivePublic??!1,url:He(d(g.volume,g.path))}),e[0]=d,e[1]=n,e[2]=u):u=e[2];const f=u;let m;if(e[3]!==d||e[4]!==r||e[5]!==i||e[6]!==a||e[7]!==c.data||e[8]!==c.isPending||e[9]!==f){const g=(c.data??[]).slice(0,jl);m=c.isPending?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Recently added"}),t.jsx(Pe,{})]}):g.length>0?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Recently added"}),t.jsx(X,{children:g.map(w=>t.jsx(ll,{filename:A(w.path),updatedAt:w.updatedAt,size:w.size,downloadUrl:d(w.volume,w.path),subtitle:kt(w.volume,w.path,a.slug),publicState:ce(w),onOpen:()=>i(`${w.volume}/${w.path}`),onShare:()=>f(w),onDelete:()=>r({volume:w.volume,path:w.path,kind:"file"})},`${w.volume}/${w.path}`))})]}):t.jsx(Fe,{children:"No files yet — upload one, or ask an agent to produce something."}),e[3]=d,e[4]=r,e[5]=i,e[6]=a,e[7]=c.data,e[8]=c.isPending,e[9]=f,e[10]=m}else m=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(ee,{children:"Folders"}),e[11]=h):h=e[11];let x;e[12]!==l||e[13]!==a?(x=wt.map(g=>t.jsx(kl,{volume:g.id,displayName:g.id==="home"?ht(a.slug):void 0,description:g.description,glyph:g.glyph,onOpen:()=>l(g.id)},g.id)),e[12]=l,e[13]=a,e[14]=x):x=e[14];let b;e[15]!==l||e[16]!==o.data?.length?(b=(o.data?.length??0)>0&&t.jsx(Te,{name:"public",meta:`${o.data?.length} sets`,subtitle:"Curated skill sets — read-only",glyph:rt,readOnly:!0,onOpen:()=>l("public")}),e[15]=l,e[16]=o.data?.length,e[17]=b):b=e[17];let y;e[18]!==x||e[19]!==b?(y=t.jsxs("div",{className:"flex flex-col gap-3",children:[h,t.jsxs(X,{children:[x,b]})]}),e[18]=x,e[19]=b,e[20]=y):y=e[20];let v;return e[21]!==m||e[22]!==y?(v=t.jsxs(t.Fragment,{children:[m,y]}),e[21]=m,e[22]=y,e[23]=v):v=e[23],v}function Cl(s){const e=$.c(11),{onOpenDir:l}=s,i=ut();if(i.isPending){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Pe,{}),e[0]=o):o=e[0],o}let n;e[1]!==i.data?(n=i.data??[],e[1]=i.data,e[2]=n):n=e[2];const r=n;if(r.length===0){let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Fe,{children:"No public skill sets are configured."}),e[3]=o):o=e[3],o}let a;if(e[4]!==l||e[5]!==r){let o;e[7]!==l?(o=d=>t.jsx(Te,{name:d,subtitle:"Read-only",readOnly:!0,onOpen:()=>l(`public/${d}`)},d),e[7]=l,e[8]=o):o=e[8],a=r.map(o),e[4]=l,e[5]=r,e[6]=a}else a=e[6];let c;return e[9]!==a?(c=t.jsx(X,{children:a}),e[9]=a,e[10]=c):c=e[10],c}function Dl(s){const e=$.c(34),{location:l,onOpenDir:i,onOpenFile:n,onOpenSkill:r,onOpenBrand:a,onShare:c,onDelete:o}=s,d=l.volume??"",u=Ke(d,l.dirPath),f=de();if(u.isPending){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Pe,{rows:2}),e[0]=g):g=e[0],g}if(u.isError){const g=u.error instanceof Error?u.error.message:"Failed to load";let w;return e[1]!==g?(w=t.jsx("p",{className:"text-sm text-destructive",children:g}),e[1]=g,e[2]=w):w=e[2],w}let m,h,x,b,y;if(e[3]!==f||e[4]!==u.data||e[5]!==l||e[6]!==o||e[7]!==a||e[8]!==i||e[9]!==n||e[10]!==r||e[11]!==c||e[12]!==d){y=Symbol.for("react.early_return_sentinel");e:{const g=u.data??[],w=g.filter(Fl),C=g.filter(Pl),k=g.filter(Tl),S=g.filter(zl);if(g.length===0){const p=l.readOnly?"Empty — this read-only set syncs from its GitHub source.":"Empty folder — upload a file or create a folder to get started.";let T;e[18]!==p?(T=t.jsx(Fe,{children:p}),e[18]=p,e[19]=T):T=e[19],y=T;break e}let D;e[20]!==l.readOnly||e[21]!==o||e[22]!==d?(D=p=>l.readOnly?void 0:()=>o({volume:d,path:p.path,kind:p.kind}),e[20]=l.readOnly,e[21]=o,e[22]=d,e[23]=D):D=e[23];const z=D;let P;e[24]!==f||e[25]!==l.readOnly||e[26]!==c||e[27]!==d?(P=p=>l.readOnly?void 0:()=>c({volume:d,path:p.path,kind:p.kind,shareMode:p.shareMode??"private",effectivePublic:p.effectivePublic??!1,url:p.kind==="file"?He(f(d,p.path)):void 0}),e[24]=f,e[25]=l.readOnly,e[26]=c,e[27]=d,e[28]=P):P=e[28];const F=P;m=w.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Skills"}),t.jsx(X,{children:w.map(p=>t.jsx(Is,{dirName:A(p.path),updatedAt:p.updatedAt,skillMdUrl:f(d,`${p.path}/SKILL.md`),publicState:ce(p),onOpen:()=>r(le(l,p.path)),onBrowse:()=>i(le(l,p.path)),onShare:F(p),onDelete:z(p)},p.path))})]}),h=C.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Brands"}),t.jsx(X,{children:C.map(p=>t.jsx(Hs,{dirName:A(p.path),updatedAt:p.updatedAt,tokensUrl:f(d,`${p.path}/tokens.css`),onOpen:()=>a(le(l,p.path)),onBrowse:()=>i(le(l,p.path)),onDelete:z(p)},p.path))})]}),x=k.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Folders"}),t.jsx(X,{children:k.map(p=>t.jsx(Te,{name:A(p.path),meta:fe(p.updatedAt),readOnly:l.readOnly,publicState:ce(p),onOpen:()=>i(le(l,p.path)),onShare:F(p),onDelete:z(p)},p.path))})]}),b=S.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Files"}),t.jsx(X,{children:S.map(p=>t.jsx(bt,{filename:A(p.path),updatedAt:p.updatedAt,downloadUrl:f(d,p.path),publicState:ce(p),onOpen:()=>n(le(l,p.path)),onShare:F(p),onDelete:z(p)},p.path))})]})}e[3]=f,e[4]=u.data,e[5]=l,e[6]=o,e[7]=a,e[8]=i,e[9]=n,e[10]=r,e[11]=c,e[12]=d,e[13]=m,e[14]=h,e[15]=x,e[16]=b,e[17]=y}else m=e[13],h=e[14],x=e[15],b=e[16],y=e[17];if(y!==Symbol.for("react.early_return_sentinel"))return y;let v;return e[29]!==m||e[30]!==h||e[31]!==x||e[32]!==b?(v=t.jsxs(t.Fragment,{children:[m,h,x,b]}),e[29]=m,e[30]=h,e[31]=x,e[32]=b,e[33]=v):v=e[33],v}function zl(s){return s.kind==="file"}function Tl(s){return s.kind==="dir"&&!s.hasSkill&&!s.hasBrand}function Pl(s){return s.kind==="dir"&&s.hasBrand&&!s.hasSkill}function Fl(s){return s.kind==="dir"&&s.hasSkill}function tt(){const{org:s}=Ne(),e=st(),l=lt(),i=ot(),n=nt({strict:!1}),r=n.path??"",a=Ie(r),c=a.segments.length===0,o=(N,K)=>l({to:".",search:re=>({...re,[N]:K||void 0})}),d=N=>o("path",N),u=(N,K)=>l({to:".",search:re=>({...re,preview:void 0,skill:void 0,brand:void 0,[N]:K})}),f=N=>u("preview",N),m=N=>u("skill",N),h=N=>u("brand",N),[x,b]=B.useState(""),y=fs(x.trim(),300),[v,g]=B.useState(null),[w,C]=B.useState(null),[k,S]=B.useState(!1),[D,z]=B.useState(""),P=B.useRef(null),[F,p]=B.useState(!1),T=B.useRef(0),O=a.readOnly?null:a.volume??"uploads",M=a.volume?a.dirPath:"",{upload:R,mkdir:_}=Be(O??"uploads"),{remove:Q}=Be(v?.volume??"uploads");async function E(N){if(!(!O||!N||N.length===0))try{await R.mutateAsync({dir:M,files:[...N]}),W.success(N.length===1?`Uploaded ${N[0]?.name}`:`Uploaded ${N.length} files`)}catch(K){W.error(K instanceof Error?K.message:"Upload failed")}finally{P.current&&(P.current.value="")}}const I=O!==null,se=c?"uploads":a.segments.at(-1)??"this folder";function he(N){return N.dataTransfer.types.includes("Files")}function pe(N){!I||!he(N)||(N.preventDefault(),T.current+=1,p(!0))}function G(N){!I||!he(N)||N.preventDefault()}function Oe(){I&&(T.current=Math.max(0,T.current-1),T.current===0&&p(!1))}function H(N){I&&(N.preventDefault(),T.current=0,p(!1),N.dataTransfer.files.length>0&&E(N.dataTransfer.files))}async function ie(){const N=D.trim();if(!(!O||!N))try{await _.mutateAsync(M?`${M}/${N}`:N),W.success(`Folder "${N}" created`),S(!1),z("")}catch(K){W.error(K instanceof Error?K.message:"Failed to create folder")}}async function xe(){if(!v)return;const N=v;try{await Q.mutateAsync(N.path),W.success(`Deleted ${A(N.path)}`)}catch(K){W.error(K instanceof Error?K.message:"Delete failed")}finally{g(null)}}function ge(){for(const N of wt)e.invalidateQueries({queryKey:L.orgFsVolume(s.id,N.id)});a.volume&&e.invalidateQueries({queryKey:L.orgFsVolume(s.id,a.volume)}),e.invalidateQueries({queryKey:L.orgFsRecent(s.id)}),e.invalidateQueries({queryKey:L.orgFsSearchRoot(s.id)}),e.invalidateQueries({queryKey:L.orgFsPublicSets(s.id)})}return t.jsxs("div",{className:"relative h-full",onDragEnter:pe,onDragOver:G,onDragLeave:Oe,onDrop:H,children:[F&&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(je,{size:28,className:"text-primary"}),t.jsxs("p",{className:"text-sm font-medium text-foreground",children:["Drop to upload to ",se]})]})}),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-col gap-2",children:[!c&&t.jsx(Nl,{segments:a.segments,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("h1",{className:"min-w-0 flex-1 truncate text-xl font-medium text-foreground",children:c?"Library":a.segments.at(-1)??"Library"}),t.jsx(q,{variant:"ghost",size:"icon",onClick:ge,"aria-label":"Refresh",children:t.jsx(Pt,{size:14})}),!c&&O&&t.jsxs(q,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[t.jsx(Ut,{size:14}),"New folder"]}),a.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(it,{size:12}),"Read-only"]}):t.jsxs(q,{size:"sm",disabled:R.isPending,onClick:()=>P.current?.click(),children:[t.jsx(je,{size:14}),R.isPending?"Uploading…":"Upload file"]}),t.jsx("input",{ref:P,type:"file",multiple:!0,className:"hidden",onChange:N=>{E(N.target.files)}})]})]}),t.jsxs("div",{className:"relative",children:[t.jsx(Bt,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted-foreground"}),t.jsx(we,{value:x,onChange:N=>b(N.target.value),onKeyDown:N=>{N.key==="Escape"&&b("")},placeholder:"Search all files…",className:"h-10 rounded-xl pr-9 pl-9"}),x&&t.jsx(q,{variant:"ghost",size:"icon",className:"absolute top-1/2 right-1.5 size-7 -translate-y-1/2",onClick:()=>b(""),"aria-label":"Clear search",children:t.jsx(qt,{size:14})})]}),y?t.jsx(Sl,{query:y,stale:x.trim()!==y,onOpenFile:f,onShare:C,onDelete:g}):c?t.jsx($l,{onOpenDir:d,onOpenFile:f,onShare:C,onDelete:g}):a.volume===null?t.jsx(Cl,{onOpenDir:d}):t.jsx(Dl,{location:a,onOpenDir:d,onOpenFile:f,onOpenSkill:m,onOpenBrand:h,onShare:C,onDelete:g},a.volume)]})}),i&&(n.preview?t.jsx(is,{previewPath:n.preview,onClose:()=>o("preview",null)}):n.skill?t.jsx(vl,{skillPath:n.skill,onClose:()=>o("skill",null)},n.skill):n.brand?t.jsx(pl,{brandPath:n.brand,onClose:()=>o("brand",null)},n.brand):null),t.jsx(Re,{open:k,onOpenChange:S,children:t.jsxs(qe,{children:[t.jsxs(Wt,{children:[t.jsx(_e,{children:"New folder"}),t.jsxs(Yt,{children:["Create a folder in ",r||"the library","."]})]}),t.jsx(we,{autoFocus:!0,placeholder:"folder-name",value:D,onChange:N=>z(N.target.value),onKeyDown:N=>{N.key==="Enter"&&ie()}}),t.jsxs(Xt,{children:[t.jsx(q,{variant:"outline",onClick:()=>S(!1),children:"Cancel"}),t.jsx(q,{disabled:!D.trim()||_.isPending,onClick:()=>{ie()},children:"Create"})]})]})}),t.jsx(rs,{target:w,onOpenChange:N=>{N||C(null)}}),t.jsx(Rt,{open:v!==null,onOpenChange:N=>{N||g(null)},children:t.jsxs(_t,{children:[t.jsxs(It,{children:[t.jsxs(Kt,{children:["Delete ",v?A(v.path):"","?"]}),t.jsx(Vt,{children:v?.kind==="dir"?"The folder and everything inside it will be deleted for the whole organization. Sandboxes see this change within seconds.":"The file will be deleted for the whole organization. Sandboxes see this change within seconds."})]}),t.jsxs(Ht,{children:[t.jsx(Gt,{children:"Cancel"}),t.jsx(Qt,{onClick:()=>{xe()},children:"Delete"})]})]})})]})}function xn(){const s=$.c(12),e=ot(),l=lt();let i;s[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},s[0]=i):i=s[0];const n=nt(i);let r;s[1]!==l?(r=d=>l({to:".",search:u=>({...u,[d]:void 0})}),s[1]=l,s[2]=r):r=s[2];const a=r;let c,o;if(s[3]!==a||s[4]!==e||s[5]!==n.brand||s[6]!==n.preview||s[7]!==n.skill){o=Symbol.for("react.early_return_sentinel");e:{const d=n.preview?{key:"preview",path:n.preview,panel:t.jsx(ts,{previewPath:n.preview,onClose:()=>a("preview")})}:n.skill?{key:"skill",path:n.skill,panel:t.jsx(yl,{skillPath:n.skill,onClose:()=>a("skill")},n.skill)}:n.brand?{key:"brand",path:n.brand,panel:t.jsx(xl,{brandPath:n.brand,onClose:()=>a("brand")},n.brand)}:null;if(e){let f;s[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden bg-background",children:t.jsx(Me,{children:t.jsx(tt,{})})}),s[10]=f):f=s[10],o=f;break e}let u;s[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ye,{order:1,minSize:30,defaultSize:55,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(Me,{children:t.jsx(tt,{})})})})}),s[11]=u):u=s[11],c=t.jsxs(ss,{direction:"horizontal",className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:[u,d&&t.jsxs(t.Fragment,{children:[t.jsx(Zt.Tabs,{children:t.jsx(ls,{title:A(d.path),icon:{kind:"component",Component:f=>d.key==="preview"?t.jsx(ne,{filename:A(d.path),...f}):d.key==="skill"?t.jsx(Le,{...f}):t.jsx(ye,{...f})},active:!0,onClick:()=>a(d.key)})}),t.jsx(ns,{className:"bg-sidebar"}),t.jsx(Ye,{order:2,minSize:25,defaultSize:45,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(Me,{children:d.panel})})})})]})]})}s[3]=a,s[4]=e,s[5]=n.brand,s[6]=n.preview,s[7]=n.skill,s[8]=c,s[9]=o}else c=s[8],o=s[9];return o!==Symbol.for("react.early_return_sentinel")?o:c}export{xn as default};
169
+ `);async function Je(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function fl(s,e){const l=e?`<style>${e}</style>`:"";return s.replaceAll("{{{slides}}}",dl).replaceAll("{{title}}",cl).replace(/(src=")(\/deck-runtime\/)/g,`$1${window.location.origin}$2`).replace("</head>",`${l}</head>`)}function ul(s){const e=$.c(23),{readUrl:l,title:i,tokensUrl:n}=s;let r;e[0]!==l?(r=L.fileText(l),e[0]=l,e[1]=r):r=e[1];let a;e[2]!==l?(a=()=>Je(l),e[2]=l,e[3]=a):a=e[3];let c;e[4]!==r||e[5]!==a?(c={queryKey:r,queryFn:a,staleTime:6e4,retry:!1},e[4]=r,e[5]=a,e[6]=c):c=e[6];const o=Y(c);let d;e[7]!==n?(d=L.fileText(n??""),e[7]=n,e[8]=d):d=e[8];const u=!!n;let f;e[9]!==n?(f=()=>Je(n??""),e[9]=n,e[10]=f):f=e[10];let m;e[11]!==d||e[12]!==u||e[13]!==f?(m={queryKey:d,enabled:u,queryFn:f,staleTime:6e4,retry:!1},e[11]=d,e[12]=u,e[13]=f,e[14]=m):m=e[14];const h=Y(m);if(o.isPending||n&&h.isPending){let v;return e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(V,{className:"aspect-[16/9] w-full max-w-3xl rounded-xl"})}),e[15]=v):v=e[15],v}if(o.isError||!o.data){let v;return e[16]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This theme is no longer available."}),e[16]=v):v=e[16],v}const x=h.data??null;let b;e[17]!==x||e[18]!==o.data?(b=fl(o.data,x),e[17]=x,e[18]=o.data,e[19]=b):b=e[19];let j;return e[20]!==b||e[21]!==i?(j=t.jsx("iframe",{title:i,srcDoc:b,sandbox:"allow-scripts",className:"block h-full w-full border-0 bg-white"}),e[20]=b,e[21]=i,e[22]=j):j=e[22],j}async function et(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function oe(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=t.jsx("p",{className:"text-sm font-medium text-foreground",children:l}),e[0]=l,e[1]=i):i=e[1],i}function ml(s){const e=$.c(16),{family:l,tokens:i,editing:n,valueOf:r,onEdit:a}=s;let c;e[0]!==l?(c=t.jsx("span",{className:"text-xs text-muted-foreground",children:l}),e[0]=l,e[1]=c):c=e[1];let o;if(e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==n||e[8]!==a||e[9]!==r?(f=m=>{const h=r(m),x=`${m.name.replace(/^--brand-/,"")}: ${h}`;return n&&/^#/.test(h)?t.jsx("input",{type:"color","aria-label":m.name,title:x,value:$s(h),onChange:b=>a(m.name,b.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:h}},m.name)},e[7]=n,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=n,e[3]=a,e[4]=i,e[5]=r,e[6]=o}else o=e[6];let d;e[11]!==o?(d=t.jsx("div",{className:"flex flex-wrap gap-1",children:o}),e[11]=o,e[12]=d):d=e[12];let u;return e[13]!==c||e[14]!==d?(u=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[c,d]}),e[13]=c,e[14]=d,e[15]=u):u=e[15],u}function hl(s){const e=$.c(9),{token:l,value:i}=s;if(l.kind==="space"){let r;return e[0]!==i?(r=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:i,maxWidth:"100%"}})}),e[0]=i,e[1]=r):r=e[1],r}if(l.kind==="radius"){let r;return e[2]!==i?(r=t.jsx("span",{className:"size-7 shrink-0 border border-border bg-muted/50",style:{borderRadius:i}}),e[2]=i,e[3]=r):r=e[3],r}if(l.kind==="shadow"){let r;return e[4]!==i?(r=t.jsx("span",{className:"size-7 shrink-0 rounded-md bg-background",style:{boxShadow:i}}),e[4]=i,e[5]=r):r=e[5],r}if(l.kind==="type"&&/^--brand-text-/.test(l.name)){const r=`min(${i}, 22px)`;let a;return e[6]!==r?(a=t.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden leading-none text-foreground",style:{fontSize:r},children:"Ag"}),e[6]=r,e[7]=a):a=e[7],a}let n;return e[8]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("span",{className:"size-7 shrink-0"}),e[8]=n):n=e[8],n}function vt(s){const e=$.c(17),{token:l,value:i,editing:n,onEdit:r}=s;let a;e[0]!==l||e[1]!==i?(a=t.jsx(hl,{token:l,value:i}),e[0]=l,e[1]=i,e[2]=a):a=e[2];let c;if(e[3]!==l.name){let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=/^--brand-/,e[5]=f):f=e[5],c=l.name.replace(f,""),e[3]=l.name,e[4]=c}else c=e[4];let o;e[6]!==c?(o=t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:c}),e[6]=c,e[7]=o):o=e[7];let d;e[8]!==n||e[9]!==r||e[10]!==l.name||e[11]!==i?(d=n?t.jsx(we,{value:i,onChange:f=>r(l.name,f.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:i}),e[8]=n,e[9]=r,e[10]=l.name,e[11]=i,e[12]=d):d=e[12];let u;return e[13]!==a||e[14]!==o||e[15]!==d?(u=t.jsxs("div",{className:"flex items-center gap-3",children:[a,o,d]}),e[13]=a,e[14]=o,e[15]=d,e[16]=u):u=e[16],u}function ae(s){const e=$.c(16),{label:l,tokens:i,editing:n,valueOf:r,onEdit:a}=s;if(i.length===0)return null;let c;e[0]!==l?(c=t.jsx(oe,{children:l}),e[0]=l,e[1]=c):c=e[1];let o;if(e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==n||e[8]!==a||e[9]!==r?(f=m=>t.jsx(vt,{token:m,value:r(m),editing:n,onEdit:a},m.name),e[7]=n,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=n,e[3]=a,e[4]=i,e[5]=r,e[6]=o}else o=e[6];let d;e[11]!==o?(d=t.jsx("div",{className:"flex flex-col gap-2.5",children:o}),e[11]=o,e[12]=d):d=e[12];let u;return e[13]!==c||e[14]!==d?(u=t.jsxs("div",{className:"flex flex-col gap-3",children:[c,d]}),e[13]=c,e[14]=d,e[15]=u):u=e[15],u}function jt({brandPath:s,onClose:e,variant:l}){const{org:i}=Ne(),n=Ie(s),r=n.volume??"",a=n.dirPath,c=A(a),o=n.readOnly,d=st(),u=de(),f=os(r),{upload:m,remove:h}=Be(r),x=B.useRef(null),b=Ke(r,a),j=b.data??[],v=y=>j.some(U=>U.kind==="file"&&A(U.path)===y),g=v("tokens.css"),w=v("brand.md"),C=v("slides-theme.html"),k=zs(j),S=u(r,`${a}/tokens.css`),D=u(r,`${a}/brand.md`),T=u(r,`${a}/slides-theme.html`),P=Y({queryKey:L.fileText(S),enabled:g,queryFn:()=>et(S),staleTime:6e4,retry:!1}),F=Y({queryKey:L.fileText(D),enabled:w,queryFn:()=>et(D),staleTime:6e4,retry:!1}),[p,z]=B.useState(!1),[O,M]=B.useState({}),[_,q]=B.useState(null),[Q,E]=B.useState(!1),[I,se]=B.useState(!1),[he,pe]=B.useState("deck"),G=P.data?pt(P.data):[],Oe=y=>G.find(U=>U.name===y)?.value,H=y=>O[y.name]??y.value,ie=Ds(G),xe=G.filter(y=>y.kind==="font"),ge=G.filter(y=>y.kind==="type"),N=G.filter(y=>y.kind==="space"),K=G.filter(y=>y.kind==="radius"),re=G.filter(y=>y.kind==="shadow"),Nt=G.filter(y=>y.kind==="motion"),St=G.filter(y=>y.kind==="other"),J=(y,U)=>M(ve=>({...ve,[y]:U})),be=C&&he==="deck",Ee=_??F.data??"",Ae=Object.entries(O).filter(([y,U])=>Oe(y)!==U),Ge=_!==null&&_!==(F.data??""),$t=Ae.length>0||Ge;function Ct(){M({}),q(null),z(!1)}async function Dt(){E(!0);try{if(Ae.length>0){let y=P.data??"";for(const[U,ve]of Ae)y=Ts(y,U,ve);await f.mutateAsync({path:`${a}/tokens.css`,body:y,contentType:"text/css; charset=utf-8"}),d.invalidateQueries({queryKey:L.fileText(S)})}Ge&&_!==null&&(await f.mutateAsync({path:`${a}/brand.md`,body:_,contentType:"text/markdown; charset=utf-8"}),d.invalidateQueries({queryKey:L.fileText(D)})),d.invalidateQueries({queryKey:L.orgFsVolume(i.id,r)}),d.invalidateQueries({queryKey:L.orgFsRecent(i.id)}),M({}),q(null),z(!1),W.success("Brand saved")}catch(y){W.error(y instanceof Error?y.message:"Failed to save brand")}finally{E(!1)}}async function Tt(y){const U=y?.[0];if(!U)return;const Qe=`logo.${(U.name.split(".").pop()??"png").toLowerCase()}`;try{await m.mutateAsync({dir:a,files:[new File([U],Qe,{type:U.type})]}),k&&A(k)!==Qe&&await h.mutateAsync(k),W.success("Logo updated")}catch(We){W.error(We instanceof Error?We.message:"Logo upload failed")}finally{x.current&&(x.current.value="")}}const zt=!b.isPending&&!g&&!w&&!k;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})}),l==="dialog"?t.jsx(qe,{className:"flex-1 truncate text-base font-medium text-foreground",children:c}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:c}),!o&&(p?t.jsxs(t.Fragment,{children:[t.jsx(R,{variant:"ghost",size:"sm",onClick:Ct,disabled:Q,children:"Cancel"}),t.jsx(R,{size:"sm",disabled:!$t||Q,onClick:()=>{Dt()},children:Q?"Saving…":"Save"})]}):t.jsxs(R,{variant:"outline",size:"sm",onClick:()=>z(!0),children:[t.jsx(At,{size:14}),"Edit"]})),l==="dialog"?t.jsx(ct,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ke,{size:16})})}):t.jsx(R,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:e,children:t.jsx(ke,{size:16})})]}),t.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:b.isPending?t.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[t.jsx(V,{className:"h-40 w-full rounded-xl"}),t.jsx(V,{className:"h-4 w-1/3"}),t.jsx(V,{className:"h-4 w-2/3"})]}):zt?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This brand is no longer available."}):t.jsxs(t.Fragment,{children:[(C||g)&&t.jsxs("div",{className:"shrink-0 border-b border-border",children:[t.jsxs("div",{role:"button",tabIndex:0,"aria-label":I?"Show preview":"Hide preview",onClick:()=>se(y=>!y),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),se(U=>!U))},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:y=>y.stopPropagation(),children:[C&&t.jsx("button",{type:"button",onClick:()=>{pe("deck"),se(!1)},className:Z("rounded-md px-2.5 py-1",be?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Deck"}),t.jsx("button",{type:"button",onClick:()=>{pe("components"),se(!1)},className:Z("rounded-md px-2.5 py-1",be?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm"),children:"Components"})]}),I?t.jsx(hs,{size:16,className:"shrink-0 text-muted-foreground"}):t.jsx(ps,{size:16,className:"shrink-0 text-muted-foreground"})]}),!I&&t.jsx("div",{className:"px-4 pb-4",children:t.jsx("div",{className:Z("w-full overflow-hidden rounded-xl border border-border bg-muted/30",be?"aspect-[16/9]":"h-96"),children:be?t.jsx(ul,{readUrl:T,title:`${c} deck theme`,tokensUrl:S}):t.jsx(ol,{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(oe,{children:"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:k?t.jsx("img",{src:u(r,k),alt:`${c} logo`,className:"max-h-full max-w-full object-contain"}):t.jsx(je,{size:28,className:"text-muted-foreground/50"})}),p&&t.jsxs("div",{children:[t.jsxs(R,{variant:"outline",size:"sm",disabled:m.isPending,onClick:()=>x.current?.click(),children:[t.jsx(ye,{size:14}),k?"Replace logo":"Add logo"]}),t.jsx("input",{ref:x,type:"file",accept:"image/*",className:"hidden",onChange:y=>{Tt(y.target.files)}})]})]})]}),ie.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(oe,{children:"Colors"}),ie.map(y=>t.jsx(ml,{family:y.family,tokens:y.tokens,editing:p,valueOf:H,onEdit:J},y.family))]}),(xe.length>0||ge.length>0)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(oe,{children:"Typography"}),xe.map(y=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:y.name.replace(/^--brand-font-?/,"")||"font"}),p?t.jsx(we,{value:H(y),onChange:U=>J(y.name,U.target.value),className:"h-9"}):t.jsx("span",{className:"truncate text-lg text-foreground",style:{fontFamily:H(y)},children:H(y)})]},y.name)),ge.map(y=>t.jsx(vt,{token:y,value:H(y),editing:p,onEdit:J},y.name))]}),t.jsx(ae,{label:"Spacing",tokens:N,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Radius",tokens:K,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Shadows",tokens:re,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Motion",tokens:Nt,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Tokens",tokens:St,editing:p,valueOf:H,onEdit:J}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(oe,{children:"Voice & guidelines"}),p?t.jsx(ms,{value:Ee,onChange:y=>q(y.target.value),placeholder:"Describe the brand voice, tone, do's and don'ts…",className:"min-h-48 font-mono text-sm"}):F.isPending&&w?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(V,{className:"h-3 w-full"}),t.jsx(V,{className:"h-3 w-5/6"})]}):Ee.trim()?t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:t.jsx(ft,{id:`brand-preview-${s}`,text:Ee})}):t.jsx("p",{className:"text-sm text-muted-foreground",children:"No brand voice written yet."})]})]})]})})]})}function pl(s){const e=$.c(8),{brandPath:l,onClose:i}=s;let n;e[0]!==i?(n=c=>{c||i()},e[0]=i,e[1]=n):n=e[1];let r;e[2]!==l||e[3]!==i?(r=t.jsx(Re,{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(jt,{brandPath:l,onClose:i,variant:"dialog"})}),e[2]=l,e[3]=i,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==r?(a=t.jsx(_e,{open:!0,onOpenChange:n,children:r}),e[5]=n,e[6]=r,e[7]=a):a=e[7],a}function xl(s){const e=$.c(3),{brandPath:l,onClose:i}=s;let n;return e[0]!==l||e[1]!==i?(n=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(jt,{brandPath:l,onClose:i,variant:"panel"})}),e[0]=l,e[1]=i,e[2]=n):n=e[2],n}function yt(s){const e=$.c(23),{skillPath:l,onClose:i,variant:n}=s,r=Ie(l),{volume:a,dirPath:c}=r,o=de(),d=o(a??"",`${c}/SKILL.md`),u=L.fileText(d);let f;e[0]!==d?(f=async()=>{const E=await fetch(d,{credentials:"include"});if(!E.ok)throw new Error(`fetch failed: ${E.status}`);return E.text()},e[0]=d,e[1]=f):f=e[1];let m;e[2]!==u||e[3]!==f?(m={queryKey:u,queryFn:f,staleTime:6e4,retry:!1},e[2]=u,e[3]=f,e[4]=m):m=e[4];const h=Y(m),x=Ke(a??"",c);let b;e[5]!==c?(b=A(c),e[5]=c,e[6]=b):b=e[6];const j=b;let v;e[7]!==h.data?(v=h.data?xt(h.data):null,e[7]=h.data,e[8]=v):v=e[8];const g=v,w=bl;let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=(E,I)=>w(E.path)?-1:w(I.path)?1:A(E.path).localeCompare(A(I.path)),e[9]=C):C=e[9];const k=(x.data??[]).filter(gl).sort(C),[S,D]=B.useState(null),T=S===null?null:k.find(E=>E.path===S)??null,P=g?.name??j;let F;e[10]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(Le,{size:18})}),e[10]=F):F=e[10];let p;e[11]!==P||e[12]!==n?(p=n==="dialog"?t.jsx(qe,{className:"flex-1 truncate text-base font-medium text-foreground",children:P}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:P}),e[11]=P,e[12]=n,e[13]=p):p=e[13];let z;e[14]!==i||e[15]!==n?(z=n==="dialog"?t.jsx(ct,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ke,{size:16})})}):t.jsx(R,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:i,children:t.jsx(ke,{size:16})}),e[14]=i,e[15]=n,e[16]=z):z=e[16];let O;e[17]!==p||e[18]!==z?(O=t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[F,p,z]}),e[17]=p,e[18]=z,e[19]=O):O=e[19];let M;e[20]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[20]=M):M=e[20];const _="relative flex min-w-0 flex-1 flex-col overflow-y-auto",q=T?t.jsx(Jt,{file:{key:T.path,filename:A(T.path),size:T.size,downloadUrl:o(a??"",T.path)}}):h.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(V,{className:"h-4 w-1/3"}),t.jsx(V,{className:"h-3 w-full"}),t.jsx(V,{className:"h-3 w-5/6"}),t.jsx(V,{className:"h-3 w-2/3"})]}):h.isError||!g?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),t.jsx("p",{className:"text-base text-muted-foreground",children:g.description??"Claude Code skill"})]}),t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:t.jsx(ft,{id:`skill-preview-${l}`,text:g.body})})]});let Q;return e[21]!==q?(Q=t.jsx("div",{className:_,children:q}),e[21]=q,e[22]=Q):Q=e[22],t.jsxs(t.Fragment,{children:[O,t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[M,x.isPending?t.jsx(V,{className:"mx-2 h-4 w-24"}):k.map(E=>{const I=w(E.path)?T===null:S===E.path;return t.jsxs("button",{type:"button",onClick:()=>D(w(E.path)?null:E.path),className:Z("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",I?"bg-background shadow-sm":"hover:bg-muted/60"),children:[t.jsx(ne,{filename:A(E.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:Z("truncate text-sm",I?"text-foreground":"text-muted-foreground"),children:A(E.path)})]},E.path)})]}),Q]})]})}function gl(s){return s.kind==="file"}function bl(s){return A(s)==="SKILL.md"}function vl(s){const e=$.c(8),{skillPath:l,onClose:i}=s;let n;e[0]!==i?(n=c=>{c||i()},e[0]=i,e[1]=n):n=e[1];let r;e[2]!==i||e[3]!==l?(r=t.jsx(Re,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:t.jsx(yt,{skillPath:l,onClose:i,variant:"dialog"})}),e[2]=i,e[3]=l,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==r?(a=t.jsx(_e,{open:!0,onOpenChange:n,children:r}),e[5]=n,e[6]=r,e[7]=a):a=e[7],a}function jl(s){const e=$.c(3),{skillPath:l,onClose:i}=s;let n;return e[0]!==i||e[1]!==l?(n=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(yt,{skillPath:l,onClose:i,variant:"panel"})}),e[0]=i,e[1]=l,e[2]=n):n=e[2],n}function He(s){return`${window.location.origin}${s}`}function ce(s){if(s.shareMode==="password")return"password";if(s.shareMode==="public"||s.readPublic)return"public";if(s.effectivePublic)return"inherited"}const wt=[{id:"home",description:"Your organization's home folder",glyph:Mt},{id:"uploads",description:"Files your team uploads",glyph:ye},{id:"outputs",description:"Agent run outputs",glyph:Lt}],yl=6;function kt(s,e,l){const i=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"",n=ut(s),r=n?`public/${n}`:s==="home"?ht(l):s;return i?`${r}/${i}`:r}function ee(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=t.jsx("p",{className:"text-[13px] text-foreground",children:l}),e[0]=l,e[1]=i):i=e[1],i}function X(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=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:l})}),e[0]=l,e[1]=i):i=e[1],i}function Pe(s){const e=$.c(2),{rows:l}=s,i=l===void 0?1:l;let n;return e[0]!==i?(n=t.jsx(X,{children:Array.from({length:i*3},wl)}),e[0]=i,e[1]=n):n=e[1],n}function wl(s,e){return t.jsx(V,{className:"h-16 rounded-2xl"},e)}function Fe(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:l}),e[0]=l,e[1]=i):i=e[1],i}function kl(s){const e=$.c(6),{volume:l,displayName:i,description:n,glyph:r,onOpen:a}=s,c=fs(l),o=i??l,d=c.data?`${c.data.files} files`:void 0;let u;return e[0]!==n||e[1]!==r||e[2]!==a||e[3]!==o||e[4]!==d?(u=t.jsx(ze,{name:o,meta:d,subtitle:n,glyph:r,onOpen:a}),e[0]=n,e[1]=r,e[2]=a,e[3]=o,e[4]=d,e[5]=u):u=e[5],u}function Nl(s){const e=$.c(8),{segments:l,onNavigate:i}=s;let n;e[0]!==i?(n=t.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(""),children:"Library"}),e[0]=i,e[1]=n):n=e[1];let r;e[2]!==i||e[3]!==l?(r=l.map((c,o)=>{const d=l.slice(0,o+1).join("/"),u=o===l.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(Ft,{size:12,className:"shrink-0 text-muted-foreground"}),u?t.jsx("span",{className:"truncate font-medium text-foreground",children:c}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(d),children:c})]},d)}),e[2]=i,e[3]=l,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==r?(a=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[n,r]}),e[5]=n,e[6]=r,e[7]=a):a=e[7],a}function Sl(s){const e=$.c(32),{query:l,stale:i,onOpenFile:n,onShare:r,onDelete:a}=s,{org:c}=Ne(),o=de(),d=cs(l);let u;e[0]!==o||e[1]!==r?(u=k=>r({volume:k.volume,path:k.path,kind:"file",shareMode:k.shareMode??"private",effectivePublic:k.effectivePublic??!1,url:He(o(k.volume,k.path))}),e[0]=o,e[1]=r,e[2]=u):u=e[2];const f=u;if(d.isPending){let k;return e[3]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Pe,{rows:2}),e[3]=k):k=e[3],k}let m;e[4]!==d.data?(m=d.data??[],e[4]=d.data,e[5]=m):m=e[5];const h=m;if(h.length===0){let k;return e[6]!==l?(k=t.jsxs(Fe,{children:["No files match “",l,"”."]}),e[6]=l,e[7]=k):k=e[7],k}const x=(i||d.isPlaceholderData)&&"opacity-50";let b;e[8]!==x?(b=Z("flex flex-col gap-3",x),e[8]=x,e[9]=b):b=e[9];const j=h.length===1?"result":"results";let v;e[10]!==h.length||e[11]!==j?(v=t.jsxs(ee,{children:[h.length," ",j]}),e[10]=h.length,e[11]=j,e[12]=v):v=e[12];let g;if(e[13]!==o||e[14]!==a||e[15]!==n||e[16]!==c||e[17]!==h||e[18]!==f){let k;e[20]!==o||e[21]!==a||e[22]!==n||e[23]!==c||e[24]!==f?(k=S=>{const D=ut(S.volume)!==null;return t.jsx(bt,{filename:A(S.path),updatedAt:S.updatedAt,downloadUrl:o(S.volume,S.path),subtitle:kt(S.volume,S.path,c.slug),publicState:ce(S),onOpen:()=>n(rs(S.volume,S.path)),onShare:D?void 0:()=>f(S),onDelete:D?void 0:()=>a({volume:S.volume,path:S.path,kind:"file"})},`${S.volume}/${S.path}`)},e[20]=o,e[21]=a,e[22]=n,e[23]=c,e[24]=f,e[25]=k):k=e[25],g=h.map(k),e[13]=o,e[14]=a,e[15]=n,e[16]=c,e[17]=h,e[18]=f,e[19]=g}else g=e[19];let w;e[26]!==g?(w=t.jsx(X,{children:g}),e[26]=g,e[27]=w):w=e[27];let C;return e[28]!==b||e[29]!==v||e[30]!==w?(C=t.jsxs("div",{className:b,children:[v,w]}),e[28]=b,e[29]=v,e[30]=w,e[31]=C):C=e[31],C}function $l(s){const e=$.c(24),{onOpenDir:l,onOpenFile:i,onShare:n,onDelete:r}=s,{org:a}=Ne(),c=ds(),o=mt(),d=de();let u;e[0]!==d||e[1]!==n?(u=g=>n({volume:g.volume,path:g.path,kind:"file",shareMode:g.shareMode??"private",effectivePublic:g.effectivePublic??!1,url:He(d(g.volume,g.path))}),e[0]=d,e[1]=n,e[2]=u):u=e[2];const f=u;let m;if(e[3]!==d||e[4]!==r||e[5]!==i||e[6]!==a||e[7]!==c.data||e[8]!==c.isPending||e[9]!==f){const g=(c.data??[]).slice(0,yl);m=c.isPending?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Recently added"}),t.jsx(Pe,{})]}):g.length>0?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Recently added"}),t.jsx(X,{children:g.map(w=>t.jsx(ll,{filename:A(w.path),updatedAt:w.updatedAt,size:w.size,downloadUrl:d(w.volume,w.path),subtitle:kt(w.volume,w.path,a.slug),publicState:ce(w),onOpen:()=>i(`${w.volume}/${w.path}`),onShare:()=>f(w),onDelete:()=>r({volume:w.volume,path:w.path,kind:"file"})},`${w.volume}/${w.path}`))})]}):t.jsx(Fe,{children:"No files yet — upload one, or ask an agent to produce something."}),e[3]=d,e[4]=r,e[5]=i,e[6]=a,e[7]=c.data,e[8]=c.isPending,e[9]=f,e[10]=m}else m=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(ee,{children:"Folders"}),e[11]=h):h=e[11];let x;e[12]!==l||e[13]!==a?(x=wt.map(g=>t.jsx(kl,{volume:g.id,displayName:g.id==="home"?ht(a.slug):void 0,description:g.description,glyph:g.glyph,onOpen:()=>l(g.id)},g.id)),e[12]=l,e[13]=a,e[14]=x):x=e[14];let b;e[15]!==l||e[16]!==o.data?.length?(b=(o.data?.length??0)>0&&t.jsx(ze,{name:"public",meta:`${o.data?.length} sets`,subtitle:"Curated skill sets — read-only",glyph:rt,readOnly:!0,onOpen:()=>l("public")}),e[15]=l,e[16]=o.data?.length,e[17]=b):b=e[17];let j;e[18]!==x||e[19]!==b?(j=t.jsxs("div",{className:"flex flex-col gap-3",children:[h,t.jsxs(X,{children:[x,b]})]}),e[18]=x,e[19]=b,e[20]=j):j=e[20];let v;return e[21]!==m||e[22]!==j?(v=t.jsxs(t.Fragment,{children:[m,j]}),e[21]=m,e[22]=j,e[23]=v):v=e[23],v}function Cl(s){const e=$.c(11),{onOpenDir:l}=s,i=mt();if(i.isPending){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Pe,{}),e[0]=o):o=e[0],o}let n;e[1]!==i.data?(n=i.data??[],e[1]=i.data,e[2]=n):n=e[2];const r=n;if(r.length===0){let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Fe,{children:"No public skill sets are configured."}),e[3]=o):o=e[3],o}let a;if(e[4]!==l||e[5]!==r){let o;e[7]!==l?(o=d=>t.jsx(ze,{name:d,subtitle:"Read-only",readOnly:!0,onOpen:()=>l(`public/${d}`)},d),e[7]=l,e[8]=o):o=e[8],a=r.map(o),e[4]=l,e[5]=r,e[6]=a}else a=e[6];let c;return e[9]!==a?(c=t.jsx(X,{children:a}),e[9]=a,e[10]=c):c=e[10],c}function Dl(s){const e=$.c(34),{location:l,onOpenDir:i,onOpenFile:n,onOpenSkill:r,onOpenBrand:a,onShare:c,onDelete:o}=s,d=l.volume??"",u=Ke(d,l.dirPath),f=de();if(u.isPending){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Pe,{rows:2}),e[0]=g):g=e[0],g}if(u.isError){const g=u.error instanceof Error?u.error.message:"Failed to load";let w;return e[1]!==g?(w=t.jsx("p",{className:"text-sm text-destructive",children:g}),e[1]=g,e[2]=w):w=e[2],w}let m,h,x,b,j;if(e[3]!==f||e[4]!==u.data||e[5]!==l||e[6]!==o||e[7]!==a||e[8]!==i||e[9]!==n||e[10]!==r||e[11]!==c||e[12]!==d){j=Symbol.for("react.early_return_sentinel");e:{const g=u.data??[],w=g.filter(Fl),C=g.filter(Pl),k=g.filter(zl),S=g.filter(Tl);if(g.length===0){const p=l.readOnly?"Empty — this read-only set syncs from its GitHub source.":"Empty folder — upload a file or create a folder to get started.";let z;e[18]!==p?(z=t.jsx(Fe,{children:p}),e[18]=p,e[19]=z):z=e[19],j=z;break e}let D;e[20]!==l.readOnly||e[21]!==o||e[22]!==d?(D=p=>l.readOnly?void 0:()=>o({volume:d,path:p.path,kind:p.kind}),e[20]=l.readOnly,e[21]=o,e[22]=d,e[23]=D):D=e[23];const T=D;let P;e[24]!==f||e[25]!==l.readOnly||e[26]!==c||e[27]!==d?(P=p=>l.readOnly?void 0:()=>c({volume:d,path:p.path,kind:p.kind,shareMode:p.shareMode??"private",effectivePublic:p.effectivePublic??!1,url:p.kind==="file"?He(f(d,p.path)):void 0}),e[24]=f,e[25]=l.readOnly,e[26]=c,e[27]=d,e[28]=P):P=e[28];const F=P;m=w.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Skills"}),t.jsx(X,{children:w.map(p=>t.jsx(Is,{dirName:A(p.path),updatedAt:p.updatedAt,skillMdUrl:f(d,`${p.path}/SKILL.md`),publicState:ce(p),onOpen:()=>r(le(l,p.path)),onBrowse:()=>i(le(l,p.path)),onShare:F(p),onDelete:T(p)},p.path))})]}),h=C.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Brands"}),t.jsx(X,{children:C.map(p=>t.jsx(Hs,{dirName:A(p.path),updatedAt:p.updatedAt,tokensUrl:f(d,`${p.path}/tokens.css`),onOpen:()=>a(le(l,p.path)),onBrowse:()=>i(le(l,p.path)),onDelete:T(p)},p.path))})]}),x=k.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Folders"}),t.jsx(X,{children:k.map(p=>t.jsx(ze,{name:A(p.path),meta:fe(p.updatedAt),readOnly:l.readOnly,publicState:ce(p),onOpen:()=>i(le(l,p.path)),onShare:F(p),onDelete:T(p)},p.path))})]}),b=S.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Files"}),t.jsx(X,{children:S.map(p=>t.jsx(bt,{filename:A(p.path),updatedAt:p.updatedAt,downloadUrl:f(d,p.path),publicState:ce(p),onOpen:()=>n(le(l,p.path)),onShare:F(p),onDelete:T(p)},p.path))})]})}e[3]=f,e[4]=u.data,e[5]=l,e[6]=o,e[7]=a,e[8]=i,e[9]=n,e[10]=r,e[11]=c,e[12]=d,e[13]=m,e[14]=h,e[15]=x,e[16]=b,e[17]=j}else m=e[13],h=e[14],x=e[15],b=e[16],j=e[17];if(j!==Symbol.for("react.early_return_sentinel"))return j;let v;return e[29]!==m||e[30]!==h||e[31]!==x||e[32]!==b?(v=t.jsxs(t.Fragment,{children:[m,h,x,b]}),e[29]=m,e[30]=h,e[31]=x,e[32]=b,e[33]=v):v=e[33],v}function Tl(s){return s.kind==="file"}function zl(s){return s.kind==="dir"&&!s.hasSkill&&!s.hasBrand}function Pl(s){return s.kind==="dir"&&s.hasBrand&&!s.hasSkill}function Fl(s){return s.kind==="dir"&&s.hasSkill}function tt(){const{org:s}=Ne(),e=st(),l=lt(),i=ot(),n=nt({strict:!1}),r=n.path??"",a=Ie(r),c=a.segments.length===0,o=(N,K)=>l({to:".",search:re=>({...re,[N]:K||void 0})}),d=N=>o("path",N),u=(N,K)=>l({to:".",search:re=>({...re,preview:void 0,skill:void 0,brand:void 0,[N]:K})}),f=N=>u("preview",N),m=N=>u("skill",N),h=N=>u("brand",N),[x,b]=B.useState(""),j=as(x.trim(),300),[v,g]=B.useState(null),[w,C]=B.useState(null),[k,S]=B.useState(!1),[D,T]=B.useState(""),P=B.useRef(null),[F,p]=B.useState(!1),z=B.useRef(0),O=a.readOnly?null:a.volume??"uploads",M=a.volume?a.dirPath:"",{upload:_,mkdir:q}=Be(O??"uploads"),{remove:Q}=Be(v?.volume??"uploads");async function E(N){if(!(!O||!N||N.length===0))try{await _.mutateAsync({dir:M,files:[...N]}),W.success(N.length===1?`Uploaded ${N[0]?.name}`:`Uploaded ${N.length} files`)}catch(K){W.error(K instanceof Error?K.message:"Upload failed")}finally{P.current&&(P.current.value="")}}const I=O!==null,se=c?"uploads":a.segments.at(-1)??"this folder";function he(N){return N.dataTransfer.types.includes("Files")}function pe(N){!I||!he(N)||(N.preventDefault(),z.current+=1,p(!0))}function G(N){!I||!he(N)||N.preventDefault()}function Oe(){I&&(z.current=Math.max(0,z.current-1),z.current===0&&p(!1))}function H(N){I&&(N.preventDefault(),z.current=0,p(!1),N.dataTransfer.files.length>0&&E(N.dataTransfer.files))}async function ie(){const N=D.trim();if(!(!O||!N))try{await q.mutateAsync(M?`${M}/${N}`:N),W.success(`Folder "${N}" created`),S(!1),T("")}catch(K){W.error(K instanceof Error?K.message:"Failed to create folder")}}async function xe(){if(!v)return;const N=v;try{await Q.mutateAsync(N.path),W.success(`Deleted ${A(N.path)}`)}catch(K){W.error(K instanceof Error?K.message:"Delete failed")}finally{g(null)}}function ge(){for(const N of wt)e.invalidateQueries({queryKey:L.orgFsVolume(s.id,N.id)});a.volume&&e.invalidateQueries({queryKey:L.orgFsVolume(s.id,a.volume)}),e.invalidateQueries({queryKey:L.orgFsRecent(s.id)}),e.invalidateQueries({queryKey:L.orgFsSearchRoot(s.id)}),e.invalidateQueries({queryKey:L.orgFsPublicSets(s.id)})}return t.jsxs("div",{className:"relative h-full",onDragEnter:pe,onDragOver:G,onDragLeave:Oe,onDrop:H,children:[F&&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(ye,{size:28,className:"text-primary"}),t.jsxs("p",{className:"text-sm font-medium text-foreground",children:["Drop to upload to ",se]})]})}),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-col gap-2",children:[!c&&t.jsx(Nl,{segments:a.segments,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("h1",{className:"min-w-0 flex-1 truncate text-xl font-medium text-foreground",children:c?"Library":a.segments.at(-1)??"Library"}),t.jsx(R,{variant:"ghost",size:"icon",onClick:ge,"aria-label":"Refresh",children:t.jsx(Pt,{size:14})}),!c&&O&&t.jsxs(R,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[t.jsx(Ut,{size:14}),"New folder"]}),a.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(it,{size:12}),"Read-only"]}):t.jsxs(R,{size:"sm",disabled:_.isPending,onClick:()=>P.current?.click(),children:[t.jsx(ye,{size:14}),_.isPending?"Uploading…":"Upload file"]}),t.jsx("input",{ref:P,type:"file",multiple:!0,className:"hidden",onChange:N=>{E(N.target.files)}})]})]}),t.jsxs("div",{className:"relative",children:[t.jsx(Bt,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted-foreground"}),t.jsx(we,{value:x,onChange:N=>b(N.target.value),onKeyDown:N=>{N.key==="Escape"&&b("")},placeholder:"Search all files…",className:"h-10 rounded-xl pr-9 pl-9"}),x&&t.jsx(R,{variant:"ghost",size:"icon",className:"absolute top-1/2 right-1.5 size-7 -translate-y-1/2",onClick:()=>b(""),"aria-label":"Clear search",children:t.jsx(Rt,{size:14})})]}),j?t.jsx(Sl,{query:j,stale:x.trim()!==j,onOpenFile:f,onShare:C,onDelete:g}):c?t.jsx($l,{onOpenDir:d,onOpenFile:f,onShare:C,onDelete:g}):a.volume===null?t.jsx(Cl,{onOpenDir:d}):t.jsx(Dl,{location:a,onOpenDir:d,onOpenFile:f,onOpenSkill:m,onOpenBrand:h,onShare:C,onDelete:g},a.volume)]})}),i&&(n.preview?t.jsx(ns,{previewPath:n.preview,onClose:()=>o("preview",null)}):n.skill?t.jsx(vl,{skillPath:n.skill,onClose:()=>o("skill",null)},n.skill):n.brand?t.jsx(pl,{brandPath:n.brand,onClose:()=>o("brand",null)},n.brand):null),t.jsx(_e,{open:k,onOpenChange:S,children:t.jsxs(Re,{children:[t.jsxs(Wt,{children:[t.jsx(qe,{children:"New folder"}),t.jsxs(Yt,{children:["Create a folder in ",r||"the library","."]})]}),t.jsx(we,{autoFocus:!0,placeholder:"folder-name",value:D,onChange:N=>T(N.target.value),onKeyDown:N=>{N.key==="Enter"&&ie()}}),t.jsxs(Xt,{children:[t.jsx(R,{variant:"outline",onClick:()=>S(!1),children:"Cancel"}),t.jsx(R,{disabled:!D.trim()||q.isPending,onClick:()=>{ie()},children:"Create"})]})]})}),t.jsx(is,{target:w,onOpenChange:N=>{N||C(null)}}),t.jsx(_t,{open:v!==null,onOpenChange:N=>{N||g(null)},children:t.jsxs(qt,{children:[t.jsxs(It,{children:[t.jsxs(Kt,{children:["Delete ",v?A(v.path):"","?"]}),t.jsx(Vt,{children:v?.kind==="dir"?"The folder and everything inside it will be deleted for the whole organization. Sandboxes see this change within seconds.":"The file will be deleted for the whole organization. Sandboxes see this change within seconds."})]}),t.jsxs(Ht,{children:[t.jsx(Gt,{children:"Cancel"}),t.jsx(Qt,{onClick:()=>{xe()},children:"Delete"})]})]})})]})}function gn(){const s=$.c(12),e=ot(),l=lt();let i;s[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},s[0]=i):i=s[0];const n=nt(i);let r;s[1]!==l?(r=d=>l({to:".",search:u=>({...u,[d]:void 0})}),s[1]=l,s[2]=r):r=s[2];const a=r;let c,o;if(s[3]!==a||s[4]!==e||s[5]!==n.brand||s[6]!==n.preview||s[7]!==n.skill){o=Symbol.for("react.early_return_sentinel");e:{const d=n.preview?{key:"preview",path:n.preview,panel:t.jsx(es,{previewPath:n.preview,onClose:()=>a("preview")})}:n.skill?{key:"skill",path:n.skill,panel:t.jsx(jl,{skillPath:n.skill,onClose:()=>a("skill")},n.skill)}:n.brand?{key:"brand",path:n.brand,panel:t.jsx(xl,{brandPath:n.brand,onClose:()=>a("brand")},n.brand)}:null;if(e){let f;s[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden bg-background",children:t.jsx(Me,{children:t.jsx(tt,{})})}),s[10]=f):f=s[10],o=f;break e}let u;s[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ye,{order:1,minSize:30,defaultSize:55,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(Me,{children:t.jsx(tt,{})})})})}),s[11]=u):u=s[11],c=t.jsxs(ts,{direction:"horizontal",className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:[u,d&&t.jsxs(t.Fragment,{children:[t.jsx(Zt.Tabs,{children:t.jsx(ss,{title:A(d.path),icon:{kind:"component",Component:f=>d.key==="preview"?t.jsx(ne,{filename:A(d.path),...f}):d.key==="skill"?t.jsx(Le,{...f}):t.jsx(je,{...f})},active:!0,onClick:()=>a(d.key)})}),t.jsx(ls,{className:"bg-sidebar"}),t.jsx(Ye,{order:2,minSize:25,defaultSize:45,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(Me,{children:d.panel})})})})]})]})}s[3]=a,s[4]=e,s[5]=n.brand,s[6]=n.preview,s[7]=n.skill,s[8]=c,s[9]=o}else c=s[8],o=s[9];return o!==Symbol.for("react.early_return_sentinel")?o:c}export{gn as default};
@@ -1 +1 @@
1
- import{r as h}from"./index-BSJueg0-.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
1
+ import{r as h}from"./index-kan1E63X.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});