decocms 2.303.0 → 2.304.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/dist/client/assets/{AlertCircle-vEsirhNa.js → AlertCircle-BeiDn4Fp.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-DZv_aYqP.js → ArrowNarrowLeft-hulNygQd.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-gnKwWbdS.js → ArrowUpRight-lTwxwkJA.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-CG65sxv8.js → CheckCircle-3TB25Bcb.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-ClwyYcv4.js → ChevronDown-_b59faTm.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-C0UgsndQ.js → ChevronRight-DEybByBs.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-0O0O_hLq.js → ChevronUp-B_td_jK6.js} +1 -1
  8. package/dist/client/assets/{Container-D1_FRS1u.js → Container-d8d36LPk.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-BdLY0G_d.js → DotsVertical-9AuPT8gf.js} +1 -1
  10. package/dist/client/assets/{LinkExternal01-C0RHT0gp.js → LinkExternal01-BMrJcbl6.js} +1 -1
  11. package/dist/client/assets/{Lock01-CJP_L01s.js → Lock01-C5rgxGgu.js} +1 -1
  12. package/dist/client/assets/{Palette-DTaJJ6eW.js → Palette-DfnmIo6d.js} +1 -1
  13. package/dist/client/assets/{Play-wg-GRHFk.js → Play-BGW505UY.js} +1 -1
  14. package/dist/client/assets/{Plus-Ukcu1-Za.js → Plus-DlISHBLe.js} +1 -1
  15. package/dist/client/assets/{RefreshCcw01-i1Q8uoB-.js → RefreshCcw01-Dbq2QLAC.js} +1 -1
  16. package/dist/client/assets/{SearchMd-CaU1opgI.js → SearchMd-C8WDOhfc.js} +1 -1
  17. package/dist/client/assets/{Settings02-sn7Sw6YT.js → Settings02-BIpL5e3f.js} +1 -1
  18. package/dist/client/assets/{Shield01-BV1qTPTH.js → Shield01-DCoI7_zY.js} +1 -1
  19. package/dist/client/assets/{Star01-BRRUiVRZ.js → Star01-Chns_B29.js} +1 -1
  20. package/dist/client/assets/{Sun-xRqcyI3R.js → Sun-CgSsJ8OX.js} +1 -1
  21. package/dist/client/assets/{Tool01-Baq41T_m.js → Tool01-B8RjIhe4.js} +1 -1
  22. package/dist/client/assets/{Trash01-vBGY9tLb.js → Trash01-CFncShuD.js} +1 -1
  23. package/dist/client/assets/{User01-Dt3HpnQa.js → User01-Bq8r53VC.js} +1 -1
  24. package/dist/client/assets/{Users03-DXg5Ltjv.js → Users03-qD8JWxak.js} +1 -1
  25. package/dist/client/assets/{X-cgiyE3ZM.js → X-BNOerUAB.js} +1 -1
  26. package/dist/client/assets/{XCircle-pfcw5bLn.js → XCircle-B-JS14_e.js} +1 -1
  27. package/dist/client/assets/{XClose-BddCxuhK.js → XClose-vOlmnMjZ.js} +1 -1
  28. package/dist/client/assets/{Zap-Csq8iSdS.js → Zap-BPHOFmqu.js} +1 -1
  29. package/dist/client/assets/{ZapSquare-BcZ9bNOI.js → ZapSquare-CX9zqrxv.js} +1 -1
  30. package/dist/client/assets/{accordion-6lnK-4_B.js → accordion-DIyksd99.js} +1 -1
  31. package/dist/client/assets/{agent-icon-BdKQ6n0b.js → agent-icon-CLQAOsUE.js} +1 -1
  32. package/dist/client/assets/{agents-list-CQCT4ln6.js → agents-list-D0BQglaf.js} +1 -1
  33. package/dist/client/assets/ai-providers-BnclkXxt.js +1 -0
  34. package/dist/client/assets/{alert-dialog-eUvHx9LP.js → alert-dialog-BWduFhy-.js} +1 -1
  35. package/dist/client/assets/{auth-catchall-DTPgUDmr.js → auth-catchall-D-v4q1Qx.js} +1 -1
  36. package/dist/client/assets/{automation-list-row-Dr5sNKYc.js → automation-list-row-DPkrb87t.js} +1 -1
  37. package/dist/client/assets/{automations-C3gcgD_I.js → automations-BCzY9gmM.js} +1 -1
  38. package/dist/client/assets/{avatar-DYHAtJIn.js → avatar-C6HNjGDg.js} +1 -1
  39. package/dist/client/assets/{badge-CbBFj3dT.js → badge-CZCn9Wwi.js} +1 -1
  40. package/dist/client/assets/{brand-context-CH3a97ud.js → brand-context-DcqBJ41j.js} +1 -1
  41. package/dist/client/assets/{card-KdWbX1xC.js → card-oNblR0HO.js} +1 -1
  42. package/dist/client/assets/{chat-context-CyOREmRE.js → chat-context-RcvBJBC7.js} +1 -1
  43. package/dist/client/assets/{checkbox-L6ow9OAH.js → checkbox-JSEUVCMB.js} +1 -1
  44. package/dist/client/assets/{collection-detail-BNa0DV-E.js → collection-detail-C5pV1mWu.js} +1 -1
  45. package/dist/client/assets/{collection-display-button-Cd1AAuzE.js → collection-display-button-DQSPcJBz.js} +1 -1
  46. package/dist/client/assets/{collection-search-DKaMJpI1.js → collection-search-CLoorkFj.js} +1 -1
  47. package/dist/client/assets/{collection-search-C_3BuKbi.js → collection-search-DGO6_1o7.js} +1 -1
  48. package/dist/client/assets/{collection-table-wrapper-BZMY30r-.js → collection-table-wrapper-P7sXgSq0.js} +1 -1
  49. package/dist/client/assets/{collection-tabs-CKmdw5ye.js → collection-tabs-6c5Oz0MD.js} +1 -1
  50. package/dist/client/assets/{collections-JCMKBQvX.js → collections-CcBlrCx6.js} +1 -1
  51. package/dist/client/assets/{command-CiVqeZK9.js → command-C666DFpg.js} +1 -1
  52. package/dist/client/assets/{connection-card-BGoNyj1I.js → connection-card-DbGlMaON.js} +1 -1
  53. package/dist/client/assets/{connection-detail-DgOZE4hQ.js → connection-detail-DOFWK_LZ.js} +1 -1
  54. package/dist/client/assets/{connection-form-helpers-DiXDE6He.js → connection-form-helpers-S9iwzj4v.js} +1 -1
  55. package/dist/client/assets/{connections-BHvbqlLg.js → connections-DZgnlfnc.js} +1 -1
  56. package/dist/client/assets/{constants-CxLUc4t1.js → constants-B22iOAkD.js} +1 -1
  57. package/dist/client/assets/{constants-BOiLyn9k.js → constants-DRQ2x-Dp.js} +1 -1
  58. package/dist/client/assets/{dialog-B24YZzA9.js → dialog-ReVTOuxu.js} +1 -1
  59. package/dist/client/assets/{domain-settings-WXCddaP7.js → domain-settings-_aY4XST2.js} +1 -1
  60. package/dist/client/assets/{drawer-CGPAKRwg.js → drawer-BYHJ-8Om.js} +1 -1
  61. package/dist/client/assets/{dropdown-menu-D3k5KxvY.js → dropdown-menu-y8iKrNsS.js} +1 -1
  62. package/dist/client/assets/{dynamic-plugin-layout-B06IMDFS.js → dynamic-plugin-layout-BxzD5223.js} +1 -1
  63. package/dist/client/assets/{empty-state-CI0GC98R.js → empty-state-B4rhh1dc.js} +1 -1
  64. package/dist/client/assets/{empty-state-Wp7TaLly.js → empty-state-ByRM_QUo.js} +1 -1
  65. package/dist/client/assets/{extract-connection-data-C8BcpMzg.js → extract-connection-data-CbVt8VgN.js} +1 -1
  66. package/dist/client/assets/{features-Dm0-VLa6.js → features-BMKDqpeL.js} +1 -1
  67. package/dist/client/assets/{form-FasOp70m.js → form-D8QDPjk9.js} +1 -1
  68. package/dist/client/assets/{general-B7DIS0Ue.js → general-WpQ82n-X.js} +1 -1
  69. package/dist/client/assets/index-BB2bR64l.js +1 -0
  70. package/dist/client/assets/{index-CLgan7xr.js → index-BET8kMZe.js} +1 -1
  71. package/dist/client/assets/{index-B2vavj0S.js → index-Bi-e-UKp.js} +1 -1
  72. package/dist/client/assets/{index-DSDywrQr.js → index-Bpod-O0_.js} +1 -1
  73. package/dist/client/assets/{index-CHehLkTl.js → index-BuLwXk3-.js} +3 -3
  74. package/dist/client/assets/{index-CFi3i8-6.js → index-CPmmcxsi.js} +1 -1
  75. package/dist/client/assets/{index-22XZTMRU.js → index-CTWz6nN8.js} +1 -1
  76. package/dist/client/assets/{index-C6uOB0Y4.js → index-CeC26NPv.js} +1 -1
  77. package/dist/client/assets/{index-CmoaTI3v.js → index-Cf5saV1q.js} +1 -1
  78. package/dist/client/assets/{index-Uci3t_4k.js → index-CgURykwj.js} +1 -1
  79. package/dist/client/assets/{index-DgPBaKAA.js → index-D4IWA9IU.js} +2 -2
  80. package/dist/client/assets/{index-CLPpVsE7.js → index-D8dvMQZl.js} +1 -1
  81. package/dist/client/assets/{index-CJ0MPowS.js → index-D9Q6YnJH.js} +1 -1
  82. package/dist/client/assets/{index-CnMcjZ2J.js → index-DBj2qw-o.js} +1 -1
  83. package/dist/client/assets/{index-CGc8iCsx.js → index-DXXI9MyH.js} +1 -1
  84. package/dist/client/assets/{index-UUkaa4t8.js → index-U5YmU8lc.js} +1 -1
  85. package/dist/client/assets/{infiniteQueryObserver-BNzmdrsE.js → infiniteQueryObserver-ClYEJj89.js} +1 -1
  86. package/dist/client/assets/{input-s7yMiYrQ.js → input-DhXllgVP.js} +1 -1
  87. package/dist/client/assets/{integration-icon-BTFNSNVv.js → integration-icon-CNQIPioy.js} +1 -1
  88. package/dist/client/assets/{label-DdmR-9sj.js → label-BDcPRk17.js} +1 -1
  89. package/dist/client/assets/{layout-b284SHuQ.js → layout-DBK70FJ7.js} +1 -1
  90. package/dist/client/assets/{lean-canvas-recruit-modal-DajQAG70.js → lean-canvas-recruit-modal-Cosr7uB6.js} +1 -1
  91. package/dist/client/assets/{login-B1PDG9tU.js → login-uRApKgz7.js} +1 -1
  92. package/dist/client/assets/{members-BzR5JdQ2.js → members-CgYS1Zxe.js} +1 -1
  93. package/dist/client/assets/{monaco-editor-CI3jdnZr.js → monaco-editor-D34bkcWL.js} +1 -1
  94. package/dist/client/assets/{monitoring-stats-row-DhMQIkbL.js → monitoring-stats-row-Rw8mxMr8.js} +1 -1
  95. package/dist/client/assets/{oauth-callback-BnQ8HZqD.js → oauth-callback-DLWU7IjL.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-ai-provider-CRSRr_xb.js → oauth-callback-ai-provider-5FDIcGBj.js} +1 -1
  97. package/dist/client/assets/{onboarding-D_M2p9DV.js → onboarding-jyaCV8uq.js} +1 -1
  98. package/dist/client/assets/{org-layout-D2xtXfus.js → org-layout-DxW3YApR.js} +1 -1
  99. package/dist/client/assets/{org-plugin-layout-DZaqttiB.js → org-plugin-layout-B-uqLn5y.js} +1 -1
  100. package/dist/client/assets/{pair-DipmF7bC.js → pair-CM7Z5dgt.js} +1 -1
  101. package/dist/client/assets/{plugin-empty-state-Buoq-fSV.js → plugin-empty-state-C-o1hhqY.js} +1 -1
  102. package/dist/client/assets/{plugin-header-BYnPGK02.js → plugin-header-BTFD2Tcj.js} +1 -1
  103. package/dist/client/assets/{plugin-layout-CN3nu4uU.js → plugin-layout-BiJEtvKW.js} +1 -1
  104. package/dist/client/assets/{popover-BO9bGsCV.js → popover-DQq9bf6V.js} +1 -1
  105. package/dist/client/assets/{profile-KMr1dQ-Q.js → profile-PICkTEdT.js} +1 -1
  106. package/dist/client/assets/{project-app-view-BUlVlC-x.js → project-app-view-B1QcPr4W.js} +1 -1
  107. package/dist/client/assets/registry-Dr9Q687k.js +2 -0
  108. package/dist/client/assets/{registry-layout-BUJ3AeXk.js → registry-layout-DGmSzwah.js} +1 -1
  109. package/dist/client/assets/{required-auth-layout-23LI14IJ.js → required-auth-layout-CfAoaltR.js} +1 -1
  110. package/dist/client/assets/{reset-password-D1P-Z7nY.js → reset-password-NMO08kVP.js} +1 -1
  111. package/dist/client/assets/{roles-C76lzhHm.js → roles-CCaqodZQ.js} +1 -1
  112. package/dist/client/assets/{scroll-area-BYgy2rRU.js → scroll-area-AhoYMTSF.js} +1 -1
  113. package/dist/client/assets/{search-input-DouvVIAY.js → search-input-BSmmjMtR.js} +1 -1
  114. package/dist/client/assets/{select-tWER34RX.js → select-dTphD0ES.js} +1 -1
  115. package/dist/client/assets/{select-model-BwlI7XmT.js → select-model-D2H_jWcd.js} +1 -1
  116. package/dist/client/assets/{settings-layout-DM8Inkwn.js → settings-layout-Bn3d6rRU.js} +1 -1
  117. package/dist/client/assets/{settings-section-Dr0LUAWl.js → settings-section-DkPpouMA.js} +1 -1
  118. package/dist/client/assets/{shell-layout-RjvCJ64C.js → shell-layout-DLX5f9iI.js} +1 -1
  119. package/dist/client/assets/{skeleton-CUpGn6FE.js → skeleton-DCMX-VkN.js} +1 -1
  120. package/dist/client/assets/{sso-BIwBaU8W.js → sso-BeQadTWm.js} +1 -1
  121. package/dist/client/assets/{store-DxMzTKYE.js → store-D-lrayyv.js} +1 -1
  122. package/dist/client/assets/store-registry-dKQp57q_.js +2 -0
  123. package/dist/client/assets/{switch-DEvD95wE.js → switch-D9uEYoPa.js} +1 -1
  124. package/dist/client/assets/{table-C3UVFCYb.js → table-BIcJswmk.js} +1 -1
  125. package/dist/client/assets/{tabs-BVEP2lWJ.js → tabs-Bbs5xG17.js} +1 -1
  126. package/dist/client/assets/{task-status-CGfLBMZl.js → task-status-1zFON5T4.js} +1 -1
  127. package/dist/client/assets/{textarea-D7sU3_M1.js → textarea-BMU9fnHG.js} +1 -1
  128. package/dist/client/assets/{toggle-group-V7Yt1Ex8.js → toggle-group-juphd3c4.js} +1 -1
  129. package/dist/client/assets/{tools-list-CABaXV8v.js → tools-list-BP78dRI3.js} +1 -1
  130. package/dist/client/assets/{tooltip-apD1iSo_.js → tooltip-B5FrLY14.js} +1 -1
  131. package/dist/client/assets/{types-CD5tpm5b.js → types-DmM_J5U9.js} +1 -1
  132. package/dist/client/assets/{use-ai-providers-CGTNouwr.js → use-ai-providers-CVAGId9e.js} +1 -1
  133. package/dist/client/assets/{use-collections-DFWGNuJR.js → use-collections-DKWG5Tun.js} +1 -1
  134. package/dist/client/assets/{use-connection-C-BvdB1r.js → use-connection-Dy5vq_5j.js} +1 -1
  135. package/dist/client/assets/{use-copy-DefGD5Vz.js → use-copy-BSYEct5q.js} +1 -1
  136. package/dist/client/assets/{use-create-virtual-mcp-CBpUnMCs.js → use-create-virtual-mcp-ifW0Pllw.js} +1 -1
  137. package/dist/client/assets/{use-decopilot-events-ltSQJ_A7.js → use-decopilot-events-DVXCv4R8.js} +1 -1
  138. package/dist/client/assets/{use-delete-connection-DpaPpzHo.js → use-delete-connection-CRe3MUPe.js} +1 -1
  139. package/dist/client/assets/{use-infinite-scroll-BQ-INmUl.js → use-infinite-scroll-4DQHfv5o.js} +1 -1
  140. package/dist/client/assets/{use-list-state-D1F4t091.js → use-list-state-CihFBhY3.js} +1 -1
  141. package/dist/client/assets/{use-mcp-tools-BrbjMOtH.js → use-mcp-tools-Bog3rGRX.js} +1 -1
  142. package/dist/client/assets/{use-members-b-HHyQxx.js → use-members-eWVl2b1I.js} +1 -1
  143. package/dist/client/assets/{use-navigate-to-agent-vkB0KE5O.js → use-navigate-to-agent--7ajKHhy.js} +1 -1
  144. package/dist/client/assets/{use-org-auth-client-DpMUudQp.js → use-org-auth-client-C-BGwXKo.js} +1 -1
  145. package/dist/client/assets/{use-org-sso-B1ThBRct.js → use-org-sso-2mlDJ8c4.js} +1 -1
  146. package/dist/client/assets/{use-organization-roles-CBMuGkFt.js → use-organization-roles-PByiiFjp.js} +1 -1
  147. package/dist/client/assets/{use-organization-settings-8KaGxc8P.js → use-organization-settings-DngIHmBy.js} +1 -1
  148. package/dist/client/assets/{use-registry-connections-q8kr-T41.js → use-registry-connections-CDM-gpri.js} +1 -1
  149. package/dist/client/assets/{use-status-sounds-C19SUHpW.js → use-status-sounds-BzXaoVC8.js} +1 -1
  150. package/dist/client/assets/{use-tasks-CKR5m1e3.js → use-tasks-M1RmMNT7.js} +1 -1
  151. package/dist/client/assets/{use-view-mode-C6IKAuZR.js → use-view-mode-DRDlksJe.js} +1 -1
  152. package/dist/client/assets/{use-virtual-mcp-DqIUOY7O.js → use-virtual-mcp-CDCK02Yj.js} +1 -1
  153. package/dist/client/assets/useInfiniteQuery-DtJBa4_2.js +1 -0
  154. package/dist/client/assets/useSuspenseInfiniteQuery-G-zitmER.js +1 -0
  155. package/dist/client/assets/{user-CaH0b_KG.js → user-WYGHhGxH.js} +1 -1
  156. package/dist/client/assets/{view-mode-toggle-D-dHPCyZ.js → view-mode-toggle-CK1VLDTo.js} +1 -1
  157. package/dist/client/assets/{workflow-BivIt-Ky.js → workflow-DkcKupEW.js} +1 -1
  158. package/dist/client/assets/workflow-detail-BtHvU2Pd.js +1 -0
  159. package/dist/client/index.html +1 -1
  160. package/dist/server/cli.js +457 -445
  161. package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
  162. package/dist/server/node_modules/mimic-fn/index.js +13 -0
  163. package/dist/server/node_modules/mimic-fn/package.json +42 -0
  164. package/dist/server/node_modules/mimic-fn/readme.md +69 -0
  165. package/dist/server/node_modules/onetime/index.d.ts +64 -0
  166. package/dist/server/node_modules/onetime/index.js +44 -0
  167. package/dist/server/node_modules/onetime/package.json +43 -0
  168. package/dist/server/node_modules/onetime/readme.md +94 -0
  169. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  170. package/dist/server/node_modules/pg-int8/README.md +16 -0
  171. package/dist/server/node_modules/pg-int8/index.js +100 -0
  172. package/dist/server/node_modules/pg-int8/package.json +24 -0
  173. package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
  174. package/dist/server/node_modules/postgres-array/index.js +97 -0
  175. package/dist/server/node_modules/{pg-pool/LICENSE → postgres-array/license} +6 -6
  176. package/dist/server/node_modules/postgres-array/package.json +35 -0
  177. package/dist/server/node_modules/postgres-array/readme.md +43 -0
  178. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  179. package/dist/server/node_modules/postgres-bytea/license +21 -0
  180. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  181. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  182. package/dist/server/node_modules/postgres-date/index.js +116 -0
  183. package/dist/server/node_modules/postgres-date/license +21 -0
  184. package/dist/server/node_modules/postgres-date/package.json +33 -0
  185. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  186. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  187. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  188. package/dist/server/node_modules/postgres-interval/license +21 -0
  189. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  190. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  191. package/dist/server/node_modules/slice-ansi/index.d.ts +19 -0
  192. package/dist/server/node_modules/slice-ansi/index.js +260 -0
  193. package/dist/server/node_modules/{restore-cursor → slice-ansi}/license +1 -0
  194. package/dist/server/node_modules/slice-ansi/package.json +59 -0
  195. package/dist/server/node_modules/slice-ansi/readme.md +54 -0
  196. package/dist/server/node_modules/slice-ansi/tokenize-ansi.js +752 -0
  197. package/dist/server/node_modules/split2/LICENSE +13 -0
  198. package/dist/server/node_modules/split2/README.md +85 -0
  199. package/dist/server/node_modules/split2/bench.js +27 -0
  200. package/dist/server/node_modules/split2/index.js +141 -0
  201. package/dist/server/node_modules/split2/package.json +39 -0
  202. package/dist/server/node_modules/split2/test.js +409 -0
  203. package/package.json +2 -1
  204. package/dist/client/assets/ai-providers-GeW9mIp3.js +0 -1
  205. package/dist/client/assets/index-CHk8-d41.js +0 -1
  206. package/dist/client/assets/registry-BQuAXDX3.js +0 -2
  207. package/dist/client/assets/store-registry-4KpCoRMs.js +0 -2
  208. package/dist/client/assets/useInfiniteQuery-eU5lg-Wu.js +0 -1
  209. package/dist/client/assets/useSuspenseInfiniteQuery-ddH3lLnG.js +0 -1
  210. package/dist/client/assets/workflow-detail-Df9rIeG5.js +0 -1
  211. package/dist/server/node_modules/environment/index.d.ts +0 -74
  212. package/dist/server/node_modules/environment/index.js +0 -47
  213. package/dist/server/node_modules/environment/package.json +0 -74
  214. package/dist/server/node_modules/environment/readme.md +0 -94
  215. package/dist/server/node_modules/escape-string-regexp/index.d.ts +0 -18
  216. package/dist/server/node_modules/escape-string-regexp/index.js +0 -11
  217. package/dist/server/node_modules/escape-string-regexp/package.json +0 -43
  218. package/dist/server/node_modules/escape-string-regexp/readme.md +0 -29
  219. package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
  220. package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
  221. package/dist/server/node_modules/get-east-asian-width/license +0 -9
  222. package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
  223. package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
  224. package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
  225. package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
  226. package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
  227. package/dist/server/node_modules/is-unicode-supported/index.d.ts +0 -12
  228. package/dist/server/node_modules/is-unicode-supported/index.js +0 -21
  229. package/dist/server/node_modules/is-unicode-supported/license +0 -9
  230. package/dist/server/node_modules/is-unicode-supported/package.json +0 -47
  231. package/dist/server/node_modules/is-unicode-supported/readme.md +0 -35
  232. package/dist/server/node_modules/pg-pool/README.md +0 -357
  233. package/dist/server/node_modules/pg-pool/esm/index.mjs +0 -5
  234. package/dist/server/node_modules/pg-pool/index.js +0 -517
  235. package/dist/server/node_modules/pg-pool/package.json +0 -51
  236. package/dist/server/node_modules/restore-cursor/index.d.ts +0 -11
  237. package/dist/server/node_modules/restore-cursor/index.js +0 -11
  238. package/dist/server/node_modules/restore-cursor/package.json +0 -55
  239. package/dist/server/node_modules/restore-cursor/readme.md +0 -31
  240. /package/dist/server/node_modules/{escape-string-regexp → mimic-fn}/license +0 -0
  241. /package/dist/server/node_modules/{environment → onetime}/license +0 -0
