decocms 3.83.1 → 3.83.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/dist/client/assets/{AlertCircle-CCRyLxqn.js → AlertCircle-DM0HzopE.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-CZdyxiuo.js → ArrowUpRight-CoxAwUHc.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-Dv08cgQI.js → CheckCircle-D5UuMIIH.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-B8Ze3SYy.js → ChevronDown-CW3qqv2x.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-DUWeOqhA.js → ChevronLeft-LzGuMB2U.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-D9P32BBy.js → ChevronRight-B0GGkNIH.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-DJ9byfoG.js → ChevronUp-DZQVuDwV.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-D2SirpGI.js → DotsVertical-CGmC-AuM.js} +1 -1
  9. package/dist/client/assets/{Eye-DTO_EuVX.js → Eye-DRB5PFSd.js} +1 -1
  10. package/dist/client/assets/{FilterLines-CL_OhKpi.js → FilterLines-uyaFw99Z.js} +1 -1
  11. package/dist/client/assets/{Globe01-BniE6XPk.js → Globe01-J_5kAZ2G.js} +1 -1
  12. package/dist/client/assets/{Globe04-rkXVwKmf.js → Globe04-DzVxOgG6.js} +1 -1
  13. package/dist/client/assets/{HardDrive-ByBOOup9.js → HardDrive-BD491-6A.js} +1 -1
  14. package/dist/client/assets/{Key01-zFZC1WAX.js → Key01-DpArIwgm.js} +1 -1
  15. package/dist/client/assets/{LayoutLeft-D5d7RmP6.js → LayoutLeft-i76gAzb8.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-CP7jbGXu.js → LinkExternal01-BGVgwGxd.js} +1 -1
  17. package/dist/client/assets/{Monitor01-DxsKFguo.js → Monitor01-C4cglHcn.js} +1 -1
  18. package/dist/client/assets/{Palette-CjeH0inq.js → Palette-NYPFTebi.js} +1 -1
  19. package/dist/client/assets/{Play-Cep78SQb.js → Play-CIhVolnk.js} +1 -1
  20. package/dist/client/assets/{Plus-C4U-szNE.js → Plus-DEhikgBr.js} +1 -1
  21. package/dist/client/assets/{SearchMd-OdRwUL2k.js → SearchMd-1YEF5GNC.js} +1 -1
  22. package/dist/client/assets/{Settings02-BlEkNOUc.js → Settings02-B_oiQbnJ.js} +1 -1
  23. package/dist/client/assets/{Shield01-DOSUyIxl.js → Shield01-BrCb9Fbq.js} +1 -1
  24. package/dist/client/assets/{Star01-DbITzNmn.js → Star01-K5E2EVFR.js} +1 -1
  25. package/dist/client/assets/{Stars01-Dr9U80EV.js → Stars01-D-F-KCAY.js} +1 -1
  26. package/dist/client/assets/{Stars02-DWfAn5KA.js → Stars02-D5rVREl5.js} +1 -1
  27. package/dist/client/assets/{Sun-DiKahN05.js → Sun-0LQy_BRh.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-DU-rOve7.js → SwitchHorizontal01-Y2S_GG49.js} +1 -1
  29. package/dist/client/assets/{Tool01-CipS5lSx.js → Tool01-B21_bo9F.js} +1 -1
  30. package/dist/client/assets/{Trash01-BrRwrXAB.js → Trash01-D4qJL0O5.js} +1 -1
  31. package/dist/client/assets/{Upload01-BxpFKuaq.js → Upload01-B89V4QHh.js} +1 -1
  32. package/dist/client/assets/{User01-B6F5rEOA.js → User01-676cwM-d.js} +1 -1
  33. package/dist/client/assets/{Users01-BivOfLQy.js → Users01-Wg2zRTbW.js} +1 -1
  34. package/dist/client/assets/{Users03-A-5AuVqo.js → Users03-ClYFKrw1.js} +1 -1
  35. package/dist/client/assets/{X-CqD7ABN6.js → X-B9D2h3Td.js} +1 -1
  36. package/dist/client/assets/{XCircle-BQx0XY9Q.js → XCircle-CSFP3d9h.js} +1 -1
  37. package/dist/client/assets/{XClose-WdAmE5lU.js → XClose-DBh1WmP1.js} +1 -1
  38. package/dist/client/assets/{Zap-BvmHlbv3.js → Zap-BRPDiIJ_.js} +1 -1
  39. package/dist/client/assets/{ZapSquare-B2VaDn9C.js → ZapSquare-Dnw5HzjO.js} +1 -1
  40. package/dist/client/assets/{ZoomOut-TWRir7O_.js → ZoomOut-Cz0dpIX0.js} +1 -1
  41. package/dist/client/assets/{access-gate-CpwS_ePT.js → access-gate-BrhqO3VF.js} +1 -1
  42. package/dist/client/assets/{add-section-modal-B8OsZEtv.js → add-section-modal-D2CiFRjh.js} +1 -1
  43. package/dist/client/assets/{agent-icon-wRGiBGf6.js → agent-icon-o19yp48z.js} +1 -1
  44. package/dist/client/assets/{agents-list-Cr0mAsvt.js → agents-list-CZG4qszH.js} +1 -1
  45. package/dist/client/assets/ai-providers-CO0WuHGD.js +1 -0
  46. package/dist/client/assets/{alert-HIrKpgYE.js → alert-D1A1Zc_j.js} +1 -1
  47. package/dist/client/assets/{alert-dialog-CiPRtRLO.js → alert-dialog-BOS0dCJh.js} +3 -3
  48. package/dist/client/assets/{app-editor-B_atbZpd.js → app-editor-CIfs2FL1.js} +1 -1
  49. package/dist/client/assets/{auth-wHQwRyAB.js → auth-BdbahkUc.js} +1 -1
  50. package/dist/client/assets/{auth-catchall-Bx2LW5qC.js → auth-catchall-CNPgs4YU.js} +1 -1
  51. package/dist/client/assets/{auth-entry-CNOWCC3m.js → auth-entry-B1WtHQhf.js} +1 -1
  52. package/dist/client/assets/{auth-split-layout-Cs62g9d1.js → auth-split-layout-nvPMwr8u.js} +1 -1
  53. package/dist/client/assets/{authenticate-and-persist-oauth-kprypUvn.js → authenticate-and-persist-oauth-BMdVL1CA.js} +1 -1
  54. package/dist/client/assets/{automation-list-row-tvLjdTyd.js → automation-list-row-CyNcj0ry.js} +1 -1
  55. package/dist/client/assets/automation-runs-Bk8JCPKW.js +1 -0
  56. package/dist/client/assets/automations-D5t0_F84.js +1 -0
  57. package/dist/client/assets/{avatar-Cpl5pI_5.js → avatar-3AHqY5tt.js} +1 -1
  58. package/dist/client/assets/{badge-CD-j7H-v.js → badge-DAumNibn.js} +1 -1
  59. package/dist/client/assets/{block-document-pd5izgqI.js → block-document-CyMP0Nwa.js} +1 -1
  60. package/dist/client/assets/brand-context-yzHlJmXd.js +1 -0
  61. package/dist/client/assets/buckets-D9fspdLY.js +1 -0
  62. package/dist/client/assets/{capability-load-error-B_adJBsI.js → capability-load-error-B4Sf_UJj.js} +1 -1
  63. package/dist/client/assets/{card-CwMoWTAG.js → card-DPMEGAqZ.js} +1 -1
  64. package/dist/client/assets/category-editor-nDclmHNc.js +1 -0
  65. package/dist/client/assets/{chat-context-CENfKYyS.js → chat-context-DANWEvls.js} +7 -7
  66. package/dist/client/assets/{checkbox-Cu87QWwv.js → checkbox-ByFK_aep.js} +1 -1
  67. package/dist/client/assets/{cli-auth-success-DEkLyqUK.js → cli-auth-success-s1Ge9151.js} +1 -1
  68. package/dist/client/assets/collection-detail-NWtLzyq5.js +1 -0
  69. package/dist/client/assets/{collection-display-button-DUpHu5j8.js → collection-display-button-CTz7X8CM.js} +1 -1
  70. package/dist/client/assets/{collection-search-BJ2ZQG6w.js → collection-search-CQMKW4Jp.js} +1 -1
  71. package/dist/client/assets/{collection-tabs-DDDjKeiO.js → collection-tabs-jlQTSy-i.js} +1 -1
  72. package/dist/client/assets/{command-CXW0RFsE.js → command-DNx5Uhv2.js} +1 -1
  73. package/dist/client/assets/commerce-onboarding-BGm-51c6.js +1 -0
  74. package/dist/client/assets/{connect-desktop-dialog-gl5ykPHO.js → connect-desktop-dialog-BeQBPgXI.js} +1 -1
  75. package/dist/client/assets/{connection-card-1NZAJf0V.js → connection-card-CHIFmA8R.js} +1 -1
  76. package/dist/client/assets/connection-detail-BTDN1t-U.js +1 -0
  77. package/dist/client/assets/{connection-form-helpers-aQhcKdbG.js → connection-form-helpers-CWhKbOwZ.js} +1 -1
  78. package/dist/client/assets/connections-Df79XqMS.js +1 -0
  79. package/dist/client/assets/{context-menu-D3LHi-ty.js → context-menu-DkDkJvo8.js} +1 -1
  80. package/dist/client/assets/{decopilot-PLBAL9Bq.js → decopilot-CmY0uQsK.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-DH5axPTT.js → decopilot-sse-pool-CXkkAKQx.js} +1 -1
  82. package/dist/client/assets/{dialog-Ct9Sh61W.js → dialog-fVpV_18N.js} +1 -1
  83. package/dist/client/assets/{domain-settings-BHrzjbzq.js → domain-settings-BIaZaqXi.js} +1 -1
  84. package/dist/client/assets/{drawer-B8pyFQTR.js → drawer-iojIyQ7Z.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-CiOcehBy.js → dropdown-menu-HRW3zYBQ.js} +1 -1
  86. package/dist/client/assets/{empty-state-CiOLlp0X.js → empty-state-ySGQGV31.js} +1 -1
  87. package/dist/client/assets/{extract-connection-data-CFceWaqQ.js → extract-connection-data-CrjpOcI0.js} +1 -1
  88. package/dist/client/assets/{file-explorer-CaQ6HRNv.js → file-explorer-D1OUZ8cU.js} +1 -1
  89. package/dist/client/assets/{file-type-icon-CTBSw6sq.js → file-type-icon-BSAfTQY6.js} +1 -1
  90. package/dist/client/assets/{files-BPlFF3V6.js → files-Dvw5nwbp.js} +1 -1
  91. package/dist/client/assets/{form-Dekx7Gh5.js → form-dD3QczZa.js} +1 -1
  92. package/dist/client/assets/{general-mTwon5gZ.js → general-C6KcKAXv.js} +1 -1
  93. package/dist/client/assets/github-repo-picker-YqP06Fto.js +1 -0
  94. package/dist/client/assets/{hooks-DuOTkhEE.js → hooks-C3qiFxIG.js} +5 -5
  95. package/dist/client/assets/{import-from-deco-dialog-CBFoXL1X.js → import-from-deco-dialog-DDsiz0pE.js} +2 -2
  96. package/dist/client/assets/{index-DanuldhX.js → index-B7xwJlcR.js} +5 -5
  97. package/dist/client/assets/{index-3SpShBgv.js → index-BK10Xdph.js} +1 -1
  98. package/dist/client/assets/{index-Dkp6RqD3.js → index-BMCJlhk3.js} +24 -24
  99. package/dist/client/assets/{index-D_jW6Ow3.js → index-BO-4uKUn.js} +1 -1
  100. package/dist/client/assets/index-BodEVjlg.js +1 -0
  101. package/dist/client/assets/{index-DX5h5zwb.js → index-C102AH4s.js} +1 -1
  102. package/dist/client/assets/{index-C-BzJv9F.js → index-CXXnf1Qe.js} +1 -1
  103. package/dist/client/assets/{index-CwE8muJw.js → index-Ci5DmEN0.js} +1 -1
  104. package/dist/client/assets/{index-Dg4qzWwc.js → index-CpgQ8CBr.js} +1 -1
  105. package/dist/client/assets/{index-B05IVBsS.js → index-Cvy8WHIB.js} +1 -1
  106. package/dist/client/assets/index-DDRZvmg6.css +1 -0
  107. package/dist/client/assets/{index-CZw9wi-O.js → index-DqK88OS0.js} +1 -1
  108. package/dist/client/assets/index-FKJOX04p.js +1 -0
  109. package/dist/client/assets/{index-Bnt59m8n.js → index-jh_AV7fc.js} +1 -1
  110. package/dist/client/assets/{index-DeO49O5i.js → index-q8ngIE68.js} +1 -1
  111. package/dist/client/assets/{index-redirect-DBQVIaTO.js → index-redirect-B05if20n.js} +1 -1
  112. package/dist/client/assets/{input-CsyAUKnP.js → input-Bk-XA8aE.js} +1 -1
  113. package/dist/client/assets/{integration-icon-D9oWYfKx.js → integration-icon-D5R24LMd.js} +1 -1
  114. package/dist/client/assets/{label-1M2rTZlP.js → label-DbgfgBJH.js} +1 -1
  115. package/dist/client/assets/{login-B-bAJaow.js → login-BnanKvfh.js} +1 -1
  116. package/dist/client/assets/{mcp-oauth-Cx4tvlLz.js → mcp-oauth-Ge7_9DJm.js} +1 -1
  117. package/dist/client/assets/{members-89sncKJi.js → members-OMqqgRie.js} +1 -1
  118. package/dist/client/assets/{monaco-editor-BWcAGRm_.js → monaco-editor-CLbivzeA.js} +2 -2
  119. package/dist/client/assets/{monitoring-stats-row-DP59CZ3Z.js → monitoring-stats-row-D988ksKz.js} +1 -1
  120. package/dist/client/assets/{oauth-callback-zG3_9vuZ.js → oauth-callback-CMcTYSQ9.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-ai-provider-B63HNGMJ.js → oauth-callback-ai-provider-CPlg-Iun.js} +1 -1
  122. package/dist/client/assets/{onboarding-DNx1Pq_8.js → onboarding-BQtZWhzG.js} +1 -1
  123. package/dist/client/assets/{org-install-BDpK6P9V.js → org-install-EHXdq4o2.js} +1 -1
  124. package/dist/client/assets/{org-layout-aEAQ7-hk.js → org-layout-qDY2vnUU.js} +1 -1
  125. package/dist/client/assets/{organization-choice-C4EpwvO8.js → organization-choice-BOiOzldx.js} +1 -1
  126. package/dist/client/assets/{page-seo-form-BNPweRSb.js → page-seo-form-DeK8_ys8.js} +1 -1
  127. package/dist/client/assets/page-seo-sheet-CnuTSA1a.js +1 -0
  128. package/dist/client/assets/popover-BTH_4TON.js +1 -0
  129. package/dist/client/assets/{post-editor-Xy8qFzaf.js → post-editor-DJSqRdmQ.js} +1 -1
  130. package/dist/client/assets/{preview-dialog-WTikx3cM.js → preview-dialog-C4U9zVzk.js} +3 -3
  131. package/dist/client/assets/{primitives-BeR8psEb.js → primitives-CXIIxbFE.js} +1 -1
  132. package/dist/client/assets/{profile-Csl44lnB.js → profile-OkUeU-xS.js} +1 -1
  133. package/dist/client/assets/project-app-view-ClFsE-uv.js +1 -0
  134. package/dist/client/assets/record-editor-Ba_-uY6W.js +1 -0
  135. package/dist/client/assets/registry-OeyyY_3h.js +2 -0
  136. package/dist/client/assets/{registry-layout-r16Gqsvc.js → registry-layout-CmbVIFjk.js} +1 -1
  137. package/dist/client/assets/{require-capability-Dc0v0eyQ.js → require-capability-B3YVeyKQ.js} +1 -1
  138. package/dist/client/assets/{required-auth-layout-DmBOLZeo.js → required-auth-layout-hwOac595.js} +1 -1
  139. package/dist/client/assets/{reset-password-CwftOKLB.js → reset-password-DYADQ6t-.js} +1 -1
  140. package/dist/client/assets/roles-CwZxDmMd.js +1 -0
  141. package/dist/client/assets/{save-status-ClS1T0yY.js → save-status-cz-ufgN_.js} +1 -1
  142. package/dist/client/assets/{scroll-area-BHrT2J7C.js → scroll-area-BliS1K3p.js} +1 -1
  143. package/dist/client/assets/{search-input-7UwNN2zY.js → search-input-CUOcSr_7.js} +1 -1
  144. package/dist/client/assets/secrets-CyW5acaW.js +1 -0
  145. package/dist/client/assets/{sections-editor-D5xDYOAm.js → sections-editor-Dv8SUTjk.js} +1 -1
  146. package/dist/client/assets/select-8EVXQGwX.js +1 -0
  147. package/dist/client/assets/{select-model-Biymi3UB.js → select-model-iQAMpxgJ.js} +1 -1
  148. package/dist/client/assets/{seo-editor-CDX5WDhf.js → seo-editor-BNVUsXCz.js} +1 -1
  149. package/dist/client/assets/{settings-layout-CQy6VB-r.js → settings-layout-D-yUHTQc.js} +1 -1
  150. package/dist/client/assets/{settings-section-DyUWovP_.js → settings-section-DHTir3TC.js} +1 -1
  151. package/dist/client/assets/{sheet-CEq4Xlbn.js → sheet-ZPG9h0Fj.js} +1 -1
  152. package/dist/client/assets/{shell-controls-BM2wsOnd.js → shell-controls-Zawsretc.js} +1 -1
  153. package/dist/client/assets/shell-layout-CWAvk5Go.js +1 -0
  154. package/dist/client/assets/{shell-route-loading-C7NR5YfE.js → shell-route-loading-mpOo6h4k.js} +1 -1
  155. package/dist/client/assets/{sidebar-BlJZ8VS1.js → sidebar-DU6XXtnA.js} +1 -1
  156. package/dist/client/assets/{skeleton-CgQbL2vU.js → skeleton-CKrKTMUA.js} +1 -1
  157. package/dist/client/assets/{sortable.esm-Cf5PF7FH.js → sortable.esm-B3t9DDZ6.js} +1 -1
  158. package/dist/client/assets/{sso-Dt0XFY83.js → sso-CERYxMuj.js} +1 -1
  159. package/dist/client/assets/store-mnbDCvL0.js +1 -0
  160. package/dist/client/assets/store-registry-CJLz8NHB.js +2 -0
  161. package/dist/client/assets/{studio-tools-MS8HaZF2.js → studio-tools-BdR8-wJW.js} +1 -1
  162. package/dist/client/assets/switch-DLwkt3ng.js +1 -0
  163. package/dist/client/assets/{table-DcM9ru_z.js → table-CHbuq2So.js} +1 -1
  164. package/dist/client/assets/tabs-C3tau4Eq.js +1 -0
  165. package/dist/client/assets/{task-status-Bx2wtdSw.js → task-status-Cpo5H16E.js} +1 -1
  166. package/dist/client/assets/{textarea-Bq2hlJph.js → textarea-CJuB4hQ7.js} +1 -1
  167. package/dist/client/assets/toggle-group-Ckfjs-c4.js +1 -0
  168. package/dist/client/assets/{toolbar-B94AmW8_.js → toolbar-D1N_WILM.js} +1 -1
  169. package/dist/client/assets/tooltip-DjHKSu56.js +1 -0
  170. package/dist/client/assets/{types-DX3qR_vf.js → types-CNWQoCyo.js} +6 -6
  171. package/dist/client/assets/use-ai-providers-BxzRSeJ0.js +1 -0
  172. package/dist/client/assets/{use-automations-CZSEg567.js → use-automations-Br1p5DHc.js} +1 -1
  173. package/dist/client/assets/{use-capability-Bs4ib41V.js → use-capability-E8ccWznH.js} +1 -1
  174. package/dist/client/assets/{use-clock-tick-DsSqS81D.js → use-clock-tick-BW4BJ8Tt.js} +1 -1
  175. package/dist/client/assets/use-collections-CsNhZa6R.js +1 -0
  176. package/dist/client/assets/{use-connection-DLEZ-D_W.js → use-connection-_slG13py.js} +1 -1
  177. package/dist/client/assets/{use-copy-DtfDfo2q.js → use-copy-60B0ujzD.js} +1 -1
  178. package/dist/client/assets/{use-create-virtual-mcp-CgxBCvOq.js → use-create-virtual-mcp-aSsDb_hC.js} +1 -1
  179. package/dist/client/assets/{use-debounced-autosave-wR3AcpvU.js → use-debounced-autosave-DlQ25v46.js} +1 -1
  180. package/dist/client/assets/{use-delete-connection-DRSrXGXH.js → use-delete-connection-BSgRrEnr.js} +1 -1
  181. package/dist/client/assets/use-file-configs-TueoM3xk.js +1 -0
  182. package/dist/client/assets/{use-infinite-scroll-xtXJm3Fz.js → use-infinite-scroll-B7KmD1ay.js} +1 -1
  183. package/dist/client/assets/{use-join-requests-I5yPny3d.js → use-join-requests-Bugx9GLx.js} +1 -1
  184. package/dist/client/assets/use-mcp-client--_ZSmyGd.js +10 -0
  185. package/dist/client/assets/use-mcp-prompts-Bi0YM-MV.js +1 -0
  186. package/dist/client/assets/use-mcp-tools-C6z5gFrv.js +1 -0
  187. package/dist/client/assets/use-members-D4NNP_ry.js +1 -0
  188. package/dist/client/assets/{use-navigate-to-agent-BEYb84d9.js → use-navigate-to-agent-C2eJezkw.js} +1 -1
  189. package/dist/client/assets/{use-org-auth-client-BsY7gUqd.js → use-org-auth-client-Bn9WqUMO.js} +1 -1
  190. package/dist/client/assets/{use-org-sso-H2PY9wlj.js → use-org-sso-CgbvxseW.js} +1 -1
  191. package/dist/client/assets/{use-organization-roles-CIWGgM4x.js → use-organization-roles-Cg0ug59K.js} +1 -1
  192. package/dist/client/assets/{use-organization-settings-CJH98oG3.js → use-organization-settings-DQ5ROkEQ.js} +1 -1
  193. package/dist/client/assets/{use-registry-connections-DqQ5CuRm.js → use-registry-connections-Ba1xQHz9.js} +1 -1
  194. package/dist/client/assets/use-secrets-B1jqMRBn.js +1 -0
  195. package/dist/client/assets/{use-status-sounds-DiXAjIsI.js → use-status-sounds-Bj_NbDO6.js} +1 -1
  196. package/dist/client/assets/{use-view-mode-hyyg53yR.js → use-view-mode-BvWJalT6.js} +1 -1
  197. package/dist/client/assets/{use-virtual-mcp-_6RLlLu8.js → use-virtual-mcp-BZlyJ3on.js} +1 -1
  198. package/dist/client/assets/useInfiniteQuery-DDGqv00b.js +1 -0
  199. package/dist/client/assets/useSuspenseInfiniteQuery-DI0bMzys.js +1 -0
  200. package/dist/client/assets/{variant-calendar-C0-El49q.js → variant-calendar-C0Qs1GnN.js} +1 -1
  201. package/dist/client/assets/{view-mode-toggle-CEI4Ou6L.js → view-mode-toggle-DcivAyKH.js} +1 -1
  202. package/dist/client/index.html +2 -2
  203. package/dist/server/cli.js +249 -249
  204. package/dist/server/server.js +51 -51
  205. package/package.json +1 -1
  206. package/dist/client/assets/ai-providers-DX_HKcra.js +0 -1
  207. package/dist/client/assets/automation-runs-CzyRkiOB.js +0 -1
  208. package/dist/client/assets/automations-CHb3J8Qu.js +0 -1
  209. package/dist/client/assets/brand-context-Cbu1Yk_2.js +0 -1
  210. package/dist/client/assets/buckets-y2gnxRVP.js +0 -1
  211. package/dist/client/assets/category-editor-Be-5kdkf.js +0 -1
  212. package/dist/client/assets/collection-detail-SvPqqSMW.js +0 -1
  213. package/dist/client/assets/commerce-onboarding-CzXyQbjd.js +0 -1
  214. package/dist/client/assets/connection-detail-CX4ixwM6.js +0 -1
  215. package/dist/client/assets/connections-Dr1vu1Os.js +0 -1
  216. package/dist/client/assets/github-repo-picker-C1lcpkZh.js +0 -1
  217. package/dist/client/assets/index-BaiVd6oC.css +0 -1
  218. package/dist/client/assets/index-DPs0V079.js +0 -1
  219. package/dist/client/assets/index-Iq4EJcbv.js +0 -1
  220. package/dist/client/assets/page-seo-sheet-Bca3t7bo.js +0 -1
  221. package/dist/client/assets/popover-Bw_fDzEl.js +0 -1
  222. package/dist/client/assets/project-app-view-BgnYc9xT.js +0 -1
  223. package/dist/client/assets/record-editor-DuHi2E4Z.js +0 -1
  224. package/dist/client/assets/registry-DDz72cnp.js +0 -2
  225. package/dist/client/assets/roles-DP-rId9P.js +0 -1
  226. package/dist/client/assets/secrets-C0HqhYrV.js +0 -1
  227. package/dist/client/assets/select-DzV4je4u.js +0 -1
  228. package/dist/client/assets/shell-layout-7-n1xJEu.js +0 -1
  229. package/dist/client/assets/store-BcS3uRs4.js +0 -1
  230. package/dist/client/assets/store-registry-CuODrh9B.js +0 -2
  231. package/dist/client/assets/switch-Bth8Y0YO.js +0 -1
  232. package/dist/client/assets/tabs-CeIDAumq.js +0 -1
  233. package/dist/client/assets/toggle-group-DHk_x33v.js +0 -1
  234. package/dist/client/assets/tooltip-CzRpmZhx.js +0 -1
  235. package/dist/client/assets/use-ai-providers-4KbjeefU.js +0 -1
  236. package/dist/client/assets/use-collections-C5b3ewLr.js +0 -1
  237. package/dist/client/assets/use-file-configs-D-EkQoPh.js +0 -1
  238. package/dist/client/assets/use-mcp-client-Bm11_FDz.js +0 -10
  239. package/dist/client/assets/use-mcp-prompts-WFwJaoYE.js +0 -1
  240. package/dist/client/assets/use-mcp-tools-D7R2Xxtm.js +0 -1
  241. package/dist/client/assets/use-members-HDhepqlk.js +0 -1
  242. package/dist/client/assets/use-secrets-B_gctlgv.js +0 -1
  243. package/dist/client/assets/useInfiniteQuery-DNOo0u-A.js +0 -1
  244. package/dist/client/assets/useSuspenseInfiniteQuery-Q2iTOn0D.js +0 -1
