decocms 4.584.9 → 4.584.11

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 (431) hide show
  1. package/dist/client/assets/{AlertCircle-Di8a-UWV.js → AlertCircle-8ukcBvl4.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CCqrcx1b.js → AreaChart-B6hqu-pW.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-B2F854r0.js → ArrowLeft-D0b8Szk5.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-Dj2pC8B7.js → ArrowRight-uaCgEM_Q.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Nhgapjwm.js → ArrowUp-K5jCRsZA.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-CHggQBWj.js → BookOpen01-5XPZR6TG.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-BFVggI3G.js → CartesianChart-C4hmdW3d.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-BYLFXXdR.js → CategoricalChart-BPZdBlVt.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-UAsyLWI7.js → CheckCircle-u2h4KcPu.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-COkNoLwk.js → ChevronDown-kKxnMd3L.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-Buxlf1yx.js → ChevronSelectorVertical-DKxNhUwA.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-C-YGqatN.js → ChevronUp-DQNUTs5_.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-CRi7On3u.js → CreditCard01-DbaKJfT8.js} +1 -1
  14. package/dist/client/assets/{Eye-C6rTinUa.js → Eye-_E24hwz9.js} +1 -1
  15. package/dist/client/assets/{File02-CNdUOOeH.js → File02-DAf1emIR.js} +1 -1
  16. package/dist/client/assets/{Globe04-AW14Waq3.js → Globe04-jdIYuCcn.js} +1 -1
  17. package/dist/client/assets/{Image01-xPHq6tUP.js → Image01-Cl7yRuHs.js} +1 -1
  18. package/dist/client/assets/{Key01-BMD-TEa8.js → Key01-DeYX7L_Z.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-5PR-LA5J.js → LayoutLeft-BQdYjjc6.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-Chn3Zw95.js → LinkBroken01-DBUc-42w.js} +1 -1
  21. package/dist/client/assets/{MessageCircle01-CeeL61Zn.js → MessageCircle01-D1JzchO_.js} +1 -1
  22. package/dist/client/assets/{Minus-CxmZj9NQ.js → Minus-DBYcv290.js} +1 -1
  23. package/dist/client/assets/{Monitor01-BNRBENLp.js → Monitor01-C_gVCCps.js} +1 -1
  24. package/dist/client/assets/{Play-DEfGDCy-.js → Play-DWEq3LWP.js} +1 -1
  25. package/dist/client/assets/{Plus-C2jbSKfe.js → Plus-n5KTXyCz.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-D9-8u9ny.js → ReferenceLine-DEVTnbj2.js} +1 -1
  27. package/dist/client/assets/{SearchMd-DIZIcq-T.js → SearchMd-B9v3gV_V.js} +1 -1
  28. package/dist/client/assets/{ShoppingBag01-CVfO_hCG.js → ShoppingBag01-C0IQtOHj.js} +1 -1
  29. package/dist/client/assets/{Sun-CPfe1reh.js → Sun-CYLgqf2D.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-CFbhgx88.js → SwitchHorizontal01-B_WFRgSk.js} +1 -1
  31. package/dist/client/assets/{Tool01-BIyGNKrn.js → Tool01-C3qOO4-2.js} +1 -1
  32. package/dist/client/assets/{Tooltip-MqN6JJnW.js → Tooltip-DvgWJ47t.js} +1 -1
  33. package/dist/client/assets/{Trash01-D20QdwlW.js → Trash01-uKrzOq5g.js} +1 -1
  34. package/dist/client/assets/{TrendUp01-yJId_zlL.js → TrendUp01-DpUK5xLp.js} +1 -1
  35. package/dist/client/assets/{Upload01-C9Bt1TSM.js → Upload01-B5by2C-2.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-BNqLXBfG.js → UserCheck01-CI1951yc.js} +1 -1
  37. package/dist/client/assets/{UserSquare-BJ8rQzrf.js → UserSquare-BzGvxH2o.js} +1 -1
  38. package/dist/client/assets/{Users01-BF_7Ge84.js → Users01-hxkP_BcE.js} +1 -1
  39. package/dist/client/assets/{XClose-BeMmbmRj.js → XClose-DGEX5GIv.js} +1 -1
  40. package/dist/client/assets/{Zap-DnTlLwWn.js → Zap-VLndYrUw.js} +1 -1
  41. package/dist/client/assets/{access-gate-ys146buF.js → access-gate-DlMcB91s.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-BzuPzzcP.js → add-connection-dialog-CkoGrQvX.js} +1 -1
  43. package/dist/client/assets/agent-app-B7ftls3Z.js +1 -0
  44. package/dist/client/assets/{agent-assets-CriTGOWU.js → agent-assets-CghbeNXC.js} +1 -1
  45. package/dist/client/assets/{agent-automation-CikOpkf1.js → agent-automation-CBl5iYvS.js} +1 -1
  46. package/dist/client/assets/{agent-automations-Bgf1jQrh.js → agent-automations-BP9k8H9Z.js} +1 -1
  47. package/dist/client/assets/{agent-blog-F5KTJKh9.js → agent-blog-BMtDmL4D.js} +2 -2
  48. package/dist/client/assets/{agent-blog-post-OFgpigIS.js → agent-blog-post-CmrK5edA.js} +2 -2
  49. package/dist/client/assets/{agent-calendar-Dj_CPqBD.js → agent-calendar--WuDzh4S.js} +1 -1
  50. package/dist/client/assets/{agent-capabilities-nLnawz8n.js → agent-capabilities-DgKJkoYc.js} +1 -1
  51. package/dist/client/assets/{agent-connect-sources-GVrze9Tn.js → agent-connect-sources-D0prFCyu.js} +1 -1
  52. package/dist/client/assets/agent-deck-CcvUJpH9.js +1 -0
  53. package/dist/client/assets/{agent-e2e-t_AgarMy.js → agent-e2e-BGCsWMH4.js} +1 -1
  54. package/dist/client/assets/agent-experiments-DAhsmbhH.js +1 -0
  55. package/dist/client/assets/agent-file-B823n-5A.js +1 -0
  56. package/dist/client/assets/{agent-hosting-DYqOSc12.js → agent-hosting-BMlo6ztg.js} +1 -1
  57. package/dist/client/assets/{agent-icon-Djmp3uF_.js → agent-icon-Cz4yRQtC.js} +1 -1
  58. package/dist/client/assets/agent-library-CB8qIzKG.js +1 -0
  59. package/dist/client/assets/agent-library-file-BEOBDbky.js +1 -0
  60. package/dist/client/assets/agent-overview-OCPL70AX.js +1 -0
  61. package/dist/client/assets/{agent-releases-CG7DBQNk.js → agent-releases-CRCs393n.js} +1 -1
  62. package/dist/client/assets/agent-settings-ChpWIcjh.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-bsAYI9Qx.js → agent-site-editor-Bu-Qng8e.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-Bcw39VAL.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-Bi-VEbvX.js +1 -0
  66. package/dist/client/assets/agent-site-editor-preview-UtWuCm95.js +1 -0
  67. package/dist/client/assets/{agent-view-guard-BjTeUL0l.js → agent-view-guard-AEHdl6py.js} +1 -1
  68. package/dist/client/assets/agent-view-wKu6zeUB.js +1 -0
  69. package/dist/client/assets/{ai-providers--9DxGzKr.js → ai-providers-CEHdDjZY.js} +1 -1
  70. package/dist/client/assets/{alert-DodlNZ2z.js → alert-Cqlm2lSd.js} +1 -1
  71. package/dist/client/assets/{analytics-sections-BavM7p0J.js → analytics-sections-CeBlGvo4.js} +1 -1
  72. package/dist/client/assets/api-keys-CmxKXTZ8.js +1 -0
  73. package/dist/client/assets/{api-keys-C9Ltg2HT.js → api-keys-Cx90Lm6v.js} +1 -1
  74. package/dist/client/assets/{app-editor-oJJTX1pK.js → app-editor-sWxVU-d1.js} +1 -1
  75. package/dist/client/assets/{asset-utils-B8xngYBo.js → asset-utils-F3cCrDoF.js} +1 -1
  76. package/dist/client/assets/{auth-dN38N6ZJ.js → auth-B-QpuT1-.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-BIoLm5Ab.js → auth-catchall-HAx7I2Dd.js} +1 -1
  78. package/dist/client/assets/{auth-entry-C1XoF05E.js → auth-entry-D7bh5pIo.js} +1 -1
  79. package/dist/client/assets/{auth-split-layout-C01yLUAN.js → auth-split-layout-DviWnr7K.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-BLc3TfFn.js → authenticate-and-persist-oauth-CiMJ5t7l.js} +1 -1
  81. package/dist/client/assets/{automation-list-row-PbVUdzfB.js → automation-list-row-DDKWZ6lq.js} +1 -1
  82. package/dist/client/assets/{automation-runs-Ci5bOvQY.js → automation-runs-B94owQKr.js} +1 -1
  83. package/dist/client/assets/{automations-932xVZmd.js → automations-Dw_bnzMp.js} +1 -1
  84. package/dist/client/assets/{badge-ooD-f3Xm.js → badge-DUPpSRXM.js} +1 -1
  85. package/dist/client/assets/{block-document-B3emD8Py.js → block-document-3zaS6DAL.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-CPWJ7AAs.js → blocks-preview-workspace-context-BeQfZDpi.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-BzneOCDW.js → blocks-tab-states-BTZOSl8o.js} +1 -1
  88. package/dist/client/assets/{blog-preview-url-BVoP3Psp.js → blog-preview-url-DKHGrBOi.js} +1 -1
  89. package/dist/client/assets/{blog-schema-Pk7BbGun.js → blog-schema-BUyE1j8J.js} +1 -1
  90. package/dist/client/assets/{blog-source-gate-BpC4RIWC.js → blog-source-gate-DHZ1-Rjz.js} +1 -1
  91. package/dist/client/assets/{blog-view-gate-CGKzU05m.js → blog-view-gate-BePH2wng.js} +1 -1
  92. package/dist/client/assets/{buckets-Cvkckzfy.js → buckets-Bkf0sWtN.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-DRdwqMyb.js → build-improve-prompt-doc-_CM2PBtN.js} +1 -1
  94. package/dist/client/assets/{calendar-Dfc1FCTZ.js → calendar-4vmCSMCw.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-D-MJtSCR.js → capability-load-error-BUnR6hyi.js} +1 -1
  96. package/dist/client/assets/{category-editor-DqvQQTB6.js → category-editor-B8-7yEHX.js} +1 -1
  97. package/dist/client/assets/{category-tree-D011La9Z.js → category-tree-mnbJJkLU.js} +1 -1
  98. package/dist/client/assets/{chart-uUI_EY97.js → chart-Bv5K7YpV.js} +1 -1
  99. package/dist/client/assets/{chat-context-Bb_Yeasx.js → chat-context-CYn-8MTb.js} +1 -1
  100. package/dist/client/assets/{chat-draft-C5b4ZZNT.js → chat-draft-D1hoDOE0.js} +1 -1
  101. package/dist/client/assets/{checkbox-B0iej-k4.js → checkbox-CWfz72Eg.js} +1 -1
  102. package/dist/client/assets/{choose-editor-BHGbYr9M.js → choose-editor-B7q3YFz-.js} +1 -1
  103. package/dist/client/assets/{cli-auth-success-BjK_2k36.js → cli-auth-success-BrZiEms8.js} +1 -1
  104. package/dist/client/assets/{cms-settings-editor-DczcBgsg.js → cms-settings-editor-Yt7OZ5fA.js} +1 -1
  105. package/dist/client/assets/{cms-store-drafts-D65g6QDr.js → cms-store-drafts-CY0_DNz9.js} +1 -1
  106. package/dist/client/assets/{collapsible-bv19Lgop.js → collapsible-BpmZcmV-.js} +1 -1
  107. package/dist/client/assets/{collection-detail-CrdyPuxx.js → collection-detail-DuNPhZH6.js} +1 -1
  108. package/dist/client/assets/{collection-display-button-bohOcAnJ.js → collection-display-button-BE5cj63q.js} +1 -1
  109. package/dist/client/assets/{collection-search-CT3oHQLL.js → collection-search-BpPD1cYG.js} +1 -1
  110. package/dist/client/assets/{collection-table-wrapper-COcHlvPf.js → collection-table-wrapper-2bTQbSCd.js} +1 -1
  111. package/dist/client/assets/{collection-tabs-BbqMtY-J.js → collection-tabs--r5IslTr.js} +1 -1
  112. package/dist/client/assets/{combobox-C7dFW3mg.js → combobox-D0z8qltB.js} +1 -1
  113. package/dist/client/assets/{command-BUJZW101.js → command-B1uSCDOs.js} +1 -1
  114. package/dist/client/assets/{companion-mcps-section-OQv-05I3.js → companion-mcps-section-Cw4vcMP2.js} +1 -1
  115. package/dist/client/assets/{config-BW2WE8-w.js → config-BzgM9JXs.js} +1 -1
  116. package/dist/client/assets/{connect-BM_qQLsb.js → connect-BV05NolQ.js} +1 -1
  117. package/dist/client/assets/{connect-key-DaxTwfXl.js → connect-key-DcVDnMal.js} +1 -1
  118. package/dist/client/assets/{connect-layout-Dqk87DYY.js → connect-layout-CBMngQi6.js} +1 -1
  119. package/dist/client/assets/{connect-source-dialog-Bo2D6V9J.js → connect-source-dialog-5QgQ5bbI.js} +1 -1
  120. package/dist/client/assets/{connection-CrDLMjxz.js → connection-IPXgFFkC.js} +1 -1
  121. package/dist/client/assets/{connection-card-B_Rm3jws.js → connection-card-1xH7fsgG.js} +1 -1
  122. package/dist/client/assets/{connection-detail-Dya4wQXw.js → connection-detail-BVoggBqn.js} +1 -1
  123. package/dist/client/assets/{connection-form-helpers-BnupWMcv.js → connection-form-helpers-3MHQU6Sq.js} +1 -1
  124. package/dist/client/assets/{connection-slug-Dsjc_7jc.js → connection-slug-CceJbleR.js} +1 -1
  125. package/dist/client/assets/{connections-CqzzCCFh.js → connections-Da3kc22q.js} +1 -1
  126. package/dist/client/assets/{content-tab-xOW2jmWD.js → content-tab-BGkRbQco.js} +3 -3
  127. package/dist/client/assets/{context-B52xcJP8.js → context-DXGbe4A7.js} +1 -1
  128. package/dist/client/assets/{context-menu-C3vl1voD.js → context-menu-LfR7ib0U.js} +1 -1
  129. package/dist/client/assets/{context-shell-CLN1cZ8-.js → context-shell-mG6S_SeS.js} +3 -3
  130. package/dist/client/assets/{create-organization-dialog-C8w69dn8.js → create-organization-dialog-Buynh2If.js} +1 -1
  131. package/dist/client/assets/{daily-pulse-BkhyNjIU.js → daily-pulse-ByBUq2mJ.js} +1 -1
  132. package/dist/client/assets/{delete-copy-D7GWyg_y.js → delete-copy-u7v8dBp-.js} +1 -1
  133. package/dist/client/assets/{device-hint-BWoKmEkk.js → device-hint-CMXety2v.js} +1 -1
  134. package/dist/client/assets/{discover-ClyGoNdo.js → discover-h9og78Pc.js} +1 -1
  135. package/dist/client/assets/{domain-settings-Bff7hkhZ.js → domain-settings-D-1cMb0P.js} +1 -1
  136. package/dist/client/assets/{drawer-9dr-ukqt.js → drawer-yBtPHk5P.js} +1 -1
  137. package/dist/client/assets/{editor-OtYf9TpJ.js → editor-CAoNl87t.js} +1 -1
  138. package/dist/client/assets/{editor-classes-B015z8BR.js → editor-classes-CMJUQ0q2.js} +1 -1
  139. package/dist/client/assets/{empty-message-DLDkQwTf.js → empty-message-Cc9hR1qr.js} +1 -1
  140. package/dist/client/assets/{empty-state-DgS_yB9S.js → empty-state-DR046JV4.js} +1 -1
  141. package/dist/client/assets/{empty-state-DGvmXTTx.js → empty-state-DTiQvFTm.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-C_eMr2Jc.js → experiments-tab-choice-BFJMX4A0.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-D5LnDq3n.js → extract-connection-data-CNr6phrB.js} +1 -1
  144. package/dist/client/assets/{feature-gate-BwfJl_-J.js → feature-gate-Ce8P1I_1.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-CEAWGxEK.js → feature-paywall-BHeChQEf.js} +1 -1
  146. package/dist/client/assets/{file-explorer-CsgK4soc.js → file-explorer-C3qnOlL5.js} +1 -1
  147. package/dist/client/assets/{file-preview-Dy_zYo8i.js → file-preview-Dc0CULiD.js} +1 -1
  148. package/dist/client/assets/{file-share-button-DwseFge1.js → file-share-button-CLXLIxu_.js} +1 -1
  149. package/dist/client/assets/{file-type-icon-BBC7AgSm.js → file-type-icon-B2pfAj_l.js} +1 -1
  150. package/dist/client/assets/{folder-icon-Cu3Aqv3z.js → folder-icon-D2FL6E99.js} +1 -1
  151. package/dist/client/assets/{form-C_3nPlqc.js → form-kDDI268e.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-DyI9DOPc.js → frame-navigation-DHCzYM6E.js} +1 -1
  153. package/dist/client/assets/{gateway-client-GUKS8Neg.js → gateway-client-Cjf9YZgG.js} +1 -1
  154. package/dist/client/assets/{general-Cdeh5VuD.js → general-CqhH_qnq.js} +1 -1
  155. package/dist/client/assets/{github-icon-F-zWm9rJ.js → github-icon-DtM4VHDi.js} +1 -1
  156. package/dist/client/assets/{held-block-view-myNdCF-d.js → held-block-view--k2oql8p.js} +1 -1
  157. package/dist/client/assets/{home-CUGwCNOx.js → home-c0Tkyf1M.js} +1 -1
  158. package/dist/client/assets/{home-overview-D0M6VmNP.js → home-overview-DL2TwzH8.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-DbZes2_O.js → hosted-reconcile-DA19JQ88.js} +1 -1
  160. package/dist/client/assets/{icon-button-CO-b_Z7N.js → icon-button-_8DeXkO0.js} +1 -1
  161. package/dist/client/assets/{index-B4Z8qm4O.js → index-A1s-ls4_.js} +1 -1
  162. package/dist/client/assets/{index-CaoQI4w-.js → index-B1Vzlz4U.js} +1 -1
  163. package/dist/client/assets/{index-Aa6DiPpP.js → index-BH57s8xx.js} +1 -1
  164. package/dist/client/assets/{index-DdUaZwED.js → index-BRuWUMBj.js} +1 -1
  165. package/dist/client/assets/{index-BWOFXtLm.js → index-Bwq9ud4q.js} +1 -1
  166. package/dist/client/assets/{index-CEeYBwYa.js → index-C5opdymg.js} +1 -1
  167. package/dist/client/assets/{index-DeCbUCeI.js → index-C_RcX5na.js} +1 -1
  168. package/dist/client/assets/{index-kCYHIAlq.js → index-Ccvx4l8u.js} +1 -1
  169. package/dist/client/assets/{index-CUj2rPmp.js → index-CeduNoaB.js} +1 -1
  170. package/dist/client/assets/{index-Mge-nIe_.js → index-Cu4y6EEK.js} +1 -1
  171. package/dist/client/assets/{index-BbyUQV-V.js → index-D0JbJFfP.js} +3 -3
  172. package/dist/client/assets/{index-Bu3usBwV.js → index-D2_PsRqT.js} +1 -1
  173. package/dist/client/assets/{index-CVv3Fivj.js → index-DkZhaGHi.js} +1 -1
  174. package/dist/client/assets/{index-C98zqBJi.js → index-DuXh-o9C.js} +1 -1
  175. package/dist/client/assets/{index-CZNM0ywV.js → index-Uvh2dd2d.js} +1 -1
  176. package/dist/client/assets/{index-D8oZjzwY.js → index-eanoJh42.js} +1 -1
  177. package/dist/client/assets/{index-DbrfsNuM.js → index-hq5vMD7l.js} +1 -1
  178. package/dist/client/assets/{index-redirect-CbcSCuPI.js → index-redirect-CugWLrBL.js} +1 -1
  179. package/dist/client/assets/{infiniteQueryObserver-DqRBsy9_.js → infiniteQueryObserver-DtEzALgC.js} +1 -1
  180. package/dist/client/assets/{infra-billing-CWfj-Pw9.js → infra-billing-CowfabqN.js} +1 -1
  181. package/dist/client/assets/{input-BG3wFK5M.js → input-CEK73Sex.js} +1 -1
  182. package/dist/client/assets/{input-BK3kIY9G.js → input-DF1Y7U-T.js} +3 -3
  183. package/dist/client/assets/{integration-icon-CqVW6T00.js → integration-icon-BkEHXL5H.js} +1 -1
  184. package/dist/client/assets/item-actions-Dt2DwB56.js +1 -0
  185. package/dist/client/assets/{jira-icon-BveDG26q.js → jira-icon-Cvf0iXMn.js} +1 -1
  186. package/dist/client/assets/{label-BlFTNuxs.js → label-Cz2ESzy4.js} +1 -1
  187. package/dist/client/assets/{layout-CJs8yxSP.js → layout-BK-aj1WP.js} +1 -1
  188. package/dist/client/assets/{legacy-admin-welcome-dialog-BeUx4hhs.js → legacy-admin-welcome-dialog-D7LEWnzk.js} +1 -1
  189. package/dist/client/assets/{legacy-agents-deep-D-0KzS7C.js → legacy-agents-deep-BkohdIkY.js} +1 -1
  190. package/dist/client/assets/{legacy-main-redirect-BnbcsFdv.js → legacy-main-redirect-CQXqcwTr.js} +1 -1
  191. package/dist/client/assets/library-5KTojEmZ.js +1 -0
  192. package/dist/client/assets/{library-tab-BsPi8uGe.js → library-tab-B7ct9qoc.js} +1 -1
  193. package/dist/client/assets/{login-CvKqHfzS.js → login-YWOyIcWn.js} +1 -1
  194. package/dist/client/assets/{markdown-BLD58IcZ.js → markdown-tL6sdqzq.js} +1 -1
  195. package/dist/client/assets/{mcp-app-renderer-C3N-ooKA.js → mcp-app-renderer-BhIn7g4y.js} +1 -1
  196. package/dist/client/assets/{mcp-oauth-BetyI4Sc.js → mcp-oauth-CJYJCIJk.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-BBRt-CKi.js → mcp-oauth-wEywaeew.js} +1 -1
  198. package/dist/client/assets/{members-G2uEV1Et.js → members-COS0v4hA.js} +1 -1
  199. package/dist/client/assets/{memory-BBzt-gTj.js → memory-BT9HM98O.js} +1 -1
  200. package/dist/client/assets/{mock-board-DzuhmO_q.js → mock-board-DJcG8Pad.js} +3 -3
  201. package/dist/client/assets/{monaco-editor-BTeatlwM.js → monaco-editor-Durke4zw.js} +1 -1
  202. package/dist/client/assets/{monitoring-C9ty4kJN.js → monitoring-DTUmrug3.js} +1 -1
  203. package/dist/client/assets/{monitoring-stats-row-Ca0svB-0.js → monitoring-stats-row-7dJGk5QN.js} +1 -1
  204. package/dist/client/assets/{multi-select-xFJ9DMUE.js → multi-select-3B0TZSKv.js} +1 -1
  205. package/dist/client/assets/{mustache-BB27WkZo.js → mustache-B8dPn6lp.js} +1 -1
  206. package/dist/client/assets/{named-rule-step-DHcxNdON.js → named-rule-step-lmAbDDuM.js} +1 -1
  207. package/dist/client/assets/{named-rule-view-Blk7EotW.js → named-rule-view-latij48D.js} +1 -1
  208. package/dist/client/assets/{new-project-dialog-CwWe9JTm.js → new-project-dialog-DpI3oirN.js} +1 -1
  209. package/dist/client/assets/{new-project-store-DI-rcaGT.js → new-project-store-CU2miSo6.js} +1 -1
  210. package/dist/client/assets/{oauth-callback-ai-provider-DNhExCAX.js → oauth-callback-ai-provider-Dy0T05tF.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-JurbFJad.js → oauth-callback-qJyQoaTr.js} +1 -1
  212. package/dist/client/assets/{oauth-consent-Dv-Pk8HZ.js → oauth-consent-CsrgkVd2.js} +1 -1
  213. package/dist/client/assets/{onboarding-NnDc0_K6.js → onboarding-BG67tfWh.js} +1 -1
  214. package/dist/client/assets/{openai-conversation-C3QjsSfG.js → openai-conversation-qkOZuSP9.js} +1 -1
  215. package/dist/client/assets/{optimistic-project-sidebar-views-B7gNYHcx.js → optimistic-project-sidebar-views-DP6_xZnw.js} +1 -1
  216. package/dist/client/assets/{order-monitor-day-DfBlxxW3.js → order-monitor-day-DCDAwCcy.js} +1 -1
  217. package/dist/client/assets/{organization-choice-CIf8awfg.js → organization-choice-Di2R8L3I.js} +1 -1
  218. package/dist/client/assets/{orgs-D2UEp59O.js → orgs-Bl6bbwzN.js} +1 -1
  219. package/dist/client/assets/{own-accounts-section-9LGriAR-.js → own-accounts-section-DdFjVQqe.js} +1 -1
  220. package/dist/client/assets/{pair-Dg8_WzRx.js → pair-DyZ1K8WQ.js} +1 -1
  221. package/dist/client/assets/{parse-sections-DFcHy6a1.js → parse-sections-D4rEtefR.js} +2 -2
  222. package/dist/client/assets/{plan-DpsDK1nS.js → plan-RJj-iCo4.js} +1 -1
  223. package/dist/client/assets/{plan-ladder-i51kvc_6.js → plan-ladder-C4IQnf9g.js} +1 -1
  224. package/dist/client/assets/{plan-usage-card-Mo9p5apk.js → plan-usage-card-CrMWJU-G.js} +1 -1
  225. package/dist/client/assets/{popover-B2fZ96W0.js → popover-CHMhtCUs.js} +1 -1
  226. package/dist/client/assets/{post-calendar-BxpnvMqZ.js → post-calendar-CN1diBak.js} +1 -1
  227. package/dist/client/assets/{post-editor-DA_1qcnl.js → post-editor-BcwPJV8K.js} +1 -1
  228. package/dist/client/assets/{preview-content-D5RMjaD6.js → preview-content-BOQns-lB.js} +1 -1
  229. package/dist/client/assets/{preview-dialog-C0sVKUR7.js → preview-dialog-C7cBTnki.js} +1 -1
  230. package/dist/client/assets/{preview-panel-CInuQgv3.js → preview-panel-Dj9mGout.js} +1 -1
  231. package/dist/client/assets/{preview-tab-D51UeUtA.js → preview-tab-DmV1MCqv.js} +3 -3
  232. package/dist/client/assets/{product-picker-dialog-DSDf6Bwa.js → product-picker-dialog-Byy9UJeP.js} +1 -1
  233. package/dist/client/assets/{profile-BclswKhx.js → profile-WjwNygHC.js} +1 -1
  234. package/dist/client/assets/{project-app-view-ke3ZuGxF.js → project-app-view-nn15XQnF.js} +1 -1
  235. package/dist/client/assets/{project-apps-fbR4xDRx.js → project-apps-8wVrHF3C.js} +1 -1
  236. package/dist/client/assets/{project-icon-BbR0XGm1.js → project-icon-EAm2TPOd.js} +1 -1
  237. package/dist/client/assets/{project-index-lWz60EWQ.js → project-index-n6zIw3HS.js} +1 -1
  238. package/dist/client/assets/project-reports-BJG8cv_j.js +1 -0
  239. package/dist/client/assets/project-tasks-s96uaQBm.js +1 -0
  240. package/dist/client/assets/{projects-BM5L61A_.js → projects-0A5PF_Ra.js} +1 -1
  241. package/dist/client/assets/{projects-empty-state-Vmw2nbR-.js → projects-empty-state-C-UOiCuP.js} +1 -1
  242. package/dist/client/assets/{prompts-DEXjOdXC.js → prompts-CILhcEu9.js} +1 -1
  243. package/dist/client/assets/record-editor-BUTAoLlf.js +1 -0
  244. package/dist/client/assets/{redirect-editor-_jG1X_eI.js → redirect-editor-lI_kGmrc.js} +1 -1
  245. package/dist/client/assets/reports-Ci-ze_9x.js +1 -0
  246. package/dist/client/assets/{reports-_8k_JS7q.js → reports-DR1rn8J7.js} +1 -1
  247. package/dist/client/assets/{reports-onboarding-8vGx8eDL.js → reports-onboarding-B66tPRvi.js} +1 -1
  248. package/dist/client/assets/{reports-tab-Caka1Haa.js → reports-tab-DKruN66x.js} +2 -2
  249. package/dist/client/assets/{repositories-B9q1-DTL.js → repositories-Bbw0CrFR.js} +1 -1
  250. package/dist/client/assets/repositories-BqfuO_cv.js +1 -0
  251. package/dist/client/assets/{repository-binding-CYxPGVF9.js → repository-binding-BkeJ2CtJ.js} +1 -1
  252. package/dist/client/assets/{repository-picker-BwLPliw3.js → repository-picker-BjO-oJEQ.js} +1 -1
  253. package/dist/client/assets/{require-capability-BdZtDVPs.js → require-capability-BgMHtUR9.js} +1 -1
  254. package/dist/client/assets/{required-auth-layout-CEv7xMbD.js → required-auth-layout-DtC4GqSJ.js} +1 -1
  255. package/dist/client/assets/{reset-password-DcjIR0v2.js → reset-password-DY5b2Erk.js} +1 -1
  256. package/dist/client/assets/{resizable-CDz_Gn5D.js → resizable-Cd2hDMdu.js} +1 -1
  257. package/dist/client/assets/{resolve-tab-icon-DSU20OFN.js → resolve-tab-icon-EXlDKnuK.js} +1 -1
  258. package/dist/client/assets/{review-settings-4ZKA9iW7.js → review-settings-CqBIGzNT.js} +1 -1
  259. package/dist/client/assets/{role-color-CAtp2x5d.js → role-color-DFMPljwV.js} +1 -1
  260. package/dist/client/assets/{roles-B7qeAHn4.js → roles-Dw2sI3jk.js} +1 -1
  261. package/dist/client/assets/route-BCIzQ5q9.js +1 -0
  262. package/dist/client/assets/route-BJPaaD6u.js +1 -0
  263. package/dist/client/assets/{route-CjIHbnSM.js → route-CZALPmji.js} +1 -1
  264. package/dist/client/assets/{route-page-header-BtRFuS1p.js → route-page-header-BPaA0qrQ.js} +1 -1
  265. package/dist/client/assets/{sandbox-git-api-a72xh_lB.js → sandbox-git-api-DY2JBwrb.js} +1 -1
  266. package/dist/client/assets/{sandbox-lifecycle-context-BgQ_JLd0.js → sandbox-lifecycle-context-DwvoKy-z.js} +1 -1
  267. package/dist/client/assets/save-status-DXZEEhy7.js +1 -0
  268. package/dist/client/assets/{schema-BoCycph4.js → schema-CZDH3n7J.js} +1 -1
  269. package/dist/client/assets/{schema-DvznvyNF.js → schema-ClQSeEkW.js} +1 -1
  270. package/dist/client/assets/{scroll-area-BJzMdjhR.js → scroll-area-D27AfOYB.js} +1 -1
  271. package/dist/client/assets/{search-input-Dx1nMhkR.js → search-input-jt6Xgx4B.js} +1 -1
  272. package/dist/client/assets/{search-toggle-CUowc2bs.js → search-toggle-D3HRB5Df.js} +1 -1
  273. package/dist/client/assets/{secret-picker-CzcUm0AA.js → secret-picker-XaaAcM5r.js} +1 -1
  274. package/dist/client/assets/{secrets-T6PONWpM.js → secrets-BvHbzBRf.js} +1 -1
  275. package/dist/client/assets/{section-array-field-Dau5fGuc.js → section-array-field-whxy-DeQ.js} +1 -1
  276. package/dist/client/assets/{sections-B_pt0duw.js → sections-Cthuvf0M.js} +1 -1
  277. package/dist/client/assets/{sections-editor-B1dRi1DP.js → sections-editor-CCOVQk8_.js} +1 -1
  278. package/dist/client/assets/{select-CaROtCr6.js → select-CHNsjY6K.js} +1 -1
  279. package/dist/client/assets/{select-model-B_uQ8JoM.js → select-model-CxmLGQ73.js} +1 -1
  280. package/dist/client/assets/{seo-editor-CgBBfTmC.js → seo-editor-gj6rND5b.js} +1 -1
  281. package/dist/client/assets/{separator-DzpcrIme.js → separator-BDf2J6cr.js} +1 -1
  282. package/dist/client/assets/{session-runtime-B3M5aN-q.js → session-runtime-Af7XCW1y.js} +1 -1
  283. package/dist/client/assets/settings-tab-DjqNp38m.js +1 -0
  284. package/dist/client/assets/{sheet-um4noh5c.js → sheet-DQnddENA.js} +1 -1
  285. package/dist/client/assets/{shell-layout-49bNXIez.js → shell-layout-8n97Gfv2.js} +1 -1
  286. package/dist/client/assets/{site-draft-actions-DK9guIkf.js → site-draft-actions-f9v6MtCM.js} +1 -1
  287. package/dist/client/assets/{site-draft-view-WvygLXbI.js → site-draft-view-DDIBbub5.js} +1 -1
  288. package/dist/client/assets/site-editor-DZ3A-aYm.js +1 -0
  289. package/dist/client/assets/{site-editor-toast-CkErPR2A.js → site-editor-toast-B7n4gXl4.js} +1 -1
  290. package/dist/client/assets/{skills-DOI-sQ-e.js → skills-DFVK-W9z.js} +1 -1
  291. package/dist/client/assets/{slider-BSl20SQg.js → slider-C2mk6liJ.js} +1 -1
  292. package/dist/client/assets/{sortable.esm-CqIiSw1u.js → sortable.esm-D-Grx_BB.js} +1 -1
  293. package/dist/client/assets/{sso-BjUVysiz.js → sso-CXnYKuTn.js} +1 -1
  294. package/dist/client/assets/{suggestion-Ddmtk3Nb.js → suggestion-hAQ8JrrP.js} +1 -1
  295. package/dist/client/assets/{super-agent-icon-DoovhGsp.js → super-agent-icon-DLAa0E4b.js} +1 -1
  296. package/dist/client/assets/{switch-BH2QiW4s.js → switch-DLa18g9P.js} +1 -1
  297. package/dist/client/assets/{synced-repos-CWR0L5YE.js → synced-repos-CW0qt6Jp.js} +1 -1
  298. package/dist/client/assets/{tab-icon-glyph-DOr4PjkR.js → tab-icon-glyph-sPxJu63d.js} +1 -1
  299. package/dist/client/assets/{table-C92UEJKy.js → table-DwE6kXVm.js} +1 -1
  300. package/dist/client/assets/{tabs-NIuu6bj4.js → tabs-Bpa2glNp.js} +1 -1
  301. package/dist/client/assets/{task-board-_DSzqPWi.js → task-board-V6fHxbUs.js} +1 -1
  302. package/dist/client/assets/{task-key-CaAm1Jwf.js → task-key-kJFx4e2o.js} +1 -1
  303. package/dist/client/assets/{task-route-DLJKfX0K.js → task-route-DFPlSt_R.js} +1 -1
  304. package/dist/client/assets/{task-status-DA1DjG6p.js → task-status-bSdxlxRQ.js} +1 -1
  305. package/dist/client/assets/{taskboard-analytics-Dh8Uts6G.js → taskboard-analytics-ylcJh5LS.js} +1 -1
  306. package/dist/client/assets/{tasks-BbQQWzuJ.js → tasks-D70ou02W.js} +1 -1
  307. package/dist/client/assets/tasks-DcUnjS-o.js +1 -0
  308. package/dist/client/assets/{textarea-Co6WXg3Y.js → textarea-DKKpu4j7.js} +1 -1
  309. package/dist/client/assets/{thread-analytics-DXYu0MbV.js → thread-analytics-BIEg-EM0.js} +1 -1
  310. package/dist/client/assets/{thread-button-8Paou_ey.js → thread-button-C2TH27Tw.js} +1 -1
  311. package/dist/client/assets/{thread-intent-BNjS3eKm.js → thread-intent-dNVrC8sL.js} +1 -1
  312. package/dist/client/assets/{thread-route-B-bmrR_e.js → thread-route-DRUKUdDI.js} +1 -1
  313. package/dist/client/assets/{thread-route-B-vrKdst.js → thread-route-yhTv7wYw.js} +1 -1
  314. package/dist/client/assets/{thread-sheet-body-BruhHKIO.js → thread-sheet-body-2n-7Buvv.js} +1 -1
  315. package/dist/client/assets/{time-range-picker-DLzufi0f.js → time-range-picker-BL4eezN1.js} +1 -1
  316. package/dist/client/assets/{toggle-group-D14vFqFg.js → toggle-group-D9Y0fm-3.js} +1 -1
  317. package/dist/client/assets/{tool-set-selector-EC4Q3po8.js → tool-set-selector-Drp4qxhz.js} +1 -1
  318. package/dist/client/assets/{toolbar-icon-button-CKwtmkGZ.js → toolbar-icon-button-BSNdxRRG.js} +1 -1
  319. package/dist/client/assets/{tooltip-CINPZAUE.js → tooltip-bcUJYhL_.js} +1 -1
  320. package/dist/client/assets/{tooltipContext-B7kIVm-_.js → tooltipContext-DEGZ2uVc.js} +1 -1
  321. package/dist/client/assets/{track-B0303apM.js → track-BBPO8uHZ.js} +1 -1
  322. package/dist/client/assets/{types-KLF33bAU.js → types-BfjfZI1L.js} +1 -1
  323. package/dist/client/assets/{url-slug-BhLnqovl.js → url-slug-DlaJQcf1.js} +1 -1
  324. package/dist/client/assets/{usage-stats-DTw2_3QF.js → usage-stats-D_d2D8Wj.js} +1 -1
  325. package/dist/client/assets/{use-ai-providers-BxpYBICM.js → use-ai-providers-CA-khqag.js} +1 -1
  326. package/dist/client/assets/{use-api-keys-DEL0nRO1.js → use-api-keys-DmoX8fkX.js} +1 -1
  327. package/dist/client/assets/{use-apply-named-rule-CRVOk9Kn.js → use-apply-named-rule-Df7T3xoC.js} +1 -1
  328. package/dist/client/assets/use-ask-in-chat-KRmd65S3.js +1 -0
  329. package/dist/client/assets/{use-automations-Da6nezmh.js → use-automations-CkV07sTy.js} +1 -1
  330. package/dist/client/assets/{use-autosave-BHk7ZJHa.js → use-autosave-BI9FF_Nw.js} +1 -1
  331. package/dist/client/assets/use-blocks-v8-project-DM7tjD-Y.js +1 -0
  332. package/dist/client/assets/use-blog-view-DuP6av7s.js +1 -0
  333. package/dist/client/assets/{use-chat-layout-state-BmTxsTjG.js → use-chat-layout-state-SUAjqrxB.js} +1 -1
  334. package/dist/client/assets/{use-cms-publish-actions-wU3dtco2.js → use-cms-publish-actions-Dbj-FgCO.js} +1 -1
  335. package/dist/client/assets/{use-connect-companion-N3ywRKD4.js → use-connect-companion-BewE2n-r.js} +1 -1
  336. package/dist/client/assets/{use-connection-Q1OVyR-K.js → use-connection-BlwEJ6QU.js} +1 -1
  337. package/dist/client/assets/{use-content-sync-D1DcK5RP.js → use-content-sync-fyaHiMZi.js} +1 -1
  338. package/dist/client/assets/{use-copy-CHLJB-eJ.js → use-copy-CLDbNfFh.js} +1 -1
  339. package/dist/client/assets/{use-current-view-DWPEJKMo.js → use-current-view-BOFMyET9.js} +1 -1
  340. package/dist/client/assets/{use-date-fns-locale-Ch-Feesx.js → use-date-fns-locale-Bd2tfTTF.js} +1 -1
  341. package/dist/client/assets/{use-debounced-autosave-C330kFl7.js → use-debounced-autosave-w4z8emZZ.js} +1 -1
  342. package/dist/client/assets/{use-debounced-value-CDV_Hdj_.js → use-debounced-value-CKJPodTI.js} +1 -1
  343. package/dist/client/assets/{use-deco-credits-BH9MKLeU.js → use-deco-credits-B3QsHbOs.js} +1 -1
  344. package/dist/client/assets/{use-decopilot-events-Bzy3gyOh.js → use-decopilot-events-g19xYjLG.js} +1 -1
  345. package/dist/client/assets/{use-delete-block-Ds8KKf4b.js → use-delete-block-BM2EDDox.js} +1 -1
  346. package/dist/client/assets/{use-delete-connection-CUYN49rH.js → use-delete-connection-ChSMTPNG.js} +1 -1
  347. package/dist/client/assets/{use-deployment-admin-44Nr2y3l.js → use-deployment-admin-D5oW79CT.js} +1 -1
  348. package/dist/client/assets/{use-entitlements-D_bekXoy.js → use-entitlements-hCyBXtuJ.js} +1 -1
  349. package/dist/client/assets/{use-fast-preview-draft-url-BJcuelFd.js → use-fast-preview-draft-url-EPskZgiI.js} +1 -1
  350. package/dist/client/assets/{use-file-configs-Dv6Dn9-s.js → use-file-configs-BHoa1WZE.js} +1 -1
  351. package/dist/client/assets/{use-id-selection-B5eFUC_T.js → use-id-selection-pnESFlAH.js} +1 -1
  352. package/dist/client/assets/{use-in-settings-DsvAK9xJ.js → use-in-settings-1MICTjP9.js} +1 -1
  353. package/dist/client/assets/{use-inbox-feed-DUOXuaWM.js → use-inbox-feed-IJbAYVJ5.js} +1 -1
  354. package/dist/client/assets/{use-infinite-scroll-K5fXsA2s.js → use-infinite-scroll-47R6Hyro.js} +1 -1
  355. package/dist/client/assets/{use-join-requests-ne0-a4Uk.js → use-join-requests-BPAsPyx8.js} +1 -1
  356. package/dist/client/assets/{use-main-panel-tabs-ZUH2Q11R.js → use-main-panel-tabs-Zy_d8HK3.js} +1 -1
  357. package/dist/client/assets/{use-mcp-auth-status-BydVHpTh.js → use-mcp-auth-status-BDCbIbFE.js} +1 -1
  358. package/dist/client/assets/{use-mcp-client-KtY-iAqe.js → use-mcp-client-Cnv47oK4.js} +1 -1
  359. package/dist/client/assets/{use-mcp-prompts-hYH8zGss.js → use-mcp-prompts-BEiCSVNE.js} +1 -1
  360. package/dist/client/assets/{use-mcp-tools-Bkf2GErZ.js → use-mcp-tools-8aCXB58i.js} +1 -1
  361. package/dist/client/assets/{use-mobile-BFnx6XU5.js → use-mobile-DXgcDHnH.js} +1 -1
  362. package/dist/client/assets/{use-move-blocks-CTFo8anC.js → use-move-blocks-BzKtUTnP.js} +1 -1
  363. package/dist/client/assets/{use-navigate-to-agent-DzfMLwHb.js → use-navigate-to-agent-Jn9AHv5I.js} +1 -1
  364. package/dist/client/assets/{use-never-published-DvQ5FOx0.js → use-never-published-CS1sCoUt.js} +1 -1
  365. package/dist/client/assets/{use-org-fs-BQXLoGp0.js → use-org-fs-0zArVAMr.js} +1 -1
  366. package/dist/client/assets/{use-org-notice-DiGO_5sP.js → use-org-notice-DuKnnmVo.js} +1 -1
  367. package/dist/client/assets/{use-org-repo-syncs-DXQDNA2H.js → use-org-repo-syncs-DteS2PPH.js} +1 -1
  368. package/dist/client/assets/{use-org-sso-BqAhMDLF.js → use-org-sso-D1j0oTnH.js} +1 -1
  369. package/dist/client/assets/{use-organization-settings-C_xGXqYD.js → use-organization-settings-PllK3r0i.js} +1 -1
  370. package/dist/client/assets/{use-panel-navigate-m_WUKcO1.js → use-panel-navigate-CAZIXqmL.js} +1 -1
  371. package/dist/client/assets/{use-project-native-view-presence-DoNrSMI0.js → use-project-native-view-presence-BE1ptslQ.js} +1 -1
  372. package/dist/client/assets/{use-project-scope-tAmzLFmo.js → use-project-scope-DA6OZsHG.js} +1 -1
  373. package/dist/client/assets/{use-recent-apps-D4SaJyU5.js → use-recent-apps-DeTsw193.js} +1 -1
  374. package/dist/client/assets/{use-reports-diagnostic-CQf2IKUc.js → use-reports-diagnostic-CDJkhX3Z.js} +1 -1
  375. package/dist/client/assets/{use-sandbox-events-Choa45Ad.js → use-sandbox-events-BZR9Xvyj.js} +1 -1
  376. package/dist/client/assets/{use-secrets-B89UQslL.js → use-secrets-C9vyBfSH.js} +1 -1
  377. package/dist/client/assets/{use-section-preview-base-oNURhBRp.js → use-section-preview-base-DcN4R2fZ.js} +1 -1
  378. package/dist/client/assets/{use-sidebar-collapsed-DonGXxtx.js → use-sidebar-collapsed-BoDydqEu.js} +1 -1
  379. package/dist/client/assets/{use-tags-DlbCsNcX.js → use-tags-ta1jGy7k.js} +1 -1
  380. package/dist/client/assets/{use-task-board-analytics-CrP9Mh4i.js → use-task-board-analytics-BrO0ETlJ.js} +1 -1
  381. package/dist/client/assets/{use-task-board-item-prs-DyqixuOS.js → use-task-board-item-prs-CHUrrNd1.js} +1 -1
  382. package/dist/client/assets/{use-task-board-items-FrK4WjzX.js → use-task-board-items-uhqh6PNR.js} +1 -1
  383. package/dist/client/assets/{use-task-board-prompts-JQ5bYVQJ.js → use-task-board-prompts-D43tghaN.js} +1 -1
  384. package/dist/client/assets/{use-task-metadata-D2mdWA_p.js → use-task-metadata-BFdyyZRC.js} +1 -1
  385. package/dist/client/assets/{use-thread-outputs-BYENDfew.js → use-thread-outputs-D_-5CcDB.js} +1 -1
  386. package/dist/client/assets/{use-view-draft-kind-eAKU4tzG.js → use-view-draft-kind-2ZPvA4uU.js} +1 -1
  387. package/dist/client/assets/{use-voice-input-CFZw5CCV.js → use-voice-input-BVDR_h76.js} +1 -1
  388. package/dist/client/assets/useInfiniteQuery-fnTqEMy9.js +1 -0
  389. package/dist/client/assets/{useQueries-DFX8Ra2q.js → useQueries-CmlQ5ude.js} +1 -1
  390. package/dist/client/assets/useSuspenseInfiniteQuery-CnPwOZuW.js +1 -0
  391. package/dist/client/assets/{users-CpjXg9O4.js → users-Dh7gdfol.js} +1 -1
  392. package/dist/client/assets/{utils-C_wnF1Qr.js → utils-T-xgwvu9.js} +1 -1
  393. package/dist/client/assets/{variant-calendar-CNAmWyjo.js → variant-calendar-CDO68J7G.js} +1 -1
  394. package/dist/client/assets/{variant-matcher-override-Dq-o59Sr.js → variant-matcher-override-MqCM8vjD.js} +1 -1
  395. package/dist/client/assets/{view-header-DFmoKFz1.js → view-header-Bee_uEOf.js} +1 -1
  396. package/dist/client/assets/{virtual-mcp-BL-2RDhS.js → virtual-mcp-BiyQxJGK.js} +1 -1
  397. package/dist/client/assets/{watch-sse-pool-TBuzagYQ.js → watch-sse-pool-C4P_vqWF.js} +1 -1
  398. package/dist/client/index.html +1 -1
  399. package/dist/server/server.js +1 -1
  400. package/package.json +1 -1
  401. package/dist/client/assets/agent-app-BplGduEL.js +0 -1
  402. package/dist/client/assets/agent-deck-DcBq-EFc.js +0 -1
  403. package/dist/client/assets/agent-experiments-Db41C8mK.js +0 -1
  404. package/dist/client/assets/agent-file-CCf39Rtq.js +0 -1
  405. package/dist/client/assets/agent-library-DPkauleQ.js +0 -1
  406. package/dist/client/assets/agent-library-file-DBFbWEdb.js +0 -1
  407. package/dist/client/assets/agent-overview-w61B53CG.js +0 -1
  408. package/dist/client/assets/agent-settings-DhAam1Kq.js +0 -1
  409. package/dist/client/assets/agent-site-editor-code-B7ydMNRc.js +0 -2
  410. package/dist/client/assets/agent-site-editor-content-DGHE_na5.js +0 -1
  411. package/dist/client/assets/agent-site-editor-preview-B2KHkUGc.js +0 -1
  412. package/dist/client/assets/agent-view-2ZyI-5m_.js +0 -1
  413. package/dist/client/assets/api-keys-QeNKM9--.js +0 -1
  414. package/dist/client/assets/item-actions-BR73Lbpo.js +0 -1
  415. package/dist/client/assets/library-D1GvJnHB.js +0 -1
  416. package/dist/client/assets/project-reports-B9Ihgtjs.js +0 -1
  417. package/dist/client/assets/project-tasks-BlyYNsZd.js +0 -1
  418. package/dist/client/assets/record-editor-5moRR35h.js +0 -1
  419. package/dist/client/assets/reports-BRR7RsFA.js +0 -1
  420. package/dist/client/assets/repositories-DJEaM14h.js +0 -1
  421. package/dist/client/assets/route-D1xX0HWw.js +0 -1
  422. package/dist/client/assets/route-DxBgurmK.js +0 -1
  423. package/dist/client/assets/save-status-BXi_cq_U.js +0 -1
  424. package/dist/client/assets/settings-tab-dHZPtR7N.js +0 -1
  425. package/dist/client/assets/site-editor-CD68AWh1.js +0 -1
  426. package/dist/client/assets/tasks-CpE_irof.js +0 -1
  427. package/dist/client/assets/use-ask-in-chat-DbbisiOd.js +0 -1
  428. package/dist/client/assets/use-blocks-v8-project-CTDs5jlx.js +0 -1
  429. package/dist/client/assets/use-blog-view-B5vAwn2e.js +0 -1
  430. package/dist/client/assets/useInfiniteQuery-L4kwu3zj.js +0 -1
  431. package/dist/client/assets/useSuspenseInfiniteQuery-B00pnfIH.js +0 -1
