decocms 4.500.7 → 4.500.8

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 (369) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-DHLjYBHG.js → ActiveShapeUtils-QhekdQES.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-BILwGqjV.js → AlertCircle-DVHl2wob.js} +1 -1
  3. package/dist/client/assets/{AreaChart-MBaQ2sXA.js → AreaChart-CzXYdxfM.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-DlRqrbst.js → ArrowLeft-5wXFDAmZ.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CFc2wNu3.js → ArrowUp-DESKNNlf.js} +1 -1
  6. package/dist/client/assets/{BarChart-ip63zVKP.js → BarChart-CrZ82YV4.js} +1 -1
  7. package/dist/client/assets/{Building02-QB_UI3sB.js → Building02-CFiq1p9R.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-CD4E_XC5.js → CategoricalChart-Wv_V3Cf8.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-CG1RvCMD.js → CheckCircle-DAvSmLHO.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-23OZgHQl.js → ChevronSelectorVertical-KK06uLTv.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-BrMcnDd0.js → ChevronUp-Di-YfZWV.js} +1 -1
  12. package/dist/client/assets/{Copy01-QpufVNbj.js → Copy01-CvnGuZZ3.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-W1zS1W7o.js → CreditCard01-CpFAcFMU.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-E-CAHxZx.js → DotsVertical-B8mqV8lL.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-DoXCMhKl.js → ErrorBarContext-CZTgevMW.js} +1 -1
  16. package/dist/client/assets/{Globe04-C2IFbCwJ.js → Globe04-CCXvQu2N.js} +1 -1
  17. package/dist/client/assets/{Image01-D8Dg78Ju.js → Image01-WncLby5J.js} +1 -1
  18. package/dist/client/assets/{Key01-CCpcNn9J.js → Key01-Bhf2mFGP.js} +1 -1
  19. package/dist/client/assets/{Link01-Dw-VkUVV.js → Link01-vjT_tIt-.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-BBYM52IU.js → LinkBroken01-SQZX7UHe.js} +1 -1
  21. package/dist/client/assets/{Monitor01-596xyLh3.js → Monitor01-CZgg0RSg.js} +1 -1
  22. package/dist/client/assets/{Play-CIe1tupB.js → Play-CSVNLFwP.js} +1 -1
  23. package/dist/client/assets/{Plus-DTyq8wfJ.js → Plus-C7i72Ui0.js} +1 -1
  24. package/dist/client/assets/{SearchMd-DnZ_sK_U.js → SearchMd--I1GEx-C.js} +1 -1
  25. package/dist/client/assets/{Sector-iSjEHRg-.js → Sector-CBgTYwFd.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-Brrt7Bh6.js → ShoppingBag01-E-rUyhpG.js} +1 -1
  27. package/dist/client/assets/{Sun-BmhcFIJl.js → Sun-D612nlCs.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-B5sfCWHV.js → SwitchHorizontal01-DCGuISL6.js} +1 -1
  29. package/dist/client/assets/{Tool01-BSpg9N8Q.js → Tool01-DqVqi_FU.js} +1 -1
  30. package/dist/client/assets/{Trash01-uPItCfKQ.js → Trash01-BdVvG1w5.js} +1 -1
  31. package/dist/client/assets/{Upload01-ClSeM0gf.js → Upload01-CEQBjXAP.js} +1 -1
  32. package/dist/client/assets/{User01-DabbLHAZ.js → User01-DzMieRdG.js} +1 -1
  33. package/dist/client/assets/{UserSquare-BXjBRbTF.js → UserSquare-CEGUDYl2.js} +1 -1
  34. package/dist/client/assets/{Users01-Dt36FENA.js → Users01-CW8HA66N.js} +1 -1
  35. package/dist/client/assets/{XAxis-BQtU7n4v.js → XAxis-B4lxSeIN.js} +1 -1
  36. package/dist/client/assets/{XClose-BMDlg-34.js → XClose-ByJq3z1t.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-Bnst3wtU.js → ZoomOut-CePPHC89.js} +1 -1
  38. package/dist/client/assets/{access-gate-BnarIuC9.js → access-gate-1kOXhtpA.js} +1 -1
  39. package/dist/client/assets/{add-connection-dialog-BB_zBu7s.js → add-connection-dialog-Cd8-TxBb.js} +1 -1
  40. package/dist/client/assets/{agent-analytics-DJ6OqUua.js → agent-analytics-CgOyzHtX.js} +1 -1
  41. package/dist/client/assets/agent-app-DWW7Imub.js +1 -0
  42. package/dist/client/assets/{agent-assets-BHKSbhmH.js → agent-assets-BcISoUVX.js} +1 -1
  43. package/dist/client/assets/agent-automation-hFGAVqfl.js +20 -0
  44. package/dist/client/assets/{agent-automations-p8P_f3PC.js → agent-automations-Ba-x7Ucu.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-DHxXXvzx.js → agent-connect-sources-BIS9GVvp.js} +1 -1
  46. package/dist/client/assets/agent-deck-DPEVXLN-.js +1 -0
  47. package/dist/client/assets/{agent-e2e-BPE2bY36.js → agent-e2e-s6kTYT1M.js} +1 -1
  48. package/dist/client/assets/{agent-experiments-ChC-SJXX.js → agent-experiments-Dxl1C9iM.js} +1 -1
  49. package/dist/client/assets/{agent-file-BFxmR6QX.js → agent-file-pfVCGOAk.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-BV7C2pVl.js → agent-hosting-BTX9u40j.js} +1 -1
  51. package/dist/client/assets/{agent-icon-BdZdLCky.js → agent-icon-BVzFWL_k.js} +1 -1
  52. package/dist/client/assets/agent-library-DXQXsht4.js +1 -0
  53. package/dist/client/assets/agent-library-file-D6Vi3vOs.js +1 -0
  54. package/dist/client/assets/{agent-monitor-CbF33zT0.js → agent-monitor-CooIUBTW.js} +1 -1
  55. package/dist/client/assets/{agent-overview-CiiRxzYe.js → agent-overview-B2THCwmT.js} +1 -1
  56. package/dist/client/assets/agent-settings-Cr6Ua7-i.js +1 -0
  57. package/dist/client/assets/{agent-site-editor-Dq16bHz8.js → agent-site-editor-Jv_-LWOu.js} +1 -1
  58. package/dist/client/assets/agent-site-editor-code-BwIPkqrc.js +2 -0
  59. package/dist/client/assets/{agent-site-editor-content-CbMNndHb.js → agent-site-editor-content-Dz3-PHZu.js} +3 -3
  60. package/dist/client/assets/{agent-site-editor-preview-Dy_HN_0a.js → agent-site-editor-preview-CgJHEW_f.js} +3 -3
  61. package/dist/client/assets/agent-view-DnTdo1a1.js +1 -0
  62. package/dist/client/assets/{agent-view-guard-CShYlKBB.js → agent-view-guard-Bp3FWE2P.js} +1 -1
  63. package/dist/client/assets/{agents-list-qSpN3sGU.js → agents-list-ZBnW_d9y.js} +1 -1
  64. package/dist/client/assets/{ai-providers-DwrXOrzh.js → ai-providers-CPmQ2-wf.js} +1 -1
  65. package/dist/client/assets/{alert-Tk2m0Iz_.js → alert-CUPV9wwi.js} +1 -1
  66. package/dist/client/assets/{alert-dialog-By0HRTrM.js → alert-dialog-DTOyag1c.js} +1 -1
  67. package/dist/client/assets/{analytics-sections-BjYHHt7V.js → analytics-sections-Cz6ahzfq.js} +1 -1
  68. package/dist/client/assets/api-keys-A7GHzfae.js +1 -0
  69. package/dist/client/assets/{api-keys-DaMqNdv1.js → api-keys-CHntF__V.js} +1 -1
  70. package/dist/client/assets/app-editor-Bt0fzZ_2.js +1 -0
  71. package/dist/client/assets/{asset-utils-Cne_zeGQ.js → asset-utils-CDOZckz4.js} +1 -1
  72. package/dist/client/assets/{auth-CTn9OsYL.js → auth-BM0B-cGs.js} +1 -1
  73. package/dist/client/assets/{auth-catchall-CMbAfThb.js → auth-catchall-D1kP6GLS.js} +1 -1
  74. package/dist/client/assets/{auth-entry-CcnG-745.js → auth-entry-Cmk5Wmvz.js} +1 -1
  75. package/dist/client/assets/{auth-split-layout--aU7QLNo.js → auth-split-layout-DAOQnS6B.js} +1 -1
  76. package/dist/client/assets/{authenticate-and-persist-oauth-bcqFV5Ih.js → authenticate-and-persist-oauth-BRn95Iqc.js} +1 -1
  77. package/dist/client/assets/{automation-list-row-3u6JAmgN.js → automation-list-row-lOitm-O0.js} +1 -1
  78. package/dist/client/assets/{automation-runs-Cy2qWf8T.js → automation-runs-hkYLmevl.js} +1 -1
  79. package/dist/client/assets/{automations-B06cv6_Q.js → automations-D0AFDtKD.js} +1 -1
  80. package/dist/client/assets/{autosend-Cr5TlS-x.js → autosend-ACmUx5MO.js} +1 -1
  81. package/dist/client/assets/{avatar-DNs314ny.js → avatar-Du8JG5EY.js} +1 -1
  82. package/dist/client/assets/{badge-BDMYkxf_.js → badge-BEq8f8Nc.js} +1 -1
  83. package/dist/client/assets/{block-document-BkfPgGlg.js → block-document-CCx23LIp.js} +1 -1
  84. package/dist/client/assets/{blocks-preview-workspace-context-D5JWaTS4.js → blocks-preview-workspace-context-Cy0jJ985.js} +1 -1
  85. package/dist/client/assets/{blog-schema-Qz918NIm.js → blog-schema-CQg-jBGk.js} +1 -1
  86. package/dist/client/assets/{board-analytics-B8AHF8AB.js → board-analytics-X4J6IlHK.js} +1 -1
  87. package/dist/client/assets/{buckets-CUa7QjX3.js → buckets-Dq2wvP9B.js} +1 -1
  88. package/dist/client/assets/{build-improve-prompt-doc-l6jHAadC.js → build-improve-prompt-doc-vPJYIntG.js} +1 -1
  89. package/dist/client/assets/{calendar-9HE_r4Hw.js → calendar-DpEcLQ6J.js} +1 -1
  90. package/dist/client/assets/{capability-load-error-DVDKy7cm.js → capability-load-error-Bm4gFcel.js} +1 -1
  91. package/dist/client/assets/{category-editor-w7_HM15g.js → category-editor-DAWKWbpV.js} +1 -1
  92. package/dist/client/assets/{chart-n7qVLeZu.js → chart-CkvrWwO-.js} +1 -1
  93. package/dist/client/assets/{chat-context-DszOftwV.js → chat-context-BMIrv5uH.js} +1 -1
  94. package/dist/client/assets/{chat-draft-Bi-CpEK_.js → chat-draft-_hxvCJKw.js} +1 -1
  95. package/dist/client/assets/{checkbox-jukyyas4.js → checkbox-DvQZTmm6.js} +1 -1
  96. package/dist/client/assets/{choose-editor-BpukaXWx.js → choose-editor-BRTmXclR.js} +1 -1
  97. package/dist/client/assets/{claim-phase-copy-gKkPnPW4.js → claim-phase-copy-CukA7Dwd.js} +1 -1
  98. package/dist/client/assets/{cli-auth-success-ZwkiiHM_.js → cli-auth-success-DGrUaNM7.js} +1 -1
  99. package/dist/client/assets/{client-icons-CI6qGlDq.js → client-icons-5kuaT98X.js} +1 -1
  100. package/dist/client/assets/{collapsible-CSMgVqT4.js → collapsible-CRuF_99G.js} +1 -1
  101. package/dist/client/assets/{collection-detail-D7Eq0q0A.js → collection-detail-CbaGmCRX.js} +1 -1
  102. package/dist/client/assets/{collection-display-button-DfzaspAg.js → collection-display-button-Blt_OAPx.js} +1 -1
  103. package/dist/client/assets/{collection-search-q0ogFMFh.js → collection-search-Bo7KXUbF.js} +1 -1
  104. package/dist/client/assets/{collection-table-wrapper-Dnaf2KFs.js → collection-table-wrapper-YguS6Yzf.js} +1 -1
  105. package/dist/client/assets/{collection-tabs-CYgVG041.js → collection-tabs-DCHbr1Vt.js} +1 -1
  106. package/dist/client/assets/{column-rules-BDs9HTxP.js → column-rules-C35w8JUr.js} +1 -1
  107. package/dist/client/assets/{combobox-BTfHieW4.js → combobox-DocJ2-jK.js} +1 -1
  108. package/dist/client/assets/{command-DFd1c5Z5.js → command-BSyD71wq.js} +1 -1
  109. package/dist/client/assets/{companion-mcps-section-4lkaw_O0.js → companion-mcps-section-DL8GkhO5.js} +1 -1
  110. package/dist/client/assets/{config-CtmGoERx.js → config-BTwIN8U2.js} +1 -1
  111. package/dist/client/assets/{connect-layout-CC9olkOl.js → connect-layout-ayCcohdl.js} +1 -1
  112. package/dist/client/assets/{connect-CmDZNw9R.js → connect-pYGu8tEC.js} +1 -1
  113. package/dist/client/assets/{connection-DSkv8Cg1.js → connection-BV0Ji7-y.js} +1 -1
  114. package/dist/client/assets/{connection-card-C7Yq5GHs.js → connection-card-BGBC1Vy2.js} +1 -1
  115. package/dist/client/assets/{connection-detail-DVH9ilyh.js → connection-detail-D_ocZmwm.js} +1 -1
  116. package/dist/client/assets/{connection-form-helpers-BsU6F-s_.js → connection-form-helpers-DgicL3qY.js} +1 -1
  117. package/dist/client/assets/{connections-BMBv6B3A.js → connections-CniO7wM-.js} +1 -1
  118. package/dist/client/assets/{context-B_2GuX3F.js → context-BSQXU5RQ.js} +1 -1
  119. package/dist/client/assets/{context-menu-CYa4PKRJ.js → context-menu-BfMN3bc-.js} +1 -1
  120. package/dist/client/assets/{core.esm-lZvNzlYc.js → core.esm-Dilbpce_.js} +1 -1
  121. package/dist/client/assets/{create-organization-dialog-D-9YlOhY.js → create-organization-dialog-C1SjjvU5.js} +1 -1
  122. package/dist/client/assets/{daily-pulse-CSM9zceR.js → daily-pulse-DevsdiuS.js} +1 -1
  123. package/dist/client/assets/{device-hint-DPN31B5L.js → device-hint-Di9sQxnE.js} +1 -1
  124. package/dist/client/assets/{discover-DvrfCZMt.js → discover-BLt_q0rw.js} +1 -1
  125. package/dist/client/assets/{domain-settings-BDouaDKh.js → domain-settings-Chk6V0ER.js} +1 -1
  126. package/dist/client/assets/{drawer-UzGeZrmC.js → drawer-BXTiY6dg.js} +1 -1
  127. package/dist/client/assets/{editor-KeKsFC14.js → editor-BO3RLENr.js} +1 -1
  128. package/dist/client/assets/{empty-state-DdJZ_leg.js → empty-state-DzqjIExe.js} +1 -1
  129. package/dist/client/assets/{empty-state-CvDYWxOG.js → empty-state-MnAK8EeW.js} +1 -1
  130. package/dist/client/assets/{extract-connection-data-CJhjAx3s.js → extract-connection-data-DykkXLPs.js} +1 -1
  131. package/dist/client/assets/{feature-gate-D5KGpIQ3.js → feature-gate-CWfa-r5C.js} +1 -1
  132. package/dist/client/assets/{feature-paywall-nTUHasXJ.js → feature-paywall-CqkVt_-T.js} +1 -1
  133. package/dist/client/assets/{file-explorer-CcZkMQK3.js → file-explorer-AcHh43mk.js} +1 -1
  134. package/dist/client/assets/{file-preview-Ct2165jc.js → file-preview-BqIq4rHb.js} +1 -1
  135. package/dist/client/assets/{file-share-button-DnzCcmZ2.js → file-share-button-DuHzh-x9.js} +1 -1
  136. package/dist/client/assets/{file-type-icon-C-_1hLql.js → file-type-icon-BRADjmum.js} +1 -1
  137. package/dist/client/assets/flat-project-DYnMR914.js +1 -0
  138. package/dist/client/assets/{folder-icon-CksigScx.js → folder-icon-t6qoYUX-.js} +1 -1
  139. package/dist/client/assets/{form-D6DHFxsw.js → form-qApBoH9w.js} +1 -1
  140. package/dist/client/assets/{general-CeTNWbSz.js → general-1xmPf-mm.js} +1 -1
  141. package/dist/client/assets/{home-B3luwcfX.js → home-IMnM6qUa.js} +1 -1
  142. package/dist/client/assets/{icon-button-d9uOvdxM.js → icon-button-CTsUwdOO.js} +1 -1
  143. package/dist/client/assets/{index-zYf8hP69.js → index-B-OFv0CL.js} +1 -1
  144. package/dist/client/assets/{index-B5IA1qMq.js → index-B5YiUV4I.js} +1 -1
  145. package/dist/client/assets/{index-BGz-w6Gg.js → index-BONgNC04.js} +1 -1
  146. package/dist/client/assets/{index-B0rouRMk.js → index-BeBh88bO.js} +1 -1
  147. package/dist/client/assets/{index-bl_DQ3mH.js → index-BnoCrGwV.js} +4 -4
  148. package/dist/client/assets/{index-COV2t6Wc.js → index-CqcefCZu.js} +1 -1
  149. package/dist/client/assets/{index-JuyO8Sz3.js → index-CqlAEV0m.js} +1 -1
  150. package/dist/client/assets/{index-Dhdyv2s0.js → index-DJa5VNJ9.js} +1 -1
  151. package/dist/client/assets/{index-MZuRM-ap.js → index-DU_EN75b.js} +1 -1
  152. package/dist/client/assets/{index-DHd9v6HB.js → index-DyoR2ZG0.js} +1 -1
  153. package/dist/client/assets/{index-DCmQGiOV.js → index-IBL9WNsl.js} +1 -1
  154. package/dist/client/assets/{index-redirect-CdLcLUA4.js → index-redirect-mQgNeOUi.js} +1 -1
  155. package/dist/client/assets/{index-Cw6J2Hl5.js → index-unq9ZTJD.js} +3 -3
  156. package/dist/client/assets/{index-DyaBZBxm.js → index-w9yV707t.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-rUCOtzeA.js → infiniteQueryObserver-DzxIYVHF.js} +1 -1
  158. package/dist/client/assets/{infra-billing-CNFpdYUt.js → infra-billing-BKFmTcoI.js} +1 -1
  159. package/dist/client/assets/{input-B6YAOx07.js → input-D4UgTJ69.js} +3 -3
  160. package/dist/client/assets/{input-C1msyAUz.js → input-Dwwabqbj.js} +1 -1
  161. package/dist/client/assets/{integration-icon-DogZfPWq.js → integration-icon-DcBDH52f.js} +1 -1
  162. package/dist/client/assets/{jira-icon-Bkx-ixmo.js → jira-icon-j32fJ669.js} +1 -1
  163. package/dist/client/assets/{label-Bqj_xjz9.js → label-D0foYPWf.js} +1 -1
  164. package/dist/client/assets/{layout-z7Pz7phr.js → layout-Bj7xhNKz.js} +1 -1
  165. package/dist/client/assets/{legacy-agents-deep-fygb-JNd.js → legacy-agents-deep-BVp2GTsJ.js} +1 -1
  166. package/dist/client/assets/{legacy-main-redirect-BKIEGtd4.js → legacy-main-redirect-BjFRDgFy.js} +1 -1
  167. package/dist/client/assets/library-BBQI7-xd.js +1 -0
  168. package/dist/client/assets/{library-tab-0FXiesZx.js → library-tab-CqP8QMPw.js} +1 -1
  169. package/dist/client/assets/{login-B4wTb5ls.js → login-DDOgddgu.js} +1 -1
  170. package/dist/client/assets/{markdown-5DzLzA6E.js → markdown-mBxXiRvM.js} +1 -1
  171. package/dist/client/assets/{mcp-app-renderer-DuGbCe-D.js → mcp-app-renderer-DMqJU_ff.js} +1 -1
  172. package/dist/client/assets/{mcp-oauth-D_oaXY6E.js → mcp-oauth-CS16PRCo.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-tCidCN-u.js → mcp-oauth-Dg0thBi5.js} +1 -1
  174. package/dist/client/assets/{members-CDM-83p9.js → members-C8Uoyb9d.js} +1 -1
  175. package/dist/client/assets/{memory-0faJ-8hP.js → memory-DFNhRaxm.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-CrKZ4okq.js → mini-report-page-CvqJBueU.js} +1 -1
  177. package/dist/client/assets/{mock-board-N392Vku2.js → mock-board-DXq3mL_y.js} +1 -1
  178. package/dist/client/assets/{monaco-editor-2Ci5R71u.js → monaco-editor-CPeZZpu3.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-BbxkYAB2.js → monitoring-stats-row-CuuaoKtt.js} +1 -1
  180. package/dist/client/assets/{multi-select-CNHwKIXn.js → multi-select-DH4C4azS.js} +1 -1
  181. package/dist/client/assets/{mustache-B7TZyK91.js → mustache-Dnm8KPo2.js} +1 -1
  182. package/dist/client/assets/{new-project-dialog-C5lJfUJ3.js → new-project-dialog-Cqt9GN_i.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-DGtqmz9D.js → oauth-callback-DRRwxtOq.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-ai-provider-Bhuh08e8.js → oauth-callback-ai-provider-0n-RoExG.js} +1 -1
  185. package/dist/client/assets/{onboarding-D55kfuiq.js → onboarding-BKVLpJKr.js} +1 -1
  186. package/dist/client/assets/{openai-conversation-C4Qt6S-l.js → openai-conversation-MHgeBif6.js} +1 -1
  187. package/dist/client/assets/{optimistic-project-sidebar-views-CoZosNmn.js → optimistic-project-sidebar-views-nhoEQPGj.js} +1 -1
  188. package/dist/client/assets/{organization-choice-CUxHZSL3.js → organization-choice-BzhWXbFm.js} +1 -1
  189. package/dist/client/assets/{orgs-CPCdS87I.js → orgs-BaIwjZFJ.js} +1 -1
  190. package/dist/client/assets/{page-seo-form-DdXyS1MG.js → page-seo-form-DPSCL9_1.js} +1 -1
  191. package/dist/client/assets/{pair-DjM6V7aG.js → pair-xBw_CC4U.js} +1 -1
  192. package/dist/client/assets/{plan-ladder-gwROOTzi.js → plan-ladder-CuhqhssD.js} +1 -1
  193. package/dist/client/assets/{popover-MLSOZysn.js → popover-DeebArTG.js} +1 -1
  194. package/dist/client/assets/{post-calendar-Dr7XWigd.js → post-calendar-C2y7NNwt.js} +1 -1
  195. package/dist/client/assets/{post-editor-CKCVg_my.js → post-editor-BRGQM4sy.js} +1 -1
  196. package/dist/client/assets/{preview-content-Cuq13S1x.js → preview-content-C5X6_KWi.js} +1 -1
  197. package/dist/client/assets/{preview-dialog-CP7wwQxY.js → preview-dialog-CP9b5pOj.js} +1 -1
  198. package/dist/client/assets/{preview-panel-DFRYD57I.js → preview-panel-SuK698dS.js} +1 -1
  199. package/dist/client/assets/{product-picker-dialog-DuFOtAE-.js → product-picker-dialog-BI1D6XcE.js} +1 -1
  200. package/dist/client/assets/{profile-E9E7lNqo.js → profile-CNcB1e0i.js} +1 -1
  201. package/dist/client/assets/{project-app-view-CqnnpjCc.js → project-app-view-BPxNtoZa.js} +1 -1
  202. package/dist/client/assets/{project-feed-DI26nV5j.js → project-feed-BwN9nKdh.js} +1 -1
  203. package/dist/client/assets/{project-icon-DsUbDdQC.js → project-icon-B64BT2qc.js} +1 -1
  204. package/dist/client/assets/project-reports-UeFimlBu.js +1 -0
  205. package/dist/client/assets/project-tasks-C_MGzrBm.js +1 -0
  206. package/dist/client/assets/{projects-CdLu99l3.js → projects-1NLUJAKv.js} +1 -1
  207. package/dist/client/assets/{projects-empty-state-CO-mNXLv.js → projects-empty-state-hsfXEaTK.js} +1 -1
  208. package/dist/client/assets/{prompts-CGIibyOn.js → prompts-DtIJm1-q.js} +1 -1
  209. package/dist/client/assets/record-editor-BZBgjIzu.js +1 -0
  210. package/dist/client/assets/redirect-editor-C6x-CduV.js +1 -0
  211. package/dist/client/assets/{reports-CKJQ8Zdg.js → reports-ACS-Nba_.js} +1 -1
  212. package/dist/client/assets/reports-C8vsf2am.js +1 -0
  213. package/dist/client/assets/{reports-onboarding-UAs51Fs-.js → reports-onboarding-TpGsieg8.js} +1 -1
  214. package/dist/client/assets/{reports-tab-D-UL6Cu0.js → reports-tab-BY0hxMVO.js} +2 -2
  215. package/dist/client/assets/{repositories-8LjwXVAZ.js → repositories-CKLepZhj.js} +1 -1
  216. package/dist/client/assets/{repository-binding-BTsmo_dA.js → repository-binding-C8cI0_BR.js} +1 -1
  217. package/dist/client/assets/{repository-import-picker-D5xDiyD_.js → repository-import-picker-BKAJgfVd.js} +1 -1
  218. package/dist/client/assets/{repository-picker-DExxlkis.js → repository-picker-F2WyjZCv.js} +1 -1
  219. package/dist/client/assets/{require-capability-DJr1iBd_.js → require-capability-BgNMdquK.js} +1 -1
  220. package/dist/client/assets/{required-auth-layout-Dzef4Ao1.js → required-auth-layout-C7-28_EU.js} +1 -1
  221. package/dist/client/assets/{reset-password-CWozFngH.js → reset-password-CKnTOzi4.js} +1 -1
  222. package/dist/client/assets/{resizable-UTJFKDGm.js → resizable-CTrq392s.js} +1 -1
  223. package/dist/client/assets/{resolve-tab-icon-DqCiaIA7.js → resolve-tab-icon-BlUXvZF3.js} +1 -1
  224. package/dist/client/assets/{review-settings-THwrc5M3.js → review-settings-DqiJkLo7.js} +1 -1
  225. package/dist/client/assets/{rich-text-link-control-CNQ92nZ4.js → rich-text-link-control-BJZoQZZi.js} +1 -1
  226. package/dist/client/assets/{roles-D_wIHL0X.js → roles-BHrtuvIr.js} +1 -1
  227. package/dist/client/assets/{route-e2YuR4Xl.js → route-BscI37la.js} +1 -1
  228. package/dist/client/assets/{route-DD4978oF.js → route-CH91bGcP.js} +1 -1
  229. package/dist/client/assets/route-saa6yPXu.js +1 -0
  230. package/dist/client/assets/{runnable-block-editor-fWbFWGvz.js → runnable-block-editor-gl-EMkKx.js} +1 -1
  231. package/dist/client/assets/{sandbox-lifecycle-context-C25F7mSK.js → sandbox-lifecycle-context-D-v0LKtL.js} +1 -1
  232. package/dist/client/assets/{schema-BKM3gR2B.js → schema-BPpEaREa.js} +1 -1
  233. package/dist/client/assets/{schema-kVE-1hbs.js → schema-Cwz0xn-Q.js} +1 -1
  234. package/dist/client/assets/{scroll-area-1S72VGW0.js → scroll-area-ClXMKXdj.js} +1 -1
  235. package/dist/client/assets/{search-input-pTAwOtCG.js → search-input-BPlE2YGC.js} +1 -1
  236. package/dist/client/assets/{search-toggle-DAU6nVmU.js → search-toggle-BJ6kk5fK.js} +1 -1
  237. package/dist/client/assets/{secret-picker-CDYFp1fc.js → secret-picker-vqj_Z_Kc.js} +1 -1
  238. package/dist/client/assets/{secrets-B0srIKJq.js → secrets-DNo6UMoB.js} +1 -1
  239. package/dist/client/assets/{sections-editor-B5MFR1yl.js → sections-editor-BkwXm1xr.js} +1 -1
  240. package/dist/client/assets/{select-WviNHwZD.js → select-4dFEgKOb.js} +1 -1
  241. package/dist/client/assets/{select-model-cTObTD6V.js → select-model-C6MqONr4.js} +1 -1
  242. package/dist/client/assets/{seo-editor-DCKDCOQr.js → seo-editor-B6SwqtaH.js} +1 -1
  243. package/dist/client/assets/{separator-DHqK6uc1.js → separator-rAnSnPbj.js} +1 -1
  244. package/dist/client/assets/{settings-tab-fdKZYnq9.js → settings-tab-Bv9C4ymg.js} +1 -1
  245. package/dist/client/assets/{sheet-CZiDNUQZ.js → sheet-CV4TQLcF.js} +1 -1
  246. package/dist/client/assets/{shell-layout-Bk6uPKMe.js → shell-layout-CEs2Lzv8.js} +1 -1
  247. package/dist/client/assets/{skills-Bhf5PJUl.js → skills-Cdtjp8Cm.js} +1 -1
  248. package/dist/client/assets/{slider-gvEbcdOp.js → slider-C-yLU3nZ.js} +1 -1
  249. package/dist/client/assets/{sortable.esm-h3AYG-u7.js → sortable.esm-Di32jx09.js} +1 -1
  250. package/dist/client/assets/{sso-B6q4MTEL.js → sso-DgQQiYUH.js} +1 -1
  251. package/dist/client/assets/{suggestion-C591DFAx.js → suggestion-DZ2maKDk.js} +1 -1
  252. package/dist/client/assets/{switch-CUK4V52q.js → switch-Dl_eh6Nb.js} +1 -1
  253. package/dist/client/assets/{symbol-BQaHJ_MF.js → symbol-CobSncd2.js} +1 -1
  254. package/dist/client/assets/{synced-repos-BbxE1rvi.js → synced-repos-OnaK9DdK.js} +1 -1
  255. package/dist/client/assets/{tab-icon-glyph-D8Um0oDf.js → tab-icon-glyph-MSjQA0K5.js} +1 -1
  256. package/dist/client/assets/{table-Dsl6wBVe.js → table-CDMv2RNX.js} +1 -1
  257. package/dist/client/assets/{tabs-BXhvcQgN.js → tabs-Bm8-oaP0.js} +1 -1
  258. package/dist/client/assets/{task-board-kbcRVMI1.js → task-board-l22wFLNQ.js} +1 -1
  259. package/dist/client/assets/{task-route-BPrIj9mX.js → task-route-D_QgJz9B.js} +1 -1
  260. package/dist/client/assets/{task-status-codqNsI7.js → task-status-CmkAheNu.js} +1 -1
  261. package/dist/client/assets/taskboard-analytics-D1RzGECH.js +1 -0
  262. package/dist/client/assets/{tasks-J75byAMf.js → tasks-CyUEJ-zk.js} +1 -1
  263. package/dist/client/assets/tasks-ybPiOXw5.js +1 -0
  264. package/dist/client/assets/{textarea-DvoMwt1e.js → textarea-DoDVPYV2.js} +1 -1
  265. package/dist/client/assets/{thread-analytics-C0BM4p9K.js → thread-analytics-Cdk2jcnI.js} +1 -1
  266. package/dist/client/assets/{thread-button-DKjUerzt.js → thread-button-iNSq397a.js} +1 -1
  267. package/dist/client/assets/{thread-intent-CG-CCDLs.js → thread-intent-CXunryww.js} +1 -1
  268. package/dist/client/assets/{thread-route-CR0TIP8s.js → thread-route-BPs4zslo.js} +1 -1
  269. package/dist/client/assets/{thread-route-DvTW6luy.js → thread-route-BtywJWO6.js} +1 -1
  270. package/dist/client/assets/{thread-sheet-body-BAmHmw0m.js → thread-sheet-body-DATcetgP.js} +1 -1
  271. package/dist/client/assets/{time-range-picker-CPMdzMas.js → time-range-picker-BDkyREOJ.js} +1 -1
  272. package/dist/client/assets/{toggle-group-Q9SREgL7.js → toggle-group-D6lQXGki.js} +1 -1
  273. package/dist/client/assets/{tool-namespace-uRsPbj-p.js → tool-namespace-BCIJDBpU.js} +1 -1
  274. package/dist/client/assets/{toolbar-icon-button-Djr5zvaV.js → toolbar-icon-button-yglM36kK.js} +1 -1
  275. package/dist/client/assets/{tooltip-COqLwkid.js → tooltip-D58qe9VW.js} +1 -1
  276. package/dist/client/assets/{tooltipContext-DDD6cP5q.js → tooltipContext-DmjVpXSV.js} +1 -1
  277. package/dist/client/assets/{track-DG4JP_WA.js → track-R2_XgeZf.js} +1 -1
  278. package/dist/client/assets/{types-C5SQt0XZ.js → types-BPkPu0Zu.js} +1 -1
  279. package/dist/client/assets/{url-slug-CUhgOgGc.js → url-slug-BeoES-bn.js} +1 -1
  280. package/dist/client/assets/{usage-stats-CAukzrpg.js → usage-stats-BL57yImZ.js} +1 -1
  281. package/dist/client/assets/{use-ai-providers-IjG3zzka.js → use-ai-providers-Fk-ioKuC.js} +1 -1
  282. package/dist/client/assets/{use-automations-Dt8Ypk0g.js → use-automations-CWCytpPL.js} +1 -1
  283. package/dist/client/assets/{use-autosave-CiBl7wSO.js → use-autosave-6dz-PwTx.js} +1 -1
  284. package/dist/client/assets/{use-chat-layout-state-CVkPEEUs.js → use-chat-layout-state-DXfMGuIM.js} +1 -1
  285. package/dist/client/assets/{use-chat-navigation-DLnmXNT9.js → use-chat-navigation-zHRcYkWa.js} +1 -1
  286. package/dist/client/assets/{use-clock-tick-zaL95TTy.js → use-clock-tick-Dz0tKfh3.js} +1 -1
  287. package/dist/client/assets/{use-connect-companion-CRI0nNcp.js → use-connect-companion-CYsjOss7.js} +1 -1
  288. package/dist/client/assets/{use-connection-gMb_8zEe.js → use-connection-CWYEcZtk.js} +1 -1
  289. package/dist/client/assets/{use-copy-2j0k06rN.js → use-copy-DKdPALi_.js} +1 -1
  290. package/dist/client/assets/{use-create-virtual-mcp-Bz6TE2Qz.js → use-create-virtual-mcp-CRO0toUl.js} +1 -1
  291. package/dist/client/assets/{use-date-fns-locale-BPq8VLDt.js → use-date-fns-locale-Bv2awPzh.js} +1 -1
  292. package/dist/client/assets/{use-debounced-autosave-CMA_1eXM.js → use-debounced-autosave-BXZmHqy0.js} +1 -1
  293. package/dist/client/assets/{use-debounced-value-Dju-tMu1.js → use-debounced-value-Bkmt--Vh.js} +1 -1
  294. package/dist/client/assets/{use-deco-credits-BtvhFk4m.js → use-deco-credits-D9reDEA1.js} +1 -1
  295. package/dist/client/assets/{use-decopilot-events-D8zpT0sX.js → use-decopilot-events-DAjIYzO8.js} +1 -1
  296. package/dist/client/assets/{use-delete-connection-BXDiC_mk.js → use-delete-connection-CmABKTTR.js} +1 -1
  297. package/dist/client/assets/{use-deployment-admin-CXT7CFHy.js → use-deployment-admin-DSd4dZS8.js} +1 -1
  298. package/dist/client/assets/{use-ensure-project-folder-CqaPdVz-.js → use-ensure-project-folder-BL_22sUH.js} +1 -1
  299. package/dist/client/assets/{use-fast-preview-draft-url-DlLnA8PJ.js → use-fast-preview-draft-url-B5iYwDtB.js} +1 -1
  300. package/dist/client/assets/{use-file-configs-BSnoYr1R.js → use-file-configs-vHZ4c2kM.js} +1 -1
  301. package/dist/client/assets/{use-infinite-scroll-CtScOz_h.js → use-infinite-scroll-IKS1f5vo.js} +1 -1
  302. package/dist/client/assets/{use-join-requests-CccLwL3-.js → use-join-requests-7cPvmdKM.js} +1 -1
  303. package/dist/client/assets/{use-main-panel-tabs-O3Jy3Qh8.js → use-main-panel-tabs-B1NvXUoP.js} +1 -1
  304. package/dist/client/assets/{use-mcp-auth-status-Is2pR00q.js → use-mcp-auth-status-VoQ-JrKz.js} +1 -1
  305. package/dist/client/assets/{use-mcp-client-DuTNn1dc.js → use-mcp-client-F8qIxKEF.js} +1 -1
  306. package/dist/client/assets/{use-mcp-prompts-3vLSpQqZ.js → use-mcp-prompts-BOuduomf.js} +1 -1
  307. package/dist/client/assets/{use-mcp-tools-CA6Ri5UK.js → use-mcp-tools-DJdMQuye.js} +1 -1
  308. package/dist/client/assets/{use-members-BqWTpMNp.js → use-members-CbU4crhI.js} +1 -1
  309. package/dist/client/assets/{use-mobile-Di3PCVWm.js → use-mobile-BKee5QTm.js} +1 -1
  310. package/dist/client/assets/{use-navigate-to-agent-Cu9cZhs8.js → use-navigate-to-agent-LQKyEvv0.js} +1 -1
  311. package/dist/client/assets/use-new-blocks-editor-CHx1p4ni.js +1 -0
  312. package/dist/client/assets/{use-open-billing-url-sjDwQSEM.js → use-open-billing-url-B8yYvcNp.js} +1 -1
  313. package/dist/client/assets/{use-org-auth-client-DIUzAE5u.js → use-org-auth-client-DUhvuYX9.js} +1 -1
  314. package/dist/client/assets/{use-org-fs-DOu4nQSr.js → use-org-fs-CfbJ-qpv.js} +1 -1
  315. package/dist/client/assets/{use-org-repo-syncs-BhJEcVcm.js → use-org-repo-syncs-CzPhz0CF.js} +1 -1
  316. package/dist/client/assets/{use-org-sso-B57pfGVG.js → use-org-sso-7gybTWnn.js} +1 -1
  317. package/dist/client/assets/{use-organization-roles-DDnFx_jd.js → use-organization-roles-CdaGJMnK.js} +1 -1
  318. package/dist/client/assets/{use-organization-settings-BOGRgJjV.js → use-organization-settings-DE6EFzZl.js} +1 -1
  319. package/dist/client/assets/{use-panel-navigate-c5H4a21L.js → use-panel-navigate-DAoDF43u.js} +1 -1
  320. package/dist/client/assets/{use-project-scope-A4YCdR4N.js → use-project-scope-C3zEyt8p.js} +1 -1
  321. package/dist/client/assets/{use-releases-BmeSCMgM.js → use-releases-BgJG-aAA.js} +1 -1
  322. package/dist/client/assets/{use-reports-diagnostic-Dw_QzpEb.js → use-reports-diagnostic-Bs8mcbPZ.js} +1 -1
  323. package/dist/client/assets/{use-sandbox-events-hhwp2IWJ.js → use-sandbox-events-J3pRq7Wv.js} +1 -1
  324. package/dist/client/assets/{use-secrets-BwPjhWC0.js → use-secrets-fCiG4Asp.js} +1 -1
  325. package/dist/client/assets/{use-section-preview-base-B7bjCuOw.js → use-section-preview-base-f9n8yDn_.js} +1 -1
  326. package/dist/client/assets/{use-tags-Ce3D-sM7.js → use-tags-CXa_QGQ7.js} +1 -1
  327. package/dist/client/assets/{use-task-board-analytics-BR7NSR26.js → use-task-board-analytics-BmiYUVWm.js} +1 -1
  328. package/dist/client/assets/{use-task-board-events-BBlz-cBe.js → use-task-board-events-BMlQSCd3.js} +1 -1
  329. package/dist/client/assets/{use-task-board-item-prs-BzAFAQp8.js → use-task-board-item-prs-CGXvUCxe.js} +1 -1
  330. package/dist/client/assets/{use-task-board-items-DTbT7rEp.js → use-task-board-items-DFKc2jHy.js} +1 -1
  331. package/dist/client/assets/{use-task-metadata-CBQ5Muu5.js → use-task-metadata-0bCOd_zi.js} +1 -1
  332. package/dist/client/assets/{use-thread-analytics-CeuE3odS.js → use-thread-analytics-C37ZXdud.js} +1 -1
  333. package/dist/client/assets/{use-thread-outputs-c6b1HaAz.js → use-thread-outputs-v6xfPIih.js} +1 -1
  334. package/dist/client/assets/useInfiniteQuery-CrNtEvb5.js +1 -0
  335. package/dist/client/assets/{useQueries-BliyNTtT.js → useQueries-BHfkbp1a.js} +1 -1
  336. package/dist/client/assets/useSuspenseInfiniteQuery-Ag6TKbPs.js +1 -0
  337. package/dist/client/assets/{users-CsvLtEUJ.js → users-CdGgVfVK.js} +1 -1
  338. package/dist/client/assets/{utils-DHYRJNUn.js → utils-DkhoCm_9.js} +1 -1
  339. package/dist/client/assets/{variant-calendar-CKqGYdH4.js → variant-calendar-TCxR4Rbi.js} +1 -1
  340. package/dist/client/assets/{variant-matcher-override-uklREcGs.js → variant-matcher-override-CxhYuii7.js} +1 -1
  341. package/dist/client/assets/{view-mode-toggle-B55pxnK_.js → view-mode-toggle-Oj88POra.js} +1 -1
  342. package/dist/client/assets/{virtual-mcp-DFjD0qBz.js → virtual-mcp-BiznFoUx.js} +1 -1
  343. package/dist/client/assets/{watch-sse-pool-B66Eygyb.js → watch-sse-pool-BpjjRSV_.js} +1 -1
  344. package/dist/client/index.html +1 -1
  345. package/dist/server/server.js +1 -1
  346. package/package.json +1 -1
  347. package/dist/client/assets/agent-app-6ZZFFR6d.js +0 -1
  348. package/dist/client/assets/agent-automation-BEmy5bSr.js +0 -20
  349. package/dist/client/assets/agent-deck-kxbwQZGK.js +0 -1
  350. package/dist/client/assets/agent-library-dgFnuWrg.js +0 -1
  351. package/dist/client/assets/agent-library-file-LGRVpT_Z.js +0 -1
  352. package/dist/client/assets/agent-settings-CFC23BeV.js +0 -1
  353. package/dist/client/assets/agent-site-editor-code-B3URMZgm.js +0 -2
  354. package/dist/client/assets/agent-view-AaYNRrLl.js +0 -1
  355. package/dist/client/assets/api-keys-CvurWoww.js +0 -1
  356. package/dist/client/assets/app-editor-Dtvslmpt.js +0 -1
  357. package/dist/client/assets/flat-project-Dhd407Mb.js +0 -1
  358. package/dist/client/assets/library-BgLLAz_1.js +0 -1
  359. package/dist/client/assets/project-reports-UVwSbHHJ.js +0 -1
  360. package/dist/client/assets/project-tasks-DuMsfpY5.js +0 -1
  361. package/dist/client/assets/record-editor-ceYt0p4C.js +0 -1
  362. package/dist/client/assets/redirect-editor-Ca575ToY.js +0 -1
  363. package/dist/client/assets/reports-y_yDpDn4.js +0 -1
  364. package/dist/client/assets/route-CfEJDbbT.js +0 -1
  365. package/dist/client/assets/taskboard-analytics-xeHAgwnO.js +0 -1
  366. package/dist/client/assets/tasks-Ba-oyyIK.js +0 -1
  367. package/dist/client/assets/use-new-blocks-editor-D9sV9o2T.js +0 -1
  368. package/dist/client/assets/useInfiniteQuery-DeMEFTdd.js +0 -1
  369. package/dist/client/assets/useSuspenseInfiniteQuery-CUkGf5w6.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as ft,b as Dt,r as w,l as le,j as o,b1 as _i,B as xt,U as Qt,au as ki,X as Ei,V as Ri,a as Ai,o as Ni,h as Ci,t as z,K as Ti}from"./index-bl_DQ3mH.js";import{u as Vi}from"./chat-context-DszOftwV.js";import{u as In}from"./use-new-blocks-editor-D9sV9o2T.js";import{J as Mi,K as Di,N as Pi,O as Ki,Q as Ii,T as Bi,U as Fi,V as Li,W as Oi,X as kr,Y as $i,Z as zi,G as jt,_ as vt,$ as ze,a0 as Hi,H as Tn,E as Vn,e as Wi,f as Gi,j as qi,u as Ui,a1 as Er,o as Yi,a2 as Ji,q as Qi,n as Xi,a3 as to,p as vn,a4 as Zi,a5 as ea,C as Rr,a6 as ta,a7 as na,a8 as Nn,a9 as Ar,aa as Nr,ab as Cr,ac as ss,ad as sa,ae as ra,F as oa,af as Tr,ag as ia,ah as Vr,ai as Mr,M as aa,aj as Dr,d as la,ak as mn,al as ca,am as ua,an as pn,ao as da}from"./runnable-block-editor-fWbFWGvz.js";import{c as fa}from"./repository-binding-BTsmo_dA.js";import{n as ma,t as pa}from"./ChevronUp-BrMcnDd0.js";import{a6 as no,d as Pn,ak as ha,C as ga,$ as Pr,K as Kr}from"./agent-icon-BdZdLCky.js";import{S as Xt}from"./scroll-area-1S72VGW0.js";import{b as wt,T as _t,a as kt}from"./tooltip-COqLwkid.js";import{m as va,u as xa,P as ya}from"./mustache-B7TZyK91.js";import{au as so,c as xs,av as ro,G as ba,aw as pt,ax as ls,ay as oo,ak as Ot,a8 as cs,az as us,al as Mt,a9 as Zt,j as Sa,l as ja,g as wa,r as Cn,ao as _a,aj as hn,aa as rs,ai as Vt,ah as gn,aA as ka,K as Ea,aB as Ra,am as Ir,a2 as Br,aC as Aa,aD as Lt,aE as Na,aF as Ca,aG as Ta,aH as Fr,aI as Va,aJ as Ma,aK as Da,ag as Pa,aL as Ka,aM as Ia,aN as Ba,X as Fa,aO as La,af as Oa,aP as $a}from"./claim-phase-copy-gKkPnPW4.js";import{a as za}from"./Copy01-QpufVNbj.js";import{a as ds,e as io}from"./UserSquare-BXjBRbTF.js";import{i as Lr}from"./Tool01-BSpg9N8Q.js";import{s as Or}from"./Image01-D8Dg78Ju.js";import{s as Ha}from"./Plus-DTyq8wfJ.js";import{s as Wa}from"./Trash01-uPItCfKQ.js";import{i as fs}from"./ZoomOut-Bnst3wtU.js";import{u as Ga,a as $r,K as qa,P as Ua,b as Ya,C as Ja,D as Qa,c as Xa}from"./core.esm-lZvNzlYc.js";import{u as Za,s as el,a as Mn,S as tl,v as nl}from"./sortable.esm-h3AYG-u7.js";import{A as zr}from"./avatar-DNs314ny.js";import{e as sl,d as Hr,b as rl,A as ol,a as il,f as al}from"./alert-dialog-By0HRTrM.js";import{d as ll}from"./shell-layout-Bk6uPKMe.js";import{a as cl,P as Wr,b as ul}from"./page-seo-form-DdXyS1MG.js";import{u as dl,A as fl}from"./use-section-preview-base-B7bjCuOw.js";import{b as Gr,a as ml}from"./variant-matcher-override-uklREcGs.js";import"./use-panel-navigate-c5H4a21L.js";import"./thread-route-CR0TIP8s.js";import"./use-project-scope-A4YCdR4N.js";import"./autosend-Cr5TlS-x.js";import"./thread-intent-CG-CCDLs.js";import"./use-mcp-client-DuTNn1dc.js";import"./auth-CTn9OsYL.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-B66Eygyb.js";import"./task-board-kbcRVMI1.js";import"./schema-kVE-1hbs.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-D8zpT0sX.js";import"./use-ai-providers-IjG3zzka.js";import"./use-chat-navigation-DLnmXNT9.js";import"./location-BjlyegC2.js";import"./use-organization-settings-BOGRgJjV.js";import"./input-B6YAOx07.js";import"./usage-stats-CAukzrpg.js";import"./tool-namespace-uRsPbj-p.js";import"./form-D6DHFxsw.js";import"./label-Bqj_xjz9.js";import"./utils-CVEq3hMx.js";import"./markdown-5DzLzA6E.js";import"./use-copy-2j0k06rN.js";import"./use-mobile-Di3PCVWm.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./XClose-BMDlg-34.js";import"./icon-button-d9uOvdxM.js";import"./file-type-icon-C-_1hLql.js";import"./chat-draft-Bi-CpEK_.js";import"./LinkBroken01-BBYM52IU.js";import"./ArrowUp-CFc2wNu3.js";import"./ShoppingBag01-Brrt7Bh6.js";import"./Upload01-ClSeM0gf.js";import"./AlertCircle-BILwGqjV.js";import"./select-WviNHwZD.js";import"./index-BdQq_4o_.js";import"./index-B5IA1qMq.js";import"./ArrowLeft-DlRqrbst.js";import"./tabs-BXhvcQgN.js";import"./use-deco-credits-BtvhFk4m.js";import"./toggle-group-Q9SREgL7.js";import"./use-open-billing-url-sjDwQSEM.js";import"./index-DCmQGiOV.js";import"./checkbox-jukyyas4.js";import"./ChevronSelectorVertical-23OZgHQl.js";import"./Key01-CCpcNn9J.js";import"./SearchMd-DnZ_sK_U.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-596xyLh3.js";import"./popover-MLSOZysn.js";import"./drawer-UzGeZrmC.js";import"./input-C1msyAUz.js";import"./suggestion-C591DFAx.js";import"./use-chat-layout-state-CVkPEEUs.js";import"./use-file-configs-BSnoYr1R.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-3vLSpQqZ.js";import"./use-org-fs-DOu4nQSr.js";import"./useInfiniteQuery-DeMEFTdd.js";import"./infiniteQueryObserver-rUCOtzeA.js";import"./Link01-Dw-VkUVV.js";import"./question-004-sINsf4GQ.js";import"./use-members-BqWTpMNp.js";import"./use-org-auth-client-DIUzAE5u.js";import"./feature-paywall-nTUHasXJ.js";import"./plan-ladder-gwROOTzi.js";import"./add-connection-dialog-BB_zBu7s.js";import"./collection-search-q0ogFMFh.js";import"./extract-connection-data-CJhjAx3s.js";import"./metadata-D72DunRR.js";import"./connection-DSkv8Cg1.js";import"./url-slug-CUhgOgGc.js";import"./connection-card-C7Yq5GHs.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-DogZfPWq.js";import"./textarea-DvoMwt1e.js";import"./use-connection-gMb_8zEe.js";import"./schema-BKM3gR2B.js";import"./connection-form-helpers-BsU6F-s_.js";import"./authenticate-and-persist-oauth-bcqFV5Ih.js";import"./mcp-oauth-D_oaXY6E.js";import"./mcp-oauth-tCidCN-u.js";import"./collection-tabs-CYgVG041.js";import"./badge-BDMYkxf_.js";import"./use-infinite-scroll-CtScOz_h.js";import"./useSuspenseInfiniteQuery-CUkGf5w6.js";import"./use-task-board-events-BBlz-cBe.js";import"./Play-CIe1tupB.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DjM6V7aG.js";import"./collapsible-CSMgVqT4.js";import"./use-clock-tick-zaL95TTy.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DuGbCe-D.js";import"./types-C5SQt0XZ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CZiDNUQZ.js";import"./use-navigate-to-agent-Cu9cZhs8.js";import"./use-thread-outputs-c6b1HaAz.js";import"./command-DFd1c5Z5.js";import"./index-Dhdyv2s0.js";import"./utils-DHYRJNUn.js";import"./monaco-editor-2Ci5R71u.js";import"./editor-KeKsFC14.js";import"./calendar-9HE_r4Hw.js";import"./SwitchHorizontal01-B5sfCWHV.js";import"./rich-text-link-control-CNQ92nZ4.js";import"./switch-CUK4V52q.js";import"./view-mode-toggle-B55pxnK_.js";import"./combobox-BTfHieW4.js";import"./sandbox-url-D3mC8qhT.js";import"./DotsVertical-E-CAHxZx.js";import"./search-input-pTAwOtCG.js";import"./use-debounced-value-Dju-tMu1.js";import"./asset-utils-Cne_zeGQ.js";import"./sandbox-git-api-C7JbVL7R.js";import"./Building02-QB_UI3sB.js";import"./CheckCircle-CG1RvCMD.js";import"./CreditCard01-W1zS1W7o.js";import"./Globe04-C2IFbCwJ.js";import"./Sun-BmhcFIJl.js";import"./User01-DabbLHAZ.js";import"./Users01-Dt36FENA.js";import"./project-icon-DsUbDdQC.js";import"./new-project-dialog-C5lJfUJ3.js";import"./repository-import-picker-D5xDiyD_.js";import"./repository-picker-DExxlkis.js";import"./required-auth-layout-Dzef4Ao1.js";import"./use-org-sso-B57pfGVG.js";import"./section-preview-url-7zfngvgW.js";function pl(n){return n.schema?.definitions??n.schema?.$defs??{}}function ao(n,e){const s=pl(e),i=s[btoa(n)];if(!i)return[];const l=[i];if(Array.isArray(i.allOf)){const d=i.allOf.find(h=>typeof h.$ref=="string")?.$ref;if(typeof d=="string"){const h=s[d.replace("#/definitions/","")];h&&l.push(h)}}return l}function hl(n,e){for(const s of ao(n,e)){const i=typeof s.image=="string"?s.image:void 0;if(i?.includes("{{{"))return i}}function gl(n,e){if(!e)return;const s=so(n);if(!s)return;const i=hl(s.resolveType,e);if(!i)return;const l=Mi(i,s.data);if(l)return Di(l)}const vl={escape:Pi};function xl(n,e){for(const s of ao(n,e)){const i=typeof s.title=="string"?s.title:void 0;if(i?.includes("{{"))return i}}function yl(n,e){if(!e)return;const s=so(n);if(s)try{const i=xl(s.resolveType,e);return i&&va.render(i,s.data,{},vl).trim()||void 0}catch{return}}function bl(n){const e=ft.c(13),{icon:s,label:i,className:l}=n;let d;e[0]!==l?(d=le("size-3.5",l),e[0]=l,e[1]=d):d=e[1];let h;e[2]!==s||e[3]!==d?(h=o.jsx(s,{className:d}),e[2]=s,e[3]=d,e[4]=h):h=e[4];let u;e[5]!==i||e[6]!==h?(u=o.jsx(_t,{asChild:!0,children:o.jsx("span",{role:"img","aria-label":i,className:"shrink-0 cursor-help",children:h})}),e[5]=i,e[6]=h,e[7]=u):u=e[7];let b;e[8]!==i?(b=o.jsx(kt,{className:"max-w-56",children:i}),e[8]=i,e[9]=b):b=e[9];let g;return e[10]!==u||e[11]!==b?(g=o.jsxs(wt,{children:[u,b]}),e[10]=u,e[11]=b,e[12]=g):g=e[12],g}const Sl="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function qr(n){return Array.from({length:n},(e,s)=>({id:crypto.randomUUID(),index:s}))}function lo(n){return n.map((e,s)=>({...e,index:s}))}function jl(n,e){if(e===n.length)return n;if(e<n.length)return lo(n.slice(0,e));const s=Array.from({length:e-n.length},(i,l)=>({id:crypto.randomUUID(),index:n.length+l}));return[...n,...s]}function co(n){const e=ft.c(44),{section:s,raw:i,meta:l,decofile:d}=n,h=Dt(),u=In(),b=s.isSavedBlock===!0,g=s.isMultivariate===!0;let k;e[0]!==l||e[1]!==i?(k=i&&l?gl(i,l):void 0,e[0]=l,e[1]=i,e[2]=k):k=e[2];const E=k;let U;e[3]!==l||e[4]!==g||e[5]!==i||e[6]!==b?(U=i&&l&&!b&&!g?yl(i,l):void 0,e[3]=l,e[4]=g,e[5]=i,e[6]=b,e[7]=U):U=e[7];const X=U;let F;e[8]!==d||e[9]!==l||e[10]!==i||e[11]!==s?(F=Oi(i,s,d,l),e[8]=d,e[9]=l,e[10]=i,e[11]=s,e[12]=F):F=e[12];const L=F;let f;e[13]!==g||e[14]!==i?.__resolveType?(f=!g&&xs(i?.__resolveType??""),e[13]=g,e[14]=i?.__resolveType,e[15]=f):f=e[15];const A=f,Y=b?Pn:g?no:io;let j;e[16]!==g||e[17]!==b?(j=b?{color:ba}:g?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=g,e[17]=b,e[18]=j):j=e[18];const H=j;let V;e[19]!==Y||e[20]!==u?(V=u?o.jsxs("span",{className:"relative size-4 shrink-0",children:[o.jsx(Y,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),o.jsx(zi,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):o.jsx(ha,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=Y,e[20]=u,e[21]=V):V=e[21];let v;e[22]!==E?(v=E&&o.jsx("img",{src:E,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=E,e[23]=v):v=e[23];let C;e[24]!==u||e[25]!==H?(C=!u&&o.jsx(ds,{className:"h-4 w-4 shrink-0",style:H}),e[24]=u,e[25]=H,e[26]=C):C=e[26];const x=u?"shrink":"flex-1",re=s.isHidden&&"line-through opacity-50";let P;e[27]!==re||e[28]!==x?(P=le("min-w-0 truncate text-sm font-medium",x,re),e[27]=re,e[28]=x,e[29]=P):P=e[29];const oe=X??s.label;let de;e[30]!==P||e[31]!==oe?(de=o.jsx("span",{className:P,children:oe}),e[30]=P,e[31]=oe,e[32]=de):de=e[32];let Z;e[33]!==A||e[34]!==u||e[35]!==L||e[36]!==h?(Z=u?o.jsxs(o.Fragment,{children:[A&&o.jsx(bl,{icon:fs,label:h("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),L&&o.jsx(kr,{}),o.jsx("span",{className:"min-w-0 flex-1"})]}):L&&o.jsx(kr,{className:"absolute -right-0.5 -top-0.5"}),e[33]=A,e[34]=u,e[35]=L,e[36]=h,e[37]=Z):Z=e[37];let te;return e[38]!==de||e[39]!==Z||e[40]!==V||e[41]!==v||e[42]!==C?(te=o.jsxs(o.Fragment,{children:[V,v,C,de,Z]}),e[38]=de,e[39]=Z,e[40]=V,e[41]=v,e[42]=C,e[43]=te):te=e[43],te}const wl="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",_l="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function uo(n,e,s){if(s)return $i({selected:e});const i=n.isSavedBlock===!0,l=n.isMultivariate===!0;return le("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":i?wl:l?_l:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function os(n,e){return le("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":n?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function kl(n){const e=ft.c(90),{section:s,raw:i,meta:l,decofile:d,sortableId:h,selected:u,onSelect:b,onDelete:g,onDuplicate:k,onMakeReusable:E,onToggleHidden:U,onToggleLazy:X,onAddVariant:F,onDetach:L}=n,f=Dt(),A=In(),Y=i?xs(i.__resolveType??""):!1,j=s.isHidden===!0,H=Y||j;let V;e[0]!==s?(V=ro(s),e[0]=s,e[1]=V):V=e[1];const v=V;let C;e[2]!==h?(C={id:h,animateLayoutChanges:Al},e[2]=h,e[3]=C):C=e[3];const{attributes:x,listeners:re,setNodeRef:P,transform:oe,isDragging:de}=Za(C);let Z;e[4]!==oe?(Z=Ja.Transform.toString(oe?{...oe,x:0}:null),e[4]=oe,e[5]=Z):Z=e[5];const te=de?0:void 0;let S;e[6]!==Z||e[7]!==te?(S={transform:Z,opacity:te},e[6]=Z,e[7]=te,e[8]=S):S=e[8];const W=S;let je;e[9]!==s?(je=Ii(s),e[9]=s,e[10]=je):je=e[10];const K=je,He="button",G=0;let Ee;e[11]!==b?(Ee=ee=>{(ee.key==="Enter"||ee.key===" ")&&(ee.preventDefault(),b())},e[11]=b,e[12]=Ee):Ee=e[12];const xe=de?"cursor-grabbing":"cursor-pointer";let Re;e[13]!==A||e[14]!==s||e[15]!==u||e[16]!==xe?(Re=le("touch-none transition-colors",xe,uo(s,u,A)),e[13]=A,e[14]=s,e[15]=u,e[16]=xe,e[17]=Re):Re=e[17];let Be;e[18]!==d||e[19]!==l||e[20]!==i||e[21]!==s?(Be=o.jsx(co,{section:s,raw:i,meta:l,decofile:d}),e[18]=d,e[19]=l,e[20]=i,e[21]=s,e[22]=Be):Be=e[22];const we=!A&&!s.isMultivariate&&o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:le(os(H,Y)),onClick:ee=>{ee.stopPropagation(),X()},onPointerDown:Rl,children:o.jsx(fs,{className:le("h-3.5 w-3.5",Y&&"text-warning")})})}),o.jsx(kt,{side:"bottom",children:f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),ie=A?o.jsx(Bi,{label:f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:j,onToggle:U,children:j?o.jsx(Lr,{className:"h-3.5 w-3.5"}):o.jsx(Or,{className:"h-3.5 w-3.5"})}):o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:le(os(H,j)),onClick:ee=>{ee.stopPropagation(),U()},onPointerDown:El,children:j?o.jsx(Lr,{className:"h-3.5 w-3.5"}):o.jsx(Or,{className:"h-3.5 w-3.5"})})}),o.jsx(kt,{side:"bottom",children:f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),B=Ei,O=Fi;let I;e[23]!==f?(I=f("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=f,e[24]=I):I=e[24];const D=le(os(H,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let Ce;e[25]!==O||e[26]!==I||e[27]!==D?(Ce=o.jsx(O,{label:I,classicClassName:D}),e[25]=O,e[26]=I,e[27]=D,e[28]=Ce):Ce=e[28];let Ye;e[29]!==A||e[30]!==Y||e[31]!==X||e[32]!==s.isMultivariate||e[33]!==f?(Ye=A&&!s.isMultivariate&&o.jsxs(o.Fragment,{children:[o.jsxs(Qt,{onClick:ee=>{ee.stopPropagation(),X()},children:[o.jsx(fs,{className:"h-4 w-4"}),f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),o.jsx(ki,{})]}),e[29]=A,e[30]=Y,e[31]=X,e[32]=s.isMultivariate,e[33]=f,e[34]=Ye):Ye=e[34];let Je;e[35]!==k?(Je=ee=>{ee.stopPropagation(),k()},e[35]=k,e[36]=Je):Je=e[36];let tt;e[37]===Symbol.for("react.memo_cache_sentinel")?(tt=o.jsx(za,{className:"h-4 w-4"}),e[37]=tt):tt=e[37];let ne;e[38]!==f?(ne=f("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=f,e[39]=ne):ne=e[39];let ye;e[40]!==Je||e[41]!==ne?(ye=o.jsxs(Qt,{onClick:Je,children:[tt,ne]}),e[40]=Je,e[41]=ne,e[42]=ye):ye=e[42];let Fe;e[43]!==A||e[44]!==v||e[45]!==F||e[46]!==f?(Fe=v&&o.jsxs(Qt,{className:le(!A&&Li),onClick:ee=>{ee.stopPropagation(),F()},children:[o.jsx(no,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=A,e[44]=v,e[45]=F,e[46]=f,e[47]=Fe):Fe=e[47];let Te;e[48]!==A||e[49]!==K||e[50]!==E||e[51]!==f?(Te=K&&o.jsxs(Qt,{className:le(!A&&Sl),onClick:ee=>{ee.stopPropagation(),E()},children:[A?o.jsx(Pn,{className:"h-4 w-4"}):o.jsx(ds,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=A,e[49]=K,e[50]=E,e[51]=f,e[52]=Te):Te=e[52];let fe;e[53]!==A||e[54]!==L||e[55]!==s.isMultivariate||e[56]!==s.isSavedBlock||e[57]!==f?(fe=s.isSavedBlock===!0&&!s.isMultivariate&&o.jsxs(Qt,{onClick:ee=>{ee.stopPropagation(),L()},children:[A?o.jsx(io,{className:"h-4 w-4"}):o.jsx(ds,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=A,e[54]=L,e[55]=s.isMultivariate,e[56]=s.isSavedBlock,e[57]=f,e[58]=fe):fe=e[58];let Ve;e[59]!==g?(Ve=ee=>{ee.stopPropagation(),g()},e[59]=g,e[60]=Ve):Ve=e[60];let Pe;e[61]===Symbol.for("react.memo_cache_sentinel")?(Pe=o.jsx(Wa,{className:"h-4 w-4"}),e[61]=Pe):Pe=e[61];let Qe;e[62]!==f?(Qe=f("sectionsEditor.sectionList.deleteMenuItem"),e[62]=f,e[63]=Qe):Qe=e[63];let Ae;e[64]!==Ve||e[65]!==Qe?(Ae=o.jsxs(Qt,{variant:"destructive",onClick:Ve,children:[Pe,Qe]}),e[64]=Ve,e[65]=Qe,e[66]=Ae):Ae=e[66];let We;e[67]!==Ye||e[68]!==ye||e[69]!==Fe||e[70]!==Te||e[71]!==fe||e[72]!==Ae?(We=o.jsxs(Ri,{align:"end",className:"w-44",children:[Ye,ye,Fe,Te,fe,Ae]}),e[67]=Ye,e[68]=ye,e[69]=Fe,e[70]=Te,e[71]=fe,e[72]=Ae,e[73]=We):We=e[73];let Le;e[74]!==B||e[75]!==Ce||e[76]!==We?(Le=o.jsxs(B,{children:[Ce,We]}),e[74]=B,e[75]=Ce,e[76]=We,e[77]=Le):Le=e[77];let Ge;return e[78]!==x||e[79]!==re||e[80]!==b||e[81]!==P||e[82]!==W||e[83]!==Re||e[84]!==Be||e[85]!==we||e[86]!==ie||e[87]!==Le||e[88]!==Ee?(Ge=o.jsxs("div",{ref:P,style:W,...x,...re,role:He,tabIndex:G,onClick:b,onKeyDown:Ee,className:Re,children:[Be,we,ie,Le]}),e[78]=x,e[79]=re,e[80]=b,e[81]=P,e[82]=W,e[83]=Re,e[84]=Be,e[85]=we,e[86]=ie,e[87]=Le,e[88]=Ee,e[89]=Ge):Ge=e[89],Ge}function El(n){return n.stopPropagation()}function Rl(n){return n.stopPropagation()}function Al(){return!1}function ms(n){const e=ft.c(11),{canAddSection:s,onAddSection:i,className:l,size:d}=n,h=Dt();let u;e[0]!==l?(u=le("w-full",l),e[0]=l,e[1]=u):u=e[1];const b=!s;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Ha,{size:14}),e[2]=g):g=e[2];let k;e[3]!==h?(k=h("sectionsEditor.sectionList.addSectionButton"),e[3]=h,e[4]=k):k=e[4];let E;return e[5]!==i||e[6]!==d||e[7]!==u||e[8]!==b||e[9]!==k?(E=o.jsxs(xt,{type:"button",variant:"outline",size:d,className:u,disabled:b,onClick:i,children:[g,k]}),e[5]=i,e[6]=d,e[7]=u,e[8]=b,e[9]=k,e[10]=E):E=e[10],E}function Nl(n){const e=ft.c(101),{listKey:s,rawSections:i,sections:l,meta:d,decofile:h,selectedIndex:u,onSelect:b,onReorder:g,onDelete:k,onDuplicate:E,onMakeReusable:U,onToggleHidden:X,onToggleLazy:F,onAddVariant:L,onDetach:f,onAddSection:A,canAddSection:Y}=n,j=Y===void 0?!0:Y,H=Dt(),V=In();let v;e[0]!==l.length?(v=()=>qr(l.length),e[0]=l.length,e[1]=v):v=e[1];const[C,x]=w.useState(v),[re,P]=w.useState(null),[oe,de]=w.useState(s),[Z,te]=w.useState(l.length),S=w.useRef(!1);oe!==s?(de(s),te(l.length),x(qr(l.length))):Z!==l.length&&(te(l.length),x(nt=>jl(nt,l.length)));let W;e[2]===Symbol.for("react.memo_cache_sentinel")?(W={activationConstraint:{distance:8}},e[2]=W):W=e[2];let je;e[3]===Symbol.for("react.memo_cache_sentinel")?(je={coordinateGetter:el},e[3]=je):je=e[3];const K=Ga($r(Ua,W),$r(qa,je));let He;e[4]!==C?(He=C.map(Cl),e[4]=C,e[5]=He):He=e[5];const G=He;let Ee;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ee=nt=>{P(String(nt.active.id))},e[6]=Ee):Ee=e[6];const xe=Ee;let Re;e[7]!==G||e[8]!==g?(Re=nt=>{P(null);const{active:se,over:pe}=nt;if(!pe||se.id===pe.id)return;const rt=G.indexOf(String(se.id)),ce=G.indexOf(String(pe.id));rt===-1||ce===-1||(x(it=>lo(Mn([...it],rt,ce))),S.current=!0,requestAnimationFrame(()=>{S.current=!1}),g?.(rt,ce))},e[7]=G,e[8]=g,e[9]=Re):Re=e[9];const Be=Re;let we;e[10]===Symbol.for("react.memo_cache_sentinel")?(we=()=>{P(null)},e[10]=we):we=e[10];const ie=we;let B,O,I,D,Ce,Ye,Je,tt,ne,ye,Fe,Te,fe,Ve,Pe;if(e[11]!==re||e[12]!==j||e[13]!==V||e[14]!==h||e[15]!==C||e[16]!==G||e[17]!==Be||e[18]!==d||e[19]!==A||e[20]!==L||e[21]!==k||e[22]!==f||e[23]!==E||e[24]!==U||e[25]!==b||e[26]!==X||e[27]!==F||e[28]!==i||e[29]!==l||e[30]!==u||e[31]!==K||e[32]!==H){Ve=Symbol.for("react.early_return_sentinel");e:{const nt=se=>{S.current||b(se)};if(e[48]!==re||e[49]!==j||e[50]!==V||e[51]!==C||e[52]!==A||e[53]!==i||e[54]!==l||e[55]!==H){const se=re?C.find(pe=>pe.id===re):null;if(D=se!=null?l[se.index]:null,I=se!=null?i[se.index]:void 0,C.length===0){let pe;e[59]!==H?(pe=H("sectionsEditor.sectionList.noSections"),e[59]=H,e[60]=pe):pe=e[60];let rt;e[61]!==pe?(rt=o.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:pe}),e[61]=pe,e[62]=rt):rt=e[62];const ce=rt;let it;e[63]!==j||e[64]!==V||e[65]!==ce||e[66]!==A?(it=V?ce:o.jsxs("div",{className:"space-y-2",children:[ce,o.jsx(ms,{canAddSection:j,onAddSection:A,size:"sm"})]}),e[63]=j,e[64]=V,e[65]=ce,e[66]=A,e[67]=it):it=e[67],Ve=it;break e}fe=le(se&&"cursor-grabbing"),e[48]=re,e[49]=j,e[50]=V,e[51]=C,e[52]=A,e[53]=i,e[54]=l,e[55]=H,e[56]=I,e[57]=D,e[58]=fe}else I=e[56],D=e[57],fe=e[58];O=Qa,tt=K,ne=Xa,ye=xe,Fe=Be,Te=ie,B=tl,Ye=G,Je=nl,Pe="space-y-1",Ce=C.map(se=>{const pe=l[se.index];return pe?o.jsx(kl,{sortableId:se.id,section:pe,raw:i[se.index],meta:d,decofile:h,selected:u===se.index,onSelect:()=>nt(se.index),onDelete:()=>k(se.index),onDuplicate:()=>E(se.index),onMakeReusable:()=>U(se.index),onToggleHidden:()=>X(se.index),onToggleLazy:()=>F(se.index),onAddVariant:()=>L(se.index),onDetach:()=>f(se.index)},se.id):null})}e[11]=re,e[12]=j,e[13]=V,e[14]=h,e[15]=C,e[16]=G,e[17]=Be,e[18]=d,e[19]=A,e[20]=L,e[21]=k,e[22]=f,e[23]=E,e[24]=U,e[25]=b,e[26]=X,e[27]=F,e[28]=i,e[29]=l,e[30]=u,e[31]=K,e[32]=H,e[33]=B,e[34]=O,e[35]=I,e[36]=D,e[37]=Ce,e[38]=Ye,e[39]=Je,e[40]=tt,e[41]=ne,e[42]=ye,e[43]=Fe,e[44]=Te,e[45]=fe,e[46]=Ve,e[47]=Pe}else B=e[33],O=e[34],I=e[35],D=e[36],Ce=e[37],Ye=e[38],Je=e[39],tt=e[40],ne=e[41],ye=e[42],Fe=e[43],Te=e[44],fe=e[45],Ve=e[46],Pe=e[47];if(Ve!==Symbol.for("react.early_return_sentinel"))return Ve;let Qe;e[68]!==Ce||e[69]!==Pe?(Qe=o.jsx("div",{className:Pe,children:Ce}),e[68]=Ce,e[69]=Pe,e[70]=Qe):Qe=e[70];let Ae;e[71]!==B||e[72]!==Ye||e[73]!==Je||e[74]!==Qe?(Ae=o.jsx(B,{items:Ye,strategy:Je,children:Qe}),e[71]=B,e[72]=Ye,e[73]=Je,e[74]=Qe,e[75]=Ae):Ae=e[75];let We;e[76]!==I||e[77]!==D||e[78]!==V||e[79]!==h||e[80]!==d?(We=D?o.jsx("div",{className:le("cursor-grabbing shadow-lg ring-1 ring-border/60",uo(D,!1,V)),children:o.jsx(co,{section:D,raw:I,meta:d,decofile:h})}):null,e[76]=I,e[77]=D,e[78]=V,e[79]=h,e[80]=d,e[81]=We):We=e[81];let Le;e[82]!==We?(Le=_i.createPortal(o.jsx(Ya,{dropAnimation:Ki,children:We}),document.body),e[82]=We,e[83]=Le):Le=e[83];let Ge;e[84]!==O||e[85]!==tt||e[86]!==ne||e[87]!==ye||e[88]!==Fe||e[89]!==Te||e[90]!==Ae||e[91]!==Le?(Ge=o.jsxs(O,{sensors:tt,collisionDetection:ne,onDragStart:ye,onDragEnd:Fe,onDragCancel:Te,children:[Ae,Le]}),e[84]=O,e[85]=tt,e[86]=ne,e[87]=ye,e[88]=Fe,e[89]=Te,e[90]=Ae,e[91]=Le,e[92]=Ge):Ge=e[92];let ee;e[93]!==j||e[94]!==V||e[95]!==A?(ee=!V&&o.jsx(ms,{canAddSection:j,onAddSection:A,size:"sm",className:"mt-2"}),e[93]=j,e[94]=V,e[95]=A,e[96]=ee):ee=e[96];let zt;return e[97]!==fe||e[98]!==Ge||e[99]!==ee?(zt=o.jsxs("div",{className:fe,children:[Ge,ee]}),e[97]=fe,e[98]=Ge,e[99]=ee,e[100]=zt):zt=e[100],zt}function Cl(n){return n.id}function is(n,e,s,i){if(!n||!e)return null;if(!e.isMultivariate)return jt(n,e,i)?.data??null;const l=pt(n,e),d=l?ls(l,vt)[s]:void 0;return d?oo(d.value,i)?.data??null:null}const Tl=50;function Vl(n,e){n.own.push(ze(e)),n.own.length>Tl&&n.own.shift()}function Ur(n,e){return n.own.includes(ze(e))}function Ml(n,e){const{sectionIndex:s,variantIndex:i,shown:l,next:d,sectionCount:h}=e;return n&&n.sectionIndex===s&&n.variantIndex===i&&n.emitted===l?(n.emitted=d,n):l?{sectionIndex:s,variantIndex:i,base:l,emitted:d,sectionCount:h,own:[ze(l)]}:null}function fo(n,e){return e!==null&&ze(n)!==ze(e)}function mo(n,e){return n.__resolveType!==e.__resolveType}function Dl(n,e,s,i){if(e.length===i)return"here";const l=ze(n),d=e.flatMap((h,u)=>u!==s&&h!==null&&ze(h)===l?[u]:[]);return d.length===1?d[0]:"unknown"}function Pl({merged:n,tracked:e,current:s,saved:i}){return!!n&&!!e&&s===e&&e.emitted===i}function Kl(n,e){return!!n&&!!e&&n.contains(e)}function ps(n){const e=[],s=hs("",n.ancestor,n.mine,n.theirs,e);return{...n,merged:s,pointers:e}}function hs(n,e,s,i,l){const d=(h,u)=>ze(h)===ze(u);if(d(s,i)||d(e,i))return s;if(d(e,s))return i;if(as(s)&&as(i)){const h=as(e)?e:{},u={},b=[...Object.keys(s),...Object.keys(i).filter(g=>!(g in s))];for(const g of b){const k=hs(`${n}/${g.replaceAll("~","~0").replaceAll("/","~1")}`,h[g],s[g],i[g],l);k!==void 0&&(u[g]=k)}return u}return Array.isArray(e)&&Array.isArray(s)&&Array.isArray(i)&&s.length===e.length&&i.length===e.length?e.map((h,u)=>hs(`${n}/${u}`,h,s[u],i[u],l)):(l.push(n),i)}function as(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}function Il(n,e){let s=n.merged;for(const i of n.pointers)e[i]==="mine"&&(s=Ol(s,i,$t(n.mine,i)));return s}function Bl(n,e){return Object.fromEntries(n.pointers.map(s=>[s,e]))}function po(n){return Bl(n,"mine")}function gs(n,e,s){const i=po(s);for(const l of s.pointers){const d=e[l];if(!d||!n.pointers.includes(l))continue;["mine","theirs"].every(u=>ze($t(n[u],l))===ze($t(s[u],l)))&&(i[l]=d)}return i}function ho(n,e,s={}){const i=e.pointers.filter(l=>!n.pointers.includes(l)||ze($t(n.theirs,l))!==ze($t(e.theirs,l)));return i.length===0?s:{...s,...Object.fromEntries(i.map(l=>[l,(s[l]??0)+1]))}}function Fl(n,e,s){if(!e||mo(n.plan.ancestor,e)||!fo(n.plan.theirs,e)||s(e))return null;const i=ps({...n.plan,theirs:e});return i.pointers.length===0?null:{plan:i,choices:gs(n.plan,n.choices,i),fresh:ho(n.plan,i,n.fresh)}}function Ll(n,e){return n.pointers.map(s=>({pointer:s,label:Hi(s,e),mine:$t(n.mine,s),theirs:$t(n.theirs,s),schema:$l(e??null,s)}))}function ys(n){return n.split("/").slice(1).map(e=>e.replaceAll("~1","/").replaceAll("~0","~"))}function $t(n,e){let s=n;for(const i of ys(e))if(Array.isArray(s))s=s[Number(i)];else if(s&&typeof s=="object")s=s[i];else return;return s}function Ol(n,e,s){const i=ys(e),l=(d,h)=>{if(h===i.length)return s;const u=i[h];if(Array.isArray(d)){const k=[...d];return k[Number(u)]=l(d[Number(u)],h+1),k}const b=d&&typeof d=="object"?{...d}:{},g=l(b[u],h+1);return g===void 0?delete b[u]:b[u]=g,b};return l(n,0)}function $l(n,e){let s=n;for(const i of ys(e)){if(!s)return null;s=/^\d+$/.test(i)&&!s.properties?.[i]?s.items:s.properties?.[i]}return s??null}const zl=/\.(png|jpe?g|gif|webp|avif|svg)(\?.*)?$/i,Yr=60,Hl=3;function go(n,e){return e?.format==="image-uri"?!0:n.startsWith("data:image/")||/^(https?:)?\/\//.test(n)&&zl.test(n)}function vs(n,e){if(!(e?.format==="rich-text"||e?.format==="rich-text-inline"||e?.format==="html"||/<\/?[a-z][^>]*>/i.test(n)))return n;const i=n.replace(/<br\s*\/?>/gi,`
1
+ import{c as ft,b as Dt,r as w,l as le,j as o,b1 as _i,B as xt,U as Qt,au as ki,X as Ei,V as Ri,a as Ai,o as Ni,h as Ci,t as z,K as Ti}from"./index-BnoCrGwV.js";import{u as Vi}from"./chat-context-BMIrv5uH.js";import{u as In}from"./use-new-blocks-editor-CHx1p4ni.js";import{J as Mi,K as Di,N as Pi,O as Ki,Q as Ii,T as Bi,U as Fi,V as Li,W as Oi,X as kr,Y as $i,Z as zi,G as jt,_ as vt,$ as ze,a0 as Hi,H as Tn,E as Vn,e as Wi,f as Gi,j as qi,u as Ui,a1 as Er,o as Yi,a2 as Ji,q as Qi,n as Xi,a3 as to,p as vn,a4 as Zi,a5 as ea,C as Rr,a6 as ta,a7 as na,a8 as Nn,a9 as Ar,aa as Nr,ab as Cr,ac as ss,ad as sa,ae as ra,F as oa,af as Tr,ag as ia,ah as Vr,ai as Mr,M as aa,aj as Dr,d as la,ak as mn,al as ca,am as ua,an as pn,ao as da}from"./runnable-block-editor-gl-EMkKx.js";import{c as fa}from"./repository-binding-C8cI0_BR.js";import{n as ma,t as pa}from"./ChevronUp-Di-YfZWV.js";import{a6 as no,d as Pn,ak as ha,C as ga,$ as Pr,K as Kr}from"./agent-icon-BVzFWL_k.js";import{S as Xt}from"./scroll-area-ClXMKXdj.js";import{b as wt,T as _t,a as kt}from"./tooltip-D58qe9VW.js";import{m as va,u as xa,P as ya}from"./mustache-Dnm8KPo2.js";import{au as so,c as xs,av as ro,G as ba,aw as pt,ax as ls,ay as oo,ak as Ot,a8 as cs,az as us,al as Mt,a9 as Zt,j as Sa,l as ja,g as wa,r as Cn,ao as _a,aj as hn,aa as rs,ai as Vt,ah as gn,aA as ka,K as Ea,aB as Ra,am as Ir,a2 as Br,aC as Aa,aD as Lt,aE as Na,aF as Ca,aG as Ta,aH as Fr,aI as Va,aJ as Ma,aK as Da,ag as Pa,aL as Ka,aM as Ia,aN as Ba,X as Fa,aO as La,af as Oa,aP as $a}from"./claim-phase-copy-CukA7Dwd.js";import{a as za}from"./Copy01-CvnGuZZ3.js";import{a as ds,e as io}from"./UserSquare-CEGUDYl2.js";import{i as Lr}from"./Tool01-DqVqi_FU.js";import{s as Or}from"./Image01-WncLby5J.js";import{s as Ha}from"./Plus-C7i72Ui0.js";import{s as Wa}from"./Trash01-BdVvG1w5.js";import{i as fs}from"./ZoomOut-CePPHC89.js";import{u as Ga,a as $r,K as qa,P as Ua,b as Ya,C as Ja,D as Qa,c as Xa}from"./core.esm-Dilbpce_.js";import{u as Za,s as el,a as Mn,S as tl,v as nl}from"./sortable.esm-Di32jx09.js";import{A as zr}from"./avatar-Du8JG5EY.js";import{e as sl,d as Hr,b as rl,A as ol,a as il,f as al}from"./alert-dialog-DTOyag1c.js";import{d as ll}from"./shell-layout-CEs2Lzv8.js";import{a as cl,P as Wr,b as ul}from"./page-seo-form-DPSCL9_1.js";import{u as dl,A as fl}from"./use-section-preview-base-f9n8yDn_.js";import{b as Gr,a as ml}from"./variant-matcher-override-CxhYuii7.js";import"./use-panel-navigate-DAoDF43u.js";import"./thread-route-BPs4zslo.js";import"./use-project-scope-C3zEyt8p.js";import"./autosend-ACmUx5MO.js";import"./thread-intent-CXunryww.js";import"./use-mcp-client-F8qIxKEF.js";import"./auth-BM0B-cGs.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BpjjRSV_.js";import"./task-board-l22wFLNQ.js";import"./schema-Cwz0xn-Q.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-DAjIYzO8.js";import"./use-ai-providers-Fk-ioKuC.js";import"./use-chat-navigation-zHRcYkWa.js";import"./location-BjlyegC2.js";import"./use-organization-settings-DE6EFzZl.js";import"./input-D4UgTJ69.js";import"./usage-stats-BL57yImZ.js";import"./tool-namespace-BCIJDBpU.js";import"./form-qApBoH9w.js";import"./label-D0foYPWf.js";import"./utils-CVEq3hMx.js";import"./markdown-mBxXiRvM.js";import"./use-copy-DKdPALi_.js";import"./use-mobile-BKee5QTm.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./XClose-ByJq3z1t.js";import"./icon-button-CTsUwdOO.js";import"./file-type-icon-BRADjmum.js";import"./chat-draft-_hxvCJKw.js";import"./LinkBroken01-SQZX7UHe.js";import"./ArrowUp-DESKNNlf.js";import"./ShoppingBag01-E-rUyhpG.js";import"./Upload01-CEQBjXAP.js";import"./AlertCircle-DVHl2wob.js";import"./select-4dFEgKOb.js";import"./index-BdQq_4o_.js";import"./index-B5YiUV4I.js";import"./ArrowLeft-5wXFDAmZ.js";import"./tabs-Bm8-oaP0.js";import"./use-deco-credits-D9reDEA1.js";import"./toggle-group-D6lQXGki.js";import"./use-open-billing-url-B8yYvcNp.js";import"./index-IBL9WNsl.js";import"./checkbox-DvQZTmm6.js";import"./ChevronSelectorVertical-KK06uLTv.js";import"./Key01-Bhf2mFGP.js";import"./SearchMd--I1GEx-C.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-CZgg0RSg.js";import"./popover-DeebArTG.js";import"./drawer-BXTiY6dg.js";import"./input-Dwwabqbj.js";import"./suggestion-DZ2maKDk.js";import"./use-chat-layout-state-DXfMGuIM.js";import"./use-file-configs-vHZ4c2kM.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-BOuduomf.js";import"./use-org-fs-CfbJ-qpv.js";import"./useInfiniteQuery-CrNtEvb5.js";import"./infiniteQueryObserver-DzxIYVHF.js";import"./Link01-vjT_tIt-.js";import"./question-004-sINsf4GQ.js";import"./use-members-CbU4crhI.js";import"./use-org-auth-client-DUhvuYX9.js";import"./feature-paywall-CqkVt_-T.js";import"./plan-ladder-CuhqhssD.js";import"./add-connection-dialog-Cd8-TxBb.js";import"./collection-search-Bo7KXUbF.js";import"./extract-connection-data-DykkXLPs.js";import"./metadata-D72DunRR.js";import"./connection-BV0Ji7-y.js";import"./url-slug-BeoES-bn.js";import"./connection-card-BGBC1Vy2.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-DcBDH52f.js";import"./textarea-DoDVPYV2.js";import"./use-connection-CWYEcZtk.js";import"./schema-BPpEaREa.js";import"./connection-form-helpers-DgicL3qY.js";import"./authenticate-and-persist-oauth-BRn95Iqc.js";import"./mcp-oauth-CS16PRCo.js";import"./mcp-oauth-Dg0thBi5.js";import"./collection-tabs-DCHbr1Vt.js";import"./badge-BEq8f8Nc.js";import"./use-infinite-scroll-IKS1f5vo.js";import"./useSuspenseInfiniteQuery-Ag6TKbPs.js";import"./use-task-board-events-BMlQSCd3.js";import"./Play-CSVNLFwP.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-xBw_CC4U.js";import"./collapsible-CRuF_99G.js";import"./use-clock-tick-Dz0tKfh3.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DMqJU_ff.js";import"./types-BPkPu0Zu.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CV4TQLcF.js";import"./use-navigate-to-agent-LQKyEvv0.js";import"./use-thread-outputs-v6xfPIih.js";import"./command-BSyD71wq.js";import"./index-DJa5VNJ9.js";import"./utils-DkhoCm_9.js";import"./monaco-editor-CPeZZpu3.js";import"./editor-BO3RLENr.js";import"./calendar-DpEcLQ6J.js";import"./SwitchHorizontal01-DCGuISL6.js";import"./rich-text-link-control-BJZoQZZi.js";import"./switch-Dl_eh6Nb.js";import"./view-mode-toggle-Oj88POra.js";import"./combobox-DocJ2-jK.js";import"./sandbox-url-D3mC8qhT.js";import"./DotsVertical-B8mqV8lL.js";import"./search-input-BPlE2YGC.js";import"./use-debounced-value-Bkmt--Vh.js";import"./asset-utils-CDOZckz4.js";import"./sandbox-git-api-C7JbVL7R.js";import"./Building02-CFiq1p9R.js";import"./CheckCircle-DAvSmLHO.js";import"./CreditCard01-CpFAcFMU.js";import"./Globe04-CCXvQu2N.js";import"./Sun-D612nlCs.js";import"./User01-DzMieRdG.js";import"./Users01-CW8HA66N.js";import"./project-icon-B64BT2qc.js";import"./new-project-dialog-Cqt9GN_i.js";import"./repository-import-picker-BKAJgfVd.js";import"./repository-picker-F2WyjZCv.js";import"./required-auth-layout-C7-28_EU.js";import"./use-org-sso-7gybTWnn.js";import"./section-preview-url-7zfngvgW.js";function pl(n){return n.schema?.definitions??n.schema?.$defs??{}}function ao(n,e){const s=pl(e),i=s[btoa(n)];if(!i)return[];const l=[i];if(Array.isArray(i.allOf)){const d=i.allOf.find(h=>typeof h.$ref=="string")?.$ref;if(typeof d=="string"){const h=s[d.replace("#/definitions/","")];h&&l.push(h)}}return l}function hl(n,e){for(const s of ao(n,e)){const i=typeof s.image=="string"?s.image:void 0;if(i?.includes("{{{"))return i}}function gl(n,e){if(!e)return;const s=so(n);if(!s)return;const i=hl(s.resolveType,e);if(!i)return;const l=Mi(i,s.data);if(l)return Di(l)}const vl={escape:Pi};function xl(n,e){for(const s of ao(n,e)){const i=typeof s.title=="string"?s.title:void 0;if(i?.includes("{{"))return i}}function yl(n,e){if(!e)return;const s=so(n);if(s)try{const i=xl(s.resolveType,e);return i&&va.render(i,s.data,{},vl).trim()||void 0}catch{return}}function bl(n){const e=ft.c(13),{icon:s,label:i,className:l}=n;let d;e[0]!==l?(d=le("size-3.5",l),e[0]=l,e[1]=d):d=e[1];let h;e[2]!==s||e[3]!==d?(h=o.jsx(s,{className:d}),e[2]=s,e[3]=d,e[4]=h):h=e[4];let u;e[5]!==i||e[6]!==h?(u=o.jsx(_t,{asChild:!0,children:o.jsx("span",{role:"img","aria-label":i,className:"shrink-0 cursor-help",children:h})}),e[5]=i,e[6]=h,e[7]=u):u=e[7];let b;e[8]!==i?(b=o.jsx(kt,{className:"max-w-56",children:i}),e[8]=i,e[9]=b):b=e[9];let g;return e[10]!==u||e[11]!==b?(g=o.jsxs(wt,{children:[u,b]}),e[10]=u,e[11]=b,e[12]=g):g=e[12],g}const Sl="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function qr(n){return Array.from({length:n},(e,s)=>({id:crypto.randomUUID(),index:s}))}function lo(n){return n.map((e,s)=>({...e,index:s}))}function jl(n,e){if(e===n.length)return n;if(e<n.length)return lo(n.slice(0,e));const s=Array.from({length:e-n.length},(i,l)=>({id:crypto.randomUUID(),index:n.length+l}));return[...n,...s]}function co(n){const e=ft.c(44),{section:s,raw:i,meta:l,decofile:d}=n,h=Dt(),u=In(),b=s.isSavedBlock===!0,g=s.isMultivariate===!0;let k;e[0]!==l||e[1]!==i?(k=i&&l?gl(i,l):void 0,e[0]=l,e[1]=i,e[2]=k):k=e[2];const E=k;let U;e[3]!==l||e[4]!==g||e[5]!==i||e[6]!==b?(U=i&&l&&!b&&!g?yl(i,l):void 0,e[3]=l,e[4]=g,e[5]=i,e[6]=b,e[7]=U):U=e[7];const X=U;let F;e[8]!==d||e[9]!==l||e[10]!==i||e[11]!==s?(F=Oi(i,s,d,l),e[8]=d,e[9]=l,e[10]=i,e[11]=s,e[12]=F):F=e[12];const L=F;let f;e[13]!==g||e[14]!==i?.__resolveType?(f=!g&&xs(i?.__resolveType??""),e[13]=g,e[14]=i?.__resolveType,e[15]=f):f=e[15];const A=f,Y=b?Pn:g?no:io;let j;e[16]!==g||e[17]!==b?(j=b?{color:ba}:g?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=g,e[17]=b,e[18]=j):j=e[18];const H=j;let V;e[19]!==Y||e[20]!==u?(V=u?o.jsxs("span",{className:"relative size-4 shrink-0",children:[o.jsx(Y,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),o.jsx(zi,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):o.jsx(ha,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=Y,e[20]=u,e[21]=V):V=e[21];let v;e[22]!==E?(v=E&&o.jsx("img",{src:E,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=E,e[23]=v):v=e[23];let C;e[24]!==u||e[25]!==H?(C=!u&&o.jsx(ds,{className:"h-4 w-4 shrink-0",style:H}),e[24]=u,e[25]=H,e[26]=C):C=e[26];const x=u?"shrink":"flex-1",re=s.isHidden&&"line-through opacity-50";let P;e[27]!==re||e[28]!==x?(P=le("min-w-0 truncate text-sm font-medium",x,re),e[27]=re,e[28]=x,e[29]=P):P=e[29];const oe=X??s.label;let de;e[30]!==P||e[31]!==oe?(de=o.jsx("span",{className:P,children:oe}),e[30]=P,e[31]=oe,e[32]=de):de=e[32];let Z;e[33]!==A||e[34]!==u||e[35]!==L||e[36]!==h?(Z=u?o.jsxs(o.Fragment,{children:[A&&o.jsx(bl,{icon:fs,label:h("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),L&&o.jsx(kr,{}),o.jsx("span",{className:"min-w-0 flex-1"})]}):L&&o.jsx(kr,{className:"absolute -right-0.5 -top-0.5"}),e[33]=A,e[34]=u,e[35]=L,e[36]=h,e[37]=Z):Z=e[37];let te;return e[38]!==de||e[39]!==Z||e[40]!==V||e[41]!==v||e[42]!==C?(te=o.jsxs(o.Fragment,{children:[V,v,C,de,Z]}),e[38]=de,e[39]=Z,e[40]=V,e[41]=v,e[42]=C,e[43]=te):te=e[43],te}const wl="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",_l="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function uo(n,e,s){if(s)return $i({selected:e});const i=n.isSavedBlock===!0,l=n.isMultivariate===!0;return le("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":i?wl:l?_l:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function os(n,e){return le("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":n?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function kl(n){const e=ft.c(90),{section:s,raw:i,meta:l,decofile:d,sortableId:h,selected:u,onSelect:b,onDelete:g,onDuplicate:k,onMakeReusable:E,onToggleHidden:U,onToggleLazy:X,onAddVariant:F,onDetach:L}=n,f=Dt(),A=In(),Y=i?xs(i.__resolveType??""):!1,j=s.isHidden===!0,H=Y||j;let V;e[0]!==s?(V=ro(s),e[0]=s,e[1]=V):V=e[1];const v=V;let C;e[2]!==h?(C={id:h,animateLayoutChanges:Al},e[2]=h,e[3]=C):C=e[3];const{attributes:x,listeners:re,setNodeRef:P,transform:oe,isDragging:de}=Za(C);let Z;e[4]!==oe?(Z=Ja.Transform.toString(oe?{...oe,x:0}:null),e[4]=oe,e[5]=Z):Z=e[5];const te=de?0:void 0;let S;e[6]!==Z||e[7]!==te?(S={transform:Z,opacity:te},e[6]=Z,e[7]=te,e[8]=S):S=e[8];const W=S;let je;e[9]!==s?(je=Ii(s),e[9]=s,e[10]=je):je=e[10];const K=je,He="button",G=0;let Ee;e[11]!==b?(Ee=ee=>{(ee.key==="Enter"||ee.key===" ")&&(ee.preventDefault(),b())},e[11]=b,e[12]=Ee):Ee=e[12];const xe=de?"cursor-grabbing":"cursor-pointer";let Re;e[13]!==A||e[14]!==s||e[15]!==u||e[16]!==xe?(Re=le("touch-none transition-colors",xe,uo(s,u,A)),e[13]=A,e[14]=s,e[15]=u,e[16]=xe,e[17]=Re):Re=e[17];let Be;e[18]!==d||e[19]!==l||e[20]!==i||e[21]!==s?(Be=o.jsx(co,{section:s,raw:i,meta:l,decofile:d}),e[18]=d,e[19]=l,e[20]=i,e[21]=s,e[22]=Be):Be=e[22];const we=!A&&!s.isMultivariate&&o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:le(os(H,Y)),onClick:ee=>{ee.stopPropagation(),X()},onPointerDown:Rl,children:o.jsx(fs,{className:le("h-3.5 w-3.5",Y&&"text-warning")})})}),o.jsx(kt,{side:"bottom",children:f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),ie=A?o.jsx(Bi,{label:f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:j,onToggle:U,children:j?o.jsx(Lr,{className:"h-3.5 w-3.5"}):o.jsx(Or,{className:"h-3.5 w-3.5"})}):o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:le(os(H,j)),onClick:ee=>{ee.stopPropagation(),U()},onPointerDown:El,children:j?o.jsx(Lr,{className:"h-3.5 w-3.5"}):o.jsx(Or,{className:"h-3.5 w-3.5"})})}),o.jsx(kt,{side:"bottom",children:f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),B=Ei,O=Fi;let I;e[23]!==f?(I=f("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=f,e[24]=I):I=e[24];const D=le(os(H,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let Ce;e[25]!==O||e[26]!==I||e[27]!==D?(Ce=o.jsx(O,{label:I,classicClassName:D}),e[25]=O,e[26]=I,e[27]=D,e[28]=Ce):Ce=e[28];let Ye;e[29]!==A||e[30]!==Y||e[31]!==X||e[32]!==s.isMultivariate||e[33]!==f?(Ye=A&&!s.isMultivariate&&o.jsxs(o.Fragment,{children:[o.jsxs(Qt,{onClick:ee=>{ee.stopPropagation(),X()},children:[o.jsx(fs,{className:"h-4 w-4"}),f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),o.jsx(ki,{})]}),e[29]=A,e[30]=Y,e[31]=X,e[32]=s.isMultivariate,e[33]=f,e[34]=Ye):Ye=e[34];let Je;e[35]!==k?(Je=ee=>{ee.stopPropagation(),k()},e[35]=k,e[36]=Je):Je=e[36];let tt;e[37]===Symbol.for("react.memo_cache_sentinel")?(tt=o.jsx(za,{className:"h-4 w-4"}),e[37]=tt):tt=e[37];let ne;e[38]!==f?(ne=f("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=f,e[39]=ne):ne=e[39];let ye;e[40]!==Je||e[41]!==ne?(ye=o.jsxs(Qt,{onClick:Je,children:[tt,ne]}),e[40]=Je,e[41]=ne,e[42]=ye):ye=e[42];let Fe;e[43]!==A||e[44]!==v||e[45]!==F||e[46]!==f?(Fe=v&&o.jsxs(Qt,{className:le(!A&&Li),onClick:ee=>{ee.stopPropagation(),F()},children:[o.jsx(no,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=A,e[44]=v,e[45]=F,e[46]=f,e[47]=Fe):Fe=e[47];let Te;e[48]!==A||e[49]!==K||e[50]!==E||e[51]!==f?(Te=K&&o.jsxs(Qt,{className:le(!A&&Sl),onClick:ee=>{ee.stopPropagation(),E()},children:[A?o.jsx(Pn,{className:"h-4 w-4"}):o.jsx(ds,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=A,e[49]=K,e[50]=E,e[51]=f,e[52]=Te):Te=e[52];let fe;e[53]!==A||e[54]!==L||e[55]!==s.isMultivariate||e[56]!==s.isSavedBlock||e[57]!==f?(fe=s.isSavedBlock===!0&&!s.isMultivariate&&o.jsxs(Qt,{onClick:ee=>{ee.stopPropagation(),L()},children:[A?o.jsx(io,{className:"h-4 w-4"}):o.jsx(ds,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=A,e[54]=L,e[55]=s.isMultivariate,e[56]=s.isSavedBlock,e[57]=f,e[58]=fe):fe=e[58];let Ve;e[59]!==g?(Ve=ee=>{ee.stopPropagation(),g()},e[59]=g,e[60]=Ve):Ve=e[60];let Pe;e[61]===Symbol.for("react.memo_cache_sentinel")?(Pe=o.jsx(Wa,{className:"h-4 w-4"}),e[61]=Pe):Pe=e[61];let Qe;e[62]!==f?(Qe=f("sectionsEditor.sectionList.deleteMenuItem"),e[62]=f,e[63]=Qe):Qe=e[63];let Ae;e[64]!==Ve||e[65]!==Qe?(Ae=o.jsxs(Qt,{variant:"destructive",onClick:Ve,children:[Pe,Qe]}),e[64]=Ve,e[65]=Qe,e[66]=Ae):Ae=e[66];let We;e[67]!==Ye||e[68]!==ye||e[69]!==Fe||e[70]!==Te||e[71]!==fe||e[72]!==Ae?(We=o.jsxs(Ri,{align:"end",className:"w-44",children:[Ye,ye,Fe,Te,fe,Ae]}),e[67]=Ye,e[68]=ye,e[69]=Fe,e[70]=Te,e[71]=fe,e[72]=Ae,e[73]=We):We=e[73];let Le;e[74]!==B||e[75]!==Ce||e[76]!==We?(Le=o.jsxs(B,{children:[Ce,We]}),e[74]=B,e[75]=Ce,e[76]=We,e[77]=Le):Le=e[77];let Ge;return e[78]!==x||e[79]!==re||e[80]!==b||e[81]!==P||e[82]!==W||e[83]!==Re||e[84]!==Be||e[85]!==we||e[86]!==ie||e[87]!==Le||e[88]!==Ee?(Ge=o.jsxs("div",{ref:P,style:W,...x,...re,role:He,tabIndex:G,onClick:b,onKeyDown:Ee,className:Re,children:[Be,we,ie,Le]}),e[78]=x,e[79]=re,e[80]=b,e[81]=P,e[82]=W,e[83]=Re,e[84]=Be,e[85]=we,e[86]=ie,e[87]=Le,e[88]=Ee,e[89]=Ge):Ge=e[89],Ge}function El(n){return n.stopPropagation()}function Rl(n){return n.stopPropagation()}function Al(){return!1}function ms(n){const e=ft.c(11),{canAddSection:s,onAddSection:i,className:l,size:d}=n,h=Dt();let u;e[0]!==l?(u=le("w-full",l),e[0]=l,e[1]=u):u=e[1];const b=!s;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Ha,{size:14}),e[2]=g):g=e[2];let k;e[3]!==h?(k=h("sectionsEditor.sectionList.addSectionButton"),e[3]=h,e[4]=k):k=e[4];let E;return e[5]!==i||e[6]!==d||e[7]!==u||e[8]!==b||e[9]!==k?(E=o.jsxs(xt,{type:"button",variant:"outline",size:d,className:u,disabled:b,onClick:i,children:[g,k]}),e[5]=i,e[6]=d,e[7]=u,e[8]=b,e[9]=k,e[10]=E):E=e[10],E}function Nl(n){const e=ft.c(101),{listKey:s,rawSections:i,sections:l,meta:d,decofile:h,selectedIndex:u,onSelect:b,onReorder:g,onDelete:k,onDuplicate:E,onMakeReusable:U,onToggleHidden:X,onToggleLazy:F,onAddVariant:L,onDetach:f,onAddSection:A,canAddSection:Y}=n,j=Y===void 0?!0:Y,H=Dt(),V=In();let v;e[0]!==l.length?(v=()=>qr(l.length),e[0]=l.length,e[1]=v):v=e[1];const[C,x]=w.useState(v),[re,P]=w.useState(null),[oe,de]=w.useState(s),[Z,te]=w.useState(l.length),S=w.useRef(!1);oe!==s?(de(s),te(l.length),x(qr(l.length))):Z!==l.length&&(te(l.length),x(nt=>jl(nt,l.length)));let W;e[2]===Symbol.for("react.memo_cache_sentinel")?(W={activationConstraint:{distance:8}},e[2]=W):W=e[2];let je;e[3]===Symbol.for("react.memo_cache_sentinel")?(je={coordinateGetter:el},e[3]=je):je=e[3];const K=Ga($r(Ua,W),$r(qa,je));let He;e[4]!==C?(He=C.map(Cl),e[4]=C,e[5]=He):He=e[5];const G=He;let Ee;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ee=nt=>{P(String(nt.active.id))},e[6]=Ee):Ee=e[6];const xe=Ee;let Re;e[7]!==G||e[8]!==g?(Re=nt=>{P(null);const{active:se,over:pe}=nt;if(!pe||se.id===pe.id)return;const rt=G.indexOf(String(se.id)),ce=G.indexOf(String(pe.id));rt===-1||ce===-1||(x(it=>lo(Mn([...it],rt,ce))),S.current=!0,requestAnimationFrame(()=>{S.current=!1}),g?.(rt,ce))},e[7]=G,e[8]=g,e[9]=Re):Re=e[9];const Be=Re;let we;e[10]===Symbol.for("react.memo_cache_sentinel")?(we=()=>{P(null)},e[10]=we):we=e[10];const ie=we;let B,O,I,D,Ce,Ye,Je,tt,ne,ye,Fe,Te,fe,Ve,Pe;if(e[11]!==re||e[12]!==j||e[13]!==V||e[14]!==h||e[15]!==C||e[16]!==G||e[17]!==Be||e[18]!==d||e[19]!==A||e[20]!==L||e[21]!==k||e[22]!==f||e[23]!==E||e[24]!==U||e[25]!==b||e[26]!==X||e[27]!==F||e[28]!==i||e[29]!==l||e[30]!==u||e[31]!==K||e[32]!==H){Ve=Symbol.for("react.early_return_sentinel");e:{const nt=se=>{S.current||b(se)};if(e[48]!==re||e[49]!==j||e[50]!==V||e[51]!==C||e[52]!==A||e[53]!==i||e[54]!==l||e[55]!==H){const se=re?C.find(pe=>pe.id===re):null;if(D=se!=null?l[se.index]:null,I=se!=null?i[se.index]:void 0,C.length===0){let pe;e[59]!==H?(pe=H("sectionsEditor.sectionList.noSections"),e[59]=H,e[60]=pe):pe=e[60];let rt;e[61]!==pe?(rt=o.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:pe}),e[61]=pe,e[62]=rt):rt=e[62];const ce=rt;let it;e[63]!==j||e[64]!==V||e[65]!==ce||e[66]!==A?(it=V?ce:o.jsxs("div",{className:"space-y-2",children:[ce,o.jsx(ms,{canAddSection:j,onAddSection:A,size:"sm"})]}),e[63]=j,e[64]=V,e[65]=ce,e[66]=A,e[67]=it):it=e[67],Ve=it;break e}fe=le(se&&"cursor-grabbing"),e[48]=re,e[49]=j,e[50]=V,e[51]=C,e[52]=A,e[53]=i,e[54]=l,e[55]=H,e[56]=I,e[57]=D,e[58]=fe}else I=e[56],D=e[57],fe=e[58];O=Qa,tt=K,ne=Xa,ye=xe,Fe=Be,Te=ie,B=tl,Ye=G,Je=nl,Pe="space-y-1",Ce=C.map(se=>{const pe=l[se.index];return pe?o.jsx(kl,{sortableId:se.id,section:pe,raw:i[se.index],meta:d,decofile:h,selected:u===se.index,onSelect:()=>nt(se.index),onDelete:()=>k(se.index),onDuplicate:()=>E(se.index),onMakeReusable:()=>U(se.index),onToggleHidden:()=>X(se.index),onToggleLazy:()=>F(se.index),onAddVariant:()=>L(se.index),onDetach:()=>f(se.index)},se.id):null})}e[11]=re,e[12]=j,e[13]=V,e[14]=h,e[15]=C,e[16]=G,e[17]=Be,e[18]=d,e[19]=A,e[20]=L,e[21]=k,e[22]=f,e[23]=E,e[24]=U,e[25]=b,e[26]=X,e[27]=F,e[28]=i,e[29]=l,e[30]=u,e[31]=K,e[32]=H,e[33]=B,e[34]=O,e[35]=I,e[36]=D,e[37]=Ce,e[38]=Ye,e[39]=Je,e[40]=tt,e[41]=ne,e[42]=ye,e[43]=Fe,e[44]=Te,e[45]=fe,e[46]=Ve,e[47]=Pe}else B=e[33],O=e[34],I=e[35],D=e[36],Ce=e[37],Ye=e[38],Je=e[39],tt=e[40],ne=e[41],ye=e[42],Fe=e[43],Te=e[44],fe=e[45],Ve=e[46],Pe=e[47];if(Ve!==Symbol.for("react.early_return_sentinel"))return Ve;let Qe;e[68]!==Ce||e[69]!==Pe?(Qe=o.jsx("div",{className:Pe,children:Ce}),e[68]=Ce,e[69]=Pe,e[70]=Qe):Qe=e[70];let Ae;e[71]!==B||e[72]!==Ye||e[73]!==Je||e[74]!==Qe?(Ae=o.jsx(B,{items:Ye,strategy:Je,children:Qe}),e[71]=B,e[72]=Ye,e[73]=Je,e[74]=Qe,e[75]=Ae):Ae=e[75];let We;e[76]!==I||e[77]!==D||e[78]!==V||e[79]!==h||e[80]!==d?(We=D?o.jsx("div",{className:le("cursor-grabbing shadow-lg ring-1 ring-border/60",uo(D,!1,V)),children:o.jsx(co,{section:D,raw:I,meta:d,decofile:h})}):null,e[76]=I,e[77]=D,e[78]=V,e[79]=h,e[80]=d,e[81]=We):We=e[81];let Le;e[82]!==We?(Le=_i.createPortal(o.jsx(Ya,{dropAnimation:Ki,children:We}),document.body),e[82]=We,e[83]=Le):Le=e[83];let Ge;e[84]!==O||e[85]!==tt||e[86]!==ne||e[87]!==ye||e[88]!==Fe||e[89]!==Te||e[90]!==Ae||e[91]!==Le?(Ge=o.jsxs(O,{sensors:tt,collisionDetection:ne,onDragStart:ye,onDragEnd:Fe,onDragCancel:Te,children:[Ae,Le]}),e[84]=O,e[85]=tt,e[86]=ne,e[87]=ye,e[88]=Fe,e[89]=Te,e[90]=Ae,e[91]=Le,e[92]=Ge):Ge=e[92];let ee;e[93]!==j||e[94]!==V||e[95]!==A?(ee=!V&&o.jsx(ms,{canAddSection:j,onAddSection:A,size:"sm",className:"mt-2"}),e[93]=j,e[94]=V,e[95]=A,e[96]=ee):ee=e[96];let zt;return e[97]!==fe||e[98]!==Ge||e[99]!==ee?(zt=o.jsxs("div",{className:fe,children:[Ge,ee]}),e[97]=fe,e[98]=Ge,e[99]=ee,e[100]=zt):zt=e[100],zt}function Cl(n){return n.id}function is(n,e,s,i){if(!n||!e)return null;if(!e.isMultivariate)return jt(n,e,i)?.data??null;const l=pt(n,e),d=l?ls(l,vt)[s]:void 0;return d?oo(d.value,i)?.data??null:null}const Tl=50;function Vl(n,e){n.own.push(ze(e)),n.own.length>Tl&&n.own.shift()}function Ur(n,e){return n.own.includes(ze(e))}function Ml(n,e){const{sectionIndex:s,variantIndex:i,shown:l,next:d,sectionCount:h}=e;return n&&n.sectionIndex===s&&n.variantIndex===i&&n.emitted===l?(n.emitted=d,n):l?{sectionIndex:s,variantIndex:i,base:l,emitted:d,sectionCount:h,own:[ze(l)]}:null}function fo(n,e){return e!==null&&ze(n)!==ze(e)}function mo(n,e){return n.__resolveType!==e.__resolveType}function Dl(n,e,s,i){if(e.length===i)return"here";const l=ze(n),d=e.flatMap((h,u)=>u!==s&&h!==null&&ze(h)===l?[u]:[]);return d.length===1?d[0]:"unknown"}function Pl({merged:n,tracked:e,current:s,saved:i}){return!!n&&!!e&&s===e&&e.emitted===i}function Kl(n,e){return!!n&&!!e&&n.contains(e)}function ps(n){const e=[],s=hs("",n.ancestor,n.mine,n.theirs,e);return{...n,merged:s,pointers:e}}function hs(n,e,s,i,l){const d=(h,u)=>ze(h)===ze(u);if(d(s,i)||d(e,i))return s;if(d(e,s))return i;if(as(s)&&as(i)){const h=as(e)?e:{},u={},b=[...Object.keys(s),...Object.keys(i).filter(g=>!(g in s))];for(const g of b){const k=hs(`${n}/${g.replaceAll("~","~0").replaceAll("/","~1")}`,h[g],s[g],i[g],l);k!==void 0&&(u[g]=k)}return u}return Array.isArray(e)&&Array.isArray(s)&&Array.isArray(i)&&s.length===e.length&&i.length===e.length?e.map((h,u)=>hs(`${n}/${u}`,h,s[u],i[u],l)):(l.push(n),i)}function as(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}function Il(n,e){let s=n.merged;for(const i of n.pointers)e[i]==="mine"&&(s=Ol(s,i,$t(n.mine,i)));return s}function Bl(n,e){return Object.fromEntries(n.pointers.map(s=>[s,e]))}function po(n){return Bl(n,"mine")}function gs(n,e,s){const i=po(s);for(const l of s.pointers){const d=e[l];if(!d||!n.pointers.includes(l))continue;["mine","theirs"].every(u=>ze($t(n[u],l))===ze($t(s[u],l)))&&(i[l]=d)}return i}function ho(n,e,s={}){const i=e.pointers.filter(l=>!n.pointers.includes(l)||ze($t(n.theirs,l))!==ze($t(e.theirs,l)));return i.length===0?s:{...s,...Object.fromEntries(i.map(l=>[l,(s[l]??0)+1]))}}function Fl(n,e,s){if(!e||mo(n.plan.ancestor,e)||!fo(n.plan.theirs,e)||s(e))return null;const i=ps({...n.plan,theirs:e});return i.pointers.length===0?null:{plan:i,choices:gs(n.plan,n.choices,i),fresh:ho(n.plan,i,n.fresh)}}function Ll(n,e){return n.pointers.map(s=>({pointer:s,label:Hi(s,e),mine:$t(n.mine,s),theirs:$t(n.theirs,s),schema:$l(e??null,s)}))}function ys(n){return n.split("/").slice(1).map(e=>e.replaceAll("~1","/").replaceAll("~0","~"))}function $t(n,e){let s=n;for(const i of ys(e))if(Array.isArray(s))s=s[Number(i)];else if(s&&typeof s=="object")s=s[i];else return;return s}function Ol(n,e,s){const i=ys(e),l=(d,h)=>{if(h===i.length)return s;const u=i[h];if(Array.isArray(d)){const k=[...d];return k[Number(u)]=l(d[Number(u)],h+1),k}const b=d&&typeof d=="object"?{...d}:{},g=l(b[u],h+1);return g===void 0?delete b[u]:b[u]=g,b};return l(n,0)}function $l(n,e){let s=n;for(const i of ys(e)){if(!s)return null;s=/^\d+$/.test(i)&&!s.properties?.[i]?s.items:s.properties?.[i]}return s??null}const zl=/\.(png|jpe?g|gif|webp|avif|svg)(\?.*)?$/i,Yr=60,Hl=3;function go(n,e){return e?.format==="image-uri"?!0:n.startsWith("data:image/")||/^(https?:)?\/\//.test(n)&&zl.test(n)}function vs(n,e){if(!(e?.format==="rich-text"||e?.format==="rich-text-inline"||e?.format==="html"||/<\/?[a-z][^>]*>/i.test(n)))return n;const i=n.replace(/<br\s*\/?>/gi,`
2
2
  `).replace(/<\/(p|div|li|h[1-6])>/gi,`
3
3
  `);return Gl(i).replace(/\u00a0/g," ").replace(/\n{2,}/g,`
4
4
  `).trim()}const Wl={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};function Gl(n){if(typeof DOMParser<"u")return new DOMParser().parseFromString(n,"text/html").body.textContent??"";let e=n;for(let s="";s!==e;)s=e,e=e.replace(/<[^<>]*>/g,"");return e.replace(/<|>/g,"").replace(/&(nbsp|amp|lt|gt|quot|#39);/g,s=>Wl[s]??s)}function Dn(n){const e=n.replace(/\s+/g," ").trim();return e.length>Yr?`${e.slice(0,Yr-1)}…`:e}function ql(n){if(n.startsWith("data:"))return"image";const e=n.split(/[?#]/)[0]??n;return decodeURIComponent(e.split("/").pop()||n)}function Kn(n,e){if(n==null||n==="")return{kind:"empty"};if(typeof n=="string")return go(n,e)?{kind:"image",src:n}:{kind:"text",text:vs(n,e)};if(typeof n=="number"||typeof n=="bigint")return{kind:"text",text:String(n)};if(typeof n=="boolean")return{kind:"yesNo",value:n};if(Array.isArray(n)){const s=e?.items??null;return{kind:"list",count:n.length,items:n.slice(0,Hl).map(i=>Ul(i,s)??"")}}if(typeof n=="object"){const s=n;if("value"in s&&Object.keys(s).length<=2)return Kn(s.value,e?.properties?.value??e);const i=Object.entries(s).filter(([l,d])=>!l.startsWith("__")&&d!==void 0).flatMap(([l,d])=>{const h=e?.properties?.[l]??null,u=Kn(d,h);if(u.kind==="empty")return[];const b=u.kind==="text"?Dn(u.text):u.kind==="image"?ql(u.src):u.kind==="yesNo"?u.value?"✓":"✗":u.kind==="list"?`${u.count}`:"…";return[{label:h?.title?.trim()||l,text:b}]}).slice(0,4);return i.length>0?{kind:"fields",entries:i}:{kind:"empty"}}return{kind:"text",text:String(n)}}function Ul(n,e){if(typeof n=="string")return Dn(vs(n,e));if(!n||typeof n!="object"||Array.isArray(n))return null;const s=n,i=e?.titleBy,l=i?s[i]:void 0;if(typeof l=="string"&&l.trim())return Dn(l);for(const[d,h]of Object.entries(s))if(!(d.startsWith("__")||typeof h!="string"||!h.trim())&&!go(h,e?.properties?.[d]??null))return Dn(vs(h,null));return null}const Jr=1500;function Yl(n,e){const s=n.split(/(\s+)/).filter(k=>k!==""),i=e.split(/(\s+)/).filter(k=>k!=="");if(s.length>Jr||i.length>Jr)return{mine:[{text:n,kind:"changed"}],theirs:[{text:e,kind:"changed"}]};const l=Array.from({length:s.length+1},()=>new Array(i.length+1).fill(0));for(let k=s.length-1;k>=0;k--)for(let E=i.length-1;E>=0;E--){const U=l[k];U[E]=s[k]===i[E]?l[k+1][E+1]+1:Math.max(l[k+1][E],U[E+1])}const d=[],h=[],u=(k,E,U)=>{const X=k.at(-1);X&&(X.kind===U||U==="same"&&!E.trim())?X.text+=E:k.push({text:E,kind:U})};let b=0,g=0;for(;b<s.length&&g<i.length;)s[b]===i[g]?(u(d,s[b],"same"),u(h,i[g],"same"),b++,g++):l[b+1][g]>=l[b][g+1]?(u(d,s[b],"changed"),b++):(u(h,i[g],"changed"),g++);for(;b<s.length;b++)u(d,s[b],"changed");for(;g<i.length;g++)u(h,i[g],"changed");return{mine:d,theirs:h}}function Jl(n){const e=ft.c(10);let s,i;e[0]!==n?({open:s,...i}=n,e[0]=n,e[1]=s,e[2]=i):(s=e[1],i=e[2]);const{data:l}=Ai.useSession();let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=le("max-h-[85vh] grid-rows-[auto_minmax(0,1fr)_auto] sm:max-w-lg"),e[3]=d):d=e[3];const h=l?.user??null;let u;e[4]!==i||e[5]!==h?(u=o.jsx(sl,{className:d,"data-testid":"form-conflict-dialog",onEscapeKeyDown:Zl,onOpenAutoFocus:Xl,children:o.jsx(oc,{...i,viewer:h,heading:Ql})}),e[4]=i,e[5]=h,e[6]=u):u=e[6];let b;return e[7]!==s||e[8]!==u?(b=o.jsx(al,{open:s,children:u}),e[7]=s,e[8]=u,e[9]=b):b=e[9],b}function Ql(n,e){return o.jsxs(rl,{className:"text-left",children:[o.jsx(ol,{children:n}),o.jsx(il,{children:e})]})}function Xl(n){n.preventDefault(),n.currentTarget?.focus()}function Zl(n){return n.preventDefault()}const ec={},tc=(n,e)=>o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("h2",{className:"text-lg font-semibold",children:n}),o.jsx("p",{className:"text-sm text-muted-foreground",children:e})]});function nc(n,e,s=0,i={}){const l=e[Math.min(s,e.length-1)],d={field:l?rc(l.label):"",label:l?.label??""};return e.length<=1?{title:n("sectionsEditor.formConflict.titleOne",d),description:n("sectionsEditor.formConflict.descriptionOne")}:{title:n("sectionsEditor.formConflict.titleStep",d),description:s>=e.length-1?o.jsx(sc,{t:n,fields:e,choices:i}):n("sectionsEditor.formConflict.descriptionStep")}}function sc(n){const e=ft.c(9),{t:s,fields:i,choices:l}=n;let d;if(e[0]!==l||e[1]!==i||e[2]!==s){let u;e[4]!==l||e[5]!==s?(u=(b,g)=>o.jsxs(w.Fragment,{children:[g>0&&" · ",`${b.label}: `,o.jsx("span",{className:"font-medium text-foreground",children:s((l[b.pointer]??"mine")==="mine"?"sectionsEditor.formConflict.summaryYours":"sectionsEditor.formConflict.summaryTheirs")})]},b.pointer),e[4]=l,e[5]=s,e[6]=u):u=e[6],d=i.map(u),e[0]=l,e[1]=i,e[2]=s,e[3]=d}else d=e[3];let h;return e[7]!==d?(h=o.jsx("span",{"data-testid":"form-conflict-summary",children:d}),e[7]=d,e[8]=h):h=e[8],h}function rc(n){return/^[A-Z][a-z]/.test(n)&&!n.includes("›")?n.charAt(0).toLowerCase()+n.slice(1):n}function oc(n){const e=ft.c(68),s=Dt(),{fields:i,choices:l,changedAgain:d,fresh:h,heading:u}=n,b=d===void 0?!1:d,g=h===void 0?ec:h,k=u===void 0?tc:u,E=i.length>1,[U,X]=w.useState(0),[F,L]=w.useState(ic);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={},e[0]=f):f=e[0];const[A,Y]=w.useState(f),j=Math.max(0,Math.min(U,i.length-1)),H=i[j],V=j===i.length-1;let v;e[1]!==j||e[2]!==i||e[3]!==g?(v=we=>{const ie=i[j],B=i[we];!ie||!B||we===j||(L(O=>new Set(O).add(ie.pointer)),Y(O=>({...O,[ie.pointer]:g[ie.pointer]??0,[B.pointer]:g[B.pointer]??0})),X(we))},e[1]=j,e[2]=i,e[3]=g,e[4]=v):v=e[4];const C=v;let x;e[5]!==j||e[6]!==C?(x=we=>{if(!we)return;const ie=B=>{const O={ArrowLeft:-1,ArrowRight:1}[B.key];!O||B.defaultPrevented||B.altKey||B.ctrlKey||B.metaKey||B.shiftKey||ll(B.target)||(B.preventDefault(),C(j+O))};return we.ownerDocument.addEventListener("keydown",ie),()=>we.ownerDocument.removeEventListener("keydown",ie)},e[5]=j,e[6]=C,e[7]=x):x=e[7];const re=x;if(!H)return null;let P,oe,de,Z,te;if(e[8]!==F||e[9]!==j||e[10]!==l||e[11]!==i||e[12]!==g||e[13]!==C||e[14]!==k||e[15]!==re||e[16]!==E||e[17]!==n||e[18]!==A||e[19]!==s){const{title:we,description:ie}=nc(s,i,j,l);let B;e[25]!==n?(B=O=>{O.detail>1||n.onApply()},e[25]=n,e[26]=B):B=e[26],P=B,oe=E?re:void 0,de="flex min-w-0 flex-col gap-3",e[27]!==F||e[28]!==j||e[29]!==i||e[30]!==g||e[31]!==C||e[32]!==E||e[33]!==A||e[34]!==s?(Z=E&&o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsx("div",{role:"group","aria-label":s("sectionsEditor.formConflict.steps"),className:"-m-1 flex flex-wrap items-center",children:i.map((O,I)=>{const D=I!==j&&(g[O.pointer]??0)>(A[O.pointer]??0);return o.jsx("button",{type:"button","aria-label":D?s("sectionsEditor.formConflict.stepChangedAgain",{label:O.label}):O.label,"aria-current":I===j?"step":void 0,"data-answered":I!==j&&F.has(O.pointer)?"":void 0,"data-changed-again":D?"":void 0,onClick:()=>C(I),className:"group cursor-pointer rounded-full p-1 outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:o.jsx("span",{className:le("block h-2 w-2 rounded-full bg-border transition-[width,background-color,box-shadow] motion-reduce:transition-none","group-hover:bg-muted-foreground/60","group-data-[answered]:bg-foreground/45","group-aria-[current=step]:w-5 group-aria-[current=step]:bg-foreground","group-data-[changed-again]:ring-2 group-data-[changed-again]:ring-warning group-data-[changed-again]:ring-offset-1 group-data-[changed-again]:ring-offset-background")})},O.pointer)})}),o.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:s("sectionsEditor.formConflict.stepCount",{step:String(j+1),count:String(i.length)})})]}),e[27]=F,e[28]=j,e[29]=i,e[30]=g,e[31]=C,e[32]=E,e[33]=A,e[34]=s,e[35]=Z):Z=e[35],te=k(we,ie),e[8]=F,e[9]=j,e[10]=l,e[11]=i,e[12]=g,e[13]=C,e[14]=k,e[15]=re,e[16]=E,e[17]=n,e[18]=A,e[19]=s,e[20]=P,e[21]=oe,e[22]=de,e[23]=Z,e[24]=te}else P=e[20],oe=e[21],de=e[22],Z=e[23],te=e[24];let S;e[36]!==oe||e[37]!==de||e[38]!==Z||e[39]!==te?(S=o.jsxs("div",{ref:oe,className:de,children:[Z,te]}),e[36]=oe,e[37]=de,e[38]=Z,e[39]=te,e[40]=S):S=e[40];const W=!b&&"sr-only";let je;e[41]!==W?(je=le("text-sm text-muted-foreground",W),e[41]=W,e[42]=je):je=e[42];let K;e[43]!==b||e[44]!==E||e[45]!==s?(K=b?s(E?"sectionsEditor.formConflict.changedAgainSteps":"sectionsEditor.formConflict.changedAgain"):"",e[43]=b,e[44]=E,e[45]=s,e[46]=K):K=e[46];let He;e[47]!==je||e[48]!==K?(He=o.jsx("p",{role:"status",className:je,children:K}),e[47]=je,e[48]=K,e[49]=He):He=e[49];const G=E?"vertical":"all";let Ee;e[50]!==H||e[51]!==n||e[52]!==G?(Ee=o.jsx(uc,{field:H,...n,arrows:G}),e[50]=H,e[51]=n,e[52]=G,e[53]=Ee):Ee=e[53];let xe;e[54]!==He||e[55]!==Ee?(xe=o.jsxs("div",{className:"-mx-2 flex min-h-0 flex-col gap-3 overflow-y-auto px-2 py-1",children:[He,Ee]}),e[54]=He,e[55]=Ee,e[56]=xe):xe=e[56];let Re;e[57]!==P||e[58]!==j||e[59]!==C||e[60]!==V||e[61]!==E||e[62]!==s?(Re=E?o.jsxs(Hr,{className:"flex-row flex-wrap items-center justify-between gap-2 sm:justify-between",children:[o.jsx(xt,{type:"button",variant:"outline","aria-disabled":j===0,onClick:()=>C(j-1),className:"aria-disabled:cursor-default aria-disabled:opacity-45",children:s("sectionsEditor.formConflict.back")}),o.jsx(xt,{type:"button","data-testid":"form-conflict-primary",onClick:V?P:()=>C(j+1),children:s(V?"sectionsEditor.formConflict.ok":"sectionsEditor.formConflict.next")})]}):o.jsx(Hr,{className:"items-center gap-2",children:o.jsx(xt,{type:"button","data-testid":"form-conflict-primary",onClick:P,children:s("sectionsEditor.formConflict.ok")})}),e[57]=P,e[58]=j,e[59]=C,e[60]=V,e[61]=E,e[62]=s,e[63]=Re):Re=e[63];let Be;return e[64]!==S||e[65]!==xe||e[66]!==Re?(Be=o.jsxs(o.Fragment,{children:[S,xe,Re]}),e[64]=S,e[65]=xe,e[66]=Re,e[67]=Be):Be=e[67],Be}function ic(){return new Set}function ac(n){const e=Kn(n.mine,n.schema),s=Kn(n.theirs,n.schema),i=e.kind==="text"&&s.kind==="text"?Yl(e.text,s.text):null;return l=>i?o.jsx(fc,{parts:i[l]}):o.jsx(pc,{preview:l==="mine"?e:s})}const lc={all:{ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},vertical:{ArrowDown:1,ArrowUp:-1}};function cc(n,e){const s=lc[e][n.key];if(!s)return;const i=[...n.currentTarget.querySelectorAll('[role="radio"]')],l=i.indexOf(document.activeElement);if(l<0)return;n.preventDefault();const d=i[(l+s+i.length)%i.length];d?.focus(),d?.click()}function uc(n){const e=ft.c(59),{field:s,choices:i,viewer:l,onChoose:d,arrows:h}=n,u=Dt();let b,g,k,E,U,X,F,L,f,A,Y,j,H;if(e[0]!==h||e[1]!==i||e[2]!==s||e[3]!==d||e[4]!==u||e[5]!==l?.image||e[6]!==l?.name){const C=ac(s),x=i[s.pointer]??"mine";j="radiogroup",H=s.label,k="flex flex-col gap-2",e[20]!==h?(E=S=>cc(S,h),e[20]=h,e[21]=E):E=e[21];let re;e[22]!==s.pointer||e[23]!==d?(re=()=>d(s.pointer,"mine"),e[22]=s.pointer,e[23]=d,e[24]=re):re=e[24];const P=l?.image??void 0;let oe;e[25]!==u||e[26]!==l?.name?(oe=dc(l?.name)||u("sectionsEditor.formConflict.you"),e[25]=u,e[26]=l?.name,e[27]=oe):oe=e[27];let de;e[28]!==P||e[29]!==oe?(de=o.jsx(zr,{url:P,fallback:oe,shape:"circle",size:"sm",className:"text-xs"}),e[28]=P,e[29]=oe,e[30]=de):de=e[30];let Z;e[31]!==u?(Z=u("sectionsEditor.formConflict.you"),e[31]=u,e[32]=Z):Z=e[32];let te;e[33]!==u?(te=u("sectionsEditor.formConflict.yourVersionNotSaved"),e[33]=u,e[34]=te):te=e[34],U=o.jsx(Qr,{side:"mine",checked:x==="mine",onChoose:re,avatar:de,who:Z,meta:te,children:C("mine")}),b=Qr,g="theirs",X=x==="theirs",e[35]!==s.pointer||e[36]!==d?(F=()=>d(s.pointer,"theirs"),e[35]=s.pointer,e[36]=d,e[37]=F):F=e[37],e[38]===Symbol.for("react.memo_cache_sentinel")?(L=o.jsx(zr,{url:"icon://user",fallback:"",muted:!0,shape:"circle",size:"sm"}),e[38]=L):L=e[38],e[39]!==u?(f=u("sectionsEditor.formConflict.someoneElse"),e[39]=u,e[40]=f):f=e[40],e[41]!==u?(A=u("sectionsEditor.formConflict.theirVersionSaved"),e[41]=u,e[42]=A):A=e[42],Y=C("theirs"),e[0]=h,e[1]=i,e[2]=s,e[3]=d,e[4]=u,e[5]=l?.image,e[6]=l?.name,e[7]=b,e[8]=g,e[9]=k,e[10]=E,e[11]=U,e[12]=X,e[13]=F,e[14]=L,e[15]=f,e[16]=A,e[17]=Y,e[18]=j,e[19]=H}else b=e[7],g=e[8],k=e[9],E=e[10],U=e[11],X=e[12],F=e[13],L=e[14],f=e[15],A=e[16],Y=e[17],j=e[18],H=e[19];let V;e[43]!==b||e[44]!==g||e[45]!==X||e[46]!==F||e[47]!==L||e[48]!==f||e[49]!==A||e[50]!==Y?(V=o.jsx(b,{side:g,checked:X,onChoose:F,avatar:L,who:f,meta:A,children:Y}),e[43]=b,e[44]=g,e[45]=X,e[46]=F,e[47]=L,e[48]=f,e[49]=A,e[50]=Y,e[51]=V):V=e[51];let v;return e[52]!==k||e[53]!==E||e[54]!==U||e[55]!==V||e[56]!==j||e[57]!==H?(v=o.jsxs("div",{role:j,"aria-label":H,className:k,onKeyDown:E,children:[U,V]}),e[52]=k,e[53]=E,e[54]=U,e[55]=V,e[56]=j,e[57]=H,e[58]=v):v=e[58],v}function dc(n){return(n??"").trim().split(/\s+/).filter(Boolean).slice(0,2).map(e=>e.charAt(0).toUpperCase()).join("")}function Qr(n){const e=ft.c(27),{side:s,checked:i,onChoose:l,avatar:d,who:h,meta:u,children:b}=n,g=w.useId(),k=`${g}-who`,E=`${g}-meta ${g}-value`,U=i?0:-1,X=i?"border-primary bg-primary/5 ring-1 ring-primary":"hover:bg-muted/50";let F;e[0]!==X?(F=le("grid w-full cursor-pointer grid-cols-[auto_minmax(0,1fr)] items-start gap-3 rounded-xl border bg-background p-3 text-left transition-[border-color,box-shadow,background-color] outline-none","focus-visible:ring-2 focus-visible:ring-ring/50",X),e[0]=X,e[1]=F):F=e[1];const L=`${g}-who`;let f;e[2]!==L||e[3]!==h?(f=o.jsx("span",{id:L,className:"text-sm font-medium text-foreground",children:h}),e[2]=L,e[3]=h,e[4]=f):f=e[4];const A=`${g}-meta`;let Y;e[5]!==u||e[6]!==A?(Y=o.jsx("span",{id:A,children:u}),e[5]=u,e[6]=A,e[7]=Y):Y=e[7];let j;e[8]!==f||e[9]!==Y?(j=o.jsxs("span",{className:"flex flex-wrap items-baseline gap-x-1.5 text-xs text-muted-foreground",children:[f,Y]}),e[8]=f,e[9]=Y,e[10]=j):j=e[10];const H=`${g}-value`,V=`conflict-${s}`;let v;e[11]!==b||e[12]!==H||e[13]!==V?(v=o.jsx("span",{id:H,"data-testid":V,className:"min-w-0 text-sm",children:b}),e[11]=b,e[12]=H,e[13]=V,e[14]=v):v=e[14];let C;e[15]!==j||e[16]!==v?(C=o.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[j,v]}),e[15]=j,e[16]=v,e[17]=C):C=e[17];let x;return e[18]!==d||e[19]!==i||e[20]!==l||e[21]!==k||e[22]!==C||e[23]!==E||e[24]!==U||e[25]!==F?(x=o.jsxs("button",{type:"button",role:"radio","aria-checked":i,"aria-labelledby":k,"aria-describedby":E,tabIndex:U,onClick:l,className:F,children:[d,C]}),e[18]=d,e[19]=i,e[20]=l,e[21]=k,e[22]=C,e[23]=E,e[24]=U,e[25]=F,e[26]=x):x=e[26],x}function fc(n){const e=ft.c(4),{parts:s}=n;let i;e[0]!==s?(i=s.map(mc),e[0]=s,e[1]=i):i=e[1];let l;return e[2]!==i?(l=o.jsx("span",{className:"whitespace-pre-wrap break-words",children:i}),e[2]=i,e[3]=l):l=e[3],l}function mc(n,e){return n.kind==="changed"?o.jsx("mark",{className:"rounded-sm bg-warning/20 px-0.5 text-foreground",children:n.text},e):o.jsx("span",{children:n.text},e)}function pc(n){const e=ft.c(29),{preview:s}=n,i=Dt();switch(s.kind){case"empty":{let l;e[0]!==i?(l=i("sectionsEditor.formConflict.empty"),e[0]=i,e[1]=l):l=e[1];let d;return e[2]!==l?(d=o.jsx("span",{className:"italic text-muted-foreground",children:l}),e[2]=l,e[3]=d):d=e[3],d}case"text":{let l;return e[4]!==s.text?(l=o.jsx("span",{className:"whitespace-pre-wrap break-words",children:s.text}),e[4]=s.text,e[5]=l):l=e[5],l}case"image":{let l;return e[6]!==s.src?(l=o.jsx("img",{src:s.src,alt:"",className:"max-h-24 max-w-full rounded border object-contain"}),e[6]=s.src,e[7]=l):l=e[7],l}case"yesNo":{const l=s.value?"sectionsEditor.formConflict.yes":"sectionsEditor.formConflict.no";let d;e[8]!==i||e[9]!==l?(d=i(l),e[8]=i,e[9]=l,e[10]=d):d=e[10];let h;return e[11]!==d?(h=o.jsx("span",{children:d}),e[11]=d,e[12]=h):h=e[12],h}case"list":{const l=s.count===1?"sectionsEditor.formConflict.oneItem":"sectionsEditor.formConflict.items",d=String(s.count);let h;e[13]!==i||e[14]!==l||e[15]!==d?(h=i(l,{count:d}),e[13]=i,e[14]=l,e[15]=d,e[16]=h):h=e[16];let u;e[17]!==h?(u=o.jsx("span",{className:"text-muted-foreground",children:h}),e[17]=h,e[18]=u):u=e[18];let b;e[19]!==s.count||e[20]!==s.items?(b=s.items.some(Boolean)&&o.jsxs("span",{className:"flex flex-col",children:[s.items.map(gc),s.count>s.items.length&&o.jsx("span",{children:"…"})]}),e[19]=s.count,e[20]=s.items,e[21]=b):b=e[21];let g;return e[22]!==u||e[23]!==b?(g=o.jsxs("span",{className:"flex flex-col gap-1",children:[u,b]}),e[22]=u,e[23]=b,e[24]=g):g=e[24],g}case"fields":{let l;e[25]!==s.entries?(l=s.entries.map(hc),e[25]=s.entries,e[26]=l):l=e[26];let d;return e[27]!==l?(d=o.jsx("dl",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-0.5",children:l}),e[27]=l,e[28]=d):d=e[28],d}}}function hc(n){return o.jsxs("div",{className:"contents",children:[o.jsx("dt",{className:"text-muted-foreground",children:n.label}),o.jsx("dd",{className:"truncate",children:n.text})]},n.label)}function gc(n,e){return o.jsx("span",{className:"truncate",children:`${e+1}. ${n||"…"}`},e)}function vc(n,e,s,i){if(!n||typeof n!="object")return{kind:"error",reason:"no-matcher-rule"};const l=e.trim();if(!l)return Ot(n,s,i)?{kind:"inline",blockKey:n.__resolveType??"",inlinedRule:cs(n,s,i)}:{kind:"noop"};const d=us(n,s,i);if(!d)return{kind:"error",reason:"unreadable-rule"};if(d.blockKey)return{kind:"updateBlock",blockKey:d.blockKey,blockData:Mt(d.resolveType,d.data,l)};const h=Tn(l),u=Vn(h,s);return u?{kind:"error",reason:"invalid-block-id",message:u}:{kind:"createBlock",blockId:h,blockData:Mt(d.resolveType,d.data,l),reference:Zt(h)}}const Xr="section-form-stale-save",xc=3,yc=1e3;function Zr(n,e){const s=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:to(e.pageKey?n[e.pageKey]?.sections:void 0,n),i=Math.max(0,Math.min(e.pageVariantIndex,s.length-1)),l=s[i]?.sections??[];return{pageVariants:s,variantIndex:i,rawSections:l,parsedSections:vn(l,n)}}const eo=new WeakMap;let bc=0;function Sc(n){let e=eo.get(n);return e===void 0&&(e=++bc,eo.set(n,e)),e}function wf({orgSlug:n,virtualMcpId:e,branch:s,previewReady:i=!0,previewUrl:l,currentPath:d,activePageBlockKey:h=null,activeGlobalBlockKey:u=null,externalSelection:b,onSaved:g,initialEditSeo:k=!1,onExitSeo:E,onSelectRoot:U,onViewJsonFile:X,onFocusedBlockChange:F,onVariantPreviewOverride:L}){const f=Dt(),A=Vi(),Y=A?.taskId??null,j=i?{orgSlug:n,virtualMcpId:e,branch:s,threadId:Y,previewUrl:l}:null,[H,V]=w.useState([]),{data:v,isLoading:C}=Wi(j,{pollWhile:H.length>0}),{data:x,isLoading:re}=Gi(j),P=In(),oe=A?.virtualMcpId,Z=fa(oe===e?e:null)?.metadata?.siteSlug??null,te=dl({virtualMcpId:e,sandboxUrl:l}),[S,W]=w.useState(null),[je,K]=w.useState(null),[He,G]=w.useState(null),[Ee,xe]=w.useState(0),[Re,Be]=w.useState(void 0),[we,ie]=w.useState(null),[B,O]=w.useState(null),[I,D]=w.useState([]),Ce=w.useRef(null),[Ye,Je]=w.useState(I.length);Ye!==I.length&&(Je(I.length),requestAnimationFrame(()=>{Ce.current&&(Ce.current.scrollTop=0)}));const[tt,ne]=w.useState(0),[ye,Fe]=w.useState(null),[Te,fe]=w.useState(null),[Ve,Pe]=w.useState(null),[Qe,Ae]=w.useState(!1),[We,Le]=w.useState(!1),Ge=w.useRef(null),[ee,zt]=w.useState(!0),[nt,se]=w.useState(!1),[pe,rt]=w.useState(!1),[ce,it]=w.useState(k),[bs,Ss]=w.useState(k);k&&!bs&&(Ss(!0),it(!0),W(null),K(null),G(null),D([])),!k&&bs&&Ss(!1);const[vo,xn]=w.useState(null),[js,Bn]=w.useState(void 0),[ws,Pt]=w.useState([]),[_s,en]=w.useState(0),[Xe,at]=w.useState(0),[xo,Ze]=w.useState(null),[Ht,st]=w.useState(null),[ks,Es]=w.useState(null),yo=Ni(),bo=`${n}/${e}/${s}`,yn=qi({orgSlug:n,virtualMcpId:e,branch:s}),[So,jo]=w.useState(d),[wo,_o]=w.useState(h),[ko,Eo]=w.useState(u);(So!==d||wo!==h||ko!==u)&&(queueMicrotask(()=>yn.flush()),jo(d),_o(h),Eo(u),W(null),K(null),G(null),xe(0),ie(null),O(null),at(0),Ze(null),st(null),D([]),ne(t=>t+1),it(!1),xn(null),Bn(void 0),Pt([]),en(t=>t+1));const me=Ui({orgSlug:n,virtualMcpId:e,branch:s}),tn=la((t,r)=>{me.mutate({blockKey:t,data:r},{onSuccess:()=>g?.(),onError:a=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:a.message}))})}),bn=xa({orgSlug:n,virtualMcpId:e,branch:s}),[Wt,Gt]=w.useState(!1),J=w.useRef(null),qt=w.useRef(null),yt=w.useRef(null),bt=w.useRef(null),Fn=w.useRef({}),Kt=w.useRef(null),nn=w.useRef(!1),sn=w.useRef(!1),qe=w.useRef(new Map),rn=w.useRef(!1),ht=w.useRef([]),Ln=w.useRef(new WeakSet),Oe=w.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Rs,As]=w.useState(0),[Ro,Ao]=w.useState(0),[No,Co]=w.useState(null);if(!i||C||re)return o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(Ci,{className:"size-5 text-muted-foreground"})});if(!v||!x)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const To=Sa(v),ae=!!u,he=ae?null:ja(To,d,h),_=ae?u:he?.key??null,On=ae&&u?v[u]:void 0,Ns=ae&&u&&On?wa(u,On):ae&&u?u:"",on=!ae&&_&&v[_]?v[_]:null,$n=ce&&v&&x&&_&&he?Er(v,{kind:"page",pageKey:_,pageName:String(he.name??""),path:String(he.path??"")},x):null,Vo=ce?on?.seo:void 0,Sn=js!==void 0?js:Vo,Mo=ce?Yi(Sn):void 0,Cs=$n?.seoTypeOptions??[],Ts=ce&&x?Ji(x):"",zn=vo??Mo??{},jn=ce&&$n?cl(zn,$n):null,Vs=ce&&jn&&Qi(Sn)?Cn(jn,x):null,Ms=ce?Xi(v,x)?.seoData:void 0,Ne=ae?[{label:"Default",sections:[{__resolveType:u}]}]:to(on?.sections,v??{}),mt=Ne.length>1,ge=Math.min(Ee,Ne.length-1),ot=Ne[ge],Q=ot?.sections??[],Me=vn(Q,v),Hn=!ae&&_a(on?.sections);if(ae&&u&&ks!==u){Es(u);const t=Q[0],r=Me[0];if(t&&r){W(0),at(0),D([]);const a=jt(t,r,v);a&&(K(a.data),G(a.resolveType),st(null),Ze(null))}}!ae&&ks!==null&&Es(null),Oe.current={rawSections:Q,parsedSections:Me,decofile:v??{},activePageKey:_,pageVariants:Ne,variantIndex:ge,sectionVariantIndex:Xe,selectedSectionIndex:S};const Do=()=>({multivariate:Hn,index:ge,variants:Ne.map(t=>({rule:t.rule}))}),Wn=(t,r)=>{if(!L)return;if(!_||!Hn||t.length<=1){L(null);return}const a=Gr(_,{multivariate:!0,index:r,variants:t},v,x);L(a.length>0?a:null)},Gn=L&&_&&Hn&&mt&&!C&&!re?_:null;if(Gn!==No&&(Co(Gn),Gn)){const t=Ne.map(a=>({rule:a.rule})),r=ge;queueMicrotask(()=>Wn(t,r))}const Ut=(t,r,a)=>{if(!L)return;if(!_){L(null);return}const c=Do(),m=Gr(_,c,v,x);if(!t||r<0){L(m.length>0?m:null);return}const y=ml({pageKey:_,page:c,sectionIndex:r,sectionLazy:Me[r]?.isLazy??!1,mvObj:t,selectedVariantIndex:a,decofile:v,meta:x}),p=[...m,...y];L(p.length>0?p:null)},St=(t,r,a,c=S??-1,m=!1)=>{const y=pt(t,r);if(!y){K(null),G(null),st(null),Ze(null),m&&Ut(null,c,a);return}const R=ls(y,vt)[a];if(!R){K(null),G(null),st(null),Ze(null),m&&Ut(null,c,a);return}const $=oo(R.value,v);K($?.data??null),G($?.resolveType??null);const{resolveType:N,formValue:T}=hn(R.rule,v,x??void 0);st(N),Ze(T),m&&Ut(y,c,a)},an=b?.index;if(b!==void 0&&(b?.seq??null)!==Re&&(Be(b?.seq??null),typeof an=="number")){const t=Q[an],r=Me[an];if(t&&r)if(W(an),at(0),D([]),ne(a=>a+1),r.isMultivariate)St(t,r,0,an);else{const a=jt(t,r,v);a?(K(a.data),G(a.resolveType)):(K(null),G(null)),st(null),Ze(null)}}if(Rs!==Ro){Ao(Rs);const t=S!==null?Q[S]:null,r=S!==null?Me[S]:null;if(t&&r&&S!==null)if(D([]),ne(a=>a+1),r.isMultivariate)St(t,r,Xe,S);else{const a=jt(t,r,v??{});K(a?.data??null),G(a?.resolveType??null)}}const lt=H[0];if(lt){const{formBase:t,target:r}=lt,a=Zr(v,r),c=t.sectionIndex,m=a.rawSections.length===t.sectionCount?is(a.rawSections[c],a.parsedSections[c],r.sectionVariantIndex,v):null,y=Fl(lt,m,p=>Ur(t,p));if(y){const R=[{...lt,...y,changedAgain:!0},...H.slice(1)];ht.current=R,V(R)}}const ln={orgSlug:n,virtualMcpId:e,branch:s,threadId:Y,previewUrl:l??void 0,siteSlug:Z},wn=He&&x?Cn(He,x):null,ct=(t,r)=>{if(!_)return;J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear(),bt.current&&(clearTimeout(bt.current),bt.current=null),yt.current&&(clearTimeout(yt.current),yt.current=null);const a=mn(v,_,t,ge,Ne);me.mutate({blockKey:_,data:a},{onSuccess:()=>r?.onSuccess?.()??g?.(),onError:c=>{r?.onError?.(),z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:c.message}))}})},It=()=>{F?.(null),W(null),rt(!1),K(null),G(null),at(0),Ze(null),st(null),D([]),ne(t=>t+1)},Ds=()=>Kl(Ce.current,document.activeElement),qn=(t=f("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear(),qt.current=null,z.error(t,{id:Xr}),Ds()){rn.current=!0;return}As(r=>r+1)},Ps=()=>{!rn.current||Ds()||ht.current.length>0||J.current!==null||nn.current||sn.current||qe.current.size>0||(rn.current=!1,As(t=>t+1))},Ks=()=>{rn.current&&setTimeout(Ps,0)},Is=t=>{qe.current.size!==0&&setTimeout(()=>{if(nn.current||sn.current)return;const r=[...qe.current.values()];qe.current.clear();for(const a of r)a()},t)},Po=t=>{const{activePageKey:r,variantIndex:a,sectionVariantIndex:c}=Oe.current,m=Kt.current;return{formBase:m?.sectionIndex===t&&m.variantIndex===c?m:null,pageKey:r,global:ae,pageVariantIndex:a,sectionVariantIndex:c,schema:wn}},cn=t=>{ht.current=t,V(t)},Ko=t=>{const r=ht.current,a=r.findIndex(y=>y.formBase===t.formBase),c=a>=0?r[a]:void 0,m=c?r.with(a,{...t,choices:gs(c.plan,c.choices,t.plan),fresh:ho(c.plan,t.plan,c.fresh),changedAgain:c.changedAgain||ze(c.plan.theirs)!==ze(t.plan.theirs)}):[...r,{...t,changedAgain:Ln.current.has(t.formBase)}];cn(m)},Bs=(t,r)=>{const a=ht.current,c=a.findIndex(p=>p.formBase===t),m=a[c];if(!m)return!1;if(ze(m.plan.mine)===ze(r))return!0;const y=ps({...m.plan,mine:r});if(y.pointers.length===0){const p=a.filter(R=>R!==m);return cn(p),!1}return cn(a.with(c,{...m,plan:y,choices:gs(m.plan,m.choices,y)})),!0},Io=t=>{const r=Oe.current;return r.selectedSectionIndex===t.formBase.sectionIndex&&r.activePageKey===t.target.pageKey&&r.variantIndex===t.target.pageVariantIndex&&r.sectionVariantIndex===t.target.sectionVariantIndex},Bo=()=>{const t=ht.current[0];if(!t)return null;const{formBase:r,target:a}=t;J.current&&qt.current?.sectionIndex===r.sectionIndex&&qt.current.sectionVariantIndex===a.sectionVariantIndex&&(clearTimeout(J.current),J.current=null,qt.current=null),qe.current.delete(`${a.pageKey}:${r.sectionIndex}:${a.sectionVariantIndex}`);const c=r.emitted;return c&&typeof c=="object"&&!Bs(r,c)&&un(c,r.sectionIndex,0,a),ht.current[0]??null},Fo=()=>{const t=ht.current[0],r=Bo();if(!r||!t||r.formBase!==t.formBase||r.plan.pointers.some(y=>!t.plan.pointers.includes(y)))return;const a=Il(r.plan,r.choices);cn(ht.current.slice(1));const{formBase:c,target:m}=r;c.base=r.plan.theirs,c.emitted=a,Ln.current.add(c),(Kt.current===c||Io(r))&&(Kt.current=c,K(a),ne(y=>y+1)),un(a,c.sectionIndex,0,m)},Lo=t=>{const[r,...a]=ht.current;r&&cn([{...r,choices:t},...a])},un=(t,r,a=0,c)=>{const m=c??Po(r),y=m.sectionVariantIndex,p=m.formBase,R=qt.current;J.current&&(clearTimeout(J.current),J.current=null,R&&(R.sectionIndex!==r||R.sectionVariantIndex!==y)&&R.write());const $=`${m.pageKey}:${r}:${y}`,N=()=>{if(nn.current||sn.current){qe.current.set($,N);return}const T=typeof t=="function"?t():t;if(p&&Bs(p,T))return;const M=Oe.current.decofile,{rawSections:ue,parsedSections:be,pageVariants:Ie,variantIndex:De}=Zr(M,m),Ue=m.pageKey,q=ue[r];if(!q)return;const ve=be[r];if(!ve)return;const _e=p?.base,$e=is(q,ve,y,M),dt=!!_e&&!!$e&&fo(_e,$e)&&!(p&&Ur(p,$e));if(dt&&_e&&$e){if(mo(_e,$e)){qn(f("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const Se=ve.isSavedBlock?"here":Dl(_e,ue.map((ke,Tt)=>is(ke,be[Tt],y,M)),r,p?.sectionCount??ue.length);if(Se==="unknown"){qn(f("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof Se=="number"&&p){p.sectionCount=ue.length,p.sectionIndex=Se,Kt.current===p&&W(Se),un(T,Se,a,m);return}}const et=dt&&_e&&$e?ps({ancestor:_e,mine:T,theirs:$e}):null;if(et&&et.pointers.length>0&&p){p.sectionCount=ue.length,Ko({plan:et,formBase:p,target:m,sectionIndex:r,choices:po(et),changedAgain:!1,fresh:{}});return}const gt=et?et.merged:null,Ct=gt??T,jr=Pl({merged:!!gt,tracked:p,current:Kt.current,saved:T});gt&&z.info(f("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Xr}),jr&&p&&(p.emitted=gt,K(gt));const ns=jr||!gt?Ct:T;p&&(p.base=ns,p.sectionCount=ue.length,Vl(p,ns));const wr={onSuccess:()=>{p&&Ln.current.delete(p),g?.()},onError:Se=>{if(p?.base===ns&&_e&&(p.base=_e),Se instanceof Fa){a<xc?(qe.current.delete($),sn.current=!0,setTimeout(()=>{sn.current=!1,un(()=>{const ke=p?.emitted;return ke&&typeof ke=="object"?ke:T},r,a+1,m),qe.current.delete($),Is(pn)},yc*2**a)):qn();return}z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:Se.message}))}},_r=Se=>{nn.current=!0;let ke=!1;me.mutateAsync(Se).then(()=>wr.onSuccess(),Tt=>{ke=!0,wr.onError(Tt)}).finally(()=>{nn.current=!1,Is(ke?pn:0),Ps()})};if(ve.isSavedBlock){const Se=da(q,ve);if(!Se)return;_r({blockKey:Se,data:Ct,..._e?{base:{value:gt?$e:_e}}:{},rebaseOnConflict:!1});return}if(!Ue)return;const An={...M[Ue]},Ft=[...ue];if(ve.isMultivariate){const Se=pt(q,ve);if(!Se||!Ue)return;const ke=Ba(Se,y,Ct);Ft[r]=Lt(q,ve,ke)}else if(ve.isHidden){const Se=xs(q.__resolveType),ke=Se?{...q.section}:{...q},Tt=Array.isArray(ke.variants)?[...ke.variants]:[];Tt[0]&&(Tt[0]={...Tt[0],value:Ct}),ke.variants=Tt,Se?Ft[r]={...q,section:ke}:Ft[r]=ke}else ve.isLazy?Ft[r]={...q,section:Ct}:Ft[r]=Ct;if(Ie.length>1){const Se=An.sections,ke=[...Se?.variants??[]];ke[De]&&(ke[De]={...ke[De],value:Ft}),An.sections={...Se,variants:ke}}else An.sections=Ft;_r({blockKey:Ue,data:An,rebaseOnConflict:!1})};qt.current={sectionIndex:r,sectionVariantIndex:y,write:N},J.current=setTimeout(()=>{J.current=null,N()},pn)},Oo=t=>{rn.current=!1,W(t),at(0),D([]),ne(m=>m+1);const r=Q[t],a=Me[t];if(F?.(a?.isSavedBlock?a.resolveType??null:null),!r||!a)return;if(a.isMultivariate){St(r,a,0,t);return}const c=jt(r,a,v);if(!c){K(null),G(null),st(null),Ze(null),Ut(null,t,0);return}K(c.data),G(c.resolveType),st(null),Ze(null),Ut(null,t,0)},Fs=t=>{const r=t;S!==null&&(Kt.current=Ml(Kt.current,{sectionIndex:S,variantIndex:Oe.current.sectionVariantIndex,shown:je,next:r,sectionCount:Oe.current.rawSections.length})),K(r),S!==null&&un(r,S)},Un=t=>{if(!_||!v||!x||!he)return;const r={kind:"page",pageKey:_,pageName:String(he.name??""),path:String(he.path??"")},a=Er(v,r,x);a&&yn.save(_,()=>{const c=yo.getQueryData(Ti.decofile(bo))?.[_];if(!c||typeof c!="object"||c===null||Array.isArray(c))return null;const m={...c,...Fn.current};return Fn.current={},t?.raw!==void 0?{...m,seo:t.raw}:t?.inner!==void 0?ul(r,a,m,t.inner):m})},Ls=(t,r)=>{_&&(Fn.current[t]=r,Un())},$o=(t,r)=>{if(!_)return;const a=Mn([...Q],t,r);S!==null&&(S===t?W(r):t<S&&r>=S?W(S-1):t>S&&r<=S&&W(S+1)),ct(a)},zo=t=>{if(!_)return;const r=Q.filter((a,c)=>c!==t);S===t?It():S!==null&&S>t&&W(S-1),ct(r)},Ho=t=>{if(!_)return;const r=Q[t];if(!r)return;const a=[...Q];a.splice(t+1,0,ca(r)),S!==null&&S>t&&W(S+1),ct(a)},Wo=t=>{if(!_)return;const r=Q[t],a=Me[t];if(!r||!a)return;const c=a.isHidden?Ma(r):Da(r);if(!c)return;const m=[...Q];m[t]=c,S===t&&It(),ct(m)},Go=t=>{if(!_)return;const r=Q[t],a=Me[t];if(!r||!a||a.isMultivariate)return;const c=Va(r);if(!c)return;const m=[...Q];m[t]=c,S===t&&It(),ct(m)},qo=t=>{if(!_)return;const r=Q[t],a=Me[t];if(!r||!a?.isSavedBlock)return;const c=jt(r,a,v);if(!c?.data)return;const{name:m,...y}=c.data,p=[...Q];a.isLazy?p[t]={...r,section:y}:p[t]=y,S===t&&It(),ct(p)},Uo=t=>{if(!_)return;const r=[...Q,{__resolveType:t.resolveType}],a=r.length-1;ct(r,{onError:()=>{Oe.current.selectedSectionIndex===a&&It()}}),Ae(!1),W(a),at(0),D([]),ne(p=>p+1);const c=r[a],m=vn(r,v)[a];if(!c||!m)return;if(m.isMultivariate){St(c,m,0);return}const y=jt(c,m,v);if(!y){K(null),G(null),st(null),Ze(null);return}K(y.data),G(y.resolveType),st(null),Ze(null)},Os=t=>{Ge.current=t.append,Ae(!0)},Yo=t=>{const r=Ge.current;if(!r){Uo(t);return}r({__resolveType:t.resolveType}),Ae(!1),Ge.current=null},$s=t=>{if(S===null)return;const r=Q[S],a=Me[S];!r||!a?.isMultivariate||(at(t),D([]),ne(c=>c+1),St(r,a,t,S,!0))},Jo=t=>{if(S===null||!_)return;const r=Q[S],a=Me[S];if(!r||!a?.isMultivariate)return;const c=pt(r,a);if(!c)return;const m=Ca(c,t);if(!m){z.error(f("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const y=[...Q];y[S]=Lt(r,a,m);const p=m.variants;let R=Xe;t===Xe?R=Math.min(t,p.length-1):t<Xe&&(R=Xe-1),at(R),D([]),ne($=>$+1),St(y[S],a,R),ct(y)},Qo=t=>{if(S===null||!_)return;const r=Q[S],a=Me[S];if(!r||!a?.isMultivariate)return;const c=pt(r,a);if(!c)return;const m=Ta(c,t),y=[...Q];y[S]=Lt(r,a,m);const p=t+1;at(p),D([]),ne(R=>R+1),St(y[S],a,p),ct(y)},Xo=(t,r)=>{if(S===null||!_||t===r)return;const a=Q[S],c=Me[S];if(!a||!c?.isMultivariate)return;const m=pt(a,c);if(!m)return;const y=Aa(m,t,r),p=[...Q];p[S]=Lt(a,c,y);let R=Xe;Xe===t?R=r:t<Xe&&r>=Xe?R=Xe-1:t>Xe&&r<=Xe&&(R=Xe+1),at(R),St(p[S],c,R),ct(p)},dn=t=>{const r=t??S;if(r===null||!_)return;const a=Q[r],c=Me[r];if(!a||!c)return;const m=ka(a,c);if(!m){z.error(f("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const y=[...Q];y[r]=m.section;const p=vn(y,v)[r];if(!p?.isMultivariate){z.error(f("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}W(r),at(m.newVariantIndex),D([]),ne(R=>R+1),St(m.section,p,m.newVariantIndex,r),ct(y)},zs=()=>{if(S===null||!_)return;const t=Q[S],r=Me[S];if(!t||!r?.isMultivariate)return;const a=pt(t,r);if(!a)return;const c=Na(t,r,a);if(!c){z.error(f("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const m=[...Q];m[S]=c;const y=vn(m,v)[S];if(!y)return;at(0),st(null),Ze(null),D([]),ne(R=>R+1);const p=jt(c,y,v);p?(K(p.data),G(p.resolveType)):(K(null),G(null)),Ut(null,S,0),ct(m)},Zo=async t=>{if(ye===null||!_)return;const r=Vn(t,v);if(r){z.error(r);return}const a=Q[ye],c=Me[ye];if(!a||!c)return;const m=jt(a,c,v);if(!m){z.error(f("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const y={...m.data,name:t};try{await me.mutateAsync({blockKey:t,data:y});const p=[...Q];p[ye]={__resolveType:t},await me.mutateAsync({blockKey:_,data:mn(v,_,p,ge,Ne)}),S===ye&&It(),Fe(null),z.success(f("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),g?.()}catch(p){z.error(p instanceof Error?p.message:f("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"))}},Hs=ot?.rule;if(mt&&S===null&&B===null&&Hs){const{resolveType:t,formValue:r}=hn(Hs,v??{},x??void 0);O(t),ie(r)}const Yt=x?Zi(x):[],Yn=x&&v?ea(x,v):[],Ws=!ae&&!!(te&&x&&v),Gs=B&&x?Cn(B,x):null,Et=()=>{yt.current&&(clearTimeout(yt.current),yt.current=null),bt.current&&(clearTimeout(bt.current),bt.current=null)},Bt=async(t,r)=>{if(!(Ia(r,t,x)>0))try{await bn.mutateAsync({blockKey:t})}catch(a){z.error(a instanceof Error?a.message:f("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"))}},qs=t=>{yt.current&&clearTimeout(yt.current),yt.current=setTimeout(()=>{const{activePageKey:r,decofile:a,variantIndex:c}=Oe.current;if(!r)return;const m={...a[r]},y={...m.sections},p=[...y.variants??[]],R=p[c],$=R?.rule;if(Ot($,a,x)){const N=$?.__resolveType??"",T=a[N],M=typeof T?.name=="string"?T.name:N,{__resolveType:ue,...be}=t;me.mutate({blockKey:N,data:Mt(ue??"",be,M)},{onSuccess:()=>g?.(),onError:Ie=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:Ie.message}))});return}R&&(p[c]={...R,rule:t}),m.sections={...y,variants:p},me.mutate({blockKey:r,data:m},{onSuccess:()=>g?.(),onError:N=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:N.message}))})},pn)},Us=t=>{O(t);const r=t?Ir(t,x):{__resolveType:Br};ie(t?r:{}),qs(r)},Ys=t=>{const r=t;ie(r);const a=B?{__resolveType:B,...r}:{...r};qs(a)},Js=async t=>{Et();const{activePageKey:r,decofile:a,variantIndex:c}=Oe.current;if(!r)return;const m=a[r],y=m?.sections;if(!y||typeof y!="object"||Array.isArray(y))return;const p=y;if(!Array.isArray(p.variants))return;const R=[...p.variants],$=R[c];if(!$)return;const N=Vt($.rule,a,x),T=Zt(t);R[c]={...$,rule:T};const M={...a,[r]:{...m,sections:{...p,variants:R}}},{resolveType:ue,formValue:be}=hn(T,M,x??void 0);O(ue),ie(be);try{await me.mutateAsync({blockKey:r,data:M[r]}),N&&N!==t&&await Bt(N,M),g?.()}catch(Ie){z.error(Ie instanceof Error?Ie.message:f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}},Qs=t=>{bt.current&&clearTimeout(bt.current);const{selectedSectionIndex:r,sectionVariantIndex:a}=Oe.current;r!==null&&(bt.current=setTimeout(()=>{const{rawSections:c,parsedSections:m,decofile:y,activePageKey:p,pageVariants:R,variantIndex:$}=Oe.current;if(!p)return;const N=c[r],T=m[r];if(!N||!T?.isMultivariate)return;const M=pt(N,T);if(!M)return;const be=(M.variants??[])[a]?.rule;if(Ot(be,y,x)){const q=be?.__resolveType??"",ve=y[q],_e=typeof ve?.name=="string"?ve.name:q,{__resolveType:$e,...dt}=t;me.mutate({blockKey:q,data:Mt($e??"",dt,_e)},{onSuccess:()=>g?.(),onError:et=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:et.message}))});return}const Ie=Fr(M,a,t),De=[...c];De[r]=Lt(N,T,Ie);const Ue=mn(y,p,De,$,R);me.mutate({blockKey:p,data:Ue},{onSuccess:()=>g?.(),onError:q=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:q.message}))})},pn))},ei=t=>{st(t);const r=t?Ir(t,x):{__resolveType:Br};Ze(t?r:{}),Qs(r)},ti=t=>{const r=t;Ze(r);const a=Ht?{__resolveType:Ht,...r}:{...r};Qs(a)},ni=async t=>{Et();const{selectedSectionIndex:r,sectionVariantIndex:a,rawSections:c,parsedSections:m,decofile:y,activePageKey:p,pageVariants:R,variantIndex:$}=Oe.current;if(r===null||!p)return;const N=c[r],T=m[r];if(!N||!T?.isMultivariate)return;const M=pt(N,T);if(!M)return;const ue=M.variants??[],be=Vt(ue[a]?.rule,y,x),Ie=Zt(t),De=Fr(M,a,Ie),Ue=[...c];Ue[r]=Lt(N,T,De);const q=mn(y,p,Ue,$,R),ve={...y,[p]:q},{resolveType:_e,formValue:$e}=hn(Ie,ve,x??void 0);st(_e),Ze($e);try{await me.mutateAsync({blockKey:p,data:q}),be&&be!==t&&await Bt(be,ve),g?.()}catch(dt){z.error(dt instanceof Error?dt.message:f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}};if(!ae&&!he)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.noPageFound",{currentPath:d})});if(ae&&!On)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.globalBlockNotFound")});const Ke=S!==null?Me[S]??null:null,Xs=S!==null?Q[S]:null,Zs=Xs&&Ke?.isMultivariate?pt(Xs,Ke):null,Rt=Zs?ls(Zs,vt):[],_n=Math.min(Xe,Math.max(Rt.length-1,0)),Jt=Rt[_n]??null,At=Ke?.isMultivariate===!0,Jn=S!==null&&Ke!==null,Nt=Jn&&(At||!!(wn&&je)),si=Nt&&!ae&&Ke?.isSavedBlock===!0,ut=ae||si,er=ae?Ns:Ke?.label??"",ri=Ht&&x?Cn(Ht,x):null,tr=(t,r)=>r&&P?`${t} · ${r}`:t,nr=Ke?Ke.variantOf??Ke.label:"",oi=(()=>{const t=At&&Jt?Jt.label:null;return t?P?[tr(nr,t)]:[Ke.label,t]:[Ke?.label??""]})(),Qn=tr(he?.name??"",mt?ot?.label:null),kn=Nt&&(!ae||I.length>0)?ae?[Ns,...I]:[Qn,...oi,...I]:[],sr=ce&&he?[he.name,"SEO",...ws]:[],rr=f("sectionsEditor.pageVariantTabs.variantsLabel"),or=nt&&he?[he.name,rr]:pe&&he&&Ke?[Qn,nr,rr]:[],En=or.length>0?or:sr.length>0?sr:ut?kn.length>0?kn:[er]:kn.length>0?kn:[Qn],ir=Jn&&!At&&!Ke?.isHidden&&!!_,ii=ut||!ae&&mt&&!!ot||ir,ai=Jn&&!At&&!ae&&I.length===0&&!!Ke&&ro(Ke)&&!!_,li=P&&Nt&&!pe&&At&&I.length===0&&!!Jt,ar=P&&I.length>0?Rr(I[I.length-1]):null,ci=I.length>1?Rr(I[I.length-2]):null,lr=ut?er:Nt?Ke?.label??"":he?.name??"",ui=nt||pe?f("sectionsEditor.pageVariantTabs.variantsLabel"):ce?f("sectionsEditor.panelSections.seo"):ar??lr,cr=pe?Ke?.variantOf??Ke?.label??"":nt||ce?he?.name??"":ar?ci??lr:ut?f("sectionsEditor.sectionsEditor.globalSectionSubtitle"):Nt?he?.name??"":he?.path??"",Xn=!nt&&!pe&&!ce&&!Nt&&!ut,di=!P&&!ce&&!ae&&At&&I.length===0,fn=()=>{if(!_)return;Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const t=v[_],r=Ea(t.sections,Q);if(!r)return;const a=Ra(r);me.mutate({blockKey:_,data:{...t,sections:r}},{onSuccess:()=>{xe(a),W(null),K(null),G(null),D([]),ie(null),O(null)},onError:c=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:c.message}))})},Rn=(t,r,a)=>{if(!_)return;Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const c=v[_],m=c.sections;if(!m||typeof m!="object"||Array.isArray(m))return;const y=m;if(!Array.isArray(y.variants))return;const p=t([...y.variants]);if(!p)return;const R=Ka(y,p),$={...v,[_]:{...c,sections:R}};me.mutate({blockKey:_,data:$[_]},{onSuccess:()=>{r?.();const N=typeof a=="string"?[a]:a??[];(async()=>{for(const T of N)await Bt(T,$)})()},onError:N=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:N.message}))})},Zn=t=>{fe(null),xe(t),W(null),K(null),G(null),D([]);const r=Ne[t]?.rule,{resolveType:a,formValue:c}=hn(r,v??{},x??void 0);O(a),ie(c),Wn(Ne.map(m=>({rule:m.rule})),t)},ur=(t,r)=>{if(t===r)return;let a=ge;ge===t?a=r:t<ge&&r>=ge?a=ge-1:t>ge&&r<=ge&&(a=ge+1),xe(a);const c=Mn(Ne.map(m=>({rule:m.rule})),t,r);Wn(c,a),Rn(m=>Mn(m,t,r))},dr=t=>{const r=Ne[t]?.rule,a=Vt(r,v??{},x??void 0);Rn(c=>c.length<=1?null:(c.splice(t,1),c),()=>{Ne.length-1===1?xe(0):t<ge?xe(ge-1):t===ge&&xe(Math.max(0,t-1)),W(null),K(null),G(null),D([]),ie(null),O(null)},a)},fi=()=>{const t=Ne.map((r,a)=>({variant:r,index:a})).filter(({variant:r})=>!Pa(r.rule)).map(({variant:r})=>Vt(r.rule,v??{},x??void 0)).filter(r=>!!r);Rn(r=>{const a=La({variants:r}),c=r[a];return c?[{...c,rule:Oa()}]:null},()=>{xe(0),W(null),K(null),G(null),D([]),ie(null),O(null),se(!1)},t)},fr=t=>{Rn(r=>$a(r,t),()=>{xe(t+1),W(null),K(null),G(null),D([]),ie(null),O(null)})},mi=async(t,r)=>{Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const a=Oe.current.activePageKey,c=Oe.current.decofile;if(!a)return;const m=c[a],y=m.sections;if(!y||typeof y!="object"||Array.isArray(y))return;const p=y;if(!Array.isArray(p.variants))return;const R=[...p.variants],$=R[t];if(!$?.rule||typeof $.rule!="object"){z.error(f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const N=$.rule,T=r.trim();Gt(!0);try{if(!T){if(!Ot(N,c,x)){fe(null);return}const Ue=N.__resolveType??"";R[t]={...$,rule:cs(N,c,x)};const q={...c,[a]:{...m,sections:{...p,variants:R}}};await me.mutateAsync({blockKey:a,data:q[a]}),await Bt(Ue,q),fe(null),g?.();return}const M=us(N,c,x);if(!M){z.error(f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(M.blockKey){await me.mutateAsync({blockKey:M.blockKey,data:Mt(M.resolveType,M.data,T)}),fe(null),g?.();return}const ue=Tn(T),be=Vn(ue,c);if(be){z.error(be);return}const Ie=Mt(M.resolveType,M.data,T);let De=null;try{await me.mutateAsync({blockKey:ue,data:Ie}),De=ue,R[t]={...$,rule:Zt(ue)},await me.mutateAsync({blockKey:a,data:{...m,sections:{...p,variants:R}}}),De=null}catch(Ue){throw De&&await bn.mutateAsync({blockKey:De}).catch(()=>{}),Ue}fe(null),z.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:T})),g?.()}catch(M){z.error(M instanceof Error?M.message:f("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Gt(!1)}},pi=async(t,r)=>{Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const{selectedSectionIndex:a,rawSections:c,parsedSections:m,decofile:y,activePageKey:p,pageVariants:R,variantIndex:$}=Oe.current;if(a===null||!p)return;const N=c[a],T=m[a];if(!N||!T?.isMultivariate)return;const M=pt(N,T);if(!M)return;const ue=M.variants??[],be=ue[t];if(!be?.rule||typeof be.rule!="object"){z.error(f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const Ie=be.rule,De=r.trim();Gt(!0);const Ue=async q=>{const ve={...M,variants:q},_e=[...c];_e[a]=Lt(N,T,ve);const $e=mn(y,p,_e,$,R);return await me.mutateAsync({blockKey:p,data:$e}),{...y,[p]:$e}};try{if(!De){if(!Ot(Ie,y,x)){Pe(null);return}const et=Ie.__resolveType??"",gt=[...ue];gt[t]={...be,rule:cs(Ie,y,x)};const Ct=await Ue(gt);await Bt(et,Ct),Pe(null),g?.();return}const q=us(Ie,y,x);if(!q){z.error(f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(q.blockKey){await me.mutateAsync({blockKey:q.blockKey,data:Mt(q.resolveType,q.data,De)}),Pe(null),g?.();return}const ve=Tn(De),_e=Vn(ve,y);if(_e){z.error(_e);return}const $e=Mt(q.resolveType,q.data,De);let dt=null;try{await me.mutateAsync({blockKey:ve,data:$e}),dt=ve;const et=[...ue];et[t]={...be,rule:Zt(ve)},await Ue(et),dt=null}catch(et){throw dt&&await bn.mutateAsync({blockKey:dt}).catch(()=>{}),et}Pe(null),z.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:De})),g?.()}catch(q){z.error(q instanceof Error?q.message:f("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Gt(!1)}},mr=async(t,r,a)=>{K(a);try{await me.mutateAsync({blockKey:t,data:a})}catch(c){throw K(m=>m===a?r:m),c}},hi={rename:async(t,r,a)=>{Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const{activePageKey:c,decofile:m}=Oe.current;if(!c)return;const y=Array.isArray(t.variants)?[...t.variants]:[],p=y[r],R=p?.rule&&typeof p.rule=="object"?p.rule:void 0,$=async T=>{const M={...t,variants:T};return await mr(c,t,M),{...m,[c]:M}},N=vc(R,a,m,x);if(N.kind!=="noop"){if(N.kind==="error"){z.error(N.reason==="no-matcher-rule"?f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):N.reason==="unreadable-rule"?f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):N.message??f("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}Gt(!0);try{if(N.kind==="inline"){const M=[...y];M[r]={...p,rule:N.inlinedRule};const ue=await $(M);await Bt(N.blockKey,ue),g?.();return}if(N.kind==="updateBlock"){await me.mutateAsync({blockKey:N.blockKey,data:N.blockData}),g?.();return}let T=null;try{await me.mutateAsync({blockKey:N.blockId,data:N.blockData}),T=N.blockId;const M=[...y];M[r]={...p,rule:N.reference},await $(M),T=null}catch(M){throw T&&await bn.mutateAsync({blockKey:T}).catch(()=>{}),M}z.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:a.trim()})),g?.()}catch(T){z.error(T instanceof Error?T.message:f("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Gt(!1)}}},selectGlobal:async(t,r,a)=>{Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const{activePageKey:c,decofile:m}=Oe.current;if(!c)return;const y=Array.isArray(t.variants)?[...t.variants]:[],p=y[r];if(!p)return;const R=Vt(p.rule,m,x);y[r]={...p,rule:Zt(a)};const $={...t,variants:y},N={...m,[c]:$};try{await mr(c,t,$),R&&R!==a&&await Bt(R,N),g?.()}catch(T){z.error(T instanceof Error?T.message:f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}}},pr=()=>{It()},hr=t=>{xn(t),Un({inner:t})},gr=t=>{Bn(t),Un({raw:t})},vr=()=>{xn(null),Pt([])},xr=()=>en(t=>t+1),yr=()=>{yn.flush(),it(!1),xn(null),Bn(void 0),Pt([]),en(t=>t+1),E?.()},gi=()=>{se(!1),rt(!1),W(null),it(!0)},vi=()=>{ce&&yr(),W(null),se(!0)},xi=()=>rt(!0),es=t=>{if(nt&&t===0){se(!1);return}if(pe&&t<2){rt(!1),t===0&&W(null);return}if(ce){if(t===0){yr();return}if(t===1){Pt([]),en(a=>a+1);return}Pt(ws.slice(0,t-1)),en(a=>a+1);return}if(ae){D(I.slice(0,t)),ne(a=>a+1);return}if(t===0){pr();return}if(t===1){D([]),ne(a=>a+1);return}const r=!P&&At&&Jt?1:0;if(r===1&&t===2){D([]),ne(a=>a+1);return}D(I.slice(0,t-1-r))},ts=En.length>1?o.jsx("button",{type:"button",onClick:()=>es(ua(En.length,{isMultivariateSectionTop:di})),title:f("sectionsEditor.sectionsEditor.back"),"aria-label":f("sectionsEditor.sectionsEditor.back"),className:le("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",ut?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:o.jsx(ga,{className:"size-4"})}):null,yi=ut||Nt||ce?ii&&o.jsxs("div",{className:le("border-b px-3 py-2.5",ut&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!ae&&mt&&ot&&o.jsxs("button",{type:"button",onClick:pr,title:f("sectionsEditor.sectionsEditor.editingInVariant",{variant:ot.label}),className:le("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",na),children:[o.jsx(ta,{rule:rs(ot.rule,v??{},x??void 0),matchers:Yt}),o.jsx("span",{className:"max-w-[160px] truncate",children:ot.label})]}),o.jsx("div",{className:"flex-1"}),ut&&o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx("span",{className:"shrink-0 cursor-help",children:o.jsx(Pn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),o.jsx(kt,{side:"bottom",className:"max-w-[260px]",children:f("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),ir&&o.jsx(Nn,{onClick:()=>dn()})]}),ut&&o.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:f("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):o.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(Ar,{pageKey:_,initialName:he.name,initialPath:he.path,onFieldChange:Ls,variant:"header"})}),o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.editSeo"),className:"size-7 shrink-0",onClick:()=>it(!0),children:o.jsx(Pr,{size:14})})}),o.jsx(kt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.editSeo")})]}),o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.viewJson"),className:"size-7 shrink-0",onClick:()=>X&&_?X():Le(!0),children:o.jsx(Kr,{size:14})})}),o.jsx(kt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.viewJson")})]}),o.jsx(Nn,{onClick:fn})]}),bi=o.jsxs(o.Fragment,{children:[mt&&_&&o.jsx(Nr,{listKey:_,variants:Ne,activeIndex:ge,decofile:v??{},meta:x,matchers:Yt,onSelect:Zn,onReorder:ur,onRename:fe,onDuplicate:fr,onDelete:dr,onAdd:fn}),mt&&B!==null&&o.jsx(Cr,{className:"mt-3",children:o.jsx("div",{className:le("space-y-3",Wt&&"pointer-events-none opacity-50"),children:o.jsx(ss,{currentRt:B,currentLabel:gn(ot?.rule,v??{},vt,x??void 0),currentGlobalKey:Vt(ot?.rule,v??{},x??void 0)??void 0,matchers:Yt,globals:Yn,onSelect:Us,onSelectGlobal:Js,schema:Gs,formValue:we,onChange:Ys,formKey:`${ge}:${B??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:v,onSaveReferencedBlock:tn,sandbox:ln})})})]}),br=o.jsxs(o.Fragment,{children:[o.jsx(sa,{listKey:`${_??""}:${S??""}`,variants:Rt.map((t,r)=>({index:r,label:t.label})),selectedIndex:_n,onSelect:$s,onRename:Pe,onDuplicate:Qo,onDelete:Jo,onRemoveAll:zs,onReorder:Xo,onAdd:()=>dn()}),o.jsx(Cr,{children:o.jsx(ss,{currentRt:Ht??"",currentLabel:gn(Jt?.rule,v??{},vt,x??void 0),currentGlobalKey:Vt(Jt?.rule,v??{},x??void 0)??void 0,matchers:Yt,globals:Yn,onSelect:ei,onSelectGlobal:ni,schema:ri,formValue:xo,onChange:ti,formKey:`${S??"none"}:${_n}:${Ht??""}`,formWrapperClassName:"pt-1",meta:x??void 0,decofile:v,onSaveReferencedBlock:tn,sandbox:ln})})]}),Sr=o.jsx("div",{className:le(P?"px-2":"p-2 pt-3"),children:o.jsx(Nl,{listKey:`${_??""}-${ge}`,rawSections:Q,sections:Me,meta:x,decofile:v,selectedIndex:S,onSelect:Oo,onReorder:$o,onDelete:zo,onDuplicate:Ho,onMakeReusable:Fe,onToggleHidden:Wo,onToggleLazy:Go,onAddVariant:dn,onDetach:qo,onAddSection:()=>Ae(!0),canAddSection:Ws})}),Si=o.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[_&&he&&o.jsx(Ar,{pageKey:_,initialName:he.name,initialPath:he.path,onFieldChange:Ls}),on&&_?o.jsx(Wr,{rawSeo:Sn,innerSeo:zn,defaultResolveType:Ts,seoSchema:Vs,activeResolveType:jn,seoTypeOptions:Cs,formResetKey:_s,siteDefaultSeo:Ms,onBreadcrumbChange:Pt,onPersistRaw:gr,onInnerChange:hr,onClearForm:vr,onBumpFormKey:xr}):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),ji=o.jsx(Xt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:o.jsx("div",{className:"mx-auto max-w-2xl",children:on&&_?o.jsx(Wr,{rawSeo:Sn,innerSeo:zn,defaultResolveType:Ts,seoSchema:Vs,activeResolveType:jn,seoTypeOptions:Cs,formResetKey:_s,siteDefaultSeo:Ms,onBreadcrumbChange:Pt,onPersistRaw:gr,onInnerChange:hr,onClearForm:vr,onBumpFormKey:xr}):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),wi=o.jsxs(Xt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[mt&&_&&o.jsx(Nr,{listKey:_,variants:Ne,activeIndex:ge,decofile:v??{},meta:x,matchers:Yt,onSelect:Zn,onReorder:ur,onRename:fe,onDuplicate:fr,onDelete:dr,onAdd:fn}),mt&&B!==null&&o.jsxs("div",{className:le("px-3 border-b",ee?"pt-3 pb-5 space-y-3":"py-2"),children:[o.jsxs("button",{type:"button",onClick:()=>zt(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-[var(--studio-control-radius,var(--radius-sm))] py-0.5 hover:bg-muted/40","aria-expanded":ee,children:[o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:f("sectionsEditor.sectionsEditor.variantRule")}),ee?o.jsx(ma,{className:"size-3.5 shrink-0 text-muted-foreground"}):o.jsx(pa,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),ee&&o.jsx("div",{className:le("space-y-3",Wt&&"pointer-events-none opacity-50"),children:o.jsx(ss,{currentRt:B,currentLabel:gn(ot?.rule,v??{},vt,x??void 0),currentGlobalKey:Vt(ot?.rule,v??{},x??void 0)??void 0,matchers:Yt,globals:Yn,onSelect:Us,onSelectGlobal:Js,schema:Gs,formValue:we,onChange:Ys,formKey:`${ge}:${B??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:v,onSaveReferencedBlock:tn,sandbox:ln})})]}),Sr]},"editor-section-list");return o.jsx(ra,{children:o.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!P&&ts&&o.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ts}),(P||En.length>1)&&o.jsx(oa,{crumbs:En,onSelect:es,onSelectRoot:()=>{yn.flush(),U?U():es(0)}}),o.jsx("div",{className:"shrink-0",children:P?o.jsxs("div",{className:le("flex items-center gap-2 border-b px-3 py-2.5",ut&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[P&&ts,ut&&o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx("span",{className:"shrink-0 cursor-help",children:o.jsx(Pn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),o.jsx(kt,{side:"bottom",className:"max-w-[260px]",children:f("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[o.jsx("span",{className:"truncate text-sm font-semibold",children:ui}),cr&&o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:cr})]}),Xn&&mt&&ot&&o.jsx(Tr,{variants:Ne,activeIndex:ge,onSelect:Zn,onManage:vi,onRemoveAll:fi}),li&&o.jsx(Tr,{variants:Rt,activeIndex:_n,onSelect:$s,onManage:xi,onRemoveAll:zs}),Xn&&!mt&&o.jsx(Nn,{onClick:fn}),ai&&o.jsx(Nn,{onClick:()=>dn()}),o.jsx(ia,{}),Xn&&o.jsxs(o.Fragment,{children:[o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"outline",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.editSeo"),className:"size-7 shrink-0",onClick:gi,children:o.jsx(Pr,{size:14})})}),o.jsx(kt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.editSeo")})]}),!X&&o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"outline",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.viewJson"),className:"size-7 shrink-0",onClick:()=>Le(!0),children:o.jsx(Kr,{size:14})})}),o.jsx(kt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):yi}),lt&&o.jsx(Jl,{open:!0,fields:Ll(lt.plan,lt.target.schema),choices:lt.choices,changedAgain:lt.changedAgain,fresh:lt.fresh,onChoose:(t,r)=>Lo({...lt.choices,[t]:r}),onApply:Fo},Sc(lt.formBase)),pe?o.jsx(Vr,{onAdd:()=>dn(),children:br},"editor-section-variants"):Nt?o.jsxs(Xt,{viewportRef:Ce,onBlur:Ks,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!P&&At&&Rt.length>0&&I.length===0&&br,o.jsx(Mr,{activeSchema:wn,formValue:je,formResetKey:tt,onFormChange:Fs,onBreadcrumbChange:D,breadcrumbPath:I,emptyMessage:f("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:x,decofile:v,onSaveReferencedBlock:tn,sandbox:ln,previewBaseUrl:te,onRequestAddSection:Os,onVariantMatcherOp:ae?hi:void 0})]},"editor-section-form"):ae?o.jsx(Xt,{viewportRef:Ce,onBlur:Ks,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx(Mr,{activeSchema:wn,formValue:je,formResetKey:tt,onFormChange:Fs,onBreadcrumbChange:D,breadcrumbPath:I,emptyMessage:f("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:x,decofile:v,onSaveReferencedBlock:tn,sandbox:ln,previewBaseUrl:te,onRequestAddSection:Os})},"editor-global-block"):ce?P?o.jsx(Xt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"p-3",children:Si})},"editor-seo"):ji:nt?o.jsx(Vr,{onAdd:fn,children:bi},"editor-variants"):P?o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsx(Xt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"py-2",children:Sr})}),o.jsx("div",{className:"shrink-0 border-t p-2",children:o.jsx(ms,{canAddSection:Ws,onAddSection:()=>Ae(!0)})})]},"editor-section-list"):wi,o.jsx(aa,{open:ye!==null,onOpenChange:t=>{t||Fe(null)},defaultBlockId:ye!==null?Tn(Me[ye]?.label??""):"",isPending:me.isPending,onSubmit:Zo}),te&&o.jsx(fl,{open:Qe,onOpenChange:t=>{Ae(t),t||(Ge.current=null)},meta:x,decofile:v,previewBaseUrl:te,onSelect:Yo}),We&&_&&v&&o.jsx(ya,{open:We,onOpenChange:Le,pageKey:_,decofile:v}),Te!==null&&o.jsx(Dr,{open:!0,initialName:Ot(Ne[Te]?.rule,v??{},x??void 0)?gn(Ne[Te]?.rule,v??{},vt,x??void 0):"",autoLabel:vt(rs(Ne[Te]?.rule,v??{},x??void 0)),isPending:Wt,onSubmit:async t=>{await mi(Te,t)},onOpenChange:t=>{!t&&!Wt&&fe(null)}}),Ve!==null&&o.jsx(Dr,{open:!0,initialName:Ot(Rt[Ve]?.rule,v??{},x??void 0)?gn(Rt[Ve]?.rule,v??{},vt,x??void 0):"",autoLabel:vt(rs(Rt[Ve]?.rule,v??{},x??void 0)),isPending:Wt,onSubmit:async t=>{await pi(Ve,t)},onOpenChange:t=>{!t&&!Wt&&Pe(null)}})]})})}export{wf as SectionsEditor};
@@ -1 +1 @@
1
- import{r as d,bu as st,bv as Ne,j as c,bw as rt,bx as Ie,by as L,bz as lt,bA as j,bB as P,bC as $,bD as at,b1 as Ee,bE as Re,bF as it,bG as ct,bH as dt,bI as ut,bJ as pt,bK as ft,bL as mt,bM as ht,bN as vt,bO as gt,bP as xt,bQ as St,c as ee,l as oe,ah as wt}from"./index-bl_DQ3mH.js";import{c as Pe}from"./index-BdQq_4o_.js";import{V as yt}from"./index-B5IA1qMq.js";import{t as je,n as Ct}from"./ChevronUp-BrMcnDd0.js";var bt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,Tt]=it(J),[ne]=vt(J,[Tt,Re]),pe=Re(),[Nt,G]=ne(J),[Pt,_t]=ne(J),Me=s=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:a,value:r,defaultValue:l,onValueChange:i,dir:u,name:m,autoComplete:g,disabled:w,required:y,form:S}=s,p=pe(e),[v,C]=d.useState(null),[h,x]=d.useState(null),[F,M]=d.useState(!1),se=st(u),[_,O]=Ne({prop:o,defaultProp:n??!1,onChange:a,caller:J}),[U,q]=Ne({prop:r,defaultProp:l,onChange:i,caller:J}),k=d.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=d.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return c.jsx(rt,{...p,children:c.jsxs(Nt,{required:y,scope:e,trigger:v,onTriggerChange:C,valueNode:h,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:se,triggerPointerDownPosRef:k,disabled:w,children:[c.jsx(de.Provider,{scope:e,children:c.jsx(Pt,{scope:s.__scopeSelect,onNativeOptionAdd:d.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:d.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?c.jsxs(et,{"aria-hidden":!0,required:y,tabIndex:-1,name:m,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?c.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};Me.displayName=J;var Ae="SelectTrigger",Oe=d.forwardRef((s,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=s,a=pe(t),r=G(Ae,t),l=r.disabled||o,i=L(e,r.onTriggerChange),u=ue(t),m=d.useRef("touch"),[g,w,y]=ot(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===r.value),h=nt(v,p,C);h!==void 0&&r.onValueChange(h.value)}),S=p=>{l||(r.onOpenChange(!0),y()),p&&(r.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return c.jsx(lt,{asChild:!0,...a,children:c.jsx(j.button,{type:"button",role:"combobox","aria-controls":r.contentId,"aria-expanded":r.open,"aria-required":r.required,"aria-autocomplete":"none",dir:r.dir,"data-state":r.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":tt(r.value)?"":void 0,...n,ref:i,onClick:P(n.onClick,p=>{p.currentTarget.focus(),m.current!=="mouse"&&S(p)}),onPointerDown:P(n.onPointerDown,p=>{m.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:P(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(v&&p.key===" ")&&bt.includes(p.key)&&(S(),p.preventDefault())})})})});Oe.displayName=Ae;var De="SelectValue",Le=d.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,children:a,placeholder:r="",...l}=s,i=G(De,t),{onValueNodeHasChildrenChange:u}=i,m=a!==void 0,g=L(e,i.onValueNodeChange);return $(()=>{u(m)},[u,m]),c.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:tt(i.value)?c.jsx(c.Fragment,{children:r}):a})});Le.displayName=De;var Et="SelectIcon",ke=d.forwardRef((s,e)=>{const{__scopeSelect:t,children:o,...n}=s;return c.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Et;var Rt="SelectPortal",Be=s=>c.jsx(at,{asChild:!0,...s});Be.displayName=Rt;var Q="SelectContent",Ve=d.forwardRef((s,e)=>{const t=G(Q,s.__scopeSelect),[o,n]=d.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const a=o;return a?Ee.createPortal(c.jsx(He,{scope:s.__scopeSelect,children:c.jsx(de.Slot,{scope:s.__scopeSelect,children:c.jsx("div",{children:s.children})})}),a):null}return c.jsx(ze,{...s,ref:e})});Ve.displayName=Q;var A=10,[He,Y]=ne(Q),jt="SelectContentImpl",Mt=gt("SelectContent.RemoveScroll"),ze=d.forwardRef((s,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:r,side:l,sideOffset:i,align:u,alignOffset:m,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=s,h=G(Q,t),[x,F]=d.useState(null),[M,se]=d.useState(null),_=L(e,f=>F(f)),[O,U]=d.useState(null),[q,k]=d.useState(null),B=ue(t),[W,V]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=d.useCallback(f=>{const[T,...R]=B().map(N=>N.ref.current),[b]=R.slice(-1),I=document.activeElement;for(const N of f)if(N===I||(N?.scrollIntoView({block:"nearest"}),N===T&&M&&(M.scrollTop=0),N===b&&M&&(M.scrollTop=M.scrollHeight),N?.focus(),document.activeElement!==I))return},[B,M]),D=d.useCallback(()=>E([O,x]),[E,O,x]);d.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=h;d.useEffect(()=>{if(x){let f={x:0,y:0};const T=b=>{f={x:Math.abs(Math.round(b.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(K.current?.y??0))}},R=b=>{f.x<=10&&f.y<=10?b.preventDefault():x.contains(b.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),d.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=ot(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),b=nt(T,f,R);b&&setTimeout(()=>b.ref.current.focus())}),me=d.useCallback((f,T,R)=>{const b=!H.current&&!R;(h.value!==void 0&&h.value===T||b)&&(U(f),b&&(H.current=!0))},[h.value]),he=d.useCallback(()=>x?.focus(),[x]),te=d.useCallback((f,T,R)=>{const b=!H.current&&!R;(h.value!==void 0&&h.value===T||b)&&k(f)},[h.value]),ie=o==="popper"?Se:Fe,re=ie===Se?{side:l,sideOffset:i,align:u,alignOffset:m,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return c.jsx(He,{scope:t,content:x,viewport:M,onViewportChange:se,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:c.jsx(ft,{as:Mt,allowPinchZoom:!0,children:c.jsx(mt,{asChild:!0,trapped:h.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(n,f=>{h.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:c.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:f=>f.preventDefault(),...C,...re,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:P(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let b=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,N=b.indexOf(I);b=b.slice(N+1)}setTimeout(()=>E(b)),f.preventDefault()}})})})})})})});ze.displayName=jt;var At="SelectItemAlignedPosition",Fe=d.forwardRef((s,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=s,a=G(Q,t),r=Y(Q,t),[l,i]=d.useState(null),[u,m]=d.useState(null),g=L(e,_=>m(_)),w=ue(t),y=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:h}=r,x=d.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&p&&v&&C){const _=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=a.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(a.dir!=="rtl"){const I=q.left-O.left,N=U.left-I,X=_.left-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,N=window.innerWidth-U.right-I,X=window.innerWidth-_.right-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const k=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ie=B-te,re=v.offsetHeight/2,f=v.offsetTop+re,T=H+E+f,R=K-T;if(T<=te){const I=k.length>0&&v===k[k.length-1].ref.current;l.style.bottom="0px";const N=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,re+(I?he:0)+N+D),Z=T+X;l.style.height=Z+"px"}else{const I=k.length>0&&v===k[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+re)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>y.current=!0)}},[w,a.trigger,a.valueNode,l,u,p,v,C,a.dir,o]);$(()=>x(),[x]);const[F,M]=d.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const se=d.useCallback(_=>{_&&S.current===!0&&(x(),h?.(),S.current=!1)},[x,h]);return c.jsx(Dt,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:se,children:c.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:c.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Fe.displayName=At;var Ot="SelectPopperPosition",Se=d.forwardRef((s,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...a}=s,r=pe(t);return c.jsx(xt,{...r,...a,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=Ot;var[Dt,Te]=ne(Q,{}),we="SelectViewport",Ue=d.forwardRef((s,e)=>{const{__scopeSelect:t,nonce:o,...n}=s,a=Y(we,t),r=Te(we,t),l=L(e,a.onViewportChange),i=d.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(de.Slot,{scope:t,children:c.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:P(n.onScroll,u=>{const m=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=r;if(w?.current&&g){const y=Math.abs(i.current-m.scrollTop);if(y>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const h=C+y,x=Math.min(S,h),F=h-x;g.style.height=x+"px",g.style.bottom==="0px"&&(m.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}i.current=m.scrollTop})})})]})});Ue.displayName=we;var We="SelectGroup",[Lt,kt]=ne(We),Bt=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=Ie();return c.jsx(Lt,{scope:t,id:n,children:c.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Bt.displayName=We;var Ke="SelectLabel",Vt=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=kt(Ke,t);return c.jsx(j.div,{id:n.id,...o,ref:e})});Vt.displayName=Ke;var ce="SelectItem",[Ht,$e]=ne(ce),Ge=d.forwardRef((s,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:a,...r}=s,l=G(ce,t),i=Y(ce,t),u=l.value===o,[m,g]=d.useState(a??""),[w,y]=d.useState(!1),S=L(e,h=>i.itemRefCallback?.(h,o,n)),p=Ie(),v=d.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Ht,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:d.useCallback(h=>{g(x=>x||(h?.textContent??"").trim())},[]),children:c.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:m,children:c.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...r,ref:S,onFocus:P(r.onFocus,()=>y(!0)),onBlur:P(r.onBlur,()=>y(!1)),onClick:P(r.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:P(r.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:P(r.onPointerDown,h=>{v.current=h.pointerType}),onPointerMove:P(r.onPointerMove,h=>{v.current=h.pointerType,n?i.onItemLeave?.():v.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(r.onPointerLeave,h=>{h.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:P(r.onKeyDown,h=>{i.searchRef?.current!==""&&h.key===" "||(It.includes(h.key)&&C(),h.key===" "&&h.preventDefault())})})})})});Ge.displayName=ce;var le="SelectItemText",Ye=d.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,...a}=s,r=G(le,t),l=Y(le,t),i=$e(le,t),u=_t(le,t),[m,g]=d.useState(null),w=L(e,C=>g(C),i.onItemTextChange,C=>l.itemTextRefCallback?.(C,i.value,i.disabled)),y=m?.textContent,S=d.useMemo(()=>c.jsx("option",{value:i.value,disabled:i.disabled,children:y},i.value),[i.disabled,i.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),c.jsxs(c.Fragment,{children:[c.jsx(j.span,{id:i.textId,...a,ref:w}),i.isSelected&&r.valueNode&&!r.valueNodeHasChildren?Ee.createPortal(a.children,r.valueNode):null]})});Ye.displayName=le;var qe="SelectItemIndicator",Xe=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return $e(qe,t).isSelected?c.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});Xe.displayName=qe;var ye="SelectScrollUpButton",Ze=d.forwardRef((s,e)=>{const t=Y(ye,s.__scopeSelect),o=Te(ye,s.__scopeSelect),[n,a]=d.useState(!1),r=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=i.scrollTop>0;a(u)};const i=t.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=t;l&&i&&(l.scrollTop=l.scrollTop-i.offsetHeight)}}):null});Ze.displayName=ye;var Ce="SelectScrollDownButton",Je=d.forwardRef((s,e)=>{const t=Y(Ce,s.__scopeSelect),o=Te(Ce,s.__scopeSelect),[n,a]=d.useState(!1),r=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=i.scrollHeight-i.clientHeight,m=Math.ceil(i.scrollTop)<u;a(m)};const i=t.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=t;l&&i&&(l.scrollTop=l.scrollTop+i.offsetHeight)}}):null});Je.displayName=Ce;var Qe=d.forwardRef((s,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=s,a=Y("SelectScrollButton",t),r=d.useRef(null),l=ue(t),i=d.useCallback(()=>{r.current!==null&&(window.clearInterval(r.current),r.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),$(()=>{l().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),c.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:P(n.onPointerDown,()=>{r.current===null&&(r.current=window.setInterval(o,50))}),onPointerMove:P(n.onPointerMove,()=>{a.onItemLeave?.(),r.current===null&&(r.current=window.setInterval(o,50))}),onPointerLeave:P(n.onPointerLeave,()=>{i()})})}),zt="SelectSeparator",Ft=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return c.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});Ft.displayName=zt;var be="SelectArrow",Ut=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=pe(t),a=G(be,t),r=Y(be,t);return a.open&&r.position==="popper"?c.jsx(St,{...n,...o,ref:e}):null});Ut.displayName=be;var Wt="SelectBubbleInput",et=d.forwardRef(({__scopeSelect:s,value:e,...t},o)=>{const n=d.useRef(null),a=L(o,n),r=ct(e);return d.useEffect(()=>{const l=n.current;if(!l)return;const i=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(i,"value").set;if(r!==e&&m){const g=new Event("change",{bubbles:!0});m.call(l,e),l.dispatchEvent(g)}},[r,e]),c.jsx(j.select,{...t,style:{...yt,...t.style},ref:a,defaultValue:e})});et.displayName=Wt;function tt(s){return s===""||s===void 0}function ot(s){const e=dt(s),t=d.useRef(""),o=d.useRef(0),n=d.useCallback(r=>{const l=t.current+r;e(l),(function i(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))})(l)},[e]),a=d.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,a]}function nt(s,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,a=t?s.indexOf(t):-1;let r=Kt(s,Math.max(a,0));n.length===1&&(r=r.filter(u=>u!==t));const i=r.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return i!==t?i:void 0}function Kt(s,e){return s.map((t,o)=>s[(e+o)%s.length])}var $t=Me,Gt=Oe,Yt=Le,qt=ke,Xt=Be,Zt=Ve,Jt=Ue,Qt=Ge,_e=Ye,eo=Xe,to=Ze,oo=Je;function co(s){const e=ee.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx($t,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(s){const e=ee.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx(Yt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(s){const e=ee.c(13);let t,o,n,a;e[0]!==s?({className:o,size:a,children:t,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a):(t=e[1],o=e[2],n=e[3],a=e[4]);const r=a===void 0?"default":a;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive hover:bg-[var(--studio-outline-hover-background)] hover:text-accent-foreground flex w-fit items-center justify-between gap-2 rounded-[var(--studio-control-radius,var(--radius-lg))] bg-[var(--studio-input-background)] px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-[var(--studio-control-height,2rem)] data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-[var(--studio-control-radius,var(--radius-lg))] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(qt,{asChild:!0,children:c.jsx(je,{className:"size-4 opacity-50"})}),e[7]=i):i=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==r||e[11]!==l?(u=c.jsxs(Gt,{"data-slot":"select-trigger","data-size":r,className:l,...n,children:[t,i]}),e[8]=t,e[9]=n,e[10]=r,e[11]=l,e[12]=u):u=e[12],u}function fo(s){const e=ee.c(25);let t,o,n,a,r;e[0]!==s?({className:o,children:t,position:a,hideScrollButtons:r,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a,e[5]=r):(t=e[1],o=e[2],n=e[3],a=e[4],r=e[5]);const l=a===void 0?"popper":a,i=r===void 0?!1:r,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let m;e[6]!==o||e[7]!==u?(m=oe("notranslate bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--studio-surface-radius,var(--radius-lg))] border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=m):m=e[8];let g;e[9]!==i?(g=!i&&c.jsx(no,{}),e[9]=i,e[10]=g):g=e[10];const w=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let y;e[11]!==w?(y=oe("p-1",w),e[11]=w,e[12]=y):y=e[12];let S;e[13]!==t||e[14]!==y?(S=c.jsx(Jt,{className:y,children:t}),e[13]=t,e[14]=y,e[15]=S):S=e[15];let p;e[16]!==i?(p=!i&&c.jsx(so,{}),e[16]=i,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==m||e[21]!==g||e[22]!==S||e[23]!==p?(v=c.jsx(Xt,{children:c.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:m,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=m,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function mo(s){const e=ee.c(19);let t,o,n,a,r;e[0]!==s?({className:o,children:t,description:n,hideCheck:r,...a}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a,e[5]=r):(t=e[1],o=e[2],n=e[3],a=e[4],r=e[5]);const l=r===void 0?!1:r,i=n&&"items-start py-2";let u;e[6]!==o||e[7]!==i?(u=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i,o),e[6]=o,e[7]=i,e[8]=u):u=e[8];let m;e[9]!==l?(m=!l&&c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(eo,{children:c.jsx(wt,{className:"size-4"})})}),e[9]=l,e[10]=m):m=e[10];let g;e[11]!==t||e[12]!==n?(g=n?c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx(_e,{children:t}),c.jsx("span",{className:"text-xs text-muted-foreground whitespace-normal",children:n})]}):c.jsx(_e,{children:t}),e[11]=t,e[12]=n,e[13]=g):g=e[13];let w;return e[14]!==a||e[15]!==u||e[16]!==m||e[17]!==g?(w=c.jsxs(Qt,{"data-slot":"select-item",className:u,...a,children:[m,g]}),e[14]=a,e[15]=u,e[16]=m,e[17]=g,e[18]=w):w=e[18],w}function no(s){const e=ee.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(Ct,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}function so(s){const e=ee.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(je,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}export{co as S,uo as a,po as b,mo as c,fo as d};
1
+ import{r as d,bu as st,bv as Ne,j as c,bw as rt,bx as Ie,by as L,bz as lt,bA as j,bB as P,bC as $,bD as at,b1 as Ee,bE as Re,bF as it,bG as ct,bH as dt,bI as ut,bJ as pt,bK as ft,bL as mt,bM as ht,bN as vt,bO as gt,bP as xt,bQ as St,c as ee,l as oe,ah as wt}from"./index-BnoCrGwV.js";import{c as Pe}from"./index-BdQq_4o_.js";import{V as yt}from"./index-B5YiUV4I.js";import{t as je,n as Ct}from"./ChevronUp-Di-YfZWV.js";var bt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,Tt]=it(J),[ne]=vt(J,[Tt,Re]),pe=Re(),[Nt,G]=ne(J),[Pt,_t]=ne(J),Me=s=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:a,value:r,defaultValue:l,onValueChange:i,dir:u,name:m,autoComplete:g,disabled:w,required:y,form:S}=s,p=pe(e),[v,C]=d.useState(null),[h,x]=d.useState(null),[F,M]=d.useState(!1),se=st(u),[_,O]=Ne({prop:o,defaultProp:n??!1,onChange:a,caller:J}),[U,q]=Ne({prop:r,defaultProp:l,onChange:i,caller:J}),k=d.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=d.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return c.jsx(rt,{...p,children:c.jsxs(Nt,{required:y,scope:e,trigger:v,onTriggerChange:C,valueNode:h,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:se,triggerPointerDownPosRef:k,disabled:w,children:[c.jsx(de.Provider,{scope:e,children:c.jsx(Pt,{scope:s.__scopeSelect,onNativeOptionAdd:d.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:d.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?c.jsxs(et,{"aria-hidden":!0,required:y,tabIndex:-1,name:m,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?c.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};Me.displayName=J;var Ae="SelectTrigger",Oe=d.forwardRef((s,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=s,a=pe(t),r=G(Ae,t),l=r.disabled||o,i=L(e,r.onTriggerChange),u=ue(t),m=d.useRef("touch"),[g,w,y]=ot(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===r.value),h=nt(v,p,C);h!==void 0&&r.onValueChange(h.value)}),S=p=>{l||(r.onOpenChange(!0),y()),p&&(r.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return c.jsx(lt,{asChild:!0,...a,children:c.jsx(j.button,{type:"button",role:"combobox","aria-controls":r.contentId,"aria-expanded":r.open,"aria-required":r.required,"aria-autocomplete":"none",dir:r.dir,"data-state":r.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":tt(r.value)?"":void 0,...n,ref:i,onClick:P(n.onClick,p=>{p.currentTarget.focus(),m.current!=="mouse"&&S(p)}),onPointerDown:P(n.onPointerDown,p=>{m.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:P(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(v&&p.key===" ")&&bt.includes(p.key)&&(S(),p.preventDefault())})})})});Oe.displayName=Ae;var De="SelectValue",Le=d.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,children:a,placeholder:r="",...l}=s,i=G(De,t),{onValueNodeHasChildrenChange:u}=i,m=a!==void 0,g=L(e,i.onValueNodeChange);return $(()=>{u(m)},[u,m]),c.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:tt(i.value)?c.jsx(c.Fragment,{children:r}):a})});Le.displayName=De;var Et="SelectIcon",ke=d.forwardRef((s,e)=>{const{__scopeSelect:t,children:o,...n}=s;return c.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Et;var Rt="SelectPortal",Be=s=>c.jsx(at,{asChild:!0,...s});Be.displayName=Rt;var Q="SelectContent",Ve=d.forwardRef((s,e)=>{const t=G(Q,s.__scopeSelect),[o,n]=d.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const a=o;return a?Ee.createPortal(c.jsx(He,{scope:s.__scopeSelect,children:c.jsx(de.Slot,{scope:s.__scopeSelect,children:c.jsx("div",{children:s.children})})}),a):null}return c.jsx(ze,{...s,ref:e})});Ve.displayName=Q;var A=10,[He,Y]=ne(Q),jt="SelectContentImpl",Mt=gt("SelectContent.RemoveScroll"),ze=d.forwardRef((s,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:r,side:l,sideOffset:i,align:u,alignOffset:m,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=s,h=G(Q,t),[x,F]=d.useState(null),[M,se]=d.useState(null),_=L(e,f=>F(f)),[O,U]=d.useState(null),[q,k]=d.useState(null),B=ue(t),[W,V]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=d.useCallback(f=>{const[T,...R]=B().map(N=>N.ref.current),[b]=R.slice(-1),I=document.activeElement;for(const N of f)if(N===I||(N?.scrollIntoView({block:"nearest"}),N===T&&M&&(M.scrollTop=0),N===b&&M&&(M.scrollTop=M.scrollHeight),N?.focus(),document.activeElement!==I))return},[B,M]),D=d.useCallback(()=>E([O,x]),[E,O,x]);d.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=h;d.useEffect(()=>{if(x){let f={x:0,y:0};const T=b=>{f={x:Math.abs(Math.round(b.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(K.current?.y??0))}},R=b=>{f.x<=10&&f.y<=10?b.preventDefault():x.contains(b.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),d.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=ot(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),b=nt(T,f,R);b&&setTimeout(()=>b.ref.current.focus())}),me=d.useCallback((f,T,R)=>{const b=!H.current&&!R;(h.value!==void 0&&h.value===T||b)&&(U(f),b&&(H.current=!0))},[h.value]),he=d.useCallback(()=>x?.focus(),[x]),te=d.useCallback((f,T,R)=>{const b=!H.current&&!R;(h.value!==void 0&&h.value===T||b)&&k(f)},[h.value]),ie=o==="popper"?Se:Fe,re=ie===Se?{side:l,sideOffset:i,align:u,alignOffset:m,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return c.jsx(He,{scope:t,content:x,viewport:M,onViewportChange:se,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:c.jsx(ft,{as:Mt,allowPinchZoom:!0,children:c.jsx(mt,{asChild:!0,trapped:h.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(n,f=>{h.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:c.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:f=>f.preventDefault(),...C,...re,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:P(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let b=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,N=b.indexOf(I);b=b.slice(N+1)}setTimeout(()=>E(b)),f.preventDefault()}})})})})})})});ze.displayName=jt;var At="SelectItemAlignedPosition",Fe=d.forwardRef((s,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=s,a=G(Q,t),r=Y(Q,t),[l,i]=d.useState(null),[u,m]=d.useState(null),g=L(e,_=>m(_)),w=ue(t),y=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:h}=r,x=d.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&p&&v&&C){const _=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=a.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(a.dir!=="rtl"){const I=q.left-O.left,N=U.left-I,X=_.left-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,N=window.innerWidth-U.right-I,X=window.innerWidth-_.right-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const k=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ie=B-te,re=v.offsetHeight/2,f=v.offsetTop+re,T=H+E+f,R=K-T;if(T<=te){const I=k.length>0&&v===k[k.length-1].ref.current;l.style.bottom="0px";const N=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,re+(I?he:0)+N+D),Z=T+X;l.style.height=Z+"px"}else{const I=k.length>0&&v===k[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+re)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>y.current=!0)}},[w,a.trigger,a.valueNode,l,u,p,v,C,a.dir,o]);$(()=>x(),[x]);const[F,M]=d.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const se=d.useCallback(_=>{_&&S.current===!0&&(x(),h?.(),S.current=!1)},[x,h]);return c.jsx(Dt,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:se,children:c.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:c.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Fe.displayName=At;var Ot="SelectPopperPosition",Se=d.forwardRef((s,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...a}=s,r=pe(t);return c.jsx(xt,{...r,...a,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=Ot;var[Dt,Te]=ne(Q,{}),we="SelectViewport",Ue=d.forwardRef((s,e)=>{const{__scopeSelect:t,nonce:o,...n}=s,a=Y(we,t),r=Te(we,t),l=L(e,a.onViewportChange),i=d.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(de.Slot,{scope:t,children:c.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:P(n.onScroll,u=>{const m=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=r;if(w?.current&&g){const y=Math.abs(i.current-m.scrollTop);if(y>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const h=C+y,x=Math.min(S,h),F=h-x;g.style.height=x+"px",g.style.bottom==="0px"&&(m.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}i.current=m.scrollTop})})})]})});Ue.displayName=we;var We="SelectGroup",[Lt,kt]=ne(We),Bt=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=Ie();return c.jsx(Lt,{scope:t,id:n,children:c.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Bt.displayName=We;var Ke="SelectLabel",Vt=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=kt(Ke,t);return c.jsx(j.div,{id:n.id,...o,ref:e})});Vt.displayName=Ke;var ce="SelectItem",[Ht,$e]=ne(ce),Ge=d.forwardRef((s,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:a,...r}=s,l=G(ce,t),i=Y(ce,t),u=l.value===o,[m,g]=d.useState(a??""),[w,y]=d.useState(!1),S=L(e,h=>i.itemRefCallback?.(h,o,n)),p=Ie(),v=d.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Ht,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:d.useCallback(h=>{g(x=>x||(h?.textContent??"").trim())},[]),children:c.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:m,children:c.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...r,ref:S,onFocus:P(r.onFocus,()=>y(!0)),onBlur:P(r.onBlur,()=>y(!1)),onClick:P(r.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:P(r.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:P(r.onPointerDown,h=>{v.current=h.pointerType}),onPointerMove:P(r.onPointerMove,h=>{v.current=h.pointerType,n?i.onItemLeave?.():v.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(r.onPointerLeave,h=>{h.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:P(r.onKeyDown,h=>{i.searchRef?.current!==""&&h.key===" "||(It.includes(h.key)&&C(),h.key===" "&&h.preventDefault())})})})})});Ge.displayName=ce;var le="SelectItemText",Ye=d.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,...a}=s,r=G(le,t),l=Y(le,t),i=$e(le,t),u=_t(le,t),[m,g]=d.useState(null),w=L(e,C=>g(C),i.onItemTextChange,C=>l.itemTextRefCallback?.(C,i.value,i.disabled)),y=m?.textContent,S=d.useMemo(()=>c.jsx("option",{value:i.value,disabled:i.disabled,children:y},i.value),[i.disabled,i.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),c.jsxs(c.Fragment,{children:[c.jsx(j.span,{id:i.textId,...a,ref:w}),i.isSelected&&r.valueNode&&!r.valueNodeHasChildren?Ee.createPortal(a.children,r.valueNode):null]})});Ye.displayName=le;var qe="SelectItemIndicator",Xe=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return $e(qe,t).isSelected?c.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});Xe.displayName=qe;var ye="SelectScrollUpButton",Ze=d.forwardRef((s,e)=>{const t=Y(ye,s.__scopeSelect),o=Te(ye,s.__scopeSelect),[n,a]=d.useState(!1),r=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=i.scrollTop>0;a(u)};const i=t.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=t;l&&i&&(l.scrollTop=l.scrollTop-i.offsetHeight)}}):null});Ze.displayName=ye;var Ce="SelectScrollDownButton",Je=d.forwardRef((s,e)=>{const t=Y(Ce,s.__scopeSelect),o=Te(Ce,s.__scopeSelect),[n,a]=d.useState(!1),r=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=i.scrollHeight-i.clientHeight,m=Math.ceil(i.scrollTop)<u;a(m)};const i=t.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=t;l&&i&&(l.scrollTop=l.scrollTop+i.offsetHeight)}}):null});Je.displayName=Ce;var Qe=d.forwardRef((s,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=s,a=Y("SelectScrollButton",t),r=d.useRef(null),l=ue(t),i=d.useCallback(()=>{r.current!==null&&(window.clearInterval(r.current),r.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),$(()=>{l().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),c.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:P(n.onPointerDown,()=>{r.current===null&&(r.current=window.setInterval(o,50))}),onPointerMove:P(n.onPointerMove,()=>{a.onItemLeave?.(),r.current===null&&(r.current=window.setInterval(o,50))}),onPointerLeave:P(n.onPointerLeave,()=>{i()})})}),zt="SelectSeparator",Ft=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return c.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});Ft.displayName=zt;var be="SelectArrow",Ut=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=pe(t),a=G(be,t),r=Y(be,t);return a.open&&r.position==="popper"?c.jsx(St,{...n,...o,ref:e}):null});Ut.displayName=be;var Wt="SelectBubbleInput",et=d.forwardRef(({__scopeSelect:s,value:e,...t},o)=>{const n=d.useRef(null),a=L(o,n),r=ct(e);return d.useEffect(()=>{const l=n.current;if(!l)return;const i=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(i,"value").set;if(r!==e&&m){const g=new Event("change",{bubbles:!0});m.call(l,e),l.dispatchEvent(g)}},[r,e]),c.jsx(j.select,{...t,style:{...yt,...t.style},ref:a,defaultValue:e})});et.displayName=Wt;function tt(s){return s===""||s===void 0}function ot(s){const e=dt(s),t=d.useRef(""),o=d.useRef(0),n=d.useCallback(r=>{const l=t.current+r;e(l),(function i(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))})(l)},[e]),a=d.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,a]}function nt(s,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,a=t?s.indexOf(t):-1;let r=Kt(s,Math.max(a,0));n.length===1&&(r=r.filter(u=>u!==t));const i=r.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return i!==t?i:void 0}function Kt(s,e){return s.map((t,o)=>s[(e+o)%s.length])}var $t=Me,Gt=Oe,Yt=Le,qt=ke,Xt=Be,Zt=Ve,Jt=Ue,Qt=Ge,_e=Ye,eo=Xe,to=Ze,oo=Je;function co(s){const e=ee.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx($t,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(s){const e=ee.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx(Yt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(s){const e=ee.c(13);let t,o,n,a;e[0]!==s?({className:o,size:a,children:t,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a):(t=e[1],o=e[2],n=e[3],a=e[4]);const r=a===void 0?"default":a;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive hover:bg-[var(--studio-outline-hover-background)] hover:text-accent-foreground flex w-fit items-center justify-between gap-2 rounded-[var(--studio-control-radius,var(--radius-lg))] bg-[var(--studio-input-background)] px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-[var(--studio-control-height,2rem)] data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-[var(--studio-control-radius,var(--radius-lg))] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(qt,{asChild:!0,children:c.jsx(je,{className:"size-4 opacity-50"})}),e[7]=i):i=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==r||e[11]!==l?(u=c.jsxs(Gt,{"data-slot":"select-trigger","data-size":r,className:l,...n,children:[t,i]}),e[8]=t,e[9]=n,e[10]=r,e[11]=l,e[12]=u):u=e[12],u}function fo(s){const e=ee.c(25);let t,o,n,a,r;e[0]!==s?({className:o,children:t,position:a,hideScrollButtons:r,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a,e[5]=r):(t=e[1],o=e[2],n=e[3],a=e[4],r=e[5]);const l=a===void 0?"popper":a,i=r===void 0?!1:r,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let m;e[6]!==o||e[7]!==u?(m=oe("notranslate bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--studio-surface-radius,var(--radius-lg))] border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=m):m=e[8];let g;e[9]!==i?(g=!i&&c.jsx(no,{}),e[9]=i,e[10]=g):g=e[10];const w=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let y;e[11]!==w?(y=oe("p-1",w),e[11]=w,e[12]=y):y=e[12];let S;e[13]!==t||e[14]!==y?(S=c.jsx(Jt,{className:y,children:t}),e[13]=t,e[14]=y,e[15]=S):S=e[15];let p;e[16]!==i?(p=!i&&c.jsx(so,{}),e[16]=i,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==m||e[21]!==g||e[22]!==S||e[23]!==p?(v=c.jsx(Xt,{children:c.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:m,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=m,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function mo(s){const e=ee.c(19);let t,o,n,a,r;e[0]!==s?({className:o,children:t,description:n,hideCheck:r,...a}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a,e[5]=r):(t=e[1],o=e[2],n=e[3],a=e[4],r=e[5]);const l=r===void 0?!1:r,i=n&&"items-start py-2";let u;e[6]!==o||e[7]!==i?(u=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i,o),e[6]=o,e[7]=i,e[8]=u):u=e[8];let m;e[9]!==l?(m=!l&&c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(eo,{children:c.jsx(wt,{className:"size-4"})})}),e[9]=l,e[10]=m):m=e[10];let g;e[11]!==t||e[12]!==n?(g=n?c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx(_e,{children:t}),c.jsx("span",{className:"text-xs text-muted-foreground whitespace-normal",children:n})]}):c.jsx(_e,{children:t}),e[11]=t,e[12]=n,e[13]=g):g=e[13];let w;return e[14]!==a||e[15]!==u||e[16]!==m||e[17]!==g?(w=c.jsxs(Qt,{"data-slot":"select-item",className:u,...a,children:[m,g]}),e[14]=a,e[15]=u,e[16]=m,e[17]=g,e[18]=w):w=e[18],w}function no(s){const e=ee.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(Ct,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}function so(s){const e=ee.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(je,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}export{co as S,uo as a,po as b,mo as c,fo as d};
@@ -1 +1 @@
1
- import{c as $,b as A,r as R,l as G,j as s,B as H,p as J,v as K,q as Q,D as U}from"./index-bl_DQ3mH.js";import{c as V,b as W,a as X,D as Y}from"./drawer-UzGeZrmC.js";import{u as Z}from"./use-mobile-Di3PCVWm.js";import{c as ee}from"./chat-context-DszOftwV.js";import{S as q,a as se,M as le,c as te}from"./index-DCmQGiOV.js";function fe(L){const e=$.c(48),{variant:o,className:t,placeholder:n,model:l,isLoading:I,credentialId:P,onCredentialChange:k,onModelChange:b,filterModels:E}=L,z=o===void 0?"borderless":o,w=n===void 0?"Select model":n,r=A(),[a,S]=R.useState(!1),i=b!==void 0,F=Z(),O=z==="borderless"?"ghost":"outline",_=z==="borderless"&&"md:border-none";let d;e[0]!==t||e[1]!==_?(d=G("text-sm hover:bg-accent py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",_,t),e[0]=t,e[1]=_,e[2]=d):d=e[2];let c;e[3]!==I||e[4]!==l||e[5]!==w||e[6]!==i?(c=i?s.jsx(q,{model:l??null,placeholder:w,isLoading:I}):s.jsx(ne,{placeholder:w}),e[3]=I,e[4]=l,e[5]=w,e[6]=i,e[7]=c):c=e[7];let D;e[8]!==O||e[9]!==d||e[10]!==c?(D=s.jsx(H,{variant:O,size:"sm",className:d,children:c}),e[8]=O,e[9]=d,e[10]=c,e[11]=D):D=e[11];const f=D;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(se,{}),e[12]=y):y=e[12];let N;e[13]!==P||e[14]!==E||e[15]!==l||e[16]!==k||e[17]!==b||e[18]!==i?(N=s.jsx(R.Suspense,{fallback:y,children:i?s.jsx(le,{onClose:()=>S(!1),credentialId:P??null,onCredentialChange:k??oe,selectedModel:l??null,onModelChange:b,filterModels:E}):s.jsx(te,{onClose:()=>S(!1)})}),e[13]=P,e[14]=E,e[15]=l,e[16]=k,e[17]=b,e[18]=i,e[19]=N):N=e[19];const m=N;if(F){let g;e[20]!==f?(g=s.jsx(V,{asChild:!0,children:f}),e[20]=f,e[21]=g):g=e[21];let j;e[22]!==r?(j=r("chat.selectModel.selectModel"),e[22]=r,e[23]=j):j=e[23];let M;e[24]!==j?(M=s.jsx(W,{className:"sr-only",children:j}),e[24]=j,e[25]=M):M=e[25];let v;e[26]!==m?(v=s.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:m}),e[26]=m,e[27]=v):v=e[27];let C;e[28]!==M||e[29]!==v?(C=s.jsxs(X,{className:"p-0 flex flex-col max-h-[95vh]",children:[M,v]}),e[28]=M,e[29]=v,e[30]=C):C=e[30];let T;return e[31]!==a||e[32]!==g||e[33]!==C?(T=s.jsxs(Y,{open:a,onOpenChange:S,children:[g,C]}),e[31]=a,e[32]=g,e[33]=C,e[34]=T):T=e[34],T}let h;e[35]!==f?(h=s.jsx(J,{asChild:!0,children:f}),e[35]=f,e[36]=h):h=e[36];let x;e[37]!==r?(x=r("chat.selectModel.selectModel"),e[37]=r,e[38]=x):x=e[38];let p;e[39]!==x?(p=s.jsx(K,{className:"sr-only",children:x}),e[39]=x,e[40]=p):p=e[40];let u;e[41]!==m||e[42]!==p?(u=s.jsxs(Q,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[p,m]}),e[41]=m,e[42]=p,e[43]=u):u=e[43];let B;return e[44]!==a||e[45]!==h||e[46]!==u?(B=s.jsxs(U,{open:a,onOpenChange:S,children:[h,u]}),e[44]=a,e[45]=h,e[46]=u,e[47]=B):B=e[47],B}function oe(){}function ne(L){const e=$.c(4),{placeholder:o}=L,{selectedModel:t,isModelsLoading:n}=ee();let l;return e[0]!==n||e[1]!==t||e[2]!==o?(l=s.jsx(q,{model:t,placeholder:o,isLoading:n}),e[0]=n,e[1]=t,e[2]=o,e[3]=l):l=e[3],l}export{fe as M};
1
+ import{c as $,b as A,r as R,l as G,j as s,B as H,p as J,v as K,q as Q,D as U}from"./index-BnoCrGwV.js";import{c as V,b as W,a as X,D as Y}from"./drawer-BXTiY6dg.js";import{u as Z}from"./use-mobile-BKee5QTm.js";import{c as ee}from"./chat-context-BMIrv5uH.js";import{S as q,a as se,M as le,c as te}from"./index-IBL9WNsl.js";function fe(L){const e=$.c(48),{variant:o,className:t,placeholder:n,model:l,isLoading:I,credentialId:P,onCredentialChange:k,onModelChange:b,filterModels:E}=L,z=o===void 0?"borderless":o,w=n===void 0?"Select model":n,r=A(),[a,S]=R.useState(!1),i=b!==void 0,F=Z(),O=z==="borderless"?"ghost":"outline",_=z==="borderless"&&"md:border-none";let d;e[0]!==t||e[1]!==_?(d=G("text-sm hover:bg-accent py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",_,t),e[0]=t,e[1]=_,e[2]=d):d=e[2];let c;e[3]!==I||e[4]!==l||e[5]!==w||e[6]!==i?(c=i?s.jsx(q,{model:l??null,placeholder:w,isLoading:I}):s.jsx(ne,{placeholder:w}),e[3]=I,e[4]=l,e[5]=w,e[6]=i,e[7]=c):c=e[7];let D;e[8]!==O||e[9]!==d||e[10]!==c?(D=s.jsx(H,{variant:O,size:"sm",className:d,children:c}),e[8]=O,e[9]=d,e[10]=c,e[11]=D):D=e[11];const f=D;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(se,{}),e[12]=y):y=e[12];let N;e[13]!==P||e[14]!==E||e[15]!==l||e[16]!==k||e[17]!==b||e[18]!==i?(N=s.jsx(R.Suspense,{fallback:y,children:i?s.jsx(le,{onClose:()=>S(!1),credentialId:P??null,onCredentialChange:k??oe,selectedModel:l??null,onModelChange:b,filterModels:E}):s.jsx(te,{onClose:()=>S(!1)})}),e[13]=P,e[14]=E,e[15]=l,e[16]=k,e[17]=b,e[18]=i,e[19]=N):N=e[19];const m=N;if(F){let g;e[20]!==f?(g=s.jsx(V,{asChild:!0,children:f}),e[20]=f,e[21]=g):g=e[21];let j;e[22]!==r?(j=r("chat.selectModel.selectModel"),e[22]=r,e[23]=j):j=e[23];let M;e[24]!==j?(M=s.jsx(W,{className:"sr-only",children:j}),e[24]=j,e[25]=M):M=e[25];let v;e[26]!==m?(v=s.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:m}),e[26]=m,e[27]=v):v=e[27];let C;e[28]!==M||e[29]!==v?(C=s.jsxs(X,{className:"p-0 flex flex-col max-h-[95vh]",children:[M,v]}),e[28]=M,e[29]=v,e[30]=C):C=e[30];let T;return e[31]!==a||e[32]!==g||e[33]!==C?(T=s.jsxs(Y,{open:a,onOpenChange:S,children:[g,C]}),e[31]=a,e[32]=g,e[33]=C,e[34]=T):T=e[34],T}let h;e[35]!==f?(h=s.jsx(J,{asChild:!0,children:f}),e[35]=f,e[36]=h):h=e[36];let x;e[37]!==r?(x=r("chat.selectModel.selectModel"),e[37]=r,e[38]=x):x=e[38];let p;e[39]!==x?(p=s.jsx(K,{className:"sr-only",children:x}),e[39]=x,e[40]=p):p=e[40];let u;e[41]!==m||e[42]!==p?(u=s.jsxs(Q,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[p,m]}),e[41]=m,e[42]=p,e[43]=u):u=e[43];let B;return e[44]!==a||e[45]!==h||e[46]!==u?(B=s.jsxs(U,{open:a,onOpenChange:S,children:[h,u]}),e[44]=a,e[45]=h,e[46]=u,e[47]=B):B=e[47],B}function oe(){}function ne(L){const e=$.c(4),{placeholder:o}=L,{selectedModel:t,isModelsLoading:n}=ee();let l;return e[0]!==n||e[1]!==t||e[2]!==o?(l=s.jsx(q,{model:t,placeholder:o,isLoading:n}),e[0]=n,e[1]=t,e[2]=o,e[3]=l):l=e[3],l}export{fe as M};
@@ -1 +1 @@
1
- import{c as T,b as ve,j as o,r as ee,at as je,B as Se,h as ke}from"./index-bl_DQ3mH.js";import{$ as fe}from"./agent-icon-BdZdLCky.js";import{S as ue}from"./scroll-area-1S72VGW0.js";import{K as xe,a1 as Ne,o as we,q as _e,a2 as Ee,n as Pe,as as Te}from"./runnable-block-editor-fWbFWGvz.js";import{r as Fe}from"./claim-phase-copy-gKkPnPW4.js";import{u as Re,a as Ce,P as Ke}from"./page-seo-form-DdXyS1MG.js";import{a as ye}from"./Image01-D8Dg78Ju.js";import"./AlertCircle-BILwGqjV.js";import"./Tool01-BSpg9N8Q.js";import"./ArrowUp-CFc2wNu3.js";import"./ArrowLeft-DlRqrbst.js";import"./LinkBroken01-BBYM52IU.js";import"./ShoppingBag01-Brrt7Bh6.js";import"./ZoomOut-Bnst3wtU.js";import"./Building02-QB_UI3sB.js";import"./CheckCircle-CG1RvCMD.js";import"./ChevronUp-BrMcnDd0.js";import"./ChevronSelectorVertical-23OZgHQl.js";import"./UserSquare-BXjBRbTF.js";import"./Copy01-QpufVNbj.js";import"./CreditCard01-W1zS1W7o.js";import"./DotsVertical-E-CAHxZx.js";import"./Globe04-C2IFbCwJ.js";import"./SwitchHorizontal01-B5sfCWHV.js";import"./Key01-CCpcNn9J.js";import"./Link01-Dw-VkUVV.js";import"./Monitor01-596xyLh3.js";import"./Sun-BmhcFIJl.js";import"./Play-CIe1tupB.js";import"./Plus-DTyq8wfJ.js";import"./SearchMd-DnZ_sK_U.js";import"./Trash01-uPItCfKQ.js";import"./Upload01-ClSeM0gf.js";import"./User01-DabbLHAZ.js";import"./Users01-Dt36FENA.js";import"./XClose-BMDlg-34.js";import"./index-BdQq_4o_.js";import"./input-B6YAOx07.js";import"./usage-stats-CAukzrpg.js";import"./tool-namespace-uRsPbj-p.js";import"./form-D6DHFxsw.js";import"./label-Bqj_xjz9.js";import"./utils-CVEq3hMx.js";import"./markdown-5DzLzA6E.js";import"./use-copy-2j0k06rN.js";import"./location-BjlyegC2.js";import"./use-mobile-Di3PCVWm.js";import"./use-panel-navigate-c5H4a21L.js";import"./thread-route-CR0TIP8s.js";import"./use-project-scope-A4YCdR4N.js";import"./repository-binding-BTsmo_dA.js";import"./use-mcp-client-DuTNn1dc.js";import"./auth-CTn9OsYL.js";import"./tooltip-COqLwkid.js";import"./index-B5IA1qMq.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-D8zpT0sX.js";import"./thread-intent-CG-CCDLs.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-B66Eygyb.js";import"./task-board-kbcRVMI1.js";import"./schema-kVE-1hbs.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-DszOftwV.js";import"./autosend-Cr5TlS-x.js";import"./use-ai-providers-IjG3zzka.js";import"./use-chat-navigation-DLnmXNT9.js";import"./use-organization-settings-BOGRgJjV.js";import"./icon-button-d9uOvdxM.js";import"./file-type-icon-C-_1hLql.js";import"./shell-layout-Bk6uPKMe.js";import"./avatar-DNs314ny.js";import"./use-clock-tick-zaL95TTy.js";import"./command-DFd1c5Z5.js";import"./index-Dhdyv2s0.js";import"./integration-icon-DogZfPWq.js";import"./project-icon-DsUbDdQC.js";import"./new-project-dialog-C5lJfUJ3.js";import"./repository-import-picker-D5xDiyD_.js";import"./use-navigate-to-agent-Cu9cZhs8.js";import"./repository-picker-DExxlkis.js";import"./useInfiniteQuery-DeMEFTdd.js";import"./infiniteQueryObserver-rUCOtzeA.js";import"./collection-search-q0ogFMFh.js";import"./use-debounced-value-Dju-tMu1.js";import"./required-auth-layout-Dzef4Ao1.js";import"./use-org-sso-B57pfGVG.js";import"./chat-draft-Bi-CpEK_.js";import"./select-WviNHwZD.js";import"./tabs-BXhvcQgN.js";import"./use-deco-credits-BtvhFk4m.js";import"./toggle-group-Q9SREgL7.js";import"./use-open-billing-url-sjDwQSEM.js";import"./index-DCmQGiOV.js";import"./checkbox-jukyyas4.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-MLSOZysn.js";import"./drawer-UzGeZrmC.js";import"./input-C1msyAUz.js";import"./suggestion-C591DFAx.js";import"./use-chat-layout-state-CVkPEEUs.js";import"./use-file-configs-BSnoYr1R.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-3vLSpQqZ.js";import"./use-org-fs-DOu4nQSr.js";import"./question-004-sINsf4GQ.js";import"./use-members-BqWTpMNp.js";import"./use-org-auth-client-DIUzAE5u.js";import"./feature-paywall-nTUHasXJ.js";import"./plan-ladder-gwROOTzi.js";import"./add-connection-dialog-BB_zBu7s.js";import"./extract-connection-data-CJhjAx3s.js";import"./metadata-D72DunRR.js";import"./connection-DSkv8Cg1.js";import"./url-slug-CUhgOgGc.js";import"./connection-card-C7Yq5GHs.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-DvoMwt1e.js";import"./use-connection-gMb_8zEe.js";import"./schema-BKM3gR2B.js";import"./connection-form-helpers-BsU6F-s_.js";import"./authenticate-and-persist-oauth-bcqFV5Ih.js";import"./mcp-oauth-D_oaXY6E.js";import"./mcp-oauth-tCidCN-u.js";import"./collection-tabs-CYgVG041.js";import"./badge-BDMYkxf_.js";import"./use-infinite-scroll-CtScOz_h.js";import"./useSuspenseInfiniteQuery-CUkGf5w6.js";import"./use-task-board-events-BBlz-cBe.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DjM6V7aG.js";import"./collapsible-CSMgVqT4.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DuGbCe-D.js";import"./types-C5SQt0XZ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CZiDNUQZ.js";import"./use-thread-outputs-c6b1HaAz.js";import"./utils-DHYRJNUn.js";import"./monaco-editor-2Ci5R71u.js";import"./editor-KeKsFC14.js";import"./calendar-9HE_r4Hw.js";import"./use-new-blocks-editor-D9sV9o2T.js";import"./rich-text-link-control-CNQ92nZ4.js";import"./switch-CUK4V52q.js";import"./core.esm-lZvNzlYc.js";import"./sortable.esm-h3AYG-u7.js";import"./view-mode-toggle-B55pxnK_.js";import"./combobox-BTfHieW4.js";import"./alert-dialog-By0HRTrM.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-pTAwOtCG.js";import"./asset-utils-Cne_zeGQ.js";import"./sandbox-git-api-C7JbVL7R.js";function A(d){return typeof d=="string"&&d.trim()?d:void 0}function he(d,e){if(d){if(e)try{const t=new URL(d,e).href;return xe(t)}catch{return}return xe(d)}}function ze(d){if(!d)return{};const e=A(d.title),t=A(d.titleTemplate);return{title:e&&t?.includes("%s")?t.replace(/%s/g,e):e,description:A(d.description),image:A(d.image),favicon:A(d.favicon)}}function De(d){if(!d)return"example.com";try{return new URL(d).host}catch{return"example.com"}}const $e=[{id:"google",labelKey:"sectionsEditor.seoPreview.platformGoogle",color:"#4285F4",layout:"search"},{id:"facebook",labelKey:"sectionsEditor.seoPreview.platformFacebook",color:"#1877F2",layout:"card"},{id:"twitter",labelKey:"sectionsEditor.seoPreview.platformTwitter",color:"#0f1419",layout:"card"},{id:"linkedin",labelKey:"sectionsEditor.seoPreview.platformLinkedin",color:"#0A66C2",layout:"card"},{id:"whatsapp",labelKey:"sectionsEditor.seoPreview.platformWhatsapp",color:"#25D366",layout:"chat"},{id:"telegram",labelKey:"sectionsEditor.seoPreview.platformTelegram",color:"#229ED9",layout:"chat"},{id:"slack",labelKey:"sectionsEditor.seoPreview.platformSlack",color:"#611f69",layout:"attachment"},{id:"discord",labelKey:"sectionsEditor.seoPreview.platformDiscord",color:"#5865F2",layout:"attachment"}];function de(d){const e=T.c(10),{src:t,className:c,iconSize:v}=d,l=v===void 0?20:v;if(t){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==c||e[2]!==t?(p=o.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:c,style:m}),e[1]=c,e[2]=t,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let i;e[5]!==l?(i=o.jsx(ye,{size:l}),e[5]=l,e[6]=i):i=e[6];let n;return e[7]!==c||e[8]!==i?(n=o.jsx("div",{className:c,style:s,children:i}),e[7]=c,e[8]=i,e[9]=n):n=e[9],n}function Ie(d){const e=T.c(33),{seo:t,host:c,path:v,t:l}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#fff",border:"1px solid #dadce0"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={background:"#f1f3f4"},e[1]=i):i=e[1];let n;e[2]!==t.favicon?(n=o.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:i,children:t.favicon?o.jsx("img",{src:t.favicon,alt:"",className:"size-full object-cover"}):o.jsx(ye,{size:12,color:"#9aa0a6"})}),e[2]=t.favicon,e[3]=n):n=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#202124"},e[4]=m):m=e[4];let p;e[5]!==c?(p=o.jsx("div",{className:"truncate text-[13px] leading-tight",style:m,children:c}),e[5]=c,e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#4d5156"},e[7]=f):f=e[7];let r;e[8]!==c||e[9]!==v?(r=o.jsxs("div",{className:"truncate text-[12px] leading-tight",style:f,children:[c,v]}),e[8]=c,e[9]=v,e[10]=r):r=e[10];let a;e[11]!==p||e[12]!==r?(a=o.jsxs("div",{className:"min-w-0",children:[p,r]}),e[11]=p,e[12]=r,e[13]=a):a=e[13];let h;e[14]!==n||e[15]!==a?(h=o.jsxs("div",{className:"flex items-center gap-2",children:[n,a]}),e[14]=n,e[15]=a,e[16]=h):h=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#1a0dab"},e[17]=u):u=e[17];let y;e[18]!==t.title||e[19]!==l?(y=t.title??l("sectionsEditor.seoPreview.fallbackTitle"),e[18]=t.title,e[19]=l,e[20]=y):y=e[20];let x;e[21]!==y?(x=o.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:u,children:y}),e[21]=y,e[22]=x):x=e[22];let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S={color:"#4d5156"},e[23]=S):S=e[23];let g;e[24]!==t.description||e[25]!==l?(g=t.description??l("sectionsEditor.seoPreview.fallbackDescription"),e[24]=t.description,e[25]=l,e[26]=g):g=e[26];let b;e[27]!==g?(b=o.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:S,children:g}),e[27]=g,e[28]=b):b=e[28];let j;return e[29]!==x||e[30]!==b||e[31]!==h?(j=o.jsxs("div",{className:"rounded-lg p-3 text-left",style:s,children:[h,x,b]}),e[29]=x,e[30]=b,e[31]=h,e[32]=j):j=e[32],j}function Le(d){const e=T.c(26),{seo:t,host:c,t:v}=d;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={background:"#fff",border:"1px solid #e2e8f0"},e[0]=l):l=e[0];let s;e[1]!==t.image?(s=o.jsx(de,{src:t.image,className:"h-40 w-full"}),e[1]=t.image,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={borderTop:"1px solid #e2e8f0"},e[3]=i):i=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n={color:"#8a9099"},e[4]=n):n=e[4];let m;e[5]!==c?(m=o.jsx("div",{className:"truncate text-[11px]",style:n,children:c}),e[5]=c,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[7]=p):p=e[7];let f;e[8]!==t.title||e[9]!==v?(f=t.title??v("sectionsEditor.seoPreview.fallbackTitle"),e[8]=t.title,e[9]=v,e[10]=f):f=e[10];let r;e[11]!==f?(r=o.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:p,children:f}),e[11]=f,e[12]=r):r=e[12];let a;e[13]===Symbol.for("react.memo_cache_sentinel")?(a={color:"#60666c"},e[13]=a):a=e[13];let h;e[14]!==t.description||e[15]!==v?(h=t.description??v("sectionsEditor.seoPreview.fallbackDescription"),e[14]=t.description,e[15]=v,e[16]=h):h=e[16];let u;e[17]!==h?(u=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:a,children:h}),e[17]=h,e[18]=u):u=e[18];let y;e[19]!==u||e[20]!==m||e[21]!==r?(y=o.jsxs("div",{className:"px-3 py-2",style:i,children:[m,r,u]}),e[19]=u,e[20]=m,e[21]=r,e[22]=y):y=e[22];let x;return e[23]!==y||e[24]!==s?(x=o.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:l,children:[s,y]}),e[23]=y,e[24]=s,e[25]=x):x=e[25],x}function Be(d){const e=T.c(36),{seo:t,host:c,accent:v,t:l}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f0f2f5"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={color:"#3b4045"},e[1]=i):i=e[1];let n;e[2]!==l?(n=l("sectionsEditor.seoPreview.chatCardHint"),e[2]=l,e[3]=n):n=e[3];let m;e[4]!==n?(m=o.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:i,children:n}),e[4]=n,e[5]=m):m=e[5];const p=`3px solid ${v}`;let f;e[6]!==p?(f={background:"#fff",borderLeft:p},e[6]=p,e[7]=f):f=e[7];let r;e[8]!==t.image?(r=o.jsx(de,{src:t.image,className:"h-28 w-full",iconSize:18}),e[8]=t.image,e[9]=r):r=e[9];let a;e[10]===Symbol.for("react.memo_cache_sentinel")?(a={color:"#1c2024"},e[10]=a):a=e[10];let h;e[11]!==t.title||e[12]!==l?(h=t.title??l("sectionsEditor.seoPreview.fallbackTitle"),e[11]=t.title,e[12]=l,e[13]=h):h=e[13];let u;e[14]!==h?(u=o.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:a,children:h}),e[14]=h,e[15]=u):u=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y={color:"#60666c"},e[16]=y):y=e[16];let x;e[17]!==t.description||e[18]!==l?(x=t.description??l("sectionsEditor.seoPreview.fallbackDescription"),e[17]=t.description,e[18]=l,e[19]=x):x=e[19];let S;e[20]!==x?(S=o.jsx("div",{className:"line-clamp-2 text-[11px]",style:y,children:x}),e[20]=x,e[21]=S):S=e[21];let g;e[22]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#8a9099"},e[22]=g):g=e[22];let b;e[23]!==c?(b=o.jsx("div",{className:"mt-0.5 text-[10px]",style:g,children:c}),e[23]=c,e[24]=b):b=e[24];let j;e[25]!==u||e[26]!==S||e[27]!==b?(j=o.jsxs("div",{className:"px-2.5 py-1.5",children:[u,S,b]}),e[25]=u,e[26]=S,e[27]=b,e[28]=j):j=e[28];let k;e[29]!==j||e[30]!==f||e[31]!==r?(k=o.jsxs("div",{className:"overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-md))]",style:f,children:[r,j]}),e[29]=j,e[30]=f,e[31]=r,e[32]=k):k=e[32];let N;return e[33]!==k||e[34]!==m?(N=o.jsxs("div",{className:"rounded-lg p-2 text-left",style:s,children:[m,k]}),e[33]=k,e[34]=m,e[35]=N):N=e[35],N}function Oe(d){const e=T.c(39),{seo:t,host:c,accent:v,dark:l,t:s}=d,i=l?"#2b2d31":"#fff",n=l?"#00a8fc":"#1264a3",m=l?"#dbdee1":"#3b4045",p=l?"#949ba4":"#8a9099",f=l?"none":"1px solid #e2e8f0";let r;e[0]!==i||e[1]!==f?(r={background:i,border:f},e[0]=i,e[1]=f,e[2]=r):r=e[2];const a=`3px solid ${v}`;let h;e[3]!==a?(h={borderLeft:a,borderRadius:2},e[3]=a,e[4]=h):h=e[4];let u;e[5]!==p?(u={color:p},e[5]=p,e[6]=u):u=e[6];let y;e[7]!==c||e[8]!==u?(y=o.jsx("div",{className:"text-[10px]",style:u,children:c}),e[7]=c,e[8]=u,e[9]=y):y=e[9];let x;e[10]!==n?(x={color:n},e[10]=n,e[11]=x):x=e[11];let S;e[12]!==t.title||e[13]!==s?(S=t.title??s("sectionsEditor.seoPreview.fallbackTitle"),e[12]=t.title,e[13]=s,e[14]=S):S=e[14];let g;e[15]!==x||e[16]!==S?(g=o.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:x,children:S}),e[15]=x,e[16]=S,e[17]=g):g=e[17];let b;e[18]!==m?(b={color:m},e[18]=m,e[19]=b):b=e[19];let j;e[20]!==t.description||e[21]!==s?(j=t.description??s("sectionsEditor.seoPreview.fallbackDescription"),e[20]=t.description,e[21]=s,e[22]=j):j=e[22];let k;e[23]!==b||e[24]!==j?(k=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:b,children:j}),e[23]=b,e[24]=j,e[25]=k):k=e[25];let N;e[26]!==k||e[27]!==y||e[28]!==g?(N=o.jsxs("div",{className:"min-w-0 flex-1",children:[y,g,k]}),e[26]=k,e[27]=y,e[28]=g,e[29]=N):N=e[29];let w;e[30]!==t.image?(w=o.jsx(de,{src:t.image,className:"size-14 shrink-0 rounded-[var(--studio-control-radius,var(--radius))]",iconSize:16}),e[30]=t.image,e[31]=w):w=e[31];let _;e[32]!==N||e[33]!==w||e[34]!==h?(_=o.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:h,children:[N,w]}),e[32]=N,e[33]=w,e[34]=h,e[35]=_):_=e[35];let P;return e[36]!==_||e[37]!==r?(P=o.jsx("div",{className:"rounded-lg p-2.5 text-left",style:r,children:_}),e[36]=_,e[37]=r,e[38]=P):P=e[38],P}function Ue(d){const e=T.c(21),{platform:t,seo:c,host:v,path:l,t:s}=d;let i;e[0]!==v||e[1]!==l||e[2]!==t.color||e[3]!==t.id||e[4]!==t.layout||e[5]!==c||e[6]!==s?(i=t.layout==="search"?o.jsx(Ie,{seo:c,host:v,path:l,t:s}):t.layout==="card"?o.jsx(Le,{seo:c,host:v,path:l,t:s}):t.layout==="chat"?o.jsx(Be,{seo:c,host:v,path:l,accent:t.color,t:s}):o.jsx(Oe,{seo:c,host:v,path:l,accent:t.color,dark:t.id==="discord",t:s}),e[0]=v,e[1]=l,e[2]=t.color,e[3]=t.id,e[4]=t.layout,e[5]=c,e[6]=s,e[7]=i):i=e[7];const n=i;let m;e[8]!==t.color?(m=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:t.color}}),e[8]=t.color,e[9]=m):m=e[9];let p;e[10]!==t.labelKey||e[11]!==s?(p=s(t.labelKey),e[10]=t.labelKey,e[11]=s,e[12]=p):p=e[12];let f;e[13]!==p?(f=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:p}),e[13]=p,e[14]=f):f=e[14];let r;e[15]!==m||e[16]!==f?(r=o.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[m,f]}),e[15]=m,e[16]=f,e[17]=r):r=e[17];let a;return e[18]!==n||e[19]!==r?(a=o.jsxs("div",{children:[r,n]}),e[18]=n,e[19]=r,e[20]=a):a=e[20],a}function Ae(d){const e=T.c(18),{seo:t,url:c,path:v}=d,l=v===void 0?"/":v,s=ve();let i,n,m;if(e[0]!==t||e[1]!==c){const x=ze(t);i=x,n=he(x.image,c),m=he(x.favicon,c),e[0]=t,e[1]=c,e[2]=i,e[3]=n,e[4]=m}else i=e[2],n=e[3],m=e[4];let p;e[5]!==i||e[6]!==n||e[7]!==m?(p={...i,image:n,favicon:m},e[5]=i,e[6]=n,e[7]=m,e[8]=p):p=e[8];const f=p;let r;e[9]!==c?(r=De(c),e[9]=c,e[10]=r):r=e[10];const a=r,h=l==="/"?"":l;let u;e[11]!==h||e[12]!==a||e[13]!==s||e[14]!==f?(u=$e.map(x=>o.jsx(Ue,{platform:x,seo:f,host:a,path:h,t:s},x.id)),e[11]=h,e[12]=a,e[13]=s,e[14]=f,e[15]=u):u=e[15];let y;return e[16]!==u?(y=o.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:u}),e[16]=u,e[17]=y):y=e[17],y}function Ai(d){const e=T.c(70),{orgSlug:t,virtualMcpId:c,branch:v,decofile:l,meta:s,target:i,previewBaseUrl:n,onSaved:m,onEditDefaultSeo:p,onBack:f}=d,r=ve(),a=Ne(l,i,s),h=a?.seoData,u=i.kind==="site"?"site":i.pageKey,[y,x]=ee.useState(u),[S,g]=ee.useState(null),[b,j]=ee.useState(0),[k,N]=ee.useState(void 0);y!==u&&(x(u),g(null),N(void 0),j(Ge));const{persistSeo:w,persistRawSeo:_,flush:P,isPending:te}=Re({orgSlug:t,virtualMcpId:c,branch:v,target:i,resolved:a,onSaved:m}),M=i.kind==="page",ge=M?a?.rawSeoData:void 0,U=k!==void 0?k:ge,be=M?we(U)??void 0:void 0,E=S??be??h??{},F=a?Ce(E,a):null,K=F&&(!M||_e(U))?Fe(F,s):null;let G;e[0]!==s?(G=Ee(s),e[0]=s,e[1]=G):G=e[1];const oe=G;let R,H;e[2]!==l||e[3]!==E||e[4]!==s||e[5]!==i.kind?(R=i.kind==="page"?Pe(l,s)?.seoData??{}:{},H=i.kind==="page"?Ve(R,E):E,e[2]=l,e[3]=E,e[4]=s,e[5]=i.kind,e[6]=R,e[7]=H):(R=e[6],H=e[7]);const ie=H;let V;e[8]!==w||e[9]!==a||e[10]!==g?(V=C=>{if(!a)return;const pe=C;g(pe),w(pe)},e[8]=w,e[9]=a,e[10]=g,e[11]=V):V=e[11];const se=V;let q;e[12]!==g?(q=()=>g(null),e[12]=g,e[13]=q):q=e[13];const re=q;let W;e[14]!==j?(W=()=>j(Me),e[14]=j,e[15]=W):W=e[15];const le=W;let J;e[16]!==P||e[17]!==f?(J=()=>{P(),f?.()},e[16]=P,e[17]=f,e[18]=J):J=e[18];const ae=J,z=i.kind==="page"?i.path:"/";let Q;e[19]!==z||e[20]!==n||e[21]!==i.kind?(Q=i.kind==="page"&&n?He(z,n):n??null,e[19]=z,e[20]=n,e[21]=i.kind,e[22]=Q):Q=e[22];const ce=Q;let X;e[23]!==a||e[24]!==r||e[25]!==i.kind?(X=i.kind==="site"?r("sectionsEditor.seoEditor.noSiteSeoBlock"):r(a?"sectionsEditor.seoEditor.noSeoSchema":"sectionsEditor.seoEditor.couldNotLoadSeo"),e[23]=a,e[24]=r,e[25]=i.kind,e[26]=X):X=e[26];const ne=X,Y=M&&a,me=i.kind==="site"&&a&&K;let D;e[27]!==ae||e[28]!==r||e[29]!==i.kind||e[30]!==i.pageName?(D=i.kind==="page"?o.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[o.jsx("button",{type:"button",onClick:ae,title:i.pageName,className:"min-w-0 truncate rounded-[var(--studio-control-radius,var(--radius-md))] px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:i.pageName}),o.jsx(je,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:r("sectionsEditor.seoEditor.defaultSeoLabel")}),o.jsxs("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:["· ",r("sectionsEditor.seoEditor.appliedToEveryPage")]})]}),e[27]=ae,e[28]=r,e[29]=i.kind,e[30]=i.pageName,e[31]=D):D=e[31];let $;e[32]!==te?($=te&&o.jsx(ke,{className:"size-3.5 text-muted-foreground"}),e[32]=te,e[33]=$):$=e[33];let I;e[34]!==p||e[35]!==r||e[36]!==i.kind?(I=i.kind==="page"&&p&&o.jsxs(Se,{type:"button",variant:"outline",size:"sm",onClick:p,children:[o.jsx(fe,{size:14}),r("sectionsEditor.seoEditor.editDefaultSeoButton")]}),e[34]=p,e[35]=r,e[36]=i.kind,e[37]=I):I=e[37];let L;e[38]!==$||e[39]!==I?(L=o.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[$,I]}),e[38]=$,e[39]=I,e[40]=L):L=e[40];let B;e[41]!==L||e[42]!==D?(B=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[D,L]}),e[41]=L,e[42]=D,e[43]=B):B=e[43];let O;e[44]!==F||e[45]!==le||e[46]!==re||e[47]!==oe||e[48]!==U||e[49]!==E||e[50]!==ne||e[51]!==b||e[52]!==se||e[53]!==z||e[54]!==_||e[55]!==w||e[56]!==ie||e[57]!==ce||e[58]!==a||e[59]!==K||e[60]!==g||e[61]!==N||e[62]!==Y||e[63]!==me||e[64]!==R||e[65]!==r?(O=!a||!Y&&!me?o.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ne}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-5 py-4",children:Y?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:r("sectionsEditor.seoEditor.emptyFieldsHint")}),o.jsx(Ke,{rawSeo:U,innerSeo:E,defaultResolveType:oe,seoSchema:K,activeResolveType:F,seoTypeOptions:a.seoTypeOptions,formResetKey:b,siteDefaultSeo:R,onPersistRaw:C=>{N(C),_(C)},onInnerChange:C=>{g(C),w(C)},onClearForm:re,onBumpFormKey:le})]}):K&&F&&o.jsx(Te,{schema:K,resolveType:F,value:E,formResetKey:b,onChange:se})})}),o.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"@container px-5 py-4",children:o.jsx(Ae,{seo:ie,url:ce,path:z})})})]}),e[44]=F,e[45]=le,e[46]=re,e[47]=oe,e[48]=U,e[49]=E,e[50]=ne,e[51]=b,e[52]=se,e[53]=z,e[54]=_,e[55]=w,e[56]=ie,e[57]=ce,e[58]=a,e[59]=K,e[60]=g,e[61]=N,e[62]=Y,e[63]=me,e[64]=R,e[65]=r,e[66]=O):O=e[66];let Z;return e[67]!==B||e[68]!==O?(Z=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[B,O]}),e[67]=B,e[68]=O,e[69]=Z):Z=e[69],Z}function Me(d){return d+1}function Ge(d){return d+1}function He(d,e){try{return new URL(d,e).href}catch{return e}}function Ve(d,e){const t=e.__resolveType,c=d.__resolveType;if(typeof t=="string"&&typeof c=="string"&&t!==c)return{...e};const v={...d};for(const[l,s]of Object.entries(e))l!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(v[l]=s));return v}export{Ai as SeoEditor};
1
+ import{c as T,b as ve,j as o,r as ee,at as je,B as Se,h as ke}from"./index-BnoCrGwV.js";import{$ as fe}from"./agent-icon-BVzFWL_k.js";import{S as ue}from"./scroll-area-ClXMKXdj.js";import{K as xe,a1 as Ne,o as we,q as _e,a2 as Ee,n as Pe,as as Te}from"./runnable-block-editor-gl-EMkKx.js";import{r as Fe}from"./claim-phase-copy-CukA7Dwd.js";import{u as Re,a as Ce,P as Ke}from"./page-seo-form-DPSCL9_1.js";import{a as ye}from"./Image01-WncLby5J.js";import"./AlertCircle-DVHl2wob.js";import"./Tool01-DqVqi_FU.js";import"./ArrowUp-DESKNNlf.js";import"./ArrowLeft-5wXFDAmZ.js";import"./LinkBroken01-SQZX7UHe.js";import"./ShoppingBag01-E-rUyhpG.js";import"./ZoomOut-CePPHC89.js";import"./Building02-CFiq1p9R.js";import"./CheckCircle-DAvSmLHO.js";import"./ChevronUp-Di-YfZWV.js";import"./ChevronSelectorVertical-KK06uLTv.js";import"./UserSquare-CEGUDYl2.js";import"./Copy01-CvnGuZZ3.js";import"./CreditCard01-CpFAcFMU.js";import"./DotsVertical-B8mqV8lL.js";import"./Globe04-CCXvQu2N.js";import"./SwitchHorizontal01-DCGuISL6.js";import"./Key01-Bhf2mFGP.js";import"./Link01-vjT_tIt-.js";import"./Monitor01-CZgg0RSg.js";import"./Sun-D612nlCs.js";import"./Play-CSVNLFwP.js";import"./Plus-C7i72Ui0.js";import"./SearchMd--I1GEx-C.js";import"./Trash01-BdVvG1w5.js";import"./Upload01-CEQBjXAP.js";import"./User01-DzMieRdG.js";import"./Users01-CW8HA66N.js";import"./XClose-ByJq3z1t.js";import"./index-BdQq_4o_.js";import"./input-D4UgTJ69.js";import"./usage-stats-BL57yImZ.js";import"./tool-namespace-BCIJDBpU.js";import"./form-qApBoH9w.js";import"./label-D0foYPWf.js";import"./utils-CVEq3hMx.js";import"./markdown-mBxXiRvM.js";import"./use-copy-DKdPALi_.js";import"./location-BjlyegC2.js";import"./use-mobile-BKee5QTm.js";import"./use-panel-navigate-DAoDF43u.js";import"./thread-route-BPs4zslo.js";import"./use-project-scope-C3zEyt8p.js";import"./repository-binding-C8cI0_BR.js";import"./use-mcp-client-F8qIxKEF.js";import"./auth-BM0B-cGs.js";import"./tooltip-D58qe9VW.js";import"./index-B5YiUV4I.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-DAjIYzO8.js";import"./thread-intent-CXunryww.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BpjjRSV_.js";import"./task-board-l22wFLNQ.js";import"./schema-Cwz0xn-Q.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-BMIrv5uH.js";import"./autosend-ACmUx5MO.js";import"./use-ai-providers-Fk-ioKuC.js";import"./use-chat-navigation-zHRcYkWa.js";import"./use-organization-settings-DE6EFzZl.js";import"./icon-button-CTsUwdOO.js";import"./file-type-icon-BRADjmum.js";import"./shell-layout-CEs2Lzv8.js";import"./avatar-Du8JG5EY.js";import"./use-clock-tick-Dz0tKfh3.js";import"./command-BSyD71wq.js";import"./index-DJa5VNJ9.js";import"./integration-icon-DcBDH52f.js";import"./project-icon-B64BT2qc.js";import"./new-project-dialog-Cqt9GN_i.js";import"./repository-import-picker-BKAJgfVd.js";import"./use-navigate-to-agent-LQKyEvv0.js";import"./repository-picker-F2WyjZCv.js";import"./useInfiniteQuery-CrNtEvb5.js";import"./infiniteQueryObserver-DzxIYVHF.js";import"./collection-search-Bo7KXUbF.js";import"./use-debounced-value-Bkmt--Vh.js";import"./required-auth-layout-C7-28_EU.js";import"./use-org-sso-7gybTWnn.js";import"./chat-draft-_hxvCJKw.js";import"./select-4dFEgKOb.js";import"./tabs-Bm8-oaP0.js";import"./use-deco-credits-D9reDEA1.js";import"./toggle-group-D6lQXGki.js";import"./use-open-billing-url-B8yYvcNp.js";import"./index-IBL9WNsl.js";import"./checkbox-DvQZTmm6.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-DeebArTG.js";import"./drawer-BXTiY6dg.js";import"./input-Dwwabqbj.js";import"./suggestion-DZ2maKDk.js";import"./use-chat-layout-state-DXfMGuIM.js";import"./use-file-configs-vHZ4c2kM.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-BOuduomf.js";import"./use-org-fs-CfbJ-qpv.js";import"./question-004-sINsf4GQ.js";import"./use-members-CbU4crhI.js";import"./use-org-auth-client-DUhvuYX9.js";import"./feature-paywall-CqkVt_-T.js";import"./plan-ladder-CuhqhssD.js";import"./add-connection-dialog-Cd8-TxBb.js";import"./extract-connection-data-DykkXLPs.js";import"./metadata-D72DunRR.js";import"./connection-BV0Ji7-y.js";import"./url-slug-BeoES-bn.js";import"./connection-card-BGBC1Vy2.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-DoDVPYV2.js";import"./use-connection-CWYEcZtk.js";import"./schema-BPpEaREa.js";import"./connection-form-helpers-DgicL3qY.js";import"./authenticate-and-persist-oauth-BRn95Iqc.js";import"./mcp-oauth-CS16PRCo.js";import"./mcp-oauth-Dg0thBi5.js";import"./collection-tabs-DCHbr1Vt.js";import"./badge-BEq8f8Nc.js";import"./use-infinite-scroll-IKS1f5vo.js";import"./useSuspenseInfiniteQuery-Ag6TKbPs.js";import"./use-task-board-events-BMlQSCd3.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-xBw_CC4U.js";import"./collapsible-CRuF_99G.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DMqJU_ff.js";import"./types-BPkPu0Zu.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CV4TQLcF.js";import"./use-thread-outputs-v6xfPIih.js";import"./utils-DkhoCm_9.js";import"./monaco-editor-CPeZZpu3.js";import"./editor-BO3RLENr.js";import"./calendar-DpEcLQ6J.js";import"./use-new-blocks-editor-CHx1p4ni.js";import"./rich-text-link-control-BJZoQZZi.js";import"./switch-Dl_eh6Nb.js";import"./core.esm-Dilbpce_.js";import"./sortable.esm-Di32jx09.js";import"./view-mode-toggle-Oj88POra.js";import"./combobox-DocJ2-jK.js";import"./alert-dialog-DTOyag1c.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-BPlE2YGC.js";import"./asset-utils-CDOZckz4.js";import"./sandbox-git-api-C7JbVL7R.js";function A(d){return typeof d=="string"&&d.trim()?d:void 0}function he(d,e){if(d){if(e)try{const t=new URL(d,e).href;return xe(t)}catch{return}return xe(d)}}function ze(d){if(!d)return{};const e=A(d.title),t=A(d.titleTemplate);return{title:e&&t?.includes("%s")?t.replace(/%s/g,e):e,description:A(d.description),image:A(d.image),favicon:A(d.favicon)}}function De(d){if(!d)return"example.com";try{return new URL(d).host}catch{return"example.com"}}const $e=[{id:"google",labelKey:"sectionsEditor.seoPreview.platformGoogle",color:"#4285F4",layout:"search"},{id:"facebook",labelKey:"sectionsEditor.seoPreview.platformFacebook",color:"#1877F2",layout:"card"},{id:"twitter",labelKey:"sectionsEditor.seoPreview.platformTwitter",color:"#0f1419",layout:"card"},{id:"linkedin",labelKey:"sectionsEditor.seoPreview.platformLinkedin",color:"#0A66C2",layout:"card"},{id:"whatsapp",labelKey:"sectionsEditor.seoPreview.platformWhatsapp",color:"#25D366",layout:"chat"},{id:"telegram",labelKey:"sectionsEditor.seoPreview.platformTelegram",color:"#229ED9",layout:"chat"},{id:"slack",labelKey:"sectionsEditor.seoPreview.platformSlack",color:"#611f69",layout:"attachment"},{id:"discord",labelKey:"sectionsEditor.seoPreview.platformDiscord",color:"#5865F2",layout:"attachment"}];function de(d){const e=T.c(10),{src:t,className:c,iconSize:v}=d,l=v===void 0?20:v;if(t){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==c||e[2]!==t?(p=o.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:c,style:m}),e[1]=c,e[2]=t,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let i;e[5]!==l?(i=o.jsx(ye,{size:l}),e[5]=l,e[6]=i):i=e[6];let n;return e[7]!==c||e[8]!==i?(n=o.jsx("div",{className:c,style:s,children:i}),e[7]=c,e[8]=i,e[9]=n):n=e[9],n}function Ie(d){const e=T.c(33),{seo:t,host:c,path:v,t:l}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#fff",border:"1px solid #dadce0"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={background:"#f1f3f4"},e[1]=i):i=e[1];let n;e[2]!==t.favicon?(n=o.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:i,children:t.favicon?o.jsx("img",{src:t.favicon,alt:"",className:"size-full object-cover"}):o.jsx(ye,{size:12,color:"#9aa0a6"})}),e[2]=t.favicon,e[3]=n):n=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#202124"},e[4]=m):m=e[4];let p;e[5]!==c?(p=o.jsx("div",{className:"truncate text-[13px] leading-tight",style:m,children:c}),e[5]=c,e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#4d5156"},e[7]=f):f=e[7];let r;e[8]!==c||e[9]!==v?(r=o.jsxs("div",{className:"truncate text-[12px] leading-tight",style:f,children:[c,v]}),e[8]=c,e[9]=v,e[10]=r):r=e[10];let a;e[11]!==p||e[12]!==r?(a=o.jsxs("div",{className:"min-w-0",children:[p,r]}),e[11]=p,e[12]=r,e[13]=a):a=e[13];let h;e[14]!==n||e[15]!==a?(h=o.jsxs("div",{className:"flex items-center gap-2",children:[n,a]}),e[14]=n,e[15]=a,e[16]=h):h=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#1a0dab"},e[17]=u):u=e[17];let y;e[18]!==t.title||e[19]!==l?(y=t.title??l("sectionsEditor.seoPreview.fallbackTitle"),e[18]=t.title,e[19]=l,e[20]=y):y=e[20];let x;e[21]!==y?(x=o.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:u,children:y}),e[21]=y,e[22]=x):x=e[22];let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S={color:"#4d5156"},e[23]=S):S=e[23];let g;e[24]!==t.description||e[25]!==l?(g=t.description??l("sectionsEditor.seoPreview.fallbackDescription"),e[24]=t.description,e[25]=l,e[26]=g):g=e[26];let b;e[27]!==g?(b=o.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:S,children:g}),e[27]=g,e[28]=b):b=e[28];let j;return e[29]!==x||e[30]!==b||e[31]!==h?(j=o.jsxs("div",{className:"rounded-lg p-3 text-left",style:s,children:[h,x,b]}),e[29]=x,e[30]=b,e[31]=h,e[32]=j):j=e[32],j}function Le(d){const e=T.c(26),{seo:t,host:c,t:v}=d;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={background:"#fff",border:"1px solid #e2e8f0"},e[0]=l):l=e[0];let s;e[1]!==t.image?(s=o.jsx(de,{src:t.image,className:"h-40 w-full"}),e[1]=t.image,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={borderTop:"1px solid #e2e8f0"},e[3]=i):i=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n={color:"#8a9099"},e[4]=n):n=e[4];let m;e[5]!==c?(m=o.jsx("div",{className:"truncate text-[11px]",style:n,children:c}),e[5]=c,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[7]=p):p=e[7];let f;e[8]!==t.title||e[9]!==v?(f=t.title??v("sectionsEditor.seoPreview.fallbackTitle"),e[8]=t.title,e[9]=v,e[10]=f):f=e[10];let r;e[11]!==f?(r=o.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:p,children:f}),e[11]=f,e[12]=r):r=e[12];let a;e[13]===Symbol.for("react.memo_cache_sentinel")?(a={color:"#60666c"},e[13]=a):a=e[13];let h;e[14]!==t.description||e[15]!==v?(h=t.description??v("sectionsEditor.seoPreview.fallbackDescription"),e[14]=t.description,e[15]=v,e[16]=h):h=e[16];let u;e[17]!==h?(u=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:a,children:h}),e[17]=h,e[18]=u):u=e[18];let y;e[19]!==u||e[20]!==m||e[21]!==r?(y=o.jsxs("div",{className:"px-3 py-2",style:i,children:[m,r,u]}),e[19]=u,e[20]=m,e[21]=r,e[22]=y):y=e[22];let x;return e[23]!==y||e[24]!==s?(x=o.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:l,children:[s,y]}),e[23]=y,e[24]=s,e[25]=x):x=e[25],x}function Be(d){const e=T.c(36),{seo:t,host:c,accent:v,t:l}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f0f2f5"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={color:"#3b4045"},e[1]=i):i=e[1];let n;e[2]!==l?(n=l("sectionsEditor.seoPreview.chatCardHint"),e[2]=l,e[3]=n):n=e[3];let m;e[4]!==n?(m=o.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:i,children:n}),e[4]=n,e[5]=m):m=e[5];const p=`3px solid ${v}`;let f;e[6]!==p?(f={background:"#fff",borderLeft:p},e[6]=p,e[7]=f):f=e[7];let r;e[8]!==t.image?(r=o.jsx(de,{src:t.image,className:"h-28 w-full",iconSize:18}),e[8]=t.image,e[9]=r):r=e[9];let a;e[10]===Symbol.for("react.memo_cache_sentinel")?(a={color:"#1c2024"},e[10]=a):a=e[10];let h;e[11]!==t.title||e[12]!==l?(h=t.title??l("sectionsEditor.seoPreview.fallbackTitle"),e[11]=t.title,e[12]=l,e[13]=h):h=e[13];let u;e[14]!==h?(u=o.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:a,children:h}),e[14]=h,e[15]=u):u=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y={color:"#60666c"},e[16]=y):y=e[16];let x;e[17]!==t.description||e[18]!==l?(x=t.description??l("sectionsEditor.seoPreview.fallbackDescription"),e[17]=t.description,e[18]=l,e[19]=x):x=e[19];let S;e[20]!==x?(S=o.jsx("div",{className:"line-clamp-2 text-[11px]",style:y,children:x}),e[20]=x,e[21]=S):S=e[21];let g;e[22]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#8a9099"},e[22]=g):g=e[22];let b;e[23]!==c?(b=o.jsx("div",{className:"mt-0.5 text-[10px]",style:g,children:c}),e[23]=c,e[24]=b):b=e[24];let j;e[25]!==u||e[26]!==S||e[27]!==b?(j=o.jsxs("div",{className:"px-2.5 py-1.5",children:[u,S,b]}),e[25]=u,e[26]=S,e[27]=b,e[28]=j):j=e[28];let k;e[29]!==j||e[30]!==f||e[31]!==r?(k=o.jsxs("div",{className:"overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-md))]",style:f,children:[r,j]}),e[29]=j,e[30]=f,e[31]=r,e[32]=k):k=e[32];let N;return e[33]!==k||e[34]!==m?(N=o.jsxs("div",{className:"rounded-lg p-2 text-left",style:s,children:[m,k]}),e[33]=k,e[34]=m,e[35]=N):N=e[35],N}function Oe(d){const e=T.c(39),{seo:t,host:c,accent:v,dark:l,t:s}=d,i=l?"#2b2d31":"#fff",n=l?"#00a8fc":"#1264a3",m=l?"#dbdee1":"#3b4045",p=l?"#949ba4":"#8a9099",f=l?"none":"1px solid #e2e8f0";let r;e[0]!==i||e[1]!==f?(r={background:i,border:f},e[0]=i,e[1]=f,e[2]=r):r=e[2];const a=`3px solid ${v}`;let h;e[3]!==a?(h={borderLeft:a,borderRadius:2},e[3]=a,e[4]=h):h=e[4];let u;e[5]!==p?(u={color:p},e[5]=p,e[6]=u):u=e[6];let y;e[7]!==c||e[8]!==u?(y=o.jsx("div",{className:"text-[10px]",style:u,children:c}),e[7]=c,e[8]=u,e[9]=y):y=e[9];let x;e[10]!==n?(x={color:n},e[10]=n,e[11]=x):x=e[11];let S;e[12]!==t.title||e[13]!==s?(S=t.title??s("sectionsEditor.seoPreview.fallbackTitle"),e[12]=t.title,e[13]=s,e[14]=S):S=e[14];let g;e[15]!==x||e[16]!==S?(g=o.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:x,children:S}),e[15]=x,e[16]=S,e[17]=g):g=e[17];let b;e[18]!==m?(b={color:m},e[18]=m,e[19]=b):b=e[19];let j;e[20]!==t.description||e[21]!==s?(j=t.description??s("sectionsEditor.seoPreview.fallbackDescription"),e[20]=t.description,e[21]=s,e[22]=j):j=e[22];let k;e[23]!==b||e[24]!==j?(k=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:b,children:j}),e[23]=b,e[24]=j,e[25]=k):k=e[25];let N;e[26]!==k||e[27]!==y||e[28]!==g?(N=o.jsxs("div",{className:"min-w-0 flex-1",children:[y,g,k]}),e[26]=k,e[27]=y,e[28]=g,e[29]=N):N=e[29];let w;e[30]!==t.image?(w=o.jsx(de,{src:t.image,className:"size-14 shrink-0 rounded-[var(--studio-control-radius,var(--radius))]",iconSize:16}),e[30]=t.image,e[31]=w):w=e[31];let _;e[32]!==N||e[33]!==w||e[34]!==h?(_=o.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:h,children:[N,w]}),e[32]=N,e[33]=w,e[34]=h,e[35]=_):_=e[35];let P;return e[36]!==_||e[37]!==r?(P=o.jsx("div",{className:"rounded-lg p-2.5 text-left",style:r,children:_}),e[36]=_,e[37]=r,e[38]=P):P=e[38],P}function Ue(d){const e=T.c(21),{platform:t,seo:c,host:v,path:l,t:s}=d;let i;e[0]!==v||e[1]!==l||e[2]!==t.color||e[3]!==t.id||e[4]!==t.layout||e[5]!==c||e[6]!==s?(i=t.layout==="search"?o.jsx(Ie,{seo:c,host:v,path:l,t:s}):t.layout==="card"?o.jsx(Le,{seo:c,host:v,path:l,t:s}):t.layout==="chat"?o.jsx(Be,{seo:c,host:v,path:l,accent:t.color,t:s}):o.jsx(Oe,{seo:c,host:v,path:l,accent:t.color,dark:t.id==="discord",t:s}),e[0]=v,e[1]=l,e[2]=t.color,e[3]=t.id,e[4]=t.layout,e[5]=c,e[6]=s,e[7]=i):i=e[7];const n=i;let m;e[8]!==t.color?(m=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:t.color}}),e[8]=t.color,e[9]=m):m=e[9];let p;e[10]!==t.labelKey||e[11]!==s?(p=s(t.labelKey),e[10]=t.labelKey,e[11]=s,e[12]=p):p=e[12];let f;e[13]!==p?(f=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:p}),e[13]=p,e[14]=f):f=e[14];let r;e[15]!==m||e[16]!==f?(r=o.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[m,f]}),e[15]=m,e[16]=f,e[17]=r):r=e[17];let a;return e[18]!==n||e[19]!==r?(a=o.jsxs("div",{children:[r,n]}),e[18]=n,e[19]=r,e[20]=a):a=e[20],a}function Ae(d){const e=T.c(18),{seo:t,url:c,path:v}=d,l=v===void 0?"/":v,s=ve();let i,n,m;if(e[0]!==t||e[1]!==c){const x=ze(t);i=x,n=he(x.image,c),m=he(x.favicon,c),e[0]=t,e[1]=c,e[2]=i,e[3]=n,e[4]=m}else i=e[2],n=e[3],m=e[4];let p;e[5]!==i||e[6]!==n||e[7]!==m?(p={...i,image:n,favicon:m},e[5]=i,e[6]=n,e[7]=m,e[8]=p):p=e[8];const f=p;let r;e[9]!==c?(r=De(c),e[9]=c,e[10]=r):r=e[10];const a=r,h=l==="/"?"":l;let u;e[11]!==h||e[12]!==a||e[13]!==s||e[14]!==f?(u=$e.map(x=>o.jsx(Ue,{platform:x,seo:f,host:a,path:h,t:s},x.id)),e[11]=h,e[12]=a,e[13]=s,e[14]=f,e[15]=u):u=e[15];let y;return e[16]!==u?(y=o.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:u}),e[16]=u,e[17]=y):y=e[17],y}function Ai(d){const e=T.c(70),{orgSlug:t,virtualMcpId:c,branch:v,decofile:l,meta:s,target:i,previewBaseUrl:n,onSaved:m,onEditDefaultSeo:p,onBack:f}=d,r=ve(),a=Ne(l,i,s),h=a?.seoData,u=i.kind==="site"?"site":i.pageKey,[y,x]=ee.useState(u),[S,g]=ee.useState(null),[b,j]=ee.useState(0),[k,N]=ee.useState(void 0);y!==u&&(x(u),g(null),N(void 0),j(Ge));const{persistSeo:w,persistRawSeo:_,flush:P,isPending:te}=Re({orgSlug:t,virtualMcpId:c,branch:v,target:i,resolved:a,onSaved:m}),M=i.kind==="page",ge=M?a?.rawSeoData:void 0,U=k!==void 0?k:ge,be=M?we(U)??void 0:void 0,E=S??be??h??{},F=a?Ce(E,a):null,K=F&&(!M||_e(U))?Fe(F,s):null;let G;e[0]!==s?(G=Ee(s),e[0]=s,e[1]=G):G=e[1];const oe=G;let R,H;e[2]!==l||e[3]!==E||e[4]!==s||e[5]!==i.kind?(R=i.kind==="page"?Pe(l,s)?.seoData??{}:{},H=i.kind==="page"?Ve(R,E):E,e[2]=l,e[3]=E,e[4]=s,e[5]=i.kind,e[6]=R,e[7]=H):(R=e[6],H=e[7]);const ie=H;let V;e[8]!==w||e[9]!==a||e[10]!==g?(V=C=>{if(!a)return;const pe=C;g(pe),w(pe)},e[8]=w,e[9]=a,e[10]=g,e[11]=V):V=e[11];const se=V;let q;e[12]!==g?(q=()=>g(null),e[12]=g,e[13]=q):q=e[13];const re=q;let W;e[14]!==j?(W=()=>j(Me),e[14]=j,e[15]=W):W=e[15];const le=W;let J;e[16]!==P||e[17]!==f?(J=()=>{P(),f?.()},e[16]=P,e[17]=f,e[18]=J):J=e[18];const ae=J,z=i.kind==="page"?i.path:"/";let Q;e[19]!==z||e[20]!==n||e[21]!==i.kind?(Q=i.kind==="page"&&n?He(z,n):n??null,e[19]=z,e[20]=n,e[21]=i.kind,e[22]=Q):Q=e[22];const ce=Q;let X;e[23]!==a||e[24]!==r||e[25]!==i.kind?(X=i.kind==="site"?r("sectionsEditor.seoEditor.noSiteSeoBlock"):r(a?"sectionsEditor.seoEditor.noSeoSchema":"sectionsEditor.seoEditor.couldNotLoadSeo"),e[23]=a,e[24]=r,e[25]=i.kind,e[26]=X):X=e[26];const ne=X,Y=M&&a,me=i.kind==="site"&&a&&K;let D;e[27]!==ae||e[28]!==r||e[29]!==i.kind||e[30]!==i.pageName?(D=i.kind==="page"?o.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[o.jsx("button",{type:"button",onClick:ae,title:i.pageName,className:"min-w-0 truncate rounded-[var(--studio-control-radius,var(--radius-md))] px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:i.pageName}),o.jsx(je,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:r("sectionsEditor.seoEditor.defaultSeoLabel")}),o.jsxs("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:["· ",r("sectionsEditor.seoEditor.appliedToEveryPage")]})]}),e[27]=ae,e[28]=r,e[29]=i.kind,e[30]=i.pageName,e[31]=D):D=e[31];let $;e[32]!==te?($=te&&o.jsx(ke,{className:"size-3.5 text-muted-foreground"}),e[32]=te,e[33]=$):$=e[33];let I;e[34]!==p||e[35]!==r||e[36]!==i.kind?(I=i.kind==="page"&&p&&o.jsxs(Se,{type:"button",variant:"outline",size:"sm",onClick:p,children:[o.jsx(fe,{size:14}),r("sectionsEditor.seoEditor.editDefaultSeoButton")]}),e[34]=p,e[35]=r,e[36]=i.kind,e[37]=I):I=e[37];let L;e[38]!==$||e[39]!==I?(L=o.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[$,I]}),e[38]=$,e[39]=I,e[40]=L):L=e[40];let B;e[41]!==L||e[42]!==D?(B=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[D,L]}),e[41]=L,e[42]=D,e[43]=B):B=e[43];let O;e[44]!==F||e[45]!==le||e[46]!==re||e[47]!==oe||e[48]!==U||e[49]!==E||e[50]!==ne||e[51]!==b||e[52]!==se||e[53]!==z||e[54]!==_||e[55]!==w||e[56]!==ie||e[57]!==ce||e[58]!==a||e[59]!==K||e[60]!==g||e[61]!==N||e[62]!==Y||e[63]!==me||e[64]!==R||e[65]!==r?(O=!a||!Y&&!me?o.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ne}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-5 py-4",children:Y?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:r("sectionsEditor.seoEditor.emptyFieldsHint")}),o.jsx(Ke,{rawSeo:U,innerSeo:E,defaultResolveType:oe,seoSchema:K,activeResolveType:F,seoTypeOptions:a.seoTypeOptions,formResetKey:b,siteDefaultSeo:R,onPersistRaw:C=>{N(C),_(C)},onInnerChange:C=>{g(C),w(C)},onClearForm:re,onBumpFormKey:le})]}):K&&F&&o.jsx(Te,{schema:K,resolveType:F,value:E,formResetKey:b,onChange:se})})}),o.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"@container px-5 py-4",children:o.jsx(Ae,{seo:ie,url:ce,path:z})})})]}),e[44]=F,e[45]=le,e[46]=re,e[47]=oe,e[48]=U,e[49]=E,e[50]=ne,e[51]=b,e[52]=se,e[53]=z,e[54]=_,e[55]=w,e[56]=ie,e[57]=ce,e[58]=a,e[59]=K,e[60]=g,e[61]=N,e[62]=Y,e[63]=me,e[64]=R,e[65]=r,e[66]=O):O=e[66];let Z;return e[67]!==B||e[68]!==O?(Z=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[B,O]}),e[67]=B,e[68]=O,e[69]=Z):Z=e[69],Z}function Me(d){return d+1}function Ge(d){return d+1}function He(d,e){try{return new URL(d,e).href}catch{return e}}function Ve(d,e){const t=e.__resolveType,c=d.__resolveType;if(typeof t=="string"&&typeof c=="string"&&t!==c)return{...e};const v={...d};for(const[l,s]of Object.entries(e))l!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(v[l]=s));return v}export{Ai as SeoEditor};
@@ -1 +1 @@
1
- import{c as p,l as d,j as f,fp as m}from"./index-bl_DQ3mH.js";function x(l){const t=p.c(12);let o,a,r,i;t[0]!==l?({className:o,orientation:r,decorative:i,...a}=l,t[0]=l,t[1]=o,t[2]=a,t[3]=r,t[4]=i):(o=t[1],a=t[2],r=t[3],i=t[4]);const s=r===void 0?"horizontal":r,c=i===void 0?!0:i;let e;t[5]!==o?(e=d("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",o),t[5]=o,t[6]=e):e=t[6];let n;return t[7]!==c||t[8]!==s||t[9]!==a||t[10]!==e?(n=f.jsx(m,{"data-slot":"separator-root",decorative:c,orientation:s,className:e,...a}),t[7]=c,t[8]=s,t[9]=a,t[10]=e,t[11]=n):n=t[11],n}export{x as S};
1
+ import{c as p,l as d,j as f,fp as m}from"./index-BnoCrGwV.js";function x(l){const t=p.c(12);let o,a,r,i;t[0]!==l?({className:o,orientation:r,decorative:i,...a}=l,t[0]=l,t[1]=o,t[2]=a,t[3]=r,t[4]=i):(o=t[1],a=t[2],r=t[3],i=t[4]);const s=r===void 0?"horizontal":r,c=i===void 0?!0:i;let e;t[5]!==o?(e=d("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",o),t[5]=o,t[6]=e):e=t[6];let n;return t[7]!==c||t[8]!==s||t[9]!==a||t[10]!==e?(n=f.jsx(m,{"data-slot":"separator-root",decorative:c,orientation:s,className:e,...a}),t[7]=c,t[8]=s,t[9]=a,t[10]=e,t[11]=n):n=t[11],n}export{x as S};