@@ -1 +1 @@
1
- import{e as b,s as k,o as E,bM as P,j as i,X as K,aG as _,K as S,x as q}from"./index-DgPBaKAA.js";import{P as x}from"./index-CLgan7xr.js";import{d as I}from"./use-organization-settings-8KaGxc8P.js";import{S as Q}from"./switch-DEvD95wE.js";import{n as R}from"./Container-D1_FRS1u.js";import{b as w,S as z,a as F,d as M}from"./settings-section-Dr0LUAWl.js";import"./tooltip-apD1iSo_.js";import"./X-cgiyE3ZM.js";import"./constants-CxLUc4t1.js";import"./card-KdWbX1xC.js";import"./ArrowUpRight-gnKwWbdS.js";function N(){const e=b.c(17),{org:t,project:s}=k(),o=E();let u;e[0]!==s.enabledPlugins?(u=s.enabledPlugins??[],e[0]=s.enabledPlugins,e[1]=u):u=e[1];const c=u,l=I();let m;e[2]!==t||e[3]!==s.slug||e[4]!==o?(m=()=>{o.invalidateQueries({queryKey:S.project(t.id,s.slug)}),o.invalidateQueries({queryKey:S.projects(t.id)}),o.invalidateQueries({predicate:n=>{const r=n.queryKey;return r[1]===t.id&&r[3]==="collection"&&r[4]==="VIRTUAL_MCP"}})},e[2]=t,e[3]=s.slug,e[4]=o,e[5]=m):m=e[5];const j=m;let g;e[6]!==j||e[7]!==l||e[8]!==c?(g=(n,r)=>{const d=new Set(c);r?d.add(n):d.delete(n),l.mutate({enabled_plugins:Array.from(d)},{onSuccess:j,onError:A})},e[6]=j,e[7]=l,e[8]=c,e[9]=g):g=e[9];const p=g,y=$,C=U;if(P.length===0){let n;return e[10]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}),e[10]=n):n=e[10],n}let a;e[11]!==p||e[12]!==l||e[13]!==c?(a=P.map(n=>{const r=y(n.id),d=C(n.id),h=c.includes(n.id);return i.jsx(w,{title:r?.label??n.id,description:d??void 0,icon:i.jsx("span",{className:"text-muted-foreground [&>svg]:size-4",children:r?.icon??i.jsx(R,{size:14})}),onClick:()=>!l.isPending&&p(n.id,!h),action:i.jsx(Q,{checked:h,onCheckedChange:v=>p(n.id,v),disabled:l.isPending,onClick:T})},n.id)}),e[11]=p,e[12]=l,e[13]=c,e[14]=a):a=e[14];let f;return e[15]!==a?(f=i.jsx(z,{children:i.jsx(F,{children:a})}),e[15]=a,e[16]=f):f=e[16],f}function T(e){return e.stopPropagation()}function U(e){return P.find(s=>s.id===e)?.description??null}function $(e){const t=K.find(o=>o.pluginId===e);if(t)return{label:t.label,icon:t.items[0]?.icon};const s=_.find(o=>o.pluginId===e);return s?{label:s.label,icon:s.icon}:null}function A(e){q.error("Failed to update plugin: "+(e instanceof Error?e.message:"Unknown error"))}function D(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(x,{children:i.jsx(x.Content,{children:i.jsx(x.Body,{children:i.jsxs(M,{children:[i.jsx(x.Title,{children:"Plugins"}),i.jsx(N,{})]})})})}),e[0]=t):t=e[0],t}function ee(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D,{}),e[0]=t):t=e[0],t}export{ee as default};
1
+ import{e as b,s as k,o as E,bM as P,j as i,X as K,aG as _,K as S,x as q}from"./index-D4IWA9IU.js";import{P as x}from"./index-BET8kMZe.js";import{d as I}from"./use-organization-settings-DngIHmBy.js";import{S as Q}from"./switch-D9uEYoPa.js";import{n as R}from"./Container-d8d36LPk.js";import{b as w,S as z,a as F,d as M}from"./settings-section-DkPpouMA.js";import"./tooltip-B5FrLY14.js";import"./X-BNOerUAB.js";import"./constants-B22iOAkD.js";import"./card-oNblR0HO.js";import"./ArrowUpRight-lTwxwkJA.js";function N(){const e=b.c(17),{org:t,project:s}=k(),o=E();let u;e[0]!==s.enabledPlugins?(u=s.enabledPlugins??[],e[0]=s.enabledPlugins,e[1]=u):u=e[1];const c=u,l=I();let m;e[2]!==t||e[3]!==s.slug||e[4]!==o?(m=()=>{o.invalidateQueries({queryKey:S.project(t.id,s.slug)}),o.invalidateQueries({queryKey:S.projects(t.id)}),o.invalidateQueries({predicate:n=>{const r=n.queryKey;return r[1]===t.id&&r[3]==="collection"&&r[4]==="VIRTUAL_MCP"}})},e[2]=t,e[3]=s.slug,e[4]=o,e[5]=m):m=e[5];const j=m;let g;e[6]!==j||e[7]!==l||e[8]!==c?(g=(n,r)=>{const d=new Set(c);r?d.add(n):d.delete(n),l.mutate({enabled_plugins:Array.from(d)},{onSuccess:j,onError:A})},e[6]=j,e[7]=l,e[8]=c,e[9]=g):g=e[9];const p=g,y=$,C=U;if(P.length===0){let n;return e[10]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}),e[10]=n):n=e[10],n}let a;e[11]!==p||e[12]!==l||e[13]!==c?(a=P.map(n=>{const r=y(n.id),d=C(n.id),h=c.includes(n.id);return i.jsx(w,{title:r?.label??n.id,description:d??void 0,icon:i.jsx("span",{className:"text-muted-foreground [&>svg]:size-4",children:r?.icon??i.jsx(R,{size:14})}),onClick:()=>!l.isPending&&p(n.id,!h),action:i.jsx(Q,{checked:h,onCheckedChange:v=>p(n.id,v),disabled:l.isPending,onClick:T})},n.id)}),e[11]=p,e[12]=l,e[13]=c,e[14]=a):a=e[14];let f;return e[15]!==a?(f=i.jsx(z,{children:i.jsx(F,{children:a})}),e[15]=a,e[16]=f):f=e[16],f}function T(e){return e.stopPropagation()}function U(e){return P.find(s=>s.id===e)?.description??null}function $(e){const t=K.find(o=>o.pluginId===e);if(t)return{label:t.label,icon:t.items[0]?.icon};const s=_.find(o=>o.pluginId===e);return s?{label:s.label,icon:s.icon}:null}function A(e){q.error("Failed to update plugin: "+(e instanceof Error?e.message:"Unknown error"))}function D(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(x,{children:i.jsx(x.Content,{children:i.jsx(x.Body,{children:i.jsxs(M,{children:[i.jsx(x.Title,{children:"Plugins"}),i.jsx(N,{})]})})})}),e[0]=t):t=e[0],t}function ee(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D,{}),e[0]=t):t=e[0],t}export{ee as default};
@@ -1 +1 @@
1
- import{bW as b,e as f,j as c,D as C,r as d,c as p,aY as j,bX as v,bY as h}from"./index-DgPBaKAA.js";import{L as N}from"./label-DdmR-9sj.js";const E=b,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(C,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(j,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
1
+ import{bW as b,e as f,j as c,D as C,r as d,c as p,aY as j,bX as v,bY as h}from"./index-D4IWA9IU.js";import{L as N}from"./label-BDcPRk17.js";const E=b,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(C,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(j,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
@@ -1 +1 @@
1
- import{f as re,s as ce,o as de,r as U,z as me,C as ue,a as fe,t as Y,x as q,K as te,j as s,B as K,H as ge,J as W,e as L,c as xe,M as pe}from"./index-DgPBaKAA.js";import{P as V}from"./index-CLgan7xr.js";import{u as he}from"./use-org-auth-client-DpMUudQp.js";import{A as be}from"./avatar-DYHAtJIn.js";import{I as je}from"./input-s7yMiYrQ.js";import{S as X,a as Z,b as Q,c as ie,d as ve}from"./settings-section-Dr0LUAWl.js";import{D as Se}from"./domain-settings-WXCddaP7.js";import{u as ye,a as se,D as Ne,c as Ce,S as we,v as _e,K as ze,P as De,d as Ae,C as Pe,s as ke,b as Ie,e as Ee}from"./collection-search-C_3BuKbi.js";import{W as ee,i as Oe}from"./constants-CxLUc4t1.js";import{b as le}from"./use-virtual-mcp-DqIUOY7O.js";import{b as Te,P as Re,a as Fe}from"./popover-BO9bGsCV.js";import{S as Le}from"./skeleton-CUpGn6FE.js";import{z as $e}from"./agent-icon-BdKQ6n0b.js";import{s as Me}from"./Plus-Ukcu1-Za.js";import{a as ae}from"./Users03-DXg5Ltjv.js";import{i as He}from"./X-cgiyE3ZM.js";import{I as J}from"./integration-icon-BTFNSNVv.js";import{u as Ke,c as Ue}from"./use-organization-settings-8KaGxc8P.js";import"./tooltip-apD1iSo_.js";import"./User01-Dt3HpnQa.js";import"./card-KdWbX1xC.js";import"./ArrowUpRight-gnKwWbdS.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./switch-DEvD95wE.js";import"./SearchMd-CaU1opgI.js";import"./use-collections-DFWGNuJR.js";import"./AlertCircle-vEsirhNa.js";import"./Tool01-Baq41T_m.js";import"./XClose-BddCxuhK.js";import"./RefreshCcw01-i1Q8uoB-.js";import"./ArrowNarrowLeft-DZv_aYqP.js";import"./XCircle-pfcw5bLn.js";import"./ZapSquare-BcZ9bNOI.js";import"./CheckCircle-CG65sxv8.js";import"./ChevronDown-ClwyYcv4.js";import"./ChevronRight-C0UgsndQ.js";import"./ChevronUp-0O0O_hLq.js";import"./DotsVertical-BdLY0G_d.js";import"./Container-D1_FRS1u.js";import"./Star01-BRRUiVRZ.js";import"./Palette-DTaJJ6eW.js";import"./LinkExternal01-C0RHT0gp.js";import"./Lock01-CJP_L01s.js";import"./Sun-xRqcyI3R.js";import"./Play-wg-GRHFk.js";import"./Settings02-sn7Sw6YT.js";import"./Shield01-BV1qTPTH.js";import"./Trash01-vBGY9tLb.js";import"./Zap-Csq8iSdS.js";const qe=ge({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function Be(t){const e=L.c(13),{value:l,onChange:i,name:u,disabled:a}=t,n=U.useRef(null);let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=()=>n.current?.click(),e[0]=v):v=e[0];const _=v;let S;e[1]!==i?(S=z=>{const x=z.target.files?.[0];if(!x)return;if(x.size>2097152){q.error("Image must be smaller than 2MB");return}const h=new FileReader;h.onerror=Ge,h.onloadend=()=>{h.result&&i(h.result),n.current&&(n.current.value="")},h.readAsDataURL(x)},e[1]=i,e[2]=S):S=e[2];const r=S;let d;e[3]!==a||e[4]!==r?(d=s.jsx("input",{ref:n,type:"file",accept:"image/*",onChange:r,className:"hidden",disabled:a}),e[3]=a,e[4]=r,e[5]=d):d=e[5];const o=l||void 0,f=u??"?";let m;e[6]!==o||e[7]!==f?(m=s.jsx(be,{url:o,fallback:f,shape:"square",size:"base"}),e[6]=o,e[7]=f,e[8]=m):m=e[8];let g;return e[9]!==a||e[10]!==d||e[11]!==m?(g=s.jsxs("button",{type:"button",onClick:_,disabled:a,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[d,m]}),e[9]=a,e[10]=d,e[11]=m,e[12]=g):g=e[12],g}function Ge(){return q.error("Failed to read image")}function Ve(){const t=re(),{org:e}=ce(),l=he(),i=de(),[u,a]=U.useState(!1),n=me({resolver:ue(qe),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),v=fe({mutationFn:async o=>{const f={name:o.name,slug:o.slug};o.logo&&(f.logo=o.logo);const m=await l.organization.update({data:f});if(m?.error)throw new Error(m.error.message||"Failed to update organization");return m},onSuccess:o=>{Y("organization_settings_updated",{organization_id:e.id,fields:Object.keys(n.formState.dirtyFields)}),i.invalidateQueries({queryKey:te.organizations()}),i.invalidateQueries({queryKey:te.activeOrganization(e.slug)}),q.success("Organization settings updated successfully"),o?.data?.slug&&o.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:o.data.slug}})},onError:o=>{Y("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(n.formState.dirtyFields),error:o instanceof Error?o.message:String(o)}),q.error(o instanceof Error?o.message:"Failed to update organization")},onSettled:()=>{a(!1)}}),_=o=>{a(!0),v.mutate(o)},S=n.formState.isDirty,r=n.formState.errors,d=typeof window<"u"?`${window.location.host}/`:"";return s.jsx("form",{onSubmit:n.handleSubmit(_),className:"flex flex-col gap-3",children:s.jsx(X,{children:s.jsxs(Z,{children:[s.jsx(Q,{title:"Logo",description:"Recommended size is 256x256px",action:s.jsx(Be,{value:n.watch("logo"),onChange:o=>n.setValue("logo",o??"",{shouldDirty:!0}),name:n.watch("name"),disabled:u})}),s.jsx(Q,{title:"Name",action:s.jsx(je,{id:"org-name",...n.register("name"),placeholder:"Organization name",disabled:u,className:"w-[280px]"})}),s.jsx(Q,{title:"URL",action:s.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[d&&s.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:d}),s.jsx("input",{id:"org-slug",...n.register("slug"),placeholder:"my-organization",disabled:u,className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const f=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");n.setValue("slug",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}})]})}),(r.name||r.slug||r.logo)&&s.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&s.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&s.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&s.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]}),S&&s.jsxs(ie,{children:[s.jsx(K,{type:"button",variant:"outline",size:"sm",onClick:()=>n.reset(),disabled:u,children:"Cancel"}),s.jsx(K,{type:"submit",disabled:u,size:"sm",children:u?"Saving…":"Save"})]})]})})})}const ne=["site-editor","site-diagnostics","ai-image","ai-research"],oe=8;function We(t,e,l){const i=e.find(a=>a.id===t);if(i)return{id:i.id,title:i.title,icon:i.icon,kind:"template"};const u=l.find(a=>a.id===t);return u?{id:t,title:u.title,icon:u.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function Qe(t){const e=L.c(39),{agent:l,onRemove:i}=t;let u;e[0]!==l.id?(u={id:l.id},e[0]=l.id,e[1]=u):u=e[1];const{attributes:a,listeners:n,setNodeRef:v,transform:_,transition:S,isDragging:r}=Ae(u);let d;e[2]!==_?(d=Pe.Transform.toString(_),e[2]=_,e[3]=d):d=e[3];const o=r?.5:void 0,f=r?100:void 0;let m;e[4]!==d||e[5]!==o||e[6]!==f||e[7]!==S?(m={transform:d,transition:S,opacity:o,zIndex:f},e[4]=d,e[5]=o,e[6]=f,e[7]=S,e[8]=m):m=e[8];const g=m,z=r&&"shadow-lg";let x;e[9]!==z?(x=xe("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",z),e[9]=z,e[10]=x):x=e[10];const h=`Drag to reorder ${l.title}`;let D;e[11]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx($e,{size:14}),e[11]=D):D=e[11];let k;e[12]!==a||e[13]!==n||e[14]!==h?(k=s.jsx("button",{type:"button",...a,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":h,children:D}),e[12]=a,e[13]=n,e[14]=h,e[15]=k):k=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ae,{size:14}),e[16]=y):y=e[16];let C;e[17]!==l.icon||e[18]!==l.title?(C=s.jsx(J,{icon:l.icon,name:l.title,size:"xs",fallbackIcon:y}),e[17]=l.icon,e[18]=l.title,e[19]=C):C=e[19];let b;e[20]!==l.title?(b=s.jsx("span",{className:"text-sm text-foreground truncate",children:l.title}),e[20]=l.title,e[21]=b):b=e[21];const w=l.kind==="template"?"Template":l.kind==="custom"?"Custom agent":"Unavailable";let p;e[22]!==w?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:w}),e[22]=w,e[23]=p):p=e[23];let j;e[24]!==b||e[25]!==p?(j=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[b,p]}),e[24]=b,e[25]=p,e[26]=j):j=e[26];const I=`Remove ${l.title}`;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(He,{size:14}),e[27]=A):A=e[27];let N;e[28]!==i||e[29]!==I?(N=s.jsx("button",{type:"button",onClick:i,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":I,children:A}),e[28]=i,e[29]=I,e[30]=N):N=e[30];let P;return e[31]!==v||e[32]!==g||e[33]!==k||e[34]!==C||e[35]!==j||e[36]!==N||e[37]!==x?(P=s.jsxs("div",{ref:v,style:g,className:x,children:[k,C,j,N]}),e[31]=v,e[32]=g,e[33]=k,e[34]=C,e[35]=j,e[36]=N,e[37]=x,e[38]=P):P=e[38],P}function Ye(t){const e=L.c(48),{selectedIds:l,onAdd:i}=t,[u,a]=U.useState(!1),[n,v]=U.useState(""),_=le();let S;e[0]!==l?(S=new Set(l),e[0]=l,e[1]=S):S=e[1];const r=S;let d,o,f,m,g,z,x,h,D,k,y,C,b;if(e[2]!==_||e[3]!==i||e[4]!==u||e[5]!==n||e[6]!==r){const A=n.toLowerCase();m=ee.filter(c=>!r.has(c.id)&&(!n||c.title.toLowerCase().includes(A)));let N;e[20]!==r?(N=c=>c.id!==null&&!Oe(c.id)&&!r.has(c.id),e[20]=r,e[21]=N):N=e[21],f=_.filter(N).filter(c=>!n||c.title.toLowerCase().includes(A));let P;e[22]!==i?(P=c=>{i(c),a(!1),v("")},e[22]=i,e[23]=P):P=e[23];const O=P;o=Te,C=u,b=a,e[24]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Re,{asChild:!0,children:s.jsxs(K,{type:"button",variant:"outline",size:"sm",children:[s.jsx(Me,{size:14}),"Add agent"]})}),e[24]=g):g=e[24],d=Fe,D="w-[320px] p-0 overflow-hidden",k="start",e[25]!==n?(y=s.jsx(Ee,{value:n,onChange:v,placeholder:"Search agents..."}),e[25]=n,e[26]=y):y=e[26],z="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",x=m.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Templates"}),m.map(c=>s.jsxs("button",{type:"button",onClick:()=>O(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),h=f.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Custom agents"}),f.map(c=>s.jsxs("button",{type:"button",onClick:()=>O(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs",fallbackIcon:s.jsx(ae,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),e[2]=_,e[3]=i,e[4]=u,e[5]=n,e[6]=r,e[7]=d,e[8]=o,e[9]=f,e[10]=m,e[11]=g,e[12]=z,e[13]=x,e[14]=h,e[15]=D,e[16]=k,e[17]=y,e[18]=C,e[19]=b}else d=e[7],o=e[8],f=e[9],m=e[10],g=e[11],z=e[12],x=e[13],h=e[14],D=e[15],k=e[16],y=e[17],C=e[18],b=e[19];let w;e[27]!==f||e[28]!==m.length||e[29]!==n?(w=m.length===0&&f.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground text-center py-6",children:n?"No agents found":"All agents are already added"}),e[27]=f,e[28]=m.length,e[29]=n,e[30]=w):w=e[30];let p;e[31]!==w||e[32]!==z||e[33]!==x||e[34]!==h?(p=s.jsxs("div",{className:z,children:[x,h,w]}),e[31]=w,e[32]=z,e[33]=x,e[34]=h,e[35]=p):p=e[35];let j;e[36]!==d||e[37]!==p||e[38]!==D||e[39]!==k||e[40]!==y?(j=s.jsxs(d,{className:D,align:k,children:[y,p]}),e[36]=d,e[37]=p,e[38]=D,e[39]=k,e[40]=y,e[41]=j):j=e[41];let I;return e[42]!==o||e[43]!==g||e[44]!==j||e[45]!==C||e[46]!==b?(I=s.jsxs(o,{open:C,onOpenChange:b,children:[g,j]}),e[42]=o,e[43]=g,e[44]=j,e[45]=C,e[46]=b,e[47]=I):I=e[47],I}function Je(){const t=L.c(61),e=Ke(),l=le(),i=Ue();let u;t[0]!==e?.ids?(u=e?.ids??[...ne],t[0]=e?.ids,t[1]=u):u=t[1];const a=u,[n,v]=U.useState(a);let _;t[2]!==n||t[3]!==a?(_=n.length!==a.length||n.some((E,T)=>E!==a[T]),t[2]=n,t[3]=a,t[4]=_):_=t[4];const S=_;let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r={activationConstraint:{distance:5}},t[5]=r):r=t[5];let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d={coordinateGetter:ke},t[6]=d):d=t[6];const o=ye(se(De,r),se(ze,d));let f;t[7]!==n?(f=E=>{const{active:T,over:R}=E;if(!R||T.id===R.id)return;const F=n.indexOf(T.id),G=n.indexOf(R.id);F===-1||G===-1||v(Ie([...n],F,G))},t[7]=n,t[8]=f):f=t[8];const m=f;let g;t[9]!==n?(g=E=>{n.includes(E)||v([...n,E])},t[9]=n,t[10]=g):g=t[10];const z=g;let x;t[11]!==n?(x=E=>{v(n.filter(T=>T!==E))},t[11]=n,t[12]=x):x=t[12];const h=x;let D;t[13]===Symbol.for("react.memo_cache_sentinel")?(D=()=>{v([...ne])},t[13]=D):D=t[13];const k=D;let y;t[14]!==n||t[15]!==i?(y=()=>{i.mutate({ids:n},{onSuccess:()=>{Y("default_home_agents_updated",{count:n.length,template_count:n.filter(Ze).length}),q.success("Default home agents updated")},onError:Xe})},t[14]=n,t[15]=i,t[16]=y):y=t[16];const C=y;let b,w,p,j,I,A,N;if(t[17]!==l||t[18]!==n||t[19]!==m||t[20]!==h||t[21]!==o||t[22]!==i.isPending){let E;t[30]!==l?(E=F=>We(F,ee,l),t[30]=l,t[31]=E):E=t[31];const T=n.map(E);p=Math.max(0,n.length-oe),w=X,I="Default home agents";let R;t[32]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(pe,{size:14}),t[32]=R):R=t[32],t[33]!==i.isPending?(A=s.jsxs(K,{type:"button",variant:"ghost",size:"sm",onClick:k,disabled:i.isPending,children:[R,"Reset defaults"]}),t[33]=i.isPending,t[34]=A):A=t[34],b=Z,N="px-5 py-5 flex flex-col gap-3",j=T.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-border p-6 text-center text-xs text-muted-foreground",children:'No agents selected. The home view will only show "Create agent".'}):s.jsx(Ne,{sensors:o,collisionDetection:Ce,onDragEnd:m,children:s.jsx(we,{items:n,strategy:_e,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:T.map((F,G)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[G===oe&&s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-xs text-muted-foreground",children:[s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx("span",{children:"Below this line is hidden on the home view"}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),s.jsx(Qe,{agent:F,onRemove:()=>h(F.id)})]},F.id))})})}),t[17]=l,t[18]=n,t[19]=m,t[20]=h,t[21]=o,t[22]=i.isPending,t[23]=b,t[24]=w,t[25]=p,t[26]=j,t[27]=I,t[28]=A,t[29]=N}else b=t[23],w=t[24],p=t[25],j=t[26],I=t[27],A=t[28],N=t[29];let P;t[35]!==n||t[36]!==z?(P=s.jsx(Ye,{selectedIds:n,onAdd:z}),t[35]=n,t[36]=z,t[37]=P):P=t[37];let O;t[38]!==p?(O=p>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[p," agent",p===1?"":"s"," won't fit on the home view"]}),t[38]=p,t[39]=O):O=t[39];let c;t[40]!==P||t[41]!==O?(c=s.jsxs("div",{className:"flex items-center justify-between",children:[P,O]}),t[40]=P,t[41]=O,t[42]=c):c=t[42];let $;t[43]!==j||t[44]!==c||t[45]!==N?($=s.jsxs("div",{className:N,children:[j,c]}),t[43]=j,t[44]=c,t[45]=N,t[46]=$):$=t[46];let M;t[47]!==C||t[48]!==a||t[49]!==S||t[50]!==i.isPending?(M=S&&s.jsxs(ie,{children:[s.jsx(K,{type:"button",variant:"outline",onClick:()=>v(a),disabled:i.isPending,children:"Cancel"}),s.jsx(K,{type:"button",onClick:C,disabled:i.isPending,children:i.isPending?"Saving…":"Save"})]}),t[47]=C,t[48]=a,t[49]=S,t[50]=i.isPending,t[51]=M):M=t[51];let H;t[52]!==b||t[53]!==$||t[54]!==M?(H=s.jsxs(b,{children:[$,M]}),t[52]=b,t[53]=$,t[54]=M,t[55]=H):H=t[55];let B;return t[56]!==w||t[57]!==I||t[58]!==A||t[59]!==H?(B=s.jsx(w,{title:I,actions:A,children:H}),t[56]=w,t[57]=I,t[58]=A,t[59]=H,t[60]=B):B=t[60],B}function Xe(t){q.error(t instanceof Error?t.message:"Failed to update default home agents")}function Ze(t){return ee.some(e=>e.id===t)}function et(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(X,{title:"Default home agents",children:s.jsx(Z,{children:s.jsx("div",{className:"px-5 py-5 flex flex-col gap-2",children:Array.from({length:4}).map(tt)})})}),t[0]=e):e=t[0],e}function tt(t,e){return s.jsx(Le,{className:"h-12 w-full rounded-lg"},e)}function st(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(U.Suspense,{fallback:s.jsx(et,{}),children:s.jsx(Je,{})}),t[0]=e):e=t[0],e}function nt(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(V,{children:s.jsx(V.Content,{children:s.jsx(V.Body,{children:s.jsxs(ve,{children:[s.jsx(V.Title,{children:"Organization"}),s.jsx(Ve,{}),s.jsx(Se,{}),s.jsx(st,{})]})})})}),t[0]=e):e=t[0],e}function Zt(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(nt,{}),t[0]=e):e=t[0],e}export{Zt as default};
1
+ import{f as re,s as ce,o as de,r as U,z as me,C as ue,a as fe,t as Y,x as q,K as te,j as s,B as K,H as ge,J as W,e as L,c as xe,M as pe}from"./index-D4IWA9IU.js";import{P as V}from"./index-BET8kMZe.js";import{u as he}from"./use-org-auth-client-C-BGwXKo.js";import{A as be}from"./avatar-C6HNjGDg.js";import{I as je}from"./input-DhXllgVP.js";import{S as X,a as Z,b as Q,c as ie,d as ve}from"./settings-section-DkPpouMA.js";import{D as Se}from"./domain-settings-_aY4XST2.js";import{u as ye,a as se,D as Ne,c as Ce,S as we,v as _e,K as ze,P as De,d as Ae,C as Pe,s as ke,b as Ie,e as Ee}from"./collection-search-DGO6_1o7.js";import{W as ee,i as Oe}from"./constants-B22iOAkD.js";import{b as le}from"./use-virtual-mcp-CDCK02Yj.js";import{b as Te,P as Re,a as Fe}from"./popover-DQq9bf6V.js";import{S as Le}from"./skeleton-DCMX-VkN.js";import{z as $e}from"./agent-icon-CLQAOsUE.js";import{s as Me}from"./Plus-DlISHBLe.js";import{a as ae}from"./Users03-qD8JWxak.js";import{i as He}from"./X-BNOerUAB.js";import{I as J}from"./integration-icon-CNQIPioy.js";import{u as Ke,c as Ue}from"./use-organization-settings-DngIHmBy.js";import"./tooltip-B5FrLY14.js";import"./User01-Bq8r53VC.js";import"./card-oNblR0HO.js";import"./ArrowUpRight-lTwxwkJA.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./switch-D9uEYoPa.js";import"./SearchMd-C8WDOhfc.js";import"./use-collections-DKWG5Tun.js";import"./AlertCircle-BeiDn4Fp.js";import"./Tool01-B8RjIhe4.js";import"./XClose-vOlmnMjZ.js";import"./RefreshCcw01-Dbq2QLAC.js";import"./ArrowNarrowLeft-hulNygQd.js";import"./XCircle-B-JS14_e.js";import"./ZapSquare-CX9zqrxv.js";import"./CheckCircle-3TB25Bcb.js";import"./ChevronDown-_b59faTm.js";import"./ChevronRight-DEybByBs.js";import"./ChevronUp-B_td_jK6.js";import"./DotsVertical-9AuPT8gf.js";import"./Container-d8d36LPk.js";import"./Star01-Chns_B29.js";import"./Palette-DfnmIo6d.js";import"./LinkExternal01-BMrJcbl6.js";import"./Lock01-C5rgxGgu.js";import"./Sun-CgSsJ8OX.js";import"./Play-BGW505UY.js";import"./Settings02-BIpL5e3f.js";import"./Shield01-DCoI7_zY.js";import"./Trash01-CFncShuD.js";import"./Zap-BPHOFmqu.js";const qe=ge({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function Be(t){const e=L.c(13),{value:l,onChange:i,name:u,disabled:a}=t,n=U.useRef(null);let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=()=>n.current?.click(),e[0]=v):v=e[0];const _=v;let S;e[1]!==i?(S=z=>{const x=z.target.files?.[0];if(!x)return;if(x.size>2097152){q.error("Image must be smaller than 2MB");return}const h=new FileReader;h.onerror=Ge,h.onloadend=()=>{h.result&&i(h.result),n.current&&(n.current.value="")},h.readAsDataURL(x)},e[1]=i,e[2]=S):S=e[2];const r=S;let d;e[3]!==a||e[4]!==r?(d=s.jsx("input",{ref:n,type:"file",accept:"image/*",onChange:r,className:"hidden",disabled:a}),e[3]=a,e[4]=r,e[5]=d):d=e[5];const o=l||void 0,f=u??"?";let m;e[6]!==o||e[7]!==f?(m=s.jsx(be,{url:o,fallback:f,shape:"square",size:"base"}),e[6]=o,e[7]=f,e[8]=m):m=e[8];let g;return e[9]!==a||e[10]!==d||e[11]!==m?(g=s.jsxs("button",{type:"button",onClick:_,disabled:a,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[d,m]}),e[9]=a,e[10]=d,e[11]=m,e[12]=g):g=e[12],g}function Ge(){return q.error("Failed to read image")}function Ve(){const t=re(),{org:e}=ce(),l=he(),i=de(),[u,a]=U.useState(!1),n=me({resolver:ue(qe),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),v=fe({mutationFn:async o=>{const f={name:o.name,slug:o.slug};o.logo&&(f.logo=o.logo);const m=await l.organization.update({data:f});if(m?.error)throw new Error(m.error.message||"Failed to update organization");return m},onSuccess:o=>{Y("organization_settings_updated",{organization_id:e.id,fields:Object.keys(n.formState.dirtyFields)}),i.invalidateQueries({queryKey:te.organizations()}),i.invalidateQueries({queryKey:te.activeOrganization(e.slug)}),q.success("Organization settings updated successfully"),o?.data?.slug&&o.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:o.data.slug}})},onError:o=>{Y("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(n.formState.dirtyFields),error:o instanceof Error?o.message:String(o)}),q.error(o instanceof Error?o.message:"Failed to update organization")},onSettled:()=>{a(!1)}}),_=o=>{a(!0),v.mutate(o)},S=n.formState.isDirty,r=n.formState.errors,d=typeof window<"u"?`${window.location.host}/`:"";return s.jsx("form",{onSubmit:n.handleSubmit(_),className:"flex flex-col gap-3",children:s.jsx(X,{children:s.jsxs(Z,{children:[s.jsx(Q,{title:"Logo",description:"Recommended size is 256x256px",action:s.jsx(Be,{value:n.watch("logo"),onChange:o=>n.setValue("logo",o??"",{shouldDirty:!0}),name:n.watch("name"),disabled:u})}),s.jsx(Q,{title:"Name",action:s.jsx(je,{id:"org-name",...n.register("name"),placeholder:"Organization name",disabled:u,className:"w-[280px]"})}),s.jsx(Q,{title:"URL",action:s.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[d&&s.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:d}),s.jsx("input",{id:"org-slug",...n.register("slug"),placeholder:"my-organization",disabled:u,className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const f=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");n.setValue("slug",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}})]})}),(r.name||r.slug||r.logo)&&s.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&s.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&s.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&s.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]}),S&&s.jsxs(ie,{children:[s.jsx(K,{type:"button",variant:"outline",size:"sm",onClick:()=>n.reset(),disabled:u,children:"Cancel"}),s.jsx(K,{type:"submit",disabled:u,size:"sm",children:u?"Saving…":"Save"})]})]})})})}const ne=["site-editor","site-diagnostics","ai-image","ai-research"],oe=8;function We(t,e,l){const i=e.find(a=>a.id===t);if(i)return{id:i.id,title:i.title,icon:i.icon,kind:"template"};const u=l.find(a=>a.id===t);return u?{id:t,title:u.title,icon:u.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function Qe(t){const e=L.c(39),{agent:l,onRemove:i}=t;let u;e[0]!==l.id?(u={id:l.id},e[0]=l.id,e[1]=u):u=e[1];const{attributes:a,listeners:n,setNodeRef:v,transform:_,transition:S,isDragging:r}=Ae(u);let d;e[2]!==_?(d=Pe.Transform.toString(_),e[2]=_,e[3]=d):d=e[3];const o=r?.5:void 0,f=r?100:void 0;let m;e[4]!==d||e[5]!==o||e[6]!==f||e[7]!==S?(m={transform:d,transition:S,opacity:o,zIndex:f},e[4]=d,e[5]=o,e[6]=f,e[7]=S,e[8]=m):m=e[8];const g=m,z=r&&"shadow-lg";let x;e[9]!==z?(x=xe("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",z),e[9]=z,e[10]=x):x=e[10];const h=`Drag to reorder ${l.title}`;let D;e[11]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx($e,{size:14}),e[11]=D):D=e[11];let k;e[12]!==a||e[13]!==n||e[14]!==h?(k=s.jsx("button",{type:"button",...a,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":h,children:D}),e[12]=a,e[13]=n,e[14]=h,e[15]=k):k=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ae,{size:14}),e[16]=y):y=e[16];let C;e[17]!==l.icon||e[18]!==l.title?(C=s.jsx(J,{icon:l.icon,name:l.title,size:"xs",fallbackIcon:y}),e[17]=l.icon,e[18]=l.title,e[19]=C):C=e[19];let b;e[20]!==l.title?(b=s.jsx("span",{className:"text-sm text-foreground truncate",children:l.title}),e[20]=l.title,e[21]=b):b=e[21];const w=l.kind==="template"?"Template":l.kind==="custom"?"Custom agent":"Unavailable";let p;e[22]!==w?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:w}),e[22]=w,e[23]=p):p=e[23];let j;e[24]!==b||e[25]!==p?(j=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[b,p]}),e[24]=b,e[25]=p,e[26]=j):j=e[26];const I=`Remove ${l.title}`;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(He,{size:14}),e[27]=A):A=e[27];let N;e[28]!==i||e[29]!==I?(N=s.jsx("button",{type:"button",onClick:i,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":I,children:A}),e[28]=i,e[29]=I,e[30]=N):N=e[30];let P;return e[31]!==v||e[32]!==g||e[33]!==k||e[34]!==C||e[35]!==j||e[36]!==N||e[37]!==x?(P=s.jsxs("div",{ref:v,style:g,className:x,children:[k,C,j,N]}),e[31]=v,e[32]=g,e[33]=k,e[34]=C,e[35]=j,e[36]=N,e[37]=x,e[38]=P):P=e[38],P}function Ye(t){const e=L.c(48),{selectedIds:l,onAdd:i}=t,[u,a]=U.useState(!1),[n,v]=U.useState(""),_=le();let S;e[0]!==l?(S=new Set(l),e[0]=l,e[1]=S):S=e[1];const r=S;let d,o,f,m,g,z,x,h,D,k,y,C,b;if(e[2]!==_||e[3]!==i||e[4]!==u||e[5]!==n||e[6]!==r){const A=n.toLowerCase();m=ee.filter(c=>!r.has(c.id)&&(!n||c.title.toLowerCase().includes(A)));let N;e[20]!==r?(N=c=>c.id!==null&&!Oe(c.id)&&!r.has(c.id),e[20]=r,e[21]=N):N=e[21],f=_.filter(N).filter(c=>!n||c.title.toLowerCase().includes(A));let P;e[22]!==i?(P=c=>{i(c),a(!1),v("")},e[22]=i,e[23]=P):P=e[23];const O=P;o=Te,C=u,b=a,e[24]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Re,{asChild:!0,children:s.jsxs(K,{type:"button",variant:"outline",size:"sm",children:[s.jsx(Me,{size:14}),"Add agent"]})}),e[24]=g):g=e[24],d=Fe,D="w-[320px] p-0 overflow-hidden",k="start",e[25]!==n?(y=s.jsx(Ee,{value:n,onChange:v,placeholder:"Search agents..."}),e[25]=n,e[26]=y):y=e[26],z="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",x=m.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Templates"}),m.map(c=>s.jsxs("button",{type:"button",onClick:()=>O(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),h=f.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Custom agents"}),f.map(c=>s.jsxs("button",{type:"button",onClick:()=>O(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs",fallbackIcon:s.jsx(ae,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),e[2]=_,e[3]=i,e[4]=u,e[5]=n,e[6]=r,e[7]=d,e[8]=o,e[9]=f,e[10]=m,e[11]=g,e[12]=z,e[13]=x,e[14]=h,e[15]=D,e[16]=k,e[17]=y,e[18]=C,e[19]=b}else d=e[7],o=e[8],f=e[9],m=e[10],g=e[11],z=e[12],x=e[13],h=e[14],D=e[15],k=e[16],y=e[17],C=e[18],b=e[19];let w;e[27]!==f||e[28]!==m.length||e[29]!==n?(w=m.length===0&&f.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground text-center py-6",children:n?"No agents found":"All agents are already added"}),e[27]=f,e[28]=m.length,e[29]=n,e[30]=w):w=e[30];let p;e[31]!==w||e[32]!==z||e[33]!==x||e[34]!==h?(p=s.jsxs("div",{className:z,children:[x,h,w]}),e[31]=w,e[32]=z,e[33]=x,e[34]=h,e[35]=p):p=e[35];let j;e[36]!==d||e[37]!==p||e[38]!==D||e[39]!==k||e[40]!==y?(j=s.jsxs(d,{className:D,align:k,children:[y,p]}),e[36]=d,e[37]=p,e[38]=D,e[39]=k,e[40]=y,e[41]=j):j=e[41];let I;return e[42]!==o||e[43]!==g||e[44]!==j||e[45]!==C||e[46]!==b?(I=s.jsxs(o,{open:C,onOpenChange:b,children:[g,j]}),e[42]=o,e[43]=g,e[44]=j,e[45]=C,e[46]=b,e[47]=I):I=e[47],I}function Je(){const t=L.c(61),e=Ke(),l=le(),i=Ue();let u;t[0]!==e?.ids?(u=e?.ids??[...ne],t[0]=e?.ids,t[1]=u):u=t[1];const a=u,[n,v]=U.useState(a);let _;t[2]!==n||t[3]!==a?(_=n.length!==a.length||n.some((E,T)=>E!==a[T]),t[2]=n,t[3]=a,t[4]=_):_=t[4];const S=_;let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r={activationConstraint:{distance:5}},t[5]=r):r=t[5];let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d={coordinateGetter:ke},t[6]=d):d=t[6];const o=ye(se(De,r),se(ze,d));let f;t[7]!==n?(f=E=>{const{active:T,over:R}=E;if(!R||T.id===R.id)return;const F=n.indexOf(T.id),G=n.indexOf(R.id);F===-1||G===-1||v(Ie([...n],F,G))},t[7]=n,t[8]=f):f=t[8];const m=f;let g;t[9]!==n?(g=E=>{n.includes(E)||v([...n,E])},t[9]=n,t[10]=g):g=t[10];const z=g;let x;t[11]!==n?(x=E=>{v(n.filter(T=>T!==E))},t[11]=n,t[12]=x):x=t[12];const h=x;let D;t[13]===Symbol.for("react.memo_cache_sentinel")?(D=()=>{v([...ne])},t[13]=D):D=t[13];const k=D;let y;t[14]!==n||t[15]!==i?(y=()=>{i.mutate({ids:n},{onSuccess:()=>{Y("default_home_agents_updated",{count:n.length,template_count:n.filter(Ze).length}),q.success("Default home agents updated")},onError:Xe})},t[14]=n,t[15]=i,t[16]=y):y=t[16];const C=y;let b,w,p,j,I,A,N;if(t[17]!==l||t[18]!==n||t[19]!==m||t[20]!==h||t[21]!==o||t[22]!==i.isPending){let E;t[30]!==l?(E=F=>We(F,ee,l),t[30]=l,t[31]=E):E=t[31];const T=n.map(E);p=Math.max(0,n.length-oe),w=X,I="Default home agents";let R;t[32]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(pe,{size:14}),t[32]=R):R=t[32],t[33]!==i.isPending?(A=s.jsxs(K,{type:"button",variant:"ghost",size:"sm",onClick:k,disabled:i.isPending,children:[R,"Reset defaults"]}),t[33]=i.isPending,t[34]=A):A=t[34],b=Z,N="px-5 py-5 flex flex-col gap-3",j=T.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-border p-6 text-center text-xs text-muted-foreground",children:'No agents selected. The home view will only show "Create agent".'}):s.jsx(Ne,{sensors:o,collisionDetection:Ce,onDragEnd:m,children:s.jsx(we,{items:n,strategy:_e,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:T.map((F,G)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[G===oe&&s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-xs text-muted-foreground",children:[s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx("span",{children:"Below this line is hidden on the home view"}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),s.jsx(Qe,{agent:F,onRemove:()=>h(F.id)})]},F.id))})})}),t[17]=l,t[18]=n,t[19]=m,t[20]=h,t[21]=o,t[22]=i.isPending,t[23]=b,t[24]=w,t[25]=p,t[26]=j,t[27]=I,t[28]=A,t[29]=N}else b=t[23],w=t[24],p=t[25],j=t[26],I=t[27],A=t[28],N=t[29];let P;t[35]!==n||t[36]!==z?(P=s.jsx(Ye,{selectedIds:n,onAdd:z}),t[35]=n,t[36]=z,t[37]=P):P=t[37];let O;t[38]!==p?(O=p>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[p," agent",p===1?"":"s"," won't fit on the home view"]}),t[38]=p,t[39]=O):O=t[39];let c;t[40]!==P||t[41]!==O?(c=s.jsxs("div",{className:"flex items-center justify-between",children:[P,O]}),t[40]=P,t[41]=O,t[42]=c):c=t[42];let $;t[43]!==j||t[44]!==c||t[45]!==N?($=s.jsxs("div",{className:N,children:[j,c]}),t[43]=j,t[44]=c,t[45]=N,t[46]=$):$=t[46];let M;t[47]!==C||t[48]!==a||t[49]!==S||t[50]!==i.isPending?(M=S&&s.jsxs(ie,{children:[s.jsx(K,{type:"button",variant:"outline",onClick:()=>v(a),disabled:i.isPending,children:"Cancel"}),s.jsx(K,{type:"button",onClick:C,disabled:i.isPending,children:i.isPending?"Saving…":"Save"})]}),t[47]=C,t[48]=a,t[49]=S,t[50]=i.isPending,t[51]=M):M=t[51];let H;t[52]!==b||t[53]!==$||t[54]!==M?(H=s.jsxs(b,{children:[$,M]}),t[52]=b,t[53]=$,t[54]=M,t[55]=H):H=t[55];let B;return t[56]!==w||t[57]!==I||t[58]!==A||t[59]!==H?(B=s.jsx(w,{title:I,actions:A,children:H}),t[56]=w,t[57]=I,t[58]=A,t[59]=H,t[60]=B):B=t[60],B}function Xe(t){q.error(t instanceof Error?t.message:"Failed to update default home agents")}function Ze(t){return ee.some(e=>e.id===t)}function et(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(X,{title:"Default home agents",children:s.jsx(Z,{children:s.jsx("div",{className:"px-5 py-5 flex flex-col gap-2",children:Array.from({length:4}).map(tt)})})}),t[0]=e):e=t[0],e}function tt(t,e){return s.jsx(Le,{className:"h-12 w-full rounded-lg"},e)}function st(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(U.Suspense,{fallback:s.jsx(et,{}),children:s.jsx(Je,{})}),t[0]=e):e=t[0],e}function nt(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(V,{children:s.jsx(V.Content,{children:s.jsx(V.Body,{children:s.jsxs(ve,{children:[s.jsx(V.Title,{children:"Organization"}),s.jsx(Ve,{}),s.jsx(Se,{}),s.jsx(st,{})]})})})}),t[0]=e):e=t[0],e}function Zt(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(nt,{}),t[0]=e):e=t[0],e}export{Zt as default};
@@ -0,0 +1 @@
1
+ import{e as n,j as r,r as d,g as h,O as f,l as u}from"./index-D4IWA9IU.js";import{S as j,a as b,b as S}from"./index-BET8kMZe.js";import{u as _}from"./tooltip-B5FrLY14.js";import{u as k,T as y,a as T,b as i,S as g}from"./index-D9Q6YnJH.js";import{C as v}from"./chat-context-RcvBJBC7.js";import"./X-BNOerUAB.js";import"./agent-icon-CLQAOsUE.js";import"./AlertCircle-BeiDn4Fp.js";import"./Tool01-B8RjIhe4.js";import"./XClose-vOlmnMjZ.js";import"./RefreshCcw01-Dbq2QLAC.js";import"./ArrowNarrowLeft-hulNygQd.js";import"./XCircle-B-JS14_e.js";import"./ArrowUpRight-lTwxwkJA.js";import"./ZapSquare-CX9zqrxv.js";import"./Users03-qD8JWxak.js";import"./CheckCircle-3TB25Bcb.js";import"./ChevronDown-_b59faTm.js";import"./ChevronRight-DEybByBs.js";import"./ChevronUp-B_td_jK6.js";import"./DotsVertical-9AuPT8gf.js";import"./Container-d8d36LPk.js";import"./Star01-Chns_B29.js";import"./Palette-DfnmIo6d.js";import"./SearchMd-C8WDOhfc.js";import"./LinkExternal01-BMrJcbl6.js";import"./Lock01-C5rgxGgu.js";import"./Sun-CgSsJ8OX.js";import"./Play-BGW505UY.js";import"./Plus-DlISHBLe.js";import"./Settings02-BIpL5e3f.js";import"./Shield01-DCoI7_zY.js";import"./Trash01-CFncShuD.js";import"./User01-Bq8r53VC.js";import"./Zap-BPHOFmqu.js";import"./shell-layout-DLX5f9iI.js";import"./dialog-ReVTOuxu.js";import"./required-auth-layout-CfAoaltR.js";import"./use-tasks-M1RmMNT7.js";import"./use-collections-DKWG5Tun.js";import"./constants-B22iOAkD.js";import"./use-organization-settings-DngIHmBy.js";import"./use-org-sso-2mlDJ8c4.js";import"./pair-CM7Z5dgt.js";import"./index-Bi-e-UKp.js";import"./use-copy-BSYEct5q.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./content-blocks-o63cs2vh.js";import"./types-DmM_J5U9.js";import"./integration-icon-CNQIPioy.js";import"./use-virtual-mcp-CDCK02Yj.js";import"./skeleton-DCMX-VkN.js";import"./popover-DQq9bf6V.js";import"./drawer-BYHJ-8Om.js";import"./avatar-C6HNjGDg.js";import"./alert-dialog-BWduFhy-.js";import"./form-D8QDPjk9.js";import"./label-BDcPRk17.js";import"./input-DhXllgVP.js";import"./index-U5YmU8lc.js";import"./use-mcp-tools-Bog3rGRX.js";import"./use-ai-providers-CVAGId9e.js";import"./index-DBj2qw-o.js";import"./switch-D9uEYoPa.js";import"./use-connection-Dy5vq_5j.js";import"./lean-canvas-recruit-modal-Cosr7uB6.js";import"./use-navigate-to-agent--7ajKHhy.js";import"./collection-search-CLoorkFj.js";import"./checkbox-JSEUVCMB.js";import"./extract-connection-data-CbVt8VgN.js";import"./constants-DRQ2x-Dp.js";import"./collections-CcBlrCx6.js";import"./tabs-Bbs5xG17.js";import"./dropdown-menu-y8iKrNsS.js";import"./select-dTphD0ES.js";import"./toggle-group-juphd3c4.js";import"./select-model-D2H_jWcd.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DkPpouMA.js";import"./card-oNblR0HO.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./index-D8dvMQZl.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DbGlMaON.js";import"./use-registry-connections-CDM-gpri.js";import"./useInfiniteQuery-DtJBa4_2.js";import"./infiniteQueryObserver-ClYEJj89.js";import"./collection-tabs-6c5Oz0MD.js";import"./badge-CZCn9Wwi.js";import"./textarea-BMU9fnHG.js";import"./connection-form-helpers-S9iwzj4v.js";import"./use-infinite-scroll-4DQHfv5o.js";import"./useSuspenseInfiniteQuery-G-zitmER.js";import"./collection-search-DGO6_1o7.js";import"./use-create-virtual-mcp-ifW0Pllw.js";import"./empty-state-B4rhh1dc.js";import"./use-decopilot-events-DVXCv4R8.js";import"./create-sse-subscription-CxkOgzKf.js";import"./task-status-1zFON5T4.js";const N=280;function P(){const t=n.c(2),{tasksOpen:e}=k();if(!e)return null;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={width:`${N}px`},t[0]=o):o=t[0];let m;return t[1]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx("aside",{className:"shrink-0 h-full bg-sidebar pb-1",style:o,children:r.jsx("div",{className:"h-full p-0.5 pt-0.25",children:r.jsx("div",{className:"h-full bg-background rounded-[0.75rem] overflow-hidden card-shadow",children:r.jsx(y,{})})})}),t[1]=m):m=t[1],m}function C(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(d.Suspense,{fallback:null,children:r.jsx(P,{})}),t[0]=e):e=t[0],e}function x(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"flex-1 flex items-center justify-center",children:r.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function yr(){const t=n.c(7),e=_();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const c=!!h(o).taskId;let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s={"--sidebar-width-icon":"3.5rem"},t[1]=s):s=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(g,{}),t[2]=l):l=t[2];let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p={background:"transparent",containerType:"inline-size"},t[3]=p):p=t[3];let a;return t[4]!==c||t[5]!==e?(a=r.jsx(j,{defaultOpen:!1,children:r.jsx("div",{className:"flex flex-col h-dvh overflow-hidden",children:r.jsxs(b,{className:"flex-1 bg-sidebar",style:s,children:[l,r.jsx(S,{className:"flex flex-col",style:p,children:r.jsx(v,{children:r.jsx(T,{children:e?r.jsx(d.Suspense,{fallback:r.jsx(x,{}),children:r.jsx(f,{})}):r.jsxs(i,{children:[r.jsxs(i.Header,{children:[r.jsxs(i.LeftColumn,{children:[r.jsx(i.Nav,{}),r.jsx(i.TogglesSlot,{})]}),r.jsx(i.CenterSlot,{}),r.jsxs(i.RightColumn,{children:[r.jsx(i.TabsSlot,{}),r.jsx(i.RightSlot,{})]})]}),r.jsxs("div",{className:"flex-1 min-h-0 flex flex-row",children:[c&&r.jsx(C,{}),r.jsx(d.Suspense,{fallback:r.jsx(x,{}),children:r.jsx(f,{})})]})]})})})})]})})}),t[4]=c,t[5]=e,t[6]=a):a=t[6],a}export{yr as default};
@@ -1 +1 @@
1
- import{r as y,e as m,c as b,j as n,cI as W,b_ as V,be as q,cJ as G,b$ as F,cL as J,c0 as X,aY as Y,aX as Z,B as K}from"./index-DgPBaKAA.js";import{u as Q,c as z,b as D,a as E,T as I}from"./tooltip-apD1iSo_.js";import{i as U}from"./X-cgiyE3ZM.js";const O=({size:i=24,color:e="currentColor",...t})=>y.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},y.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"}));O.displayName="LayoutLeft";function ee(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(V,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function te(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(F,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function se(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=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]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(X,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ae(i){const e=m.c(20);let t,s,a,l,o;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:o,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"right":l,d=o===void 0?!1:o;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{}),e[6]=u):u=e[6];const c=r==="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",p=r==="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",f=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",x=r==="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 g;e[7]!==s||e[8]!==c||e[9]!==p||e[10]!==f||e[11]!==x?(g=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-200 data-[state=open]:duration-200",c,p,f,x,s),e[7]=s,e[8]=c,e[9]=p,e[10]=f,e[11]=x,e[12]=g):g=e[12];let h;e[13]!==d?(h=!d&&n.jsxs(J,{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:[n.jsx(U,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=d,e[14]=h):h=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==g||e[18]!==h?(v=n.jsxs(te,{children:[u,n.jsxs(q,{"data-slot":"sheet-content",className:g,...a,children:[t,h]})]}),e[15]=t,e[16]=a,e[17]=g,e[18]=h,e[19]=v):v=e[19],v}function le(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ie(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(W,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ne(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(G,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const oe="15rem",re="18rem",de="4.5rem",H=y.createContext(null);function M(){const i=y.useContext(H);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function Se(i){const e=m.c(13),{children:t,defaultOpen:s}=i,a=s===void 0?!1:s,l=Q(),[o,r]=y.useState(!1);let d;e[0]!==l?(d=()=>{l&&r(fe)},e[0]=l,e[1]=d):d=e[1];const u=d,c=a?"expanded":"collapsed";let p;e[2]!==a||e[3]!==l||e[4]!==o||e[5]!==c||e[6]!==u?(p={state:c,open:a,setOpen:ce,isMobile:l,openMobile:o,setOpenMobile:r,toggleSidebar:u},e[2]=a,e[3]=l,e[4]=o,e[5]=c,e[6]=u,e[7]=p):p=e[7];const f=p;let x;e[8]!==t?(x=n.jsx(z,{delayDuration:0,children:t}),e[8]=t,e[9]=x):x=e[9];let g;return e[10]!==f||e[11]!==x?(g=n.jsx(H.Provider,{value:f,children:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12],g}function ce(){}function fe(i){return!i}function ye(i){const e=m.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let o;e[5]!==l?(o={"--sidebar-width":oe,"--sidebar-width-icon":de,...l},e[5]=l,e[6]=o):o=e[6];const r=o;let d;e[7]!==s?(d=b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=d):d=e[8];let u;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==d?(u=n.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:d,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=d,e[13]=u):u=e[13],u}function Ce(i){const e=m.c(36);let t,s,a,l,o;e[0]!==i?({side:l,variant:o,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"left":l,d=o===void 0?"sidebar":o,{isMobile:u,state:c,openMobile:p,setOpenMobile:f}=M();if(u){let P;e[6]===Symbol.for("react.memo_cache_sentinel")?(P={"--sidebar-width":re},e[6]=P):P=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs(le,{className:"sr-only",children:[n.jsx(ie,{children:"Sidebar"}),n.jsx(ne,{children:"Displays the mobile sidebar."})]}),e[7]=k):k=e[7];let $;e[8]!==t?($=n.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=n.jsxs(ae,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:P,side:r,children:[k,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let T;return e[13]!==p||e[14]!==a||e[15]!==f||e[16]!==_?(T=n.jsx(ee,{open:p,onOpenChange:f,...a,children:_}),e[13]=p,e[14]=a,e[15]=f,e[16]=_,e[17]=T):T=e[17],T}const x=c==="expanded",g=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let h;e[18]!==g?(h=b("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden",g),e[18]=g,e[19]=h):h=e[19];const v=x?void 0:"icon",C=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let N;e[20]!==s||e[21]!==C?(N=b("flex flex-col h-full",C,s),e[20]=s,e[21]=C,e[22]=N):N=e[22];let j;e[23]!==t?(j=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let w;e[25]!==a||e[26]!==N||e[27]!==j?(w=n.jsx("div",{"data-slot":"sidebar-container",className:N,...a,children:j}),e[25]=a,e[26]=N,e[27]=j,e[28]=w):w=e[28];let S;return e[29]!==r||e[30]!==c||e[31]!==h||e[32]!==v||e[33]!==w||e[34]!==d?(S=n.jsx("div",{className:h,"data-state":c,"data-collapsible":v,"data-variant":d,"data-side":r,"data-slot":"sidebar",children:w}),e[29]=r,e[30]=c,e[31]=h,e[32]=v,e[33]=w,e[34]=d,e[35]=S):S=e[35],S}function ue(i){const e=m.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=M();let o;e[4]!==t?(o=b("size-7",t),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==s||e[7]!==l?(r=x=>{s?.(x),l()},e[6]=s,e[7]=l,e[8]=r):r=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(O,{}),u=n.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=u):(d=e[9],u=e[10]);let c;e[11]!==a||e[12]!==o||e[13]!==r?(c=n.jsx(E,{asChild:!0,children:n.jsxs(K,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:o,onClick:r,...a,children:[d,u]})}),e[11]=a,e[12]=o,e[13]=r,e[14]=c):c=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",n.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(pe)})]}),e[15]=p):p=e[15];let f;return e[16]!==c?(f=n.jsx(z,{delayDuration:300,children:n.jsxs(I,{children:[c,p]})}),e[16]=c,e[17]=f):f=e[17],f}function pe(i){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function $e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=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]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Pe(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ke(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Te(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Me(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Be(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ze(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex w-full min-w-0 flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function De(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("group/menu-item relative w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const me=Z("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] focus-visible:outline-2 focus-visible:-outline-offset-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 ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ee(i){const e=m.c(28);let t,s,a,l,o,r,d;e[0]!==i?({asChild:a,isActive:l,variant:o,size:r,tooltip:d,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o,e[6]=r,e[7]=d):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5],r=e[6],d=e[7]);const u=a===void 0?!1:a,c=l===void 0?!1:l,p=o===void 0?"default":o,f=r===void 0?"default":r,x=u?Y:"button",{isMobile:g}=M();let h;e[8]!==t||e[9]!==f||e[10]!==p?(h=b(me({variant:p,size:f}),t),e[8]=t,e[9]=f,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==x||e[13]!==c||e[14]!==s||e[15]!==f||e[16]!==h?(v=n.jsx(x,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":c,className:h,...s}),e[12]=x,e[13]=c,e[14]=s,e[15]=f,e[16]=h,e[17]=v):v=e[17];const C=v;if(!d)return C;if(typeof d=="string"){let S;e[18]!==d?(S={children:d},e[18]=d,e[19]=S):S=e[19],d=S}let N;e[20]!==C?(N=n.jsx(E,{asChild:!0,children:C}),e[20]=C,e[21]=N):N=e[21];let j;e[22]!==g||e[23]!==d?(j=n.jsx(D,{side:"right",align:"center",hidden:g,...d}),e[22]=g,e[23]=d,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j?(w=n.jsxs(I,{children:[N,j]}),e[25]=N,e[26]=j,e[27]=w):w=e[27],w}const L=y.createContext(void 0),Ie=L.Provider;function B(i,e){const t=y.Children.toArray(i);for(const s of t)if(y.isValidElement(s)&&s.type===e)return s;return null}function be(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex flex-col h-full w-full bg-background overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function xe(i){const e=m.c(17),{children:t,className:s,hideSidebarTrigger:a}=i;let l;e[0]!==t?(l=B(t,R),e[0]=t,e[1]=l):l=e[1];const o=l;let r;e[2]!==t?(r=B(t,A),e[2]=t,e[3]=r):r=e[3];const d=r;let u;e[4]!==s?(u=b("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",s),e[4]=s,e[5]=u):u=e[5];let c;e[6]!==a?(c=!a&&n.jsx(ue,{className:"md:hidden shrink-0"}),e[6]=a,e[7]=c):c=e[7];let p;e[8]!==o||e[9]!==c?(p=n.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[c,o]}),e[8]=o,e[9]=c,e[10]=p):p=e[10];let f;e[11]!==d?(f=n.jsx("div",{className:"flex items-center",children:d}),e[11]=d,e[12]=f):f=e[12];let x;return e[13]!==u||e[14]!==p||e[15]!==f?(x=n.jsxs("div",{className:u,children:[p,f]}),e[13]=u,e[14]=p,e[15]=f,e[16]=x):x=e[16],x}function R(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 min-w-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function A(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 shrink-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function he(i){const e=m.c(6),{children:t,className:s}=i,a=y.useContext(L);let l;e[0]!==s||e[1]!==a?(l=b("flex-1 overflow-auto",a,s),e[0]=s,e[1]=a,e[2]=l):l=e[2];let o;return e[3]!==t||e[4]!==l?(o=n.jsx("div",{className:l,children:t}),e[3]=t,e[4]=l,e[5]=o):o=e[5],o}function ge(i){const e=m.c(10),{children:t,actions:s,className:a}=i;let l;e[0]!==a?(l=b("flex flex-wrap items-center justify-between gap-3",a),e[0]=a,e[1]=l):l=e[1];let o;e[2]!==t?(o=n.jsx("div",{className:"text-xl font-medium min-w-0",children:t}),e[2]=t,e[3]=o):o=e[3];let r;e[4]!==s?(r=s&&n.jsx("div",{className:"flex items-center gap-2",children:s}),e[4]=s,e[5]=r):r=e[5];let d;return e[6]!==l||e[7]!==o||e[8]!==r?(d=n.jsxs("div",{className:l,children:[o,r]}),e[6]=l,e[7]=o,e[8]=r,e[9]=d):d=e[9],d}function ve(i){const e=m.c(6),{children:t,className:s,maxWidth:a}=i,l=a===void 0?"max-w-[1200px]":a;let o;e[0]!==s||e[1]!==l?(o=b("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2];let r;return e[3]!==t||e[4]!==o?(r=n.jsx("div",{className:o,children:t}),e[3]=t,e[4]=o,e[5]=r):r=e[5],r}const Oe=Object.assign(be,{Header:Object.assign(xe,{Left:R,Right:A}),Content:he,Title:ge,Body:ve});export{Oe as P,Se as S,ye as a,$e as b,ie as c,ae as d,ee as e,Me as f,Be as g,ze as h,O as i,Ee as j,De as k,ke as l,Te as m,Ce as n,_e as o,Pe as p,Ie as q,le as r,ne as s,M as u};
1
+ import{r as y,e as m,c as b,j as n,cI as W,b_ as V,be as q,cJ as G,b$ as F,cL as J,c0 as X,aY as Y,aX as Z,B as K}from"./index-D4IWA9IU.js";import{u as Q,c as z,b as D,a as E,T as I}from"./tooltip-B5FrLY14.js";import{i as U}from"./X-BNOerUAB.js";const O=({size:i=24,color:e="currentColor",...t})=>y.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},y.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"}));O.displayName="LayoutLeft";function ee(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(V,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function te(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(F,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function se(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=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]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(X,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ae(i){const e=m.c(20);let t,s,a,l,o;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:o,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"right":l,d=o===void 0?!1:o;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{}),e[6]=u):u=e[6];const c=r==="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",p=r==="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",f=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",x=r==="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 g;e[7]!==s||e[8]!==c||e[9]!==p||e[10]!==f||e[11]!==x?(g=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-200 data-[state=open]:duration-200",c,p,f,x,s),e[7]=s,e[8]=c,e[9]=p,e[10]=f,e[11]=x,e[12]=g):g=e[12];let h;e[13]!==d?(h=!d&&n.jsxs(J,{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:[n.jsx(U,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=d,e[14]=h):h=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==g||e[18]!==h?(v=n.jsxs(te,{children:[u,n.jsxs(q,{"data-slot":"sheet-content",className:g,...a,children:[t,h]})]}),e[15]=t,e[16]=a,e[17]=g,e[18]=h,e[19]=v):v=e[19],v}function le(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ie(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(W,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ne(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(G,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const oe="15rem",re="18rem",de="4.5rem",H=y.createContext(null);function M(){const i=y.useContext(H);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function Se(i){const e=m.c(13),{children:t,defaultOpen:s}=i,a=s===void 0?!1:s,l=Q(),[o,r]=y.useState(!1);let d;e[0]!==l?(d=()=>{l&&r(fe)},e[0]=l,e[1]=d):d=e[1];const u=d,c=a?"expanded":"collapsed";let p;e[2]!==a||e[3]!==l||e[4]!==o||e[5]!==c||e[6]!==u?(p={state:c,open:a,setOpen:ce,isMobile:l,openMobile:o,setOpenMobile:r,toggleSidebar:u},e[2]=a,e[3]=l,e[4]=o,e[5]=c,e[6]=u,e[7]=p):p=e[7];const f=p;let x;e[8]!==t?(x=n.jsx(z,{delayDuration:0,children:t}),e[8]=t,e[9]=x):x=e[9];let g;return e[10]!==f||e[11]!==x?(g=n.jsx(H.Provider,{value:f,children:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12],g}function ce(){}function fe(i){return!i}function ye(i){const e=m.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let o;e[5]!==l?(o={"--sidebar-width":oe,"--sidebar-width-icon":de,...l},e[5]=l,e[6]=o):o=e[6];const r=o;let d;e[7]!==s?(d=b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=d):d=e[8];let u;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==d?(u=n.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:d,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=d,e[13]=u):u=e[13],u}function Ce(i){const e=m.c(36);let t,s,a,l,o;e[0]!==i?({side:l,variant:o,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"left":l,d=o===void 0?"sidebar":o,{isMobile:u,state:c,openMobile:p,setOpenMobile:f}=M();if(u){let P;e[6]===Symbol.for("react.memo_cache_sentinel")?(P={"--sidebar-width":re},e[6]=P):P=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs(le,{className:"sr-only",children:[n.jsx(ie,{children:"Sidebar"}),n.jsx(ne,{children:"Displays the mobile sidebar."})]}),e[7]=k):k=e[7];let $;e[8]!==t?($=n.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=n.jsxs(ae,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:P,side:r,children:[k,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let T;return e[13]!==p||e[14]!==a||e[15]!==f||e[16]!==_?(T=n.jsx(ee,{open:p,onOpenChange:f,...a,children:_}),e[13]=p,e[14]=a,e[15]=f,e[16]=_,e[17]=T):T=e[17],T}const x=c==="expanded",g=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let h;e[18]!==g?(h=b("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden",g),e[18]=g,e[19]=h):h=e[19];const v=x?void 0:"icon",C=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let N;e[20]!==s||e[21]!==C?(N=b("flex flex-col h-full",C,s),e[20]=s,e[21]=C,e[22]=N):N=e[22];let j;e[23]!==t?(j=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let w;e[25]!==a||e[26]!==N||e[27]!==j?(w=n.jsx("div",{"data-slot":"sidebar-container",className:N,...a,children:j}),e[25]=a,e[26]=N,e[27]=j,e[28]=w):w=e[28];let S;return e[29]!==r||e[30]!==c||e[31]!==h||e[32]!==v||e[33]!==w||e[34]!==d?(S=n.jsx("div",{className:h,"data-state":c,"data-collapsible":v,"data-variant":d,"data-side":r,"data-slot":"sidebar",children:w}),e[29]=r,e[30]=c,e[31]=h,e[32]=v,e[33]=w,e[34]=d,e[35]=S):S=e[35],S}function ue(i){const e=m.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=M();let o;e[4]!==t?(o=b("size-7",t),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==s||e[7]!==l?(r=x=>{s?.(x),l()},e[6]=s,e[7]=l,e[8]=r):r=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(O,{}),u=n.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=u):(d=e[9],u=e[10]);let c;e[11]!==a||e[12]!==o||e[13]!==r?(c=n.jsx(E,{asChild:!0,children:n.jsxs(K,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:o,onClick:r,...a,children:[d,u]})}),e[11]=a,e[12]=o,e[13]=r,e[14]=c):c=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",n.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(pe)})]}),e[15]=p):p=e[15];let f;return e[16]!==c?(f=n.jsx(z,{delayDuration:300,children:n.jsxs(I,{children:[c,p]})}),e[16]=c,e[17]=f):f=e[17],f}function pe(i){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function $e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=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]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Pe(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ke(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Te(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Me(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Be(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ze(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex w-full min-w-0 flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function De(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("group/menu-item relative w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const me=Z("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] focus-visible:outline-2 focus-visible:-outline-offset-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 ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ee(i){const e=m.c(28);let t,s,a,l,o,r,d;e[0]!==i?({asChild:a,isActive:l,variant:o,size:r,tooltip:d,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o,e[6]=r,e[7]=d):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5],r=e[6],d=e[7]);const u=a===void 0?!1:a,c=l===void 0?!1:l,p=o===void 0?"default":o,f=r===void 0?"default":r,x=u?Y:"button",{isMobile:g}=M();let h;e[8]!==t||e[9]!==f||e[10]!==p?(h=b(me({variant:p,size:f}),t),e[8]=t,e[9]=f,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==x||e[13]!==c||e[14]!==s||e[15]!==f||e[16]!==h?(v=n.jsx(x,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":c,className:h,...s}),e[12]=x,e[13]=c,e[14]=s,e[15]=f,e[16]=h,e[17]=v):v=e[17];const C=v;if(!d)return C;if(typeof d=="string"){let S;e[18]!==d?(S={children:d},e[18]=d,e[19]=S):S=e[19],d=S}let N;e[20]!==C?(N=n.jsx(E,{asChild:!0,children:C}),e[20]=C,e[21]=N):N=e[21];let j;e[22]!==g||e[23]!==d?(j=n.jsx(D,{side:"right",align:"center",hidden:g,...d}),e[22]=g,e[23]=d,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j?(w=n.jsxs(I,{children:[N,j]}),e[25]=N,e[26]=j,e[27]=w):w=e[27],w}const L=y.createContext(void 0),Ie=L.Provider;function B(i,e){const t=y.Children.toArray(i);for(const s of t)if(y.isValidElement(s)&&s.type===e)return s;return null}function be(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex flex-col h-full w-full bg-background overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function xe(i){const e=m.c(17),{children:t,className:s,hideSidebarTrigger:a}=i;let l;e[0]!==t?(l=B(t,R),e[0]=t,e[1]=l):l=e[1];const o=l;let r;e[2]!==t?(r=B(t,A),e[2]=t,e[3]=r):r=e[3];const d=r;let u;e[4]!==s?(u=b("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",s),e[4]=s,e[5]=u):u=e[5];let c;e[6]!==a?(c=!a&&n.jsx(ue,{className:"md:hidden shrink-0"}),e[6]=a,e[7]=c):c=e[7];let p;e[8]!==o||e[9]!==c?(p=n.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[c,o]}),e[8]=o,e[9]=c,e[10]=p):p=e[10];let f;e[11]!==d?(f=n.jsx("div",{className:"flex items-center",children:d}),e[11]=d,e[12]=f):f=e[12];let x;return e[13]!==u||e[14]!==p||e[15]!==f?(x=n.jsxs("div",{className:u,children:[p,f]}),e[13]=u,e[14]=p,e[15]=f,e[16]=x):x=e[16],x}function R(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 min-w-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function A(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 shrink-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function he(i){const e=m.c(6),{children:t,className:s}=i,a=y.useContext(L);let l;e[0]!==s||e[1]!==a?(l=b("flex-1 overflow-auto",a,s),e[0]=s,e[1]=a,e[2]=l):l=e[2];let o;return e[3]!==t||e[4]!==l?(o=n.jsx("div",{className:l,children:t}),e[3]=t,e[4]=l,e[5]=o):o=e[5],o}function ge(i){const e=m.c(10),{children:t,actions:s,className:a}=i;let l;e[0]!==a?(l=b("flex flex-wrap items-center justify-between gap-3",a),e[0]=a,e[1]=l):l=e[1];let o;e[2]!==t?(o=n.jsx("div",{className:"text-xl font-medium min-w-0",children:t}),e[2]=t,e[3]=o):o=e[3];let r;e[4]!==s?(r=s&&n.jsx("div",{className:"flex items-center gap-2",children:s}),e[4]=s,e[5]=r):r=e[5];let d;return e[6]!==l||e[7]!==o||e[8]!==r?(d=n.jsxs("div",{className:l,children:[o,r]}),e[6]=l,e[7]=o,e[8]=r,e[9]=d):d=e[9],d}function ve(i){const e=m.c(6),{children:t,className:s,maxWidth:a}=i,l=a===void 0?"max-w-[1200px]":a;let o;e[0]!==s||e[1]!==l?(o=b("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2];let r;return e[3]!==t||e[4]!==o?(r=n.jsx("div",{className:o,children:t}),e[3]=t,e[4]=o,e[5]=r):r=e[5],r}const Oe=Object.assign(be,{Header:Object.assign(xe,{Left:R,Right:A}),Content:he,Title:ge,Body:ve});export{Oe as P,Se as S,ye as a,$e as b,ie as c,ae as d,ee as e,Me as f,Be as g,ze as h,O as i,Ee as j,De as k,ke as l,Te as m,Ce as n,_e as o,Pe as p,Ie as q,le as r,ne as s,M as u};
@@ -1,4 +1,4 @@
1
- import{e as uu,c as du,aX as fu,j as F,r as R,cF as wl,bg as hu,ao as pu,bc as mt,cG as mu,a7 as Zs,a8 as gu,aW as yu,aT as bu,aU as ku,b6 as xu,cE as Su,ae as Cu}from"./index-DgPBaKAA.js";const wu=fu("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function C0(n){const e=uu.c(10),{variant:t,size:r}=n;let s;e[0]!==r||e[1]!==t?(s=du(wu({variant:t,size:r})),e[0]=r,e[1]=t,e[2]=s):s=e[2];let i,o;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=F.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),o=F.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=i,e[4]=o):(i=e[3],o=e[4]);let l;e[5]!==s?(l=F.jsxs("svg",{"aria-hidden":"true",className:s,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i,o]}),e[5]=s,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=F.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=a):a=e[7];let c;return e[8]!==l?(c=F.jsxs("div",{role:"status",children:[l,a]}),e[8]=l,e[9]=c):c=e[9],c}function X(n){this.content=n}X.prototype={constructor:X,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new X(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new X(t)},addToStart:function(n,e){return new X([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new X(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new X(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=X.from(n),n.size?new X(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=X.from(n),n.size?new X(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=X.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};X.from=function(n){if(n instanceof X)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new X(e)};function Ml(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ml(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function El(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=El(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new k(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new k(r,s)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new k(s,i)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ml(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return El(this,e,t,r)}findIndex(e){if(e==0)return Tn(0,e);if(e==this.size)return Tn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Tn(t+1,i):Tn(t,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,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new k(t||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Jr={index:0,offset:0};function Tn(n,e){return Jr.index=n,Jr.offset=e,Jr}function Wn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Wn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Wn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let B=class Cs{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Wn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Cs.none;if(e instanceof Cs)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};B.none=[];class qn extends Error{}class w{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Tl(this.content,e+this.openStart,t);return r&&new w(r,this.openStart,this.openEnd)}removeBetween(e,t){return new w(vl(this.content,e+this.openStart,t+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,t){if(!t)return w.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new w(k.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new w(e,r,s)}}w.empty=new w(k.empty,0,0);function vl(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(vl(i.content,e-s-1,t-s-1)))}function Tl(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Tl(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function Mu(n,e,t){if(t.openStart>n.depth)throw new qn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new qn("Inconsistent open depths");return Al(n,e,t,0)}function Al(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Al(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return dt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=Eu(t,n);return dt(i,Ol(n,o,l,e,r))}else return dt(i,Un(n,e,r))}function Nl(n,e){if(!e.type.compatibleContent(n.type))throw new qn("Cannot join "+e.type.name+" onto "+n.type.name)}function ws(n,e,t){let r=n.node(t);return Nl(r,e.node(t)),r}function ut(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function en(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(ut(n.nodeAfter,r),i++));for(let l=i;l<o;l++)ut(s.child(l),r);e&&e.depth==t&&e.textOffset&&ut(e.nodeBefore,r)}function dt(n,e){return n.type.checkContent(e),n.copy(e)}function Ol(n,e,t,r,s){let i=n.depth>s&&ws(n,e,s+1),o=r.depth>s&&ws(t,r,s+1),l=[];return en(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Nl(i,o),ut(dt(i,Ol(n,e,t,r,s+1)),l)):(i&&ut(dt(i,Un(n,e,s+1)),l),en(e,t,s,l),o&&ut(dt(o,Un(t,r,s+1)),l)),en(r,null,s,l),new k(l)}function Un(n,e,t){let r=[];if(en(null,n,t,r),n.depth>t){let s=ws(n,e,t+1);ut(dt(s,Un(n,e,t+1)),r)}return en(e,null,t,r),new k(r)}function Eu(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(k.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class fn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return B.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){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)&&(!t||t(this.node(r))))return new Kn(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 t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new fn(t,r,i)}static resolveCached(e,t){let r=Wi.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Wi.set(e,r=new vu);let s=r.elts[r.i]=fn.resolve(e,t);return r.i=(r.i+1)%Tu,s}}class vu{constructor(){this.elts=[],this.i=0}}const Tu=12,Wi=new WeakMap;class Kn{constructor(e,t,r){this.$from=e,this.$to=t,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 Au=Object.create(null);class we{constructor(e,t,r,s=B.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||k.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,t,r,s=0){this.content.nodesBetween(e,t,r,s,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,t,r,s){return this.content.textBetween(e,t,r,s)}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,t,r){return this.type==e&&Wn(this.attrs,t||e.defaultAttrs||Au)&&B.sameSet(this.marks,r||B.none)}copy(e=null){return e==this.content?this:new we(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new we(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return w.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new w(c,s.depth-o,i.depth-o)}replace(e,t,r){return Mu(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return fn.resolveCached(this,e)}resolveNoCache(e){return fn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}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()+")"),Dl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.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=B.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!B.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=k.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}we.prototype.text=void 0;class Jn extends we{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Dl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Jn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Jn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Dl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class gt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Nu(e,t);if(r.next==null)return gt.empty;let s=Il(r);r.next&&r.err("Unexpected trailing text");let i=Bu(Lu(s));return zu(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}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:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}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 t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.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 t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
1
+ import{e as uu,c as du,aX as fu,j as F,r as R,cF as wl,bg as hu,ao as pu,bc as mt,cG as mu,a7 as Zs,a8 as gu,aW as yu,aT as bu,aU as ku,b6 as xu,cE as Su,ae as Cu}from"./index-D4IWA9IU.js";const wu=fu("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function C0(n){const e=uu.c(10),{variant:t,size:r}=n;let s;e[0]!==r||e[1]!==t?(s=du(wu({variant:t,size:r})),e[0]=r,e[1]=t,e[2]=s):s=e[2];let i,o;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=F.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),o=F.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=i,e[4]=o):(i=e[3],o=e[4]);let l;e[5]!==s?(l=F.jsxs("svg",{"aria-hidden":"true",className:s,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i,o]}),e[5]=s,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=F.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=a):a=e[7];let c;return e[8]!==l?(c=F.jsxs("div",{role:"status",children:[l,a]}),e[8]=l,e[9]=c):c=e[9],c}function X(n){this.content=n}X.prototype={constructor:X,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new X(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new X(t)},addToStart:function(n,e){return new X([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new X(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new X(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=X.from(n),n.size?new X(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=X.from(n),n.size?new X(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=X.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};X.from=function(n){if(n instanceof X)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new X(e)};function Ml(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ml(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function El(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=El(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new k(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new k(r,s)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new k(s,i)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ml(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return El(this,e,t,r)}findIndex(e){if(e==0)return Tn(0,e);if(e==this.size)return Tn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Tn(t+1,i):Tn(t,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,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new k(t||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Jr={index:0,offset:0};function Tn(n,e){return Jr.index=n,Jr.offset=e,Jr}function Wn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Wn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Wn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let B=class Cs{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Wn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Cs.none;if(e instanceof Cs)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};B.none=[];class qn extends Error{}class w{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Tl(this.content,e+this.openStart,t);return r&&new w(r,this.openStart,this.openEnd)}removeBetween(e,t){return new w(vl(this.content,e+this.openStart,t+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,t){if(!t)return w.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new w(k.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new w(e,r,s)}}w.empty=new w(k.empty,0,0);function vl(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(vl(i.content,e-s-1,t-s-1)))}function Tl(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Tl(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function Mu(n,e,t){if(t.openStart>n.depth)throw new qn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new qn("Inconsistent open depths");return Al(n,e,t,0)}function Al(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Al(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return dt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=Eu(t,n);return dt(i,Ol(n,o,l,e,r))}else return dt(i,Un(n,e,r))}function Nl(n,e){if(!e.type.compatibleContent(n.type))throw new qn("Cannot join "+e.type.name+" onto "+n.type.name)}function ws(n,e,t){let r=n.node(t);return Nl(r,e.node(t)),r}function ut(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function en(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(ut(n.nodeAfter,r),i++));for(let l=i;l<o;l++)ut(s.child(l),r);e&&e.depth==t&&e.textOffset&&ut(e.nodeBefore,r)}function dt(n,e){return n.type.checkContent(e),n.copy(e)}function Ol(n,e,t,r,s){let i=n.depth>s&&ws(n,e,s+1),o=r.depth>s&&ws(t,r,s+1),l=[];return en(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Nl(i,o),ut(dt(i,Ol(n,e,t,r,s+1)),l)):(i&&ut(dt(i,Un(n,e,s+1)),l),en(e,t,s,l),o&&ut(dt(o,Un(t,r,s+1)),l)),en(r,null,s,l),new k(l)}function Un(n,e,t){let r=[];if(en(null,n,t,r),n.depth>t){let s=ws(n,e,t+1);ut(dt(s,Un(n,e,t+1)),r)}return en(e,null,t,r),new k(r)}function Eu(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(k.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class fn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return B.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){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)&&(!t||t(this.node(r))))return new Kn(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 t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new fn(t,r,i)}static resolveCached(e,t){let r=Wi.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Wi.set(e,r=new vu);let s=r.elts[r.i]=fn.resolve(e,t);return r.i=(r.i+1)%Tu,s}}class vu{constructor(){this.elts=[],this.i=0}}const Tu=12,Wi=new WeakMap;class Kn{constructor(e,t,r){this.$from=e,this.$to=t,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 Au=Object.create(null);class we{constructor(e,t,r,s=B.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||k.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,t,r,s=0){this.content.nodesBetween(e,t,r,s,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,t,r,s){return this.content.textBetween(e,t,r,s)}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,t,r){return this.type==e&&Wn(this.attrs,t||e.defaultAttrs||Au)&&B.sameSet(this.marks,r||B.none)}copy(e=null){return e==this.content?this:new we(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new we(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return w.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new w(c,s.depth-o,i.depth-o)}replace(e,t,r){return Mu(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return fn.resolveCached(this,e)}resolveNoCache(e){return fn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}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()+")"),Dl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.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=B.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!B.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=k.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}we.prototype.text=void 0;class Jn extends we{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Dl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Jn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Jn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Dl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class gt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Nu(e,t);if(r.next==null)return gt.empty;let s=Il(r);r.next&&r.err("Unexpected trailing text");let i=Bu(Lu(s));return zu(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}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:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}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 t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.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 t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
2
2
  `)}}gt.empty=new gt(!0);class Nu{constructor(e,t){this.string=e,this.nodeTypes=t,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 Il(n){let e=[];do e.push(Ou(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Ou(n){let e=[];do e.push(Du(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Du(n){let e=Pu(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Iu(n,e);else break;return e}function qi(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Iu(n,e){let t=qi(n),r=t;return n.eat(",")&&(n.next!="}"?r=qi(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Ru(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function Pu(n){if(n.eat("(")){let e=Il(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Ru(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Lu(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Rl(n,e){return e-n}function Ui(n,e){let t=[];return r(e),t.sort(Rl);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function Bu(n){let e=Object.create(null);return t(Ui(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);Ui(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new gt(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(Rl);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function zu(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Pl(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function Ll(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function Bl(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function zl(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Fu(n,r,e[r]);return t}let Ki=class $l{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=zl(e,r.attrs),this.defaultAttrs=Pl(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==gt.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:Ll(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new we(this,this.computeAttrs(e),k.from(t),B.setFrom(r))}createChecked(e=null,t,r){return t=k.from(t),this.checkContent(t),new we(this,this.computeAttrs(e),t,B.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=k.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(k.empty,!0);return i?new we(this,e,t.append(i),B.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.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){Bl(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 t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:B.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new $l(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");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 $u(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class Fu{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?$u(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ir{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=zl(e,s.attrs),this.excluded=null;let i=Pl(this.attrs);this.instance=i?new B(this,i):null}create(e=null){return!e&&this.instance?this.instance:new B(this,Ll(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new Ir(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Bl(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Fl{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=X.from(e.nodes),t.marks=X.from(e.marks||{}),this.nodes=Ki.compile(this.spec.nodes,this),this.marks=Ir.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=gt.parse(o,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=l=="_"?null:l?Ji(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:Ji(this,o.split(" "))}this.nodeFromJSON=s=>we.fromJSON(this,s),this.markFromJSON=s=>B.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Ki){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(t,r,s)}text(e,t){let r=this.nodes.text;return new Jn(r,r.defaultAttrs,e,B.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Ji(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Vu(n){return n.tag!=null}function _u(n){return n.style!=null}class Ge{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Vu(s))this.tags.push(s);else if(_u(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new Yi(this,t,!1);return r.addAll(e,B.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Yi(this,t,!0);return r.addAll(e,B.none,t.from,t.to),w.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Wu(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Xi(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Xi(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ge(e,Ge.schemaRules(e)))}}const Vl={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},Hu={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},_l={ol:!0,ul:!0},hn=1,Ms=2,tn=4;function Gi(n,e,t){return e!=null?(e?hn:0)|(e==="full"?Ms:0):n&&n.whitespace=="pre"?hn|Ms:t&~tn}class An{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=B.none,this.match=i||(o&tn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(k.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&hn)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=k.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Vl.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Yi{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=Gi(null,t.preserveWhitespace,0)|(r?tn:0);s?i=new An(s.type,s.attrs,B.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new An(null,null,B.none,!0,null,o):i=new An(e.schema.topNodeType,null,B.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&Ms?"full":this.localPreserveWS||(s.options&hn)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
3
3
  `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\S/.test(l[a]));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 l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;_l.hasOwnProperty(o)&&this.parser.normalizeLists&&ju(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Hu.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(Vl.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
4
  `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=B.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):Qi(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=Gi(e,i,o.options);o.options&tn&&o.content.length==0&&(l|=tn);let a=B.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):Qi(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new An(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].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 t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=hn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function ju(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&_l.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Wu(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Xi(n){let e={};for(let t in n)e[t]=n[t];return e}function Qi(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class St{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Gr(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=Fn(Gr(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&Fn(Gr(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return Fn(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new St(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Zi(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Zi(e.marks)}}function Zi(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Gr(n){return n.document||window.document}const eo=new WeakMap;function qu(n){let e=eo.get(n);return e===void 0&&eo.set(n,e=Uu(n)),e}function Uu(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function Fn(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=qu(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 o=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=Fn(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Hl=65535,jl=Math.pow(2,16);function Ku(n,e){return n+e*jl}function to(n){return n&Hl}function Ju(n){return(n-(n&Hl))/jl}const Wl=1,ql=2,Vn=4,Ul=8;class Es{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Ul)>0}get deletedBefore(){return(this.delInfo&(Wl|Vn))>0}get deletedAfter(){return(this.delInfo&(ql|Vn))>0}get deletedAcross(){return(this.delInfo&Vn)>0}}class de{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&de.empty)return de.empty}recover(e){let t=0,r=to(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Ju(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+s+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:Ku(l/3,e-a),m=e==a?ql:e==d?Wl:Vn;return(t<0?e!=a:e!=d)&&(m|=Ul),new Es(h,m,p)}s+=u-c}return r?e+s:new Es(e+s,0,null)}touches(e,t){let r=0,s=to(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new de(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?de.empty:new de(e<0?[0,-e,0]:[0,0,e])}}de.empty=new de([]);class pn{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new pn(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new pn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new Es(e,s,null)}}const Yr=Object.create(null);class re{getMap(){return de.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Yr[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Yr)throw new RangeError("Duplicate use of step JSON ID "+e);return Yr[e]=t,t.prototype.jsonID=e,t}}class q{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new q(e,null)}static fail(e){return new q(null,e)}static fromReplace(e,t,r,s){try{return q.ok(e.replace(t,r,s))}catch(i){if(i instanceof qn)return q.fail(i.message);throw i}}}function ei(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(ei(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return k.fromArray(r)}class Ue extends re{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new w(ei(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return q.fromReplace(e,this.from,this.to,i)}invert(){return new Ce(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Ue(t.pos,r.pos,this.mark)}merge(e){return e instanceof Ue&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ue(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ue(t.from,t.to,e.markFromJSON(t.mark))}}re.jsonID("addMark",Ue);class Ce extends re{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new w(ei(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return q.fromReplace(e,this.from,this.to,r)}invert(){return new Ue(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Ce(t.pos,r.pos,this.mark)}merge(e){return e instanceof Ce&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ce(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ce(t.from,t.to,e.markFromJSON(t.mark))}}re.jsonID("removeMark",Ce);class Ke extends re{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return q.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return q.fromReplace(e,this.pos,this.pos+1,new w(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new Ke(this.pos,t.marks[s]);return new Ke(this.pos,this.mark)}}return new yt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ke(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ke(t.pos,e.markFromJSON(t.mark))}}re.jsonID("addNodeMark",Ke);class yt extends re{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return q.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return q.fromReplace(e,this.pos,this.pos+1,new w(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Ke(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new yt(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new yt(t.pos,e.markFromJSON(t.mark))}}re.jsonID("removeNodeMark",yt);class W extends re{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&vs(e,this.from,this.to)?q.fail("Structure replace would overwrite content"):q.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new de([this.from,this.to-this.from,this.slice.size])}invert(e){return new W(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&W.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new W(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof W)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?w.empty:new w(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new W(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?w.empty:new w(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new W(e.from,this.to,t,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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new W(t.from,t.to,w.fromJSON(e,t.slice),!!t.structure)}}W.MAP_BIAS=1;re.jsonID("replace",W);class G extends re{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(vs(e,this.from,this.gapFrom)||vs(e,this.gapTo,this.to)))return q.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return q.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?q.fromReplace(e,this.from,this.to,r):q.fail("Content does not fit in gap")}getMap(){return new de([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new G(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new G(t.pos,r.pos,s,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,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new G(t.from,t.to,t.gapFrom,t.gapTo,w.fromJSON(e,t.slice),t.insert,!!t.structure)}}re.jsonID("replaceAround",G);function vs(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function Gu(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[m])?o.to=h:s.push(o=new Ce(f,h,d[m])));l&&l.to==f?l.to=h:i.push(l=new Ue(f,h,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function Yu(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof Ir){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<s.length;h++){let p=s[h];p.step==i-1&&d.eq(s[h].style)&&(f=p)}f?(f.to=c,f.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new Ce(o.from,o.to,o.style)))}function ti(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new W(l,u,w.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new Ce(l,u,c.marks[f]));if(s&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new w(k.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new W(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(k.empty,!0);n.replace(l,l,new w(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function Xu(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function jt(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!Xu(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function Qu(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=k.empty,d=0;for(let p=i,m=!1;p>t;p--)m||r.index(p)>0?(m=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=i,m=!1;p>t;p--)m||s.after(p+1)<s.end(p)?(m=!0,f=k.from(s.node(p).copy(f)),h++):c++;n.step(new G(a,c,o,l,new w(u.append(f),d,h),u.size-d,!0))}function ni(n,e,t=null,r=n){let s=Zu(n,e),i=s&&ed(r,e);return i?s.map(no).concat({type:e,attrs:t}).concat(i.map(no)):null}function no(n){return{type:n,attrs:null}}function Zu(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function ed(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function td(n,e,t){let r=k.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new G(s,i,s,i,new w(r,0,0),t.length,!0))}function nd(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&rd(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Jl(n,o,l,i),ti(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new G(d,f,d+1,f-1,new w(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&Kl(n,o,l,i),!1}})}function Kl(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Jl(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
@@ -1 +1 @@
1
- import{r as n,aU as q,bZ as R,b_ as Ee,b$ as ke,c0 as Se,be as xe,c1 as j}from"./index-DgPBaKAA.js";var de=1,Ie=.9,Ce=.8,Re=.17,Z=.1,Q=.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,x,E,I;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(Q,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Q,I.length))):(h*=Re,u>0&&(h*=Math.pow(Q,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Z&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Z>h&&(h=x*Z)),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:x,shouldFilter:E,loop:I,disablePointerSelection:z=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{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")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);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())}}),[]),T=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,()=>{W(),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,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),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:N,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 W(){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 G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){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 X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(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?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-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(),X(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:T.inputId,id:T.labelId,style:Je},b),U(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},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(),x=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,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){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:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:z,onClick:A?void 0:I},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 x=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:x},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,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.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(xe,{"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)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Ue,Empty:ze,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(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 We=()=>{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 Ge(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(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
1
+ import{r as n,aU as q,bZ as R,b_ as Ee,b$ as ke,c0 as Se,be as xe,c1 as j}from"./index-D4IWA9IU.js";var de=1,Ie=.9,Ce=.8,Re=.17,Z=.1,Q=.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,x,E,I;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(Q,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Q,I.length))):(h*=Re,u>0&&(h*=Math.pow(Q,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Z&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Z>h&&(h=x*Z)),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:x,shouldFilter:E,loop:I,disablePointerSelection:z=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{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")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);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())}}),[]),T=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,()=>{W(),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,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),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:N,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 W(){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 G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){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 X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(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?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-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(),X(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:T.inputId,id:T.labelId,style:Je},b),U(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},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(),x=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,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){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:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:z,onClick:A?void 0:I},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 x=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:x},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,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.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(xe,{"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)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Ue,Empty:ze,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(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 We=()=>{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 Ge(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(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};