@decocms/mesh 2.125.2 → 2.125.3

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 (188) hide show
  1. package/dist/client/assets/{AlertCircle-Cnw5GhjM.js → AlertCircle-CAn1onHH.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-PE1D_d6N.js → AlertOctagon-ChcnKW7P.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-DiiOmxZ5.js → AlertTriangle-Suhq71Ba.js} +1 -1
  4. package/dist/client/assets/{ArrowDown-Dq_ix_a5.js → ArrowDown-BQn3fvf7.js} +1 -1
  5. package/dist/client/assets/{ArrowLeft-2v2jDyMq.js → ArrowLeft-DkojAdWe.js} +1 -1
  6. package/dist/client/assets/{ArrowUp-CP0dzs2U.js → ArrowUp-CCTJ8tar.js} +1 -1
  7. package/dist/client/assets/{Check-IyJXmB3D.js → Check-2BTd1528.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-D3-L-7q8.js → CheckCircle-DUsP9qJl.js} +1 -1
  9. package/dist/client/assets/{CheckDone01-Bl3K1H3i.js → CheckDone01-Bs5yfbwu.js} +1 -1
  10. package/dist/client/assets/{CheckVerified02-BTHXPwp3.js → CheckVerified02-D9LvEg4-.js} +1 -1
  11. package/dist/client/assets/{ChevronDown-CrA0GhEu.js → ChevronDown-BK0Z-3ss.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-CQzN9ZtD.js → ChevronRight-CpFHeZ-k.js} +1 -1
  13. package/dist/client/assets/{Clock-BMY1eaW0.js → Clock-DWLl74MU.js} +1 -1
  14. package/dist/client/assets/{Code01-CeGRGPJZ.js → Code01-D7rt1C5k.js} +1 -1
  15. package/dist/client/assets/{Container-BgkRftdL.js → Container-Dkua_wx6.js} +1 -1
  16. package/dist/client/assets/{Copy01-B7sbyU73.js → Copy01-CWD2XYkN.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-YIKw6rhG.js → Dataflow03-dIUcYa_e.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal-CStsW4jn.js → DotsHorizontal-R03fSXLm.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-BPB7nTxW.js → DotsVertical-nJGFqnIJ.js} +1 -1
  20. package/dist/client/assets/{Download01-Iy9CsXT2.js → Download01-w53nljTi.js} +1 -1
  21. package/dist/client/assets/{Edit01-BpchkiZj.js → Edit01-Een9NeGa.js} +1 -1
  22. package/dist/client/assets/{Eye-CF7Jsi4h.js → Eye-cRMKwlob.js} +1 -1
  23. package/dist/client/assets/{File02-CNIaQNnA.js → File02-BiHbI-Bs.js} +1 -1
  24. package/dist/client/assets/{File06-CN-CUlfW.js → File06-DK6hozGp.js} +1 -1
  25. package/dist/client/assets/{FilterLines-DKhKP4R7.js → FilterLines-DcFfiBYv.js} +1 -1
  26. package/dist/client/assets/{Globe01-C1WtitJR.js → Globe01-zBSU4RrG.js} +1 -1
  27. package/dist/client/assets/{Globe02-CLsJ4yCM.js → Globe02-BzI-D3XF.js} +1 -1
  28. package/dist/client/assets/{Grid01-BfcTdCmK.js → Grid01-DtWTP079.js} +1 -1
  29. package/dist/client/assets/{Hash02-66QHm8zh.js → Hash02-B_cIkiva.js} +1 -1
  30. package/dist/client/assets/{Home02-CLBx-CYf.js → Home02-B0J9-6Fj.js} +1 -1
  31. package/dist/client/assets/{Image01-DiX4EYL6.js → Image01-DuLPJrbP.js} +1 -1
  32. package/dist/client/assets/{Inbox01-uvAm2NdJ.js → Inbox01-DkeOZ2C_.js} +1 -1
  33. package/dist/client/assets/{InfoCircle-D8WkBwCV.js → InfoCircle-v_Zi3ix-.js} +1 -1
  34. package/dist/client/assets/{Key01-CRfrhjcx.js → Key01-FdWHEw6c.js} +1 -1
  35. package/dist/client/assets/{LinkExternal01-Dmi80ZqJ.js → LinkExternal01-BvWelMzx.js} +1 -1
  36. package/dist/client/assets/{List-DHYjADtQ.js → List-D1SXIq-Q.js} +1 -1
  37. package/dist/client/assets/{Loading01-5Os1EBQC.js → Loading01-BntQXW3R.js} +1 -1
  38. package/dist/client/assets/{Lock01-CMu9e9I1.js → Lock01-Ca25inpJ.js} +1 -1
  39. package/dist/client/assets/{Pin01-Dtlca92y.js → Pin01-D5SNXGno.js} +1 -1
  40. package/dist/client/assets/{Play-DpYyJNLB.js → Play-Dv6XoPC1.js} +1 -1
  41. package/dist/client/assets/{Plus-BZOdPpEn.js → Plus-BpJ1F9ED.js} +1 -1
  42. package/dist/client/assets/{RefreshCcw01-BU6Us9RR.js → RefreshCcw01-C6HpBrM2.js} +1 -1
  43. package/dist/client/assets/{RefreshCw01-ClksFdlE.js → RefreshCw01-BLvlqjIJ.js} +1 -1
  44. package/dist/client/assets/{Rows03-iLB6Pjez.js → Rows03-Bw2KmPLF.js} +1 -1
  45. package/dist/client/assets/{Save01-ipX1ktUE.js → Save01-C7Op6P3G.js} +1 -1
  46. package/dist/client/assets/{SearchMd-C4hV7R8V.js → SearchMd-B22BWSrE.js} +1 -1
  47. package/dist/client/assets/{Settings01-KIfOk1bg.js → Settings01-39eYdV1s.js} +1 -1
  48. package/dist/client/assets/{Shield01-Nc9e9wCl.js → Shield01-D5vtlDrS.js} +1 -1
  49. package/dist/client/assets/{Terminal-1Out0GjX.js → Terminal-jwgZ8meH.js} +1 -1
  50. package/dist/client/assets/{Trash01-DA9Iy0yG.js → Trash01-NHvYJiOw.js} +1 -1
  51. package/dist/client/assets/{Upload01-Co__isOw.js → Upload01-B7z0chWz.js} +1 -1
  52. package/dist/client/assets/{Users03-D2hf7hmK.js → Users03-CfBv5uVc.js} +1 -1
  53. package/dist/client/assets/{X-gSzwTkxQ.js → X-nbY3n5YX.js} +1 -1
  54. package/dist/client/assets/{XCircle-C6_3gAM6.js → XCircle-CdrNrzcr.js} +1 -1
  55. package/dist/client/assets/{XClose-MRwdozeO.js → XClose-DHV8bqGR.js} +1 -1
  56. package/dist/client/assets/{agent-connections-preview-D6JhcHHQ.js → agent-connections-preview-D2nPeCg-.js} +1 -1
  57. package/dist/client/assets/{agent-detail-BpcgS_WA.js → agent-detail-CAAcyNFf.js} +1 -1
  58. package/dist/client/assets/{agents-CiEGGxbH.js → agents-IxYsoQkx.js} +1 -1
  59. package/dist/client/assets/alert-dialog-DIblcPQC.js +7 -0
  60. package/dist/client/assets/{auth-catchall-B4V1ZqhA.js → auth-catchall-lueUuNUs.js} +1 -1
  61. package/dist/client/assets/{avatar-DvchIe54.js → avatar-DAde4Coq.js} +1 -1
  62. package/dist/client/assets/{badge-DU-tZMJX.js → badge-EvnzqGBM.js} +1 -1
  63. package/dist/client/assets/{binder-DYtUzpSy.js → binder-DtqSnmtn.js} +1 -1
  64. package/dist/client/assets/{breadcrumb-Btg1z4US.js → breadcrumb-Dit0z7A7.js} +1 -1
  65. package/dist/client/assets/{button-SrN4bZ1L.js → button-DDY6hri1.js} +1 -1
  66. package/dist/client/assets/{card-qnGcUCM7.js → card-CHcjH7V4.js} +1 -1
  67. package/dist/client/assets/{chart-Dv2iFlyz.js → chart-BEZIHLHA.js} +1 -1
  68. package/dist/client/assets/{checkbox-CysU4JNH.js → checkbox-_pZquTsv.js} +1 -1
  69. package/dist/client/assets/{circle-alert-BCTsSu2I.js → circle-alert-8my-DdYx.js} +1 -1
  70. package/dist/client/assets/{collection-detail-BYSxk4oE.js → collection-detail-BPjVfY9E.js} +1 -1
  71. package/dist/client/assets/{collection-search-B9NZ4RH6.js → collection-search-BhyeAK8D.js} +1 -1
  72. package/dist/client/assets/{collection-tab-BcJoa4qY.js → collection-tab-DYRZjIfR.js} +1 -1
  73. package/dist/client/assets/{collection-table-wrapper-ByW-kXsd.js → collection-table-wrapper-DF0r5l64.js} +1 -1
  74. package/dist/client/assets/{collection-tabs-GSP6CAnl.js → collection-tabs-CMMj9apF.js} +1 -1
  75. package/dist/client/assets/{command-Du6rS94S.js → command-D0lPyqX9.js} +1 -1
  76. package/dist/client/assets/{connect-DOymnzkM.js → connect-jPJQySxH.js} +1 -1
  77. package/dist/client/assets/{connection-card-CMw5gBsW.js → connection-card-C36z_Zfo.js} +1 -1
  78. package/dist/client/assets/{connection-detail-dcoyE7_9.js → connection-detail-D4fpJvP6.js} +1 -1
  79. package/dist/client/assets/{connections-C-xjHvMP.js → connections-Dd7R3YoP.js} +1 -1
  80. package/dist/client/assets/{constants-DisK0xae.js → constants-BWuwqVaf.js} +1 -1
  81. package/dist/client/assets/constants-alL-orOw.js +1 -0
  82. package/dist/client/assets/{context-C_I7xFo7.js → context-BoqYBHof.js} +2 -2
  83. package/dist/client/assets/{create-organization-dialog-yQPBfpjD.js → create-organization-dialog-DZ-29KA3.js} +1 -1
  84. package/dist/client/assets/{create-project-dialog-OPPYG5uC.js → create-project-dialog-5JWgj7o1.js} +1 -1
  85. package/dist/client/assets/{deco-constants-GtDdHPMJ.js → deco-constants-Lndb0_Fi.js} +1 -1
  86. package/dist/client/assets/{dialog-DH6FGz6L.js → dialog-AmArt43J.js} +1 -1
  87. package/dist/client/assets/{dropdown-menu-CvPfeATW.js → dropdown-menu-CMr4pVGd.js} +1 -1
  88. package/dist/client/assets/{dynamic-plugin-layout-deQJwm8k.js → dynamic-plugin-layout-B-RWLbim.js} +1 -1
  89. package/dist/client/assets/{empty-state-B_zGNEf7.js → empty-state-BxqfhnZC.js} +1 -1
  90. package/dist/client/assets/{empty-state-DUeMScV0.js → empty-state-CUU2GnRG.js} +1 -1
  91. package/dist/client/assets/{env-vars-editor-DpLZr7Mp.js → env-vars-editor-CeWJLU0d.js} +1 -1
  92. package/dist/client/assets/{error-boundary-CgOqOmL9.js → error-boundary-BbdoNwwk.js} +1 -1
  93. package/dist/client/assets/{extract-connection-data-qY6ONXDc.js → extract-connection-data-FghvIcuN.js} +1 -1
  94. package/dist/client/assets/{file-browser-iY7A5vK5.js → file-browser-BRNDEG3O.js} +2 -2
  95. package/dist/client/assets/{form-DdSGRLg9.js → form-Bsyh-cQj.js} +1 -1
  96. package/dist/client/assets/{grid-view-Nx0znnGe.js → grid-view-BjxbyS3V.js} +1 -1
  97. package/dist/client/assets/{home-WDKWnX-6.js → home-BqlHZV0D.js} +1 -1
  98. package/dist/client/assets/{index-Cr3EE_Oz.js → index-7GX9Z2_E.js} +1 -1
  99. package/dist/client/assets/{index-BNESb5f9.js → index-BwsTCLNe.js} +1 -1
  100. package/dist/client/assets/{index-p3omciU2.js → index-CMIePc8v.js} +3 -3
  101. package/dist/client/assets/{index-C4EDt4lI.js → index-Ck8tqNHK.js} +1 -1
  102. package/dist/client/assets/{index-BGG0J_lN.js → index-ClGhCbA0.js} +1 -1
  103. package/dist/client/assets/{index-CrsSJxhW.js → index-DFjHyz2s.js} +1 -1
  104. package/dist/client/assets/{index-BQJHl8k7.js → index-IwkUYudi.js} +1 -1
  105. package/dist/client/assets/{index-BmoMauUd.js → index-MmPZuevW.js} +1 -1
  106. package/dist/client/assets/{index-CqCSkLvQ.js → index-_qbzL5MU.js} +1 -1
  107. package/dist/client/assets/{infiniteQueryObserver-Bwh-NMGh.js → infiniteQueryObserver-DuAdiH0n.js} +1 -1
  108. package/dist/client/assets/{input-C19rUyj9.js → input-Je9XV62u.js} +1 -1
  109. package/dist/client/assets/{integration-icon-CMj9-FPS.js → integration-icon-DeiJ75EP.js} +1 -1
  110. package/dist/client/assets/{label-vYcgzZeb.js → label-Ct-IE-k2.js} +1 -1
  111. package/dist/client/assets/{layout-B39Q-9q3.js → layout-BWtcS0Q2.js} +1 -1
  112. package/dist/client/assets/{localstorage-keys-DIWr3Ek_.js → localstorage-keys-B-4HWrAO.js} +1 -1
  113. package/dist/client/assets/{login-CA6nx1du.js → login-swb3IsCw.js} +1 -1
  114. package/dist/client/assets/{markdown-Dc-S7aGn.js → markdown-BshJmJUr.js} +1 -1
  115. package/dist/client/assets/{mcp-oauth-C04X2g0h.js → mcp-oauth-DtHeHoWJ.js} +1 -1
  116. package/dist/client/assets/{mcp-server-card-ByBnE-vj.js → mcp-server-card-DJ-C7iNn.js} +1 -1
  117. package/dist/client/assets/{mcp-server-detail-C68kfF_y.js → mcp-server-detail-Du1aBWwk.js} +2 -2
  118. package/dist/client/assets/{members-Yn81rJ_1.js → members-BLWGtvj7.js} +1 -1
  119. package/dist/client/assets/{monitoring-WM-Rk7qO.js → monitoring-Dkzs8zLr.js} +1 -1
  120. package/dist/client/assets/{monitoring-dashboard-edit-Dp8NRuZd.js → monitoring-dashboard-edit-6Jd7ItfF.js} +1 -1
  121. package/dist/client/assets/{monitoring-dashboard-view-wLbkoGo1.js → monitoring-dashboard-view-NmZHmCWV.js} +1 -1
  122. package/dist/client/assets/{oauth-callback-CaX2c7Wu.js → oauth-callback-hu62EGGB.js} +1 -1
  123. package/dist/client/assets/{page-BvMChlEF.js → page-C-wJ53x_.js} +1 -1
  124. package/dist/client/assets/{page-CXSHaeva.js → page-Y1SYGnRN.js} +1 -1
  125. package/dist/client/assets/{plugin-empty-state-CVngkfX3.js → plugin-empty-state-BfDH4uPn.js} +1 -1
  126. package/dist/client/assets/{plugin-empty-state-D0_za-x_.js → plugin-empty-state-DRRVQKmb.js} +1 -1
  127. package/dist/client/assets/{plugin-header-PVE46n-W.js → plugin-header-8kNYjC6n.js} +1 -1
  128. package/dist/client/assets/{plugin-header-CqyTjT8y.js → plugin-header-BPNBXPjM.js} +1 -1
  129. package/dist/client/assets/{popover-Bz-dtYC4.js → popover-CdPr2kUy.js} +1 -1
  130. package/dist/client/assets/{project-layout-Cz0HYNyh.js → project-layout-bgteQ5fY.js} +1 -1
  131. package/dist/client/assets/{projects-list-BfIgV1F1.js → projects-list-DngofdiO.js} +1 -1
  132. package/dist/client/assets/{ranking-layout-CiiVJptK.js → ranking-layout-BxRgmZtS.js} +1 -1
  133. package/dist/client/assets/{readme-viewer-C7GbD9G5.js → readme-viewer-ym80L_hw.js} +1 -1
  134. package/dist/client/assets/{registry-layout-ChpSfSFu.js → registry-layout-C8Ew4flr.js} +1 -1
  135. package/dist/client/assets/{registry-utils-B61PMbF-.js → registry-utils-DBAgugDf.js} +1 -1
  136. package/dist/client/assets/{reports-layout-BvKe5aI3.js → reports-layout-BoIJWhiW.js} +1 -1
  137. package/dist/client/assets/{reset-password-B7ISHNC0.js → reset-password-DY5mUItc.js} +1 -1
  138. package/dist/client/assets/{resizable-Cu9ocREr.js → resizable-8m39GKGn.js} +1 -1
  139. package/dist/client/assets/{save-actions-CAz6Fzpg.js → save-actions-DnxE-Bzm.js} +1 -1
  140. package/dist/client/assets/{scroll-area-CVHsk4Pe.js → scroll-area-C-RNU2ZC.js} +1 -1
  141. package/dist/client/assets/{select-DFuMzqKt.js → select-B9AjxT2Q.js} +1 -1
  142. package/dist/client/assets/{shell-layout-Wquvsd36.js → shell-layout-DY2c6Efx.js} +2 -2
  143. package/dist/client/assets/{skeleton-DQTz2Cfy.js → skeleton-BAWgWTH6.js} +1 -1
  144. package/dist/client/assets/{spinner-DxDNcb59.js → spinner-C5H8EOvR.js} +1 -1
  145. package/dist/client/assets/{store-invite-SskJUHyO.js → store-invite-BSP87zro.js} +1 -1
  146. package/dist/client/assets/switch-Bnxx_fFZ.js +1 -0
  147. package/dist/client/assets/{table-CQcuIfNu.js → table-Bt31_DyV.js} +1 -1
  148. package/dist/client/assets/{tasks-CnBGBvBV.js → tasks-OIFCJv2K.js} +1 -1
  149. package/dist/client/assets/{textarea-BDWEwIDH.js → textarea-Dfcf9iVI.js} +1 -1
  150. package/dist/client/assets/{time-range-picker-kirfhhc9.js → time-range-picker-VoxMdMGw.js} +1 -1
  151. package/dist/client/assets/{toggle-group-BMIOl_5K.js → toggle-group-BYr6H2N2.js} +1 -1
  152. package/dist/client/assets/{tools-list-Cn1p3mLu.js → tools-list-CMPsf87L.js} +1 -1
  153. package/dist/client/assets/{tooltip-BbsUVNzK.js → tooltip-Kun6OEqc.js} +1 -1
  154. package/dist/client/assets/{topbar-portal-BRE2WBz7.js → topbar-portal-BYkDxjeH.js} +1 -1
  155. package/dist/client/assets/{typewriter-title-BILoCXrZ.js → typewriter-title-ir44iZyu.js} +1 -1
  156. package/dist/client/assets/{use-binding-BdZ1UVgx.js → use-binding-Bt6opM01.js} +1 -1
  157. package/dist/client/assets/{use-connection-DkSSfi9a.js → use-connection-CZeLlUDa.js} +1 -1
  158. package/dist/client/assets/{use-copy-BB2kbW8i.js → use-copy-BLt7-cw9.js} +1 -1
  159. package/dist/client/assets/{use-create-virtual-mcp-CHG7UVpA.js → use-create-virtual-mcp-BWbRPuCZ.js} +1 -1
  160. package/dist/client/assets/{use-deco-chat-open-BD3xJReE.js → use-deco-chat-open-DqF5WsjN.js} +1 -1
  161. package/dist/client/assets/{use-install-from-registry-BqPjgCPd.js → use-install-from-registry-BsUBgwfp.js} +1 -1
  162. package/dist/client/assets/{use-list-state-DpzviSdT.js → use-list-state-B_n0GZwG.js} +1 -1
  163. package/dist/client/assets/{use-llm-DTPk3_13.js → use-llm-CBsUcVLv.js} +1 -1
  164. package/dist/client/assets/{use-mcp-prompts-CB93WJg8.js → use-mcp-prompts-CTAKOvKB.js} +1 -1
  165. package/dist/client/assets/{use-mcp-tools-CGC3tcmA.js → use-mcp-tools-BED8kPD7.js} +1 -1
  166. package/dist/client/assets/{use-mobile-CjVgJBva.js → use-mobile-DLzBblnh.js} +1 -1
  167. package/dist/client/assets/{use-organization-settings-rYyRzSoT.js → use-organization-settings-BTKBql6r.js} +1 -1
  168. package/dist/client/assets/{use-project-CnwCxI-j.js → use-project-Dgs5h9hm.js} +1 -1
  169. package/dist/client/assets/{use-settings-modal-tv8Da55W.js → use-settings-modal-CL7KNbwO.js} +1 -1
  170. package/dist/client/assets/{use-view-mode-DDLmSRVK.js → use-view-mode-Cm6MlS0B.js} +1 -1
  171. package/dist/client/assets/{use-virtual-mcp-gsGIP_cY.js → use-virtual-mcp-chylq6BL.js} +1 -1
  172. package/dist/client/assets/useInfiniteQuery-B4zFsz_-.js +1 -0
  173. package/dist/client/assets/{useMutation-GHxEJTN4.js → useMutation-CTU78J7M.js} +1 -1
  174. package/dist/client/assets/useQuery-CL8s1AaN.js +1 -0
  175. package/dist/client/assets/useSuspenseInfiniteQuery-CnNOZleg.js +1 -0
  176. package/dist/client/assets/{view-mode-toggle-BeStXEmg.js → view-mode-toggle-lRAyyRMm.js} +1 -1
  177. package/dist/client/assets/{workflow-DujY0Kfk.js → workflow-CH4Jfjr7.js} +1 -1
  178. package/dist/client/index.html +1 -1
  179. package/dist/server/cli.js +4 -4
  180. package/dist/server/migrate.js +4 -4
  181. package/dist/server/server.js +4 -4
  182. package/package.json +1 -1
  183. package/dist/client/assets/alert-dialog-BwY-RhAj.js +0 -7
  184. package/dist/client/assets/constants-XXbgLKEI.js +0 -1
  185. package/dist/client/assets/switch-D4ggk_Yk.js +0 -1
  186. package/dist/client/assets/useInfiniteQuery-DrLsISf0.js +0 -1
  187. package/dist/client/assets/useQuery-KFMXc5Td.js +0 -1
  188. package/dist/client/assets/useSuspenseInfiniteQuery-Cw1MYhE7.js +0 -1
