decocms 4.574.0 → 4.574.2

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 (454) hide show
  1. package/dist/client/assets/{AlertCircle-Co3RPbIZ.js → AlertCircle-Dsv0Pm7s.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BvS2pAoE.js → AreaChart-95ER28GX.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-XBSBGQal.js → ArrowLeft-DC6oDquu.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-DLnkUu9S.js → ArrowUp-Bzd2Ao8X.js} +1 -1
  5. package/dist/client/assets/{CartesianChart-DOb1QHVF.js → CartesianChart-Di9WWG1m.js} +1 -1
  6. package/dist/client/assets/{CategoricalChart-BkeCXQf9.js → CategoricalChart-MTqEhHpE.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-kNwBDDVU.js → CheckCircle-KwhMDKnL.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-Gg7YcxlH.js → ChevronSelectorVertical-BLvA03ay.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-D1T3kSyr.js → ChevronUp-Y1FAoMvo.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-D65BAIaV.js → CreditCard01-CQULtRjU.js} +1 -1
  11. package/dist/client/assets/{Globe04-D17A2x5l.js → Globe04-rzoBWb4k.js} +1 -1
  12. package/dist/client/assets/{Key01-awxHKnoL.js → Key01-Bb5nsuN9.js} +1 -1
  13. package/dist/client/assets/{LinkBroken01-loTkm0G5.js → LinkBroken01-BVPolLms.js} +1 -1
  14. package/dist/client/assets/{Minus-CYrsmoRb.js → Minus-D6gZIhdS.js} +1 -1
  15. package/dist/client/assets/{Monitor01-DalIAdj7.js → Monitor01-DZ-eNTiS.js} +1 -1
  16. package/dist/client/assets/{Play-C6Weq-wk.js → Play-_1vdxnt7.js} +1 -1
  17. package/dist/client/assets/{Plus-D7X8Q2-q.js → Plus-D2mU8Z2n.js} +1 -1
  18. package/dist/client/assets/ReferenceLine-BCQS5W1q.js +1 -0
  19. package/dist/client/assets/{SearchMd-e6xPeRPD.js → SearchMd-C9gFyKp3.js} +1 -1
  20. package/dist/client/assets/{ShoppingBag01-zloi0TDl.js → ShoppingBag01-B9vYetgm.js} +1 -1
  21. package/dist/client/assets/{Sun-C1lyqton.js → Sun-iCrIMYKz.js} +1 -1
  22. package/dist/client/assets/{SwitchHorizontal01-elXb4-4d.js → SwitchHorizontal01-DaQ0HYDj.js} +1 -1
  23. package/dist/client/assets/{Tool01-Bo2g-Ylw.js → Tool01-CccYPLip.js} +1 -1
  24. package/dist/client/assets/{Tooltip-C2g-R1Ae.js → Tooltip-CkoKLPSM.js} +1 -1
  25. package/dist/client/assets/{Trash01-C-PU5Hm-.js → Trash01-D_C1VqRW.js} +1 -1
  26. package/dist/client/assets/{Upload01-NPnXKs-J.js → Upload01-BZ-jVH9c.js} +1 -1
  27. package/dist/client/assets/{UserSquare-Qd-FKVqK.js → UserSquare-C9oDVw7K.js} +1 -1
  28. package/dist/client/assets/{Users01-CTNixqdX.js → Users01-OVHBqKY2.js} +1 -1
  29. package/dist/client/assets/{XClose-BuJ6u6eL.js → XClose-Da3uoLbc.js} +1 -1
  30. package/dist/client/assets/{Zap-pmN7zSOE.js → Zap-DiAA9TDt.js} +1 -1
  31. package/dist/client/assets/{access-gate-Bj4L1Bay.js → access-gate-CvU5rNDs.js} +1 -1
  32. package/dist/client/assets/{add-connection-dialog-BL3Uj9Py.js → add-connection-dialog-Bqm-kjDm.js} +1 -1
  33. package/dist/client/assets/agent-app-IUm2KpOg.js +1 -0
  34. package/dist/client/assets/agent-assets-Bmtr4HF2.js +1 -0
  35. package/dist/client/assets/{agent-automation-Bea1eB6T.js → agent-automation-C6civuP9.js} +3 -3
  36. package/dist/client/assets/agent-automations-C6CY4grg.js +1 -0
  37. package/dist/client/assets/agent-calendar-YxSaCaoL.js +1 -0
  38. package/dist/client/assets/{agent-capabilities-BGShibnD.js → agent-capabilities-C_Lwc_1S.js} +1 -1
  39. package/dist/client/assets/agent-connect-sources-1U261aQC.js +1 -0
  40. package/dist/client/assets/agent-deck-C-UqR39d.js +1 -0
  41. package/dist/client/assets/agent-e2e-Dql2lNy5.js +1 -0
  42. package/dist/client/assets/agent-experiments-BsakXkAT.js +1 -0
  43. package/dist/client/assets/agent-file-D77xFc1M.js +1 -0
  44. package/dist/client/assets/agent-hosting-DLt4n1PP.js +1 -0
  45. package/dist/client/assets/{agent-icon-CTbTFMnU.js → agent-icon-fpNscOF6.js} +1 -1
  46. package/dist/client/assets/agent-library-7De1njyb.js +1 -0
  47. package/dist/client/assets/agent-library-file-D1B9oEMJ.js +1 -0
  48. package/dist/client/assets/agent-overview-CDZkDDXd.js +1 -0
  49. package/dist/client/assets/agent-releases-CG7qGUka.js +2 -0
  50. package/dist/client/assets/agent-settings-CxavGzlw.js +1 -0
  51. package/dist/client/assets/{agent-site-editor-D_QBdAc9.js → agent-site-editor-CnI16zyl.js} +2 -2
  52. package/dist/client/assets/agent-site-editor-code-CWXYLbKh.js +2 -0
  53. package/dist/client/assets/agent-site-editor-content-Beagub1U.js +1 -0
  54. package/dist/client/assets/agent-site-editor-preview-BYJqSKvW.js +1 -0
  55. package/dist/client/assets/agent-view-CyHHS-97.js +1 -0
  56. package/dist/client/assets/{agent-view-guard-CL3qLzE2.js → agent-view-guard-BZmhkikC.js} +1 -1
  57. package/dist/client/assets/ai-providers-CLGdcvZQ.js +1 -0
  58. package/dist/client/assets/{alert-wYcDlQSf.js → alert-DAw-__lY.js} +1 -1
  59. package/dist/client/assets/{analytics-sections-BjzpdbBT.js → analytics-sections-DrzSo9a2.js} +1 -1
  60. package/dist/client/assets/{api-keys-am7hNPgd.js → api-keys-CfXSAJt6.js} +1 -1
  61. package/dist/client/assets/api-keys-DVRf3Hvj.js +1 -0
  62. package/dist/client/assets/app-editor-B1ZDazOl.js +1 -0
  63. package/dist/client/assets/{asset-utils-C5mv1eiH.js → asset-utils-B40iBSyV.js} +1 -1
  64. package/dist/client/assets/{auth-CQxDIkM-.js → auth-YdxCJvaF.js} +1 -1
  65. package/dist/client/assets/{auth-catchall-DX0dhfK_.js → auth-catchall-BtKIWVeb.js} +1 -1
  66. package/dist/client/assets/auth-entry-BWEVf3TW.js +1 -0
  67. package/dist/client/assets/{auth-split-layout-BRZioxOZ.js → auth-split-layout-zPoWOH18.js} +1 -1
  68. package/dist/client/assets/{authenticate-and-persist-oauth-o7XKLq_6.js → authenticate-and-persist-oauth-DfBwldFd.js} +1 -1
  69. package/dist/client/assets/{automation-list-row-knBDKeRb.js → automation-list-row-BRtY1m0_.js} +1 -1
  70. package/dist/client/assets/automation-runs-B5ZMOQnQ.js +1 -0
  71. package/dist/client/assets/automations-CVIWSKb4.js +1 -0
  72. package/dist/client/assets/{autosend-B0POegpm.js → autosend-DFTTUav1.js} +1 -1
  73. package/dist/client/assets/backoff-CrEUbyZT.js +1 -0
  74. package/dist/client/assets/{badge-BpzeYR5Z.js → badge-DVtxjBdD.js} +1 -1
  75. package/dist/client/assets/{block-document-DIhkVhEf.js → block-document-DP3zwvIZ.js} +1 -1
  76. package/dist/client/assets/{blocks-preview-workspace-context-BnkXYZX_.js → blocks-preview-workspace-context-CdC5NkHg.js} +1 -1
  77. package/dist/client/assets/blocks-tab-states-_rbufLt5.js +1 -0
  78. package/dist/client/assets/{blog-schema-BdMdKJFM.js → blog-schema-CPvfhGuY.js} +1 -1
  79. package/dist/client/assets/{buckets-C62arTZK.js → buckets-CCBSdGb8.js} +1 -1
  80. package/dist/client/assets/{build-improve-prompt-doc-DNVGwsoG.js → build-improve-prompt-doc-9_1xFJrp.js} +1 -1
  81. package/dist/client/assets/{calendar-SB5YBzj8.js → calendar-ke1Ak3Bz.js} +1 -1
  82. package/dist/client/assets/{capability-load-error-BkOUGX51.js → capability-load-error-DqZ2bjfY.js} +1 -1
  83. package/dist/client/assets/category-editor-CyGTDdXW.js +1 -0
  84. package/dist/client/assets/{chart-D-gatwT8.js → chart-Ds4Pjzvz.js} +1 -1
  85. package/dist/client/assets/{chat-context-PvP_Q1CV.js → chat-context-B2EDKfd0.js} +6 -6
  86. package/dist/client/assets/{chat-draft-C714j1Wd.js → chat-draft-Cnwq9hv5.js} +1 -1
  87. package/dist/client/assets/{checkbox-Bk98t4UK.js → checkbox-BhpA9Zt5.js} +1 -1
  88. package/dist/client/assets/{choose-editor-DmqmkbHo.js → choose-editor-B_GNzjsr.js} +1 -1
  89. package/dist/client/assets/{cli-auth-success-D4NODEkN.js → cli-auth-success-Q64N46VB.js} +1 -1
  90. package/dist/client/assets/{client-icons-WHlOXnmn.js → client-icons-CZasH4i0.js} +1 -1
  91. package/dist/client/assets/cms-settings-editor-CpYk69qY.js +1 -0
  92. package/dist/client/assets/cms-store-drafts-CzBlkLn7.js +1 -0
  93. package/dist/client/assets/{collapsible-C7N88_dp.js → collapsible-6K3nmqYF.js} +1 -1
  94. package/dist/client/assets/collection-detail-D6UJgDkz.js +1 -0
  95. package/dist/client/assets/{collection-display-button-Dl9vfdLR.js → collection-display-button-2dgErWqj.js} +1 -1
  96. package/dist/client/assets/{collection-search-Din8SB5Y.js → collection-search-0yFYtboh.js} +1 -1
  97. package/dist/client/assets/{collection-table-wrapper-BYDcFi4z.js → collection-table-wrapper-CfYO1W9r.js} +1 -1
  98. package/dist/client/assets/{collection-tabs-BJDa_4_F.js → collection-tabs-B_dqQpZz.js} +1 -1
  99. package/dist/client/assets/{combobox-CVchGkTE.js → combobox-DXIGIOUU.js} +1 -1
  100. package/dist/client/assets/{command-DA2t4jTW.js → command-Qn4l80Q0.js} +1 -1
  101. package/dist/client/assets/{companion-mcps-section-BKP3xr1j.js → companion-mcps-section-DlKI0NIv.js} +1 -1
  102. package/dist/client/assets/{config-B1mE6oOL.js → config-CCuT0uDx.js} +1 -1
  103. package/dist/client/assets/{connect-CAAYdS8d.js → connect-D-ehpKrE.js} +3 -3
  104. package/dist/client/assets/{connect-layout-DUesEwTl.js → connect-layout-BpafQvyr.js} +1 -1
  105. package/dist/client/assets/{connect-source-dialog-DQtWLoYH.js → connect-source-dialog-D-ZZcunb.js} +1 -1
  106. package/dist/client/assets/{connection-giFDA0-u.js → connection-MdFsEog3.js} +1 -1
  107. package/dist/client/assets/{connection-card-CPhS4jEh.js → connection-card-CqP5nP-l.js} +1 -1
  108. package/dist/client/assets/connection-detail-0H8YGOD_.js +1 -0
  109. package/dist/client/assets/{connection-form-helpers-CRMRmqMW.js → connection-form-helpers-D6t-A2OG.js} +1 -1
  110. package/dist/client/assets/{connection-slug-DTdYIX0A.js → connection-slug-CXZXa0Pm.js} +1 -1
  111. package/dist/client/assets/connections-CCgX0Mn1.js +1 -0
  112. package/dist/client/assets/content-tab-D-2gB1id.js +25 -0
  113. package/dist/client/assets/context-CX2ucy08.js +1 -0
  114. package/dist/client/assets/{context-menu-CsBFFEsr.js → context-menu-Chf64Vse.js} +1 -1
  115. package/dist/client/assets/{context-shell-l0daBgQ1.js → context-shell-DdzUU76d.js} +3 -3
  116. package/dist/client/assets/{core.esm-tIHbtjKb.js → core.esm-B8dY25VW.js} +1 -1
  117. package/dist/client/assets/{create-organization-dialog-Dy6I2vcX.js → create-organization-dialog-D0CBCM81.js} +1 -1
  118. package/dist/client/assets/{device-hint-DslC2w9a.js → device-hint-BS_JePIJ.js} +1 -1
  119. package/dist/client/assets/discover-Q3RTxZJc.js +1 -0
  120. package/dist/client/assets/{domain-settings-Dq_m7HYl.js → domain-settings-CEBgufdo.js} +1 -1
  121. package/dist/client/assets/{drawer-BYGTIOoj.js → drawer-ByMrQGCj.js} +1 -1
  122. package/dist/client/assets/{editor-x1lgFdfy.js → editor-DbiHNhC6.js} +1 -1
  123. package/dist/client/assets/{editor-classes-LFKjNX_0.js → editor-classes-BRpqmI9G.js} +1 -1
  124. package/dist/client/assets/{empty-state-CH3GYanB.js → empty-state-1M1xIReA.js} +1 -1
  125. package/dist/client/assets/{empty-state-CtwVPMDf.js → empty-state-B2Xx-qz8.js} +1 -1
  126. package/dist/client/assets/{experiments-tab-choice-DMVM7f3S.js → experiments-tab-choice-BfWXh4-6.js} +1 -1
  127. package/dist/client/assets/{extract-connection-data-hvaA6rrK.js → extract-connection-data-c-FfSGKP.js} +1 -1
  128. package/dist/client/assets/{feature-gate-ru6FBLZU.js → feature-gate-7QGuZ_p6.js} +1 -1
  129. package/dist/client/assets/{feature-paywall-eifo7eqe.js → feature-paywall-wC8Tk38N.js} +1 -1
  130. package/dist/client/assets/file-explorer-By8BSXLx.js +2 -0
  131. package/dist/client/assets/{file-preview-BzUEEwEK.js → file-preview-D07TFZkO.js} +1 -1
  132. package/dist/client/assets/{file-share-button-CFBrVPAQ.js → file-share-button-BdFb2LyH.js} +1 -1
  133. package/dist/client/assets/{file-type-icon-DM9o0Fkb.js → file-type-icon-CfqErjlt.js} +1 -1
  134. package/dist/client/assets/{folder-icon-DSGoR_x6.js → folder-icon-CnYX4FK9.js} +1 -1
  135. package/dist/client/assets/{form-gd_hA5VT.js → form-Bc9t1169.js} +1 -1
  136. package/dist/client/assets/{general-Cn8XvemK.js → general-BVPcfnq3.js} +1 -1
  137. package/dist/client/assets/{github-icon-BVy-v7gH.js → github-icon-BiTVYb1o.js} +1 -1
  138. package/dist/client/assets/home-eLi6OoUj.js +1 -0
  139. package/dist/client/assets/{home-overview-DZBjDQoG.js → home-overview-BUsdsaOd.js} +1 -1
  140. package/dist/client/assets/hosted-reconcile-BT0WLx4L.js +1 -0
  141. package/dist/client/assets/{icon-button-Ze0c1pwp.js → icon-button-CSoRzxTc.js} +1 -1
  142. package/dist/client/assets/{index-DkhsKOTp.js → index-B0d5IX7p.js} +1 -1
  143. package/dist/client/assets/{index-D5i1_B2b.js → index-B2ATqkba.js} +1 -1
  144. package/dist/client/assets/{index-CQQpem-0.js → index-B3GwxC-v.js} +1 -1
  145. package/dist/client/assets/{index-C3XZ4Hr3.js → index-BPidavr8.js} +2 -2
  146. package/dist/client/assets/index-BXwlvRia.js +1 -0
  147. package/dist/client/assets/{index-CnOVjrIG.js → index-CGixVPRT.js} +1 -1
  148. package/dist/client/assets/{index-D8y5KFA4.js → index-CO7mElbh.js} +1 -1
  149. package/dist/client/assets/{index-DsbWutG1.js → index-CQBW64pa.js} +1 -1
  150. package/dist/client/assets/{index-B-T__H4R.js → index-CqK_0oof.js} +1 -1
  151. package/dist/client/assets/index-CwOTOkx0.js +4 -0
  152. package/dist/client/assets/{index-Kbjjvu85.js → index-CyFvlIli.js} +1 -1
  153. package/dist/client/assets/{index-DYgzDE_k.js → index-D32ePzu5.js} +1 -1
  154. package/dist/client/assets/{index-Bgxp_wDH.js → index-DB_N5huE.js} +2 -2
  155. package/dist/client/assets/index-DZ-V47-f.js +1 -0
  156. package/dist/client/assets/{index-_l1iac4T.js → index-OfhDS9IV.js} +1 -1
  157. package/dist/client/assets/{index-DEZ1imMJ.js → index-TS-yYM5l.js} +60 -62
  158. package/dist/client/assets/{index-redirect-BbZ_bzp6.js → index-redirect-DjmOPNwc.js} +1 -1
  159. package/dist/client/assets/{infiniteQueryObserver-C0Gb02df.js → infiniteQueryObserver-WKs1x3sX.js} +1 -1
  160. package/dist/client/assets/{infra-billing-BCVZN9OG.js → infra-billing-CFNDWf4P.js} +1 -1
  161. package/dist/client/assets/{input-CxHdmxHa.js → input-CdXEPNdQ.js} +1 -1
  162. package/dist/client/assets/{input-Dla4T1vA.js → input-DyBvRhWH.js} +4 -4
  163. package/dist/client/assets/{integration-icon-CFHOt7sY.js → integration-icon-C1m4mYos.js} +1 -1
  164. package/dist/client/assets/{jira-icon-_AEc9Yhw.js → jira-icon-CMYyaK6V.js} +1 -1
  165. package/dist/client/assets/{label-BEWDSeNl.js → label-m0qEFNz_.js} +1 -1
  166. package/dist/client/assets/{layout--y8zVnrP.js → layout-BX8RFi7-.js} +1 -1
  167. package/dist/client/assets/{legacy-admin-welcome-dialog-B223MrIf.js → legacy-admin-welcome-dialog-DN17L0bp.js} +1 -1
  168. package/dist/client/assets/{legacy-agents-deep-PO1FuZ04.js → legacy-agents-deep-BcXalumx.js} +1 -1
  169. package/dist/client/assets/{legacy-main-redirect-CLP7AoCb.js → legacy-main-redirect-BCzdn0gq.js} +1 -1
  170. package/dist/client/assets/library-DcxuVcYO.js +1 -0
  171. package/dist/client/assets/{library-tab-CqMcp5u0.js → library-tab-BULbmul7.js} +3 -3
  172. package/dist/client/assets/login-DuBqEvlt.js +1 -0
  173. package/dist/client/assets/{markdown-Db8a3LUX.js → markdown-BhvgGYnB.js} +1 -1
  174. package/dist/client/assets/{mcp-app-renderer-C8G6NLBz.js → mcp-app-renderer-BqfGxyCp.js} +2 -2
  175. package/dist/client/assets/{mcp-oauth-BBT3ip6Z.js → mcp-oauth-CMSqwlrD.js} +1 -1
  176. package/dist/client/assets/{mcp-oauth-CHmbtYyN.js → mcp-oauth-e50-7TO3.js} +1 -1
  177. package/dist/client/assets/{members-CF1S2ayK.js → members-PID9JnSj.js} +1 -1
  178. package/dist/client/assets/{memory-Bk61fr1m.js → memory-DmcNjOPo.js} +2 -2
  179. package/dist/client/assets/{mock-board-CYJBKLD5.js → mock-board-B978Fi_L.js} +3 -3
  180. package/dist/client/assets/{monaco-editor-DTwBEUg_.js → monaco-editor-QEAl_YP0.js} +1 -1
  181. package/dist/client/assets/{monitoring-Cqe9DCsk.js → monitoring-CG9_f7tP.js} +2 -2
  182. package/dist/client/assets/{monitoring-stats-row-GkTmJnnE.js → monitoring-stats-row-DkmRJOMv.js} +1 -1
  183. package/dist/client/assets/{multi-select-GRYee_BH.js → multi-select-CCT7Bz1w.js} +1 -1
  184. package/dist/client/assets/mustache-BFCk1BQA.js +4 -0
  185. package/dist/client/assets/{named-rule-view-BNwXQD8T.js → named-rule-view-DVMS0joL.js} +1 -1
  186. package/dist/client/assets/{new-project-dialog-Dfe2Pik9.js → new-project-dialog-D_RX0j41.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-C9LKZChW.js → oauth-callback-DbUe0i-L.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-ai-provider-C7LWQiJX.js → oauth-callback-ai-provider-B2RZlSqp.js} +1 -1
  189. package/dist/client/assets/oauth-consent-YLARk84v.js +1 -0
  190. package/dist/client/assets/{onboarding-xP-6CuuS.js → onboarding-DPtycHlA.js} +1 -1
  191. package/dist/client/assets/openai-conversation-C_8JqtFQ.js +3 -0
  192. package/dist/client/assets/{optimistic-project-sidebar-views-BcV4r24I.js → optimistic-project-sidebar-views-CBY386aw.js} +1 -1
  193. package/dist/client/assets/{order-monitor-day-BrCrwZlv.js → order-monitor-day-Zfh7Djae.js} +1 -1
  194. package/dist/client/assets/{organization-choice-Bb3OozNa.js → organization-choice-BViy1VJZ.js} +1 -1
  195. package/dist/client/assets/{orgs-BwWx4Gpo.js → orgs-DgJWnYOv.js} +1 -1
  196. package/dist/client/assets/{own-accounts-section-CL57nUX5.js → own-accounts-section-PwhGIEcx.js} +1 -1
  197. package/dist/client/assets/{pair-D5JEvK2M.js → pair-CMFzBcLY.js} +7 -7
  198. package/dist/client/assets/parse-sections-QRK0oKJq.js +20 -0
  199. package/dist/client/assets/{plan-ladder-DdqVPKf9.js → plan-ladder-B6NZgvyc.js} +1 -1
  200. package/dist/client/assets/plan-mQ3ovGAw.js +1 -0
  201. package/dist/client/assets/{plan-usage-card-397aTXRB.js → plan-usage-card-DlHRL8yC.js} +2 -2
  202. package/dist/client/assets/{popover-DsvzKyw_.js → popover-C8mcckmD.js} +1 -1
  203. package/dist/client/assets/post-calendar-C3cuisYq.js +1 -0
  204. package/dist/client/assets/post-editor-uAKG4LOK.js +2 -0
  205. package/dist/client/assets/{preview-content-Bs_qZ8yA.js → preview-content-DRPWOt_Y.js} +1 -1
  206. package/dist/client/assets/{preview-dialog-Bn3JJkpc.js → preview-dialog-BMcYcLLg.js} +1 -1
  207. package/dist/client/assets/{preview-panel-CX3l3cru.js → preview-panel-CwmwTZP_.js} +1 -1
  208. package/dist/client/assets/preview-tab-BFBvaAOI.js +551 -0
  209. package/dist/client/assets/{product-picker-dialog-DRJETx9Q.js → product-picker-dialog-C9EfVu8K.js} +1 -1
  210. package/dist/client/assets/{profile-BlRaDfot.js → profile-fN54emCr.js} +1 -1
  211. package/dist/client/assets/project-app-view-CvgHwWqj.js +1 -0
  212. package/dist/client/assets/{project-apps-B_xWF85u.js → project-apps-DmwQAngc.js} +1 -1
  213. package/dist/client/assets/{project-icon-rrJh6PJx.js → project-icon-7Ukip0ow.js} +1 -1
  214. package/dist/client/assets/{project-index-CoA3rtsT.js → project-index-OpjM2-1A.js} +1 -1
  215. package/dist/client/assets/project-reports-S-u-m-ku.js +1 -0
  216. package/dist/client/assets/project-tasks-DGVgztix.js +1 -0
  217. package/dist/client/assets/projects-BAI422dC.js +1 -0
  218. package/dist/client/assets/{projects-empty-state-llpcLXG9.js → projects-empty-state-DF0H_C2x.js} +1 -1
  219. package/dist/client/assets/{prompts-B0OAMamK.js → prompts-DcHb5gpa.js} +1 -1
  220. package/dist/client/assets/record-editor-BeJ8zVUP.js +1 -0
  221. package/dist/client/assets/redirect-editor-CC7-nKfT.js +1 -0
  222. package/dist/client/assets/{reports-Rgui-AzR.js → reports-SBiZlPun.js} +2 -2
  223. package/dist/client/assets/reports-onboarding-D1I0HeLn.js +1 -0
  224. package/dist/client/assets/reports-rQeWRtoE.js +1 -0
  225. package/dist/client/assets/reports-tab-7FbE26yX.js +2 -0
  226. package/dist/client/assets/repositories-D2zAp7y8.js +1 -0
  227. package/dist/client/assets/{repositories-OwZ7bC1j.js → repositories-DDgRn0D8.js} +1 -1
  228. package/dist/client/assets/{repository-binding-C0msapZZ.js → repository-binding-CR1iQGNu.js} +1 -1
  229. package/dist/client/assets/{repository-picker-BYFeDBpn.js → repository-picker-JI0-E7UT.js} +1 -1
  230. package/dist/client/assets/{require-capability-cQiPB2TO.js → require-capability-BAmRubpC.js} +1 -1
  231. package/dist/client/assets/{required-auth-layout-DfUx9vzb.js → required-auth-layout-BbY_gAQy.js} +1 -1
  232. package/dist/client/assets/{reset-password-CwNbLDfo.js → reset-password-umkV6OxE.js} +1 -1
  233. package/dist/client/assets/{resizable-CHI5UJHW.js → resizable-2meo0Add.js} +1 -1
  234. package/dist/client/assets/{resolve-tab-icon-BWeUUKzK.js → resolve-tab-icon-BGKUhiW_.js} +1 -1
  235. package/dist/client/assets/review-settings-BdG8I4Qi.js +1 -0
  236. package/dist/client/assets/{role-color-DlPdNUQM.js → role-color-Dkb8qNks.js} +1 -1
  237. package/dist/client/assets/{roles-ChXNdo9W.js → roles-DD-esArE.js} +1 -1
  238. package/dist/client/assets/route-B8RNcjxF.js +1 -0
  239. package/dist/client/assets/route-BKPxA69M.js +1 -0
  240. package/dist/client/assets/route-elVtkb_Z.js +1 -0
  241. package/dist/client/assets/sandbox-lifecycle-context-SakLBaZg.js +1 -0
  242. package/dist/client/assets/{schema-BFmIytlm.js → schema-B2Ckyd85.js} +1 -1
  243. package/dist/client/assets/{schema-9jBUPMLq.js → schema-D-flJgcm.js} +1 -1
  244. package/dist/client/assets/{scroll-area-CQ_g6hBm.js → scroll-area-CrLKF3Ch.js} +1 -1
  245. package/dist/client/assets/{search-input-Co3g-t6C.js → search-input-DqhPHff2.js} +1 -1
  246. package/dist/client/assets/{search-toggle-CO5TN956.js → search-toggle-BBmFL4F1.js} +1 -1
  247. package/dist/client/assets/{secret-picker-VlsiGxPi.js → secret-picker-DBQ4JaQs.js} +1 -1
  248. package/dist/client/assets/{secrets-DJboETC0.js → secrets-DbRrxggV.js} +1 -1
  249. package/dist/client/assets/{section-array-field-CvmfLv3q.js → section-array-field-DzEUxPRk.js} +1 -1
  250. package/dist/client/assets/{sections-C_Jmzzpn.js → sections-D6lSA2Zp.js} +1 -1
  251. package/dist/client/assets/sections-editor-DInCqzkh.js +1 -0
  252. package/dist/client/assets/{select-BJaUvbIR.js → select-DGwP5KHQ.js} +1 -1
  253. package/dist/client/assets/{select-model-CftP-ks_.js → select-model-LsdEU85-.js} +1 -1
  254. package/dist/client/assets/seo-editor-5_XGXw95.js +1 -0
  255. package/dist/client/assets/{separator-BXKmXRi8.js → separator-2qO-0nZt.js} +1 -1
  256. package/dist/client/assets/settings-tab-CD2MUqmv.js +1 -0
  257. package/dist/client/assets/{sheet-D2hfPw7P.js → sheet-0biUdMLD.js} +1 -1
  258. package/dist/client/assets/{shell-layout-BLRNx2fV.js → shell-layout-C5K2Cgqa.js} +1 -1
  259. package/dist/client/assets/{site-draft-actions-5nXph2SS.js → site-draft-actions-B3gpIf2V.js} +1 -1
  260. package/dist/client/assets/site-draft-view-BWibSxun.js +1 -0
  261. package/dist/client/assets/site-editor-DLaMMu_L.js +1 -0
  262. package/dist/client/assets/site-editor-toast-DxR_7rv8.js +1 -0
  263. package/dist/client/assets/skills-BJ8hUTnS.js +1 -0
  264. package/dist/client/assets/{slider-C6h9g0cI.js → slider-0BqB-02T.js} +1 -1
  265. package/dist/client/assets/{sortable.esm-D2_ALuVf.js → sortable.esm-DfgMVOGD.js} +1 -1
  266. package/dist/client/assets/{sso-CtTl7KnN.js → sso-BzFw-dKc.js} +1 -1
  267. package/dist/client/assets/{suggestion-C8VoNVDk.js → suggestion-DwjoXezV.js} +2 -2
  268. package/dist/client/assets/{super-agent-icon-B-73GF60.js → super-agent-icon-z7OwHCEd.js} +1 -1
  269. package/dist/client/assets/{switch-C53DVv3y.js → switch-Vjviqk0W.js} +1 -1
  270. package/dist/client/assets/{synced-repos-Cqz-evGv.js → synced-repos-DbHVOBGV.js} +1 -1
  271. package/dist/client/assets/{tab-icon-glyph-I3aa1qRZ.js → tab-icon-glyph-XyhrgWLR.js} +1 -1
  272. package/dist/client/assets/{table-DjgVXWdP.js → table-D0Wi7PXW.js} +1 -1
  273. package/dist/client/assets/{tabs-DtOFAaIp.js → tabs-DQ-fyTC8.js} +1 -1
  274. package/dist/client/assets/{task-board-D3wT6_aG.js → task-board-wWkdzdVu.js} +1 -1
  275. package/dist/client/assets/{task-route-DngvTiyh.js → task-route-BtpV6Buo.js} +1 -1
  276. package/dist/client/assets/{task-status-BfFZ6nf8.js → task-status-Dn75e5kc.js} +1 -1
  277. package/dist/client/assets/taskboard-analytics-8JJwdVpJ.js +1 -0
  278. package/dist/client/assets/{tasks-BHa2qCWg.js → tasks-4GoWL_dW.js} +3 -3
  279. package/dist/client/assets/tasks-CZU6jCer.js +1 -0
  280. package/dist/client/assets/{textarea-_jcGqOvl.js → textarea-Bhjzhlg4.js} +1 -1
  281. package/dist/client/assets/thread-analytics-BAnm8m0s.js +1 -0
  282. package/dist/client/assets/{thread-intent-DuI80508.js → thread-intent-DTnB4CRZ.js} +4 -4
  283. package/dist/client/assets/thread-route-DwPTQCEG.js +1 -0
  284. package/dist/client/assets/{thread-route-B-uAlF3E.js → thread-route-DzALEmAD.js} +1 -1
  285. package/dist/client/assets/{thread-sheet-body-BiNfUUQ_.js → thread-sheet-body-Yz0im8t7.js} +1 -1
  286. package/dist/client/assets/{time-range-picker-F9SEOG2b.js → time-range-picker-aTlkPNIq.js} +1 -1
  287. package/dist/client/assets/{toggle-group-C6oiEKlf.js → toggle-group-B-3sGcOE.js} +1 -1
  288. package/dist/client/assets/{tool-namespace-DdU5nhii.js → tool-namespace-VH0Buyl6.js} +1 -1
  289. package/dist/client/assets/{tool-set-selector-2nfgy8us.js → tool-set-selector-DSVQWzPb.js} +1 -1
  290. package/dist/client/assets/{toolbar-icon-button-BmJKmAUK.js → toolbar-icon-button-ObvTZQXe.js} +1 -1
  291. package/dist/client/assets/{tooltip-Dam-ym8O.js → tooltip-DmKkpA5B.js} +1 -1
  292. package/dist/client/assets/{tooltipContext-PzKiic-J.js → tooltipContext-0-zN8M2u.js} +1 -1
  293. package/dist/client/assets/{track-Dj7QHX2C.js → track-CXbHCkc-.js} +1 -1
  294. package/dist/client/assets/{types-gyofjZHf.js → types-C0QCIIin.js} +6 -6
  295. package/dist/client/assets/{url-slug-BMHzx0XY.js → url-slug-CuKki8F5.js} +1 -1
  296. package/dist/client/assets/{usage-stats-C3KvQP9T.js → usage-stats-BLfmHFkq.js} +1 -1
  297. package/dist/client/assets/{use-ai-providers-DwpUgHpj.js → use-ai-providers-CRaK_JyK.js} +1 -1
  298. package/dist/client/assets/use-apply-named-rule-CtfpAmZq.js +1 -0
  299. package/dist/client/assets/use-ask-in-chat-Pb7sjY65.js +1 -0
  300. package/dist/client/assets/{use-automations-CyrAu8XA.js → use-automations-CEHifMG2.js} +1 -1
  301. package/dist/client/assets/{use-autosave-TV-hF63e.js → use-autosave-DlV5iCiV.js} +1 -1
  302. package/dist/client/assets/use-blocks-v8-project-CaFw5qe2.js +1 -0
  303. package/dist/client/assets/{use-chat-layout-state-BG2-xqQp.js → use-chat-layout-state-CMz9hnFO.js} +1 -1
  304. package/dist/client/assets/{use-cms-publish-actions-CmQuU9AY.js → use-cms-publish-actions-C9vJqM_c.js} +4 -4
  305. package/dist/client/assets/{use-connect-companion-CowVgnp9.js → use-connect-companion-eNuilyDe.js} +1 -1
  306. package/dist/client/assets/use-connection-Bn20mDtq.js +1 -0
  307. package/dist/client/assets/use-content-sync-CJa8ir96.js +1 -0
  308. package/dist/client/assets/{use-copy-o0P-kroy.js → use-copy-DKdhQNUM.js} +1 -1
  309. package/dist/client/assets/{use-date-fns-locale-bKU2Q73X.js → use-date-fns-locale-BDYV4XK1.js} +1 -1
  310. package/dist/client/assets/{use-debounced-autosave-BmvZzlB_.js → use-debounced-autosave-t5GiXTFe.js} +1 -1
  311. package/dist/client/assets/{use-debounced-value-yZdJ1f2K.js → use-debounced-value-DWZxrww8.js} +1 -1
  312. package/dist/client/assets/{use-deco-credits-Bjfx0bAt.js → use-deco-credits-Z-japzkY.js} +1 -1
  313. package/dist/client/assets/{use-decopilot-events-C_C16-Ln.js → use-decopilot-events-BYdNs8bH.js} +1 -1
  314. package/dist/client/assets/{use-delete-connection-B4rX1qgg.js → use-delete-connection-BQbnqJMz.js} +1 -1
  315. package/dist/client/assets/{use-deployment-admin-CS9K9Ea9.js → use-deployment-admin-BT6mljlI.js} +1 -1
  316. package/dist/client/assets/{use-entitlements-DidlVdLU.js → use-entitlements-DzFd30Kk.js} +1 -1
  317. package/dist/client/assets/use-fast-preview-draft-url-Dz36xQ9l.js +1 -0
  318. package/dist/client/assets/{use-file-configs-DhXDYO83.js → use-file-configs-C_HqsFXW.js} +1 -1
  319. package/dist/client/assets/{use-id-selection-BHXFVfAt.js → use-id-selection-BEG3_dI0.js} +1 -1
  320. package/dist/client/assets/{use-inbox-feed-CKkWXum7.js → use-inbox-feed-DLkSEGfn.js} +1 -1
  321. package/dist/client/assets/{use-infinite-scroll-CED9GMTE.js → use-infinite-scroll-Chl8X7E8.js} +1 -1
  322. package/dist/client/assets/{use-join-requests-DAuosANz.js → use-join-requests-BuQsiKHH.js} +1 -1
  323. package/dist/client/assets/use-main-panel-tabs-CC9AQiRW.js +1 -0
  324. package/dist/client/assets/{use-mcp-auth-status-Dls0bLQE.js → use-mcp-auth-status-CKOvUjsu.js} +1 -1
  325. package/dist/client/assets/{use-mcp-client-DJjkIlNp.js → use-mcp-client-WQDNFsc_.js} +1 -1
  326. package/dist/client/assets/{use-mcp-prompts-it9pO2QZ.js → use-mcp-prompts-LhMG3Pij.js} +1 -1
  327. package/dist/client/assets/{use-mcp-tools-wfurU0oX.js → use-mcp-tools-F4vSg6Cr.js} +1 -1
  328. package/dist/client/assets/{use-mobile-CJITN8uI.js → use-mobile-DVyEfslF.js} +1 -1
  329. package/dist/client/assets/use-move-blocks-C_vBd64S.js +1 -0
  330. package/dist/client/assets/{use-navigate-to-agent-MlXDIBYX.js → use-navigate-to-agent-BZizGtaP.js} +1 -1
  331. package/dist/client/assets/{use-org-fs-BH012Up0.js → use-org-fs-mR8sTNyP.js} +1 -1
  332. package/dist/client/assets/{use-org-repo-syncs-jV2kVf-q.js → use-org-repo-syncs-LYGPgfu7.js} +1 -1
  333. package/dist/client/assets/{use-org-sso-Bo72RJ5p.js → use-org-sso-B-Qul1Io.js} +1 -1
  334. package/dist/client/assets/{use-organization-settings-bWX185lw.js → use-organization-settings-CZhHULzA.js} +1 -1
  335. package/dist/client/assets/{use-project-native-view-presence-DhhbOsoh.js → use-project-native-view-presence-DbbXYpJY.js} +1 -1
  336. package/dist/client/assets/{use-project-scope-pwqcjGo8.js → use-project-scope-DTrxFs6w.js} +1 -1
  337. package/dist/client/assets/{use-recent-apps-Rr1jTj-T.js → use-recent-apps-BPKgIDRu.js} +1 -1
  338. package/dist/client/assets/{use-reports-diagnostic-0n4ScjpC.js → use-reports-diagnostic-B8YcWp1M.js} +1 -1
  339. package/dist/client/assets/use-sandbox-events-Cq2mfnM6.js +2 -0
  340. package/dist/client/assets/{use-secrets-Dim43C3b.js → use-secrets-BokO0-gN.js} +1 -1
  341. package/dist/client/assets/{use-section-preview-base-B6FS0lTt.js → use-section-preview-base-C3QCAjZQ.js} +1 -1
  342. package/dist/client/assets/{use-sidebar-collapsed-DcAIYhdp.js → use-sidebar-collapsed-DNtMGrde.js} +1 -1
  343. package/dist/client/assets/{use-tags-6ljf50Kl.js → use-tags-BZilAw5O.js} +1 -1
  344. package/dist/client/assets/{use-task-board-analytics-5XuzJjLw.js → use-task-board-analytics-CadDLlJH.js} +1 -1
  345. package/dist/client/assets/{use-task-board-events-DnEp5edD.js → use-task-board-events-BO-7EKNy.js} +1 -1
  346. package/dist/client/assets/{use-task-board-item-prs-CycVEDhs.js → use-task-board-item-prs-ER-6njOZ.js} +1 -1
  347. package/dist/client/assets/{use-task-board-items-pvi4Vcv1.js → use-task-board-items-CpAskmIM.js} +1 -1
  348. package/dist/client/assets/{use-task-board-prompts-CE5ytMaB.js → use-task-board-prompts-DQqx__yW.js} +1 -1
  349. package/dist/client/assets/{use-task-metadata-D4kXdUwO.js → use-task-metadata-DaTAtFWS.js} +1 -1
  350. package/dist/client/assets/{use-thread-outputs-BPYn8k3d.js → use-thread-outputs-DQ6xHxgF.js} +1 -1
  351. package/dist/client/assets/{use-voice-input-BKZpbbiI.js → use-voice-input-C19j6O14.js} +1 -1
  352. package/dist/client/assets/useInfiniteQuery-K_IsCntR.js +1 -0
  353. package/dist/client/assets/{useQueries-B3iHMIbL.js → useQueries-DvUG5EVg.js} +1 -1
  354. package/dist/client/assets/useSuspenseInfiniteQuery-BxxeKR03.js +1 -0
  355. package/dist/client/assets/{users-7Hqe-w13.js → users-BgTfExah.js} +1 -1
  356. package/dist/client/assets/{utils-BbEfYi1l.js → utils-ChC83HK9.js} +1 -1
  357. package/dist/client/assets/{variant-calendar-vayISj1w.js → variant-calendar-LRu1zblU.js} +1 -1
  358. package/dist/client/assets/{variant-matcher-override-ulDJ4YBu.js → variant-matcher-override-D1mQo9MQ.js} +1 -1
  359. package/dist/client/assets/{view-header-y27ISHbd.js → view-header-ConmBWWI.js} +1 -1
  360. package/dist/client/assets/{virtual-mcp-vRvxAZ15.js → virtual-mcp-BkTVgFTu.js} +1 -1
  361. package/dist/client/assets/watch-sse-pool-pETEkNEY.js +1 -0
  362. package/dist/client/index.html +1 -1
  363. package/dist/server/server.js +561 -561
  364. package/package.json +1 -1
  365. package/dist/client/assets/ReferenceLine-HGyXAqMo.js +0 -1
  366. package/dist/client/assets/agent-app-C3J9IT10.js +0 -1
  367. package/dist/client/assets/agent-assets-CvnH7aBA.js +0 -1
  368. package/dist/client/assets/agent-automations-R-Eaz2To.js +0 -1
  369. package/dist/client/assets/agent-calendar-Cd8km6Ln.js +0 -1
  370. package/dist/client/assets/agent-connect-sources-BrM4y83H.js +0 -1
  371. package/dist/client/assets/agent-deck-DRKoTD-S.js +0 -1
  372. package/dist/client/assets/agent-e2e-BuKHozb1.js +0 -1
  373. package/dist/client/assets/agent-experiments-CgtwbbvZ.js +0 -1
  374. package/dist/client/assets/agent-file-wlYMcv_9.js +0 -1
  375. package/dist/client/assets/agent-hosting-BaITgwKU.js +0 -1
  376. package/dist/client/assets/agent-library-CC7Sh_px.js +0 -1
  377. package/dist/client/assets/agent-library-file-DB9_i_YI.js +0 -1
  378. package/dist/client/assets/agent-overview-BkJ7Az2Q.js +0 -1
  379. package/dist/client/assets/agent-releases-Dh0xH2nd.js +0 -2
  380. package/dist/client/assets/agent-settings-B8F88lFa.js +0 -1
  381. package/dist/client/assets/agent-site-editor-code-TQZ-nnUV.js +0 -2
  382. package/dist/client/assets/agent-site-editor-content-CAE4z8AF.js +0 -1
  383. package/dist/client/assets/agent-site-editor-preview-gLgYeQTA.js +0 -1
  384. package/dist/client/assets/agent-view-mJs78en_.js +0 -1
  385. package/dist/client/assets/ai-providers-CKuZmBiu.js +0 -1
  386. package/dist/client/assets/api-keys-BtDMAyj2.js +0 -1
  387. package/dist/client/assets/app-editor-D88RxUP1.js +0 -1
  388. package/dist/client/assets/auth-entry-Bkznmv5L.js +0 -1
  389. package/dist/client/assets/automation-runs-CvC4BqLv.js +0 -1
  390. package/dist/client/assets/automations-Ajx2woko.js +0 -1
  391. package/dist/client/assets/blocks-tab-states-BRjgrPty.js +0 -1
  392. package/dist/client/assets/category-editor-CozNeVRI.js +0 -1
  393. package/dist/client/assets/cms-settings-editor-kiB9O6al.js +0 -1
  394. package/dist/client/assets/cms-store-drafts-DEGbfccc.js +0 -1
  395. package/dist/client/assets/collection-detail-a6oC0bB8.js +0 -1
  396. package/dist/client/assets/connection-detail-D0-sYPQS.js +0 -1
  397. package/dist/client/assets/connections-D-1tH9cf.js +0 -1
  398. package/dist/client/assets/content-tab-DH5bq_bz.js +0 -25
  399. package/dist/client/assets/context-DK_qXRQL.js +0 -1
  400. package/dist/client/assets/discover-DzzEIO43.js +0 -1
  401. package/dist/client/assets/file-explorer-Bgho9rLt.js +0 -2
  402. package/dist/client/assets/home-C9onXt5U.js +0 -1
  403. package/dist/client/assets/hosted-reconcile-DNkBVm-1.js +0 -1
  404. package/dist/client/assets/index-Bbmo8mh-.js +0 -1
  405. package/dist/client/assets/index-DB454549.js +0 -1
  406. package/dist/client/assets/index-i75UpmlW.js +0 -4
  407. package/dist/client/assets/library-Cx1S-GVi.js +0 -1
  408. package/dist/client/assets/login-BuRZE0OR.js +0 -1
  409. package/dist/client/assets/mustache-DtDLolVD.js +0 -4
  410. package/dist/client/assets/oauth-consent-Dm4zOEtc.js +0 -1
  411. package/dist/client/assets/openai-conversation-BH1GqT3q.js +0 -3
  412. package/dist/client/assets/parse-sections-Ca4qHQSq.js +0 -20
  413. package/dist/client/assets/plan-q4Vm_z4g.js +0 -1
  414. package/dist/client/assets/post-calendar-CvHtHQHg.js +0 -1
  415. package/dist/client/assets/post-editor-0bthmrQK.js +0 -2
  416. package/dist/client/assets/preview-tab-C506bsNP.js +0 -551
  417. package/dist/client/assets/project-app-view-CKUZlcwf.js +0 -1
  418. package/dist/client/assets/project-reports-bT7h-_SM.js +0 -1
  419. package/dist/client/assets/project-tasks-CqL0-1p3.js +0 -1
  420. package/dist/client/assets/projects-CM1tg94T.js +0 -1
  421. package/dist/client/assets/record-editor-fYL_geiT.js +0 -1
  422. package/dist/client/assets/redirect-editor-CqeB0Mu0.js +0 -1
  423. package/dist/client/assets/reports-CtLMPNBD.js +0 -1
  424. package/dist/client/assets/reports-onboarding-Bb3vI6W8.js +0 -1
  425. package/dist/client/assets/reports-tab-BaN84XaS.js +0 -2
  426. package/dist/client/assets/repositories-DR2_ORl-.js +0 -1
  427. package/dist/client/assets/review-settings-DUhDHWEg.js +0 -1
  428. package/dist/client/assets/route-8zXp8Zmg.js +0 -1
  429. package/dist/client/assets/route-DW6RzQLd.js +0 -1
  430. package/dist/client/assets/route-oGUs3Dt9.js +0 -1
  431. package/dist/client/assets/sandbox-lifecycle-context-WXIR2CMZ.js +0 -1
  432. package/dist/client/assets/sections-editor-D1U5_lZq.js +0 -1
  433. package/dist/client/assets/seo-editor-B6UrHPko.js +0 -1
  434. package/dist/client/assets/settings-tab-CHBeACws.js +0 -1
  435. package/dist/client/assets/site-draft-view-3CfqUHrV.js +0 -1
  436. package/dist/client/assets/site-editor-BqlLTFw0.js +0 -1
  437. package/dist/client/assets/site-editor-toast-Cgezu0A5.js +0 -1
  438. package/dist/client/assets/skills-B_05tfLr.js +0 -1
  439. package/dist/client/assets/taskboard-analytics-D-vAg9Px.js +0 -1
  440. package/dist/client/assets/tasks-adXvugV8.js +0 -1
  441. package/dist/client/assets/thread-analytics-DPDga_ap.js +0 -1
  442. package/dist/client/assets/thread-route-Ci8rIker.js +0 -1
  443. package/dist/client/assets/use-apply-named-rule-BnEs0jP7.js +0 -1
  444. package/dist/client/assets/use-ask-in-chat-BIANNd7Z.js +0 -1
  445. package/dist/client/assets/use-blocks-v8-project-4PZwWSEO.js +0 -1
  446. package/dist/client/assets/use-connection-BozgIoMu.js +0 -1
  447. package/dist/client/assets/use-content-sync-BBbOIir0.js +0 -1
  448. package/dist/client/assets/use-fast-preview-draft-url-KJzyk03O.js +0 -1
  449. package/dist/client/assets/use-main-panel-tabs-DfOwinBC.js +0 -1
  450. package/dist/client/assets/use-move-blocks-CC1C41-K.js +0 -1
  451. package/dist/client/assets/use-sandbox-events-D1_GHzsF.js +0 -2
  452. package/dist/client/assets/useInfiniteQuery-CtNfxLxq.js +0 -1
  453. package/dist/client/assets/useSuspenseInfiniteQuery-OzDVxqdl.js +0 -1
  454. package/dist/client/assets/watch-sse-pool-DhoYakYc.js +0 -1