@@ -1 +1 @@
1
- import{c as I,b as X,r as $,m as B,j as s,a4 as Re,e as nt,t as je,D as it,v as lt,w as ot,x as at,y as ct,B as Fe,au as dt,Y as ke,a5 as ut,E as H,X as ft,Z as mt,_ as ht,d as pt,aB as gt,l as bt,H as xt,ar as $e,L as Ye,$ as jt,at as Ge,aC as vt,P as yt}from"./index-BbyUQV-V.js";import{u as Ie,c as Ze,g as St,h as wt,i as Ct}from"./use-sidebar-collapsed-DonGXxtx.js";import{S as _t,a as kt,b as Ot}from"./sheet-um4noh5c.js";import{u as Rt}from"./use-mobile-BFnx6XU5.js";import{u as zt,a as Et,D as Dt,c as Nt,C as Tt,P as Lt}from"./task-key-CaAm1Jwf.js";import{S as Pt,v as At,u as Mt}from"./sortable.esm-CqIiSw1u.js";import{i as $t}from"./Tool01-BIyGNKrn.js";import{t as It,r as Kt,u as Ft,v as Ut,A as Wt,w as Ue}from"./agent-icon-Djmp3uF_.js";import{s as Bt}from"./Plus-C2jbSKfe.js";import{i as Ht}from"./UserSquare-BJ8rQzrf.js";import{a as Xt}from"./UserCheck01-BNqLXBfG.js";import{s as qe}from"./XClose-BeMmbmRj.js";import{T as ge,a as be,c as xe}from"./tooltip-CINPZAUE.js";import{C as Pe,f as Yt,g as Gt,e as Zt}from"./context-menu-C3vl1voD.js";import{a as qt,O as Ve,w as Vt,b as Jt,c as Qt,E as es,r as Oe,d as ts,e as ss,h as rs,t as ns,f as Je,m as is,o as ls}from"./use-org-notice-DiGO_5sP.js";import{C as os}from"./create-organization-dialog-C8w69dn8.js";import{P as as}from"./project-apps-fbR4xDRx.js";import{u as cs,a as ds}from"./use-recent-apps-D4SaJyU5.js";import{a as us}from"./use-navigate-to-agent-DzfMLwHb.js";import{a as fs,u as ms}from"./use-project-scope-tAmzLFmo.js";import{C as We,a as hs,b as ps,c as gs,d as bs}from"./command-BUJZW101.js";import{u as xs}from"./use-debounced-value-CDV_Hdj_.js";import{n as js}from"./BookOpen01-CHggQBWj.js";import{F as vs,a as Ae,b as ys,c as Qe}from"./feedback-BqoIMOg7.js";import{T as Ss}from"./textarea-Co6WXg3Y.js";import{a as ws}from"./thread-button-8Paou_ey.js";function Cs(t){const e=I.c(48),{open:n,onOpenChange:r,orgs:i,currentSlug:c,onSelect:l}=t,d=X(),[o,f]=$.useState("");let b;e[0]!==o?(b=o.trim(),e[0]=o,e[1]=b):b=e[1];const h=b,p=xs(h,150),m=h.length>0,u=p===h,{hits:v,isSearching:j,isStale:C,isError:w}=qt(m?p:""),a=m?v:i;let x;e[2]!==r?(x=L=>{r(L),L||f("")},e[2]=r,e[3]=x):x=e[3];const g=x;let y;e[4]!==d?(y=d("sidebar.rail.searchOrganizations"),e[4]=d,e[5]=y):y=e[5];let S;e[6]!==d?(S=d("sidebar.rail.searchPlaceholder"),e[6]=d,e[7]=S):S=e[7];let k;e[8]!==d?(k=d("sidebar.rail.searchPlaceholder"),e[8]=d,e[9]=k):k=e[9];let _;e[10]!==o||e[11]!==k?(_=s.jsx(hs,{value:o,onValueChange:f,placeholder:k}),e[10]=o,e[11]=k,e[12]=_):_=e[12];const T=m&&(C||!u)&&"opacity-50";let z;e[13]!==T?(z=B(T),e[13]=T,e[14]=z):z=e[14];let O;e[15]!==w||e[16]!==m||e[17]!==d?(O=m&&w&&s.jsx(We,{children:d("sidebar.rail.searchFailed")}),e[15]=w,e[16]=m,e[17]=d,e[18]=O):O=e[18];let E;e[19]!==w||e[20]!==j||e[21]!==a.length||e[22]!==u||e[23]!==d?(E=!w&&u&&!j&&a.length===0&&s.jsx(We,{children:d("sidebar.rail.searchEmpty")}),e[19]=w,e[20]=j,e[21]=a.length,e[22]=u,e[23]=d,e[24]=E):E=e[24];let D;if(e[25]!==c||e[26]!==l||e[27]!==g||e[28]!==a||e[29]!==d){let L;e[31]!==c||e[32]!==l||e[33]!==g||e[34]!==d?(L=P=>s.jsxs(ps,{value:P.slug,onSelect:()=>{g(!1),P.slug!==c&&l(P.slug)},className:"gap-2.5",children:[s.jsx(Ve,{org:P,size:"sm"}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.name}),P.slug===c&&s.jsx("span",{className:"text-meta shrink-0",children:d("sidebar.rail.currentOrganization")})]},P.id),e[31]=c,e[32]=l,e[33]=g,e[34]=d,e[35]=L):L=e[35],D=a.map(L),e[25]=c,e[26]=l,e[27]=g,e[28]=a,e[29]=d,e[30]=D}else D=e[30];let R;e[36]!==E||e[37]!==D||e[38]!==z||e[39]!==O?(R=s.jsxs(gs,{className:z,children:[O,E,D]}),e[36]=E,e[37]=D,e[38]=z,e[39]=O,e[40]=R):R=e[40];let A;return e[41]!==n||e[42]!==g||e[43]!==R||e[44]!==y||e[45]!==S||e[46]!==_?(A=s.jsxs(bs,{open:n,onOpenChange:g,title:y,description:S,shouldFilter:!1,children:[_,R]}),e[41]=n,e[42]=g,e[43]=R,e[44]=y,e[45]=S,e[46]=_,e[47]=A):A=e[47],A}function _s(t){const e=I.c(4),{size:n,className:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("path",{d:"M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.028C.533 9.046-.32 13.58.099 18.058a.082.082 0 0 0 .031.056 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.042-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.099.246.198.373.292a.077.077 0 0 1-.007.128 12.3 12.3 0 0 1-1.873.891.077.077 0 0 0-.041.107c.36.698.772 1.363 1.225 1.993a.076.076 0 0 0 .084.029 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.055c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.029ZM8.02 15.331c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.956 2.418-2.157 2.418Zm7.975 0c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.946 2.418-2.157 2.418Z"}),e[0]=i):i=e[0];let c;return e[1]!==r||e[2]!==n?(c=s.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:r,children:i}),e[1]=r,e[2]=n,e[3]=c):c=e[3],c}const ks=250;function Os(){return typeof navigator<"u"&&!!navigator.mediaDevices?.getDisplayMedia}function Be(t,e,n){return new Promise(r=>t.toBlob(r,e,n))}async function Rs(){const t=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include"});try{const e=document.createElement("video");e.muted=!0,e.srcObject=t,await e.play(),await new Promise(c=>setTimeout(c,ks));const n=document.createElement("canvas");n.width=e.videoWidth,n.height=e.videoHeight,n.getContext("2d")?.drawImage(e,0,0),e.srcObject=null;let r=await Be(n,"image/png");if((!r||r.size>Qe)&&(r=await Be(n,"image/jpeg",.85)),!r)throw new Error("Could not encode the screenshot");const i=r.type==="image/png"?"png":"jpg";return new File([r],`screenshot.${i}`,{type:r.type})}finally{for(const e of t.getTracks())e.stop()}}function He({kind:t,open:e,onOpenChange:n}){const r=X(),i=t==="problem"?{title:r("sidebar.problem.title"),placeholder:r("sidebar.problem.placeholder"),sent:r("sidebar.problem.sent"),failed:r("sidebar.problem.failed")}:{title:r("sidebar.feedback.title"),placeholder:r("sidebar.feedback.placeholder"),sent:r("sidebar.feedback.sent"),failed:r("sidebar.feedback.failed")},{org:c}=Re(),[l,d]=$.useState(""),[o,f]=$.useState([]),[b,h]=$.useState(!1),p=()=>{for(const a of o)URL.revokeObjectURL(a.previewUrl);f([]),d("")},m=a=>{const x=a.filter(S=>ys.includes(S.type)?S.size>Qe?(je.error(r("sidebar.feedback.screenshotTooLarge")),!1):!0:!1),g=Ae-o.length;x.length>g&&je.error(r("sidebar.feedback.tooManyScreenshots",{max:String(Ae)}));const y=x.slice(0,Math.max(g,0)).map(S=>({file:S,previewUrl:URL.createObjectURL(S)}));y.length>0&&f(S=>[...S,...y])},u=a=>{URL.revokeObjectURL(a.previewUrl),f(x=>x.filter(g=>g!==a))},v=async()=>{h(!0);try{m([await Rs()])}catch(a){a instanceof DOMException&&a.name==="NotAllowedError"||(console.error("[feedback] screenshot failed",a),je.error(r("sidebar.feedback.screenshotFailed")))}finally{h(!1)}},j=a=>{const x=Array.from(a.clipboardData.files).filter(g=>g.type.startsWith("image/"));x.length!==0&&(a.preventDefault(),m(x))},C=nt({mutationFn:async()=>{const a=new FormData;a.set("kind",t),a.set("message",l.trim()),a.set("pageUrl",window.location.href);for(const g of o)a.append("screenshot",g.file);const x=await fetch(`/api/${encodeURIComponent(c.slug)}/feedback`,{method:"POST",body:a});if(!x.ok)throw new Error(`Feedback failed: ${x.status}`)},onSuccess:()=>{je.success(i.sent),p(),n(!1)},onError:()=>je.error(i.failed)}),w=l.trim().length>0&&!C.isPending;return s.jsx(it,{open:e&&!b,onOpenChange:n,children:s.jsxs(lt,{className:"sm:max-w-lg","aria-describedby":void 0,children:[s.jsx(ot,{children:s.jsx(at,{children:i.title})}),s.jsx(Ss,{autoFocus:!0,value:l,onChange:a=>d(a.target.value),onPaste:j,onKeyDown:a=>{a.key==="Enter"&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),w&&C.mutate())},placeholder:i.placeholder,className:"min-h-32 max-h-80",maxLength:vs}),o.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:o.map((a,x)=>s.jsxs("div",{className:"group relative size-20 overflow-hidden rounded-lg shadow-edge",children:[s.jsx("a",{href:a.previewUrl,target:"_blank",rel:"noreferrer",children:s.jsx("img",{src:a.previewUrl,alt:r("sidebar.feedback.screenshotAlt",{n:String(x+1)}),className:"size-full object-cover"})}),s.jsx("button",{type:"button",onClick:()=>u(a),"aria-label":r("sidebar.feedback.removeScreenshot"),className:"absolute top-1 right-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground opacity-0 shadow-edge transition-opacity group-hover:opacity-100 focus-visible:opacity-100",children:s.jsx(qe,{size:12})})]},a.previewUrl))}),s.jsxs(ct,{className:"sm:justify-between",children:[Os()?s.jsxs(Fe,{type:"button",variant:"outline",onClick:v,disabled:o.length>=Ae,children:[s.jsx(It,{size:14}),r("sidebar.feedback.takeScreenshot")]}):s.jsx("span",{}),s.jsx(Fe,{type:"button",onClick:()=>C.mutate(),disabled:!w,children:C.isPending?r("sidebar.feedback.sending"):r("sidebar.feedback.send")})]})]})})}function ve(t){const e=I.c(11),{active:n,label:r,children:i}=t,c=n?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let l;e[0]!==c?(l=B("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",c),e[0]=c,e[1]=l):l=e[1];let d;e[2]!==l?(d=s.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:s.jsx("span",{className:l})}),e[2]=l,e[3]=d):d=e[3];let o;e[4]!==n||e[5]!==r?(o=r&&s.jsx("span",{"aria-hidden":!0,className:B("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",n?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:r}),e[4]=n,e[5]=r,e[6]=o):o=e[6];let f;return e[7]!==i||e[8]!==d||e[9]!==o?(f=s.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[d,i,o]}),e[7]=i,e[8]=d,e[9]=o,e[10]=f):f=e[10],f}const zs="https://docs.decocms.com/",Es="https://discord.gg/EQkX7CymV";function Ds(){const t=I.c(39),e=X(),{org:n}=Re(),[r,i]=$.useState(null),c=!!n.id;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=_=>{H("help_menu_dialog_opened",{kind:_}),i(_)},t[0]=l):l=t[0];const d=l;let o;t[1]!==e?(o=e("sidebar.help.button"),t[1]=e,t[2]=o):o=t[2];let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ft,{size:18}),t[3]=f):f=t[3];let b;t[4]!==o?(b=s.jsx(ge,{asChild:!0,children:s.jsx(ft,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":o,onClick:Ls,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring data-[state=open]:bg-sidebar-accent data-[state=open]:text-foreground",children:f})})}),t[4]=o,t[5]=b):b=t[5];let h;t[6]!==e?(h=e("sidebar.help.button"),t[6]=e,t[7]=h):h=t[7];let p;t[8]!==h?(p=s.jsx(be,{side:"right",children:h}),t[8]=h,t[9]=p):p=t[9];let m;t[10]!==b||t[11]!==p?(m=s.jsxs(xe,{children:[b,p]}),t[10]=b,t[11]=p,t[12]=m):m=t[12];let u;t[13]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(js,{}),t[13]=u):u=t[13];let v;t[14]!==e?(v=e("sidebar.help.guides"),t[14]=e,t[15]=v):v=t[15];let j;t[16]!==v?(j=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:zs,target:"_blank",rel:"noopener noreferrer",onClick:Ts,children:[u,v]})}),t[16]=v,t[17]=j):j=t[17];let C;t[18]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(_s,{}),t[18]=C):C=t[18];let w;t[19]!==e?(w=e("sidebar.help.discord"),t[19]=e,t[20]=w):w=t[20];let a;t[21]!==w?(a=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:Es,target:"_blank",rel:"noopener noreferrer",onClick:Ns,children:[C,w]})}),t[21]=w,t[22]=a):a=t[22];let x;t[23]!==c||t[24]!==e?(x=c&&s.jsxs(s.Fragment,{children:[s.jsx(dt,{}),s.jsxs(ke,{onSelect:()=>d("problem"),children:[s.jsx(ut,{}),e("sidebar.help.reportProblem")]}),s.jsxs(ke,{onSelect:()=>d("feedback"),children:[s.jsx(Kt,{}),e("sidebar.feedback.button")]})]}),t[23]=c,t[24]=e,t[25]=x):x=t[25];let g;t[26]!==a||t[27]!==x||t[28]!==j?(g=s.jsxs(mt,{side:"right",align:"end",className:"w-56",children:[j,a,x]}),t[26]=a,t[27]=x,t[28]=j,t[29]=g):g=t[29];let y;t[30]!==g||t[31]!==m?(y=s.jsx(ve,{active:!1,children:s.jsxs(ht,{children:[m,g]})}),t[30]=g,t[31]=m,t[32]=y):y=t[32];let S;t[33]!==c||t[34]!==r?(S=c&&s.jsxs(s.Fragment,{children:[s.jsx(He,{kind:"problem",open:r==="problem",onOpenChange:_=>i(_?"problem":null)}),s.jsx(He,{kind:"feedback",open:r==="feedback",onOpenChange:_=>i(_?"feedback":null)})]}),t[33]=c,t[34]=r,t[35]=S):S=t[35];let k;return t[36]!==y||t[37]!==S?(k=s.jsxs(s.Fragment,{children:[y,S]}),t[36]=y,t[37]=S,t[38]=k):k=t[38],k}function Ns(){return H("help_menu_discord_opened")}function Ts(){return H("help_menu_guides_opened")}function Ls(){return H("help_menu_opened")}function Ps(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const As=()=>Je(globalThis.innerHeight),Ms=()=>Je(0);function $s(t){const e=I.c(59),{org:n,active:r,onSelect:i,pinned:c,onOpenSettings:l,onTogglePin:d,onHide:o}=t,f=X();let b;e[0]!==n.slug?(b={id:n.slug},e[0]=n.slug,e[1]=b):b=e[1];const{setNodeRef:h,listeners:p,transform:m,transition:u,isDragging:v}=Mt(b);let j;e[2]!==m?(j=Tt.Transform.toString(m?{...m,x:0}:null),e[2]=m,e[3]=j):j=e[3];const C=v?1:void 0,w=`rail-org-${n.slug}`;let a;e[4]!==j||e[5]!==C||e[6]!==w||e[7]!==u?(a={transform:j,transition:u,zIndex:C,viewTransitionName:w},e[4]=j,e[5]=C,e[6]=w,e[7]=u,e[8]=a):a=e[8];const x=n.name,g=r||void 0,y=r?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",S=i&&"cursor-pointer";let k;e[9]!==y||e[10]!==S?(k=B("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",y,S),e[9]=y,e[10]=S,e[11]=k):k=e[11];let _;e[12]!==n?(_=s.jsx(Ve,{org:n,size:"lg"}),e[12]=n,e[13]=_):_=e[13];let T;e[14]!==c?(T=c&&s.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:s.jsx(Ue,{size:9})}),e[14]=c,e[15]=T):T=e[15];let z;e[16]!==i||e[17]!==n.name||e[18]!==k||e[19]!==_||e[20]!==T||e[21]!==g?(z=s.jsx(ge,{asChild:!0,children:s.jsx(Yt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":x,"aria-current":g,onClick:i,className:k,children:[_,T]})})}),e[16]=i,e[17]=n.name,e[18]=k,e[19]=_,e[20]=T,e[21]=g,e[22]=z):z=e[22];let O;e[23]!==n.name?(O=s.jsx(be,{side:"right",children:n.name}),e[23]=n.name,e[24]=O):O=e[24];let E;e[25]!==z||e[26]!==O?(E=s.jsxs(xe,{children:[z,O]}),e[25]=z,e[26]=O,e[27]=E):E=e[27];let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Xt,{}),e[28]=D):D=e[28];let R;e[29]!==f?(R=f("sidebar.rail.organizationSettings"),e[29]=f,e[30]=R):R=e[30];let A;e[31]!==l||e[32]!==R?(A=s.jsxs(Pe,{onSelect:l,children:[D,R]}),e[31]=l,e[32]=R,e[33]=A):A=e[33];let L;e[34]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Ue,{}),e[34]=L):L=e[34];let P;e[35]!==c||e[36]!==f?(P=f(c?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=c,e[36]=f,e[37]=P):P=e[37];let F;e[38]!==d||e[39]!==P?(F=s.jsxs(Pe,{onSelect:d,children:[L,P]}),e[38]=d,e[39]=P,e[40]=F):F=e[40];let U;e[41]!==o||e[42]!==f?(U=o&&s.jsxs(Pe,{onSelect:o,children:[s.jsx($t,{}),f("sidebar.rail.hideOrganization")]}),e[41]=o,e[42]=f,e[43]=U):U=e[43];let Y;e[44]!==A||e[45]!==F||e[46]!==U?(Y=s.jsxs(Gt,{children:[A,F,U]}),e[44]=A,e[45]=F,e[46]=U,e[47]=Y):Y=e[47];let K;e[48]!==E||e[49]!==Y?(K=s.jsxs(Zt,{children:[E,Y]}),e[48]=E,e[49]=Y,e[50]=K):K=e[50];let W;e[51]!==r||e[52]!==K?(W=s.jsx(ve,{active:r,children:K}),e[51]=r,e[52]=K,e[53]=W):W=e[53];let G;return e[54]!==p||e[55]!==h||e[56]!==W||e[57]!==a?(G=s.jsx("div",{ref:h,...p,style:a,className:"w-full shrink-0 touch-none",children:W}),e[54]=p,e[55]=h,e[56]=W,e[57]=a,e[58]=G):G=e[58],G}function Is(t){const e=I.c(64),{project:n,orgSlug:r,active:i,onClose:c,onNavigate:l}=t,d=X();let o,f,b,h,p,m,u,v,j,C,w;if(e[0]!==i||e[1]!==l||e[2]!==r||e[3]!==n.icon||e[4]!==n.id||e[5]!==n.title){const L=Ut(n.icon,n.title);w="group/rail relative flex w-full flex-col items-center gap-1",b=xe,f=ge,C=!0,o=Ye,h=jt.root,e[17]!==r||e[18]!==n.id?(p={org:r,agentId:n.id},e[17]=r,e[18]=n.id,e[19]=p):p=e[19],m=n.title,u=i||void 0,e[20]!==l?(v=()=>{H("org_rail_recent_project_opened"),l?.()},e[20]=l,e[21]=v):v=e[21],j=B("flex shrink-0 rounded-lg focus-ring",L.text,i&&"ring-[1.5px] ring-current"),e[0]=i,e[1]=l,e[2]=r,e[3]=n.icon,e[4]=n.id,e[5]=n.title,e[6]=o,e[7]=f,e[8]=b,e[9]=h,e[10]=p,e[11]=m,e[12]=u,e[13]=v,e[14]=j,e[15]=C,e[16]=w}else o=e[6],f=e[7],b=e[8],h=e[9],p=e[10],m=e[11],u=e[12],v=e[13],j=e[14],C=e[15],w=e[16];let a;e[22]!==n.icon||e[23]!==n.title?(a=s.jsx(Wt,{icon:n.icon,name:n.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=n.icon,e[23]=n.title,e[24]=a):a=e[24];let x;e[25]!==o||e[26]!==h||e[27]!==p||e[28]!==m||e[29]!==u||e[30]!==v||e[31]!==j||e[32]!==a?(x=s.jsx(o,{to:h,params:p,"aria-label":m,"aria-current":u,onClick:v,className:j,children:a}),e[25]=o,e[26]=h,e[27]=p,e[28]=m,e[29]=u,e[30]=v,e[31]=j,e[32]=a,e[33]=x):x=e[33];let g;e[34]!==f||e[35]!==x||e[36]!==C?(g=s.jsx(f,{asChild:C,children:x}),e[34]=f,e[35]=x,e[36]=C,e[37]=g):g=e[37];let y;e[38]!==n.title?(y=s.jsx(be,{side:"right",children:n.title}),e[38]=n.title,e[39]=y):y=e[39];let S;e[40]!==b||e[41]!==g||e[42]!==y?(S=s.jsxs(b,{children:[g,y]}),e[40]=b,e[41]=g,e[42]=y,e[43]=S):S=e[43];const k=i?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let _;e[44]!==k?(_=B("line-clamp-2 w-full text-center text-2xs break-words transition-colors",k),e[44]=k,e[45]=_):_=e[45];let T;e[46]!==n.title||e[47]!==_?(T=s.jsx("span",{"aria-hidden":!0,className:_,children:n.title}),e[46]=n.title,e[47]=_,e[48]=T):T=e[48];let z;e[49]!==n.title||e[50]!==d?(z=d("sidebar.rail.closeApp",{name:n.title}),e[49]=n.title,e[50]=d,e[51]=z):z=e[51];let O;e[52]!==c?(O=()=>{H("org_rail_recent_project_closed"),c()},e[52]=c,e[53]=O):O=e[53];let E,D;e[54]===Symbol.for("react.memo_cache_sentinel")?(E=B("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),D=s.jsx(qe,{size:10}),e[54]=E,e[55]=D):(E=e[54],D=e[55]);let R;e[56]!==z||e[57]!==O?(R=s.jsx("button",{type:"button","aria-label":z,onClick:O,className:E,children:D}),e[56]=z,e[57]=O,e[58]=R):R=e[58];let A;return e[59]!==S||e[60]!==T||e[61]!==R||e[62]!==w?(A=s.jsxs("div",{className:w,children:[S,T,R]}),e[59]=S,e[60]=T,e[61]=R,e[62]=w,e[63]=A):A=e[63],A}const Ks={"site-editor":"/site-editor"};function Fs(t){const e=I.c(26),{app:n}=t,r=X(),i=as[n],c=Ks[n];if(!i||!c)return null;let l;e[0]!==i.labelKey||e[1]!==r?(l=r(i.labelKey),e[0]=i.labelKey,e[1]=r,e[2]=l):l=e[2];let d;e[3]!==i.labelKey||e[4]!==r?(d=r(i.labelKey),e[3]=i.labelKey,e[4]=r,e[5]=d):d=e[5];let o;e[6]!==i.tone?(o=B("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",i.tone),e[6]=i.tone,e[7]=o):o=e[7];let f;e[8]!==i.Icon?(f=s.jsx(i.Icon,{size:18}),e[8]=i.Icon,e[9]=f):f=e[9];let b;e[10]!==d||e[11]!==o||e[12]!==f||e[13]!==c?(b=s.jsx(ge,{asChild:!0,children:s.jsx(Ye,{to:c,"aria-label":d,"aria-current":"page","data-testid":"org-rail-local-app",className:o,children:f})}),e[10]=d,e[11]=o,e[12]=f,e[13]=c,e[14]=b):b=e[14];let h;e[15]!==i.labelKey||e[16]!==r?(h=r(i.labelKey),e[15]=i.labelKey,e[16]=r,e[17]=h):h=e[17];let p;e[18]!==h?(p=s.jsx(be,{side:"right",children:h}),e[18]=h,e[19]=p):p=e[19];let m;e[20]!==b||e[21]!==p?(m=s.jsxs(xe,{children:[b,p]}),e[20]=b,e[21]=p,e[22]=m):m=e[22];let u;return e[23]!==l||e[24]!==m?(u=s.jsx(ve,{active:!0,label:l,children:m}),e[23]=l,e[24]=m,e[25]=u):u=e[25],u}function Us(){const{org:t}=Re();return cs(t.slug),null}function et(t){const e=I.c(77),{onNavigate:n}=t===void 0?{}:t,r=X(),i=pt(),{org:c}=Re(),l=gt();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={select:Xs},e[0]=d):d=e[0];const o=bt(d);let f;e[1]!==o||e[2]!==l?(f=o?l({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=o,e[2]=l,e[3]=f):f=e[3];const b=f,h=b?b.org:c.slug,{data:p}=xt(),[m,u]=$.useState(!1),[v,j]=$.useState(!1),C=Ie(),{recent:w,forget:a}=us(c.slug),{projects:x}=fs(),g=ms(),y=ds(),S=y&&y.projectId===null?y.app:null,k=S?[]:w.flatMap(N=>x.filter(M=>M.id===N)),_=Vt(p??[],c),{recent:T}=Jt(),z=Qt();let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O=Ge.railOrgPrefs(),e[4]=O):O=e[4];const[E,D]=$e(O,es),R=Oe(E),A=$.useSyncExternalStore(Ps,As,Ms),{shown:L}=ts(ss(_,R,c.slug),T,c.slug,A,R.pinned);let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={activationConstraint:{distance:8}},e[5]=P):P=e[5];const F=zt(Et(Lt,P)),U=N=>{const{active:M,over:Ke}=N;Ke&&(H("org_rail_reordered"),D(rt=>is(Oe(rt),L.map(Hs),String(M.id),String(Ke.id))))},Y=N=>{n?.(),i({to:"/$org/home",params:{org:N},viewTransition:!0})},K=N=>{H("org_rail_travel"),n?.(),z(N,L.map(Bs))},W=()=>{if(H("org_rail_search_opened"),!c.id){j(!0);return}n?.(),ls()},G=!C&&"border-r border-sidebar-border";let Z;e[6]!==G?(Z=B("flex w-[68px] shrink-0 flex-col bg-sidebar",G),e[6]=G,e[7]=Z):Z=e[7];const st="flex min-h-0 flex-1 flex-col items-center gap-2.5 overflow-y-auto px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";let q;e[8]!==r?(q=r("sidebar.rail.ariaLabel"),e[8]=r,e[9]=q):q=e[9];const ze=Dt,Ee=Nt,De=Pt,Ne=L.map(Ws),Te=At,Le=L.map(N=>s.jsxs($.Fragment,{children:[s.jsx($s,{org:N,active:N.slug===h,pinned:R.pinned.includes(N.slug),onSelect:N.slug!==c.slug?()=>K(N.slug):g?()=>Y(N.slug):void 0,onOpenSettings:()=>{n?.(),i({to:"/$org/settings",params:{org:N.slug},search:{thread:void 0}})},onTogglePin:()=>D(M=>ns(Oe(M),N.slug)),onHide:N.slug===c.slug?void 0:()=>D(M=>rs(Oe(M),N.slug))}),N.slug===c.slug&&k.length>0&&s.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:k.map(M=>s.jsx(Is,{project:M,orgSlug:c.slug,active:g===M.id,onClose:()=>a(M.id),onNavigate:n},M.id))})]},N.id));let V;e[10]!==De||e[11]!==Ne||e[12]!==Te||e[13]!==Le?(V=s.jsx(De,{items:Ne,strategy:Te,children:Le}),e[10]=De,e[11]=Ne,e[12]=Te,e[13]=Le,e[14]=V):V=e[14];let J;e[15]!==ze||e[16]!==U||e[17]!==F||e[18]!==Ee||e[19]!==V?(J=s.jsx(ze,{sensors:F,collisionDetection:Ee,onDragEnd:U,children:V}),e[15]=ze,e[16]=U,e[17]=F,e[18]=Ee,e[19]=V,e[20]=J):J=e[20];let Q;e[21]!==S?(Q=S&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),s.jsx(Fs,{app:S})]}),e[21]=S,e[22]=Q):Q=e[22];let ee;e[23]!==J||e[24]!==Q||e[25]!==q?(ee=s.jsxs("div",{className:st,"aria-label":q,children:[J,Q]}),e[23]=J,e[24]=Q,e[25]=q,e[26]=ee):ee=e[26];let te;e[27]!==r?(te=r("sidebar.rail.search"),e[27]=r,e[28]=te):te=e[28];let ye;e[29]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Ht,{size:18}),e[29]=ye):ye=e[29];let se;e[30]!==W||e[31]!==te?(se=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":te,"aria-keyshortcuts":"Meta+K Control+K",onClick:W,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:ye})}),e[30]=W,e[31]=te,e[32]=se):se=e[32];let re;e[33]!==r?(re=r("sidebar.rail.search"),e[33]=r,e[34]=re):re=e[34];let Se;e[35]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx("span",{className:"ml-2 text-muted-foreground",children:vt.commandPalette.keys.join("")}),e[35]=Se):Se=e[35];let ne;e[36]!==re?(ne=s.jsxs(be,{side:"right",children:[re,Se]}),e[36]=re,e[37]=ne):ne=e[37];let ie;e[38]!==se||e[39]!==ne?(ie=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[se,ne]})}),e[38]=se,e[39]=ne,e[40]=ie):ie=e[40];let le;e[41]!==r?(le=r("sidebar.picker.newOrganization"),e[41]=r,e[42]=le):le=e[42];let oe;e[43]!==u?(oe=()=>u(!0),e[43]=u,e[44]=oe):oe=e[44];let we;e[45]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Bt,{size:18}),e[45]=we):we=e[45];let ae;e[46]!==le||e[47]!==oe?(ae=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":le,onClick:oe,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:we})}),e[46]=le,e[47]=oe,e[48]=ae):ae=e[48];let ce;e[49]!==r?(ce=r("sidebar.picker.newOrganization"),e[49]=r,e[50]=ce):ce=e[50];let de;e[51]!==ce?(de=s.jsx(be,{side:"right",children:ce}),e[51]=ce,e[52]=de):de=e[52];let ue;e[53]!==ae||e[54]!==de?(ue=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[ae,de]})}),e[53]=ae,e[54]=de,e[55]=ue):ue=e[55];let Ce;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(Ds,{}),e[56]=Ce):Ce=e[56];let fe;e[57]!==ie||e[58]!==ue?(fe=s.jsxs("div",{className:"flex shrink-0 flex-col items-center gap-1 px-2.5 pt-2 pb-3",children:[ie,ue,Ce]}),e[57]=ie,e[58]=ue,e[59]=fe):fe=e[59];let me;e[60]!==ee||e[61]!==fe||e[62]!==Z?(me=s.jsxs("div",{className:Z,children:[ee,fe]}),e[60]=ee,e[61]=fe,e[62]=Z,e[63]=me):me=e[63];let he;e[64]!==c.slug||e[65]!==_||e[66]!==v||e[67]!==j||e[68]!==K?(he=s.jsx(Cs,{open:v,onOpenChange:j,orgs:_,currentSlug:c.slug,onSelect:K}),e[64]=c.slug,e[65]=_,e[66]=v,e[67]=j,e[68]=K,e[69]=he):he=e[69];let pe;e[70]!==m||e[71]!==u?(pe=s.jsx(os,{open:m,onOpenChange:u}),e[70]=m,e[71]=u,e[72]=pe):pe=e[72];let _e;return e[73]!==me||e[74]!==he||e[75]!==pe?(_e=s.jsxs(s.Fragment,{children:[me,he,pe]}),e[73]=me,e[74]=he,e[75]=pe,e[76]=_e):_e=e[76],_e}function Ws(t){return t.slug}function Bs(t){return t.slug}function Hs(t){return t.slug}function Xs(t){return t.isLoading}function Ys(t){const e=I.c(15),{width:n,minWidth:r,maxWidth:i,onPointerDown:c,onKeyDown:l,onDoubleClick:d}=t,o=X(),{isMobile:f}=Ze(),b=Ie();if(f||b)return null;let h;e[0]!==o?(h=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=h):h=e[1];let p;e[2]!==o?(p=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=p):p=e[3];let m,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={left:"var(--sidebar-width)"},u=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=m,e[5]=u):(m=e[4],u=e[5]);let v;return e[6]!==i||e[7]!==r||e[8]!==d||e[9]!==l||e[10]!==c||e[11]!==h||e[12]!==p||e[13]!==n?(v=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":h,"aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":i,title:p,tabIndex:0,onPointerDown:c,onKeyDown:l,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:m,children:u}),e[6]=i,e[7]=r,e[8]=d,e[9]=l,e[10]=c,e[11]=h,e[12]=p,e[13]=n,e[14]=v):v=e[14],v}const Me=400,Xe=16,Gs="sidebar.width.v2";function Zs(){const t=I.c(14),e=qs;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=u=>typeof u=="number"?e(u):192,t[0]=n):n=t[0];const[r,i]=$e(Gs,n),c=$.useRef(null);let l;t[1]!==i||t[2]!==r?(l=u=>{u.preventDefault();const v=u.clientX,j=e(r),C=c.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),w=C?Array.from(C.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of w)g.style.transition="none";const a=g=>{const y=e(j+(g.clientX-v));C?.style.setProperty("--sidebar-width",`${y}px`)},x=g=>{const y=e(j+(g.clientX-v));i(y);for(const S of w)S.style.transition="";window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",a),window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},t[1]=i,t[2]=r,t[3]=l):l=t[3];const d=l;let o;t[4]!==i?(o=()=>{i(192)},t[4]=i,t[5]=o):o=t[5];const f=o;let b;t[6]!==i||t[7]!==r?(b=u=>{if(u.key==="ArrowLeft")i(e(r-Xe));else if(u.key==="ArrowRight")i(e(r+Xe));else if(u.key==="Home")i(192);else if(u.key==="End")i(Me);else return;u.preventDefault()},t[6]=i,t[7]=r,t[8]=b):b=t[8];const h=b,p=e(r);let m;return t[9]!==h||t[10]!==d||t[11]!==f||t[12]!==p?(m={width:p,minWidth:192,maxWidth:Me,wrapperRef:c,onStartResize:d,onKeyDownResize:h,resetWidth:f},t[9]=h,t[10]=d,t[11]=f,t[12]=p,t[13]=m):m=t[13],m}function qs(t){return Math.max(192,Math.min(Me,t))}const tt=$.createContext(null);function Vs(){const t=$.use(tt);if(!t)throw new Error("Layout regions require a Layout");return t}function Js({children:t,notice:e,outsideOrg:n}){const r=Rt(),[i,c]=$e(Ge.sidebarOpen(),!0),l=Zs();return s.jsx(tt,{value:{isMobile:r,resize:l},children:s.jsx(St,{open:i,onOpenChange:c,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,s.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[!n&&s.jsx(Us,{}),!r&&(n?.rail??!0)&&s.jsx(et,{}),s.jsx(wt,{ref:l.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${l.width}px`,"--sidebar-width-icon":"0px"},children:s.jsx(ws,{children:t})})]})]})})})}function Qs(t){const e=I.c(36),{children:n,renderMobile:r}=t,i=X(),{isMobile:c,resize:l}=Vs(),{openMobile:d,setOpenMobile:o}=Ze(),f=Ie();let b;e[0]!==o?(b=()=>o(!1),e[0]=o,e[1]=b):b=e[1];const h=b;if(!c){let x;e[2]!==n||e[3]!==f?(x=s.jsx("div",{className:"contents",inert:f,children:n}),e[2]=n,e[3]=f,e[4]=x):x=e[4];let g;e[5]!==l.maxWidth||e[6]!==l.minWidth||e[7]!==l.onKeyDownResize||e[8]!==l.onStartResize||e[9]!==l.resetWidth||e[10]!==l.width?(g=s.jsx(Ys,{width:l.width,minWidth:l.minWidth,maxWidth:l.maxWidth,onPointerDown:l.onStartResize,onKeyDown:l.onKeyDownResize,onDoubleClick:l.resetWidth}),e[5]=l.maxWidth,e[6]=l.minWidth,e[7]=l.onKeyDownResize,e[8]=l.onStartResize,e[9]=l.resetWidth,e[10]=l.width,e[11]=g):g=e[11];let y;return e[12]!==x||e[13]!==g?(y=s.jsxs(s.Fragment,{children:[x,g]}),e[12]=x,e[13]=g,e[14]=y):y=e[14],y}let p;e[15]!==i?(p=i("layouts.shellControls.navigationTitle"),e[15]=i,e[16]=p):p=e[16];let m;e[17]!==p?(m=s.jsx(_t,{className:"sr-only",children:p}),e[17]=p,e[18]=m):m=e[18];let u;e[19]!==h?(u=s.jsx(et,{onNavigate:h}),e[19]=h,e[20]=u):u=e[20];let v;e[21]!==h||e[22]!==r?(v=r({onClose:h}),e[21]=h,e[22]=r,e[23]=v):v=e[23];let j;e[24]!==v?(j=s.jsx("div",{className:"min-w-0 flex-1",children:v}),e[24]=v,e[25]=j):j=e[25];let C;e[26]!==u||e[27]!==j?(C=s.jsxs("div",{className:"flex h-full min-h-0",children:[u,j]}),e[26]=u,e[27]=j,e[28]=C):C=e[28];let w;e[29]!==m||e[30]!==C?(w=s.jsxs(kt,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:er,children:[m,C]}),e[29]=m,e[30]=C,e[31]=w):w=e[31];let a;return e[32]!==d||e[33]!==o||e[34]!==w?(a=s.jsx(Ot,{open:d,onOpenChange:o,children:w}),e[32]=d,e[33]=o,e[34]=w,e[35]=a):a=e[35],a}function er(t){return t.preventDefault()}function tr(t){const e=I.c(3),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"transparent",containerType:"inline-size"},e[0]=r):r=e[0];let i;return e[1]!==n?(i=s.jsx(Ct,{className:"flex flex-col min-h-0",style:r,children:s.jsx(yt,{variant:"plain",className:"bg-sidebar",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:n})})}),e[1]=n,e[2]=i):i=e[2],i}const Rr=Object.assign(Js,{Sidebar:Qs,Content:tr});export{Rr as L};
1
+ import{c as I,b as X,r as $,m as B,j as s,a4 as Re,e as nt,t as je,D as it,v as lt,w as ot,x as at,y as ct,B as Fe,au as dt,Y as ke,a5 as ut,E as H,X as ft,Z as mt,_ as ht,d as pt,aB as gt,l as bt,H as xt,ar as $e,L as Ye,$ as jt,at as Ge,aC as vt,P as yt}from"./index-D0JbJFfP.js";import{u as Ie,c as Ze,g as St,h as wt,i as Ct}from"./use-sidebar-collapsed-BoDydqEu.js";import{S as _t,a as kt,b as Ot}from"./sheet-DQnddENA.js";import{u as Rt}from"./use-mobile-DXgcDHnH.js";import{u as zt,a as Et,D as Dt,c as Nt,C as Tt,P as Lt}from"./task-key-kJFx4e2o.js";import{S as Pt,v as At,u as Mt}from"./sortable.esm-D-Grx_BB.js";import{i as $t}from"./Tool01-C3qOO4-2.js";import{t as It,r as Kt,u as Ft,v as Ut,A as Wt,w as Ue}from"./agent-icon-Cz4yRQtC.js";import{s as Bt}from"./Plus-n5KTXyCz.js";import{i as Ht}from"./UserSquare-BzGvxH2o.js";import{a as Xt}from"./UserCheck01-CI1951yc.js";import{s as qe}from"./XClose-DGEX5GIv.js";import{T as ge,a as be,c as xe}from"./tooltip-bcUJYhL_.js";import{C as Pe,f as Yt,g as Gt,e as Zt}from"./context-menu-LfR7ib0U.js";import{a as qt,O as Ve,w as Vt,b as Jt,c as Qt,E as es,r as Oe,d as ts,e as ss,h as rs,t as ns,f as Je,m as is,o as ls}from"./use-org-notice-DuKnnmVo.js";import{C as os}from"./create-organization-dialog-Buynh2If.js";import{P as as}from"./project-apps-8wVrHF3C.js";import{u as cs,a as ds}from"./use-recent-apps-DeTsw193.js";import{a as us}from"./use-navigate-to-agent-Jn9AHv5I.js";import{a as fs,u as ms}from"./use-project-scope-DA6OZsHG.js";import{C as We,a as hs,b as ps,c as gs,d as bs}from"./command-B1uSCDOs.js";import{u as xs}from"./use-debounced-value-CKJPodTI.js";import{n as js}from"./BookOpen01-5XPZR6TG.js";import{F as vs,a as Ae,b as ys,c as Qe}from"./feedback-BqoIMOg7.js";import{T as Ss}from"./textarea-DKKpu4j7.js";import{a as ws}from"./thread-button-C2TH27Tw.js";function Cs(t){const e=I.c(48),{open:n,onOpenChange:r,orgs:i,currentSlug:c,onSelect:l}=t,d=X(),[o,f]=$.useState("");let b;e[0]!==o?(b=o.trim(),e[0]=o,e[1]=b):b=e[1];const h=b,p=xs(h,150),m=h.length>0,u=p===h,{hits:v,isSearching:j,isStale:C,isError:w}=qt(m?p:""),a=m?v:i;let x;e[2]!==r?(x=L=>{r(L),L||f("")},e[2]=r,e[3]=x):x=e[3];const g=x;let y;e[4]!==d?(y=d("sidebar.rail.searchOrganizations"),e[4]=d,e[5]=y):y=e[5];let S;e[6]!==d?(S=d("sidebar.rail.searchPlaceholder"),e[6]=d,e[7]=S):S=e[7];let k;e[8]!==d?(k=d("sidebar.rail.searchPlaceholder"),e[8]=d,e[9]=k):k=e[9];let _;e[10]!==o||e[11]!==k?(_=s.jsx(hs,{value:o,onValueChange:f,placeholder:k}),e[10]=o,e[11]=k,e[12]=_):_=e[12];const T=m&&(C||!u)&&"opacity-50";let z;e[13]!==T?(z=B(T),e[13]=T,e[14]=z):z=e[14];let O;e[15]!==w||e[16]!==m||e[17]!==d?(O=m&&w&&s.jsx(We,{children:d("sidebar.rail.searchFailed")}),e[15]=w,e[16]=m,e[17]=d,e[18]=O):O=e[18];let E;e[19]!==w||e[20]!==j||e[21]!==a.length||e[22]!==u||e[23]!==d?(E=!w&&u&&!j&&a.length===0&&s.jsx(We,{children:d("sidebar.rail.searchEmpty")}),e[19]=w,e[20]=j,e[21]=a.length,e[22]=u,e[23]=d,e[24]=E):E=e[24];let D;if(e[25]!==c||e[26]!==l||e[27]!==g||e[28]!==a||e[29]!==d){let L;e[31]!==c||e[32]!==l||e[33]!==g||e[34]!==d?(L=P=>s.jsxs(ps,{value:P.slug,onSelect:()=>{g(!1),P.slug!==c&&l(P.slug)},className:"gap-2.5",children:[s.jsx(Ve,{org:P,size:"sm"}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.name}),P.slug===c&&s.jsx("span",{className:"text-meta shrink-0",children:d("sidebar.rail.currentOrganization")})]},P.id),e[31]=c,e[32]=l,e[33]=g,e[34]=d,e[35]=L):L=e[35],D=a.map(L),e[25]=c,e[26]=l,e[27]=g,e[28]=a,e[29]=d,e[30]=D}else D=e[30];let R;e[36]!==E||e[37]!==D||e[38]!==z||e[39]!==O?(R=s.jsxs(gs,{className:z,children:[O,E,D]}),e[36]=E,e[37]=D,e[38]=z,e[39]=O,e[40]=R):R=e[40];let A;return e[41]!==n||e[42]!==g||e[43]!==R||e[44]!==y||e[45]!==S||e[46]!==_?(A=s.jsxs(bs,{open:n,onOpenChange:g,title:y,description:S,shouldFilter:!1,children:[_,R]}),e[41]=n,e[42]=g,e[43]=R,e[44]=y,e[45]=S,e[46]=_,e[47]=A):A=e[47],A}function _s(t){const e=I.c(4),{size:n,className:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("path",{d:"M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.028C.533 9.046-.32 13.58.099 18.058a.082.082 0 0 0 .031.056 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.042-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.099.246.198.373.292a.077.077 0 0 1-.007.128 12.3 12.3 0 0 1-1.873.891.077.077 0 0 0-.041.107c.36.698.772 1.363 1.225 1.993a.076.076 0 0 0 .084.029 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.055c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.029ZM8.02 15.331c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.956 2.418-2.157 2.418Zm7.975 0c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.946 2.418-2.157 2.418Z"}),e[0]=i):i=e[0];let c;return e[1]!==r||e[2]!==n?(c=s.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:r,children:i}),e[1]=r,e[2]=n,e[3]=c):c=e[3],c}const ks=250;function Os(){return typeof navigator<"u"&&!!navigator.mediaDevices?.getDisplayMedia}function Be(t,e,n){return new Promise(r=>t.toBlob(r,e,n))}async function Rs(){const t=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include"});try{const e=document.createElement("video");e.muted=!0,e.srcObject=t,await e.play(),await new Promise(c=>setTimeout(c,ks));const n=document.createElement("canvas");n.width=e.videoWidth,n.height=e.videoHeight,n.getContext("2d")?.drawImage(e,0,0),e.srcObject=null;let r=await Be(n,"image/png");if((!r||r.size>Qe)&&(r=await Be(n,"image/jpeg",.85)),!r)throw new Error("Could not encode the screenshot");const i=r.type==="image/png"?"png":"jpg";return new File([r],`screenshot.${i}`,{type:r.type})}finally{for(const e of t.getTracks())e.stop()}}function He({kind:t,open:e,onOpenChange:n}){const r=X(),i=t==="problem"?{title:r("sidebar.problem.title"),placeholder:r("sidebar.problem.placeholder"),sent:r("sidebar.problem.sent"),failed:r("sidebar.problem.failed")}:{title:r("sidebar.feedback.title"),placeholder:r("sidebar.feedback.placeholder"),sent:r("sidebar.feedback.sent"),failed:r("sidebar.feedback.failed")},{org:c}=Re(),[l,d]=$.useState(""),[o,f]=$.useState([]),[b,h]=$.useState(!1),p=()=>{for(const a of o)URL.revokeObjectURL(a.previewUrl);f([]),d("")},m=a=>{const x=a.filter(S=>ys.includes(S.type)?S.size>Qe?(je.error(r("sidebar.feedback.screenshotTooLarge")),!1):!0:!1),g=Ae-o.length;x.length>g&&je.error(r("sidebar.feedback.tooManyScreenshots",{max:String(Ae)}));const y=x.slice(0,Math.max(g,0)).map(S=>({file:S,previewUrl:URL.createObjectURL(S)}));y.length>0&&f(S=>[...S,...y])},u=a=>{URL.revokeObjectURL(a.previewUrl),f(x=>x.filter(g=>g!==a))},v=async()=>{h(!0);try{m([await Rs()])}catch(a){a instanceof DOMException&&a.name==="NotAllowedError"||(console.error("[feedback] screenshot failed",a),je.error(r("sidebar.feedback.screenshotFailed")))}finally{h(!1)}},j=a=>{const x=Array.from(a.clipboardData.files).filter(g=>g.type.startsWith("image/"));x.length!==0&&(a.preventDefault(),m(x))},C=nt({mutationFn:async()=>{const a=new FormData;a.set("kind",t),a.set("message",l.trim()),a.set("pageUrl",window.location.href);for(const g of o)a.append("screenshot",g.file);const x=await fetch(`/api/${encodeURIComponent(c.slug)}/feedback`,{method:"POST",body:a});if(!x.ok)throw new Error(`Feedback failed: ${x.status}`)},onSuccess:()=>{je.success(i.sent),p(),n(!1)},onError:()=>je.error(i.failed)}),w=l.trim().length>0&&!C.isPending;return s.jsx(it,{open:e&&!b,onOpenChange:n,children:s.jsxs(lt,{className:"sm:max-w-lg","aria-describedby":void 0,children:[s.jsx(ot,{children:s.jsx(at,{children:i.title})}),s.jsx(Ss,{autoFocus:!0,value:l,onChange:a=>d(a.target.value),onPaste:j,onKeyDown:a=>{a.key==="Enter"&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),w&&C.mutate())},placeholder:i.placeholder,className:"min-h-32 max-h-80",maxLength:vs}),o.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:o.map((a,x)=>s.jsxs("div",{className:"group relative size-20 overflow-hidden rounded-lg shadow-edge",children:[s.jsx("a",{href:a.previewUrl,target:"_blank",rel:"noreferrer",children:s.jsx("img",{src:a.previewUrl,alt:r("sidebar.feedback.screenshotAlt",{n:String(x+1)}),className:"size-full object-cover"})}),s.jsx("button",{type:"button",onClick:()=>u(a),"aria-label":r("sidebar.feedback.removeScreenshot"),className:"absolute top-1 right-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground opacity-0 shadow-edge transition-opacity group-hover:opacity-100 focus-visible:opacity-100",children:s.jsx(qe,{size:12})})]},a.previewUrl))}),s.jsxs(ct,{className:"sm:justify-between",children:[Os()?s.jsxs(Fe,{type:"button",variant:"outline",onClick:v,disabled:o.length>=Ae,children:[s.jsx(It,{size:14}),r("sidebar.feedback.takeScreenshot")]}):s.jsx("span",{}),s.jsx(Fe,{type:"button",onClick:()=>C.mutate(),disabled:!w,children:C.isPending?r("sidebar.feedback.sending"):r("sidebar.feedback.send")})]})]})})}function ve(t){const e=I.c(11),{active:n,label:r,children:i}=t,c=n?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let l;e[0]!==c?(l=B("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",c),e[0]=c,e[1]=l):l=e[1];let d;e[2]!==l?(d=s.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:s.jsx("span",{className:l})}),e[2]=l,e[3]=d):d=e[3];let o;e[4]!==n||e[5]!==r?(o=r&&s.jsx("span",{"aria-hidden":!0,className:B("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",n?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:r}),e[4]=n,e[5]=r,e[6]=o):o=e[6];let f;return e[7]!==i||e[8]!==d||e[9]!==o?(f=s.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[d,i,o]}),e[7]=i,e[8]=d,e[9]=o,e[10]=f):f=e[10],f}const zs="https://docs.decocms.com/",Es="https://discord.gg/EQkX7CymV";function Ds(){const t=I.c(39),e=X(),{org:n}=Re(),[r,i]=$.useState(null),c=!!n.id;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=_=>{H("help_menu_dialog_opened",{kind:_}),i(_)},t[0]=l):l=t[0];const d=l;let o;t[1]!==e?(o=e("sidebar.help.button"),t[1]=e,t[2]=o):o=t[2];let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ft,{size:18}),t[3]=f):f=t[3];let b;t[4]!==o?(b=s.jsx(ge,{asChild:!0,children:s.jsx(ft,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":o,onClick:Ls,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring data-[state=open]:bg-sidebar-accent data-[state=open]:text-foreground",children:f})})}),t[4]=o,t[5]=b):b=t[5];let h;t[6]!==e?(h=e("sidebar.help.button"),t[6]=e,t[7]=h):h=t[7];let p;t[8]!==h?(p=s.jsx(be,{side:"right",children:h}),t[8]=h,t[9]=p):p=t[9];let m;t[10]!==b||t[11]!==p?(m=s.jsxs(xe,{children:[b,p]}),t[10]=b,t[11]=p,t[12]=m):m=t[12];let u;t[13]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(js,{}),t[13]=u):u=t[13];let v;t[14]!==e?(v=e("sidebar.help.guides"),t[14]=e,t[15]=v):v=t[15];let j;t[16]!==v?(j=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:zs,target:"_blank",rel:"noopener noreferrer",onClick:Ts,children:[u,v]})}),t[16]=v,t[17]=j):j=t[17];let C;t[18]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(_s,{}),t[18]=C):C=t[18];let w;t[19]!==e?(w=e("sidebar.help.discord"),t[19]=e,t[20]=w):w=t[20];let a;t[21]!==w?(a=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:Es,target:"_blank",rel:"noopener noreferrer",onClick:Ns,children:[C,w]})}),t[21]=w,t[22]=a):a=t[22];let x;t[23]!==c||t[24]!==e?(x=c&&s.jsxs(s.Fragment,{children:[s.jsx(dt,{}),s.jsxs(ke,{onSelect:()=>d("problem"),children:[s.jsx(ut,{}),e("sidebar.help.reportProblem")]}),s.jsxs(ke,{onSelect:()=>d("feedback"),children:[s.jsx(Kt,{}),e("sidebar.feedback.button")]})]}),t[23]=c,t[24]=e,t[25]=x):x=t[25];let g;t[26]!==a||t[27]!==x||t[28]!==j?(g=s.jsxs(mt,{side:"right",align:"end",className:"w-56",children:[j,a,x]}),t[26]=a,t[27]=x,t[28]=j,t[29]=g):g=t[29];let y;t[30]!==g||t[31]!==m?(y=s.jsx(ve,{active:!1,children:s.jsxs(ht,{children:[m,g]})}),t[30]=g,t[31]=m,t[32]=y):y=t[32];let S;t[33]!==c||t[34]!==r?(S=c&&s.jsxs(s.Fragment,{children:[s.jsx(He,{kind:"problem",open:r==="problem",onOpenChange:_=>i(_?"problem":null)}),s.jsx(He,{kind:"feedback",open:r==="feedback",onOpenChange:_=>i(_?"feedback":null)})]}),t[33]=c,t[34]=r,t[35]=S):S=t[35];let k;return t[36]!==y||t[37]!==S?(k=s.jsxs(s.Fragment,{children:[y,S]}),t[36]=y,t[37]=S,t[38]=k):k=t[38],k}function Ns(){return H("help_menu_discord_opened")}function Ts(){return H("help_menu_guides_opened")}function Ls(){return H("help_menu_opened")}function Ps(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const As=()=>Je(globalThis.innerHeight),Ms=()=>Je(0);function $s(t){const e=I.c(59),{org:n,active:r,onSelect:i,pinned:c,onOpenSettings:l,onTogglePin:d,onHide:o}=t,f=X();let b;e[0]!==n.slug?(b={id:n.slug},e[0]=n.slug,e[1]=b):b=e[1];const{setNodeRef:h,listeners:p,transform:m,transition:u,isDragging:v}=Mt(b);let j;e[2]!==m?(j=Tt.Transform.toString(m?{...m,x:0}:null),e[2]=m,e[3]=j):j=e[3];const C=v?1:void 0,w=`rail-org-${n.slug}`;let a;e[4]!==j||e[5]!==C||e[6]!==w||e[7]!==u?(a={transform:j,transition:u,zIndex:C,viewTransitionName:w},e[4]=j,e[5]=C,e[6]=w,e[7]=u,e[8]=a):a=e[8];const x=n.name,g=r||void 0,y=r?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",S=i&&"cursor-pointer";let k;e[9]!==y||e[10]!==S?(k=B("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",y,S),e[9]=y,e[10]=S,e[11]=k):k=e[11];let _;e[12]!==n?(_=s.jsx(Ve,{org:n,size:"lg"}),e[12]=n,e[13]=_):_=e[13];let T;e[14]!==c?(T=c&&s.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:s.jsx(Ue,{size:9})}),e[14]=c,e[15]=T):T=e[15];let z;e[16]!==i||e[17]!==n.name||e[18]!==k||e[19]!==_||e[20]!==T||e[21]!==g?(z=s.jsx(ge,{asChild:!0,children:s.jsx(Yt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":x,"aria-current":g,onClick:i,className:k,children:[_,T]})})}),e[16]=i,e[17]=n.name,e[18]=k,e[19]=_,e[20]=T,e[21]=g,e[22]=z):z=e[22];let O;e[23]!==n.name?(O=s.jsx(be,{side:"right",children:n.name}),e[23]=n.name,e[24]=O):O=e[24];let E;e[25]!==z||e[26]!==O?(E=s.jsxs(xe,{children:[z,O]}),e[25]=z,e[26]=O,e[27]=E):E=e[27];let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Xt,{}),e[28]=D):D=e[28];let R;e[29]!==f?(R=f("sidebar.rail.organizationSettings"),e[29]=f,e[30]=R):R=e[30];let A;e[31]!==l||e[32]!==R?(A=s.jsxs(Pe,{onSelect:l,children:[D,R]}),e[31]=l,e[32]=R,e[33]=A):A=e[33];let L;e[34]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Ue,{}),e[34]=L):L=e[34];let P;e[35]!==c||e[36]!==f?(P=f(c?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=c,e[36]=f,e[37]=P):P=e[37];let F;e[38]!==d||e[39]!==P?(F=s.jsxs(Pe,{onSelect:d,children:[L,P]}),e[38]=d,e[39]=P,e[40]=F):F=e[40];let U;e[41]!==o||e[42]!==f?(U=o&&s.jsxs(Pe,{onSelect:o,children:[s.jsx($t,{}),f("sidebar.rail.hideOrganization")]}),e[41]=o,e[42]=f,e[43]=U):U=e[43];let Y;e[44]!==A||e[45]!==F||e[46]!==U?(Y=s.jsxs(Gt,{children:[A,F,U]}),e[44]=A,e[45]=F,e[46]=U,e[47]=Y):Y=e[47];let K;e[48]!==E||e[49]!==Y?(K=s.jsxs(Zt,{children:[E,Y]}),e[48]=E,e[49]=Y,e[50]=K):K=e[50];let W;e[51]!==r||e[52]!==K?(W=s.jsx(ve,{active:r,children:K}),e[51]=r,e[52]=K,e[53]=W):W=e[53];let G;return e[54]!==p||e[55]!==h||e[56]!==W||e[57]!==a?(G=s.jsx("div",{ref:h,...p,style:a,className:"w-full shrink-0 touch-none",children:W}),e[54]=p,e[55]=h,e[56]=W,e[57]=a,e[58]=G):G=e[58],G}function Is(t){const e=I.c(64),{project:n,orgSlug:r,active:i,onClose:c,onNavigate:l}=t,d=X();let o,f,b,h,p,m,u,v,j,C,w;if(e[0]!==i||e[1]!==l||e[2]!==r||e[3]!==n.icon||e[4]!==n.id||e[5]!==n.title){const L=Ut(n.icon,n.title);w="group/rail relative flex w-full flex-col items-center gap-1",b=xe,f=ge,C=!0,o=Ye,h=jt.root,e[17]!==r||e[18]!==n.id?(p={org:r,agentId:n.id},e[17]=r,e[18]=n.id,e[19]=p):p=e[19],m=n.title,u=i||void 0,e[20]!==l?(v=()=>{H("org_rail_recent_project_opened"),l?.()},e[20]=l,e[21]=v):v=e[21],j=B("flex shrink-0 rounded-lg focus-ring",L.text,i&&"ring-[1.5px] ring-current"),e[0]=i,e[1]=l,e[2]=r,e[3]=n.icon,e[4]=n.id,e[5]=n.title,e[6]=o,e[7]=f,e[8]=b,e[9]=h,e[10]=p,e[11]=m,e[12]=u,e[13]=v,e[14]=j,e[15]=C,e[16]=w}else o=e[6],f=e[7],b=e[8],h=e[9],p=e[10],m=e[11],u=e[12],v=e[13],j=e[14],C=e[15],w=e[16];let a;e[22]!==n.icon||e[23]!==n.title?(a=s.jsx(Wt,{icon:n.icon,name:n.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=n.icon,e[23]=n.title,e[24]=a):a=e[24];let x;e[25]!==o||e[26]!==h||e[27]!==p||e[28]!==m||e[29]!==u||e[30]!==v||e[31]!==j||e[32]!==a?(x=s.jsx(o,{to:h,params:p,"aria-label":m,"aria-current":u,onClick:v,className:j,children:a}),e[25]=o,e[26]=h,e[27]=p,e[28]=m,e[29]=u,e[30]=v,e[31]=j,e[32]=a,e[33]=x):x=e[33];let g;e[34]!==f||e[35]!==x||e[36]!==C?(g=s.jsx(f,{asChild:C,children:x}),e[34]=f,e[35]=x,e[36]=C,e[37]=g):g=e[37];let y;e[38]!==n.title?(y=s.jsx(be,{side:"right",children:n.title}),e[38]=n.title,e[39]=y):y=e[39];let S;e[40]!==b||e[41]!==g||e[42]!==y?(S=s.jsxs(b,{children:[g,y]}),e[40]=b,e[41]=g,e[42]=y,e[43]=S):S=e[43];const k=i?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let _;e[44]!==k?(_=B("line-clamp-2 w-full text-center text-2xs break-words transition-colors",k),e[44]=k,e[45]=_):_=e[45];let T;e[46]!==n.title||e[47]!==_?(T=s.jsx("span",{"aria-hidden":!0,className:_,children:n.title}),e[46]=n.title,e[47]=_,e[48]=T):T=e[48];let z;e[49]!==n.title||e[50]!==d?(z=d("sidebar.rail.closeApp",{name:n.title}),e[49]=n.title,e[50]=d,e[51]=z):z=e[51];let O;e[52]!==c?(O=()=>{H("org_rail_recent_project_closed"),c()},e[52]=c,e[53]=O):O=e[53];let E,D;e[54]===Symbol.for("react.memo_cache_sentinel")?(E=B("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),D=s.jsx(qe,{size:10}),e[54]=E,e[55]=D):(E=e[54],D=e[55]);let R;e[56]!==z||e[57]!==O?(R=s.jsx("button",{type:"button","aria-label":z,onClick:O,className:E,children:D}),e[56]=z,e[57]=O,e[58]=R):R=e[58];let A;return e[59]!==S||e[60]!==T||e[61]!==R||e[62]!==w?(A=s.jsxs("div",{className:w,children:[S,T,R]}),e[59]=S,e[60]=T,e[61]=R,e[62]=w,e[63]=A):A=e[63],A}const Ks={"site-editor":"/site-editor"};function Fs(t){const e=I.c(26),{app:n}=t,r=X(),i=as[n],c=Ks[n];if(!i||!c)return null;let l;e[0]!==i.labelKey||e[1]!==r?(l=r(i.labelKey),e[0]=i.labelKey,e[1]=r,e[2]=l):l=e[2];let d;e[3]!==i.labelKey||e[4]!==r?(d=r(i.labelKey),e[3]=i.labelKey,e[4]=r,e[5]=d):d=e[5];let o;e[6]!==i.tone?(o=B("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",i.tone),e[6]=i.tone,e[7]=o):o=e[7];let f;e[8]!==i.Icon?(f=s.jsx(i.Icon,{size:18}),e[8]=i.Icon,e[9]=f):f=e[9];let b;e[10]!==d||e[11]!==o||e[12]!==f||e[13]!==c?(b=s.jsx(ge,{asChild:!0,children:s.jsx(Ye,{to:c,"aria-label":d,"aria-current":"page","data-testid":"org-rail-local-app",className:o,children:f})}),e[10]=d,e[11]=o,e[12]=f,e[13]=c,e[14]=b):b=e[14];let h;e[15]!==i.labelKey||e[16]!==r?(h=r(i.labelKey),e[15]=i.labelKey,e[16]=r,e[17]=h):h=e[17];let p;e[18]!==h?(p=s.jsx(be,{side:"right",children:h}),e[18]=h,e[19]=p):p=e[19];let m;e[20]!==b||e[21]!==p?(m=s.jsxs(xe,{children:[b,p]}),e[20]=b,e[21]=p,e[22]=m):m=e[22];let u;return e[23]!==l||e[24]!==m?(u=s.jsx(ve,{active:!0,label:l,children:m}),e[23]=l,e[24]=m,e[25]=u):u=e[25],u}function Us(){const{org:t}=Re();return cs(t.slug),null}function et(t){const e=I.c(77),{onNavigate:n}=t===void 0?{}:t,r=X(),i=pt(),{org:c}=Re(),l=gt();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={select:Xs},e[0]=d):d=e[0];const o=bt(d);let f;e[1]!==o||e[2]!==l?(f=o?l({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=o,e[2]=l,e[3]=f):f=e[3];const b=f,h=b?b.org:c.slug,{data:p}=xt(),[m,u]=$.useState(!1),[v,j]=$.useState(!1),C=Ie(),{recent:w,forget:a}=us(c.slug),{projects:x}=fs(),g=ms(),y=ds(),S=y&&y.projectId===null?y.app:null,k=S?[]:w.flatMap(N=>x.filter(M=>M.id===N)),_=Vt(p??[],c),{recent:T}=Jt(),z=Qt();let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O=Ge.railOrgPrefs(),e[4]=O):O=e[4];const[E,D]=$e(O,es),R=Oe(E),A=$.useSyncExternalStore(Ps,As,Ms),{shown:L}=ts(ss(_,R,c.slug),T,c.slug,A,R.pinned);let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={activationConstraint:{distance:8}},e[5]=P):P=e[5];const F=zt(Et(Lt,P)),U=N=>{const{active:M,over:Ke}=N;Ke&&(H("org_rail_reordered"),D(rt=>is(Oe(rt),L.map(Hs),String(M.id),String(Ke.id))))},Y=N=>{n?.(),i({to:"/$org/home",params:{org:N},viewTransition:!0})},K=N=>{H("org_rail_travel"),n?.(),z(N,L.map(Bs))},W=()=>{if(H("org_rail_search_opened"),!c.id){j(!0);return}n?.(),ls()},G=!C&&"border-r border-sidebar-border";let Z;e[6]!==G?(Z=B("flex w-[68px] shrink-0 flex-col bg-sidebar",G),e[6]=G,e[7]=Z):Z=e[7];const st="flex min-h-0 flex-1 flex-col items-center gap-2.5 overflow-y-auto px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";let q;e[8]!==r?(q=r("sidebar.rail.ariaLabel"),e[8]=r,e[9]=q):q=e[9];const ze=Dt,Ee=Nt,De=Pt,Ne=L.map(Ws),Te=At,Le=L.map(N=>s.jsxs($.Fragment,{children:[s.jsx($s,{org:N,active:N.slug===h,pinned:R.pinned.includes(N.slug),onSelect:N.slug!==c.slug?()=>K(N.slug):g?()=>Y(N.slug):void 0,onOpenSettings:()=>{n?.(),i({to:"/$org/settings",params:{org:N.slug},search:{thread:void 0}})},onTogglePin:()=>D(M=>ns(Oe(M),N.slug)),onHide:N.slug===c.slug?void 0:()=>D(M=>rs(Oe(M),N.slug))}),N.slug===c.slug&&k.length>0&&s.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:k.map(M=>s.jsx(Is,{project:M,orgSlug:c.slug,active:g===M.id,onClose:()=>a(M.id),onNavigate:n},M.id))})]},N.id));let V;e[10]!==De||e[11]!==Ne||e[12]!==Te||e[13]!==Le?(V=s.jsx(De,{items:Ne,strategy:Te,children:Le}),e[10]=De,e[11]=Ne,e[12]=Te,e[13]=Le,e[14]=V):V=e[14];let J;e[15]!==ze||e[16]!==U||e[17]!==F||e[18]!==Ee||e[19]!==V?(J=s.jsx(ze,{sensors:F,collisionDetection:Ee,onDragEnd:U,children:V}),e[15]=ze,e[16]=U,e[17]=F,e[18]=Ee,e[19]=V,e[20]=J):J=e[20];let Q;e[21]!==S?(Q=S&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),s.jsx(Fs,{app:S})]}),e[21]=S,e[22]=Q):Q=e[22];let ee;e[23]!==J||e[24]!==Q||e[25]!==q?(ee=s.jsxs("div",{className:st,"aria-label":q,children:[J,Q]}),e[23]=J,e[24]=Q,e[25]=q,e[26]=ee):ee=e[26];let te;e[27]!==r?(te=r("sidebar.rail.search"),e[27]=r,e[28]=te):te=e[28];let ye;e[29]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Ht,{size:18}),e[29]=ye):ye=e[29];let se;e[30]!==W||e[31]!==te?(se=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":te,"aria-keyshortcuts":"Meta+K Control+K",onClick:W,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:ye})}),e[30]=W,e[31]=te,e[32]=se):se=e[32];let re;e[33]!==r?(re=r("sidebar.rail.search"),e[33]=r,e[34]=re):re=e[34];let Se;e[35]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx("span",{className:"ml-2 text-muted-foreground",children:vt.commandPalette.keys.join("")}),e[35]=Se):Se=e[35];let ne;e[36]!==re?(ne=s.jsxs(be,{side:"right",children:[re,Se]}),e[36]=re,e[37]=ne):ne=e[37];let ie;e[38]!==se||e[39]!==ne?(ie=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[se,ne]})}),e[38]=se,e[39]=ne,e[40]=ie):ie=e[40];let le;e[41]!==r?(le=r("sidebar.picker.newOrganization"),e[41]=r,e[42]=le):le=e[42];let oe;e[43]!==u?(oe=()=>u(!0),e[43]=u,e[44]=oe):oe=e[44];let we;e[45]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Bt,{size:18}),e[45]=we):we=e[45];let ae;e[46]!==le||e[47]!==oe?(ae=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":le,onClick:oe,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:we})}),e[46]=le,e[47]=oe,e[48]=ae):ae=e[48];let ce;e[49]!==r?(ce=r("sidebar.picker.newOrganization"),e[49]=r,e[50]=ce):ce=e[50];let de;e[51]!==ce?(de=s.jsx(be,{side:"right",children:ce}),e[51]=ce,e[52]=de):de=e[52];let ue;e[53]!==ae||e[54]!==de?(ue=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[ae,de]})}),e[53]=ae,e[54]=de,e[55]=ue):ue=e[55];let Ce;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(Ds,{}),e[56]=Ce):Ce=e[56];let fe;e[57]!==ie||e[58]!==ue?(fe=s.jsxs("div",{className:"flex shrink-0 flex-col items-center gap-1 px-2.5 pt-2 pb-3",children:[ie,ue,Ce]}),e[57]=ie,e[58]=ue,e[59]=fe):fe=e[59];let me;e[60]!==ee||e[61]!==fe||e[62]!==Z?(me=s.jsxs("div",{className:Z,children:[ee,fe]}),e[60]=ee,e[61]=fe,e[62]=Z,e[63]=me):me=e[63];let he;e[64]!==c.slug||e[65]!==_||e[66]!==v||e[67]!==j||e[68]!==K?(he=s.jsx(Cs,{open:v,onOpenChange:j,orgs:_,currentSlug:c.slug,onSelect:K}),e[64]=c.slug,e[65]=_,e[66]=v,e[67]=j,e[68]=K,e[69]=he):he=e[69];let pe;e[70]!==m||e[71]!==u?(pe=s.jsx(os,{open:m,onOpenChange:u}),e[70]=m,e[71]=u,e[72]=pe):pe=e[72];let _e;return e[73]!==me||e[74]!==he||e[75]!==pe?(_e=s.jsxs(s.Fragment,{children:[me,he,pe]}),e[73]=me,e[74]=he,e[75]=pe,e[76]=_e):_e=e[76],_e}function Ws(t){return t.slug}function Bs(t){return t.slug}function Hs(t){return t.slug}function Xs(t){return t.isLoading}function Ys(t){const e=I.c(15),{width:n,minWidth:r,maxWidth:i,onPointerDown:c,onKeyDown:l,onDoubleClick:d}=t,o=X(),{isMobile:f}=Ze(),b=Ie();if(f||b)return null;let h;e[0]!==o?(h=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=h):h=e[1];let p;e[2]!==o?(p=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=p):p=e[3];let m,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={left:"var(--sidebar-width)"},u=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=m,e[5]=u):(m=e[4],u=e[5]);let v;return e[6]!==i||e[7]!==r||e[8]!==d||e[9]!==l||e[10]!==c||e[11]!==h||e[12]!==p||e[13]!==n?(v=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":h,"aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":i,title:p,tabIndex:0,onPointerDown:c,onKeyDown:l,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:m,children:u}),e[6]=i,e[7]=r,e[8]=d,e[9]=l,e[10]=c,e[11]=h,e[12]=p,e[13]=n,e[14]=v):v=e[14],v}const Me=400,Xe=16,Gs="sidebar.width.v2";function Zs(){const t=I.c(14),e=qs;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=u=>typeof u=="number"?e(u):192,t[0]=n):n=t[0];const[r,i]=$e(Gs,n),c=$.useRef(null);let l;t[1]!==i||t[2]!==r?(l=u=>{u.preventDefault();const v=u.clientX,j=e(r),C=c.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),w=C?Array.from(C.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of w)g.style.transition="none";const a=g=>{const y=e(j+(g.clientX-v));C?.style.setProperty("--sidebar-width",`${y}px`)},x=g=>{const y=e(j+(g.clientX-v));i(y);for(const S of w)S.style.transition="";window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",a),window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},t[1]=i,t[2]=r,t[3]=l):l=t[3];const d=l;let o;t[4]!==i?(o=()=>{i(192)},t[4]=i,t[5]=o):o=t[5];const f=o;let b;t[6]!==i||t[7]!==r?(b=u=>{if(u.key==="ArrowLeft")i(e(r-Xe));else if(u.key==="ArrowRight")i(e(r+Xe));else if(u.key==="Home")i(192);else if(u.key==="End")i(Me);else return;u.preventDefault()},t[6]=i,t[7]=r,t[8]=b):b=t[8];const h=b,p=e(r);let m;return t[9]!==h||t[10]!==d||t[11]!==f||t[12]!==p?(m={width:p,minWidth:192,maxWidth:Me,wrapperRef:c,onStartResize:d,onKeyDownResize:h,resetWidth:f},t[9]=h,t[10]=d,t[11]=f,t[12]=p,t[13]=m):m=t[13],m}function qs(t){return Math.max(192,Math.min(Me,t))}const tt=$.createContext(null);function Vs(){const t=$.use(tt);if(!t)throw new Error("Layout regions require a Layout");return t}function Js({children:t,notice:e,outsideOrg:n}){const r=Rt(),[i,c]=$e(Ge.sidebarOpen(),!0),l=Zs();return s.jsx(tt,{value:{isMobile:r,resize:l},children:s.jsx(St,{open:i,onOpenChange:c,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,s.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[!n&&s.jsx(Us,{}),!r&&(n?.rail??!0)&&s.jsx(et,{}),s.jsx(wt,{ref:l.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${l.width}px`,"--sidebar-width-icon":"0px"},children:s.jsx(ws,{children:t})})]})]})})})}function Qs(t){const e=I.c(36),{children:n,renderMobile:r}=t,i=X(),{isMobile:c,resize:l}=Vs(),{openMobile:d,setOpenMobile:o}=Ze(),f=Ie();let b;e[0]!==o?(b=()=>o(!1),e[0]=o,e[1]=b):b=e[1];const h=b;if(!c){let x;e[2]!==n||e[3]!==f?(x=s.jsx("div",{className:"contents",inert:f,children:n}),e[2]=n,e[3]=f,e[4]=x):x=e[4];let g;e[5]!==l.maxWidth||e[6]!==l.minWidth||e[7]!==l.onKeyDownResize||e[8]!==l.onStartResize||e[9]!==l.resetWidth||e[10]!==l.width?(g=s.jsx(Ys,{width:l.width,minWidth:l.minWidth,maxWidth:l.maxWidth,onPointerDown:l.onStartResize,onKeyDown:l.onKeyDownResize,onDoubleClick:l.resetWidth}),e[5]=l.maxWidth,e[6]=l.minWidth,e[7]=l.onKeyDownResize,e[8]=l.onStartResize,e[9]=l.resetWidth,e[10]=l.width,e[11]=g):g=e[11];let y;return e[12]!==x||e[13]!==g?(y=s.jsxs(s.Fragment,{children:[x,g]}),e[12]=x,e[13]=g,e[14]=y):y=e[14],y}let p;e[15]!==i?(p=i("layouts.shellControls.navigationTitle"),e[15]=i,e[16]=p):p=e[16];let m;e[17]!==p?(m=s.jsx(_t,{className:"sr-only",children:p}),e[17]=p,e[18]=m):m=e[18];let u;e[19]!==h?(u=s.jsx(et,{onNavigate:h}),e[19]=h,e[20]=u):u=e[20];let v;e[21]!==h||e[22]!==r?(v=r({onClose:h}),e[21]=h,e[22]=r,e[23]=v):v=e[23];let j;e[24]!==v?(j=s.jsx("div",{className:"min-w-0 flex-1",children:v}),e[24]=v,e[25]=j):j=e[25];let C;e[26]!==u||e[27]!==j?(C=s.jsxs("div",{className:"flex h-full min-h-0",children:[u,j]}),e[26]=u,e[27]=j,e[28]=C):C=e[28];let w;e[29]!==m||e[30]!==C?(w=s.jsxs(kt,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:er,children:[m,C]}),e[29]=m,e[30]=C,e[31]=w):w=e[31];let a;return e[32]!==d||e[33]!==o||e[34]!==w?(a=s.jsx(Ot,{open:d,onOpenChange:o,children:w}),e[32]=d,e[33]=o,e[34]=w,e[35]=a):a=e[35],a}function er(t){return t.preventDefault()}function tr(t){const e=I.c(3),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"transparent",containerType:"inline-size"},e[0]=r):r=e[0];let i;return e[1]!==n?(i=s.jsx(Ct,{className:"flex flex-col min-h-0",style:r,children:s.jsx(yt,{variant:"plain",className:"bg-sidebar",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:n})})}),e[1]=n,e[2]=i):i=e[2],i}const Rr=Object.assign(Js,{Sidebar:Qs,Content:tr});export{Rr as L};
@@ -1,4 +1,4 @@
1
- import{N as P,q as De,c as k,R as Ie,r as Pe,t as se,v as E,w as Oe,T as H,x as je,y as M,z as L,A as ve,D as Q,B as Z,C as Fe,G as _e,H as Ve,I as Ke,J as q,f as Xe}from"./usage-stats-DTw2_3QF.js";const qe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Ue=P.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",k(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,o,l,r,s;const c=(t=(n=e.attrs)===null||n===void 0?void 0:n.src)!==null&&t!==void 0?t:"",i=(o=(l=e.attrs)===null||l===void 0?void 0:l.alt)!==null&&o!==void 0?o:"",a=(r=(s=e.attrs)===null||s===void 0?void 0:s.title)!==null&&r!==void 0?r:"";return a?`![${i}](${c} "${a}")`:`![${i}](${c})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:o}=this.options.resize,l=new Set(["src","width","height"]);return({node:r,getPos:s,HTMLAttributes:c,editor:i})=>{const a=document.createElement("img");a.draggable=!1;const d=k(this.options.HTMLAttributes,c);Object.entries(d).forEach(([w,S])=>{if(S!=null)switch(w){case"src":case"width":case"height":break;default:a.setAttribute(w,S)}}),d.src!==null&&(a.src=d.src);let u={...c};const f=w=>{if(typeof w=="string"&&w!==""){a.getAttribute("src")!==w&&(a.src=w);return}a.hasAttribute("src")&&a.removeAttribute("src"),a.src!==""&&(a.src="")};f(c.src);const p=w=>{if(w.type!==r.type)return!1;const S=i.extensionManager.attributes.filter(A=>A.type===w.type.name),y=Pe(w,S);return Object.keys(u).forEach(A=>{!l.has(A)&&!(A in y)&&a.removeAttribute(A)}),Object.entries(y).forEach(([A,R])=>{l.has(A)||(R!=null?a.setAttribute(A,R):a.removeAttribute(A))}),f(y.src),u=y,!0},h=new Ie({element:a,editor:i,node:r,getPos:s,onResize:(w,S)=>{a.style.width=`${w}px`,a.style.height=`${S}px`},onCommit:(w,S)=>{const y=s();y!==void 0&&this.editor.chain().setNodeSelection(y).updateAttributes(this.name,{width:w,height:S}).run()},onUpdate:p,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:o===!0}}),g=h.dom,m=()=>{g.style.visibility="",g.style.pointerEvents=""};return g.style.visibility="hidden",g.style.pointerEvents="none",a.complete&&a.naturalWidth>0?m():(a.onload=m,a.onerror=m),h}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[De({find:qe,type:this.type,getAttributes:e=>{const[,,t,n,o]=e;return{src:n,alt:t,title:o}}})]}});var un=Ue;let ee,te;if(typeof WeakMap<"u"){let e=new WeakMap;ee=t=>e.get(t),te=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;ee=o=>{for(let l=0;l<e.length;l+=2)if(e[l]==o)return e[l+1]},te=(o,l)=>(n==10&&(n=0),e[n++]=o,e[n++]=l)}var C=class{constructor(e,t,n,o){this.width=e,this.height=t,this.map=n,this.problems=o}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const o=t%this.width,l=t/this.width|0;let r=o+1,s=l+1;for(let c=1;r<this.width&&this.map[t+c]==n;c++)r++;for(let c=1;s<this.height&&this.map[t+this.width*c]==n;c++)s++;return{left:o,top:l,right:r,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:o,right:l,top:r,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?o==0:l==this.width)?null:this.map[r*this.width+(n<0?o-1:l)]:(n<0?r==0:s==this.height)?null:this.map[o+this.width*(n<0?r-1:s)]}rectBetween(e,t){const{left:n,right:o,top:l,bottom:r}=this.findCell(e),{left:s,right:c,top:i,bottom:a}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(l,i),right:Math.max(o,c),bottom:Math.max(r,a)}}cellsInRect(e){const t=[],n={};for(let o=e.top;o<e.bottom;o++)for(let l=e.left;l<e.right;l++){const r=o*this.width+l,s=this.map[r];n[s]||(n[s]=!0,!(l==e.left&&l&&this.map[r-1]==s||o==e.top&&o&&this.map[r-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let o=0,l=0;;o++){const r=l+n.child(o).nodeSize;if(o==e){let s=t+e*this.width;const c=(e+1)*this.width;for(;s<c&&this.map[s]<l;)s++;return s==c?r-1:this.map[s]}l=r}}static get(e){return ee(e)||te(e,Je(e))}};function Je(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=Ge(e),n=e.childCount,o=[];let l=0,r=null;const s=[];for(let a=0,d=t*n;a<d;a++)o[a]=0;for(let a=0,d=0;a<n;a++){const u=e.child(a);d++;for(let h=0;;h++){for(;l<o.length&&o[l]!=0;)l++;if(h==u.childCount)break;const g=u.child(h),{colspan:m,rowspan:w,colwidth:S}=g.attrs;for(let y=0;y<w;y++){if(y+a>=n){(r||(r=[])).push({type:"overlong_rowspan",pos:d,n:w-y});break}const A=l+y*t;for(let R=0;R<m;R++){o[A+R]==0?o[A+R]=d:(r||(r=[])).push({type:"collision",row:a,pos:d,n:m-R});const O=S&&S[R];if(O){const D=(A+R)%t*2,G=s[D];G==null||G!=O&&s[D+1]==1?(s[D]=O,s[D+1]=1):G==O&&s[D+1]++}}}l+=m,d+=g.nodeSize}const f=(a+1)*t;let p=0;for(;l<f;)o[l++]==0&&p++;p&&(r||(r=[])).push({type:"missing",row:a,n:p}),d++}(t===0||n===0)&&(r||(r=[])).push({type:"zero_sized"});const c=new C(t,n,o,r);let i=!1;for(let a=0;!i&&a<s.length;a+=2)s[a]!=null&&s[a+1]<n&&(i=!0);return i&&Ye(c,s,e),c}function Ge(e){let t=-1,n=!1;for(let o=0;o<e.childCount;o++){const l=e.child(o);let r=0;if(n)for(let s=0;s<o;s++){const c=e.child(s);for(let i=0;i<c.childCount;i++){const a=c.child(i);s+a.attrs.rowspan>o&&(r+=a.attrs.colspan)}}for(let s=0;s<l.childCount;s++){const c=l.child(s);r+=c.attrs.colspan,c.attrs.rowspan>1&&(n=!0)}t==-1?t=r:t!=r&&(t=Math.max(t,r))}return t}function Ye(e,t,n){e.problems||(e.problems=[]);const o={};for(let l=0;l<e.map.length;l++){const r=e.map[l];if(o[r])continue;o[r]=!0;const s=n.nodeAt(r);if(!s)throw new RangeError(`No cell with offset ${r} found`);let c=null;const i=s.attrs;for(let a=0;a<i.colspan;a++){const d=t[(l+a)%e.width*2];d!=null&&(!i.colwidth||i.colwidth[a]!=d)&&((c||(c=Qe(i)))[a]=d)}c&&e.problems.unshift({type:"colwidth mismatch",pos:r,colwidth:c})}}function Qe(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function v(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const o=e.nodes[n],l=o.spec.tableRole;l&&(t[l]=o)}}return t}const $=new se("selectingCells");function W(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Ze(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function T(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function J(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=W(t.$head)||et(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function et(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function ne(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function tt(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function ie(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Re(e,t,n){const o=e.node(-1),l=C.get(o),r=e.start(-1),s=l.nextCell(e.pos-r,t,n);return s==null?null:e.node(0).resolve(r+s)}function B(e,t,n=1){const o={...e,colspan:e.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(t,n),o.colwidth.some(l=>l>0)||(o.colwidth=null)),o}function xe(e,t,n=1){const o={...e,colspan:e.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let l=0;l<n;l++)o.colwidth.splice(t,0,0)}return o}function nt(e,t,n){const o=v(t.type.schema).header_cell;for(let l=0;l<e.height;l++)if(t.nodeAt(e.map[n+l*e.width]).type!=o)return!1;return!0}var b=class N extends E{constructor(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.rectBetween(t.pos-r,n.pos-r),c=t.node(0),i=l.cellsInRect(s).filter(d=>d!=n.pos-r);i.unshift(n.pos-r);const a=i.map(d=>{const u=o.nodeAt(d);if(!u)throw new RangeError(`No cell with offset ${d} found`);const f=r+d+1;return new je(c.resolve(f),c.resolve(f+u.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=n}map(t,n){const o=t.resolve(n.map(this.$anchorCell.pos)),l=t.resolve(n.map(this.$headCell.pos));if(ne(o)&&ne(l)&&ie(o,l)){const r=this.$anchorCell.node(-1)!=o.node(-1);return r&&this.isRowSelection()?N.rowSelection(o,l):r&&this.isColSelection()?N.colSelection(o,l):new N(o,l)}return H.between(o,l)}content(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),r={},s=[];for(let i=l.top;i<l.bottom;i++){const a=[];for(let d=i*n.width+l.left,u=l.left;u<l.right;u++,d++){const f=n.map[d];if(r[f])continue;r[f]=!0;const p=n.findCell(f);let h=t.nodeAt(f);if(!h)throw new RangeError(`No cell with offset ${f} found`);const g=l.left-p.left,m=p.right-l.right;if(g>0||m>0){let w=h.attrs;if(g>0&&(w=B(w,0,g)),m>0&&(w=B(w,w.colspan-m,m)),p.left<l.left){if(h=h.type.createAndFill(w),!h)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else h=h.type.create(w,h.content)}if(p.top<l.top||p.bottom>l.bottom){const w={...h.attrs,rowspan:Math.min(p.bottom,l.bottom)-Math.max(p.top,l.top)};p.top<l.top?h=h.type.createAndFill(w):h=h.type.create(w,h.content)}a.push(h)}s.push(t.child(i).copy(M.from(a)))}const c=this.isColSelection()&&this.isRowSelection()?t:s;return new L(M.from(c),1,1)}replace(t,n=L.empty){const o=t.steps.length,l=this.ranges;for(let s=0;s<l.length;s++){const{$from:c,$to:i}=l[s],a=t.mapping.slice(o);t.replace(a.map(c.pos),a.map(i.pos),s?L.empty:n)}const r=E.findFrom(t.doc.resolve(t.mapping.slice(o).map(this.to)),-1);r&&t.setSelection(r)}replaceWith(t,n){this.replace(t,new L(M.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),o=C.get(n),l=this.$anchorCell.start(-1),r=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-l,this.$headCell.pos-l));for(let s=0;s<r.length;s++)t(n.nodeAt(r[s]),l+r[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const o=t+this.$anchorCell.nodeAfter.attrs.rowspan,l=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,l)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.top<=c.top?(s.top>0&&(t=i.resolve(r+l.map[s.left])),c.bottom<l.height&&(n=i.resolve(r+l.map[l.width*(l.height-1)+c.right-1]))):(c.top>0&&(n=i.resolve(r+l.map[c.left])),s.bottom<l.height&&(t=i.resolve(r+l.map[l.width*(l.height-1)+s.right-1]))),new N(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.colCount(this.$anchorCell.pos-o),r=n.colCount(this.$headCell.pos-o);if(Math.min(l,r)>0)return!1;const s=l+this.$anchorCell.nodeAfter.attrs.colspan,c=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,c)==n.width}eq(t){return t instanceof N&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.left<=c.left?(s.left>0&&(t=i.resolve(r+l.map[s.top*l.width])),c.right<l.width&&(n=i.resolve(r+l.map[l.width*(c.top+1)-1]))):(c.left>0&&(n=i.resolve(r+l.map[c.top*l.width])),s.right<l.width&&(t=i.resolve(r+l.map[l.width*(s.top+1)-1]))),new N(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new N(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){return new N(t.resolve(n),t.resolve(o))}getBookmark(){return new ot(this.$anchorCell.pos,this.$headCell.pos)}};b.prototype.visible=!1;E.jsonID("cell",b);var ot=class Te{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Te(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),o=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&o.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&o.index()<o.parent.childCount&&ie(n,o)?new b(n,o):E.near(o,1)}};function lt(e){if(!(e.selection instanceof b))return null;const t=[];return e.selection.forEachCell((n,o)=>{t.push(Z.node(o,o+n.nodeSize,{class:"selectedCell"}))}),Q.create(e.doc,t)}function rt({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,o=t.pos,l=e.depth;for(;l>=0&&!(e.after(l+1)<e.end(l));l--,n++);for(let r=t.depth;r>=0&&!(t.before(r+1)>t.start(r));r--,o--);return n==o&&/row|table/.test(e.node(l).type.spec.tableRole)}function st({$from:e,$to:t}){let n,o;for(let l=e.depth;l>0;l--){const r=e.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){n=r;break}}for(let l=t.depth;l>0;l--){const r=t.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){o=r;break}}return n!==o&&t.parentOffset===0}function it(e,t,n){const o=(t||e).selection,l=(t||e).doc;let r,s;if(o instanceof Fe&&(s=o.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")r=b.create(l,o.from);else if(s=="row"){const c=l.resolve(o.from+1);r=b.rowSelection(c,c)}else if(!n){const c=C.get(o.node),i=o.from+1,a=i+c.map[c.width*c.height-1];r=b.create(l,i+1,a)}}else o instanceof H&&rt(o)?r=H.create(l,o.from):o instanceof H&&st(o)&&(r=H.create(l,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}const ct=new se("fix-tables");function Me(e,t,n,o){const l=e.childCount,r=t.childCount;e:for(let s=0,c=0;s<r;s++){const i=t.child(s);for(let a=c,d=Math.min(l,s+3);a<d;a++)if(e.child(a)==i){c=a+1,n+=i.nodeSize;continue e}o(i,n),c<l&&e.child(c).sameMarkup(i)?Me(e.child(c),i,n+1,o):i.nodesBetween(0,i.content.size,o,n+1),n+=i.nodeSize}}function ze(e,t){let n;const o=(l,r)=>{l.type.spec.tableRole=="table"&&(n=at(e,l,r,n))};return t?t.doc!=e.doc&&Me(t.doc,e.doc,0,o):e.doc.descendants(o),n}function at(e,t,n,o){const l=C.get(t);if(!l.problems)return o;o||(o=e.tr);const r=[];for(let i=0;i<l.height;i++)r.push(0);for(let i=0;i<l.problems.length;i++){const a=l.problems[i];if(a.type=="collision"){const d=t.nodeAt(a.pos);if(!d)continue;const u=d.attrs;for(let f=0;f<u.rowspan;f++)r[a.row+f]+=a.n;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,B(u,u.colspan-a.n,a.n))}else if(a.type=="missing")r[a.row]+=a.n;else if(a.type=="overlong_rowspan"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-a.n})}else if(a.type=="colwidth mismatch"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,colwidth:a.colwidth})}else if(a.type=="zero_sized"){const d=o.mapping.map(n);o.delete(d,d+t.nodeSize)}}let s,c;for(let i=0;i<r.length;i++)r[i]&&(s==null&&(s=i),c=i);for(let i=0,a=n+1;i<l.height;i++){const d=t.child(i),u=a+d.nodeSize,f=r[i];if(f>0){let p="cell";d.firstChild&&(p=d.firstChild.type.spec.tableRole);const h=[];for(let m=0;m<f;m++){const w=v(e.schema)[p].createAndFill();w&&h.push(w)}const g=(i==0||s==i-1)&&c==i?a+1:u-1;o.insert(o.mapping.map(g),h)}a=u}return o.setMeta(ct,{fixTables:!0})}function z(e){const t=e.selection,n=J(e),o=n.node(-1),l=n.start(-1),r=C.get(o);return{...t instanceof b?r.rectBetween(t.$anchorCell.pos-l,t.$headCell.pos-l):r.findCell(n.pos-l),tableStart:l,map:r,table:o}}function Ne(e,{map:t,tableStart:n,table:o},l){let r=l>0?-1:0;nt(t,o,l+r)&&(r=l==0||l==t.width?null:0);for(let s=0;s<t.height;s++){const c=s*t.width+l;if(l>0&&l<t.width&&t.map[c-1]==t.map[c]){const i=t.map[c],a=o.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,xe(a.attrs,l-t.colCount(i))),s+=a.attrs.rowspan-1}else{const i=r==null?v(o.type.schema).cell:o.nodeAt(t.map[c+r]).type,a=t.positionAt(s,l,o);e.insert(e.mapping.map(n+a),i.createAndFill())}}return e}function dt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.left))}return!0}function ut(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.right))}return!0}function ft(e,{map:t,table:n,tableStart:o},l){const r=e.mapping.maps.length;for(let s=0;s<t.height;){const c=s*t.width+l,i=t.map[c],a=n.nodeAt(i),d=a.attrs;if(l>0&&t.map[c-1]==i||l<t.width-1&&t.map[c+1]==i)e.setNodeMarkup(e.mapping.slice(r).map(o+i),null,B(d,l-t.colCount(i)));else{const u=e.mapping.slice(r).map(o+i);e.delete(u,u+a.nodeSize)}s+=d.rowspan}}function ht(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let l=n.right-1;ft(o,n,l),l!=n.left;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(r)}t(o)}return!0}function pt(e,t,n){var o;const l=v(t.type.schema).header_cell;for(let r=0;r<e.width;r++)if(((o=t.nodeAt(e.map[r+n*e.width]))===null||o===void 0?void 0:o.type)!=l)return!1;return!0}function Ee(e,{map:t,tableStart:n,table:o},l){let r=n;for(let a=0;a<l;a++)r+=o.child(a).nodeSize;const s=[];let c=l>0?-1:0;pt(t,o,l+c)&&(c=l==0||l==t.height?null:0);for(let a=0,d=t.width*l;a<t.width;a++,d++)if(l>0&&l<t.height&&t.map[d]==t.map[d-t.width]){const u=t.map[d],f=o.nodeAt(u).attrs;e.setNodeMarkup(n+u,null,{...f,rowspan:f.rowspan+1}),a+=f.colspan-1}else{var i;const u=c==null?v(o.type.schema).cell:(i=o.nodeAt(t.map[d+c*t.width]))===null||i===void 0?void 0:i.type,f=u?.createAndFill();f&&s.push(f)}return e.insert(r,v(o.type.schema).row.create(null,s)),e}function mt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.top))}return!0}function gt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.bottom))}return!0}function wt(e,{map:t,table:n,tableStart:o},l){let r=0;for(let a=0;a<l;a++)r+=n.child(a).nodeSize;const s=r+n.child(l).nodeSize,c=e.mapping.maps.length;e.delete(r+o,s+o);const i=new Set;for(let a=0,d=l*t.width;a<t.width;a++,d++){const u=t.map[d];if(!i.has(u)){if(i.add(u),l>0&&u==t.map[d-t.width]){const f=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f,rowspan:f.rowspan-1}),a+=f.colspan-1}else if(l<t.height&&u==t.map[d+t.width]){const f=n.nodeAt(u),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),g=t.positionAt(l+1,a,n);e.insert(e.mapping.slice(c).map(o+g),h),a+=p.colspan-1}}}}function bt(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let l=n.bottom-1;wt(o,n,l),l!=n.top;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(n.table)}t(o)}return!0}function ce(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function Ct({width:e,height:t,map:n},o){let l=o.top*e+o.left,r=l,s=(o.bottom-1)*e+o.left,c=l+(o.right-o.left-1);for(let i=o.top;i<o.bottom;i++){if(o.left>0&&n[r]==n[r-1]||o.right<e&&n[c]==n[c+1])return!0;r+=e,c+=e}for(let i=o.left;i<o.right;i++){if(o.top>0&&n[l]==n[l-e]||o.bottom<t&&n[s]==n[s+e])return!0;l++,s++}return!1}function ae(e,t){const n=e.selection;if(!(n instanceof b)||n.$anchorCell.pos==n.$headCell.pos)return!1;const o=z(e),{map:l}=o;if(Ct(l,o))return!1;if(t){const r=e.tr,s={};let c=M.empty,i,a;for(let d=o.top;d<o.bottom;d++)for(let u=o.left;u<o.right;u++){const f=l.map[d*l.width+u],p=o.table.nodeAt(f);if(!(s[f]||!p))if(s[f]=!0,i==null)i=f,a=p;else{ce(p)||(c=c.append(p.content));const h=r.mapping.map(f+o.tableStart);r.delete(h,h+p.nodeSize)}}if(i==null||a==null)return!0;if(r.setNodeMarkup(i+o.tableStart,null,{...xe(a.attrs,a.attrs.colspan,o.right-o.left-a.attrs.colspan),rowspan:o.bottom-o.top}),c.size>0){const d=i+1+a.content.size,u=ce(a)?i+1:d;r.replaceWith(u+o.tableStart,d+o.tableStart,c)}r.setSelection(new b(r.doc.resolve(i+o.tableStart))),t(r)}return!0}function de(e,t){const n=v(e.schema);return yt(({node:o})=>n[o.type.spec.tableRole])(e,t)}function yt(e){return(t,n)=>{const o=t.selection;let l,r;if(o instanceof b){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;l=o.$anchorCell.nodeAfter,r=o.$anchorCell.pos}else{var s;if(l=Ze(o.$from),!l)return!1;r=(s=W(o.$from))===null||s===void 0?void 0:s.pos}if(l==null||r==null||l.attrs.colspan==1&&l.attrs.rowspan==1)return!1;if(n){let c=l.attrs;const i=[],a=c.colwidth;c.rowspan>1&&(c={...c,rowspan:1}),c.colspan>1&&(c={...c,colspan:1});const d=z(t),u=t.tr;for(let p=0;p<d.right-d.left;p++)i.push(a?{...c,colwidth:a&&a[p]?[a[p]]:null}:c);let f;for(let p=d.top;p<d.bottom;p++){let h=d.map.positionAt(p,d.left,d.table);p==d.top&&(h+=l.nodeSize);for(let g=d.left,m=0;g<d.right;g++,m++)g==d.left&&p==d.top||u.insert(f=u.mapping.map(h+d.tableStart,1),e({node:l,row:p,col:g}).createAndFill(i[m]))}u.setNodeMarkup(r,e({node:l,row:d.top,col:d.left}),i[0]),o instanceof b&&u.setSelection(new b(u.doc.resolve(o.$anchorCell.pos),f?u.doc.resolve(f):void 0)),n(u)}return!0}}function At(e,t){return function(n,o){if(!T(n))return!1;const l=J(n);if(l.nodeAfter.attrs[e]===t)return!1;if(o){const r=n.tr;n.selection instanceof b?n.selection.forEachCell((s,c)=>{s.attrs[e]!==t&&r.setNodeMarkup(c,null,{...s.attrs,[e]:t})}):r.setNodeMarkup(l.pos,null,{...l.nodeAfter.attrs,[e]:t}),o(r)}return!0}}function St(e){return function(t,n){if(!T(t))return!1;if(n){const o=v(t.schema),l=z(t),r=t.tr,s=l.map.cellsInRect(e=="column"?{left:l.left,top:0,right:l.right,bottom:l.map.height}:e=="row"?{left:0,top:l.top,right:l.map.width,bottom:l.bottom}:l),c=s.map(i=>l.table.nodeAt(i));for(let i=0;i<s.length;i++)c[i].type==o.header_cell&&r.setNodeMarkup(l.tableStart+s[i],o.cell,c[i].attrs);if(r.steps.length===0)for(let i=0;i<s.length;i++)r.setNodeMarkup(l.tableStart+s[i],o.header_cell,c[i].attrs);n(r)}return!0}}function ue(e,t,n){const o=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let l=0;l<o.length;l++){const r=t.table.nodeAt(o[l]);if(r&&r.type!==n.header_cell)return!1}return!0}function I(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?St(e):function(n,o){if(!T(n))return!1;if(o){const l=v(n.schema),r=z(n),s=n.tr,c=ue("row",r,l),i=ue("column",r,l),a=(e==="column"?c:e==="row"&&i)?1:0,d=e=="column"?{left:0,top:a,right:1,bottom:r.map.height}:e=="row"?{left:a,top:0,right:r.map.width,bottom:1}:r,u=e=="column"?i?l.cell:l.header_cell:e=="row"?c?l.cell:l.header_cell:l.cell;r.map.cellsInRect(d).forEach(f=>{const p=f+r.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,u,h.attrs)}),o(s)}return!0}}I("row",{useDeprecatedLogic:!0});I("column",{useDeprecatedLogic:!0});const vt=I("cell",{useDeprecatedLogic:!0});function Rt(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let o=e.index(-1)-1,l=e.before();o>=0;o--){const r=e.node(-1).child(o),s=r.lastChild;if(s)return l-1-s.nodeSize;l-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let o=e.indexAfter(-1),l=e.after();o<n.childCount;o++){const r=n.child(o);if(r.childCount)return l+1;l+=r.nodeSize}}return null}function fe(e){return function(t,n){if(!T(t))return!1;const o=Rt(J(t),e);if(o==null)return!1;if(n){const l=t.doc.resolve(o);n(t.tr.setSelection(H.between(l,tt(l))).scrollIntoView())}return!0}}function xt(e,t){const n=e.selection.$anchor;for(let o=n.depth;o>0;o--)if(n.node(o).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function j(e,t){const n=e.selection;if(!(n instanceof b))return!1;if(t){const o=e.tr,l=v(e.schema).cell.createAndFill().content;n.forEachCell((r,s)=>{r.content.eq(l)||o.replace(o.mapping.map(s+1),o.mapping.map(s+r.nodeSize-1),new L(l,0,0))}),o.docChanged&&t(o)}return!0}function Tt(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:o}=e;for(;t.childCount==1&&(n>0&&o>0||t.child(0).type.spec.tableRole=="table");)n--,o--,t=t.child(0).content;const l=t.child(0),r=l.type.spec.tableRole,s=l.type.schema,c=[];if(r=="row")for(let i=0;i<t.childCount;i++){let a=t.child(i).content;const d=i?0:Math.max(0,n-1),u=i<t.childCount-1?0:Math.max(0,o-1);(d||u)&&(a=oe(v(s).row,new L(a,d,u)).content),c.push(a)}else if(r=="cell"||r=="header_cell")c.push(n||o?oe(v(s).row,new L(t,n,o)).content:t);else return null;return Mt(s,c)}function Mt(e,t){const n=[];for(let l=0;l<t.length;l++){const r=t[l];for(let s=r.childCount-1;s>=0;s--){const{rowspan:c,colspan:i}=r.child(s).attrs;for(let a=l;a<l+c;a++)n[a]=(n[a]||0)+i}}let o=0;for(let l=0;l<n.length;l++)o=Math.max(o,n[l]);for(let l=0;l<n.length;l++)if(l>=t.length&&t.push(M.empty),n[l]<o){const r=v(e).cell.createAndFill(),s=[];for(let c=n[l];c<o;c++)s.push(r);t[l]=t[l].append(M.from(s))}return{height:t.length,width:o,rows:t}}function oe(e,t){const n=e.createAndFill();return new _e(n).replace(0,n.content.size,t).doc}function zt({width:e,height:t,rows:n},o,l){if(e!=o){const r=[],s=[];for(let c=0;c<n.length;c++){const i=n[c],a=[];for(let d=r[c]||0,u=0;d<o;u++){let f=i.child(u%i.childCount);d+f.attrs.colspan>o&&(f=f.type.createChecked(B(f.attrs,f.attrs.colspan,d+f.attrs.colspan-o),f.content)),a.push(f),d+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)r[c+p]=(r[c+p]||0)+f.attrs.colspan}s.push(M.from(a))}n=s,e=o}if(t!=l){const r=[];for(let s=0,c=0;s<l;s++,c++){const i=[],a=n[c%t];for(let d=0;d<a.childCount;d++){let u=a.child(d);s+u.attrs.rowspan>l&&(u=u.type.create({...u.attrs,rowspan:Math.max(1,l-u.attrs.rowspan)},u.content)),i.push(u)}r.push(M.from(i))}n=r,t=l}return{width:e,height:t,rows:n}}function Nt(e,t,n,o,l,r,s){const c=e.doc.type.schema,i=v(c);let a,d;if(l>t.width)for(let u=0,f=0;u<t.height;u++){const p=n.child(u);f+=p.nodeSize;const h=[];let g;p.lastChild==null||p.lastChild.type==i.cell?g=a||(a=i.cell.createAndFill()):g=d||(d=i.header_cell.createAndFill());for(let m=t.width;m<l;m++)h.push(g);e.insert(e.mapping.slice(s).map(f-1+o),h)}if(r>t.height){const u=[];for(let h=0,g=(t.height-1)*t.width;h<Math.max(t.width,l);h++){const m=h>=t.width?!1:n.nodeAt(t.map[g+h]).type==i.header_cell;u.push(m?d||(d=i.header_cell.createAndFill()):a||(a=i.cell.createAndFill()))}const f=i.row.create(null,M.from(u)),p=[];for(let h=t.height;h<r;h++)p.push(f);e.insert(e.mapping.slice(s).map(o+n.nodeSize-2),p)}return!!(a||d)}function he(e,t,n,o,l,r,s,c){if(s==0||s==t.height)return!1;let i=!1;for(let a=l;a<r;a++){const d=s*t.width+a,u=t.map[d];if(t.map[d-t.width]==u){i=!0;const f=n.nodeAt(u),{top:p,left:h}=t.findCell(u);e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(c).map(t.positionAt(s,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),a+=f.attrs.colspan-1}}return i}function pe(e,t,n,o,l,r,s,c){if(s==0||s==t.width)return!1;let i=!1;for(let a=l;a<r;a++){const d=a*t.width+s,u=t.map[d];if(t.map[d-1]==u){i=!0;const f=n.nodeAt(u),p=t.colCount(u),h=e.mapping.slice(c).map(u+o);e.setNodeMarkup(h,null,B(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(h+f.nodeSize,f.type.createAndFill(B(f.attrs,0,s-p))),a+=f.attrs.rowspan-1}}return i}function me(e,t,n,o,l){let r=n?e.doc.nodeAt(n-1):e.doc;if(!r)throw new Error("No table found");let s=C.get(r);const{top:c,left:i}=o,a=i+l.width,d=c+l.height,u=e.tr;let f=0;function p(){if(r=n?u.doc.nodeAt(n-1):u.doc,!r)throw new Error("No table found");s=C.get(r),f=u.mapping.maps.length}Nt(u,s,r,n,a,d,f)&&p(),he(u,s,r,n,i,a,c,f)&&p(),he(u,s,r,n,i,a,d,f)&&p(),pe(u,s,r,n,c,d,i,f)&&p(),pe(u,s,r,n,c,d,a,f)&&p();for(let h=c;h<d;h++){const g=s.positionAt(h,i,r),m=s.positionAt(h,a,r);u.replace(u.mapping.slice(f).map(g+n),u.mapping.slice(f).map(m+n),new L(l.rows[h-c],0,0))}p(),u.setSelection(new b(u.doc.resolve(n+s.positionAt(c,i,r)),u.doc.resolve(n+s.positionAt(d-1,a-1,r)))),t(u)}const Et=Oe({ArrowLeft:F("horiz",-1),ArrowRight:F("horiz",1),ArrowUp:F("vert",-1),ArrowDown:F("vert",1),"Shift-ArrowLeft":_("horiz",-1),"Shift-ArrowRight":_("horiz",1),"Shift-ArrowUp":_("vert",-1),"Shift-ArrowDown":_("vert",1),Backspace:j,"Mod-Backspace":j,Delete:j,"Mod-Delete":j});function K(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function F(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;if(r instanceof b)return K(n,o,E.near(r.$headCell,t));if(e!="horiz"&&!r.empty)return!1;const s=He(l,e,t);if(s==null)return!1;if(e=="horiz")return K(n,o,E.near(n.doc.resolve(r.head+t),t));{const c=n.doc.resolve(s),i=Re(c,e,t);let a;return i?a=E.near(i,1):t<0?a=E.near(n.doc.resolve(c.before(-1)),-1):a=E.near(n.doc.resolve(c.after(-1)),1),K(n,o,a)}}}function _(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;let s;if(r instanceof b)s=r;else{const i=He(l,e,t);if(i==null)return!1;s=new b(n.doc.resolve(i))}const c=Re(s.$headCell,e,t);return c?K(n,o,new b(s.$anchorCell,c)):!1}}function Ht(e,t){const n=e.state.doc,o=W(n.resolve(t));return o?(e.dispatch(e.state.tr.setSelection(new b(o))),!0):!1}function $t(e,t,n){if(!T(e.state))return!1;let o=Tt(n);const l=e.state.selection;if(l instanceof b){o||(o={width:1,height:1,rows:[M.from(oe(v(e.state.schema).cell,n))]});const r=l.$anchorCell.node(-1),s=l.$anchorCell.start(-1),c=C.get(r).rectBetween(l.$anchorCell.pos-s,l.$headCell.pos-s);return o=zt(o,c.right-c.left,c.bottom-c.top),me(e.state,e.dispatch,s,c,o),!0}else if(o){const r=J(e.state),s=r.start(-1);return me(e.state,e.dispatch,s,C.get(r.node(-1)).findCell(r.pos-s),o),!0}else return!1}function Lt(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;const o=ge(e,t.target);let l;if(t.shiftKey&&e.state.selection instanceof b)r(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&(l=W(e.state.selection.$anchor))!=null&&((n=Y(e,t))===null||n===void 0?void 0:n.pos)!=l.pos)r(l,t),t.preventDefault();else if(!o)return;function r(i,a){let d=Y(e,a);const u=$.getState(e.state)==null;if(!d||!ie(i,d))if(u)d=i;else return;const f=new b(i,d);if(u||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);u&&p.setMeta($,i.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",c),$.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta($,-1))}function c(i){const a=i,d=$.getState(e.state);let u;if(d!=null)u=e.state.doc.resolve(d);else if(ge(e,a.target)!=o&&(u=Y(e,t),!u))return s();u&&r(u,a)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",c)}function He(e,t,n){if(!(e.state.selection instanceof H))return null;const{$head:o}=e.state.selection;for(let l=o.depth-1;l>=0;l--){const r=o.node(l);if((n<0?o.index(l):o.indexAfter(l))!=(n<0?0:r.childCount))return null;if(r.type.spec.tableRole=="cell"||r.type.spec.tableRole=="header_cell"){const s=o.before(l),c=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(c)?s:null}}return null}function ge(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Y(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:o,pos:l}=n;return o>=0&&W(e.state.doc.resolve(o))||W(e.state.doc.resolve(l))}var kt=class{constructor(t,n){this.node=t,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),le(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,le(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function le(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a){for(let u=0,f=0;u<a.childCount;u++){const{colspan:p,colwidth:h}=a.child(u).attrs;for(let g=0;g<p;g++,f++){const m=l==f?r:h&&h[g],w=m?m+"px":"";if(s+=m||o,m||(c=!1),i)i.style.width!=w&&(i.style.width=w),i=i.nextSibling;else{const S=document.createElement("col");S.style.width=w,t.appendChild(S)}}}for(;i;){var d;const u=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=u}c?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const x=new se("tableColumnResizing");function Wt({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:o=kt,lastColumnResizable:l=!0}={}){const r=new ve({key:x,state:{init(s,c){var i;const a=(i=r.spec)===null||i===void 0||(i=i.props)===null||i===void 0?void 0:i.nodeViews,d=v(c.schema).table.name;return o&&a&&(a[d]=(u,f)=>new o(u,n,f)),new Bt(-1,!1)},apply(s,c){return c.apply(s)}},props:{attributes:s=>{const c=x.getState(s);return c&&c.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,c)=>{Dt(s,c,e,l)},mouseleave:s=>{It(s)},mousedown:(s,c)=>{Pt(s,c,t,n)}},decorations:s=>{const c=x.getState(s);if(c&&c.activeHandle>-1)return Vt(s,c.activeHandle)},nodeViews:{}}});return r}var Bt=class X{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,o=t.getMeta(x);if(o&&o.setHandle!=null)return new X(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new X(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&t.docChanged){let l=t.mapping.map(n.activeHandle,-1);return ne(t.doc.resolve(l))||(l=-1),new X(l,n.dragging)}return n}};function Dt(e,t,n,o){if(!e.editable)return;const l=x.getState(e.state);if(l&&!l.dragging){const r=jt(t.target);let s=-1;if(r){const{left:c,right:i}=r.getBoundingClientRect();t.clientX-c<=n?s=we(e,t,"left",n):i-t.clientX<=n&&(s=we(e,t,"right",n))}if(s!=l.activeHandle){if(!o&&s!==-1){const c=e.state.doc.resolve(s),i=c.node(-1),a=C.get(i),d=c.start(-1);if(a.colCount(c.pos-d)+c.nodeAfter.attrs.colspan-1==a.width-1)return}$e(e,s)}}}function It(e){if(!e.editable)return;const t=x.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&$e(e,-1)}function Pt(e,t,n,o){var l;if(!e.editable)return!1;const r=(l=e.dom.ownerDocument.defaultView)!==null&&l!==void 0?l:window,s=x.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const c=e.state.doc.nodeAt(s.activeHandle),i=Ot(e,s.activeHandle,c.attrs);e.dispatch(e.state.tr.setMeta(x,{setDragging:{startX:t.clientX,startWidth:i}}));function a(u){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",d);const f=x.getState(e.state);f?.dragging&&(Ft(e,f.activeHandle,be(f.dragging,u,n)),e.dispatch(e.state.tr.setMeta(x,{setDragging:null})))}function d(u){if(!u.which)return a(u);const f=x.getState(e.state);if(f&&f.dragging){const p=be(f.dragging,u,n);Ce(e,f.activeHandle,p,o)}}return Ce(e,s.activeHandle,i,o),r.addEventListener("mouseup",a),r.addEventListener("mousemove",d),t.preventDefault(),!0}function Ot(e,t,{colspan:n,colwidth:o}){const l=o&&o[o.length-1];if(l)return l;const r=e.domAtPos(t);let s=r.node.childNodes[r.offset].offsetWidth,c=n;if(o)for(let i=0;i<n;i++)o[i]&&(s-=o[i],c--);return s/c}function jt(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function we(e,t,n,o){const l=n=="right"?-o:o,r=e.posAtCoords({left:t.clientX+l,top:t.clientY});if(!r)return-1;const{pos:s}=r,c=W(e.state.doc.resolve(s));if(!c)return-1;if(n=="right")return c.pos;const i=C.get(c.node(-1)),a=c.start(-1),d=i.map.indexOf(c.pos-a);return d%i.width==0?-1:a+i.map[d-1]}function be(e,t,n){const o=t.clientX-e.startX;return Math.max(n,e.startWidth+o)}function $e(e,t){e.dispatch(e.state.tr.setMeta(x,{setHandle:t}))}function Ft(e,t,n){const o=e.state.doc.resolve(t),l=o.node(-1),r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1,i=e.state.tr;for(let a=0;a<r.height;a++){const d=a*r.width+c;if(a&&r.map[d]==r.map[d-r.width])continue;const u=r.map[d],f=l.nodeAt(u).attrs,p=f.colspan==1?0:c-r.colCount(u);if(f.colwidth&&f.colwidth[p]==n)continue;const h=f.colwidth?f.colwidth.slice():_t(f.colspan);h[p]=n,i.setNodeMarkup(s+u,null,{...f,colwidth:h})}i.docChanged&&e.dispatch(i)}function Ce(e,t,n,o){const l=e.state.doc.resolve(t),r=l.node(-1),s=l.start(-1),c=C.get(r).colCount(l.pos-s)+l.nodeAfter.attrs.colspan-1;let i=e.domAtPos(l.start(-1)).node;for(;i&&i.nodeName!="TABLE";)i=i.parentNode;i&&le(r,i.firstChild,i,o,c,n)}function _t(e){return Array(e).fill(0)}function Vt(e,t){const n=[],o=e.doc.resolve(t),l=o.node(-1);if(!l)return Q.empty;const r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let a=0;a<r.height;a++){const d=c+a*r.width;if((c==r.width-1||r.map[d]!=r.map[d+1])&&(a==0||r.map[d]!=r.map[d-r.width])){var i;const u=r.map[d],f=s+u+l.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((i=x.getState(e))===null||i===void 0)&&i.dragging&&n.push(Z.node(s+u,s+u+l.nodeAt(u).nodeSize,{class:"column-resize-dragging"})),n.push(Z.widget(f,p))}}return Q.create(e.doc,n)}function Kt({allowTableNodeSelection:e=!1}={}){return new ve({key:$,state:{init(){return null},apply(t,n){const o=t.getMeta($);if(o!=null)return o==-1?null:o;if(n==null||!t.docChanged)return n;const{deleted:l,pos:r}=t.mapping.mapResult(n);return l?null:r}},props:{decorations:lt,handleDOMEvents:{mousedown:Lt},createSelectionBetween(t){return $.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Ht,handleKeyDown:Et,handlePaste:$t},appendTransaction(t,n,o){return it(o,ze(o,n),e)}})}function U(e){return e==="left"||e==="right"||e==="center"?e:null}function Xt(e){const t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return U(t||n)}function qt(e){return U(e?.align)}function Le(){return{default:null,parseHTML:e=>Xt(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}function Ut(e){var t;const n=e.parentElement,o=e.closest("table");if(!n||!o)return null;const l=Array.from(n.children).indexOf(e),r=(t=o.querySelectorAll("colgroup > col")[l])===null||t===void 0?void 0:t.getAttribute("width");return r?[parseInt(r,10)]:null}function ke(e){const t=e.getAttribute("colwidth");return t?t.split(",").map(n=>parseInt(n,10)):Ut(e)}const Jt=/[ \t\r\n\f]+/g;function We(e){var t;return e.children.length>0?!1:((t=e.textContent)!==null&&t!==void 0?t:"").replace(Jt,"")===""}function Be(e){const t=e.createAndFill();if(!t)throw new Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}const Gt=P.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",k(this.options.HTMLAttributes,e),0]}}),Yt=P.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",k(this.options.HTMLAttributes,e),0]}}),Qt=P.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",k(this.options.HTMLAttributes,e),0]}});function re(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function ye(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a!==null)for(let f=0,p=0;f<a.childCount;f+=1){const{colspan:h,colwidth:g}=a.child(f).attrs;for(let m=0;m<h;m+=1,p+=1){const w=l===p?r:g&&g[m],S=w?`${w}px`:"";if(s+=w||o,w||(c=!1),i){if(i.style.width!==S){const[y,A]=re(o,w);i.style.setProperty(y,A)}i=i.nextSibling}else{const y=document.createElement("col"),[A,R]=re(o,w);y.style.setProperty(A,R),t.appendChild(y)}}}for(;i;){var d;const f=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=f}const u=e.attrs.style&&typeof e.attrs.style=="string"&&/\bwidth\s*:/i.test(e.attrs.style);c&&!u?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}var Zt=class{constructor(e,t,n,o={}){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(const[l,r]of Object.entries(o))r!=null&&(l==="style"?this.table.style.cssText=String(r):this.table.setAttribute(l,String(r)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ye(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,ye(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){const t=e.target,n=this.dom.contains(t),o=this.contentDOM.contains(t);return!!(n&&!o&&(e.type==="attributes"||e.type==="childList"||e.type==="characterData"))}};function en(e,t,n,o){let l=0,r=!0;const s=[],c=e.firstChild;if(!c)return{};for(let d=0,u=0;d<c.childCount;d+=1){const{colspan:f,colwidth:p}=c.child(d).attrs;for(let h=0;h<f;h+=1,u+=1){const g=n===u?o:p&&p[h];l+=g||t,g||(r=!1);const[m,w]=re(t,g);s.push(["col",{style:`${m}: ${w}`}])}}const i=r?`${l}px`:"",a=r?"":`${l}px`;return{colgroup:["colgroup",{},...s],tableWidth:i,tableMinWidth:a}}function Ae(e,t){return e.createAndFill()}function tn(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const o=e.nodes[n];o.spec.tableRole&&(t[o.spec.tableRole]=o)}),e.cached.tableNodeTypes=t,t}function nn(e,t,n,o,l){const r=tn(e),s=[],c=[];for(let a=0;a<n;a+=1){const d=Ae(r.cell);if(d&&c.push(d),o){const u=Ae(r.header_cell);u&&s.push(u)}}const i=[];for(let a=0;a<t;a+=1)i.push(r.row.createChecked(null,o&&a===0?s:c));return r.table.createChecked(null,i)}function on(e){return e instanceof b}const V=({editor:e})=>{const{selection:t}=e.state;if(!on(t))return!1;let n=0;const o=q(t.ranges[0].$from,l=>l.type.name==="table");return o?.node.descendants(l=>{if(l.type.name==="table")return!1;["tableCell","tableHeader"].includes(l.type.name)&&(n+=1)}),n!==t.ranges.length?!1:(e.commands.deleteTable(),!0)};function Se(e,t){const n=e.mapping.map(t),o=q(e.selection.$from,s=>s.type.name==="table");if(o?.pos===n)return;const l=e.doc.nodeAt(n);if(!l)return;const r=n+l.nodeSize-1;e.setSelection(H.near(e.doc.resolve(r),-1))}function ln(e){let t="",n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}if(e[n]!=="`"){t+=e[n++];continue}let o=0;for(;n+o<e.length&&e[n+o]==="`";)o+=1;let l=n+o,r=!1;for(;l<e.length;){if(e[l]!=="`"){l+=1;continue}let s=0;for(;l+s<e.length&&e[l+s]==="`";)s+=1;if(s===o){const c=e.slice(n+o,l);t+=e.slice(n,n+o)+c.replace(/\\\||\|/g,i=>i==="|"?"\\|":i)+e.slice(l,l+o),n=l+o,r=!0;break}l+=s}r||(t+=e.slice(n,n+o),n+=o)}return t}function rn(e){return e.split(`
1
+ import{N as P,q as De,c as k,R as Ie,r as Pe,t as se,v as E,w as Oe,T as H,x as je,y as M,z as L,A as ve,D as Q,B as Z,C as Fe,G as _e,H as Ve,I as Ke,J as q,f as Xe}from"./usage-stats-D_d2D8Wj.js";const qe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Ue=P.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",k(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,o,l,r,s;const c=(t=(n=e.attrs)===null||n===void 0?void 0:n.src)!==null&&t!==void 0?t:"",i=(o=(l=e.attrs)===null||l===void 0?void 0:l.alt)!==null&&o!==void 0?o:"",a=(r=(s=e.attrs)===null||s===void 0?void 0:s.title)!==null&&r!==void 0?r:"";return a?`![${i}](${c} "${a}")`:`![${i}](${c})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:o}=this.options.resize,l=new Set(["src","width","height"]);return({node:r,getPos:s,HTMLAttributes:c,editor:i})=>{const a=document.createElement("img");a.draggable=!1;const d=k(this.options.HTMLAttributes,c);Object.entries(d).forEach(([w,S])=>{if(S!=null)switch(w){case"src":case"width":case"height":break;default:a.setAttribute(w,S)}}),d.src!==null&&(a.src=d.src);let u={...c};const f=w=>{if(typeof w=="string"&&w!==""){a.getAttribute("src")!==w&&(a.src=w);return}a.hasAttribute("src")&&a.removeAttribute("src"),a.src!==""&&(a.src="")};f(c.src);const p=w=>{if(w.type!==r.type)return!1;const S=i.extensionManager.attributes.filter(A=>A.type===w.type.name),y=Pe(w,S);return Object.keys(u).forEach(A=>{!l.has(A)&&!(A in y)&&a.removeAttribute(A)}),Object.entries(y).forEach(([A,R])=>{l.has(A)||(R!=null?a.setAttribute(A,R):a.removeAttribute(A))}),f(y.src),u=y,!0},h=new Ie({element:a,editor:i,node:r,getPos:s,onResize:(w,S)=>{a.style.width=`${w}px`,a.style.height=`${S}px`},onCommit:(w,S)=>{const y=s();y!==void 0&&this.editor.chain().setNodeSelection(y).updateAttributes(this.name,{width:w,height:S}).run()},onUpdate:p,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:o===!0}}),g=h.dom,m=()=>{g.style.visibility="",g.style.pointerEvents=""};return g.style.visibility="hidden",g.style.pointerEvents="none",a.complete&&a.naturalWidth>0?m():(a.onload=m,a.onerror=m),h}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[De({find:qe,type:this.type,getAttributes:e=>{const[,,t,n,o]=e;return{src:n,alt:t,title:o}}})]}});var un=Ue;let ee,te;if(typeof WeakMap<"u"){let e=new WeakMap;ee=t=>e.get(t),te=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;ee=o=>{for(let l=0;l<e.length;l+=2)if(e[l]==o)return e[l+1]},te=(o,l)=>(n==10&&(n=0),e[n++]=o,e[n++]=l)}var C=class{constructor(e,t,n,o){this.width=e,this.height=t,this.map=n,this.problems=o}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const o=t%this.width,l=t/this.width|0;let r=o+1,s=l+1;for(let c=1;r<this.width&&this.map[t+c]==n;c++)r++;for(let c=1;s<this.height&&this.map[t+this.width*c]==n;c++)s++;return{left:o,top:l,right:r,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:o,right:l,top:r,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?o==0:l==this.width)?null:this.map[r*this.width+(n<0?o-1:l)]:(n<0?r==0:s==this.height)?null:this.map[o+this.width*(n<0?r-1:s)]}rectBetween(e,t){const{left:n,right:o,top:l,bottom:r}=this.findCell(e),{left:s,right:c,top:i,bottom:a}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(l,i),right:Math.max(o,c),bottom:Math.max(r,a)}}cellsInRect(e){const t=[],n={};for(let o=e.top;o<e.bottom;o++)for(let l=e.left;l<e.right;l++){const r=o*this.width+l,s=this.map[r];n[s]||(n[s]=!0,!(l==e.left&&l&&this.map[r-1]==s||o==e.top&&o&&this.map[r-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let o=0,l=0;;o++){const r=l+n.child(o).nodeSize;if(o==e){let s=t+e*this.width;const c=(e+1)*this.width;for(;s<c&&this.map[s]<l;)s++;return s==c?r-1:this.map[s]}l=r}}static get(e){return ee(e)||te(e,Je(e))}};function Je(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=Ge(e),n=e.childCount,o=[];let l=0,r=null;const s=[];for(let a=0,d=t*n;a<d;a++)o[a]=0;for(let a=0,d=0;a<n;a++){const u=e.child(a);d++;for(let h=0;;h++){for(;l<o.length&&o[l]!=0;)l++;if(h==u.childCount)break;const g=u.child(h),{colspan:m,rowspan:w,colwidth:S}=g.attrs;for(let y=0;y<w;y++){if(y+a>=n){(r||(r=[])).push({type:"overlong_rowspan",pos:d,n:w-y});break}const A=l+y*t;for(let R=0;R<m;R++){o[A+R]==0?o[A+R]=d:(r||(r=[])).push({type:"collision",row:a,pos:d,n:m-R});const O=S&&S[R];if(O){const D=(A+R)%t*2,G=s[D];G==null||G!=O&&s[D+1]==1?(s[D]=O,s[D+1]=1):G==O&&s[D+1]++}}}l+=m,d+=g.nodeSize}const f=(a+1)*t;let p=0;for(;l<f;)o[l++]==0&&p++;p&&(r||(r=[])).push({type:"missing",row:a,n:p}),d++}(t===0||n===0)&&(r||(r=[])).push({type:"zero_sized"});const c=new C(t,n,o,r);let i=!1;for(let a=0;!i&&a<s.length;a+=2)s[a]!=null&&s[a+1]<n&&(i=!0);return i&&Ye(c,s,e),c}function Ge(e){let t=-1,n=!1;for(let o=0;o<e.childCount;o++){const l=e.child(o);let r=0;if(n)for(let s=0;s<o;s++){const c=e.child(s);for(let i=0;i<c.childCount;i++){const a=c.child(i);s+a.attrs.rowspan>o&&(r+=a.attrs.colspan)}}for(let s=0;s<l.childCount;s++){const c=l.child(s);r+=c.attrs.colspan,c.attrs.rowspan>1&&(n=!0)}t==-1?t=r:t!=r&&(t=Math.max(t,r))}return t}function Ye(e,t,n){e.problems||(e.problems=[]);const o={};for(let l=0;l<e.map.length;l++){const r=e.map[l];if(o[r])continue;o[r]=!0;const s=n.nodeAt(r);if(!s)throw new RangeError(`No cell with offset ${r} found`);let c=null;const i=s.attrs;for(let a=0;a<i.colspan;a++){const d=t[(l+a)%e.width*2];d!=null&&(!i.colwidth||i.colwidth[a]!=d)&&((c||(c=Qe(i)))[a]=d)}c&&e.problems.unshift({type:"colwidth mismatch",pos:r,colwidth:c})}}function Qe(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function v(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const o=e.nodes[n],l=o.spec.tableRole;l&&(t[l]=o)}}return t}const $=new se("selectingCells");function W(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Ze(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function T(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function J(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=W(t.$head)||et(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function et(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function ne(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function tt(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function ie(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Re(e,t,n){const o=e.node(-1),l=C.get(o),r=e.start(-1),s=l.nextCell(e.pos-r,t,n);return s==null?null:e.node(0).resolve(r+s)}function B(e,t,n=1){const o={...e,colspan:e.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(t,n),o.colwidth.some(l=>l>0)||(o.colwidth=null)),o}function xe(e,t,n=1){const o={...e,colspan:e.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let l=0;l<n;l++)o.colwidth.splice(t,0,0)}return o}function nt(e,t,n){const o=v(t.type.schema).header_cell;for(let l=0;l<e.height;l++)if(t.nodeAt(e.map[n+l*e.width]).type!=o)return!1;return!0}var b=class N extends E{constructor(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.rectBetween(t.pos-r,n.pos-r),c=t.node(0),i=l.cellsInRect(s).filter(d=>d!=n.pos-r);i.unshift(n.pos-r);const a=i.map(d=>{const u=o.nodeAt(d);if(!u)throw new RangeError(`No cell with offset ${d} found`);const f=r+d+1;return new je(c.resolve(f),c.resolve(f+u.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=n}map(t,n){const o=t.resolve(n.map(this.$anchorCell.pos)),l=t.resolve(n.map(this.$headCell.pos));if(ne(o)&&ne(l)&&ie(o,l)){const r=this.$anchorCell.node(-1)!=o.node(-1);return r&&this.isRowSelection()?N.rowSelection(o,l):r&&this.isColSelection()?N.colSelection(o,l):new N(o,l)}return H.between(o,l)}content(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),r={},s=[];for(let i=l.top;i<l.bottom;i++){const a=[];for(let d=i*n.width+l.left,u=l.left;u<l.right;u++,d++){const f=n.map[d];if(r[f])continue;r[f]=!0;const p=n.findCell(f);let h=t.nodeAt(f);if(!h)throw new RangeError(`No cell with offset ${f} found`);const g=l.left-p.left,m=p.right-l.right;if(g>0||m>0){let w=h.attrs;if(g>0&&(w=B(w,0,g)),m>0&&(w=B(w,w.colspan-m,m)),p.left<l.left){if(h=h.type.createAndFill(w),!h)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else h=h.type.create(w,h.content)}if(p.top<l.top||p.bottom>l.bottom){const w={...h.attrs,rowspan:Math.min(p.bottom,l.bottom)-Math.max(p.top,l.top)};p.top<l.top?h=h.type.createAndFill(w):h=h.type.create(w,h.content)}a.push(h)}s.push(t.child(i).copy(M.from(a)))}const c=this.isColSelection()&&this.isRowSelection()?t:s;return new L(M.from(c),1,1)}replace(t,n=L.empty){const o=t.steps.length,l=this.ranges;for(let s=0;s<l.length;s++){const{$from:c,$to:i}=l[s],a=t.mapping.slice(o);t.replace(a.map(c.pos),a.map(i.pos),s?L.empty:n)}const r=E.findFrom(t.doc.resolve(t.mapping.slice(o).map(this.to)),-1);r&&t.setSelection(r)}replaceWith(t,n){this.replace(t,new L(M.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),o=C.get(n),l=this.$anchorCell.start(-1),r=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-l,this.$headCell.pos-l));for(let s=0;s<r.length;s++)t(n.nodeAt(r[s]),l+r[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const o=t+this.$anchorCell.nodeAfter.attrs.rowspan,l=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,l)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.top<=c.top?(s.top>0&&(t=i.resolve(r+l.map[s.left])),c.bottom<l.height&&(n=i.resolve(r+l.map[l.width*(l.height-1)+c.right-1]))):(c.top>0&&(n=i.resolve(r+l.map[c.left])),s.bottom<l.height&&(t=i.resolve(r+l.map[l.width*(l.height-1)+s.right-1]))),new N(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.colCount(this.$anchorCell.pos-o),r=n.colCount(this.$headCell.pos-o);if(Math.min(l,r)>0)return!1;const s=l+this.$anchorCell.nodeAfter.attrs.colspan,c=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,c)==n.width}eq(t){return t instanceof N&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.left<=c.left?(s.left>0&&(t=i.resolve(r+l.map[s.top*l.width])),c.right<l.width&&(n=i.resolve(r+l.map[l.width*(c.top+1)-1]))):(c.left>0&&(n=i.resolve(r+l.map[c.top*l.width])),s.right<l.width&&(t=i.resolve(r+l.map[l.width*(s.top+1)-1]))),new N(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new N(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){return new N(t.resolve(n),t.resolve(o))}getBookmark(){return new ot(this.$anchorCell.pos,this.$headCell.pos)}};b.prototype.visible=!1;E.jsonID("cell",b);var ot=class Te{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Te(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),o=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&o.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&o.index()<o.parent.childCount&&ie(n,o)?new b(n,o):E.near(o,1)}};function lt(e){if(!(e.selection instanceof b))return null;const t=[];return e.selection.forEachCell((n,o)=>{t.push(Z.node(o,o+n.nodeSize,{class:"selectedCell"}))}),Q.create(e.doc,t)}function rt({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,o=t.pos,l=e.depth;for(;l>=0&&!(e.after(l+1)<e.end(l));l--,n++);for(let r=t.depth;r>=0&&!(t.before(r+1)>t.start(r));r--,o--);return n==o&&/row|table/.test(e.node(l).type.spec.tableRole)}function st({$from:e,$to:t}){let n,o;for(let l=e.depth;l>0;l--){const r=e.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){n=r;break}}for(let l=t.depth;l>0;l--){const r=t.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){o=r;break}}return n!==o&&t.parentOffset===0}function it(e,t,n){const o=(t||e).selection,l=(t||e).doc;let r,s;if(o instanceof Fe&&(s=o.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")r=b.create(l,o.from);else if(s=="row"){const c=l.resolve(o.from+1);r=b.rowSelection(c,c)}else if(!n){const c=C.get(o.node),i=o.from+1,a=i+c.map[c.width*c.height-1];r=b.create(l,i+1,a)}}else o instanceof H&&rt(o)?r=H.create(l,o.from):o instanceof H&&st(o)&&(r=H.create(l,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}const ct=new se("fix-tables");function Me(e,t,n,o){const l=e.childCount,r=t.childCount;e:for(let s=0,c=0;s<r;s++){const i=t.child(s);for(let a=c,d=Math.min(l,s+3);a<d;a++)if(e.child(a)==i){c=a+1,n+=i.nodeSize;continue e}o(i,n),c<l&&e.child(c).sameMarkup(i)?Me(e.child(c),i,n+1,o):i.nodesBetween(0,i.content.size,o,n+1),n+=i.nodeSize}}function ze(e,t){let n;const o=(l,r)=>{l.type.spec.tableRole=="table"&&(n=at(e,l,r,n))};return t?t.doc!=e.doc&&Me(t.doc,e.doc,0,o):e.doc.descendants(o),n}function at(e,t,n,o){const l=C.get(t);if(!l.problems)return o;o||(o=e.tr);const r=[];for(let i=0;i<l.height;i++)r.push(0);for(let i=0;i<l.problems.length;i++){const a=l.problems[i];if(a.type=="collision"){const d=t.nodeAt(a.pos);if(!d)continue;const u=d.attrs;for(let f=0;f<u.rowspan;f++)r[a.row+f]+=a.n;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,B(u,u.colspan-a.n,a.n))}else if(a.type=="missing")r[a.row]+=a.n;else if(a.type=="overlong_rowspan"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-a.n})}else if(a.type=="colwidth mismatch"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,colwidth:a.colwidth})}else if(a.type=="zero_sized"){const d=o.mapping.map(n);o.delete(d,d+t.nodeSize)}}let s,c;for(let i=0;i<r.length;i++)r[i]&&(s==null&&(s=i),c=i);for(let i=0,a=n+1;i<l.height;i++){const d=t.child(i),u=a+d.nodeSize,f=r[i];if(f>0){let p="cell";d.firstChild&&(p=d.firstChild.type.spec.tableRole);const h=[];for(let m=0;m<f;m++){const w=v(e.schema)[p].createAndFill();w&&h.push(w)}const g=(i==0||s==i-1)&&c==i?a+1:u-1;o.insert(o.mapping.map(g),h)}a=u}return o.setMeta(ct,{fixTables:!0})}function z(e){const t=e.selection,n=J(e),o=n.node(-1),l=n.start(-1),r=C.get(o);return{...t instanceof b?r.rectBetween(t.$anchorCell.pos-l,t.$headCell.pos-l):r.findCell(n.pos-l),tableStart:l,map:r,table:o}}function Ne(e,{map:t,tableStart:n,table:o},l){let r=l>0?-1:0;nt(t,o,l+r)&&(r=l==0||l==t.width?null:0);for(let s=0;s<t.height;s++){const c=s*t.width+l;if(l>0&&l<t.width&&t.map[c-1]==t.map[c]){const i=t.map[c],a=o.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,xe(a.attrs,l-t.colCount(i))),s+=a.attrs.rowspan-1}else{const i=r==null?v(o.type.schema).cell:o.nodeAt(t.map[c+r]).type,a=t.positionAt(s,l,o);e.insert(e.mapping.map(n+a),i.createAndFill())}}return e}function dt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.left))}return!0}function ut(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.right))}return!0}function ft(e,{map:t,table:n,tableStart:o},l){const r=e.mapping.maps.length;for(let s=0;s<t.height;){const c=s*t.width+l,i=t.map[c],a=n.nodeAt(i),d=a.attrs;if(l>0&&t.map[c-1]==i||l<t.width-1&&t.map[c+1]==i)e.setNodeMarkup(e.mapping.slice(r).map(o+i),null,B(d,l-t.colCount(i)));else{const u=e.mapping.slice(r).map(o+i);e.delete(u,u+a.nodeSize)}s+=d.rowspan}}function ht(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let l=n.right-1;ft(o,n,l),l!=n.left;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(r)}t(o)}return!0}function pt(e,t,n){var o;const l=v(t.type.schema).header_cell;for(let r=0;r<e.width;r++)if(((o=t.nodeAt(e.map[r+n*e.width]))===null||o===void 0?void 0:o.type)!=l)return!1;return!0}function Ee(e,{map:t,tableStart:n,table:o},l){let r=n;for(let a=0;a<l;a++)r+=o.child(a).nodeSize;const s=[];let c=l>0?-1:0;pt(t,o,l+c)&&(c=l==0||l==t.height?null:0);for(let a=0,d=t.width*l;a<t.width;a++,d++)if(l>0&&l<t.height&&t.map[d]==t.map[d-t.width]){const u=t.map[d],f=o.nodeAt(u).attrs;e.setNodeMarkup(n+u,null,{...f,rowspan:f.rowspan+1}),a+=f.colspan-1}else{var i;const u=c==null?v(o.type.schema).cell:(i=o.nodeAt(t.map[d+c*t.width]))===null||i===void 0?void 0:i.type,f=u?.createAndFill();f&&s.push(f)}return e.insert(r,v(o.type.schema).row.create(null,s)),e}function mt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.top))}return!0}function gt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.bottom))}return!0}function wt(e,{map:t,table:n,tableStart:o},l){let r=0;for(let a=0;a<l;a++)r+=n.child(a).nodeSize;const s=r+n.child(l).nodeSize,c=e.mapping.maps.length;e.delete(r+o,s+o);const i=new Set;for(let a=0,d=l*t.width;a<t.width;a++,d++){const u=t.map[d];if(!i.has(u)){if(i.add(u),l>0&&u==t.map[d-t.width]){const f=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f,rowspan:f.rowspan-1}),a+=f.colspan-1}else if(l<t.height&&u==t.map[d+t.width]){const f=n.nodeAt(u),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),g=t.positionAt(l+1,a,n);e.insert(e.mapping.slice(c).map(o+g),h),a+=p.colspan-1}}}}function bt(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let l=n.bottom-1;wt(o,n,l),l!=n.top;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(n.table)}t(o)}return!0}function ce(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function Ct({width:e,height:t,map:n},o){let l=o.top*e+o.left,r=l,s=(o.bottom-1)*e+o.left,c=l+(o.right-o.left-1);for(let i=o.top;i<o.bottom;i++){if(o.left>0&&n[r]==n[r-1]||o.right<e&&n[c]==n[c+1])return!0;r+=e,c+=e}for(let i=o.left;i<o.right;i++){if(o.top>0&&n[l]==n[l-e]||o.bottom<t&&n[s]==n[s+e])return!0;l++,s++}return!1}function ae(e,t){const n=e.selection;if(!(n instanceof b)||n.$anchorCell.pos==n.$headCell.pos)return!1;const o=z(e),{map:l}=o;if(Ct(l,o))return!1;if(t){const r=e.tr,s={};let c=M.empty,i,a;for(let d=o.top;d<o.bottom;d++)for(let u=o.left;u<o.right;u++){const f=l.map[d*l.width+u],p=o.table.nodeAt(f);if(!(s[f]||!p))if(s[f]=!0,i==null)i=f,a=p;else{ce(p)||(c=c.append(p.content));const h=r.mapping.map(f+o.tableStart);r.delete(h,h+p.nodeSize)}}if(i==null||a==null)return!0;if(r.setNodeMarkup(i+o.tableStart,null,{...xe(a.attrs,a.attrs.colspan,o.right-o.left-a.attrs.colspan),rowspan:o.bottom-o.top}),c.size>0){const d=i+1+a.content.size,u=ce(a)?i+1:d;r.replaceWith(u+o.tableStart,d+o.tableStart,c)}r.setSelection(new b(r.doc.resolve(i+o.tableStart))),t(r)}return!0}function de(e,t){const n=v(e.schema);return yt(({node:o})=>n[o.type.spec.tableRole])(e,t)}function yt(e){return(t,n)=>{const o=t.selection;let l,r;if(o instanceof b){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;l=o.$anchorCell.nodeAfter,r=o.$anchorCell.pos}else{var s;if(l=Ze(o.$from),!l)return!1;r=(s=W(o.$from))===null||s===void 0?void 0:s.pos}if(l==null||r==null||l.attrs.colspan==1&&l.attrs.rowspan==1)return!1;if(n){let c=l.attrs;const i=[],a=c.colwidth;c.rowspan>1&&(c={...c,rowspan:1}),c.colspan>1&&(c={...c,colspan:1});const d=z(t),u=t.tr;for(let p=0;p<d.right-d.left;p++)i.push(a?{...c,colwidth:a&&a[p]?[a[p]]:null}:c);let f;for(let p=d.top;p<d.bottom;p++){let h=d.map.positionAt(p,d.left,d.table);p==d.top&&(h+=l.nodeSize);for(let g=d.left,m=0;g<d.right;g++,m++)g==d.left&&p==d.top||u.insert(f=u.mapping.map(h+d.tableStart,1),e({node:l,row:p,col:g}).createAndFill(i[m]))}u.setNodeMarkup(r,e({node:l,row:d.top,col:d.left}),i[0]),o instanceof b&&u.setSelection(new b(u.doc.resolve(o.$anchorCell.pos),f?u.doc.resolve(f):void 0)),n(u)}return!0}}function At(e,t){return function(n,o){if(!T(n))return!1;const l=J(n);if(l.nodeAfter.attrs[e]===t)return!1;if(o){const r=n.tr;n.selection instanceof b?n.selection.forEachCell((s,c)=>{s.attrs[e]!==t&&r.setNodeMarkup(c,null,{...s.attrs,[e]:t})}):r.setNodeMarkup(l.pos,null,{...l.nodeAfter.attrs,[e]:t}),o(r)}return!0}}function St(e){return function(t,n){if(!T(t))return!1;if(n){const o=v(t.schema),l=z(t),r=t.tr,s=l.map.cellsInRect(e=="column"?{left:l.left,top:0,right:l.right,bottom:l.map.height}:e=="row"?{left:0,top:l.top,right:l.map.width,bottom:l.bottom}:l),c=s.map(i=>l.table.nodeAt(i));for(let i=0;i<s.length;i++)c[i].type==o.header_cell&&r.setNodeMarkup(l.tableStart+s[i],o.cell,c[i].attrs);if(r.steps.length===0)for(let i=0;i<s.length;i++)r.setNodeMarkup(l.tableStart+s[i],o.header_cell,c[i].attrs);n(r)}return!0}}function ue(e,t,n){const o=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let l=0;l<o.length;l++){const r=t.table.nodeAt(o[l]);if(r&&r.type!==n.header_cell)return!1}return!0}function I(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?St(e):function(n,o){if(!T(n))return!1;if(o){const l=v(n.schema),r=z(n),s=n.tr,c=ue("row",r,l),i=ue("column",r,l),a=(e==="column"?c:e==="row"&&i)?1:0,d=e=="column"?{left:0,top:a,right:1,bottom:r.map.height}:e=="row"?{left:a,top:0,right:r.map.width,bottom:1}:r,u=e=="column"?i?l.cell:l.header_cell:e=="row"?c?l.cell:l.header_cell:l.cell;r.map.cellsInRect(d).forEach(f=>{const p=f+r.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,u,h.attrs)}),o(s)}return!0}}I("row",{useDeprecatedLogic:!0});I("column",{useDeprecatedLogic:!0});const vt=I("cell",{useDeprecatedLogic:!0});function Rt(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let o=e.index(-1)-1,l=e.before();o>=0;o--){const r=e.node(-1).child(o),s=r.lastChild;if(s)return l-1-s.nodeSize;l-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let o=e.indexAfter(-1),l=e.after();o<n.childCount;o++){const r=n.child(o);if(r.childCount)return l+1;l+=r.nodeSize}}return null}function fe(e){return function(t,n){if(!T(t))return!1;const o=Rt(J(t),e);if(o==null)return!1;if(n){const l=t.doc.resolve(o);n(t.tr.setSelection(H.between(l,tt(l))).scrollIntoView())}return!0}}function xt(e,t){const n=e.selection.$anchor;for(let o=n.depth;o>0;o--)if(n.node(o).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function j(e,t){const n=e.selection;if(!(n instanceof b))return!1;if(t){const o=e.tr,l=v(e.schema).cell.createAndFill().content;n.forEachCell((r,s)=>{r.content.eq(l)||o.replace(o.mapping.map(s+1),o.mapping.map(s+r.nodeSize-1),new L(l,0,0))}),o.docChanged&&t(o)}return!0}function Tt(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:o}=e;for(;t.childCount==1&&(n>0&&o>0||t.child(0).type.spec.tableRole=="table");)n--,o--,t=t.child(0).content;const l=t.child(0),r=l.type.spec.tableRole,s=l.type.schema,c=[];if(r=="row")for(let i=0;i<t.childCount;i++){let a=t.child(i).content;const d=i?0:Math.max(0,n-1),u=i<t.childCount-1?0:Math.max(0,o-1);(d||u)&&(a=oe(v(s).row,new L(a,d,u)).content),c.push(a)}else if(r=="cell"||r=="header_cell")c.push(n||o?oe(v(s).row,new L(t,n,o)).content:t);else return null;return Mt(s,c)}function Mt(e,t){const n=[];for(let l=0;l<t.length;l++){const r=t[l];for(let s=r.childCount-1;s>=0;s--){const{rowspan:c,colspan:i}=r.child(s).attrs;for(let a=l;a<l+c;a++)n[a]=(n[a]||0)+i}}let o=0;for(let l=0;l<n.length;l++)o=Math.max(o,n[l]);for(let l=0;l<n.length;l++)if(l>=t.length&&t.push(M.empty),n[l]<o){const r=v(e).cell.createAndFill(),s=[];for(let c=n[l];c<o;c++)s.push(r);t[l]=t[l].append(M.from(s))}return{height:t.length,width:o,rows:t}}function oe(e,t){const n=e.createAndFill();return new _e(n).replace(0,n.content.size,t).doc}function zt({width:e,height:t,rows:n},o,l){if(e!=o){const r=[],s=[];for(let c=0;c<n.length;c++){const i=n[c],a=[];for(let d=r[c]||0,u=0;d<o;u++){let f=i.child(u%i.childCount);d+f.attrs.colspan>o&&(f=f.type.createChecked(B(f.attrs,f.attrs.colspan,d+f.attrs.colspan-o),f.content)),a.push(f),d+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)r[c+p]=(r[c+p]||0)+f.attrs.colspan}s.push(M.from(a))}n=s,e=o}if(t!=l){const r=[];for(let s=0,c=0;s<l;s++,c++){const i=[],a=n[c%t];for(let d=0;d<a.childCount;d++){let u=a.child(d);s+u.attrs.rowspan>l&&(u=u.type.create({...u.attrs,rowspan:Math.max(1,l-u.attrs.rowspan)},u.content)),i.push(u)}r.push(M.from(i))}n=r,t=l}return{width:e,height:t,rows:n}}function Nt(e,t,n,o,l,r,s){const c=e.doc.type.schema,i=v(c);let a,d;if(l>t.width)for(let u=0,f=0;u<t.height;u++){const p=n.child(u);f+=p.nodeSize;const h=[];let g;p.lastChild==null||p.lastChild.type==i.cell?g=a||(a=i.cell.createAndFill()):g=d||(d=i.header_cell.createAndFill());for(let m=t.width;m<l;m++)h.push(g);e.insert(e.mapping.slice(s).map(f-1+o),h)}if(r>t.height){const u=[];for(let h=0,g=(t.height-1)*t.width;h<Math.max(t.width,l);h++){const m=h>=t.width?!1:n.nodeAt(t.map[g+h]).type==i.header_cell;u.push(m?d||(d=i.header_cell.createAndFill()):a||(a=i.cell.createAndFill()))}const f=i.row.create(null,M.from(u)),p=[];for(let h=t.height;h<r;h++)p.push(f);e.insert(e.mapping.slice(s).map(o+n.nodeSize-2),p)}return!!(a||d)}function he(e,t,n,o,l,r,s,c){if(s==0||s==t.height)return!1;let i=!1;for(let a=l;a<r;a++){const d=s*t.width+a,u=t.map[d];if(t.map[d-t.width]==u){i=!0;const f=n.nodeAt(u),{top:p,left:h}=t.findCell(u);e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(c).map(t.positionAt(s,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),a+=f.attrs.colspan-1}}return i}function pe(e,t,n,o,l,r,s,c){if(s==0||s==t.width)return!1;let i=!1;for(let a=l;a<r;a++){const d=a*t.width+s,u=t.map[d];if(t.map[d-1]==u){i=!0;const f=n.nodeAt(u),p=t.colCount(u),h=e.mapping.slice(c).map(u+o);e.setNodeMarkup(h,null,B(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(h+f.nodeSize,f.type.createAndFill(B(f.attrs,0,s-p))),a+=f.attrs.rowspan-1}}return i}function me(e,t,n,o,l){let r=n?e.doc.nodeAt(n-1):e.doc;if(!r)throw new Error("No table found");let s=C.get(r);const{top:c,left:i}=o,a=i+l.width,d=c+l.height,u=e.tr;let f=0;function p(){if(r=n?u.doc.nodeAt(n-1):u.doc,!r)throw new Error("No table found");s=C.get(r),f=u.mapping.maps.length}Nt(u,s,r,n,a,d,f)&&p(),he(u,s,r,n,i,a,c,f)&&p(),he(u,s,r,n,i,a,d,f)&&p(),pe(u,s,r,n,c,d,i,f)&&p(),pe(u,s,r,n,c,d,a,f)&&p();for(let h=c;h<d;h++){const g=s.positionAt(h,i,r),m=s.positionAt(h,a,r);u.replace(u.mapping.slice(f).map(g+n),u.mapping.slice(f).map(m+n),new L(l.rows[h-c],0,0))}p(),u.setSelection(new b(u.doc.resolve(n+s.positionAt(c,i,r)),u.doc.resolve(n+s.positionAt(d-1,a-1,r)))),t(u)}const Et=Oe({ArrowLeft:F("horiz",-1),ArrowRight:F("horiz",1),ArrowUp:F("vert",-1),ArrowDown:F("vert",1),"Shift-ArrowLeft":_("horiz",-1),"Shift-ArrowRight":_("horiz",1),"Shift-ArrowUp":_("vert",-1),"Shift-ArrowDown":_("vert",1),Backspace:j,"Mod-Backspace":j,Delete:j,"Mod-Delete":j});function K(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function F(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;if(r instanceof b)return K(n,o,E.near(r.$headCell,t));if(e!="horiz"&&!r.empty)return!1;const s=He(l,e,t);if(s==null)return!1;if(e=="horiz")return K(n,o,E.near(n.doc.resolve(r.head+t),t));{const c=n.doc.resolve(s),i=Re(c,e,t);let a;return i?a=E.near(i,1):t<0?a=E.near(n.doc.resolve(c.before(-1)),-1):a=E.near(n.doc.resolve(c.after(-1)),1),K(n,o,a)}}}function _(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;let s;if(r instanceof b)s=r;else{const i=He(l,e,t);if(i==null)return!1;s=new b(n.doc.resolve(i))}const c=Re(s.$headCell,e,t);return c?K(n,o,new b(s.$anchorCell,c)):!1}}function Ht(e,t){const n=e.state.doc,o=W(n.resolve(t));return o?(e.dispatch(e.state.tr.setSelection(new b(o))),!0):!1}function $t(e,t,n){if(!T(e.state))return!1;let o=Tt(n);const l=e.state.selection;if(l instanceof b){o||(o={width:1,height:1,rows:[M.from(oe(v(e.state.schema).cell,n))]});const r=l.$anchorCell.node(-1),s=l.$anchorCell.start(-1),c=C.get(r).rectBetween(l.$anchorCell.pos-s,l.$headCell.pos-s);return o=zt(o,c.right-c.left,c.bottom-c.top),me(e.state,e.dispatch,s,c,o),!0}else if(o){const r=J(e.state),s=r.start(-1);return me(e.state,e.dispatch,s,C.get(r.node(-1)).findCell(r.pos-s),o),!0}else return!1}function Lt(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;const o=ge(e,t.target);let l;if(t.shiftKey&&e.state.selection instanceof b)r(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&(l=W(e.state.selection.$anchor))!=null&&((n=Y(e,t))===null||n===void 0?void 0:n.pos)!=l.pos)r(l,t),t.preventDefault();else if(!o)return;function r(i,a){let d=Y(e,a);const u=$.getState(e.state)==null;if(!d||!ie(i,d))if(u)d=i;else return;const f=new b(i,d);if(u||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);u&&p.setMeta($,i.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",c),$.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta($,-1))}function c(i){const a=i,d=$.getState(e.state);let u;if(d!=null)u=e.state.doc.resolve(d);else if(ge(e,a.target)!=o&&(u=Y(e,t),!u))return s();u&&r(u,a)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",c)}function He(e,t,n){if(!(e.state.selection instanceof H))return null;const{$head:o}=e.state.selection;for(let l=o.depth-1;l>=0;l--){const r=o.node(l);if((n<0?o.index(l):o.indexAfter(l))!=(n<0?0:r.childCount))return null;if(r.type.spec.tableRole=="cell"||r.type.spec.tableRole=="header_cell"){const s=o.before(l),c=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(c)?s:null}}return null}function ge(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Y(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:o,pos:l}=n;return o>=0&&W(e.state.doc.resolve(o))||W(e.state.doc.resolve(l))}var kt=class{constructor(t,n){this.node=t,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),le(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,le(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function le(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a){for(let u=0,f=0;u<a.childCount;u++){const{colspan:p,colwidth:h}=a.child(u).attrs;for(let g=0;g<p;g++,f++){const m=l==f?r:h&&h[g],w=m?m+"px":"";if(s+=m||o,m||(c=!1),i)i.style.width!=w&&(i.style.width=w),i=i.nextSibling;else{const S=document.createElement("col");S.style.width=w,t.appendChild(S)}}}for(;i;){var d;const u=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=u}c?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const x=new se("tableColumnResizing");function Wt({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:o=kt,lastColumnResizable:l=!0}={}){const r=new ve({key:x,state:{init(s,c){var i;const a=(i=r.spec)===null||i===void 0||(i=i.props)===null||i===void 0?void 0:i.nodeViews,d=v(c.schema).table.name;return o&&a&&(a[d]=(u,f)=>new o(u,n,f)),new Bt(-1,!1)},apply(s,c){return c.apply(s)}},props:{attributes:s=>{const c=x.getState(s);return c&&c.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,c)=>{Dt(s,c,e,l)},mouseleave:s=>{It(s)},mousedown:(s,c)=>{Pt(s,c,t,n)}},decorations:s=>{const c=x.getState(s);if(c&&c.activeHandle>-1)return Vt(s,c.activeHandle)},nodeViews:{}}});return r}var Bt=class X{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,o=t.getMeta(x);if(o&&o.setHandle!=null)return new X(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new X(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&t.docChanged){let l=t.mapping.map(n.activeHandle,-1);return ne(t.doc.resolve(l))||(l=-1),new X(l,n.dragging)}return n}};function Dt(e,t,n,o){if(!e.editable)return;const l=x.getState(e.state);if(l&&!l.dragging){const r=jt(t.target);let s=-1;if(r){const{left:c,right:i}=r.getBoundingClientRect();t.clientX-c<=n?s=we(e,t,"left",n):i-t.clientX<=n&&(s=we(e,t,"right",n))}if(s!=l.activeHandle){if(!o&&s!==-1){const c=e.state.doc.resolve(s),i=c.node(-1),a=C.get(i),d=c.start(-1);if(a.colCount(c.pos-d)+c.nodeAfter.attrs.colspan-1==a.width-1)return}$e(e,s)}}}function It(e){if(!e.editable)return;const t=x.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&$e(e,-1)}function Pt(e,t,n,o){var l;if(!e.editable)return!1;const r=(l=e.dom.ownerDocument.defaultView)!==null&&l!==void 0?l:window,s=x.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const c=e.state.doc.nodeAt(s.activeHandle),i=Ot(e,s.activeHandle,c.attrs);e.dispatch(e.state.tr.setMeta(x,{setDragging:{startX:t.clientX,startWidth:i}}));function a(u){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",d);const f=x.getState(e.state);f?.dragging&&(Ft(e,f.activeHandle,be(f.dragging,u,n)),e.dispatch(e.state.tr.setMeta(x,{setDragging:null})))}function d(u){if(!u.which)return a(u);const f=x.getState(e.state);if(f&&f.dragging){const p=be(f.dragging,u,n);Ce(e,f.activeHandle,p,o)}}return Ce(e,s.activeHandle,i,o),r.addEventListener("mouseup",a),r.addEventListener("mousemove",d),t.preventDefault(),!0}function Ot(e,t,{colspan:n,colwidth:o}){const l=o&&o[o.length-1];if(l)return l;const r=e.domAtPos(t);let s=r.node.childNodes[r.offset].offsetWidth,c=n;if(o)for(let i=0;i<n;i++)o[i]&&(s-=o[i],c--);return s/c}function jt(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function we(e,t,n,o){const l=n=="right"?-o:o,r=e.posAtCoords({left:t.clientX+l,top:t.clientY});if(!r)return-1;const{pos:s}=r,c=W(e.state.doc.resolve(s));if(!c)return-1;if(n=="right")return c.pos;const i=C.get(c.node(-1)),a=c.start(-1),d=i.map.indexOf(c.pos-a);return d%i.width==0?-1:a+i.map[d-1]}function be(e,t,n){const o=t.clientX-e.startX;return Math.max(n,e.startWidth+o)}function $e(e,t){e.dispatch(e.state.tr.setMeta(x,{setHandle:t}))}function Ft(e,t,n){const o=e.state.doc.resolve(t),l=o.node(-1),r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1,i=e.state.tr;for(let a=0;a<r.height;a++){const d=a*r.width+c;if(a&&r.map[d]==r.map[d-r.width])continue;const u=r.map[d],f=l.nodeAt(u).attrs,p=f.colspan==1?0:c-r.colCount(u);if(f.colwidth&&f.colwidth[p]==n)continue;const h=f.colwidth?f.colwidth.slice():_t(f.colspan);h[p]=n,i.setNodeMarkup(s+u,null,{...f,colwidth:h})}i.docChanged&&e.dispatch(i)}function Ce(e,t,n,o){const l=e.state.doc.resolve(t),r=l.node(-1),s=l.start(-1),c=C.get(r).colCount(l.pos-s)+l.nodeAfter.attrs.colspan-1;let i=e.domAtPos(l.start(-1)).node;for(;i&&i.nodeName!="TABLE";)i=i.parentNode;i&&le(r,i.firstChild,i,o,c,n)}function _t(e){return Array(e).fill(0)}function Vt(e,t){const n=[],o=e.doc.resolve(t),l=o.node(-1);if(!l)return Q.empty;const r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let a=0;a<r.height;a++){const d=c+a*r.width;if((c==r.width-1||r.map[d]!=r.map[d+1])&&(a==0||r.map[d]!=r.map[d-r.width])){var i;const u=r.map[d],f=s+u+l.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((i=x.getState(e))===null||i===void 0)&&i.dragging&&n.push(Z.node(s+u,s+u+l.nodeAt(u).nodeSize,{class:"column-resize-dragging"})),n.push(Z.widget(f,p))}}return Q.create(e.doc,n)}function Kt({allowTableNodeSelection:e=!1}={}){return new ve({key:$,state:{init(){return null},apply(t,n){const o=t.getMeta($);if(o!=null)return o==-1?null:o;if(n==null||!t.docChanged)return n;const{deleted:l,pos:r}=t.mapping.mapResult(n);return l?null:r}},props:{decorations:lt,handleDOMEvents:{mousedown:Lt},createSelectionBetween(t){return $.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Ht,handleKeyDown:Et,handlePaste:$t},appendTransaction(t,n,o){return it(o,ze(o,n),e)}})}function U(e){return e==="left"||e==="right"||e==="center"?e:null}function Xt(e){const t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return U(t||n)}function qt(e){return U(e?.align)}function Le(){return{default:null,parseHTML:e=>Xt(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}function Ut(e){var t;const n=e.parentElement,o=e.closest("table");if(!n||!o)return null;const l=Array.from(n.children).indexOf(e),r=(t=o.querySelectorAll("colgroup > col")[l])===null||t===void 0?void 0:t.getAttribute("width");return r?[parseInt(r,10)]:null}function ke(e){const t=e.getAttribute("colwidth");return t?t.split(",").map(n=>parseInt(n,10)):Ut(e)}const Jt=/[ \t\r\n\f]+/g;function We(e){var t;return e.children.length>0?!1:((t=e.textContent)!==null&&t!==void 0?t:"").replace(Jt,"")===""}function Be(e){const t=e.createAndFill();if(!t)throw new Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}const Gt=P.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",k(this.options.HTMLAttributes,e),0]}}),Yt=P.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",k(this.options.HTMLAttributes,e),0]}}),Qt=P.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",k(this.options.HTMLAttributes,e),0]}});function re(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function ye(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a!==null)for(let f=0,p=0;f<a.childCount;f+=1){const{colspan:h,colwidth:g}=a.child(f).attrs;for(let m=0;m<h;m+=1,p+=1){const w=l===p?r:g&&g[m],S=w?`${w}px`:"";if(s+=w||o,w||(c=!1),i){if(i.style.width!==S){const[y,A]=re(o,w);i.style.setProperty(y,A)}i=i.nextSibling}else{const y=document.createElement("col"),[A,R]=re(o,w);y.style.setProperty(A,R),t.appendChild(y)}}}for(;i;){var d;const f=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=f}const u=e.attrs.style&&typeof e.attrs.style=="string"&&/\bwidth\s*:/i.test(e.attrs.style);c&&!u?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}var Zt=class{constructor(e,t,n,o={}){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(const[l,r]of Object.entries(o))r!=null&&(l==="style"?this.table.style.cssText=String(r):this.table.setAttribute(l,String(r)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ye(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,ye(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){const t=e.target,n=this.dom.contains(t),o=this.contentDOM.contains(t);return!!(n&&!o&&(e.type==="attributes"||e.type==="childList"||e.type==="characterData"))}};function en(e,t,n,o){let l=0,r=!0;const s=[],c=e.firstChild;if(!c)return{};for(let d=0,u=0;d<c.childCount;d+=1){const{colspan:f,colwidth:p}=c.child(d).attrs;for(let h=0;h<f;h+=1,u+=1){const g=n===u?o:p&&p[h];l+=g||t,g||(r=!1);const[m,w]=re(t,g);s.push(["col",{style:`${m}: ${w}`}])}}const i=r?`${l}px`:"",a=r?"":`${l}px`;return{colgroup:["colgroup",{},...s],tableWidth:i,tableMinWidth:a}}function Ae(e,t){return e.createAndFill()}function tn(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const o=e.nodes[n];o.spec.tableRole&&(t[o.spec.tableRole]=o)}),e.cached.tableNodeTypes=t,t}function nn(e,t,n,o,l){const r=tn(e),s=[],c=[];for(let a=0;a<n;a+=1){const d=Ae(r.cell);if(d&&c.push(d),o){const u=Ae(r.header_cell);u&&s.push(u)}}const i=[];for(let a=0;a<t;a+=1)i.push(r.row.createChecked(null,o&&a===0?s:c));return r.table.createChecked(null,i)}function on(e){return e instanceof b}const V=({editor:e})=>{const{selection:t}=e.state;if(!on(t))return!1;let n=0;const o=q(t.ranges[0].$from,l=>l.type.name==="table");return o?.node.descendants(l=>{if(l.type.name==="table")return!1;["tableCell","tableHeader"].includes(l.type.name)&&(n+=1)}),n!==t.ranges.length?!1:(e.commands.deleteTable(),!0)};function Se(e,t){const n=e.mapping.map(t),o=q(e.selection.$from,s=>s.type.name==="table");if(o?.pos===n)return;const l=e.doc.nodeAt(n);if(!l)return;const r=n+l.nodeSize-1;e.setSelection(H.near(e.doc.resolve(r),-1))}function ln(e){let t="",n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}if(e[n]!=="`"){t+=e[n++];continue}let o=0;for(;n+o<e.length&&e[n+o]==="`";)o+=1;let l=n+o,r=!1;for(;l<e.length;){if(e[l]!=="`"){l+=1;continue}let s=0;for(;l+s<e.length&&e[l+s]==="`";)s+=1;if(s===o){const c=e.slice(n+o,l);t+=e.slice(n,n+o)+c.replace(/\\\||\|/g,i=>i==="|"?"\\|":i)+e.slice(l,l+o),n=l+o,r=!0;break}l+=s}r||(t+=e.slice(n,n+o),n+=o)}return t}function rn(e){return e.split(`
2
2
  `).map(t=>!t.includes("|")||!t.includes("`")?t:ln(t)).join(`
3
3
  `)}function sn(e){return(e||"").replace(/\s+/g," ").trim()}function cn(e,t,n={}){var o;const l=(o=n.cellLineSeparator)!==null&&o!==void 0?o:"";if(!e||!e.content||e.content.length===0)return"";const r=[];e.content.forEach(h=>{const g=[];h.content&&h.content.forEach(m=>{let w="";m.content&&Array.isArray(m.content)&&m.content.length>1?w=m.content.map(R=>t.renderChildren(R)).join(l):w=m.content?t.renderChildren(m.content):"";const S=sn(w.split(l).join(`
4
4
  `).replace(/[ \t]*\r?\n[ \t]*/g,"<br>")),y=m.type==="tableHeader",A=qt(m.attrs);g.push({text:S,isHeader:y,align:A})}),r.push(g)});const s=r.reduce((h,g)=>Math.max(h,g.length),0);if(s===0)return"";const c=Array.from({length:s}).fill(0);r.forEach(h=>{for(let m=0;m<s;m+=1){var g;const w=(((g=h[m])===null||g===void 0?void 0:g.text)||"").length;w>c[m]&&(c[m]=w),c[m]<3&&(c[m]=3)}});const i=(h,g)=>h+" ".repeat(Math.max(0,g-h.length)),a=r[0],d=a.some(h=>h.isHeader),u=Array.from({length:s}).fill(null);r.forEach(h=>{for(let m=0;m<s;m+=1){var g;!u[m]&&(!((g=h[m])===null||g===void 0)&&g.align)&&(u[m]=h[m].align)}});let f=`
@@ -1,4 +1,4 @@
1
- import{c as ue,r as xe,d as ns,a4 as ht,b as Pe,j as t,B as je,t as dt,aW as Wt,ak as as,K as bt,i as Et,a5 as As,m as ot,gE as _s,o as cs,h as Ks,d_ as Us,ab as Vs,L as qs,u as Hs,n as _t,E as Yt,R as Bs,dU as Js,hd as Gs,T as Qs,W as Ws,I as Xt}from"./index-BbyUQV-V.js";import{S as Ys}from"./search-input-Dx1nMhkR.js";import{E as Ht}from"./empty-state-DGvmXTTx.js";import{R as Xs}from"./require-capability-BdZtDVPs.js";import{f as js}from"./pair-Dg8_WzRx.js";import{b as ts}from"./use-connection-Q1OVyR-K.js";import{g as Ps}from"./connection-slug-Dsjc_7jc.js";import{B as Lt}from"./badge-ooD-f3Xm.js";import{P as ds,a as ms,b as us}from"./popover-B2fZ96W0.js";import{c as Pt,T as Dt,a as Rt,b as Zs}from"./tooltip-CINPZAUE.js";import{z as fs,e as Ut,bw as el,aw as Ns,K as tl}from"./agent-icon-Djmp3uF_.js";import{i as sl}from"./Key01-BMD-TEa8.js";import{i as ll}from"./Play-DEfGDCy-.js";import{MonacoCodeEditor as bs}from"./monaco-editor-BTeatlwM.js";import{u as rl}from"./use-mcp-client-KtY-iAqe.js";import{u as il}from"./repository-binding-CYxPGVF9.js";import{n as Ot}from"./LinkBroken01-Chn3Zw95.js";import{c as ol}from"./SwitchHorizontal01-CFbhgx88.js";import{s as nl}from"./Plus-C2jbSKfe.js";import{s as al}from"./Trash01-D20QdwlW.js";import{M as zt}from"./multi-select-xFJ9DMUE.js";import{b as yt,a as wt,c as ze,d as St,S as Ct}from"./select-CaROtCr6.js";import{e as ys,T as cl}from"./time-range-picker-DLzufi0f.js";import{T as dl}from"./textarea-Co6WXg3Y.js";import{C as Ds}from"./collection-tabs-BbqMtY-J.js";import{S as ml}from"./switch-BH2QiW4s.js";import{L as ul}from"./label-BlFTNuxs.js";import{I as It}from"./integration-icon-CqVW6T00.js";import{A as fl,a as xl,b as pl}from"./alert-DodlNZ2z.js";import{K as gt}from"./monitoring-stats-row-Ca0svB-0.js";import{b as Bt}from"./use-entitlements-D_bekXoy.js";import{g as gl,b as ws,f as Nt,c as Zt,d as hl,e as Ss,a as xs,h as vl,i as ps,T as jl,j as Nl,r as bl,k as yl}from"./thread-sheet-body-BruhHKIO.js";import{u as wl}from"./useSuspenseInfiniteQuery-B00pnfIH.js";import{c as Sl,S as Cl,b as Rs,a as Ls}from"./sheet-um4noh5c.js";import{c as _e,b as vt,d as Jt,e as Gt,T as ge,a as Qt}from"./table-C92UEJKy.js";import{t as ss}from"./ChevronDown-COkNoLwk.js";import{n as ls}from"./ChevronUp-C-YGqatN.js";import{u as Os}from"./use-id-selection-B5eFUC_T.js";import{u as Fs}from"./use-infinite-scroll-K5fXsA2s.js";import{u as Il}from"./useInfiniteQuery-L4kwu3zj.js";import{g as Tl}from"./task-status-DA1DjG6p.js";import{u as kl,d as Ml}from"./use-automations-Da6nezmh.js";import{A as _l}from"./automation-runs-Ci5bOvQY.js";import{i as Pl}from"./ArrowLeft-B2F854r0.js";import{E as Cs}from"./empty-state-DgS_yB9S.js";import{O as $s}from"./watch-sse-pool-TBuzagYQ.js";import{t as Dl}from"./task-key-CaAm1Jwf.js";import{b as Rl,r as Ll,O as Ol,e as Fl}from"./order-monitor-day-DfBlxxW3.js";import{F as $l}from"./feature-gate-BwfJl_-J.js";import"./SearchMd-DIZIcq-T.js";import"./access-gate-ys146buF.js";import"./capability-load-error-D-MJtSCR.js";import"./Tool01-BIyGNKrn.js";import"./ArrowRight-Dj2pC8B7.js";import"./collapsible-bv19Lgop.js";import"./use-copy-CHLJB-eJ.js";import"./usage-stats-DTw2_3QF.js";import"./utils-CVEq3hMx.js";import"./markdown-BLD58IcZ.js";import"./chat-context-Bb_Yeasx.js";import"./use-panel-navigate-m_WUKcO1.js";import"./thread-route-B-vrKdst.js";import"./use-project-scope-tAmzLFmo.js";import"./use-view-draft-kind-eAKU4tzG.js";import"./use-blog-view-B5vAwn2e.js";import"./use-organization-settings-C_xGXqYD.js";import"./schema-DvznvyNF.js";import"./task-board-_DSzqPWi.js";import"./thread-intent-BNjS3eKm.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./session-runtime-B3M5aN-q.js";import"./use-ai-providers-BxpYBICM.js";import"./use-current-view-DWPEJKMo.js";import"./use-in-settings-DsvAK9xJ.js";import"./use-decopilot-events-Bzy3gyOh.js";import"./use-mobile-BFnx6XU5.js";import"./File02-CNdUOOeH.js";import"./gateway-client-GUKS8Neg.js";import"./form-C_3nPlqc.js";import"./UserCheck01-BNqLXBfG.js";import"./use-task-board-items-FrK4WjzX.js";import"./config-BW2WE8-w.js";import"./AlertCircle-Di8a-UWV.js";import"./CheckCircle-UAsyLWI7.js";import"./Eye-C6rTinUa.js";import"./task-route-DLJKfX0K.js";import"./project-index-lWz60EWQ.js";import"./TrendUp01-yJId_zlL.js";import"./shell-layout-49bNXIez.js";import"./Globe04-AW14Waq3.js";import"./UserSquare-BJ8rQzrf.js";import"./use-deployment-admin-44Nr2y3l.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-BeMmbmRj.js";import"./use-org-notice-DiGO_5sP.js";import"./Monitor01-BNRBENLp.js";import"./Zap-DnTlLwWn.js";import"./command-BUJZW101.js";import"./index-Bu3usBwV.js";import"./project-icon-BbR0XGm1.js";import"./use-navigate-to-agent-DzfMLwHb.js";import"./use-debounced-value-CDV_Hdj_.js";import"./new-project-dialog-CwWe9JTm.js";import"./repository-picker-BwLPliw3.js";import"./github-icon-F-zWm9rJ.js";import"./collection-search-CT3oHQLL.js";import"./BookOpen01-CHggQBWj.js";import"./ShoppingBag01-CVfO_hCG.js";import"./new-project-store-DI-rcaGT.js";import"./legacy-admin-welcome-dialog-BeUx4hhs.js";import"./drawer-9dr-ukqt.js";import"./required-auth-layout-CEv7xMbD.js";import"./use-org-sso-BqAhMDLF.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C3N-ooKA.js";import"./types-KLF33bAU.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./Image01-xPHq6tUP.js";import"./use-mcp-prompts-hYH8zGss.js";import"./use-thread-outputs-BYENDfew.js";import"./file-type-icon-BBC7AgSm.js";import"./index-kCYHIAlq.js";import"./ArrowUp-Nhgapjwm.js";import"./ChevronSelectorVertical-Buxlf1yx.js";import"./CreditCard01-CRi7On3u.js";import"./MessageCircle01-CeeL61Zn.js";import"./LayoutLeft-5PR-LA5J.js";import"./Minus-CxmZj9NQ.js";import"./Sun-CPfe1reh.js";import"./Upload01-C9Bt1TSM.js";import"./Users01-BF_7Ge84.js";import"./editor-OtYf9TpJ.js";import"./auth-dN38N6ZJ.js";import"./checkbox-B0iej-k4.js";import"./index-BdQq_4o_.js";import"./scroll-area-BJzMdjhR.js";import"./calendar-Dfc1FCTZ.js";import"./chart-uUI_EY97.js";import"./CategoricalChart-BYLFXXdR.js";import"./index-CZNM0ywV.js";import"./tooltipContext-B7kIVm-_.js";import"./CartesianChart-BFVggI3G.js";import"./AreaChart-CCqrcx1b.js";import"./infiniteQueryObserver-DqRBsy9_.js";import"./useQueries-DFX8Ra2q.js";import"./ReferenceLine-D9-8u9ny.js";import"./feature-paywall-CEAWGxEK.js";import"./plan-ladder-i51kvc_6.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},zl=["eq","contains","exists","in"];function El(s){return zl.includes(s)}function jt(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function Al(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:i&&El(i)?i:"eq",value:decodeURIComponent(m.join(":")||"")}}).filter(e=>e!==void 0)}function Vt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{c as ue,r as xe,d as ns,a4 as ht,b as Pe,j as t,B as je,t as dt,aW as Wt,ak as as,K as bt,i as Et,a5 as As,m as ot,gE as _s,o as cs,h as Ks,d_ as Us,ab as Vs,L as qs,u as Hs,n as _t,E as Yt,R as Bs,dU as Js,hd as Gs,T as Qs,W as Ws,I as Xt}from"./index-D0JbJFfP.js";import{S as Ys}from"./search-input-jt6Xgx4B.js";import{E as Ht}from"./empty-state-DTiQvFTm.js";import{R as Xs}from"./require-capability-BgMHtUR9.js";import{f as js}from"./pair-DyZ1K8WQ.js";import{b as ts}from"./use-connection-BlwEJ6QU.js";import{g as Ps}from"./connection-slug-CceJbleR.js";import{B as Lt}from"./badge-DUPpSRXM.js";import{P as ds,a as ms,b as us}from"./popover-CHMhtCUs.js";import{c as Pt,T as Dt,a as Rt,b as Zs}from"./tooltip-bcUJYhL_.js";import{z as fs,e as Ut,bw as el,aw as Ns,K as tl}from"./agent-icon-Cz4yRQtC.js";import{i as sl}from"./Key01-DeYX7L_Z.js";import{i as ll}from"./Play-DWEq3LWP.js";import{MonacoCodeEditor as bs}from"./monaco-editor-Durke4zw.js";import{u as rl}from"./use-mcp-client-Cnv47oK4.js";import{u as il}from"./repository-binding-BkeJ2CtJ.js";import{n as Ot}from"./LinkBroken01-DBUc-42w.js";import{c as ol}from"./SwitchHorizontal01-B_WFRgSk.js";import{s as nl}from"./Plus-n5KTXyCz.js";import{s as al}from"./Trash01-uKrzOq5g.js";import{M as zt}from"./multi-select-3B0TZSKv.js";import{b as yt,a as wt,c as ze,d as St,S as Ct}from"./select-CHNsjY6K.js";import{e as ys,T as cl}from"./time-range-picker-BL4eezN1.js";import{T as dl}from"./textarea-DKKpu4j7.js";import{C as Ds}from"./collection-tabs--r5IslTr.js";import{S as ml}from"./switch-DLa18g9P.js";import{L as ul}from"./label-Cz2ESzy4.js";import{I as It}from"./integration-icon-BkEHXL5H.js";import{A as fl,a as xl,b as pl}from"./alert-Cqlm2lSd.js";import{K as gt}from"./monitoring-stats-row-7dJGk5QN.js";import{b as Bt}from"./use-entitlements-hCyBXtuJ.js";import{g as gl,b as ws,f as Nt,c as Zt,d as hl,e as Ss,a as xs,h as vl,i as ps,T as jl,j as Nl,r as bl,k as yl}from"./thread-sheet-body-2n-7Buvv.js";import{u as wl}from"./useSuspenseInfiniteQuery-CnPwOZuW.js";import{c as Sl,S as Cl,b as Rs,a as Ls}from"./sheet-DQnddENA.js";import{c as _e,b as vt,d as Jt,e as Gt,T as ge,a as Qt}from"./table-DwE6kXVm.js";import{t as ss}from"./ChevronDown-kKxnMd3L.js";import{n as ls}from"./ChevronUp-DQNUTs5_.js";import{u as Os}from"./use-id-selection-pnESFlAH.js";import{u as Fs}from"./use-infinite-scroll-47R6Hyro.js";import{u as Il}from"./useInfiniteQuery-fnTqEMy9.js";import{g as Tl}from"./task-status-bSdxlxRQ.js";import{u as kl,d as Ml}from"./use-automations-CkV07sTy.js";import{A as _l}from"./automation-runs-B94owQKr.js";import{i as Pl}from"./ArrowLeft-D0b8Szk5.js";import{E as Cs}from"./empty-state-DR046JV4.js";import{O as $s}from"./watch-sse-pool-C4P_vqWF.js";import{t as Dl}from"./task-key-kJFx4e2o.js";import{b as Rl,r as Ll,O as Ol,e as Fl}from"./order-monitor-day-DCDAwCcy.js";import{F as $l}from"./feature-gate-Ce8P1I_1.js";import"./SearchMd-B9v3gV_V.js";import"./access-gate-DlMcB91s.js";import"./capability-load-error-BUnR6hyi.js";import"./Tool01-C3qOO4-2.js";import"./ArrowRight-uaCgEM_Q.js";import"./collapsible-BpmZcmV-.js";import"./use-copy-CLDbNfFh.js";import"./usage-stats-D_d2D8Wj.js";import"./utils-CVEq3hMx.js";import"./markdown-tL6sdqzq.js";import"./chat-context-CYn-8MTb.js";import"./use-panel-navigate-CAZIXqmL.js";import"./thread-route-yhTv7wYw.js";import"./use-project-scope-DA6OZsHG.js";import"./use-view-draft-kind-2ZPvA4uU.js";import"./use-blog-view-DuP6av7s.js";import"./use-organization-settings-PllK3r0i.js";import"./schema-ClQSeEkW.js";import"./task-board-V6fHxbUs.js";import"./thread-intent-dNVrC8sL.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./session-runtime-Af7XCW1y.js";import"./use-ai-providers-CA-khqag.js";import"./use-current-view-BOFMyET9.js";import"./use-in-settings-1MICTjP9.js";import"./use-decopilot-events-g19xYjLG.js";import"./use-mobile-DXgcDHnH.js";import"./File02-DAf1emIR.js";import"./gateway-client-Cjf9YZgG.js";import"./form-kDDI268e.js";import"./UserCheck01-CI1951yc.js";import"./use-task-board-items-uhqh6PNR.js";import"./config-BzgM9JXs.js";import"./AlertCircle-8ukcBvl4.js";import"./CheckCircle-u2h4KcPu.js";import"./Eye-_E24hwz9.js";import"./task-route-DFPlSt_R.js";import"./project-index-n6zIw3HS.js";import"./TrendUp01-DpUK5xLp.js";import"./shell-layout-8n97Gfv2.js";import"./Globe04-jdIYuCcn.js";import"./UserSquare-BzGvxH2o.js";import"./use-deployment-admin-D5oW79CT.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-DGEX5GIv.js";import"./use-org-notice-DuKnnmVo.js";import"./Monitor01-C_gVCCps.js";import"./Zap-VLndYrUw.js";import"./command-B1uSCDOs.js";import"./index-D2_PsRqT.js";import"./project-icon-EAm2TPOd.js";import"./use-navigate-to-agent-Jn9AHv5I.js";import"./use-debounced-value-CKJPodTI.js";import"./new-project-dialog-DpI3oirN.js";import"./repository-picker-BjO-oJEQ.js";import"./github-icon-DtM4VHDi.js";import"./collection-search-BpPD1cYG.js";import"./BookOpen01-5XPZR6TG.js";import"./ShoppingBag01-C0IQtOHj.js";import"./new-project-store-CU2miSo6.js";import"./legacy-admin-welcome-dialog-D7LEWnzk.js";import"./drawer-yBtPHk5P.js";import"./required-auth-layout-DtC4GqSJ.js";import"./use-org-sso-D1j0oTnH.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BhIn7g4y.js";import"./types-BfjfZI1L.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./Image01-Cl7yRuHs.js";import"./use-mcp-prompts-BEiCSVNE.js";import"./use-thread-outputs-D_-5CcDB.js";import"./file-type-icon-B2pfAj_l.js";import"./index-Ccvx4l8u.js";import"./ArrowUp-K5jCRsZA.js";import"./ChevronSelectorVertical-DKxNhUwA.js";import"./CreditCard01-DbaKJfT8.js";import"./MessageCircle01-D1JzchO_.js";import"./LayoutLeft-BQdYjjc6.js";import"./Minus-DBYcv290.js";import"./Sun-CYLgqf2D.js";import"./Upload01-B5by2C-2.js";import"./Users01-hxkP_BcE.js";import"./editor-CAoNl87t.js";import"./auth-B-QpuT1-.js";import"./checkbox-CWfz72Eg.js";import"./index-BdQq_4o_.js";import"./scroll-area-D27AfOYB.js";import"./calendar-4vmCSMCw.js";import"./chart-Bv5K7YpV.js";import"./CategoricalChart-BPZdBlVt.js";import"./index-Uvh2dd2d.js";import"./tooltipContext-DEGZ2uVc.js";import"./CartesianChart-C4hmdW3d.js";import"./AreaChart-B6hqu-pW.js";import"./infiniteQueryObserver-DtEzALgC.js";import"./useQueries-CmlQ5ude.js";import"./ReferenceLine-DEVTnbj2.js";import"./feature-paywall-BHeChQEf.js";import"./plan-ladder-C4IQnf9g.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},zl=["eq","contains","exists","in"];function El(s){return zl.includes(s)}function jt(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function Al(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:i&&El(i)?i:"eq",value:decodeURIComponent(m.join(":")||"")}}).filter(e=>e!==void 0)}function Vt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function Is(s){return s.trim()?s.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...i]=e.split("=");return{key:l||"",operator:"eq",value:i.join("=")}}if(e.includes("~")){const[l,...i]=e.split("~");return{key:l||"",operator:"contains",value:i.join("~")}}if(e.includes("@")){const[l,...i]=e.split("@");return{key:l||"",operator:"in",value:i.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Kl(s){const e={},l={},i=[],m={};for(const n of s)if(n.key.trim())switch(n.operator){case"eq":n.value&&(e[n.key]=n.value);break;case"contains":n.value&&(l[n.key]=`%${n.value}%`);break;case"exists":i.push(n.key);break;case"in":n.value&&(m[n.key]=n.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:i.length>0?i:void 0,propertyInValues:Object.keys(m).length>0?m:void 0}}function Ts(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const i=l.length;return i<=rs.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:i}:{content:l.slice(0,rs.maxJsonRenderSize)+`
4
4
 
@@ -1 +1 @@
1
- import{c as j,ar as W,at as q,b as E,r as z,d as G,j as o,aR as $,R as I,P as N,n as U,B as k,b5 as V}from"./index-BbyUQV-V.js";import{u as K}from"./use-mobile-BFnx6XU5.js";import{T as Y,a as Z,c as J}from"./tooltip-CINPZAUE.js";import{t as Q,a as X}from"./MessageCircle01-CeeL61Zn.js";import{s as ee}from"./XClose-BeMmbmRj.js";import{b as te}from"./thread-button-8Paou_ey.js";import{T as ne}from"./toolbar-icon-button-CKwtmkGZ.js";import{b as se,R as oe,a as D}from"./resizable-CDz_Gn5D.js";import{c as re,r as ie,m as le}from"./use-chat-layout-state-BmTxsTjG.js";import{R as ae}from"./route-page-header-BtRFuS1p.js";import"./index-kCYHIAlq.js";import"./use-sidebar-collapsed-DonGXxtx.js";import"./sheet-um4noh5c.js";import"./use-in-settings-DsvAK9xJ.js";import"./use-panel-navigate-m_WUKcO1.js";import"./thread-route-B-vrKdst.js";import"./use-project-scope-tAmzLFmo.js";import"./repository-binding-CYxPGVF9.js";import"./use-mcp-client-KtY-iAqe.js";import"./auth-dN38N6ZJ.js";import"./LayoutLeft-5PR-LA5J.js";import"./use-current-view-DWPEJKMo.js";function A(t,e){const n=typeof t=="number"?t:Number(t);return!Number.isFinite(n)||n<=0||n>=100?e:n}function ce(t,e){const n=j.c(8);let r;n[0]!==e?(r=c=>A(c,e),n[0]=e,n[1]=r):r=n[1];const[i,l]=W(t,r);let s;n[2]!==e||n[3]!==i?(s=A(i,e),n[2]=e,n[3]=i,n[4]=s):s=n[4];let a;return n[5]!==l||n[6]!==s?(a=[s,l],n[5]=l,n[6]=s,n[7]=a):a=n[7],a}const ue=33;function de(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=q.sidePanelWidth(),t[0]=e):e=t[0],ce(e,ue)}const P="chat-layout-thread",M="chat-layout-content",H="320px",O=z.createContext(null);function Fe(){return T()}function fe(){return z.use(O)}function T(){const t=z.use(O);if(!t)throw new Error("ChatLayout regions require a ChatLayout");return t}function he(t){const e=j.c(22),{children:n,...r}=t,i=K(),l=G(),s=z.useRef(null),[a,c]=de(),{threadOpen:u,contentOpen:d}=r,h=re(r),m=u&&d?a:h.side,p=100-m,y=b=>{const v=b.getLayout(),w=v[P],S=v[M];typeof w!="number"||typeof S!="number"||Math.abs(w-m)<.001&&Math.abs(S-p)<.001||b.setLayout({[P]:m,[M]:p})},C=ie(r);let x;e[0]!==i||e[1]!==r||e[2]!==C?(x={...r,isMobile:i,mobileSurface:C},e[0]=i,e[1]=r,e[2]=C,e[3]=x):x=e[3];const f=x;let g;e[4]!==i||e[5]!==r||e[6]!==l||e[7]!==f?(g=i&&!r.threadless&&o.jsx(te,{open:f.mobileSurface==="chat",onToggle:()=>{l({to:".",search:b=>({...b,...le(f.mobileSurface==="chat"?"main":"chat")}),replace:!0})}}),e[4]=i,e[5]=r,e[6]=l,e[7]=f,e[8]=g):g=e[8];let L;e[9]!==n||e[10]!==d||e[11]!==p||e[12]!==i||e[13]!==c||e[14]!==y||e[15]!==u||e[16]!==m?(L=i?o.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:n}):o.jsx(oe,{ref:b=>{if(s.current=b,!b)return;let v=!0;return queueMicrotask(()=>{v&&y(b)}),()=>{v=!1,s.current===b&&(s.current=null)}},defaultLayout:{[P]:m,[M]:p},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0",style:{overflow:"visible"},onLayoutChanged:(b,v)=>{const{isUserInteraction:w}=v;if(!w){const B=s.current;B&&y(B);return}const S=b[P];u&&d&&typeof S=="number"&&S>0&&S<100&&c(S)},children:n}),e[9]=n,e[10]=d,e[11]=p,e[12]=i,e[13]=c,e[14]=y,e[15]=u,e[16]=m,e[17]=L):L=e[17];let _;return e[18]!==g||e[19]!==L||e[20]!==f?(_=o.jsxs(O,{value:f,children:[g,L]}),e[18]=g,e[19]=L,e[20]=f,e[21]=_):_=e[21],_}function me(t){const e=j.c(14),{children:n,topbar:r}=t,i=T();if(i.isMobile){let u;return e[0]!==n||e[1]!==i.mobileSurface||e[2]!==r?(u=i.mobileSurface==="chat"?o.jsxs(N,{variant:"plain","data-slot":"chat-layout-thread",children:[r,o.jsx(N.Content,{"data-testid":"chat-panel",children:n})]}):null,e[0]=n,e[1]=i.mobileSurface,e[2]=r,e[3]=u):u=e[3],u}if(!i.threadOpen)return null;let l;e[4]!==i.contentOpen?(l=i.contentOpen&&o.jsx(se,{className:"bg-sidebar"}),e[4]=i.contentOpen,e[5]=l):l=e[5];let s;e[6]!==n?(s=o.jsx(N.Content,{"data-testid":"chat-panel",children:n}),e[6]=n,e[7]=s):s=e[7];let a;e[8]!==s||e[9]!==r?(a=o.jsx(D,{id:P,defaultSize:"33%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsx("div",{className:"h-full min-h-0 p-0.5",children:o.jsxs(N,{"data-testid":"side-panel",children:[r,s]})})}),e[8]=s,e[9]=r,e[10]=a):a=e[10];let c;return e[11]!==l||e[12]!==a?(c=o.jsxs(o.Fragment,{children:[l,a]}),e[11]=l,e[12]=a,e[13]=c):c=e[13],c}function F(t){const e=j.c(10),{label:n,pressed:r,onClick:i,children:l}=t;let s;e[0]!==l||e[1]!==n||e[2]!==i||e[3]!==r?(s=o.jsx(Y,{asChild:!0,children:o.jsx(ne,{"aria-label":n,"aria-pressed":r,onClick:i,children:l})}),e[0]=l,e[1]=n,e[2]=i,e[3]=r,e[4]=s):s=e[4];let a;e[5]!==n?(a=o.jsx(Z,{side:"bottom",children:n}),e[5]=n,e[6]=a):a=e[6];let c;return e[7]!==s||e[8]!==a?(c=o.jsxs(J,{children:[s,a]}),e[7]=s,e[8]=a,e[9]=c):c=e[9],c}function pe(){const t=j.c(12),e=E(),n=T();if(n.isMobile||n.threadless)return null;const r=!n.threadOpen;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("span",{"aria-hidden":!0,className:"mr-1.5 h-4 w-px shrink-0 bg-border"}),t[0]=i):i=t[0];let l;t[1]!==r||t[2]!==n.toggleFullscreen||t[3]!==e?(l=r?o.jsxs(k,{variant:"ghost",size:"sm","aria-pressed":!0,className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:n.toggleFullscreen,children:[o.jsx(Q,{size:16}),e("page.exitFullscreen")]}):o.jsx(F,{label:e("page.enterFullscreen"),onClick:n.toggleFullscreen,children:o.jsx(X,{size:16})}),t[1]=r,t[2]=n.toggleFullscreen,t[3]=e,t[4]=l):l=t[4];let s;t[5]!==r||t[6]!==n.toggleContent||t[7]!==e?(s=!r&&o.jsx(F,{label:e("page.closeMainPanel"),onClick:n.toggleContent,children:o.jsx(ee,{size:16})}),t[5]=r,t[6]=n.toggleContent,t[7]=e,t[8]=s):s=t[8];let a;return t[9]!==l||t[10]!==s?(a=o.jsxs("div",{className:"flex items-center gap-0.5",children:[i,l,s]}),t[9]=l,t[10]=s,t[11]=a):a=t[11],a}function Ke(){const t=j.c(9),e=E(),n=K(),r=fe();if(n||!r||r.threadless||r.contentOpen)return null;const i=r.toggleContent;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(xe,{}),t[0]=l):l=t[0];let s;t[1]!==e?(s=e("page.openMainPanel"),t[1]=e,t[2]=s):s=t[2];let a;t[3]!==r.toggleContent||t[4]!==s?(a=o.jsxs(k,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:i,children:[l,s]}),t[3]=r.toggleContent,t[4]=s,t[5]=a):a=t[5];let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":!0,className:"mx-1 h-4 w-px shrink-0 bg-border"}),t[6]=c):c=t[6];let u;return t[7]!==a?(u=o.jsxs(o.Fragment,{children:[a,c]}),t[7]=a,t[8]=u):u=t[8],u}function xe(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,className:"shrink-0",children:o.jsx("path",{d:"M4 5v14M8 12h12m0 0-6-6m6 6-6 6"})}),t[0]=e):e=t[0],e}function ge({children:t,routeId:e}){return t}function R(t){const e=j.c(26),{children:n,actions:r,drawer:i,aside:l}=t,s=T();if(s.isMobile&&s.mobileSurface!=="main")return null;const a=s.isMobile?"plain":"card";let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(pe,{}),e[0]=c):c=e[0];let u;e[1]!==r||e[2]!==s.contentNavigation?(u=o.jsx(ae,{navigation:s.contentNavigation,actions:r,trailingActions:c}),e[1]=r,e[2]=s.contentNavigation,e[3]=u):u=e[3];let d;e[4]!==n||e[5]!==s.contentKey?(d=o.jsx($,{children:o.jsx(ge,{routeId:s.contentKey,children:n})}),e[4]=n,e[5]=s.contentKey,e[6]=d):d=e[6];let h;e[7]!==s.contentKey||e[8]!==d?(h=o.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:o.jsx(I,{children:d},s.contentKey)}),e[7]=s.contentKey,e[8]=d,e[9]=h):h=e[9];let m;e[10]!==i||e[11]!==h?(m=o.jsxs(N.Content,{children:[h,i]}),e[10]=i,e[11]=h,e[12]=m):m=e[12];let p;e[13]!==u||e[14]!==m?(p=o.jsxs(U.Breadcrumbs.Provider,{children:[u,m]}),e[13]=u,e[14]=m,e[15]=p):p=e[15];let y;e[16]!==a||e[17]!==p?(y=o.jsx(N,{"data-testid":"main-panel",variant:a,children:p}),e[16]=a,e[17]=p,e[18]=y):y=e[18];const C=y;if(s.isMobile)return C;if(!s.contentOpen)return null;let x;e[19]!==C?(x=o.jsx("div",{className:"h-full min-h-0 min-w-0 flex-1 p-0.5",children:C}),e[19]=C,e[20]=x):x=e[20];let f;e[21]!==l?(f=l&&o.jsx("div",{className:"h-full min-h-0 w-[42%] min-w-80 shrink-0 p-0.5",children:o.jsx(N,{"data-testid":"aside-panel",children:o.jsx(I,{children:o.jsx($,{children:l})},z.isValidElement(l)?l.key??void 0:void 0)})}),e[21]=l,e[22]=f):f=e[22];let g;return e[23]!==f||e[24]!==x?(g=o.jsx(D,{id:M,defaultSize:"67%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsxs("div",{className:"flex h-full min-h-0",children:[x,f]})}),e[23]=f,e[24]=x,e[25]=g):g=e[25],g}function De(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(R,{children:o.jsx(V,{})}),t[0]=e):e=t[0],e}function He(t){const e=j.c(18),{error:n,reset:r}=t,i=E();let l;e[0]!==i?(l=i("common.errorBoundary.somethingWentWrong"),e[0]=i,e[1]=l):l=e[1];let s;e[2]!==l?(s=o.jsx("h2",{className:"text-lg font-medium",children:l}),e[2]=l,e[3]=s):s=e[3];let a;e[4]!==n.message||e[5]!==i?(a=n.message||i("common.errorBoundary.unexpectedError"),e[4]=n.message,e[5]=i,e[6]=a):a=e[6];let c;e[7]!==a?(c=o.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:a}),e[7]=a,e[8]=c):c=e[8];let u;e[9]!==i?(u=i("common.errorBoundary.tryAgain"),e[9]=i,e[10]=u):u=e[10];let d;e[11]!==r||e[12]!==u?(d=o.jsx(k,{variant:"outline",onClick:r,children:u}),e[11]=r,e[12]=u,e[13]=d):d=e[13];let h;return e[14]!==s||e[15]!==c||e[16]!==d?(h=o.jsx(R,{children:o.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[s,c,d]})}),e[14]=s,e[15]=c,e[16]=d,e[17]=h):h=e[17],h}const We=Object.assign(he,{Thread:me,Content:R});export{We as ChatLayout,He as ChatLayoutError,De as ChatLayoutPending,Ke as OpenMainPanelButton,Fe as useChatLayout,fe as useOptionalChatLayout};
1
+ import{c as j,ar as W,at as q,b as E,r as z,d as G,j as o,aR as $,R as I,P as N,n as U,B as k,b5 as V}from"./index-D0JbJFfP.js";import{u as K}from"./use-mobile-DXgcDHnH.js";import{T as Y,a as Z,c as J}from"./tooltip-bcUJYhL_.js";import{t as Q,a as X}from"./MessageCircle01-D1JzchO_.js";import{s as ee}from"./XClose-DGEX5GIv.js";import{b as te}from"./thread-button-C2TH27Tw.js";import{T as ne}from"./toolbar-icon-button-BSNdxRRG.js";import{b as se,R as oe,a as D}from"./resizable-Cd2hDMdu.js";import{c as re,r as ie,m as le}from"./use-chat-layout-state-SUAjqrxB.js";import{R as ae}from"./route-page-header-BPaA0qrQ.js";import"./index-Ccvx4l8u.js";import"./use-sidebar-collapsed-BoDydqEu.js";import"./sheet-DQnddENA.js";import"./use-in-settings-1MICTjP9.js";import"./use-panel-navigate-CAZIXqmL.js";import"./thread-route-yhTv7wYw.js";import"./use-project-scope-DA6OZsHG.js";import"./repository-binding-BkeJ2CtJ.js";import"./use-mcp-client-Cnv47oK4.js";import"./auth-B-QpuT1-.js";import"./LayoutLeft-BQdYjjc6.js";import"./use-current-view-BOFMyET9.js";function A(t,e){const n=typeof t=="number"?t:Number(t);return!Number.isFinite(n)||n<=0||n>=100?e:n}function ce(t,e){const n=j.c(8);let r;n[0]!==e?(r=c=>A(c,e),n[0]=e,n[1]=r):r=n[1];const[i,l]=W(t,r);let s;n[2]!==e||n[3]!==i?(s=A(i,e),n[2]=e,n[3]=i,n[4]=s):s=n[4];let a;return n[5]!==l||n[6]!==s?(a=[s,l],n[5]=l,n[6]=s,n[7]=a):a=n[7],a}const ue=33;function de(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=q.sidePanelWidth(),t[0]=e):e=t[0],ce(e,ue)}const P="chat-layout-thread",M="chat-layout-content",H="320px",O=z.createContext(null);function Fe(){return T()}function fe(){return z.use(O)}function T(){const t=z.use(O);if(!t)throw new Error("ChatLayout regions require a ChatLayout");return t}function he(t){const e=j.c(22),{children:n,...r}=t,i=K(),l=G(),s=z.useRef(null),[a,c]=de(),{threadOpen:u,contentOpen:d}=r,h=re(r),m=u&&d?a:h.side,p=100-m,y=b=>{const v=b.getLayout(),w=v[P],S=v[M];typeof w!="number"||typeof S!="number"||Math.abs(w-m)<.001&&Math.abs(S-p)<.001||b.setLayout({[P]:m,[M]:p})},C=ie(r);let x;e[0]!==i||e[1]!==r||e[2]!==C?(x={...r,isMobile:i,mobileSurface:C},e[0]=i,e[1]=r,e[2]=C,e[3]=x):x=e[3];const f=x;let g;e[4]!==i||e[5]!==r||e[6]!==l||e[7]!==f?(g=i&&!r.threadless&&o.jsx(te,{open:f.mobileSurface==="chat",onToggle:()=>{l({to:".",search:b=>({...b,...le(f.mobileSurface==="chat"?"main":"chat")}),replace:!0})}}),e[4]=i,e[5]=r,e[6]=l,e[7]=f,e[8]=g):g=e[8];let L;e[9]!==n||e[10]!==d||e[11]!==p||e[12]!==i||e[13]!==c||e[14]!==y||e[15]!==u||e[16]!==m?(L=i?o.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:n}):o.jsx(oe,{ref:b=>{if(s.current=b,!b)return;let v=!0;return queueMicrotask(()=>{v&&y(b)}),()=>{v=!1,s.current===b&&(s.current=null)}},defaultLayout:{[P]:m,[M]:p},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0",style:{overflow:"visible"},onLayoutChanged:(b,v)=>{const{isUserInteraction:w}=v;if(!w){const B=s.current;B&&y(B);return}const S=b[P];u&&d&&typeof S=="number"&&S>0&&S<100&&c(S)},children:n}),e[9]=n,e[10]=d,e[11]=p,e[12]=i,e[13]=c,e[14]=y,e[15]=u,e[16]=m,e[17]=L):L=e[17];let _;return e[18]!==g||e[19]!==L||e[20]!==f?(_=o.jsxs(O,{value:f,children:[g,L]}),e[18]=g,e[19]=L,e[20]=f,e[21]=_):_=e[21],_}function me(t){const e=j.c(14),{children:n,topbar:r}=t,i=T();if(i.isMobile){let u;return e[0]!==n||e[1]!==i.mobileSurface||e[2]!==r?(u=i.mobileSurface==="chat"?o.jsxs(N,{variant:"plain","data-slot":"chat-layout-thread",children:[r,o.jsx(N.Content,{"data-testid":"chat-panel",children:n})]}):null,e[0]=n,e[1]=i.mobileSurface,e[2]=r,e[3]=u):u=e[3],u}if(!i.threadOpen)return null;let l;e[4]!==i.contentOpen?(l=i.contentOpen&&o.jsx(se,{className:"bg-sidebar"}),e[4]=i.contentOpen,e[5]=l):l=e[5];let s;e[6]!==n?(s=o.jsx(N.Content,{"data-testid":"chat-panel",children:n}),e[6]=n,e[7]=s):s=e[7];let a;e[8]!==s||e[9]!==r?(a=o.jsx(D,{id:P,defaultSize:"33%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsx("div",{className:"h-full min-h-0 p-0.5",children:o.jsxs(N,{"data-testid":"side-panel",children:[r,s]})})}),e[8]=s,e[9]=r,e[10]=a):a=e[10];let c;return e[11]!==l||e[12]!==a?(c=o.jsxs(o.Fragment,{children:[l,a]}),e[11]=l,e[12]=a,e[13]=c):c=e[13],c}function F(t){const e=j.c(10),{label:n,pressed:r,onClick:i,children:l}=t;let s;e[0]!==l||e[1]!==n||e[2]!==i||e[3]!==r?(s=o.jsx(Y,{asChild:!0,children:o.jsx(ne,{"aria-label":n,"aria-pressed":r,onClick:i,children:l})}),e[0]=l,e[1]=n,e[2]=i,e[3]=r,e[4]=s):s=e[4];let a;e[5]!==n?(a=o.jsx(Z,{side:"bottom",children:n}),e[5]=n,e[6]=a):a=e[6];let c;return e[7]!==s||e[8]!==a?(c=o.jsxs(J,{children:[s,a]}),e[7]=s,e[8]=a,e[9]=c):c=e[9],c}function pe(){const t=j.c(12),e=E(),n=T();if(n.isMobile||n.threadless)return null;const r=!n.threadOpen;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("span",{"aria-hidden":!0,className:"mr-1.5 h-4 w-px shrink-0 bg-border"}),t[0]=i):i=t[0];let l;t[1]!==r||t[2]!==n.toggleFullscreen||t[3]!==e?(l=r?o.jsxs(k,{variant:"ghost",size:"sm","aria-pressed":!0,className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:n.toggleFullscreen,children:[o.jsx(Q,{size:16}),e("page.exitFullscreen")]}):o.jsx(F,{label:e("page.enterFullscreen"),onClick:n.toggleFullscreen,children:o.jsx(X,{size:16})}),t[1]=r,t[2]=n.toggleFullscreen,t[3]=e,t[4]=l):l=t[4];let s;t[5]!==r||t[6]!==n.toggleContent||t[7]!==e?(s=!r&&o.jsx(F,{label:e("page.closeMainPanel"),onClick:n.toggleContent,children:o.jsx(ee,{size:16})}),t[5]=r,t[6]=n.toggleContent,t[7]=e,t[8]=s):s=t[8];let a;return t[9]!==l||t[10]!==s?(a=o.jsxs("div",{className:"flex items-center gap-0.5",children:[i,l,s]}),t[9]=l,t[10]=s,t[11]=a):a=t[11],a}function Ke(){const t=j.c(9),e=E(),n=K(),r=fe();if(n||!r||r.threadless||r.contentOpen)return null;const i=r.toggleContent;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(xe,{}),t[0]=l):l=t[0];let s;t[1]!==e?(s=e("page.openMainPanel"),t[1]=e,t[2]=s):s=t[2];let a;t[3]!==r.toggleContent||t[4]!==s?(a=o.jsxs(k,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:i,children:[l,s]}),t[3]=r.toggleContent,t[4]=s,t[5]=a):a=t[5];let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":!0,className:"mx-1 h-4 w-px shrink-0 bg-border"}),t[6]=c):c=t[6];let u;return t[7]!==a?(u=o.jsxs(o.Fragment,{children:[a,c]}),t[7]=a,t[8]=u):u=t[8],u}function xe(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,className:"shrink-0",children:o.jsx("path",{d:"M4 5v14M8 12h12m0 0-6-6m6 6-6 6"})}),t[0]=e):e=t[0],e}function ge({children:t,routeId:e}){return t}function R(t){const e=j.c(26),{children:n,actions:r,drawer:i,aside:l}=t,s=T();if(s.isMobile&&s.mobileSurface!=="main")return null;const a=s.isMobile?"plain":"card";let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(pe,{}),e[0]=c):c=e[0];let u;e[1]!==r||e[2]!==s.contentNavigation?(u=o.jsx(ae,{navigation:s.contentNavigation,actions:r,trailingActions:c}),e[1]=r,e[2]=s.contentNavigation,e[3]=u):u=e[3];let d;e[4]!==n||e[5]!==s.contentKey?(d=o.jsx($,{children:o.jsx(ge,{routeId:s.contentKey,children:n})}),e[4]=n,e[5]=s.contentKey,e[6]=d):d=e[6];let h;e[7]!==s.contentKey||e[8]!==d?(h=o.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:o.jsx(I,{children:d},s.contentKey)}),e[7]=s.contentKey,e[8]=d,e[9]=h):h=e[9];let m;e[10]!==i||e[11]!==h?(m=o.jsxs(N.Content,{children:[h,i]}),e[10]=i,e[11]=h,e[12]=m):m=e[12];let p;e[13]!==u||e[14]!==m?(p=o.jsxs(U.Breadcrumbs.Provider,{children:[u,m]}),e[13]=u,e[14]=m,e[15]=p):p=e[15];let y;e[16]!==a||e[17]!==p?(y=o.jsx(N,{"data-testid":"main-panel",variant:a,children:p}),e[16]=a,e[17]=p,e[18]=y):y=e[18];const C=y;if(s.isMobile)return C;if(!s.contentOpen)return null;let x;e[19]!==C?(x=o.jsx("div",{className:"h-full min-h-0 min-w-0 flex-1 p-0.5",children:C}),e[19]=C,e[20]=x):x=e[20];let f;e[21]!==l?(f=l&&o.jsx("div",{className:"h-full min-h-0 w-[42%] min-w-80 shrink-0 p-0.5",children:o.jsx(N,{"data-testid":"aside-panel",children:o.jsx(I,{children:o.jsx($,{children:l})},z.isValidElement(l)?l.key??void 0:void 0)})}),e[21]=l,e[22]=f):f=e[22];let g;return e[23]!==f||e[24]!==x?(g=o.jsx(D,{id:M,defaultSize:"67%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsxs("div",{className:"flex h-full min-h-0",children:[x,f]})}),e[23]=f,e[24]=x,e[25]=g):g=e[25],g}function De(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(R,{children:o.jsx(V,{})}),t[0]=e):e=t[0],e}function He(t){const e=j.c(18),{error:n,reset:r}=t,i=E();let l;e[0]!==i?(l=i("common.errorBoundary.somethingWentWrong"),e[0]=i,e[1]=l):l=e[1];let s;e[2]!==l?(s=o.jsx("h2",{className:"text-lg font-medium",children:l}),e[2]=l,e[3]=s):s=e[3];let a;e[4]!==n.message||e[5]!==i?(a=n.message||i("common.errorBoundary.unexpectedError"),e[4]=n.message,e[5]=i,e[6]=a):a=e[6];let c;e[7]!==a?(c=o.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:a}),e[7]=a,e[8]=c):c=e[8];let u;e[9]!==i?(u=i("common.errorBoundary.tryAgain"),e[9]=i,e[10]=u):u=e[10];let d;e[11]!==r||e[12]!==u?(d=o.jsx(k,{variant:"outline",onClick:r,children:u}),e[11]=r,e[12]=u,e[13]=d):d=e[13];let h;return e[14]!==s||e[15]!==c||e[16]!==d?(h=o.jsx(R,{children:o.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[s,c,d]})}),e[14]=s,e[15]=c,e[16]=d,e[17]=h):h=e[17],h}const We=Object.assign(he,{Thread:me,Content:R});export{We as ChatLayout,He as ChatLayoutError,De as ChatLayoutPending,Ke as OpenMainPanelButton,Fe as useChatLayout,fe as useOptionalChatLayout};
@@ -1 +1 @@
1
- import{r as i,j as t,c4 as o}from"./index-BbyUQV-V.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var n=e;export{n as R,s as V};
1
+ import{r as i,j as t,c4 as o}from"./index-D0JbJFfP.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var n=e;export{n as R,s as V};