decocms 4.76.52 → 4.76.53

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 (234) hide show
  1. package/dist/client/assets/{AlertCircle-B1Kbjcis.js → AlertCircle-CL7ZQ2W9.js} +1 -1
  2. package/dist/client/assets/{AreaChart-D1dvmVZi.js → AreaChart-B9u6HVJf.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-D8t9vk3-.js → ArrowUp-DPSWctlS.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-D5im6jTV.js → ArrowUpRight-C21rtwXR.js} +1 -1
  5. package/dist/client/assets/{Check-BOwgvBwV.js → Check-CQ5Ksqqd.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-CjINSa7W.js → CheckCircle-C5K6ki9e.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-Hh6g_Saw.js → ChevronDown-DV3VOrca.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-Dgwih5i7.js → ChevronRight-BAbSIZWa.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-D7Z_my0f.js → ChevronUp-UVpR6smr.js} +1 -1
  10. package/dist/client/assets/{Circle-Ch6miGgW.js → Circle-DPR1QSAh.js} +1 -1
  11. package/dist/client/assets/{Copy01-D6imwHCp.js → Copy01-DvCXbiGV.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-zQUs6pcc.js → DotsVertical-B3ZVodMe.js} +1 -1
  13. package/dist/client/assets/{Eye-D-_PJSgt.js → Eye-DhciTGVf.js} +1 -1
  14. package/dist/client/assets/{FilterLines-DmTf932h.js → FilterLines-Bmzeh30w.js} +1 -1
  15. package/dist/client/assets/{Flag01-BEOEBYPb.js → Flag01-CaL_NCGr.js} +1 -1
  16. package/dist/client/assets/{Globe01-D9CW1i2c.js → Globe01-JgRJtDEz.js} +1 -1
  17. package/dist/client/assets/{Globe04-B3J0CyN5.js → Globe04-CtHMdSMK.js} +1 -1
  18. package/dist/client/assets/{HardDrive-DsxtmuNw.js → HardDrive-DR0yaBkW.js} +1 -1
  19. package/dist/client/assets/{Key01-BiqNsFdR.js → Key01-PXvCNNbE.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-cruDqPt8.js → LayoutLeft-BbocTaWd.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-CJtXioga.js → LinkExternal01-BzN6xrhy.js} +1 -1
  22. package/dist/client/assets/{List-k0IQ0xqt.js → List-Ivs4Rydc.js} +1 -1
  23. package/dist/client/assets/{Monitor01-Cetrg_i-.js → Monitor01-CDiOO9Qw.js} +1 -1
  24. package/dist/client/assets/{Package-DLfVyiPP.js → Package-ChuNwhD3.js} +1 -1
  25. package/dist/client/assets/{Palette-D6cir_25.js → Palette-Dar-noWs.js} +1 -1
  26. package/dist/client/assets/{Play-CU2S2iq8.js → Play-DerJbp91.js} +1 -1
  27. package/dist/client/assets/{Plus-Eoohz80p.js → Plus-Camwbw1d.js} +1 -1
  28. package/dist/client/assets/{SearchLg-BUcf6k1H.js → SearchLg-DDE1zCNT.js} +1 -1
  29. package/dist/client/assets/{SearchMd-e7fb2o-9.js → SearchMd-BxxGolk7.js} +1 -1
  30. package/dist/client/assets/{Settings02-DvUEoYTy.js → Settings02-ByDWZ9hN.js} +1 -1
  31. package/dist/client/assets/{Shield01-BZKA065Y.js → Shield01-NLvH_aG7.js} +1 -1
  32. package/dist/client/assets/{Star01-om-NxchY.js → Star01-DmhYiPGf.js} +1 -1
  33. package/dist/client/assets/{Stars01-CskH5zEn.js → Stars01-C87Wsk_I.js} +1 -1
  34. package/dist/client/assets/{Stars02-S5El_1lG.js → Stars02-B1t9cEEf.js} +1 -1
  35. package/dist/client/assets/{Sun-JuSKVx_6.js → Sun-dNlKp2vM.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-4JRraXCr.js → SwitchHorizontal01-T5ynYfn6.js} +1 -1
  37. package/dist/client/assets/{Tool01-DP0AQo3O.js → Tool01-Cr-RKODu.js} +1 -1
  38. package/dist/client/assets/{Tool02-CIxJuIWf.js → Tool02-DGl8u9_k.js} +1 -1
  39. package/dist/client/assets/{Trash01-DTZ71BUV.js → Trash01-3XY_xXSE.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-MKWjclVc.js → TrendUp01-DoGaa5uF.js} +1 -1
  41. package/dist/client/assets/{Upload01-BX76VXQc.js → Upload01-JrETTl5i.js} +1 -1
  42. package/dist/client/assets/{User01-DJj4N5cu.js → User01-BcskXIW4.js} +1 -1
  43. package/dist/client/assets/{UserPlus01-ByuYu5Qf.js → UserPlus01-XN1LddJg.js} +1 -1
  44. package/dist/client/assets/{Users01-CWwuOk6A.js → Users01-kBdwWyyN.js} +1 -1
  45. package/dist/client/assets/{Users03-BnKHP2m_.js → Users03-B6zcWNzF.js} +1 -1
  46. package/dist/client/assets/{X-Cb9LKHA1.js → X-paMMdb5Z.js} +1 -1
  47. package/dist/client/assets/{XCircle-DyCV8MUc.js → XCircle-C8XU4NrH.js} +1 -1
  48. package/dist/client/assets/{XClose-7KJjg9yA.js → XClose-BuEHz_d5.js} +1 -1
  49. package/dist/client/assets/{Zap-BlmNb1XN.js → Zap-UKuaG6N1.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-BIpEsBa3.js → ZapSquare-CWUUBjW1.js} +1 -1
  51. package/dist/client/assets/{ZoomOut-DpzGJ1T5.js → ZoomOut-wDE4coHY.js} +1 -1
  52. package/dist/client/assets/{access-gate-Da49EDYp.js → access-gate-CbjYOmme.js} +1 -1
  53. package/dist/client/assets/{add-section-modal-CZiw8P5I.js → add-section-modal-D1-bmCWv.js} +1 -1
  54. package/dist/client/assets/{agent-icon-BLe-UGTx.js → agent-icon-D5qmtbZK.js} +1 -1
  55. package/dist/client/assets/{agents-list-LdO255GQ.js → agents-list-CtHSsrWU.js} +1 -1
  56. package/dist/client/assets/{ai-providers-DzPtMjwD.js → ai-providers-CirIogKb.js} +1 -1
  57. package/dist/client/assets/{alert-CnxHfUSy.js → alert-Bmy2khv7.js} +1 -1
  58. package/dist/client/assets/{alert-dialog-CXiQmJbb.js → alert-dialog-PKvHHkWf.js} +1 -1
  59. package/dist/client/assets/{app-editor-b5cVREu5.js → app-editor-B5wjEdwF.js} +1 -1
  60. package/dist/client/assets/{auth-DNgjTpiO.js → auth-CnRo_5bE.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-BMxIQr63.js → auth-catchall-DZSaj9CF.js} +1 -1
  62. package/dist/client/assets/{auth-entry-DNbfyzp3.js → auth-entry-DUqhHk8K.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-hwgw_1qF.js → auth-split-layout-Dg1dZa9r.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-CkOHk5F8.js → authenticate-and-persist-oauth-BTf5TLAM.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-B9ck9YM6.js → automation-list-row-D4Q6Xph2.js} +1 -1
  66. package/dist/client/assets/{automation-runs-CAy4mtpJ.js → automation-runs-D-Abjafx.js} +1 -1
  67. package/dist/client/assets/automations-DxwwZemb.js +1 -0
  68. package/dist/client/assets/{autosend-Q-LO0I7R.js → autosend-C8GYW4cS.js} +1 -1
  69. package/dist/client/assets/{avatar-C2_XCNRZ.js → avatar-vgk8ddd6.js} +1 -1
  70. package/dist/client/assets/{badge-BoE_V31h.js → badge-DzhfW366.js} +1 -1
  71. package/dist/client/assets/{block-document-CZmKzYIn.js → block-document-CqhTzn7u.js} +1 -1
  72. package/dist/client/assets/{brand-context-DB2leMkV.js → brand-context-B1Dnh4pW.js} +1 -1
  73. package/dist/client/assets/{buckets-B82a1STH.js → buckets-DmMGIvyk.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-DrndC8U8.js → bulk-category-panel-DgkH0VeO.js} +1 -1
  75. package/dist/client/assets/{calendar-C3lzzzZu.js → calendar-ampUP54R.js} +1 -1
  76. package/dist/client/assets/{capability-load-error-HM0EMxih.js → capability-load-error-gFwJ57zP.js} +1 -1
  77. package/dist/client/assets/{card-BJwTAHaX.js → card-W8XIR-ze.js} +1 -1
  78. package/dist/client/assets/{category-editor-DLwGN2a7.js → category-editor-BXSihslX.js} +1 -1
  79. package/dist/client/assets/{chat-context-C3Mo28RT.js → chat-context-BwmwTbu3.js} +1 -1
  80. package/dist/client/assets/{checkbox-DydFjocD.js → checkbox-FCg5QBhQ.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-DG97Tbzm.js → cli-auth-success-BhJ3g0Gx.js} +1 -1
  82. package/dist/client/assets/{collection-detail-D43DPj1v.js → collection-detail-DxkxhMQ8.js} +1 -1
  83. package/dist/client/assets/{collection-display-button-BXU3bas-.js → collection-display-button-C2pFOhp-.js} +1 -1
  84. package/dist/client/assets/{collection-search-C8t4q06I.js → collection-search-CK6DWEoN.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-NgoCW5QH.js → collection-table-wrapper-Cuunxi7W.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-C8PqzYbz.js → collection-tabs-PbqOrGAE.js} +1 -1
  87. package/dist/client/assets/{command-gwaZfGZa.js → command-CyCHKPNt.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-CRIsiIVx.js → commerce-onboarding-DoL29Pzz.js} +1 -1
  89. package/dist/client/assets/{companions-core-Dn3LcIo_.js → companions-core-B9pe3MQR.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-v9TvowOJ.js → connect-desktop-dialog-Dxt4VKgh.js} +1 -1
  91. package/dist/client/assets/{connection-card-BDecwPgk.js → connection-card-DgSkfQcr.js} +1 -1
  92. package/dist/client/assets/{connection-detail-CWBH96Dq.js → connection-detail-C0IIHSc5.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-BoDvmk3Q.js → connection-form-helpers-BbKCHBQE.js} +1 -1
  94. package/dist/client/assets/{connections-BsHyHcDP.js → connections-BlREMNF2.js} +1 -1
  95. package/dist/client/assets/{decopilot-sse-pool-CjKw050K.js → decopilot-sse-pool-Bzl2fSRU.js} +1 -1
  96. package/dist/client/assets/{dialog-CYzlrXFj.js → dialog-lcdHX7cY.js} +1 -1
  97. package/dist/client/assets/{domain-settings-5QR0EDgf.js → domain-settings-AlXi2-T8.js} +1 -1
  98. package/dist/client/assets/{drawer-D2COeU2X.js → drawer-BmmyWxUr.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-DsYNEie9.js → dropdown-menu-DIrk9-FW.js} +1 -1
  100. package/dist/client/assets/{empty-state-o8dL4wJH.js → empty-state-Ch08nwHQ.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-Rwrm1kZB.js → extract-connection-data-BytSHxUo.js} +1 -1
  102. package/dist/client/assets/{file-explorer-zcC7ct9b.js → file-explorer-Bz-bkdPG.js} +1 -1
  103. package/dist/client/assets/{file-type-icon-_GMz1Jen.js → file-type-icon-BUkMWarm.js} +1 -1
  104. package/dist/client/assets/{files-CRpnjh9L.js → files-D-LVRGUa.js} +1 -1
  105. package/dist/client/assets/{form-C6wDEIAY.js → form-DbOiThsI.js} +1 -1
  106. package/dist/client/assets/{general-COU_IrA0.js → general-CCFmNrX5.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-BlRp-VAX.js → github-repo-picker-QQlXo0w7.js} +1 -1
  108. package/dist/client/assets/{hooks-KcRS2DPh.js → hooks-DYQM4PBO.js} +1 -1
  109. package/dist/client/assets/{index-BPDQizac.js → index-B6pycsEI.js} +1 -1
  110. package/dist/client/assets/{index-DzXGggG1.js → index-BSSBmE1y.js} +1 -1
  111. package/dist/client/assets/{index-DFQS575E.js → index-B_VQVoVH.js} +27 -27
  112. package/dist/client/assets/{index-BshGz_gf.js → index-C7raI9JQ.js} +1 -1
  113. package/dist/client/assets/{index-DsIlfeiS.js → index-C8Qwxc6F.js} +2 -2
  114. package/dist/client/assets/{index-Oh4pKgR8.js → index-C8obExsr.js} +1 -1
  115. package/dist/client/assets/{index-CMeG3as8.js → index-CE7TkjyG.js} +3 -3
  116. package/dist/client/assets/{index-DuUPGiTX.js → index-CvDtkAgp.js} +1 -1
  117. package/dist/client/assets/{index-lpgQnKkq.js → index-DnMSq5aX.js} +1 -1
  118. package/dist/client/assets/{index-lLcFhN_U.js → index-HPgTsake.js} +1 -1
  119. package/dist/client/assets/{index-C_yOOkEq.js → index-_HX0a-yK.js} +1 -1
  120. package/dist/client/assets/{index-CU0vT98r.js → index-dDZRsCrX.js} +1 -1
  121. package/dist/client/assets/{index-Cosw7Del.js → index-nWfYQ1Kk.js} +1 -1
  122. package/dist/client/assets/{index-redirect-BbVlmGsm.js → index-redirect-DwYytolP.js} +1 -1
  123. package/dist/client/assets/{index-C2YMlNWG.js → index-y4bRVJp2.js} +1 -1
  124. package/dist/client/assets/{input-Qgr2BwiS.js → input-BGbc3BVQ.js} +1 -1
  125. package/dist/client/assets/{integration-icon-Sc6SH3LG.js → integration-icon-Cb-n4Kz0.js} +1 -1
  126. package/dist/client/assets/{invite-member-dialog-D5GPv1rF.js → invite-member-dialog-BLt6WLUd.js} +1 -1
  127. package/dist/client/assets/{label-Bu1iOGjN.js → label-DNVLsgc9.js} +1 -1
  128. package/dist/client/assets/{layout-Dj0J_T8O.js → layout-CA522HA6.js} +1 -1
  129. package/dist/client/assets/{login-XEZDxtR3.js → login-bCq7Soyi.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-FpoX5tvt.js → mcp-oauth-B8w0bV-v.js} +1 -1
  131. package/dist/client/assets/{members-Z9OiCFaZ.js → members-Bt3zHH0h.js} +1 -1
  132. package/dist/client/assets/{monaco-editor-BZEWoT7y.js → monaco-editor-BH0nmNrU.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-vxekjAao.js → monitoring-stats-row-k3klM6hZ.js} +1 -1
  134. package/dist/client/assets/{multi-select-CifByV_F.js → multi-select-ZYMnY8vt.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-BJGwRbQp.js → oauth-callback-ai-provider-Djr3Su4P.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-C0rr6juJ.js → oauth-callback-sJY8_UaX.js} +1 -1
  137. package/dist/client/assets/{onboarding-D4s8QPaL.js → onboarding-CgXeLIGL.js} +1 -1
  138. package/dist/client/assets/{org-install-CDfk9lw9.js → org-install-RuZ6WRPe.js} +1 -1
  139. package/dist/client/assets/{org-layout-B06YoPvy.js → org-layout-D-NJ2J8a.js} +1 -1
  140. package/dist/client/assets/{organization-choice-BSRD-LSH.js → organization-choice-B3eG4IV-.js} +1 -1
  141. package/dist/client/assets/{orgs-A0qhhpWT.js → orgs-BsqodA7N.js} +1 -1
  142. package/dist/client/assets/{page-seo-form-BT0yakPh.js → page-seo-form-BHGzdh3a.js} +1 -1
  143. package/dist/client/assets/page-seo-sheet-DpJshnEY.js +1 -0
  144. package/dist/client/assets/{popover--mJkHxOT.js → popover-C_0DaLYQ.js} +1 -1
  145. package/dist/client/assets/{post-editor-BUeZzGw-.js → post-editor-BNuWg8iz.js} +1 -1
  146. package/dist/client/assets/{primitives-BOjJF1O4.js → primitives--6vN4D2s.js} +1 -1
  147. package/dist/client/assets/{profile-keLqYw9w.js → profile-I_eCTCnL.js} +1 -1
  148. package/dist/client/assets/project-app-view-D_DLvOi7.js +1 -0
  149. package/dist/client/assets/record-editor-_KQd47y_.js +1 -0
  150. package/dist/client/assets/redirect-editor-DPpGZwie.js +1 -0
  151. package/dist/client/assets/registry-DFRGEg_K.js +2 -0
  152. package/dist/client/assets/{registry-layout-Bk_YwgcY.js → registry-layout-DgM-ywSo.js} +1 -1
  153. package/dist/client/assets/{reports-C9RKHGm8.js → reports-DCnWbBkT.js} +1 -1
  154. package/dist/client/assets/{require-capability-DuEmuJvS.js → require-capability-CrAaiEdf.js} +1 -1
  155. package/dist/client/assets/{required-auth-layout-DZ1W8VZD.js → required-auth-layout-f35eH-Ld.js} +1 -1
  156. package/dist/client/assets/{reset-password-B53V4VGB.js → reset-password-4Z3nTAd-.js} +1 -1
  157. package/dist/client/assets/{roles-CPPYBFsM.js → roles-DfxDQacD.js} +1 -1
  158. package/dist/client/assets/{search-input-EgXEbQA1.js → search-input-DUaPQZfD.js} +1 -1
  159. package/dist/client/assets/{secrets-C2Ev2FxA.js → secrets-B9MOC9O6.js} +1 -1
  160. package/dist/client/assets/{sections-editor-CT43XOVJ.js → sections-editor-C00ZpHaZ.js} +1 -1
  161. package/dist/client/assets/{select-CSPlnvxS.js → select-D4V93mGS.js} +1 -1
  162. package/dist/client/assets/{select-model-BERmiJrJ.js → select-model-s-rTbDz1.js} +1 -1
  163. package/dist/client/assets/{self-tool-result-6QVgQ25A.js → self-tool-result-Dc57UdWQ.js} +1 -1
  164. package/dist/client/assets/{seo-editor-DtZ7ksEg.js → seo-editor-g3Dhe9Z7.js} +1 -1
  165. package/dist/client/assets/{settings-layout-yDTQRTRm.js → settings-layout-CBnYoR2n.js} +1 -1
  166. package/dist/client/assets/{settings-section-ByGI80uj.js → settings-section-yzArS6H9.js} +1 -1
  167. package/dist/client/assets/{shell-controls-CoP6NSPm.js → shell-controls-C3tepMdK.js} +1 -1
  168. package/dist/client/assets/{shell-layout-BMBOJURx.js → shell-layout-Cx_FvRXF.js} +1 -1
  169. package/dist/client/assets/{sidebar-BWpR4Yre.js → sidebar-BVuvo8Kk.js} +1 -1
  170. package/dist/client/assets/{skeleton-Ct_MQtUb.js → skeleton-BfKJuYOV.js} +1 -1
  171. package/dist/client/assets/{sso-VXUMUNGN.js → sso-C5Rral4Z.js} +1 -1
  172. package/dist/client/assets/{store-DoXzc9fJ.js → store-Dz7-d-_S.js} +1 -1
  173. package/dist/client/assets/store-registry-BwfhezVl.js +2 -0
  174. package/dist/client/assets/{studio-tools-SjfSv7OF.js → studio-tools-D76v3LII.js} +1 -1
  175. package/dist/client/assets/{switch-CD2avflt.js → switch-CozUcV-K.js} +1 -1
  176. package/dist/client/assets/{table-DHymLHzQ.js → table-BRwHxC0X.js} +1 -1
  177. package/dist/client/assets/{tabs-Dio3YbT0.js → tabs-Bs1vP5md.js} +1 -1
  178. package/dist/client/assets/{textarea-CwyPlfj5.js → textarea-D0ihxnY4.js} +1 -1
  179. package/dist/client/assets/{toggle-group-BwTWoa-O.js → toggle-group-CPtRoBuY.js} +1 -1
  180. package/dist/client/assets/{toolbar-6N9kzna5.js → toolbar-Fx0lxHE1.js} +1 -1
  181. package/dist/client/assets/{toolbar-icon-button-2stwNwon.js → toolbar-icon-button-BhzWo_pm.js} +1 -1
  182. package/dist/client/assets/{tooltip-CMn8vzMZ.js → tooltip-BtXdwbhw.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-C0o7E_Hb.js → use-ai-providers-D6ck7LsQ.js} +1 -1
  184. package/dist/client/assets/{use-automations-wID_RCtg.js → use-automations-B2xJrLQ5.js} +1 -1
  185. package/dist/client/assets/{use-autosave-CS5EHjaH.js → use-autosave-DPWOckXR.js} +1 -1
  186. package/dist/client/assets/{use-capability-IX4fs_Qe.js → use-capability-v-uf1YrX.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-DqH2q2vk.js → use-clock-tick-DHClLQ5S.js} +1 -1
  188. package/dist/client/assets/{use-collections-DkO94IRd.js → use-collections-DSY8ih13.js} +1 -1
  189. package/dist/client/assets/{use-connection-BrI1TBEQ.js → use-connection-ElgRfHB7.js} +1 -1
  190. package/dist/client/assets/{use-copy-BGrpMr3q.js → use-copy-CcLXgiWQ.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-DLRcGRae.js → use-create-virtual-mcp-CyIxMNao.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-Duy6pKkq.js → use-debounced-autosave-BwAuDbkM.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-CNzUDiIr.js → use-debounced-value-ish1mNgi.js} +1 -1
  194. package/dist/client/assets/{use-deco-credits-D54W39vo.js → use-deco-credits-CdWGAqmC.js} +1 -1
  195. package/dist/client/assets/{use-decopilot-events-D1hHuB3T.js → use-decopilot-events-BUZnLnOV.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-DF9ZBYJo.js → use-delete-connection-DNsxKRii.js} +1 -1
  197. package/dist/client/assets/{use-deployment-admin-B2ULKOY4.js → use-deployment-admin-B8ZI_lgc.js} +1 -1
  198. package/dist/client/assets/{use-file-configs-De-Fn7VW.js → use-file-configs-CW1pD8b0.js} +1 -1
  199. package/dist/client/assets/{use-infinite-scroll-BB8PSiEZ.js → use-infinite-scroll-i5r6I1JZ.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-DUYvjqwj.js → use-join-requests-CZD8HbXQ.js} +1 -1
  201. package/dist/client/assets/{use-mcp-auth-status-CtgsjdCh.js → use-mcp-auth-status-DPprLpB-.js} +1 -1
  202. package/dist/client/assets/{use-mcp-client-DU_JKY2l.js → use-mcp-client-BORR1RZ6.js} +1 -1
  203. package/dist/client/assets/{use-mcp-tools-BIiSyylP.js → use-mcp-tools-DC-S1jnk.js} +1 -1
  204. package/dist/client/assets/{use-members-DAIIfDp3.js → use-members-cyvFb5Cp.js} +1 -1
  205. package/dist/client/assets/{use-mobile-KBqahjtY.js → use-mobile-CFxA0PHq.js} +1 -1
  206. package/dist/client/assets/{use-navigate-to-agent-D50MdHbN.js → use-navigate-to-agent-Bye37Ci1.js} +1 -1
  207. package/dist/client/assets/{use-org-auth-client-DOJH8LoJ.js → use-org-auth-client-CNpE2UX7.js} +1 -1
  208. package/dist/client/assets/{use-org-sso-CRIS5N7t.js → use-org-sso-B0JpIzdV.js} +1 -1
  209. package/dist/client/assets/{use-organization-roles-DJO3Vgzc.js → use-organization-roles-Di1vYrHv.js} +1 -1
  210. package/dist/client/assets/{use-organization-settings-Dy_KanGd.js → use-organization-settings-ivTDzBK5.js} +1 -1
  211. package/dist/client/assets/{use-registry-connections-W58t-cmP.js → use-registry-connections-CpSL7-0P.js} +1 -1
  212. package/dist/client/assets/{use-secrets-qAQkLsrm.js → use-secrets-DRlWg7Dd.js} +1 -1
  213. package/dist/client/assets/{use-status-sounds-D5gLZlc4.js → use-status-sounds-DRA9dEy4.js} +1 -1
  214. package/dist/client/assets/{use-view-mode-BBbqFA-t.js → use-view-mode-BaqDn60w.js} +1 -1
  215. package/dist/client/assets/{use-virtual-mcp-DQ65ZJFx.js → use-virtual-mcp-u5RFr3-U.js} +1 -1
  216. package/dist/client/assets/useInfiniteQuery-BqSTdaV8.js +1 -0
  217. package/dist/client/assets/{useRouterState-Ci8kAe0w.js → useRouterState-CCp0yZfm.js} +1 -1
  218. package/dist/client/assets/useSuspenseInfiniteQuery-C3Ytl8eC.js +1 -0
  219. package/dist/client/assets/{users-DJidtmyi.js → users-CY5xUSlP.js} +1 -1
  220. package/dist/client/assets/{variant-calendar-BSeCZiQE.js → variant-calendar-CR5IEJGU.js} +1 -1
  221. package/dist/client/assets/{view-mode-toggle-urfUtiKR.js → view-mode-toggle-CZic-LCt.js} +1 -1
  222. package/dist/client/index.html +1 -1
  223. package/dist/server/cli.js +1 -1
  224. package/dist/server/server.js +1 -1
  225. package/package.json +1 -1
  226. package/dist/client/assets/automations-zMrCPtwW.js +0 -1
  227. package/dist/client/assets/page-seo-sheet-BGzw1-Yy.js +0 -1
  228. package/dist/client/assets/project-app-view-CU7C1rrf.js +0 -1
  229. package/dist/client/assets/record-editor-ybNfjwSx.js +0 -1
  230. package/dist/client/assets/redirect-editor-UnoayY6Y.js +0 -1
  231. package/dist/client/assets/registry-B7Ps57HM.js +0 -2
  232. package/dist/client/assets/store-registry-Be-7Cf-u.js +0 -2
  233. package/dist/client/assets/useInfiniteQuery-D4RCyZFv.js +0 -1
  234. package/dist/client/assets/useSuspenseInfiniteQuery-DyqwlOoo.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as $,C as de,n as Ze,d as We,K as X,m as ie,aY as wn,r as S,ap as zs,l as ce,j as r,U as Cs,i as $s,B as J,aL as jn,t as ue,w as Ps,L as Es,e as Ds,b as kn,u as Sn,E as Pt}from"./index-CMeG3as8.js";import{i as Ts}from"./ChevronRight-Dgwih5i7.js";import{s as Nn}from"./Eye-D-_PJSgt.js";import{n as Ve,i as xt}from"./Globe01-D9CW1i2c.js";import{b as Fs,c as Ms,e as Is,i as Ls,f as zn,a as Cn,g as Os,d as Rs}from"./ZoomOut-DpzGJ1T5.js";import{a as dt}from"./Palette-D6cir_25.js";import{s as As}from"./Plus-Eoohz80p.js";import{i as _s}from"./SearchLg-BUcf6k1H.js";import{t as Us}from"./Stars01-CskH5zEn.js";import{i as ut}from"./Upload01-BX76VXQc.js";import{s as $n}from"./XClose-7KJjg9yA.js";import{i as _t}from"./Zap-BlmNb1XN.js";import{u as Pn}from"./use-mobile-KBqahjtY.js";import{f as Bs,a as Hs,b as qs,c as Ks,d as Ws,e as Gs,A as Vs,g as Xs}from"./alert-dialog-CXiQmJbb.js";import{D as En,a as Ue,d as Je,e as et,i as Dn,h as Qs,c as Ys}from"./dialog-CYzlrXFj.js";import{I as Xe}from"./input-Qgr2BwiS.js";import{S as ae}from"./skeleton-Ct_MQtUb.js";import{F as ke,M as Ut,d as Tn}from"./file-type-icon-_GMz1Jen.js";import{T as Zs}from"./toolbar-6N9kzna5.js";import{a as Js}from"./Package-DLfVyiPP.js";import{u as el}from"./use-debounced-value-CNzUDiIr.js";import{i as Fn}from"./DotsVertical-zQUs6pcc.js";import{i as Mn}from"./Key01-BiqNsFdR.js";import{s as In}from"./Trash01-DTZ71BUV.js";import{D as Bt,a as Ht,c as qt,d as Fe}from"./dropdown-menu-DsYNEie9.js";import{T as tl}from"./textarea-CwyPlfj5.js";import{t as nl}from"./ChevronDown-Hh6g_Saw.js";import{n as sl}from"./ChevronUp-D7Z_my0f.js";import{i as ft}from"./X-Cb9LKHA1.js";import{P as ll,b as rl,a as il}from"./popover--mJkHxOT.js";import{b as be,T as ye,a as ve}from"./tooltip-CMn8vzMZ.js";import{i as ol}from"./Check-BOwgvBwV.js";import{a as al}from"./Copy01-D6imwHCp.js";import{n as Ln}from"./LinkExternal01-CJtXioga.js";import{l as cl,F as dl}from"./index-BshGz_gf.js";import{i as ul}from"./LayoutLeft-cruDqPt8.js";function On(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const l=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${l?`?${l}`:""}`}async function fe(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let l="";try{l=(await s.json()).error??""}catch{}throw new Error(l||`HTTP ${s.status}`)}function Kt(n,e){const t=$.c(11),{org:s}=de();let l;t[0]!==s.id||t[1]!==e||t[2]!==n?(l=X.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=l):l=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await fe(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(fl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==l||t[9]!==i?(o={queryKey:l,placeholderData:wn,queryFn:i},t[8]=l,t[9]=i,t[10]=o):o=t[10],ie(o)}function fl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function Rn(n,e,t){const s=$.c(15),{org:l}=de();let i;s[0]!==l.id||s[1]!==e||s[2]!==n?(i=X.orgFsStat(l.id,n??"",e),s[0]=l.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==l.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fe(pe(l.slug,n??"","stat",{path:e}),void 0,{allow404:!0});return f.status===404?null:(await f.json()).entry},s[6]=l.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function hl(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=X.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let l;e[3]!==t.slug||e[4]!==n?(l=async()=>await(await fe(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==s||e[7]!==l?(i={queryKey:s,queryFn:l},e[6]=s,e[7]=l,e[8]=i):i=e[8],ie(i)}function ml(n,e){const t=$.c(9),s=n===void 0?60:n,{org:l}=de();let i;t[0]!==l.id?(i=X.orgFsRecent(l.id),t[0]=l.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==l.slug?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=l.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function pl(n,e){const t=$.c(11),s=50,{org:l}=de();let i;t[0]!==l.id||t[1]!==n?(i=X.orgFsSearch(l.id,n),t[0]=l.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==l.slug||t[5]!==n?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=l.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:wn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Do(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=X.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const l=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await fe(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(xl)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==l||e[6]!==i?(o={queryKey:s,enabled:l,queryFn:i},e[4]=s,e[5]=l,e[6]=i,e[7]=o):o=e[7],ie(o)}function xl(n){return{volume:n.volume,path:n.path}}async function To(n){const e=await fe(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function gl(n,e,t){return(await fe(pe(n,e,"read",{path:t}))).text()}const bl=new Set(["md","mdx","markdown","txt","text"]),yl=25,vl=64*1024,wl=256*1024,jl=4;function kl(n){const e=n.lastIndexOf(".");return e===-1?!1:bl.has(n.slice(e+1).toLowerCase())}async function Fo(n,e,t){const s=t?`${t}/`:"",l=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await fe(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<jl&&a.push({path:m.path,depth:u.depth+1});continue}kl(m.path)&&m.size<=vl&&i.length<yl?i.push(m.path):o.push(l(m.path))}}const c=await Promise.all(i.map(u=>gl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>wl){o.push(l(u));return}f+=m.length,d.push({relPath:l(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function An(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=X.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await fe(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let l;return n[4]!==t||n[5]!==s?(l={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=l):l=n[6],ie(l)}function Sl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=l=>pe(t.slug,n,"read",{path:l}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function tt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,l)=>pe(e.slug,s,"read",{path:l}),n[0]=e.slug,n[1]=t):t=n[1],t}function _n(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async l=>(await(await fe(pe(t.slug,n,"file",{path:l.path}),{method:"PUT",headers:{"content-type":l.contentType??"text/html; charset=utf-8"},body:l.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function Nl(n){const e=$.c(18),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==n?(l=async d=>(await(await fe(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=l):l=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=X.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:X.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==l||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:l,onMutate:i,onError:o,onSettled:a},e[13]=l,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function Lt(n){const e=$.c(26),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==s||e[2]!==n?(l=()=>{s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=l):l=e[3];const i=l;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await fe(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await fe(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await fe(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const gt=S.createContext(null);gt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Wt=10,Te=S.useLayoutEffect,tn=zs.useId,zl=typeof tn=="function"?tn:()=>null;let Cl=0;function Gt(n=null){const e=zl(),t=S.useRef(n||e||null);return t.current===null&&(t.current=""+Cl++),n??t.current}function Un({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:l,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=S.useContext(gt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:C,isPanelCollapsed:k,reevaluatePanelConstraints:w,registerPanel:B,resizePanel:R,unregisterPanel:_}=b,v=Gt(o),M=S.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:l,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});S.useRef({didLogMissingDefaultSizeWarning:!1}),Te(()=>{const{callbacks:U,constraints:O}=M.current,H={...O};M.current.id=v,M.current.idIsFromProps=o!==void 0,M.current.order=h,U.onCollapse=d,U.onExpand=f,U.onResize=u,O.collapsedSize=t,O.collapsible=s,O.defaultSize=l,O.maxSize=a,O.minSize=c,(H.collapsedSize!==O.collapsedSize||H.collapsible!==O.collapsible||H.maxSize!==O.maxSize||H.minSize!==O.minSize)&&w(M.current,H)}),Te(()=>{const U=M.current;return B(U),()=>{_(U)}},[h,v,B,_]),S.useImperativeHandle(i,()=>({collapse:()=>{x(M.current)},expand:U=>{y(M.current,U)},getId(){return v},getSize(){return j(M.current)},isCollapsed(){return k(M.current)},isExpanded(){return!k(M.current)},resize:U=>{R(M.current,U)}}),[x,y,j,k,v,R]);const Z=N(M.current,l);return S.createElement(p,{...g,children:n,className:e,id:v,style:{...Z,...m},[se.groupId]:C,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+Z.flexGrow).toFixed(1)})}const Bn=S.forwardRef((n,e)=>S.createElement(Un,{...n,forwardedRef:e}));Un.displayName="Panel";Bn.displayName="forwardRef(Panel)";let Ot=null,ct=-1,ze=null;function $l(n,e){if(e){const t=(e&Gn)!==0,s=(e&Vn)!==0,l=(e&Xn)!==0,i=(e&Qn)!==0;if(t)return l?"se-resize":i?"ne-resize":"e-resize";if(s)return l?"sw-resize":i?"nw-resize":"w-resize";if(l)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Pl(){ze!==null&&(document.head.removeChild(ze),Ot=null,ze=null,ct=-1)}function Et(n,e){var t,s;const l=$l(n,e);if(Ot!==l){if(Ot=l,ze===null&&(ze=document.createElement("style"),document.head.appendChild(ze)),ct>=0){var i;(i=ze.sheet)===null||i===void 0||i.removeRule(ct)}ct=(t=(s=ze.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${l} !important;}`))!==null&&t!==void 0?t:-1}}function Hn(n){return n.type==="keydown"}function qn(n){return n.type.startsWith("pointer")}function Kn(n){return n.type.startsWith("mouse")}function bt(n){if(qn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Kn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function El(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Dl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function Tl(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:ln(n),b:ln(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;G(s,"Stacking order can only be calculated for elements with a common ancestor");const l={a:sn(nn(t.a)),b:sn(nn(t.b))};if(l.a===l.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(l.a-l.b)}const Fl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Ml(n){var e;const t=getComputedStyle((e=Wn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Il(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Ml(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Fl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function nn(n){let e=n.length;for(;e--;){const t=n[e];if(G(t,"Missing node"),Il(t))return t}return null}function sn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function ln(n){const e=[];for(;n;)e.push(n),n=Wn(n);return e}function Wn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Gn=1,Vn=2,Xn=4,Qn=8,Ll=El()==="coarse";let xe=[],_e=!1,De=new Map,yt=new Map;const Qe=new Set;function Ol(n,e,t,s,l){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:l},c=(i=De.get(o))!==null&&i!==void 0?i:0;return De.set(o,c+1),Qe.add(a),ht(),function(){var f;yt.delete(n),Qe.delete(a);const u=(f=De.get(o))!==null&&f!==void 0?f:1;if(De.set(o,u-1),ht(),u===1&&De.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Xt(),l("up",!0,null)}}}function Rl(n){const{target:e}=n,{x:t,y:s}=bt(n);_e=!0,Vt({target:e,x:t,y:s}),ht(),xe.length>0&&(mt("down",n),n.preventDefault(),Yn(e)||n.stopImmediatePropagation())}function Dt(n){const{x:e,y:t}=bt(n);if(_e&&n.buttons===0&&(_e=!1,mt("up",n)),!_e){const{target:s}=n;Vt({target:s,x:e,y:t})}mt("move",n),Xt(),xe.length>0&&n.preventDefault()}function Tt(n){const{target:e}=n,{x:t,y:s}=bt(n);yt.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Yn(e)||n.stopImmediatePropagation()),mt("up",n),Vt({target:e,x:t,y:s}),Xt(),ht()}function Yn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Vt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(l=>{const{element:i,hitAreaMargins:o}=l,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ll?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&Tl(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Dl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(l)}})}function Ft(n,e){yt.set(n,e)}function Xt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:l}=s;l==="horizontal"?n=!0:e=!0});let t=0;yt.forEach(s=>{t|=s}),n&&e?Et("intersection",t):n?Et("horizontal",t):e?Et("vertical",t):Pl()}let Mt=new AbortController;function ht(){Mt.abort(),Mt=new AbortController;const n={capture:!0,signal:Mt.signal};Qe.size&&(_e?(xe.length>0&&De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",Tt,n),s.addEventListener("pointerleave",Dt,n),s.addEventListener("pointermove",Dt,n))}),window.addEventListener("pointerup",Tt,n),window.addEventListener("pointercancel",Tt,n)):De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Rl,n),s.addEventListener("pointermove",Dt,n))}))}function mt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,l=xe.includes(t);s(n,l,e)})}function Al(){const[n,e]=S.useState(0);return S.useCallback(()=>e(t=>t+1),[])}function G(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Wt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function we(n,e,t=Wt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function _l(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const l=n[s],i=e[s];if(!me(l,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];G(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:l=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(l+a)/2;Me(t,c)<0?t=l:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Wt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:l,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;G(a!=null,"Invalid first pivot index"),G(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];G(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];G(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];G(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];G(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(_l(l,o))return l;{const u=n<0?c:a,h=e[u];G(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];G(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:l}function Ul({layout:n,panelsArray:e,pivotIndices:t}){let s=0,l=100,i=0,o=0;const a=t[0];G(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,l=p):(i+=g,o+=p)});const c=Math.min(l,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Zn(n,e,t=document){const l=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return l??null}function Jn(n,e,t){const s=Zn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function es(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function vt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function Bl(n,e,t,s=document){var l,i,o,a;const c=vt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(l=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&l!==void 0?l:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Hl({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:l,panelGroupElement:i,setLayout:o}){S.useRef({didWarnAboutMissingResizeHandle:!1}),Te(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<l.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Ul({layout:s,panelsArray:l,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=l[c];G(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,l,i]),S.useEffect(()=>{if(!i)return;const a=e.current;G(a,"Eager values not found");const{panelDataArray:c}=a,d=es(t,i);G(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);G(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);G(m,"Resize handle element has no handle id attribute");const[p,g]=Bl(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];G(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:C=0,collapsible:k,minSize:w=0}=j.constraints;if(N!=null&&k){const B=He({delta:me(N,C)?w-C:C-N,initialLayout:s,panelConstraints:c.map(R=>R.constraints),pivotIndices:Jn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==B&&o(B)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,l,o])}function rn(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function ts(n,e){const t=n==="horizontal",{x:s,y:l}=bt(e);return t?s:l}function ql(n,e,t,s,l){const i=t==="horizontal",o=vt(e,l);G(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);G(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=ts(t,n),f=es(a,l);G(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Kl(n,e,t,s,l,i){if(Hn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:l!=null?a=l:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:ql(n,e,t,s,i)}function Wl({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,l=100;for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,l-=a)}for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=l/c;s++,e[i]=d,l-=d}return e}function Ie(n,e,t){e.forEach((s,l)=>{const i=n[l];G(i,`Panel data not found for index ${l}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||we(u,d))&&!we(s,d)&&m(),h&&(u==null||!we(u,d))&&we(s,d)&&h())}})}function at(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Gl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:l,precision:i=3}){const o=t[l];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vl(n,e=10){let t=null;return(...l)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...l)},e)}}function on(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ns(n){return`react-resizable-panels:${n}`}function ss(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:l,order:i}=e;return l?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ls(n,e){try{const t=ns(n),s=e.getItem(t);if(s){const l=JSON.parse(s);if(typeof l=="object"&&l!=null)return l}}catch{}return null}function Xl(n,e,t){var s,l;const i=(s=ls(n,t))!==null&&s!==void 0?s:{},o=ss(e);return(l=i[o])!==null&&l!==void 0?l:null}function Ql(n,e,t,s,l){var i;const o=ns(n),a=ss(e),c=(i=ls(n,l))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{l.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function an({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let l=0;for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(l+=o-a,t[i]=a)}if(!me(l,0))for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=o+l,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(l-=c-o,t[i]=c,me(l,0)))break}return t}const Yl=100,qe={getItem:n=>(on(qe),qe.getItem(n)),setItem:(n,e)=>{on(qe),qe.setItem(n,e)}},cn={};function rs({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:l,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Gt(i),m=S.useRef(null),[p,g]=S.useState(null),[b,x]=S.useState([]),y=Al(),j=S.useRef({}),N=S.useRef(new Map),C=S.useRef(0),k=S.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=S.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});S.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),S.useImperativeHandle(l,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:z}=w.current;return z},setLayout:z=>{const{onLayout:F}=k.current,{layout:I,panelDataArray:L}=w.current,D=an({layout:z,panelConstraints:L.map(A=>A.constraints)});rn(I,D)||(x(D),w.current.layout=D,F&&F(D),Ie(L,D,j.current))}}),[]),Te(()=>{k.current.autoSaveId=n,k.current.direction=s,k.current.dragState=p,k.current.id=h,k.current.onLayout=o,k.current.storage=c}),Hl({committedValuesRef:k,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),S.useEffect(()=>{const{panelDataArray:z}=w.current;if(n){if(b.length===0||b.length!==z.length)return;let F=cn[n];F==null&&(F=Vl(Ql,Yl),cn[n]=F);const I=[...z],L=new Map(N.current);F(n,I,L,b,c)}},[n,b,c]),S.useEffect(()=>{});const B=S.useCallback(z=>{const{onLayout:F}=k.current,{layout:I,panelDataArray:L}=w.current;if(z.constraints.collapsible){const D=L.map(he=>he.constraints),{collapsedSize:A=0,panelSize:Q,pivotIndices:te}=Ee(L,z,I);if(G(Q!=null,`Panel size not found for panel "${z.id}"`),!we(Q,A)){N.current.set(z.id,Q);const P=Oe(L,z)===L.length-1?Q-A:A-Q,V=He({delta:P,initialLayout:I,panelConstraints:D,pivotIndices:te,prevLayout:I,trigger:"imperative-api"});at(I,V)||(x(V),w.current.layout=V,F&&F(V),Ie(L,V,j.current))}}},[]),R=S.useCallback((z,F)=>{const{onLayout:I}=k.current,{layout:L,panelDataArray:D}=w.current;if(z.constraints.collapsible){const A=D.map(ne=>ne.constraints),{collapsedSize:Q=0,panelSize:te=0,minSize:he=0,pivotIndices:P}=Ee(D,z,L),V=F??he;if(we(te,Q)){const ne=N.current.get(z.id),ge=ne!=null&&ne>=V?ne:V,$e=Oe(D,z)===D.length-1?te-ge:ge-te,oe=He({delta:$e,initialLayout:L,panelConstraints:A,pivotIndices:P,prevLayout:L,trigger:"imperative-api"});at(L,oe)||(x(oe),w.current.layout=oe,I&&I(oe),Ie(D,oe,j.current))}}},[]),_=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{panelSize:L}=Ee(I,z,F);return G(L!=null,`Panel size not found for panel "${z.id}"`),L},[]),v=S.useCallback((z,F)=>{const{panelDataArray:I}=w.current,L=Oe(I,z);return Gl({defaultSize:F,dragState:p,layout:b,panelData:I,panelIndex:L})},[p,b]),M=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(I,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),D===!0&&we(A,L)},[]),Z=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(I,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),!D||Me(A,L)>0},[]),U=S.useCallback(z=>{const{panelDataArray:F}=w.current;F.push(z),F.sort((I,L)=>{const D=I.order,A=L.order;return D==null&&A==null?0:D==null?-1:A==null?1:D-A}),w.current.panelDataArrayChanged=!0,y()},[y]);Te(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:z,onLayout:F,storage:I}=k.current,{layout:L,panelDataArray:D}=w.current;let A=null;if(z){const te=Xl(z,D,I);te&&(N.current=new Map(Object.entries(te.expandToSizes)),A=te.layout)}A==null&&(A=Wl({panelDataArray:D}));const Q=an({layout:A,panelConstraints:D.map(te=>te.constraints)});rn(L,Q)||(x(Q),w.current.layout=Q,F&&F(Q),Ie(D,Q,j.current))}}),Te(()=>{const z=w.current;return()=>{z.layout=[]}},[]);const O=S.useCallback(z=>{let F=!1;const I=m.current;return I&&window.getComputedStyle(I,null).getPropertyValue("direction")==="rtl"&&(F=!0),function(D){D.preventDefault();const A=m.current;if(!A)return()=>null;const{direction:Q,dragState:te,id:he,keyboardResizeBy:P,onLayout:V}=k.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Se}=te??{},$e=Jn(he,z,A);let oe=Kl(D,z,Q,te,P,A);const rt=Q==="horizontal";rt&&F&&(oe=-oe);const Ct=ge.map($t=>$t.constraints),Pe=He({delta:oe,initialLayout:Se??ne,panelConstraints:Ct,pivotIndices:$e,prevLayout:ne,trigger:Hn(D)?"keyboard":"mouse-or-touch"}),it=!at(ne,Pe);(qn(D)||Kn(D))&&C.current!=oe&&(C.current=oe,!it&&oe!==0?rt?Ft(z,oe<0?Gn:Vn):Ft(z,oe<0?Xn:Qn):Ft(z,0)),it&&(x(Pe),w.current.layout=Pe,V&&V(Pe),Ie(ge,Pe,j.current))}},[]),H=S.useCallback((z,F)=>{const{onLayout:I}=k.current,{layout:L,panelDataArray:D}=w.current,A=D.map(ne=>ne.constraints),{panelSize:Q,pivotIndices:te}=Ee(D,z,L);G(Q!=null,`Panel size not found for panel "${z.id}"`);const P=Oe(D,z)===D.length-1?Q-F:F-Q,V=He({delta:P,initialLayout:L,panelConstraints:A,pivotIndices:te,prevLayout:L,trigger:"imperative-api"});at(L,V)||(x(V),w.current.layout=V,I&&I(V),Ie(D,V,j.current))},[]),W=S.useCallback((z,F)=>{const{layout:I,panelDataArray:L}=w.current,{collapsedSize:D=0,collapsible:A}=F,{collapsedSize:Q=0,collapsible:te,maxSize:he=100,minSize:P=0}=z.constraints,{panelSize:V}=Ee(L,z,I);V!=null&&(A&&te&&we(V,D)?we(D,Q)||H(z,Q):V<P?H(z,P):V>he&&H(z,he))},[H]),q=S.useCallback((z,F)=>{const{direction:I}=k.current,{layout:L}=w.current;if(!m.current)return;const D=vt(z,m.current);G(D,`Drag handle element not found for id "${z}"`);const A=ts(I,F);g({dragHandleId:z,dragHandleRect:D.getBoundingClientRect(),initialCursorPosition:A,initialLayout:L})},[]),ee=S.useCallback(()=>{g(null)},[]),Y=S.useCallback(z=>{const{panelDataArray:F}=w.current,I=Oe(F,z);I>=0&&(F.splice(I,1),delete j.current[z.id],w.current.panelDataArrayChanged=!0,y())},[y]),T=S.useMemo(()=>({collapsePanel:B,direction:s,dragState:p,expandPanel:R,getPanelSize:_,getPanelStyle:v,groupId:h,isPanelCollapsed:M,isPanelExpanded:Z,reevaluatePanelConstraints:W,registerPanel:U,registerResizeHandle:O,resizePanel:H,startDragging:q,stopDragging:ee,unregisterPanel:Y,panelGroupElement:m.current}),[B,p,s,R,_,v,h,M,Z,W,U,O,H,q,ee,Y]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return S.createElement(gt.Provider,{value:T},S.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const is=S.forwardRef((n,e)=>S.createElement(rs,{...n,forwardedRef:e}));rs.displayName="PanelGroup";is.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Ee(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Zl({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){S.useEffect(()=>{if(n||t==null||s==null)return;const l=vt(e,s);if(l==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=l.getAttribute(se.groupId);G(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Zn(a,e,s);G(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}},[s,n,e,t])}function os({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:l,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=S.useRef(null),y=S.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});S.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=S.useContext(gt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:C,registerResizeHandle:k,startDragging:w,stopDragging:B,panelGroupElement:R}=j,_=Gt(l),[v,M]=S.useState("inactive"),[Z,U]=S.useState(!1),[O,H]=S.useState(null),W=S.useRef({state:v});Te(()=>{W.current.state=v}),S.useEffect(()=>{if(t)H(null);else{const T=k(_);H(()=>T)}},[t,_,k]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;S.useEffect(()=>{if(t||O==null)return;const T=x.current;G(T,"Element ref not attached");let K=!1;return Ol(_,T,N,{coarse:q,fine:ee},(F,I,L)=>{if(!I){M("inactive");return}switch(F){case"down":{M("drag"),K=!1,G(L,'Expected event to be defined for "down" action'),w(_,L);const{onDragging:D,onPointerDown:A}=y.current;D?.(!0),A?.();break}case"move":{const{state:D}=W.current;K=!0,D!=="drag"&&M("hover"),G(L,'Expected event to be defined for "move" action'),O(L);break}case"up":{M("hover"),B();const{onClick:D,onDragging:A,onPointerUp:Q}=y.current;A?.(!1),Q?.(),K||D?.();break}}})},[q,N,t,ee,k,_,O,w,B]),Zl({disabled:t,handleId:_,resizeHandler:O,panelGroupElement:R});const Y={touchAction:"none",userSelect:"none"};return S.createElement(m,{...p,children:n,className:e,id:l,onBlur:()=>{U(!1),i?.()},onFocus:()=>{U(!0),c?.()},ref:x,role:"separator",style:{...Y,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:C,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":Z?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:_,[se.resizeHandleState]:v})}os.displayName="PanelResizeHandle";function Jl(n){const e=$.c(10);let t,s,l;e[0]!==n?({className:t,ref:l,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==l||e[8]!==i?(o=r.jsx(is,{ref:l,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=l,e[8]=i,e[9]=o):o=e[9],o}function dn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=r.jsx(Bn,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function er(n){const e=$.c(12);let t,s,l;e[0]!==n?({withHandle:l,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);let i;e[4]!==t?(i=ce("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==l?(o=l&&r.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:r.jsx(Fs,{className:"size-2.5"})}),e[6]=l,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=r.jsx(os,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function tr(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function nr(n){if(tr(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function sr(n){try{return decodeURIComponent(n)}catch{return n}}function lr(n){return nr(n),encodeURIComponent(n)}function rr(n){return`.deco/blocks/${lr(n)}.json`}function Mo(n){return`/${rr(n)}`}const Io=1e4,ir=3;function Rt(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function wt(n){return n.startsWith("/")?n.slice(1):n}function Lo(n){const e=wt(n);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}function pt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function or(n){const e=pt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Oo(n,e){const t=e.replace(/^\/+|\/+$/g,"");return pt(t?`${n==="/"?"":n}/${t}`:n)}function Ro(n,e){return e==="directory"?n:or(n)}function Ao(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ar(n){const e=wt(n);return e?e.split("/").filter(Boolean).length:0}function _o(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Uo(n,e){return ar(n)>=ir&&!e.has(n)}function Bo(n,e,t=[]){const s=wt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const l=`${s}/`;return e.some(i=>i.startsWith(l))||t.some(i=>i.startsWith(l))}function Ho(n){const e=wt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return sr(s)}function cr(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function qo(n){const e=Rt(n).split("/").filter(Boolean),t=["/"];let s="";for(const l of e.slice(0,-1))s+=`/${l}`,t.push(s);return t}function Ko(n,e=[]){const t={children:[]},s=i=>{const a=Rt(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Rt(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(pt(i));const l=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&l(o.children)};return l(t.children),t.children}function dr(n,e,t=0){const s=[];for(const l of n)l.name!==".gitkeep"&&(s.push({node:l,depth:t}),l.kind==="directory"&&l.children.length>0&&e.has(l.path)&&s.push(...dr(l.children,e,t+1)));return s}function Wo(n){return n.split(`
1
+ import{c as $,C as de,n as Ze,d as We,K as X,m as ie,aY as wn,r as S,ap as zs,l as ce,j as r,U as Cs,i as $s,B as J,aL as jn,t as ue,w as Ps,L as Es,e as Ds,b as kn,u as Sn,E as Pt}from"./index-CE7TkjyG.js";import{i as Ts}from"./ChevronRight-BAbSIZWa.js";import{s as Nn}from"./Eye-DhciTGVf.js";import{n as Ve,i as xt}from"./Globe01-JgRJtDEz.js";import{b as Fs,c as Ms,e as Is,i as Ls,f as zn,a as Cn,g as Os,d as Rs}from"./ZoomOut-wDE4coHY.js";import{a as dt}from"./Palette-Dar-noWs.js";import{s as As}from"./Plus-Camwbw1d.js";import{i as _s}from"./SearchLg-DDE1zCNT.js";import{t as Us}from"./Stars01-C87Wsk_I.js";import{i as ut}from"./Upload01-JrETTl5i.js";import{s as $n}from"./XClose-BuEHz_d5.js";import{i as _t}from"./Zap-UKuaG6N1.js";import{u as Pn}from"./use-mobile-CFxA0PHq.js";import{f as Bs,a as Hs,b as qs,c as Ks,d as Ws,e as Gs,A as Vs,g as Xs}from"./alert-dialog-PKvHHkWf.js";import{D as En,a as Ue,d as Je,e as et,i as Dn,h as Qs,c as Ys}from"./dialog-lcdHX7cY.js";import{I as Xe}from"./input-BGbc3BVQ.js";import{S as ae}from"./skeleton-BfKJuYOV.js";import{F as ke,M as Ut,d as Tn}from"./file-type-icon-BUkMWarm.js";import{T as Zs}from"./toolbar-Fx0lxHE1.js";import{a as Js}from"./Package-ChuNwhD3.js";import{u as el}from"./use-debounced-value-ish1mNgi.js";import{i as Fn}from"./DotsVertical-B3ZVodMe.js";import{i as Mn}from"./Key01-PXvCNNbE.js";import{s as In}from"./Trash01-3XY_xXSE.js";import{D as Bt,a as Ht,c as qt,d as Fe}from"./dropdown-menu-DIrk9-FW.js";import{T as tl}from"./textarea-D0ihxnY4.js";import{t as nl}from"./ChevronDown-DV3VOrca.js";import{n as sl}from"./ChevronUp-UVpR6smr.js";import{i as ft}from"./X-paMMdb5Z.js";import{P as ll,b as rl,a as il}from"./popover-C_0DaLYQ.js";import{b as be,T as ye,a as ve}from"./tooltip-BtXdwbhw.js";import{i as ol}from"./Check-CQ5Ksqqd.js";import{a as al}from"./Copy01-DvCXbiGV.js";import{n as Ln}from"./LinkExternal01-BzN6xrhy.js";import{l as cl,F as dl}from"./index-C7raI9JQ.js";import{i as ul}from"./LayoutLeft-BbocTaWd.js";function On(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const l=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${l?`?${l}`:""}`}async function fe(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let l="";try{l=(await s.json()).error??""}catch{}throw new Error(l||`HTTP ${s.status}`)}function Kt(n,e){const t=$.c(11),{org:s}=de();let l;t[0]!==s.id||t[1]!==e||t[2]!==n?(l=X.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=l):l=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await fe(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(fl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==l||t[9]!==i?(o={queryKey:l,placeholderData:wn,queryFn:i},t[8]=l,t[9]=i,t[10]=o):o=t[10],ie(o)}function fl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function Rn(n,e,t){const s=$.c(15),{org:l}=de();let i;s[0]!==l.id||s[1]!==e||s[2]!==n?(i=X.orgFsStat(l.id,n??"",e),s[0]=l.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==l.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fe(pe(l.slug,n??"","stat",{path:e}),void 0,{allow404:!0});return f.status===404?null:(await f.json()).entry},s[6]=l.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function hl(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=X.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let l;e[3]!==t.slug||e[4]!==n?(l=async()=>await(await fe(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==s||e[7]!==l?(i={queryKey:s,queryFn:l},e[6]=s,e[7]=l,e[8]=i):i=e[8],ie(i)}function ml(n,e){const t=$.c(9),s=n===void 0?60:n,{org:l}=de();let i;t[0]!==l.id?(i=X.orgFsRecent(l.id),t[0]=l.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==l.slug?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=l.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function pl(n,e){const t=$.c(11),s=50,{org:l}=de();let i;t[0]!==l.id||t[1]!==n?(i=X.orgFsSearch(l.id,n),t[0]=l.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==l.slug||t[5]!==n?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=l.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:wn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Do(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=X.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const l=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await fe(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(xl)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==l||e[6]!==i?(o={queryKey:s,enabled:l,queryFn:i},e[4]=s,e[5]=l,e[6]=i,e[7]=o):o=e[7],ie(o)}function xl(n){return{volume:n.volume,path:n.path}}async function To(n){const e=await fe(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function gl(n,e,t){return(await fe(pe(n,e,"read",{path:t}))).text()}const bl=new Set(["md","mdx","markdown","txt","text"]),yl=25,vl=64*1024,wl=256*1024,jl=4;function kl(n){const e=n.lastIndexOf(".");return e===-1?!1:bl.has(n.slice(e+1).toLowerCase())}async function Fo(n,e,t){const s=t?`${t}/`:"",l=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await fe(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<jl&&a.push({path:m.path,depth:u.depth+1});continue}kl(m.path)&&m.size<=vl&&i.length<yl?i.push(m.path):o.push(l(m.path))}}const c=await Promise.all(i.map(u=>gl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>wl){o.push(l(u));return}f+=m.length,d.push({relPath:l(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function An(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=X.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await fe(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let l;return n[4]!==t||n[5]!==s?(l={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=l):l=n[6],ie(l)}function Sl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=l=>pe(t.slug,n,"read",{path:l}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function tt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,l)=>pe(e.slug,s,"read",{path:l}),n[0]=e.slug,n[1]=t):t=n[1],t}function _n(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async l=>(await(await fe(pe(t.slug,n,"file",{path:l.path}),{method:"PUT",headers:{"content-type":l.contentType??"text/html; charset=utf-8"},body:l.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function Nl(n){const e=$.c(18),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==n?(l=async d=>(await(await fe(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=l):l=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=X.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:X.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==l||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:l,onMutate:i,onError:o,onSettled:a},e[13]=l,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function Lt(n){const e=$.c(26),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==s||e[2]!==n?(l=()=>{s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=l):l=e[3];const i=l;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await fe(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await fe(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await fe(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const gt=S.createContext(null);gt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Wt=10,Te=S.useLayoutEffect,tn=zs.useId,zl=typeof tn=="function"?tn:()=>null;let Cl=0;function Gt(n=null){const e=zl(),t=S.useRef(n||e||null);return t.current===null&&(t.current=""+Cl++),n??t.current}function Un({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:l,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=S.useContext(gt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:C,isPanelCollapsed:k,reevaluatePanelConstraints:w,registerPanel:B,resizePanel:R,unregisterPanel:_}=b,v=Gt(o),M=S.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:l,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});S.useRef({didLogMissingDefaultSizeWarning:!1}),Te(()=>{const{callbacks:U,constraints:O}=M.current,H={...O};M.current.id=v,M.current.idIsFromProps=o!==void 0,M.current.order=h,U.onCollapse=d,U.onExpand=f,U.onResize=u,O.collapsedSize=t,O.collapsible=s,O.defaultSize=l,O.maxSize=a,O.minSize=c,(H.collapsedSize!==O.collapsedSize||H.collapsible!==O.collapsible||H.maxSize!==O.maxSize||H.minSize!==O.minSize)&&w(M.current,H)}),Te(()=>{const U=M.current;return B(U),()=>{_(U)}},[h,v,B,_]),S.useImperativeHandle(i,()=>({collapse:()=>{x(M.current)},expand:U=>{y(M.current,U)},getId(){return v},getSize(){return j(M.current)},isCollapsed(){return k(M.current)},isExpanded(){return!k(M.current)},resize:U=>{R(M.current,U)}}),[x,y,j,k,v,R]);const Z=N(M.current,l);return S.createElement(p,{...g,children:n,className:e,id:v,style:{...Z,...m},[se.groupId]:C,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+Z.flexGrow).toFixed(1)})}const Bn=S.forwardRef((n,e)=>S.createElement(Un,{...n,forwardedRef:e}));Un.displayName="Panel";Bn.displayName="forwardRef(Panel)";let Ot=null,ct=-1,ze=null;function $l(n,e){if(e){const t=(e&Gn)!==0,s=(e&Vn)!==0,l=(e&Xn)!==0,i=(e&Qn)!==0;if(t)return l?"se-resize":i?"ne-resize":"e-resize";if(s)return l?"sw-resize":i?"nw-resize":"w-resize";if(l)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Pl(){ze!==null&&(document.head.removeChild(ze),Ot=null,ze=null,ct=-1)}function Et(n,e){var t,s;const l=$l(n,e);if(Ot!==l){if(Ot=l,ze===null&&(ze=document.createElement("style"),document.head.appendChild(ze)),ct>=0){var i;(i=ze.sheet)===null||i===void 0||i.removeRule(ct)}ct=(t=(s=ze.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${l} !important;}`))!==null&&t!==void 0?t:-1}}function Hn(n){return n.type==="keydown"}function qn(n){return n.type.startsWith("pointer")}function Kn(n){return n.type.startsWith("mouse")}function bt(n){if(qn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Kn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function El(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Dl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function Tl(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:ln(n),b:ln(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;G(s,"Stacking order can only be calculated for elements with a common ancestor");const l={a:sn(nn(t.a)),b:sn(nn(t.b))};if(l.a===l.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(l.a-l.b)}const Fl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Ml(n){var e;const t=getComputedStyle((e=Wn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Il(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Ml(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Fl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function nn(n){let e=n.length;for(;e--;){const t=n[e];if(G(t,"Missing node"),Il(t))return t}return null}function sn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function ln(n){const e=[];for(;n;)e.push(n),n=Wn(n);return e}function Wn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Gn=1,Vn=2,Xn=4,Qn=8,Ll=El()==="coarse";let xe=[],_e=!1,De=new Map,yt=new Map;const Qe=new Set;function Ol(n,e,t,s,l){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:l},c=(i=De.get(o))!==null&&i!==void 0?i:0;return De.set(o,c+1),Qe.add(a),ht(),function(){var f;yt.delete(n),Qe.delete(a);const u=(f=De.get(o))!==null&&f!==void 0?f:1;if(De.set(o,u-1),ht(),u===1&&De.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Xt(),l("up",!0,null)}}}function Rl(n){const{target:e}=n,{x:t,y:s}=bt(n);_e=!0,Vt({target:e,x:t,y:s}),ht(),xe.length>0&&(mt("down",n),n.preventDefault(),Yn(e)||n.stopImmediatePropagation())}function Dt(n){const{x:e,y:t}=bt(n);if(_e&&n.buttons===0&&(_e=!1,mt("up",n)),!_e){const{target:s}=n;Vt({target:s,x:e,y:t})}mt("move",n),Xt(),xe.length>0&&n.preventDefault()}function Tt(n){const{target:e}=n,{x:t,y:s}=bt(n);yt.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Yn(e)||n.stopImmediatePropagation()),mt("up",n),Vt({target:e,x:t,y:s}),Xt(),ht()}function Yn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Vt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(l=>{const{element:i,hitAreaMargins:o}=l,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ll?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&Tl(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Dl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(l)}})}function Ft(n,e){yt.set(n,e)}function Xt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:l}=s;l==="horizontal"?n=!0:e=!0});let t=0;yt.forEach(s=>{t|=s}),n&&e?Et("intersection",t):n?Et("horizontal",t):e?Et("vertical",t):Pl()}let Mt=new AbortController;function ht(){Mt.abort(),Mt=new AbortController;const n={capture:!0,signal:Mt.signal};Qe.size&&(_e?(xe.length>0&&De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",Tt,n),s.addEventListener("pointerleave",Dt,n),s.addEventListener("pointermove",Dt,n))}),window.addEventListener("pointerup",Tt,n),window.addEventListener("pointercancel",Tt,n)):De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Rl,n),s.addEventListener("pointermove",Dt,n))}))}function mt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,l=xe.includes(t);s(n,l,e)})}function Al(){const[n,e]=S.useState(0);return S.useCallback(()=>e(t=>t+1),[])}function G(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Wt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function we(n,e,t=Wt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function _l(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const l=n[s],i=e[s];if(!me(l,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];G(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:l=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(l+a)/2;Me(t,c)<0?t=l:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Wt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:l,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;G(a!=null,"Invalid first pivot index"),G(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];G(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];G(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];G(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];G(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(_l(l,o))return l;{const u=n<0?c:a,h=e[u];G(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];G(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:l}function Ul({layout:n,panelsArray:e,pivotIndices:t}){let s=0,l=100,i=0,o=0;const a=t[0];G(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,l=p):(i+=g,o+=p)});const c=Math.min(l,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Zn(n,e,t=document){const l=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return l??null}function Jn(n,e,t){const s=Zn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function es(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function vt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function Bl(n,e,t,s=document){var l,i,o,a;const c=vt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(l=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&l!==void 0?l:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Hl({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:l,panelGroupElement:i,setLayout:o}){S.useRef({didWarnAboutMissingResizeHandle:!1}),Te(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<l.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Ul({layout:s,panelsArray:l,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=l[c];G(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,l,i]),S.useEffect(()=>{if(!i)return;const a=e.current;G(a,"Eager values not found");const{panelDataArray:c}=a,d=es(t,i);G(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);G(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);G(m,"Resize handle element has no handle id attribute");const[p,g]=Bl(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];G(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:C=0,collapsible:k,minSize:w=0}=j.constraints;if(N!=null&&k){const B=He({delta:me(N,C)?w-C:C-N,initialLayout:s,panelConstraints:c.map(R=>R.constraints),pivotIndices:Jn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==B&&o(B)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,l,o])}function rn(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function ts(n,e){const t=n==="horizontal",{x:s,y:l}=bt(e);return t?s:l}function ql(n,e,t,s,l){const i=t==="horizontal",o=vt(e,l);G(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);G(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=ts(t,n),f=es(a,l);G(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Kl(n,e,t,s,l,i){if(Hn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:l!=null?a=l:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:ql(n,e,t,s,i)}function Wl({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,l=100;for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,l-=a)}for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=l/c;s++,e[i]=d,l-=d}return e}function Ie(n,e,t){e.forEach((s,l)=>{const i=n[l];G(i,`Panel data not found for index ${l}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||we(u,d))&&!we(s,d)&&m(),h&&(u==null||!we(u,d))&&we(s,d)&&h())}})}function at(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Gl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:l,precision:i=3}){const o=t[l];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vl(n,e=10){let t=null;return(...l)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...l)},e)}}function on(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ns(n){return`react-resizable-panels:${n}`}function ss(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:l,order:i}=e;return l?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ls(n,e){try{const t=ns(n),s=e.getItem(t);if(s){const l=JSON.parse(s);if(typeof l=="object"&&l!=null)return l}}catch{}return null}function Xl(n,e,t){var s,l;const i=(s=ls(n,t))!==null&&s!==void 0?s:{},o=ss(e);return(l=i[o])!==null&&l!==void 0?l:null}function Ql(n,e,t,s,l){var i;const o=ns(n),a=ss(e),c=(i=ls(n,l))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{l.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function an({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let l=0;for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(l+=o-a,t[i]=a)}if(!me(l,0))for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=o+l,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(l-=c-o,t[i]=c,me(l,0)))break}return t}const Yl=100,qe={getItem:n=>(on(qe),qe.getItem(n)),setItem:(n,e)=>{on(qe),qe.setItem(n,e)}},cn={};function rs({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:l,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Gt(i),m=S.useRef(null),[p,g]=S.useState(null),[b,x]=S.useState([]),y=Al(),j=S.useRef({}),N=S.useRef(new Map),C=S.useRef(0),k=S.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=S.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});S.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),S.useImperativeHandle(l,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:z}=w.current;return z},setLayout:z=>{const{onLayout:F}=k.current,{layout:I,panelDataArray:L}=w.current,D=an({layout:z,panelConstraints:L.map(A=>A.constraints)});rn(I,D)||(x(D),w.current.layout=D,F&&F(D),Ie(L,D,j.current))}}),[]),Te(()=>{k.current.autoSaveId=n,k.current.direction=s,k.current.dragState=p,k.current.id=h,k.current.onLayout=o,k.current.storage=c}),Hl({committedValuesRef:k,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),S.useEffect(()=>{const{panelDataArray:z}=w.current;if(n){if(b.length===0||b.length!==z.length)return;let F=cn[n];F==null&&(F=Vl(Ql,Yl),cn[n]=F);const I=[...z],L=new Map(N.current);F(n,I,L,b,c)}},[n,b,c]),S.useEffect(()=>{});const B=S.useCallback(z=>{const{onLayout:F}=k.current,{layout:I,panelDataArray:L}=w.current;if(z.constraints.collapsible){const D=L.map(he=>he.constraints),{collapsedSize:A=0,panelSize:Q,pivotIndices:te}=Ee(L,z,I);if(G(Q!=null,`Panel size not found for panel "${z.id}"`),!we(Q,A)){N.current.set(z.id,Q);const P=Oe(L,z)===L.length-1?Q-A:A-Q,V=He({delta:P,initialLayout:I,panelConstraints:D,pivotIndices:te,prevLayout:I,trigger:"imperative-api"});at(I,V)||(x(V),w.current.layout=V,F&&F(V),Ie(L,V,j.current))}}},[]),R=S.useCallback((z,F)=>{const{onLayout:I}=k.current,{layout:L,panelDataArray:D}=w.current;if(z.constraints.collapsible){const A=D.map(ne=>ne.constraints),{collapsedSize:Q=0,panelSize:te=0,minSize:he=0,pivotIndices:P}=Ee(D,z,L),V=F??he;if(we(te,Q)){const ne=N.current.get(z.id),ge=ne!=null&&ne>=V?ne:V,$e=Oe(D,z)===D.length-1?te-ge:ge-te,oe=He({delta:$e,initialLayout:L,panelConstraints:A,pivotIndices:P,prevLayout:L,trigger:"imperative-api"});at(L,oe)||(x(oe),w.current.layout=oe,I&&I(oe),Ie(D,oe,j.current))}}},[]),_=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{panelSize:L}=Ee(I,z,F);return G(L!=null,`Panel size not found for panel "${z.id}"`),L},[]),v=S.useCallback((z,F)=>{const{panelDataArray:I}=w.current,L=Oe(I,z);return Gl({defaultSize:F,dragState:p,layout:b,panelData:I,panelIndex:L})},[p,b]),M=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(I,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),D===!0&&we(A,L)},[]),Z=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(I,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),!D||Me(A,L)>0},[]),U=S.useCallback(z=>{const{panelDataArray:F}=w.current;F.push(z),F.sort((I,L)=>{const D=I.order,A=L.order;return D==null&&A==null?0:D==null?-1:A==null?1:D-A}),w.current.panelDataArrayChanged=!0,y()},[y]);Te(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:z,onLayout:F,storage:I}=k.current,{layout:L,panelDataArray:D}=w.current;let A=null;if(z){const te=Xl(z,D,I);te&&(N.current=new Map(Object.entries(te.expandToSizes)),A=te.layout)}A==null&&(A=Wl({panelDataArray:D}));const Q=an({layout:A,panelConstraints:D.map(te=>te.constraints)});rn(L,Q)||(x(Q),w.current.layout=Q,F&&F(Q),Ie(D,Q,j.current))}}),Te(()=>{const z=w.current;return()=>{z.layout=[]}},[]);const O=S.useCallback(z=>{let F=!1;const I=m.current;return I&&window.getComputedStyle(I,null).getPropertyValue("direction")==="rtl"&&(F=!0),function(D){D.preventDefault();const A=m.current;if(!A)return()=>null;const{direction:Q,dragState:te,id:he,keyboardResizeBy:P,onLayout:V}=k.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Se}=te??{},$e=Jn(he,z,A);let oe=Kl(D,z,Q,te,P,A);const rt=Q==="horizontal";rt&&F&&(oe=-oe);const Ct=ge.map($t=>$t.constraints),Pe=He({delta:oe,initialLayout:Se??ne,panelConstraints:Ct,pivotIndices:$e,prevLayout:ne,trigger:Hn(D)?"keyboard":"mouse-or-touch"}),it=!at(ne,Pe);(qn(D)||Kn(D))&&C.current!=oe&&(C.current=oe,!it&&oe!==0?rt?Ft(z,oe<0?Gn:Vn):Ft(z,oe<0?Xn:Qn):Ft(z,0)),it&&(x(Pe),w.current.layout=Pe,V&&V(Pe),Ie(ge,Pe,j.current))}},[]),H=S.useCallback((z,F)=>{const{onLayout:I}=k.current,{layout:L,panelDataArray:D}=w.current,A=D.map(ne=>ne.constraints),{panelSize:Q,pivotIndices:te}=Ee(D,z,L);G(Q!=null,`Panel size not found for panel "${z.id}"`);const P=Oe(D,z)===D.length-1?Q-F:F-Q,V=He({delta:P,initialLayout:L,panelConstraints:A,pivotIndices:te,prevLayout:L,trigger:"imperative-api"});at(L,V)||(x(V),w.current.layout=V,I&&I(V),Ie(D,V,j.current))},[]),W=S.useCallback((z,F)=>{const{layout:I,panelDataArray:L}=w.current,{collapsedSize:D=0,collapsible:A}=F,{collapsedSize:Q=0,collapsible:te,maxSize:he=100,minSize:P=0}=z.constraints,{panelSize:V}=Ee(L,z,I);V!=null&&(A&&te&&we(V,D)?we(D,Q)||H(z,Q):V<P?H(z,P):V>he&&H(z,he))},[H]),q=S.useCallback((z,F)=>{const{direction:I}=k.current,{layout:L}=w.current;if(!m.current)return;const D=vt(z,m.current);G(D,`Drag handle element not found for id "${z}"`);const A=ts(I,F);g({dragHandleId:z,dragHandleRect:D.getBoundingClientRect(),initialCursorPosition:A,initialLayout:L})},[]),ee=S.useCallback(()=>{g(null)},[]),Y=S.useCallback(z=>{const{panelDataArray:F}=w.current,I=Oe(F,z);I>=0&&(F.splice(I,1),delete j.current[z.id],w.current.panelDataArrayChanged=!0,y())},[y]),T=S.useMemo(()=>({collapsePanel:B,direction:s,dragState:p,expandPanel:R,getPanelSize:_,getPanelStyle:v,groupId:h,isPanelCollapsed:M,isPanelExpanded:Z,reevaluatePanelConstraints:W,registerPanel:U,registerResizeHandle:O,resizePanel:H,startDragging:q,stopDragging:ee,unregisterPanel:Y,panelGroupElement:m.current}),[B,p,s,R,_,v,h,M,Z,W,U,O,H,q,ee,Y]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return S.createElement(gt.Provider,{value:T},S.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const is=S.forwardRef((n,e)=>S.createElement(rs,{...n,forwardedRef:e}));rs.displayName="PanelGroup";is.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Ee(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Zl({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){S.useEffect(()=>{if(n||t==null||s==null)return;const l=vt(e,s);if(l==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=l.getAttribute(se.groupId);G(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Zn(a,e,s);G(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}},[s,n,e,t])}function os({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:l,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=S.useRef(null),y=S.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});S.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=S.useContext(gt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:C,registerResizeHandle:k,startDragging:w,stopDragging:B,panelGroupElement:R}=j,_=Gt(l),[v,M]=S.useState("inactive"),[Z,U]=S.useState(!1),[O,H]=S.useState(null),W=S.useRef({state:v});Te(()=>{W.current.state=v}),S.useEffect(()=>{if(t)H(null);else{const T=k(_);H(()=>T)}},[t,_,k]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;S.useEffect(()=>{if(t||O==null)return;const T=x.current;G(T,"Element ref not attached");let K=!1;return Ol(_,T,N,{coarse:q,fine:ee},(F,I,L)=>{if(!I){M("inactive");return}switch(F){case"down":{M("drag"),K=!1,G(L,'Expected event to be defined for "down" action'),w(_,L);const{onDragging:D,onPointerDown:A}=y.current;D?.(!0),A?.();break}case"move":{const{state:D}=W.current;K=!0,D!=="drag"&&M("hover"),G(L,'Expected event to be defined for "move" action'),O(L);break}case"up":{M("hover"),B();const{onClick:D,onDragging:A,onPointerUp:Q}=y.current;A?.(!1),Q?.(),K||D?.();break}}})},[q,N,t,ee,k,_,O,w,B]),Zl({disabled:t,handleId:_,resizeHandler:O,panelGroupElement:R});const Y={touchAction:"none",userSelect:"none"};return S.createElement(m,{...p,children:n,className:e,id:l,onBlur:()=>{U(!1),i?.()},onFocus:()=>{U(!0),c?.()},ref:x,role:"separator",style:{...Y,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:C,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":Z?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:_,[se.resizeHandleState]:v})}os.displayName="PanelResizeHandle";function Jl(n){const e=$.c(10);let t,s,l;e[0]!==n?({className:t,ref:l,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==l||e[8]!==i?(o=r.jsx(is,{ref:l,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=l,e[8]=i,e[9]=o):o=e[9],o}function dn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=r.jsx(Bn,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function er(n){const e=$.c(12);let t,s,l;e[0]!==n?({withHandle:l,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);let i;e[4]!==t?(i=ce("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==l?(o=l&&r.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:r.jsx(Fs,{className:"size-2.5"})}),e[6]=l,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=r.jsx(os,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function tr(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function nr(n){if(tr(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function sr(n){try{return decodeURIComponent(n)}catch{return n}}function lr(n){return nr(n),encodeURIComponent(n)}function rr(n){return`.deco/blocks/${lr(n)}.json`}function Mo(n){return`/${rr(n)}`}const Io=1e4,ir=3;function Rt(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function wt(n){return n.startsWith("/")?n.slice(1):n}function Lo(n){const e=wt(n);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}function pt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function or(n){const e=pt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Oo(n,e){const t=e.replace(/^\/+|\/+$/g,"");return pt(t?`${n==="/"?"":n}/${t}`:n)}function Ro(n,e){return e==="directory"?n:or(n)}function Ao(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ar(n){const e=wt(n);return e?e.split("/").filter(Boolean).length:0}function _o(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Uo(n,e){return ar(n)>=ir&&!e.has(n)}function Bo(n,e,t=[]){const s=wt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const l=`${s}/`;return e.some(i=>i.startsWith(l))||t.some(i=>i.startsWith(l))}function Ho(n){const e=wt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return sr(s)}function cr(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function qo(n){const e=Rt(n).split("/").filter(Boolean),t=["/"];let s="";for(const l of e.slice(0,-1))s+=`/${l}`,t.push(s);return t}function Ko(n,e=[]){const t={children:[]},s=i=>{const a=Rt(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Rt(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(pt(i));const l=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&l(o.children)};return l(t.children),t.children}function dr(n,e,t=0){const s=[];for(const l of n)l.name!==".gitkeep"&&(s.push({node:l,depth:t}),l.kind==="directory"&&l.children.length>0&&e.has(l.path)&&s.push(...dr(l.children,e,t+1)));return s}function Wo(n){return n.split(`
2
2
  `).map(e=>{const t=e.match(/^\d+\t(.*)/);return t?t[1]:e}).join(`
3
3
  `)}cl.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function ur(n){const e=$.c(11),{value:t,filename:s}=n,[l]=Cs(),i=l.theme==="dark"||l.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==s?(o=cr(s),e[0]=s,e[1]=o):o=e[1];const a=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsx($s,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let d,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={enabled:!1},f={top:12,bottom:12},e[3]=d,e[4]=f):(d=e[3],f=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:d,padding:f,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let h;return e[6]!==s||e[7]!==o||e[8]!==a||e[9]!==t?(h=r.jsx(dl,{path:s,language:o,value:t,theme:a,loading:c,options:u},s),e[6]=s,e[7]=o,e[8]=a,e[9]=t,e[10]=h):h=e[10],h}function as(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const fr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),hr=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),un=2*1024*1024;function mr(n,e){const t=n.split(".").pop()?.toLowerCase()??"";return fr.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=un?"markdown":"download":hr.has(t)&&e<=un?"text":"download"}function cs(){const n=$.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(ae,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let t;return n[1]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx(ae,{className:"h-3 w-full"}),r.jsx(ae,{className:"h-3 w-5/6"}),r.jsx(ae,{className:"h-3 w-2/3"})]})]})}),n[1]=t):t=n[1],t}function ds(n){const e=$.c(20),{file:t,note:s}=n;let l;e[0]!==t.filename?(l=r.jsx(ke,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=l):l=e[1];let i;e[2]!==t.filename?(i=r.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=i):i=e[3];let o;e[4]!==t.size?(o=as(t.size),e[4]=t.size,e[5]=o):o=e[5];const a=s?` · ${s}`:"";let c;e[6]!==o||e[7]!==a?(c=r.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,a]}),e[6]=o,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=r.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,c]}),e[9]=i,e[10]=c,e[11]=d):d=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx(Ve,{size:14}),e[12]=f):f=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=r.jsx(J,{asChild:!0,variant:"outline",size:"sm",children:r.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[f,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=u):u=e[15];let h;return e[16]!==l||e[17]!==d||e[18]!==u?(h=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[l,d,u]})}),e[16]=l,e[17]=d,e[18]=u,e[19]=h):h=e[19],h}function fn(n){const e=$.c(16),{file:t,markdown:s}=n;let l;e[0]!==t.downloadUrl?(l=X.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=l):l=e[1];let i;e[2]!==t.downloadUrl?(i=async()=>{const u=await fetch(t.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=t.downloadUrl,e[3]=i):i=e[3];let o;e[4]!==l||e[5]!==i?(o={queryKey:l,queryFn:i,staleTime:6e4,retry:!1},e[4]=l,e[5]=i,e[6]=o):o=e[6];const{data:a,isPending:c,isError:d}=ie(o);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx(cs,{}),e[7]=u):u=e[7],u}if(d||a===void 0){let u;return e[8]!==t?(u=r.jsx(ds,{file:t,note:"preview unavailable"}),e[8]=t,e[9]=u):u=e[9],u}if(s){const u=`file-preview-${t.key}`;let h;return e[10]!==a||e[11]!==u?(h=r.jsx("div",{className:"h-full overflow-y-auto",children:r.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:r.jsx(Ut,{id:u,text:a})})}),e[10]=a,e[11]=u,e[12]=h):h=e[12],h}let f;return e[13]!==a||e[14]!==t.filename?(f=r.jsx(ur,{value:a,filename:t.filename}),e[13]=a,e[14]=t.filename,e[15]=f):f=e[15],f}function us(n){const e=$.c(15),{file:t}=n;switch(mr(t.filename,t.size)){case"image":{let l;return e[0]!==t.downloadUrl||e[1]!==t.filename?(l=r.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:r.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=l):l=e[2],l}case"pdf":{let l;return e[3]!==t.downloadUrl||e[4]!==t.filename?(l=r.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=l):l=e[5],l}case"html":{let l;return e[6]!==t.downloadUrl||e[7]!==t.filename?(l=r.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=l):l=e[8],l}case"markdown":{let l;return e[9]!==t?(l=r.jsx(fn,{file:t,markdown:!0}),e[9]=t,e[10]=l):l=e[10],l}case"text":{let l;return e[11]!==t?(l=r.jsx(fn,{file:t,markdown:!1}),e[11]=t,e[12]=l):l=e[12],l}default:{let l;return e[13]!==t?(l=r.jsx(ds,{file:t}),e[13]=t,e[14]=l):l=e[14],l}}}function pr(n){const e=$.c(40),{readUrl:t,editor:s,downloadName:l,trailing:i}=n;let o;e[0]!==t?(o=new URL(t,window.location.origin).toString(),e[0]=t,e[1]=o):o=e[1];const a=o;let c;e[2]!==s?(c=s.deckDetected&&r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.jsx(J,{variant:s.railOpen?"secondary":"ghost",size:"icon","aria-label":s.railOpen?"Hide slide list":"Show slide list",onClick:()=>s.setRailOpen(!s.railOpen),children:r.jsx(ul,{size:14})})}),r.jsx(ve,{side:"bottom",children:s.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==a?(d=()=>window.open(a,"_blank","noopener"),e[4]=a,e[5]=d):d=e[5];let f;e[6]!==a?(f=r.jsx("span",{className:"truncate",children:a}),e[6]=a,e[7]=f):f=e[7];let u;e[8]!==a||e[9]!==d||e[10]!==f?(u=r.jsx("button",{type:"button",onClick:d,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:a,children:f}),e[8]=a,e[9]=d,e[10]=f,e[11]=u):u=e[11];let h;e[12]!==s.agentUpdated||e[13]!==s.reload?(h=s.agentUpdated&&r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.jsxs(J,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:s.reload,children:[r.jsx(jn,{size:12}),"Agent updated — reload"]})}),r.jsx(ve,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=s.agentUpdated,e[13]=s.reload,e[14]=h):h=e[14];let m;e[15]!==s.saving?(m=s.saving&&r.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=s.saving,e[16]=m):m=e[16];let p;e[17]!==s?(p=s.deckDetected&&s.writable&&r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.jsx(J,{variant:s.editMode?"secondary":"ghost",size:"icon","aria-label":s.editMode?"Done editing":"Edit inline",className:ce(s.editMode&&"text-primary"),onClick:()=>s.setEditMode(!s.editMode),children:r.jsx(Ms,{size:14})})}),r.jsx(ve,{side:"bottom",children:s.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=s,e[18]=p):p=e[18];let g;e[19]!==a||e[20]!==l||e[21]!==s.deckDetected?(g=s.deckDetected?r.jsxs(Bt,{children:[r.jsx(Ht,{asChild:!0,children:r.jsx(J,{variant:"ghost",size:"icon","aria-label":"Download",children:r.jsx(Ve,{size:14})})}),r.jsxs(qt,{align:"end",children:[r.jsxs(Fe,{onClick:()=>window.open(`${a}#print`,"_blank","noopener"),children:[r.jsx(Is,{size:14}),"Export as PDF"]}),r.jsx(Fe,{asChild:!0,children:r.jsxs("a",{href:a,download:l,children:[r.jsx(Ls,{size:14}),"Download HTML"]})})]})]}):r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.jsx(J,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:r.jsx("a",{href:a,download:l,children:r.jsx(Ve,{size:14})})})}),r.jsx(ve,{side:"bottom",children:"Download"})]}),e[19]=a,e[20]=l,e[21]=s.deckDetected,e[22]=g):g=e[22];let b;e[23]!==a?(b=()=>window.open(a,"_blank","noopener"),e[23]=a,e[24]=b):b=e[24];let x;e[25]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Ln,{size:14}),e[25]=x):x=e[25];let y;e[26]!==b?(y=r.jsx(ye,{asChild:!0,children:r.jsx(J,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:b,children:x})}),e[26]=b,e[27]=y):y=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=r.jsx(ve,{side:"bottom",children:"Open in new tab"}),e[28]=j):j=e[28];let N;e[29]!==y?(N=r.jsxs(be,{children:[y,j]}),e[29]=y,e[30]=N):N=e[30];let C;return e[31]!==N||e[32]!==c||e[33]!==u||e[34]!==h||e[35]!==m||e[36]!==p||e[37]!==g||e[38]!==i?(C=r.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[c,u,h,m,p,g,N,i]}),e[31]=N,e[32]=c,e[33]=u,e[34]=h,e[35]=m,e[36]=p,e[37]=g,e[38]=i,e[39]=C):C=e[39],C}const Re=1;function xr(n){if(typeof n!="object"||n===null||n.v!==Re||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class Ne extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function fs(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function gr(n){const t=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return t?fs(t).length:null}function br(n,e){const t=new DOMParser().parseFromString(n,"text/html"),s=t.querySelector("deck-viewer");if(!s)throw new Ne("no <deck-viewer> element in source","no-viewer");const l=fs(s),i=e.kind==="move"?e.from:e.at,o=l[i];if(!o)throw new Ne(`slide index ${i} out of range (${l.length})`,"stale-index");switch(e.kind){case"remove":{if(l.length<=1)throw new Ne("cannot remove the last slide","bad-op");o.remove();break}case"duplicate":{const c=o.cloneNode(!0);c.removeAttribute("id");for(const d of c.querySelectorAll("[id]"))d.removeAttribute("id");o.after(c);break}case"move":{if(e.to<0||e.to>=l.length)throw new Ne(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?l[e.to]:l[e.to].nextSibling;s.insertBefore(o,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new Ne(`invalid attribute name: ${e.name}`,"bad-op");o.setAttribute(e.name,e.value);break}case"remove-attr":{o.removeAttribute(e.name);break}case"replace":{const d=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!d)throw new Ne("replace html has no root element","bad-op");o.replaceWith(t.importNode(d,!0));break}default:throw new Ne(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
4
4
  `:""}${t.documentElement.outerHTML}
@@ -1,4 +1,4 @@
1
- import{c as re,r as q,b as yt,C as He,j as t,B as Z,t as Ie,l as de,K as ut,m as wt,x as ls,u as rs,p as ft,E as as}from"./index-CMeG3as8.js";import{S as os}from"./search-input-EgXEbQA1.js";import{P as Le}from"./index-DuUPGiTX.js";import{E as St}from"./empty-state-o8dL4wJH.js";import{R as ns}from"./require-capability-DuEmuJvS.js";import{N as Tt,A as is,Q as cs,U as Mt,V as it,W as Pt,X as pt,Y as ds,Z as Dt,_ as Ut,L as ms,$ as us}from"./automation-runs-CAy4mtpJ.js";import{u as vt}from"./use-connection-BrI1TBEQ.js";import{g as Vt}from"./connection-slug-eyAPH6o3.js";import{B as qe}from"./badge-BoE_V31h.js";import{b as tt,P as st,a as lt}from"./popover--mJkHxOT.js";import{b as ct,T as dt,a as mt}from"./tooltip-CMn8vzMZ.js";import{i as ht}from"./Check-BOwgvBwV.js";import{a as ot}from"./Copy01-D6imwHCp.js";import{n as Lt}from"./Globe01-D9CW1i2c.js";import{i as It}from"./FilterLines-DmTf932h.js";import{i as xs}from"./Key01-BiqNsFdR.js";import{i as fs}from"./Play-CU2S2iq8.js";import{ao as ps,U as hs}from"./agent-icon-BLe-UGTx.js";import{M as Ft}from"./monaco-editor-BZEWoT7y.js";import{u as gs}from"./use-members-DAIIfDp3.js";import{u as js}from"./use-mcp-client-DU_JKY2l.js";import{u as vs}from"./use-virtual-mcp-DQ65ZJFx.js";import{S as Ns,W as bs}from"./constants-D_FQAPnt.js";import{n as rt}from"./Tool02-CIxJuIWf.js";import{c as ys}from"./SwitchHorizontal01-4JRraXCr.js";import{s as ws}from"./Plus-Eoohz80p.js";import{s as Ss}from"./Trash01-DTZ71BUV.js";import{I as Ge}from"./input-Qgr2BwiS.js";import{M as We}from"./multi-select-CifByV_F.js";import{a as Xe,b as Ye,c as Ze,d as ge,S as et}from"./select-CSPlnvxS.js";import{t as Kt}from"./ChevronDown-Hh6g_Saw.js";import{s as Is}from"./Stars02-S5El_1lG.js";import{C as Cs}from"./calendar-C3lzzzZu.js";import{b as ks}from"./UserPlus01-ByuYu5Qf.js";import{T as _s}from"./textarea-CwyPlfj5.js";import{C as qt}from"./collection-tabs-C8PqzYbz.js";import{S as Ts}from"./switch-CD2avflt.js";import{L as Ms}from"./label-Bu1iOGjN.js";import{I as Be}from"./integration-icon-Sc6SH3LG.js";import{A as Bt}from"./avatar-C2_XCNRZ.js";import{A as Ds,a as Ls,b as Fs}from"./alert-CnxHfUSy.js";import{C as Ht}from"./card-BJwTAHaX.js";import{K as Me}from"./monitoring-stats-row-vxekjAao.js";import{u as Jt}from"./studio-tools-SjfSv7OF.js";import{u as $s}from"./useSuspenseInfiniteQuery-DyqwlOoo.js";import{o as Rs,m as Os,p as zs,q as As}from"./sidebar-BWpR4Yre.js";import{T as $e,a as xt,b as Qt,c as Gt,d as Wt,e as oe}from"./table-DHymLHzQ.js";import{n as Es}from"./ChevronUp-D7Z_my0f.js";import{u as Ps}from"./use-infinite-scroll-BB8PSiEZ.js";import{c as Us,b as Vs}from"./use-automations-wID_RCtg.js";import"./SearchMd-e7fb2o-9.js";import"./use-capability-IX4fs_Qe.js";import"./access-gate-Da49EDYp.js";import"./capability-load-error-HM0EMxih.js";import"./useInfiniteQuery-D4RCyZFv.js";import"./use-clock-tick-DqH2q2vk.js";import"./AlertCircle-B1Kbjcis.js";import"./CheckCircle-CjINSa7W.js";import"./Circle-Ch6miGgW.js";import"./XCircle-DyCV8MUc.js";import"./Stars01-CskH5zEn.js";import"./ChevronRight-Dgwih5i7.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BGrpMr3q.js";import"./file-type-icon-_GMz1Jen.js";import"./dialog-CYzlrXFj.js";import"./X-Cb9LKHA1.js";import"./ZoomOut-DpzGJ1T5.js";import"./use-mobile-KBqahjtY.js";import"./tab-id-BijBBRwE.js";import"./hooks-KcRS2DPh.js";import"./decopilot-sse-pool-CjKw050K.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-C3Mo28RT.js";import"./autosend-Q-LO0I7R.js";import"./use-ai-providers-C0o7E_Hb.js";import"./use-decopilot-events-D1hHuB3T.js";import"./use-organization-settings-Dy_KanGd.js";import"./index-BPDQizac.js";import"./Eye-D-_PJSgt.js";import"./Star01-om-NxchY.js";import"./XClose-7KJjg9yA.js";import"./ZapSquare-BIpEsBa3.js";import"./Tool01-DP0AQo3O.js";import"./Monitor01-Cetrg_i-.js";import"./Upload01-BX76VXQc.js";import"./shell-layout-BMBOJURx.js";import"./Users03-BnKHP2m_.js";import"./SearchLg-BUcf6k1H.js";import"./Zap-BlmNb1XN.js";import"./alert-dialog-CXiQmJbb.js";import"./required-auth-layout-DZ1W8VZD.js";import"./use-org-sso-CRIS5N7t.js";import"./LinkExternal01-CJtXioga.js";import"./ArrowUpRight-D5im6jTV.js";import"./Palette-D6cir_25.js";import"./use-navigate-to-agent-D50MdHbN.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-D1dvmVZi.js";import"./form-C6wDEIAY.js";import"./use-collections-DkO94IRd.js";import"./ArrowUp-D8t9vk3-.js";import"./Settings02-DvUEoYTy.js";import"./TrendUp01-MKWjclVc.js";import"./DotsVertical-zQUs6pcc.js";import"./Flag01-BEOEBYPb.js";import"./Globe04-B3J0CyN5.js";import"./HardDrive-DsxtmuNw.js";import"./LayoutLeft-cruDqPt8.js";import"./List-k0IQ0xqt.js";import"./Sun-JuSKVx_6.js";import"./Package-DLfVyiPP.js";import"./Shield01-BZKA065Y.js";import"./User01-DJj4N5cu.js";import"./Users01-CWwuOk6A.js";import"./index-BshGz_gf.js";import"./use-org-auth-client-DOJH8LoJ.js";import"./auth-DNgjTpiO.js";import"./checkbox-DydFjocD.js";import"./command-gwaZfGZa.js";import"./index-DzXGggG1.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Re(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),r=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${r}`}).join(",")}function Ks(s){return s?s.split(",").map(e=>{const[l,r,...o]=e.split(":");return{key:decodeURIComponent(l||""),operator:r||"eq",value:decodeURIComponent(o.join(":")||"")}}):[]}function nt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{c as re,r as q,b as yt,C as He,j as t,B as Z,t as Ie,l as de,K as ut,m as wt,x as ls,u as rs,p as ft,E as as}from"./index-CE7TkjyG.js";import{S as os}from"./search-input-DUaPQZfD.js";import{P as Le}from"./index-CvDtkAgp.js";import{E as St}from"./empty-state-Ch08nwHQ.js";import{R as ns}from"./require-capability-CrAaiEdf.js";import{N as Tt,A as is,Q as cs,U as Mt,V as it,W as Pt,X as pt,Y as ds,Z as Dt,_ as Ut,L as ms,$ as us}from"./automation-runs-D-Abjafx.js";import{u as vt}from"./use-connection-ElgRfHB7.js";import{g as Vt}from"./connection-slug-eyAPH6o3.js";import{B as qe}from"./badge-DzhfW366.js";import{b as tt,P as st,a as lt}from"./popover-C_0DaLYQ.js";import{b as ct,T as dt,a as mt}from"./tooltip-BtXdwbhw.js";import{i as ht}from"./Check-CQ5Ksqqd.js";import{a as ot}from"./Copy01-DvCXbiGV.js";import{n as Lt}from"./Globe01-JgRJtDEz.js";import{i as It}from"./FilterLines-Bmzeh30w.js";import{i as xs}from"./Key01-PXvCNNbE.js";import{i as fs}from"./Play-DerJbp91.js";import{ao as ps,U as hs}from"./agent-icon-D5qmtbZK.js";import{M as Ft}from"./monaco-editor-BH0nmNrU.js";import{u as gs}from"./use-members-cyvFb5Cp.js";import{u as js}from"./use-mcp-client-BORR1RZ6.js";import{u as vs}from"./use-virtual-mcp-u5RFr3-U.js";import{S as Ns,W as bs}from"./constants-D_FQAPnt.js";import{n as rt}from"./Tool02-DGl8u9_k.js";import{c as ys}from"./SwitchHorizontal01-T5ynYfn6.js";import{s as ws}from"./Plus-Camwbw1d.js";import{s as Ss}from"./Trash01-3XY_xXSE.js";import{I as Ge}from"./input-BGbc3BVQ.js";import{M as We}from"./multi-select-ZYMnY8vt.js";import{a as Xe,b as Ye,c as Ze,d as ge,S as et}from"./select-D4V93mGS.js";import{t as Kt}from"./ChevronDown-DV3VOrca.js";import{s as Is}from"./Stars02-B1t9cEEf.js";import{C as Cs}from"./calendar-ampUP54R.js";import{b as ks}from"./UserPlus01-XN1LddJg.js";import{T as _s}from"./textarea-D0ihxnY4.js";import{C as qt}from"./collection-tabs-PbqOrGAE.js";import{S as Ts}from"./switch-CozUcV-K.js";import{L as Ms}from"./label-DNVLsgc9.js";import{I as Be}from"./integration-icon-Cb-n4Kz0.js";import{A as Bt}from"./avatar-vgk8ddd6.js";import{A as Ds,a as Ls,b as Fs}from"./alert-Bmy2khv7.js";import{C as Ht}from"./card-W8XIR-ze.js";import{K as Me}from"./monitoring-stats-row-k3klM6hZ.js";import{u as Jt}from"./studio-tools-D76v3LII.js";import{u as $s}from"./useSuspenseInfiniteQuery-C3Ytl8eC.js";import{o as Rs,m as Os,p as zs,q as As}from"./sidebar-BVuvo8Kk.js";import{T as $e,a as xt,b as Qt,c as Gt,d as Wt,e as oe}from"./table-BRwHxC0X.js";import{n as Es}from"./ChevronUp-UVpR6smr.js";import{u as Ps}from"./use-infinite-scroll-i5r6I1JZ.js";import{c as Us,b as Vs}from"./use-automations-B2xJrLQ5.js";import"./SearchMd-BxxGolk7.js";import"./use-capability-v-uf1YrX.js";import"./access-gate-CbjYOmme.js";import"./capability-load-error-gFwJ57zP.js";import"./useInfiniteQuery-BqSTdaV8.js";import"./use-clock-tick-DHClLQ5S.js";import"./AlertCircle-CL7ZQ2W9.js";import"./CheckCircle-C5K6ki9e.js";import"./Circle-DPR1QSAh.js";import"./XCircle-C8XU4NrH.js";import"./Stars01-C87Wsk_I.js";import"./ChevronRight-BAbSIZWa.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CcLXgiWQ.js";import"./file-type-icon-BUkMWarm.js";import"./dialog-lcdHX7cY.js";import"./X-paMMdb5Z.js";import"./ZoomOut-wDE4coHY.js";import"./use-mobile-CFxA0PHq.js";import"./tab-id-BijBBRwE.js";import"./hooks-DYQM4PBO.js";import"./decopilot-sse-pool-Bzl2fSRU.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-BwmwTbu3.js";import"./autosend-C8GYW4cS.js";import"./use-ai-providers-D6ck7LsQ.js";import"./use-decopilot-events-BUZnLnOV.js";import"./use-organization-settings-ivTDzBK5.js";import"./index-B6pycsEI.js";import"./Eye-DhciTGVf.js";import"./Star01-DmhYiPGf.js";import"./XClose-BuEHz_d5.js";import"./ZapSquare-CWUUBjW1.js";import"./Tool01-Cr-RKODu.js";import"./Monitor01-CDiOO9Qw.js";import"./Upload01-JrETTl5i.js";import"./shell-layout-Cx_FvRXF.js";import"./Users03-B6zcWNzF.js";import"./SearchLg-DDE1zCNT.js";import"./Zap-UKuaG6N1.js";import"./alert-dialog-PKvHHkWf.js";import"./required-auth-layout-f35eH-Ld.js";import"./use-org-sso-B0JpIzdV.js";import"./LinkExternal01-BzN6xrhy.js";import"./ArrowUpRight-C21rtwXR.js";import"./Palette-Dar-noWs.js";import"./use-navigate-to-agent-Bye37Ci1.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-B9u6HVJf.js";import"./form-DbOiThsI.js";import"./use-collections-DSY8ih13.js";import"./ArrowUp-DPSWctlS.js";import"./Settings02-ByDWZ9hN.js";import"./TrendUp01-DoGaa5uF.js";import"./DotsVertical-B3ZVodMe.js";import"./Flag01-CaL_NCGr.js";import"./Globe04-CtHMdSMK.js";import"./HardDrive-DR0yaBkW.js";import"./LayoutLeft-BbocTaWd.js";import"./List-Ivs4Rydc.js";import"./Sun-dNlKp2vM.js";import"./Package-ChuNwhD3.js";import"./Shield01-NLvH_aG7.js";import"./User01-BcskXIW4.js";import"./Users01-kBdwWyyN.js";import"./index-C7raI9JQ.js";import"./use-org-auth-client-CNpE2UX7.js";import"./auth-CnRo_5bE.js";import"./checkbox-FCg5QBhQ.js";import"./command-CyCHKPNt.js";import"./index-BSSBmE1y.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Re(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),r=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${r}`}).join(",")}function Ks(s){return s?s.split(",").map(e=>{const[l,r,...o]=e.split(":");return{key:decodeURIComponent(l||""),operator:r||"eq",value:decodeURIComponent(o.join(":")||"")}}):[]}function nt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function $t(s){return s.trim()?s.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...r]=e.split("=");return{key:l||"",operator:"eq",value:r.join("=")}}if(e.includes("~")){const[l,...r]=e.split("~");return{key:l||"",operator:"contains",value:r.join("~")}}if(e.includes("@")){const[l,...r]=e.split("@");return{key:l||"",operator:"in",value:r.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function qs(s){const e={},l={},r=[],o={};for(const a of s)if(a.key.trim())switch(a.operator){case"eq":a.value&&(e[a.key]=a.value);break;case"contains":a.value&&(l[a.key]=`%${a.value}%`);break;case"exists":r.push(a.key);break;case"in":a.value&&(o[a.key]=a.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:r.length>0?r:void 0,propertyInValues:Object.keys(o).length>0?o:void 0}}function Rt(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof s._decocms_truncated=="string")return{content:s._decocms_truncated,isTruncated:!0,originalSize:s._decocms_truncated.length};const e=JSON.stringify(s,null,2),l=e.length;return l<=Nt.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:l}:{content:e.slice(0,Nt.maxJsonRenderSize)+`
4
4
 
@@ -1 +1 @@
1
- import{c as h,C as x,a as S,u as j,r as C,j as u,Y as I,N as _}from"./index-CMeG3as8.js";import{a as R}from"./constants-D_FQAPnt.js";import{a as b}from"./hooks-KcRS2DPh.js";import{f as k}from"./reusable-new-chat-CouMjkYR.js";import"./use-mcp-client-DU_JKY2l.js";import"./auth-DNgjTpiO.js";import"./decopilot-sse-pool-CjKw050K.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";function L(){const t=h.c(12),{org:o}=x(),r=R(o.id).id,{data:p}=S.useSession(),{threads:d,status:f}=b();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const{connect:l,siteUrl:c}=j(a),[g]=C.useState(y);if(f.kind==="loading"){let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=u.jsx(I,{}),t[1]=n):n=t[1],n}const m=k(d,r,p?.user?.id)?.id??g;let e;t[2]!==o.slug||t[3]!==m?(e={org:o.slug,taskId:m},t[2]=o.slug,t[3]=m,t[4]=e):e=t[4];let s;t[5]!==l||t[6]!==r||t[7]!==c?(s={virtualmcpid:r,connect:l,siteUrl:c},t[5]=l,t[6]=r,t[7]=c,t[8]=s):s=t[8];let i;return t[9]!==e||t[10]!==s?(i=u.jsx(_,{to:"/$org/$taskId",params:e,search:s,replace:!0}),t[9]=e,t[10]=s,t[11]=i):i=t[11],i}function y(){return crypto.randomUUID()}export{L as default};
1
+ import{c as h,C as x,a as S,u as j,r as C,j as u,Y as I,N as _}from"./index-CE7TkjyG.js";import{a as R}from"./constants-D_FQAPnt.js";import{a as b}from"./hooks-DYQM4PBO.js";import{f as k}from"./reusable-new-chat-CouMjkYR.js";import"./use-mcp-client-BORR1RZ6.js";import"./auth-CnRo_5bE.js";import"./decopilot-sse-pool-Bzl2fSRU.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";function L(){const t=h.c(12),{org:o}=x(),r=R(o.id).id,{data:p}=S.useSession(),{threads:d,status:f}=b();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const{connect:l,siteUrl:c}=j(a),[g]=C.useState(y);if(f.kind==="loading"){let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=u.jsx(I,{}),t[1]=n):n=t[1],n}const m=k(d,r,p?.user?.id)?.id??g;let e;t[2]!==o.slug||t[3]!==m?(e={org:o.slug,taskId:m},t[2]=o.slug,t[3]=m,t[4]=e):e=t[4];let s;t[5]!==l||t[6]!==r||t[7]!==c?(s={virtualmcpid:r,connect:l,siteUrl:c},t[5]=l,t[6]=r,t[7]=c,t[8]=s):s=t[8];let i;return t[9]!==e||t[10]!==s?(i=u.jsx(_,{to:"/$org/$taskId",params:e,search:s,replace:!0}),t[9]=e,t[10]=s,t[11]=i):i=t[11],i}function y(){return crypto.randomUUID()}export{L as default};
@@ -1 +1 @@
1
- import{r as h}from"./index-CMeG3as8.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-CE7TkjyG.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 +1 @@
1
- import{c as g,e as p,j as s,i as u,N as a}from"./index-CMeG3as8.js";import{a as x}from"./use-capability-IX4fs_Qe.js";import{C as j}from"./capability-load-error-HM0EMxih.js";function v(){const t=g.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:c,error:f}=x();if(c){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:s.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[1]=e):e=t[1],e}if(f){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{v as default};
1
+ import{c as g,e as p,j as s,i as u,N as a}from"./index-CE7TkjyG.js";import{a as x}from"./use-capability-v-uf1YrX.js";import{C as j}from"./capability-load-error-gFwJ57zP.js";function v(){const t=g.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:c,error:f}=x();if(c){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:s.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[1]=e):e=t[1],e}if(f){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{v as default};
@@ -1 +1 @@
1
- import{r as s,aT as L,aR as B,j as d,b9 as T,aO as x,aS as E,b7 as U,aU as C,b8 as _,ba as q,aQ as w,bI as K,bH as V}from"./index-CMeG3as8.js";var I="Radio",[H,P]=w(I),[z,Q]=H(I),k=s.forwardRef((a,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:t,value:l="on",onCheck:f,form:R,...v}=a,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(z,{scope:o,checked:e,disabled:t,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":t?"":void 0,disabled:t,value:l,...v,ref:i,onClick:C(a.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(G,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:t,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var S="RadioIndicator",g=s.forwardRef((a,c)=>{const{__scopeRadio:o,forceMount:n,...e}=a,r=Q(S,o);return d.jsx(q,{present:n||r.checked,children:d.jsx(x.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});g.displayName=S;var W="RadioBubbleInput",G=s.forwardRef(({__scopeRadio:a,control:c,checked:o,bubbles:n=!0,...e},r)=>{const t=s.useRef(null),l=E(t,r),f=K(o),R=V(c);return s.useEffect(()=>{const v=t.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});G.displayName=W;function A(a){return a?"checked":"unchecked"}var X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[Y]=w(y,[_,P]),j=_(),N=P(),[J,Z]=Y(y),D=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:t=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=a,i=j(o),u=L(R),[b,h]=B({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(J,{scope:o,name:n,required:t,disabled:l,value:b,onValueChange:h,children:d.jsx(T,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":t,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",O=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=a,r=Z(M,o),t=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{X.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(U,{asChild:!0,...l,focusable:!t,active:p,children:d.jsx(k,{disabled:t,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,...n}=a,e=N(o);return d.jsx(g,{...e,...n,ref:c})});F.displayName=$;var oe=D,re=O,ae=F;export{re as I,oe as R,ae as a};
1
+ import{r as s,aT as L,aR as B,j as d,b9 as T,aO as x,aS as E,b7 as U,aU as C,b8 as _,ba as q,aQ as w,bI as K,bH as V}from"./index-CE7TkjyG.js";var I="Radio",[H,P]=w(I),[z,Q]=H(I),k=s.forwardRef((a,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:t,value:l="on",onCheck:f,form:R,...v}=a,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(z,{scope:o,checked:e,disabled:t,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":t?"":void 0,disabled:t,value:l,...v,ref:i,onClick:C(a.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(G,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:t,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var S="RadioIndicator",g=s.forwardRef((a,c)=>{const{__scopeRadio:o,forceMount:n,...e}=a,r=Q(S,o);return d.jsx(q,{present:n||r.checked,children:d.jsx(x.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});g.displayName=S;var W="RadioBubbleInput",G=s.forwardRef(({__scopeRadio:a,control:c,checked:o,bubbles:n=!0,...e},r)=>{const t=s.useRef(null),l=E(t,r),f=K(o),R=V(c);return s.useEffect(()=>{const v=t.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});G.displayName=W;function A(a){return a?"checked":"unchecked"}var X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[Y]=w(y,[_,P]),j=_(),N=P(),[J,Z]=Y(y),D=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:t=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=a,i=j(o),u=L(R),[b,h]=B({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(J,{scope:o,name:n,required:t,disabled:l,value:b,onValueChange:h,children:d.jsx(T,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":t,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",O=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=a,r=Z(M,o),t=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{X.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(U,{asChild:!0,...l,focusable:!t,active:p,children:d.jsx(k,{disabled:t,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,...n}=a,e=N(o);return d.jsx(g,{...e,...n,ref:c})});F.displayName=$;var oe=D,re=O,ae=F;export{re as I,oe as R,ae as a};
@@ -1 +1 @@
1
- import{c as s,l as a,j as d}from"./index-CMeG3as8.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
1
+ import{c as s,l as a,j as d}from"./index-CE7TkjyG.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
@@ -1 +1 @@
1
- import{c as k,j as h,r as C,l as L}from"./index-CMeG3as8.js";import{n as Z}from"./Tool02-CIxJuIWf.js";import{A as y}from"./agent-icon-BLe-UGTx.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
1
+ import{c as k,j as h,r as C,l as L}from"./index-CE7TkjyG.js";import{n as Z}from"./Tool02-DGl8u9_k.js";import{A as y}from"./agent-icon-D5qmtbZK.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
@@ -1,3 +1,3 @@
1
- import{I as M,r as N,C as R,n as L,a as V,M as B,d as K,p,t as c,K as j,j as s,B as C}from"./index-CMeG3as8.js";import{e as O,b as q,d as z,D as Q,a as k,c as H}from"./dialog-CYzlrXFj.js";import{a as U,F as b,b as v,c as Y,d as w,f as S}from"./form-C6wDEIAY.js";import{S as G,a as J,b as W,c as X,d as Z}from"./select-CSPlnvxS.js";import{T as _}from"./textarea-CwyPlfj5.js";import{u as ee}from"./use-org-auth-client-DOJH8LoJ.js";import{u as se}from"./use-organization-roles-DJO3Vgzc.js";const te=M().email("Invalid email address");function ne(r){if(!r.trim())return[];const m=r.split(/[,;\n]/).map(a=>a.trim().toLowerCase()).filter(a=>a.length>0);return Array.from(new Set(m))}function de({trigger:r}){const[m,a]=N.useState(!1),{locator:g}=R(),E=ee(),x=L(),{data:F}=V.useSession(),f=F?.user?.email,{roles:P,isLoading:y}=se(),T=P.filter(t=>t.role!=="owner"),i=B({mode:"onChange",defaultValues:{emailsText:"",role:"user"}}),$=i.watch("emailsText"),I=i.watch("role"),l=ne($).filter(t=>{const e=te.safeParse(t).success,n=!f||t!==f.toLowerCase();return e&&n}),o=K({mutationFn:async({emails:t,role:e})=>{if(!e)throw new Error("Please select a role");const n=await Promise.allSettled(t.map(async d=>{const h=await E.organization.inviteMember({email:d,role:e});if(h.error)throw new Error(h.error.message);return h.data})),u=n.filter(d=>d.status==="rejected");if(u.length>0)throw new Error(`Failed to invite ${u.length} member${u.length>1?"s":""}`);return n},onSuccess:(t,{emails:e,role:n})=>{p("member_invited",{count:e.length,role:n}),x.invalidateQueries({queryKey:j.members(g)}),x.invalidateQueries({queryKey:j.invitations(g)}),c.success(e.length===1?"Member invited successfully!":`${e.length} members invited successfully!`),i.reset({emailsText:"",role:"user"}),a(!1)},onError:(t,{emails:e,role:n})=>{p("member_invite_failed",{count:e.length,role:n,error:t instanceof Error?t.message:String(t)}),c.error(t instanceof Error?t.message:"Failed to invite members")}}),A=t=>{if(l.length===0){c.error("Please enter at least one valid email address");return}if(!t.role){c.error("Please select a role");return}o.mutate({emails:l,role:t.role})},D=l.length>0&&!!I;return s.jsxs(O,{open:m,onOpenChange:a,children:[s.jsx(q,{asChild:!0,children:r}),s.jsxs(z,{className:"sm:max-w-lg",children:[s.jsx(Q,{children:s.jsx(k,{children:"Invite members"})}),s.jsx(U,{...i,children:s.jsxs("form",{onSubmit:i.handleSubmit(A),className:"space-y-4",children:[s.jsx(b,{control:i.control,name:"emailsText",render:({field:t})=>s.jsxs(v,{children:[s.jsx(Y,{children:"Email addresses"}),s.jsx(w,{children:s.jsx(_,{...t,disabled:o.isPending,placeholder:`Enter email addresses separated by commas or new lines
1
+ import{I as M,r as N,C as R,n as L,a as V,M as B,d as K,p,t as c,K as j,j as s,B as C}from"./index-CE7TkjyG.js";import{e as O,b as q,d as z,D as Q,a as k,c as H}from"./dialog-lcdHX7cY.js";import{a as U,F as b,b as v,c as Y,d as w,f as S}from"./form-DbOiThsI.js";import{S as G,a as J,b as W,c as X,d as Z}from"./select-D4V93mGS.js";import{T as _}from"./textarea-D0ihxnY4.js";import{u as ee}from"./use-org-auth-client-CNpE2UX7.js";import{u as se}from"./use-organization-roles-Di1vYrHv.js";const te=M().email("Invalid email address");function ne(r){if(!r.trim())return[];const m=r.split(/[,;\n]/).map(a=>a.trim().toLowerCase()).filter(a=>a.length>0);return Array.from(new Set(m))}function de({trigger:r}){const[m,a]=N.useState(!1),{locator:g}=R(),E=ee(),x=L(),{data:F}=V.useSession(),f=F?.user?.email,{roles:P,isLoading:y}=se(),T=P.filter(t=>t.role!=="owner"),i=B({mode:"onChange",defaultValues:{emailsText:"",role:"user"}}),$=i.watch("emailsText"),I=i.watch("role"),l=ne($).filter(t=>{const e=te.safeParse(t).success,n=!f||t!==f.toLowerCase();return e&&n}),o=K({mutationFn:async({emails:t,role:e})=>{if(!e)throw new Error("Please select a role");const n=await Promise.allSettled(t.map(async d=>{const h=await E.organization.inviteMember({email:d,role:e});if(h.error)throw new Error(h.error.message);return h.data})),u=n.filter(d=>d.status==="rejected");if(u.length>0)throw new Error(`Failed to invite ${u.length} member${u.length>1?"s":""}`);return n},onSuccess:(t,{emails:e,role:n})=>{p("member_invited",{count:e.length,role:n}),x.invalidateQueries({queryKey:j.members(g)}),x.invalidateQueries({queryKey:j.invitations(g)}),c.success(e.length===1?"Member invited successfully!":`${e.length} members invited successfully!`),i.reset({emailsText:"",role:"user"}),a(!1)},onError:(t,{emails:e,role:n})=>{p("member_invite_failed",{count:e.length,role:n,error:t instanceof Error?t.message:String(t)}),c.error(t instanceof Error?t.message:"Failed to invite members")}}),A=t=>{if(l.length===0){c.error("Please enter at least one valid email address");return}if(!t.role){c.error("Please select a role");return}o.mutate({emails:l,role:t.role})},D=l.length>0&&!!I;return s.jsxs(O,{open:m,onOpenChange:a,children:[s.jsx(q,{asChild:!0,children:r}),s.jsxs(z,{className:"sm:max-w-lg",children:[s.jsx(Q,{children:s.jsx(k,{children:"Invite members"})}),s.jsx(U,{...i,children:s.jsxs("form",{onSubmit:i.handleSubmit(A),className:"space-y-4",children:[s.jsx(b,{control:i.control,name:"emailsText",render:({field:t})=>s.jsxs(v,{children:[s.jsx(Y,{children:"Email addresses"}),s.jsx(w,{children:s.jsx(_,{...t,disabled:o.isPending,placeholder:`Enter email addresses separated by commas or new lines
2
2
  e.g. user1@example.com, user2@example.com
3
3
  or one per line`,className:"min-h-[120px] resize-none"})}),s.jsx(S,{})]})}),s.jsx(b,{control:i.control,name:"role",render:({field:t})=>s.jsxs(v,{children:[s.jsx(w,{children:s.jsxs(G,{value:t.value,onValueChange:t.onChange,disabled:o.isPending||y,children:[s.jsx(J,{className:"w-full",children:s.jsx(W,{placeholder:"Select a role"})}),s.jsx(X,{children:T.map(e=>{const n=[];return e.isBuiltin||(e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),(e.connectionCount!==0||e.allowsAllConnections)&&(e.allowsAllTools?n.push("all tools"):e.toolCount&&e.toolCount>0&&n.push(`${e.toolCount} tool${e.toolCount!==1?"s":""}`))),s.jsx(Z,{value:e.role,children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:e.label}),!e.isBuiltin&&n.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:n.join(", ")})]})},e.role)})})]})}),s.jsx(S,{})]})}),s.jsxs(H,{children:[s.jsx(C,{variant:"outline",onClick:()=>{i.reset({emailsText:"",role:"user"}),a(!1)},type:"button",disabled:o.isPending,children:"Cancel"}),s.jsx(C,{type:"submit",disabled:o.isPending||!D,children:o.isPending?"Inviting...":`Invite ${l.length||0} Member${l.length!==1?"s":""}`})]})]})})]})]})}export{de as I};
@@ -1 +1 @@
1
- import{c as n,l as r,j as i,bG as p}from"./index-CMeG3as8.js";function c(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{c as L};
1
+ import{c as n,l as r,j as i,bG as p}from"./index-CE7TkjyG.js";function c(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{c as L};
@@ -1 +1 @@
1
- import{c as d,j as t,i as u,B as h,L as f,k as x,O as p,l as b}from"./index-CMeG3as8.js";import{u as j}from"./useRouterState-Ci8kAe0w.js";import{R as _}from"./required-auth-layout-DZ1W8VZD.js";import{u as y}from"./use-deployment-admin-B2ULKOY4.js";const g=[{to:"/_admin/users",label:"Users"},{to:"/_admin/orgs",label:"Organizations"}];function v(){const e=d.c(5);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:N},e[0]=s):s=e[0];const a=j(s);let n;e[1]!==a?(n=g.map(r=>t.jsx(f,{to:r.to,className:b("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",a.startsWith(r.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r.label},r.to)),e[1]=a,e[2]=n):n=e[2];let o;return e[3]!==n?(o=t.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:n}),e[3]=n,e[4]=o):o=e[4],o}function N(e){return e.location.pathname}function S(){const e=d.c(7),{isAdmin:s,loading:a,needsEmailVerification:n}=y();if(a){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:t.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=i):i=e[0],i}if(!s){const i=n?"Verify your email address to access the admin dashboard.":"This dashboard is restricted to deployment admins.";let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(h,{variant:"outline",size:"sm",asChild:!0,children:t.jsx(f,{to:"/",children:"Go home"})}),e[1]=m):m=e[1];let c;return e[2]!==i?(c=t.jsx(x,{area:"the admin dashboard",description:i,action:m}),e[2]=i,e[3]=c):c=e[3],c}let o,r;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:t.jsx("h1",{className:"pb-4 text-xl font-medium",children:"Admin Dashboard"})}),r=t.jsx(v,{}),e[4]=o,e[5]=r):(o=e[4],r=e[5]);let l;return e[6]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"flex h-dvh flex-col overflow-hidden bg-background",children:[o,r,t.jsx("div",{className:"flex-1 overflow-hidden",children:t.jsx(p,{})})]}),e[6]=l):l=e[6],l}function z(){const e=d.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(_,{children:t.jsx(S,{})}),e[0]=s):s=e[0],s}export{z as default};
1
+ import{c as d,j as t,i as u,B as h,L as f,k as x,O as p,l as b}from"./index-CE7TkjyG.js";import{u as j}from"./useRouterState-CCp0yZfm.js";import{R as _}from"./required-auth-layout-f35eH-Ld.js";import{u as y}from"./use-deployment-admin-B8ZI_lgc.js";const g=[{to:"/_admin/users",label:"Users"},{to:"/_admin/orgs",label:"Organizations"}];function v(){const e=d.c(5);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:N},e[0]=s):s=e[0];const a=j(s);let n;e[1]!==a?(n=g.map(r=>t.jsx(f,{to:r.to,className:b("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",a.startsWith(r.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r.label},r.to)),e[1]=a,e[2]=n):n=e[2];let o;return e[3]!==n?(o=t.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:n}),e[3]=n,e[4]=o):o=e[4],o}function N(e){return e.location.pathname}function S(){const e=d.c(7),{isAdmin:s,loading:a,needsEmailVerification:n}=y();if(a){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:t.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=i):i=e[0],i}if(!s){const i=n?"Verify your email address to access the admin dashboard.":"This dashboard is restricted to deployment admins.";let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(h,{variant:"outline",size:"sm",asChild:!0,children:t.jsx(f,{to:"/",children:"Go home"})}),e[1]=m):m=e[1];let c;return e[2]!==i?(c=t.jsx(x,{area:"the admin dashboard",description:i,action:m}),e[2]=i,e[3]=c):c=e[3],c}let o,r;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:t.jsx("h1",{className:"pb-4 text-xl font-medium",children:"Admin Dashboard"})}),r=t.jsx(v,{}),e[4]=o,e[5]=r):(o=e[4],r=e[5]);let l;return e[6]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"flex h-dvh flex-col overflow-hidden bg-background",children:[o,r,t.jsx("div",{className:"flex-1 overflow-hidden",children:t.jsx(p,{})})]}),e[6]=l):l=e[6],l}function z(){const e=d.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(_,{children:t.jsx(S,{})}),e[0]=s):s=e[0],s}export{z as default};
@@ -1 +1 @@
1
- import{a,u as f,j as o,S as g,N as p}from"./index-CMeG3as8.js";import{A as x}from"./auth-entry-DNbfyzp3.js";import{A as S}from"./auth-split-layout-hwgw_1qF.js";import"./input-Qgr2BwiS.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";function y(e){if(!e.client_id||e.response_type!=="code")return null;const t=new URLSearchParams;return e.client_id&&t.set("client_id",e.client_id),e.redirect_uri&&t.set("redirect_uri",e.redirect_uri),e.response_type&&t.set("response_type",e.response_type),e.state&&t.set("state",e.state),e.scope&&t.set("scope",e.scope),e.code_challenge&&t.set("code_challenge",e.code_challenge),e.code_challenge_method&&t.set("code_challenge_method",e.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function N(){const e=a.useSession(),t=f({from:"/login"}),{next:i="/",client_id:r,redirect_uri:s,response_type:l,state:h,scope:u,code_challenge:d,code_challenge_method:_}=t,n=i.startsWith("/")&&!i.startsWith("//")?i:"/",c=y({client_id:r,redirect_uri:s,response_type:l,state:h,scope:u,code_challenge:d,code_challenge_method:_});return e.data?c?(window.location.href=c,o.jsx(g,{})):o.jsx(p,{to:n}):o.jsx(S,{children:o.jsx(x,{callbackUrl:n,redirectUrl:c})})}export{N as default};
1
+ import{a,u as f,j as o,S as g,N as p}from"./index-CE7TkjyG.js";import{A as x}from"./auth-entry-DUqhHk8K.js";import{A as S}from"./auth-split-layout-Dg1dZa9r.js";import"./input-BGbc3BVQ.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";function y(e){if(!e.client_id||e.response_type!=="code")return null;const t=new URLSearchParams;return e.client_id&&t.set("client_id",e.client_id),e.redirect_uri&&t.set("redirect_uri",e.redirect_uri),e.response_type&&t.set("response_type",e.response_type),e.state&&t.set("state",e.state),e.scope&&t.set("scope",e.scope),e.code_challenge&&t.set("code_challenge",e.code_challenge),e.code_challenge_method&&t.set("code_challenge_method",e.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function N(){const e=a.useSession(),t=f({from:"/login"}),{next:i="/",client_id:r,redirect_uri:s,response_type:l,state:h,scope:u,code_challenge:d,code_challenge_method:_}=t,n=i.startsWith("/")&&!i.startsWith("//")?i:"/",c=y({client_id:r,redirect_uri:s,response_type:l,state:h,scope:u,code_challenge:d,code_challenge_method:_});return e.data?c?(window.location.href=c,o.jsx(g,{})):o.jsx(p,{to:n}):o.jsx(S,{children:o.jsx(x,{callbackUrl:n,redirectUrl:c})})}export{N as default};
@@ -1 +1 @@
1
- import{d as x,b as N,c as z,a as D}from"./auth-DNgjTpiO.js";function E(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(16)}function H(){return window.location.origin}function C(){try{const t=window.location.hostname;return t==="localhost"||t.endsWith(".localhost")||t==="127.0.0.1"||t==="::1"}catch{return!1}}const M=new Map,R="mcp:oauth:callback:";class W{serverUrl;_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(e){this.serverUrl=e.serverUrl,this._redirectUrl=e.callbackUrl??`${H()}/oauth/callback`,this._windowMode=e.windowMode??"popup";const n=e.scope?Array.isArray(e.scope)?e.scope.join(" "):e.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:e.clientName??"@decocms/mesh MCP client",...n&&{scope:n}},M.set(E(this.serverUrl),this)}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(e){this._clientInfo=e}tokens(){return this._tokens??void 0}saveTokens(e){this._tokens=e}redirectToAuthorization(e){if(this._windowMode==="tab"){if(!window.open(e.toString(),"_blank"))throw new Error("Tab was blocked")}else{const o=window.screenX+(window.outerWidth-600)/2,s=window.screenY+(window.outerHeight-700)/2;if(!window.open(e.toString(),"mcp-oauth",`width=600,height=700,left=${o},top=${s},popup=yes`)&&!window.open(e.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(e){this._codeVerifier=e}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}getServerUrl(){return this.serverUrl}cleanup(){M.delete(E(this.serverUrl))}}async function G(t){const e=t.meshUrl??window.location.origin,n=t.orgSlug?`/api/${encodeURIComponent(t.orgSlug)}/mcp/${t.connectionId}`:`/mcp/${t.connectionId}`,r=new URL(n,e),o=new W({serverUrl:r.href,clientName:t.clientName,clientUri:t.clientUri,callbackUrl:t.callbackUrl,scope:t.scope,windowMode:t.windowMode}),s={fn:null};try{const i=new Promise((l,d)=>{const k=t.timeout||12e4;let b,p=!1;const L=o.state(),A=`${R}${L}`,h=()=>{window.removeEventListener("message",v),window.removeEventListener("storage",O),clearTimeout(b);try{localStorage.removeItem(A)}catch{}};s.fn=u=>{p||(p=!0,h(),d(u))};const U=async u=>{if(p)return;if(p=!0,!u.success){h(),d(new Error(u.error||"OAuth authentication failed"));return}const{code:m,state:$}=u;if(!m){h(),d(new Error("Missing authorization code"));return}if(o.getStoredState()!==$){h(),d(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const T=(await x(r))?.authorization_servers?.[0]||r,S=await N(T),g=o.clientInformation();if(!g){h(),d(new Error("Client information not found"));return}const P=o.codeVerifier(),V=await z(T,{metadata:S,clientInformation:g,authorizationCode:m,codeVerifier:P,redirectUri:o.redirectUrl,resource:new URL(r)});h(),l({tokens:V,clientId:g.client_id??null,clientSecret:"client_secret"in g?g.client_secret:null,tokenEndpoint:S?.token_endpoint??null,userinfoEndpoint:S?.userinfo_endpoint??null})}catch(I){h(),d(I)}},v=async u=>{!C()&&u.origin!==window.location.origin||u.data?.type==="mcp:oauth:callback"&&await U(u.data)},O=async u=>{if(!(u.key!==A||!u.newValue))try{const m=JSON.parse(u.newValue);await U(m)}catch{}};window.addEventListener("message",v),window.addEventListener("storage",O),b=setTimeout(()=>{p||(p=!0,h(),d(new Error("OAuth authentication timeout")))},k)});if(i.catch(()=>{}),await D(o,{serverUrl:r})==="REDIRECT"){const l=await i,d=l.tokens;return{token:l.tokens.access_token,tokenInfo:{accessToken:l.tokens.access_token,refreshToken:l.tokens.refresh_token??null,expiresIn:l.tokens.expires_in??null,scope:l.tokens.scope??null,clientId:l.clientId,clientSecret:l.clientSecret,tokenEndpoint:l.tokenEndpoint,userinfoEndpoint:l.userinfoEndpoint,idToken:typeof d.id_token=="string"?d.id_token:null},error:null}}const a=o.tokens(),w=o.clientInformation(),f=a;return{token:a?.access_token||null,tokenInfo:a?{accessToken:a.access_token,refreshToken:a.refresh_token??null,expiresIn:a.expires_in??null,scope:a.scope??null,clientId:w?.client_id??null,clientSecret:w&&"client_secret"in w?w.client_secret:null,tokenEndpoint:null,userinfoEndpoint:null,idToken:f&&typeof f.id_token=="string"?f.id_token:null}:null,error:null}}catch(i){return s.fn&&s.fn(i instanceof Error?i:new Error(String(i))),{token:null,tokenInfo:null,error:i instanceof Error?i.message:String(i)}}finally{o.cleanup()}}function y(t,e){if(window.opener&&!window.opener.closed){const n=C()?"*":window.location.origin;return window.opener.postMessage(t,n),!0}if(e)try{const n=`${R}${e}`;return localStorage.setItem(n,JSON.stringify(t)),!0}catch{}return!1}async function X(){const t=new URLSearchParams(window.location.search),e=t.get("code");let n=t.get("state");const r=t.get("error"),o=t.get("error_description");let s=n;if(n)try{const c=atob(n),a=JSON.parse(c);a.clientState&&(s=a.clientState)}catch{}if(r){const c=o||r;return y({type:"mcp:oauth:callback",success:!1,error:c},s),{success:!1,error:c}}if(!e||!n){const c="Missing code or state parameter";return y({type:"mcp:oauth:callback",success:!1,error:c},s),{success:!1,error:c}}return n=s||n,y({type:"mcp:oauth:callback",success:!0,code:e,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function _(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function j(t){try{const e=_(),n=e?new URL(t,e):new URL(t),r=n.pathname.match(/^\/api\/[^/]+\/mcp\/([^/]+)/);return r?r[1]??null:n.pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}function J(t){try{const e=_();return(e?new URL(t,e):new URL(t)).pathname.match(/^\/api\/([^/]+)\/mcp\//)?.[1]??null}catch{return null}}async function K(t,e,n){try{const r=`/api/${encodeURIComponent(e)}/connections/${t}/oauth-token/status`,o=n?new URL(r,n).href:r,s=_(),i=!n||new URL(n).origin===s,c=await fetch(o,{credentials:i?"include":"omit"});return c.ok?{hasToken:(await c.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function q({url:t,token:e,orgId:n,meshUrl:r}){try{const o=new Headers;o.set("Content-Type","application/json"),o.set("Accept","application/json, text/event-stream");const s=await fetch(t,{method:"POST",headers:o,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/mesh MCP client",version:"1.0.0"}}})}),i=j(t),c=J(t),a=_(),w=r??(a?new URL(t,a).origin:new URL(t).origin);if(s.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(i&&c?await K(i,c,w):{hasToken:!1}).hasToken};let f;try{const k=await s.json();f=k.error||k.message}catch{}return s.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:f||`HTTP ${s.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!s.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:f||`HTTP ${s.status}`}}catch(o){return console.error("[isConnectionAuthenticated] Error:",o),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:o.message}}}export{G as a,X as h,q as i};
1
+ import{d as x,b as N,c as z,a as D}from"./auth-CnRo_5bE.js";function E(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(16)}function H(){return window.location.origin}function C(){try{const t=window.location.hostname;return t==="localhost"||t.endsWith(".localhost")||t==="127.0.0.1"||t==="::1"}catch{return!1}}const M=new Map,R="mcp:oauth:callback:";class W{serverUrl;_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(e){this.serverUrl=e.serverUrl,this._redirectUrl=e.callbackUrl??`${H()}/oauth/callback`,this._windowMode=e.windowMode??"popup";const n=e.scope?Array.isArray(e.scope)?e.scope.join(" "):e.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:e.clientName??"@decocms/mesh MCP client",...n&&{scope:n}},M.set(E(this.serverUrl),this)}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(e){this._clientInfo=e}tokens(){return this._tokens??void 0}saveTokens(e){this._tokens=e}redirectToAuthorization(e){if(this._windowMode==="tab"){if(!window.open(e.toString(),"_blank"))throw new Error("Tab was blocked")}else{const o=window.screenX+(window.outerWidth-600)/2,s=window.screenY+(window.outerHeight-700)/2;if(!window.open(e.toString(),"mcp-oauth",`width=600,height=700,left=${o},top=${s},popup=yes`)&&!window.open(e.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(e){this._codeVerifier=e}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}getServerUrl(){return this.serverUrl}cleanup(){M.delete(E(this.serverUrl))}}async function G(t){const e=t.meshUrl??window.location.origin,n=t.orgSlug?`/api/${encodeURIComponent(t.orgSlug)}/mcp/${t.connectionId}`:`/mcp/${t.connectionId}`,r=new URL(n,e),o=new W({serverUrl:r.href,clientName:t.clientName,clientUri:t.clientUri,callbackUrl:t.callbackUrl,scope:t.scope,windowMode:t.windowMode}),s={fn:null};try{const i=new Promise((l,d)=>{const k=t.timeout||12e4;let b,p=!1;const L=o.state(),A=`${R}${L}`,h=()=>{window.removeEventListener("message",v),window.removeEventListener("storage",O),clearTimeout(b);try{localStorage.removeItem(A)}catch{}};s.fn=u=>{p||(p=!0,h(),d(u))};const U=async u=>{if(p)return;if(p=!0,!u.success){h(),d(new Error(u.error||"OAuth authentication failed"));return}const{code:m,state:$}=u;if(!m){h(),d(new Error("Missing authorization code"));return}if(o.getStoredState()!==$){h(),d(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const T=(await x(r))?.authorization_servers?.[0]||r,S=await N(T),g=o.clientInformation();if(!g){h(),d(new Error("Client information not found"));return}const P=o.codeVerifier(),V=await z(T,{metadata:S,clientInformation:g,authorizationCode:m,codeVerifier:P,redirectUri:o.redirectUrl,resource:new URL(r)});h(),l({tokens:V,clientId:g.client_id??null,clientSecret:"client_secret"in g?g.client_secret:null,tokenEndpoint:S?.token_endpoint??null,userinfoEndpoint:S?.userinfo_endpoint??null})}catch(I){h(),d(I)}},v=async u=>{!C()&&u.origin!==window.location.origin||u.data?.type==="mcp:oauth:callback"&&await U(u.data)},O=async u=>{if(!(u.key!==A||!u.newValue))try{const m=JSON.parse(u.newValue);await U(m)}catch{}};window.addEventListener("message",v),window.addEventListener("storage",O),b=setTimeout(()=>{p||(p=!0,h(),d(new Error("OAuth authentication timeout")))},k)});if(i.catch(()=>{}),await D(o,{serverUrl:r})==="REDIRECT"){const l=await i,d=l.tokens;return{token:l.tokens.access_token,tokenInfo:{accessToken:l.tokens.access_token,refreshToken:l.tokens.refresh_token??null,expiresIn:l.tokens.expires_in??null,scope:l.tokens.scope??null,clientId:l.clientId,clientSecret:l.clientSecret,tokenEndpoint:l.tokenEndpoint,userinfoEndpoint:l.userinfoEndpoint,idToken:typeof d.id_token=="string"?d.id_token:null},error:null}}const a=o.tokens(),w=o.clientInformation(),f=a;return{token:a?.access_token||null,tokenInfo:a?{accessToken:a.access_token,refreshToken:a.refresh_token??null,expiresIn:a.expires_in??null,scope:a.scope??null,clientId:w?.client_id??null,clientSecret:w&&"client_secret"in w?w.client_secret:null,tokenEndpoint:null,userinfoEndpoint:null,idToken:f&&typeof f.id_token=="string"?f.id_token:null}:null,error:null}}catch(i){return s.fn&&s.fn(i instanceof Error?i:new Error(String(i))),{token:null,tokenInfo:null,error:i instanceof Error?i.message:String(i)}}finally{o.cleanup()}}function y(t,e){if(window.opener&&!window.opener.closed){const n=C()?"*":window.location.origin;return window.opener.postMessage(t,n),!0}if(e)try{const n=`${R}${e}`;return localStorage.setItem(n,JSON.stringify(t)),!0}catch{}return!1}async function X(){const t=new URLSearchParams(window.location.search),e=t.get("code");let n=t.get("state");const r=t.get("error"),o=t.get("error_description");let s=n;if(n)try{const c=atob(n),a=JSON.parse(c);a.clientState&&(s=a.clientState)}catch{}if(r){const c=o||r;return y({type:"mcp:oauth:callback",success:!1,error:c},s),{success:!1,error:c}}if(!e||!n){const c="Missing code or state parameter";return y({type:"mcp:oauth:callback",success:!1,error:c},s),{success:!1,error:c}}return n=s||n,y({type:"mcp:oauth:callback",success:!0,code:e,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function _(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function j(t){try{const e=_(),n=e?new URL(t,e):new URL(t),r=n.pathname.match(/^\/api\/[^/]+\/mcp\/([^/]+)/);return r?r[1]??null:n.pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}function J(t){try{const e=_();return(e?new URL(t,e):new URL(t)).pathname.match(/^\/api\/([^/]+)\/mcp\//)?.[1]??null}catch{return null}}async function K(t,e,n){try{const r=`/api/${encodeURIComponent(e)}/connections/${t}/oauth-token/status`,o=n?new URL(r,n).href:r,s=_(),i=!n||new URL(n).origin===s,c=await fetch(o,{credentials:i?"include":"omit"});return c.ok?{hasToken:(await c.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function q({url:t,token:e,orgId:n,meshUrl:r}){try{const o=new Headers;o.set("Content-Type","application/json"),o.set("Accept","application/json, text/event-stream");const s=await fetch(t,{method:"POST",headers:o,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/mesh MCP client",version:"1.0.0"}}})}),i=j(t),c=J(t),a=_(),w=r??(a?new URL(t,a).origin:new URL(t).origin);if(s.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(i&&c?await K(i,c,w):{hasToken:!1}).hasToken};let f;try{const k=await s.json();f=k.error||k.message}catch{}return s.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:f||`HTTP ${s.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!s.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:f||`HTTP ${s.status}`}}catch(o){return console.error("[isConnectionAuthenticated] Error:",o),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:o.message}}}export{G as a,X as h,q as i};