@@ -1 +0,0 @@
1
- import{eT as P,eU as y,c as R,q as Z,i as F,K as g,eV as Ae,d0 as mn,aF as Sn,aG as yn,r as M,a as En,at as _e,a5 as On,by as yt,eW as Dn,eX as kn,eY as Et,ar as In,bo as Ot,bh as B,eZ as _n,e_ as Tn,e$ as q,f0 as Pn,f1 as Rn,f2 as ee,f3 as xn,f4 as Dt,f5 as $n,f6 as kt,f7 as Nn,f8 as jn,a3 as Cn,f9 as An,t as te,j as Y}from"./index-DEZ1imMJ.js";import{u as It}from"./use-voice-input-BKZpbbiI.js";import{s as nt}from"./thread-intent-DuI80508.js";import{u as Le}from"./use-blocks-v8-project-4PZwWSEO.js";import{b as me}from"./sandbox-url-D3mC8qhT.js";import{s as Ln}from"./utils-BbEfYi1l.js";import{u as Ue}from"./repository-binding-C0msapZZ.js";import{u as Un}from"./chat-context-PvP_Q1CV.js";import{i as Mn,u as Fn}from"./use-sandbox-events-D1_GHzsF.js";import{a as Qn}from"./sandbox-git-api-DcqI6XE4.js";const K="deco-content",Te={major:1},_t=1;async function Vn(e){let t=new Uint8Array(await e.arrayBuffer());if(t[0]===31&&t[1]===139){const n=new Blob([t]).stream().pipeThrough(new DecompressionStream("gzip"));t=new Uint8Array(await new Response(n).arrayBuffer())}return JSON.parse(new TextDecoder().decode(t))}const Pe={major:Te.major,minor:_t},Tt=`the endpoint speaks an older ${K} than this client needs (${Pe.major}.${Pe.minor} or newer): update @decocms/blocks in the site (8.2.0 or newer) and start deco serve again`;function ae(e,t,n){const o={reason:t,required:{...Pe}};if(n){o.actual={protocol:n.protocol,major:n.version?.major,minor:n.version?.minor};const r=n.server;typeof r?.name=="string"&&typeof r.version=="string"&&(o.server={name:r.name,version:r.version})}return new P(y.Unsupported,e,o)}function Pt(e){const t=e??{},{protocol:n,version:o}=t;if(n!==K)throw ae(`the endpoint speaks ${JSON.stringify(n)}, not ${K}`,"protocol",t);if(o?.major!==Te.major)throw ae(`the endpoint speaks ${K} ${String(o?.major)}.x; this client speaks ${Te.major}.x`,"major",t);if(typeof o.minor!="number"||o.minor<_t)throw ae(Tt,"outdated",t);return e}function ot(e,t){return t.code===y.MethodNotFound&&e.startsWith("changes.")?ae(Tt,"outdated"):P.from(t)}function Me(e){const t=e.fetch??(s=>fetch(s));let n=1;async function o(s){const i={"content-type":"application/json",accept:"application/json",...e.headers},a=await t(new Request(e.endpoint,{method:"POST",headers:i,body:JSON.stringify(s)}));let l;try{l=await Vn(a)}catch{throw new P(y.Unavailable,`the endpoint answered HTTP ${a.status} without a JSON-RPC body`)}if(!a.ok||!Array.isArray(l)&&l?.id===null){const c=l?.error;throw c?P.from(c):new P(y.Unavailable,`the endpoint answered HTTP ${a.status}`)}return l}const r=async(s,i)=>{const a=n++,l=await o({jsonrpc:"2.0",id:a,method:s,params:i??{}});if(l.error)throw ot(s,l.error);return l.result};return{call:r,describe:async()=>Pt(await r("describe")),schemaGet:s=>r("schema.get",s),blocksList:s=>r("blocks.list",s),blocksApply:s=>r("blocks.apply",s),changesList:s=>r("changes.list",s),changesGet:s=>r("changes.get",s),changesDiscard:s=>r("changes.discard",s),async batch(s){const i=s.map(()=>n++),a=await o(s.map((c,f)=>({jsonrpc:"2.0",id:i[f],method:c.method,params:c.params??{}}))),l=new Map(a.map(c=>[c.id,c]));return i.map((c,f)=>{const u=l.get(c);return u?u.error?{ok:!1,error:ot(s[f].method,u.error)}:{ok:!0,result:u.result}:{ok:!1,error:new P(y.InternalError,"no response for this call")}})}}}function Fe(e){return e&&!e.edited?{ifNoneMatch:e.revision}:{}}const rt=20,st=5,it=500;function Qe(e){return e instanceof P?e.code===y.MethodNotFound?!0:e.code===y.Unsupported&&e.data?.reason==="outdated":!1}function he(e,t){return t.notModified?e?{...e,base:t.base}:null:{revision:t.revision,base:t.base,changes:t.changes}}async function Bn(e,t,n){const o=g.contentChanges(n),r=e.getQueryData(o),s=await t.changesList(Fe(r)),i=he(r,s);if(i)return i;const a=await t.changesList({});return he(void 0,a)}async function Rt(e,t){const n=[];for(let s=0;s<t.length;s+=rt)n.push(t.slice(s,s+rt));const o=Object.create(null),r=[];for(let s=0;s<n.length;s+=st){const i=await e.batch(n.slice(s,s+st).map(a=>({method:"changes.get",params:{names:a}})));for(const a of i){if(!a.ok)throw a.error;const l=a.result;Object.assign(o,l.entries),r.push(...l.diagnostics)}}return{entries:o,diagnostics:r}}async function Hr(e,t){let n={revision:"",versions:{}};for(let o=0;o<t.length;o+=it){const r=t.slice(o,o+it),s=await e.changesDiscard({names:r.map(i=>i.name),ifMatch:Object.fromEntries(r.map(i=>[i.name,i.version]))});n={revision:s.revision,versions:{...n.versions,...s.versions}}}return n}function Jr(e){return e instanceof P&&e.code===y.Conflict}function Ve(e){return e?.kind==="protocol"?e:null}function Wr(e,t,n){const o=R.c(14);let r;o[0]!==n?(r={},o[0]=n,o[1]=r):r=o[1];const s=r,i=Z();let a;o[2]!==e?(a=Ve(e),o[2]=e,o[3]=a):a=o[3];const l=a,c=!!l&&!!t&&s.enabled!==!1;let f;o[4]!==t?(f=g.contentChanges(t??""),o[4]=t,o[5]=f):f=o[5];let u;o[6]!==t||o[7]!==c||o[8]!==l||o[9]!==i?(u=c?()=>Bn(i,l.client,t):Ae,o[6]=t,o[7]=c,o[8]=l,o[9]=i,o[10]=u):u=o[10];let d;return o[11]!==f||o[12]!==u?(d={queryKey:f,queryFn:u,staleTime:0},o[11]=f,o[12]=u,o[13]=d):d=o[13],F(d)}function Gr(e,t,n){const o=R.c(14);let r;o[0]!==e?(r=Ve(e),o[0]=e,o[1]=r):r=o[1];const s=r;let i;o[2]!==n?(i=n?Object.keys(n.changes):[],o[2]=n,o[3]=i):i=o[3];const a=i,l=!!s&&!!t&&!!n&&a.length>0;let c;o[4]!==t||o[5]!==n?.revision?(c=g.contentChangeSides(t??"",n?.revision??""),o[4]=t,o[5]=n?.revision,o[6]=c):c=o[6];let f;o[7]!==l||o[8]!==a||o[9]!==s?(f=l?()=>Rt(s.client,a):Ae,o[7]=l,o[8]=a,o[9]=s,o[10]=f):f=o[10];let u;return o[11]!==c||o[12]!==f?(u={queryKey:c,queryFn:f,staleTime:Number.POSITIVE_INFINITY},o[11]=c,o[12]=f,o[13]=u):u=o[13],F(u)}function Yr(e,t,n){const o=R.c(16);let r;o[0]!==e?(r=Ve(e),o[0]=e,o[1]=r):r=o[1];const s=r;let i,a,l,c;if(o[2]!==t||o[3]!==n?.changes||o[4]!==s){const d=Object.entries(n?.changes??{}).filter(Yn).map(Gn).sort(Wn);a=d.map(Jn);const h=JSON.stringify(d.map(Hn));i=!!s&&!!t&&a.length>0,c=F,l=g.contentDeletedCopies(t??"",h),o[2]=t,o[3]=n?.changes,o[4]=s,o[5]=i,o[6]=a,o[7]=l,o[8]=c}else i=o[5],a=o[6],l=o[7],c=o[8];let f;o[9]!==i||o[10]!==a||o[11]!==s?(f=i?async()=>{const d=await Rt(s.client,a),h=Object.create(null);for(const[b,v]of Object.entries(d.entries))h[b]=v.before&&typeof v.before=="object"?v.before:null;return h}:Ae,o[9]=i,o[10]=a,o[11]=s,o[12]=f):f=o[12];let u;return o[13]!==l||o[14]!==f?(u={queryKey:l,queryFn:f,staleTime:Number.POSITIVE_INFINITY,placeholderData:mn},o[13]=l,o[14]=f,o[15]=u):u=o[15],c(u)}function Hn(e){return[e.name,e.base]}function Jn(e){return e.name}function Wn(e,t){return e.name<t.name?-1:e.name>t.name?1:0}function Gn(e){const[t,n]=e;return{name:t,base:n.baseVersion??""}}function Yn(e){const[,t]=e;return t.kind==="delete"}function xt(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")return!1;const n=t.hostname.toLowerCase();return n==="127.0.0.1"||n==="[::1]"||n==="localhost"}catch{return!1}}function ge(e){try{const t=new URL(e);return(t.hostname==="127.0.0.1"||t.hostname==="[::1]")&&(t.hostname="localhost"),t.href}catch{return e}}const $t=Sn({endpoint:yn().max(2048).refine(e=>xt(e)&&new URL(e).pathname==="/rpc").transform(ge)});function zr(e){const t=new URLSearchParams(e.replace(/^#/,"")),n=$t.safeParse({endpoint:t.get("endpoint")??""});return n.success?n.data:null}function Nt(e){const t=$t.safeParse(e);return t.success?t.data:null}const jt="studio:deco-serve-last";function Xr(e){try{localStorage.setItem(jt,JSON.stringify(e))}catch{}}function Zr(){try{const e=localStorage.getItem(jt);return e?Nt(JSON.parse(e)):null}catch{return null}}function qr(e){try{return new URL(ge(e)).host}catch{return e}}function zn(e,t=1e4){return Math.min(1e3*2**Math.max(0,e-1),t)}const Xn="http://localhost:4545/rpc";class Be extends Error{constructor(t="the endpoint isn't deco serve"){super(t),this.name="NotDecoServeError"}}function Zn(e){if(e instanceof Be)return{reason:"not-deco-serve"};if(!(e instanceof P))return{reason:"not-answering"};switch(e.code){case y.Unauthorized:case y.MethodNotFound:return{reason:"outdated"};case y.Unsupported:return Qe(e)?{reason:"outdated"}:{reason:"version-mismatch"};case y.Unavailable:return/^the endpoint answered HTTP/.test(e.message)?{reason:"not-deco-serve"}:{reason:"error",detail:e.message};default:return{reason:"error",detail:e.message}}}function Kr(e,t){if(e)return[ge(e.endpoint)];const n=[t?.endpoint,Xn].filter(o=>!!o).map(ge);return[...new Set(n)]}const Ct=M.createContext(null);function qn(e){const t=R.c(24),n=M.useContext(Ct),o=Le(n?null:e),{data:r}=En.useSession(),s=r?.user?.id??"",i=!!e&&!!s;let a;t[0]!==i||t[1]!==s||t[2]!==e?(a=i?_e.decoServeConnection(s,e):null,t[0]=i,t[1]=s,t[2]=e,t[3]=a):a=t[3];const[l,c]=ct(a);let f;t[4]!==i||t[5]!==s||t[6]!==e?(f=i?_e.decoServeEndpoint(s,e):null,t[4]=i,t[5]=s,t[6]=e,t[7]=f):f=t[7];const[u,d]=ct(f);if(n)return n;let h;t[8]!==l||t[9]!==i||t[10]!==o?(h=i&&o?Nt(l):null,t[8]=l,t[9]=i,t[10]=o,t[11]=h):h=t[11];const b=h,v=i&&o&&typeof u=="string"?u:null;let m;t[12]!==d||t[13]!==c||t[14]!==i?(m=x=>{i&&(c(x),d(x.endpoint))},t[12]=d,t[13]=c,t[14]=i,t[15]=m):m=t[15];let E;t[16]!==c||t[17]!==i?(E=()=>{i&&c(null)},t[16]=c,t[17]=i,t[18]=E):E=t[18];let S;return t[19]!==b||t[20]!==v||t[21]!==m||t[22]!==E?(S={connection:b,lastEndpoint:v,set:m,clear:E},t[19]=b,t[20]=v,t[21]=m,t[22]=E,t[23]=S):S=t[23],S}function at(e){try{const t=localStorage.getItem(e);return t===null?null:JSON.parse(t)}catch{return null}}function ct(e){const t=R.c(17),n=Z(),o=e??"";let r;t[0]!==o?(r=["localStorage",o],t[0]=o,t[1]=r):r=t[1];const s=r;let i,a;t[2]!==e?(i=()=>e?at(e):null,a=()=>e?at(e):null,t[2]=e,t[3]=i,t[4]=a):(i=t[3],a=t[4]);const l=!!e;let c;t[5]!==s||t[6]!==i||t[7]!==a||t[8]!==l?(c={queryKey:s,queryFn:i,initialData:a,enabled:l,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[5]=s,t[6]=i,t[7]=a,t[8]=l,t[9]=c):c=t[9];const{data:f}=F(c);let u;t[10]!==e||t[11]!==n||t[12]!==s?(u=v=>{if(e){try{v===null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(v))}catch{}n.setQueryData(s,v)}},t[10]=e,t[11]=n,t[12]=s,t[13]=u):u=t[13];const d=u,h=e?f??null:null;let b;return t[14]!==d||t[15]!==h?(b=[h,d],t[14]=d,t[15]=h,t[16]=b):b=t[16],b}function es(e){return e.kind==="protocol"||e.kind==="unavailable"}function ts(e){const t=e.hasOrg?e.orgFlag:!1,{backend:n}=e;return n===null||n==="legacy"?t:!0}function ns(e,t,n){return t!=="github"||!n?!1:e.kind==="pending"?!0:e.kind==="unavailable"&&e.siteNotOwned?!1:(e.kind==="protocol"||e.kind==="unavailable")&&e.source==="github"}function os(e){if(e.kind!=="protocol"||e.source!=="local")return null;const t=e.describe.preview?.url;return t&&xt(t)?t:null}function rs(e,t){return e.kind!=="protocol"||e.source!=="local"||!e.describe.assets||!t?null:new URL(t.endpoint).origin}function At(e){return e.hasServeConnection?"local":e.runtime==="sandbox"?"sandbox":"github"}function Kn(e){if(!e.hasProject)return"legacy";const t=At(e);if(t==="local")return"protocol-local";if(!e.v8)return"legacy";if(t==="sandbox"){const o=e.sandboxSite;return o==="ready"?"protocol-sandbox":o==="error"?"retrying-sandbox":"pending"}const n=e.githubSite;return n==="ready"?"protocol-github":n==="not-owned"?"site-not-owned-github":n==="error"?"unavailable-github":"pending"}function eo(e){return{github:e.v8&&e.mode==="github",sandbox:e.v8&&e.mode==="sandbox"&&e.workingTreeReady}}function lt(e){return e.isError||e.errorUpdateCount>0}function to(e,t,n){if(!t||n.size===0)return e;const o={...e};for(const r of n)Object.hasOwn(t,r)?o[r]=t[r]:delete o[r];return o}function no(e){if(!e||typeof e!="object")return[];const t=e,n=[];return typeof t.blockKey=="string"&&n.push(t.blockKey),t.writes&&typeof t.writes=="object"&&n.push(...Object.keys(t.writes)),Array.isArray(t.deletes)&&n.push(...t.deletes.filter(o=>typeof o=="string")),n}const Lt="__noSchema";function Ut(){return{manifest:{blocks:{}},schema:{definitions:{},root:{}},[Lt]:!0}}function ss(e){return!!e&&e[Lt]===!0}function He(e){if(!e.ok)return e.error.code===y.NotFound;const t=e.result;return t.notModified===!1&&t.schema===null}function oo(e,t){return(typeof t.name=="string"?t.name.trim():"")||e}const ro=(e,t)=>e.label.localeCompare(t.label)||e.key.localeCompare(t.key);function is(e){const t=new Map;for(const[n,o]of Object.entries(e)){const r=o&&typeof o=="object"&&!Array.isArray(o)?o:{},s=typeof r.__resolveType=="string"?r.__resolveType:null,i=t.get(s)??[];i.push({key:n,label:oo(n,r)}),t.set(s,i)}return[...t.entries()].map(([n,o])=>({resolveType:n,blocks:o.sort(ro)})).sort((n,o)=>n.resolveType===null?1:o.resolveType===null?-1:ut(n.resolveType).localeCompare(ut(o.resolveType))||n.resolveType.localeCompare(o.resolveType))}function ut(e){return(e.split("/").filter(Boolean).at(-1)??e).replace(/\.(tsx?|jsx?)$/,"")||e}function ft(e,t,n){if(t.length===0)return n;const[o,...r]=t;if(Array.isArray(e)&&typeof o=="number"){const s=e.slice();return s[o]=ft(e[o],r,n),s}if(e&&typeof e=="object"&&typeof o=="string"){const s=e,i={};for(const a of Object.keys(s))i[a]=a===o?ft(s[a],r,n):s[a];return i}return e}function as(e){if(e.trim()==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}class dt extends Error{}const Je="site-not-owned";async function so(e){return e.status!==409?!1:(await e.clone().json().catch(()=>null))?.code==="site_not_owned"}async function io(e,t=n=>fetch(n)){const n=Me({endpoint:e,fetch:async o=>{const r=await t(o);if(await so(r))throw new dt;return r}});try{return await Ge(n)}catch(o){if(o instanceof dt)return Je;throw o}}async function ao(e,t,n){await t();const o=await io(e,n);return o===Je?o:{...o,hosted:Dn(e,n)}}const We=5e3;function co(e){if(!e.site)throw new Error("this project names no site");return kn(e.site,e.branch)}function lo(e){return new URL(me(e,"rpc"),window.location.origin).href}async function Ge(e){const[t,n]=await e.batch([{method:"describe"},{method:"schema.get"}]);if(!t?.ok)throw t?.error??new Error("no describe");if(t.result?.protocol!==K)throw new Be;const r=Pt(t.result);if(!n)throw new Error("no schema.get");if(He(n))return{client:e,describe:r,hasSchema:!1};if(n.ok)return{client:e,describe:r,hasSchema:!0};throw n.error}function uo(e,t=n=>fetch(n)){return Ge(Me({endpoint:e,fetch:t}))}function re(e,t){const n=R.c(50),{org:o}=On(),{connection:r}=qn(e),{runtime:s}=It(e),i=M.useContext(Ct),a=Le(e),l=yt(Ue(e)?.metadata),c=At({hasServeConnection:!!r,runtime:s}),f=Un()?.taskId??null,u=Mn(Fn().lifecycle.phase),d=Z(),h=eo({mode:c,v8:a,workingTreeReady:u}),b=h.github&&!!o.slug&&!!e&&!!t,v=F({queryKey:g.contentBackend(o.slug,e??"",t??"","github"),queryFn:()=>ao(co({orgSlug:o.slug,site:l,branch:t}),()=>Et(l,t)),enabled:b,staleTime:Number.POSITIVE_INFINITY,...ht}),m=h.sandbox&&!!o.slug&&!!e&&!!t;let E;n[0]!==t||n[1]!==o.slug||n[2]!==f||n[3]!==e?(E=()=>uo(lo({orgSlug:o.slug,virtualMcpId:e,branch:t,threadId:f})),n[0]=t,n[1]=o.slug,n[2]=f,n[3]=e,n[4]=E):E=n[4];const S=F({queryKey:g.contentBackend(o.slug,e??"",t??"","sandbox",f??""),queryFn:E,enabled:m,staleTime:Number.POSITIVE_INFINITY,...ht}),x=!!r;let _;n[5]!==r?.endpoint||n[6]!==o.slug||n[7]!==e?(_=g.contentBackend(o.slug,e??"","local",r?.endpoint??""),n[5]=r?.endpoint,n[6]=o.slug,n[7]=e,n[8]=_):_=n[8];let N;n[9]!==r?(N=()=>Ge(Me({endpoint:r.endpoint})),n[9]=r,n[10]=N):N=n[10];let $;n[11]!==x||n[12]!==_||n[13]!==N?($={queryKey:_,queryFn:N,enabled:x,staleTime:Number.POSITIVE_INFINITY,retry:go,retryDelay:ho,refetchInterval:fo},n[11]=x,n[12]=_,n[13]=N,n[14]=$):$=n[14];const w=F($);let L;n[15]!==r?.endpoint||n[16]!==o.slug||n[17]!==e?(L=g.contentBackend(o.slug,e??"","local",r?.endpoint??""),n[15]=r?.endpoint,n[16]=o.slug,n[17]=e,n[18]=L):L=n[18];const k=L;let T;n[19]!==r?.endpoint||n[20]!==o.slug||n[21]!==e?(T=g.contentBackend(o.slug,e??"","local-describe",r?.endpoint??""),n[19]=r?.endpoint,n[20]=o.slug,n[21]=e,n[22]=T):T=n[22];let j;n[23]!==w.data||n[24]!==k||n[25]!==d?(j=async()=>{try{return await w.data.client.describe()}catch(p){const J=p;throw d.invalidateQueries({queryKey:k,exact:!0},{cancelRefetch:!1}),J}},n[23]=w.data,n[24]=k,n[25]=d,n[26]=j):j=n[26];const C=!!w.data&&!i;let D;n[27]!==T||n[28]!==j||n[29]!==C?(D={queryKey:T,queryFn:j,enabled:C,refetchInterval:We,retry:!1},n[27]=T,n[28]=j,n[29]=C,n[30]=D):D=n[30];const A=F(D).data??w.data?.describe,I=Kn({hasProject:!!e,hasServeConnection:!!r,runtime:s,v8:a,githubSite:v.data===Je?"not-owned":v.data?"ready":lt(v)?"error":"loading",sandboxSite:vo({data:S.data,isError:lt(S),workingTreeReady:u})});if(I==="pending"){let p;return n[31]===Symbol.for("react.memo_cache_sentinel")?(p={kind:"pending"},n[31]=p):p=n[31],p}if(I==="retrying-sandbox"){let p;return n[32]===Symbol.for("react.memo_cache_sentinel")?(p={kind:"pending",retrying:"sandbox"},n[32]=p):p=n[32],p}if(I==="legacy"){let p;return n[33]===Symbol.for("react.memo_cache_sentinel")?(p={kind:"legacy"},n[33]=p):p=n[33],p}if(I==="protocol-github"){const p=v.data;let J;n[34]!==p?(J=Re("github",p,""),n[34]=p,n[35]=J):J=n[35];let se;return n[36]!==l||n[37]!==J?(se={...J,site:l},n[36]=l,n[37]=J,n[38]=se):se=n[38],se}if(I==="site-not-owned-github"){let p;return n[39]===Symbol.for("react.memo_cache_sentinel")?(p={kind:"unavailable",source:"github",siteNotOwned:!0},n[39]=p):p=n[39],p}if(I==="protocol-sandbox"){let p;return n[40]!==S.data?(p=Re("sandbox",S.data,":sandbox"),n[40]=S.data,n[41]=p):p=n[41],p}if(I==="unavailable-github"){let p;return n[42]===Symbol.for("react.memo_cache_sentinel")?(p={kind:"unavailable",source:"github"},n[42]=p):p=n[42],p}const Q=w.error??w.failureReason,O=r?.endpoint??"";let V;return n[43]!==A||n[44]!==w.data||n[45]!==w.failureCount||n[46]!==w.isError||n[47]!==O||n[48]!==Q?(V=wo({probed:w.data,isError:w.isError,failureCount:w.failureCount,failure:Q,describe:A,endpoint:O}),n[43]=A,n[44]=w.data,n[45]=w.failureCount,n[46]=w.isError,n[47]=O,n[48]=Q,n[49]=V):V=n[49],V}function fo(e){return e.state.status==="error"||e.state.data?.hasSchema===!1?We:!1}function ho(e){return zn(e+1)}function go(e,t){return!(t instanceof P)&&!(t instanceof Be)}function vo(e){return e.data!==void 0?"ready":e.workingTreeReady?e.isError?"error":"loading":"unavailable"}const bo=3;function wo(e){const t=e.probed?Re("local",{...e.probed,describe:e.describe??e.probed.describe},`:serve:${e.endpoint}`):null;return e.isError||e.failureCount>0?t?.kind==="protocol"&&!e.isError&&e.failureCount<bo?t:{kind:"unavailable",source:"local",problem:Zn(e.failure)}:t??{kind:"pending"}}const ht={retry:2,refetchInterval:e=>e.state.status==="error"?We:!1};function Re(e,t,n){return{kind:"protocol",source:e,client:t.client,describe:t.describe,cacheKeySuffix:n,hasSchema:t.hasSchema,...t.hosted?{hosted:t.hosted}:{}}}function Mt(e){const t=R.c(12);let n;t[0]!==e?(n=_e.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const o=n,[r,s]=In(o,null),i=Le(e);let a;t[2]!==r||t[3]!==e?(a=e?nt(r):null,t[2]=r,t[3]=e,t[4]=a):a=t[4];const c=i?null:a;let f,u;t[5]!==s?(f=h=>s(nt(h)),u=()=>s(null),t[5]=s,t[6]=f,t[7]=u):(f=t[6],u=t[7]);let d;return t[8]!==c||t[9]!==f||t[10]!==u?(d={url:c,setUrl:f,clear:u},t[8]=c,t[9]=f,t[10]=u,t[11]=d):d=t[11],d}function po(e,t){const n=(e??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return n?`${n}/${t}`:t}function gt(e){let t;try{t=JSON.parse(e)}catch{return null}return typeof t!="object"||t===null||Array.isArray(t)?null:t}function Se(e,t,n){return["decofile-write",e,t,n]}function mo(e,t,n){return{id:Se(e,t,n).join(":")}}class Ye extends Error{constructor(t,n,o=[],r=!1){super(n),this.blocks=t,this.fields=o,this.carriedStored=r,this.name="BlockConflictError"}blocks;fields;carriedStored}function ze(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Xe(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function So(e,t){const n=await e.json().catch(()=>({}));throw new Error(n.error??`${t} failed (${e.status})`)}function yo(e,t,n){e.setQueryData(g.decofileDraft(ze(t)),n)}function Eo(e,t){return e.getQueryData(g.decofileDraft(ze(t)))??null}async function Oo(e,t){return(await fetch(Xe(e),{cache:"no-store",headers:{"if-none-match":`"${t}"`}}).catch(()=>null))?.status===200}function cs(e){const t=R.c(4);let n;t[0]!==e?(n=g.decofileDraft(e?ze(e):""),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:Do,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:r}=F(o);return r??null}async function Do(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function ko(e,t){const n=await fetch(Xe(t),{cache:"no-store"});if(!n.ok){const r=new Error(`Failed to fetch decofile: ${n.status}`);throw r.status=n.status,r}const o=await n.json();return o.token&&yo(e,t,{version:o.version,token:o.token,apiHost:o.apiHost??window.location.host}),o.decofile}async function ls(e,t){const n=await fetch(Xe(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(n.status===409){const r=await n.json().catch(()=>({}));throw r.code==="block-conflict"?new Ye(r.blocks??[],r.error??"Block changed"):new Error(r.error??`Save failed (${n.status})`)}if(!n.ok)return So(n,"Save");const o=await n.json();return{...o,apiHost:o.apiHost??window.location.host}}const Ft=3e3,Io=15e3,_o=2*6e4,Qt={now:()=>Date.now(),setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),hidden:()=>typeof document<"u"&&document.visibilityState==="hidden"};function To(e){return e<_o?Ft:Io}function Po(e,t=Qt){const n=t.now();let o=!1,r=!1,s=null;const i=()=>{o||(s=t.setTimeout(a,To(t.now()-n)))},a=()=>{if(s=null,o)return;const{read:l,skip:c}=e();if(r||t.hidden()||c?.()){i();return}r=!0;let f;try{f=l()}catch{f=void 0}Promise.resolve(f).catch(()=>{}).finally(()=>{r=!1}),i()};return i(),()=>{o=!0,s!==null&&t.clearTimeout(s)}}const vt=()=>0;function Ro(e,t,n=Qt){const o=M.useRef(t);o.current=t;const[r]=M.useState(()=>({polling:()=>Po(()=>o.current,n),idle:()=>()=>{}}));M.useSyncExternalStore(e?r.polling:r.idle,vt,vt)}function Vt(e,t){return me(e,t)}function xo(e,t){return me(e,"preview-fetch",{path:t})}function us(e){return Vt(e,"preview-invoke")}function fs(e){return Vt(e,"catalog-invoke")}function Bt(e){try{const{hostname:t}=new URL(e);return t==="localhost"||t.endsWith(".localhost")||t==="127.0.0.1"||t==="::1"}catch{return!1}}function $o(){if(typeof document>"u")return null;const e=Array.from(document.querySelectorAll("iframe"));for(const t of e){const n=t.getAttribute("src");if(n&&Bt(n))return n}return null}function No(e,t){const n=e.previewUrl??e.getFallbackPreviewUrl?.()??$o();return n&&Bt(n)?new URL(t,n).toString():xo(e,t)}function jo(e){return No(e,"/.decofile")}function Co(e){return e===400?"absent":e===404?"unavailable":e>=200&&e<300?"ok":"error"}function bt(e){return e.liveOk||e.committedAbsent?404:e.liveStatus??502}async function Ao(e,t){const n=me(e,"read"),o=await fetch(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:t,full:!0})}),r=Co(o.status);if(r==="absent")return{kind:"absent"};if(r==="unavailable")return{kind:"unavailable"};if(r==="error"){const i=new Error(`Failed to read ${t}: ${o.status}`);throw i.status=o.status,i}const s=await o.json();return typeof s.content!="string"?{kind:"unavailable"}:{kind:"data",data:Ln(s.content)}}async function Lo(e,t){const n=await Ao(e,t);if(n.kind!=="data")return n;try{return{kind:"data",data:JSON.parse(n.data)}}catch{return{kind:"unavailable"}}}async function ds(e){const t=`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}/meta`,n=await fetch(t,{cache:"no-store"});if(n.status===404)return{kind:"absent"};if(!n.ok){const o=new Error(`Failed to read committed meta: ${n.status}`);throw o.status=n.status,o}try{return{kind:"data",data:await n.json()}}catch{return{kind:"unavailable"}}}function Uo(e){return Ue(e)?.metadata?.runtime?.path??null}class Ht extends Error{constructor(t){super(t instanceof Error?t.message:String(t),{cause:t}),this.name="ServeLostError"}}function hs(e){return e instanceof P&&e.code===y.Conflict}function Jt(e){const t=e.data?.violations;return!Array.isArray(t)||t.length===0?e.message:t.slice(0,3).map(n=>n.message).join("; ")}class Ze extends Error{constructor(){super("The draft's changes couldn't be read"),this.name="HostedDraftUnreadError"}}class qe extends Error{constructor(){super("The blocks kept changing while the change was saved"),this.name="HostedKeptChangingError"}}function gs(e,t){return(t instanceof Ze||t instanceof qe)&&(t.message=Wt(e,t,"github")),t}function Wt(e,t,n){if(t instanceof Ze)return e("siteEditor.save.draftUnread");if(t instanceof qe)return e("siteEditor.save.keptChanging");if(t instanceof Ye)return t.message;if(n==="local")return Fo(e,t);if(t instanceof P)switch(t.code){case y.Conflict:return e("siteEditor.save.conflict");case y.ReadOnly:return e("siteEditor.save.readOnly");case y.InvalidBlock:case y.InvalidParams:return e("siteEditor.save.invalid");case y.LimitExceeded:return e("siteEditor.save.tooLarge")}return e("siteEditor.save.failed")}function Mo(e,t){if(t==="local"||e instanceof Ye||e instanceof Ze||e instanceof qe)return null;if(e instanceof P){const n=e.code===y.InvalidBlock||e.code===y.InvalidParams?Jt(e):e.message;return n?`${e.code}: ${n}`:null}return e.message||null}function Fo(e,t){if(t instanceof Ht)return e("decoServe.save.serverGone");if(t instanceof P)switch(t.code){case y.Conflict:return e("decoServe.save.conflict");case y.ReadOnly:return e("decoServe.save.readOnly");case y.InvalidBlock:case y.InvalidParams:return e("decoServe.save.invalid",{detail:Jt(t)});case y.LimitExceeded:return e("decoServe.save.tooLarge")}return e("sectionsEditor.sectionsEditor.saveFailed",{error:t.message})}function Qo(e,t,n){return e===null?0:Math.max(0,n-Math.max(0,t-e))}function Vo(e,t){const[n,o]=M.useState(e),r=M.useRef(null);return e&&!n&&o(!0),M.useEffect(()=>{if(e){r.current??=Date.now();return}if(!n)return;const s=()=>{r.current=null,o(!1)},i=Qo(r.current,Date.now(),t);if(i===0){s();return}const a=setTimeout(s,i);return()=>clearTimeout(a)},[e,n,t]),n}const Bo="decocms:content-writes",xe=new Set;let G;function Gt(){if(G!==void 0)return G;G=null;try{typeof BroadcastChannel=="function"&&(G=new BroadcastChannel(Bo),G.addEventListener("message",e=>{const t=e.data?.cacheKey;if(typeof t=="string")for(const n of[...xe])n(t)}))}catch{G=null}return G}function Ho(e){try{Gt()?.postMessage({cacheKey:e})}catch{}}function Jo(e){return Gt(),xe.add(e),()=>{xe.delete(e)}}const Yt="__at=",zt="__test=",Wo=/^[0-9a-f]{12}-[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;function Go(e){return e.at!==void 0||Object.keys(e.tests??{}).length>0}function X(e){return typeof e=="string"&&Wo.test(e)}function wt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function Yo(e){const t=e.tests??{};return[...e.at!==void 0?[Yt+wt(e.at)]:[],...Object.keys(t).map(n=>zt+wt(`${n}=${t[n]?"on":"off"}`))]}function pt(e,t){const o=[...e.split("&").filter(r=>r&&!r.startsWith(Yt)&&!r.startsWith(zt)),...t];return o.length>0?`?${o.join("&")}`:""}function ve(e,t){const n=Yo(t),o=e.indexOf("?"),r=o===-1?e:e.slice(0,o);if(X(r))return r+pt(o===-1?"":e.slice(o+1),n);const s=e.lastIndexOf("@");if(s<=0)return e;const i=e.slice(0,s),a=i.indexOf("?"),l=a===-1?i:i.slice(0,a),c=a===-1?"":i.slice(a+1);return`${l}${pt(c,n)}${e.slice(s)}`}function vs(e,t,n){if(!Go(t))return e;try{const o=new URL(e),r=o.searchParams.get("__draft");return r&&r!=="off"?(o.searchParams.set("__draft",ve(r,t)),o.toString()):X(n)?(o.searchParams.set("__draft",ve(n,t)),o.toString()):e}catch{return e}}function bs(e,t,n="/"){if(!e||!X(t))return null;try{const o=new URL(n,e);return o.searchParams.set("__draft",t),o.toString()}catch{return null}}function Xt(e){return btoa(encodeURIComponent(e))}function ws(e,t,n){const o=zo(e,t,n);return o.searchParams.set("__cb",crypto.randomUUID()),o.toString()}function zo(e,t,n){const o=new URL(e).origin,r=new URL(`/live/previews/${encodeURIComponent(t)}`,o);return r.searchParams.set("path","/"),r.searchParams.set("pathTemplate","/"),r.searchParams.set("props",Xt(JSON.stringify({path:"/",sections:[{__resolveType:n}]}))),r}const Xo="__draft";function ps(e){return`${`${e.apiHost}/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}?token=${e.token}`}@${e.version}`}const Zo="off";function qo(e,t){if(!t)return e;const n=new URL(e);return n.searchParams.set(Xo,t),n.toString()}function ms(e){const t=e.pageBlock.__resolveType;if(typeof t!="string"||!t)return null;const n=new URL(e.previewBaseUrl).origin,o=new URL(`/live/previews/${encodeURIComponent(t)}`,n);o.searchParams.set("__decoFBT","0"),o.searchParams.set("__d",""),o.searchParams.set("path",e.path),o.searchParams.set("pathTemplate",e.pathTemplate);const{__resolveType:r,...s}=e.pageBlock,i=JSON.stringify({__props:s,__decofile:e.decofile});return{src:o.toString(),body:i}}function Ss(e,t,n,o){const r=new URL(e).origin,s=new URL(`/live/previews/${encodeURIComponent(t)}`,r);s.searchParams.set("__d","");const i=[{__resolveType:"preview",block:n}];return o&&i.push(o),s.searchParams.set("props",Xt(JSON.stringify({sections:i}))),s.toString()}function ys(e){return e.fastPreviewActive&&e.previewServerUrl?e.previewServerUrl:e.sandboxUrl??null}const mt="__variant=";function Zt(e,t,n){return`${e}@${t}=${n}`}function Es(e,t){return!e||!t.multivariate||t.variants.length<=1?[]:t.index<0||t.index>=t.variants.length?[]:[Zt(e,"sections",t.index)]}function Os(e){const t=Array.isArray(e.mvObj.variants)?e.mvObj.variants:[];if(!e.pageKey||e.sectionIndex<0)return[];if(e.selectedVariantIndex<0||e.selectedVariantIndex>=t.length)return[];const o=`${e.page.multivariate?`sections.variants.${e.page.index}.value${e.page.lazyValues?".value":""}`:"sections"}.${e.sectionIndex}${e.sectionLazy?".section":""}`;return[Zt(e.pageKey,o,e.selectedVariantIndex)]}function Ds(e,t){return[...t,...e]}function Ko(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function Ke(e,t){const n=e.lastIndexOf("@");if(n<=0)return e;const o=e.slice(0,n),r=o.indexOf("?"),s=r===-1?o:o.slice(0,r),a=[...r===-1?[]:o.slice(r+1).split("&").filter(c=>c&&!c.startsWith(mt)),...t.map(c=>mt+Ko(c))],l=a.length>0?`?${a.join("&")}`:"";return`${s}${l}${e.slice(n)}`}function ks(e,t,n=!1){if(t.length===0&&!n)return null;try{const o=new URL(e),r=o.hostname==="[::1]"?`localhost${o.port?`:${o.port}`:""}`:o.host;return Ke(`${r}${o.pathname}@local`,t)}catch{return null}}function Is(e,t){if(t.length===0)return e;try{const n=new URL(e),o=n.searchParams.get("__draft");return!o||o==="off"?e:(n.searchParams.set("__draft",Ke(o,t)),n.toString())}catch{return e}}function er(e){const{pointer:t}=e;if(!t||t===Zo)return null;const n=t.indexOf("?");return X(n===-1?t:t.slice(0,n))||t.lastIndexOf("@")<=0?null:X(e.heldRevision)&&e.forcedVariants.length===0?ve(e.heldRevision,e.previewOptions):ve(Ke(t,e.forcedVariants),e.previewOptions)}function tr(e,t){if(!e||!t)return null;try{return qo(e,t)}catch{return null}}function _s(e,t,n){if(!e||!n)return null;try{return tr(new URL(t,e).toString(),n)}catch{return null}}const be={forcedVariants:[],previewOptions:{}},ce=new Map,le=new Map,$e=new Map;function qt(e){for(const t of $e.get(e)??[])t()}function Kt(e,t){const n=X(t)?t:null;(le.get(e)??null)!==n&&(n?le.set(e,n):le.delete(e),qt(e))}function nr(e){return le.get(e)??null}function or(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Ts(e,t){const n=ce.get(e)??be,o=t??be;or(n,o)||(t?ce.set(e,o):ce.delete(e),qt(e))}function rr(e){return ce.get(e)??be}function en(e,t){let n=$e.get(e);return n||(n=new Set,$e.set(e,n)),n.add(t),()=>{n.delete(t)}}function sr(e){const t=R.c(3);let n,o;return t[0]!==e?(n=r=>en(e,r),o=()=>rr(e),t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]),M.useSyncExternalStore(n,o,ir)}function ir(){return be}function ar(e){const t=R.c(3);let n,o;return t[0]!==e?(n=r=>e?en(e,r):lr,o=()=>e?nr(e):null,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]),M.useSyncExternalStore(n,o,cr)}function cr(){return null}function lr(){}function Ps(e,t){const n=R.c(4),o=sr(e),r=ar(e);let s;return n[0]!==o||n[1]!==r||n[2]!==t?(s=er({pointer:t,heldRevision:r,...o}),n[0]=o,n[1]=r,n[2]=t,n[3]=s):s=n[3],s}const tn={phase:"idle",inFlight:0,reload:{seq:0,navigates:!1},epoch:0},ur=15e3,we=new Map;function z(e,t){return`${e}/${t}`}function H(e){let t=we.get(e);return t||(t={state:tn,listeners:new Set,previews:0,timer:null,discardListeners:new Set},we.set(e,t)),t}function W(e,t){const n=H(e);n.state={...n.state,...t};for(const o of n.listeners)o()}function ye(e){e.timer&&clearTimeout(e.timer),e.timer=null}function et(e){return we.get(e)?.state??tn}function fr(e,t){const n=H(e);return n.listeners.add(t),()=>{n.listeners.delete(t)}}function Rs(e){const t=H(e);return t.previews++,()=>{t.previews--,t.previews===0&&t.state.phase==="reloading"&&(ye(t),W(e,{phase:"idle"}))}}function xs(e){const t=we.get(e);!t||t.state.phase!=="reloading"||(ye(t),W(e,{phase:"idle"}))}function nn(e){const t=H(e);ye(t),W(e,{phase:"saving",inFlight:t.state.inFlight+1})}function ue(e,t){const n=H(e),o=Math.max(0,n.state.inFlight-1);if(o>0){W(e,{inFlight:o});return}if(!t.ok||n.previews===0){W(e,{phase:"idle",inFlight:o});return}on(e,t.navigates,o)}function on(e,t,n=0){const o=H(e);ye(o),o.timer=setTimeout(()=>{o.timer=null,o.state.phase==="reloading"&&W(e,{phase:"idle"})},ur),W(e,{phase:"reloading",inFlight:n,reload:{seq:o.state.reload.seq+1,navigates:t}})}function dr(e){return e?.kind==="protocol"&&e.source==="github"}async function fe(e,t){const{queryClient:n,orgSlug:o,virtualMcpId:r,branch:s,backend:i,cacheKey:a}=e,l=t.kind==="publish"||t.kind==="reapply"?n.invalidateQueries({queryKey:g.hostedReleases(o,r)}):null;if(i?.kind!=="protocol")return await l,{navigates:!1};const c=s?g.protocolDraftRead(o,r,s):null,f=c?JSON.stringify(n.getQueryData(c)??null):null,u=l?[l]:[];if(a&&t.reread&&u.push(n.invalidateQueries({queryKey:g.decofile(a)})),a&&!t.adopted&&u.push(n.invalidateQueries({queryKey:g.contentChanges(a)})),s&&i.source==="sandbox"&&u.push(n.invalidateQueries({queryKey:Qn(o,r,s)})),dr(i)&&c&&!t.adopted&&u.push(n.invalidateQueries({queryKey:c})),await Promise.all(u),t.kind!=="edit"){const b=z(o,r);W(b,{epoch:et(b).epoch+1})}const d=c?JSON.stringify(n.getQueryData(c)??null):null,h=f!==d;return h&&await new Promise(b=>Ot.schedule(b)),{navigates:h}}async function hr(e,t){return nn(z(e.orgSlug,e.virtualMcpId)),rn(e,t)}function St(e){return e.branch?JSON.stringify(e.queryClient.getQueryData(g.protocolDraftRead(e.orgSlug,e.virtualMcpId,e.branch))??null):null}async function rn(e,t){const n=z(e.orgSlug,e.virtualMcpId),o=t.adopted?St(e):null;let r;try{r=await t.write()}catch(i){throw ue(n,{ok:!1,navigates:!1}),t.refreshOnError&&fe(e,{kind:t.kind,reread:!0}).catch(()=>{}),i}if(e.backend?.kind==="protocol"&&e.cacheKey&&Ho(e.cacheKey),Kt(n,t.shownRevision?.(r)??null),t.adopted){const i=St(e)!==o;return i&&await new Promise(a=>Ot.schedule(a)),ue(n,{ok:!0,navigates:i}),t.reread&&fe(e,t).catch(()=>{}),r}let s=!1;try{({navigates:s}=await fe(e,t))}catch{}finally{ue(n,{ok:!0,navigates:s})}return r}function $s(e,t){const{queryClient:n,orgSlug:o,virtualMcpId:r,branch:s}=e,i=z(o,r),a=new Set(t.blockKeys);for(const f of[...H(i).discardListeners])f(a);nn(i);let l=!1;const c=()=>(l=!0,rn(e,{kind:"discard",reread:!0,write:t.write}));return s?n.getMutationCache().build(n,{mutationKey:Se(o,r,s),scope:mo(o,r,s),mutationFn:c}).execute(void 0).catch(f=>{throw l||ue(i,{ok:!1,navigates:!1}),f}):c()}function Ns(e,t,n){const o=R.c(8);let r;o[0]!==e||o[1]!==t?(r=z(e,t),o[0]=e,o[1]=t,o[2]=r):r=o[2];const s=r;let i;o[3]!==n||o[4]!==s?(i=()=>{const l=H(s).discardListeners;return l.add(n),()=>{l.delete(n)}},o[3]=n,o[4]=s,o[5]=i):i=o[5];let a;o[6]!==s?(a=[s],o[6]=s,o[7]=a):a=o[7],M.useEffect(i,a)}function sn(e){const t=z(e.orgSlug,e.virtualMcpId);et(t).inFlight>0||(Kt(t,null),fe(e,{kind:"external"}).then(({navigates:n})=>{const o=H(t);o.previews>0&&o.state.inFlight===0&&on(t,n)}).catch(()=>{}))}function gr(e,t){const n=R.c(7);let o;n[0]!==e||n[1]!==t?(o=z(e,t),n[0]=e,n[1]=t,n[2]=o):o=n[2];const r=o;let s;n[3]!==r?(s=c=>fr(r,c),n[3]=r,n[4]=s):s=n[4];const i=s;let a;n[5]!==r?(a=()=>et(r),n[5]=r,n[6]=a):a=n[6];const l=a;return M.useSyncExternalStore(i,l,l)}const vr=500;function js(e,t){const{phase:n}=gr(e,t);return Vo(n!=="idle",vr)}function br(e){const t=new Error(`${e} unavailable (content server unreachable)`);return t.status=502,t}function an(e,t){return g.liveMeta(e.orgSlug,e.virtualMcpId,e.branch,`protocol${t.cacheKeySuffix}`,"")}function Cs(e,t,n,o){if(o?.source==="github"){const i=e.getQueryData(g.contentIndex(t));return i?Tn(i,n):wr(e,t,n)}const r=e.getQueryData(g.contentVersions(t));if(!r)return;if(Object.hasOwn(r,n))return r[n];const s=e.getQueryData(g.decofile(t));return s&&Object.hasOwn(s,n)?void 0:null}function ne(e,t){if(Object.hasOwn(e.changes,t))return e.changes[t];const n=B(t),o=Object.keys(e.changes).find(r=>B(r)===n);return o===void 0?void 0:e.changes[o]}function wr(e,t,n){const o=e.getQueryData(g.contentChanges(t));if(o)return cn(o,Ee(e,t),n)}function cn(e,t,n){const o=ne(e,n);return o?.kind==="delete"?o.version??ee:o?o.version:t.has(B(n))?ee:null}function As(e,t,n){const o=e.getQueryData(g.contentChanges(t));if(!o)return!1;const r=ne(o,n);return r?r.kind==="set"&&r.baseVersion===null:Ee(e,t).has(B(n))}function Ls(e,t){const n=e.getQueryData(g.decofile(t)),o=e.getQueryData(g.contentChanges(t));if(!n||!o)return null;const r=Ee(e,t);return{blocks:n,versionOf:s=>cn(o,r,s)}}function Ee(e,t){return new Set(e.getQueryData(g.contentDraftTombstones(t)))}function pe(e,t,n,o){const r=B(n),s=Ee(e,t);s.has(r)!==o&&(o?s.add(r):s.delete(r),q(e),e.setQueryData(g.contentDraftTombstones(t),[...s]))}function ln(e,t,n,o){const r=o.revision,s=e.getQueryData(g.contentVersions(n)),i=Object.entries(o.versions??{}).map(([u,d])=>[u,d===ee?null:d]),a=e.getQueryData(g.contentChanges(n)),l=new Set(i.flatMap(([u])=>{const d=a?ne(a,u):void 0;return(d?d.baseVersion:s?.[u]??null)===null?[u]:[]})),c=new Set(i.flatMap(([u,d])=>d===null?[]:[B(u)]));e.setQueryData(g.contentChanges(n),u=>{if(!u)return u;const d={...u.changes};for(const[h,b]of i){const v=ne(u,h),m=v?v.baseVersion:s?.[h]??null;b!==null?d[h]={kind:"set",version:b,baseVersion:m}:m!==null?d[h]={kind:"delete",version:null,baseVersion:m}:delete d[h]}return{...u,changes:d,edited:!0}});for(const[u,d]of i)d!==null?pe(e,n,u,!1):!c.has(B(u))&&l.has(u)&&pe(e,n,u,!0);const f=o.revision;return f&&f!=="none"&&e.setQueryData(g.protocolDraftRead(t.orgSlug,t.virtualMcpId,t.branch),u=>u&&{...u,version:f}),r}function Oe(e,t,n){q(e),e.setQueryData(g.contentVersions(t),o=>{const r={...o};for(const[s,i]of Object.entries(n))i===null?delete r[s]:r[s]=i;return r})}function un(e,t){const n=e.getMutationCache().findAll({mutationKey:Se(t.orgSlug,t.virtualMcpId,t.branch),status:"pending"});return new Set(n.flatMap(o=>no(o.state.variables)))}function Ne(e,t){e.resetQueries({queryKey:g.contentBackend(t.orgSlug,t.virtualMcpId,"local")})}async function oe(e,t,n,o){try{return await o()}catch(r){const s=!(r instanceof P);throw t.source==="local"&&s?(Ne(e,n),new Ht(r)):(t.source==="local"&&Qe(r)&&Ne(e,n),r)}}const de=new Map;function fn(e,t,n,o){const r=de.get(o);if(r)return r;const s=tt(e,t,n,o,!0);return de.set(o,s),s.finally(()=>de.delete(o))}const ke=new Set;function pr(e,t,n){const o=R.c(8),r=Z(),s=t?.orgSlug,i=t?.virtualMcpId,a=t?.branch;let l,c;o[0]!==e||o[1]!==a||o[2]!==n||o[3]!==s||o[4]!==r||o[5]!==i?(l=()=>{if(!e||!s||!i||!a)return;const f={orgSlug:s,virtualMcpId:i,branch:a};return Jo(u=>{u===n&&(ke.has(n)||(ke.add(n),Sr(r,e,f,n).catch(mr).finally(()=>ke.delete(n))))})},c=[r,e,s,i,a,n],o[0]=e,o[1]=a,o[2]=n,o[3]=s,o[4]=r,o[5]=i,o[6]=l,o[7]=c):(l=o[6],c=o[7]),M.useEffect(l,c)}function mr(){}async function Sr(e,t,n,o){const r=de.get(o);return r&&await r.catch(()=>{}),fn(e,t,n,o)}async function tt(e,t,n,o,r){q(e);const s=g.decofile(o),i=an(n,t),a=g.contentRevision(o),l=g.contentVersions(o),c=e.getQueryData(s),f=e.getQueryData(l),d=e.getQueryData(i),h=e.getQueryData(a)??void 0,b=r&&c&&f?h?.revision:void 0,v=r&&d?h?.schemaVersion:void 0,m=g.contentChanges(o),E=e.getQueryData(m);if(t.source==="github"&&t.hosted)return yr(e,t,t.hosted,n,o,{conditional:r,seen:h,currentMeta:d,schemaIfNoneMatch:v,seenChanges:E});const[S,x,_]=await oe(e,t,n,()=>t.client.batch([{method:"blocks.list",params:b?{ifNoneMatch:b}:{}},{method:"schema.get",params:v?{ifNoneMatch:v}:{}},{method:"changes.list",params:Fe(E)}])),N=e.getQueryData(a)?.revision,$=N!==void 0&&N!==h?.revision;if(_?.ok){const D=$?null:he(E,_.result);D&&e.setQueryData(m,D)}else _&&t.source==="local"&&Qe(_.error)&&Ne(e,n);if(!S?.ok)throw S?.error??new Error("no blocks.list");if(!x)throw new Error("no schema.get");const w=S.result,L=He(x),k=x.ok&&!L?x.result:null;if(w.notModified&&(!c||!f)||k?.notModified&&!d)return tt(e,t,n,o,!1);const T=w.notModified?new Set:un(e,n),j=w.notModified?c:to(w.blocks,c,T),C=L?Ut():k?k.notModified?d:k.schema:x.error;if(e.setQueryData(a,{revision:$?N:w.notModified?h?.revision:w.revision,schemaVersion:k?k.notModified?h?.schemaVersion:k.version??void 0:void 0}),e.setQueryData(s,j),!w.notModified){const D=e.getQueryData(l),U={...w.versions};for(const A of T){const I=D?.[A];I!==void 0?U[A]=I:delete U[A]}e.setQueryData(l,U)}return C instanceof P||e.setQueryData(i,C),!$&&!w.notModified&&c&&h?.revision&&w.revision!==h.revision&&sn({queryClient:e,orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,backend:t,cacheKey:o}),{blocks:j,meta:C}}async function yr(e,t,n,o,r,s){const i=g.decofile(r),a=g.contentIndex(r),l=g.contentRevision(r),c=g.contentVersions(r),f=an(o,t),u=g.contentChanges(r),d=e.getQueryData(a),h=s.conditional&&d?s.seen?.revision:void 0,[b,v,m]=await oe(e,t,o,()=>n.batch([{method:"cms.index",params:h?{ifNoneMatch:h}:{}},{method:"schema.get",params:s.schemaIfNoneMatch?{ifNoneMatch:s.schemaIfNoneMatch}:{}},{method:"changes.list",params:Fe(s.seenChanges)}])),E=e.getQueryData(a)??d,S=e.getQueryData(l)?.revision,x=S!==void 0&&S!==s.seen?.revision;if(m?.ok&&!x){const O=he(s.seenChanges,m.result);O&&e.setQueryData(u,O)}if(!b?.ok)throw b?.error??new Error("no cms.index");if(!v)throw new Error("no schema.get");const _=b.result,N=He(v),$=v.ok&&!N?v.result:null;if(_.notModified&&!d||$?.notModified&&!s.currentMeta)return tt(e,t,o,r,!1);const w=N?Ut():$?$.notModified?s.currentMeta:$.schema:v.error;w instanceof P||e.setQueryData(f,w);const L=$?$.notModified?s.seen?.schemaVersion:$.version??void 0:void 0,k=e.getQueryData(i)??{};if(_.notModified||x)return e.setQueryData(l,{revision:x?S:s.seen?.revision,schemaVersion:L}),e.setQueryData(i,k),{blocks:k,meta:w};const T={revision:_.revision,resolvedRef:_.resolvedRef,sequence:_.sequence,entries:_.entries,draft:_.draft};e.setQueryData(a,T);const j=!!s.seen?.revision&&T.revision!==s.seen.revision&&(!s.seen.revision.startsWith("s-")||!!d&&dn(d.draft,T.draft));j&&e.setQueryData(g.protocolDraftRead(o.orgSlug,o.virtualMcpId,o.branch),O=>O&&{...O,version:T.revision}),e.setQueryData(l,{revision:T.revision,schemaVersion:L});const C=un(e,o),D=e.getQueryData(c)??{},U={},A={},I=[];for(const[O,V]of Object.entries(k)){const p=T.entries[O];!p&&!C.has(O)||(U[O]=V,D[O]!==void 0&&(A[O]=D[O]),p&&!C.has(O)&&D[O]!==p.version&&I.push(O))}return e.setQueryData(i,U),e.setQueryData(c,A),I.length>0&&await xn(e,n,r,I,C),E&&j&&Er(E,T)&&sn({queryClient:e,orgSlug:o.orgSlug,virtualMcpId:o.virtualMcpId,branch:o.branch,backend:t,cacheKey:r}),{blocks:e.getQueryData(i)??U,meta:w}}function Er(e,t){if(dn(e.draft,t.draft))return!0;const n=Object.keys(t.entries);return n.length!==Object.keys(e.entries).length?!0:n.some(o=>!Object.hasOwn(e.entries,o)||e.entries[o]?.version!==t.entries[o]?.version)}function dn(e,t){const n=Object.keys(t);return n.length!==Object.keys(e).length?!0:n.some(o=>!Object.hasOwn(e,o)||e[o]?.version!==t[o]?.version)}function Or(e,t){const n=[...Object.keys(t.set??{}),...t.delete??[]];return Object.fromEntries(n.filter(o=>Object.hasOwn(e,o)).map(o=>[o,e[o]]))}function Ie(e){if(!(e instanceof P)||e.code!==y.Unavailable)return;const t=e.data?.landed;if(!(!t||typeof t!="object"||Array.isArray(t)))return Object.fromEntries(Object.entries(t).filter(n=>typeof n[1]=="string"))}async function Dr(e,t){if(!(e instanceof P)||e.code!==y.Conflict)return;const n=e.data?.entries;if(!n||typeof n!="object")return;const o=Object.entries(n);if(o.length===0)return;const r=t.set??{},s=new Set(t.delete??[]),i={};for(const[a,l]of o){const c=l?.actual;if(typeof c!="string"||(Object.hasOwn(r,a)?await $n(r[a]):s.has(a)?ee:void 0)!==c)return;i[a]=c}return i}function kr(e,t){const n=Object.fromEntries(Object.entries(e.set??{}).filter(([r])=>!Object.hasOwn(t,r))),o=(e.delete??[]).filter(r=>!Object.hasOwn(t,r));return{...Object.keys(n).length>0?{set:n}:{},...o.length>0?{delete:o}:{}}}function ie(e,t,n,o,r){q(e),ln(e,t,n,{revision:e.getQueryData(g.contentRevision(n))?.revision??"",versions:r}),Oe(e,n,Object.fromEntries(Object.entries(r).map(([s,i])=>[s,i===ee?null:i]))),Dt(e,n,r,o.set??{})}async function Us(e,t,n,o,r,s){if(t.source==="github"){const a=[...Object.keys(r.set??{}),...r.delete??[]].filter(c=>!s||!Object.hasOwn(s,c));if(a.length>0)throw new Error(`A hosted save needs a precondition for every block it touches (missing: ${a.join(", ")})`);const l=_n(r.set);if(l.length>0)throw new Error(`A hosted save can't write a block that isn't loaded (${l.join(", ")})`)}return hr({queryClient:e,orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,backend:t,cacheKey:o},{kind:"edit",adopted:t.source==="github",write:async()=>{const i=(f,u=s)=>oe(e,t,n,()=>t.client.blocksApply({set:f.set,delete:f.delete,...u?{ifMatch:Or(u,f)}:{}}));let a;try{a=await i(r)}catch(f){const u=t.source==="github"?Ie(f):void 0;if(!u)throw f;const d=kr(r,u);Object.keys(u).length>0&&ie(e,n,o,r,u);let h;try{h=await i(d)}catch(b){const v=Ie(b);v&&Object.keys(v).length>0&&ie(e,n,o,d,v);const m=await Dr(b,d);if(!m)throw b;ie(e,n,o,d,m);try{h=await i(d,{...s,...m})}catch(E){const S=Ie(E);throw S&&Object.keys(S).length>0&&ie(e,n,o,d,S),E}}a={...h,versions:{...u,...h.versions}}}q(e);const l=t.source==="github"?ln(e,n,o,a):a.revision;t.source==="github"&&Dt(e,o,a.versions??{},r.set??{}),e.setQueryData(g.contentRevision(o),f=>({...f,revision:l}));const c=a.versions??{};return Oe(e,o,c),{revision:l,versions:c}}})}function hn(e,t){if(!(e instanceof P))return;const n=e.data?.draft;if(!n||typeof n!="object"||!Object.hasOwn(n,t))return;const o=n[t];return o&&typeof o.version=="string"?o:void 0}function gn(e,t,n){if(!(n instanceof P))return;const o=n.data?.draft;if(!(!o||typeof o!="object"))for(const[r,s]of Object.entries(o))s===null&&pe(e,t,r,!1)}function vn(e,t,n,o){q(e),Pn(e,n,o);const r=o.block===null,s=e.getQueryData(g.contentVersions(t)),i=e.getQueryData(g.contentChanges(t)),a=i?ne(i,n):void 0,l=a?a.baseVersion:s?.[n]??null;if(i){const c=B(n),f=Object.fromEntries(Object.entries(i.changes).filter(([u])=>B(u)!==c));r?l!==null&&(f[n]={kind:"delete",version:null,baseVersion:l}):f[n]={kind:"set",version:o.version,baseVersion:l},e.setQueryData(g.contentChanges(t),{...i,changes:f,edited:!0})}pe(e,t,n,r&&l===null),e.setQueryData(g.decofile(t),c=>{const f={...c};return r?delete f[n]:f[n]=o.block,f}),Oe(e,t,{[n]:r?null:o.version}),Rn(e,t,n,o)}function Ms(e,t,n,o){if(t.source!=="github"||!(o instanceof P))return!1;gn(e,n,o);const r=o.data?.draft;if(!r||typeof r!="object")return!1;const s=Object.keys(r),i=s.map(a=>hn(o,a));return s.length===0||i.some(a=>a===void 0)?!1:(e.cancelQueries({queryKey:g.decofile(n)}),s.forEach((a,l)=>{vn(e,n,a,i[l])}),!0)}async function Fs(e,t,n,o,r,s){t.source==="github"&&gn(e,o,s);const i=t.source==="github"?hn(s,r):void 0;if(i)return e.cancelQueries({queryKey:g.decofile(o)}),vn(e,o,r,i),!0;await e.invalidateQueries({queryKey:g.decofile(o)});let a;try{const c=(await oe(e,t,n,()=>t.client.changesGet({names:[r]}))).entries[r];if(c&&c.after===null&&c.version!==null)return!1;a={value:c?.after??null,version:c?.version??null},t.source==="github"&&e.setQueryData(g.contentChanges(o),f=>{if(!f)return f;const u={...f.changes};return c?.kind?u[r]={kind:c.kind,version:c.version,baseVersion:c.baseVersion}:delete u[r],{...f,changes:u,edited:!0}})}catch{const l=await oe(e,t,n,()=>t.client.blocksList({}));if(l.notModified)return!1;a={value:l.blocks[r]??null,version:l.versions[r]??null}}return e.setQueryData(g.decofile(o),l=>{const c={...l};return a.value===null?delete c[r]:c[r]=a.value,c}),Oe(e,o,{[r]:a.version}),!1}function Ir(e){const t=R.c(17),n=Ue(e?.virtualMcpId)?.metadata;let o;t[0]!==n?(o=yt(n),t[0]=n,t[1]=o):o=t[1];const r=o;let s;t[2]!==e?.branch||t[3]!==e?.orgSlug||t[4]!==e?.virtualMcpId?(s=g.protocolDraftRead(e?.orgSlug??"",e?.virtualMcpId??"",e?.branch??""),t[2]=e?.branch,t[3]=e?.orgSlug,t[4]=e?.virtualMcpId,t[5]=s):s=t[5];let i;t[6]!==e||t[7]!==r?(i=async()=>{const v=await Et(r,e.branch),m=v.pointer?.lastIndexOf("@")??-1;return{draft:v.pointer&&m>0?v.pointer.slice(0,m):null,version:v.pointer&&m>0?v.pointer.slice(m+1):v.etag}},t[6]=e,t[7]=r,t[8]=i):i=t[8];const a=!!e&&!!r;let l;t[9]!==s||t[10]!==i||t[11]!==a?(l={queryKey:s,queryFn:i,enabled:a,staleTime:Number.POSITIVE_INFINITY},t[9]=s,t[10]=i,t[11]=a,t[12]=l):l=t[12];const{data:c,isPending:f,isError:u}=F(l),d=!!e&&!!r&&f&&!u;if(!e||!c?.draft||!c.version){let v;return t[13]!==d?(v={pointer:null,pending:d},t[13]=d,t[14]=v):v=t[14],v}const h=`${c.draft}@${c.version}`;let b;return t[15]!==h?(b={pointer:h,pending:!1},t[15]=h,t[16]=b):b=t[16],b}function Qs(e){return Ir(e).pointer}function Vs(e){const t=R.c(4);let n;t[0]!==e?(n=g.contentRevision(e),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:_r,staleTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:r}=F(o);return r?.revision}async function _r(){throw new Error("content revisions are set by reads and writes")}function je(e){const t=`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`;return e.protocolSuffix?`${t}${e.protocolSuffix}`:e.localPreviewUrl?`${t}:local:${e.localPreviewUrl}`:t}function Bs(e,t){return je({...e,protocolSuffix:t.cacheKeySuffix})}function De(e,t){const n=R.c(6),{url:o}=Mt(e?.virtualMcpId),r=re(e?.virtualMcpId,e?.branch);if(!e)return"";let s;return n[0]!==r.cacheKeySuffix||n[1]!==r.kind||n[2]!==o||n[3]!==t?.tunnel||n[4]!==e?(s=r.kind==="protocol"?je({...e,protocolSuffix:r.cacheKeySuffix}):je({...e,localPreviewUrl:t?.tunnel===!1?null:o}),n[0]=r.cacheKeySuffix,n[1]=r.kind,n[2]=o,n[3]=t?.tunnel,n[4]=e,n[5]=s):s=n[5],s}function Hs(e,t){const n=R.c(46),{url:o}=Mt(e?.virtualMcpId),r=!!o,s=re(e?.virtualMcpId,e?.branch),i=s.kind==="protocol"?s:null,a=De(e),l=t?.fetchEnabled??!0,c=Uo(e?.virtualMcpId),f=It(e?.virtualMcpId).runtime==="cms",u=Z();let d;n[0]!==a?(d=g.decofile(a),n[0]=a,n[1]=d):d=n[1];const h=d;pr(i,i&&e?e:null,a);let b;n[2]!==e||n[3]!==u||n[4]!==h?(b=()=>{if(!e||u.isMutating({mutationKey:Se(e.orgSlug,e.virtualMcpId,e.branch)})>0)return!0;const D=u.getQueryState(h);return D?.fetchStatus==="fetching"||Date.now()-(D?.dataUpdatedAt??0)<Ft/2},n[2]=e,n[3]=u,n[4]=h,n[5]=b):b=n[5];let v;n[6]!==f||n[7]!==r||n[8]!==e||n[9]!==i||n[10]!==u||n[11]!==h?(v=async()=>{if(e){if(!i&&f&&!r){const D=Eo(u,e)?.version;if(D&&!await Oo(e,D))return}await u.refetchQueries({queryKey:h,exact:!0},{cancelRefetch:!1})}},n[6]=f,n[7]=r,n[8]=e,n[9]=i,n[10]=u,n[11]=h,n[12]=v):v=n[12];let m;n[13]!==b||n[14]!==v?(m={skip:b,read:v},n[13]=b,n[14]=v,n[15]=m):m=n[15],Ro(!!t?.pollWhile&&!!e,m);const E=kt(i?.hosted?a:"");let S;n[16]!==s.kind||n[17]!==f||n[18]!==l||n[19]!==a||n[20]!==r||n[21]!==o||n[22]!==c||n[23]!==e||n[24]!==i||n[25]!==u?(S=async()=>{if(i)return(await fn(u,i,e,a)).blocks;if(s.kind==="unavailable")throw br("decofile");if(r){const I=await fetch(new URL("/.decofile",o).toString(),{cache:"no-store"}).catch(Rr),Q=I?.ok?gt(await I.text()):null;if(Q)return Q;const O=new Error("decofile unavailable (local tunnel unreachable)");throw O.status=502,O}if(f)return ko(u,e);const D=()=>Lo(e,po(c,".deco/blocks.gen.json"));if(l){const I=await fetch(jo(e),{cache:"no-store"}).catch(Pr);if(I?.ok){const V=gt(await I.text());if(V)return V}const Q=await D();if(Q.kind==="data")return Q.data;const O=new Error(`Failed to fetch decofile: ${I?.status??"network error"}`);throw O.status=bt({liveOk:!!I?.ok,liveStatus:I?.status,committedAbsent:Q.kind==="absent"}),O}const U=await D();if(U.kind==="data")return U.data;const A=new Error("decofile unavailable (preview down, no committed snapshot)");throw A.status=bt({liveOk:!1,committedAbsent:U.kind==="absent"}),A},n[16]=s.kind,n[17]=f,n[18]=l,n[19]=a,n[20]=r,n[21]=o,n[22]=c,n[23]=e,n[24]=i,n[25]=u,n[26]=S):S=n[26];const x=!!e&&s.kind!=="pending",_=i?0:3e4,N=i?.describe.pollIntervalMs,$=i?"always":void 0;let w;n[27]!==f||n[28]!==r||n[29]!==i?(w=(D,U)=>{if(i||f||r)return D<3;const A=U.status;return A!==502&&A!==404&&D<2},n[27]=f,n[28]=r,n[29]=i,n[30]=w):w=n[30];let L;n[31]!==h||n[32]!==S||n[33]!==x||n[34]!==_||n[35]!==N||n[36]!==$||n[37]!==w?(L={queryKey:h,queryFn:S,enabled:x,staleTime:_,refetchInterval:N,refetchIntervalInBackground:!1,refetchOnWindowFocus:$,retry:w,retryDelay:Tr},n[31]=h,n[32]=S,n[33]=x,n[34]=_,n[35]=N,n[36]=$,n[37]=w,n[38]=L):L=n[38];const k=F(L);let T;n[39]!==E||n[40]!==k?(T=E&&k.data?Nn(E,k.data):void 0,n[39]=E,n[40]=k,n[41]=T):T=n[41];const j=T;let C;return n[42]!==j||n[43]!==i?.hosted||n[44]!==k?(C=i?.hosted&&j?{...k,data:j}:k,n[42]=j,n[43]=i?.hosted,n[44]=k,n[45]=C):C=n[45],C}function Tr(e){return Cn(5e3,1e3,e,2,0)}function Pr(){return null}function Rr(){return null}function Js(e,t,n){const o=re(e?.virtualMcpId,e?.branch),r=De(e),s=o.kind==="protocol"?o.hosted:void 0;return jn(s,r,t,n)}function Ws(e){const t=R.c(4),n=Z(),o=re(e?.virtualMcpId,e?.branch),r=De(e),s=o.kind==="protocol"?o.hosted:void 0;let i;return t[0]!==r||t[1]!==n||t[2]!==s?(i=(a,l)=>An(n,s,r,a,l),t[0]=r,t[1]=n,t[2]=s,t[3]=i):i=t[3],i}function Gs(e,t){const n=R.c(3),o=re(e?.virtualMcpId,e?.branch),r=De(e),s=kt(o.kind==="protocol"&&o.hosted?r:"");let i;return n[0]!==s?.entries||n[1]!==t?(i=Object.entries(s?.entries??{}).filter(a=>{const[,l]=a;return t(l.meta?.type??"")}).map(xr),n[0]=s?.entries,n[1]=t,n[2]=i):i=n[2],i}function xr(e){const[t]=e;return t}const $r="site-editor-save",bn={id:$r,description:void 0,action:void 0,cancel:void 0},Ys="site-editor-undo",Ce="site-editor-publish";function Nr(e){const t=R.c(7),{label:n,detail:o}=e;let r;t[0]!==n?(r=Y.jsx("summary",{className:"cursor-pointer select-none text-muted-foreground",children:n}),t[0]=n,t[1]=r):r=t[1];let s;t[2]!==o?(s=Y.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words font-mono text-muted-foreground",children:o}),t[2]=o,t[3]=s):s=t[3];let i;return t[4]!==r||t[5]!==s?(i=Y.jsxs("details",{className:"mt-1 text-xs",children:[r,s]}),t[4]=r,t[5]=s,t[6]=i):i=t[6],i}function wn(e,t){return t?Y.jsx(Nr,{label:e("siteEditor.details"),detail:t}):void 0}function zs(e,t,n){te.error(Wt(e,t,n),{...bn,description:wn(e,Mo(t,n))})}function Xs(e,t,n=!1){te.info(e(t?"sectionsEditor.reconcile.leftDeleted":"sectionsEditor.reconcile.keptTheirs"),{...bn,description:e(t?n?"sectionsEditor.reconcile.leftDeletedNeverPublishedHint":"sectionsEditor.reconcile.leftDeletedHint":"sectionsEditor.reconcile.keptTheirsHint")})}const pn={action:void 0,duration:void 0};function Zs(e,t){te.success(t?e("siteEditor.publish.publishedOn",{host:t}):e("siteEditor.publish.published"),{...pn,id:Ce,description:void 0})}function qs(e,{headline:t,body:n,detail:o,retry:r,pending:s,tone:i="error"}){const a=wn(e,o??null);te[i](t,{id:Ce,description:n&&a?Y.jsxs(Y.Fragment,{children:[Y.jsx("p",{children:n}),a]}):n??a,action:r?{label:e("siteEditor.tryAgain"),onClick:l=>{l.preventDefault(),te.loading(s??e("thread.publishPopover.publishing"),{...pn,id:Ce,description:void 0}),r()}}:void 0,duration:r?Number.POSITIVE_INFINITY:void 0})}function Ks(e){return e instanceof Error?e.message||null:e==null?null:String(e)}export{So as $,ys as A,Ws as B,js as C,ns as D,Ir as E,Js as F,z as G,ar as H,Ts as I,ks as J,ve as K,Zo as L,qo as M,vs as N,Is as O,ws as P,xs as Q,Rs as R,gr as S,Ct as T,De as U,Vs as V,ms as W,mo as X,Se as Y,hr as Z,Ao as _,Kr as a,Bs as a0,Wr as a1,Yr as a2,Gs as a3,Xs as a4,As as a5,gs as a6,Ye as a7,hs as a8,Sr as a9,qe as aA,Ms as aB,fn as aC,br as aD,ds as aE,Ce as aF,pn as aG,Zs as aH,$s as aI,Hr as aJ,Jr as aK,Qe as aL,cs as aM,Qs as aN,ps as aO,X as aP,bs as aQ,qs as aR,Ys as aS,bn as aT,un as aU,Ss as aV,fs as aW,Es as aX,Os as aY,Ds as aZ,Ze as aa,Us as ab,Fs as ac,zs as ad,Cs as ae,an as af,yo as ag,ls as ah,Ns as ai,Ls as aj,ts as ak,is as al,ut as am,ft as an,as as ao,No as ap,rs as aq,Xn as ar,wn as as,Ks as at,zo as au,Gr as av,Bn as aw,Nr as ax,Ps as ay,_s as az,qn as b,Mt as c,zn as d,qr as e,Zn as f,Ge as g,Me as h,xt as i,us as j,xo as k,Hs as l,es as m,ss as n,Uo as o,zr as p,po as q,Zr as r,Xr as s,er as t,re as u,tr as v,Go as w,Lo as x,At as y,os as z};
@@ -1 +0,0 @@
1
- import{b as ee,a5 as te,q as ne,r as E,j as t,B as Q,n as F,bB as ae,a6 as ce,aN as me,aM as pe,aJ as de,aH as ue,aI as ge,aL as fe,aK as he,bj as xe,t as C,c6 as je,c as se,m as ke,_ as ve,X as ye,Z as Se,Y as be,K as H,gA as Ce}from"./index-DEZ1imMJ.js";import{a as De}from"./SwitchHorizontal01-elXb4-4d.js";import{N as we}from"./agent-icon-CTbTFMnU.js";import{s as Ne}from"./Trash01-C-PU5Hm-.js";import{i as Pe}from"./Upload01-NPnXKs-J.js";import{i as ie}from"./Zap-pmN7zSOE.js";import{S as Ae}from"./search-toggle-CO5TN956.js";import{E as Y}from"./empty-state-CtwVPMDf.js";import{C as Ee}from"./collection-tabs-BJDa_4_F.js";import{S as Me,F as Oe}from"./folder-icon-DSGoR_x6.js";import{j as Te,k as Ie,n as Re}from"./use-org-fs-BH012Up0.js";import{a7 as ze,R as Z,Z as $e}from"./chat-context-PvP_Q1CV.js";import{c as _e}from"./context-shell-l0daBgQ1.js";import"./AlertCircle-Co3RPbIZ.js";import"./Tool01-Bo2g-Ylw.js";import"./ArrowUp-DLnkUu9S.js";import"./ArrowLeft-XBSBGQal.js";import"./LinkBroken01-loTkm0G5.js";import"./ShoppingBag01-zloi0TDl.js";import"./Globe04-D17A2x5l.js";import"./CheckCircle-kNwBDDVU.js";import"./ChevronUp-D1T3kSyr.js";import"./ChevronSelectorVertical-Gg7YcxlH.js";import"./UserSquare-Qd-FKVqK.js";import"./CreditCard01-D65BAIaV.js";import"./Key01-awxHKnoL.js";import"./Minus-CYrsmoRb.js";import"./Monitor01-DalIAdj7.js";import"./Sun-C1lyqton.js";import"./Play-C6Weq-wk.js";import"./Plus-D7X8Q2-q.js";import"./SearchMd-e6xPeRPD.js";import"./Users01-CTNixqdX.js";import"./XClose-BuJ6u6eL.js";import"./icon-button-Ze0c1pwp.js";import"./tooltip-Dam-ym8O.js";import"./index-DsbWutG1.js";import"./badge-BpzeYR5Z.js";import"./markdown-Db8a3LUX.js";import"./use-copy-o0P-kroy.js";import"./use-mobile-CJITN8uI.js";import"./autosend-B0POegpm.js";import"./thread-route-B-uAlF3E.js";import"./use-project-scope-pwqcjGo8.js";import"./repository-binding-C0msapZZ.js";import"./use-mcp-client-DJjkIlNp.js";import"./auth-CQxDIkM-.js";import"./task-board-D3wT6_aG.js";import"./schema-9jBUPMLq.js";import"./file-preview-BzUEEwEK.js";import"./utils-BbEfYi1l.js";import"./editor-x1lgFdfy.js";import"./file-type-icon-DM9o0Fkb.js";import"./useInfiniteQuery-CtNfxLxq.js";import"./infiniteQueryObserver-C0Gb02df.js";import"./thread-intent-DuI80508.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DhoYakYc.js";import"./use-entitlements-DidlVdLU.js";import"./use-ai-providers-DwpUgHpj.js";import"./use-decopilot-events-C_C16-Ln.js";import"./use-organization-settings-bWX185lw.js";import"./require-capability-cQiPB2TO.js";import"./access-gate-Bj4L1Bay.js";import"./capability-load-error-BkOUGX51.js";import"./sections-C_Jmzzpn.js";import"./textarea-_jcGqOvl.js";import"./use-ask-in-chat-BIANNd7Z.js";import"./shell-layout-BLRNx2fV.js";import"./use-deployment-admin-CS9K9Ea9.js";import"./admin-fetch-BhTJlAsX.js";import"./command-DA2t4jTW.js";import"./index-DYgzDE_k.js";import"./integration-icon-CFHOt7sY.js";import"./project-icon-rrJh6PJx.js";import"./use-navigate-to-agent-MlXDIBYX.js";import"./use-debounced-value-yZdJ1f2K.js";import"./new-project-dialog-Dfe2Pik9.js";import"./label-BEWDSeNl.js";import"./repository-picker-BYFeDBpn.js";import"./github-icon-BVy-v7gH.js";import"./collection-search-Din8SB5Y.js";import"./legacy-admin-welcome-dialog-B223MrIf.js";import"./drawer-BYGTIOoj.js";import"./required-auth-layout-DfUx9vzb.js";import"./use-org-sso-Bo72RJ5p.js";const J=200,Fe=new Set(["node_modules","__pycache__"]);function G(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function Le(s){return G(s).split("/").every(e=>!e.startsWith(".")&&!Fe.has(e))}function Be(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Ke(s,e){const i=new Map;for(const o of s){const c=G(o).split("/");c.pop();const a=["skills",e,...c].join("/");i.set(a,[...i.get(a)??[],o])}return i}async function qe(s,e){const o=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(o)throw o.reason}function He(s,e){const i=_e(e),o=`skills/${s}`;return{id:`home/${o}`,name:i.name??s,description:i.description,disableModelInvocation:i.disableModelInvocation,source:"home",volume:Z,path:o,sandboxPath:`${ze}/${Z}/${o}`}}const L="*";function B(s){return s.volume==="home"}function re(s,e){const i=s.indexOf(":");return i===-1?{label:e,glyph:ie}:{label:s.slice(i+1),glyph:s.startsWith("repo:")?je:we}}function Qe(s){const e=se.c(48),{entry:i,pending:o,onOpen:c,onDelete:a}=s,n=ee(),{org:g}=te();let M;e[0]!==i.source||e[1]!==g.name?(M=re(i.source,g.name),e[0]=i.source,e[1]=g.name,e[2]=M):M=e[2];const{label:O,glyph:I}=M;let D;e[3]!==i?(D=B(i),e[3]=i,e[4]=D):D=e[4];const R=D,w=o?"opacity-60":"hover:bg-accent";let f;e[5]!==w?(f=ke("relative transition-colors group overflow-hidden flex flex-col h-full",w),e[5]=w,e[6]=f):f=e[6];let m;e[7]!==i.name||e[8]!==c||e[9]!==o?(m=!o&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":i.name}),e[7]=i.name,e[8]=c,e[9]=o,e[10]=m):m=e[10];const N=R?"default":"system",z=!R;let h;e[11]!==I||e[12]!==N||e[13]!==z?(h=t.jsx(Oe,{glyph:I,tone:N,readOnly:z,className:"size-8 shrink-0"}),e[11]=I,e[12]=N,e[13]=z,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==n?(x=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ve,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"icon",children:t.jsx(De,{size:16})})}),t.jsx(Se,{align:"end",children:t.jsxs(be,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(Ne,{size:16}),n("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=n,e[17]=x):x=e[17];let j;e[18]!==h||e[19]!==x?(j=t.jsxs("div",{className:"flex items-start justify-between",children:[h,x]}),e[18]=h,e[19]=x,e[20]=j):j=e[20];let b;e[21]!==i.name?(b=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.name}),e[21]=i.name,e[22]=b):b=e[22];let k;e[23]!==i.description||e[24]!==n?(k=i.description||n("settings.skills.noDescription"),e[23]=i.description,e[24]=n,e[25]=k):k=e[25];let p;e[26]!==k?(p=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:k}),e[26]=k,e[27]=p):p=e[27];let v;e[28]!==b||e[29]!==p?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[b,p]}),e[28]=b,e[29]=p,e[30]=v):v=e[30];let d;e[31]!==j||e[32]!==v?(d=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[j,v]}),e[31]=j,e[32]=v,e[33]=d):d=e[33];let y;e[34]!==O||e[35]!==o||e[36]!==n?(y=o?n("settings.skills.importing"):O,e[34]=O,e[35]=o,e[36]=n,e[37]=y):y=e[37];let u;e[38]!==y?(u=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y})})}),e[38]=y,e[39]=u):u=e[39];let S;e[40]!==d||e[41]!==u?(S=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[d,u]}),e[40]=d,e[41]=u,e[42]=S):S=e[42];let T;return e[43]!==o||e[44]!==S||e[45]!==f||e[46]!==m?(T=t.jsxs(Ce,{size:"flush","aria-busy":o,className:f,children:[m,S]}),e[43]=o,e[44]=S,e[45]=f,e[46]=m,e[47]=T):T=e[47],T}function V(s){const e=se.c(2),{children:i}=s;let o;return e[0]!==i?(o=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:i}),e[0]=i,e[1]=o):o=e[1],o}function Cs(){const s=ee(),{org:e}=te(),i=Te(),{remove:o,upload:c}=Ie("home"),a=ne(),n=E.useRef(null),[g,M]=E.useState(""),[O,I]=E.useState(L),[D,R]=E.useState(!1),[w,f]=E.useState(null),[m,N]=E.useState(null),[z,h]=E.useState(null),x=()=>{a.invalidateQueries({queryKey:H.slashSkills(e.id)}),a.invalidateQueries({queryKey:H.orgFsSkills(e.id)})},j=r=>a.setQueryData(H.slashSkills(e.id),l=>r(l??[]));async function b(r){const l=[...r??[]];if(n.current&&(n.current.value=""),l.length===0)return;const P=l[0]?.webkitRelativePath??"";if(!P){C.error(s("settings.skills.importNeedsFolder"));return}const q=P.split("/")[0]??"",_=l.filter(Le),U=_.find(A=>G(A)==="SKILL.md");if(!U){C.error(s("settings.skills.importMissingSkillMd"));return}if(_.length>J){C.error(s("settings.skills.importTooManyFiles",{count:String(_.length),max:String(J)}));return}const $=Be(q),X=`skills/${$}`;let W=!1;R(!0);try{if(await Re(e.slug,"home",X)){C.error(s("settings.skills.importSlugTaken",{slug:$}));return}W=!0;const A=He($,await U.text());j(le=>[A,...le]),h(A.id),await qe(Ke(_,$),c.mutateAsync),C.success(s("settings.skills.importSuccess",{name:$}))}catch(A){W&&await o.mutateAsync(X).catch(()=>{}),C.error(A instanceof Error?A.message:s("settings.skills.importError"))}finally{h(null),x(),R(!1)}}const k=g.toLowerCase(),p=(i.data??[]).filter(r=>r.name.toLowerCase().includes(k)||(r.description??"").toLowerCase().includes(k)).sort((r,l)=>Number(B(l))-Number(B(r))||r.name.localeCompare(l.name)),v=new Set((i.data??[]).map(r=>r.source)),d=new Map;for(const r of p)d.set(r.source,(d.get(r.source)??0)+1);const y=[{id:L,label:s("settings.skills.filterAll"),count:p.length},...[...v].map(r=>({id:r,label:re(r,e.name).label,count:d.get(r)??0}))],u=v.has(O)?O:L,S=u===L?p:p.filter(r=>r.source===u),T=r=>f($e(r.volume,r.path)),K=async()=>{if(!m)return;const{id:r,path:l}=m;N(null),j(P=>P.filter(q=>q.id!==r));try{await o.mutateAsync(l),C.success(s("settings.skills.deleteSuccess"))}catch(P){C.error(P instanceof Error?P.message:s("settings.skills.deleteError"))}finally{x()}},oe=t.jsxs(Q,{size:"sm",disabled:D,onClick:()=>n.current?.click(),children:[t.jsx(Pe,{size:14}),s(D?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(F,{children:[t.jsx(F.Content,{children:t.jsx(F.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(F.Actions,{secondary:t.jsx(Ae,{value:g,onChange:M,label:s("library.context.search"),placeholder:s("settings.skills.searchPlaceholder"),clearLabel:s("library.library.clearSearch")}),children:oe}),t.jsx("input",{ref:n,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:r=>{b(r.target.files)}}),y.length>2&&t.jsx(Ee,{placement:"page",tabs:y,activeTab:u,onTabChange:I}),i.isPending?t.jsx("div",{className:"@container",children:t.jsx(V,{children:Array.from({length:8},(r,l)=>t.jsx(ae,{className:"h-[168px] rounded-xl"},l))})}):i.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ce,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:i.error instanceof Error?i.error.message:s("settings.skills.errorDescription"),actions:t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>{i.refetch()},children:s("settings.skills.retry")})})}):S.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ie,{size:48,className:"text-muted-foreground"}),title:s(g?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:g?s("settings.skills.noResultsDescription",{search:g}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(V,{children:S.map(r=>{const l=r.id===z;return t.jsx(Qe,{entry:r,pending:l,onOpen:()=>T(r),onDelete:B(r)&&!l?()=>N(r):void 0},r.id)})})})]})})}),w&&t.jsx(Me,{skillPath:w,onClose:()=>f(null)},w),t.jsx(me,{open:m!==null,onOpenChange:r=>!r&&N(null),children:t.jsxs(pe,{children:[t.jsxs(de,{children:[t.jsx(ue,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(ge,{children:s("settings.skills.deleteDialogDescription",{name:m?.name??""})})]}),t.jsxs(fe,{children:[t.jsx(he,{children:s("settings.skills.cancel")}),t.jsx(xe,{onClick:K,variant:"destructive",children:s("settings.skills.deleteButton")})]})]})})]})}export{Cs as default};
@@ -1 +0,0 @@
1
- import{c as q,b as G,r as B,j as s,n as Q,m as J,f as X}from"./index-DEZ1imMJ.js";import{C as Z}from"./index-CnOVjrIG.js";import{C as ee}from"./collection-tabs-BJDa_4_F.js";import{A as M,a as te,b as se,u as ae}from"./use-task-board-analytics-5XuzJjLw.js";import{T as ie,e as W}from"./time-range-picker-F9SEOG2b.js";import{S as le,d as oe,c as re,a as ne,b as me}from"./sheet-D2hfPw7P.js";import{S as ce,s as pe,D as de}from"./analytics-sections-BjzpdbBT.js";import{a as fe}from"./task-route-DngvTiyh.js";import{C as ge}from"./combobox-CVchGkTE.js";import"./use-mobile-CJITN8uI.js";import"./use-sidebar-collapsed-DcAIYhdp.js";import"./use-chat-layout-state-BG2-xqQp.js";import"./thread-route-B-uAlF3E.js";import"./autosend-B0POegpm.js";import"./use-project-scope-pwqcjGo8.js";import"./repository-binding-C0msapZZ.js";import"./use-mcp-client-DJjkIlNp.js";import"./auth-CQxDIkM-.js";import"./thread-intent-DuI80508.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DhoYakYc.js";import"./task-board-D3wT6_aG.js";import"./schema-9jBUPMLq.js";import"./agent-icon-CTbTFMnU.js";import"./AlertCircle-Co3RPbIZ.js";import"./Tool01-Bo2g-Ylw.js";import"./ArrowUp-DLnkUu9S.js";import"./ArrowLeft-XBSBGQal.js";import"./LinkBroken01-loTkm0G5.js";import"./ShoppingBag01-zloi0TDl.js";import"./Globe04-D17A2x5l.js";import"./CheckCircle-kNwBDDVU.js";import"./ChevronUp-D1T3kSyr.js";import"./ChevronSelectorVertical-Gg7YcxlH.js";import"./UserSquare-Qd-FKVqK.js";import"./CreditCard01-D65BAIaV.js";import"./SwitchHorizontal01-elXb4-4d.js";import"./Key01-awxHKnoL.js";import"./Minus-CYrsmoRb.js";import"./Monitor01-DalIAdj7.js";import"./Sun-C1lyqton.js";import"./Play-C6Weq-wk.js";import"./Plus-D7X8Q2-q.js";import"./SearchMd-e6xPeRPD.js";import"./Trash01-C-PU5Hm-.js";import"./Upload01-NPnXKs-J.js";import"./Users01-CTNixqdX.js";import"./XClose-BuJ6u6eL.js";import"./Zap-pmN7zSOE.js";import"./tooltip-Dam-ym8O.js";import"./index-DsbWutG1.js";import"./toolbar-icon-button-BmJKmAUK.js";import"./shell-layout-BLRNx2fV.js";import"./use-deployment-admin-CS9K9Ea9.js";import"./admin-fetch-BhTJlAsX.js";import"./command-DA2t4jTW.js";import"./index-DYgzDE_k.js";import"./integration-icon-CFHOt7sY.js";import"./project-icon-rrJh6PJx.js";import"./use-navigate-to-agent-MlXDIBYX.js";import"./use-debounced-value-yZdJ1f2K.js";import"./new-project-dialog-Dfe2Pik9.js";import"./label-BEWDSeNl.js";import"./repository-picker-BYFeDBpn.js";import"./github-icon-BVy-v7gH.js";import"./useInfiniteQuery-CtNfxLxq.js";import"./infiniteQueryObserver-C0Gb02df.js";import"./collection-search-Din8SB5Y.js";import"./use-organization-settings-bWX185lw.js";import"./legacy-admin-welcome-dialog-B223MrIf.js";import"./drawer-BYGTIOoj.js";import"./required-auth-layout-DfUx9vzb.js";import"./use-org-sso-Bo72RJ5p.js";import"./resizable-CHI5UJHW.js";import"./badge-BpzeYR5Z.js";import"./popover-DsvzKyw_.js";import"./scroll-area-CQ_g6hBm.js";import"./index-BdQq_4o_.js";import"./calendar-SB5YBzj8.js";import"./chart-D-gatwT8.js";import"./CategoricalChart-BkeCXQf9.js";import"./index-D5i1_B2b.js";import"./tooltipContext-PzKiic-J.js";import"./CartesianChart-DOb1QHVF.js";import"./table-DjgVXWdP.js";import"./toggle-group-C6oiEKlf.js";import"./active-indicator-CCMhAsc_.js";import"./config-B1mE6oOL.js";import"./core.esm-tIHbtjKb.js";import"./AreaChart-BvS2pAoE.js";import"./task-key-BCHdFiOO.js";import"./project-index-CoA3rtsT.js";const ue={TASK_BOARD_OPERATION:"taskBoard.analytics.tabOperation",TASK_BOARD_REWORK:"taskBoard.analytics.tabRework",TASK_BOARD_DELIVERY:"taskBoard.analytics.tabDelivery",TASK_BOARD_SPRINTS:"taskBoard.analytics.tabSprints",TASK_BOARD_STUCK:"taskBoard.analytics.tabStuck",TASK_BOARD_COST:"taskBoard.analytics.tabCost",TASK_BOARD_ERRORS:"taskBoard.analytics.tabErrors",TASK_BOARD_TENANTS:"taskBoard.analytics.tabTenants"};function F(t){const e=new Date;return{from:(W(t.from).date??e).toISOString(),to:(W(t.to).date??e).toISOString()}}function z(t){const e=q.c(6),{className:p}=t;let r;e[0]!==p?(r=J("surface flex flex-col gap-6 p-4",p),e[0]=p,e[1]=r):r=e[1];let i,d;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("div",{className:"h-5 w-24 animate-pulse rounded bg-muted"}),s.jsx("div",{className:"h-10 w-16 animate-pulse rounded bg-muted"})]}),d=s.jsx("div",{className:"h-[140px] w-full animate-pulse rounded bg-muted/60"}),e[2]=i,e[3]=d):(i=e[2],d=e[3]);let n;return e[4]!==r?(n=s.jsxs("div",{className:r,children:[i,d]}),e[4]=r,e[5]=n):n=e[5],n}function xe(){const t=q.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4",children:[0,1,2,3].map(he)}),t[0]=e):e=t[0];let p;return t[1]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"flex flex-col gap-4","aria-busy":!0,children:[e,s.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[s.jsx(z,{}),s.jsx(z,{})]}),s.jsx(z,{})]}),t[1]=p):p=t[1],p}function he(t){return s.jsxs("div",{className:"surface flex flex-col gap-1 p-4",children:[s.jsx("div",{className:"h-5 w-24 animate-pulse rounded bg-muted"}),s.jsx("div",{className:"h-10 w-16 animate-pulse rounded bg-muted"})]},t)}function Se(t){const e=q.c(27),{target:p,open:r,onOpenChange:i,params:d,taskHref:n}=t,j=G(),{data:l,isLoading:a,error:y}=se(d,r?p?.drill??null:null);let u;e[0]!==l?.sections?(u=l?.sections.find(ke),e[0]=l?.sections,e[1]=u):u=e[1];const m=u,T=m?.rows.length??0,b=p?.label;let x;e[2]!==b?(x=s.jsx(le,{children:b}),e[2]=b,e[3]=x):x=e[3];let h;e[4]!==T||e[5]!==j||e[6]!==m?(h=m?j(T===1?"taskBoard.analytics.drillCountOne":"taskBoard.analytics.drillCount",{n:String(T)}):" ",e[4]=T,e[5]=j,e[6]=m,e[7]=h):h=e[7];let f;e[8]!==h?(f=s.jsx(oe,{children:h}),e[8]=h,e[9]=f):f=e[9];let g;e[10]!==x||e[11]!==f?(g=s.jsxs(re,{children:[x,f]}),e[10]=x,e[11]=f,e[12]=g):g=e[12];let k;e[13]!==y||e[14]!==a||e[15]!==n||e[16]!==m?(k=a?s.jsx("div",{className:"flex flex-col gap-2 p-2","aria-busy":!0,children:[0,1,2,3,4].map(be)}):y?s.jsx("p",{className:"p-2 text-sm text-destructive",children:y.message}):m?.kind==="table"&&s.jsx(de,{section:m,taskHref:n}),e[13]=y,e[14]=a,e[15]=n,e[16]=m,e[17]=k):k=e[17];let o;e[18]!==k?(o=s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-4",children:k}),e[18]=k,e[19]=o):o=e[19];let c;e[20]!==g||e[21]!==o?(c=s.jsxs(ne,{side:"right",size:"lg",children:[g,o]}),e[20]=g,e[21]=o,e[22]=c):c=e[22];let S;return e[23]!==i||e[24]!==r||e[25]!==c?(S=s.jsx(me,{open:r,onOpenChange:i,children:c}),e[23]=i,e[24]=r,e[25]=c,e[26]=S):S=e[26],S}function be(t){return s.jsx("div",{className:"h-11 animate-pulse rounded bg-muted"},t)}function ke(t){return t.kind==="table"}function je(t){const e=q.c(26),{tool:p,org:r,project:i,range:d,taskHref:n}=t;let j;e[0]!==r||e[1]!==i||e[2]!==d?(j={org:r,project:i,...d},e[0]=r,e[1]=i,e[2]=d,e[3]=j):j=e[3];const l=j,{data:a,isPending:y,error:u}=te(p,l),[m,T]=B.useState(null),[b,x]=B.useState(!1);if(u){let o;return e[4]!==u.message?(o=s.jsx("div",{className:"surface p-8 text-center text-sm text-destructive",children:u.message}),e[4]=u.message,e[5]=o):o=e[5],o}if(y||!a){let o;return e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(xe,{}),e[6]=o):o=e[6],o}let h;if(e[7]!==a.range||e[8]!==a.sections||e[9]!==r||e[10]!==n){let o;e[12]!==a.range||e[13]!==r||e[14]!==n?(o=c=>s.jsx("div",{className:J("min-w-0",pe(c)==="full"&&"md:col-span-2",c.kind==="table"&&"mt-6"),children:s.jsx(ce,{section:c,threadLinks:!0,showOrg:r==="all",taskHref:n,range:a.range,onDrill:S=>{T(S),x(!0)}})},c.title),e[12]=a.range,e[13]=r,e[14]=n,e[15]=o):o=e[15],h=a.sections.map(o),e[7]=a.range,e[8]=a.sections,e[9]=r,e[10]=n,e[11]=h}else h=e[11];let f;e[16]!==h?(f=s.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:h}),e[16]=h,e[17]=f):f=e[17];let g;e[18]!==m||e[19]!==b||e[20]!==l||e[21]!==n?(g=s.jsx(Se,{target:m,open:b,onOpenChange:x,params:l,taskHref:n}),e[18]=m,e[19]=b,e[20]=l,e[21]=n,e[22]=g):g=e[22];let k;return e[23]!==f||e[24]!==g?(k=s.jsxs("div",{className:"flex flex-col gap-4",children:[f,g]}),e[23]=f,e[24]=g,e[25]=k):k=e[25],k}function Te(t){const e=q.c(64),{org:p,project:r,taskHref:i,actions:d,notice:n,showTenants:j}=t,l=G(),[a,y]=B.useState("TASK_BOARD_OPERATION");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={from:"now-30d",to:"now"},e[0]=u):u=e[0];const[m,T]=B.useState(u);let b;e[1]!==m?(b=()=>F(m),e[1]=m,e[2]=b):b=e[2];const[x,h]=B.useState(b);let f;if(e[3]!==j||e[4]!==l){let R;e[6]!==j?(R=Y=>Y!=="TASK_BOARD_TENANTS"||j,e[6]=j,e[7]=R):R=e[7];let O;e[8]!==l?(O=Y=>({id:Y,label:l(ue[Y])}),e[8]=l,e[9]=O):O=e[9],f=M.filter(R).map(O),e[3]=j,e[4]=l,e[5]=f}else f=e[5];const g=f;let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=R=>{T(R),h(F(R))},e[10]=k):k=e[10];let o;e[11]!==l?(o=l("monitoring.timeRangePicker.absoluteTimeRange"),e[11]=l,e[12]=o):o=e[12];let c;e[13]!==l?(c=l("monitoring.timeRangePicker.from"),e[13]=l,e[14]=c):c=e[14];let S;e[15]!==l?(S=l("monitoring.timeRangePicker.to"),e[15]=l,e[16]=S):S=e[16];let _;e[17]!==l?(_=l("monitoring.timeRangePicker.applyTimeRange"),e[17]=l,e[18]=_):_=e[18];let v;e[19]!==o||e[20]!==c||e[21]!==S||e[22]!==_?(v={absoluteTimeRange:o,from:c,to:S,applyTimeRange:_},e[19]=o,e[20]=c,e[21]=S,e[22]=_,e[23]=v):v=e[23];let A;e[24]!==l?(A=l("monitoring.timeRangePicker.last7Days"),e[24]=l,e[25]=A):A=e[25];let N;e[26]!==A?(N={label:A,from:"now-7d",to:"now",value:"7d"},e[26]=A,e[27]=N):N=e[27];let w;e[28]!==l?(w=l("monitoring.timeRangePicker.last30Days"),e[28]=l,e[29]=w):w=e[29];let D;e[30]!==w?(D={label:w,from:"now-30d",to:"now",value:"30d"},e[30]=w,e[31]=D):D=e[31];let C;e[32]!==l?(C=l("monitoring.timeRangePicker.last90Days"),e[32]=l,e[33]=C):C=e[33];let P;e[34]!==C?(P={label:C,from:"now-90d",to:"now",value:"90d"},e[34]=C,e[35]=P):P=e[35];let E;e[36]!==N||e[37]!==D||e[38]!==P?(E=[N,D,P],e[36]=N,e[37]=D,e[38]=P,e[39]=E):E=e[39];let K;e[40]!==m||e[41]!==E||e[42]!==v?(K=s.jsx(ie,{value:m,onChange:k,labels:v,quickRanges:E}),e[40]=m,e[41]=E,e[42]=v,e[43]=K):K=e[43];let L;e[44]!==d||e[45]!==K?(L=s.jsxs(Q.Actions,{children:[d,K]}),e[44]=d,e[45]=K,e[46]=L):L=e[46];let U;e[47]===Symbol.for("react.memo_cache_sentinel")?(U=R=>{const O=M.find(Y=>Y===R);O&&y(O)},e[47]=U):U=e[47];let $;e[48]!==a||e[49]!==g?($=s.jsx(ee,{placement:"page",tabs:g,activeTab:a,onTabChange:U}),e[48]=a,e[49]=g,e[50]=$):$=e[50];let I;e[51]!==p||e[52]!==r||e[53]!==x||e[54]!==a||e[55]!==i?(I=s.jsx(je,{tool:a,org:p,project:r,range:x,taskHref:i},a),e[51]=p,e[52]=r,e[53]=x,e[54]=a,e[55]=i,e[56]=I):I=e[56];let H;e[57]!==n||e[58]!==I?(H=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1200px] flex-col gap-4 px-4 pt-6 pb-10 md:px-10",children:[n,I]}),e[57]=n,e[58]=I,e[59]=H):H=e[59];let V;return e[60]!==L||e[61]!==$||e[62]!==H?(V=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:[L,$,H]}),e[60]=L,e[61]=$,e[62]=H,e[63]=V):V=e[63],V}function ns(){const t=q.c(37),e=G();let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p={strict:!1},t[0]=p):p=t[0];const r=X(p),i=r.org??"",d=r.agentId,n=ae(),[j,l]=B.useState(i),[a,y]=B.useState(i);i!==j&&(l(i),y(i));const u=!d&&(n.data?.isTaskBoardAdmin??!1);let m;t[1]!==e?(m=e("taskBoard.analytics.orgCurrent"),t[1]=e,t[2]=m):m=t[2];let T;t[3]!==i||t[4]!==m?(T={value:i,label:m},t[3]=i,t[4]=m,t[5]=T):T=t[5];let b;t[6]!==e?(b=e("taskBoard.analytics.orgAll"),t[6]=e,t[7]=b):b=t[7];let x;t[8]!==b?(x={value:"all",label:b},t[8]=b,t[9]=x):x=t[9];let h;if(t[10]!==n.data?.orgs||t[11]!==i||t[12]!==T||t[13]!==x){let v;t[15]!==i?(v=A=>A.slug!==i,t[15]=i,t[16]=v):v=t[16],h=[T,x,...(n.data?.orgs??[]).filter(v).map(ve)],t[10]=n.data?.orgs,t[11]=i,t[12]=T,t[13]=x,t[14]=h}else h=t[14];const f=h;let g;t[17]!==a||t[18]!==i||t[19]!==d?(g=v=>fe(i,{id:v,keySeq:null},d)+(a===i?"":`?boardOrg=${encodeURIComponent(a)}`),t[17]=a,t[18]=i,t[19]=d,t[20]=g):g=t[20];const o=a==="all"?void 0:g;let c;t[21]!==u||t[22]!==a||t[23]!==f||t[24]!==e?(c=u&&s.jsx(ge,{options:f,value:a,onChange:y,width:"w-[220px]",searchPlaceholder:e("taskBoard.analytics.orgSearch"),emptyMessage:e("taskBoard.analytics.orgEmpty")}),t[21]=u,t[22]=a,t[23]=f,t[24]=e,t[25]=c):c=t[25];let S;t[26]!==a||t[27]!==i||t[28]!==e?(S=a!==i&&s.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:a==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:a})}),t[26]=a,t[27]=i,t[28]=e,t[29]=S):S=t[29];let _;return t[30]!==u||t[31]!==a||t[32]!==d||t[33]!==o||t[34]!==c||t[35]!==S?(_=s.jsx(Z.Content,{children:s.jsx(Te,{org:a,project:d,taskHref:o,showTenants:u,actions:c,notice:S},a)}),t[30]=u,t[31]=a,t[32]=d,t[33]=o,t[34]=c,t[35]=S,t[36]=_):_=t[36],_}function ve(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}export{ns as default};
@@ -1 +0,0 @@
1
- import{c as l,a5 as n,j as r,K as f}from"./index-DEZ1imMJ.js";import{C as d}from"./index-CnOVjrIG.js";import{m as u,P as x,T as h}from"./mock-board-CYJBKLD5.js";import{F as j}from"./feature-gate-ru6FBLZU.js";import"./use-mobile-CJITN8uI.js";import"./use-sidebar-collapsed-DcAIYhdp.js";import"./use-chat-layout-state-BG2-xqQp.js";import"./thread-route-B-uAlF3E.js";import"./autosend-B0POegpm.js";import"./use-project-scope-pwqcjGo8.js";import"./repository-binding-C0msapZZ.js";import"./use-mcp-client-DJjkIlNp.js";import"./auth-CQxDIkM-.js";import"./thread-intent-DuI80508.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DhoYakYc.js";import"./task-board-D3wT6_aG.js";import"./schema-9jBUPMLq.js";import"./agent-icon-CTbTFMnU.js";import"./AlertCircle-Co3RPbIZ.js";import"./Tool01-Bo2g-Ylw.js";import"./ArrowUp-DLnkUu9S.js";import"./ArrowLeft-XBSBGQal.js";import"./LinkBroken01-loTkm0G5.js";import"./ShoppingBag01-zloi0TDl.js";import"./Globe04-D17A2x5l.js";import"./CheckCircle-kNwBDDVU.js";import"./ChevronUp-D1T3kSyr.js";import"./ChevronSelectorVertical-Gg7YcxlH.js";import"./UserSquare-Qd-FKVqK.js";import"./CreditCard01-D65BAIaV.js";import"./SwitchHorizontal01-elXb4-4d.js";import"./Key01-awxHKnoL.js";import"./Minus-CYrsmoRb.js";import"./Monitor01-DalIAdj7.js";import"./Sun-C1lyqton.js";import"./Play-C6Weq-wk.js";import"./Plus-D7X8Q2-q.js";import"./SearchMd-e6xPeRPD.js";import"./Trash01-C-PU5Hm-.js";import"./Upload01-NPnXKs-J.js";import"./Users01-CTNixqdX.js";import"./XClose-BuJ6u6eL.js";import"./Zap-pmN7zSOE.js";import"./tooltip-Dam-ym8O.js";import"./index-DsbWutG1.js";import"./toolbar-icon-button-BmJKmAUK.js";import"./shell-layout-BLRNx2fV.js";import"./use-deployment-admin-CS9K9Ea9.js";import"./admin-fetch-BhTJlAsX.js";import"./command-DA2t4jTW.js";import"./index-DYgzDE_k.js";import"./integration-icon-CFHOt7sY.js";import"./project-icon-rrJh6PJx.js";import"./use-navigate-to-agent-MlXDIBYX.js";import"./use-debounced-value-yZdJ1f2K.js";import"./new-project-dialog-Dfe2Pik9.js";import"./label-BEWDSeNl.js";import"./repository-picker-BYFeDBpn.js";import"./github-icon-BVy-v7gH.js";import"./useInfiniteQuery-CtNfxLxq.js";import"./infiniteQueryObserver-C0Gb02df.js";import"./collection-search-Din8SB5Y.js";import"./use-organization-settings-bWX185lw.js";import"./legacy-admin-welcome-dialog-B223MrIf.js";import"./drawer-BYGTIOoj.js";import"./required-auth-layout-DfUx9vzb.js";import"./use-org-sso-Bo72RJ5p.js";import"./sheet-D2hfPw7P.js";import"./resizable-CHI5UJHW.js";import"./core.esm-tIHbtjKb.js";import"./sortable.esm-D2_ALuVf.js";import"./use-task-board-analytics-5XuzJjLw.js";import"./combobox-CVchGkTE.js";import"./popover-DsvzKyw_.js";import"./use-task-board-prompts-CE5ytMaB.js";import"./badge-BpzeYR5Z.js";import"./icon-button-Ze0c1pwp.js";import"./use-org-fs-BH012Up0.js";import"./use-automations-CyrAu8XA.js";import"./search-toggle-CO5TN956.js";import"./context-menu-CsBFFEsr.js";import"./super-agent-icon-B-73GF60.js";import"./use-task-board-items-pvi4Vcv1.js";import"./config-B1mE6oOL.js";import"./use-task-board-events-DnEp5edD.js";import"./use-decopilot-events-C_C16-Ln.js";import"./sprints-C1z9xhcL.js";import"./select-BJaUvbIR.js";import"./index-BdQq_4o_.js";import"./task-route-DngvTiyh.js";import"./task-key-BCHdFiOO.js";import"./project-index-CoA3rtsT.js";import"./use-tags-6ljf50Kl.js";import"./feedback-BqoIMOg7.js";import"./calendar-SB5YBzj8.js";import"./alert-wYcDlQSf.js";import"./collapsible-C7N88_dp.js";import"./use-copy-o0P-kroy.js";import"./markdown-Db8a3LUX.js";import"./chat-context-PvP_Q1CV.js";import"./use-entitlements-DidlVdLU.js";import"./use-ai-providers-DwpUgHpj.js";import"./index-CQQpem-0.js";import"./usage-stats-C3KvQP9T.js";import"./tool-namespace-DdU5nhii.js";import"./form-gd_hA5VT.js";import"./utils-CVEq3hMx.js";import"./editor-classes-LFKjNX_0.js";import"./suggestion-C8VoNVDk.js";import"./index-D8y5KFA4.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-CycVEDhs.js";import"./use-connection-BozgIoMu.js";import"./github-repo-scope-C58hYmYC.js";import"./thread-sheet-body-BiNfUUQ_.js";import"./useSuspenseInfiniteQuery-OzDVxqdl.js";import"./pair-D5JEvK2M.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C8G6NLBz.js";import"./types-gyofjZHf.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-mcp-prompts-it9pO2QZ.js";import"./use-thread-outputs-BPYn8k3d.js";import"./file-type-icon-DM9o0Fkb.js";import"./use-infinite-scroll-CED9GMTE.js";import"./task-status-BfFZ6nf8.js";import"./separator-BXKmXRi8.js";import"./chat-draft-C714j1Wd.js";import"./feature-paywall-eifo7eqe.js";import"./plan-ladder-DdqVPKf9.js";function a(){const t=l.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:r.jsx(h,{})}),t[0]=o):o=t[0],o}function Yo(){const t=l.c(8),{locator:o}=n();let i;t[0]!==o?(i=c=>c.setQueryData(f.taskBoardItems(o),u()),t[0]=o,t[1]=i):i=t[1];let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(a,{}),t[2]=p):p=t[2];let m;t[3]!==i?(m=r.jsx(x,{seed:i,children:p}),t[3]=i,t[4]=m):m=t[4];let e;t[5]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(a,{}),t[5]=e):e=t[5];let s;return t[6]!==m?(s=r.jsx(d.Content,{children:r.jsx(j,{feature:"kanban",backdrop:m,children:e})}),t[6]=m,t[7]=s):s=t[7],s}export{Yo as default};
@@ -1 +0,0 @@
1
- import{c as D,i as ue,f as ye,r as V,K as fe,al as pe,d0 as Ne,b as ee,j as l,h as Ae,a5 as be,a0 as _e,T as Ce}from"./index-DEZ1imMJ.js";import{C as se}from"./index-CnOVjrIG.js";import{S as we}from"./analytics-sections-BjzpdbBT.js";import{e as ke}from"./watch-sse-pool-DhoYakYc.js";import{B as Ee}from"./badge-BpzeYR5Z.js";import{C as Le}from"./combobox-CVchGkTE.js";import{S as ie,b as ne,a as oe,d as ce,c as Z}from"./select-BJaUvbIR.js";import{e as Re,a as Oe,b as Se,T as F,d as Ie,c as q}from"./table-DjgVXWdP.js";import{T as le,a as $e,b as re,c as De}from"./tabs-DtOFAaIp.js";import{c as Be,S as He,a as Ke,b as Pe}from"./sheet-D2hfPw7P.js";import{T as Fe}from"./thread-sheet-body-BiNfUUQ_.js";import{u as qe}from"./use-connection-BozgIoMu.js";import{u as Ve}from"./use-mcp-client-DJjkIlNp.js";import{a as Ye}from"./repository-binding-C0msapZZ.js";import"./use-mobile-CJITN8uI.js";import"./use-sidebar-collapsed-DcAIYhdp.js";import"./use-chat-layout-state-BG2-xqQp.js";import"./thread-route-B-uAlF3E.js";import"./autosend-B0POegpm.js";import"./use-project-scope-pwqcjGo8.js";import"./thread-intent-DuI80508.js";import"./delay-CnY5UFtP.js";import"./agent-icon-CTbTFMnU.js";import"./AlertCircle-Co3RPbIZ.js";import"./Tool01-Bo2g-Ylw.js";import"./ArrowUp-DLnkUu9S.js";import"./ArrowLeft-XBSBGQal.js";import"./LinkBroken01-loTkm0G5.js";import"./ShoppingBag01-zloi0TDl.js";import"./Globe04-D17A2x5l.js";import"./CheckCircle-kNwBDDVU.js";import"./ChevronUp-D1T3kSyr.js";import"./ChevronSelectorVertical-Gg7YcxlH.js";import"./UserSquare-Qd-FKVqK.js";import"./CreditCard01-D65BAIaV.js";import"./SwitchHorizontal01-elXb4-4d.js";import"./Key01-awxHKnoL.js";import"./Minus-CYrsmoRb.js";import"./Monitor01-DalIAdj7.js";import"./Sun-C1lyqton.js";import"./Play-C6Weq-wk.js";import"./Plus-D7X8Q2-q.js";import"./SearchMd-e6xPeRPD.js";import"./Trash01-C-PU5Hm-.js";import"./Upload01-NPnXKs-J.js";import"./Users01-CTNixqdX.js";import"./XClose-BuJ6u6eL.js";import"./Zap-pmN7zSOE.js";import"./tooltip-Dam-ym8O.js";import"./index-DsbWutG1.js";import"./toolbar-icon-button-BmJKmAUK.js";import"./shell-layout-BLRNx2fV.js";import"./use-deployment-admin-CS9K9Ea9.js";import"./admin-fetch-BhTJlAsX.js";import"./command-DA2t4jTW.js";import"./index-DYgzDE_k.js";import"./integration-icon-CFHOt7sY.js";import"./project-icon-rrJh6PJx.js";import"./use-navigate-to-agent-MlXDIBYX.js";import"./use-debounced-value-yZdJ1f2K.js";import"./new-project-dialog-Dfe2Pik9.js";import"./label-BEWDSeNl.js";import"./repository-picker-BYFeDBpn.js";import"./github-icon-BVy-v7gH.js";import"./useInfiniteQuery-CtNfxLxq.js";import"./infiniteQueryObserver-C0Gb02df.js";import"./collection-search-Din8SB5Y.js";import"./use-organization-settings-bWX185lw.js";import"./schema-9jBUPMLq.js";import"./task-board-D3wT6_aG.js";import"./legacy-admin-welcome-dialog-B223MrIf.js";import"./drawer-BYGTIOoj.js";import"./required-auth-layout-DfUx9vzb.js";import"./use-org-sso-Bo72RJ5p.js";import"./resizable-CHI5UJHW.js";import"./chart-D-gatwT8.js";import"./CategoricalChart-BkeCXQf9.js";import"./index-D5i1_B2b.js";import"./tooltipContext-PzKiic-J.js";import"./CartesianChart-DOb1QHVF.js";import"./toggle-group-C6oiEKlf.js";import"./active-indicator-CCMhAsc_.js";import"./config-B1mE6oOL.js";import"./core.esm-tIHbtjKb.js";import"./AreaChart-BvS2pAoE.js";import"./popover-DsvzKyw_.js";import"./index-BdQq_4o_.js";import"./useSuspenseInfiniteQuery-OzDVxqdl.js";import"./pair-D5JEvK2M.js";import"./collapsible-C7N88_dp.js";import"./use-copy-o0P-kroy.js";import"./usage-stats-C3KvQP9T.js";import"./tool-namespace-DdU5nhii.js";import"./form-gd_hA5VT.js";import"./utils-CVEq3hMx.js";import"./markdown-Db8a3LUX.js";import"./chat-context-PvP_Q1CV.js";import"./use-entitlements-DidlVdLU.js";import"./use-ai-providers-DwpUgHpj.js";import"./use-decopilot-events-C_C16-Ln.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C8G6NLBz.js";import"./types-gyofjZHf.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-mcp-prompts-it9pO2QZ.js";import"./use-thread-outputs-BPYn8k3d.js";import"./file-type-icon-DM9o0Fkb.js";import"./use-infinite-scroll-CED9GMTE.js";import"./task-status-BfFZ6nf8.js";import"./auth-CQxDIkM-.js";function xe(){return ye({strict:!1}).org??""}function Me(){const t=D.c(8),e=xe();let s;t[0]!==e?(s=fe.threadAnalyticsOrgs(e),t[0]=e,t[1]=s):s=t[1];const r=!!e;let a;t[2]!==e?(a=()=>pe(e,"THREAD_ANALYTICS_ORG_LIST",{}),t[2]=e,t[3]=a):a=t[3];let n;return t[4]!==s||t[5]!==r||t[6]!==a?(n={queryKey:s,enabled:r,queryFn:a,staleTime:3e5},t[4]=s,t[5]=r,t[6]=a,t[7]=n):n=t[7],ue(n)}const Ue=3e3,de=new Map,ge=new Map;function ze(t){let e=ge.get(t);return e||(e=s=>{let r=null;const a=()=>{r||(r=setTimeout(()=>{r=null,de.set(t,(de.get(t)??0)+1),s()},Ue))},n=ke.subscribe(t,a,a);return()=>{r&&clearTimeout(r),n()}},ge.set(t,e)),e}function Ge(t,e){const s=D.c(5);let r;s[0]!==e||s[1]!==t?(r=ze(t),s[0]=e,s[1]=t,s[2]=r):r=s[2];let a;return s[3]!==t?(a=()=>de.get(t)??0,s[3]=t,s[4]=a):a=s[4],V.useSyncExternalStore(r,a)}function We(t,e){const s=D.c(11),r=xe(),a=Ge(r,e);let n;s[0]!==t||s[1]!==r||s[2]!==a?(n=fe.threadAnalytics(r,"live",t,a),s[0]=t,s[1]=r,s[2]=a,s[3]=n):n=s[3];const i=!!r;let c;s[4]!==t||s[5]!==r?(c=()=>pe(r,"THREAD_ANALYTICS_LIVE",t),s[4]=t,s[5]=r,s[6]=c):c=s[6];let o;return s[7]!==n||s[8]!==i||s[9]!==c?(o={queryKey:n,enabled:i,queryFn:c,placeholderData:Ne},s[7]=n,s[8]=i,s[9]=c,s[10]=o):o=s[10],ue(o)}function Qe(t,e){const s=D.c(12),r=xe();let a;s[0]!==e||s[1]!==r||s[2]!==t?(a=fe.threadAnalytics(r,t,e,0),s[0]=e,s[1]=r,s[2]=t,s[3]=a):a=s[3];const n=!!r;let i;s[4]!==e||s[5]!==r||s[6]!==t?(i=()=>pe(r,t,e),s[4]=e,s[5]=r,s[6]=t,s[7]=i):i=s[7];let c;return s[8]!==a||s[9]!==n||s[10]!==i?(c={queryKey:a,enabled:n,queryFn:i},s[8]=a,s[9]=n,s[10]=i,s[11]=c):c=s[11],ue(c)}const Je=[1,7,30,90],Xe=["in_progress","requires_action","failed","completed"],Ze=["chat","automation","task"],X="any",me={in_progress:"thread.analytics.statusRunning",requires_action:"thread.analytics.statusWaiting",failed:"thread.analytics.statusFailed",completed:"thread.analytics.statusCompleted"},ve={chat:"thread.analytics.kindChat",automation:"thread.analytics.kindAutomation",task:"thread.analytics.kindTask"},et={in_progress:"default",requires_action:"warning",failed:"destructive",completed:"secondary"};function he(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx("div",{className:"flex justify-center py-12",children:l.jsx(Ae,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function Te(t){const e=D.c(2),{message:s}=t;let r;return e[0]!==s?(r=l.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-destructive",children:s}),e[0]=s,e[1]=r):r=e[1],r}function ae(t){const e=D.c(9),{label:s,value:r}=t;let a;e[0]!==s?(a=l.jsx("div",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let n;e[2]!==r?(n=r.toLocaleString(),e[2]=r,e[3]=n):n=e[3];let i;e[4]!==n?(i=l.jsx("div",{className:"mt-1 text-2xl font-medium text-foreground tabular-nums",children:n}),e[4]=n,e[5]=i):i=e[5];let c;return e[6]!==a||e[7]!==i?(c=l.jsxs("div",{className:"rounded-lg border border-border p-4",children:[a,i]}),e[6]=a,e[7]=i,e[8]=c):c=e[8],c}function tt(t){const e=D.c(56),{thread:s,onOpen:r}=t,a=ee(),n=s.status;let i;e[0]!==s.updatedAt?(i=new Date(s.updatedAt).toLocaleString(),e[0]=s.updatedAt,e[1]=i):i=e[1];let c;e[2]!==i?(c=l.jsx(q,{className:"whitespace-nowrap text-sm tabular-nums text-muted-foreground",children:i}),e[2]=i,e[3]=c):c=e[3];let o;e[4]!==s.orgSlug?(o=l.jsx(q,{className:"text-sm",children:s.orgSlug}),e[4]=s.orgSlug,e[5]=o):o=e[5];let u;e[6]!==r||e[7]!==s?(u=()=>r(s),e[6]=r,e[7]=s,e[8]=u):u=e[8];let d;e[9]!==a||e[10]!==s.title?(d=s.title||a("thread.analytics.untitled"),e[9]=a,e[10]=s.title,e[11]=d):d=e[11];let x;e[12]!==u||e[13]!==d?(x=l.jsx("button",{type:"button",onClick:u,className:"block max-w-full truncate text-left text-foreground underline-offset-2 hover:underline",children:d}),e[12]=u,e[13]=d,e[14]=x):x=e[14];let m;e[15]!==s.failureReason||e[16]!==s.lastError||e[17]!==s.status?(m=s.status==="failed"&&(s.lastError||s.failureReason)&&l.jsx("div",{className:"truncate text-xs text-destructive",children:s.lastError??s.failureReason}),e[15]=s.failureReason,e[16]=s.lastError,e[17]=s.status,e[18]=m):m=e[18];let h;e[19]!==x||e[20]!==m?(h=l.jsxs(q,{className:"max-w-sm text-sm",children:[x,m]}),e[19]=x,e[20]=m,e[21]=h):h=e[21];const g=ve[s.kind];let f;e[22]!==a||e[23]!==g?(f=a(g),e[22]=a,e[23]=g,e[24]=f):f=e[24];let w;e[25]!==f?(w=l.jsx(q,{className:"text-sm",children:f}),e[25]=f,e[26]=w):w=e[26];const k=et[n]??"outline";let j;e[27]!==n||e[28]!==a||e[29]!==s.status?(j=me[n]?a(me[n]):s.status,e[27]=n,e[28]=a,e[29]=s.status,e[30]=j):j=e[30];let N;e[31]!==k||e[32]!==j?(N=l.jsx(q,{children:l.jsx(Ee,{variant:k,children:j})}),e[31]=k,e[32]=j,e[33]=N):N=e[33];const E=s.userEmail??s.userName??"—";let y;e[34]!==E?(y=l.jsx(q,{className:"max-w-48 truncate text-sm",children:E}),e[34]=E,e[35]=y):y=e[35];let b;e[36]!==s.agent?(b=l.jsx(q,{className:"max-w-48 truncate text-sm",children:s.agent}),e[36]=s.agent,e[37]=b):b=e[37];let A;e[38]!==s.usd?(A=s.usd===null?"—":`$${s.usd.toFixed(2)}`,e[38]=s.usd,e[39]=A):A=e[39];let S;e[40]!==A?(S=l.jsx(q,{className:"text-sm tabular-nums",children:A}),e[40]=A,e[41]=S):S=e[41];let v;e[42]!==s.tokens?(v=s.tokens===null?"—":s.tokens.toLocaleString(),e[42]=s.tokens,e[43]=v):v=e[43];let T;e[44]!==v?(T=l.jsx(q,{className:"text-sm tabular-nums",children:v}),e[44]=v,e[45]=T):T=e[45];let _;return e[46]!==w||e[47]!==N||e[48]!==y||e[49]!==b||e[50]!==S||e[51]!==c||e[52]!==T||e[53]!==o||e[54]!==h?(_=l.jsxs(Se,{children:[c,o,h,w,N,y,b,S,T]}),e[46]=w,e[47]=N,e[48]=y,e[49]=b,e[50]=S,e[51]=c,e[52]=T,e[53]=o,e[54]=h,e[55]=_):_=e[55],_}function st(t){const e=D.c(51),{org:s}=t,r=ee(),[a,n]=V.useState(X),[i,c]=V.useState(X),o=a===X?void 0:a,u=i===X?void 0:i;let d;e[0]!==s||e[1]!==o||e[2]!==u?(d={org:s,status:o,kind:u,limit:150},e[0]=s,e[1]=o,e[2]=u,e[3]=d):d=e[3];const x=d,{data:m,isLoading:h,error:g}=We(x,!0),[f,w]=V.useState(null);let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(ne,{className:"w-[180px]",size:"sm",children:l.jsx(oe,{})}),e[4]=k):k=e[4];let j;e[5]!==r?(j=r("thread.analytics.anyStatus"),e[5]=r,e[6]=j):j=e[6];let N;e[7]!==j?(N=l.jsx(Z,{value:X,children:j}),e[7]=j,e[8]=N):N=e[8];let E;e[9]!==r?(E=Xe.map(C=>l.jsx(Z,{value:C,children:r(me[C])},C)),e[9]=r,e[10]=E):E=e[10];let y;e[11]!==N||e[12]!==E?(y=l.jsxs(ce,{children:[N,E]}),e[11]=N,e[12]=E,e[13]=y):y=e[13];let b;e[14]!==a||e[15]!==y?(b=l.jsxs(ie,{value:a,onValueChange:n,children:[k,y]}),e[14]=a,e[15]=y,e[16]=b):b=e[16];let A;e[17]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx(ne,{className:"w-[180px]",size:"sm",children:l.jsx(oe,{})}),e[17]=A):A=e[17];let S;e[18]!==r?(S=r("thread.analytics.anyKind"),e[18]=r,e[19]=S):S=e[19];let v;e[20]!==S?(v=l.jsx(Z,{value:X,children:S}),e[20]=S,e[21]=v):v=e[21];let T;e[22]!==r?(T=Ze.map(C=>l.jsx(Z,{value:C,children:r(ve[C])},C)),e[22]=r,e[23]=T):T=e[23];let _;e[24]!==v||e[25]!==T?(_=l.jsxs(ce,{children:[v,T]}),e[24]=v,e[25]=T,e[26]=_):_=e[26];let L;e[27]!==i||e[28]!==_?(L=l.jsxs(ie,{value:i,onValueChange:c,children:[A,_]}),e[27]=i,e[28]=_,e[29]=L):L=e[29];let B;e[30]===Symbol.for("react.memo_cache_sentinel")?(B=l.jsx("span",{className:"size-2 rounded-full bg-success"}),e[30]=B):B=e[30];let H;e[31]!==r?(H=r("thread.analytics.liveHint"),e[31]=r,e[32]=H):H=e[32];let R;e[33]!==H?(R=l.jsxs("span",{className:"ml-auto flex items-center gap-2 text-xs text-muted-foreground",children:[B,H]}),e[33]=H,e[34]=R):R=e[34];let O;e[35]!==L||e[36]!==R||e[37]!==b?(O=l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b,L,R]}),e[35]=L,e[36]=R,e[37]=b,e[38]=O):O=e[38];let I;e[39]!==m||e[40]!==g||e[41]!==h||e[42]!==r?(I=h?l.jsx(he,{}):g?l.jsx(Te,{message:g.message}):m?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[l.jsx(ae,{label:r("thread.analytics.countRunning"),value:m.counts.running}),l.jsx(ae,{label:r("thread.analytics.countWaiting"),value:m.counts.waiting}),l.jsx(ae,{label:r("thread.analytics.countFailedHour"),value:m.counts.failedLastHour})]}),m.threads.length===0?l.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-muted-foreground",children:r("thread.analytics.empty")}):l.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:l.jsxs(Re,{children:[l.jsx(Oe,{children:l.jsxs(Se,{children:[l.jsx(F,{children:r("thread.analytics.colUpdated")}),l.jsx(F,{children:r("thread.analytics.colOrg")}),l.jsx(F,{children:r("thread.analytics.colChat")}),l.jsx(F,{children:r("thread.analytics.colKind")}),l.jsx(F,{children:r("thread.analytics.colStatus")}),l.jsx(F,{children:r("thread.analytics.colUser")}),l.jsx(F,{children:r("thread.analytics.colAgent")}),l.jsx(F,{children:r("thread.analytics.colCost")}),l.jsx(F,{children:r("thread.analytics.colTokens")})]})}),l.jsx(Ie,{children:m.threads.map(C=>l.jsx(tt,{thread:C,onOpen:w},C.id))})]})})]}):null,e[39]=m,e[40]=g,e[41]=h,e[42]=r,e[43]=I):I=e[43];let K;e[44]===Symbol.for("react.memo_cache_sentinel")?(K=()=>w(null),e[44]=K):K=e[44];let $;e[45]!==f?($=l.jsx(rt,{thread:f,onClose:K}),e[45]=f,e[46]=$):$=e[46];let P;return e[47]!==O||e[48]!==I||e[49]!==$?(P=l.jsxs("div",{className:"flex flex-col gap-6 py-6",children:[O,I,$]}),e[47]=O,e[48]=I,e[49]=$,e[50]=P):P=e[50],P}function lt(t){const e=D.c(14),{thread:s}=t,{org:r,locator:a}=be();let n;e[0]!==r.id||e[1]!==r.slug?(n={connectionId:Ce,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=n):n=e[2];const i=Ve(n),c=qe(),o=Ye();let u;e[3]!==s.createdAt||e[4]!==s.id||e[5]!==s.status||e[6]!==s.title?(u={id:s.id,title:s.title,status:s.status,created_at:s.createdAt},e[3]=s.createdAt,e[4]=s.id,e[5]=s.status,e[6]=s.title,e[7]=u):u=e[7];let d;return e[8]!==i||e[9]!==c||e[10]!==a||e[11]!==u||e[12]!==o?(d=l.jsx(Fe,{thread:u,client:i,locator:a,connections:c,virtualMcps:o,members:void 0,meta:!1}),e[8]=i,e[9]=c,e[10]=a,e[11]=u,e[12]=o,e[13]=d):d=e[13],d}function rt(t){const e=D.c(12),{thread:s,onClose:r}=t,a=ee(),{project:n}=be(),i=!!s;let c;e[0]!==r?(c=x=>!x&&r(),e[0]=r,e[1]=c):c=e[1];let o;e[2]!==n||e[3]!==a||e[4]!==s?(o=s&&l.jsx(_e,{org:{id:s.orgId,name:s.orgSlug,slug:s.orgSlug,logo:null},project:n,children:l.jsx(V.Suspense,{fallback:l.jsx(Be,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:l.jsx(He,{className:"truncate text-sm leading-snug",children:s.title||a("thread.analytics.untitled")})}),children:l.jsx(lt,{thread:s})})}),e[2]=n,e[3]=a,e[4]=s,e[5]=o):o=e[5];let u;e[6]!==o?(u=l.jsx(Ke,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:o}),e[6]=o,e[7]=u):u=e[7];let d;return e[8]!==i||e[9]!==c||e[10]!==u?(d=l.jsx(Pe,{open:i,onOpenChange:c,children:u}),e[8]=i,e[9]=c,e[10]=u,e[11]=d):d=e[11],d}function je(t){const e=D.c(16),{tool:s,org:r,from:a,to:n}=t,i=ee();let c;e[0]!==a||e[1]!==r||e[2]!==n?(c={org:r,from:a,to:n},e[0]=a,e[1]=r,e[2]=n,e[3]=c):c=e[3];const{data:o,isLoading:u,error:d}=Qe(s,c);if(u){let f;return e[4]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(he,{}),e[4]=f):f=e[4],f}if(d){let f;return e[5]!==d.message?(f=l.jsx(Te,{message:d.message}),e[5]=d.message,e[6]=f):f=e[6],f}if(!o)return null;let x;e[7]!==o.sections?(x=o.sections.map(at),e[7]=o.sections,e[8]=x):x=e[8];let m;e[9]!==i?(m=i("thread.analytics.costFootnote"),e[9]=i,e[10]=m):m=e[10];let h;e[11]!==m?(h=l.jsx("p",{className:"text-xs text-muted-foreground",children:m}),e[11]=m,e[12]=h):h=e[12];let g;return e[13]!==x||e[14]!==h?(g=l.jsxs("div",{className:"flex flex-col gap-8 py-6",children:[x,h]}),e[13]=x,e[14]=h,e[15]=g):g=e[15],g}function at(t){return l.jsx(we,{section:t,threadLinks:!0},t.title)}function dl(){const t=D.c(99),e=ee(),s=ye({strict:!1}).org??"",r=Me(),[a,n]=V.useState("all"),[i,c]=V.useState(7),[o,u]=V.useState("live"),[d]=V.useState(nt);let x;t[0]!==d?(x=new Date(d).toISOString(),t[0]=d,t[1]=x):x=t[1];const m=x;let h;t[2]!==i||t[3]!==d?(h=new Date(d-i*864e5).toISOString(),t[2]=i,t[3]=d,t[4]=h):h=t[4];const g=h;if(r.isLoading){let p;return t[5]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx(se.Content,{children:l.jsx(he,{})}),t[5]=p):p=t[5],p}if(!r.data?.isAdmin){let p;t[6]!==e?(p=e("thread.analytics.notAdmin"),t[6]=e,t[7]=p):p=t[7];let J;return t[8]!==p?(J=l.jsx(se.Content,{children:l.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:p})}),t[8]=p,t[9]=J):J=t[9],J}let f;t[10]!==e?(f=e("taskBoard.analytics.orgAll"),t[10]=e,t[11]=f):f=t[11];let w;t[12]!==f?(w={value:"all",label:f},t[12]=f,t[13]=w):w=t[13];let k;t[14]!==e?(k=e("taskBoard.analytics.orgCurrent"),t[14]=e,t[15]=k):k=t[15];let j;t[16]!==s||t[17]!==k?(j={value:s,label:k},t[16]=s,t[17]=k,t[18]=j):j=t[18];let N;if(t[19]!==r.data.orgs||t[20]!==s||t[21]!==w||t[22]!==j){let p;t[24]!==s?(p=J=>J.slug!==s,t[24]=s,t[25]=p):p=t[25],N=[w,j,...r.data.orgs.filter(p).map(it)],t[19]=r.data.orgs,t[20]=s,t[21]=w,t[22]=j,t[23]=N}else N=t[23];const E=N;let y;t[26]!==e?(y=e("thread.analytics.title"),t[26]=e,t[27]=y):y=t[27];let b;t[28]!==y?(b=l.jsx("h1",{className:"text-xl font-medium text-foreground",children:y}),t[28]=y,t[29]=b):b=t[29];let A;t[30]!==e?(A=e("taskBoard.analytics.orgSearch"),t[30]=e,t[31]=A):A=t[31];let S;t[32]!==e?(S=e("taskBoard.analytics.orgEmpty"),t[32]=e,t[33]=S):S=t[33];let v;t[34]!==a||t[35]!==E||t[36]!==S||t[37]!==A?(v=l.jsx(Le,{options:E,value:a,onChange:n,width:"w-[240px]",searchPlaceholder:A,emptyMessage:S}),t[34]=a,t[35]=E,t[36]=S,t[37]=A,t[38]=v):v=t[38];let T;t[39]!==i||t[40]!==e||t[41]!==o?(T=o!=="live"&&l.jsxs(ie,{value:String(i),onValueChange:p=>c(Number(p)),children:[l.jsx(ne,{className:"w-[140px]",size:"sm",children:l.jsx(oe,{})}),l.jsx(ce,{children:Je.map(p=>l.jsx(Z,{value:String(p),children:e("taskBoard.analytics.rangeDays",{days:String(p)})},p))})]}),t[39]=i,t[40]=e,t[41]=o,t[42]=T):T=t[42];let _;t[43]!==v||t[44]!==T?(_=l.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[v,T]}),t[43]=v,t[44]=T,t[45]=_):_=t[45];let L;t[46]!==_||t[47]!==b?(L=l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b,_]}),t[46]=_,t[47]=b,t[48]=L):L=t[48];let B;t[49]!==a||t[50]!==s||t[51]!==e?(B=a!==s&&l.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:a==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:a})}),t[49]=a,t[50]=s,t[51]=e,t[52]=B):B=t[52];let H;t[53]===Symbol.for("react.memo_cache_sentinel")?(H=p=>u(p),t[53]=H):H=t[53];let R;t[54]!==e?(R=e("thread.analytics.tabLive"),t[54]=e,t[55]=R):R=t[55];let O;t[56]!==R?(O=l.jsx(le,{value:"live",children:R}),t[56]=R,t[57]=O):O=t[57];let I;t[58]!==e?(I=e("thread.analytics.tabUsage"),t[58]=e,t[59]=I):I=t[59];let K;t[60]!==I?(K=l.jsx(le,{value:"usage",children:I}),t[60]=I,t[61]=K):K=t[61];let $;t[62]!==e?($=e("thread.analytics.tabErrors"),t[62]=e,t[63]=$):$=t[63];let P;t[64]!==$?(P=l.jsx(le,{value:"errors",children:$}),t[64]=$,t[65]=P):P=t[65];let C;t[66]!==O||t[67]!==K||t[68]!==P?(C=l.jsxs($e,{children:[O,K,P]}),t[66]=O,t[67]=K,t[68]=P,t[69]=C):C=t[69];let Y;t[70]!==a||t[71]!==o?(Y=o==="live"&&l.jsx(st,{org:a}),t[70]=a,t[71]=o,t[72]=Y):Y=t[72];let M;t[73]!==Y?(M=l.jsx(re,{value:"live",children:Y}),t[73]=Y,t[74]=M):M=t[74];let U;t[75]!==g||t[76]!==a||t[77]!==o||t[78]!==m?(U=o==="usage"&&l.jsx(je,{tool:"THREAD_ANALYTICS_USAGE",org:a,from:g,to:m}),t[75]=g,t[76]=a,t[77]=o,t[78]=m,t[79]=U):U=t[79];let z;t[80]!==U?(z=l.jsx(re,{value:"usage",children:U}),t[80]=U,t[81]=z):z=t[81];let G;t[82]!==g||t[83]!==a||t[84]!==o||t[85]!==m?(G=o==="errors"&&l.jsx(je,{tool:"THREAD_ANALYTICS_ERRORS",org:a,from:g,to:m}),t[82]=g,t[83]=a,t[84]=o,t[85]=m,t[86]=G):G=t[86];let W;t[87]!==G?(W=l.jsx(re,{value:"errors",children:G}),t[87]=G,t[88]=W):W=t[88];let Q;t[89]!==C||t[90]!==M||t[91]!==z||t[92]!==W||t[93]!==o?(Q=l.jsxs(De,{value:o,onValueChange:H,children:[C,M,z,W]}),t[89]=C,t[90]=M,t[91]=z,t[92]=W,t[93]=o,t[94]=Q):Q=t[94];let te;return t[95]!==L||t[96]!==B||t[97]!==Q?(te=l.jsx(se.Content,{children:l.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:l.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 py-6 sm:px-8 sm:py-8",children:[L,B,Q]})})}),t[95]=L,t[96]=B,t[97]=Q,t[98]=te):te=t[98],te}function it(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function nt(){return Date.now()}export{dl as default};
@@ -1 +0,0 @@
1
- import{c as R,d as U,a5 as T,b as E,at as k,W as M,j as e,aO as z,x as D,B as w,r as S,R as I,D as F,aP as A,aQ as L,T as B,V as K,K as Q,e as O,E as b,u as W,aR as G,O as H}from"./index-DEZ1imMJ.js";import{a as q}from"./chat-context-PvP_Q1CV.js";import{T as Y}from"./thread-intent-DuI80508.js";import{s as $,n as J}from"./site-url-en5df9c-.js";import{r as V}from"./use-reports-diagnostic-0n4ScjpC.js";import{u as X}from"./use-mcp-client-DJjkIlNp.js";import{i as N}from"./LinkBroken01-loTkm0G5.js";import{a as Z}from"./use-organization-settings-bWX185lw.js";import{C as tt,a as et}from"./companion-mcps-section-BKP3xr1j.js";import{C as ot,a as rt}from"./connect-layout-DUesEwTl.js";import{p as C}from"./self-tool-result-8OxPN9Nm.js";import"./autosend-B0POegpm.js";import"./thread-route-B-uAlF3E.js";import"./use-project-scope-pwqcjGo8.js";import"./repository-binding-C0msapZZ.js";import"./use-entitlements-DidlVdLU.js";import"./use-ai-providers-DwpUgHpj.js";import"./use-decopilot-events-C_C16-Ln.js";import"./watch-sse-pool-DhoYakYc.js";import"./task-board-D3wT6_aG.js";import"./schema-9jBUPMLq.js";import"./delay-CnY5UFtP.js";import"./companions-core-DhUD88pR.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-C58hYmYC.js";import"./auth-CQxDIkM-.js";import"./use-connect-companion-CowVgnp9.js";import"./integration-icon-CFHOt7sY.js";import"./agent-icon-CTbTFMnU.js";import"./AlertCircle-Co3RPbIZ.js";import"./Tool01-Bo2g-Ylw.js";import"./ArrowUp-DLnkUu9S.js";import"./ArrowLeft-XBSBGQal.js";import"./ShoppingBag01-zloi0TDl.js";import"./Globe04-D17A2x5l.js";import"./CheckCircle-kNwBDDVU.js";import"./ChevronUp-D1T3kSyr.js";import"./ChevronSelectorVertical-Gg7YcxlH.js";import"./UserSquare-Qd-FKVqK.js";import"./CreditCard01-D65BAIaV.js";import"./SwitchHorizontal01-elXb4-4d.js";import"./Key01-awxHKnoL.js";import"./Minus-CYrsmoRb.js";import"./Monitor01-DalIAdj7.js";import"./Sun-C1lyqton.js";import"./Play-C6Weq-wk.js";import"./Plus-D7X8Q2-q.js";import"./SearchMd-e6xPeRPD.js";import"./Trash01-C-PU5Hm-.js";import"./Upload01-NPnXKs-J.js";import"./Users01-CTNixqdX.js";import"./XClose-BuJ6u6eL.js";import"./Zap-pmN7zSOE.js";import"./tooltip-Dam-ym8O.js";import"./index-DsbWutG1.js";import"./form-gd_hA5VT.js";import"./label-BEWDSeNl.js";import"./icon-button-Ze0c1pwp.js";import"./use-debounced-value-yZdJ1f2K.js";import"./useQueries-B3iHMIbL.js";import"./authenticate-and-persist-oauth-o7XKLq_6.js";import"./mcp-oauth-CHmbtYyN.js";import"./mcp-oauth-BBT3ip6Z.js";import"./track-Dj7QHX2C.js";import"./extract-connection-data-hvaA6rrK.js";import"./connection-giFDA0-u.js";import"./url-slug-BMHzx0XY.js";function nt(o){const t=R.c(21),{siteUrl:a}=o,r=U(),{org:s}=T(),n=E();let l;t[0]!==r||t[1]!==s?(l=()=>{localStorage.setItem(k.sidebarOpen(),JSON.stringify(!1));const x=V(s,M.REPORTS(s.id));r({...x,search:{...x.search,sidepanel:!1}})},t[0]=r,t[1]=s,t[2]=l):l=t[2];const i=l;let h;t[3]===Symbol.for("react.memo_cache_sentinel")?(h=e.jsx(z,{className:"bg-black/15 backdrop-blur-sm"}),t[3]=h):h=t[3];let m;t[4]!==n?(m=n("routes.reportsOnboarding.connectModal.dialogTitle"),t[4]=n,t[5]=m):m=t[5];let c;t[6]!==m?(c=e.jsx(D,{className:"sr-only",children:m}),t[6]=m,t[7]=c):c=t[7];let f;t[8]!==i||t[9]!==n?(f=()=>e.jsxs("div",{className:"grid gap-4 p-6",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:n("routes.reportsOnboarding.connectModal.loadError")}),e.jsxs(w,{type:"button",size:"xl",className:"w-full",onClick:i,children:[n("routes.reportsOnboarding.connectModal.continueButton"),e.jsx(N,{size:18})]})]}),t[8]=i,t[9]=n,t[10]=f):f=t[10];let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_=e.jsx(tt,{}),t[11]=_):_=t[11];let u;t[12]!==i||t[13]!==a?(u=e.jsx(S.Suspense,{fallback:_,children:e.jsx(lt,{siteUrlFromUrl:a,onComplete:i})}),t[12]=i,t[13]=a,t[14]=u):u=t[14];let d;t[15]!==f||t[16]!==u?(d=e.jsx(I,{fallback:f,children:u}),t[15]=f,t[16]=u,t[17]=d):d=t[17];let y;return t[18]!==c||t[19]!==d?(y=e.jsx(F,{open:!0,children:e.jsxs(A,{children:[h,e.jsxs(L,{"data-slot":"connect-modal",onEscapeKeyDown:st,onPointerDownOutside:it,onInteractOutside:at,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-soft duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[c,d]})]})}),t[18]=c,t[19]=d,t[20]=y):y=t[20],y}function at(o){return o.preventDefault()}function it(o){return o.preventDefault()}function st(o){return o.preventDefault()}function lt({siteUrlFromUrl:o,onComplete:t}){const a=E(),{org:r}=T(),s=M.REPORTS(r.id),n=X({connectionId:B,orgId:r.id,orgSlug:r.slug}),i=K({queryKey:Q.reportsConnection(r.id,s),queryFn:async()=>{const p=await n.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:s}});return C(p)},retry:!1}).data.item,h=typeof i?.metadata?.siteUrl=="string"?i.metadata.siteUrl:void 0,m=o||h,c=$(m),[f,_]=S.useState(!0),[u,d]=S.useState(null),y=O({mutationFn:async p=>C(await n.callTool({name:"REPORTS_SETUP",arguments:{siteUrl:p}})),retry:!1}),x=O({mutationFn:async p=>C(await n.callTool({name:"REPORTS_RUN",arguments:{siteUrl:p}})),retry:!1}),j=async()=>{d(null),b("commerce_onboarding_open_report_clicked",{domain:c??void 0,organization_id:r.id});const p=m?J(m):null;if(p?.ok)try{let g=await x.mutateAsync(p.value);if(g.triggered||(b("commerce_onboarding_run_reclaim",{domain:c??void 0,organization_id:r.id,reason:g.reason??"not_upgraded"}),await y.mutateAsync(p.value),g=await x.mutateAsync(p.value)),!g.triggered){b("commerce_onboarding_run_failed",{domain:c??void 0,organization_id:r.id,error:g.reason??"not_triggered"}),d(a("routes.reportsOnboarding.connectModal.couldNotGenerateReport"));return}}catch(g){b("commerce_onboarding_run_failed",{domain:c??void 0,organization_id:r.id,error:g instanceof Error?g.message:String(g)}),d(a("routes.reportsOnboarding.connectModal.somethingWentWrong"));return}t()},P=Z("demo_mode"),v=f||P;return e.jsx(ot,{siteHost:c,footer:e.jsxs(e.Fragment,{children:[u?e.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:u}):null,e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx(rt,{ready:v,pending:x.isPending,label:x.isPending?a("routes.reportsOnboarding.connectModal.openingReport"):a("routes.reportsOnboarding.connectModal.viewDiagnostic"),onClick:()=>{j()},children:e.jsx(N,{size:18})})}),v?null:e.jsx(w,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 py-3 text-base font-medium leading-tight",disabled:x.isPending,onClick:()=>{j()},children:a("routes.reportsOnboarding.connectModal.skip")})]})]}),children:e.jsx(et,{org:r,cdConnectionId:s,siteUrl:m,onReadinessChange:_})})}function Se(){const o=R.c(7);let t;o[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},o[0]=t):t=o[0];const a=W(t),r="connect"in a&&a.connect==="1",s="siteUrl"in a&&typeof a.siteUrl=="string"?a.siteUrl:void 0;let n;o[1]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx(G,{children:e.jsx(H,{})}),o[1]=n):n=o[1];let l;o[2]!==r||o[3]!==s?(l=r&&e.jsx(nt,{siteUrl:s}),o[2]=r,o[3]=s,o[4]=l):l=o[4];let i;return o[5]!==l?(i=e.jsx(Y,{children:e.jsxs(q,{children:[n,l]})}),o[5]=l,o[6]=i):i=o[6],i}export{Se as default};
@@ -1 +0,0 @@
1
- import{b as L,q as U,e as V,fL as q,eT as J,eU as W,K as A,f3 as G,f7 as Y,t as D,bn as z,bm as g,bo as X,bp as Z,hD as $,bu as I,hE as ee,fJ as te}from"./index-DEZ1imMJ.js";import{u as ne,U as oe,ae as R,ab as se,X as re,Y as ae,a9 as ce,aU as S,aT as P,a8 as ie,ad as le,aB as ue,ac as fe}from"./site-editor-toast-Cgezu0A5.js";import{c as de,b as pe,E as ye,F as he,G as me,I as be,f as ke,J as Oe,d as we}from"./hosted-reconcile-DNkBVm-1.js";import{j as Ce,aa as Ee}from"./blocks-tab-states-BRjgrPty.js";import{a as je}from"./use-move-blocks-CC1C41-K.js";function ge(n,u){const d=(n.deletes??[]).filter(i=>!Object.hasOwn(n.writes,i)),p=[...Object.keys(n.writes),...d],o={},b=[];for(const i of p){const O=u(i);O===void 0?b.push(i):o[i]=O}return b.length>0?{kind:"unread",blockKeys:b}:{kind:"apply",patch:{set:n.writes,...d.length>0?{delete:d}:{}},ifMatch:o}}function ve(n,u){const d=u.pointer.split("/").slice(1).map(b=>b.replaceAll("~1","/").replaceAll("~0","~")),p=Ee(d[0]),o=d[1];return!p||o===void 0?u:p==="experiments"?{...u,label:n("sectionsEditor.formConflict.ruleExperiment",{name:o}),phrase:n("sectionsEditor.formConflict.ruleExperimentPhrase",{name:o})}:{...u,label:n("sectionsEditor.formConflict.ruleCampaign",{name:o}),phrase:n("sectionsEditor.formConflict.ruleCampaignPhrase",{name:o}),mine:T(u.mine,d.length),theirs:T(u.theirs,d.length)}}function T(n,u){return u===3?ee(n)??n:u===2&&n&&typeof n=="object"?te(n)??n:n}function Ke(n){return{type:"object",properties:{experiments:{type:"object",title:n("thread.publishPopover.abTests")},campaigns:{type:"object",title:n("thread.publishPopover.campaignDates")}}}}function De(n){return new J(W.Conflict,"not read yet",{entries:Object.fromEntries(n.map(u=>[u,{expected:null,actual:null}]))})}function Se({orgSlug:n,virtualMcpId:u,branch:d}){const p=L(),o=U(),b=ne(u,d),i=b.kind==="protocol"?b:null,O=i?.source==="github",m=oe({orgSlug:n,virtualMcpId:u,branch:d}),w={orgSlug:n,virtualMcpId:u,branch:d},C=A.decofile(m),B=V({mutationKey:ae(n,u,d),scope:re(n,u,d),mutationFn:async e=>{const c=[...Object.keys(e.writes),...e.deletes.filter(t=>!Object.hasOwn(e.writes,t))],r={};for(const t of c){const s=Object.hasOwn(e.pinned,t)?e.pinned[t]:R(o,m,t,i);r[t]=await F(s,t,e.copies)}const a=ge(e,t=>r[t]);if(a.kind==="unread")throw De(a.blockKeys);return se(o,i,w,m,a.patch,a.ifMatch)}}),Q=async(e,c)=>{for(const r of e)await fe(o,i,w,m,r,c);return D.info(p("sectionsEditor.namedRules.changedMeanwhile"),{...P,description:p("sectionsEditor.namedRules.changedMeanwhileHint")}),{ok:!1,reason:"changed"}},v=async(e,c,r,a)=>{const t=await _(e,c,r,a);if(O&&!(!t.ok&&t.reason==="unavailable")){const s=de(w),l=[...Object.keys(e.writes),...e.deletes];X.schedule(()=>{for(const y of l)pe(s,y)})}return t},_=async(e,c,r,a)=>{const t=[...Object.keys(e.writes),...e.deletes];if(r>=we||!Z())return Q(t,a);const s=i&&ue(o,i,m,a)?o.getQueryData(C)??{}:await K({blocks:t});if(!s)return D.info(p("sectionsEditor.namedRules.unavailable"),{...P,description:p("sectionsEditor.namedRules.unavailableHint")}),{ok:!1,reason:"unavailable"};const l=ye(t,c,e,s),y=l.pointers.length===0?{}:await he(l,Ke(p),{author:(()=>{const h=i?$(i,w):null,E=me(l.pointers[0]??"");return h&&E?{draft:h,blockKey:E}:null})()},h=>ve(p,h)),k=l.pointers.length===0?l.merged:I(l,y),f=be(t,k,s);return ke(y)&&Oe(f,s)?{ok:!0,keptTheirs:!0}:x(f,r+1)},H=e=>x(e,0),x=async(e,c)=>{if(!i)return D.info(p("sectionsEditor.namedRules.unavailable"),{...P,description:p("sectionsEditor.namedRules.unavailableHint")}),{ok:!1,reason:"unavailable"};const r=i.source==="github"?e.writes:z(e.writes),a=(e.deletes??[]).filter(f=>!Object.hasOwn(r,f)),t=[...Object.keys(r),...a];if(t.length===0)return{ok:!0};const s=o.getQueryData(C),l=O?M(e.basis,s):null;if(l)return v({writes:r,deletes:a},l,c);const y=await N(t,s);if(!y)return v({writes:r,deletes:a},s,c);const k=new Map;for(const f of t)s&&Object.hasOwn(s,f)&&k.set(f,s[f]);o.setQueryData(C,f=>je(f,{writes:r,deletes:a})),o.cancelQueries({queryKey:C});try{const f={};for(const h of t)s&&Object.hasOwn(s,h)&&(f[h]=s[h]);return await B.mutateAsync({writes:r,deletes:a,pinned:y,copies:f}),{ok:!0}}catch(f){return o.setQueryData(C,h=>{if(!h)return h;const E={...h};for(const j of t)k.has(j)?E[j]=k.get(j):delete E[j];return E}),ie(f)?v({writes:r,deletes:a},s,c,f):(le(p,f instanceof Error?f:new Error(String(f)),i.source),{ok:!1,reason:"failed"})}},M=(e,c)=>{if(!e||!Object.keys(e).some(t=>g(e[t]??null)!==g(c?.[t]??null)))return null;const a={...c};for(const[t,s]of Object.entries(e))s===void 0?delete a[t]:a[t]=s;return a},F=async(e,c,r)=>!O||!Object.hasOwn(r,c)?e:q(e,r[c]),N=async(e,c)=>{const r=S(o,w),a={},t=[];for(const l of e){if(r.has(l))continue;const y=R(o,m,l,i);y===void 0?t.push(l):a[l]=y}if(t.length===0)return a;const s=await K({blocks:t});if(!s)return null;for(const l of t){const y=!!c&&Object.hasOwn(c,l);if(y!==Object.hasOwn(s,l)||y&&g(s[l])!==g(c[l]))return null;const k=R(o,m,l,i);if(k===void 0)return null;a[l]=k}return a},K=async(e={})=>{if(!i)return null;try{const c=await ce(o,i,w,m);if(!i.hosted)return c.blocks;const r=o.getQueryData(A.contentIndex(m));return await G(o,i.hosted,m,[...Ce,...e.blocks??[]],S(o,w)),Y(r,o.getQueryData(C)??c.blocks)}catch{return null}};return{apply:H,reread:K,isPending:B.isPending,holdsCopy:O}}export{Se as u};
@@ -1 +0,0 @@
1
- import{c as r}from"./index-DEZ1imMJ.js";import{b as a}from"./chat-context-PvP_Q1CV.js";import{g as i}from"./shell-layout-BLRNx2fV.js";function u(){const t=r.c(3),{sendMessage:s}=a(),{openSidePanel:o}=i();let e;return t[0]!==o||t[1]!==s?(e=n=>{o(),s({parts:[{type:"text",text:n}]})},t[0]=o,t[1]=s,t[2]=e):e=t[2],e}export{u};
@@ -1 +0,0 @@
1
- import{c as s,e0 as c}from"./index-DEZ1imMJ.js";import{u}from"./repository-binding-C0msapZZ.js";function a(e){return c(e?.metadata)}function l(e){const t=s.c(2),r=u(e);let o;return t[0]!==r?(o=a(r),t[0]=r,t[1]=o):o=t[1],o}export{a as b,l as u};
@@ -1 +0,0 @@
1
- import{c as f,a5 as C,T as N,ej as S,em as T,ek as p,ei as A,i as v}from"./index-DEZ1imMJ.js";import{u as I,a as E}from"./use-mcp-client-DJjkIlNp.js";function P(t){const i=f.c(20);let o;i[0]!==t?(o=t===void 0?{}:t,i[0]=t,i[1]=o):o=i[1];const l=o;let n,e,u,s;i[2]!==l?({binding:n,includeVirtual:u,slug:s,...e}=l,i[2]=l,i[3]=n,i[4]=e,i[5]=u,i[6]=s):(n=i[3],e=i[4],u=i[5],s=i[6]);let c;i[7]!==n||i[8]!==e.additionalToolArgs||i[9]!==u||i[10]!==s?(c={...e.additionalToolArgs},n!==void 0&&(c.binding=n),u!==void 0&&(c.include_virtual=u),s!==void 0&&(c.slug=s),i[7]=n,i[8]=e.additionalToolArgs,i[9]=u,i[10]=s,i[11]=c):c=i[11];let g;i[12]!==c?(g=Object.keys(c).length>0?c:void 0,i[12]=c,i[13]=g):g=i[13];let r;i[14]!==e||i[15]!==g?(r={...e,additionalToolArgs:g},i[14]=e,i[15]=g,i[16]=r):r=i[16];const O=r,{org:d}=C();let a;i[17]!==d.id||i[18]!==d.slug?(a={connectionId:N,orgId:d.id,orgSlug:d.slug},i[17]=d.id,i[18]=d.slug,i[19]=a):a=i[19];const m=I(a);return S(d.id,"CONNECTIONS",m,O)}function _(t){const i=f.c(3),{org:o}=C();let l;i[0]!==o.id||i[1]!==o.slug?(l={connectionId:N,orgId:o.id,orgSlug:o.slug},i[0]=o.id,i[1]=o.slug,i[2]=l):l=i[2];const n=I(l);return p(o.id,"CONNECTIONS",t,n)}function $(t){const i=f.c(10),{org:o}=C();let l;i[0]!==o.id||i[1]!==o.slug?(l={connectionId:N,orgId:o.id,orgSlug:o.slug},i[0]=o.id,i[1]=o.slug,i[2]=l):l=i[2];const n=E(l);let e;i[3]!==n||i[4]!==t||i[5]!==o.id?(e=A(o.id,"CONNECTIONS",t,n),i[3]=n,i[4]=t,i[5]=o.id,i[6]=e):e=i[6];const u=!!n&&!!t;let s;i[7]!==e||i[8]!==u?(s={...e,enabled:u},i[7]=e,i[8]=u,i[9]=s):s=i[9];const{data:c}=v(s);return c?.item??null}function j(){const t=f.c(3),{org:i}=C();let o;t[0]!==i.id||t[1]!==i.slug?(o={connectionId:N,orgId:i.id,orgSlug:i.slug},t[0]=i.id,t[1]=i.slug,t[2]=o):o=t[2];const l=I(o);return T(i.id,"CONNECTIONS",l)}export{_ as a,j as b,$ as c,P as u};
@@ -1 +0,0 @@
1
- import{c as i,q as y}from"./index-DEZ1imMJ.js";import{u as f,U as m}from"./site-editor-toast-Cgezu0A5.js";function K(l){const e=i.c(11),r=y(),{orgSlug:n,virtualMcpId:c,branch:t}=l,u=f(c,t);let o;e[0]!==t||e[1]!==n||e[2]!==c?(o=t?{orgSlug:n,virtualMcpId:c,branch:t}:null,e[0]=t,e[1]=n,e[2]=c,e[3]=o):o=e[3];const a=m(o)||null;let s;return e[4]!==u||e[5]!==t||e[6]!==n||e[7]!==r||e[8]!==a||e[9]!==c?(s={queryClient:r,orgSlug:n,virtualMcpId:c,branch:t,backend:u,cacheKey:a},e[4]=u,e[5]=t,e[6]=n,e[7]=r,e[8]=a,e[9]=c,e[10]=s):s=e[10],s}export{K as u};
@@ -1 +0,0 @@
1
- import{c as s}from"./index-DEZ1imMJ.js";import{u as v,G as g,ay as h,aM as b,aN as P,aO as S,M}from"./site-editor-toast-Cgezu0A5.js";import{u as w}from"./use-voice-input-BKZpbbiI.js";function d(e){const t=s.c(3),u=w(e?.virtualMcpId).runtime==="cms",l=v(e?.virtualMcpId,e?.branch),o=l.kind==="protocol"&&l.source==="github",n=b(e),c=P(o?e:null);if(!e||!u)return null;if(o)return c;let i;return t[0]!==n||t[1]!==e?(i=n?S({...e,...n}):null,t[0]=n,t[1]=e,t[2]=i):i=t[2],i}function U(e){const t=s.c(3),u=d(e),l=v(e.virtualMcpId,e.branch),o=l.kind==="protocol"&&l.source==="github";let n;t[0]!==e.orgSlug||t[1]!==e.virtualMcpId?(n=g(e.orgSlug,e.virtualMcpId),t[0]=e.orgSlug,t[1]=e.virtualMcpId,t[2]=n):n=t[2];const c=h(n,o?u:null);return o?c:u}function R(e){const t=s.c(11);let u;t[0]!==e?(u=e?{orgSlug:e.orgSlug,virtualMcpId:e.virtualMcpId,branch:e.branch}:null,t[0]=e,t[1]=u):u=t[1];const l=d(u),o=e?.previewServerUrl??null;let n=null;if(o)try{let f;t[2]!==o?(f=new URL(o),t[2]=o,t[3]=f):f=t[3],n=f.host}catch{n=null}let c;t[4]!==l||t[5]!==e||t[6]!==o?(c=e&&o&&l?M(new URL(e.path,o).toString(),l):null,t[4]=l,t[5]=e,t[6]=o,t[7]=c):c=t[7];const i=c;let r;return t[8]!==n||t[9]!==i?(r={url:i,host:n},t[8]=n,t[9]=i,t[10]=r):r=t[10],r}export{d as a,U as b,R as u};
@@ -1 +0,0 @@
1
- import{c as Ee,b as He,u as Le,a5 as Oe,h0 as Be,h1 as Ke,h2 as le,h3 as de,aj as $e,ah as me,h4 as Qe,h5 as We,r as Y,eQ as _e,U as pe,h6 as qe,h7 as ze}from"./index-DEZ1imMJ.js";import{a as Ge}from"./use-chat-layout-state-BG2-xqQp.js";import{b as Je}from"./agent-icon-CTbTFMnU.js";import{i as Xe}from"./Monitor01-DalIAdj7.js";import{u as Ye}from"./use-connection-BozgIoMu.js";import{a as Ze}from"./use-mcp-client-DJjkIlNp.js";import{u as et}from"./use-mcp-tools-wfurU0oX.js";import{u as tt}from"./repository-binding-C0msapZZ.js";import{g as at}from"./types-gyofjZHf.js";import{t as ot}from"./utils-CVEq3hMx.js";import{a as D}from"./agent-capabilities-BGShibnD.js";import"./index-_l1iac4T.js";import{u as nt}from"./use-sandbox-events-D1_GHzsF.js";import{F as ue}from"./file-type-icon-DM9o0Fkb.js";import{a as st,u as it}from"./autosend-B0POegpm.js";import{r as Z}from"./resolve-tab-icon-BWeUUKzK.js";import{u as ct}from"./use-task-metadata-D4kXdUwO.js";import{r as rt}from"./preview-source-BsRLGWUP.js";import{i as lt,p as dt,s as mt}from"./shell-layout-BLRNx2fV.js";import{u as pt}from"./use-voice-input-BKZpbbiI.js";import{u as ut}from"./use-organization-settings-bWX185lw.js";import{a as ft}from"./use-project-scope-pwqcjGo8.js";import{c as bt,u as Tt,d as It,e as vt,f as ht}from"./use-project-native-view-presence-DhhbOsoh.js";import{c as Pt}from"./chat-context-PvP_Q1CV.js";import{r as yt}from"./virtual-mcp-vRvxAZ15.js";function Xt(o){const e=Ee.c(35),d=He(),{openPanel:f,closePanel:R}=st();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={strict:!1},e[0]=b):b=e[0];const fe=Le(b),ee=it(),te=Ge(),i=tt(o.virtualMcpId),T=ct(o.taskId),{org:n}=Oe(),{currentBranch:be,activeTask:I}=Pt(),m=i?.metadata.ui?.layout??null,c=m?.tabs??[],r=i?.id?Be(i.id):null,v=T?.expanded_tools??[],h=ut(),{scopeId:Te,project:Ie}=ft(),F=bt(Te,Ie,i),U=Tt(F.project),ae=It(F.resolvedScopeId,D(F.project?.metadata),U.presence);let P;e[1]===Symbol.for("react.memo_cache_sentinel")?(P={includeVirtual:!0},e[1]=P):P=e[1];const p=Ye(P),ve=nt(),x=I?.branch??be;let y;e[2]!==I?.metadata||e[3]!==o.taskId||e[4]!==i?.metadata||e[5]!==T||e[6]!==x?(y=rt({threadId:o.taskId,sandboxBranch:x,agentHasRepo:D(i?.metadata),threadHasRepo:D(T)||D(I?.metadata)}),e[2]=I?.metadata,e[3]=o.taskId,e[4]=i?.metadata,e[5]=T,e[6]=x,e[7]=y):y=e[7];const he=y,E=ve.lifecycle.phase==="running",{runtime:Pe,resolved:oe}=pt(o.virtualMcpId),H=!!r&&E;let k;e[8]!==H?(k={enabled:H},e[8]=H,e[9]=k):k=e[9];const ne=Ze({connectionId:r,orgId:n.id,orgSlug:n.slug},k),L=ne,O=!!ne&&E;let w;e[10]!==L||e[11]!==O?(w={client:L,enabled:O},e[10]=L,e[11]=O,e[12]=w):w=e[12];const{data:ye}=et(w),se=r&&E?(ye?.tools??[]).filter(Vt).map(t=>({connectionId:r,toolName:t.name,label:ot(t.name),icon:null})):[],B=se[0],ke=B?se:[],u=B&&r?{type:"ext-apps",id:r,toolName:B.toolName}:m?.defaultMainView??null,we=yt(m),ie={assets:U.assetsPending,siteAccess:U.siteAccessPending},{activeTab:g,mainOpen:l}=Ke({panelTabId:ee,mainPanelParam:fe.mainpanel,routeDefaultMain:te,metadata:u||m?{defaultMainView:u,tabs:c.map(gt)}:null}),ge=u||m?{defaultMainView:u,tabs:c.map(wt)}:null,V=dt({hasSource:he==="repo"||h,runtime:Pe,cmsMode:we}),Ve=V.includes("content"),Ce=le(ge),Me=u?.type,ce=vt(Me,ae,ie,V,oe),K=ce?le(null):Ce,Se=ht(g,ae,ie),Ne=!V.includes("code")&&oe&&de(g)!==null,a=!ee&&!te&&ce||g==="content"&&!Ve||Ne||Se?K:g,$=$e(a);let C;e[13]!==d?(C=t=>d(t==="site-editor"?"common.mainPanelTabs.preview":t==="content"?"common.mainPanelTabs.content":"common.mainPanelTabs.code"),e[13]=d,e[14]=C):C=e[14];const je=C,Q=new Map;for(const t of v){const s=me(t.appId,t.toolName);Q.set(s,{id:s,title:t.toolName,appId:t.appId,iconKey:t.toolName})}for(const t of ke){if(t.toolName==="fetch_assets")continue;const s=me(t.connectionId,t.toolName);Q.set(s,{id:s,title:t.label||t.toolName,appId:t.connectionId,iconKey:t.toolName,iconUrl:t.icon??null})}const W=Qe(a),_=W?W.key.split("/").pop()??W.key:null,Ae=_?[{id:a,title:_,kind:"file",icon:{kind:"component",Component:t=>Y.createElement(ue,{filename:_,...t})}}]:[],M=We(a),De=M?[{id:a,title:(M.path.split("/").pop()??M.path).replace(/\.html$/i,""),kind:"file",icon:{kind:"component",Component:t=>Y.createElement(M.path.startsWith("pages/")?Je:Xe,t)}}]:[],q=_e(a),z=q?q.path.split("/").pop()??q.path:null,Re=z?[{id:a,title:z,kind:"file",icon:{kind:"component",Component:t=>Y.createElement(ue,{filename:z,...t})}}]:[],Fe=lt(a)?V.map(t=>({id:t==="code"&&de(a)?a:t,title:je(t),kind:"system",icon:Z({tabId:t,kind:"system",connections:p})})):[];let S;e[15]!==p?(S=t=>({id:qe(t.id),title:t.title,kind:"agent",icon:Z({tabId:t.id,kind:"agent",appId:t.view.appId,connections:p})}),e[15]=p,e[16]=S):S=e[16];const Ue=[...Fe,...Ae,...De,...Re,...c.map(S),...Array.from(Q.values()).map(t=>({id:t.id,title:t.title,kind:"expanded",icon:Z({tabId:t.iconKey,kind:"expanded",appId:t.appId,iconUrl:t.iconUrl,connections:p})}))],re=new Set,G=Ue.filter(t=>re.has(t.id)?!1:(re.add(t.id),!0)),xe=o.virtualMcpId;let N;e[17]!==n.id?(N=pe(n.id),e[17]=n.id,e[18]=N):N=e[18];const J=xe===N;let j;e[19]!==a||e[20]!==R||e[21]!==l||e[22]!==J||e[23]!==f||e[24]!==n.id||e[25]!==h?(j=t=>{if(mt({reportsOnly:h,onReportAgent:J,tabId:t})){f(t,{virtualmcpid:pe(n.id),search:kt});return}const s=ze({clickedId:t,activeTab:a,mainOpen:l});"close"in s?R():f(s.tabId)},e[19]=a,e[20]=R,e[21]=l,e[22]=J,e[23]=f,e[24]=n.id,e[25]=h,e[26]=j):j=e[26];const X=j;let A;return e[27]!==a||e[28]!==$||e[29]!==v||e[30]!==c||e[31]!==l||e[32]!==X||e[33]!==G?(A={activeTab:a,mainOpen:l,setActiveTab:X,layoutTabs:c,expandedTools:v,automationTabParsed:$,tabs:G},e[27]=a,e[28]=$,e[29]=v,e[30]=c,e[31]=l,e[32]=X,e[33]=G,e[34]=A):A=e[34],A}function kt(o){return{...o,thread:void 0}}function wt(o){return{id:o.id}}function gt(o){return{id:o.id}}function Vt(o){return!!at(o._meta)}export{Xt as u};
@@ -1 +0,0 @@
1
- import{q as x,b as j,e as v,K as b,bn as B}from"./index-DEZ1imMJ.js";import{u as H}from"./use-voice-input-BKZpbbiI.js";import{o as U,c as A,u as F,U as J,ab as N,Z as R,X as S,Y as W,a4 as z,a5 as L,a6 as Y,a8 as G,aA as X,ah as Z,ag as _,q as C,$ as D}from"./site-editor-toast-Cgezu0A5.js";import{s as $}from"./sandbox-git-api-DcqI6XE4.js";import{u as g}from"./chat-context-PvP_Q1CV.js";import{z as V,H as M}from"./hosted-reconcile-DNkBVm-1.js";import{b as O}from"./sandbox-url-D3mC8qhT.js";import{d as Q}from"./utils-BbEfYi1l.js";function fe({orgSlug:i,virtualMcpId:t,branch:o}){const s=x(),y=g()?.taskId??null,P=U(t),T=H(t).runtime==="cms",{url:q}=A(t),k=F(t,o),f=k.kind==="protocol"?k:null,d=J({orgSlug:i,virtualMcpId:t,branch:o}),m=b.decofile(d),K=j(),E=async(r,c)=>{if(q)return{ok:!0};if(T){const a=await Z({orgSlug:i,virtualMcpId:t,branch:o},{set:r,delete:c});return _(s,{orgSlug:i,virtualMcpId:t,branch:o},a),await s.invalidateQueries({queryKey:$({orgSlug:i,virtualMcpId:t,branch:o,threadId:y})}),a}const u={orgSlug:i,virtualMcpId:t,branch:o,threadId:y};for(const[a,n]of Object.entries(r)){const e=await fetch(O(u,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:C(P,Q(a)),content:JSON.stringify(n,null,2)})});if(!e.ok)return D(e,"Write")}for(const a of c){const n=await fetch(O(u,"unlink"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:C(P,Q(a))})});if(!n.ok)return D(n,"Delete")}return{ok:!0}},p=v({mutationKey:W(i,t,o),scope:S(i,t,o),mutationFn:async({writes:r,deletes:c,copies:u,shown:a})=>{const n=f?.source==="github"?r:B(r);return f?.source==="github"?V({queryClient:s,backend:f,params:{orgSlug:i,virtualMcpId:t,branch:o},cacheKey:d},{writes:n,deletes:c.filter(e=>!(e in n))},u,a?.()):f?N(s,f,{orgSlug:i,virtualMcpId:t,branch:o},d,{set:n,delete:c.filter(e=>!(e in n))}):R({queryClient:s,orgSlug:i,virtualMcpId:t,branch:o,backend:k,cacheKey:d},{kind:"edit",write:()=>E(n,c)})},onSuccess:()=>{f?.source!=="github"&&s.invalidateQueries({queryKey:b.liveMeta(i,t,o)})}});return{move:async(r,c)=>{const u=[...Object.keys(r.writes),...r.deletes],a=s.getQueryData(m),n=new Map;for(const e of u)a&&e in a&&n.set(e,a[e]);s.setQueryData(m,e=>I(e,r)),s.cancelQueries({queryKey:m});try{return await p.mutateAsync({...r,copies:a,shown:c?.shown})}catch(e){throw e instanceof M?(z(K,e.deleted,e.deleted&&r.deletes.length>0&&r.deletes.every(l=>L(s,d,l))),e):(Y(K,e),f?.source==="github"&&(G(e)||e instanceof X)||s.setQueryData(m,l=>{if(!l)return l;const w={...l};for(const h of u)n.has(h)?w[h]=n.get(h):delete w[h];return w}),e)}},isPending:p.isPending,isError:p.isError}}function I(i,{writes:t,deletes:o}){const s={...i??{},...t};for(const y of o)y in t||delete s[y];return s}export{I as a,fe as u};
@@ -1,2 +0,0 @@
1
- import{c as fe,j as Y,r as a,a5 as he,q as Ee,K as C,dd as G,a3 as pe}from"./index-DEZ1imMJ.js";import{i as ve,u as Se}from"./chat-context-PvP_Q1CV.js";import{b as ge}from"./sandbox-url-D3mC8qhT.js";import{u as ye}from"./repository-binding-C0msapZZ.js";function J(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const me={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},I=a.createContext(me),W=16384;class be{data="";append(e){this.data+=e,this.data.length>W&&(this.data=this.data.slice(this.data.length-W))}get(){return this.data}clear(){this.data=""}}const De=1e3,Re=3e4,Te=3e3,z=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],X="log";function ke(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function xe(t){return t===404}async function Ce(t){try{const e=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Te)});return await e.body?.cancel().catch(()=>{}),xe(e.status)}catch{return!1}}const Z=ve(I);function Ke(t){const e=fe.c(10);let i,f,c;e[0]!==t?({resetKey:c,children:i,...f}=t,e[0]=t,e[1]=i,e[2]=f,e[3]=c):(i=e[1],f=e[2],c=e[3]);let o;e[4]!==f||e[5]!==c?(o=Y.jsx(Le,{...f},c),e[4]=f,e[5]=c,e[6]=o):o=e[6];let h;return e[7]!==i||e[8]!==o?(h=Y.jsx(Z.Host,{source:o,children:i}),e[7]=i,e[8]=o,e[9]=h):h=e[9],h}function Le(t){return Z.usePublish(_e(t)),null}function _e({virtualMcpId:t,branch:e,previewUrl:i=null,enabled:f=!0}){const{org:c}=he(),o=Ee(),h=Se()?.taskId??null,[te,L]=a.useState(null),[ne,_]=a.useState({phase:"idle"}),[se,w]=a.useState({state:"running"}),[re,P]=a.useState({kind:"unknown"}),[ae,N]=a.useState(!1),[ce,O]=a.useState([]),[oe,B]=a.useState([]),[,ue]=a.useState(0),v=a.useRef(new Map),K=a.useRef(new Set),R=a.useRef(new Set),A=a.useRef(null),T=ke(i),Q=ye(t)?.metadata?.runtime?.selected==="deno",ie=l=>{let d=v.current.get(l);return d||(d=new be,v.current.set(l,d)),d};return a.useEffect(()=>{if(L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),A.current=null,N(!1),O([]),B([]),v.current.clear(),!t||!e||!f)return;const l=ge({orgSlug:c.slug,virtualMcpId:t,branch:e,threadId:h??null},"events");let d=!1,S=0,k=null,g=null,y=null,p=null,E=null,x=null;const F=()=>{g&&clearTimeout(g),g=setTimeout(()=>{g=null,o.invalidateQueries({queryKey:C.liveMeta(c.slug,t,e)})},1e3)},le=n=>{try{const s=JSON.parse(n.data);L(s),s.kind!=="failed"&&(N(!1),S=0),s.kind==="ready"&&q()}catch(s){console.warn("[vm-events] bad phase payload",s)}},V=()=>{N(!0),L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),O([]),B([]),v.current.clear()},$=n=>{try{const s=JSON.parse(n.data);if(typeof s.data!="string")return;S=0;const u=s.data.replace(/\r?\n/g,`\r
2
- `);ie(s.source).append(u);for(const r of K.current)try{r(s.source,u)}catch{}ue(r=>r+1)}catch{}},j=n=>{const s=n.type;try{const u=JSON.parse(n.data);switch(S=0,s){case"lifecycle":{const r=u;_(r.state);const m=`${c.slug}/${t}/${e}`;if(J(r.state.phase)&&!(x&&J(x))){G(o,c.id);const D=C.decofile(m);o.getQueryData(D)===void 0&&o.invalidateQueries({queryKey:D})}r.state.phase==="running"&&x!=="running"&&(G(o,c.id),o.invalidateQueries({queryKey:C.decofile(m)}),F()),x=r.state.phase;const b=r.state.phase==="running"?r.state.port:null,U=A.current;if(A.current=b,U!==null&&b!==null&&U!==b)for(const D of R.current)try{D()}catch{}return}case"status":w(u);return;case"tasks":{const m=u.active.map(b=>b.logName??"").filter(Boolean);B(m);return}case"scripts":O(u.scripts);return;case"branch":{const r=u.meta;P(r);return}case"reload":for(const r of R.current)try{r()}catch{}return;case"file-changed":{const{path:r}=u,m=`${c.slug}/${t}/${e}`;if(r.startsWith(".deco/")||r.includes("/.deco/")){if(!(x==="running"))return;r.endsWith(".deco/meta.gen.json")&&F(),y&&clearTimeout(y),y=setTimeout(()=>{if(y=null,o.invalidateQueries({queryKey:C.decofile(m)}),Q)for(const D of R.current)try{D()}catch{}},500)}else F();return}}}catch{}};function M(){if(d)return;const n=new EventSource(l);p=n,n.onopen=()=>{},n.onerror=()=>{p===n&&n.readyState===EventSource.CLOSED&&H("studio")},n.addEventListener("phase",le),n.addEventListener("gone",V),n.addEventListener(X,$);for(const s of z)n.addEventListener(s,j)}function q(){if(d||!T||E)return;const n=new EventSource(T);E=n;let s=!1;n.onopen=()=>{if(d||E!==n)return;s=!0,S=0;const u=p;p=null,u?.close()},n.onerror=()=>{E===n&&n.readyState===EventSource.CLOSED&&de(n,s)},n.addEventListener(X,$);for(const u of z)n.addEventListener(u,j)}async function de(n,s){const u=T?await Ce(T):!1;if(!(d||E!==n)){if(n.close(),E=null,u){V(),p||M();return}s&&H("direct")}}function H(n){if(d||k)return;const s=pe(Re,De,S,2,0);S++,k=setTimeout(()=>{if(k=null,!d){if(n==="direct"){E?.close(),E=null,q();return}p?.close(),p=null,M()}},s)}return M(),()=>{d=!0,p?.close(),E?.close(),k&&clearTimeout(k),g&&clearTimeout(g),y&&clearTimeout(y)}},[t,e,c.slug,c.id,f,h,T,o,Q]),{phase:te,lifecycle:ne,status:se,branch:re,notFound:ae,scripts:ce,activeProcesses:oe,getBuffer:l=>v.current.get(l)?.get()??"",hasData:l=>(v.current.get(l)?.get().length??0)>0,subscribeChunks:l=>(K.current.add(l),()=>{K.current.delete(l)}),subscribeReload:l=>(R.current.add(l),()=>{R.current.delete(l)})}}function ee(){return a.use(I)}function Ae(t){const{subscribeChunks:e}=ee(),i=a.useRef(t);i.current=t,a.useEffect(()=>e((o,h)=>{i.current?.(o,h)}),[e])}function Fe(t){const{subscribeReload:e}=ee(),i=a.useRef(t);i.current=t,a.useEffect(()=>e(()=>{i.current?.()}),[e])}export{Ke as S,Ae as a,Fe as b,J as i,ee as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-C0Gb02df.js";import{eu as i}from"./index-DEZ1imMJ.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-C0Gb02df.js";import{eu as s,eB as n}from"./index-DEZ1imMJ.js";function a(e,r){return s({...e,enabled:!0,suspense:!0,throwOnError:n},u,r)}export{a as u};
@@ -1 +0,0 @@
1
- import{ba as C,aG as T,aF as S,a3 as F}from"./index-DEZ1imMJ.js";import{T as O,a as w,b as L,c as N,d as P}from"./task-board-D3wT6_aG.js";const h={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},V=Object.values(h),y="notification.created",H=60,j=100,$=2e3,u=C(T().min(1)).max($),x=S({id:T().min(1).max(64),name:T().trim().min(1).max(H),projectIds:u}),Y=C(x).max(j),K=S({pinned:u,hidden:u,dismissed:u,hiddenFolders:u}),Z={pinned:[],hidden:[],dismissed:[],hiddenFolders:[]};S({folders:Y,preferences:K,joinedAt:T().nullable()});const M="project-folders.updated",v="order-monitor.store.evaluated",ee=["orders_drop","denied_spike","cancel_spike"],X=3e4,q=1e3;function I(n){const{buildUrl:f,eventTypes:p,name:d,crossTab:_=!1}=n,c=new Map,l=_&&typeof BroadcastChannel<"u"&&typeof navigator<"u"&&typeof navigator.locks<"u";if(l&&!d)throw new Error("createSSESubscription: `name` is required when crossTab");function E(e,t){e.bootDone=!0;for(const s of e.handlers)try{s(t)}catch{}}function A(e){for(const t of e.reconnectHandlers)try{t()}catch{}}function D(e){const t=new EventSource(f(e.key));e.es=t,t.onopen=()=>{e.reconnectAttempt=0,e.bootDone&&(A(e),e.channel?.postMessage({kind:"reconnect"})),e.bootDone=!0},t.onerror=()=>{e.es===t&&t.readyState===EventSource.CLOSED&&U(e)};const s=a=>{e.channel?.postMessage({kind:"event",type:a.type,data:a.data}),E(e,a)};for(const a of p)t.addEventListener(a,s)}function U(e){if(e.refCount<=0||e.reconnectTimer)return;const t=F(X,q,e.reconnectAttempt,2,.5);e.reconnectAttempt++,e.reconnectTimer=setTimeout(()=>{e.reconnectTimer=null,!(e.refCount<=0||!e.isLeader)&&(e.es?.close(),D(e))},t)}function m(e){if(e.refCount<=0){e.releaseLeadership?.(),e.releaseLeadership=null;return}e.isLeader=!0,D(e)}function B(e){if(!l){m(e);return}e.lockAbort=new AbortController,navigator.locks.request(`sse-leader:${d}:${e.key}`,{signal:e.lockAbort.signal},()=>new Promise(t=>{e.releaseLeadership=t,m(e)})).catch(()=>{})}function W(e,t){t.kind==="event"?E(e,new MessageEvent(t.type,{data:t.data})):t.kind==="reconnect"&&A(e)}function g(e){const t=c.get(e);if(t)return t;const s={key:e,refCount:0,handlers:new Set,reconnectHandlers:new Set,bootDone:!1,es:null,isLeader:!1,reconnectAttempt:0,reconnectTimer:null,channel:null,lockAbort:null,releaseLeadership:null};if(c.set(e,s),l){const a=new BroadcastChannel(`sse:${d}:${e}`);a.onmessage=r=>W(s,r.data),s.channel=a}return s}function b(e){e.reconnectTimer&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=null),e.es?.close(),e.es=null,e.releaseLeadership?.(),e.releaseLeadership=null,e.lockAbort?.abort(),e.lockAbort=null,e.channel?.close(),e.channel=null,c.delete(e.key)}return{dispose(){for(const e of[...c.values()])b(e)},subscribe(e,t,s){const a=!c.has(e),r=g(e);r.refCount++,r.handlers.add(t),s&&r.reconnectHandlers.add(s),a&&B(r);let R=!1;return()=>{R||(R=!0,r.handlers.delete(t),s&&r.reconnectHandlers.delete(s),r.refCount--,r.refCount<=0&&b(r))}}}}function o(n,f){const p=new Set(f);return{dispose:()=>n.dispose(),subscribe(d,_,c){const l=E=>{p.has(E.type)&&_(E)};return n.subscribe(d,l,c)}}}const k=[...V,O,w,L,N,P,y,M,v],J=k,G=k,i=I({name:"watch",buildUrl:n=>`/api/${encodeURIComponent(n)}/watch?types=${J.join(",")}`,eventTypes:G,crossTab:!0}),te=o(i,[...V]),se=o(i,[O,w]),re=o(i,[L]),ae=o(i,[N]),ne=o(i,[P]),oe=o(i,[y]),ie=o(i,[M]),ce=o(i,[v]),de=I({buildUrl:n=>`/api/${encodeURIComponent(n)}/watch?scope=all&types=${h.THREAD_STATUS}`,eventTypes:[h.THREAD_STATUS]});export{h as D,Z as E,ee as O,H as P,ne as a,ae as b,re as c,te as d,de as e,oe as n,ce as o,ie as p,se as t};