decocms 4.77.0 → 4.77.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 (236) hide show
  1. package/dist/client/assets/{AlertCircle-C20hgcIa.js → AlertCircle-eG6Gc49G.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BLkij4VQ.js → AreaChart-CdRNAaTW.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-Dgvo3A_2.js → ArrowUp-CdLsMjki.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-XVwZt1n6.js → ArrowUpRight-O8BszRRp.js} +1 -1
  5. package/dist/client/assets/{Check-Cc6Bc1BH.js → Check-CYLXae3M.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-BQl0d83F.js → CheckCircle-tljwuhuM.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-V6fE1Rcs.js → ChevronDown-Ce0JNwG8.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-B33Mu5AL.js → ChevronRight-Bf6_HJan.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DK7M0E86.js → ChevronUp-Cflkeqqz.js} +1 -1
  10. package/dist/client/assets/{Circle-DJp0izOj.js → Circle-DzHZa-kj.js} +1 -1
  11. package/dist/client/assets/{Copy01-CfdaTbye.js → Copy01-Du_M_0KX.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-NR-zMtTO.js → DotsVertical-xFAtxH3A.js} +1 -1
  13. package/dist/client/assets/{Eye-C9dnkVdp.js → Eye-D-54suMo.js} +1 -1
  14. package/dist/client/assets/{FilterLines-Ni7Zxtnw.js → FilterLines-BgdIIHnR.js} +1 -1
  15. package/dist/client/assets/{Flag01-DDojZ3BD.js → Flag01-ugYNIxEK.js} +1 -1
  16. package/dist/client/assets/{Globe01-ipTZJBPr.js → Globe01-UO2cBICu.js} +1 -1
  17. package/dist/client/assets/{Globe04-DOYzTQsa.js → Globe04-DzUT07Cn.js} +1 -1
  18. package/dist/client/assets/{HardDrive-DdAwxeh0.js → HardDrive-bE1MoLDy.js} +1 -1
  19. package/dist/client/assets/{Image01-C5JUp_rj.js → Image01-DKb2muBn.js} +1 -1
  20. package/dist/client/assets/{Key01-Dibq8qSI.js → Key01-Cq-J9mZo.js} +1 -1
  21. package/dist/client/assets/{LayoutLeft-DgY7TPq-.js → LayoutLeft-B5__5XBq.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-vfCmrlzd.js → LinkExternal01-BvGijEfo.js} +1 -1
  23. package/dist/client/assets/{List-G0g6UpdC.js → List-CIEQZx9S.js} +1 -1
  24. package/dist/client/assets/{Monitor01-DZP8UHev.js → Monitor01-C1p3z_f5.js} +1 -1
  25. package/dist/client/assets/{Package-B3D3XCt6.js → Package-BjwszD_f.js} +1 -1
  26. package/dist/client/assets/{Palette-NkhqFqPA.js → Palette-B-oF6tIa.js} +1 -1
  27. package/dist/client/assets/{Play-DetNEZKa.js → Play-D-YRWYQr.js} +1 -1
  28. package/dist/client/assets/{Plus-DRIYyF1Y.js → Plus-CizB5jQt.js} +1 -1
  29. package/dist/client/assets/{SearchLg-CLYFawei.js → SearchLg-CiDD8qnw.js} +1 -1
  30. package/dist/client/assets/{SearchMd-CpXRgEf5.js → SearchMd-CcQf_5lB.js} +1 -1
  31. package/dist/client/assets/{Settings02-DSnlYNiR.js → Settings02-CGoVxrYE.js} +1 -1
  32. package/dist/client/assets/{Shield01-CrEWV3nm.js → Shield01-nfrTF4Mw.js} +1 -1
  33. package/dist/client/assets/{Star01-CYWP-Lnz.js → Star01-BVrjnnC8.js} +1 -1
  34. package/dist/client/assets/{Stars01-SzQSCq9i.js → Stars01-DSPE0_0T.js} +1 -1
  35. package/dist/client/assets/{Stars02-DKDrJcrE.js → Stars02-C0mePgbQ.js} +1 -1
  36. package/dist/client/assets/{Sun-CST17A49.js → Sun-3gpGRkKw.js} +1 -1
  37. package/dist/client/assets/{SwitchHorizontal01-Bd1BMwMz.js → SwitchHorizontal01-BoKJqR3a.js} +1 -1
  38. package/dist/client/assets/{Tool01-CkczSZ03.js → Tool01-Bm90mZCD.js} +1 -1
  39. package/dist/client/assets/{Tool02-Zqz-7k3v.js → Tool02-daiZ8ZdA.js} +1 -1
  40. package/dist/client/assets/{Trash01-DAbM_CFW.js → Trash01-oe1NMhcg.js} +1 -1
  41. package/dist/client/assets/{TrendUp01-CHGxH9cm.js → TrendUp01-DvuM4A6y.js} +1 -1
  42. package/dist/client/assets/{Upload01-BkxnL7Jx.js → Upload01-BXr1BH_I.js} +1 -1
  43. package/dist/client/assets/{User01-pcBROZrv.js → User01-C7ZuARbC.js} +1 -1
  44. package/dist/client/assets/{UserPlus01-1O7ZAmZ0.js → UserPlus01-C0VtXGyN.js} +1 -1
  45. package/dist/client/assets/{Users01-B1Tq7qDs.js → Users01-DZyUR8Yh.js} +1 -1
  46. package/dist/client/assets/{Users03-DKog3mgS.js → Users03-CHK21j2b.js} +1 -1
  47. package/dist/client/assets/{X-DJyihanE.js → X-B6u4BYeS.js} +1 -1
  48. package/dist/client/assets/{XCircle-DengJiq7.js → XCircle-DGI9dgcJ.js} +1 -1
  49. package/dist/client/assets/{XClose-DgANt_GW.js → XClose-lZsBUygk.js} +1 -1
  50. package/dist/client/assets/{Zap-C0jj00w3.js → Zap-CMeneH21.js} +1 -1
  51. package/dist/client/assets/{ZapSquare-C-4KrsmI.js → ZapSquare-B3ibL8nl.js} +1 -1
  52. package/dist/client/assets/{ZoomOut-bo1qpk84.js → ZoomOut-CKfihzl3.js} +1 -1
  53. package/dist/client/assets/{access-gate-BQIbgyFa.js → access-gate-BKjE-W72.js} +1 -1
  54. package/dist/client/assets/{add-section-modal-4-ipNujs.js → add-section-modal-9hA4zHWa.js} +1 -1
  55. package/dist/client/assets/{agent-icon-B9wxYfT7.js → agent-icon-B1DcT15_.js} +1 -1
  56. package/dist/client/assets/{agents-list-DIWmKNv5.js → agents-list-Df8i4rGT.js} +1 -1
  57. package/dist/client/assets/{ai-providers-CWRcPqEG.js → ai-providers-DEZ-doQX.js} +1 -1
  58. package/dist/client/assets/{alert-pxYZf_gO.js → alert-CKkliWEi.js} +1 -1
  59. package/dist/client/assets/{alert-dialog-B4j05xqZ.js → alert-dialog-BHYtfpRM.js} +1 -1
  60. package/dist/client/assets/{app-editor-BzNNF0tV.js → app-editor-Dymjomoi.js} +1 -1
  61. package/dist/client/assets/{auth-B1cxztc2.js → auth-BbW7SMY9.js} +1 -1
  62. package/dist/client/assets/{auth-catchall-C3gRJwnb.js → auth-catchall-DXOIAmHy.js} +1 -1
  63. package/dist/client/assets/{auth-entry-WseoTsfP.js → auth-entry-Hxc9SX52.js} +1 -1
  64. package/dist/client/assets/{auth-split-layout-BRGfXuGe.js → auth-split-layout-Dfl544OM.js} +1 -1
  65. package/dist/client/assets/{authenticate-and-persist-oauth-BOen-Ru1.js → authenticate-and-persist-oauth-SPitL5yD.js} +1 -1
  66. package/dist/client/assets/{automation-list-row-CYxluwXx.js → automation-list-row-Dn4IsiQT.js} +1 -1
  67. package/dist/client/assets/{automation-runs-DOvodEH6.js → automation-runs-BvQ_NpzR.js} +1 -1
  68. package/dist/client/assets/automations-Qkqzours.js +1 -0
  69. package/dist/client/assets/{autosend-CwtKb6-i.js → autosend-qdJpe4iq.js} +1 -1
  70. package/dist/client/assets/{avatar-Bx5rROx7.js → avatar-DMDa5Fmk.js} +1 -1
  71. package/dist/client/assets/{badge-CqESM08z.js → badge-DGFRrczB.js} +1 -1
  72. package/dist/client/assets/{block-document-D0e8Q950.js → block-document-DU-yWhvh.js} +1 -1
  73. package/dist/client/assets/{brand-context-Zg6h8I3y.js → brand-context-B0F8ndWt.js} +1 -1
  74. package/dist/client/assets/{buckets-BagwF38l.js → buckets-Bz1zL6p_.js} +1 -1
  75. package/dist/client/assets/{bulk-category-panel-BX9JWu67.js → bulk-category-panel-CrkZD2hX.js} +1 -1
  76. package/dist/client/assets/{calendar-B-LTbMEy.js → calendar-BmG3lShW.js} +1 -1
  77. package/dist/client/assets/{capability-load-error-a0S1shMb.js → capability-load-error-DjfRZU4K.js} +1 -1
  78. package/dist/client/assets/{card-CdFmFmUv.js → card-B2cV3vAA.js} +1 -1
  79. package/dist/client/assets/{category-editor-COEcq-_u.js → category-editor-BPpEoMdX.js} +1 -1
  80. package/dist/client/assets/{chat-context-BxoSxASA.js → chat-context-D0hwm5HT.js} +1 -1
  81. package/dist/client/assets/{checkbox-D4_5XFQQ.js → checkbox-n-zGS588.js} +1 -1
  82. package/dist/client/assets/{cli-auth-success-DQvPoLam.js → cli-auth-success-Cpw6906n.js} +1 -1
  83. package/dist/client/assets/{collection-detail-Ba8slFLs.js → collection-detail-CoKiA3iG.js} +1 -1
  84. package/dist/client/assets/{collection-display-button-CQSfq2Ru.js → collection-display-button-Dd5IEnXv.js} +1 -1
  85. package/dist/client/assets/{collection-search-AHmPijP6.js → collection-search-1EZ5z6Vc.js} +1 -1
  86. package/dist/client/assets/{collection-table-wrapper-3oZtiuFs.js → collection-table-wrapper-CWw6WTgV.js} +1 -1
  87. package/dist/client/assets/{collection-tabs-DpJVutqE.js → collection-tabs-G10EJ6rD.js} +1 -1
  88. package/dist/client/assets/{command-D25pX-TQ.js → command-Bijkf_mr.js} +1 -1
  89. package/dist/client/assets/{commerce-onboarding-CcxjVyA-.js → commerce-onboarding-yv2iV0vu.js} +1 -1
  90. package/dist/client/assets/{companions-core-BOqZjnai.js → companions-core-D65XjKFb.js} +1 -1
  91. package/dist/client/assets/{connect-desktop-dialog-DhqJPsaP.js → connect-desktop-dialog-Cl6dLVAA.js} +1 -1
  92. package/dist/client/assets/{connection-card-DL84VWzp.js → connection-card--smrdlwg.js} +1 -1
  93. package/dist/client/assets/{connection-detail-BoeLB_bZ.js → connection-detail-sQv6wR_D.js} +1 -1
  94. package/dist/client/assets/{connection-form-helpers-Xnvqs_jG.js → connection-form-helpers-Det9xziz.js} +1 -1
  95. package/dist/client/assets/{connections-B_sR21M3.js → connections-b4dKpHip.js} +1 -1
  96. package/dist/client/assets/{decopilot-sse-pool-BMqhIP22.js → decopilot-sse-pool-DDyGdbf8.js} +1 -1
  97. package/dist/client/assets/{dialog-BMJEsVXy.js → dialog-7JXjpLzj.js} +1 -1
  98. package/dist/client/assets/{domain-settings-iLQ-2ZPH.js → domain-settings-9SDv1Gy2.js} +1 -1
  99. package/dist/client/assets/{drawer-CoDBoPdX.js → drawer-975r1xgz.js} +1 -1
  100. package/dist/client/assets/{dropdown-menu-CEae6v-M.js → dropdown-menu-CfwadO2Z.js} +1 -1
  101. package/dist/client/assets/{empty-state-BAtX1PrG.js → empty-state-C2pMk4Io.js} +1 -1
  102. package/dist/client/assets/{extract-connection-data-CfvL8nD3.js → extract-connection-data-xHncf4eT.js} +1 -1
  103. package/dist/client/assets/{file-explorer-BenWKc2R.js → file-explorer-C1XUdiUA.js} +1 -1
  104. package/dist/client/assets/{file-type-icon-13wssv9j.js → file-type-icon-C9w5Ssef.js} +1 -1
  105. package/dist/client/assets/{files-BBzXEqRR.js → files-DmBu13F5.js} +1 -1
  106. package/dist/client/assets/{form-Ch5mL-Ts.js → form-CoMC4z4E.js} +1 -1
  107. package/dist/client/assets/{general-s8pItm6T.js → general-BZsnVBNU.js} +1 -1
  108. package/dist/client/assets/{github-repo-picker-B8inDg0_.js → github-repo-picker-CD1HFBLK.js} +1 -1
  109. package/dist/client/assets/{hooks-DbvQQuDU.js → hooks-ChQF06R2.js} +1 -1
  110. package/dist/client/assets/{index-BsVCLoZh.js → index-B421HVEM.js} +1 -1
  111. package/dist/client/assets/{index-oC-h32gK.js → index-C6ZXBMKy.js} +1 -1
  112. package/dist/client/assets/{index-28VlSj3_.js → index-CEvMb-yW.js} +1 -1
  113. package/dist/client/assets/index-CTi2LrxD.js +8 -0
  114. package/dist/client/assets/{index-BMGkibta.js → index-CVhE6SCR.js} +1 -1
  115. package/dist/client/assets/{index-BSL1z35x.js → index-C_fGiia9.js} +5 -5
  116. package/dist/client/assets/{index-D-9It9O8.js → index-CohYEXUC.js} +3 -3
  117. package/dist/client/assets/{index-aI9W7bgN.js → index-CqeCI00R.js} +1 -1
  118. package/dist/client/assets/{index-BST567fc.js → index-DAFuG1kQ.js} +1 -1
  119. package/dist/client/assets/{index-Cdqw-lyd.js → index-O25bDoG2.js} +1 -1
  120. package/dist/client/assets/{index-CsVxM7TL.js → index-UpQsgScZ.js} +1 -1
  121. package/dist/client/assets/{index-D3YyZBEV.js → index-cJm4RNKA.js} +2 -2
  122. package/dist/client/assets/{index-ELhrM9RL.js → index-e-E887bU.js} +1 -1
  123. package/dist/client/assets/{index-BxeG7NLT.js → index-p-NZuQLL.js} +1 -1
  124. package/dist/client/assets/{index-redirect-CKDDLREl.js → index-redirect-C0lMrFZb.js} +1 -1
  125. package/dist/client/assets/{input-BAMDOJs0.js → input-DooN4jkj.js} +1 -1
  126. package/dist/client/assets/{integration-icon-BYNqWlgD.js → integration-icon-DouvCAyQ.js} +1 -1
  127. package/dist/client/assets/{invite-member-dialog-BONIcxh_.js → invite-member-dialog-GTEEDh2Y.js} +1 -1
  128. package/dist/client/assets/{label-la-FXX9j.js → label-CHVjglvp.js} +1 -1
  129. package/dist/client/assets/{layout-DhAv24JK.js → layout-BvnbP4Dr.js} +1 -1
  130. package/dist/client/assets/{login-Ddj3rDtP.js → login-Cf5hKO0l.js} +1 -1
  131. package/dist/client/assets/{mcp-oauth-DHOrFgRs.js → mcp-oauth-DmLpmBfh.js} +1 -1
  132. package/dist/client/assets/{members-DWsRoQb4.js → members-TMJ-nd-l.js} +1 -1
  133. package/dist/client/assets/{monaco-editor-w7ydpEuN.js → monaco-editor-DeHPBeZj.js} +1 -1
  134. package/dist/client/assets/{monitoring-stats-row-C98Q7tWI.js → monitoring-stats-row-q_qpqwCs.js} +1 -1
  135. package/dist/client/assets/{multi-select-fZzKc5Ve.js → multi-select-oNBbk1hp.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-ZVbRLaaj.js → oauth-callback-DrO3rGFl.js} +1 -1
  137. package/dist/client/assets/{oauth-callback-ai-provider-CwkRTWEO.js → oauth-callback-ai-provider-Uc-mSRYP.js} +1 -1
  138. package/dist/client/assets/{onboarding-BjzzMaW-.js → onboarding-Es5wNRlJ.js} +1 -1
  139. package/dist/client/assets/{org-install-CyfK9mri.js → org-install-DwAkYRpj.js} +1 -1
  140. package/dist/client/assets/{org-layout-54yLArOz.js → org-layout-BmXupHnR.js} +1 -1
  141. package/dist/client/assets/{organization-choice-CioIzPaI.js → organization-choice-Wkdav7l-.js} +1 -1
  142. package/dist/client/assets/{orgs-DrrdLCVb.js → orgs-BiuhDQqw.js} +1 -1
  143. package/dist/client/assets/{page-seo-form-B1izKYSp.js → page-seo-form-BITO5Cwa.js} +1 -1
  144. package/dist/client/assets/page-seo-sheet-DVGxv6BI.js +1 -0
  145. package/dist/client/assets/{popover-DRqjILyu.js → popover-CMMyXpPK.js} +1 -1
  146. package/dist/client/assets/{post-editor-Dr7kcw0W.js → post-editor-QO48PKJR.js} +1 -1
  147. package/dist/client/assets/{primitives-CKKjbMYY.js → primitives-1GpjyhXb.js} +1 -1
  148. package/dist/client/assets/{profile-BqO8iOf0.js → profile-Bx6jAFG3.js} +1 -1
  149. package/dist/client/assets/project-app-view-zZm-8Y4L.js +1 -0
  150. package/dist/client/assets/record-editor-DJy-LqeK.js +1 -0
  151. package/dist/client/assets/redirect-editor-BErOiRuY.js +1 -0
  152. package/dist/client/assets/registry-QdP3QwyG.js +2 -0
  153. package/dist/client/assets/{registry-layout-DpztDRKh.js → registry-layout-DoohESD-.js} +1 -1
  154. package/dist/client/assets/{reports-DCtMedbZ.js → reports-DdIsDSQY.js} +1 -1
  155. package/dist/client/assets/{require-capability-CtdSCgZx.js → require-capability-DWNo_rvi.js} +1 -1
  156. package/dist/client/assets/{required-auth-layout-oEFRt1ot.js → required-auth-layout-DrnK06MM.js} +1 -1
  157. package/dist/client/assets/{reset-password-DACOeJ3p.js → reset-password-CYwCkT5L.js} +1 -1
  158. package/dist/client/assets/{roles-DqIFMyzi.js → roles-DUIPd2E1.js} +1 -1
  159. package/dist/client/assets/{search-input-D9BaMWA9.js → search-input-gI5YpJSI.js} +1 -1
  160. package/dist/client/assets/{secrets-5UTvGGDF.js → secrets-DbP1su7D.js} +1 -1
  161. package/dist/client/assets/{sections-editor-Bcq3GpGi.js → sections-editor-BmcqZp-u.js} +1 -1
  162. package/dist/client/assets/{select-B3rAExLJ.js → select-DLOarQAH.js} +1 -1
  163. package/dist/client/assets/{select-model-DlTEdDDN.js → select-model-DgC0KhDX.js} +1 -1
  164. package/dist/client/assets/{self-tool-result-BPKBwAAG.js → self-tool-result-BSbws4qP.js} +1 -1
  165. package/dist/client/assets/{seo-editor-ByqFh0sG.js → seo-editor-1B33gCbJ.js} +1 -1
  166. package/dist/client/assets/{settings-layout-BpZn-dBG.js → settings-layout-CGbNh01L.js} +1 -1
  167. package/dist/client/assets/{settings-section-D71nFv9D.js → settings-section-CSQS_fOd.js} +1 -1
  168. package/dist/client/assets/{shell-controls-Dfni021n.js → shell-controls-r8aLrbK0.js} +1 -1
  169. package/dist/client/assets/{shell-layout-Dj7fEvwD.js → shell-layout-DtOHLb0x.js} +1 -1
  170. package/dist/client/assets/{sidebar-BeNXrZie.js → sidebar-fRXLoYlv.js} +1 -1
  171. package/dist/client/assets/{skeleton-DGbUxntY.js → skeleton-DrvCYvFD.js} +1 -1
  172. package/dist/client/assets/{sso-BO0hp5tp.js → sso-C9Vqlw8M.js} +1 -1
  173. package/dist/client/assets/{store-C_1ZJ6YY.js → store-h6xQOgKK.js} +1 -1
  174. package/dist/client/assets/store-registry-BRCiwnTn.js +2 -0
  175. package/dist/client/assets/{studio-tools-DC98b1mA.js → studio-tools-Cmxh51BW.js} +1 -1
  176. package/dist/client/assets/{switch-D2IG2BwL.js → switch-CCu5HEzP.js} +1 -1
  177. package/dist/client/assets/{table-CQ51aPY5.js → table-TsjPt8Gf.js} +1 -1
  178. package/dist/client/assets/{tabs-BLtAAS9k.js → tabs-BhgZ3ZmW.js} +1 -1
  179. package/dist/client/assets/{textarea-DGGDLDhY.js → textarea-DDxbxAIb.js} +1 -1
  180. package/dist/client/assets/{toggle-group-DH4mAwCj.js → toggle-group-gGQTQIMA.js} +1 -1
  181. package/dist/client/assets/{toolbar-Dfnz4ZMt.js → toolbar-D-2K0Fk5.js} +1 -1
  182. package/dist/client/assets/{toolbar-icon-button-BnycwoLQ.js → toolbar-icon-button-Bw7f5O1p.js} +1 -1
  183. package/dist/client/assets/{tooltip-ChaSBJu1.js → tooltip-owO6Fujv.js} +1 -1
  184. package/dist/client/assets/{use-ai-providers-DGkYjcBs.js → use-ai-providers-B919C25s.js} +1 -1
  185. package/dist/client/assets/{use-automations-d1p1cV4X.js → use-automations-CJdJQaET.js} +1 -1
  186. package/dist/client/assets/{use-autosave-CKOCxbNQ.js → use-autosave-D09qjW1V.js} +1 -1
  187. package/dist/client/assets/{use-capability-dlgw5Gjj.js → use-capability-CiXd5r1-.js} +1 -1
  188. package/dist/client/assets/{use-clock-tick-BqQOp9zQ.js → use-clock-tick-Bo5nmZlI.js} +1 -1
  189. package/dist/client/assets/{use-collections-SV2SEdS-.js → use-collections-X_sc34If.js} +1 -1
  190. package/dist/client/assets/{use-connection-BY-HU_w2.js → use-connection-DuDkpb0e.js} +1 -1
  191. package/dist/client/assets/{use-copy-CZmbzv9b.js → use-copy-Bx3m2rO-.js} +1 -1
  192. package/dist/client/assets/{use-create-virtual-mcp-B2rIhDW5.js → use-create-virtual-mcp-ByH8ooeL.js} +1 -1
  193. package/dist/client/assets/{use-debounced-autosave-DowZ2Cj5.js → use-debounced-autosave-CjuwhAVQ.js} +1 -1
  194. package/dist/client/assets/{use-debounced-value-BGxD_rLK.js → use-debounced-value-L3f6T_5p.js} +1 -1
  195. package/dist/client/assets/{use-deco-credits-CINfmuIk.js → use-deco-credits-C8loT1AO.js} +1 -1
  196. package/dist/client/assets/{use-decopilot-events-CsUIw1So.js → use-decopilot-events-CynGBvUt.js} +1 -1
  197. package/dist/client/assets/{use-delete-connection-BlPfLB7O.js → use-delete-connection-C0mv8dIz.js} +1 -1
  198. package/dist/client/assets/{use-deployment-admin-Dx1voZKl.js → use-deployment-admin-DabPejE5.js} +1 -1
  199. package/dist/client/assets/{use-file-configs-Bs-k2-C1.js → use-file-configs-CIujnhhg.js} +1 -1
  200. package/dist/client/assets/{use-infinite-scroll-Dhi9FPdG.js → use-infinite-scroll-Y2vLF9MQ.js} +1 -1
  201. package/dist/client/assets/{use-join-requests-BJd9gv6b.js → use-join-requests-BzWPX9mp.js} +1 -1
  202. package/dist/client/assets/{use-mcp-auth-status-B_bbAdbm.js → use-mcp-auth-status-CWMnl4kQ.js} +1 -1
  203. package/dist/client/assets/{use-mcp-client-DUHgzzKC.js → use-mcp-client-CM7X9MZh.js} +1 -1
  204. package/dist/client/assets/{use-mcp-tools-DYBrb0MI.js → use-mcp-tools--4fgvczm.js} +1 -1
  205. package/dist/client/assets/{use-members-Cl5wPFu9.js → use-members-D9EO1Bhw.js} +1 -1
  206. package/dist/client/assets/{use-mobile-CrSyO5KW.js → use-mobile-CA2wukFn.js} +1 -1
  207. package/dist/client/assets/{use-navigate-to-agent-BxgvzA-e.js → use-navigate-to-agent-BQJR7hS-.js} +1 -1
  208. package/dist/client/assets/{use-org-auth-client-pgJk4oK7.js → use-org-auth-client-BBy-fA8U.js} +1 -1
  209. package/dist/client/assets/{use-org-sso-BhSM-25Q.js → use-org-sso-_-9Ndxjg.js} +1 -1
  210. package/dist/client/assets/{use-organization-roles-ChCQkrT7.js → use-organization-roles-DCK1gCYk.js} +1 -1
  211. package/dist/client/assets/{use-organization-settings-C6Ld6iGN.js → use-organization-settings-STRgrAfE.js} +1 -1
  212. package/dist/client/assets/{use-registry-connections-DIPeZmDC.js → use-registry-connections-B3SITFNT.js} +1 -1
  213. package/dist/client/assets/{use-secrets-BylmfCM8.js → use-secrets-DeioiR_Q.js} +1 -1
  214. package/dist/client/assets/{use-status-sounds-BLHe_A1G.js → use-status-sounds-MPm8b7Px.js} +1 -1
  215. package/dist/client/assets/{use-view-mode-DE6KjcqK.js → use-view-mode-B-Z3o5Ts.js} +1 -1
  216. package/dist/client/assets/{use-virtual-mcp-C-thf57O.js → use-virtual-mcp-aGmJHwFC.js} +1 -1
  217. package/dist/client/assets/useInfiniteQuery-BVqkvkK2.js +1 -0
  218. package/dist/client/assets/{useRouterState-BLmxpXOc.js → useRouterState-DzpKjEia.js} +1 -1
  219. package/dist/client/assets/useSuspenseInfiniteQuery-BXgDSTQv.js +1 -0
  220. package/dist/client/assets/{users-BmqrdKAf.js → users-C5ACxEJi.js} +1 -1
  221. package/dist/client/assets/{variant-calendar-CslgISEH.js → variant-calendar-BIM35rdy.js} +1 -1
  222. package/dist/client/assets/{view-mode-toggle-D300OqNu.js → view-mode-toggle-CWwEb6HJ.js} +1 -1
  223. package/dist/client/index.html +1 -1
  224. package/dist/server/cli.js +345 -345
  225. package/dist/server/server.js +1 -1
  226. package/package.json +1 -1
  227. package/dist/client/assets/automations-BqivZlI1.js +0 -1
  228. package/dist/client/assets/index-Ct3WOq85.js +0 -8
  229. package/dist/client/assets/page-seo-sheet-CixOI3l1.js +0 -1
  230. package/dist/client/assets/project-app-view-BijShb4s.js +0 -1
  231. package/dist/client/assets/record-editor-DgLuzYZR.js +0 -1
  232. package/dist/client/assets/redirect-editor-e5uYjnmk.js +0 -1
  233. package/dist/client/assets/registry-BMLgpj99.js +0 -2
  234. package/dist/client/assets/store-registry-DwInc6rk.js +0 -2
  235. package/dist/client/assets/useInfiniteQuery-DyV1QDab.js +0 -1
  236. package/dist/client/assets/useSuspenseInfiniteQuery-D9oQjj9f.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as D,j as p,r as d,aX as O}from"./index-D-9It9O8.js";import{l as I,F as L}from"./index-CsVxM7TL.js";import{S as N}from"./chat-context-BxoSxASA.js";import{d as K}from"./delay-CnY5UFtP.js";function C(t){return Math.ceil(t.length*3/4)}function Y(t){const e=[];for(const r of t)switch(r.type){case"text":r.text?.trim()&&e.push({type:"paragraph",content:[{type:"text",text:r.text}]});break;case"image":case"audio":r.data&&r.mimeType&&e.push({type:"paragraph",content:[{type:"file",attrs:{id:crypto.randomUUID(),name:`${r.type}.${r.mimeType.split("/")[1]??"bin"}`,mimeType:r.mimeType,size:C(r.data),data:r.data}}]});break;case"resource":{const n=r.resource;"text"in n&&n.text?e.push({type:"paragraph",content:[{type:"text",text:n.text}]}):"blob"in n&&n.blob&&e.push({type:"paragraph",content:[{type:"file",attrs:{id:crypto.randomUUID(),name:String(n.uri),mimeType:n.mimeType??"application/octet-stream",size:C(n.blob),data:n.blob}}]});break}case"resource_link":e.push({type:"paragraph",content:[{type:"text",text:r.name??r.uri}]});break}return{type:"doc",content:e}}async function z(t){const e=t.getModel();if(!e)throw new Error("[Monaco] No model found in editor");const r=e.getValue(),i=r.replace(/export default (async )?function/,"export default $1function __default")+`
1
+ import{c as D,j as p,r as d,aX as O}from"./index-CohYEXUC.js";import{l as I,F as L}from"./index-UpQsgScZ.js";import{S as N}from"./chat-context-D0hwm5HT.js";import{d as K}from"./delay-CnY5UFtP.js";function C(t){return Math.ceil(t.length*3/4)}function Y(t){const e=[];for(const r of t)switch(r.type){case"text":r.text?.trim()&&e.push({type:"paragraph",content:[{type:"text",text:r.text}]});break;case"image":case"audio":r.data&&r.mimeType&&e.push({type:"paragraph",content:[{type:"file",attrs:{id:crypto.randomUUID(),name:`${r.type}.${r.mimeType.split("/")[1]??"bin"}`,mimeType:r.mimeType,size:C(r.data),data:r.data}}]});break;case"resource":{const n=r.resource;"text"in n&&n.text?e.push({type:"paragraph",content:[{type:"text",text:n.text}]}):"blob"in n&&n.blob&&e.push({type:"paragraph",content:[{type:"file",attrs:{id:crypto.randomUUID(),name:String(n.uri),mimeType:n.mimeType??"application/octet-stream",size:C(n.blob),data:n.blob}}]});break}case"resource_link":e.push({type:"paragraph",content:[{type:"text",text:r.name??r.uri}]});break}return{type:"doc",content:e}}async function z(t){const e=t.getModel();if(!e)throw new Error("[Monaco] No model found in editor");const r=e.getValue(),i=r.replace(/export default (async )?function/,"export default $1function __default")+`
2
2
  type __ExpandRecursively<T> = T extends (...args: infer A) => infer R
3
3
  ? (...args: __ExpandRecursively<A>) => __ExpandRecursively<R>
4
4
  : T extends object
@@ -1,4 +1,4 @@
1
- import{r as d,bB as me,bx as Gr,c as cr,l as st,j as w}from"./index-D-9It9O8.js";import{w as Yr,e as Ae,s as fe,i as V,f as ur,r as ye,h as at,j as fr,J as nt,k as D,m as _,n as ue,o as we,p as Se,q as re,R as ct,L as de,t as Hr,v as Oe,x as Vr,y as qr,z as Ur,B as Zr,D as Le,E as He,F as Xr,G as Jr,H as Qr,I as ea,K as Ne,M as ze,N as q,O as ut,P as ft,Z as Ke,Q as dr,S as vr,T as pr,U as xe,V as mr,W as te,Y as ta,_ as yr,$ as he,a0 as ra,a1 as ie,a2 as ve,a3 as oe,a4 as pe,a5 as hr,a6 as gr,a7 as br,a8 as aa,a9 as na,aa as dt,ab as ia,ac as vt,ad as oa,ae as la,af as sa,ag as ca,ah as ua,ai as xr,aj as fa,ak as da,al as va,am as pa,an as ma,ao as Or,ap as ya,aq as Pr,ar as ha,as as jr,at as ga,au as ba,av as pt,aw as xa,ax as Oa,ay as Pa,az as ja,aA as $,aB as Aa,aC as ka,aD as Ia,aE as wa,aF as Sa,aG as Ea,aH as Ta,aI as Ca,aJ as Da,aK as Ma,aL as Ba,aM as $a,aN as _a,aO as La,aP as Na,X as mt,C as yt,A as za,b as Ka,c as ht}from"./AreaChart-BLkij4VQ.js";const Ar=Math.cos,Ee=Math.sin,U=Math.sqrt,Te=Math.PI,We=2*Te,it={draw(t,e){const r=U(e/Te);t.moveTo(r,0),t.arc(0,0,r,0,We)}},Wa={draw(t,e){const r=U(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},kr=U(1/3),Ra=kr*2,Fa={draw(t,e){const r=U(e/Ra),a=r*kr;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Ga={draw(t,e){const r=U(e),a=-r/2;t.rect(a,a,r,r)}},Ya=.8908130915292852,Ir=Ee(Te/10)/Ee(7*Te/10),Ha=Ee(We/10)*Ir,Va=-Ar(We/10)*Ir,qa={draw(t,e){const r=U(e*Ya),a=Ha*r,n=Va*r;t.moveTo(0,-r),t.lineTo(a,n);for(let i=1;i<5;++i){const l=We*i/5,f=Ar(l),o=Ee(l);t.lineTo(o*r,-f*r),t.lineTo(f*a-o*n,o*a+f*n)}t.closePath()}},Fe=U(3),Ua={draw(t,e){const r=-U(e/(Fe*3));t.moveTo(0,r*2),t.lineTo(-Fe*r,-r),t.lineTo(Fe*r,-r),t.closePath()}},G=-.5,Y=U(3)/2,Ve=1/U(12),Za=(Ve/2+1)*3,Xa={draw(t,e){const r=U(e/Za),a=r/2,n=r*Ve,i=a,l=r*Ve+r,f=-i,o=l;t.moveTo(a,n),t.lineTo(i,l),t.lineTo(f,o),t.lineTo(G*a-Y*n,Y*a+G*n),t.lineTo(G*i-Y*l,Y*i+G*l),t.lineTo(G*f-Y*o,Y*f+G*o),t.lineTo(G*a+Y*n,G*n-Y*a),t.lineTo(G*i+Y*l,G*l-Y*i),t.lineTo(G*f+Y*o,G*o-Y*f),t.closePath()}};function Ja(t,e){let r=null,a=Yr(n);t=typeof t=="function"?t:Ae(t||it),e=typeof e=="function"?e:Ae(e===void 0?64:+e);function n(){let i;if(r||(r=i=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(t=typeof i=="function"?i:Ae(i),n):t},n.size=function(i){return arguments.length?(e=typeof i=="function"?i:Ae(+i),n):e},n.context=function(i){return arguments.length?(r=i??null,n):r},n}var Qa="Invariant failed";function en(t,e){throw new Error(Qa)}var tn=["type","size","sizeType"];function qe(){return qe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},qe.apply(null,arguments)}function gt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function bt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gt(Object(r),!0).forEach(function(a){rn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function rn(t,e,r){return(e=an(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function an(t){var e=nn(t,"string");return typeof e=="symbol"?e:e+""}function nn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function on(t,e){if(t==null)return{};var r,a,n=ln(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ln(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var wr={symbolCircle:it,symbolCross:Wa,symbolDiamond:Fa,symbolSquare:Ga,symbolStar:qa,symbolTriangle:Ua,symbolWye:Xa},sn=Math.PI/180,cn=t=>{var e="symbol".concat(ur(t));return wr[e]||it},un=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*sn;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},fn=(t,e)=>{wr["symbol".concat(ur(t))]=e},Sr=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,n=on(t,tn),i=bt(bt({},n),{},{type:e,size:r,sizeType:a}),l="circle";typeof e=="string"&&(l=e);var f=()=>{var v=cn(l),m=Ja().type(v).size(un(r,a,l)),y=m();if(y!==null)return y},{className:o,cx:s,cy:c}=i,u=fe(i);return V(s)&&V(c)&&V(r)?d.createElement("path",qe({},u,{className:me("recharts-symbols",o),transform:"translate(".concat(s,", ").concat(c,")"),d:f()})):null};Sr.registerSymbol=fn;var xt=function(e,r){for(var a=arguments.length,n=new Array(a>2?a-2:0),i=2;i<a;i++)n[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>n[l++]))}},dn=["radius"],vn=["radius"],Ot,Pt,jt,At,kt,It,wt,St,Et,Tt;function Ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Dt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ct(Object(r),!0).forEach(function(a){pn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ct(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function pn(t,e,r){return(e=mn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mn(t){var e=yn(t,"string");return typeof e=="symbol"?e:e+""}function yn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ce(){return Ce=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ce.apply(null,arguments)}function Mt(t,e){if(t==null)return{};var r,a,n=hn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hn(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function J(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Bt=(t,e,r,a,n)=>{var i=ue(r),l=ue(a),f=Math.min(Math.abs(i)/2,Math.abs(l)/2),o=l>=0?1:-1,s=i>=0?1:-1,c=l>=0&&i>=0||l<0&&i<0?1:0,u;if(f>0&&Array.isArray(n)){for(var v=[0,0,0,0],m=0,y=4;m<y;m++){var h,b=(h=n[m])!==null&&h!==void 0?h:0;v[m]=b>f?f:b}u=D(Ot||(Ot=J(["M",",",""])),t,e+o*v[0]),v[0]>0&&(u+=D(Pt||(Pt=J(["A ",",",",0,0,",",",",",""])),v[0],v[0],c,t+s*v[0],e)),u+=D(jt||(jt=J(["L ",",",""])),t+r-s*v[1],e),v[1]>0&&(u+=D(At||(At=J(["A ",",",",0,0,",`,
1
+ import{r as d,bB as me,bx as Gr,c as cr,l as st,j as w}from"./index-CohYEXUC.js";import{w as Yr,e as Ae,s as fe,i as V,f as ur,r as ye,h as at,j as fr,J as nt,k as D,m as _,n as ue,o as we,p as Se,q as re,R as ct,L as de,t as Hr,v as Oe,x as Vr,y as qr,z as Ur,B as Zr,D as Le,E as He,F as Xr,G as Jr,H as Qr,I as ea,K as Ne,M as ze,N as q,O as ut,P as ft,Z as Ke,Q as dr,S as vr,T as pr,U as xe,V as mr,W as te,Y as ta,_ as yr,$ as he,a0 as ra,a1 as ie,a2 as ve,a3 as oe,a4 as pe,a5 as hr,a6 as gr,a7 as br,a8 as aa,a9 as na,aa as dt,ab as ia,ac as vt,ad as oa,ae as la,af as sa,ag as ca,ah as ua,ai as xr,aj as fa,ak as da,al as va,am as pa,an as ma,ao as Or,ap as ya,aq as Pr,ar as ha,as as jr,at as ga,au as ba,av as pt,aw as xa,ax as Oa,ay as Pa,az as ja,aA as $,aB as Aa,aC as ka,aD as Ia,aE as wa,aF as Sa,aG as Ea,aH as Ta,aI as Ca,aJ as Da,aK as Ma,aL as Ba,aM as $a,aN as _a,aO as La,aP as Na,X as mt,C as yt,A as za,b as Ka,c as ht}from"./AreaChart-CdRNAaTW.js";const Ar=Math.cos,Ee=Math.sin,U=Math.sqrt,Te=Math.PI,We=2*Te,it={draw(t,e){const r=U(e/Te);t.moveTo(r,0),t.arc(0,0,r,0,We)}},Wa={draw(t,e){const r=U(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},kr=U(1/3),Ra=kr*2,Fa={draw(t,e){const r=U(e/Ra),a=r*kr;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Ga={draw(t,e){const r=U(e),a=-r/2;t.rect(a,a,r,r)}},Ya=.8908130915292852,Ir=Ee(Te/10)/Ee(7*Te/10),Ha=Ee(We/10)*Ir,Va=-Ar(We/10)*Ir,qa={draw(t,e){const r=U(e*Ya),a=Ha*r,n=Va*r;t.moveTo(0,-r),t.lineTo(a,n);for(let i=1;i<5;++i){const l=We*i/5,f=Ar(l),o=Ee(l);t.lineTo(o*r,-f*r),t.lineTo(f*a-o*n,o*a+f*n)}t.closePath()}},Fe=U(3),Ua={draw(t,e){const r=-U(e/(Fe*3));t.moveTo(0,r*2),t.lineTo(-Fe*r,-r),t.lineTo(Fe*r,-r),t.closePath()}},G=-.5,Y=U(3)/2,Ve=1/U(12),Za=(Ve/2+1)*3,Xa={draw(t,e){const r=U(e/Za),a=r/2,n=r*Ve,i=a,l=r*Ve+r,f=-i,o=l;t.moveTo(a,n),t.lineTo(i,l),t.lineTo(f,o),t.lineTo(G*a-Y*n,Y*a+G*n),t.lineTo(G*i-Y*l,Y*i+G*l),t.lineTo(G*f-Y*o,Y*f+G*o),t.lineTo(G*a+Y*n,G*n-Y*a),t.lineTo(G*i+Y*l,G*l-Y*i),t.lineTo(G*f+Y*o,G*o-Y*f),t.closePath()}};function Ja(t,e){let r=null,a=Yr(n);t=typeof t=="function"?t:Ae(t||it),e=typeof e=="function"?e:Ae(e===void 0?64:+e);function n(){let i;if(r||(r=i=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(t=typeof i=="function"?i:Ae(i),n):t},n.size=function(i){return arguments.length?(e=typeof i=="function"?i:Ae(+i),n):e},n.context=function(i){return arguments.length?(r=i??null,n):r},n}var Qa="Invariant failed";function en(t,e){throw new Error(Qa)}var tn=["type","size","sizeType"];function qe(){return qe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},qe.apply(null,arguments)}function gt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function bt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gt(Object(r),!0).forEach(function(a){rn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function rn(t,e,r){return(e=an(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function an(t){var e=nn(t,"string");return typeof e=="symbol"?e:e+""}function nn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function on(t,e){if(t==null)return{};var r,a,n=ln(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ln(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var wr={symbolCircle:it,symbolCross:Wa,symbolDiamond:Fa,symbolSquare:Ga,symbolStar:qa,symbolTriangle:Ua,symbolWye:Xa},sn=Math.PI/180,cn=t=>{var e="symbol".concat(ur(t));return wr[e]||it},un=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*sn;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},fn=(t,e)=>{wr["symbol".concat(ur(t))]=e},Sr=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,n=on(t,tn),i=bt(bt({},n),{},{type:e,size:r,sizeType:a}),l="circle";typeof e=="string"&&(l=e);var f=()=>{var v=cn(l),m=Ja().type(v).size(un(r,a,l)),y=m();if(y!==null)return y},{className:o,cx:s,cy:c}=i,u=fe(i);return V(s)&&V(c)&&V(r)?d.createElement("path",qe({},u,{className:me("recharts-symbols",o),transform:"translate(".concat(s,", ").concat(c,")"),d:f()})):null};Sr.registerSymbol=fn;var xt=function(e,r){for(var a=arguments.length,n=new Array(a>2?a-2:0),i=2;i<a;i++)n[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>n[l++]))}},dn=["radius"],vn=["radius"],Ot,Pt,jt,At,kt,It,wt,St,Et,Tt;function Ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Dt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ct(Object(r),!0).forEach(function(a){pn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ct(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function pn(t,e,r){return(e=mn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mn(t){var e=yn(t,"string");return typeof e=="symbol"?e:e+""}function yn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ce(){return Ce=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ce.apply(null,arguments)}function Mt(t,e){if(t==null)return{};var r,a,n=hn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hn(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function J(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Bt=(t,e,r,a,n)=>{var i=ue(r),l=ue(a),f=Math.min(Math.abs(i)/2,Math.abs(l)/2),o=l>=0?1:-1,s=i>=0?1:-1,c=l>=0&&i>=0||l<0&&i<0?1:0,u;if(f>0&&Array.isArray(n)){for(var v=[0,0,0,0],m=0,y=4;m<y;m++){var h,b=(h=n[m])!==null&&h!==void 0?h:0;v[m]=b>f?f:b}u=D(Ot||(Ot=J(["M",",",""])),t,e+o*v[0]),v[0]>0&&(u+=D(Pt||(Pt=J(["A ",",",",0,0,",",",",",""])),v[0],v[0],c,t+s*v[0],e)),u+=D(jt||(jt=J(["L ",",",""])),t+r-s*v[1],e),v[1]>0&&(u+=D(At||(At=J(["A ",",",",0,0,",`,
2
2
  `,",",""])),v[1],v[1],c,t+r,e+o*v[1])),u+=D(kt||(kt=J(["L ",",",""])),t+r,e+a-o*v[2]),v[2]>0&&(u+=D(It||(It=J(["A ",",",",0,0,",`,
3
3
  `,",",""])),v[2],v[2],c,t+r-s*v[2],e+a)),u+=D(wt||(wt=J(["L ",",",""])),t+s*v[3],e+a),v[3]>0&&(u+=D(St||(St=J(["A ",",",",0,0,",`,
4
4
  `,",",""])),v[3],v[3],c,t,e+a-o*v[3])),u+="Z"}else if(f>0&&n===+n&&n>0){var p=Math.min(f,n);u=D(Et||(Et=J(["M ",",",`
@@ -1 +1 @@
1
- import{c as he,r as te,l as xe,j as t,B as pe}from"./index-D-9It9O8.js";import{B as ce}from"./badge-CqESM08z.js";import{C as de}from"./checkbox-D4_5XFQQ.js";import{t as me}from"./ChevronDown-V6fE1Rcs.js";import{b as ge,C as ve,a as ue,c as je,e as Ce,d as be}from"./command-D25pX-TQ.js";import{P as Ne,a as ye,b as we}from"./popover-DRqjILyu.js";function Ke(o){const e=he.c(74),{options:n,onValueChange:i,defaultValue:P,placeholder:se,variant:le,animation:ae,maxCount:ne,modalPopover:ie,asChild:oe,className:G,disabled:re,onSearchChange:V}=o;let _;e[0]!==P?(_=P===void 0?[]:P,e[0]=P,e[1]=_):_=e[1];const d=_,L=se===void 0?"Select items":se,E=le===void 0?"default":le,O=ae===void 0?0:ae,k=ne===void 0?3:ne,q=ie===void 0?!1:ie,H=oe===void 0?!1:oe,Q=re===void 0?!1:re,[s,S]=te.useState(d),[U,B]=te.useState(!1);let D,I;e[2]!==d||e[3]!==s?(D=()=>{JSON.stringify(s)!==JSON.stringify(d)&&S(d)},I=[d,s],e[2]=d,e[3]=s,e[4]=D,e[5]=I):(D=e[4],I=e[5]),te.useEffect(D,I);let K;e[6]!==i||e[7]!==s?(K=l=>{if(l.key==="Enter")B(!0);else if(l.key==="Backspace"&&!l.currentTarget.value){const a=[...s];a.pop(),S(a),i(a)}},e[6]=i,e[7]=s,e[8]=K):K=e[8];const W=K;let T;e[9]!==i||e[10]!==s?(T=l=>{const a=s.includes(l.value)?s.filter(w=>w!==l.value):[...s,l.value];S(a),i(a)},e[9]=i,e[10]=s,e[11]=T):T=e[11];const c=T;let $;e[12]!==i?($=()=>{S([]),i([])},e[12]=i,e[13]=$):$=e[13];const X=$;let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{B(Ve)},e[14]=z):z=e[14];const fe=z;let A;e[15]!==X||e[16]!==i||e[17]!==n||e[18]!==s.length?(A=()=>{if(s.length===n.length)X();else{const l=n.map(Pe);S(l),i(l)}},e[15]=X,e[16]=i,e[17]=n,e[18]=s.length,e[19]=A):A=e[19];const r=A;let m;e[20]!==H?(m=H?{}:{variant:"outline"},e[20]=H,e[21]=m):m=e[21];let u;e[22]!==G?(u=xe("border-input data-[placeholder]: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 dark:hover:bg-input/50 flex w-full max-w-xs items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 h-10 min-h-10",G),e[22]=G,e[23]=u):u=e[23];let f;e[24]!==O||e[25]!==k||e[26]!==n||e[27]!==L||e[28]!==s||e[29]!==E?(f=s.length>0?t.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[s.slice(0,k).map(l=>{const a=n.find(ee=>ee.value===l),w=a?.icon;return t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"max-w-24",style:{animationDuration:`${O}s`},children:[w&&t.jsx(w,{className:"h-3 w-3 shrink-0"}),t.jsx("span",{className:"truncate",children:a?.label})]},l)}),s.length>k&&t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"flex-shrink-0",style:{animationDuration:`${O}s`},children:["+",s.length-k]})]}),t.jsx("div",{className:"flex items-center shrink-0 ml-2",children:t.jsx(me,{size:20,className:"shrink-0 opacity-50"})})]}):t.jsxs("div",{className:"flex items-center justify-between w-full",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:L}),t.jsx(me,{size:20,className:"shrink-0 opacity-50"})]}),e[24]=O,e[25]=k,e[26]=n,e[27]=L,e[28]=s,e[29]=E,e[30]=f):f=e[30];let h;e[31]!==Q||e[32]!==m||e[33]!==u||e[34]!==f?(h=t.jsx(Ne,{asChild:!0,children:t.jsx(pe,{ref:null,...m,onClick:fe,className:u,disabled:Q,children:f})}),e[31]=Q,e[32]=m,e[33]=u,e[34]=f,e[35]=h):h=e[35];let J;e[36]===Symbol.for("react.memo_cache_sentinel")?(J=()=>B(!1),e[36]=J):J=e[36];const Y=!V;let x;e[37]!==W||e[38]!==V?(x=t.jsx(ge,{placeholder:"Search...",onKeyDown:W,onValueChange:V,className:"rounded-t-xl"}),e[37]=W,e[38]=V,e[39]=x):x=e[39];let M;e[40]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(ve,{children:"No results found."}),e[40]=M):M=e[40];let p;e[41]!==r?(p=()=>{r()},e[41]=r,e[42]=p):p=e[42];let g;e[43]!==r?(g=l=>{l.stopPropagation(),r()},e[43]=r,e[44]=g):g=e[44];const Z=s.length===n.length&&n.length>0;let v;e[45]!==Z||e[46]!==r?(v=t.jsx(de,{checked:Z,onCheckedChange:r,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:Se}),e[45]=Z,e[46]=r,e[47]=v):v=e[47];let R;e[48]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("span",{children:"(Select All)"}),e[48]=R):R=e[48];let j;e[49]!==g||e[50]!==v?(j=t.jsxs("div",{className:"flex items-center w-full",onClick:g,children:[v,R]}),e[49]=g,e[50]=v,e[51]=j):j=e[51];let C;e[52]!==p||e[53]!==j?(C=t.jsx(ue,{onSelect:p,className:"cursor-pointer",children:j},"all"),e[52]=p,e[53]=j,e[54]=C):C=e[54];let b;if(e[55]!==n||e[56]!==s||e[57]!==c){let l;e[59]!==s||e[60]!==c?(l=a=>{const w=s.includes(a.value);return t.jsx(ue,{onSelect:()=>{c(a)},className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center w-full",onClick:ee=>{ee.stopPropagation(),c(a)},children:[t.jsx(de,{checked:w,onCheckedChange:()=>{c(a)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:ke}),a.icon&&t.jsx(a.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),t.jsx("span",{children:a.label})]})},a.value)},e[59]=s,e[60]=c,e[61]=l):l=e[61],b=n.map(l),e[55]=n,e[56]=s,e[57]=c,e[58]=b}else b=e[58];let N;e[62]!==C||e[63]!==b?(N=t.jsxs(je,{className:"rounded-b-xl",children:[M,t.jsxs(Ce,{children:[C,b]})]}),e[62]=C,e[63]=b,e[64]=N):N=e[64];let y;e[65]!==Y||e[66]!==x||e[67]!==N?(y=t.jsx(ye,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:J,children:t.jsxs(be,{shouldFilter:Y,className:"rounded-xl",children:[x,N]})}),e[65]=Y,e[66]=x,e[67]=N,e[68]=y):y=e[68];let F;return e[69]!==U||e[70]!==q||e[71]!==h||e[72]!==y?(F=t.jsxs(we,{open:U,onOpenChange:B,modal:q,children:[h,y]}),e[69]=U,e[70]=q,e[71]=h,e[72]=y,e[73]=F):F=e[73],F}function ke(o){return o.stopPropagation()}function Se(o){return o.stopPropagation()}function Pe(o){return o.value}function Ve(o){return!o}export{Ke as M};
1
+ import{c as he,r as te,l as xe,j as t,B as pe}from"./index-CohYEXUC.js";import{B as ce}from"./badge-DGFRrczB.js";import{C as de}from"./checkbox-n-zGS588.js";import{t as me}from"./ChevronDown-Ce0JNwG8.js";import{b as ge,C as ve,a as ue,c as je,e as Ce,d as be}from"./command-Bijkf_mr.js";import{P as Ne,a as ye,b as we}from"./popover-CMMyXpPK.js";function Ke(o){const e=he.c(74),{options:n,onValueChange:i,defaultValue:P,placeholder:se,variant:le,animation:ae,maxCount:ne,modalPopover:ie,asChild:oe,className:G,disabled:re,onSearchChange:V}=o;let _;e[0]!==P?(_=P===void 0?[]:P,e[0]=P,e[1]=_):_=e[1];const d=_,L=se===void 0?"Select items":se,E=le===void 0?"default":le,O=ae===void 0?0:ae,k=ne===void 0?3:ne,q=ie===void 0?!1:ie,H=oe===void 0?!1:oe,Q=re===void 0?!1:re,[s,S]=te.useState(d),[U,B]=te.useState(!1);let D,I;e[2]!==d||e[3]!==s?(D=()=>{JSON.stringify(s)!==JSON.stringify(d)&&S(d)},I=[d,s],e[2]=d,e[3]=s,e[4]=D,e[5]=I):(D=e[4],I=e[5]),te.useEffect(D,I);let K;e[6]!==i||e[7]!==s?(K=l=>{if(l.key==="Enter")B(!0);else if(l.key==="Backspace"&&!l.currentTarget.value){const a=[...s];a.pop(),S(a),i(a)}},e[6]=i,e[7]=s,e[8]=K):K=e[8];const W=K;let T;e[9]!==i||e[10]!==s?(T=l=>{const a=s.includes(l.value)?s.filter(w=>w!==l.value):[...s,l.value];S(a),i(a)},e[9]=i,e[10]=s,e[11]=T):T=e[11];const c=T;let $;e[12]!==i?($=()=>{S([]),i([])},e[12]=i,e[13]=$):$=e[13];const X=$;let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{B(Ve)},e[14]=z):z=e[14];const fe=z;let A;e[15]!==X||e[16]!==i||e[17]!==n||e[18]!==s.length?(A=()=>{if(s.length===n.length)X();else{const l=n.map(Pe);S(l),i(l)}},e[15]=X,e[16]=i,e[17]=n,e[18]=s.length,e[19]=A):A=e[19];const r=A;let m;e[20]!==H?(m=H?{}:{variant:"outline"},e[20]=H,e[21]=m):m=e[21];let u;e[22]!==G?(u=xe("border-input data-[placeholder]: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 dark:hover:bg-input/50 flex w-full max-w-xs items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 h-10 min-h-10",G),e[22]=G,e[23]=u):u=e[23];let f;e[24]!==O||e[25]!==k||e[26]!==n||e[27]!==L||e[28]!==s||e[29]!==E?(f=s.length>0?t.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[s.slice(0,k).map(l=>{const a=n.find(ee=>ee.value===l),w=a?.icon;return t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"max-w-24",style:{animationDuration:`${O}s`},children:[w&&t.jsx(w,{className:"h-3 w-3 shrink-0"}),t.jsx("span",{className:"truncate",children:a?.label})]},l)}),s.length>k&&t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"flex-shrink-0",style:{animationDuration:`${O}s`},children:["+",s.length-k]})]}),t.jsx("div",{className:"flex items-center shrink-0 ml-2",children:t.jsx(me,{size:20,className:"shrink-0 opacity-50"})})]}):t.jsxs("div",{className:"flex items-center justify-between w-full",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:L}),t.jsx(me,{size:20,className:"shrink-0 opacity-50"})]}),e[24]=O,e[25]=k,e[26]=n,e[27]=L,e[28]=s,e[29]=E,e[30]=f):f=e[30];let h;e[31]!==Q||e[32]!==m||e[33]!==u||e[34]!==f?(h=t.jsx(Ne,{asChild:!0,children:t.jsx(pe,{ref:null,...m,onClick:fe,className:u,disabled:Q,children:f})}),e[31]=Q,e[32]=m,e[33]=u,e[34]=f,e[35]=h):h=e[35];let J;e[36]===Symbol.for("react.memo_cache_sentinel")?(J=()=>B(!1),e[36]=J):J=e[36];const Y=!V;let x;e[37]!==W||e[38]!==V?(x=t.jsx(ge,{placeholder:"Search...",onKeyDown:W,onValueChange:V,className:"rounded-t-xl"}),e[37]=W,e[38]=V,e[39]=x):x=e[39];let M;e[40]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(ve,{children:"No results found."}),e[40]=M):M=e[40];let p;e[41]!==r?(p=()=>{r()},e[41]=r,e[42]=p):p=e[42];let g;e[43]!==r?(g=l=>{l.stopPropagation(),r()},e[43]=r,e[44]=g):g=e[44];const Z=s.length===n.length&&n.length>0;let v;e[45]!==Z||e[46]!==r?(v=t.jsx(de,{checked:Z,onCheckedChange:r,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:Se}),e[45]=Z,e[46]=r,e[47]=v):v=e[47];let R;e[48]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("span",{children:"(Select All)"}),e[48]=R):R=e[48];let j;e[49]!==g||e[50]!==v?(j=t.jsxs("div",{className:"flex items-center w-full",onClick:g,children:[v,R]}),e[49]=g,e[50]=v,e[51]=j):j=e[51];let C;e[52]!==p||e[53]!==j?(C=t.jsx(ue,{onSelect:p,className:"cursor-pointer",children:j},"all"),e[52]=p,e[53]=j,e[54]=C):C=e[54];let b;if(e[55]!==n||e[56]!==s||e[57]!==c){let l;e[59]!==s||e[60]!==c?(l=a=>{const w=s.includes(a.value);return t.jsx(ue,{onSelect:()=>{c(a)},className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center w-full",onClick:ee=>{ee.stopPropagation(),c(a)},children:[t.jsx(de,{checked:w,onCheckedChange:()=>{c(a)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:ke}),a.icon&&t.jsx(a.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),t.jsx("span",{children:a.label})]})},a.value)},e[59]=s,e[60]=c,e[61]=l):l=e[61],b=n.map(l),e[55]=n,e[56]=s,e[57]=c,e[58]=b}else b=e[58];let N;e[62]!==C||e[63]!==b?(N=t.jsxs(je,{className:"rounded-b-xl",children:[M,t.jsxs(Ce,{children:[C,b]})]}),e[62]=C,e[63]=b,e[64]=N):N=e[64];let y;e[65]!==Y||e[66]!==x||e[67]!==N?(y=t.jsx(ye,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:J,children:t.jsxs(be,{shouldFilter:Y,className:"rounded-xl",children:[x,N]})}),e[65]=Y,e[66]=x,e[67]=N,e[68]=y):y=e[68];let F;return e[69]!==U||e[70]!==q||e[71]!==h||e[72]!==y?(F=t.jsxs(we,{open:U,onOpenChange:B,modal:q,children:[h,y]}),e[69]=U,e[70]=q,e[71]=h,e[72]=y,e[73]=F):F=e[73],F}function ke(o){return o.stopPropagation()}function Se(o){return o.stopPropagation()}function Pe(o){return o.value}function Ve(o){return!o}export{Ke as M};
@@ -1 +1 @@
1
- import{r,j as e,i as n}from"./index-D-9It9O8.js";import{h as l}from"./mcp-oauth-DHOrFgRs.js";import"./auth-B1cxztc2.js";function h(){const[s,c]=r.useState(null),[i,a]=r.useState(!1);return r.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[i&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!i&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":i?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):i?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
1
+ import{r,j as e,i as n}from"./index-CohYEXUC.js";import{h as l}from"./mcp-oauth-DmLpmBfh.js";import"./auth-BbW7SMY9.js";function h(){const[s,c]=r.useState(null),[i,a]=r.useState(!1);return r.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[i&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!i&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":i?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):i?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
@@ -1 +1 @@
1
- import{r,j as e,i as d}from"./index-D-9It9O8.js";function m(){const[s,i]=r.useState("loading"),[o,l]=r.useState(null),c=r.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),a=t.get("code"),n=t.get("state");if(!a||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:a,stateToken:n},window.location.origin),i("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),l(t instanceof Error?t.message:String(t)),i("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(d,{size:32,className:"animate-spin text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s==="error"?"Authentication Failed":s==="success"?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:o}),e.jsx("p",{className:"mt-2",children:"This window will close automatically."})]}):s==="success"?e.jsx("p",{children:"Authentication complete. This window will close automatically."}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{m as default};
1
+ import{r,j as e,i as d}from"./index-CohYEXUC.js";function m(){const[s,i]=r.useState("loading"),[o,l]=r.useState(null),c=r.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),a=t.get("code"),n=t.get("state");if(!a||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:a,stateToken:n},window.location.origin),i("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),l(t instanceof Error?t.message:String(t)),i("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(d,{size:32,className:"animate-spin text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s==="error"?"Authentication Failed":s==="success"?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:o}),e.jsx("p",{className:"mt-2",children:"This window will close automatically."})]}):s==="success"?e.jsx("p",{children:"Authentication complete. This window will close automatically."}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{m as default};
@@ -1 +1 @@
1
- import{c as K,j as t,a as re,i as X,r as E,m as pe,K as he,B as ce,d as oe,l as W,t as me}from"./index-D-9It9O8.js";import{R as xe}from"./required-auth-layout-oEFRt1ot.js";import{A as J}from"./auth-split-layout-BRGfXuGe.js";import{O as be}from"./organization-choice-CioIzPaI.js";import{A as de}from"./avatar-Bx5rROx7.js";import{I as je}from"./input-BAMDOJs0.js";import{L as ye}from"./label-la-FXX9j.js";import{S as ve}from"./switch-D2IG2BwL.js";import{t as Ne,a as Se}from"./Users03-DKog3mgS.js";import{i as we}from"./CheckCircle-BQl0d83F.js";import{t as ze}from"./Globe04-DOYzTQsa.js";import{a as ke}from"./Palette-NkhqFqPA.js";import{i as Ce}from"./Upload01-BkxnL7Jx.js";import"./User01-pcBROZrv.js";const _e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=K.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=K.c(13),{title:g,description:c,logoUrl:u,logoFallback:o}=i;let a;e[0]!==o||e[1]!==u?(a=t.jsx("div",{children:u?t.jsx(de,{url:u,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=u,e[2]=a):a=e[2];let r;e[3]!==g?(r=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=r):r=e[4];let n;e[5]!==c?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:c}),e[5]=c,e[6]=n):n=e[6];let f;e[7]!==r||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[r,n]}),e[7]=r,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=K.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(J,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const c=e?.user?.email??"",u=e?.user?.name;let o;return i[1]!==u||i[2]!==c?(o=t.jsx(Ee,{email:c,userName:u}),i[1]=u,i[2]=c,i[3]=o):o=i[3],o}function Ee(i){const e=K.c(54),{email:g,userName:c}=i;let u,o,a,r,n,f;if(e[0]!==g||e[1]!==c){a=g.split("@")[1]?.toLowerCase()??"",r=!!a&&!_e.has(a);const l=a.split(".")[0]??"";o=l.charAt(0).toUpperCase()+l.slice(1);let m;e[8]!==o||e[9]!==r||e[10]!==c?(m=r?o:c?.split(" ")[0]??"",e[8]=o,e[9]=r,e[10]=c,e[11]=m):m=e[11],u=m,f=pe,n=he.domainLookup(a),e[0]=g,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=n,e[7]=f}else u=e[2],o=e[3],a=e[4],r=e[5],n=e[6],f=e[7];let s;e[12]!==r||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:r},e[12]=r,e[13]=n,e[14]=s):s=e[14];const{data:j,isLoading:d,isError:N,refetch:p}=f(s);let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=new Set,e[15]=L):L=e[15];const[k,C]=E.useState(L),[A,_]=E.useState(!1);if(d){let l;e[16]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=l):l=e[16];let m;return e[17]!==a?(m=t.jsx(J,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=m):m=e[18],m}if(N){let l;e[19]!==a?(l=t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Couldn't check ",a," for an existing organization."]}),e[19]=a,e[20]=l):l=e[20];let m;e[21]!==p?(m=t.jsx(ce,{variant:"outline",size:"sm",onClick:()=>p(),children:"Retry"}),e[21]=p,e[22]=m):m=e[22];let h;return e[23]!==l||e[24]!==m?(h=t.jsx(J,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[l,m]})}),e[23]=l,e[24]=m,e[25]=h):h=e[25],h}let y,b;e[26]!==j?.organizations?(y=(j?.organizations??[]).flatMap(Pe),b=y.some(Ae),e[26]=j?.organizations,e[27]=y,e[28]=b):(y=e[27],b=e[28]);const $=b;if(A){let l;e[29]!==c?(l=c?.split(" ")[0]??"",e[29]=c,e[30]=l):l=e[30];let m;e[31]===Symbol.for("react.memo_cache_sentinel")?(m=()=>_(!1),e[31]=m):m=e[31];let h;return e[32]!==o||e[33]!==a||e[34]!==r||e[35]!==l?(h=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:l,allowDomainClaim:!1,onBack:m}),e[32]=o,e[33]=a,e[34]=r,e[35]=l,e[36]=h):h=e[36],h}if(y.length>0){const l=$?y.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",m=$?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[37]!==l||e[38]!==m?(h=t.jsx(ie,{title:l,description:m}),e[37]=l,e[38]=m,e[39]=h):h=e[39];let z;e[40]===Symbol.for("react.memo_cache_sentinel")?(z=D=>C(R=>new Set(R).add(D)),e[40]=z):z=e[40];let S;e[41]!==y||e[42]!==a||e[43]!==k?(S=t.jsx(be,{organizations:y,domain:a,requestedSlugs:k,onRequestedSlug:z,onJoined:Le}),e[41]=y,e[42]=a,e[43]=k,e[44]=S):S=e[44];let P;e[45]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>_(!0),children:"Create a new organization instead"}),e[45]=P):P=e[45];let O;return e[46]!==S||e[47]!==h?(O=t.jsx(J,{children:t.jsxs("div",{className:"grid gap-10",children:[h,S,P]})}),e[46]=S,e[47]=h,e[48]=O):O=e[48],O}let w;return e[49]!==u||e[50]!==o||e[51]!==a||e[52]!==r?(w=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:u}),e[49]=u,e[50]=o,e[51]=a,e[52]=r,e[53]=w):w=e[53],w}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function ne(i){const e=K.c(70),{isCorporateEmail:g,emailDomain:c,domainLabel:u,defaultName:o,allowDomainClaim:a,onBack:r}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${c}&sz=128`:null,[s,j]=E.useState(o),[d,N]=E.useState(f),[p,L]=E.useState(!0),[k,C]=E.useState(null);let A;e[0]!==p||e[1]!==d||e[2]!==s?(A=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:d??void 0,claimDomain:p})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error||"Failed to set up organization");return v},e[0]=p,e[1]=d,e[2]=s,e[3]=A):A=e[3];let _;e[4]!==p?(_=x=>{if(!x.slug)return;const v=ue.filter(ge=>p||!ge.claimOnly).length,G=fe*(v-1)+800;C(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},G)},e[4]=p,e[5]=_):_=e[5];let y;e[6]!==A||e[7]!==_?(y={mutationFn:A,onSuccess:_},e[6]=A,e[7]=_,e[8]=y):y=e[8];const b=oe(y);let $;e[9]!==d||e[10]!==s?($={mutationFn:async()=>{const x=s.trim(),v=se(x);if(!v)throw new Error("Invalid organization name");const G=await re.organization.create({name:x,slug:v,...d?{logo:d}:{}});if(G?.error)throw new Error(G.error.message||"Failed to create organization");window.location.href=`/${G?.data?.slug??v}`}},e[9]=d,e[10]=s,e[11]=$):$=e[11];const w=oe($);if(b.isPending||k){let x;e[12]!==u||e[13]!==s?(x=s.trim()||u,e[12]=u,e[13]=s,e[14]=x):x=e[14];let v;return e[15]!==p||e[16]!==c||e[17]!==d||e[18]!==x?(v=t.jsx(J,{children:t.jsx(Fe,{orgName:x,domain:c,claimDomain:p,logoUrl:d})}),e[15]=p,e[16]=c,e[17]=d,e[18]=x,e[19]=v):v=e[19],v}const l=w.isPending;let m;e[20]!==s?(m=se(s.trim()),e[20]=s,e[21]=m):m=e[21];const h=!!m,z=b.error||w.error||null;let S;e[22]!==n||e[23]!==h||e[24]!==w||e[25]!==b||e[26]!==g?(S=x=>{x.preventDefault(),h&&(g&&n?b.mutate():w.mutate())},e[22]=n,e[23]=h,e[24]=w,e[25]=b,e[26]=g,e[27]=S):S=e[27];const P=S;let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=O):O=e[28];let D;e[29]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=D):D=e[29];let R;e[30]!==o||e[31]!==s?(R=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=R):R=e[32];const Z=l||b.isPending;let F;e[33]!==d||e[34]!==R||e[35]!==Z?(F=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[D,t.jsx($e,{value:d,fallback:R,onChange:N,disabled:Z})]}),e[33]=d,e[34]=R,e[35]=Z,e[36]=F):F=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>j(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=l||b.isPending;let M;e[39]!==s||e[40]!==ee||e[41]!==te?(M=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=M):M=e[42];let q;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==c||e[47]!==g||e[48]!==l?(q=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",c," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",c," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:L,disabled:l||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=c,e[47]=g,e[48]=l,e[49]=q):q=e[49];let U;e[50]!==F||e[51]!==M||e[52]!==q?(U=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[F,M,q]}),e[50]=F,e[51]=M,e[52]=q,e[53]=U):U=e[53];let T;e[54]!==z?(T=z&&t.jsx("p",{className:"text-xs text-destructive",children:z instanceof Error?z.message:"Failed to create organization"}),e[54]=z,e[55]=T):T=e[55];const ae=!h||l||b.isPending;let I;e[56]!==b.isPending||e[57]!==l?(I=l||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=l,e[58]=I):I=e[58];let B;e[59]!==ae||e[60]!==I?(B=t.jsx(ce,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:I}),e[59]=ae,e[60]=I,e[61]=B):B=e[61];let Y;e[62]!==r?(Y=r&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:r,children:"See available organizations"}),e[62]=r,e[63]=Y):Y=e[63];let V;return e[64]!==P||e[65]!==U||e[66]!==T||e[67]!==B||e[68]!==Y?(V=t.jsx(J,{children:t.jsxs("form",{onSubmit:P,className:"grid gap-10",children:[O,U,T,B,Y]})}),e[64]=P,e[65]=U,e[66]=T,e[67]=B,e[68]=Y,e[69]=V):V=e[69],V}function $e(i){const e=K.c(14),{value:g,fallback:c,onChange:u,disabled:o}=i,a=E.useRef(null);let r;e[0]!==u?(r=L=>{const k=L.target.files?.[0];if(!k)return;if(k.size>2097152){me.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const C=new FileReader;C.onerror=De,C.onloadend=()=>{C.result&&u(C.result),a.current&&(a.current.value="")},C.readAsDataURL(k)},e[0]=u,e[1]=r):r=e[1];const n=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const j=g??void 0;let d;e[6]!==c||e[7]!==j?(d=t.jsx(de,{url:j,fallback:c,shape:"square",size:"base"}),e[6]=c,e[7]=j,e[8]=d):d=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Ce,{size:14,className:"text-white"})}),e[9]=N):N=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==d?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,d,N]}),e[10]=o,e[11]=s,e[12]=d,e[13]=p):p=e[13],p}function De(){return me.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:c}){const u=ue.filter(n=>g||!n.claimOnly),[o,a]=E.useState(0),r=E.useRef(!1);if(!r.current){r.current=!0;for(let n=1;n<u.length;n++)setTimeout(()=>a(n),fe*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:c??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:u.map((n,f)=>{const s=n.icon,j=f===o,d=f<o,N=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||j?1:.4},children:[t.jsxs("span",{className:W("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(j?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:N.bg,color:N.fg}:void 0,children:[t.jsx(we,{size:16,className:W("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:W("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",j?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:W("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!j?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:W("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",j||d?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
1
+ import{c as K,j as t,a as re,i as X,r as E,m as pe,K as he,B as ce,d as oe,l as W,t as me}from"./index-CohYEXUC.js";import{R as xe}from"./required-auth-layout-DrnK06MM.js";import{A as J}from"./auth-split-layout-Dfl544OM.js";import{O as be}from"./organization-choice-Wkdav7l-.js";import{A as de}from"./avatar-DMDa5Fmk.js";import{I as je}from"./input-DooN4jkj.js";import{L as ye}from"./label-CHVjglvp.js";import{S as ve}from"./switch-CCu5HEzP.js";import{t as Ne,a as Se}from"./Users03-CHK21j2b.js";import{i as we}from"./CheckCircle-tljwuhuM.js";import{t as ze}from"./Globe04-DzUT07Cn.js";import{a as ke}from"./Palette-B-oF6tIa.js";import{i as Ce}from"./Upload01-BXr1BH_I.js";import"./User01-C7ZuARbC.js";const _e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=K.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=K.c(13),{title:g,description:c,logoUrl:u,logoFallback:o}=i;let a;e[0]!==o||e[1]!==u?(a=t.jsx("div",{children:u?t.jsx(de,{url:u,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=u,e[2]=a):a=e[2];let r;e[3]!==g?(r=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=r):r=e[4];let n;e[5]!==c?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:c}),e[5]=c,e[6]=n):n=e[6];let f;e[7]!==r||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[r,n]}),e[7]=r,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=K.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(J,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const c=e?.user?.email??"",u=e?.user?.name;let o;return i[1]!==u||i[2]!==c?(o=t.jsx(Ee,{email:c,userName:u}),i[1]=u,i[2]=c,i[3]=o):o=i[3],o}function Ee(i){const e=K.c(54),{email:g,userName:c}=i;let u,o,a,r,n,f;if(e[0]!==g||e[1]!==c){a=g.split("@")[1]?.toLowerCase()??"",r=!!a&&!_e.has(a);const l=a.split(".")[0]??"";o=l.charAt(0).toUpperCase()+l.slice(1);let m;e[8]!==o||e[9]!==r||e[10]!==c?(m=r?o:c?.split(" ")[0]??"",e[8]=o,e[9]=r,e[10]=c,e[11]=m):m=e[11],u=m,f=pe,n=he.domainLookup(a),e[0]=g,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=n,e[7]=f}else u=e[2],o=e[3],a=e[4],r=e[5],n=e[6],f=e[7];let s;e[12]!==r||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:r},e[12]=r,e[13]=n,e[14]=s):s=e[14];const{data:j,isLoading:d,isError:N,refetch:p}=f(s);let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=new Set,e[15]=L):L=e[15];const[k,C]=E.useState(L),[A,_]=E.useState(!1);if(d){let l;e[16]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=l):l=e[16];let m;return e[17]!==a?(m=t.jsx(J,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=m):m=e[18],m}if(N){let l;e[19]!==a?(l=t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Couldn't check ",a," for an existing organization."]}),e[19]=a,e[20]=l):l=e[20];let m;e[21]!==p?(m=t.jsx(ce,{variant:"outline",size:"sm",onClick:()=>p(),children:"Retry"}),e[21]=p,e[22]=m):m=e[22];let h;return e[23]!==l||e[24]!==m?(h=t.jsx(J,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[l,m]})}),e[23]=l,e[24]=m,e[25]=h):h=e[25],h}let y,b;e[26]!==j?.organizations?(y=(j?.organizations??[]).flatMap(Pe),b=y.some(Ae),e[26]=j?.organizations,e[27]=y,e[28]=b):(y=e[27],b=e[28]);const $=b;if(A){let l;e[29]!==c?(l=c?.split(" ")[0]??"",e[29]=c,e[30]=l):l=e[30];let m;e[31]===Symbol.for("react.memo_cache_sentinel")?(m=()=>_(!1),e[31]=m):m=e[31];let h;return e[32]!==o||e[33]!==a||e[34]!==r||e[35]!==l?(h=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:l,allowDomainClaim:!1,onBack:m}),e[32]=o,e[33]=a,e[34]=r,e[35]=l,e[36]=h):h=e[36],h}if(y.length>0){const l=$?y.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",m=$?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[37]!==l||e[38]!==m?(h=t.jsx(ie,{title:l,description:m}),e[37]=l,e[38]=m,e[39]=h):h=e[39];let z;e[40]===Symbol.for("react.memo_cache_sentinel")?(z=D=>C(R=>new Set(R).add(D)),e[40]=z):z=e[40];let S;e[41]!==y||e[42]!==a||e[43]!==k?(S=t.jsx(be,{organizations:y,domain:a,requestedSlugs:k,onRequestedSlug:z,onJoined:Le}),e[41]=y,e[42]=a,e[43]=k,e[44]=S):S=e[44];let P;e[45]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>_(!0),children:"Create a new organization instead"}),e[45]=P):P=e[45];let O;return e[46]!==S||e[47]!==h?(O=t.jsx(J,{children:t.jsxs("div",{className:"grid gap-10",children:[h,S,P]})}),e[46]=S,e[47]=h,e[48]=O):O=e[48],O}let w;return e[49]!==u||e[50]!==o||e[51]!==a||e[52]!==r?(w=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:u}),e[49]=u,e[50]=o,e[51]=a,e[52]=r,e[53]=w):w=e[53],w}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function ne(i){const e=K.c(70),{isCorporateEmail:g,emailDomain:c,domainLabel:u,defaultName:o,allowDomainClaim:a,onBack:r}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${c}&sz=128`:null,[s,j]=E.useState(o),[d,N]=E.useState(f),[p,L]=E.useState(!0),[k,C]=E.useState(null);let A;e[0]!==p||e[1]!==d||e[2]!==s?(A=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:d??void 0,claimDomain:p})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error||"Failed to set up organization");return v},e[0]=p,e[1]=d,e[2]=s,e[3]=A):A=e[3];let _;e[4]!==p?(_=x=>{if(!x.slug)return;const v=ue.filter(ge=>p||!ge.claimOnly).length,G=fe*(v-1)+800;C(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},G)},e[4]=p,e[5]=_):_=e[5];let y;e[6]!==A||e[7]!==_?(y={mutationFn:A,onSuccess:_},e[6]=A,e[7]=_,e[8]=y):y=e[8];const b=oe(y);let $;e[9]!==d||e[10]!==s?($={mutationFn:async()=>{const x=s.trim(),v=se(x);if(!v)throw new Error("Invalid organization name");const G=await re.organization.create({name:x,slug:v,...d?{logo:d}:{}});if(G?.error)throw new Error(G.error.message||"Failed to create organization");window.location.href=`/${G?.data?.slug??v}`}},e[9]=d,e[10]=s,e[11]=$):$=e[11];const w=oe($);if(b.isPending||k){let x;e[12]!==u||e[13]!==s?(x=s.trim()||u,e[12]=u,e[13]=s,e[14]=x):x=e[14];let v;return e[15]!==p||e[16]!==c||e[17]!==d||e[18]!==x?(v=t.jsx(J,{children:t.jsx(Fe,{orgName:x,domain:c,claimDomain:p,logoUrl:d})}),e[15]=p,e[16]=c,e[17]=d,e[18]=x,e[19]=v):v=e[19],v}const l=w.isPending;let m;e[20]!==s?(m=se(s.trim()),e[20]=s,e[21]=m):m=e[21];const h=!!m,z=b.error||w.error||null;let S;e[22]!==n||e[23]!==h||e[24]!==w||e[25]!==b||e[26]!==g?(S=x=>{x.preventDefault(),h&&(g&&n?b.mutate():w.mutate())},e[22]=n,e[23]=h,e[24]=w,e[25]=b,e[26]=g,e[27]=S):S=e[27];const P=S;let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=O):O=e[28];let D;e[29]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=D):D=e[29];let R;e[30]!==o||e[31]!==s?(R=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=R):R=e[32];const Z=l||b.isPending;let F;e[33]!==d||e[34]!==R||e[35]!==Z?(F=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[D,t.jsx($e,{value:d,fallback:R,onChange:N,disabled:Z})]}),e[33]=d,e[34]=R,e[35]=Z,e[36]=F):F=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>j(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=l||b.isPending;let M;e[39]!==s||e[40]!==ee||e[41]!==te?(M=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=M):M=e[42];let q;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==c||e[47]!==g||e[48]!==l?(q=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",c," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",c," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:L,disabled:l||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=c,e[47]=g,e[48]=l,e[49]=q):q=e[49];let U;e[50]!==F||e[51]!==M||e[52]!==q?(U=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[F,M,q]}),e[50]=F,e[51]=M,e[52]=q,e[53]=U):U=e[53];let T;e[54]!==z?(T=z&&t.jsx("p",{className:"text-xs text-destructive",children:z instanceof Error?z.message:"Failed to create organization"}),e[54]=z,e[55]=T):T=e[55];const ae=!h||l||b.isPending;let I;e[56]!==b.isPending||e[57]!==l?(I=l||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=l,e[58]=I):I=e[58];let B;e[59]!==ae||e[60]!==I?(B=t.jsx(ce,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:I}),e[59]=ae,e[60]=I,e[61]=B):B=e[61];let Y;e[62]!==r?(Y=r&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:r,children:"See available organizations"}),e[62]=r,e[63]=Y):Y=e[63];let V;return e[64]!==P||e[65]!==U||e[66]!==T||e[67]!==B||e[68]!==Y?(V=t.jsx(J,{children:t.jsxs("form",{onSubmit:P,className:"grid gap-10",children:[O,U,T,B,Y]})}),e[64]=P,e[65]=U,e[66]=T,e[67]=B,e[68]=Y,e[69]=V):V=e[69],V}function $e(i){const e=K.c(14),{value:g,fallback:c,onChange:u,disabled:o}=i,a=E.useRef(null);let r;e[0]!==u?(r=L=>{const k=L.target.files?.[0];if(!k)return;if(k.size>2097152){me.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const C=new FileReader;C.onerror=De,C.onloadend=()=>{C.result&&u(C.result),a.current&&(a.current.value="")},C.readAsDataURL(k)},e[0]=u,e[1]=r):r=e[1];const n=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const j=g??void 0;let d;e[6]!==c||e[7]!==j?(d=t.jsx(de,{url:j,fallback:c,shape:"square",size:"base"}),e[6]=c,e[7]=j,e[8]=d):d=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Ce,{size:14,className:"text-white"})}),e[9]=N):N=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==d?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,d,N]}),e[10]=o,e[11]=s,e[12]=d,e[13]=p):p=e[13],p}function De(){return me.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:c}){const u=ue.filter(n=>g||!n.claimOnly),[o,a]=E.useState(0),r=E.useRef(!1);if(!r.current){r.current=!0;for(let n=1;n<u.length;n++)setTimeout(()=>a(n),fe*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:c??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:u.map((n,f)=>{const s=n.icon,j=f===o,d=f<o,N=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||j?1:.4},children:[t.jsxs("span",{className:W("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(j?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:N.bg,color:N.fg}:void 0,children:[t.jsx(we,{size:16,className:W("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:W("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",j?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:W("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!j?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:W("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",j||d?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
@@ -1 +1 @@
1
- import{c as k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-D-9It9O8.js";const L="#f6f4ed",P="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:P,theme_color:L,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function U(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function M(e){const n=k.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=U("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),z.useLayoutEffect(a,c)}function D(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],M(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=C||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{D as default};
1
+ import{c as k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-CohYEXUC.js";const L="#f6f4ed",P="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:P,theme_color:L,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function U(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function M(e){const n=k.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=U("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),z.useLayoutEffect(a,c)}function D(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],M(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=C||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{D as default};
@@ -1 +1 @@
1
- import{c as o,j as r,O as s}from"./index-D-9It9O8.js";function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{c as default};
1
+ import{c as o,j as r,O as s}from"./index-CohYEXUC.js";function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{c as default};
@@ -1 +1 @@
1
- import{c as T,r as U,d as F,j as t,B as J,i as O}from"./index-D-9It9O8.js";import{A as $}from"./avatar-Bx5rROx7.js";async function P(l,e,f){const i=await fetch(l,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:e})}),r=await i.json();if(!i.ok||!r.success)throw new Error(r.error||f);return r}function K(l){const e=T.c(41),{organizations:f,domain:i,requestedSlugs:r,onRequestedSlug:k,onSelected:p,onJoined:c,onRequestCompleted:y,selectLabel:E}=l,h=E===void 0?"Select":E;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=new Set,e[0]=b):b=e[0];const[M,A]=U.useState(b);let w;e[1]!==k?(w=o=>{A(s=>new Set(s).add(o)),k?.(o)},e[1]=k,e[2]=w):w=e[2];const _=w;let N;e[3]!==c?(N={mutationFn:G,onSuccess:o=>{const{organization:s,slug:x}=o;c?.(s,x)}},e[3]=c,e[4]=N):N=e[4];const n=F(N);let R;e[5]!==_||e[6]!==c||e[7]!==y?(R={mutationFn:D,onSuccess:o=>{const{organization:s,slug:x,alreadyMember:C}=o;if(C&&x){c?.(s,x);return}_(s.slug),y?.(s)}},e[5]=_,e[6]=c,e[7]=y,e[8]=R):R=e[8];const a=F(R);let u;e[9]!==r?(u=r??[],e[9]=r,e[10]=u):u=e[10];let v;e[11]!==M||e[12]!==u?(v=new Set([...u,...M]),e[11]=M,e[12]=u,e[13]=v):v=e[13];const j=v,q=n.variables?.slug??null,S=a.variables?.slug??null;let d;if(e[14]!==i||e[15]!==j||e[16]!==n||e[17]!==p||e[18]!==f||e[19]!==q||e[20]!==S||e[21]!==a||e[22]!==h){let o;e[24]!==i||e[25]!==j||e[26]!==n||e[27]!==p||e[28]!==q||e[29]!==S||e[30]!==a||e[31]!==h?(o=s=>{const x=n.isPending&&q===s.slug,C=a.isPending&&S===s.slug,L=j.has(s.slug),B=s.logo??(i?`https://www.google.com/s2/favicons?domain=${i}&sz=128`:null);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx($,{url:B??void 0,fallback:s.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:s.name}),i&&t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",i]})]}),s.joinMode==="auto"?t.jsx(J,{size:"default",onClick:()=>n.mutate(s),disabled:n.isPending,children:x?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," Joining..."]}):"Join"}):s.joinMode==="request"?L?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(J,{size:"default",variant:"outline",onClick:()=>a.mutate(s),disabled:a.isPending,children:C?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"}):t.jsx(J,{size:"default",onClick:()=>p?.(s),children:h})]},s.id)},e[24]=i,e[25]=j,e[26]=n,e[27]=p,e[28]=q,e[29]=S,e[30]=a,e[31]=h,e[32]=o):o=e[32],d=f.map(o),e[14]=i,e[15]=j,e[16]=n,e[17]=p,e[18]=f,e[19]=q,e[20]=S,e[21]=a,e[22]=h,e[23]=d}else d=e[23];let m;e[33]!==n.error?(m=n.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[33]=n.error,e[34]=m):m=e[34];let g;e[35]!==a.error?(g=a.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[35]=a.error,e[36]=g):g=e[36];let z;return e[37]!==g||e[38]!==d||e[39]!==m?(z=t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g]}),e[37]=g,e[38]=d,e[39]=m,e[40]=z):z=e[40],z}async function D(l){const e=await P("/api/auth/custom/domain-request-join",l.slug,"Failed to request access");return{organization:l,slug:e.slug,alreadyMember:e.alreadyMember}}async function G(l){const e=await P("/api/auth/custom/domain-join",l.slug,"Failed to join organization");return{organization:l,slug:e.slug??l.slug}}export{K as O};
1
+ import{c as T,r as U,d as F,j as t,B as J,i as O}from"./index-CohYEXUC.js";import{A as $}from"./avatar-DMDa5Fmk.js";async function P(l,e,f){const i=await fetch(l,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:e})}),r=await i.json();if(!i.ok||!r.success)throw new Error(r.error||f);return r}function K(l){const e=T.c(41),{organizations:f,domain:i,requestedSlugs:r,onRequestedSlug:k,onSelected:p,onJoined:c,onRequestCompleted:y,selectLabel:E}=l,h=E===void 0?"Select":E;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=new Set,e[0]=b):b=e[0];const[M,A]=U.useState(b);let w;e[1]!==k?(w=o=>{A(s=>new Set(s).add(o)),k?.(o)},e[1]=k,e[2]=w):w=e[2];const _=w;let N;e[3]!==c?(N={mutationFn:G,onSuccess:o=>{const{organization:s,slug:x}=o;c?.(s,x)}},e[3]=c,e[4]=N):N=e[4];const n=F(N);let R;e[5]!==_||e[6]!==c||e[7]!==y?(R={mutationFn:D,onSuccess:o=>{const{organization:s,slug:x,alreadyMember:C}=o;if(C&&x){c?.(s,x);return}_(s.slug),y?.(s)}},e[5]=_,e[6]=c,e[7]=y,e[8]=R):R=e[8];const a=F(R);let u;e[9]!==r?(u=r??[],e[9]=r,e[10]=u):u=e[10];let v;e[11]!==M||e[12]!==u?(v=new Set([...u,...M]),e[11]=M,e[12]=u,e[13]=v):v=e[13];const j=v,q=n.variables?.slug??null,S=a.variables?.slug??null;let d;if(e[14]!==i||e[15]!==j||e[16]!==n||e[17]!==p||e[18]!==f||e[19]!==q||e[20]!==S||e[21]!==a||e[22]!==h){let o;e[24]!==i||e[25]!==j||e[26]!==n||e[27]!==p||e[28]!==q||e[29]!==S||e[30]!==a||e[31]!==h?(o=s=>{const x=n.isPending&&q===s.slug,C=a.isPending&&S===s.slug,L=j.has(s.slug),B=s.logo??(i?`https://www.google.com/s2/favicons?domain=${i}&sz=128`:null);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx($,{url:B??void 0,fallback:s.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:s.name}),i&&t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",i]})]}),s.joinMode==="auto"?t.jsx(J,{size:"default",onClick:()=>n.mutate(s),disabled:n.isPending,children:x?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," Joining..."]}):"Join"}):s.joinMode==="request"?L?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(J,{size:"default",variant:"outline",onClick:()=>a.mutate(s),disabled:a.isPending,children:C?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"}):t.jsx(J,{size:"default",onClick:()=>p?.(s),children:h})]},s.id)},e[24]=i,e[25]=j,e[26]=n,e[27]=p,e[28]=q,e[29]=S,e[30]=a,e[31]=h,e[32]=o):o=e[32],d=f.map(o),e[14]=i,e[15]=j,e[16]=n,e[17]=p,e[18]=f,e[19]=q,e[20]=S,e[21]=a,e[22]=h,e[23]=d}else d=e[23];let m;e[33]!==n.error?(m=n.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[33]=n.error,e[34]=m):m=e[34];let g;e[35]!==a.error?(g=a.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[35]=a.error,e[36]=g):g=e[36];let z;return e[37]!==g||e[38]!==d||e[39]!==m?(z=t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g]}),e[37]=g,e[38]=d,e[39]=m,e[40]=z):z=e[40],z}async function D(l){const e=await P("/api/auth/custom/domain-request-join",l.slug,"Failed to request access");return{organization:l,slug:e.slug,alreadyMember:e.alreadyMember}}async function G(l){const e=await P("/api/auth/custom/domain-join",l.slug,"Failed to join organization");return{organization:l,slug:e.slug??l.slug}}export{K as O};
@@ -1 +1 @@
1
- import{c as I,r as O,m as K,j as s,K as R,n as M,d as Q,B as L,t as k}from"./index-D-9It9O8.js";import{P as T}from"./index-BST567fc.js";import{C as V}from"./collection-table-wrapper-3oZtiuFs.js";import{E as $}from"./empty-state-BAtX1PrG.js";import{S as U}from"./search-input-D9BaMWA9.js";import{I as H}from"./input-BAMDOJs0.js";import{L as J}from"./label-la-FXX9j.js";import{u as W}from"./use-debounced-value-BGxD_rLK.js";import{D as Y,a as G,b as X,c as Z,d as ee,e as te}from"./dialog-BMJEsVXy.js";import{S as se,a as ie,b as ae,c as ne,d as re}from"./select-B3rAExLJ.js";import{a as q}from"./admin-fetch-CCSvjTk1.js";import{f as le}from"./format-time-BnbuEtat.js";import"./sidebar-BeNXrZie.js";import"./LayoutLeft-DgY7TPq-.js";import"./use-mobile-CrSyO5KW.js";import"./X-DJyihanE.js";import"./tooltip-ChaSBJu1.js";import"./table-CQ51aPY5.js";import"./ArrowUp-Dgvo3A_2.js";import"./SearchMd-CpXRgEf5.js";import"./Check-Cc6Bc1BH.js";import"./ChevronDown-V6fE1Rcs.js";import"./ChevronUp-DK7M0E86.js";import"./differenceInSeconds-NQ4PDo0z.js";const oe=["owner","admin","user"];function me(t){const e=I.c(49),{org:l}=t,[g,n]=O.useState(!1),[a,p]=O.useState(""),[o,S]=O.useState("user"),x=M();let u;e[0]!==a||e[1]!==l.id||e[2]!==o?(u=()=>q(`/api/_admin/orgs/${l.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:o})}),e[0]=a,e[1]=l.id,e[2]=o,e[3]=u):u=e[3];let m;e[4]!==a||e[5]!==l.name||e[6]!==x?(m=()=>{k.success(`Added ${a.trim()} to ${l.name}`),x.invalidateQueries({queryKey:R.deploymentAdminOrgsList()}),n(!1),p(""),S("user")},e[4]=a,e[5]=l.name,e[6]=x,e[7]=m):m=e[7];let h;e[8]!==u||e[9]!==m?(h={mutationFn:u,onSuccess:m,onError:de},e[8]=u,e[9]=m,e[10]=h):h=e[10];const i=Q(h);let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(X,{asChild:!0,children:s.jsx(L,{variant:"outline",size:"sm",children:"Add member"})}),e[11]=b):b=e[11];let r;e[12]!==l.name?(r=s.jsx(Y,{children:s.jsxs(G,{children:["Add member to ",l.name]})}),e[12]=l.name,e[13]=r):r=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(J,{htmlFor:"admin-add-member-email",children:"Email"}),e[14]=c):c=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=B=>p(B.target.value),e[15]=d):d=e[15];let f;e[16]!==a||e[17]!==i.isPending?(f=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx(H,{id:"admin-add-member-email",type:"email",value:a,onChange:d,placeholder:"user@example.com",disabled:i.isPending})]}),e[16]=a,e[17]=i.isPending,e[18]=f):f=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ie,{className:"w-full",children:s.jsx(ae,{})}),e[19]=j):j=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ne,{children:oe.map(ce)}),e[20]=z):z=e[20];let y;e[21]!==i.isPending||e[22]!==o?(y=s.jsxs(se,{value:o,onValueChange:S,disabled:i.isPending,children:[j,z]}),e[21]=i.isPending,e[22]=o,e[23]=y):y=e[23];let _;e[24]!==y||e[25]!==f?(_=s.jsxs("div",{className:"space-y-4",children:[f,y]}),e[24]=y,e[25]=f,e[26]=_):_=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=()=>n(!1),e[27]=A):A=e[27];let C;e[28]!==i.isPending?(C=s.jsx(L,{variant:"outline",onClick:A,disabled:i.isPending,children:"Cancel"}),e[28]=i.isPending,e[29]=C):C=e[29];let N;e[30]!==i?(N=()=>i.mutate(),e[30]=i,e[31]=N):N=e[31];let P;e[32]!==a||e[33]!==i.isPending?(P=!a.trim()||i.isPending,e[32]=a,e[33]=i.isPending,e[34]=P):P=e[34];const F=i.isPending?"Adding...":"Add member";let v;e[35]!==N||e[36]!==P||e[37]!==F?(v=s.jsx(L,{onClick:N,disabled:P,children:F}),e[35]=N,e[36]=P,e[37]=F,e[38]=v):v=e[38];let w;e[39]!==C||e[40]!==v?(w=s.jsxs(Z,{children:[C,v]}),e[39]=C,e[40]=v,e[41]=w):w=e[41];let E;e[42]!==_||e[43]!==w||e[44]!==r?(E=s.jsxs(ee,{className:"sm:max-w-md",children:[r,_,w]}),e[42]=_,e[43]=w,e[44]=r,e[45]=E):E=e[45];let D;return e[46]!==g||e[47]!==E?(D=s.jsxs(te,{open:g,onOpenChange:n,children:[b,E]}),e[46]=g,e[47]=E,e[48]=D):D=e[48],D}function ce(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function de(t){k.error(t instanceof Error?t.message:"Failed to add member")}function qe(){const t=I.c(24),[e,l]=O.useState("");let g;t[0]!==e?(g=e.trim(),t[0]=e,t[1]=g):g=t[1];const n=W(g,300);let a;t[2]!==n?(a=R.deploymentAdminOrgs(n),t[2]=n,t[3]=a):a=t[3];let p;t[4]!==n?(p=()=>{const j=new URLSearchParams({limit:"100"});return n&&j.set("search",n),q(`/api/_admin/orgs?${j}`)},t[4]=n,t[5]=p):p=t[5];let o;t[6]!==a||t[7]!==p?(o={queryKey:a,queryFn:p},t[6]=a,t[7]=p,t[8]=o):o=t[8];const{data:S,isLoading:x,isError:u}=K(o);let m;t[9]!==S?.organizations?(m=S?.organizations??[],t[9]=S?.organizations,t[10]=m):m=t[10];const h=m;let i;t[11]===Symbol.for("react.memo_cache_sentinel")?(i=[{id:"name",header:"Organization",render:ge,cellClassName:"flex-1 min-w-0"},{id:"members",header:"Members",render:pe,cellClassName:"w-24 shrink-0"},{id:"created",header:"Created",render:ue,cellClassName:"w-48 shrink-0"},{id:"actions",header:"",render:fe,cellClassName:"w-32 shrink-0"}],t[11]=i):i=t[11];const b=i;let r;t[12]!==e?(r=s.jsx(U,{value:e,onChange:l,placeholder:"Search organizations by name or slug...",className:"w-full md:w-[375px]"}),t[12]=e,t[13]=r):r=t[13];let c;t[14]!==n||t[15]!==u?(c=u?s.jsx($,{title:"Failed to load organizations",description:"Something went wrong. Refresh to try again."}):s.jsx($,{title:"No organizations found",description:n?`No organizations match "${n}"`:"No organizations exist yet."}),t[14]=n,t[15]=u,t[16]=c):c=t[16];let d;t[17]!==x||t[18]!==h||t[19]!==c?(d=s.jsx(V,{columns:b,data:h,isLoading:x,emptyState:c}),t[17]=x,t[18]=h,t[19]=c,t[20]=d):d=t[20];let f;return t[21]!==r||t[22]!==d?(f=s.jsx(T,{children:s.jsx(T.Content,{children:s.jsx(T.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[r,d]})})})}),t[21]=r,t[22]=d,t[23]=f):f=t[23],f}function fe(t){return s.jsx(me,{org:t})}function ue(t){return s.jsx("span",{className:"text-sm text-foreground",children:le(t.createdAt)})}function pe(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function ge(t){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{qe as default};
1
+ import{c as I,r as O,m as K,j as s,K as R,n as M,d as Q,B as L,t as k}from"./index-CohYEXUC.js";import{P as T}from"./index-DAFuG1kQ.js";import{C as V}from"./collection-table-wrapper-CWw6WTgV.js";import{E as $}from"./empty-state-C2pMk4Io.js";import{S as U}from"./search-input-gI5YpJSI.js";import{I as H}from"./input-DooN4jkj.js";import{L as J}from"./label-CHVjglvp.js";import{u as W}from"./use-debounced-value-L3f6T_5p.js";import{D as Y,a as G,b as X,c as Z,d as ee,e as te}from"./dialog-7JXjpLzj.js";import{S as se,a as ie,b as ae,c as ne,d as re}from"./select-DLOarQAH.js";import{a as q}from"./admin-fetch-CCSvjTk1.js";import{f as le}from"./format-time-BnbuEtat.js";import"./sidebar-fRXLoYlv.js";import"./LayoutLeft-B5__5XBq.js";import"./use-mobile-CA2wukFn.js";import"./X-B6u4BYeS.js";import"./tooltip-owO6Fujv.js";import"./table-TsjPt8Gf.js";import"./ArrowUp-CdLsMjki.js";import"./SearchMd-CcQf_5lB.js";import"./Check-CYLXae3M.js";import"./ChevronDown-Ce0JNwG8.js";import"./ChevronUp-Cflkeqqz.js";import"./differenceInSeconds-NQ4PDo0z.js";const oe=["owner","admin","user"];function me(t){const e=I.c(49),{org:l}=t,[g,n]=O.useState(!1),[a,p]=O.useState(""),[o,S]=O.useState("user"),x=M();let u;e[0]!==a||e[1]!==l.id||e[2]!==o?(u=()=>q(`/api/_admin/orgs/${l.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:o})}),e[0]=a,e[1]=l.id,e[2]=o,e[3]=u):u=e[3];let m;e[4]!==a||e[5]!==l.name||e[6]!==x?(m=()=>{k.success(`Added ${a.trim()} to ${l.name}`),x.invalidateQueries({queryKey:R.deploymentAdminOrgsList()}),n(!1),p(""),S("user")},e[4]=a,e[5]=l.name,e[6]=x,e[7]=m):m=e[7];let h;e[8]!==u||e[9]!==m?(h={mutationFn:u,onSuccess:m,onError:de},e[8]=u,e[9]=m,e[10]=h):h=e[10];const i=Q(h);let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(X,{asChild:!0,children:s.jsx(L,{variant:"outline",size:"sm",children:"Add member"})}),e[11]=b):b=e[11];let r;e[12]!==l.name?(r=s.jsx(Y,{children:s.jsxs(G,{children:["Add member to ",l.name]})}),e[12]=l.name,e[13]=r):r=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(J,{htmlFor:"admin-add-member-email",children:"Email"}),e[14]=c):c=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=B=>p(B.target.value),e[15]=d):d=e[15];let f;e[16]!==a||e[17]!==i.isPending?(f=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx(H,{id:"admin-add-member-email",type:"email",value:a,onChange:d,placeholder:"user@example.com",disabled:i.isPending})]}),e[16]=a,e[17]=i.isPending,e[18]=f):f=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ie,{className:"w-full",children:s.jsx(ae,{})}),e[19]=j):j=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ne,{children:oe.map(ce)}),e[20]=z):z=e[20];let y;e[21]!==i.isPending||e[22]!==o?(y=s.jsxs(se,{value:o,onValueChange:S,disabled:i.isPending,children:[j,z]}),e[21]=i.isPending,e[22]=o,e[23]=y):y=e[23];let _;e[24]!==y||e[25]!==f?(_=s.jsxs("div",{className:"space-y-4",children:[f,y]}),e[24]=y,e[25]=f,e[26]=_):_=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=()=>n(!1),e[27]=A):A=e[27];let C;e[28]!==i.isPending?(C=s.jsx(L,{variant:"outline",onClick:A,disabled:i.isPending,children:"Cancel"}),e[28]=i.isPending,e[29]=C):C=e[29];let N;e[30]!==i?(N=()=>i.mutate(),e[30]=i,e[31]=N):N=e[31];let P;e[32]!==a||e[33]!==i.isPending?(P=!a.trim()||i.isPending,e[32]=a,e[33]=i.isPending,e[34]=P):P=e[34];const F=i.isPending?"Adding...":"Add member";let v;e[35]!==N||e[36]!==P||e[37]!==F?(v=s.jsx(L,{onClick:N,disabled:P,children:F}),e[35]=N,e[36]=P,e[37]=F,e[38]=v):v=e[38];let w;e[39]!==C||e[40]!==v?(w=s.jsxs(Z,{children:[C,v]}),e[39]=C,e[40]=v,e[41]=w):w=e[41];let E;e[42]!==_||e[43]!==w||e[44]!==r?(E=s.jsxs(ee,{className:"sm:max-w-md",children:[r,_,w]}),e[42]=_,e[43]=w,e[44]=r,e[45]=E):E=e[45];let D;return e[46]!==g||e[47]!==E?(D=s.jsxs(te,{open:g,onOpenChange:n,children:[b,E]}),e[46]=g,e[47]=E,e[48]=D):D=e[48],D}function ce(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function de(t){k.error(t instanceof Error?t.message:"Failed to add member")}function qe(){const t=I.c(24),[e,l]=O.useState("");let g;t[0]!==e?(g=e.trim(),t[0]=e,t[1]=g):g=t[1];const n=W(g,300);let a;t[2]!==n?(a=R.deploymentAdminOrgs(n),t[2]=n,t[3]=a):a=t[3];let p;t[4]!==n?(p=()=>{const j=new URLSearchParams({limit:"100"});return n&&j.set("search",n),q(`/api/_admin/orgs?${j}`)},t[4]=n,t[5]=p):p=t[5];let o;t[6]!==a||t[7]!==p?(o={queryKey:a,queryFn:p},t[6]=a,t[7]=p,t[8]=o):o=t[8];const{data:S,isLoading:x,isError:u}=K(o);let m;t[9]!==S?.organizations?(m=S?.organizations??[],t[9]=S?.organizations,t[10]=m):m=t[10];const h=m;let i;t[11]===Symbol.for("react.memo_cache_sentinel")?(i=[{id:"name",header:"Organization",render:ge,cellClassName:"flex-1 min-w-0"},{id:"members",header:"Members",render:pe,cellClassName:"w-24 shrink-0"},{id:"created",header:"Created",render:ue,cellClassName:"w-48 shrink-0"},{id:"actions",header:"",render:fe,cellClassName:"w-32 shrink-0"}],t[11]=i):i=t[11];const b=i;let r;t[12]!==e?(r=s.jsx(U,{value:e,onChange:l,placeholder:"Search organizations by name or slug...",className:"w-full md:w-[375px]"}),t[12]=e,t[13]=r):r=t[13];let c;t[14]!==n||t[15]!==u?(c=u?s.jsx($,{title:"Failed to load organizations",description:"Something went wrong. Refresh to try again."}):s.jsx($,{title:"No organizations found",description:n?`No organizations match "${n}"`:"No organizations exist yet."}),t[14]=n,t[15]=u,t[16]=c):c=t[16];let d;t[17]!==x||t[18]!==h||t[19]!==c?(d=s.jsx(V,{columns:b,data:h,isLoading:x,emptyState:c}),t[17]=x,t[18]=h,t[19]=c,t[20]=d):d=t[20];let f;return t[21]!==r||t[22]!==d?(f=s.jsx(T,{children:s.jsx(T.Content,{children:s.jsx(T.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[r,d]})})})}),t[21]=r,t[22]=d,t[23]=f):f=t[23],f}function fe(t){return s.jsx(me,{org:t})}function ue(t){return s.jsx("span",{className:"text-sm text-foreground",children:le(t.createdAt)})}function pe(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function ge(t){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{qe as default};
@@ -1 +1 @@
1
- import{c as L,n as te,K as U,j as a,r as M,l as ne}from"./index-D-9It9O8.js";import{i as oe,b as se,r as z,c as re,d as ie,e as le,g as ce,S as ae}from"./index-BSL1z35x.js";import{L as Y}from"./label-la-FXX9j.js";import{S as $}from"./switch-D2IG2BwL.js";import{d as ue,a as fe,b as pe,c as de,S as ye}from"./select-B3rAExLJ.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ee(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function je(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(Ee(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=je(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=E=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,E)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=E=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:E}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const j={...o};if(T)delete j[u];else{const D=r?.[u];j[u]=D??(u==="type"?"website":"")}s(j)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const E=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const j=p&&d.includes(u),D=j&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),j&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>E(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const j=me(s);p(j),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const j=Se(T,n);p(j)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let E;e[8]!==h||e[9]!==f?(E=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=E):E=e[10];const P=E;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,w as a,qe as b,Ce as c,Z as d,je as f,k as i,Ze as r,He as u};
1
+ import{c as L,n as te,K as U,j as a,r as M,l as ne}from"./index-CohYEXUC.js";import{i as oe,b as se,r as z,c as re,d as ie,e as le,g as ce,S as ae}from"./index-C_fGiia9.js";import{L as Y}from"./label-CHVjglvp.js";import{S as $}from"./switch-CCu5HEzP.js";import{d as ue,a as fe,b as pe,c as de,S as ye}from"./select-DLOarQAH.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ee(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function je(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(Ee(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=je(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=E=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,E)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=E=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:E}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const j={...o};if(T)delete j[u];else{const D=r?.[u];j[u]=D??(u==="type"?"website":"")}s(j)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const E=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const j=p&&d.includes(u),D=j&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),j&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>E(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const j=me(s);p(j),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const j=Se(T,n);p(j)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let E;e[8]!==h||e[9]!==f?(E=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=E):E=e[10];const P=E;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,w as a,qe as b,Ce as c,Z as d,je as f,k as i,Ze as r,He as u};
@@ -0,0 +1 @@
1
+ import{c as it,r as E,j as e,i as rt}from"./index-CohYEXUC.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-fRXLoYlv.js";import{A as nt}from"./automation-runs-BvQ_NpzR.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-BITO5Cwa.js";import{r as xt}from"./index-C_fGiia9.js";import"./LayoutLeft-B5__5XBq.js";import"./use-mobile-CA2wukFn.js";import"./X-B6u4BYeS.js";import"./tooltip-owO6Fujv.js";import"./select-DLOarQAH.js";import"./Check-CYLXae3M.js";import"./ChevronDown-Ce0JNwG8.js";import"./ChevronUp-Cflkeqqz.js";import"./useInfiniteQuery-BVqkvkK2.js";import"./use-infinite-scroll-Y2vLF9MQ.js";import"./use-connection-DuDkpb0e.js";import"./use-collections-X_sc34If.js";import"./use-mcp-client-CM7X9MZh.js";import"./constants-D_FQAPnt.js";import"./auth-BbW7SMY9.js";import"./use-virtual-mcp-aGmJHwFC.js";import"./card-B2cV3vAA.js";import"./table-TsjPt8Gf.js";import"./empty-state-C2pMk4Io.js";import"./use-members-D9EO1Bhw.js";import"./use-org-auth-client-BBy-fA8U.js";import"./use-clock-tick-Bo5nmZlI.js";import"./AlertCircle-eG6Gc49G.js";import"./CheckCircle-tljwuhuM.js";import"./Circle-DzHZa-kj.js";import"./agent-icon-B1DcT15_.js";import"./UserPlus01-C0VtXGyN.js";import"./Tool01-Bm90mZCD.js";import"./ArrowUp-CdLsMjki.js";import"./Settings02-CGoVxrYE.js";import"./Tool02-daiZ8ZdA.js";import"./XCircle-DGI9dgcJ.js";import"./ArrowUpRight-O8BszRRp.js";import"./TrendUp01-DvuM4A6y.js";import"./ZapSquare-B3ibL8nl.js";import"./ZoomOut-CKfihzl3.js";import"./Users03-CHK21j2b.js";import"./ChevronRight-Bf6_HJan.js";import"./Stars02-C0mePgbQ.js";import"./Copy01-Du_M_0KX.js";import"./DotsVertical-xFAtxH3A.js";import"./Globe01-UO2cBICu.js";import"./Eye-D-54suMo.js";import"./FilterLines-BgdIIHnR.js";import"./Flag01-ugYNIxEK.js";import"./Star01-BVrjnnC8.js";import"./Globe04-DzUT07Cn.js";import"./SwitchHorizontal01-BoKJqR3a.js";import"./HardDrive-bE1MoLDy.js";import"./Image01-DKb2muBn.js";import"./Key01-Cq-J9mZo.js";import"./LinkExternal01-BvGijEfo.js";import"./List-CIEQZx9S.js";import"./Monitor01-C1p3z_f5.js";import"./Sun-3gpGRkKw.js";import"./Package-BjwszD_f.js";import"./Palette-B-oF6tIa.js";import"./Play-D-YRWYQr.js";import"./Plus-CizB5jQt.js";import"./SearchLg-CiDD8qnw.js";import"./SearchMd-CcQf_5lB.js";import"./Shield01-nfrTF4Mw.js";import"./Stars01-DSPE0_0T.js";import"./Trash01-oe1NMhcg.js";import"./Upload01-BXr1BH_I.js";import"./User01-C7ZuARbC.js";import"./Users01-DZyUR8Yh.js";import"./XClose-lZsBUygk.js";import"./Zap-CMeneH21.js";import"./use-automations-CJdJQaET.js";import"./studio-tools-Cmxh51BW.js";import"./useSuspenseInfiniteQuery-BXgDSTQv.js";import"./avatar-DMDa5Fmk.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Bx3m2rO-.js";import"./file-type-icon-C9w5Ssef.js";import"./dialog-7JXjpLzj.js";import"./tab-id-BijBBRwE.js";import"./hooks-ChQF06R2.js";import"./decopilot-sse-pool-DDyGdbf8.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-D0hwm5HT.js";import"./autosend-qdJpe4iq.js";import"./use-ai-providers-B919C25s.js";import"./use-decopilot-events-CynGBvUt.js";import"./use-organization-settings-STRgrAfE.js";import"./monaco-editor-DeHPBeZj.js";import"./index-UpQsgScZ.js";import"./index-O25bDoG2.js";import"./shell-layout-DtOHLb0x.js";import"./alert-dialog-BHYtfpRM.js";import"./required-auth-layout-DrnK06MM.js";import"./use-org-sso-_-9Ndxjg.js";import"./integration-icon-DouvCAyQ.js";import"./use-navigate-to-agent-BQJR7hS-.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CdRNAaTW.js";import"./form-CoMC4z4E.js";import"./label-CHVjglvp.js";import"./input-DooN4jkj.js";import"./switch-CCu5HEzP.js";import"./drawer-975r1xgz.js";import"./collection-search-1EZ5z6Vc.js";import"./tabs-BhgZ3ZmW.js";import"./toggle-group-gGQTQIMA.js";import"./use-deco-credits-C8loT1AO.js";import"./extract-connection-data-xHncf4eT.js";import"./connection-card--smrdlwg.js";import"./use-registry-connections-B3SITFNT.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-DDxbxAIb.js";import"./connection-form-helpers-Det9xziz.js";import"./authenticate-and-persist-oauth-SPitL5yD.js";import"./mcp-oauth-DmLpmBfh.js";import"./collection-tabs-G10EJ6rD.js";import"./badge-DGFRrczB.js";import"./connect-desktop-dialog-Cl6dLVAA.js";import"./select-model-DgC0KhDX.js";import"./checkbox-n-zGS588.js";import"./skeleton-DrvCYvFD.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CSQS_fOd.js";import"./command-Bijkf_mr.js";import"./index-CVhE6SCR.js";import"./popover-CMMyXpPK.js";import"./dropdown-menu-CfwadO2Z.js";import"./index-e-E887bU.js";import"./toolbar-D-2K0Fk5.js";import"./use-debounced-value-L3f6T_5p.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-MPm8b7Px.js";import"./use-mcp-tools--4fgvczm.js";import"./use-capability-CiXd5r1-.js";import"./use-debounced-autosave-CjuwhAVQ.js";import"./index-DAFuG1kQ.js";import"./search-input-gI5YpJSI.js";import"./use-mcp-auth-status-CWMnl4kQ.js";import"./github-repo-picker-CD1HFBLK.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-DeioiR_Q.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-D65XjKFb.js";import"./index-cJm4RNKA.js";import"./get-initials-D-f_fDFw.js";import"./calendar-BmG3lShW.js";import"./toolbar-icon-button-Bw7f5O1p.js";import"./use-file-configs-CIujnhhg.js";import"./automation-list-row-Dn4IsiQT.js";function hi(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const A=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const M=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const V=F,q=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,z=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==q?(l=e.jsx(mt,{className:"text-sm font-semibold",children:q}),t[13]=q,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==A||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==M||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==z||t[37]!==_?(S=!o||!T&&!z?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:A,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:M})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=A,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=M,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=z,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==V||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:V,children:f}),t[42]=V,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{hi as SeoSheet};
@@ -1 +1 @@
1
- import{r as i,aR as $,j as c,cR as L,aV as z,aS as A,aO as _,aU as g,cS as j,ba as w,cT as G,cU as E,c_ as H,d0 as U,aQ as V,d2 as K,c$ as W,d1 as Q,cV as Y,cW as Z,cY as q,c as R,l as B}from"./index-D-9It9O8.js";var C="Popover",[b]=V(C,[E]),P=E(),[J,u]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(J,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var S="PopoverAnchor",X=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(j,{...s,...r,ref:e})});X.displayName=S;var F="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(j,{asChild:!0,...s,children:p})});y.displayName=F;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=K("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(U,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Y,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(Z,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(q,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=B("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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
1
+ import{r as i,aR as $,j as c,cR as L,aV as z,aS as A,aO as _,aU as g,cS as j,ba as w,cT as G,cU as E,c_ as H,d0 as U,aQ as V,d2 as K,c$ as W,d1 as Q,cV as Y,cW as Z,cY as q,c as R,l as B}from"./index-CohYEXUC.js";var C="Popover",[b]=V(C,[E]),P=E(),[J,u]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(J,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var S="PopoverAnchor",X=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(j,{...s,...r,ref:e})});X.displayName=S;var F="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(j,{asChild:!0,...s,children:p})});y.displayName=F;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=K("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(U,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Y,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(Z,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(q,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=B("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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
@@ -1 +1 @@
1
- import{c as H,j as t,B as Z}from"./index-D-9It9O8.js";import{n as ee}from"./LinkExternal01-vfCmrlzd.js";import{az as te,g as ie}from"./agent-icon-B9wxYfT7.js";import{I as J}from"./input-BAMDOJs0.js";import{L as G}from"./label-la-FXX9j.js";import{M as oe}from"./multi-select-fZzKc5Ve.js";import{b as Q,c as se,T as W,a as re}from"./tabs-BLtAAS9k.js";import{T as le}from"./textarea-DGGDLDhY.js";import{v as ae,w as me,o as pe,x as ne,y as ce,I as de,z as fe,A as ue,B as xe}from"./index-BSL1z35x.js";import{b as he,a as ge,B as ve}from"./block-document-D0e8Q950.js";import{u as je}from"./use-autosave-CKOCxbNQ.js";import{s as E,E as be,R as ye,A as Ce}from"./primitives-CKKjbMYY.js";import"./AlertCircle-C20hgcIa.js";import"./UserPlus01-1O7ZAmZ0.js";import"./Tool01-CkczSZ03.js";import"./ArrowUp-Dgvo3A_2.js";import"./Settings02-DSnlYNiR.js";import"./Tool02-Zqz-7k3v.js";import"./XCircle-DengJiq7.js";import"./ArrowUpRight-XVwZt1n6.js";import"./TrendUp01-CHGxH9cm.js";import"./ZapSquare-C-4KrsmI.js";import"./ZoomOut-bo1qpk84.js";import"./Users03-DKog3mgS.js";import"./CheckCircle-BQl0d83F.js";import"./Check-Cc6Bc1BH.js";import"./ChevronDown-V6fE1Rcs.js";import"./ChevronRight-B33Mu5AL.js";import"./ChevronUp-DK7M0E86.js";import"./Circle-DJp0izOj.js";import"./Stars02-DKDrJcrE.js";import"./Copy01-CfdaTbye.js";import"./DotsVertical-NR-zMtTO.js";import"./Globe01-ipTZJBPr.js";import"./Eye-C9dnkVdp.js";import"./FilterLines-Ni7Zxtnw.js";import"./Flag01-DDojZ3BD.js";import"./Star01-CYWP-Lnz.js";import"./Globe04-DOYzTQsa.js";import"./SwitchHorizontal01-Bd1BMwMz.js";import"./HardDrive-DdAwxeh0.js";import"./Image01-C5JUp_rj.js";import"./Key01-Dibq8qSI.js";import"./LayoutLeft-DgY7TPq-.js";import"./List-G0g6UpdC.js";import"./Monitor01-DZP8UHev.js";import"./Sun-CST17A49.js";import"./Package-B3D3XCt6.js";import"./Palette-NkhqFqPA.js";import"./Play-DetNEZKa.js";import"./Plus-DRIYyF1Y.js";import"./SearchLg-CLYFawei.js";import"./SearchMd-CpXRgEf5.js";import"./Shield01-CrEWV3nm.js";import"./Stars01-SzQSCq9i.js";import"./Trash01-DAbM_CFW.js";import"./Upload01-BkxnL7Jx.js";import"./User01-pcBROZrv.js";import"./Users01-B1Tq7qDs.js";import"./XClose-DgANt_GW.js";import"./X-DJyihanE.js";import"./Zap-C0jj00w3.js";import"./badge-CqESM08z.js";import"./checkbox-D4_5XFQQ.js";import"./command-D25pX-TQ.js";import"./index-BMGkibta.js";import"./dialog-BMJEsVXy.js";import"./popover-DRqjILyu.js";import"./chat-context-BxoSxASA.js";import"./autosend-CwtKb6-i.js";import"./hooks-DbvQQuDU.js";import"./use-mcp-client-DUHgzzKC.js";import"./constants-D_FQAPnt.js";import"./auth-B1cxztc2.js";import"./decopilot-sse-pool-BMqhIP22.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-DC98b1mA.js";import"./use-virtual-mcp-C-thf57O.js";import"./use-collections-SV2SEdS-.js";import"./use-ai-providers-DGkYjcBs.js";import"./use-decopilot-events-CsUIw1So.js";import"./tab-id-BijBBRwE.js";import"./use-organization-settings-C6Ld6iGN.js";import"./automation-runs-DOvodEH6.js";import"./select-B3rAExLJ.js";import"./tooltip-ChaSBJu1.js";import"./useInfiniteQuery-DyV1QDab.js";import"./use-infinite-scroll-Dhi9FPdG.js";import"./use-connection-BY-HU_w2.js";import"./card-CdFmFmUv.js";import"./sidebar-BeNXrZie.js";import"./use-mobile-CrSyO5KW.js";import"./table-CQ51aPY5.js";import"./empty-state-BAtX1PrG.js";import"./use-members-Cl5wPFu9.js";import"./use-org-auth-client-pgJk4oK7.js";import"./use-clock-tick-BqQOp9zQ.js";import"./use-automations-d1p1cV4X.js";import"./useSuspenseInfiniteQuery-D9oQjj9f.js";import"./avatar-Bx5rROx7.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CZmbzv9b.js";import"./file-type-icon-13wssv9j.js";import"./monaco-editor-w7ydpEuN.js";import"./index-CsVxM7TL.js";import"./index-Cdqw-lyd.js";import"./shell-layout-Dj7fEvwD.js";import"./alert-dialog-B4j05xqZ.js";import"./required-auth-layout-oEFRt1ot.js";import"./use-org-sso-BhSM-25Q.js";import"./integration-icon-BYNqWlgD.js";import"./use-navigate-to-agent-BxgvzA-e.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BLkij4VQ.js";import"./form-Ch5mL-Ts.js";import"./drawer-CoDBoPdX.js";import"./collection-search-AHmPijP6.js";import"./toggle-group-DH4mAwCj.js";import"./use-deco-credits-CINfmuIk.js";import"./extract-connection-data-CfvL8nD3.js";import"./connection-card-DL84VWzp.js";import"./use-registry-connections-DIPeZmDC.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-Xnvqs_jG.js";import"./authenticate-and-persist-oauth-BOen-Ru1.js";import"./mcp-oauth-DHOrFgRs.js";import"./collection-tabs-DpJVutqE.js";import"./connect-desktop-dialog-DhqJPsaP.js";import"./select-model-DlTEdDDN.js";import"./skeleton-DGbUxntY.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-D71nFv9D.js";import"./dropdown-menu-CEae6v-M.js";import"./index-ELhrM9RL.js";import"./toolbar-Dfnz4ZMt.js";import"./use-debounced-value-BGxD_rLK.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BLHe_A1G.js";import"./use-mcp-tools-DYBrb0MI.js";import"./use-capability-dlgw5Gjj.js";import"./use-debounced-autosave-DowZ2Cj5.js";import"./index-BST567fc.js";import"./search-input-D9BaMWA9.js";import"./use-mcp-auth-status-B_bbAdbm.js";import"./switch-D2IG2BwL.js";import"./github-repo-picker-B8inDg0_.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-BylmfCM8.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-BOqZjnai.js";import"./index-D3YyZBEV.js";import"./get-initials-D-f_fDFw.js";import"./calendar-B-LTbMEy.js";import"./toolbar-icon-button-BnycwoLQ.js";import"./use-file-configs-Bs-k2-C1.js";import"./automation-list-row-CYxluwXx.js";function ke(g){return Array.isArray(g)?g.map(e=>({key:E(e?.key),value:E(e?.value)})):[]}function wo(g){const e=H.c(66),{orgSlug:o,virtualMcpId:m,branch:i,blockKey:f,block:a,decofile:l,meta:c,previewBaseUrl:h}=g;let x;e[0]!==i||e[1]!==o||e[2]!==m?(x={orgSlug:o,virtualMcpId:m,branch:i},e[0]=i,e[1]=o,e[2]=m,e[3]=x):x=e[3];const r=ae(x);let p;e[4]!==a?(p=me(a,"posts"),e[4]=a,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==r?(n=F=>{r.mutate({blockKey:f,data:ne(f,"posts",ce(F))})},e[6]=f,e[7]=r,e[8]=n):n=e[8];const[s,N]=je(d,n);let S;e[9]!==s||e[10]!==N?(S=(F,Y)=>N({...s,[F]:Y}),e[9]=s,e[10]=N,e[11]=S):S=e[11];const v=S;let w;e[12]!==l||e[13]!==s||e[14]!==h?(w=he({decofile:l,post:s,previewBaseUrl:h}),e[12]=l,e[13]=s,e[14]=h,e[15]=w):w=e[15];const j=w;let b;e[16]!==s.title?(b=E(s.title)||"Untitled post",e[16]=s.title,e[17]=b):b=e[17];let y;e[18]!==b?(y=t.jsx("span",{className:"truncate text-sm font-medium",children:b}),e[18]=b,e[19]=y):y=e[19];let C;e[20]!==r.isError||e[21]!==r.isPending?(C=t.jsx(pe,{isPending:r.isPending,isError:r.isError}),e[20]=r.isError,e[21]=r.isPending,e[22]=C):C=e[22];const P=!j,_=j?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let k;e[23]!==j?(k=()=>{j&&window.open(j,"_blank","noopener,noreferrer")},e[23]=j,e[24]=k):k=e[24];let B;e[25]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ee,{size:14}),e[25]=B):B=e[25];let u;e[26]!==_||e[27]!==k||e[28]!==P?(u=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:P,title:_,onClick:k,children:[B,"See preview"]}),e[26]=_,e[27]=k,e[28]=P,e[29]=u):u=e[29];let T;e[30]!==u||e[31]!==C?(T=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[C,u]}),e[30]=u,e[31]=C,e[32]=T):T=e[32];let R;e[33]!==T||e[34]!==y?(R=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[y,T]}),e[33]=T,e[34]=y,e[35]=R):R=e[35];let A;e[36]!==s.title?(A=E(s.title),e[36]=s.title,e[37]=A):A=e[37];let L;e[38]!==v?(L=F=>v("title",F),e[38]=v,e[39]=L):L=e[39];let I;e[40]!==A||e[41]!==L?(I=t.jsx(be,{value:A,onChange:L,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=A,e[41]=L,e[42]=I):I=e[42];let K;e[43]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=K):K=e[43];let O;e[44]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(se,{children:[K,t.jsxs(Q,{value:"settings",children:[t.jsx(ie,{}),"Settings"]})]}),e[44]=O):O=e[44];let M;e[45]!==s.sections?(M=ge(s.sections),e[45]=s.sections,e[46]=M):M=e[46];let U;e[47]!==v?(U=F=>v("sections",F),e[47]=v,e[48]=U):U=e[48];let V;e[49]!==c||e[50]!==M||e[51]!==U?(V=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(ve,{value:M,onChange:U,meta:c,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=c,e[50]=M,e[51]=U,e[52]=V):V=e[52];let $;e[53]!==l||e[54]!==s||e[55]!==v?($=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ne,{post:s,decofile:l,onChange:v})})}),e[53]=l,e[54]=s,e[55]=v,e[56]=$):$=e[56];let z;e[57]!==V||e[58]!==$?(z=t.jsxs(re,{defaultValue:"content",className:"mt-6 gap-4",children:[O,V,$]}),e[57]=V,e[58]=$,e[59]=z):z=e[59];let D;e[60]!==I||e[61]!==z?(D=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[I,z]})}),e[60]=I,e[61]=z,e[62]=D):D=e[62];let q;return e[63]!==R||e[64]!==D?(q=t.jsxs("div",{className:"flex h-full flex-col",children:[R,D]}),e[63]=R,e[64]=D,e[65]=q):q=e[65],q}function Ne(g){const e=H.c(57),{post:o,decofile:m,onChange:i}=g;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(G,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let a;e[1]!==o.excerpt?(a=E(o.excerpt),e[1]=o.excerpt,e[2]=a):a=e[2];let l;e[3]!==i?(l=u=>i("excerpt",u.target.value),e[3]=i,e[4]=l):l=e[4];let c;e[5]!==a||e[6]!==l?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(le,{id:"post-excerpt",value:a,onChange:l,rows:2})]}),e[5]=a,e[6]=l,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(G,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==o.slug?(x=E(o.slug),e[9]=o.slug,e[10]=x):x=e[10];let r;e[11]!==i?(r=u=>i("slug",u.target.value),e[11]=i,e[12]=r):r=e[12];let p;e[13]!==x||e[14]!==r?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(J,{id:"post-slug",value:x,onChange:r,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=r,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==o.date?(n=E(o.date),e[17]=o.date,e[18]=n):n=e[18];let s;e[19]!==i?(s=u=>i("date",u),e[19]=i,e[20]=s):s=e[20];let N;e[21]!==n||e[22]!==s?(N=t.jsx(xe,{schema:d,value:n,onChange:s,path:"post-date",label:"Date"}),e[21]=n,e[22]=s,e[23]=N):N=e[23];let S;e[24]!==N||e[25]!==p?(S=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=S):S=e[26];let v;e[27]===Symbol.for("react.memo_cache_sentinel")?(v={type:"string",format:"image-uri",title:"Cover image"},e[27]=v):v=e[27];let w;e[28]!==i?(w=u=>i("image",u),e[28]=i,e[29]=w):w=e[29];let j;e[30]!==o.image||e[31]!==w?(j=t.jsx(de,{schema:v,value:o.image,onChange:w,path:"post-image",label:"Cover image"}),e[30]=o.image,e[31]=w,e[32]=j):j=e[32];let b;e[33]!==i?(b=u=>i("authors",u),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==m||e[36]!==o.authors||e[37]!==b?(y=t.jsx(X,{label:"Authors",decofile:m,kind:"authors",valueField:"email",toRef:we,selected:o.authors,onChange:b}),e[35]=m,e[36]=o.authors,e[37]=b,e[38]=y):y=e[38];let C;e[39]!==i?(C=u=>i("categories",u),e[39]=i,e[40]=C):C=e[40];let P;e[41]!==m||e[42]!==o.categories||e[43]!==C?(P=t.jsx(X,{label:"Categories",decofile:m,kind:"categories",valueField:"slug",toRef:Se,selected:o.categories,onChange:C}),e[41]=m,e[42]=o.categories,e[43]=C,e[44]=P):P=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let k;e[47]!==o.extraProps||e[48]!==_?(k=t.jsx(Pe,{value:o.extraProps,onChange:_}),e[47]=o.extraProps,e[48]=_,e[49]=k):k=e[49];let B;return e[50]!==S||e[51]!==j||e[52]!==y||e[53]!==P||e[54]!==k||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,S,j,y,P,k]}),e[50]=S,e[51]=j,e[52]=y,e[53]=P,e[54]=k,e[55]=c,e[56]=B):B=e[56],B}function Se(g){return{name:E(g.name),slug:E(g.slug)}}function we(g){return{...g}}function Pe(g){const e=H.c(15),{value:o,onChange:m}=g;let i,f,a,l;if(e[0]!==m||e[1]!==o){i=ke(o);const x=(r,p)=>m(i.map((d,n)=>n===r?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(G,{children:"Extra props"}),e[6]=a):a=e[6],l=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((r,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(J,{value:r.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(J,{value:r.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>m(i.filter((d,n)=>n!==p))})]},p))}),e[0]=m,e[1]=o,e[2]=i,e[3]=f,e[4]=a,e[5]=l}else i=e[2],f=e[3],a=e[4],l=e[5];let c;e[7]!==i||e[8]!==m?(c=t.jsx(Ce,{label:"Add prop",onClick:()=>m([...i,{key:"",value:""}])}),e[7]=i,e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==a||e[12]!==l||e[13]!==c?(h=t.jsxs("div",{className:f,children:[a,l,c]}),e[10]=f,e[11]=a,e[12]=l,e[13]=c,e[14]=h):h=e[14],h}function X(g){const e=H.c(17),{label:o,decofile:m,kind:i,valueField:f,toRef:a,selected:l,onChange:c}=g;let h;e[0]!==m||e[1]!==i||e[2]!==l||e[3]!==a||e[4]!==f?(h=fe({records:ue(m,i),selected:l,valueField:f,toRef:a}),e[0]=m,e[1]=i,e[2]=l,e[3]=a,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:r,refsForValues:p}=h;let d;e[6]!==o?(d=t.jsx(G,{children:o}),e[6]=o,e[7]=d):d=e[7];let n;e[8]!==o||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==r?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",o.toLowerCase()," yet — create some in the"," ",o.toLowerCase()," collection."]}):t.jsx(oe,{options:x,defaultValue:r,onValueChange:N=>c(p(N)),placeholder:`Select ${o.toLowerCase()}`,maxCount:4}),e[8]=o,e[9]=c,e[10]=x,e[11]=p,e[12]=r,e[13]=n):n=e[13];let s;return e[14]!==d||e[15]!==n?(s=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=s):s=e[16],s}export{wo as PostEditor};
1
+ import{c as H,j as t,B as Z}from"./index-CohYEXUC.js";import{n as ee}from"./LinkExternal01-BvGijEfo.js";import{az as te,g as ie}from"./agent-icon-B1DcT15_.js";import{I as J}from"./input-DooN4jkj.js";import{L as G}from"./label-CHVjglvp.js";import{M as oe}from"./multi-select-oNBbk1hp.js";import{b as Q,c as se,T as W,a as re}from"./tabs-BhgZ3ZmW.js";import{T as le}from"./textarea-DDxbxAIb.js";import{v as ae,w as me,o as pe,x as ne,y as ce,I as de,z as fe,A as ue,B as xe}from"./index-C_fGiia9.js";import{b as he,a as ge,B as ve}from"./block-document-DU-yWhvh.js";import{u as je}from"./use-autosave-D09qjW1V.js";import{s as E,E as be,R as ye,A as Ce}from"./primitives-1GpjyhXb.js";import"./AlertCircle-eG6Gc49G.js";import"./UserPlus01-C0VtXGyN.js";import"./Tool01-Bm90mZCD.js";import"./ArrowUp-CdLsMjki.js";import"./Settings02-CGoVxrYE.js";import"./Tool02-daiZ8ZdA.js";import"./XCircle-DGI9dgcJ.js";import"./ArrowUpRight-O8BszRRp.js";import"./TrendUp01-DvuM4A6y.js";import"./ZapSquare-B3ibL8nl.js";import"./ZoomOut-CKfihzl3.js";import"./Users03-CHK21j2b.js";import"./CheckCircle-tljwuhuM.js";import"./Check-CYLXae3M.js";import"./ChevronDown-Ce0JNwG8.js";import"./ChevronRight-Bf6_HJan.js";import"./ChevronUp-Cflkeqqz.js";import"./Circle-DzHZa-kj.js";import"./Stars02-C0mePgbQ.js";import"./Copy01-Du_M_0KX.js";import"./DotsVertical-xFAtxH3A.js";import"./Globe01-UO2cBICu.js";import"./Eye-D-54suMo.js";import"./FilterLines-BgdIIHnR.js";import"./Flag01-ugYNIxEK.js";import"./Star01-BVrjnnC8.js";import"./Globe04-DzUT07Cn.js";import"./SwitchHorizontal01-BoKJqR3a.js";import"./HardDrive-bE1MoLDy.js";import"./Image01-DKb2muBn.js";import"./Key01-Cq-J9mZo.js";import"./LayoutLeft-B5__5XBq.js";import"./List-CIEQZx9S.js";import"./Monitor01-C1p3z_f5.js";import"./Sun-3gpGRkKw.js";import"./Package-BjwszD_f.js";import"./Palette-B-oF6tIa.js";import"./Play-D-YRWYQr.js";import"./Plus-CizB5jQt.js";import"./SearchLg-CiDD8qnw.js";import"./SearchMd-CcQf_5lB.js";import"./Shield01-nfrTF4Mw.js";import"./Stars01-DSPE0_0T.js";import"./Trash01-oe1NMhcg.js";import"./Upload01-BXr1BH_I.js";import"./User01-C7ZuARbC.js";import"./Users01-DZyUR8Yh.js";import"./XClose-lZsBUygk.js";import"./X-B6u4BYeS.js";import"./Zap-CMeneH21.js";import"./badge-DGFRrczB.js";import"./checkbox-n-zGS588.js";import"./command-Bijkf_mr.js";import"./index-CVhE6SCR.js";import"./dialog-7JXjpLzj.js";import"./popover-CMMyXpPK.js";import"./chat-context-D0hwm5HT.js";import"./autosend-qdJpe4iq.js";import"./hooks-ChQF06R2.js";import"./use-mcp-client-CM7X9MZh.js";import"./constants-D_FQAPnt.js";import"./auth-BbW7SMY9.js";import"./decopilot-sse-pool-DDyGdbf8.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-Cmxh51BW.js";import"./use-virtual-mcp-aGmJHwFC.js";import"./use-collections-X_sc34If.js";import"./use-ai-providers-B919C25s.js";import"./use-decopilot-events-CynGBvUt.js";import"./tab-id-BijBBRwE.js";import"./use-organization-settings-STRgrAfE.js";import"./automation-runs-BvQ_NpzR.js";import"./select-DLOarQAH.js";import"./tooltip-owO6Fujv.js";import"./useInfiniteQuery-BVqkvkK2.js";import"./use-infinite-scroll-Y2vLF9MQ.js";import"./use-connection-DuDkpb0e.js";import"./card-B2cV3vAA.js";import"./sidebar-fRXLoYlv.js";import"./use-mobile-CA2wukFn.js";import"./table-TsjPt8Gf.js";import"./empty-state-C2pMk4Io.js";import"./use-members-D9EO1Bhw.js";import"./use-org-auth-client-BBy-fA8U.js";import"./use-clock-tick-Bo5nmZlI.js";import"./use-automations-CJdJQaET.js";import"./useSuspenseInfiniteQuery-BXgDSTQv.js";import"./avatar-DMDa5Fmk.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Bx3m2rO-.js";import"./file-type-icon-C9w5Ssef.js";import"./monaco-editor-DeHPBeZj.js";import"./index-UpQsgScZ.js";import"./index-O25bDoG2.js";import"./shell-layout-DtOHLb0x.js";import"./alert-dialog-BHYtfpRM.js";import"./required-auth-layout-DrnK06MM.js";import"./use-org-sso-_-9Ndxjg.js";import"./integration-icon-DouvCAyQ.js";import"./use-navigate-to-agent-BQJR7hS-.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CdRNAaTW.js";import"./form-CoMC4z4E.js";import"./drawer-975r1xgz.js";import"./collection-search-1EZ5z6Vc.js";import"./toggle-group-gGQTQIMA.js";import"./use-deco-credits-C8loT1AO.js";import"./extract-connection-data-xHncf4eT.js";import"./connection-card--smrdlwg.js";import"./use-registry-connections-B3SITFNT.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-Det9xziz.js";import"./authenticate-and-persist-oauth-SPitL5yD.js";import"./mcp-oauth-DmLpmBfh.js";import"./collection-tabs-G10EJ6rD.js";import"./connect-desktop-dialog-Cl6dLVAA.js";import"./select-model-DgC0KhDX.js";import"./skeleton-DrvCYvFD.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CSQS_fOd.js";import"./dropdown-menu-CfwadO2Z.js";import"./index-e-E887bU.js";import"./toolbar-D-2K0Fk5.js";import"./use-debounced-value-L3f6T_5p.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-MPm8b7Px.js";import"./use-mcp-tools--4fgvczm.js";import"./use-capability-CiXd5r1-.js";import"./use-debounced-autosave-CjuwhAVQ.js";import"./index-DAFuG1kQ.js";import"./search-input-gI5YpJSI.js";import"./use-mcp-auth-status-CWMnl4kQ.js";import"./switch-CCu5HEzP.js";import"./github-repo-picker-CD1HFBLK.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-DeioiR_Q.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-D65XjKFb.js";import"./index-cJm4RNKA.js";import"./get-initials-D-f_fDFw.js";import"./calendar-BmG3lShW.js";import"./toolbar-icon-button-Bw7f5O1p.js";import"./use-file-configs-CIujnhhg.js";import"./automation-list-row-Dn4IsiQT.js";function ke(g){return Array.isArray(g)?g.map(e=>({key:E(e?.key),value:E(e?.value)})):[]}function wo(g){const e=H.c(66),{orgSlug:o,virtualMcpId:m,branch:i,blockKey:f,block:a,decofile:l,meta:c,previewBaseUrl:h}=g;let x;e[0]!==i||e[1]!==o||e[2]!==m?(x={orgSlug:o,virtualMcpId:m,branch:i},e[0]=i,e[1]=o,e[2]=m,e[3]=x):x=e[3];const r=ae(x);let p;e[4]!==a?(p=me(a,"posts"),e[4]=a,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==r?(n=F=>{r.mutate({blockKey:f,data:ne(f,"posts",ce(F))})},e[6]=f,e[7]=r,e[8]=n):n=e[8];const[s,N]=je(d,n);let S;e[9]!==s||e[10]!==N?(S=(F,Y)=>N({...s,[F]:Y}),e[9]=s,e[10]=N,e[11]=S):S=e[11];const v=S;let w;e[12]!==l||e[13]!==s||e[14]!==h?(w=he({decofile:l,post:s,previewBaseUrl:h}),e[12]=l,e[13]=s,e[14]=h,e[15]=w):w=e[15];const j=w;let b;e[16]!==s.title?(b=E(s.title)||"Untitled post",e[16]=s.title,e[17]=b):b=e[17];let y;e[18]!==b?(y=t.jsx("span",{className:"truncate text-sm font-medium",children:b}),e[18]=b,e[19]=y):y=e[19];let C;e[20]!==r.isError||e[21]!==r.isPending?(C=t.jsx(pe,{isPending:r.isPending,isError:r.isError}),e[20]=r.isError,e[21]=r.isPending,e[22]=C):C=e[22];const P=!j,_=j?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let k;e[23]!==j?(k=()=>{j&&window.open(j,"_blank","noopener,noreferrer")},e[23]=j,e[24]=k):k=e[24];let B;e[25]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ee,{size:14}),e[25]=B):B=e[25];let u;e[26]!==_||e[27]!==k||e[28]!==P?(u=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:P,title:_,onClick:k,children:[B,"See preview"]}),e[26]=_,e[27]=k,e[28]=P,e[29]=u):u=e[29];let T;e[30]!==u||e[31]!==C?(T=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[C,u]}),e[30]=u,e[31]=C,e[32]=T):T=e[32];let R;e[33]!==T||e[34]!==y?(R=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[y,T]}),e[33]=T,e[34]=y,e[35]=R):R=e[35];let A;e[36]!==s.title?(A=E(s.title),e[36]=s.title,e[37]=A):A=e[37];let L;e[38]!==v?(L=F=>v("title",F),e[38]=v,e[39]=L):L=e[39];let I;e[40]!==A||e[41]!==L?(I=t.jsx(be,{value:A,onChange:L,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=A,e[41]=L,e[42]=I):I=e[42];let K;e[43]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=K):K=e[43];let O;e[44]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(se,{children:[K,t.jsxs(Q,{value:"settings",children:[t.jsx(ie,{}),"Settings"]})]}),e[44]=O):O=e[44];let M;e[45]!==s.sections?(M=ge(s.sections),e[45]=s.sections,e[46]=M):M=e[46];let U;e[47]!==v?(U=F=>v("sections",F),e[47]=v,e[48]=U):U=e[48];let V;e[49]!==c||e[50]!==M||e[51]!==U?(V=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(ve,{value:M,onChange:U,meta:c,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=c,e[50]=M,e[51]=U,e[52]=V):V=e[52];let $;e[53]!==l||e[54]!==s||e[55]!==v?($=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ne,{post:s,decofile:l,onChange:v})})}),e[53]=l,e[54]=s,e[55]=v,e[56]=$):$=e[56];let z;e[57]!==V||e[58]!==$?(z=t.jsxs(re,{defaultValue:"content",className:"mt-6 gap-4",children:[O,V,$]}),e[57]=V,e[58]=$,e[59]=z):z=e[59];let D;e[60]!==I||e[61]!==z?(D=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[I,z]})}),e[60]=I,e[61]=z,e[62]=D):D=e[62];let q;return e[63]!==R||e[64]!==D?(q=t.jsxs("div",{className:"flex h-full flex-col",children:[R,D]}),e[63]=R,e[64]=D,e[65]=q):q=e[65],q}function Ne(g){const e=H.c(57),{post:o,decofile:m,onChange:i}=g;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(G,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let a;e[1]!==o.excerpt?(a=E(o.excerpt),e[1]=o.excerpt,e[2]=a):a=e[2];let l;e[3]!==i?(l=u=>i("excerpt",u.target.value),e[3]=i,e[4]=l):l=e[4];let c;e[5]!==a||e[6]!==l?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(le,{id:"post-excerpt",value:a,onChange:l,rows:2})]}),e[5]=a,e[6]=l,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(G,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==o.slug?(x=E(o.slug),e[9]=o.slug,e[10]=x):x=e[10];let r;e[11]!==i?(r=u=>i("slug",u.target.value),e[11]=i,e[12]=r):r=e[12];let p;e[13]!==x||e[14]!==r?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(J,{id:"post-slug",value:x,onChange:r,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=r,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==o.date?(n=E(o.date),e[17]=o.date,e[18]=n):n=e[18];let s;e[19]!==i?(s=u=>i("date",u),e[19]=i,e[20]=s):s=e[20];let N;e[21]!==n||e[22]!==s?(N=t.jsx(xe,{schema:d,value:n,onChange:s,path:"post-date",label:"Date"}),e[21]=n,e[22]=s,e[23]=N):N=e[23];let S;e[24]!==N||e[25]!==p?(S=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=S):S=e[26];let v;e[27]===Symbol.for("react.memo_cache_sentinel")?(v={type:"string",format:"image-uri",title:"Cover image"},e[27]=v):v=e[27];let w;e[28]!==i?(w=u=>i("image",u),e[28]=i,e[29]=w):w=e[29];let j;e[30]!==o.image||e[31]!==w?(j=t.jsx(de,{schema:v,value:o.image,onChange:w,path:"post-image",label:"Cover image"}),e[30]=o.image,e[31]=w,e[32]=j):j=e[32];let b;e[33]!==i?(b=u=>i("authors",u),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==m||e[36]!==o.authors||e[37]!==b?(y=t.jsx(X,{label:"Authors",decofile:m,kind:"authors",valueField:"email",toRef:we,selected:o.authors,onChange:b}),e[35]=m,e[36]=o.authors,e[37]=b,e[38]=y):y=e[38];let C;e[39]!==i?(C=u=>i("categories",u),e[39]=i,e[40]=C):C=e[40];let P;e[41]!==m||e[42]!==o.categories||e[43]!==C?(P=t.jsx(X,{label:"Categories",decofile:m,kind:"categories",valueField:"slug",toRef:Se,selected:o.categories,onChange:C}),e[41]=m,e[42]=o.categories,e[43]=C,e[44]=P):P=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let k;e[47]!==o.extraProps||e[48]!==_?(k=t.jsx(Pe,{value:o.extraProps,onChange:_}),e[47]=o.extraProps,e[48]=_,e[49]=k):k=e[49];let B;return e[50]!==S||e[51]!==j||e[52]!==y||e[53]!==P||e[54]!==k||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,S,j,y,P,k]}),e[50]=S,e[51]=j,e[52]=y,e[53]=P,e[54]=k,e[55]=c,e[56]=B):B=e[56],B}function Se(g){return{name:E(g.name),slug:E(g.slug)}}function we(g){return{...g}}function Pe(g){const e=H.c(15),{value:o,onChange:m}=g;let i,f,a,l;if(e[0]!==m||e[1]!==o){i=ke(o);const x=(r,p)=>m(i.map((d,n)=>n===r?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(G,{children:"Extra props"}),e[6]=a):a=e[6],l=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((r,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(J,{value:r.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(J,{value:r.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>m(i.filter((d,n)=>n!==p))})]},p))}),e[0]=m,e[1]=o,e[2]=i,e[3]=f,e[4]=a,e[5]=l}else i=e[2],f=e[3],a=e[4],l=e[5];let c;e[7]!==i||e[8]!==m?(c=t.jsx(Ce,{label:"Add prop",onClick:()=>m([...i,{key:"",value:""}])}),e[7]=i,e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==a||e[12]!==l||e[13]!==c?(h=t.jsxs("div",{className:f,children:[a,l,c]}),e[10]=f,e[11]=a,e[12]=l,e[13]=c,e[14]=h):h=e[14],h}function X(g){const e=H.c(17),{label:o,decofile:m,kind:i,valueField:f,toRef:a,selected:l,onChange:c}=g;let h;e[0]!==m||e[1]!==i||e[2]!==l||e[3]!==a||e[4]!==f?(h=fe({records:ue(m,i),selected:l,valueField:f,toRef:a}),e[0]=m,e[1]=i,e[2]=l,e[3]=a,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:r,refsForValues:p}=h;let d;e[6]!==o?(d=t.jsx(G,{children:o}),e[6]=o,e[7]=d):d=e[7];let n;e[8]!==o||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==r?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",o.toLowerCase()," yet — create some in the"," ",o.toLowerCase()," collection."]}):t.jsx(oe,{options:x,defaultValue:r,onValueChange:N=>c(p(N)),placeholder:`Select ${o.toLowerCase()}`,maxCount:4}),e[8]=o,e[9]=c,e[10]=x,e[11]=p,e[12]=r,e[13]=n):n=e[13];let s;return e[14]!==d||e[15]!==n?(s=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=s):s=e[16],s}export{wo as PostEditor};
@@ -1 +1 @@
1
- import{c as f,l as h,j as a}from"./index-D-9It9O8.js";import{j as y}from"./agent-icon-B9wxYfT7.js";import{s as v}from"./Plus-DRIYyF1Y.js";import{s as j}from"./Trash01-DAbM_CFW.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=i):i=e[8];let l;return e[9]!==n?(l=a.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};
1
+ import{c as f,l as h,j as a}from"./index-CohYEXUC.js";import{j as y}from"./agent-icon-B1DcT15_.js";import{s as v}from"./Plus-CizB5jQt.js";import{s as j}from"./Trash01-oe1NMhcg.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=i):i=e[8];let l;return e[9]!==n?(l=a.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};