@@ -1,2 +1,2 @@
1
- import{c as ze,r as w,l as Ce,j as n,B as Ue,i as Dn,m as Ys,t as fe,K as Js}from"./index-Dkp6RqD3.js";import{r as Qs,a as Xs,s as Zs,i as Tn,c as Gs,b as ea,G as ta,V as na,d as sa,e as jt,f as aa,g as ra,h as oa,j as ia,k as la,l as ca,m as ua,n as da,o as ma,p as xt,q as bt,t as fa,v as et,w as Lt,x as pa,y as Xe,z as gn,S as ha,M as vn,A as tt,B as Sn,C as ga,D as xn,P as va,E as Bt,F as Sa,H as xa,I as ba,J as ya,K as ja,L as _a,N as ka,O as dt,Q as wa,R as Na,T as Ra,U as Ca,W as Da,X as Ta,Y as Pa,Z as Va,_ as bn,$ as Ft,a0 as Aa,a1 as Ma,a2 as zt,a3 as Ea,a4 as yn,a5 as $a,a6 as Ka,a7 as Oa,a8 as It,a9 as La,aa as Ba,ab as Pn,ac as jn}from"./index-DanuldhX.js";import{t as Fa}from"./ChevronDown-B8Ze3SYy.js";import{n as za}from"./ChevronLeft-DUWeOqhA.js";import{i as Vn}from"./ChevronRight-D9P32BBy.js";import{n as Ia}from"./ChevronUp-DJ9byfoG.js";import{K as Ut,D as An,W as Mn,l as Ha,L as Ua,M as Wa}from"./agent-icon-wRGiBGf6.js";import{i as qa}from"./Globe01-BniE6XPk.js";import{S as yt}from"./scroll-area-BHrT2J7C.js";import{b as st,T as at,a as rt}from"./tooltip-CzRpmZhx.js";import{a as Ya,D as Ja,b as Qa,e as Xa,c as Za,d as Ga}from"./dialog-Ct9Sh61W.js";import{I as er}from"./input-CsyAUKnP.js";import{s as tr,a as nr}from"./Eye-DTO_EuVX.js";import{c as sr}from"./ZoomOut-TWRir7O_.js";import{b as ar}from"./Settings02-BlEkNOUc.js";import{s as Wt}from"./Plus-C4U-szNE.js";import{s as En}from"./Trash01-BrRwrXAB.js";import{i as rr}from"./Zap-BvmHlbv3.js";import{c as nt,a as $n,D as Kn,b as On,g as or}from"./dropdown-menu-CiOcehBy.js";import{b as Ln,c as _t,K as Bn,P as Fn,e as zn,C as In,s as Hn,l as mt,D as Un,d as Wn,S as qn,v as ir,k as Yn,p as lr}from"./sortable.esm-Cf5PF7FH.js";import{r as _n,u as cr,d as ur,a as dr,i as mr,f as fr,P as pr,b as hr,S as gr}from"./page-seo-form-BNPweRSb.js";import{b as vr}from"./Tool01-CipS5lSx.js";import{A as Sr}from"./add-section-modal-B8OsZEtv.js";import"./index-CwE8muJw.js";import"./chat-context-CENfKYyS.js";import"./hooks-DuOTkhEE.js";import"./use-mcp-client-Bm11_FDz.js";import"./auth-wHQwRyAB.js";import"./decopilot-sse-pool-DH5axPTT.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-_6RLlLu8.js";import"./use-collections-C5b3ewLr.js";import"./use-ai-providers-4KbjeefU.js";import"./studio-tools-MS8HaZF2.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings-CJH98oG3.js";import"./drawer-B8pyFQTR.js";import"./collection-search-BJ2ZQG6w.js";import"./SearchMd-OdRwUL2k.js";import"./use-mcp-prompts-WFwJaoYE.js";import"./X-CqD7ABN6.js";import"./shell-layout-7-n1xJEu.js";import"./avatar-Cpl5pI_5.js";import"./User01-B6F5rEOA.js";import"./Users03-A-5AuVqo.js";import"./Stars02-DWfAn5KA.js";import"./XClose-WdAmE5lU.js";import"./CheckCircle-Dv08cgQI.js";import"./FilterLines-CL_OhKpi.js";import"./required-auth-layout-DmBOLZeo.js";import"./use-org-sso-H2PY9wlj.js";import"./SwitchHorizontal01-DU-rOve7.js";import"./ZapSquare-B2VaDn9C.js";import"./Star01-DbITzNmn.js";import"./Upload01-BxpFKuaq.js";import"./AlertCircle-CCRyLxqn.js";import"./form-Dekx7Gh5.js";import"./label-1M2rTZlP.js";import"./select-DzV4je4u.js";import"./XCircle-BQx0XY9Q.js";import"./tabs-CeIDAumq.js";import"./toggle-group-DHk_x33v.js";import"./Monitor01-DxsKFguo.js";import"./connect-desktop-dialog-gl5ykPHO.js";import"./decopilot-PLBAL9Bq.js";import"./checkbox-Cu87QWwv.js";import"./skeleton-CgQbL2vU.js";import"./Key01-zFZC1WAX.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DyUWovP_.js";import"./card-CwMoWTAG.js";import"./ArrowUpRight-CZdyxiuo.js";import"./Stars01-Dr9U80EV.js";import"./popover-Bw_fDzEl.js";import"./command-CXW0RFsE.js";import"./index-Bnt59m8n.js";import"./useInfiniteQuery-DNOo0u-A.js";import"./use-infinite-scroll-xtXJm3Fz.js";import"./question-004-sINsf4GQ.js";import"./integration-icon-D9oWYfKx.js";import"./use-status-sounds-DiXAjIsI.js";import"./empty-state-CiOLlp0X.js";import"./toolbar-B94AmW8_.js";import"./preview-dialog-WTikx3cM.js";import"./LinkExternal01-CP7jbGXu.js";import"./index-DX5h5zwb.js";import"./file-type-icon-CTBSw6sq.js";import"./LayoutLeft-D5d7RmP6.js";import"./use-connection-DLEZ-D_W.js";import"./use-mcp-tools-D7R2Xxtm.js";import"./types-DX3qR_vf.js";import"./use-capability-Bs4ib41V.js";import"./textarea-Bq2hlJph.js";import"./shell-route-loading-C7NR5YfE.js";import"./extract-connection-data-CFceWaqQ.js";import"./index-DeO49O5i.js";import"./mcp-oauth-Cx4tvlLz.js";import"./badge-CD-j7H-v.js";import"./connection-slug-eyAPH6o3.js";import"./alert-dialog-CiPRtRLO.js";import"./switch-Bth8Y0YO.js";import"./Play-Cep78SQb.js";import"./use-debounced-autosave-wR3AcpvU.js";import"./index-CZw9wi-O.js";import"./sidebar-BlJZ8VS1.js";import"./sheet-CEq4Xlbn.js";import"./search-input-7UwNN2zY.js";import"./collection-tabs-DDDjKeiO.js";import"./github-repo-picker-C1lcpkZh.js";import"./authenticate-and-persist-oauth-kprypUvn.js";import"./use-navigate-to-agent-BEYb84d9.js";import"./Users01-BivOfLQy.js";import"./use-secrets-B_gctlgv.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./view-mode-toggle-CEI4Ou6L.js";import"./DotsVertical-D2SirpGI.js";import"./automation-runs-CzyRkiOB.js";import"./table-DcM9ru_z.js";import"./use-members-HDhepqlk.js";import"./use-org-auth-client-BsY7gUqd.js";import"./task-status-Bx2wtdSw.js";import"./use-automations-CZSEg567.js";import"./useSuspenseInfiniteQuery-Q2iTOn0D.js";import"./use-file-configs-D-EkQoPh.js";import"./monaco-editor-BWcAGRm_.js";import"./select-model-Biymi3UB.js";import"./automation-list-row-tvLjdTyd.js";import"./Globe04-rkXVwKmf.js";import"./HardDrive-ByBOOup9.js";import"./Sun-DiKahN05.js";import"./Palette-CjeH0inq.js";import"./Shield01-DOSUyIxl.js";import"./use-clock-tick-DsSqS81D.js";import"./use-copy-DtfDfo2q.js";import"./content-blocks-o63cs2vh.js";import"./connection-card-1NZAJf0V.js";import"./use-registry-connections-DqQ5CuRm.js";import"./connection-form-helpers-aQhcKdbG.js";function xr(d){return d.schema?.definitions??d.schema?.$defs??{}}function br(d,e){const r=xr(e),c=r[btoa(d)];if(!c)return;let u=typeof c.image=="string"?c.image:void 0;if(!u&&Array.isArray(c.allOf)){const h=c.allOf.find(v=>typeof v.$ref=="string")?.$ref;if(typeof h=="string"){const v=h.replace("#/definitions/",""),f=r[v];u=typeof f?.image=="string"?f.image:void 0}}if(u?.includes("{{{"))return u}function yr(d,e){if(!e)return;const r=Qs(d);if(!r)return;const c=br(r.resolveType,e);if(!c)return;const u=Xs(c,r.data);if(u)return Zs(u)}const jr="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",_r="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 kn(d){return Array.from({length:d},(e,r)=>({id:crypto.randomUUID(),index:r}))}function Jn(d){return d.map((e,r)=>({...e,index:r}))}function kr(d,e){if(e===d.length)return d;if(e<d.length)return Jn(d.slice(0,e));const r=Array.from({length:e-d.length},(c,u)=>({id:crypto.randomUUID(),index:d.length+u}));return[...d,...r]}function Qn(d){const e=ze.c(20),{section:r,raw:c,meta:u}=d,h=r.isSavedBlock===!0,v=r.isMultivariate===!0;let f;e[0]!==u||e[1]!==c?(f=c&&u?yr(c,u):void 0,e[0]=u,e[1]=c,e[2]=f):f=e[2];const g=f;let S;e[3]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(sr,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=S):S=e[3];let x;e[4]!==g?(x=g&&n.jsx("img",{src:g,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=g,e[5]=x):x=e[5];let D;e[6]!==v||e[7]!==h?(D=h?{color:ta}:v?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=v,e[7]=h,e[8]=D):D=e[8];let N;e[9]!==D?(N=n.jsx(Ut,{className:"h-4 w-4 shrink-0",style:D}),e[9]=D,e[10]=N):N=e[10];const _=r.isHidden&&"line-through opacity-50";let k;e[11]!==_?(k=Ce("min-w-0 flex-1 truncate text-sm font-medium",_),e[11]=_,e[12]=k):k=e[12];let o;e[13]!==r.label||e[14]!==k?(o=n.jsx("span",{className:k,children:r.label}),e[13]=r.label,e[14]=k,e[15]=o):o=e[15];let b;return e[16]!==x||e[17]!==N||e[18]!==o?(b=n.jsxs(n.Fragment,{children:[S,x,N,o]}),e[16]=x,e[17]=N,e[18]=o,e[19]=b):b=e[19],b}function Xn(d,e){const r=d.isSavedBlock===!0,c=d.isMultivariate===!0;return Ce("group flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":r?jr:c?"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)]":"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function wr(d){const e=ze.c(64),{section:r,raw:c,meta:u,sortableId:h,selected:v,onSelect:f,onDelete:g,onDuplicate:S,onMakeReusable:x,onToggleHidden:D,onToggleLazy:N,onAddVariant:_,onDetach:k}=d,o=c?Tn(c.__resolveType??""):!1;let b;e[0]!==r?(b=Gs(r),e[0]=r,e[1]=b):b=e[1];const m=b;let U;e[2]!==h?(U={id:h,animateLayoutChanges:Tr},e[2]=h,e[3]=U):U=e[3];const{attributes:J,listeners:L,setNodeRef:l,transform:C,isDragging:le}=zn(U);let T;e[4]!==C?(T=In.Transform.toString(C?{...C,x:0}:null),e[4]=C,e[5]=T):T=e[5];const ue=le?0:void 0;let P;e[6]!==T||e[7]!==ue?(P={transform:T,opacity:ue},e[6]=T,e[7]=ue,e[8]=P):P=e[8];const Z=P;let B;e[9]!==r?(B=ea(r),e[9]=r,e[10]=B):B=e[10];const ae=B,re="button",Se=0;let G;e[11]!==f?(G=$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),f())},e[11]=f,e[12]=G):G=e[12];const z=le?"cursor-grabbing":"cursor-pointer";let ee;e[13]!==r||e[14]!==v||e[15]!==z?(ee=Ce("touch-none transition-colors",z,Xn(r,v)),e[13]=r,e[14]=v,e[15]=z,e[16]=ee):ee=e[16];let Q;e[17]!==u||e[18]!==c||e[19]!==r?(Q=n.jsx(Qn,{section:r,raw:c,meta:u}),e[17]=u,e[18]=c,e[19]=r,e[20]=Q):Q=e[20];const A=!r.isMultivariate&&n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":o?"Disable async render":"Enable async render",className:Ce("h-7 w-7 shrink-0",o?"":"opacity-0 group-hover:opacity-100"),onClick:$=>{$.stopPropagation(),N()},onPointerDown:Dr,children:n.jsx(rr,{className:Ce("h-3.5 w-3.5",o&&"text-yellow-500")})})}),n.jsx(rt,{side:"bottom",children:o?"Disable async render":"Enable async render"})]});let oe;e[21]!==D||e[22]!==r.isHidden||e[23]!==r.isMultivariate?(oe=!r.isMultivariate&&n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":r.isHidden?"Show section":"Hide section",className:Ce("h-7 w-7 shrink-0",r.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:$=>{$.stopPropagation(),D()},onPointerDown:Cr,children:r.isHidden?n.jsx(ar,{className:"h-3.5 w-3.5"}):n.jsx(tr,{className:"h-3.5 w-3.5"})})}),n.jsx(rt,{side:"bottom",children:r.isHidden?"Show section":"Hide section"})]}),e[21]=D,e[22]=r.isHidden,e[23]=r.isMultivariate,e[24]=oe):oe=e[24];let q;e[25]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsx($n,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":"Section actions",className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:Rr,onPointerDown:Nr,children:n.jsx(An,{className:"h-3.5 w-3.5"})})}),e[25]=q):q=e[25];let X;e[26]!==S?(X=$=>{$.stopPropagation(),S()},e[26]=S,e[27]=X):X=e[27];let te;e[28]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(nr,{className:"h-4 w-4"}),e[28]=te):te=e[28];let F;e[29]!==X?(F=n.jsxs(nt,{onClick:X,children:[te,"Duplicate"]}),e[29]=X,e[30]=F):F=e[30];let M;e[31]!==m||e[32]!==_?(M=m&&n.jsxs(nt,{className:na,onClick:$=>{$.stopPropagation(),_()},children:[n.jsx(Mn,{className:"h-4 w-4"}),"Add variant"]}),e[31]=m,e[32]=_,e[33]=M):M=e[33];let E;e[34]!==ae||e[35]!==x?(E=ae&&n.jsxs(nt,{className:_r,onClick:$=>{$.stopPropagation(),x()},children:[n.jsx(Ut,{className:"h-4 w-4"}),"Make reusable"]}),e[34]=ae,e[35]=x,e[36]=E):E=e[36];let ne;e[37]!==k||e[38]!==r.isMultivariate||e[39]!==r.isSavedBlock?(ne=r.isSavedBlock===!0&&!r.isMultivariate&&n.jsxs(nt,{onClick:$=>{$.stopPropagation(),k()},children:[n.jsx(Ut,{className:"h-4 w-4"}),"Detach"]}),e[37]=k,e[38]=r.isMultivariate,e[39]=r.isSavedBlock,e[40]=ne):ne=e[40];let pe;e[41]!==g?(pe=$=>{$.stopPropagation(),g()},e[41]=g,e[42]=pe):pe=e[42];let he;e[43]===Symbol.for("react.memo_cache_sentinel")?(he=n.jsx(En,{className:"h-4 w-4"}),e[43]=he):he=e[43];let de;e[44]!==pe?(de=n.jsxs(nt,{className:"text-destructive focus:text-destructive",onClick:pe,children:[he,"Delete"]}),e[44]=pe,e[45]=de):de=e[45];let ie;e[46]!==F||e[47]!==M||e[48]!==E||e[49]!==ne||e[50]!==de?(ie=n.jsxs(Kn,{children:[q,n.jsxs(On,{align:"end",className:"w-44",children:[F,M,E,ne,de]})]}),e[46]=F,e[47]=M,e[48]=E,e[49]=ne,e[50]=de,e[51]=ie):ie=e[51];let I;return e[52]!==J||e[53]!==L||e[54]!==f||e[55]!==l||e[56]!==Z||e[57]!==ee||e[58]!==Q||e[59]!==A||e[60]!==oe||e[61]!==ie||e[62]!==G?(I=n.jsxs("div",{ref:l,style:Z,...J,...L,role:re,tabIndex:Se,onClick:f,onKeyDown:G,className:ee,children:[Q,A,oe,ie]}),e[52]=J,e[53]=L,e[54]=f,e[55]=l,e[56]=Z,e[57]=ee,e[58]=Q,e[59]=A,e[60]=oe,e[61]=ie,e[62]=G,e[63]=I):I=e[63],I}function Nr(d){return d.stopPropagation()}function Rr(d){return d.stopPropagation()}function Cr(d){return d.stopPropagation()}function Dr(d){return d.stopPropagation()}function Tr(){return!1}function Pr(d){const e=ze.c(90),{listKey:r,rawSections:c,sections:u,meta:h,selectedIndex:v,onSelect:f,onReorder:g,onDelete:S,onDuplicate:x,onMakeReusable:D,onToggleHidden:N,onToggleLazy:_,onAddVariant:k,onDetach:o,onAddSection:b,canAddSection:m}=d,U=m===void 0?!0:m;let J;e[0]!==u.length?(J=()=>kn(u.length),e[0]=u.length,e[1]=J):J=e[1];const[L,l]=w.useState(J),[C,le]=w.useState(null),[T,ue]=w.useState(r),[P,Z]=w.useState(u.length),B=w.useRef(!1);T!==r?(ue(r),Z(u.length),l(kn(u.length))):P!==u.length&&(Z(u.length),l(V=>kr(V,u.length)));let ae;e[2]===Symbol.for("react.memo_cache_sentinel")?(ae={activationConstraint:{distance:8}},e[2]=ae):ae=e[2];let re;e[3]===Symbol.for("react.memo_cache_sentinel")?(re={coordinateGetter:Hn},e[3]=re):re=e[3];const Se=Ln(_t(Fn,ae),_t(Bn,re));let G;e[4]!==L?(G=L.map(Vr),e[4]=L,e[5]=G):G=e[5];const z=G;let ee;e[6]===Symbol.for("react.memo_cache_sentinel")?(ee=V=>{le(String(V.active.id))},e[6]=ee):ee=e[6];const Q=ee;let A;e[7]!==z||e[8]!==g?(A=V=>{le(null);const{active:K,over:W}=V;if(!W||K.id===W.id)return;const Be=z.indexOf(String(K.id)),Ie=z.indexOf(String(W.id));Be===-1||Ie===-1||(l(We=>Jn(mt([...We],Be,Ie))),B.current=!0,requestAnimationFrame(()=>{B.current=!1}),g?.(Be,Ie))},e[7]=z,e[8]=g,e[9]=A):A=e[9];const oe=A;let q;e[10]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{le(null)},e[10]=q):q=e[10];const X=q;let te,F,M,E,ne,pe,he,de,ie,I,$,De,ke,Ee,we;if(e[11]!==C||e[12]!==U||e[13]!==L||e[14]!==z||e[15]!==oe||e[16]!==h||e[17]!==b||e[18]!==k||e[19]!==S||e[20]!==o||e[21]!==x||e[22]!==D||e[23]!==f||e[24]!==N||e[25]!==_||e[26]!==c||e[27]!==u||e[28]!==v||e[29]!==Se){Ee=Symbol.for("react.early_return_sentinel");e:{const V=K=>{B.current||f(K)};if(e[45]!==C||e[46]!==U||e[47]!==L||e[48]!==b||e[49]!==c||e[50]!==u){const K=C?L.find(W=>W.id===C):null;if(E=K!=null?u[K.index]:null,M=K!=null?c[K.index]:void 0,L.length===0){let W;e[54]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:"No sections in this page."}),e[54]=W):W=e[54];const Be=!U;let Ie;e[55]===Symbol.for("react.memo_cache_sentinel")?(Ie=n.jsx(Wt,{size:14}),e[55]=Ie):Ie=e[55];let We;e[56]!==b||e[57]!==Be?(We=n.jsxs("div",{className:"space-y-2",children:[W,n.jsxs(Ue,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:Be,onClick:b,children:[Ie,"Add section"]})]}),e[56]=b,e[57]=Be,e[58]=We):We=e[58],Ee=We;break e}ke=Ce(K&&"cursor-grabbing"),e[45]=C,e[46]=U,e[47]=L,e[48]=b,e[49]=c,e[50]=u,e[51]=M,e[52]=E,e[53]=ke}else M=e[51],E=e[52],ke=e[53];F=Un,de=Se,ie=Wn,I=Q,$=oe,De=X,te=qn,pe=z,he=ir,we="space-y-1",ne=L.map(K=>{const W=u[K.index];return W?n.jsx(wr,{sortableId:K.id,section:W,raw:c[K.index],meta:h,selected:v===K.index,onSelect:()=>V(K.index),onDelete:()=>S(K.index),onDuplicate:()=>x(K.index),onMakeReusable:()=>D(K.index),onToggleHidden:()=>N(K.index),onToggleLazy:()=>_(K.index),onAddVariant:()=>k(K.index),onDetach:()=>o(K.index)},K.id):null})}e[11]=C,e[12]=U,e[13]=L,e[14]=z,e[15]=oe,e[16]=h,e[17]=b,e[18]=k,e[19]=S,e[20]=o,e[21]=x,e[22]=D,e[23]=f,e[24]=N,e[25]=_,e[26]=c,e[27]=u,e[28]=v,e[29]=Se,e[30]=te,e[31]=F,e[32]=M,e[33]=E,e[34]=ne,e[35]=pe,e[36]=he,e[37]=de,e[38]=ie,e[39]=I,e[40]=$,e[41]=De,e[42]=ke,e[43]=Ee,e[44]=we}else te=e[30],F=e[31],M=e[32],E=e[33],ne=e[34],pe=e[35],he=e[36],de=e[37],ie=e[38],I=e[39],$=e[40],De=e[41],ke=e[42],Ee=e[43],we=e[44];if(Ee!==Symbol.for("react.early_return_sentinel"))return Ee;let Te;e[59]!==ne||e[60]!==we?(Te=n.jsx("div",{className:we,children:ne}),e[59]=ne,e[60]=we,e[61]=Te):Te=e[61];let $e;e[62]!==te||e[63]!==pe||e[64]!==he||e[65]!==Te?($e=n.jsx(te,{items:pe,strategy:he,children:Te}),e[62]=te,e[63]=pe,e[64]=he,e[65]=Te,e[66]=$e):$e=e[66];let Ke;e[67]!==M||e[68]!==E||e[69]!==h?(Ke=E?n.jsx("div",{className:Ce("cursor-grabbing shadow-lg ring-1 ring-border/60",Xn(E,!1)),children:n.jsx(Qn,{section:E,raw:M,meta:h})}):null,e[67]=M,e[68]=E,e[69]=h,e[70]=Ke):Ke=e[70];let xe;e[71]!==Ke?(xe=n.jsx(Yn,{dropAnimation:null,children:Ke}),e[71]=Ke,e[72]=xe):xe=e[72];let Oe;e[73]!==F||e[74]!==de||e[75]!==ie||e[76]!==I||e[77]!==$||e[78]!==De||e[79]!==$e||e[80]!==xe?(Oe=n.jsxs(F,{sensors:de,collisionDetection:ie,onDragStart:I,onDragEnd:$,onDragCancel:De,children:[$e,xe]}),e[73]=F,e[74]=de,e[75]=ie,e[76]=I,e[77]=$,e[78]=De,e[79]=$e,e[80]=xe,e[81]=Oe):Oe=e[81];const Pe=!U;let ce;e[82]===Symbol.for("react.memo_cache_sentinel")?(ce=n.jsx(Wt,{size:14}),e[82]=ce):ce=e[82];let se;e[83]!==b||e[84]!==Pe?(se=n.jsxs(Ue,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:Pe,onClick:b,children:[ce,"Add section"]}),e[83]=b,e[84]=Pe,e[85]=se):se=e[85];let Ne;return e[86]!==ke||e[87]!==Oe||e[88]!==se?(Ne=n.jsxs("div",{className:ke,children:[Oe,se]}),e[86]=ke,e[87]=Oe,e[88]=se,e[89]=Ne):Ne=e[89],Ne}function Vr(d){return d.id}function Ar(d){const e=ze.c(38),{open:r,initialName:c,autoLabel:u,isPending:h,onSubmit:v,onOpenChange:f}=d,g=h===void 0?!1:h,[S,x]=w.useState(c),[D,N]=w.useState(r);r!==D&&(N(r),r&&x(c));let _;e[0]!==g||e[1]!==f?(_=re=>{!re&&!g&&f(!1)},e[0]=g,e[1]=f,e[2]=_):_=e[2];const k=_;let o;e[3]!==g||e[4]!==S||e[5]!==v?(o=async re=>{re.preventDefault(),!g&&await v(S.trim())},e[3]=g,e[4]=S,e[5]=v,e[6]=o):o=e[6];const b=o;let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Ya,{children:"Rename variant"}),e[7]=m):m=e[7];const U=u||"the rule";let J;e[8]!==U?(J=n.jsxs(Ja,{children:[m,n.jsxs(Qa,{children:["Save this matcher as a global block with a custom label. Leave empty to inline the matcher again and fall back to"," ",n.jsx("span",{className:"font-medium",children:U}),"."]})]}),e[8]=U,e[9]=J):J=e[9];let L;e[10]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[10]=L):L=e[10];let l;e[11]===Symbol.for("react.memo_cache_sentinel")?(l=re=>x(re.target.value),e[11]=l):l=e[11];let C;e[12]!==u||e[13]!==g||e[14]!==S?(C=n.jsxs("div",{className:"space-y-1.5 py-4",children:[L,n.jsx(er,{id:"variant-rename-name",value:S,onChange:l,placeholder:u,autoFocus:!0,disabled:g})]}),e[12]=u,e[13]=g,e[14]=S,e[15]=C):C=e[15];let le;e[16]!==f?(le=()=>f(!1),e[16]=f,e[17]=le):le=e[17];let T;e[18]!==g||e[19]!==le?(T=n.jsx(Ue,{type:"button",variant:"outline",onClick:le,disabled:g,children:"Cancel"}),e[18]=g,e[19]=le,e[20]=T):T=e[20];let ue;e[21]!==g?(ue=g?n.jsxs(n.Fragment,{children:[n.jsx(Dn,{size:14,className:"animate-spin"}),"Saving…"]}):"Save",e[21]=g,e[22]=ue):ue=e[22];let P;e[23]!==g||e[24]!==ue?(P=n.jsx(Ue,{type:"submit",disabled:g,children:ue}),e[23]=g,e[24]=ue,e[25]=P):P=e[25];let Z;e[26]!==T||e[27]!==P?(Z=n.jsxs(Xa,{children:[T,P]}),e[26]=T,e[27]=P,e[28]=Z):Z=e[28];let B;e[29]!==b||e[30]!==Z||e[31]!==J||e[32]!==C?(B=n.jsx(Za,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:b,children:[J,C,Z]})}),e[29]=b,e[30]=Z,e[31]=J,e[32]=C,e[33]=B):B=e[33];let ae;return e[34]!==k||e[35]!==r||e[36]!==B?(ae=n.jsx(Ga,{open:r,onOpenChange:k,children:B}),e[34]=k,e[35]=r,e[36]=B,e[37]=ae):ae=e[37],ae}const Mr="oklch(0.65 0.15 160)",Zn="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.22)]";function qt(d){const e=ze.c(5),{rule:r,matchers:c}=d,u=r?.__resolveType??"";let h;if(e[0]!==c||e[1]!==u){const S=c.find(x=>x.resolveType===u)?.iconName??sa(u);h=Ha(S),e[0]=c,e[1]=u,e[2]=h}else h=e[2];const v=h;if(!v)return null;let f;return e[3]!==v?(f=n.jsx(v,{size:14,className:"shrink-0"}),e[3]=v,e[4]=f):f=e[4],f}function wn(d){return d.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
1
+ import{c as ze,r as w,l as Ce,j as n,B as Ue,i as Dn,m as Ys,t as fe,K as Js}from"./index-BMCJlhk3.js";import{r as Qs,a as Xs,s as Zs,i as Tn,c as Gs,b as ea,G as ta,V as na,d as sa,e as jt,f as aa,g as ra,h as oa,j as ia,k as la,l as ca,m as ua,n as da,o as ma,p as xt,q as bt,t as fa,v as et,w as Lt,x as pa,y as Xe,z as gn,S as ha,M as vn,A as tt,B as Sn,C as ga,D as xn,P as va,E as Bt,F as Sa,H as xa,I as ba,J as ya,K as ja,L as _a,N as ka,O as dt,Q as wa,R as Na,T as Ra,U as Ca,W as Da,X as Ta,Y as Pa,Z as Va,_ as bn,$ as Ft,a0 as Aa,a1 as Ma,a2 as zt,a3 as Ea,a4 as yn,a5 as $a,a6 as Ka,a7 as Oa,a8 as It,a9 as La,aa as Ba,ab as Pn,ac as jn}from"./index-B7xwJlcR.js";import{t as Fa}from"./ChevronDown-CW3qqv2x.js";import{n as za}from"./ChevronLeft-LzGuMB2U.js";import{i as Vn}from"./ChevronRight-B0GGkNIH.js";import{n as Ia}from"./ChevronUp-DZQVuDwV.js";import{K as Ut,D as An,W as Mn,l as Ha,L as Ua,M as Wa}from"./agent-icon-o19yp48z.js";import{i as qa}from"./Globe01-J_5kAZ2G.js";import{S as yt}from"./scroll-area-BliS1K3p.js";import{b as st,T as at,a as rt}from"./tooltip-DjHKSu56.js";import{a as Ya,D as Ja,b as Qa,e as Xa,c as Za,d as Ga}from"./dialog-fVpV_18N.js";import{I as er}from"./input-Bk-XA8aE.js";import{s as tr,a as nr}from"./Eye-DRB5PFSd.js";import{c as sr}from"./ZoomOut-Cz0dpIX0.js";import{b as ar}from"./Settings02-B_oiQbnJ.js";import{s as Wt}from"./Plus-DEhikgBr.js";import{s as En}from"./Trash01-D4qJL0O5.js";import{i as rr}from"./Zap-BRPDiIJ_.js";import{c as nt,a as $n,D as Kn,b as On,g as or}from"./dropdown-menu-HRW3zYBQ.js";import{b as Ln,c as _t,K as Bn,P as Fn,e as zn,C as In,s as Hn,l as mt,D as Un,d as Wn,S as qn,v as ir,k as Yn,p as lr}from"./sortable.esm-B3t9DDZ6.js";import{r as _n,u as cr,d as ur,a as dr,i as mr,f as fr,P as pr,b as hr,S as gr}from"./page-seo-form-DeK8_ys8.js";import{b as vr}from"./Tool01-B21_bo9F.js";import{A as Sr}from"./add-section-modal-D2CiFRjh.js";import"./index-Ci5DmEN0.js";import"./chat-context-DANWEvls.js";import"./hooks-C3qiFxIG.js";import"./use-mcp-client--_ZSmyGd.js";import"./auth-BdbahkUc.js";import"./decopilot-sse-pool-CXkkAKQx.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-BZlyJ3on.js";import"./use-collections-CsNhZa6R.js";import"./use-ai-providers-BxzRSeJ0.js";import"./studio-tools-BdR8-wJW.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings-DQ5ROkEQ.js";import"./drawer-iojIyQ7Z.js";import"./collection-search-CQMKW4Jp.js";import"./SearchMd-1YEF5GNC.js";import"./use-mcp-prompts-Bi0YM-MV.js";import"./X-B9D2h3Td.js";import"./shell-layout-CWAvk5Go.js";import"./avatar-3AHqY5tt.js";import"./User01-676cwM-d.js";import"./Users03-ClYFKrw1.js";import"./Stars02-D5rVREl5.js";import"./XClose-DBh1WmP1.js";import"./CheckCircle-D5UuMIIH.js";import"./FilterLines-uyaFw99Z.js";import"./required-auth-layout-hwOac595.js";import"./use-org-sso-CgbvxseW.js";import"./SwitchHorizontal01-Y2S_GG49.js";import"./ZapSquare-Dnw5HzjO.js";import"./Star01-K5E2EVFR.js";import"./Upload01-B89V4QHh.js";import"./AlertCircle-DM0HzopE.js";import"./form-dD3QczZa.js";import"./label-DbgfgBJH.js";import"./select-8EVXQGwX.js";import"./XCircle-CSFP3d9h.js";import"./tabs-C3tau4Eq.js";import"./toggle-group-Ckfjs-c4.js";import"./Monitor01-C4cglHcn.js";import"./connect-desktop-dialog-BeQBPgXI.js";import"./decopilot-CmY0uQsK.js";import"./checkbox-ByFK_aep.js";import"./skeleton-CKrKTMUA.js";import"./Key01-DpArIwgm.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DHTir3TC.js";import"./card-DPMEGAqZ.js";import"./ArrowUpRight-CoxAwUHc.js";import"./Stars01-D-F-KCAY.js";import"./popover-BTH_4TON.js";import"./command-DNx5Uhv2.js";import"./index-jh_AV7fc.js";import"./useInfiniteQuery-DDGqv00b.js";import"./use-infinite-scroll-B7KmD1ay.js";import"./question-004-sINsf4GQ.js";import"./integration-icon-D5R24LMd.js";import"./use-status-sounds-Bj_NbDO6.js";import"./empty-state-ySGQGV31.js";import"./toolbar-D1N_WILM.js";import"./preview-dialog-C4U9zVzk.js";import"./LinkExternal01-BGVgwGxd.js";import"./index-C102AH4s.js";import"./file-type-icon-BSAfTQY6.js";import"./LayoutLeft-i76gAzb8.js";import"./use-connection-_slG13py.js";import"./use-mcp-tools-C6z5gFrv.js";import"./types-CNWQoCyo.js";import"./use-capability-E8ccWznH.js";import"./textarea-CJuB4hQ7.js";import"./shell-route-loading-mpOo6h4k.js";import"./extract-connection-data-CrjpOcI0.js";import"./index-q8ngIE68.js";import"./mcp-oauth-Ge7_9DJm.js";import"./badge-DAumNibn.js";import"./connection-slug-eyAPH6o3.js";import"./alert-dialog-BOS0dCJh.js";import"./switch-DLwkt3ng.js";import"./Play-CIhVolnk.js";import"./use-debounced-autosave-DlQ25v46.js";import"./index-DqK88OS0.js";import"./sidebar-DU6XXtnA.js";import"./sheet-ZPG9h0Fj.js";import"./search-input-CUOcSr_7.js";import"./collection-tabs-jlQTSy-i.js";import"./github-repo-picker-YqP06Fto.js";import"./authenticate-and-persist-oauth-BMdVL1CA.js";import"./use-navigate-to-agent-C2eJezkw.js";import"./Users01-Wg2zRTbW.js";import"./use-secrets-B1jqMRBn.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./view-mode-toggle-DcivAyKH.js";import"./DotsVertical-CGmC-AuM.js";import"./automation-runs-Bk8JCPKW.js";import"./table-CHbuq2So.js";import"./use-members-D4NNP_ry.js";import"./use-org-auth-client-Bn9WqUMO.js";import"./task-status-Cpo5H16E.js";import"./use-automations-Br1p5DHc.js";import"./useSuspenseInfiniteQuery-DI0bMzys.js";import"./use-file-configs-TueoM3xk.js";import"./monaco-editor-CLbivzeA.js";import"./select-model-iQAMpxgJ.js";import"./automation-list-row-CyNcj0ry.js";import"./Globe04-DzVxOgG6.js";import"./HardDrive-BD491-6A.js";import"./Sun-0LQy_BRh.js";import"./Palette-NYPFTebi.js";import"./Shield01-BrCb9Fbq.js";import"./use-clock-tick-BW4BJ8Tt.js";import"./use-copy-60B0ujzD.js";import"./content-blocks-o63cs2vh.js";import"./connection-card-CHIFmA8R.js";import"./use-registry-connections-Ba1xQHz9.js";import"./connection-form-helpers-CWhKbOwZ.js";function xr(d){return d.schema?.definitions??d.schema?.$defs??{}}function br(d,e){const r=xr(e),c=r[btoa(d)];if(!c)return;let u=typeof c.image=="string"?c.image:void 0;if(!u&&Array.isArray(c.allOf)){const h=c.allOf.find(v=>typeof v.$ref=="string")?.$ref;if(typeof h=="string"){const v=h.replace("#/definitions/",""),f=r[v];u=typeof f?.image=="string"?f.image:void 0}}if(u?.includes("{{{"))return u}function yr(d,e){if(!e)return;const r=Qs(d);if(!r)return;const c=br(r.resolveType,e);if(!c)return;const u=Xs(c,r.data);if(u)return Zs(u)}const jr="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",_r="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 kn(d){return Array.from({length:d},(e,r)=>({id:crypto.randomUUID(),index:r}))}function Jn(d){return d.map((e,r)=>({...e,index:r}))}function kr(d,e){if(e===d.length)return d;if(e<d.length)return Jn(d.slice(0,e));const r=Array.from({length:e-d.length},(c,u)=>({id:crypto.randomUUID(),index:d.length+u}));return[...d,...r]}function Qn(d){const e=ze.c(20),{section:r,raw:c,meta:u}=d,h=r.isSavedBlock===!0,v=r.isMultivariate===!0;let f;e[0]!==u||e[1]!==c?(f=c&&u?yr(c,u):void 0,e[0]=u,e[1]=c,e[2]=f):f=e[2];const g=f;let S;e[3]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(sr,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=S):S=e[3];let x;e[4]!==g?(x=g&&n.jsx("img",{src:g,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=g,e[5]=x):x=e[5];let D;e[6]!==v||e[7]!==h?(D=h?{color:ta}:v?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=v,e[7]=h,e[8]=D):D=e[8];let N;e[9]!==D?(N=n.jsx(Ut,{className:"h-4 w-4 shrink-0",style:D}),e[9]=D,e[10]=N):N=e[10];const _=r.isHidden&&"line-through opacity-50";let k;e[11]!==_?(k=Ce("min-w-0 flex-1 truncate text-sm font-medium",_),e[11]=_,e[12]=k):k=e[12];let o;e[13]!==r.label||e[14]!==k?(o=n.jsx("span",{className:k,children:r.label}),e[13]=r.label,e[14]=k,e[15]=o):o=e[15];let b;return e[16]!==x||e[17]!==N||e[18]!==o?(b=n.jsxs(n.Fragment,{children:[S,x,N,o]}),e[16]=x,e[17]=N,e[18]=o,e[19]=b):b=e[19],b}function Xn(d,e){const r=d.isSavedBlock===!0,c=d.isMultivariate===!0;return Ce("group flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":r?jr:c?"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)]":"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function wr(d){const e=ze.c(64),{section:r,raw:c,meta:u,sortableId:h,selected:v,onSelect:f,onDelete:g,onDuplicate:S,onMakeReusable:x,onToggleHidden:D,onToggleLazy:N,onAddVariant:_,onDetach:k}=d,o=c?Tn(c.__resolveType??""):!1;let b;e[0]!==r?(b=Gs(r),e[0]=r,e[1]=b):b=e[1];const m=b;let U;e[2]!==h?(U={id:h,animateLayoutChanges:Tr},e[2]=h,e[3]=U):U=e[3];const{attributes:J,listeners:L,setNodeRef:l,transform:C,isDragging:le}=zn(U);let T;e[4]!==C?(T=In.Transform.toString(C?{...C,x:0}:null),e[4]=C,e[5]=T):T=e[5];const ue=le?0:void 0;let P;e[6]!==T||e[7]!==ue?(P={transform:T,opacity:ue},e[6]=T,e[7]=ue,e[8]=P):P=e[8];const Z=P;let B;e[9]!==r?(B=ea(r),e[9]=r,e[10]=B):B=e[10];const ae=B,re="button",Se=0;let G;e[11]!==f?(G=$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),f())},e[11]=f,e[12]=G):G=e[12];const z=le?"cursor-grabbing":"cursor-pointer";let ee;e[13]!==r||e[14]!==v||e[15]!==z?(ee=Ce("touch-none transition-colors",z,Xn(r,v)),e[13]=r,e[14]=v,e[15]=z,e[16]=ee):ee=e[16];let Q;e[17]!==u||e[18]!==c||e[19]!==r?(Q=n.jsx(Qn,{section:r,raw:c,meta:u}),e[17]=u,e[18]=c,e[19]=r,e[20]=Q):Q=e[20];const A=!r.isMultivariate&&n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":o?"Disable async render":"Enable async render",className:Ce("h-7 w-7 shrink-0",o?"":"opacity-0 group-hover:opacity-100"),onClick:$=>{$.stopPropagation(),N()},onPointerDown:Dr,children:n.jsx(rr,{className:Ce("h-3.5 w-3.5",o&&"text-yellow-500")})})}),n.jsx(rt,{side:"bottom",children:o?"Disable async render":"Enable async render"})]});let oe;e[21]!==D||e[22]!==r.isHidden||e[23]!==r.isMultivariate?(oe=!r.isMultivariate&&n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":r.isHidden?"Show section":"Hide section",className:Ce("h-7 w-7 shrink-0",r.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:$=>{$.stopPropagation(),D()},onPointerDown:Cr,children:r.isHidden?n.jsx(ar,{className:"h-3.5 w-3.5"}):n.jsx(tr,{className:"h-3.5 w-3.5"})})}),n.jsx(rt,{side:"bottom",children:r.isHidden?"Show section":"Hide section"})]}),e[21]=D,e[22]=r.isHidden,e[23]=r.isMultivariate,e[24]=oe):oe=e[24];let q;e[25]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsx($n,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":"Section actions",className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:Rr,onPointerDown:Nr,children:n.jsx(An,{className:"h-3.5 w-3.5"})})}),e[25]=q):q=e[25];let X;e[26]!==S?(X=$=>{$.stopPropagation(),S()},e[26]=S,e[27]=X):X=e[27];let te;e[28]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(nr,{className:"h-4 w-4"}),e[28]=te):te=e[28];let F;e[29]!==X?(F=n.jsxs(nt,{onClick:X,children:[te,"Duplicate"]}),e[29]=X,e[30]=F):F=e[30];let M;e[31]!==m||e[32]!==_?(M=m&&n.jsxs(nt,{className:na,onClick:$=>{$.stopPropagation(),_()},children:[n.jsx(Mn,{className:"h-4 w-4"}),"Add variant"]}),e[31]=m,e[32]=_,e[33]=M):M=e[33];let E;e[34]!==ae||e[35]!==x?(E=ae&&n.jsxs(nt,{className:_r,onClick:$=>{$.stopPropagation(),x()},children:[n.jsx(Ut,{className:"h-4 w-4"}),"Make reusable"]}),e[34]=ae,e[35]=x,e[36]=E):E=e[36];let ne;e[37]!==k||e[38]!==r.isMultivariate||e[39]!==r.isSavedBlock?(ne=r.isSavedBlock===!0&&!r.isMultivariate&&n.jsxs(nt,{onClick:$=>{$.stopPropagation(),k()},children:[n.jsx(Ut,{className:"h-4 w-4"}),"Detach"]}),e[37]=k,e[38]=r.isMultivariate,e[39]=r.isSavedBlock,e[40]=ne):ne=e[40];let pe;e[41]!==g?(pe=$=>{$.stopPropagation(),g()},e[41]=g,e[42]=pe):pe=e[42];let he;e[43]===Symbol.for("react.memo_cache_sentinel")?(he=n.jsx(En,{className:"h-4 w-4"}),e[43]=he):he=e[43];let de;e[44]!==pe?(de=n.jsxs(nt,{className:"text-destructive focus:text-destructive",onClick:pe,children:[he,"Delete"]}),e[44]=pe,e[45]=de):de=e[45];let ie;e[46]!==F||e[47]!==M||e[48]!==E||e[49]!==ne||e[50]!==de?(ie=n.jsxs(Kn,{children:[q,n.jsxs(On,{align:"end",className:"w-44",children:[F,M,E,ne,de]})]}),e[46]=F,e[47]=M,e[48]=E,e[49]=ne,e[50]=de,e[51]=ie):ie=e[51];let I;return e[52]!==J||e[53]!==L||e[54]!==f||e[55]!==l||e[56]!==Z||e[57]!==ee||e[58]!==Q||e[59]!==A||e[60]!==oe||e[61]!==ie||e[62]!==G?(I=n.jsxs("div",{ref:l,style:Z,...J,...L,role:re,tabIndex:Se,onClick:f,onKeyDown:G,className:ee,children:[Q,A,oe,ie]}),e[52]=J,e[53]=L,e[54]=f,e[55]=l,e[56]=Z,e[57]=ee,e[58]=Q,e[59]=A,e[60]=oe,e[61]=ie,e[62]=G,e[63]=I):I=e[63],I}function Nr(d){return d.stopPropagation()}function Rr(d){return d.stopPropagation()}function Cr(d){return d.stopPropagation()}function Dr(d){return d.stopPropagation()}function Tr(){return!1}function Pr(d){const e=ze.c(90),{listKey:r,rawSections:c,sections:u,meta:h,selectedIndex:v,onSelect:f,onReorder:g,onDelete:S,onDuplicate:x,onMakeReusable:D,onToggleHidden:N,onToggleLazy:_,onAddVariant:k,onDetach:o,onAddSection:b,canAddSection:m}=d,U=m===void 0?!0:m;let J;e[0]!==u.length?(J=()=>kn(u.length),e[0]=u.length,e[1]=J):J=e[1];const[L,l]=w.useState(J),[C,le]=w.useState(null),[T,ue]=w.useState(r),[P,Z]=w.useState(u.length),B=w.useRef(!1);T!==r?(ue(r),Z(u.length),l(kn(u.length))):P!==u.length&&(Z(u.length),l(V=>kr(V,u.length)));let ae;e[2]===Symbol.for("react.memo_cache_sentinel")?(ae={activationConstraint:{distance:8}},e[2]=ae):ae=e[2];let re;e[3]===Symbol.for("react.memo_cache_sentinel")?(re={coordinateGetter:Hn},e[3]=re):re=e[3];const Se=Ln(_t(Fn,ae),_t(Bn,re));let G;e[4]!==L?(G=L.map(Vr),e[4]=L,e[5]=G):G=e[5];const z=G;let ee;e[6]===Symbol.for("react.memo_cache_sentinel")?(ee=V=>{le(String(V.active.id))},e[6]=ee):ee=e[6];const Q=ee;let A;e[7]!==z||e[8]!==g?(A=V=>{le(null);const{active:K,over:W}=V;if(!W||K.id===W.id)return;const Be=z.indexOf(String(K.id)),Ie=z.indexOf(String(W.id));Be===-1||Ie===-1||(l(We=>Jn(mt([...We],Be,Ie))),B.current=!0,requestAnimationFrame(()=>{B.current=!1}),g?.(Be,Ie))},e[7]=z,e[8]=g,e[9]=A):A=e[9];const oe=A;let q;e[10]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{le(null)},e[10]=q):q=e[10];const X=q;let te,F,M,E,ne,pe,he,de,ie,I,$,De,ke,Ee,we;if(e[11]!==C||e[12]!==U||e[13]!==L||e[14]!==z||e[15]!==oe||e[16]!==h||e[17]!==b||e[18]!==k||e[19]!==S||e[20]!==o||e[21]!==x||e[22]!==D||e[23]!==f||e[24]!==N||e[25]!==_||e[26]!==c||e[27]!==u||e[28]!==v||e[29]!==Se){Ee=Symbol.for("react.early_return_sentinel");e:{const V=K=>{B.current||f(K)};if(e[45]!==C||e[46]!==U||e[47]!==L||e[48]!==b||e[49]!==c||e[50]!==u){const K=C?L.find(W=>W.id===C):null;if(E=K!=null?u[K.index]:null,M=K!=null?c[K.index]:void 0,L.length===0){let W;e[54]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:"No sections in this page."}),e[54]=W):W=e[54];const Be=!U;let Ie;e[55]===Symbol.for("react.memo_cache_sentinel")?(Ie=n.jsx(Wt,{size:14}),e[55]=Ie):Ie=e[55];let We;e[56]!==b||e[57]!==Be?(We=n.jsxs("div",{className:"space-y-2",children:[W,n.jsxs(Ue,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:Be,onClick:b,children:[Ie,"Add section"]})]}),e[56]=b,e[57]=Be,e[58]=We):We=e[58],Ee=We;break e}ke=Ce(K&&"cursor-grabbing"),e[45]=C,e[46]=U,e[47]=L,e[48]=b,e[49]=c,e[50]=u,e[51]=M,e[52]=E,e[53]=ke}else M=e[51],E=e[52],ke=e[53];F=Un,de=Se,ie=Wn,I=Q,$=oe,De=X,te=qn,pe=z,he=ir,we="space-y-1",ne=L.map(K=>{const W=u[K.index];return W?n.jsx(wr,{sortableId:K.id,section:W,raw:c[K.index],meta:h,selected:v===K.index,onSelect:()=>V(K.index),onDelete:()=>S(K.index),onDuplicate:()=>x(K.index),onMakeReusable:()=>D(K.index),onToggleHidden:()=>N(K.index),onToggleLazy:()=>_(K.index),onAddVariant:()=>k(K.index),onDetach:()=>o(K.index)},K.id):null})}e[11]=C,e[12]=U,e[13]=L,e[14]=z,e[15]=oe,e[16]=h,e[17]=b,e[18]=k,e[19]=S,e[20]=o,e[21]=x,e[22]=D,e[23]=f,e[24]=N,e[25]=_,e[26]=c,e[27]=u,e[28]=v,e[29]=Se,e[30]=te,e[31]=F,e[32]=M,e[33]=E,e[34]=ne,e[35]=pe,e[36]=he,e[37]=de,e[38]=ie,e[39]=I,e[40]=$,e[41]=De,e[42]=ke,e[43]=Ee,e[44]=we}else te=e[30],F=e[31],M=e[32],E=e[33],ne=e[34],pe=e[35],he=e[36],de=e[37],ie=e[38],I=e[39],$=e[40],De=e[41],ke=e[42],Ee=e[43],we=e[44];if(Ee!==Symbol.for("react.early_return_sentinel"))return Ee;let Te;e[59]!==ne||e[60]!==we?(Te=n.jsx("div",{className:we,children:ne}),e[59]=ne,e[60]=we,e[61]=Te):Te=e[61];let $e;e[62]!==te||e[63]!==pe||e[64]!==he||e[65]!==Te?($e=n.jsx(te,{items:pe,strategy:he,children:Te}),e[62]=te,e[63]=pe,e[64]=he,e[65]=Te,e[66]=$e):$e=e[66];let Ke;e[67]!==M||e[68]!==E||e[69]!==h?(Ke=E?n.jsx("div",{className:Ce("cursor-grabbing shadow-lg ring-1 ring-border/60",Xn(E,!1)),children:n.jsx(Qn,{section:E,raw:M,meta:h})}):null,e[67]=M,e[68]=E,e[69]=h,e[70]=Ke):Ke=e[70];let xe;e[71]!==Ke?(xe=n.jsx(Yn,{dropAnimation:null,children:Ke}),e[71]=Ke,e[72]=xe):xe=e[72];let Oe;e[73]!==F||e[74]!==de||e[75]!==ie||e[76]!==I||e[77]!==$||e[78]!==De||e[79]!==$e||e[80]!==xe?(Oe=n.jsxs(F,{sensors:de,collisionDetection:ie,onDragStart:I,onDragEnd:$,onDragCancel:De,children:[$e,xe]}),e[73]=F,e[74]=de,e[75]=ie,e[76]=I,e[77]=$,e[78]=De,e[79]=$e,e[80]=xe,e[81]=Oe):Oe=e[81];const Pe=!U;let ce;e[82]===Symbol.for("react.memo_cache_sentinel")?(ce=n.jsx(Wt,{size:14}),e[82]=ce):ce=e[82];let se;e[83]!==b||e[84]!==Pe?(se=n.jsxs(Ue,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:Pe,onClick:b,children:[ce,"Add section"]}),e[83]=b,e[84]=Pe,e[85]=se):se=e[85];let Ne;return e[86]!==ke||e[87]!==Oe||e[88]!==se?(Ne=n.jsxs("div",{className:ke,children:[Oe,se]}),e[86]=ke,e[87]=Oe,e[88]=se,e[89]=Ne):Ne=e[89],Ne}function Vr(d){return d.id}function Ar(d){const e=ze.c(38),{open:r,initialName:c,autoLabel:u,isPending:h,onSubmit:v,onOpenChange:f}=d,g=h===void 0?!1:h,[S,x]=w.useState(c),[D,N]=w.useState(r);r!==D&&(N(r),r&&x(c));let _;e[0]!==g||e[1]!==f?(_=re=>{!re&&!g&&f(!1)},e[0]=g,e[1]=f,e[2]=_):_=e[2];const k=_;let o;e[3]!==g||e[4]!==S||e[5]!==v?(o=async re=>{re.preventDefault(),!g&&await v(S.trim())},e[3]=g,e[4]=S,e[5]=v,e[6]=o):o=e[6];const b=o;let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Ya,{children:"Rename variant"}),e[7]=m):m=e[7];const U=u||"the rule";let J;e[8]!==U?(J=n.jsxs(Ja,{children:[m,n.jsxs(Qa,{children:["Save this matcher as a global block with a custom label. Leave empty to inline the matcher again and fall back to"," ",n.jsx("span",{className:"font-medium",children:U}),"."]})]}),e[8]=U,e[9]=J):J=e[9];let L;e[10]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[10]=L):L=e[10];let l;e[11]===Symbol.for("react.memo_cache_sentinel")?(l=re=>x(re.target.value),e[11]=l):l=e[11];let C;e[12]!==u||e[13]!==g||e[14]!==S?(C=n.jsxs("div",{className:"space-y-1.5 py-4",children:[L,n.jsx(er,{id:"variant-rename-name",value:S,onChange:l,placeholder:u,autoFocus:!0,disabled:g})]}),e[12]=u,e[13]=g,e[14]=S,e[15]=C):C=e[15];let le;e[16]!==f?(le=()=>f(!1),e[16]=f,e[17]=le):le=e[17];let T;e[18]!==g||e[19]!==le?(T=n.jsx(Ue,{type:"button",variant:"outline",onClick:le,disabled:g,children:"Cancel"}),e[18]=g,e[19]=le,e[20]=T):T=e[20];let ue;e[21]!==g?(ue=g?n.jsxs(n.Fragment,{children:[n.jsx(Dn,{size:14,className:"animate-spin"}),"Saving…"]}):"Save",e[21]=g,e[22]=ue):ue=e[22];let P;e[23]!==g||e[24]!==ue?(P=n.jsx(Ue,{type:"submit",disabled:g,children:ue}),e[23]=g,e[24]=ue,e[25]=P):P=e[25];let Z;e[26]!==T||e[27]!==P?(Z=n.jsxs(Xa,{children:[T,P]}),e[26]=T,e[27]=P,e[28]=Z):Z=e[28];let B;e[29]!==b||e[30]!==Z||e[31]!==J||e[32]!==C?(B=n.jsx(Za,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:b,children:[J,C,Z]})}),e[29]=b,e[30]=Z,e[31]=J,e[32]=C,e[33]=B):B=e[33];let ae;return e[34]!==k||e[35]!==r||e[36]!==B?(ae=n.jsx(Ga,{open:r,onOpenChange:k,children:B}),e[34]=k,e[35]=r,e[36]=B,e[37]=ae):ae=e[37],ae}const Mr="oklch(0.65 0.15 160)",Zn="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.22)]";function qt(d){const e=ze.c(5),{rule:r,matchers:c}=d,u=r?.__resolveType??"";let h;if(e[0]!==c||e[1]!==u){const S=c.find(x=>x.resolveType===u)?.iconName??sa(u);h=Ha(S),e[0]=c,e[1]=u,e[2]=h}else h=e[2];const v=h;if(!v)return null;let f;return e[3]!==v?(f=n.jsx(v,{size:14,className:"shrink-0"}),e[3]=v,e[4]=f):f=e[4],f}function wn(d){return d.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
2
2
  `)}function Ht(d){return d.map((e,r)=>({id:crypto.randomUUID(),index:r,variant:e}))}function Er(d){return d.map((e,r)=>({...e,index:r}))}function $r(d){const e=ze.c(51),{entry:r,sortableId:c,isActive:u,canDelete:h,decofile:v,meta:f,matchers:g,onSelect:S,onRename:x,onDelete:D}=d;let N;e[0]!==c?(N={id:c,animateLayoutChanges:Lr},e[0]=c,e[1]=N):N=e[1];const{attributes:_,listeners:k,setNodeRef:o,transform:b,isDragging:m}=zn(N);let U;e[2]!==b?(U=In.Transform.toString(b?{...b,y:0}:null),e[2]=b,e[3]=U):U=e[3];const J=m?0:void 0;let L;e[4]!==U||e[5]!==J?(L={transform:U,opacity:J},e[4]=U,e[5]=J,e[6]=L):L=e[6];const l=L,C=f??void 0;let le;e[7]!==v||e[8]!==r.variant.rule||e[9]!==C?(le=jt(r.variant.rule,v,C),e[7]=v,e[8]=r.variant.rule,e[9]=C,e[10]=le):le=e[10];const T=le,ue=u?Zn:"text-muted-foreground hover:bg-muted hover:text-foreground",P=m?"cursor-grabbing":"cursor-grab";let Z;e[11]!==ue||e[12]!==P?(Z=Ce("group shrink-0 inline-flex items-center rounded-md transition-colors touch-none",ue,P),e[11]=ue,e[12]=P,e[13]=Z):Z=e[13];let B;e[14]!==T||e[15]!==g?(B=n.jsx(qt,{rule:T,matchers:g}),e[14]=T,e[15]=g,e[16]=B):B=e[16];let ae;e[17]!==r.variant.label?(ae=n.jsx("span",{className:"truncate",children:r.variant.label}),e[17]=r.variant.label,e[18]=ae):ae=e[18];let re;e[19]!==_||e[20]!==k||e[21]!==S||e[22]!==B||e[23]!==ae?(re=n.jsxs("button",{type:"button",..._,...k,onClick:S,className:"inline-flex items-center gap-1.5 h-8 pl-3 pr-1.5 text-sm font-medium cursor-[inherit]",children:[B,ae]}),e[19]=_,e[20]=k,e[21]=S,e[22]=B,e[23]=ae,e[24]=re):re=e[24];const Se=`Actions for ${r.variant.label}`,G=u&&"opacity-100";let z;e[25]!==G?(z=Ce("inline-flex h-8 w-6 items-center justify-center pr-1 cursor-pointer transition-opacity","opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",G),e[25]=G,e[26]=z):z=e[26];let ee;e[27]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(An,{size:12}),e[27]=ee):ee=e[27];let Q;e[28]!==Se||e[29]!==z?(Q=n.jsx($n,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":Se,onClick:Or,onPointerDown:Kr,className:z,children:ee})}),e[28]=Se,e[29]=z,e[30]=Q):Q=e[30];let A;e[31]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(vr,{size:14}),e[31]=A):A=e[31];let oe;e[32]!==x?(oe=n.jsxs(nt,{onClick:x,children:[A,"Rename"]}),e[32]=x,e[33]=oe):oe=e[33];let q;e[34]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsx(or,{}),e[34]=q):q=e[34];const X=!h;let te;e[35]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(En,{size:14}),e[35]=te):te=e[35];let F;e[36]!==D||e[37]!==X?(F=n.jsxs(nt,{variant:"destructive",disabled:X,onClick:D,children:[te,"Delete"]}),e[36]=D,e[37]=X,e[38]=F):F=e[38];let M;e[39]!==oe||e[40]!==F?(M=n.jsxs(On,{align:"start",className:"w-36",children:[oe,q,F]}),e[39]=oe,e[40]=F,e[41]=M):M=e[41];let E;e[42]!==Q||e[43]!==M?(E=n.jsxs(Kn,{children:[Q,M]}),e[42]=Q,e[43]=M,e[44]=E):E=e[44];let ne;return e[45]!==o||e[46]!==l||e[47]!==re||e[48]!==E||e[49]!==Z?(ne=n.jsxs("div",{ref:o,style:l,className:Z,children:[re,E]}),e[45]=o,e[46]=l,e[47]=re,e[48]=E,e[49]=Z,e[50]=ne):ne=e[50],ne}function Kr(d){return d.stopPropagation()}function Or(d){return d.stopPropagation()}function Lr(){return!1}function Br(d){const e=ze.c(13),{variant:r,decofile:c,meta:u,matchers:h}=d,v=u??void 0;let f;e[0]!==c||e[1]!==v||e[2]!==r.rule?(f=jt(r.rule,c,v),e[0]=c,e[1]=v,e[2]=r.rule,e[3]=f):f=e[3];const g=f;let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=Ce("inline-flex items-center gap-1.5 h-8 pl-3 pr-3 text-sm font-medium rounded-md shadow-lg ring-1 ring-border/60 cursor-grabbing",Zn),e[4]=S):S=e[4];let x;e[5]!==g||e[6]!==h?(x=n.jsx(qt,{rule:g,matchers:h}),e[5]=g,e[6]=h,e[7]=x):x=e[7];let D;e[8]!==r.label?(D=n.jsx("span",{className:"truncate",children:r.label}),e[8]=r.label,e[9]=D):D=e[9];let N;return e[10]!==x||e[11]!==D?(N=n.jsxs("div",{className:S,children:[x,D]}),e[10]=x,e[11]=D,e[12]=N):N=e[12],N}function Fr(d){const e=ze.c(77),{listKey:r,variants:c,activeIndex:u,decofile:h,meta:v,matchers:f,onSelect:g,onReorder:S,onRename:x,onDelete:D,onAdd:N}=d;let _;e[0]!==c?(_=()=>Ht(c),e[0]=c,e[1]=_):_=e[1];const[k,o]=w.useState(_),[b,m]=w.useState(null),[U,J]=w.useState(r),[L,l]=w.useState(c.length);let C;e[2]!==c?(C=()=>wn(c),e[2]=c,e[3]=C):C=e[3];const[le,T]=w.useState(C),ue=w.useRef(!1),P=wn(c);U!==r?(J(r),l(c.length),T(P),o(Ht(c))):L!==c.length?(l(c.length),T(P),o(Ht(c))):le!==P&&(T(P),o(se=>c.map((Ne,V)=>({id:se[V]?.id??crypto.randomUUID(),index:V,variant:Ne}))));let Z;e[4]===Symbol.for("react.memo_cache_sentinel")?(Z={activationConstraint:{distance:8}},e[4]=Z):Z=e[4];let B;e[5]===Symbol.for("react.memo_cache_sentinel")?(B={coordinateGetter:Hn},e[5]=B):B=e[5];const ae=Ln(_t(Fn,Z),_t(Bn,B));let re;e[6]!==k?(re=k.map(zr),e[6]=k,e[7]=re):re=e[7];const Se=re,G=c.length>1;let z;e[8]!==k?(z=se=>{const Ne=String(se.active.id);m(k.find(V=>V.id===Ne)??null)},e[8]=k,e[9]=z):z=e[9];const ee=z;let Q;e[10]!==Se||e[11]!==S?(Q=se=>{m(null);const{active:Ne,over:V}=se;if(!V||Ne.id===V.id)return;const K=Se.indexOf(String(Ne.id)),W=Se.indexOf(String(V.id));K===-1||W===-1||(o(Be=>Er(mt([...Be],K,W))),ue.current=!0,requestAnimationFrame(()=>{ue.current=!1}),S(K,W))},e[10]=Se,e[11]=S,e[12]=Q):Q=e[12];const A=Q;let oe;e[13]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>{m(null)},e[13]=oe):oe=e[13];const q=oe;let X,te,F,M,E,ne,pe,he,de,ie,I,$;if(e[14]!==b||e[15]!==u||e[16]!==G||e[17]!==h||e[18]!==k||e[19]!==Se||e[20]!==A||e[21]!==ee||e[22]!==f||e[23]!==v||e[24]!==D||e[25]!==x||e[26]!==g||e[27]!==ae){const se=V=>{ue.current||g(V)};I="flex items-center border-b shrink-0";const Ne=b&&"cursor-grabbing";e[40]!==Ne?(ie=Ce("flex flex-1 min-w-0 items-center gap-1.5 pl-3 pr-2 py-2 overflow-x-auto",Ne),e[40]=Ne,e[41]=ie):ie=e[41],te=Un,E=ae,ne=Wn,pe=ee,he=A,de=q,X=qn,$=Se,F=lr,M=k.map(V=>n.jsx($r,{sortableId:V.id,entry:V,isActive:V.index===u,canDelete:G,decofile:h,meta:v,matchers:f,onSelect:()=>se(V.index),onRename:()=>x(V.index),onDelete:()=>D(V.index)},V.id)),e[14]=b,e[15]=u,e[16]=G,e[17]=h,e[18]=k,e[19]=Se,e[20]=A,e[21]=ee,e[22]=f,e[23]=v,e[24]=D,e[25]=x,e[26]=g,e[27]=ae,e[28]=X,e[29]=te,e[30]=F,e[31]=M,e[32]=E,e[33]=ne,e[34]=pe,e[35]=he,e[36]=de,e[37]=ie,e[38]=I,e[39]=$}else X=e[28],te=e[29],F=e[30],M=e[31],E=e[32],ne=e[33],pe=e[34],he=e[35],de=e[36],ie=e[37],I=e[38],$=e[39];let De;e[42]!==X||e[43]!==F||e[44]!==M||e[45]!==$?(De=n.jsx(X,{items:$,strategy:F,children:M}),e[42]=X,e[43]=F,e[44]=M,e[45]=$,e[46]=De):De=e[46];let ke;e[47]!==b||e[48]!==h||e[49]!==f||e[50]!==v?(ke=b?n.jsx(Br,{variant:b.variant,decofile:h,meta:v,matchers:f}):null,e[47]=b,e[48]=h,e[49]=f,e[50]=v,e[51]=ke):ke=e[51];let Ee;e[52]!==ke?(Ee=n.jsx(Yn,{dropAnimation:null,children:ke}),e[52]=ke,e[53]=Ee):Ee=e[53];let we;e[54]!==te||e[55]!==E||e[56]!==ne||e[57]!==pe||e[58]!==he||e[59]!==de||e[60]!==De||e[61]!==Ee?(we=n.jsxs(te,{sensors:E,collisionDetection:ne,onDragStart:pe,onDragEnd:he,onDragCancel:de,children:[De,Ee]}),e[54]=te,e[55]=E,e[56]=ne,e[57]=pe,e[58]=he,e[59]=de,e[60]=De,e[61]=Ee,e[62]=we):we=e[62];let Te;e[63]!==ie||e[64]!==we?(Te=n.jsx("div",{className:ie,children:we}),e[63]=ie,e[64]=we,e[65]=Te):Te=e[65];let $e;e[66]===Symbol.for("react.memo_cache_sentinel")?($e={color:Mr},e[66]=$e):$e=e[66];let Ke;e[67]===Symbol.for("react.memo_cache_sentinel")?(Ke=n.jsx(Wt,{size:14}),e[67]=Ke):Ke=e[67];let xe;e[68]!==N?(xe=n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":"Add variant",className:"size-8 shrink-0 cursor-pointer",style:$e,onClick:N,children:Ke})}),e[68]=N,e[69]=xe):xe=e[69];let Oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(Oe=n.jsx(rt,{side:"bottom",children:"Add variant"}),e[70]=Oe):Oe=e[70];let Pe;e[71]!==xe?(Pe=n.jsx("div",{className:"shrink-0 pr-3 pl-1 py-2",children:n.jsxs(st,{children:[xe,Oe]})}),e[71]=xe,e[72]=Pe):Pe=e[72];let ce;return e[73]!==I||e[74]!==Te||e[75]!==Pe?(ce=n.jsxs("div",{className:I,children:[Te,Pe]}),e[73]=I,e[74]=Te,e[75]=Pe,e[76]=ce):ce=e[76],ce}function zr(d){return d.id}function Nn(d){const e=ze.c(15),{schema:r,value:c,onChange:u,meta:h,decofile:v,onSaveReferencedBlock:f,sandbox:g}=d;let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=[],e[0]=S):S=e[0];const[x,D]=w.useState(S);let N;e[1]!==x?(N=x.length>0&&n.jsxs("nav",{"aria-label":"Variant rule breadcrumb",className:"flex min-w-0 items-center gap-1 overflow-hidden text-xs",children:[n.jsx("button",{type:"button",onClick:()=>D([]),className:"flex shrink-0 items-center gap-0.5 rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",title:"Back to rule",children:n.jsx(za,{className:"size-3.5"})}),x.map((o,b)=>{const m=b===x.length-1;return n.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[b>0&&n.jsx(Vn,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>D(x.slice(0,b+1)),title:o,className:Ce("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",m?"font-medium text-foreground":"text-muted-foreground"),children:o})]},`${o}-${b}`)})]}),e[1]=x,e[2]=N):N=e[2];let _;e[3]!==x||e[4]!==v||e[5]!==h||e[6]!==u||e[7]!==f||e[8]!==g||e[9]!==r||e[10]!==c?(_=n.jsx(Pn,{schema:r,value:c,onChange:u,basePath:"",breadcrumbPath:x,onBreadcrumbChange:D,meta:h,decofile:v,onSaveReferencedBlock:f,sandbox:g}),e[3]=x,e[4]=v,e[5]=h,e[6]=u,e[7]=f,e[8]=g,e[9]=r,e[10]=c,e[11]=_):_=e[11];let k;return e[12]!==N||e[13]!==_?(k=n.jsxs("div",{className:"space-y-2",children:[N,_]}),e[12]=N,e[13]=_,e[14]=k):k=e[14],k}function Rn(d){const e=ze.c(21),{activeSchema:r,formValue:c,formResetKey:u,onFormChange:h,onBreadcrumbChange:v,breadcrumbPath:f,emptyMessage:g,beforeForm:S,seoResolveType:x,siteDefaultSeo:D,meta:N,decofile:_,onSaveReferencedBlock:k,sandbox:o}=d;let b;e[0]!==f?(b=f===void 0?[]:f,e[0]=f,e[1]=b):b=e[1];const m=b;let U;e[2]!==r||e[3]!==m||e[4]!==_||e[5]!==u||e[6]!==c||e[7]!==N||e[8]!==v||e[9]!==h||e[10]!==k||e[11]!==o||e[12]!==x||e[13]!==D?(U=r&&c?x?n.jsx(gr,{schema:r,resolveType:x,value:c,formResetKey:u,onChange:h,onBreadcrumbChange:v,siteDefaultSeo:D}):n.jsx(Pn,{schema:r,value:c,onChange:h,basePath:"",breadcrumbPath:m,onBreadcrumbChange:v,meta:N,decofile:_,onSaveReferencedBlock:k,sandbox:o},u):null,e[2]=r,e[3]=m,e[4]=_,e[5]=u,e[6]=c,e[7]=N,e[8]=v,e[9]=h,e[10]=k,e[11]=o,e[12]=x,e[13]=D,e[14]=U):U=e[14];const J=U;let L;e[15]!==g||e[16]!==J?(L=J??n.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:g}),e[15]=g,e[16]=J,e[17]=L):L=e[17];let l;return e[18]!==S||e[19]!==L?(l=n.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:n.jsxs("div",{className:"mx-auto max-w-2xl",children:[S,L]})}),e[18]=S,e[19]=L,e[20]=l):l=e[20],l}const Ir="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.22)]";function Hr(d,e){return Sa(d,e,tt)}function Ur(d){const e=ze.c(13),{pageKey:r,initialName:c,initialPath:u,onFieldChange:h}=d,[v,f]=w.useState(c),[g,S]=w.useState(u),[x,D]=w.useState(r);x!==r&&(D(r),f(c),S(u));let N;e[0]!==h?(N=m=>{f(m.target.value),h("name",m.target.value)},e[0]=h,e[1]=N):N=e[1];let _;e[2]!==v||e[3]!==N?(_=n.jsx("input",{type:"text",value:v,onChange:N,className:"w-full bg-transparent text-sm font-semibold truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:"Page name"}),e[2]=v,e[3]=N,e[4]=_):_=e[4];let k;e[5]!==h?(k=m=>{S(m.target.value),h("path",m.target.value)},e[5]=h,e[6]=k):k=e[6];let o;e[7]!==g||e[8]!==k?(o=n.jsx("input",{type:"text",value:g,onChange:k,className:"w-full bg-transparent text-xs text-muted-foreground truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:"/path"}),e[7]=g,e[8]=k,e[9]=o):o=e[9];let b;return e[10]!==_||e[11]!==o?(b=n.jsxs("div",{className:"space-y-1",children:[_,o]}),e[10]=_,e[11]=o,e[12]=b):b=e[12],b}function Cn(d){const e=ze.c(6),{onClick:r}=d;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Mn,{size:14}),e[0]=c):c=e[0];let u;e[1]!==r?(u=n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":"Add variant",className:"size-7 shrink-0 text-[oklch(0.65_0.15_160)]",onClick:r,children:c})}),e[1]=r,e[2]=u):u=e[2];let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(rt,{side:"bottom",children:"Add variant"}),e[3]=h):h=e[3];let v;return e[4]!==u?(v=n.jsxs(st,{children:[u,h]}),e[4]=u,e[5]=v):v=e[5],v}function wl({orgSlug:d,virtualMcpId:e,branch:r,previewReady:c=!0,previewUrl:u,currentPath:h,activePageBlockKey:v=null,activeGlobalBlockKey:f=null,externalSelectedIndex:g,onSaved:S,initialEditSeo:x=!1,onExitSeo:D,onViewJsonFile:N,onVariantPreviewOverride:_}){const k=c?{orgSlug:d,virtualMcpId:e,branch:r,previewUrl:u}:null,{data:o,isLoading:b}=aa(k),{data:m,isLoading:U}=ra(k),J=oa(),L=J?.entity?.id===e?J.entity.metadata?.siteSlug??null:null,[l,C]=w.useState(null),[le,T]=w.useState(null),[ue,P]=w.useState(null),[Z,B]=w.useState(0),[ae,re]=w.useState(void 0),[Se,G]=w.useState(null),[z,ee]=w.useState(null),[Q,A]=w.useState([]),[oe,q]=w.useState(0),[X,te]=w.useState(null),[F,M]=w.useState(null),[E,ne]=w.useState(!0),[pe,he]=w.useState(!1),[de,ie]=w.useState(!1),[I,$]=w.useState(x),[De,ke]=w.useState(x);x&&!De&&(ke(!0),$(!0),C(null),T(null),P(null),A([])),!x&&De&&ke(!1);const[Ee,we]=w.useState(null),[Te,$e]=w.useState(void 0),[Ke,xe]=w.useState([]),[Oe,Pe]=w.useState(0),[ce,se]=w.useState(0),[Ne,V]=w.useState(null),[K,W]=w.useState(null),[Be,Ie]=w.useState(null),We=Ys(),Gn=`${d}/${e}/${r}`,kt=ia({orgSlug:d,virtualMcpId:e,branch:r}),[es,ts]=w.useState(h),[ns,ss]=w.useState(v),[as,rs]=w.useState(f);(es!==h||ns!==v||as!==f)&&(queueMicrotask(()=>kt.flush()),ts(h),ss(v),rs(f),C(null),T(null),P(null),B(0),G(null),ee(null),se(0),V(null),W(null),A([]),q(t=>t+1),$(!1),we(null),$e(void 0),xe([]),Pe(t=>t+1));const Ve=la({orgSlug:d,virtualMcpId:e,branch:r}),ft=Ca((t,s)=>{Ve.mutate({blockKey:t,data:s},{onSuccess:()=>S?.(),onError:a=>fe.error(`Save failed: ${a.message}`)})}),Yt=ca({orgSlug:d,virtualMcpId:e,branch:r}),[wt,Jt]=w.useState(!1),Nt=w.useRef(null),ot=w.useRef(null),it=w.useRef(null),Rt=w.useRef({}),qe=w.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null});if(!c||b||U)return n.jsx("div",{className:"h-full w-full flex items-center justify-center",children:n.jsx(Dn,{size:20,className:"animate-spin text-muted-foreground"})});if(!o||!m)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:"Could not load site data."});const os=ua(o),ve=!!f,Le=ve?null:da(os,h,v),y=ve?f:Le?.key??null,Ct=ve&&f?o[f]:void 0,Qt=ve&&f&&Ct?ma(f,Ct):ve&&f?f:"",pt=!ve&&y&&o[y]?o[y]:null,Dt=I&&o&&m&&y&&Le?_n(o,{kind:"page",pageKey:y,pageName:String(Le.name??""),path:String(Le.path??"")},m):null,is=I?pt?.seo:void 0,Tt=Te!==void 0?Te:is,ls=I?cr(Tt):void 0,cs=Dt?.seoTypeOptions??[],us=I&&m?ur(m):"",Xt=Ee??ls??{},Pt=I&&Dt?dr(Xt,Dt):null,ds=I&&Pt&&mr(Tt)?xt(Pt,m):null,ms=I?fr(o,m)?.seoData:void 0,Ae=ve?[{label:"Default",sections:[{__resolveType:f}]}]:Hr(pt?.sections,o??{}),ht=Ae.length>1,_e=Math.min(Z,Ae.length-1),Ze=Ae[_e],H=Ze?.sections??[],Re=bt(H,o),Zt=!ve&&fa(pt?.sections);if(ve&&f&&Be!==f){Ie(f);const t=H[0],s=Re[0];if(t&&s){C(0),se(0),A([]);const a=et(t,s,o);a&&(T(a.data),P(a.resolveType),W(null),V(null))}}!ve&&Be!==null&&Ie(null),qe.current={rawSections:H,parsedSections:Re,decofile:o??{},activePageKey:y,pageVariants:Ae,variantIndex:_e,sectionVariantIndex:ce,selectedSectionIndex:l};const fs=()=>({multivariate:Zt,index:_e,variants:Ae.map(t=>({rule:t.rule}))}),Gt=(t,s)=>{if(!_)return;if(!y||!Zt||t.length<=1){_(null);return}const a=yn(y,{multivariate:!0,index:s,variants:t},o,m);_(a.length>0?a:null)},lt=(t,s,a)=>{if(!_)return;if(!y){_(null);return}const i=fs(),p=yn(y,i,o,m);if(!t||s<0){_(p.length>0?p:null);return}const R=$a({pageKey:y,page:i,sectionIndex:s,sectionLazy:Re[s]?.isLazy??!1,mvObj:t,selectedVariantIndex:a,decofile:o,meta:m}),j=[...p,...R];_(j.length>0?j:null)},Ye=(t,s,a,i=l??-1,p=!1)=>{const R=Xe(t,s);if(!R){T(null),P(null),W(null),V(null),p&&lt(null,i,a);return}const O=gn(R,tt)[a];if(!O){T(null),P(null),W(null),V(null),p&&lt(null,i,a);return}const ge=xa(O.value,o);T(ge?.data??null),P(ge?.resolveType??null);const{resolveType:Y,formValue:me}=Lt(O.rule,o,m??void 0);W(Y),V(me),p&&lt(R,i,a)};if(g!==void 0&&g!==ae&&(re(g??null),typeof g=="number")){const t=H[g],s=Re[g];if(t&&s)if(C(g),se(0),A([]),q(a=>a+1),s.isMultivariate)Ye(t,s,0,g);else{const a=et(t,s,o);a?(T(a.data),P(a.resolveType)):(T(null),P(null)),W(null),V(null)}}const gt={orgSlug:d,virtualMcpId:e,branch:r,previewUrl:u??void 0,siteSlug:L},Vt=ue&&m?xt(ue,m):null,Fe=(t,s)=>{if(!y)return;const a=Ft(o,y,t,_e,Ae);Ve.mutate({blockKey:y,data:a},{onSuccess:()=>s?.onSuccess?.()??S?.(),onError:i=>fe.error(`Save failed: ${i.message}`)})},ct=()=>{C(null),T(null),P(null),se(0),V(null),W(null),A([]),q(t=>t+1)},ps=(t,s)=>{Nt.current&&clearTimeout(Nt.current);const a=qe.current.sectionVariantIndex;Nt.current=setTimeout(()=>{const{rawSections:i,parsedSections:p,decofile:R,activePageKey:j,pageVariants:O,variantIndex:ge}=qe.current,Y=i[s];if(!Y)return;const me=p[s];if(!me)return;if(me.isSavedBlock){const ye=me.isLazy?Y.section?.__resolveType??Y.__resolveType:Y.__resolveType;Ve.mutate({blockKey:ye,data:t},{onSuccess:()=>S?.(),onError:je=>fe.error(`Save failed: ${je.message}`)});return}if(!j)return;const be={...R[j]},Me=[...i];if(me.isMultivariate){const ye=Xe(Y,me);if(!ye||!j)return;const je=La(ye,a,t);Me[s]=dt(Y,me,je)}else if(me.isHidden){const ye=Tn(Y.__resolveType),je=ye?{...Y.section}:{...Y},He=Array.isArray(je.variants)?[...je.variants]:[];He[0]&&(He[0]={...He[0],value:t}),je.variants=He,ye?Me[s]={...Y,section:je}:Me[s]=je}else me.isLazy?Me[s]={...Y,section:t}:Me[s]=t;if(O.length>1){const ye=be.sections,je=[...ye?.variants??[]];je[ge]&&(je[ge]={...je[ge],value:Me}),be.sections={...ye,variants:je}}else be.sections=Me;Ve.mutate({blockKey:j,data:be},{onSuccess:()=>S?.(),onError:ye=>fe.error(`Save failed: ${ye.message}`)})},It)},hs=t=>{C(t),se(0),A([]),q(p=>p+1);const s=H[t],a=Re[t];if(!s||!a)return;if(a.isMultivariate){Ye(s,a,0,t);return}const i=et(s,a,o);if(!i){T(null),P(null),W(null),V(null),lt(null,t,0);return}T(i.data),P(i.resolveType),W(null),V(null),lt(null,t,0)},en=t=>{const s=t;T(s),l!==null&&ps(s,l)},At=t=>{if(!y||!o||!m||!Le)return;const s={kind:"page",pageKey:y,pageName:String(Le.name??""),path:String(Le.path??"")},a=_n(o,s,m);a&&kt.save(y,()=>{const i=We.getQueryData(Js.decofile(Gn))?.[y];if(!i||typeof i!="object"||i===null||Array.isArray(i))return null;const p={...i,...Rt.current};return Rt.current={},t?.raw!==void 0?{...p,seo:t.raw}:t?.inner!==void 0?hr(s,a,p,t.inner):p})},gs=(t,s)=>{y&&(Rt.current[t]=s,At())},vs=(t,s)=>{if(!y)return;const a=mt([...H],t,s);l!==null&&(l===t?C(s):t<l&&s>=l?C(l-1):t>l&&s<=l&&C(l+1)),Fe(a)},Ss=t=>{if(!y)return;const s=H.filter((a,i)=>i!==t);l===t?ct():l!==null&&l>t&&C(l-1),Fe(s)},xs=t=>{if(!y)return;const s=H[t];if(!s)return;const a=[...H];a.splice(t+1,0,Va(s)),l!==null&&l>t&&C(l+1),Fe(a)},bs=t=>{if(!y)return;const s=H[t],a=Re[t];if(!s||!a||a.isMultivariate)return;const i=a.isHidden?Ta(s):Pa(s);if(!i)return;const p=[...H];p[t]=i,l===t&&ct(),Fe(p)},ys=t=>{if(!y)return;const s=H[t],a=Re[t];if(!s||!a||a.isMultivariate)return;const i=Da(s);if(!i)return;const p=[...H];p[t]=i,l===t&&ct(),Fe(p)},js=t=>{if(!y)return;const s=H[t],a=Re[t];if(!s||!a?.isSavedBlock)return;const i=et(s,a,o);if(!i?.data)return;const{name:p,...R}=i.data,j=[...H];a.isLazy?j[t]={...s,section:R}:j[t]=R,l===t&&ct(),Fe(j)},_s=t=>{if(!y)return;const s=[...H,{__resolveType:t.resolveType}],a=s.length-1;Fe(s,{onSuccess:()=>{he(!1),C(a),se(0),A([]),q(j=>j+1);const i=s[a],p=bt(s,o)[a];if(!i||!p)return;if(p.isMultivariate){Ye(i,p,0);return}const R=et(i,p,o);if(!R){T(null),P(null),W(null),V(null);return}T(R.data),P(R.resolveType),W(null),V(null)}})},ks=t=>{if(l===null)return;const s=H[l],a=Re[l];!s||!a?.isMultivariate||(se(t),A([]),q(i=>i+1),Ye(s,a,t,l,!0))},ws=t=>{if(l===null||!y)return;const s=H[l],a=Re[l];if(!s||!a?.isMultivariate)return;const i=Xe(s,a);if(!i)return;const p=Na(i,t);if(!p){fe.error("Cannot delete the only variant.");return}const R=[...H];R[l]=dt(s,a,p);const j=p.variants;let O=ce;t===ce?O=Math.min(t,j.length-1):t<ce&&(O=ce-1),se(O),A([]),q(ge=>ge+1),Ye(R[l],a,O),Fe(R)},Ns=t=>{if(l===null||!y)return;const s=H[l],a=Re[l];if(!s||!a?.isMultivariate)return;const i=Xe(s,a);if(!i)return;const p=Ra(i,t),R=[...H];R[l]=dt(s,a,p);const j=t+1;se(j),A([]),q(O=>O+1),Ye(R[l],a,j),Fe(R)},Rs=(t,s)=>{if(l===null||!y||t===s)return;const a=H[l],i=Re[l];if(!a||!i?.isMultivariate)return;const p=Xe(a,i);if(!p)return;const R=ka(p,t,s),j=[...H];j[l]=dt(a,i,R);let O=ce;ce===t?O=s:t<ce&&s>=ce?O=ce-1:t>ce&&s<=ce&&(O=ce+1),se(O),Ye(j[l],i,O),Fe(j)},Mt=t=>{const s=t??l;if(s===null||!y)return;const a=H[s],i=Re[s];if(!a||!i)return;const p=ba(a,i);if(!p){fe.error("This section cannot have variants.");return}const R=[...H];R[s]=p.section;const j=bt(R,o)[s];if(!j?.isMultivariate){fe.error("Could not add variant.");return}C(s),se(p.newVariantIndex),A([]),q(O=>O+1),Ye(p.section,j,p.newVariantIndex,s),Fe(R)},Cs=()=>{if(l===null||!y)return;const t=H[l],s=Re[l];if(!t||!s?.isMultivariate)return;const a=Xe(t,s);if(!a)return;const i=wa(t,s,a);if(!i){fe.error("Could not remove variants.");return}const p=[...H];p[l]=i;const R=bt(p,o)[l];if(!R)return;se(0),W(null),V(null),A([]),q(O=>O+1);const j=et(i,R,o);j?(T(j.data),P(j.resolveType)):(T(null),P(null)),lt(null,l,0),Fe(p)},Ds=async t=>{if(X===null||!y)return;const s=bn(t,o);if(s){fe.error(s);return}const a=H[X],i=Re[X];if(!a||!i)return;const p=et(a,i,o);if(!p){fe.error("This section cannot be saved as global.");return}const R={...p.data,name:t};try{await Ve.mutateAsync({blockKey:t,data:R});const j=[...H];j[X]={__resolveType:t},await Ve.mutateAsync({blockKey:y,data:Ft(o,y,j,_e,Ae)}),l===X&&ct(),te(null),fe.success(`Saved global block "${t}"`),S?.()}catch(j){fe.error(j instanceof Error?j.message:"Failed to save global block")}},tn=Ze?.rule;if(ht&&l===null&&z===null&&tn){const{resolveType:t,formValue:s}=Lt(tn,o??{},m??void 0);ee(t),G(s)}const vt=m?pa(m):[],Ts=!ve&&!!(u&&m&&o),nn=z&&m?xt(z,m):null,Ps=()=>{ot.current&&(clearTimeout(ot.current),ot.current=null),it.current&&(clearTimeout(it.current),it.current=null)},sn=async(t,s)=>{if(!(Ba(s,t,m)>0))try{await Yt.mutateAsync({blockKey:t})}catch(a){fe.error(a instanceof Error?a.message:"Could not delete matcher block")}},an=t=>{ot.current&&clearTimeout(ot.current),ot.current=setTimeout(()=>{const{activePageKey:s,decofile:a,variantIndex:i}=qe.current;if(!s)return;const p={...a[s]},R={...p.sections},j=[...R.variants??[]],O=j[i],ge=O?.rule;if(Bt(ge,a,m)){const Y=ge?.__resolveType??"",me=a[Y],be=typeof me?.name=="string"?me.name:Y,{__resolveType:Me,...ye}=t;Ve.mutate({blockKey:Y,data:zt(Me??"",ye,be)},{onSuccess:()=>S?.(),onError:je=>fe.error(`Save failed: ${je.message}`)});return}O&&(j[i]={...O,rule:t}),p.sections={...R,variants:j},Ve.mutate({blockKey:s,data:p},{onSuccess:()=>S?.(),onError:Y=>fe.error(`Save failed: ${Y.message}`)})},It)},Vs=t=>{ee(t);const s=t?{__resolveType:t}:{__resolveType:jn};G({}),an(s)},As=t=>{const s=t;G(s);const a=z?{__resolveType:z,...s}:{...s};an(a)},rn=t=>{it.current&&clearTimeout(it.current);const{selectedSectionIndex:s,sectionVariantIndex:a}=qe.current;s!==null&&(it.current=setTimeout(()=>{const{rawSections:i,parsedSections:p,decofile:R,activePageKey:j,pageVariants:O,variantIndex:ge}=qe.current;if(!j)return;const Y=i[s],me=p[s];if(!Y||!me?.isMultivariate)return;const be=Xe(Y,me);if(!be)return;const Me=Oa(be,a,t),ye=[...i];ye[s]=dt(Y,me,Me);const je=Ft(R,j,ye,ge,O);Ve.mutate({blockKey:j,data:je},{onSuccess:()=>S?.(),onError:He=>fe.error(`Save failed: ${He.message}`)})},It))},Ms=t=>{W(t),V({}),rn(t?{__resolveType:t}:{__resolveType:jn})},Es=t=>{const s=t;V(s);const a=K?{__resolveType:K,...s}:{...s};rn(a)};if(!ve&&!Le)return n.jsxs("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:["No page found for ",h]});if(ve&&!Ct)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:"Global block not found"});const Je=l!==null?Re[l]??null:null,on=l!==null?H[l]:null,ln=on&&Je?.isMultivariate?Xe(on,Je):null,St=ln?gn(ln,tt):[],Et=Math.min(ce,Math.max(St.length-1,0)),$t=St[Et]??null,Ge=Je?.isMultivariate===!0,cn=l!==null&&Je!==null,ut=cn&&(Ge||!!(Vt&&le)),$s=ut&&!ve&&Je?.isSavedBlock===!0,Qe=ve||$s,Ks=ve?Qt:Je?.label??"",un=K&&m?xt(K,m):null,Kt=ut&&(!ve||Q.length>0)?ve?[Qt,...Q]:[Le.name,Je.label,...Ge&&$t?[$t.label]:[],...Q]:[],Os=I&&Le?[Le.name,"SEO",...Ke]:[],dn=I?Os:Qe?Kt.length>0?Kt:[Ks]:Kt,mn=()=>{if(!y)return;const t=o[y],s=ya(t.sections,H);if(!s)return;const a=ja(s);Ve.mutate({blockKey:y,data:{...t,sections:s}},{onSuccess:()=>{B(a),C(null),T(null),P(null),A([]),G(null),ee(null)},onError:i=>fe.error(`Save failed: ${i.message}`)})},fn=(t,s,a)=>{if(!y)return;const i=o[y],p=i.sections;if(!p||typeof p!="object"||Array.isArray(p))return;const R=p;if(!Array.isArray(R.variants))return;const j=t([...R.variants]);if(!j)return;const O=Ka(R,j),ge={...o,[y]:{...i,sections:O}};Ve.mutate({blockKey:y,data:ge[y]},{onSuccess:()=>{s?.(),a&&sn(a,ge)},onError:Y=>fe.error(`Save failed: ${Y.message}`)})},Ls=t=>{M(null),B(t),C(null),T(null),P(null),A([]);const s=Ae[t]?.rule,{resolveType:a,formValue:i}=Lt(s,o??{},m??void 0);ee(a),G(i),Gt(Ae.map(p=>({rule:p.rule})),t)},Bs=(t,s)=>{if(t===s)return;let a=_e;_e===t?a=s:t<_e&&s>=_e?a=_e-1:t>_e&&s<=_e&&(a=_e+1),B(a);const i=mt(Ae.map(p=>({rule:p.rule})),t,s);Gt(i,a),fn(p=>mt(p,t,s))},Fs=t=>{const s=Ae[t]?.rule,a=_a(s,o??{},m??void 0);fn(i=>i.length<=1?null:(i.splice(t,1),i),()=>{Ae.length-1===1?B(0):t<_e?B(_e-1):t===_e&&B(Math.max(0,t-1)),C(null),T(null),P(null),A([]),G(null),ee(null)},a)},zs=async(t,s)=>{Ps();const a=qe.current.activePageKey,i=qe.current.decofile;if(!a)return;const p=i[a],R=p.sections;if(!R||typeof R!="object"||Array.isArray(R))return;const j=R;if(!Array.isArray(j.variants))return;const O=[...j.variants],ge=O[t];if(!ge?.rule||typeof ge.rule!="object"){fe.error("This variant has no matcher rule to rename.");return}const Y=ge.rule,me=s.trim();Jt(!0);try{if(!me){if(!Bt(Y,i,m)){M(null);return}const Ot=Y.__resolveType??"";O[t]={...ge,rule:Aa(Y,i,m)};const hn={...i,[a]:{...p,sections:{...j,variants:O}}};await Ve.mutateAsync({blockKey:a,data:hn[a]}),await sn(Ot,hn),M(null),S?.();return}const be=Ma(Y,i,m);if(!be){fe.error("Could not read this variant's matcher rule.");return}if(be.blockKey){await Ve.mutateAsync({blockKey:be.blockKey,data:zt(be.resolveType,be.data,me)}),M(null),S?.();return}const Me=xn(me),ye=bn(Me,i);if(ye){fe.error(ye);return}const je=zt(be.resolveType,be.data,me);let He=null;try{await Ve.mutateAsync({blockKey:Me,data:je}),He=Me,O[t]={...ge,rule:Ea(Me)},await Ve.mutateAsync({blockKey:a,data:{...p,sections:{...j,variants:O}}}),He=null}catch(Ot){throw He&&await Yt.mutateAsync({blockKey:He}).catch(()=>{}),Ot}M(null),fe.success(`Saved matcher as global block "${me}"`),S?.()}catch(be){fe.error(be instanceof Error?be.message:"Failed to rename variant")}finally{Jt(!1)}},pn=()=>{ct()},Is=t=>{we(t),At({inner:t})},Hs=t=>{$e(t),At({raw:t})},Us=()=>{we(null),xe([])},Ws=()=>Pe(t=>t+1),qs=t=>{if(I){if(t===0){kt.flush(),$(!1),we(null),$e(void 0),xe([]),Pe(a=>a+1),D?.();return}if(t===1){xe([]),Pe(a=>a+1);return}xe(Ke.slice(0,t-1)),Pe(a=>a+1);return}if(ve){A(Q.slice(0,t)),q(a=>a+1);return}if(t===0){pn();return}if(t===1){A([]),q(a=>a+1);return}if(Ge&&t===2){A([]),q(a=>a+1);return}const s=Ge?2:1;A(Q.slice(0,t-s))};return n.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[n.jsx("div",{className:"shrink-0",children:Qe||ut||I?n.jsxs("div",{className:Ce("border-b px-3 py-2.5",Qe&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!ve&&ht&&Ze&&n.jsxs("button",{type:"button",onClick:pn,title:`Editing in variant: ${Ze.label}`,className:Ce("shrink-0 inline-flex items-center gap-1 rounded-md h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",Ir),children:[n.jsx(qt,{rule:jt(Ze.rule,o??{},m??void 0),matchers:vt}),n.jsx("span",{className:"max-w-[160px] truncate",children:Ze.label})]}),n.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:dn.map((t,s)=>{const a=s===dn.length-1;return n.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[s>0&&n.jsx(Vn,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>qs(s),title:t,className:Ce("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",a?Qe?"font-semibold text-global-section-fg dark:text-global-section-fg-dark":"font-medium text-foreground":Qe?"text-foreground/80":"text-muted-foreground",Qe?"hover:bg-global-section/15":"hover:bg-accent hover:text-accent-foreground"),children:t})]},`${t}-${s}`)})}),Qe&&n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx("span",{className:"shrink-0 cursor-help",children:n.jsx(qa,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),n.jsx(rt,{side:"bottom",className:"max-w-[260px]",children:"A global section is a reusable block shared across your site. Editing it here updates it everywhere it's used."})]}),cn&&!Ge&&!Je?.isHidden&&y&&n.jsx(Cn,{onClick:()=>Mt()})]}),Qe&&n.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:"This is a global section. Changes apply everywhere this section is used across your site."})]}):n.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(Ur,{pageKey:y,initialName:Le.name,initialPath:Le.path,onFieldChange:gs})}),n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":"Edit SEO",className:"size-7 shrink-0",onClick:()=>$(!0),children:n.jsx(Ua,{size:14})})}),n.jsx(rt,{side:"bottom",children:"Edit SEO"})]}),n.jsxs(st,{children:[n.jsx(at,{asChild:!0,children:n.jsx(Ue,{type:"button",variant:"ghost",size:"icon","aria-label":"View JSON",className:"size-7 shrink-0",onClick:()=>N&&y?N(y):ie(!0),children:n.jsx(Wa,{size:14})})}),n.jsx(rt,{side:"bottom",children:"View JSON"})]}),n.jsx(Cn,{onClick:mn})]})}),ht&&!ut&&!I&&y&&n.jsx(Fr,{listKey:y,variants:Ae,activeIndex:_e,decofile:o??{},meta:m,matchers:vt,onSelect:Ls,onReorder:Bs,onRename:M,onDelete:Fs,onAdd:mn}),I?n.jsx(yt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:n.jsx("div",{className:"mx-auto max-w-2xl",children:pt&&y?n.jsx(pr,{rawSeo:Tt,innerSeo:Xt,defaultResolveType:us,seoSchema:ds,activeResolveType:Pt,seoTypeOptions:cs,formResetKey:Oe,siteDefaultSeo:ms,onBreadcrumbChange:xe,onPersistRaw:Hs,onInnerChange:Is,onClearForm:Us,onBumpFormKey:Ws}):n.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"SEO schema not found for this site."})})})}):ut?n.jsxs(yt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[Ge&&St.length>0&&n.jsxs(n.Fragment,{children:[n.jsx(ha,{listKey:`${y??""}:${l??""}`,variants:St.map((t,s)=>({index:s,label:t.label})),selectedIndex:Et,onSelect:ks,onDuplicate:Ns,onDelete:ws,onRemoveAll:Cs,onReorder:Rs,onAdd:()=>Mt()}),Ge&&n.jsxs("div",{className:"px-3 py-3 border-b space-y-2",children:[n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variant rule"}),n.jsx(vn,{currentRt:K??"",currentLabel:tt($t?.rule),matchers:vt,onSelect:Ms}),un&&Ne&&n.jsx("div",{className:"pt-1",children:n.jsx(Nn,{schema:un,value:Ne,onChange:Es,meta:m??void 0,decofile:o,onSaveReferencedBlock:ft,sandbox:gt},`${l??"none"}:${Et}:${K??""}`)})]})]}),n.jsx(Rn,{activeSchema:Vt,formValue:le,formResetKey:oe,onFormChange:en,onBreadcrumbChange:A,breadcrumbPath:Q,emptyMessage:"No editable fields for this variant.",meta:m,decofile:o,onSaveReferencedBlock:ft,sandbox:gt})]}):ve?n.jsx(yt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx(Rn,{activeSchema:Vt,formValue:le,formResetKey:oe,onFormChange:en,onBreadcrumbChange:A,breadcrumbPath:Q,emptyMessage:"No editable fields for this global block.",meta:m,decofile:o,onSaveReferencedBlock:ft,sandbox:gt})}):n.jsxs(yt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[ht&&z!==null&&n.jsxs("div",{className:Ce("px-3 border-b",E?"pt-3 pb-5 space-y-3":"py-2"),children:[n.jsxs("button",{type:"button",onClick:()=>ne(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-sm py-0.5 hover:bg-muted/40","aria-expanded":E,children:[n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variant rule"}),E?n.jsx(Ia,{className:"size-3.5 shrink-0 text-muted-foreground"}):n.jsx(Fa,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),E&&n.jsxs("div",{className:Ce("space-y-3",wt&&"pointer-events-none opacity-50"),children:[n.jsx(vn,{currentRt:z,currentLabel:Sn(Ze?.rule,o??{},tt,m??void 0),matchers:vt,onSelect:Vs}),nn&&Se&&n.jsx("div",{className:"space-y-3",children:n.jsx(Nn,{schema:nn,value:Se,onChange:As,meta:m??void 0,decofile:o,onSaveReferencedBlock:ft,sandbox:gt},`${_e}:${z??""}`)})]})]}),n.jsx("div",{className:"p-2 pt-3",children:n.jsx(Pr,{listKey:`${y??""}-${_e}`,rawSections:H,sections:Re,meta:m,selectedIndex:l,onSelect:hs,onReorder:vs,onDelete:Ss,onDuplicate:xs,onMakeReusable:te,onToggleHidden:bs,onToggleLazy:ys,onAddVariant:Mt,onDetach:js,onAddSection:()=>he(!0),canAddSection:Ts})})]}),n.jsx(ga,{open:X!==null,onOpenChange:t=>{t||te(null)},defaultBlockId:X!==null?xn(Re[X]?.label??""):"",isPending:Ve.isPending,onSubmit:Ds}),u&&n.jsx(Sr,{open:pe,onOpenChange:he,meta:m,decofile:o,previewBaseUrl:u,onSelect:_s}),de&&y&&o&&n.jsx(va,{open:de,onOpenChange:ie,pageKey:y,decofile:o}),F!==null&&n.jsx(Ar,{open:!0,initialName:Bt(Ae[F]?.rule,o??{},m??void 0)?Sn(Ae[F]?.rule,o??{},tt,m??void 0):"",autoLabel:tt(jt(Ae[F]?.rule,o??{},m??void 0)),isPending:wt,onSubmit:async t=>{await zs(F,t)},onOpenChange:t=>{!t&&!wt&&M(null)}})]})}export{wl as SectionsEditor};
@@ -0,0 +1 @@
1
+ import{r as c,ai as nt,a2 as Pe,j as d,a3 as rt,aj as be,Z as k,T as st,U as j,V as _,bP as $,a1 as lt,aP as Ne,W as Ee,ah as at,bK as it,bR as ct,dz as dt,dC as ut,dA as pt,dD as ft,_ as mt,X as ht,dB as vt,$ as gt,a0 as xt,c as ee,l as oe}from"./index-BMCJlhk3.js";import{V as St}from"./tooltip-DjHKSu56.js";import{i as wt,n as Ct}from"./ChevronUp-DZQVuDwV.js";import{t as Re}from"./ChevronDown-CW3qqv2x.js";function _e(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=at(J),[ne]=ht(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,_t]=ne(J),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=r,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[U,M]=c.useState(!1),re=nt(u),[N,O]=Pe({prop:o,defaultProp:n??!1,onChange:i,caller:J}),[F,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:be(),value:F,onValueChange:q,open:N,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:F,onChange:E=>q(E.target.value),disabled:b,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:_(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:_(n.onPointerDown,p=>{h.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:_(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:i,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var Nt="SelectIcon",ke=c.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Nt;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=c.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const i=o;return i?Ne.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),i):null}return d.jsx(He,{...r,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=vt("SelectContent.RemoveScroll"),He=c.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=r,m=G(Q,t),[x,U]=c.useState(null),[M,re]=c.useState(null),N=k(e,f=>U(f)),[O,F]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=c.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.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]),c.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]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(F(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:_(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:_(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 y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,N=>h(N)),b=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const N=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,P=F.left-I,X=N.left-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-F.right-I,X=window.innerWidth-N.right-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),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=N.top+N.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+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(()=>w.current=!0)}},[b,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[U,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(N=>{N&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:U},children:d.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...i}=r,s=pe(t);return d.jsx(gt,{...s,...i,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...i.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=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Ue=c.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.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}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:_(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>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 m=C+w,x=Math.min(S,m),U=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:i,...s}=r,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),v=c.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 d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:_(s.onFocus,()=>w(!0)),onBlur:_(s.onBlur,()=>w(!1)),onClick:_(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:_(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:_(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:_(s.onPointerMove,m=>{v.current=m.pointerType,n?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:_(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...i}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=_t(le,t),[h,g]=c.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ne.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=c.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:_(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:_(n.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:_(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ut=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Ft="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=c.useRef(null),i=k(o,n),s=it(e);return c.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ft;function et(r){return r===""||r===void 0}function tt(r){const e=ct(r),t=c.useRef(""),o=c.useRef(0),n=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,i]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?r.indexOf(t):-1;let s=Wt(r,Math.max(i,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Ue,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;function co(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(13);let t,o,n,i;e[0]!==r?({className:o,size:i,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?"default":i;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 dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-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-8 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-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 a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(r){const e=ee.c(25);let t,o,n,i,s;e[0]!==r?({className:o,children:t,position:i,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i,e[5]=s):(t=e[1],o=e[2],n=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,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 h;e[6]!==o||e[7]!==u?(h=oe("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-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function mo(r){const e=ee.c(16);let t,o,n,i;e[0]!==r?({className:o,children:t,hideCheck:i,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=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",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,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 i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Ct,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,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 i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{fo as S,mo as a,po as b,uo as c,co as d,_e as e};
@@ -1 +1 @@
1
- import{c as D,j as o,l as R,r as $,B as H}from"./index-Dkp6RqD3.js";import{i as Q,a as W,c as J,d as K}from"./dialog-Ct9Sh61W.js";import{g as V,b as Y,a as Z,D as ee}from"./drawer-B8pyFQTR.js";import{u as oe}from"./tooltip-CzRpmZhx.js";import{b as A}from"./chat-context-CENfKYyS.js";import{D as te,b as le,S as U,M as se}from"./decopilot-PLBAL9Bq.js";import{a as G,b as z}from"./connect-desktop-dialog-gl5ykPHO.js";const ie=[{tier:"fast",description:"Quicker responses"},{tier:"smart",description:"Balanced quality"},{tier:"thinking",description:"Deeper reasoning"}];function X(r){const e=D.c(10),{modelSet:t,selectedModelId:s,onSelect:i}=r;let l,c;if(e[0]!==t.logo||e[1]!==t.models||e[2]!==t.tiers||e[3]!==i||e[4]!==s){const a=Object.fromEntries(t.models.map(ne));l="flex flex-col p-2 w-[320px]",c=ie.map(d=>{const{tier:p,description:m}=d,u=t.tiers[p];if(!u.modelId)return null;const x=a[u.modelId];if(!x)return null;const f=s===u.modelId;return o.jsxs("button",{type:"button",onClick:()=>i(x),className:R("flex items-center gap-3 px-3 py-2.5 rounded-lg text-left hover:bg-accent",f&&"bg-accent/50"),children:[o.jsx("img",{src:t.logo,alt:u.label,className:"size-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),o.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[o.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:u.label}),o.jsx("span",{className:"text-xs text-muted-foreground leading-tight",children:m})]})]},p)}),e[0]=t.logo,e[1]=t.models,e[2]=t.tiers,e[3]=i,e[4]=s,e[5]=l,e[6]=c}else l=e[5],c=e[6];let n;return e[7]!==l||e[8]!==c?(n=o.jsx("div",{className:l,children:c}),e[7]=l,e[8]=c,e[9]=n):n=e[9],n}function ne(r){return[r.modelId,r]}const de=[{providerId:"claude-code",modelId:"claude-code:haiku",title:"Claude Code Haiku",description:"Fast and lightweight",capabilities:["text"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:sonnet",title:"Claude Code Sonnet 5",description:"Balanced performance",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus",title:"Claude Code Opus",description:"Most capable",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus-1m",title:"Claude Code Opus 4.8 1M",description:"Most capable, 1M context window",capabilities:["text","reasoning"],limits:{contextWindow:1e6,maxOutputTokens:null},costs:null}],L="https://assets.decocache.com/decocms/6ac44f1c-c0cf-4480-84b5-2ae6fe742d0b/codex-app.png.png",ce=[{providerId:"codex",modelId:"codex:gpt-5.5",title:"GPT-5.5",description:"Frontier model for complex coding, research, and real-world work",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.4",title:"GPT-5.4",description:"Strong model for everyday coding",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.4-mini",title:"GPT-5.4 Mini",description:"Small, fast, and cost-efficient model for simpler coding tasks",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.3-codex-spark",title:"GPT-5.3 Codex Spark",description:"Ultra-fast coding model",capabilities:["text","reasoning"],logo:L,limits:null,costs:null}],re="https://decoims.com/decocms/93e4059c-e598-412b-87eb-54d72a946ec8/claude-stroke-rounded.svg",ae="https://decoims.com/decocms/9170ffd4-b9cc-4661-ad8f-ae2eea019e00/codex.svg",me={fast:{modelId:"claude-code:haiku",label:"Haiku 4.5",description:"Quicker responses",iconNode:o.jsx(G,{size:16})},smart:{modelId:"claude-code:sonnet",label:"Sonnet 5",description:"Balanced quality",iconNode:o.jsx(G,{size:16})},thinking:{modelId:"claude-code:opus-1m",label:"Opus 4.8 1M",description:"Deeper reasoning",iconNode:o.jsx(G,{size:16})}},pe={fast:{modelId:"codex:gpt-5.4-mini",label:"GPT-5.4 Mini",description:"Quicker responses",iconNode:o.jsx(z,{size:16})},smart:{modelId:"codex:gpt-5.4",label:"GPT-5.4",description:"Balanced quality",iconNode:o.jsx(z,{size:16})},thinking:{modelId:"codex:gpt-5.5",label:"GPT-5.5",description:"Deeper reasoning",iconNode:o.jsx(z,{size:16})}};function q(r){return r==="claude-code"?{logo:re,tiers:me,models:de}:r==="codex"?{logo:ae,tiers:pe,models:ce}:null}function ue(r){const e=D.c(11),{onClose:t,agent:s}=r,i=A(),l=s??i.pendingHarnessId??"decopilot";let c;e[0]!==l?(c=q(l),e[0]=l,e[1]=c):c=e[1];const n=c;if(!n){let m;return e[2]!==t?(m=o.jsx(le,{onClose:t}),e[2]=t,e[3]=m):m=e[3],m}const a=i.selectedModel?.modelId??n.tiers[i.simpleModeTier].modelId;let d;e[4]!==t||e[5]!==i?(d=m=>{i.setModel({...m,keyId:void 0}),t()},e[4]=t,e[5]=i,e[6]=d):d=e[6];let p;return e[7]!==n||e[8]!==a||e[9]!==d?(p=o.jsx(X,{modelSet:n,selectedModelId:a,onSelect:d}),e[7]=n,e[8]=a,e[9]=d,e[10]=p):p=e[10],p}function fe(r){const e=D.c(13);let t,s;e[0]!==r?({agent:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=t?q(t):null,e[3]=t,e[4]=i):i=e[4];const l=i;if(!l){let d;return e[5]!==s?(d=o.jsx(te,{...s}),e[5]=s,e[6]=d):d=e[6],d}const c=s.selectedModel?.modelId??l.tiers.smart.modelId;let n;e[7]!==s?(n=d=>{s.onModelChange(d),s.onClose()},e[7]=s,e[8]=n):n=e[8];let a;return e[9]!==l||e[10]!==c||e[11]!==n?(a=o.jsx(X,{modelSet:l,selectedModelId:c,onSelect:n}),e[9]=l,e[10]=c,e[11]=n,e[12]=a):a=e[12],a}function ve(r){const e=D.c(39),{variant:t,className:s,placeholder:i,model:l,isLoading:c,credentialId:n,onCredentialChange:a,onModelChange:d,filterModels:p,agent:m}=r,u=t===void 0?"borderless":t,x=i===void 0?"Select model":i,[f,k]=$.useState(!1),g=d!==void 0,F=oe(),B=u==="borderless"?"ghost":"outline",P=u==="borderless"&&"md:border-none";let h;e[0]!==s||e[1]!==P?(h=R("text-sm hover:bg-accent rounded-lg 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",P,s),e[0]=s,e[1]=P,e[2]=h):h=e[2];let b;e[3]!==c||e[4]!==l||e[5]!==x||e[6]!==g?(b=g?o.jsx(U,{model:l??null,placeholder:x,isLoading:c}):o.jsx(ge,{placeholder:x}),e[3]=c,e[4]=l,e[5]=x,e[6]=g,e[7]=b):b=e[7];let O;e[8]!==B||e[9]!==h||e[10]!==b?(O=o.jsx(H,{variant:B,size:"sm",className:h,children:b}),e[8]=B,e[9]=h,e[10]=b,e[11]=O):O=e[11];const C=O;let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(se,{}),e[12]=w):w=e[12];let y;e[13]!==m||e[14]!==n||e[15]!==p||e[16]!==l||e[17]!==a||e[18]!==d||e[19]!==g?(y=o.jsx($.Suspense,{fallback:w,children:g?o.jsx(fe,{onClose:()=>k(!1),agent:m,credentialId:n??null,onCredentialChange:a??xe,selectedModel:l??null,onModelChange:d,filterModels:p}):o.jsx(ue,{onClose:()=>k(!1),agent:m})}),e[13]=m,e[14]=n,e[15]=p,e[16]=l,e[17]=a,e[18]=d,e[19]=g,e[20]=y):y=e[20];const I=y;if(F){let M;e[21]!==C?(M=o.jsx(V,{asChild:!0,children:C}),e[21]=C,e[22]=M):M=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(Y,{className:"sr-only",children:"Select model"}),e[23]=_):_=e[23];let v;e[24]!==I?(v=o.jsxs(Z,{className:"p-0 flex flex-col max-h-[95vh]",children:[_,o.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:I})]}),e[24]=I,e[25]=v):v=e[25];let T;return e[26]!==f||e[27]!==M||e[28]!==v?(T=o.jsxs(ee,{open:f,onOpenChange:k,children:[M,v]}),e[26]=f,e[27]=M,e[28]=v,e[29]=T):T=e[29],T}let S;e[30]!==C?(S=o.jsx(Q,{asChild:!0,children:C}),e[30]=C,e[31]=S):S=e[31];let N;e[32]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx(W,{className:"sr-only",children:"Select model"}),e[32]=N):N=e[32];let j;e[33]!==I?(j=o.jsxs(J,{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:[N,I]}),e[33]=I,e[34]=j):j=e[34];let E;return e[35]!==f||e[36]!==S||e[37]!==j?(E=o.jsxs(K,{open:f,onOpenChange:k,children:[S,j]}),e[35]=f,e[36]=S,e[37]=j,e[38]=E):E=e[38],E}function xe(){}function ge(r){const e=D.c(4),{placeholder:t}=r,{selectedModel:s,isModelsLoading:i}=A();let l;return e[0]!==i||e[1]!==s||e[2]!==t?(l=o.jsx(U,{model:s,placeholder:t,isLoading:i}),e[0]=i,e[1]=s,e[2]=t,e[3]=l):l=e[3],l}export{ve as M};
1
+ import{c as D,j as o,l as R,r as $,B as H}from"./index-BMCJlhk3.js";import{i as Q,a as W,c as J,d as K}from"./dialog-fVpV_18N.js";import{g as V,b as Y,a as Z,D as ee}from"./drawer-iojIyQ7Z.js";import{u as oe}from"./tooltip-DjHKSu56.js";import{b as A}from"./chat-context-DANWEvls.js";import{D as te,b as le,S as U,M as se}from"./decopilot-CmY0uQsK.js";import{a as G,b as z}from"./connect-desktop-dialog-BeQBPgXI.js";const ie=[{tier:"fast",description:"Quicker responses"},{tier:"smart",description:"Balanced quality"},{tier:"thinking",description:"Deeper reasoning"}];function X(r){const e=D.c(10),{modelSet:t,selectedModelId:s,onSelect:i}=r;let l,c;if(e[0]!==t.logo||e[1]!==t.models||e[2]!==t.tiers||e[3]!==i||e[4]!==s){const a=Object.fromEntries(t.models.map(ne));l="flex flex-col p-2 w-[320px]",c=ie.map(d=>{const{tier:p,description:m}=d,u=t.tiers[p];if(!u.modelId)return null;const x=a[u.modelId];if(!x)return null;const f=s===u.modelId;return o.jsxs("button",{type:"button",onClick:()=>i(x),className:R("flex items-center gap-3 px-3 py-2.5 rounded-lg text-left hover:bg-accent",f&&"bg-accent/50"),children:[o.jsx("img",{src:t.logo,alt:u.label,className:"size-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),o.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[o.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:u.label}),o.jsx("span",{className:"text-xs text-muted-foreground leading-tight",children:m})]})]},p)}),e[0]=t.logo,e[1]=t.models,e[2]=t.tiers,e[3]=i,e[4]=s,e[5]=l,e[6]=c}else l=e[5],c=e[6];let n;return e[7]!==l||e[8]!==c?(n=o.jsx("div",{className:l,children:c}),e[7]=l,e[8]=c,e[9]=n):n=e[9],n}function ne(r){return[r.modelId,r]}const de=[{providerId:"claude-code",modelId:"claude-code:haiku",title:"Claude Code Haiku",description:"Fast and lightweight",capabilities:["text"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:sonnet",title:"Claude Code Sonnet 5",description:"Balanced performance",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus",title:"Claude Code Opus",description:"Most capable",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus-1m",title:"Claude Code Opus 4.8 1M",description:"Most capable, 1M context window",capabilities:["text","reasoning"],limits:{contextWindow:1e6,maxOutputTokens:null},costs:null}],L="https://assets.decocache.com/decocms/6ac44f1c-c0cf-4480-84b5-2ae6fe742d0b/codex-app.png.png",ce=[{providerId:"codex",modelId:"codex:gpt-5.5",title:"GPT-5.5",description:"Frontier model for complex coding, research, and real-world work",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.4",title:"GPT-5.4",description:"Strong model for everyday coding",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.4-mini",title:"GPT-5.4 Mini",description:"Small, fast, and cost-efficient model for simpler coding tasks",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.3-codex-spark",title:"GPT-5.3 Codex Spark",description:"Ultra-fast coding model",capabilities:["text","reasoning"],logo:L,limits:null,costs:null}],re="https://decoims.com/decocms/93e4059c-e598-412b-87eb-54d72a946ec8/claude-stroke-rounded.svg",ae="https://decoims.com/decocms/9170ffd4-b9cc-4661-ad8f-ae2eea019e00/codex.svg",me={fast:{modelId:"claude-code:haiku",label:"Haiku 4.5",description:"Quicker responses",iconNode:o.jsx(G,{size:16})},smart:{modelId:"claude-code:sonnet",label:"Sonnet 5",description:"Balanced quality",iconNode:o.jsx(G,{size:16})},thinking:{modelId:"claude-code:opus-1m",label:"Opus 4.8 1M",description:"Deeper reasoning",iconNode:o.jsx(G,{size:16})}},pe={fast:{modelId:"codex:gpt-5.4-mini",label:"GPT-5.4 Mini",description:"Quicker responses",iconNode:o.jsx(z,{size:16})},smart:{modelId:"codex:gpt-5.4",label:"GPT-5.4",description:"Balanced quality",iconNode:o.jsx(z,{size:16})},thinking:{modelId:"codex:gpt-5.5",label:"GPT-5.5",description:"Deeper reasoning",iconNode:o.jsx(z,{size:16})}};function q(r){return r==="claude-code"?{logo:re,tiers:me,models:de}:r==="codex"?{logo:ae,tiers:pe,models:ce}:null}function ue(r){const e=D.c(11),{onClose:t,agent:s}=r,i=A(),l=s??i.pendingHarnessId??"decopilot";let c;e[0]!==l?(c=q(l),e[0]=l,e[1]=c):c=e[1];const n=c;if(!n){let m;return e[2]!==t?(m=o.jsx(le,{onClose:t}),e[2]=t,e[3]=m):m=e[3],m}const a=i.selectedModel?.modelId??n.tiers[i.simpleModeTier].modelId;let d;e[4]!==t||e[5]!==i?(d=m=>{i.setModel({...m,keyId:void 0}),t()},e[4]=t,e[5]=i,e[6]=d):d=e[6];let p;return e[7]!==n||e[8]!==a||e[9]!==d?(p=o.jsx(X,{modelSet:n,selectedModelId:a,onSelect:d}),e[7]=n,e[8]=a,e[9]=d,e[10]=p):p=e[10],p}function fe(r){const e=D.c(13);let t,s;e[0]!==r?({agent:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=t?q(t):null,e[3]=t,e[4]=i):i=e[4];const l=i;if(!l){let d;return e[5]!==s?(d=o.jsx(te,{...s}),e[5]=s,e[6]=d):d=e[6],d}const c=s.selectedModel?.modelId??l.tiers.smart.modelId;let n;e[7]!==s?(n=d=>{s.onModelChange(d),s.onClose()},e[7]=s,e[8]=n):n=e[8];let a;return e[9]!==l||e[10]!==c||e[11]!==n?(a=o.jsx(X,{modelSet:l,selectedModelId:c,onSelect:n}),e[9]=l,e[10]=c,e[11]=n,e[12]=a):a=e[12],a}function ve(r){const e=D.c(39),{variant:t,className:s,placeholder:i,model:l,isLoading:c,credentialId:n,onCredentialChange:a,onModelChange:d,filterModels:p,agent:m}=r,u=t===void 0?"borderless":t,x=i===void 0?"Select model":i,[f,k]=$.useState(!1),g=d!==void 0,F=oe(),B=u==="borderless"?"ghost":"outline",P=u==="borderless"&&"md:border-none";let h;e[0]!==s||e[1]!==P?(h=R("text-sm hover:bg-accent rounded-lg 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",P,s),e[0]=s,e[1]=P,e[2]=h):h=e[2];let b;e[3]!==c||e[4]!==l||e[5]!==x||e[6]!==g?(b=g?o.jsx(U,{model:l??null,placeholder:x,isLoading:c}):o.jsx(ge,{placeholder:x}),e[3]=c,e[4]=l,e[5]=x,e[6]=g,e[7]=b):b=e[7];let O;e[8]!==B||e[9]!==h||e[10]!==b?(O=o.jsx(H,{variant:B,size:"sm",className:h,children:b}),e[8]=B,e[9]=h,e[10]=b,e[11]=O):O=e[11];const C=O;let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(se,{}),e[12]=w):w=e[12];let y;e[13]!==m||e[14]!==n||e[15]!==p||e[16]!==l||e[17]!==a||e[18]!==d||e[19]!==g?(y=o.jsx($.Suspense,{fallback:w,children:g?o.jsx(fe,{onClose:()=>k(!1),agent:m,credentialId:n??null,onCredentialChange:a??xe,selectedModel:l??null,onModelChange:d,filterModels:p}):o.jsx(ue,{onClose:()=>k(!1),agent:m})}),e[13]=m,e[14]=n,e[15]=p,e[16]=l,e[17]=a,e[18]=d,e[19]=g,e[20]=y):y=e[20];const I=y;if(F){let M;e[21]!==C?(M=o.jsx(V,{asChild:!0,children:C}),e[21]=C,e[22]=M):M=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(Y,{className:"sr-only",children:"Select model"}),e[23]=_):_=e[23];let v;e[24]!==I?(v=o.jsxs(Z,{className:"p-0 flex flex-col max-h-[95vh]",children:[_,o.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:I})]}),e[24]=I,e[25]=v):v=e[25];let T;return e[26]!==f||e[27]!==M||e[28]!==v?(T=o.jsxs(ee,{open:f,onOpenChange:k,children:[M,v]}),e[26]=f,e[27]=M,e[28]=v,e[29]=T):T=e[29],T}let S;e[30]!==C?(S=o.jsx(Q,{asChild:!0,children:C}),e[30]=C,e[31]=S):S=e[31];let N;e[32]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx(W,{className:"sr-only",children:"Select model"}),e[32]=N):N=e[32];let j;e[33]!==I?(j=o.jsxs(J,{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:[N,I]}),e[33]=I,e[34]=j):j=e[34];let E;return e[35]!==f||e[36]!==S||e[37]!==j?(E=o.jsxs(K,{open:f,onOpenChange:k,children:[S,j]}),e[35]=f,e[36]=S,e[37]=j,e[38]=E):E=e[38],E}function xe(){}function ge(r){const e=D.c(4),{placeholder:t}=r,{selectedModel:s,isModelsLoading:i}=A();let l;return e[0]!==i||e[1]!==s||e[2]!==t?(l=o.jsx(U,{model:s,placeholder:t,isLoading:i}),e[0]=i,e[1]=s,e[2]=t,e[3]=l):l=e[3],l}export{ve as M};
@@ -1 +1 @@
1
- import{c as T,j as t,r as Q,B as je,i as Se}from"./index-Dkp6RqD3.js";import{i as be}from"./ChevronRight-D9P32BBy.js";import{L as fe}from"./agent-icon-wRGiBGf6.js";import{S as ue}from"./scroll-area-BHrT2J7C.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Te,f as Fe,P as Re,S as Ee}from"./page-seo-form-BNPweRSb.js";import{s as xe,p as ze}from"./index-DanuldhX.js";import{a as ge}from"./Tool01-CipS5lSx.js";import"./AlertCircle-CCRyLxqn.js";import"./SwitchHorizontal01-DU-rOve7.js";import"./Settings02-BlEkNOUc.js";import"./XCircle-BQx0XY9Q.js";import"./ArrowUpRight-CZdyxiuo.js";import"./ZapSquare-B2VaDn9C.js";import"./Users03-A-5AuVqo.js";import"./CheckCircle-Dv08cgQI.js";import"./ChevronUp-DJ9byfoG.js";import"./ChevronDown-B8Ze3SYy.js";import"./ChevronLeft-DUWeOqhA.js";import"./DotsVertical-D2SirpGI.js";import"./Stars02-DWfAn5KA.js";import"./Eye-DTO_EuVX.js";import"./ZoomOut-TWRir7O_.js";import"./Globe01-BniE6XPk.js";import"./FilterLines-CL_OhKpi.js";import"./Star01-DbITzNmn.js";import"./Globe04-rkXVwKmf.js";import"./HardDrive-ByBOOup9.js";import"./Key01-zFZC1WAX.js";import"./LayoutLeft-D5d7RmP6.js";import"./LinkExternal01-CP7jbGXu.js";import"./Monitor01-DxsKFguo.js";import"./Sun-DiKahN05.js";import"./Palette-CjeH0inq.js";import"./Play-Cep78SQb.js";import"./Plus-C4U-szNE.js";import"./SearchMd-OdRwUL2k.js";import"./Shield01-DOSUyIxl.js";import"./Stars01-Dr9U80EV.js";import"./Trash01-BrRwrXAB.js";import"./Upload01-BxpFKuaq.js";import"./User01-B6F5rEOA.js";import"./Users01-BivOfLQy.js";import"./XClose-WdAmE5lU.js";import"./X-CqD7ABN6.js";import"./Zap-BvmHlbv3.js";import"./use-clock-tick-DsSqS81D.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DtfDfo2q.js";import"./tooltip-CzRpmZhx.js";import"./file-type-icon-CTBSw6sq.js";import"./dialog-Ct9Sh61W.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-DX3qR_vf.js";import"./use-mcp-client-Bm11_FDz.js";import"./auth-wHQwRyAB.js";import"./chat-context-CENfKYyS.js";import"./hooks-DuOTkhEE.js";import"./decopilot-sse-pool-DH5axPTT.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-_6RLlLu8.js";import"./use-collections-C5b3ewLr.js";import"./use-ai-providers-4KbjeefU.js";import"./studio-tools-MS8HaZF2.js";import"./use-organization-settings-CJH98oG3.js";import"./shell-layout-7-n1xJEu.js";import"./avatar-Cpl5pI_5.js";import"./required-auth-layout-DmBOLZeo.js";import"./use-org-sso-H2PY9wlj.js";import"./sheet-CEq4Xlbn.js";import"./integration-icon-D9oWYfKx.js";import"./use-navigate-to-agent-BEYb84d9.js";import"./use-connection-DLEZ-D_W.js";import"./use-mcp-prompts-WFwJaoYE.js";import"./form-Dekx7Gh5.js";import"./label-1M2rTZlP.js";import"./input-CsyAUKnP.js";import"./select-DzV4je4u.js";import"./switch-Bth8Y0YO.js";import"./index-CwE8muJw.js";import"./drawer-B8pyFQTR.js";import"./collection-search-BJ2ZQG6w.js";import"./tabs-CeIDAumq.js";import"./toggle-group-DHk_x33v.js";import"./sortable.esm-Cf5PF7FH.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-1NZAJf0V.js";import"./use-registry-connections-DqQ5CuRm.js";import"./useInfiniteQuery-DNOo0u-A.js";import"./use-infinite-scroll-xtXJm3Fz.js";import"./extract-connection-data-CFceWaqQ.js";import"./card-CwMoWTAG.js";import"./collection-tabs-DDDjKeiO.js";import"./badge-CD-j7H-v.js";import"./textarea-Bq2hlJph.js";import"./connection-form-helpers-aQhcKdbG.js";import"./authenticate-and-persist-oauth-kprypUvn.js";import"./mcp-oauth-Cx4tvlLz.js";import"./useSuspenseInfiniteQuery-Q2iTOn0D.js";import"./connect-desktop-dialog-gl5ykPHO.js";import"./decopilot-PLBAL9Bq.js";import"./checkbox-Cu87QWwv.js";import"./skeleton-CgQbL2vU.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DyUWovP_.js";import"./popover-Bw_fDzEl.js";import"./command-CXW0RFsE.js";import"./index-Bnt59m8n.js";import"./dropdown-menu-CiOcehBy.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DiXAjIsI.js";import"./empty-state-CiOLlp0X.js";import"./toolbar-B94AmW8_.js";import"./preview-dialog-WTikx3cM.js";import"./index-DX5h5zwb.js";import"./use-mcp-tools-D7R2Xxtm.js";import"./use-capability-Bs4ib41V.js";import"./shell-route-loading-C7NR5YfE.js";import"./index-DeO49O5i.js";import"./alert-dialog-CiPRtRLO.js";import"./use-debounced-autosave-wR3AcpvU.js";import"./index-CZw9wi-O.js";import"./sidebar-BlJZ8VS1.js";import"./search-input-7UwNN2zY.js";import"./github-repo-picker-C1lcpkZh.js";import"./use-secrets-B_gctlgv.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-CEI4Ou6L.js";import"./automation-runs-CzyRkiOB.js";import"./table-DcM9ru_z.js";import"./use-members-HDhepqlk.js";import"./use-org-auth-client-BsY7gUqd.js";import"./task-status-Bx2wtdSw.js";import"./use-automations-CZSEg567.js";import"./use-file-configs-D-EkQoPh.js";import"./monaco-editor-BWcAGRm_.js";import"./select-model-Biymi3UB.js";import"./automation-list-row-tvLjdTyd.js";function U(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=U(n.title),i=U(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(n.description),image:U(n.image),favicon:U(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,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 o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==u||e[24]!==y||e[25]!==g?(S=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=S):S=e[26],S}function De(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const S=i.description??ee;let _;e[17]!==y||e[18]!==S?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:S}),e[17]=y,e[18]=S,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let b;e[24]!==i.image?(b=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=b):b=e[25];let k;e[26]!==N||e[27]!==b||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,b]}),e[26]=N,e[27]=b,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function ki(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,S]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),S(Me));const{persistSeo:b,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!K||Ce(B))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==b||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),b(de)},e[8]=b,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==S?(H=()=>S(Ke),e[14]=S,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(be,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==b||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==R?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),b(E)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Ee,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=b,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=R,e[59]=A):A=e[59];let J;return e[60]!==I||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=J):J=e[62],J}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{ki as SeoEditor};
1
+ import{c as T,j as t,r as Q,B as je,i as Se}from"./index-BMCJlhk3.js";import{i as be}from"./ChevronRight-B0GGkNIH.js";import{L as fe}from"./agent-icon-o19yp48z.js";import{S as ue}from"./scroll-area-BliS1K3p.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Te,f as Fe,P as Re,S as Ee}from"./page-seo-form-DeK8_ys8.js";import{s as xe,p as ze}from"./index-B7xwJlcR.js";import{a as ge}from"./Tool01-B21_bo9F.js";import"./AlertCircle-DM0HzopE.js";import"./SwitchHorizontal01-Y2S_GG49.js";import"./Settings02-B_oiQbnJ.js";import"./XCircle-CSFP3d9h.js";import"./ArrowUpRight-CoxAwUHc.js";import"./ZapSquare-Dnw5HzjO.js";import"./Users03-ClYFKrw1.js";import"./CheckCircle-D5UuMIIH.js";import"./ChevronUp-DZQVuDwV.js";import"./ChevronDown-CW3qqv2x.js";import"./ChevronLeft-LzGuMB2U.js";import"./DotsVertical-CGmC-AuM.js";import"./Stars02-D5rVREl5.js";import"./Eye-DRB5PFSd.js";import"./ZoomOut-Cz0dpIX0.js";import"./Globe01-J_5kAZ2G.js";import"./FilterLines-uyaFw99Z.js";import"./Star01-K5E2EVFR.js";import"./Globe04-DzVxOgG6.js";import"./HardDrive-BD491-6A.js";import"./Key01-DpArIwgm.js";import"./LayoutLeft-i76gAzb8.js";import"./LinkExternal01-BGVgwGxd.js";import"./Monitor01-C4cglHcn.js";import"./Sun-0LQy_BRh.js";import"./Palette-NYPFTebi.js";import"./Play-CIhVolnk.js";import"./Plus-DEhikgBr.js";import"./SearchMd-1YEF5GNC.js";import"./Shield01-BrCb9Fbq.js";import"./Stars01-D-F-KCAY.js";import"./Trash01-D4qJL0O5.js";import"./Upload01-B89V4QHh.js";import"./User01-676cwM-d.js";import"./Users01-Wg2zRTbW.js";import"./XClose-DBh1WmP1.js";import"./X-B9D2h3Td.js";import"./Zap-BRPDiIJ_.js";import"./use-clock-tick-BW4BJ8Tt.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-60B0ujzD.js";import"./tooltip-DjHKSu56.js";import"./file-type-icon-BSAfTQY6.js";import"./dialog-fVpV_18N.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-CNWQoCyo.js";import"./use-mcp-client--_ZSmyGd.js";import"./auth-BdbahkUc.js";import"./chat-context-DANWEvls.js";import"./hooks-C3qiFxIG.js";import"./decopilot-sse-pool-CXkkAKQx.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-BZlyJ3on.js";import"./use-collections-CsNhZa6R.js";import"./use-ai-providers-BxzRSeJ0.js";import"./studio-tools-BdR8-wJW.js";import"./use-organization-settings-DQ5ROkEQ.js";import"./shell-layout-CWAvk5Go.js";import"./avatar-3AHqY5tt.js";import"./required-auth-layout-hwOac595.js";import"./use-org-sso-CgbvxseW.js";import"./sheet-ZPG9h0Fj.js";import"./integration-icon-D5R24LMd.js";import"./use-navigate-to-agent-C2eJezkw.js";import"./use-connection-_slG13py.js";import"./use-mcp-prompts-Bi0YM-MV.js";import"./form-dD3QczZa.js";import"./label-DbgfgBJH.js";import"./input-Bk-XA8aE.js";import"./select-8EVXQGwX.js";import"./switch-DLwkt3ng.js";import"./index-Ci5DmEN0.js";import"./drawer-iojIyQ7Z.js";import"./collection-search-CQMKW4Jp.js";import"./tabs-C3tau4Eq.js";import"./toggle-group-Ckfjs-c4.js";import"./sortable.esm-B3t9DDZ6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CHIFmA8R.js";import"./use-registry-connections-Ba1xQHz9.js";import"./useInfiniteQuery-DDGqv00b.js";import"./use-infinite-scroll-B7KmD1ay.js";import"./extract-connection-data-CrjpOcI0.js";import"./card-DPMEGAqZ.js";import"./collection-tabs-jlQTSy-i.js";import"./badge-DAumNibn.js";import"./textarea-CJuB4hQ7.js";import"./connection-form-helpers-CWhKbOwZ.js";import"./authenticate-and-persist-oauth-BMdVL1CA.js";import"./mcp-oauth-Ge7_9DJm.js";import"./useSuspenseInfiniteQuery-DI0bMzys.js";import"./connect-desktop-dialog-BeQBPgXI.js";import"./decopilot-CmY0uQsK.js";import"./checkbox-ByFK_aep.js";import"./skeleton-CKrKTMUA.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DHTir3TC.js";import"./popover-BTH_4TON.js";import"./command-DNx5Uhv2.js";import"./index-jh_AV7fc.js";import"./dropdown-menu-HRW3zYBQ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Bj_NbDO6.js";import"./empty-state-ySGQGV31.js";import"./toolbar-D1N_WILM.js";import"./preview-dialog-C4U9zVzk.js";import"./index-C102AH4s.js";import"./use-mcp-tools-C6z5gFrv.js";import"./use-capability-E8ccWznH.js";import"./shell-route-loading-mpOo6h4k.js";import"./index-q8ngIE68.js";import"./alert-dialog-BOS0dCJh.js";import"./use-debounced-autosave-DlQ25v46.js";import"./index-DqK88OS0.js";import"./sidebar-DU6XXtnA.js";import"./search-input-CUOcSr_7.js";import"./github-repo-picker-YqP06Fto.js";import"./use-secrets-B1jqMRBn.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-DcivAyKH.js";import"./automation-runs-Bk8JCPKW.js";import"./table-CHbuq2So.js";import"./use-members-D4NNP_ry.js";import"./use-org-auth-client-Bn9WqUMO.js";import"./task-status-Cpo5H16E.js";import"./use-automations-Br1p5DHc.js";import"./use-file-configs-TueoM3xk.js";import"./monaco-editor-CLbivzeA.js";import"./select-model-iQAMpxgJ.js";import"./automation-list-row-CyNcj0ry.js";function U(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=U(n.title),i=U(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(n.description),image:U(n.image),favicon:U(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,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 o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==u||e[24]!==y||e[25]!==g?(S=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=S):S=e[26],S}function De(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const S=i.description??ee;let _;e[17]!==y||e[18]!==S?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:S}),e[17]=y,e[18]=S,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let b;e[24]!==i.image?(b=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=b):b=e[25];let k;e[26]!==N||e[27]!==b||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,b]}),e[26]=N,e[27]=b,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function ki(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,S]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),S(Me));const{persistSeo:b,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!K||Ce(B))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==b||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),b(de)},e[8]=b,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==S?(H=()=>S(Ke),e[14]=S,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(be,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==b||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==R?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),b(E)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Ee,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=b,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=R,e[59]=A):A=e[59];let J;return e[60]!==I||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=J):J=e[62],J}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{ki as SeoEditor};
@@ -1 +1 @@
1
- import{c as S,e as R,j as s,v as J,l as k,ae as Q,x as I,q as L,I as B,a as G,i as D,r as F,O as K}from"./index-Dkp6RqD3.js";import{u as E,S as U,M as V}from"./shell-controls-BM2wsOnd.js";import{j as X,k as Y,l as Z,b as q,c as w,d as M,S as P,a as O,f as ee,g as se}from"./sidebar-BlJZ8VS1.js";import{a as te}from"./index-CZw9wi-O.js";import{n as le,b as re,a as ie,c as oe,d as ne,i as T}from"./ZapSquare-B2VaDn9C.js";import{t as ae,a as A}from"./Users03-A-5AuVqo.js";import{i as ce}from"./HardDrive-ByBOOup9.js";import{i as me}from"./Key01-zFZC1WAX.js";import{i as fe}from"./Shield01-DOSUyIxl.js";import{s as de}from"./User01-B6F5rEOA.js";import{i as xe}from"./Zap-BvmHlbv3.js";import{a as be}from"./use-capability-Bs4ib41V.js";import{a as ue}from"./use-join-requests-I5yPny3d.js";import{u as W}from"./tooltip-CzRpmZhx.js";import{u as he}from"./use-status-sounds-DiXAjIsI.js";import{a as y}from"./toolbar-B94AmW8_.js";import"./sheet-CEq4Xlbn.js";import"./X-CqD7ABN6.js";import"./LayoutLeft-D5d7RmP6.js";import"./studio-tools-MS8HaZF2.js";import"./question-004-sINsf4GQ.js";import"./decopilot-sse-pool-DH5axPTT.js";import"./backoff-CrEUbyZT.js";import"./ChevronLeft-DUWeOqhA.js";import"./ChevronRight-D9P32BBy.js";function H(){const e=S.c(21),{capabilities:t,isPrivileged:f,loading:l,error:a}=be(),r=ue().length;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ae,{size:14}),e[0]=o):o=e[0];let n,i;if(e[1]!==t||e[2]!==a||e[3]!==f||e[4]!==r||e[5]!==l){i=Symbol.for("react.early_return_sentinel");e:{let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(le,{size:14}),e[8]=u):u=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(re,{size:14}),e[9]=c):c=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(me,{size:14}),e[10]=d):d=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ce,{size:14}),e[11]=x):x=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ie,{size:14}),e[12]=m):m=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(A,{size:14}),e[13]=b):b=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{size:14}),e[14]=p):p=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(oe,{size:14}),e[15]=g):g=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ne,{size:14}),e[16]=h):h=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(A,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(fe,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Q,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(de,{size:14}),e[20]=N):N=e[20];const z=[{label:"Organization",items:[{key:"general",label:"General",icon:o,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:u,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:c,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:d,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:x,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:m,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:b,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:p,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:h,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:r},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(l||a){i=z;break e}n=z.map(C=>({...C,items:C.items.filter($=>$.privilegedOnly?f:$.requires?f||t[$.requires]:!0)})).filter(pe)}e[1]=t,e[2]=a,e[3]=f,e[4]=r,e[5]=l,e[6]=n,e[7]=i}else n=e[6],i=e[7];return i!==Symbol.for("react.early_return_sentinel")?i:n}function pe(e){return e.items.length>0}function ge(){const e=S.c(19),t=H();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/shell/$org"},e[0]=f):f=e[0];const{org:l}=R(f);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={select:_e},e[1]=a):a=e[1];const r=E(a);let o;e[2]!==l||e[3]!==r?(o=b=>{const p=b.replace("$org",l);return r.startsWith(p)},e[2]=l,e[3]=r,e[4]=o):o=e[4];const n=o;let i;if(e[5]!==t||e[6]!==n||e[7]!==l){let b;e[9]!==n||e[10]!==l?(b=(p,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[p.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:p.label}),s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:p.items.map(h=>s.jsx(P,{children:s.jsx(O,{asChild:!0,isActive:n(h.to),children:s.jsxs(I,{to:h.to,params:{org:l},onClick:()=>L("settings_nav_clicked",{section_key:h.key,section_label:h.label,group_label:p.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[h.icon,h.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:h.label})]})})},h.key))})})]},`${p.label}-${g}`),e[9]=n,e[10]=l,e[11]=b):b=e[11],i=t.map(b),e[5]=t,e[6]=n,e[7]=l,e[8]=i}else i=e[8];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=u):u=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[u,s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs(O,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=c):c=e[13];let d;e[14]!==i?(d=s.jsxs(ee,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[i,c]}),e[14]=i,e[15]=d):d=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.83.1"]})}),e[16]=x):x=e[16];let m;return e[17]!==d?(m=s.jsxs(se,{variant:"sidebar",children:[d,x]}),e[17]=d,e[18]=m):m=e[18],m}function je(){L("signed_out",{source:"settings_sidebar"}),B(),G.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:f}=e,l=H();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org"},t[0]=a):a=t[0];const{org:r}=R(a);let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o={select:ve},t[1]=o):o=t[1];const n=E(o);let i;t[2]!==r||t[3]!==n?(i=g=>{const h=g.replace("$org",r);return n.startsWith(h)},t[2]=r,t[3]=n,t[4]=i):i=t[4];const u=i;let c;if(t[5]!==l||t[6]!==u||t[7]!==f||t[8]!==r){let g;t[10]!==u||t[11]!==f||t[12]!==r?(g=(h,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:h.label}),h.items.map(j=>s.jsxs(I,{to:j.to,params:{org:r},onClick:f,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",u(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${h.label}-${_}`),t[10]=u,t[11]=f,t[12]=r,t[13]=g):g=t[13],c=l.map(g),t[5]=l,t[6]=u,t[7]=f,t[8]=r,t[9]=c}else c=t[9];let d;t[14]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=d):d=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[d,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=x):x=t[15];let m;t[16]!==c?(m=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[c,x]}),t[16]=c,t[17]=m):m=t[17];let b;t[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.83.1"]})}),t[18]=b):b=t[18];let p;return t[19]!==m?(p=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[m,b]}),t[19]=m,t[20]=p):p=t[20],p}function Se(){B(),G.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:f}=J();he(f.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(D,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(F.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(te,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(K,{})})})})}),e[1]=a):a=e[1];const r=a;if(t){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:r}),e[2]=n):n=e[2],n}let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:r})}),e[3]=o):o=e[3],o}function Xe(){const e=S.c(22),t=W();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(y.LogoLink,{}),e[0]=f):f=e[0];let l;e[1]!==t?(l=t&&s.jsx(U,{}),e[1]=t,e[2]=l):l=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"hidden md:contents",children:s.jsx(y.Nav,{})}),e[3]=a):a=e[3];let r;e[4]!==l?(r=s.jsxs(y.LeftColumn,{children:[f,l,a]}),e[4]=l,e[5]=r):r=e[5];let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[6]=o):o=e[6];let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[7]=n):n=e[7];let i;e[8]!==r?(i=s.jsxs(y.Header,{children:[r,o,n]}),e[8]=r,e[9]=i):i=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u={"--sidebar-width-icon":"3.5rem"},e[10]=u):u=e[10];let c;e[11]!==t?(c=!t&&s.jsx(ge,{}),e[11]=t,e[12]=c):c=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(X,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(Ne,{})}),e[13]=d):d=e[13];let x;e[14]!==c?(x=s.jsxs(Y,{className:"flex-1 bg-sidebar min-h-0",style:u,children:[c,d]}),e[14]=c,e[15]=x):x=e[15];let m;e[16]!==t?(m=t&&s.jsx(V,{renderSidebar:ke}),e[16]=t,e[17]=m):m=e[17];let b;return e[18]!==x||e[19]!==m||e[20]!==i?(b=s.jsx(y.Provider,{children:s.jsx(Z,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[i,x,m]})})}),e[18]=x,e[19]=m,e[20]=i,e[21]=b):b=e[21],b}function ke(e){const{onClose:t}=e;return s.jsx(ye,{onClose:t})}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,Xe as default};
1
+ import{c as S,e as R,j as s,w as J,l as k,af as Q,y as L,s as B,M as I,a as G,i as D,r as F,O as K}from"./index-BMCJlhk3.js";import{u as E,S as U,M as V}from"./shell-controls-Zawsretc.js";import{j as X,k as Y,l as Z,b as q,c as w,d as M,S as P,a as O,f as ee,g as se}from"./sidebar-DU6XXtnA.js";import{a as te}from"./index-DqK88OS0.js";import{n as le,b as re,a as ie,c as oe,d as ne,i as T}from"./ZapSquare-Dnw5HzjO.js";import{t as ae,a as A}from"./Users03-ClYFKrw1.js";import{i as ce}from"./HardDrive-BD491-6A.js";import{i as me}from"./Key01-DpArIwgm.js";import{i as fe}from"./Shield01-BrCb9Fbq.js";import{s as de}from"./User01-676cwM-d.js";import{i as xe}from"./Zap-BRPDiIJ_.js";import{a as be}from"./use-capability-E8ccWznH.js";import{a as ue}from"./use-join-requests-Bugx9GLx.js";import{u as W}from"./tooltip-DjHKSu56.js";import{u as he}from"./use-status-sounds-Bj_NbDO6.js";import{a as y}from"./toolbar-D1N_WILM.js";import"./sheet-ZPG9h0Fj.js";import"./X-B9D2h3Td.js";import"./LayoutLeft-i76gAzb8.js";import"./studio-tools-BdR8-wJW.js";import"./question-004-sINsf4GQ.js";import"./decopilot-sse-pool-CXkkAKQx.js";import"./backoff-CrEUbyZT.js";import"./ChevronLeft-LzGuMB2U.js";import"./ChevronRight-B0GGkNIH.js";function H(){const e=S.c(21),{capabilities:t,isPrivileged:f,loading:l,error:a}=be(),r=ue().length;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ae,{size:14}),e[0]=o):o=e[0];let n,i;if(e[1]!==t||e[2]!==a||e[3]!==f||e[4]!==r||e[5]!==l){i=Symbol.for("react.early_return_sentinel");e:{let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(le,{size:14}),e[8]=u):u=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(re,{size:14}),e[9]=c):c=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(me,{size:14}),e[10]=d):d=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ce,{size:14}),e[11]=x):x=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ie,{size:14}),e[12]=m):m=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(A,{size:14}),e[13]=b):b=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{size:14}),e[14]=p):p=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(oe,{size:14}),e[15]=g):g=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ne,{size:14}),e[16]=h):h=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(A,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(fe,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Q,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(de,{size:14}),e[20]=N):N=e[20];const z=[{label:"Organization",items:[{key:"general",label:"General",icon:o,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:u,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:c,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:d,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:x,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:m,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:b,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:p,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:h,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:r},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(l||a){i=z;break e}n=z.map(C=>({...C,items:C.items.filter($=>$.privilegedOnly?f:$.requires?f||t[$.requires]:!0)})).filter(pe)}e[1]=t,e[2]=a,e[3]=f,e[4]=r,e[5]=l,e[6]=n,e[7]=i}else n=e[6],i=e[7];return i!==Symbol.for("react.early_return_sentinel")?i:n}function pe(e){return e.items.length>0}function ge(){const e=S.c(19),t=H();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/shell/$org"},e[0]=f):f=e[0];const{org:l}=R(f);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={select:_e},e[1]=a):a=e[1];const r=E(a);let o;e[2]!==l||e[3]!==r?(o=b=>{const p=b.replace("$org",l);return r.startsWith(p)},e[2]=l,e[3]=r,e[4]=o):o=e[4];const n=o;let i;if(e[5]!==t||e[6]!==n||e[7]!==l){let b;e[9]!==n||e[10]!==l?(b=(p,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[p.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:p.label}),s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:p.items.map(h=>s.jsx(P,{children:s.jsx(O,{asChild:!0,isActive:n(h.to),children:s.jsxs(L,{to:h.to,params:{org:l},onClick:()=>B("settings_nav_clicked",{section_key:h.key,section_label:h.label,group_label:p.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[h.icon,h.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:h.label})]})})},h.key))})})]},`${p.label}-${g}`),e[9]=n,e[10]=l,e[11]=b):b=e[11],i=t.map(b),e[5]=t,e[6]=n,e[7]=l,e[8]=i}else i=e[8];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=u):u=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[u,s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs(O,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=c):c=e[13];let d;e[14]!==i?(d=s.jsxs(ee,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[i,c]}),e[14]=i,e[15]=d):d=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.83.2"]})}),e[16]=x):x=e[16];let m;return e[17]!==d?(m=s.jsxs(se,{variant:"sidebar",children:[d,x]}),e[17]=d,e[18]=m):m=e[18],m}function je(){B("signed_out",{source:"settings_sidebar"}),I(),G.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:f}=e,l=H();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org"},t[0]=a):a=t[0];const{org:r}=R(a);let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o={select:ve},t[1]=o):o=t[1];const n=E(o);let i;t[2]!==r||t[3]!==n?(i=g=>{const h=g.replace("$org",r);return n.startsWith(h)},t[2]=r,t[3]=n,t[4]=i):i=t[4];const u=i;let c;if(t[5]!==l||t[6]!==u||t[7]!==f||t[8]!==r){let g;t[10]!==u||t[11]!==f||t[12]!==r?(g=(h,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:h.label}),h.items.map(j=>s.jsxs(L,{to:j.to,params:{org:r},onClick:f,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",u(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${h.label}-${_}`),t[10]=u,t[11]=f,t[12]=r,t[13]=g):g=t[13],c=l.map(g),t[5]=l,t[6]=u,t[7]=f,t[8]=r,t[9]=c}else c=t[9];let d;t[14]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=d):d=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[d,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=x):x=t[15];let m;t[16]!==c?(m=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[c,x]}),t[16]=c,t[17]=m):m=t[17];let b;t[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.83.2"]})}),t[18]=b):b=t[18];let p;return t[19]!==m?(p=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[m,b]}),t[19]=m,t[20]=p):p=t[20],p}function Se(){I(),G.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:f}=J();he(f.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(D,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(F.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(te,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(K,{})})})})}),e[1]=a):a=e[1];const r=a;if(t){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:r}),e[2]=n):n=e[2],n}let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:r})}),e[3]=o):o=e[3],o}function Xe(){const e=S.c(22),t=W();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(y.LogoLink,{}),e[0]=f):f=e[0];let l;e[1]!==t?(l=t&&s.jsx(U,{}),e[1]=t,e[2]=l):l=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"hidden md:contents",children:s.jsx(y.Nav,{})}),e[3]=a):a=e[3];let r;e[4]!==l?(r=s.jsxs(y.LeftColumn,{children:[f,l,a]}),e[4]=l,e[5]=r):r=e[5];let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[6]=o):o=e[6];let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[7]=n):n=e[7];let i;e[8]!==r?(i=s.jsxs(y.Header,{children:[r,o,n]}),e[8]=r,e[9]=i):i=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u={"--sidebar-width-icon":"3.5rem"},e[10]=u):u=e[10];let c;e[11]!==t?(c=!t&&s.jsx(ge,{}),e[11]=t,e[12]=c):c=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(X,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(Ne,{})}),e[13]=d):d=e[13];let x;e[14]!==c?(x=s.jsxs(Y,{className:"flex-1 bg-sidebar min-h-0",style:u,children:[c,d]}),e[14]=c,e[15]=x):x=e[15];let m;e[16]!==t?(m=t&&s.jsx(V,{renderSidebar:ke}),e[16]=t,e[17]=m):m=e[17];let b;return e[18]!==x||e[19]!==m||e[20]!==i?(b=s.jsx(y.Provider,{children:s.jsx(Z,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[i,x,m]})})}),e[18]=x,e[19]=m,e[20]=i,e[21]=b):b=e[21],b}function ke(e){const{onClose:t}=e;return s.jsx(ye,{onClose:t})}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,Xe as default};
@@ -1 +1 @@
1
- import{c as v,l as N,j as r,r as S}from"./index-Dkp6RqD3.js";import{C as w}from"./card-CwMoWTAG.js";import{i as E}from"./ArrowUpRight-CZdyxiuo.js";function I(c){const e=v.c(12),{title:i,description:l,docsHref:t,actions:s,className:n,headerClassName:a,children:d}=c;let m;e[0]!==n?(m=N("flex flex-col gap-3",n),e[0]=n,e[1]=m):m=e[1];let f;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==a||e[6]!==i?(f=(i||l||t||s)&&r.jsxs("div",{className:N("flex items-center justify-between gap-3 px-4",a),children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=a,e[6]=i,e[7]=f):f=e[7];let o;return e[8]!==d||e[9]!==m||e[10]!==f?(o=r.jsxs("section",{className:m,children:[f,d]}),e[8]=d,e[9]=m,e[10]=f,e[11]=o):o=e[11],o}function P(c){const e=v.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const d=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=N("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=d.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let a;return e[7]!==t||e[8]!==s||e[9]!==n?(a=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=a):a=e[10],a}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=v.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:a,children:d}=c,m=d?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",f=n&&"hover:bg-muted/50 cursor-pointer";let o;e[0]!==a||e[1]!==m||e[2]!==f?(o=N(m,f,a),e[0]=a,e[1]=m,e[2]=f,e[3]=o):o=e[3];const b=n?"button":void 0,C=n?0:void 0;let x;e[4]!==n?(x=n?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,d]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==o||e[22]!==b||e[23]!==C||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:o,onClick:n,role:b,tabIndex:C,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=o,e[22]=b,e[23]=C,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=v.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=N("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=v.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=N("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,K as c,H as d};
1
+ import{c as v,l as N,j as r,r as S}from"./index-BMCJlhk3.js";import{C as w}from"./card-DPMEGAqZ.js";import{i as E}from"./ArrowUpRight-CoxAwUHc.js";function I(c){const e=v.c(12),{title:i,description:l,docsHref:t,actions:s,className:n,headerClassName:a,children:d}=c;let m;e[0]!==n?(m=N("flex flex-col gap-3",n),e[0]=n,e[1]=m):m=e[1];let f;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==a||e[6]!==i?(f=(i||l||t||s)&&r.jsxs("div",{className:N("flex items-center justify-between gap-3 px-4",a),children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=a,e[6]=i,e[7]=f):f=e[7];let o;return e[8]!==d||e[9]!==m||e[10]!==f?(o=r.jsxs("section",{className:m,children:[f,d]}),e[8]=d,e[9]=m,e[10]=f,e[11]=o):o=e[11],o}function P(c){const e=v.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const d=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=N("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=d.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let a;return e[7]!==t||e[8]!==s||e[9]!==n?(a=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=a):a=e[10],a}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=v.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:a,children:d}=c,m=d?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",f=n&&"hover:bg-muted/50 cursor-pointer";let o;e[0]!==a||e[1]!==m||e[2]!==f?(o=N(m,f,a),e[0]=a,e[1]=m,e[2]=f,e[3]=o):o=e[3];const b=n?"button":void 0,C=n?0:void 0;let x;e[4]!==n?(x=n?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,d]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==o||e[22]!==b||e[23]!==C||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:o,onClick:n,role:b,tabIndex:C,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=o,e[22]=b,e[23]=C,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=v.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=N("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=v.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=N("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,K as c,H as d};
@@ -1 +1 @@
1
- import{c as n,l as f,j as i,dq as N,cB as y,bS as S,dr as v,cC as C,ds as $,cD as w}from"./index-Dkp6RqD3.js";import{i as k}from"./X-CqD7ABN6.js";function E(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(C,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function B(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(w,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function O(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(B,{}),e[6]=m):m=e[6];const x=p==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",b=p==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs($,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function T(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{T as S,_ as a,P as b,O as c,E as d};
1
+ import{c as n,l as f,j as i,dr as N,cC as y,bT as S,ds as v,cD as C,dt as $,cE as w}from"./index-BMCJlhk3.js";import{i as k}from"./X-B9D2h3Td.js";function T(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(C,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function D(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(w,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function B(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(D,{}),e[6]=m):m=e[6];const x=p==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",b=p==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs($,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function O(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{P as S,_ as a,O as b,B as c,T as d};
@@ -1 +1 @@
1
- import{b0 as S,r as d,b1 as b,b2 as h,c as f,j as c}from"./index-Dkp6RqD3.js";import{S as p,c as x,d as g}from"./sheet-CEq4Xlbn.js";import{u as m}from"./sidebar-BlJZ8VS1.js";import{i as j}from"./LayoutLeft-D5d7RmP6.js";import{T as R}from"./toolbar-B94AmW8_.js";function E(t){const e=S({warn:t?.router===void 0}),r=t?.router||e,o=d.useRef(void 0);return b(r.stores.__store,s=>{if(t?.select){if(t.structuralSharing??r.options.defaultStructuralSharing){const n=h(o.current,t.select(s));return o.current=n,n}return t.select(s)}return s})}function M(){const t=f.c(3),{toggleSidebar:e}=m();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=c.jsx(j,{size:16}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=c.jsx(R,{onClick:e,"aria-label":"Toggle sidebar",children:r}),t[1]=e,t[2]=o):o=t[2],o}function y(t){const e=f.c(12),{renderSidebar:r}=t,{openMobile:o,setOpenMobile:s}=m();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=c.jsx(p,{className:"sr-only",children:"Navigation"}),e[0]=n):n=e[0];let i;e[1]!==s?(i=()=>s(!1),e[1]=s,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==i?(l=r({onClose:i}),e[3]=r,e[4]=i,e[5]=l):l=e[5];let a;e[6]!==l?(a=c.jsxs(x,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[n,l]}),e[6]=l,e[7]=a):a=e[7];let u;return e[8]!==o||e[9]!==s||e[10]!==a?(u=c.jsx(g,{open:o,onOpenChange:s,children:a}),e[8]=o,e[9]=s,e[10]=a,e[11]=u):u=e[11],u}export{y as M,M as S,E as u};
1
+ import{b1 as S,r as d,b2 as b,b3 as h,c as f,j as c}from"./index-BMCJlhk3.js";import{S as p,c as x,d as g}from"./sheet-ZPG9h0Fj.js";import{u as m}from"./sidebar-DU6XXtnA.js";import{i as j}from"./LayoutLeft-i76gAzb8.js";import{T as R}from"./toolbar-D1N_WILM.js";function E(t){const e=S({warn:t?.router===void 0}),r=t?.router||e,o=d.useRef(void 0);return b(r.stores.__store,s=>{if(t?.select){if(t.structuralSharing??r.options.defaultStructuralSharing){const n=h(o.current,t.select(s));return o.current=n,n}return t.select(s)}return s})}function M(){const t=f.c(3),{toggleSidebar:e}=m();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=c.jsx(j,{size:16}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=c.jsx(R,{onClick:e,"aria-label":"Toggle sidebar",children:r}),t[1]=e,t[2]=o):o=t[2],o}function y(t){const e=f.c(12),{renderSidebar:r}=t,{openMobile:o,setOpenMobile:s}=m();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=c.jsx(p,{className:"sr-only",children:"Navigation"}),e[0]=n):n=e[0];let i;e[1]!==s?(i=()=>s(!1),e[1]=s,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==i?(l=r({onClose:i}),e[3]=r,e[4]=i,e[5]=l):l=e[5];let a;e[6]!==l?(a=c.jsxs(x,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[n,l]}),e[6]=l,e[7]=a):a=e[7];let u;return e[8]!==o||e[9]!==s||e[10]!==a?(u=c.jsx(g,{open:o,onOpenChange:s,children:a}),e[8]=o,e[9]=s,e[10]=a,e[11]=u):u=e[11],u}export{y as M,M as S,E as u};