@@ -1 +1 @@
1
- import{r as k,c as p,j as o,T as L,J as K,I as V,Q as W,W as G,U,M as X,v as q,y as F}from"./index-p3omciU2.js";import{u as J}from"./use-mobile-CjVgJBva.js";import{c as b,B as Q}from"./button-SrN4bZ1L.js";import{i as Y}from"./X-gSzwTkxQ.js";import{a as M,c as D,b as P,T as A}from"./tooltip-BbsUVNzK.js";const R=({size:i=24,color:e="currentColor",...t})=>k.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},k.createElement("path",{d:"M9 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));R.displayName="LayoutLeft";function Z(i){const e=p.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let a;return e[2]!==t?(a=o.jsx(V,{"data-slot":"sheet",...t}),e[2]=t,e[3]=a):a=e[3],a}function ee(i){const e=p.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let a;return e[2]!==t?(a=o.jsx(W,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function te(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx(U,{"data-slot":"sheet-overlay",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function se(i){const e=p.c(17);let t,a,s,l;e[0]!==i?({className:a,children:t,side:l,...s}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=s,e[4]=l):(t=e[1],a=e[2],s=e[3],l=e[4]);const c=l===void 0?"right":l;let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(te,{}),e[5]=r):r=e[5];const n=c==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",f=c==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",u=c==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",h=c==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let d;e[6]!==a||e[7]!==n||e[8]!==f||e[9]!==u||e[10]!==h?(d=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n,f,u,h,a),e[6]=a,e[7]=n,e[8]=f,e[9]=u,e[10]=h,e[11]=d):d=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsxs(G,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(Y,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=m):m=e[12];let N;return e[13]!==t||e[14]!==s||e[15]!==d?(N=o.jsxs(ee,{children:[r,o.jsxs(K,{"data-slot":"sheet-content",className:d,...s,children:[t,m]})]}),e[13]=t,e[14]=s,e[15]=d,e[16]=N):N=e[16],N}function ae(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sheet-header",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function le(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("text-foreground font-semibold",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx(L,{"data-slot":"sheet-title",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function ie(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx(X,{"data-slot":"sheet-description",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}const oe="sidebar_state",ne=3600*24*7,re="16rem",de="18rem",ce="3rem",fe="b",B=k.createContext(null);function O(){const i=k.useContext(B);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function _e(i){const e=p.c(21),{defaultOpen:t,open:a,onOpenChange:s,children:l}=i,c=t===void 0?!0:t,r=J(),[n,f]=k.useState(!1),[u,h]=k.useState(c),d=a??u;let m;e[0]!==d||e[1]!==s?(m=$=>{const y=typeof $=="function"?$(d):$;s?s(y):h(y),document.cookie=`${oe}=${y}; path=/; max-age=${ne}`},e[0]=d,e[1]=s,e[2]=m):m=e[2];const N=m;let E;e[3]!==r||e[4]!==N?(E=()=>r?f(pe):N(ue),e[3]=r,e[4]=N,e[5]=E):E=e[5];const g=E;let C,j;e[6]!==g?(C=()=>{const $=y=>{if(y.key===fe&&(y.metaKey||y.ctrlKey)){const T=y.target;if(T.tagName==="INPUT"||T.tagName==="TEXTAREA"||T.isContentEditable)return;y.preventDefault(),g()}};return globalThis.addEventListener("keydown",$),()=>globalThis.removeEventListener("keydown",$)},j=[g],e[6]=g,e[7]=C,e[8]=j):(C=e[7],j=e[8]),k.useEffect(C,j);const w=d?"expanded":"collapsed";let S;e[9]!==r||e[10]!==d||e[11]!==n||e[12]!==N||e[13]!==w||e[14]!==g?(S={state:w,open:d,setOpen:N,isMobile:r,openMobile:n,setOpenMobile:f,toggleSidebar:g},e[9]=r,e[10]=d,e[11]=n,e[12]=N,e[13]=w,e[14]=g,e[15]=S):S=e[15];const _=S;let x;e[16]!==l?(x=o.jsx(D,{delayDuration:0,children:l}),e[16]=l,e[17]=x):x=e[17];let v;return e[18]!==_||e[19]!==x?(v=o.jsx(B.Provider,{value:_,children:x}),e[18]=_,e[19]=x,e[20]=v):v=e[20],v}function ue(i){return!i}function pe(i){return!i}function Ce(i){const e=p.c(14);let t,a,s,l;e[0]!==i?({className:a,style:l,children:t,...s}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=s,e[4]=l):(t=e[1],a=e[2],s=e[3],l=e[4]);let c;e[5]!==l?(c={"--sidebar-width":re,"--sidebar-width-icon":ce,...l},e[5]=l,e[6]=c):c=e[6];const r=c;let n;e[7]!==a?(n=b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=n):n=e[8];let f;return e[9]!==t||e[10]!==s||e[11]!==r||e[12]!==n?(f=o.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:n,...s,children:t}),e[9]=t,e[10]=s,e[11]=r,e[12]=n,e[13]=f):f=e[13],f}function $e(i){const e=p.c(42);let t,a,s,l,c,r;e[0]!==i?({side:l,variant:c,collapsible:r,className:a,children:t,...s}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=s,e[4]=l,e[5]=c,e[6]=r):(t=e[1],a=e[2],s=e[3],l=e[4],c=e[5],r=e[6]);const n=l===void 0?"left":l,f=c===void 0?"sidebar":c,u=r===void 0?"offcanvas":r,{isMobile:h,state:d,openMobile:m,setOpenMobile:N}=O();if(u==="none"){let x;e[7]!==a?(x=b("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=x):x=e[8];let v;return e[9]!==t||e[10]!==s||e[11]!==x?(v=o.jsx("div",{"data-slot":"sidebar",className:x,...s,children:t}),e[9]=t,e[10]=s,e[11]=x,e[12]=v):v=e[12],v}if(h){let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x={"--sidebar-width":de},e[13]=x):x=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsxs(ae,{className:"sr-only",children:[o.jsx(le,{children:"Sidebar"}),o.jsx(ie,{children:"Displays the mobile sidebar."})]}),e[14]=v):v=e[14];let $;e[15]!==t?($=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[15]=t,e[16]=$):$=e[16];let y;e[17]!==n||e[18]!==$?(y=o.jsxs(se,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:x,side:n,children:[v,$]}),e[17]=n,e[18]=$,e[19]=y):y=e[19];let T;return e[20]!==m||e[21]!==s||e[22]!==N||e[23]!==y?(T=o.jsx(Z,{open:m,onOpenChange:N,...s,children:y}),e[20]=m,e[21]=s,e[22]=N,e[23]=y,e[24]=T):T=e[24],T}const E=f==="floating"||f==="inset"?"data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"data-[collapsible=icon]:w-(--sidebar-width-icon)";let g;e[25]!==E?(g=b("group peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","w-(--sidebar-width) transition-[width] duration-300 ease-[var(--ease-out-quart)]","data-[collapsible=offcanvas]:w-0",E),e[25]=E,e[26]=g):g=e[26];const C=d==="collapsed"?u:"";let j;e[27]!==a?(j=b("flex flex-col h-full w-(--sidebar-width)",a),e[27]=a,e[28]=j):j=e[28];let w;e[29]!==t?(w=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:t}),e[29]=t,e[30]=w):w=e[30];let S;e[31]!==s||e[32]!==j||e[33]!==w?(S=o.jsx("div",{"data-slot":"sidebar-container",className:j,...s,children:w}),e[31]=s,e[32]=j,e[33]=w,e[34]=S):S=e[34];let _;return e[35]!==n||e[36]!==d||e[37]!==g||e[38]!==C||e[39]!==S||e[40]!==f?(_=o.jsx("div",{className:g,"data-state":d,"data-collapsible":C,"data-variant":f,"data-side":n,"data-slot":"sidebar",children:S}),e[35]=n,e[36]=d,e[37]=g,e[38]=C,e[39]=S,e[40]=f,e[41]=_):_=e[41],_}function be(i){const e=p.c(18);let t,a,s;e[0]!==i?({className:t,onClick:a,...s}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=s):(t=e[1],a=e[2],s=e[3]);const{toggleSidebar:l}=O();let c;e[4]!==t?(c=b("size-7",t),e[4]=t,e[5]=c):c=e[5];let r;e[6]!==a||e[7]!==l?(r=m=>{a?.(m),l()},e[6]=a,e[7]=l,e[8]=r):r=e[8];let n,f;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(R,{}),f=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=n,e[10]=f):(n=e[9],f=e[10]);let u;e[11]!==s||e[12]!==c||e[13]!==r?(u=o.jsx(M,{asChild:!0,children:o.jsxs(Q,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:c,onClick:r,...s,children:[n,f]})}),e[11]=s,e[12]=c,e[13]=r,e[14]=u):u=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs(P,{side:"bottom",className:"flex items-center gap-2",children:["Collapse sidebar",o.jsx("kbd",{className:"bg-background/20 rounded px-1 py-0.5 text-[10px] font-mono",children:"⌘B"})]}),e[15]=h):h=e[15];let d;return e[16]!==u?(d=o.jsx(D,{delayDuration:300,children:o.jsxs(A,{children:[u,h]})}),e[16]=u,e[17]=d):d=e[17],d}function Ee(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function ke(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Te(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Oe(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("h-4 m-0! w-full",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-sidebar":"separator",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Ie(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Me(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function De(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("w-full text-sm",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Pe(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex w-full min-w-0 flex-col gap-1",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Ae(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("group/menu-item relative",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}const me=F("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md py-0 pr-0.5 pl-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2!",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Re(i){const e=p.c(28);let t,a,s,l,c,r,n;e[0]!==i?({asChild:s,isActive:l,variant:c,size:r,tooltip:n,className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=s,e[4]=l,e[5]=c,e[6]=r,e[7]=n):(t=e[1],a=e[2],s=e[3],l=e[4],c=e[5],r=e[6],n=e[7]);const f=s===void 0?!1:s,u=l===void 0?!1:l,h=c===void 0?"default":c,d=r===void 0?"default":r,m=f?q:"button",{isMobile:N,state:E}=O();let g;e[8]!==t||e[9]!==d||e[10]!==h?(g=b(me({variant:h,size:d}),t),e[8]=t,e[9]=d,e[10]=h,e[11]=g):g=e[11];let C;e[12]!==m||e[13]!==u||e[14]!==a||e[15]!==d||e[16]!==g?(C=o.jsx(m,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":d,"data-active":u,className:g,...a}),e[12]=m,e[13]=u,e[14]=a,e[15]=d,e[16]=g,e[17]=C):C=e[17];const j=C;if(!n)return j;if(typeof n=="string"){let v;e[18]!==n?(v={children:n},e[18]=n,e[19]=v):v=e[19],n=v}let w;e[20]!==j?(w=o.jsx(M,{asChild:!0,children:j}),e[20]=j,e[21]=w):w=e[21];const S=E!=="collapsed"||N;let _;e[22]!==S||e[23]!==n?(_=o.jsx(P,{side:"right",align:"center",hidden:S,...n}),e[22]=S,e[23]=n,e[24]=_):_=e[24];let x;return e[25]!==w||e[26]!==_?(x=o.jsxs(A,{children:[w,_]}),e[25]=w,e[26]=_,e[27]=x):x=e[27],x}function I(i,e){const t=k.Children.toArray(i);for(const a of t)if(k.isValidElement(a)&&a.type===e)return a;return null}function he(i){const e=p.c(5),{children:t,className:a}=i;let s;e[0]!==a?(s=b("flex flex-col h-full bg-background overflow-hidden",a),e[0]=a,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==s?(l=o.jsx("div",{className:s,children:t}),e[2]=t,e[3]=s,e[4]=l):l=e[4],l}function xe(i){const e=p.c(16),{children:t,className:a,hideSidebarTrigger:s}=i;let l;e[0]!==t?(l=I(t,z),e[0]=t,e[1]=l):l=e[1];const c=l;let r;e[2]!==t?(r=I(t,H),e[2]=t,e[3]=r):r=e[3];const n=r,f=s?"pl-4":"pl-2";let u;e[4]!==a||e[5]!==f?(u=b("shrink-0 w-full border-b border-border/50 h-11 overflow-x-auto","flex items-center justify-between gap-3 pr-4 min-w-max",f,a),e[4]=a,e[5]=f,e[6]=u):u=e[6];let h;e[7]!==s?(h=!s&&o.jsx(be,{className:"text-muted-foreground"}),e[7]=s,e[8]=h):h=e[8];let d;e[9]!==c||e[10]!==h?(d=o.jsxs("div",{className:"flex items-center gap-1",children:[h,c]}),e[9]=c,e[10]=h,e[11]=d):d=e[11];let m;return e[12]!==n||e[13]!==u||e[14]!==d?(m=o.jsxs("div",{className:u,children:[d,n]}),e[12]=n,e[13]=u,e[14]=d,e[15]=m):m=e[15],m}function z(i){const e=p.c(5),{children:t,className:a}=i;let s;e[0]!==a?(s=b("flex items-center gap-2 shrink-0 overflow-hidden",a),e[0]=a,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==s?(l=o.jsx("div",{className:s,children:t}),e[2]=t,e[3]=s,e[4]=l):l=e[4],l}function H(i){const e=p.c(5),{children:t,className:a}=i;let s;e[0]!==a?(s=b("flex items-center gap-2 shrink-0 overflow-hidden border-l border-border pl-3",a),e[0]=a,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==s?(l=o.jsx("div",{className:s,children:t}),e[2]=t,e[3]=s,e[4]=l):l=e[4],l}function ge(i){const e=p.c(5),{children:t,className:a}=i;let s;e[0]!==a?(s=b("flex-1 overflow-auto",a),e[0]=a,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==s?(l=o.jsx("div",{className:s,children:t}),e[2]=t,e[3]=s,e[4]=l):l=e[4],l}const Be=Object.assign(he,{Header:Object.assign(xe,{Left:z,Right:H}),Content:ge});export{Be as P,ae as S,le as a,se as b,Z as c,Pe as d,Ae as e,Re as f,De as g,Me as h,Oe as i,Ie as j,$e as k,ke as l,Te as m,_e as n,Ee as o,Ce as p,O as u};
1
+ import{r as k,c as p,j as o,T as L,J as K,I as V,Q as W,W as G,U,M as X,v as q,y as F}from"./index-CMIePc8v.js";import{u as J}from"./use-mobile-DLzBblnh.js";import{c as b,B as Q}from"./button-DDY6hri1.js";import{i as Y}from"./X-nbY3n5YX.js";import{a as M,c as D,b as P,T as A}from"./tooltip-Kun6OEqc.js";const R=({size:i=24,color:e="currentColor",...t})=>k.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},k.createElement("path",{d:"M9 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));R.displayName="LayoutLeft";function Z(i){const e=p.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let a;return e[2]!==t?(a=o.jsx(V,{"data-slot":"sheet",...t}),e[2]=t,e[3]=a):a=e[3],a}function ee(i){const e=p.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let a;return e[2]!==t?(a=o.jsx(W,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function te(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx(U,{"data-slot":"sheet-overlay",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function se(i){const e=p.c(17);let t,a,s,l;e[0]!==i?({className:a,children:t,side:l,...s}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=s,e[4]=l):(t=e[1],a=e[2],s=e[3],l=e[4]);const c=l===void 0?"right":l;let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(te,{}),e[5]=r):r=e[5];const n=c==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",f=c==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",u=c==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",h=c==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let d;e[6]!==a||e[7]!==n||e[8]!==f||e[9]!==u||e[10]!==h?(d=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n,f,u,h,a),e[6]=a,e[7]=n,e[8]=f,e[9]=u,e[10]=h,e[11]=d):d=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsxs(G,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(Y,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=m):m=e[12];let N;return e[13]!==t||e[14]!==s||e[15]!==d?(N=o.jsxs(ee,{children:[r,o.jsxs(K,{"data-slot":"sheet-content",className:d,...s,children:[t,m]})]}),e[13]=t,e[14]=s,e[15]=d,e[16]=N):N=e[16],N}function ae(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sheet-header",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function le(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("text-foreground font-semibold",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx(L,{"data-slot":"sheet-title",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function ie(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx(X,{"data-slot":"sheet-description",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}const oe="sidebar_state",ne=3600*24*7,re="16rem",de="18rem",ce="3rem",fe="b",B=k.createContext(null);function O(){const i=k.useContext(B);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function _e(i){const e=p.c(21),{defaultOpen:t,open:a,onOpenChange:s,children:l}=i,c=t===void 0?!0:t,r=J(),[n,f]=k.useState(!1),[u,h]=k.useState(c),d=a??u;let m;e[0]!==d||e[1]!==s?(m=$=>{const y=typeof $=="function"?$(d):$;s?s(y):h(y),document.cookie=`${oe}=${y}; path=/; max-age=${ne}`},e[0]=d,e[1]=s,e[2]=m):m=e[2];const N=m;let E;e[3]!==r||e[4]!==N?(E=()=>r?f(pe):N(ue),e[3]=r,e[4]=N,e[5]=E):E=e[5];const g=E;let C,j;e[6]!==g?(C=()=>{const $=y=>{if(y.key===fe&&(y.metaKey||y.ctrlKey)){const T=y.target;if(T.tagName==="INPUT"||T.tagName==="TEXTAREA"||T.isContentEditable)return;y.preventDefault(),g()}};return globalThis.addEventListener("keydown",$),()=>globalThis.removeEventListener("keydown",$)},j=[g],e[6]=g,e[7]=C,e[8]=j):(C=e[7],j=e[8]),k.useEffect(C,j);const w=d?"expanded":"collapsed";let S;e[9]!==r||e[10]!==d||e[11]!==n||e[12]!==N||e[13]!==w||e[14]!==g?(S={state:w,open:d,setOpen:N,isMobile:r,openMobile:n,setOpenMobile:f,toggleSidebar:g},e[9]=r,e[10]=d,e[11]=n,e[12]=N,e[13]=w,e[14]=g,e[15]=S):S=e[15];const _=S;let x;e[16]!==l?(x=o.jsx(D,{delayDuration:0,children:l}),e[16]=l,e[17]=x):x=e[17];let v;return e[18]!==_||e[19]!==x?(v=o.jsx(B.Provider,{value:_,children:x}),e[18]=_,e[19]=x,e[20]=v):v=e[20],v}function ue(i){return!i}function pe(i){return!i}function Ce(i){const e=p.c(14);let t,a,s,l;e[0]!==i?({className:a,style:l,children:t,...s}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=s,e[4]=l):(t=e[1],a=e[2],s=e[3],l=e[4]);let c;e[5]!==l?(c={"--sidebar-width":re,"--sidebar-width-icon":ce,...l},e[5]=l,e[6]=c):c=e[6];const r=c;let n;e[7]!==a?(n=b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=n):n=e[8];let f;return e[9]!==t||e[10]!==s||e[11]!==r||e[12]!==n?(f=o.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:n,...s,children:t}),e[9]=t,e[10]=s,e[11]=r,e[12]=n,e[13]=f):f=e[13],f}function $e(i){const e=p.c(42);let t,a,s,l,c,r;e[0]!==i?({side:l,variant:c,collapsible:r,className:a,children:t,...s}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=s,e[4]=l,e[5]=c,e[6]=r):(t=e[1],a=e[2],s=e[3],l=e[4],c=e[5],r=e[6]);const n=l===void 0?"left":l,f=c===void 0?"sidebar":c,u=r===void 0?"offcanvas":r,{isMobile:h,state:d,openMobile:m,setOpenMobile:N}=O();if(u==="none"){let x;e[7]!==a?(x=b("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=x):x=e[8];let v;return e[9]!==t||e[10]!==s||e[11]!==x?(v=o.jsx("div",{"data-slot":"sidebar",className:x,...s,children:t}),e[9]=t,e[10]=s,e[11]=x,e[12]=v):v=e[12],v}if(h){let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x={"--sidebar-width":de},e[13]=x):x=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsxs(ae,{className:"sr-only",children:[o.jsx(le,{children:"Sidebar"}),o.jsx(ie,{children:"Displays the mobile sidebar."})]}),e[14]=v):v=e[14];let $;e[15]!==t?($=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[15]=t,e[16]=$):$=e[16];let y;e[17]!==n||e[18]!==$?(y=o.jsxs(se,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:x,side:n,children:[v,$]}),e[17]=n,e[18]=$,e[19]=y):y=e[19];let T;return e[20]!==m||e[21]!==s||e[22]!==N||e[23]!==y?(T=o.jsx(Z,{open:m,onOpenChange:N,...s,children:y}),e[20]=m,e[21]=s,e[22]=N,e[23]=y,e[24]=T):T=e[24],T}const E=f==="floating"||f==="inset"?"data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"data-[collapsible=icon]:w-(--sidebar-width-icon)";let g;e[25]!==E?(g=b("group peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","w-(--sidebar-width) transition-[width] duration-300 ease-[var(--ease-out-quart)]","data-[collapsible=offcanvas]:w-0",E),e[25]=E,e[26]=g):g=e[26];const C=d==="collapsed"?u:"";let j;e[27]!==a?(j=b("flex flex-col h-full w-(--sidebar-width)",a),e[27]=a,e[28]=j):j=e[28];let w;e[29]!==t?(w=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:t}),e[29]=t,e[30]=w):w=e[30];let S;e[31]!==s||e[32]!==j||e[33]!==w?(S=o.jsx("div",{"data-slot":"sidebar-container",className:j,...s,children:w}),e[31]=s,e[32]=j,e[33]=w,e[34]=S):S=e[34];let _;return e[35]!==n||e[36]!==d||e[37]!==g||e[38]!==C||e[39]!==S||e[40]!==f?(_=o.jsx("div",{className:g,"data-state":d,"data-collapsible":C,"data-variant":f,"data-side":n,"data-slot":"sidebar",children:S}),e[35]=n,e[36]=d,e[37]=g,e[38]=C,e[39]=S,e[40]=f,e[41]=_):_=e[41],_}function be(i){const e=p.c(18);let t,a,s;e[0]!==i?({className:t,onClick:a,...s}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=s):(t=e[1],a=e[2],s=e[3]);const{toggleSidebar:l}=O();let c;e[4]!==t?(c=b("size-7",t),e[4]=t,e[5]=c):c=e[5];let r;e[6]!==a||e[7]!==l?(r=m=>{a?.(m),l()},e[6]=a,e[7]=l,e[8]=r):r=e[8];let n,f;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(R,{}),f=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=n,e[10]=f):(n=e[9],f=e[10]);let u;e[11]!==s||e[12]!==c||e[13]!==r?(u=o.jsx(M,{asChild:!0,children:o.jsxs(Q,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:c,onClick:r,...s,children:[n,f]})}),e[11]=s,e[12]=c,e[13]=r,e[14]=u):u=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs(P,{side:"bottom",className:"flex items-center gap-2",children:["Collapse sidebar",o.jsx("kbd",{className:"bg-background/20 rounded px-1 py-0.5 text-[10px] font-mono",children:"⌘B"})]}),e[15]=h):h=e[15];let d;return e[16]!==u?(d=o.jsx(D,{delayDuration:300,children:o.jsxs(A,{children:[u,h]})}),e[16]=u,e[17]=d):d=e[17],d}function Ee(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function ke(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Te(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Oe(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("h-4 m-0! w-full",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-sidebar":"separator",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Ie(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Me(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function De(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("w-full text-sm",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Pe(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex w-full min-w-0 flex-col gap-1",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function Ae(i){const e=p.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("group/menu-item relative",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}const me=F("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md py-0 pr-0.5 pl-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2!",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Re(i){const e=p.c(28);let t,a,s,l,c,r,n;e[0]!==i?({asChild:s,isActive:l,variant:c,size:r,tooltip:n,className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=s,e[4]=l,e[5]=c,e[6]=r,e[7]=n):(t=e[1],a=e[2],s=e[3],l=e[4],c=e[5],r=e[6],n=e[7]);const f=s===void 0?!1:s,u=l===void 0?!1:l,h=c===void 0?"default":c,d=r===void 0?"default":r,m=f?q:"button",{isMobile:N,state:E}=O();let g;e[8]!==t||e[9]!==d||e[10]!==h?(g=b(me({variant:h,size:d}),t),e[8]=t,e[9]=d,e[10]=h,e[11]=g):g=e[11];let C;e[12]!==m||e[13]!==u||e[14]!==a||e[15]!==d||e[16]!==g?(C=o.jsx(m,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":d,"data-active":u,className:g,...a}),e[12]=m,e[13]=u,e[14]=a,e[15]=d,e[16]=g,e[17]=C):C=e[17];const j=C;if(!n)return j;if(typeof n=="string"){let v;e[18]!==n?(v={children:n},e[18]=n,e[19]=v):v=e[19],n=v}let w;e[20]!==j?(w=o.jsx(M,{asChild:!0,children:j}),e[20]=j,e[21]=w):w=e[21];const S=E!=="collapsed"||N;let _;e[22]!==S||e[23]!==n?(_=o.jsx(P,{side:"right",align:"center",hidden:S,...n}),e[22]=S,e[23]=n,e[24]=_):_=e[24];let x;return e[25]!==w||e[26]!==_?(x=o.jsxs(A,{children:[w,_]}),e[25]=w,e[26]=_,e[27]=x):x=e[27],x}function I(i,e){const t=k.Children.toArray(i);for(const a of t)if(k.isValidElement(a)&&a.type===e)return a;return null}function he(i){const e=p.c(5),{children:t,className:a}=i;let s;e[0]!==a?(s=b("flex flex-col h-full bg-background overflow-hidden",a),e[0]=a,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==s?(l=o.jsx("div",{className:s,children:t}),e[2]=t,e[3]=s,e[4]=l):l=e[4],l}function xe(i){const e=p.c(16),{children:t,className:a,hideSidebarTrigger:s}=i;let l;e[0]!==t?(l=I(t,z),e[0]=t,e[1]=l):l=e[1];const c=l;let r;e[2]!==t?(r=I(t,H),e[2]=t,e[3]=r):r=e[3];const n=r,f=s?"pl-4":"pl-2";let u;e[4]!==a||e[5]!==f?(u=b("shrink-0 w-full border-b border-border/50 h-11 overflow-x-auto","flex items-center justify-between gap-3 pr-4 min-w-max",f,a),e[4]=a,e[5]=f,e[6]=u):u=e[6];let h;e[7]!==s?(h=!s&&o.jsx(be,{className:"text-muted-foreground"}),e[7]=s,e[8]=h):h=e[8];let d;e[9]!==c||e[10]!==h?(d=o.jsxs("div",{className:"flex items-center gap-1",children:[h,c]}),e[9]=c,e[10]=h,e[11]=d):d=e[11];let m;return e[12]!==n||e[13]!==u||e[14]!==d?(m=o.jsxs("div",{className:u,children:[d,n]}),e[12]=n,e[13]=u,e[14]=d,e[15]=m):m=e[15],m}function z(i){const e=p.c(5),{children:t,className:a}=i;let s;e[0]!==a?(s=b("flex items-center gap-2 shrink-0 overflow-hidden",a),e[0]=a,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==s?(l=o.jsx("div",{className:s,children:t}),e[2]=t,e[3]=s,e[4]=l):l=e[4],l}function H(i){const e=p.c(5),{children:t,className:a}=i;let s;e[0]!==a?(s=b("flex items-center gap-2 shrink-0 overflow-hidden border-l border-border pl-3",a),e[0]=a,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==s?(l=o.jsx("div",{className:s,children:t}),e[2]=t,e[3]=s,e[4]=l):l=e[4],l}function ge(i){const e=p.c(5),{children:t,className:a}=i;let s;e[0]!==a?(s=b("flex-1 overflow-auto",a),e[0]=a,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==s?(l=o.jsx("div",{className:s,children:t}),e[2]=t,e[3]=s,e[4]=l):l=e[4],l}const Be=Object.assign(he,{Header:Object.assign(xe,{Left:z,Right:H}),Content:ge});export{Be as P,ae as S,le as a,se as b,Z as c,Pe as d,Ae as e,Re as f,De as g,Me as h,Oe as i,Ie as j,$e as k,ke as l,Te as m,_e as n,Ee as o,Ce as p,O as u};
@@ -1,4 +1,4 @@
1
- import{r as O,c as Y,o as Ar,k as w1,l as O1,j as E,s as si,bY as L1,bZ as yC,bl as Qe,b_ as SC,G as D1,u as Nr,t as Yt,al as AC,b$ as NC,b4 as M1,c0 as vC,c1 as Mt,c2 as js,c3 as _C,c4 as qs,c5 as CC,c6 as IC,c7 as RC,c8 as xC,n as kC,K as rh,c9 as wC,ca as OC,cb as LC,cc as DC,m as P1,b as F1,O as Xa,cd as oi,br as MC,d as PC}from"./index-p3omciU2.js";import{B as _e,c as ee}from"./button-SrN4bZ1L.js";import{u as rs,b as as,m as B1,M as FC,t as U1,C as BC}from"./context-C_I7xFo7.js";import{b as vr,P as _r,a as Cr}from"./popover-Bz-dtYC4.js";import{S as Tm,u as UC}from"./skeleton-DQTz2Cfy.js";import{S as is}from"./spinner-DxDNcb59.js";import{T as ot,a as lt,b as ut,c as ss}from"./tooltip-BbsUVNzK.js";import{d as H1,u as ah,i as dr,f as HC}from"./constants-DisK0xae.js";import{u as $C,g as $1,l as ym,a as Sm,r as jC}from"./use-mcp-prompts-CB93WJg8.js";import{E as qC}from"./error-boundary-CgOqOmL9.js";import{c as zC,b as GC,e as VC,a as WC,D as YC}from"./dialog-DH6FGz6L.js";import{a as uf,F as ls,b as us,c as KC,d as cs,f as ds}from"./form-DdSGRLg9.js";import{I as j1}from"./input-C19rUyj9.js";import{I as ps}from"./integration-icon-CMj9-FPS.js";import{c as XC,a as ZC,e as QC}from"./usage-B8eRkRZY.js";import{i as JC}from"./ArrowUp-CP0dzs2U.js";import{t as cf}from"./ChevronDown-CrA0GhEu.js";import{i as q1}from"./Edit01-BpchkiZj.js";import{t as pr}from"./Users03-D2hf7hmK.js";import{i as eI}from"./XCircle-C6_3gAM6.js";import{i as z1}from"./AlertCircle-Cnw5GhjM.js";import{i as tI}from"./AlertTriangle-DiiOmxZ5.js";import{i as nI}from"./X-gSzwTkxQ.js";import{d as rI,c as aI,e as iI,i as sI,f as oI,g as lI,C as uI,a as cI,u as dI}from"./use-deco-chat-open-BD3xJReE.js";import{i as pI}from"./ArrowLeft-2v2jDyMq.js";import{i as fI,t as G1,u as V1}from"./use-copy-BB2kbW8i.js";import{B as hI}from"./badge-DU-tZMJX.js";import{i as Sn}from"./Check-IyJXmB3D.js";import{i as mI}from"./Code01-CeGRGPJZ.js";import{b as gI}from"./use-virtual-mcp-gsGIP_cY.js";import{i as W1}from"./SearchMd-C4hV7R8V.js";import{u as bI}from"./use-create-virtual-mcp-CHG7UVpA.js";import{a as EI,O as TI,b as yI}from"./deco-constants-GtDdHPMJ.js";import{i as SI}from"./ChevronRight-CQzN9ZtD.js";import{a as fs}from"./Copy01-B7sbyU73.js";import{m as AI}from"./marked.esm-BaswSlok.js";import{f as ih,p as Am,a as Nm,n as vm,h as hs,s as va,o as df,b as NI,c as vI,d as Wn,v as _I,e as Y1,g as _m,m as CI,i as II,r as RI}from"./markdown-Dc-S7aGn.js";import{s as xI}from"./Eye-CF7Jsi4h.js";import{s as kI}from"./Globe02-CLsJ4yCM.js";import{s as wI}from"./XClose-MRwdozeO.js";import{c as OI,S as LI,d as DI,a as MI,b as PI}from"./select-DFuMzqKt.js";import{E as FI}from"./empty-state-DUeMScV0.js";import{g as BI,h as UI}from"./use-connection-DkSSfi9a.js";import{g as HI}from"./generate-id-Dyweu44Y.js";import{s as Cm}from"./Clock-BMY1eaW0.js";import{s as $I}from"./Trash01-DA9Iy0yG.js";const K1=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"}));K1.displayName="Activity";const X1=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"m21.152 10.9-9.015 9.015a5.25 5.25 0 0 1-7.425-7.425l9.016-9.015a3.5 3.5 0 1 1 4.95 4.95l-8.662 8.662a1.75 1.75 0 1 1-2.475-2.475l7.601-7.602"}));X1.displayName="Attachment01";const sh=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"m18 10-4-4M2.5 21.5l3.384-.376c.414-.046.62-.069.814-.131a2 2 0 0 0 .485-.234c.17-.111.317-.259.61-.553L21 7a2.828 2.828 0 1 0-4-4L3.794 16.206c-.294.294-.442.442-.553.611a2 2 0 0 0-.234.485c-.062.193-.085.4-.131.814L2.5 21.5Z"}));sh.displayName="Edit02";const Z1=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));Z1.displayName="Lightbulb01";const Q1=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));Q1.displayName="Stop";const J1=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));J1.displayName="Target04";const Im={}.hasOwnProperty;function eA(t,e){const n=e||{};function r(a,...i){let s=r.invalid;const o=r.handlers;if(a&&Im.call(a,t)){const l=String(a[t]);s=Im.call(o,l)?o[l]:r.unknown}if(s)return s.call(this,a,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function jI(t){const e={};for(const n of t.arguments??[])e[n.name]=n.required?si().min(1,"Required"):si();return Ar(e)}function qI(t){const e={};for(const n of t.arguments??[])e[n.name]="";return e}function tA(t){const e=Y.c(64),{prompt:n,setPrompt:r,onSubmit:a}=t,i=O.useId();let s;if(e[0]!==n){const P=n?jI(n):Ar({});s=w1(P),e[0]=n,e[1]=s}else s=e[1];const l=s;let u;e[2]!==n?(u=n?qI(n):{},e[2]=n,e[3]=u):u=e[3];let c;e[4]!==l||e[5]!==u?(c={resolver:l,defaultValues:u,mode:"onChange"},e[4]=l,e[5]=u,e[6]=c):c=e[6];const d=O1(c);let p;e[7]!==n?.arguments?(p=n?.arguments??[],e[7]=n?.arguments,e[8]=p):p=e[8];const f=p;let h;e[9]!==d||e[10]!==a||e[11]!==r?(h=async P=>{await a(P),r(null),d.reset()},e[9]=d,e[10]=a,e[11]=r,e[12]=h):h=e[12];const g=h;let b;e[13]!==d||e[14]!==r?(b=P=>{P||(d.reset(),r(null))},e[13]=d,e[14]=r,e[15]=b):b=e[15];const T=b;if(!n)return null;let y;e[16]!==n.name||e[17]!==n.title?(y=n.title||n.name.replace(/_/g," "),e[16]=n.name,e[17]=n.title,e[18]=y):y=e[18];let S;e[19]!==y?(S=E.jsx(zC,{children:y}),e[19]=y,e[20]=S):S=e[20];let A;e[21]!==n.description?(A=n.description&&E.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[21]=n.description,e[22]=A):A=e[22];let v;e[23]!==A||e[24]!==S?(v=E.jsxs(GC,{children:[S,A]}),e[23]=A,e[24]=S,e[25]=v):v=e[25];let N;e[26]!==d||e[27]!==g?(N=P=>{P.stopPropagation(),d.handleSubmit(g)(P)},e[26]=d,e[27]=g,e[28]=N):N=e[28];let _;if(e[29]!==f||e[30]!==d.control||e[31]!==d.formState.isSubmitting){let P;e[33]!==d.control||e[34]!==d.formState.isSubmitting?(P=W=>E.jsx(ls,{control:d.control,name:W.name,render:Z=>{const{field:K}=Z;return E.jsxs(us,{children:[E.jsxs(KC,{className:"text-xs",children:[W.name,W.required?null:E.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),E.jsx(cs,{children:E.jsx(j1,{...K,value:K.value??"",required:W.required,placeholder:W.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),E.jsx(ds,{})]})}},W.name),e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=P):P=e[35],_=f.map(P),e[29]=f,e[30]=d.control,e[31]=d.formState.isSubmitting,e[32]=_}else _=e[32];let x;e[36]!==T?(x=()=>T(!1),e[36]=T,e[37]=x):x=e[37];let R;e[38]!==d.formState.isSubmitting||e[39]!==x?(R=E.jsx(_e,{type:"button",variant:"ghost",onClick:x,disabled:d.formState.isSubmitting,children:"Cancel"}),e[38]=d.formState.isSubmitting,e[39]=x,e[40]=R):R=e[40];const L=!d.formState.isValid||d.formState.isSubmitting;let w;e[41]!==d.formState.isSubmitting?(w=d.formState.isSubmitting?E.jsxs("span",{className:"flex items-center gap-2",children:[E.jsx(is,{size:"xs"}),"Loading..."]}):"Use prompt",e[41]=d.formState.isSubmitting,e[42]=w):w=e[42];let M;e[43]!==i||e[44]!==L||e[45]!==w?(M=E.jsx(_e,{type:"submit",form:i,disabled:L,children:w}),e[43]=i,e[44]=L,e[45]=w,e[46]=M):M=e[46];let U;e[47]!==R||e[48]!==M?(U=E.jsxs(VC,{children:[R,M]}),e[47]=R,e[48]=M,e[49]=U):U=e[49];let B;e[50]!==i||e[51]!==N||e[52]!==_||e[53]!==U?(B=E.jsxs("form",{id:i,className:"space-y-4 py-4",autoComplete:"off",onSubmit:N,children:[_,U]}),e[50]=i,e[51]=N,e[52]=_,e[53]=U,e[54]=B):B=e[54];let V;e[55]!==d||e[56]!==B?(V=E.jsx(uf,{...d,children:B}),e[55]=d,e[56]=B,e[57]=V):V=e[57];let H;e[58]!==v||e[59]!==V?(H=E.jsxs(WC,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[v,V]}),e[58]=v,e[59]=V,e[60]=H):H=e[60];let z;return e[61]!==T||e[62]!==H?(z=E.jsx(YC,{open:!0,onOpenChange:T,children:H}),e[61]=T,e[62]=H,e[63]=z):z=e[63],z}function $e(t){this.content=t}$e.prototype={constructor:$e,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,a=r.find(t),i=r.content.slice();return a==-1?i.push(n||t,e):(i[a+1]=e,n&&(i[a]=n)),new $e(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new $e(n)},addToStart:function(t,e){return new $e([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new $e(n)},addBefore:function(t,e,n){var r=this.remove(e),a=r.content.slice(),i=r.find(t);return a.splice(i==-1?a.length:i,0,e,n),new $e(a)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=$e.from(t),t.size?new $e(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=$e.from(t),t.size?new $e(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=$e.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};$e.from=function(t){if(t instanceof $e)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new $e(e)};function nA(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let a=t.child(r),i=e.child(r);if(a==i){n+=a.nodeSize;continue}if(!a.sameMarkup(i))return n;if(a.isText&&a.text!=i.text){for(let s=0;a.text[s]==i.text[s];s++)n++;return n}if(a.content.size||i.content.size){let s=nA(a.content,i.content,n+1);if(s!=null)return s}n+=a.nodeSize}}function rA(t,e,n,r){for(let a=t.childCount,i=e.childCount;;){if(a==0||i==0)return a==i?null:{a:n,b:r};let s=t.child(--a),o=e.child(--i),l=s.nodeSize;if(s==o){n-=l,r-=l;continue}if(!s.sameMarkup(o))return{a:n,b:r};if(s.isText&&s.text!=o.text){let u=0,c=Math.min(s.text.length,o.text.length);for(;u<c&&s.text[s.text.length-u-1]==o.text[o.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||o.content.size){let u=rA(s.content,o.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class j{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,a=0,i){for(let s=0,o=0;o<n;s++){let l=this.content[s],u=o+l.nodeSize;if(u>e&&r(l,a+o,i||null,s)!==!1&&l.content.size){let c=o+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,a+c)}o=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,a){let i="",s=!0;return this.nodesBetween(e,n,(o,l)=>{let u=o.isText?o.text.slice(Math.max(e,l)-l,n-l):o.isLeaf?a?typeof a=="function"?a(o):a:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&u||o.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,a=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(a[a.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)a.push(e.content[i]);return new j(a,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],a=0;if(n>e)for(let i=0,s=0;s<n;i++){let o=this.content[i],l=s+o.nodeSize;l>e&&((s<e||l>n)&&(o.isText?o=o.cut(Math.max(0,e-s),Math.min(o.text.length,n-s)):o=o.cut(Math.max(0,e-s-1),Math.min(o.content.size,n-s-1))),r.push(o),a+=o.nodeSize),s=l}return new j(r,a)}cutByIndex(e,n){return e==n?j.empty:e==0&&n==this.content.length?this:new j(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let a=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return a[e]=n,new j(a,i)}addToStart(e){return new j([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new j(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let a=this.content[n];e(a,r,n),r+=a.nodeSize}}findDiffStart(e,n=0){return nA(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return rA(this,e,n,r)}findIndex(e){if(e==0)return Da(0,e);if(e==this.size)return Da(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let a=this.child(n),i=r+a.nodeSize;if(i>=e)return i==e?Da(n+1,i):Da(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return j.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new j(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return j.empty;let n,r=0;for(let a=0;a<e.length;a++){let i=e[a];r+=i.nodeSize,a&&i.isText&&e[a-1].sameMarkup(i)?(n||(n=e.slice(0,a)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new j(n||e,r)}static from(e){if(!e)return j.empty;if(e instanceof j)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new j([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}j.empty=new j([],0);const zs={index:0,offset:0};function Da(t,e){return zs.index=t,zs.offset=e,zs}function li(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!li(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!li(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let fe=class pf{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let a=0;a<e.length;a++){let i=e[a];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,a));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,a)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&li(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let a=r.create(n.attrs);return r.checkAttrs(a.attrs),a}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return pf.none;if(e instanceof pf)return[e];let n=e.slice();return n.sort((r,a)=>r.type.rank-a.type.rank),n}};fe.none=[];class ui extends Error{}class X{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=iA(this.content,e+this.openStart,n);return r&&new X(r,this.openStart,this.openEnd)}removeBetween(e,n){return new X(aA(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return X.empty;let r=n.openStart||0,a=n.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new X(j.fromJSON(e,n.content),r,a)}static maxOpen(e,n=!0){let r=0,a=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)a++;return new X(e,r,a)}}X.empty=new X(j.empty,0,0);function aA(t,e,n){let{index:r,offset:a}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:o}=t.findIndex(n);if(a==e||i.isText){if(o!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(aA(i.content,e-a-1,n-a-1)))}function iA(t,e,n,r){let{index:a,offset:i}=t.findIndex(e),s=t.maybeChild(a);if(i==e||s.isText)return r&&!r.canReplace(a,a,n)?null:t.cut(0,e).append(n).append(t.cut(e));let o=iA(s.content,e-i-1,n,s);return o&&t.replaceChild(a,s.copy(o))}function zI(t,e,n){if(n.openStart>t.depth)throw new ui("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ui("Inconsistent open depths");return sA(t,e,n,0)}function sA(t,e,n,r){let a=t.index(r),i=t.node(r);if(a==e.index(r)&&r<t.depth-n.openStart){let s=sA(t,e,n,r+1);return i.copy(i.content.replaceChild(a,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,o=s.content;return Pn(s,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}else{let{start:s,end:o}=GI(n,t);return Pn(i,lA(t,s,o,e,r))}else return Pn(i,ci(t,e,r))}function oA(t,e){if(!e.type.compatibleContent(t.type))throw new ui("Cannot join "+e.type.name+" onto "+t.type.name)}function ff(t,e,n){let r=t.node(n);return oA(r,e.node(n)),r}function Mn(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Wr(t,e,n,r){let a=(e||t).node(n),i=0,s=e?e.index(n):a.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Mn(t.nodeAfter,r),i++));for(let o=i;o<s;o++)Mn(a.child(o),r);e&&e.depth==n&&e.textOffset&&Mn(e.nodeBefore,r)}function Pn(t,e){return t.type.checkContent(e),t.copy(e)}function lA(t,e,n,r,a){let i=t.depth>a&&ff(t,e,a+1),s=r.depth>a&&ff(n,r,a+1),o=[];return Wr(null,t,a,o),i&&s&&e.index(a)==n.index(a)?(oA(i,s),Mn(Pn(i,lA(t,e,n,r,a+1)),o)):(i&&Mn(Pn(i,ci(t,e,a+1)),o),Wr(e,n,a,o),s&&Mn(Pn(s,ci(n,r,a+1)),o)),Wr(r,null,a,o),new j(o)}function ci(t,e,n){let r=[];if(Wr(null,t,n,r),t.depth>n){let a=ff(t,e,n+1);Mn(Pn(a,ci(t,e,n+1)),r)}return Wr(e,null,n,r),new j(r)}function GI(t,e){let n=e.depth-t.openStart,a=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)a=e.node(i).copy(j.from(a));return{start:a.resolveNoCache(t.openStart+n),end:a.resolveNoCache(a.content.size-t.openEnd-n)}}class ua{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=e.child(n);return r?e.child(n).cut(r):a}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],a=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)a+=r.child(i).nodeSize;return a}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return fe.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),a=e.maybeChild(n);if(!r){let o=r;r=a,a=o}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!a||!i[s].isInSet(a.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,a=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!a||!r[i].isInSet(a.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new di(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],a=0,i=n;for(let s=e;;){let{index:o,offset:l}=s.content.findIndex(i),u=i-l;if(r.push(s,o,a+l),!u||(s=s.child(o),s.isText))break;i=u-1,a+=l+1}return new ua(n,r,i)}static resolveCached(e,n){let r=Rm.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else Rm.set(e,r=new VI);let a=r.elts[r.i]=ua.resolve(e,n);return r.i=(r.i+1)%WI,a}}class VI{constructor(){this.elts=[],this.i=0}}const WI=12,Rm=new WeakMap;class di{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const YI=Object.create(null);let hn=class hf{constructor(e,n,r,a=fe.none){this.type=e,this.attrs=n,this.marks=a,this.content=r||j.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,a=0){this.content.nodesBetween(e,n,r,a,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,a){return this.content.textBetween(e,n,r,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&li(this.attrs,n||e.defaultAttrs||YI)&&fe.sameSet(this.marks,r||fe.none)}copy(e=null){return e==this.content?this:new hf(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new hf(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return X.empty;let a=this.resolve(e),i=this.resolve(n),s=r?0:a.sharedDepth(n),o=a.start(s),u=a.node(s).content.cut(a.pos-o,i.pos-o);return new X(u,a.depth-s,i.depth-s)}replace(e,n,r){return zI(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:a}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(a==e||n.isText)return n;e-=a+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let a=this.content.child(n-1);return{node:a,index:n-1,offset:r-a.nodeSize}}resolve(e){return ua.resolveCached(this,e)}resolveNoCache(e){return ua.resolve(this,e)}rangeHasMark(e,n,r){let a=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(a=!0),!a)),a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),uA(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=j.empty,a=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,a,i),o=s&&s.matchFragment(this.content,n);if(!o||!o.validEnd)return!1;for(let l=a;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,a){if(a&&!this.type.allowsMarks(a))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=fe.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!fe.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let a=j.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,a,r);return i.type.checkAttrs(i.attrs),i}};hn.prototype.text=void 0;class pi extends hn{constructor(e,n,r,a){if(super(e,n,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):uA(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new pi(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new pi(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function uA(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class jn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new KI(e,n);if(r.next==null)return jn.empty;let a=cA(r);r.next&&r.err("Unexpected trailing text");let i=nR(tR(a));return rR(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let a=this;for(let i=n;a&&i<r;i++)a=a.matchType(e.child(i).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let a=[this];function i(s,o){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return j.from(o.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&a.indexOf(d)==-1){a.push(d);let p=i(d,o.concat(c));if(p)return p}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),i=a.match;if(i.matchType(e)){let s=[];for(let o=a;o.type;o=o.via)s.push(o.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:o,next:l}=i.next[s];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in n)&&(!a.type||l.validEnd)&&(r.push({match:o.contentMatch,type:o,via:a}),n[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let a=0;a<r.next.length;a++)e.indexOf(r.next[a].next)==-1&&n(r.next[a].next)}return n(this),e.map((r,a)=>{let i=a+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
1
+ import{r as O,c as Y,o as Ar,k as w1,l as O1,j as E,s as si,bZ as L1,b_ as yC,bm as Qe,b$ as SC,G as D1,u as Nr,t as Yt,al as AC,c0 as NC,b5 as M1,c1 as vC,c2 as Mt,c3 as js,c4 as _C,c5 as qs,c6 as CC,c7 as IC,c8 as RC,c9 as xC,n as kC,K as rh,ca as wC,cb as OC,cc as LC,cd as DC,m as P1,b as F1,O as Xa,ce as oi,bs as MC,d as PC}from"./index-CMIePc8v.js";import{B as _e,c as ee}from"./button-DDY6hri1.js";import{u as rs,b as as,m as B1,M as FC,t as U1,C as BC}from"./context-BoqYBHof.js";import{b as vr,P as _r,a as Cr}from"./popover-CdPr2kUy.js";import{S as Tm,u as UC}from"./skeleton-BAWgWTH6.js";import{S as is}from"./spinner-C5H8EOvR.js";import{T as ot,a as lt,b as ut,c as ss}from"./tooltip-Kun6OEqc.js";import{d as H1,u as ah,i as dr,f as HC}from"./constants-BWuwqVaf.js";import{u as $C,g as $1,l as ym,a as Sm,r as jC}from"./use-mcp-prompts-CTAKOvKB.js";import{E as qC}from"./error-boundary-BbdoNwwk.js";import{c as zC,b as GC,e as VC,a as WC,D as YC}from"./dialog-AmArt43J.js";import{a as uf,F as ls,b as us,c as KC,d as cs,f as ds}from"./form-Bsyh-cQj.js";import{I as j1}from"./input-Je9XV62u.js";import{I as ps}from"./integration-icon-DeiJ75EP.js";import{c as XC,a as ZC,e as QC}from"./usage-B8eRkRZY.js";import{i as JC}from"./ArrowUp-CCTJ8tar.js";import{t as cf}from"./ChevronDown-BK0Z-3ss.js";import{i as q1}from"./Edit01-Een9NeGa.js";import{t as pr}from"./Users03-CfBv5uVc.js";import{i as eI}from"./XCircle-CdrNrzcr.js";import{i as z1}from"./AlertCircle-CAn1onHH.js";import{i as tI}from"./AlertTriangle-Suhq71Ba.js";import{i as nI}from"./X-nbY3n5YX.js";import{d as rI,c as aI,e as iI,i as sI,f as oI,g as lI,C as uI,a as cI,u as dI}from"./use-deco-chat-open-DqF5WsjN.js";import{i as pI}from"./ArrowLeft-DkojAdWe.js";import{i as fI,t as G1,u as V1}from"./use-copy-BLt7-cw9.js";import{B as hI}from"./badge-EvnzqGBM.js";import{i as Sn}from"./Check-2BTd1528.js";import{i as mI}from"./Code01-D7rt1C5k.js";import{b as gI}from"./use-virtual-mcp-chylq6BL.js";import{i as W1}from"./SearchMd-B22BWSrE.js";import{u as bI}from"./use-create-virtual-mcp-BWbRPuCZ.js";import{a as EI,O as TI,b as yI}from"./deco-constants-Lndb0_Fi.js";import{i as SI}from"./ChevronRight-CpFHeZ-k.js";import{a as fs}from"./Copy01-CWD2XYkN.js";import{m as AI}from"./marked.esm-BaswSlok.js";import{f as ih,p as Am,a as Nm,n as vm,h as hs,s as va,o as df,b as NI,c as vI,d as Wn,v as _I,e as Y1,g as _m,m as CI,i as II,r as RI}from"./markdown-BshJmJUr.js";import{s as xI}from"./Eye-cRMKwlob.js";import{s as kI}from"./Globe02-BzI-D3XF.js";import{s as wI}from"./XClose-DHV8bqGR.js";import{c as OI,S as LI,d as DI,a as MI,b as PI}from"./select-B9AjxT2Q.js";import{E as FI}from"./empty-state-CUU2GnRG.js";import{g as BI,h as UI}from"./use-connection-CZeLlUDa.js";import{g as HI}from"./generate-id-Dyweu44Y.js";import{s as Cm}from"./Clock-DWLl74MU.js";import{s as $I}from"./Trash01-NHvYJiOw.js";const K1=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"}));K1.displayName="Activity";const X1=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"m21.152 10.9-9.015 9.015a5.25 5.25 0 0 1-7.425-7.425l9.016-9.015a3.5 3.5 0 1 1 4.95 4.95l-8.662 8.662a1.75 1.75 0 1 1-2.475-2.475l7.601-7.602"}));X1.displayName="Attachment01";const sh=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"m18 10-4-4M2.5 21.5l3.384-.376c.414-.046.62-.069.814-.131a2 2 0 0 0 .485-.234c.17-.111.317-.259.61-.553L21 7a2.828 2.828 0 1 0-4-4L3.794 16.206c-.294.294-.442.442-.553.611a2 2 0 0 0-.234.485c-.062.193-.085.4-.131.814L2.5 21.5Z"}));sh.displayName="Edit02";const Z1=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));Z1.displayName="Lightbulb01";const Q1=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));Q1.displayName="Stop";const J1=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));J1.displayName="Target04";const Im={}.hasOwnProperty;function eA(t,e){const n=e||{};function r(a,...i){let s=r.invalid;const o=r.handlers;if(a&&Im.call(a,t)){const l=String(a[t]);s=Im.call(o,l)?o[l]:r.unknown}if(s)return s.call(this,a,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function jI(t){const e={};for(const n of t.arguments??[])e[n.name]=n.required?si().min(1,"Required"):si();return Ar(e)}function qI(t){const e={};for(const n of t.arguments??[])e[n.name]="";return e}function tA(t){const e=Y.c(64),{prompt:n,setPrompt:r,onSubmit:a}=t,i=O.useId();let s;if(e[0]!==n){const P=n?jI(n):Ar({});s=w1(P),e[0]=n,e[1]=s}else s=e[1];const l=s;let u;e[2]!==n?(u=n?qI(n):{},e[2]=n,e[3]=u):u=e[3];let c;e[4]!==l||e[5]!==u?(c={resolver:l,defaultValues:u,mode:"onChange"},e[4]=l,e[5]=u,e[6]=c):c=e[6];const d=O1(c);let p;e[7]!==n?.arguments?(p=n?.arguments??[],e[7]=n?.arguments,e[8]=p):p=e[8];const f=p;let h;e[9]!==d||e[10]!==a||e[11]!==r?(h=async P=>{await a(P),r(null),d.reset()},e[9]=d,e[10]=a,e[11]=r,e[12]=h):h=e[12];const g=h;let b;e[13]!==d||e[14]!==r?(b=P=>{P||(d.reset(),r(null))},e[13]=d,e[14]=r,e[15]=b):b=e[15];const T=b;if(!n)return null;let y;e[16]!==n.name||e[17]!==n.title?(y=n.title||n.name.replace(/_/g," "),e[16]=n.name,e[17]=n.title,e[18]=y):y=e[18];let S;e[19]!==y?(S=E.jsx(zC,{children:y}),e[19]=y,e[20]=S):S=e[20];let A;e[21]!==n.description?(A=n.description&&E.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[21]=n.description,e[22]=A):A=e[22];let v;e[23]!==A||e[24]!==S?(v=E.jsxs(GC,{children:[S,A]}),e[23]=A,e[24]=S,e[25]=v):v=e[25];let N;e[26]!==d||e[27]!==g?(N=P=>{P.stopPropagation(),d.handleSubmit(g)(P)},e[26]=d,e[27]=g,e[28]=N):N=e[28];let _;if(e[29]!==f||e[30]!==d.control||e[31]!==d.formState.isSubmitting){let P;e[33]!==d.control||e[34]!==d.formState.isSubmitting?(P=W=>E.jsx(ls,{control:d.control,name:W.name,render:Z=>{const{field:K}=Z;return E.jsxs(us,{children:[E.jsxs(KC,{className:"text-xs",children:[W.name,W.required?null:E.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),E.jsx(cs,{children:E.jsx(j1,{...K,value:K.value??"",required:W.required,placeholder:W.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),E.jsx(ds,{})]})}},W.name),e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=P):P=e[35],_=f.map(P),e[29]=f,e[30]=d.control,e[31]=d.formState.isSubmitting,e[32]=_}else _=e[32];let x;e[36]!==T?(x=()=>T(!1),e[36]=T,e[37]=x):x=e[37];let R;e[38]!==d.formState.isSubmitting||e[39]!==x?(R=E.jsx(_e,{type:"button",variant:"ghost",onClick:x,disabled:d.formState.isSubmitting,children:"Cancel"}),e[38]=d.formState.isSubmitting,e[39]=x,e[40]=R):R=e[40];const L=!d.formState.isValid||d.formState.isSubmitting;let w;e[41]!==d.formState.isSubmitting?(w=d.formState.isSubmitting?E.jsxs("span",{className:"flex items-center gap-2",children:[E.jsx(is,{size:"xs"}),"Loading..."]}):"Use prompt",e[41]=d.formState.isSubmitting,e[42]=w):w=e[42];let M;e[43]!==i||e[44]!==L||e[45]!==w?(M=E.jsx(_e,{type:"submit",form:i,disabled:L,children:w}),e[43]=i,e[44]=L,e[45]=w,e[46]=M):M=e[46];let U;e[47]!==R||e[48]!==M?(U=E.jsxs(VC,{children:[R,M]}),e[47]=R,e[48]=M,e[49]=U):U=e[49];let B;e[50]!==i||e[51]!==N||e[52]!==_||e[53]!==U?(B=E.jsxs("form",{id:i,className:"space-y-4 py-4",autoComplete:"off",onSubmit:N,children:[_,U]}),e[50]=i,e[51]=N,e[52]=_,e[53]=U,e[54]=B):B=e[54];let V;e[55]!==d||e[56]!==B?(V=E.jsx(uf,{...d,children:B}),e[55]=d,e[56]=B,e[57]=V):V=e[57];let H;e[58]!==v||e[59]!==V?(H=E.jsxs(WC,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[v,V]}),e[58]=v,e[59]=V,e[60]=H):H=e[60];let z;return e[61]!==T||e[62]!==H?(z=E.jsx(YC,{open:!0,onOpenChange:T,children:H}),e[61]=T,e[62]=H,e[63]=z):z=e[63],z}function $e(t){this.content=t}$e.prototype={constructor:$e,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,a=r.find(t),i=r.content.slice();return a==-1?i.push(n||t,e):(i[a+1]=e,n&&(i[a]=n)),new $e(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new $e(n)},addToStart:function(t,e){return new $e([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new $e(n)},addBefore:function(t,e,n){var r=this.remove(e),a=r.content.slice(),i=r.find(t);return a.splice(i==-1?a.length:i,0,e,n),new $e(a)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=$e.from(t),t.size?new $e(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=$e.from(t),t.size?new $e(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=$e.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};$e.from=function(t){if(t instanceof $e)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new $e(e)};function nA(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let a=t.child(r),i=e.child(r);if(a==i){n+=a.nodeSize;continue}if(!a.sameMarkup(i))return n;if(a.isText&&a.text!=i.text){for(let s=0;a.text[s]==i.text[s];s++)n++;return n}if(a.content.size||i.content.size){let s=nA(a.content,i.content,n+1);if(s!=null)return s}n+=a.nodeSize}}function rA(t,e,n,r){for(let a=t.childCount,i=e.childCount;;){if(a==0||i==0)return a==i?null:{a:n,b:r};let s=t.child(--a),o=e.child(--i),l=s.nodeSize;if(s==o){n-=l,r-=l;continue}if(!s.sameMarkup(o))return{a:n,b:r};if(s.isText&&s.text!=o.text){let u=0,c=Math.min(s.text.length,o.text.length);for(;u<c&&s.text[s.text.length-u-1]==o.text[o.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||o.content.size){let u=rA(s.content,o.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class j{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,a=0,i){for(let s=0,o=0;o<n;s++){let l=this.content[s],u=o+l.nodeSize;if(u>e&&r(l,a+o,i||null,s)!==!1&&l.content.size){let c=o+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,a+c)}o=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,a){let i="",s=!0;return this.nodesBetween(e,n,(o,l)=>{let u=o.isText?o.text.slice(Math.max(e,l)-l,n-l):o.isLeaf?a?typeof a=="function"?a(o):a:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&u||o.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,a=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(a[a.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)a.push(e.content[i]);return new j(a,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],a=0;if(n>e)for(let i=0,s=0;s<n;i++){let o=this.content[i],l=s+o.nodeSize;l>e&&((s<e||l>n)&&(o.isText?o=o.cut(Math.max(0,e-s),Math.min(o.text.length,n-s)):o=o.cut(Math.max(0,e-s-1),Math.min(o.content.size,n-s-1))),r.push(o),a+=o.nodeSize),s=l}return new j(r,a)}cutByIndex(e,n){return e==n?j.empty:e==0&&n==this.content.length?this:new j(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let a=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return a[e]=n,new j(a,i)}addToStart(e){return new j([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new j(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let a=this.content[n];e(a,r,n),r+=a.nodeSize}}findDiffStart(e,n=0){return nA(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return rA(this,e,n,r)}findIndex(e){if(e==0)return Da(0,e);if(e==this.size)return Da(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let a=this.child(n),i=r+a.nodeSize;if(i>=e)return i==e?Da(n+1,i):Da(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return j.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new j(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return j.empty;let n,r=0;for(let a=0;a<e.length;a++){let i=e[a];r+=i.nodeSize,a&&i.isText&&e[a-1].sameMarkup(i)?(n||(n=e.slice(0,a)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new j(n||e,r)}static from(e){if(!e)return j.empty;if(e instanceof j)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new j([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}j.empty=new j([],0);const zs={index:0,offset:0};function Da(t,e){return zs.index=t,zs.offset=e,zs}function li(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!li(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!li(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let fe=class pf{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let a=0;a<e.length;a++){let i=e[a];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,a));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,a)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&li(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let a=r.create(n.attrs);return r.checkAttrs(a.attrs),a}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return pf.none;if(e instanceof pf)return[e];let n=e.slice();return n.sort((r,a)=>r.type.rank-a.type.rank),n}};fe.none=[];class ui extends Error{}class X{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=iA(this.content,e+this.openStart,n);return r&&new X(r,this.openStart,this.openEnd)}removeBetween(e,n){return new X(aA(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return X.empty;let r=n.openStart||0,a=n.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new X(j.fromJSON(e,n.content),r,a)}static maxOpen(e,n=!0){let r=0,a=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)a++;return new X(e,r,a)}}X.empty=new X(j.empty,0,0);function aA(t,e,n){let{index:r,offset:a}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:o}=t.findIndex(n);if(a==e||i.isText){if(o!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(aA(i.content,e-a-1,n-a-1)))}function iA(t,e,n,r){let{index:a,offset:i}=t.findIndex(e),s=t.maybeChild(a);if(i==e||s.isText)return r&&!r.canReplace(a,a,n)?null:t.cut(0,e).append(n).append(t.cut(e));let o=iA(s.content,e-i-1,n,s);return o&&t.replaceChild(a,s.copy(o))}function zI(t,e,n){if(n.openStart>t.depth)throw new ui("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ui("Inconsistent open depths");return sA(t,e,n,0)}function sA(t,e,n,r){let a=t.index(r),i=t.node(r);if(a==e.index(r)&&r<t.depth-n.openStart){let s=sA(t,e,n,r+1);return i.copy(i.content.replaceChild(a,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,o=s.content;return Pn(s,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}else{let{start:s,end:o}=GI(n,t);return Pn(i,lA(t,s,o,e,r))}else return Pn(i,ci(t,e,r))}function oA(t,e){if(!e.type.compatibleContent(t.type))throw new ui("Cannot join "+e.type.name+" onto "+t.type.name)}function ff(t,e,n){let r=t.node(n);return oA(r,e.node(n)),r}function Mn(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Wr(t,e,n,r){let a=(e||t).node(n),i=0,s=e?e.index(n):a.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Mn(t.nodeAfter,r),i++));for(let o=i;o<s;o++)Mn(a.child(o),r);e&&e.depth==n&&e.textOffset&&Mn(e.nodeBefore,r)}function Pn(t,e){return t.type.checkContent(e),t.copy(e)}function lA(t,e,n,r,a){let i=t.depth>a&&ff(t,e,a+1),s=r.depth>a&&ff(n,r,a+1),o=[];return Wr(null,t,a,o),i&&s&&e.index(a)==n.index(a)?(oA(i,s),Mn(Pn(i,lA(t,e,n,r,a+1)),o)):(i&&Mn(Pn(i,ci(t,e,a+1)),o),Wr(e,n,a,o),s&&Mn(Pn(s,ci(n,r,a+1)),o)),Wr(r,null,a,o),new j(o)}function ci(t,e,n){let r=[];if(Wr(null,t,n,r),t.depth>n){let a=ff(t,e,n+1);Mn(Pn(a,ci(t,e,n+1)),r)}return Wr(e,null,n,r),new j(r)}function GI(t,e){let n=e.depth-t.openStart,a=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)a=e.node(i).copy(j.from(a));return{start:a.resolveNoCache(t.openStart+n),end:a.resolveNoCache(a.content.size-t.openEnd-n)}}class ua{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=e.child(n);return r?e.child(n).cut(r):a}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],a=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)a+=r.child(i).nodeSize;return a}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return fe.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),a=e.maybeChild(n);if(!r){let o=r;r=a,a=o}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!a||!i[s].isInSet(a.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,a=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!a||!r[i].isInSet(a.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new di(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],a=0,i=n;for(let s=e;;){let{index:o,offset:l}=s.content.findIndex(i),u=i-l;if(r.push(s,o,a+l),!u||(s=s.child(o),s.isText))break;i=u-1,a+=l+1}return new ua(n,r,i)}static resolveCached(e,n){let r=Rm.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else Rm.set(e,r=new VI);let a=r.elts[r.i]=ua.resolve(e,n);return r.i=(r.i+1)%WI,a}}class VI{constructor(){this.elts=[],this.i=0}}const WI=12,Rm=new WeakMap;class di{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const YI=Object.create(null);let hn=class hf{constructor(e,n,r,a=fe.none){this.type=e,this.attrs=n,this.marks=a,this.content=r||j.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,a=0){this.content.nodesBetween(e,n,r,a,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,a){return this.content.textBetween(e,n,r,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&li(this.attrs,n||e.defaultAttrs||YI)&&fe.sameSet(this.marks,r||fe.none)}copy(e=null){return e==this.content?this:new hf(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new hf(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return X.empty;let a=this.resolve(e),i=this.resolve(n),s=r?0:a.sharedDepth(n),o=a.start(s),u=a.node(s).content.cut(a.pos-o,i.pos-o);return new X(u,a.depth-s,i.depth-s)}replace(e,n,r){return zI(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:a}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(a==e||n.isText)return n;e-=a+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let a=this.content.child(n-1);return{node:a,index:n-1,offset:r-a.nodeSize}}resolve(e){return ua.resolveCached(this,e)}resolveNoCache(e){return ua.resolve(this,e)}rangeHasMark(e,n,r){let a=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(a=!0),!a)),a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),uA(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=j.empty,a=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,a,i),o=s&&s.matchFragment(this.content,n);if(!o||!o.validEnd)return!1;for(let l=a;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,a){if(a&&!this.type.allowsMarks(a))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=fe.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!fe.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let a=j.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,a,r);return i.type.checkAttrs(i.attrs),i}};hn.prototype.text=void 0;class pi extends hn{constructor(e,n,r,a){if(super(e,n,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):uA(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new pi(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new pi(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function uA(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class jn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new KI(e,n);if(r.next==null)return jn.empty;let a=cA(r);r.next&&r.err("Unexpected trailing text");let i=nR(tR(a));return rR(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let a=this;for(let i=n;a&&i<r;i++)a=a.matchType(e.child(i).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let a=[this];function i(s,o){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return j.from(o.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&a.indexOf(d)==-1){a.push(d);let p=i(d,o.concat(c));if(p)return p}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),i=a.match;if(i.matchType(e)){let s=[];for(let o=a;o.type;o=o.via)s.push(o.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:o,next:l}=i.next[s];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in n)&&(!a.type||l.validEnd)&&(r.push({match:o.contentMatch,type:o,via:a}),n[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let a=0;a<r.next.length;a++)e.indexOf(r.next[a].next)==-1&&n(r.next[a].next)}return n(this),e.map((r,a)=>{let i=a+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
2
2
  `)}}jn.empty=new jn(!0);class KI{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function cA(t){let e=[];do e.push(XI(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function XI(t){let e=[];do e.push(ZI(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function ZI(t){let e=eR(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=QI(t,e);else break;return e}function xm(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function QI(t,e){let n=xm(t),r=n;return t.eat(",")&&(t.next!="}"?r=xm(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function JI(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let a=[];for(let i in n){let s=n[i];s.isInGroup(e)&&a.push(s)}return a.length==0&&t.err("No node type or group '"+e+"' found"),a}function eR(t){if(t.eat("(")){let e=cA(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=JI(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function tR(t){let e=[[]];return a(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,o,l){let u={term:l,to:o};return e[s].push(u),u}function a(s,o){s.forEach(l=>l.to=o)}function i(s,o){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(i(u,o)),[]);if(s.type=="seq")for(let l=0;;l++){let u=i(s.exprs[l],o);if(l==s.exprs.length-1)return u;a(u,o=n())}else if(s.type=="star"){let l=n();return r(o,l),a(i(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return a(i(s.expr,o),l),a(i(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(o)].concat(i(s.expr,o));if(s.type=="range"){let l=o;for(let u=0;u<s.min;u++){let c=n();a(i(s.expr,l),c),l=c}if(s.max==-1)a(i(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let c=n();r(l,c),a(i(s.expr,l),c),l=c}return[r(l)]}else{if(s.type=="name")return[r(o,void 0,s.value)];throw new Error("Unknown expr type")}}}}function dA(t,e){return e-t}function km(t,e){let n=[];return r(e),n.sort(dA);function r(a){let i=t[a];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(a);for(let s=0;s<i.length;s++){let{term:o,to:l}=i[s];!o&&n.indexOf(l)==-1&&r(l)}}}function nR(t){let e=Object.create(null);return n(km(t,0));function n(r){let a=[];r.forEach(s=>{t[s].forEach(({term:o,to:l})=>{if(!o)return;let u;for(let c=0;c<a.length;c++)a[c][0]==o&&(u=a[c][1]);km(t,l).forEach(c=>{u||a.push([o,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=e[r.join(",")]=new jn(r.indexOf(t.length-1)>-1);for(let s=0;s<a.length;s++){let o=a[s][1].sort(dA);i.next.push({type:a[s][0],next:e[o.join(",")]||n(o)})}return i}}function rR(t,e){for(let n=0,r=[t];n<r.length;n++){let a=r[n],i=!a.validEnd,s=[];for(let o=0;o<a.next.length;o++){let{type:l,next:u}=a.next[o];s.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(u)==-1&&r.push(u)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function pA(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function fA(t,e){let n=Object.create(null);for(let r in t){let a=e&&e[r];if(a===void 0){let i=t[r];if(i.hasDefault)a=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=a}return n}function hA(t,e,n,r){for(let a in e)if(!(a in t))throw new RangeError(`Unsupported attribute ${a} for ${n} of type ${a}`);for(let a in t){let i=t[a];i.validate&&i.validate(e[a])}}function mA(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new iR(t,r,e[r]);return n}let wm=class gA{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=mA(e,r.attrs),this.defaultAttrs=pA(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==jn.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:fA(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new hn(this,this.computeAttrs(e),j.from(n),fe.setFrom(r))}createChecked(e=null,n,r){return n=j.from(n),this.checkContent(n),new hn(this,this.computeAttrs(e),n,fe.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=j.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let a=this.contentMatch.matchFragment(n),i=a&&a.fillBefore(j.empty,!0);return i?new hn(this,e,n.append(i),fe.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){hA(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:fe.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new gA(i,n,s));let a=n.spec.topNode||"doc";if(!r[a])throw new RangeError("Schema is missing its top node type ('"+a+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function aR(t,e,n){let r=n.split("|");return a=>{let i=a===null?"null":typeof a;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class iR{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?aR(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ms{constructor(e,n,r,a){this.name=e,this.rank=n,this.schema=r,this.spec=a,this.attrs=mA(e,a.attrs),this.excluded=null;let i=pA(this.attrs);this.instance=i?new fe(this,i):null}create(e=null){return!e&&this.instance?this.instance:new fe(this,fA(this.attrs,e))}static compile(e,n){let r=Object.create(null),a=0;return e.forEach((i,s)=>r[i]=new ms(i,a++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){hA(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class bA{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let a in e)n[a]=e[a];n.nodes=$e.from(e.nodes),n.marks=$e.from(e.marks||{}),this.nodes=wm.compile(this.spec.nodes,this),this.marks=ms.compile(this.spec.marks,this);let r=Object.create(null);for(let a in this.nodes){if(a in this.marks)throw new RangeError(a+" can not be both a node and a mark");let i=this.nodes[a],s=i.spec.content||"",o=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=jn.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=o=="_"?null:o?Om(this,o.split(" ")):o==""||!i.inlineContent?[]:null}for(let a in this.marks){let i=this.marks[a],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:Om(this,s.split(" "))}this.nodeFromJSON=a=>hn.fromJSON(this,a),this.markFromJSON=a=>fe.fromJSON(this,a),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,a){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof wm){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,a)}text(e,n){let r=this.nodes.text;return new pi(r,r.defaultAttrs,e,fe.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function Om(t,e){let n=[];for(let r=0;r<e.length;r++){let a=e[r],i=t.marks[a],s=i;if(i)n.push(i);else for(let o in t.marks){let l=t.marks[o];(a=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(a)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function sR(t){return t.tag!=null}function oR(t){return t.style!=null}class mn{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(a=>{if(sR(a))this.tags.push(a);else if(oR(a)){let i=/[^=]*/.exec(a.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(a)}}),this.normalizeLists=!this.tags.some(a=>{if(!/^(ul|ol)\b/.test(a.tag)||!a.node)return!1;let i=e.nodes[a.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new Dm(this,n,!1);return r.addAll(e,fe.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Dm(this,n,!0);return r.addAll(e,fe.none,n.from,n.to),X.maxOpen(r.finish())}matchTag(e,n,r){for(let a=r?this.tags.indexOf(r)+1:0;a<this.tags.length;a++){let i=this.tags[a];if(cR(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,r,a){for(let i=a?this.styles.indexOf(a)+1:0;i<this.styles.length;i++){let s=this.styles[i],o=s.style;if(!(o.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||o.length>e.length&&(o.charCodeAt(e.length)!=61||o.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(a){let i=a.priority==null?50:a.priority,s=0;for(;s<n.length;s++){let o=n[s];if((o.priority==null?50:o.priority)<i)break}n.splice(s,0,a)}for(let a in e.marks){let i=e.marks[a].spec.parseDOM;i&&i.forEach(s=>{r(s=Mm(s)),s.mark||s.ignore||s.clearMark||(s.mark=a)})}for(let a in e.nodes){let i=e.nodes[a].spec.parseDOM;i&&i.forEach(s=>{r(s=Mm(s)),s.node||s.ignore||s.mark||(s.node=a)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new mn(e,mn.schemaRules(e)))}}const EA={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},lR={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},TA={ol:!0,ul:!0},ca=1,mf=2,Yr=4;function Lm(t,e,n){return e!=null?(e?ca:0)|(e==="full"?mf:0):t&&t.whitespace=="pre"?ca|mf:n&~Yr}class Ma{constructor(e,n,r,a,i,s){this.type=e,this.attrs=n,this.marks=r,this.solid=a,this.options=s,this.content=[],this.activeMarks=fe.none,this.match=i||(s&Yr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(j.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,a;return(a=r.findWrapping(e.type))?(this.match=r,a):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&ca)){let r=this.content[this.content.length-1],a;if(r&&r.isText&&(a=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==a[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-a[0].length))}}let n=j.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(j.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!EA.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Dm{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let a=n.topNode,i,s=Lm(null,n.preserveWhitespace,0)|(r?Yr:0);a?i=new Ma(a.type,a.attrs,fe.none,!0,n.topMatch||a.type.contentMatch,s):r?i=new Ma(null,null,fe.none,!0,null,s):i=new Ma(e.schema.topNodeType,null,fe.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,a=this.top,i=a.options&mf?"full":this.localPreserveWS||(a.options&ca)>0,{schema:s}=this.parser;if(i==="full"||a.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
3
3
  `);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let o=r.split(/\r?\n|\r/);for(let l=0;l<o.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),o[l]&&this.insertNode(s.text(o[l]),n,!/\S/.test(o[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=a.content[a.content.length-1],l=e.previousSibling;(!o||l&&l.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let a=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),o;TA.hasOwnProperty(s)&&this.parser.normalizeLists&&uR(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,r));e:if(l?l.ignore:lR.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(EA.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),u=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(i),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?o:void 0)}this.localPreserveWS=a}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
4
  `),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let a=0;a<this.parser.matchedStyles.length;a++){let i=this.parser.matchedStyles[a],s=r.getPropertyValue(i);if(s)for(let o=void 0;;){let l=this.parser.matchStyle(i,s,this,o);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)o=l;else break}}return n}addElementByRule(e,n,r,a){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(e);else if(a)this.addElement(e,r,a);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(o)&&this.open--}addAll(e,n,r,a){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,o=a==null?null:e.childNodes[a];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let a,i;for(let s=this.open,o=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(e);if(u&&(!a||a.length>u.length+o)&&(a=u,i=l,!u.length))break;if(l.solid){if(r)break;o+=2}}if(!a)return null;this.sync(i);for(let s=0;s<a.length;s++)n=this.enterInner(a[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let a=this.findPlace(e,n,r);if(a){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=fe.none;for(let o of a.concat(e.marks))(i.type?i.type.allowsMarkType(o.type):Pm(o.type,e.type))&&(s=o.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,a){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,a)),i}enterInner(e,n,r,a=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let o=Lm(e,i,s.options);s.options&Yr&&s.content.length==0&&(o|=Yr);let l=fe.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):Pm(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Ma(e,n,l,a,null,o)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ca)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let a=r.length-1;a>=0;a--)e+=r[a].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let a=0;a<this.find.length;a++)this.find[a].pos==null&&e.nodeType==1&&e.contains(this.find[a].node)&&n.compareDocumentPosition(this.find[a].node)&(r?2:4)&&(this.find[a].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,a=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(a?0:1),s=(o,l)=>{for(;o>=0;o--){let u=n[o];if(u==""){if(o==n.length-1||o==0)continue;for(;l>=i;l--)if(s(o-1,l))return!0;return!1}else{let c=l>0||l==0&&a?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function uR(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&TA.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function cR(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Mm(t){let e={};for(let n in t)e[n]=t[n];return e}function Pm(t,e){let n=e.schema.nodes;for(let r in n){let a=n[r];if(!a.allowsMarkType(t))continue;let i=[],s=o=>{i.push(o);for(let l=0;l<o.edgeCount;l++){let{type:u,next:c}=o.edge(l);if(u==e||i.indexOf(c)<0&&s(c))return!0}};if(s(a.contentMatch))return!0}}class Yn{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Gs(n).createDocumentFragment());let a=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let o=0,l=0;for(;o<i.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(i[o][0])||u.type.spec.spanning===!1)break;o++,l++}for(;o<i.length;)a=i.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(i.push([u,a]),a.appendChild(c.dom),a=c.contentDOM||c.dom)}}a.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:a}=Za(Gs(n),this.nodes[e.type.name](e),null,e.attrs);if(a){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,a)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let a=e.marks.length-1;a>=0;a--){let i=this.serializeMark(e.marks[a],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let a=this.marks[e.type.name];return a&&Za(Gs(r),a(e,n),null,e.attrs)}static renderSpec(e,n,r=null,a){return Za(e,n,r,a)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Yn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Fm(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Fm(e.marks)}}function Fm(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Gs(t){return t.document||window.document}const Bm=new WeakMap;function dR(t){let e=Bm.get(t);return e===void 0&&Bm.set(t,e=pR(t)),e}function pR(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let a=0;a<r.length;a++)n(r[a]);else for(let a in r)n(r[a])}return n(t),e}function Za(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let a=e[0],i;if(typeof a!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=dR(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=a.indexOf(" ");s>0&&(n=a.slice(0,s),a=a.slice(s+1));let o,l=n?t.createElementNS(n,a):t.createElement(a),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let p=d.indexOf(" ");p>0?l.setAttributeNS(d.slice(0,p),d.slice(p+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let p=e[d];if(p===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:h}=Za(t,p,n,r);if(l.appendChild(f),h){if(o)throw new RangeError("Multiple content holes");o=h}}}return{dom:l,contentDOM:o}}const yA=65535,SA=Math.pow(2,16);function fR(t,e){return t+e*SA}function Um(t){return t&yA}function hR(t){return(t-(t&yA))/SA}const AA=1,NA=2,Qa=4,vA=8;class gf{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&vA)>0}get deletedBefore(){return(this.delInfo&(AA|Qa))>0}get deletedAfter(){return(this.delInfo&(NA|Qa))>0}get deletedAcross(){return(this.delInfo&Qa)>0}}class ht{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&ht.empty)return ht.empty}recover(e){let n=0,r=Um(e);if(!this.inverted)for(let a=0;a<r;a++)n+=this.ranges[a*3+2]-this.ranges[a*3+1];return this.ranges[r*3]+n+hR(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let a=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?a:0);if(l>e)break;let u=this.ranges[o+i],c=this.ranges[o+s],d=l+u;if(e<=d){let p=u?e==l?-1:e==d?1:n:n,f=l+a+(p<0?0:c);if(r)return f;let h=e==(n<0?l:d)?null:fR(o/3,e-l),g=e==l?NA:e==d?AA:Qa;return(n<0?e!=l:e!=d)&&(g|=vA),new gf(f,g,h)}a+=c-u}return r?e+a:new gf(e+a,0,null)}touches(e,n){let r=0,a=Um(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[o+i],c=l+u;if(e<=c&&o==a*3)return!0;r+=this.ranges[o+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let a=0,i=0;a<this.ranges.length;a+=3){let s=this.ranges[a],o=s-(this.inverted?i:0),l=s+(this.inverted?0:i),u=this.ranges[a+n],c=this.ranges[a+r];e(o,o+u,l,l+c),i+=c-u}}invert(){return new ht(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ht.empty:new ht(e<0?[0,-e,0]:[0,0,e])}}ht.empty=new ht([]);class da{constructor(e,n,r=0,a=e?e.length:0){this.mirror=n,this.from=r,this.to=a,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new da(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let a=e.getMirror(n);this.appendMap(e._maps[n],a!=null&&a<n?r+a:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let a=e.getMirror(n);this.appendMap(e._maps[n].invert(),a!=null&&a>n?r-a-1:void 0)}}invert(){let e=new da;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let a=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],o=s.mapResult(e,n);if(o.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(o.recover);continue}}a|=o.delInfo,e=o.pos}return r?e:new gf(e,a,null)}}const Vs=Object.create(null);class Ye{getMap(){return ht.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Vs[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Vs)throw new RangeError("Duplicate use of step JSON ID "+e);return Vs[e]=n,n.prototype.jsonID=e,n}}class ke{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new ke(e,null)}static fail(e){return new ke(null,e)}static fromReplace(e,n,r,a){try{return ke.ok(e.replace(n,r,a))}catch(i){if(i instanceof ui)return ke.fail(i.message);throw i}}}function oh(t,e,n){let r=[];for(let a=0;a<t.childCount;a++){let i=t.child(a);i.content.size&&(i=i.copy(oh(i.content,e,i))),i.isInline&&(i=e(i,n,a)),r.push(i)}return j.fromArray(r)}class un extends Ye{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),a=r.node(r.sharedDepth(this.to)),i=new X(oh(n.content,(s,o)=>!s.isAtom||!o.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),a),n.openStart,n.openEnd);return ke.fromReplace(e,this.from,this.to,i)}invert(){return new Ct(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new un(n.pos,r.pos,this.mark)}merge(e){return e instanceof un&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new un(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new un(n.from,n.to,e.markFromJSON(n.mark))}}Ye.jsonID("addMark",un);class Ct extends Ye{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new X(oh(n.content,a=>a.mark(this.mark.removeFromSet(a.marks)),e),n.openStart,n.openEnd);return ke.fromReplace(e,this.from,this.to,r)}invert(){return new un(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ct(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ct&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ct(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ct(n.from,n.to,e.markFromJSON(n.mark))}}Ye.jsonID("removeMark",Ct);class cn extends Ye{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ke.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return ke.fromReplace(e,this.pos,this.pos+1,new X(j.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let a=0;a<n.marks.length;a++)if(!n.marks[a].isInSet(r))return new cn(this.pos,n.marks[a]);return new cn(this.pos,this.mark)}}return new qn(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new cn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new cn(n.pos,e.markFromJSON(n.mark))}}Ye.jsonID("addNodeMark",cn);class qn extends Ye{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ke.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return ke.fromReplace(e,this.pos,this.pos+1,new X(j.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new cn(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new qn(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new qn(n.pos,e.markFromJSON(n.mark))}}Ye.jsonID("removeNodeMark",qn);class Fe extends Ye{constructor(e,n,r,a=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=a}apply(e){return this.structure&&bf(e,this.from,this.to)?ke.fail("Structure replace would overwrite content"):ke.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ht([this.from,this.to-this.from,this.slice.size])}invert(e){return new Fe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Fe(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Fe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?X.empty:new X(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Fe(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?X.empty:new X(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Fe(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Fe(n.from,n.to,X.fromJSON(e,n.slice),!!n.structure)}}Ye.jsonID("replace",Fe);class Ue extends Ye{constructor(e,n,r,a,i,s,o=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=a,this.slice=i,this.insert=s,this.structure=o}apply(e){if(this.structure&&(bf(e,this.from,this.gapFrom)||bf(e,this.gapTo,this.to)))return ke.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return ke.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?ke.fromReplace(e,this.from,this.to,r):ke.fail("Content does not fit in gap")}getMap(){return new ht([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Ue(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),a=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||a<n.pos||i>r.pos?null:new Ue(n.pos,r.pos,a,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ue(n.from,n.to,n.gapFrom,n.gapTo,X.fromJSON(e,n.slice),n.insert,!!n.structure)}}Ye.jsonID("replaceAround",Ue);function bf(t,e,n){let r=t.resolve(e),a=n-e,i=r.depth;for(;a>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,a--;if(a>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;a>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,a--}}return!1}function mR(t,e,n,r){let a=[],i=[],s,o;t.doc.nodesBetween(e,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let p=Math.max(u,e),f=Math.min(u+l.nodeSize,n),h=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(h)||(s&&s.to==p&&s.mark.eq(d[g])?s.to=f:a.push(s=new Ct(p,f,d[g])));o&&o.to==p?o.to=f:i.push(o=new un(p,f,r))}}),a.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function gR(t,e,n,r){let a=[],i=0;t.doc.nodesBetween(e,n,(s,o)=>{if(!s.isInline)return;i++;let l=null;if(r instanceof ms){let u=s.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let u=Math.min(o+s.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],p;for(let f=0;f<a.length;f++){let h=a[f];h.step==i-1&&d.eq(a[f].style)&&(p=h)}p?(p.to=u,p.step=i):a.push({style:d,from:Math.max(o,e),to:u,step:i})}}}),a.forEach(s=>t.step(new Ct(s.from,s.to,s.style)))}function lh(t,e,n,r=n.contentMatch,a=!0){let i=t.doc.nodeAt(e),s=[],o=e+1;for(let l=0;l<i.childCount;l++){let u=i.child(l),c=o+u.nodeSize,d=r.matchType(u.type);if(!d)s.push(new Fe(o,c,X.empty));else{r=d;for(let p=0;p<u.marks.length;p++)n.allowsMarkType(u.marks[p].type)||t.step(new Ct(o,c,u.marks[p]));if(a&&u.isText&&n.whitespace!="pre"){let p,f=/\r?\n|\r/g,h;for(;p=f.exec(u.text);)h||(h=new X(j.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new Fe(o+p.index,o+p.index+p[0].length,h))}}o=c}if(!r.validEnd){let l=r.fillBefore(j.empty,!0);t.replace(o,o,new X(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function bR(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Ir(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,a=0,i=0;;--r){let s=t.$from.node(r),o=t.$from.index(r)+a,l=t.$to.indexAfter(r)-i;if(r<t.depth&&s.canReplace(o,l,n))return r;if(r==0||s.type.spec.isolating||!bR(s,o,l))break;o&&(a=1),l<s.childCount&&(i=1)}return null}function ER(t,e,n){let{$from:r,$to:a,depth:i}=e,s=r.before(i+1),o=a.after(i+1),l=s,u=o,c=j.empty,d=0;for(let h=i,g=!1;h>n;h--)g||r.index(h)>0?(g=!0,c=j.from(r.node(h).copy(c)),d++):l--;let p=j.empty,f=0;for(let h=i,g=!1;h>n;h--)g||a.after(h+1)<a.end(h)?(g=!0,p=j.from(a.node(h).copy(p)),f++):u++;t.step(new Ue(l,u,s,o,new X(c.append(p),d,f),c.size-d,!0))}function uh(t,e,n=null,r=t){let a=TR(t,e),i=a&&yR(r,e);return i?a.map(Hm).concat({type:e,attrs:n}).concat(i.map(Hm)):null}function Hm(t){return{type:t,attrs:null}}function TR(t,e){let{parent:n,startIndex:r,endIndex:a}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,a,s)?i:null}function yR(t,e){let{parent:n,startIndex:r,endIndex:a}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let u=r;l&&u<a;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:s}function SR(t,e,n){let r=j.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let o=n[s].type.contentMatch.matchFragment(r);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=j.from(n[s].type.create(n[s].attrs,r))}let a=e.start,i=e.end;t.step(new Ue(a,i,a,i,new X(r,0,0),n.length,!0))}function AR(t,e,n,r,a){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,o)=>{let l=typeof a=="function"?a(s):a;if(s.isTextblock&&!s.hasMarkup(r,l)&&NR(t.doc,t.mapping.slice(i).map(o),r)){let u=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!h?u=!1:!f&&h&&(u=!0)}u===!1&&CA(t,s,o,i),lh(t,t.mapping.slice(i).map(o,1),r,void 0,u===null);let c=t.mapping.slice(i),d=c.map(o,1),p=c.map(o+s.nodeSize,1);return t.step(new Ue(d,p,d+1,p-1,new X(j.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&_A(t,s,o,i),!1}})}function _A(t,e,n,r){e.forEach((a,i)=>{if(a.isText){let s,o=/\r?\n|\r/g;for(;s=o.exec(a.text);){let l=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function CA(t,e,n,r){e.forEach((a,i)=>{if(a.type==a.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
@@ -1 +1 @@
1
- import{C as i,L as n,O as l,P as u,V as C,i as c,p as P,u as p}from"./index-p3omciU2.js";import{E as M,b as L,a as g,c as d,u as E,d as T,e as S,f as x,g as O,h as y}from"./use-connection-DkSSfi9a.js";import{S as e}from"./constants-DisK0xae.js";import{K as f,a as b,W as h,c as A,g as I,b as R,d as K,e as V,f as D,h as W,i as U,u as w,j as Q}from"./constants-DisK0xae.js";import{u as j,a as Y,b as F,c as G,d as k}from"./use-mcp-tools-CGC3tcmA.js";import{g as B,l as H,a as J,r as q,u as z,b as X,c as Z,d as $}from"./use-mcp-prompts-CB93WJg8.js";import{u as es,a as ts,b as as}from"./use-virtual-mcp-gsGIP_cY.js";import{A as rs,D as is}from"./decopilot-events-Brt4gAR6.js";import{a as ls,h as us,i as Cs}from"./mcp-oauth-C04X2g0h.js";import{a as Ps,c as ps,e as ms,g as Ms}from"./usage-B8eRkRZY.js";import"./useMutation-GHxEJTN4.js";import"./useQuery-KFMXc5Td.js";export{rs as ALL_DECOPILOT_EVENT_TYPES,i as ConnectionEntitySchema,is as DECOPILOT_EVENTS,M as EMPTY_COLLECTION_LIST_RESULT,f as KEYS,n as Locator,l as ORG_ADMIN_PROJECT_SLUG,u as ProjectContextProvider,b as SELF_MCP_ALIAS_ID,e as StreamableHTTPClientTransport,C as VirtualMCPEntitySchema,h as WellKnownOrgMCPId,Ps as addUsage,ls as authenticateMcp,L as buildCollectionQueryKey,g as buildOrderByExpression,d as buildWhereExpression,ps as calculateUsageStats,A as createMCPClient,ms as emptyUsageStats,Ms as getCostFromUsage,I as getDecopilotId,B as getPrompt,R as getWellKnownCommunityRegistryConnection,K as getWellKnownDecopilotVirtualMCP,V as getWellKnownMcpStudioConnection,D as getWellKnownOpenRouterConnection,W as getWellKnownRegistryConnection,us as handleOAuthCallback,Cs as isConnectionAuthenticated,U as isDecopilot,c as isStdioParameters,H as listPrompts,J as listResources,P as parseVirtualUrl,q as readResource,E as useCollectionActions,T as useCollectionItem,S as useCollectionList,x as useConnection,O as useConnectionActions,y as useConnections,w as useMCPClient,Q as useMCPClientOptional,z as useMCPPromptsList,X as useMCPPromptsListQuery,Z as useMCPResourcesList,$ as useMCPResourcesListQuery,j as useMCPToolCall,Y as useMCPToolCallMutation,F as useMCPToolCallQuery,G as useMCPToolsList,k as useMCPToolsListQuery,p as useProjectContext,es as useVirtualMCP,ts as useVirtualMCPActions,as as useVirtualMCPs};
1
+ import{C as i,L as n,O as l,P as u,V as C,i as c,p as P,u as p}from"./index-CMIePc8v.js";import{E as M,b as L,a as g,c as d,u as E,d as T,e as S,f as x,g as O,h as y}from"./use-connection-CZeLlUDa.js";import{S as e}from"./constants-BWuwqVaf.js";import{K as f,a as b,W as h,c as A,g as I,b as R,d as K,e as V,f as D,h as W,i as U,u as w,j as Q}from"./constants-BWuwqVaf.js";import{u as j,a as Y,b as F,c as G,d as k}from"./use-mcp-tools-BED8kPD7.js";import{g as B,l as H,a as J,r as q,u as z,b as X,c as Z,d as $}from"./use-mcp-prompts-CTAKOvKB.js";import{u as es,a as ts,b as as}from"./use-virtual-mcp-chylq6BL.js";import{A as rs,D as is}from"./decopilot-events-Brt4gAR6.js";import{a as ls,h as us,i as Cs}from"./mcp-oauth-DtHeHoWJ.js";import{a as Ps,c as ps,e as ms,g as Ms}from"./usage-B8eRkRZY.js";import"./useMutation-CTU78J7M.js";import"./useQuery-CL8s1AaN.js";export{rs as ALL_DECOPILOT_EVENT_TYPES,i as ConnectionEntitySchema,is as DECOPILOT_EVENTS,M as EMPTY_COLLECTION_LIST_RESULT,f as KEYS,n as Locator,l as ORG_ADMIN_PROJECT_SLUG,u as ProjectContextProvider,b as SELF_MCP_ALIAS_ID,e as StreamableHTTPClientTransport,C as VirtualMCPEntitySchema,h as WellKnownOrgMCPId,Ps as addUsage,ls as authenticateMcp,L as buildCollectionQueryKey,g as buildOrderByExpression,d as buildWhereExpression,ps as calculateUsageStats,A as createMCPClient,ms as emptyUsageStats,Ms as getCostFromUsage,I as getDecopilotId,B as getPrompt,R as getWellKnownCommunityRegistryConnection,K as getWellKnownDecopilotVirtualMCP,V as getWellKnownMcpStudioConnection,D as getWellKnownOpenRouterConnection,W as getWellKnownRegistryConnection,us as handleOAuthCallback,Cs as isConnectionAuthenticated,U as isDecopilot,c as isStdioParameters,H as listPrompts,J as listResources,P as parseVirtualUrl,q as readResource,E as useCollectionActions,T as useCollectionItem,S as useCollectionList,x as useConnection,O as useConnectionActions,y as useConnections,w as useMCPClient,Q as useMCPClientOptional,z as useMCPPromptsList,X as useMCPPromptsListQuery,Z as useMCPResourcesList,$ as useMCPResourcesListQuery,j as useMCPToolCall,Y as useMCPToolCallMutation,F as useMCPToolCallQuery,G as useMCPToolsList,k as useMCPToolsListQuery,p as useProjectContext,es as useVirtualMCP,ts as useVirtualMCPActions,as as useVirtualMCPs};
@@ -1 +1 @@
1
- import{r as i,j as t,a8 as o}from"./index-p3omciU2.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",a=i.forwardRef((r,e)=>t.jsx(o.span,{...r,ref:e,style:{...s,...r.style}}));a.displayName=d;var n=a;export{n as R,s as V};
1
+ import{r as i,j as t,a8 as o}from"./index-CMIePc8v.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",a=i.forwardRef((r,e)=>t.jsx(o.span,{...r,ref:e,style:{...s,...r.style}}));a.displayName=d;var n=a;export{n as R,s as V};
@@ -1 +1 @@
1
- import{r as n,am as q,a8 as R,I as Ee,Q as ke,U as Se,J as Ie,an as j}from"./index-p3omciU2.js";var de=1,xe=.9,Ce=.8,Re=.17,Y=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,I,E,x;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=xe,x=t.slice(u,i-1).match(ve),x&&u>0&&(h*=Math.pow(Z,x.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Y&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(I=ee(t,l,r,f,i+1,c+2,d),I*Y>h&&(h=I*Y)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:I,shouldFilter:E,loop:x,disablePointerSelection:z=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),J=q(),M=n.useRef(null),w=Te();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")G(),T(),w(1,W);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(J);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),N=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{T(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{G(),T(),r.current.value||W(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{G(),s?.getAttribute("id")===e&&W(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:J,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function T(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function W(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function G(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function Q(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function X(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Je(s,V):Ne(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):X(e)}let ie=()=>Q(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):X(1)},ce=e=>{e.preventDefault(),e.metaKey?Q(0):e.altKey?ue(-1):X(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),Q(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:Ge},b),U(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:N},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),I=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,x),()=>w.removeEventListener(te,x)},[E,t.onSelect,t.disabled]);function x(){var w,k;z(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function z(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:J,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!I,"data-disabled":!!A,"data-selected":!!I,onPointerMove:A||v.getDisablePointerSelection()?void 0:z,onClick:A?void 0:x},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let I=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),U(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:I},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,I=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return I.observe(i),()=>{cancelAnimationFrame(h),I.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},U(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),Ue=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(Ie,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),ze=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},U(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Xe=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Ue,Empty:ze,Loading:He});function Je(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ne(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var Te=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function We(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function U({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(We(l),{ref:l.ref},r(l.props.children)):r(l)}var Ge={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Xe as _};
1
+ import{r as n,am as q,an as R,I as Ee,Q as ke,U as Se,J as Ie,ao as j}from"./index-CMIePc8v.js";var de=1,xe=.9,Ce=.8,Re=.17,Y=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,I,E,x;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=xe,x=t.slice(u,i-1).match(ve),x&&u>0&&(h*=Math.pow(Z,x.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Y&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(I=ee(t,l,r,f,i+1,c+2,d),I*Y>h&&(h=I*Y)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:I,shouldFilter:E,loop:x,disablePointerSelection:z=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),J=q(),M=n.useRef(null),w=Te();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")G(),T(),w(1,W);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(J);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),N=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{T(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{G(),T(),r.current.value||W(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{G(),s?.getAttribute("id")===e&&W(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:J,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function T(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function W(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function G(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function Q(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function X(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Je(s,V):Ne(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):X(e)}let ie=()=>Q(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):X(1)},ce=e=>{e.preventDefault(),e.metaKey?Q(0):e.altKey?ue(-1):X(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),Q(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:Ge},b),U(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:N},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),I=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,x),()=>w.removeEventListener(te,x)},[E,t.onSelect,t.disabled]);function x(){var w,k;z(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function z(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:J,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!I,"data-disabled":!!A,"data-selected":!!I,onPointerMove:A||v.getDisablePointerSelection()?void 0:z,onClick:A?void 0:x},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let I=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),U(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:I},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,I=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return I.observe(i),()=>{cancelAnimationFrame(h),I.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},U(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),Ue=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(Ie,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),ze=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},U(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Xe=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Ue,Empty:ze,Loading:He});function Je(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ne(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var Te=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function We(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function U({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(We(l),{ref:l.ref},r(l.props.children)):r(l)}var Ge={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Xe as _};
@@ -1 +1 @@
1
- import{c as q,u as K,j as i,r as v,ao as U,ap as V,aq as H,a8 as y,ar as E,as as W,at as g,au as j,av as X,aw as w,ax as Y,ay as $}from"./index-p3omciU2.js";import{B as J}from"./button-SrN4bZ1L.js";import{a as Q,b as Z,c as ee,T as oe}from"./tooltip-BbsUVNzK.js";import{c as te}from"./Pin01-Dtlca92y.js";import{u as re,a as ae}from"./use-organization-settings-rYyRzSoT.js";function xe(d){const e=q.c(19),{title:t,url:r,icon:o}=d,{org:s}=K(),a=re(s.id),m=ae(s.id);let l;e[0]!==a?.sidebar_items||e[1]!==r?(l=a?.sidebar_items?.some(_=>_.url===r),e[0]=a?.sidebar_items,e[1]=r,e[2]=l):l=e[2];const u=!!l;let p;e[3]!==m.update||e[4]!==o||e[5]!==u||e[6]!==a?.sidebar_items||e[7]!==t||e[8]!==r?(p=async()=>{const _=a?.sidebar_items||[];let P;u?P=_.filter(L=>L.url!==r):P=[..._,{title:t,url:r,icon:o}],await m.update.mutateAsync({sidebar_items:P})},e[3]=m.update,e[4]=o,e[5]=u,e[6]=a?.sidebar_items,e[7]=t,e[8]=r,e[9]=p):p=e[9];const f=p,b=u?"secondary":"outline";let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(te,{size:16}),e[10]=c):c=e[10];let n;e[11]!==f||e[12]!==b?(n=i.jsx(Q,{asChild:!0,children:i.jsx(J,{onClick:f,size:"icon",variant:b,className:"size-7 border border-input",children:c})}),e[11]=f,e[12]=b,e[13]=n):n=e[13];const h=u?"Pinned":"Pin to sidebar";let R;e[14]!==h?(R=i.jsx(Z,{children:h}),e[14]=h,e[15]=R):R=e[15];let x;return e[16]!==n||e[17]!==R?(x=i.jsx(ee,{children:i.jsxs(oe,{children:[n,R]})}),e[16]=n,e[17]=R,e[18]=x):x=e[18],x}var I="Radio",[se,S]=w(I),[ne,ie]=se(I),k=v.forwardRef((d,e)=>{const{__scopeRadio:t,name:r,checked:o=!1,required:s,disabled:a,value:m="on",onCheck:l,form:u,...p}=d,[f,b]=v.useState(null),c=E(e,R=>b(R)),n=v.useRef(!1),h=f?u||!!f.closest("form"):!0;return i.jsxs(ne,{scope:t,checked:o,disabled:a,children:[i.jsx(y.button,{type:"button",role:"radio","aria-checked":o,"data-state":T(o),"data-disabled":a?"":void 0,disabled:a,value:m,...p,ref:c,onClick:g(d.onClick,R=>{o||l?.(),h&&(n.current=R.isPropagationStopped(),n.current||R.stopPropagation())})}),h&&i.jsx(N,{control:f,bubbles:!n.current,name:r,value:m,checked:o,required:s,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var A="RadioIndicator",G=v.forwardRef((d,e)=>{const{__scopeRadio:t,forceMount:r,...o}=d,s=ie(A,t);return i.jsx(X,{present:r||s.checked,children:i.jsx(y.span,{"data-state":T(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:e})})});G.displayName=A;var ce="RadioBubbleInput",N=v.forwardRef(({__scopeRadio:d,control:e,checked:t,bubbles:r=!0,...o},s)=>{const a=v.useRef(null),m=E(a,s),l=Y(t),u=$(e);return v.useEffect(()=>{const p=a.current;if(!p)return;const f=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==t&&c){const n=new Event("click",{bubbles:r});c.call(p,t),p.dispatchEvent(n)}},[l,t,r]),i.jsx(y.input,{type:"radio","aria-hidden":!0,defaultChecked:t,...o,tabIndex:-1,ref:m,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=ce;function T(d){return d?"checked":"unchecked"}var de=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[ue]=w(C,[j,S]),D=j(),O=S(),[le,pe]=ue(C),B=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,name:r,defaultValue:o,value:s,required:a=!1,disabled:m=!1,orientation:l,dir:u,loop:p=!0,onValueChange:f,...b}=d,c=D(t),n=U(u),[h,R]=V({prop:s,defaultProp:o??null,onChange:f,caller:C});return i.jsx(le,{scope:t,name:r,required:a,disabled:m,value:h,onValueChange:R,children:i.jsx(H,{asChild:!0,...c,orientation:l,dir:n,loop:p,children:i.jsx(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":m?"":void 0,dir:n,...b,ref:e})})})});B.displayName=C;var M="RadioGroupItem",z=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,disabled:r,...o}=d,s=pe(M,t),a=s.disabled||r,m=D(t),l=O(t),u=v.useRef(null),p=E(e,u),f=s.value===o.value,b=v.useRef(!1);return v.useEffect(()=>{const c=h=>{de.includes(h.key)&&(b.current=!0)},n=()=>b.current=!1;return document.addEventListener("keydown",c),document.addEventListener("keyup",n),()=>{document.removeEventListener("keydown",c),document.removeEventListener("keyup",n)}},[]),i.jsx(W,{asChild:!0,...m,focusable:!a,active:f,children:i.jsx(k,{disabled:a,required:s.required,checked:f,...l,...o,name:s.name,ref:p,onCheck:()=>s.onValueChange(o.value),onKeyDown:g(c=>{c.key==="Enter"&&c.preventDefault()}),onFocus:g(o.onFocus,()=>{b.current&&u.current?.click()})})})});z.displayName=M;var fe="RadioGroupIndicator",F=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,...r}=d,o=O(t);return i.jsx(G,{...o,...r,ref:e})});F.displayName=fe;var _e=B,ye=z,Ce=F;export{ye as I,xe as P,_e as R,Ce as a};
1
+ import{c as q,u as K,j as i,r as v,ap as U,aq as V,ar as H,a8 as y,as as E,at as W,au as g,av as j,aw as X,ax as w,ay as Y,az as $}from"./index-CMIePc8v.js";import{B as J}from"./button-DDY6hri1.js";import{a as Q,b as Z,c as ee,T as oe}from"./tooltip-Kun6OEqc.js";import{c as te}from"./Pin01-D5SNXGno.js";import{u as re,a as ae}from"./use-organization-settings-BTKBql6r.js";function xe(d){const e=q.c(19),{title:t,url:r,icon:o}=d,{org:s}=K(),a=re(s.id),m=ae(s.id);let l;e[0]!==a?.sidebar_items||e[1]!==r?(l=a?.sidebar_items?.some(_=>_.url===r),e[0]=a?.sidebar_items,e[1]=r,e[2]=l):l=e[2];const u=!!l;let p;e[3]!==m.update||e[4]!==o||e[5]!==u||e[6]!==a?.sidebar_items||e[7]!==t||e[8]!==r?(p=async()=>{const _=a?.sidebar_items||[];let P;u?P=_.filter(L=>L.url!==r):P=[..._,{title:t,url:r,icon:o}],await m.update.mutateAsync({sidebar_items:P})},e[3]=m.update,e[4]=o,e[5]=u,e[6]=a?.sidebar_items,e[7]=t,e[8]=r,e[9]=p):p=e[9];const f=p,b=u?"secondary":"outline";let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(te,{size:16}),e[10]=c):c=e[10];let n;e[11]!==f||e[12]!==b?(n=i.jsx(Q,{asChild:!0,children:i.jsx(J,{onClick:f,size:"icon",variant:b,className:"size-7 border border-input",children:c})}),e[11]=f,e[12]=b,e[13]=n):n=e[13];const h=u?"Pinned":"Pin to sidebar";let R;e[14]!==h?(R=i.jsx(Z,{children:h}),e[14]=h,e[15]=R):R=e[15];let x;return e[16]!==n||e[17]!==R?(x=i.jsx(ee,{children:i.jsxs(oe,{children:[n,R]})}),e[16]=n,e[17]=R,e[18]=x):x=e[18],x}var I="Radio",[se,S]=w(I),[ne,ie]=se(I),k=v.forwardRef((d,e)=>{const{__scopeRadio:t,name:r,checked:o=!1,required:s,disabled:a,value:m="on",onCheck:l,form:u,...p}=d,[f,b]=v.useState(null),c=E(e,R=>b(R)),n=v.useRef(!1),h=f?u||!!f.closest("form"):!0;return i.jsxs(ne,{scope:t,checked:o,disabled:a,children:[i.jsx(y.button,{type:"button",role:"radio","aria-checked":o,"data-state":T(o),"data-disabled":a?"":void 0,disabled:a,value:m,...p,ref:c,onClick:g(d.onClick,R=>{o||l?.(),h&&(n.current=R.isPropagationStopped(),n.current||R.stopPropagation())})}),h&&i.jsx(N,{control:f,bubbles:!n.current,name:r,value:m,checked:o,required:s,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var A="RadioIndicator",G=v.forwardRef((d,e)=>{const{__scopeRadio:t,forceMount:r,...o}=d,s=ie(A,t);return i.jsx(X,{present:r||s.checked,children:i.jsx(y.span,{"data-state":T(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:e})})});G.displayName=A;var ce="RadioBubbleInput",N=v.forwardRef(({__scopeRadio:d,control:e,checked:t,bubbles:r=!0,...o},s)=>{const a=v.useRef(null),m=E(a,s),l=Y(t),u=$(e);return v.useEffect(()=>{const p=a.current;if(!p)return;const f=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==t&&c){const n=new Event("click",{bubbles:r});c.call(p,t),p.dispatchEvent(n)}},[l,t,r]),i.jsx(y.input,{type:"radio","aria-hidden":!0,defaultChecked:t,...o,tabIndex:-1,ref:m,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=ce;function T(d){return d?"checked":"unchecked"}var de=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[ue]=w(C,[j,S]),D=j(),O=S(),[le,pe]=ue(C),B=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,name:r,defaultValue:o,value:s,required:a=!1,disabled:m=!1,orientation:l,dir:u,loop:p=!0,onValueChange:f,...b}=d,c=D(t),n=U(u),[h,R]=V({prop:s,defaultProp:o??null,onChange:f,caller:C});return i.jsx(le,{scope:t,name:r,required:a,disabled:m,value:h,onValueChange:R,children:i.jsx(H,{asChild:!0,...c,orientation:l,dir:n,loop:p,children:i.jsx(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":m?"":void 0,dir:n,...b,ref:e})})})});B.displayName=C;var M="RadioGroupItem",z=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,disabled:r,...o}=d,s=pe(M,t),a=s.disabled||r,m=D(t),l=O(t),u=v.useRef(null),p=E(e,u),f=s.value===o.value,b=v.useRef(!1);return v.useEffect(()=>{const c=h=>{de.includes(h.key)&&(b.current=!0)},n=()=>b.current=!1;return document.addEventListener("keydown",c),document.addEventListener("keyup",n),()=>{document.removeEventListener("keydown",c),document.removeEventListener("keyup",n)}},[]),i.jsx(W,{asChild:!0,...m,focusable:!a,active:f,children:i.jsx(k,{disabled:a,required:s.required,checked:f,...l,...o,name:s.name,ref:p,onCheck:()=>s.onValueChange(o.value),onKeyDown:g(c=>{c.key==="Enter"&&c.preventDefault()}),onFocus:g(o.onFocus,()=>{b.current&&u.current?.click()})})})});z.displayName=M;var fe="RadioGroupIndicator",F=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,...r}=d,o=O(t);return i.jsx(G,{...o,...r,ref:e})});F.displayName=fe;var _e=B,ye=z,Ce=F;export{ye as I,xe as P,_e as R,Ce as a};
@@ -1 +1 @@
1
- import{a9 as d,ae as u,af as v,ag as b}from"./index-p3omciU2.js";var N=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:u()})}getOptimisticResult(e){return e.behavior=u(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:P,isError:c,isRefetchError:g}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",f=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:g&&!h&&!n,isRefetching:P&&!o&&!f}}};export{N as I};
1
+ import{a9 as d,ae as u,af as v,ag as b}from"./index-CMIePc8v.js";var N=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:u()})}getOptimisticResult(e){return e.behavior=u(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:P,isError:c,isRefetchError:g}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",f=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:g&&!h&&!n,isRefetching:P&&!o&&!f}}};export{N as I};
@@ -1 +1 @@
1
- import{c as s,j as a}from"./index-p3omciU2.js";import{c as d}from"./button-SrN4bZ1L.js";function p(l){const e=s.c(10);let i,r,t;e[0]!==l?({className:i,type:t,...r}=l,e[0]=l,e[1]=i,e[2]=r,e[3]=t):(i=e[1],r=e[2],t=e[3]);let n;e[4]!==i?(n=d("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-lg border bg-transparent px-3 py-1 text-base 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:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] bg-background","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]!==r||e[7]!==n||e[8]!==t?(o=a.jsx("input",{type:t,"data-slot":"input",className:n,...r}),e[6]=r,e[7]=n,e[8]=t,e[9]=o):o=e[9],o}export{p as I};
1
+ import{c as s,j as a}from"./index-CMIePc8v.js";import{c as d}from"./button-DDY6hri1.js";function p(l){const e=s.c(10);let i,r,t;e[0]!==l?({className:i,type:t,...r}=l,e[0]=l,e[1]=i,e[2]=r,e[3]=t):(i=e[1],r=e[2],t=e[3]);let n;e[4]!==i?(n=d("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-lg border bg-transparent px-3 py-1 text-base 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:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] bg-background","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]!==r||e[7]!==n||e[8]!==t?(o=a.jsx("input",{type:t,"data-slot":"input",className:n,...r}),e[6]=r,e[7]=n,e[8]=t,e[9]=o):o=e[9],o}export{p as I};
@@ -1 +1 @@
1
- import{c as z,j as h,r as L}from"./index-p3omciU2.js";import{c as v}from"./button-SrN4bZ1L.js";import{n as k}from"./Container-BgkRftdL.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16"},y={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-8",md:"min-w-12",lg:"min-w-16"},A={"2xs":8,xs:12,sm:16,md:24,lg:32};function B(g){const e=z.c(7),{icon:s,name:o,size:u,className:n,fallbackIcon:l}=g,t=u===void 0?"md":u,x=s??"no-icon";let c;return e[0]!==n||e[1]!==l||e[2]!==s||e[3]!==o||e[4]!==t||e[5]!==x?(c=h.jsx(R,{icon:s,name:o,size:t,className:n,fallbackIcon:l},x),e[0]=n,e[1]=l,e[2]=s,e[3]=o,e[4]=t,e[5]=x,e[6]=c):c=e[6],c}function R(g){const e=z.c(24),{icon:s,name:o,size:u,className:n,fallbackIcon:l}=g,t=u===void 0?"md":u,[x,c]=L.useState(!1),_=!!s&&x,j=C[t],p=y[t];let i;e[0]!==n||e[1]!==j||e[2]!==p?(i=v("rounded-lg border border-border shrink-0 overflow-hidden aspect-square",j,p,n),e[0]=n,e[1]=j,e[2]=p,e[3]=i):i=e[3];const b=s||void 0,E=!_&&"hidden";let r;e[4]!==E?(r=v("h-full w-full object-cover",E),e[4]=E,e[5]=r):r=e[5];let w,I;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=()=>c(!1),I=()=>c(!0),e[6]=w,e[7]=I):(w=e[6],I=e[7]);let a;e[8]!==o||e[9]!==b||e[10]!==r?(a=h.jsx("img",{src:b,alt:o,className:r,onError:w,onLoad:I}),e[8]=o,e[9]=b,e[10]=r,e[11]=a):a=e[11];const N=_&&"hidden";let m;e[12]!==N?(m=v("h-full w-full flex items-center justify-center bg-muted/20",N),e[12]=N,e[13]=m):m=e[13];let d;e[14]!==l||e[15]!==t?(d=l??h.jsx(k,{size:A[t],className:"text-muted-foreground"}),e[14]=l,e[15]=t,e[16]=d):d=e[16];let f;e[17]!==m||e[18]!==d?(f=h.jsx("div",{className:m,children:d}),e[17]=m,e[18]=d,e[19]=f):f=e[19];let S;return e[20]!==a||e[21]!==f||e[22]!==i?(S=h.jsxs("div",{className:i,children:[a,f]}),e[20]=a,e[21]=f,e[22]=i,e[23]=S):S=e[23],S}export{B as I};
1
+ import{c as z,j as h,r as L}from"./index-CMIePc8v.js";import{c as v}from"./button-DDY6hri1.js";import{n as k}from"./Container-Dkua_wx6.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16"},y={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-8",md:"min-w-12",lg:"min-w-16"},A={"2xs":8,xs:12,sm:16,md:24,lg:32};function B(g){const e=z.c(7),{icon:s,name:o,size:u,className:n,fallbackIcon:l}=g,t=u===void 0?"md":u,x=s??"no-icon";let c;return e[0]!==n||e[1]!==l||e[2]!==s||e[3]!==o||e[4]!==t||e[5]!==x?(c=h.jsx(R,{icon:s,name:o,size:t,className:n,fallbackIcon:l},x),e[0]=n,e[1]=l,e[2]=s,e[3]=o,e[4]=t,e[5]=x,e[6]=c):c=e[6],c}function R(g){const e=z.c(24),{icon:s,name:o,size:u,className:n,fallbackIcon:l}=g,t=u===void 0?"md":u,[x,c]=L.useState(!1),_=!!s&&x,j=C[t],p=y[t];let i;e[0]!==n||e[1]!==j||e[2]!==p?(i=v("rounded-lg border border-border shrink-0 overflow-hidden aspect-square",j,p,n),e[0]=n,e[1]=j,e[2]=p,e[3]=i):i=e[3];const b=s||void 0,E=!_&&"hidden";let r;e[4]!==E?(r=v("h-full w-full object-cover",E),e[4]=E,e[5]=r):r=e[5];let w,I;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=()=>c(!1),I=()=>c(!0),e[6]=w,e[7]=I):(w=e[6],I=e[7]);let a;e[8]!==o||e[9]!==b||e[10]!==r?(a=h.jsx("img",{src:b,alt:o,className:r,onError:w,onLoad:I}),e[8]=o,e[9]=b,e[10]=r,e[11]=a):a=e[11];const N=_&&"hidden";let m;e[12]!==N?(m=v("h-full w-full flex items-center justify-center bg-muted/20",N),e[12]=N,e[13]=m):m=e[13];let d;e[14]!==l||e[15]!==t?(d=l??h.jsx(k,{size:A[t],className:"text-muted-foreground"}),e[14]=l,e[15]=t,e[16]=d):d=e[16];let f;e[17]!==m||e[18]!==d?(f=h.jsx("div",{className:m,children:d}),e[17]=m,e[18]=d,e[19]=f):f=e[19];let S;return e[20]!==a||e[21]!==f||e[22]!==i?(S=h.jsxs("div",{className:i,children:[a,f]}),e[20]=a,e[21]=f,e[22]=i,e[23]=S):S=e[23],S}export{B as I};
@@ -1 +1 @@
1
- import{c as r,j as i,R as n}from"./index-p3omciU2.js";import{c as p}from"./button-SrN4bZ1L.js";function m(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=p("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 o;return e[5]!==s||e[6]!==a?(o=i.jsx(n,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{m as L};
1
+ import{c as r,j as i,R as n}from"./index-CMIePc8v.js";import{c as p}from"./button-DDY6hri1.js";function m(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=p("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 o;return e[5]!==s||e[6]!==a?(o=i.jsx(n,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{m as L};
@@ -1 +1 @@
1
- import{c as p,r,j as n,G as w}from"./index-p3omciU2.js";import{P as x}from"./index-C4EDt4lI.js";const R=r.createContext(null);function H(m){const e=p.c(3),{children:l}=m,t=r.useContext(R);if(!t?.tabsEl)return null;let s;return e[0]!==l||e[1]!==t.tabsEl?(s=w.createPortal(l,t.tabsEl),e[0]=l,e[1]=t.tabsEl,e[2]=s):s=e[2],s}function L(m){const e=p.c(3),{children:l}=m,t=r.useContext(R);if(!t?.actionsEl)return null;let s;return e[0]!==l||e[1]!==t.actionsEl?(s=w.createPortal(l,t.actionsEl),e[0]=l,e[1]=t.actionsEl,e[2]=s):s=e[2],s}function $(m){const e=p.c(18),{children:l,breadcrumb:t}=m,[s,y]=r.useState(null),[j,C]=r.useState(null),S=r.useRef(null),V=r.useRef(null);let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=c=>{S.current=c,c&&y(c)},e[0]=E):E=e[0];const g=E;let b;e[1]===Symbol.for("react.memo_cache_sentinel")?(b=c=>{V.current=c,c&&C(c)},e[1]=b):b=e[1];const v=b;let a;e[2]!==j||e[3]!==s?(a={tabsEl:s,actionsEl:j},e[2]=j,e[3]=s,e[4]=a):a=e[4];let o;e[5]!==t?(o=n.jsx(x.Header.Left,{children:t}),e[5]=t,e[6]=o):o=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsxs(x.Header.Right,{children:[n.jsx("div",{ref:g,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),n.jsx("div",{ref:v,className:"flex items-center gap-2 shrink-0"})]}),e[7]=h):h=e[7];let i;e[8]!==o?(i=n.jsxs(x.Header,{children:[o,h]}),e[8]=o,e[9]=i):i=e[9];let f;e[10]!==l?(f=n.jsx(x.Content,{children:l}),e[10]=l,e[11]=f):f=e[11];let u;e[12]!==i||e[13]!==f?(u=n.jsxs(x,{children:[i,f]}),e[12]=i,e[13]=f,e[14]=u):u=e[14];let d;return e[15]!==a||e[16]!==u?(d=n.jsx(R,{value:a,children:u}),e[15]=a,e[16]=u,e[17]=d):d=e[17],d}export{L as V,$ as a,H as b};
1
+ import{c as p,r,j as n,G as w}from"./index-CMIePc8v.js";import{P as x}from"./index-Ck8tqNHK.js";const R=r.createContext(null);function H(m){const e=p.c(3),{children:l}=m,t=r.useContext(R);if(!t?.tabsEl)return null;let s;return e[0]!==l||e[1]!==t.tabsEl?(s=w.createPortal(l,t.tabsEl),e[0]=l,e[1]=t.tabsEl,e[2]=s):s=e[2],s}function L(m){const e=p.c(3),{children:l}=m,t=r.useContext(R);if(!t?.actionsEl)return null;let s;return e[0]!==l||e[1]!==t.actionsEl?(s=w.createPortal(l,t.actionsEl),e[0]=l,e[1]=t.actionsEl,e[2]=s):s=e[2],s}function $(m){const e=p.c(18),{children:l,breadcrumb:t}=m,[s,y]=r.useState(null),[j,C]=r.useState(null),S=r.useRef(null),V=r.useRef(null);let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=c=>{S.current=c,c&&y(c)},e[0]=E):E=e[0];const g=E;let b;e[1]===Symbol.for("react.memo_cache_sentinel")?(b=c=>{V.current=c,c&&C(c)},e[1]=b):b=e[1];const v=b;let a;e[2]!==j||e[3]!==s?(a={tabsEl:s,actionsEl:j},e[2]=j,e[3]=s,e[4]=a):a=e[4];let o;e[5]!==t?(o=n.jsx(x.Header.Left,{children:t}),e[5]=t,e[6]=o):o=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsxs(x.Header.Right,{children:[n.jsx("div",{ref:g,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),n.jsx("div",{ref:v,className:"flex items-center gap-2 shrink-0"})]}),e[7]=h):h=e[7];let i;e[8]!==o?(i=n.jsxs(x.Header,{children:[o,h]}),e[8]=o,e[9]=i):i=e[9];let f;e[10]!==l?(f=n.jsx(x.Content,{children:l}),e[10]=l,e[11]=f):f=e[11];let u;e[12]!==i||e[13]!==f?(u=n.jsxs(x,{children:[i,f]}),e[12]=i,e[13]=f,e[14]=u):u=e[14];let d;return e[15]!==a||e[16]!==u?(d=n.jsx(R,{value:a,children:u}),e[15]=a,e[16]=u,e[17]=d):d=e[17],d}export{L as V,$ as a,H as b};
@@ -1 +1 @@
1
- import{c as v,m as I}from"./index-p3omciU2.js";import{u as x}from"./useQuery-KFMXc5Td.js";import{u as L}from"./useMutation-GHxEJTN4.js";function M(t){try{return JSON.parse(t)}catch{return}}function y(t,s){const e=localStorage.getItem(t),o=e?M(e):void 0,a=typeof s=="function"?s(o):o??s;if(o===void 0||a!==o)try{const n=JSON.stringify(a);localStorage.setItem(t,n)}catch{}return a}function A(t,s){const e=v.c(25),o=I();let a;e[0]!==t?(a=["localStorage",t],e[0]=t,e[1]=a):a=e[1];const n=a;let r,i;e[2]!==s||e[3]!==t?(r=()=>y(t,s),i=()=>y(t,s),e[2]=s,e[3]=t,e[4]=r,e[5]=i):(r=e[4],i=e[5]);let m;e[6]!==n||e[7]!==r||e[8]!==i?(m={queryKey:n,queryFn:r,initialData:i,staleTime:1/0,gcTime:1/0},e[6]=n,e[7]=r,e[8]=i,e[9]=m):m=e[9];const{data:C}=x(m);let l;e[10]!==t?(l=async c=>{const $=JSON.stringify(c);return localStorage.setItem(t,$),c},e[10]=t,e[11]=l):l=e[11];let h;e[12]!==o||e[13]!==n?(h=c=>{o.setQueryData(n,c)},e[12]=o,e[13]=n,e[14]=h):h=e[14];let u;e[15]!==l||e[16]!==h?(u={mutationFn:l,onSuccess:h},e[15]=l,e[16]=h,e[17]=u):u=e[17];const g=L(u);let d;e[18]!==g||e[19]!==o||e[20]!==n?(d=c=>{const $=o.getQueryData(n),O=typeof c=="function"?c($):c;g.mutate(O)},e[18]=g,e[19]=o,e[20]=n,e[21]=d):d=e[21];const S=d,p=C;let f;return e[22]!==S||e[23]!==p?(f=[p,S],e[22]=S,e[23]=p,e[24]=f):f=e[24],f}const D={assistantChatThreads:t=>`mesh:assistant-chat:threads:${t}`,messages:(t,s)=>`mesh:messages:${t}:${s}`,decoChatOpen:()=>"mesh:decochat:open",chatSelectedModel:t=>`mesh:chat:selectedModel:${t}`,chatSelectedMode:t=>`mesh:chat:selectedMode:${t}`,assistantChatActiveThread:t=>`mesh:assistant-chat:active-thread:${t}`,decoChatPanelWidth:()=>"mesh:decochat:panel-width",sidebarOpen:()=>"mesh:sidebar-open",selectedRegistry:t=>`mesh:store:selected-registry:${t}`,orgHomeQuickstart:t=>`mesh:org-home:quickstart:${t}`,storeShowStdio:()=>"mesh:store:show-stdio",preferences:()=>"mesh:user:preferences",pluginConnection:(t,s)=>`mesh:plugin:connection:${t}:${s}`};export{D as L,A as u};
1
+ import{c as v,m as I}from"./index-CMIePc8v.js";import{u as x}from"./useQuery-CL8s1AaN.js";import{u as L}from"./useMutation-CTU78J7M.js";function M(t){try{return JSON.parse(t)}catch{return}}function y(t,s){const e=localStorage.getItem(t),o=e?M(e):void 0,a=typeof s=="function"?s(o):o??s;if(o===void 0||a!==o)try{const n=JSON.stringify(a);localStorage.setItem(t,n)}catch{}return a}function A(t,s){const e=v.c(25),o=I();let a;e[0]!==t?(a=["localStorage",t],e[0]=t,e[1]=a):a=e[1];const n=a;let r,i;e[2]!==s||e[3]!==t?(r=()=>y(t,s),i=()=>y(t,s),e[2]=s,e[3]=t,e[4]=r,e[5]=i):(r=e[4],i=e[5]);let m;e[6]!==n||e[7]!==r||e[8]!==i?(m={queryKey:n,queryFn:r,initialData:i,staleTime:1/0,gcTime:1/0},e[6]=n,e[7]=r,e[8]=i,e[9]=m):m=e[9];const{data:C}=x(m);let l;e[10]!==t?(l=async c=>{const $=JSON.stringify(c);return localStorage.setItem(t,$),c},e[10]=t,e[11]=l):l=e[11];let h;e[12]!==o||e[13]!==n?(h=c=>{o.setQueryData(n,c)},e[12]=o,e[13]=n,e[14]=h):h=e[14];let u;e[15]!==l||e[16]!==h?(u={mutationFn:l,onSuccess:h},e[15]=l,e[16]=h,e[17]=u):u=e[17];const g=L(u);let d;e[18]!==g||e[19]!==o||e[20]!==n?(d=c=>{const $=o.getQueryData(n),O=typeof c=="function"?c($):c;g.mutate(O)},e[18]=g,e[19]=o,e[20]=n,e[21]=d):d=e[21];const S=d,p=C;let f;return e[22]!==S||e[23]!==p?(f=[p,S],e[22]=S,e[23]=p,e[24]=f):f=e[24],f}const D={assistantChatThreads:t=>`mesh:assistant-chat:threads:${t}`,messages:(t,s)=>`mesh:messages:${t}:${s}`,decoChatOpen:()=>"mesh:decochat:open",chatSelectedModel:t=>`mesh:chat:selectedModel:${t}`,chatSelectedMode:t=>`mesh:chat:selectedMode:${t}`,assistantChatActiveThread:t=>`mesh:assistant-chat:active-thread:${t}`,decoChatPanelWidth:()=>"mesh:decochat:panel-width",sidebarOpen:()=>"mesh:sidebar-open",selectedRegistry:t=>`mesh:store:selected-registry:${t}`,orgHomeQuickstart:t=>`mesh:org-home:quickstart:${t}`,storeShowStdio:()=>"mesh:store:show-stdio",preferences:()=>"mesh:user:preferences",pluginConnection:(t,s)=>`mesh:plugin:connection:${t}:${s}`};export{D as L,A as u};