decocms 4.527.0 → 4.529.0

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 (423) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-CLeQm0q6.js → ActiveShapeUtils-DemHm_Wd.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-D9_evsvO.js → AlertCircle-COvusPgV.js} +1 -1
  3. package/dist/client/assets/{AreaChart-D4vFJ6vT.js → AreaChart-DyTNutvb.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-B6qwUpLq.js → ArrowLeft-DLvj60sB.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Cth_eVmU.js → ArrowUp-BUXNFn6K.js} +1 -1
  6. package/dist/client/assets/{BarChart-DLJTWg68.js → BarChart-pUJx5RZM.js} +1 -1
  7. package/dist/client/assets/{Building02-Wh9pimKL.js → Building02-GTlj-q2W.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-DgnFHqiR.js → CartesianChart-GHKU27xx.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-ChFkF0_C.js → CategoricalChart-BYHLRXHR.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-DoJXwawU.js → CheckCircle-C512y-MG.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-CnRBP_5y.js → ChevronSelectorVertical-BsYzg3zS.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-7SZxJu8w.js → ChevronUp-krQUb2vU.js} +1 -1
  13. package/dist/client/assets/{Copy01-Bu20fOqK.js → Copy01-DMa3yAGL.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-Br0-9pHI.js → CreditCard01-B64VnM4Z.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-OSj5km5S.js → DotsVertical-DcrZktRa.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-BvjdLnvD.js → ErrorBarContext-4lCbO0nP.js} +1 -1
  17. package/dist/client/assets/{Globe04-D4srY_QI.js → Globe04-wvLOPSBv.js} +1 -1
  18. package/dist/client/assets/{Image01-CzYWCBEQ.js → Image01-C1LM4LI_.js} +1 -1
  19. package/dist/client/assets/{Key01-C-bam-4X.js → Key01-DBOKyeyp.js} +1 -1
  20. package/dist/client/assets/{Link01-DXRUIbxg.js → Link01-C15xvQCb.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-gdfveCgK.js → LinkBroken01-C-j1r45F.js} +1 -1
  22. package/dist/client/assets/{Minus-Czu3kpSA.js → Minus-pd7IxdG4.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CruCSnyq.js → Monitor01-DkBo0gFa.js} +1 -1
  24. package/dist/client/assets/{Play-RzA3Niav.js → Play-BG4TP59z.js} +1 -1
  25. package/dist/client/assets/{Plus-BA90GKs1.js → Plus-CZXpdtEH.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-8vT4zADE.js → ReferenceLine-D8vPnc2l.js} +1 -1
  27. package/dist/client/assets/{SearchMd-DO1eOJvD.js → SearchMd-7uzgB_fN.js} +1 -1
  28. package/dist/client/assets/{Sector-Duu5xYm_.js → Sector-BoQZLv3P.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-BuVMkUkJ.js → ShoppingBag01-fwBzMipi.js} +1 -1
  30. package/dist/client/assets/{Sun-Cg4UcsIP.js → Sun-BndYhLEq.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-D_E9YPjp.js → SwitchHorizontal01-C8FHYpzr.js} +1 -1
  32. package/dist/client/assets/{Tool01-BJdrlQAn.js → Tool01-D6wuoLhW.js} +1 -1
  33. package/dist/client/assets/{Trash01-DcsYDVg8.js → Trash01-fFkz00Bo.js} +1 -1
  34. package/dist/client/assets/{Upload01-CYUmJE5W.js → Upload01-B7NXMv4U.js} +1 -1
  35. package/dist/client/assets/{UserSquare-D0z8lAkn.js → UserSquare-Dy6q7vGw.js} +1 -1
  36. package/dist/client/assets/{Users01-Y9yFg_2K.js → Users01-Bzd23uge.js} +1 -1
  37. package/dist/client/assets/{XClose-DIFkFXp0.js → XClose-Bl8OQypT.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-rfozMzwP.js → ZoomOut-CbRHTtaG.js} +1 -1
  39. package/dist/client/assets/{access-gate-5CuwEsfU.js → access-gate-BUmBK35t.js} +1 -1
  40. package/dist/client/assets/{add-connection-dialog-Dl0GCijo.js → add-connection-dialog-EKB9ifd5.js} +1 -1
  41. package/dist/client/assets/agent-analytics-BIR7Elpu.js +1 -0
  42. package/dist/client/assets/agent-app-BY_sxPgf.js +1 -0
  43. package/dist/client/assets/{agent-assets-Bca92OI9.js → agent-assets-CLaEj6EO.js} +1 -1
  44. package/dist/client/assets/{agent-automation-CMS-kRWl.js → agent-automation-DjrvgxKz.js} +1 -1
  45. package/dist/client/assets/{agent-automations-BnnaEANZ.js → agent-automations-B_j3JMK5.js} +1 -1
  46. package/dist/client/assets/agent-calendar-BYK51o6p.js +1 -0
  47. package/dist/client/assets/{agent-connect-sources-BXy938hL.js → agent-connect-sources-CEHAzyyH.js} +1 -1
  48. package/dist/client/assets/agent-deck-O9lG5hoA.js +1 -0
  49. package/dist/client/assets/{agent-e2e-C129i6b0.js → agent-e2e-DC8qsIOa.js} +1 -1
  50. package/dist/client/assets/agent-experiments-BI2FazYu.js +1 -0
  51. package/dist/client/assets/{agent-file-Pm-Pf6i7.js → agent-file-B2uxKC-F.js} +1 -1
  52. package/dist/client/assets/{agent-hosting-d0mTmoi-.js → agent-hosting-RnWuRGIL.js} +1 -1
  53. package/dist/client/assets/agent-icon-D8I51g86.js +1 -0
  54. package/dist/client/assets/agent-library-CkANn3L_.js +1 -0
  55. package/dist/client/assets/agent-library-file-WsrEoVuH.js +1 -0
  56. package/dist/client/assets/agent-monitor-B02h5NLr.js +1 -0
  57. package/dist/client/assets/{agent-overview-Dxkm_aaP.js → agent-overview-C5NgXH7s.js} +1 -1
  58. package/dist/client/assets/agent-releases-BC4vHFHk.js +2 -0
  59. package/dist/client/assets/agent-settings-LRXrMwgi.js +1 -0
  60. package/dist/client/assets/{agent-site-editor-DvH8IVvU.js → agent-site-editor-DxPxTcxt.js} +2 -2
  61. package/dist/client/assets/agent-site-editor-code-CkH40Rf7.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content-Cr-1q_qf.js +1 -0
  63. package/dist/client/assets/agent-site-editor-preview-BtO7VQJF.js +1 -0
  64. package/dist/client/assets/agent-view-JeA7v4l-.js +1 -0
  65. package/dist/client/assets/{agent-view-guard-DSdm7lha.js → agent-view-guard-DGYTrdB6.js} +1 -1
  66. package/dist/client/assets/{agents-list-3hk3xPXP.js → agents-list-B3GTSyKF.js} +1 -1
  67. package/dist/client/assets/{ai-providers-CHbdsaF9.js → ai-providers-kbqqFGXw.js} +1 -1
  68. package/dist/client/assets/alert-Co4rQNsj.js +1 -0
  69. package/dist/client/assets/{analytics-sections-CQH2mNjC.js → analytics-sections-sv8ClgZ6.js} +1 -1
  70. package/dist/client/assets/{analytics-tab-D1CO6HBg.js → analytics-tab-CZkiyMbX.js} +2 -2
  71. package/dist/client/assets/{api-keys-CsjJKvfD.js → api-keys-C1HeQnUq.js} +1 -1
  72. package/dist/client/assets/api-keys-D5vUfJru.js +1 -0
  73. package/dist/client/assets/app-editor-6n0QxI7G.js +1 -0
  74. package/dist/client/assets/{asset-utils-ClXQ82gA.js → asset-utils-BVjUn7sv.js} +1 -1
  75. package/dist/client/assets/{auth-BJe1aOgg.js → auth-D095ELC6.js} +1 -1
  76. package/dist/client/assets/{auth-catchall-CeL8XspO.js → auth-catchall-CNcTLbQH.js} +1 -1
  77. package/dist/client/assets/{auth-entry-Bux_mJRN.js → auth-entry-B00ENnh_.js} +1 -1
  78. package/dist/client/assets/{auth-split-layout-TRenqsIV.js → auth-split-layout-BygL4T3m.js} +1 -1
  79. package/dist/client/assets/{authenticate-and-persist-oauth-BhtEjQrU.js → authenticate-and-persist-oauth-BWNvTNl4.js} +1 -1
  80. package/dist/client/assets/{automation-list-row-DtC2tENT.js → automation-list-row-D74lyjQr.js} +1 -1
  81. package/dist/client/assets/{automation-runs-BDvJXwcu.js → automation-runs-CBMsjgBs.js} +1 -1
  82. package/dist/client/assets/{automations-Qapln07Q.js → automations-jj-tbLkb.js} +1 -1
  83. package/dist/client/assets/{autosend-BKwtMB6P.js → autosend-CBkC989z.js} +1 -1
  84. package/dist/client/assets/{badge-Dne4Jx9I.js → badge-NOwFVf79.js} +1 -1
  85. package/dist/client/assets/{block-document-Cs719bjv.js → block-document-BHzrJZOA.js} +3 -3
  86. package/dist/client/assets/{blocks-preview-workspace-context-DUWc_2XG.js → blocks-preview-workspace-context-BXnXIitx.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-DBqkaxym.js → blocks-tab-states-B1baLGbh.js} +1 -1
  88. package/dist/client/assets/{blog-schema-bP1Fdz76.js → blog-schema-BfjxCL-D.js} +1 -1
  89. package/dist/client/assets/{buckets-DIalMn5g.js → buckets-DuxgHXni.js} +1 -1
  90. package/dist/client/assets/{build-improve-prompt-doc-CxMWosB4.js → build-improve-prompt-doc-DfrXi7V7.js} +1 -1
  91. package/dist/client/assets/{calendar-DqTMQkmt.js → calendar-r-ZqwkU5.js} +1 -1
  92. package/dist/client/assets/{capability-load-error-C2YNxboS.js → capability-load-error-C_z_eZxA.js} +1 -1
  93. package/dist/client/assets/category-editor-BVzHX2Tl.js +1 -0
  94. package/dist/client/assets/{cdn-tab-qQFB8_vy.js → cdn-tab-CqrDuE12.js} +1 -1
  95. package/dist/client/assets/{chart-CnvxVWLO.js → chart-CpZD0pzF.js} +1 -1
  96. package/dist/client/assets/{chat-context-C2Yxk7gW.js → chat-context-CFRPrQEn.js} +5 -5
  97. package/dist/client/assets/{chat-draft-CoNCF5e9.js → chat-draft-CookMc2A.js} +1 -1
  98. package/dist/client/assets/{checkbox-5tVptIvn.js → checkbox-CHAX1Xck.js} +1 -1
  99. package/dist/client/assets/{choose-editor-he5994Iy.js → choose-editor-agHDRvWe.js} +1 -1
  100. package/dist/client/assets/{cli-auth-success-C13o6nT8.js → cli-auth-success-DiUqDmOP.js} +1 -1
  101. package/dist/client/assets/{client-icons-AfqD3us-.js → client-icons-CbLac6SE.js} +1 -1
  102. package/dist/client/assets/cms-settings-editor-osH6UqMf.js +1 -0
  103. package/dist/client/assets/{collapsible-B_i_flQZ.js → collapsible-B0-dgkow.js} +1 -1
  104. package/dist/client/assets/{collection-detail-C5W1nmJm.js → collection-detail-DMhjkfO0.js} +1 -1
  105. package/dist/client/assets/{collection-display-button-g8pw1BKa.js → collection-display-button-VpsslNFN.js} +1 -1
  106. package/dist/client/assets/{collection-search-DKSj36i2.js → collection-search-CfEbdS6s.js} +1 -1
  107. package/dist/client/assets/collection-table-wrapper-Bmq1UECe.js +1 -0
  108. package/dist/client/assets/{collection-tabs-BVf232LH.js → collection-tabs-CKvYpxHT.js} +1 -1
  109. package/dist/client/assets/{column-rules-CRkg9Fxl.js → column-rules-DLuTKpTB.js} +1 -1
  110. package/dist/client/assets/{combobox-B8zTmLu1.js → combobox-B2ABYNJF.js} +1 -1
  111. package/dist/client/assets/{command-D79ZH19X.js → command-yWHdaNhz.js} +1 -1
  112. package/dist/client/assets/{companion-mcps-section-CthCluci.js → companion-mcps-section-CzTfnHtf.js} +1 -1
  113. package/dist/client/assets/{config-94XCayih.js → config-BWRujj0b.js} +1 -1
  114. package/dist/client/assets/{connect-DIgUkNj9.js → connect-Dd7mHJ3b.js} +1 -1
  115. package/dist/client/assets/{connect-layout-CH6ZSb5T.js → connect-layout-CuMi_Lil.js} +1 -1
  116. package/dist/client/assets/{connect-source-dialog-DPHm5SIR.js → connect-source-dialog-CEGXiNKG.js} +1 -1
  117. package/dist/client/assets/{connection-CiqnzKwe.js → connection-BLQ_zE4V.js} +1 -1
  118. package/dist/client/assets/{connection-card-CgbmOEtZ.js → connection-card-By3c6kjU.js} +1 -1
  119. package/dist/client/assets/{connection-detail-CWZ53gOP.js → connection-detail-shznFsHq.js} +1 -1
  120. package/dist/client/assets/{connection-form-helpers-ntCbPy2n.js → connection-form-helpers-Z8pfNB14.js} +1 -1
  121. package/dist/client/assets/{connections-Bt4pwqu3.js → connections-BPuzvSmY.js} +1 -1
  122. package/dist/client/assets/content-tab-DneBUwU0.js +22 -0
  123. package/dist/client/assets/context-CFpk-Oj4.js +1 -0
  124. package/dist/client/assets/{context-menu-BAoOyR8J.js → context-menu-DJBtOK1b.js} +1 -1
  125. package/dist/client/assets/{context-shell-BFW9I6d4.js → context-shell-BmoIxzr5.js} +5 -5
  126. package/dist/client/assets/{core.esm-DpydQIdT.js → core.esm-n2M8kvjD.js} +1 -1
  127. package/dist/client/assets/{create-organization-dialog-DKF90Pre.js → create-organization-dialog-CQRec3jk.js} +1 -1
  128. package/dist/client/assets/{daily-pulse-Bojl1W7A.js → daily-pulse-BbNgROp9.js} +1 -1
  129. package/dist/client/assets/{discover-CeBBMXm9.js → discover-C-nnI3od.js} +1 -1
  130. package/dist/client/assets/{domain-settings-BXAu6Flk.js → domain-settings-Cc13IWEI.js} +1 -1
  131. package/dist/client/assets/{drawer-hQxgme01.js → drawer-CiMnESz2.js} +1 -1
  132. package/dist/client/assets/{editor-C7NsJj0P.js → editor-DmuvoJYA.js} +1 -1
  133. package/dist/client/assets/{editor-classes-iJqU7okF.js → editor-classes-BnQ0j7aI.js} +1 -1
  134. package/dist/client/assets/{empty-state-BGj88Oz3.js → empty-state-TJAbP9DT.js} +1 -1
  135. package/dist/client/assets/{empty-state-Gwq8u3Sk.js → empty-state-usXK3Xda.js} +1 -1
  136. package/dist/client/assets/experiments-tab-BP2V1ct9.js +1 -0
  137. package/dist/client/assets/{experiments-tab-choice-C-Kj-SaP.js → experiments-tab-choice-0iIRb8Mb.js} +1 -1
  138. package/dist/client/assets/{extract-connection-data-Cx9ah1z5.js → extract-connection-data-w2KZjBRz.js} +1 -1
  139. package/dist/client/assets/{feature-gate-DTum9WCp.js → feature-gate-CL9DvP9Y.js} +1 -1
  140. package/dist/client/assets/{feature-paywall-zO4dzbka.js → feature-paywall-DSpW8aNd.js} +1 -1
  141. package/dist/client/assets/{file-explorer-Xl96APN-.js → file-explorer-p0qSIvAq.js} +1 -1
  142. package/dist/client/assets/{file-preview-Bm_62NfP.js → file-preview-BnfIAfXR.js} +1 -1
  143. package/dist/client/assets/{file-share-button-D7t2lHex.js → file-share-button-D0fIsSP3.js} +1 -1
  144. package/dist/client/assets/{file-type-icon-DptKoj-q.js → file-type-icon-BMJ3eu8C.js} +1 -1
  145. package/dist/client/assets/{folder-icon-CAAlpUI4.js → folder-icon-AsglkwKY.js} +2 -2
  146. package/dist/client/assets/{form-DU60ZzuM.js → form-B15LRu36.js} +1 -1
  147. package/dist/client/assets/{general-DlFBPmt9.js → general-jGb_G4uN.js} +1 -1
  148. package/dist/client/assets/{held-block-view-rUTUNCUd.js → held-block-view-OUun6HKW.js} +3 -3
  149. package/dist/client/assets/{home-Bo_yPeSm.js → home-T15wg8dw.js} +1 -1
  150. package/dist/client/assets/hosted-publish-feedback-CpPg0deS.js +1 -0
  151. package/dist/client/assets/{icon-button-DhKNS89h.js → icon-button-CdKw1JM7.js} +1 -1
  152. package/dist/client/assets/{index-B-HoKvLm.js → index-BCVYESVO.js} +1 -1
  153. package/dist/client/assets/{index-AaUC9WD6.js → index-BJ0i7OFb.js} +1 -1
  154. package/dist/client/assets/{index-BoQ6UNxI.js → index-Ba639kg_.js} +1 -1
  155. package/dist/client/assets/{index-Cp2UI7aA.js → index-BfJfM0M5.js} +1 -1
  156. package/dist/client/assets/{index-Cj3mLa-X.js → index-CPx4iDWN.js} +1 -1
  157. package/dist/client/assets/{index-XfVM7o1o.js → index-CYkDIirY.js} +1 -1
  158. package/dist/client/assets/{index-Boaq93Wx.js → index-Cdp3CJ7S.js} +2 -2
  159. package/dist/client/assets/{index-BsRMIjqv.js → index-Cv-yBusP.js} +1 -1
  160. package/dist/client/assets/{index-Cuw4uBth.js → index-D6lKvaoF.js} +49 -49
  161. package/dist/client/assets/{index-T8jAgtpZ.js → index-DTPm19J5.js} +1 -1
  162. package/dist/client/assets/{index-DDaQcb3Z.js → index-DdjqsLVd.js} +1 -1
  163. package/dist/client/assets/{index-D74iAt06.js → index-DgseJSFR.js} +1 -1
  164. package/dist/client/assets/{index-BwdKQXWi.js → index-Du8mxU6I.js} +1 -1
  165. package/dist/client/assets/{index-7KY_ymC5.js → index-ke7VZu6f.js} +1 -1
  166. package/dist/client/assets/{index-redirect-Du4fUGPn.js → index-redirect-DPkf2M1r.js} +1 -1
  167. package/dist/client/assets/{index-CoQjVodF.js → index-suEm9Jo8.js} +1 -1
  168. package/dist/client/assets/index-u-z_8GjU.css +1 -0
  169. package/dist/client/assets/{infiniteQueryObserver-Dy0j8RRj.js → infiniteQueryObserver-DoO1tFcg.js} +1 -1
  170. package/dist/client/assets/{infra-billing-BUQH5Z5B.js → infra-billing-AOTF4BF9.js} +1 -1
  171. package/dist/client/assets/{input-eQkN56jq.js → input-BjDpMhiP.js} +4 -4
  172. package/dist/client/assets/{input-CBK8CI9T.js → input-CGPBEV3I.js} +1 -1
  173. package/dist/client/assets/{integration-icon-DkmY4VjA.js → integration-icon-DsUtWvNG.js} +1 -1
  174. package/dist/client/assets/{jira-icon-DIX055Fu.js → jira-icon-ClDodO3R.js} +1 -1
  175. package/dist/client/assets/{label-GaS9ZdQZ.js → label-G1B1MWwD.js} +1 -1
  176. package/dist/client/assets/{layout-D6bYiXJy.js → layout-txEP7eBz.js} +1 -1
  177. package/dist/client/assets/{legacy-agents-deep-DwABkmGV.js → legacy-agents-deep-DPRz-ztQ.js} +1 -1
  178. package/dist/client/assets/{legacy-main-redirect-D9RmQuU4.js → legacy-main-redirect-D4h2lZ1C.js} +1 -1
  179. package/dist/client/assets/library-DG80ymId.js +1 -0
  180. package/dist/client/assets/{login-DbWYcBcy.js → login-BLrZZn8v.js} +1 -1
  181. package/dist/client/assets/{markdown-DWeSe4_P.js → markdown-qzRhqGiE.js} +1 -1
  182. package/dist/client/assets/{mcp-app-renderer-gjnt5Msm.js → mcp-app-renderer-BEchnhBH.js} +1 -1
  183. package/dist/client/assets/{mcp-oauth-DCesmV8O.js → mcp-oauth-C5j0dGpY.js} +1 -1
  184. package/dist/client/assets/{mcp-oauth-BN2jrcE-.js → mcp-oauth-DB3Ehq2l.js} +1 -1
  185. package/dist/client/assets/{members-A7hOfyTI.js → members-UnOmDr74.js} +1 -1
  186. package/dist/client/assets/{memory-BToaysGU.js → memory-DDcdJq0f.js} +2 -2
  187. package/dist/client/assets/{mini-report-page-B-hsDt1L.js → mini-report-page-0MJL6jaw.js} +1 -1
  188. package/dist/client/assets/{mock-board-DrLmLQZ3.js → mock-board-BMi5jY8O.js} +3 -3
  189. package/dist/client/assets/{monaco-editor-D7u0RPEL.js → monaco-editor-f9CmyWiW.js} +1 -1
  190. package/dist/client/assets/monitoring-BcfPBOT_.js +1 -0
  191. package/dist/client/assets/{monitoring-stats-row-BHTpzVVz.js → monitoring-stats-row-DbGeX6M1.js} +1 -1
  192. package/dist/client/assets/{multi-select-A_VyitSa.js → multi-select-DDgBvcml.js} +1 -1
  193. package/dist/client/assets/mustache-Dlytn5tt.js +4 -0
  194. package/dist/client/assets/{named-rule-uses-B_glLrdA.js → named-rule-uses-Ce5M9wic.js} +1 -1
  195. package/dist/client/assets/{new-project-dialog-M-WLwZ47.js → new-project-dialog-CMq12kc2.js} +1 -1
  196. package/dist/client/assets/{oauth-callback-eNefWc41.js → oauth-callback-CHDXWkE_.js} +1 -1
  197. package/dist/client/assets/{oauth-callback-ai-provider-DwNEOUuo.js → oauth-callback-ai-provider-UMPeP62o.js} +1 -1
  198. package/dist/client/assets/{onboarding-8FafpOAf.js → onboarding-M__h_Gjj.js} +1 -1
  199. package/dist/client/assets/{openai-conversation-Bi2qzvSg.js → openai-conversation-CaIhAnt3.js} +2 -2
  200. package/dist/client/assets/{optimistic-project-sidebar-views-BFrvBRmj.js → optimistic-project-sidebar-views-CdaXFXXA.js} +1 -1
  201. package/dist/client/assets/{order-monitor-day-BBUvq3hr.js → order-monitor-day-EdsSjGDV.js} +1 -1
  202. package/dist/client/assets/{organization-choice-CGhQdnA_.js → organization-choice-nAa_gubo.js} +1 -1
  203. package/dist/client/assets/{orgs-Cp4K5sO3.js → orgs-Bf_omTy9.js} +1 -1
  204. package/dist/client/assets/{page-seo-form-BUMyGTyK.js → page-seo-form-bDCctB_4.js} +1 -1
  205. package/dist/client/assets/{pair-DtCSsufw.js → pair-DAGOA-DW.js} +1 -1
  206. package/dist/client/assets/{parse-sections-B1uka1Vq.js → parse-sections-CQtk5pOz.js} +1 -1
  207. package/dist/client/assets/{plan-D4y2SMp_.js → plan-B6ZUDARY.js} +1 -1
  208. package/dist/client/assets/{plan-ladder-Cr-CdTR1.js → plan-ladder-lTkei0Ti.js} +1 -1
  209. package/dist/client/assets/{popover-DiqYPKHh.js → popover-0uuKFwAZ.js} +1 -1
  210. package/dist/client/assets/post-calendar-EZk2hClJ.js +1 -0
  211. package/dist/client/assets/{post-editor-Bcpnqi7N.js → post-editor-DBjNxHSS.js} +2 -2
  212. package/dist/client/assets/{preview-content-BC2_4BBb.js → preview-content-QwLJXUTL.js} +1 -1
  213. package/dist/client/assets/{preview-dialog-DO4TwwDT.js → preview-dialog-COkKtKSn.js} +1 -1
  214. package/dist/client/assets/{preview-panel-DnnzsZo-.js → preview-panel-CYvbBECE.js} +1 -1
  215. package/dist/client/assets/{preview-tab-DV_MhenF.js → preview-tab-CevrXu6o.js} +3 -3
  216. package/dist/client/assets/{product-picker-dialog-D8RlvSwu.js → product-picker-dialog-C4MqsCUp.js} +1 -1
  217. package/dist/client/assets/{profile-CCof6E-v.js → profile-BpyEXZc8.js} +1 -1
  218. package/dist/client/assets/project-app-view-Be6CnjoI.js +1 -0
  219. package/dist/client/assets/{project-apps-dDvUBGvO.js → project-apps-B0ovyypF.js} +1 -1
  220. package/dist/client/assets/{project-feed-JqOKyKR3.js → project-feed-C21rLNuW.js} +1 -1
  221. package/dist/client/assets/{project-icon-DQNZWn_4.js → project-icon-DSVUD72l.js} +1 -1
  222. package/dist/client/assets/project-reports-B-dKM4cz.js +1 -0
  223. package/dist/client/assets/project-tasks-CQ6MOp0o.js +1 -0
  224. package/dist/client/assets/{projects-D8PEOsfX.js → projects-DVL140KR.js} +1 -1
  225. package/dist/client/assets/{projects-empty-state-ComRagNK.js → projects-empty-state--1SkJcww.js} +1 -1
  226. package/dist/client/assets/{prompts-D-z15mGy.js → prompts-BB-mkKBu.js} +1 -1
  227. package/dist/client/assets/record-editor-CHzxFRQb.js +1 -0
  228. package/dist/client/assets/redirect-editor-MSkonkYZ.js +1 -0
  229. package/dist/client/assets/releases-api-XsGA4Jqp.js +1 -0
  230. package/dist/client/assets/{reports-C0wR9iIJ.js → reports-Bs2cZ7-f.js} +1 -1
  231. package/dist/client/assets/reports-CDn9xmoF.js +1 -0
  232. package/dist/client/assets/{reports-onboarding-B1OyYbCz.js → reports-onboarding-CQDYROlT.js} +1 -1
  233. package/dist/client/assets/{reports-tab-D1M-BlGe.js → reports-tab-unD6Cc73.js} +2 -2
  234. package/dist/client/assets/{repositories-DHT9v-UO.js → repositories-D4uDVy59.js} +1 -1
  235. package/dist/client/assets/repositories-jqcTJr-Z.js +1 -0
  236. package/dist/client/assets/{repository-binding-CXnxCF4M.js → repository-binding-DG0YfJ0p.js} +1 -1
  237. package/dist/client/assets/{repository-import-picker-DLsxOOxp.js → repository-import-picker-DmsHSDsT.js} +1 -1
  238. package/dist/client/assets/{repository-picker-Cq7JBkFe.js → repository-picker-DtHxD0oz.js} +1 -1
  239. package/dist/client/assets/{require-capability-Cmje3DfT.js → require-capability-Coznh-2O.js} +1 -1
  240. package/dist/client/assets/{required-auth-layout-CwX_2fTY.js → required-auth-layout-D6rVgMVl.js} +1 -1
  241. package/dist/client/assets/{reset-password-CmI8_Uk5.js → reset-password-T1aKmDxe.js} +1 -1
  242. package/dist/client/assets/{resizable-C7Is3s-0.js → resizable-BToK-_9q.js} +1 -1
  243. package/dist/client/assets/{resolve-tab-icon-_XMXFt4U.js → resolve-tab-icon-BZcs-4Ej.js} +1 -1
  244. package/dist/client/assets/{review-settings-BFUKsPsq.js → review-settings-D8DTqrlS.js} +1 -1
  245. package/dist/client/assets/{roles-CeJo75GF.js → roles-BjZzPNJU.js} +1 -1
  246. package/dist/client/assets/{route-BMliOu1G.js → route-CGlwPlVk.js} +1 -1
  247. package/dist/client/assets/route-JsLO4TKF.js +1 -0
  248. package/dist/client/assets/{route-Cvt2392J.js → route-ZKQ_kRmZ.js} +1 -1
  249. package/dist/client/assets/{sandbox-git-api-CH_-QFpD.js → sandbox-git-api-DcqI6XE4.js} +1 -1
  250. package/dist/client/assets/{sandbox-lifecycle-context-DdYoEP5e.js → sandbox-lifecycle-context-DmhDA6t4.js} +1 -1
  251. package/dist/client/assets/{schema-D5UoICKI.js → schema-DNxvjoV7.js} +1 -1
  252. package/dist/client/assets/{schema-D02aTPkl.js → schema-DnX2JCBp.js} +1 -1
  253. package/dist/client/assets/{scroll-area-CDUvVvSH.js → scroll-area-DuxlLjxF.js} +1 -1
  254. package/dist/client/assets/{search-input-BqT8bImj.js → search-input-D-Pyf_-v.js} +1 -1
  255. package/dist/client/assets/{search-toggle-BoR9-yak.js → search-toggle-Dtmn6N5P.js} +1 -1
  256. package/dist/client/assets/{secret-picker-vfO2xRLb.js → secret-picker-DVVZ5bEr.js} +1 -1
  257. package/dist/client/assets/{secrets-DIgmoPjh.js → secrets-cTi-1KGY.js} +1 -1
  258. package/dist/client/assets/{section-array-field-BwPxgG9_.js → section-array-field-D7M_bj6e.js} +1 -1
  259. package/dist/client/assets/{sections-Bv_E_JwJ.js → sections-DoIjBnkB.js} +1 -1
  260. package/dist/client/assets/sections-editor-Cp3o1WEu.js +1 -0
  261. package/dist/client/assets/{select-B73KS7i3.js → select-WYGhjx6Y.js} +1 -1
  262. package/dist/client/assets/{select-model-zK4bDPrj.js → select-model-7YJABjjD.js} +1 -1
  263. package/dist/client/assets/{seo-editor-DMhyWewz.js → seo-editor-DxqL4dEA.js} +1 -1
  264. package/dist/client/assets/{separator-Bun_4c4E.js → separator-CAQrypmQ.js} +1 -1
  265. package/dist/client/assets/settings-tab-DBT9iC5q.js +1 -0
  266. package/dist/client/assets/{sheet-56HC7WRJ.js → sheet-BXLIoGMZ.js} +1 -1
  267. package/dist/client/assets/{shell-layout-C2BJGx2g.js → shell-layout-DIzvUuq-.js} +1 -1
  268. package/dist/client/assets/site-draft-actions-L6qNX2KR.js +3 -0
  269. package/dist/client/assets/site-draft-view-CFpMP26D.js +2 -0
  270. package/dist/client/assets/site-editor-CFIZ4rer.js +1 -0
  271. package/dist/client/assets/site-editor-toast-DYuw8EYm.js +1 -0
  272. package/dist/client/assets/{skills-DJ7eTdb8.js → skills-Bs4GOdTG.js} +1 -1
  273. package/dist/client/assets/{slider-DnA5KcIW.js → slider-CViVuHCu.js} +1 -1
  274. package/dist/client/assets/{sortable.esm-xXl-6mL4.js → sortable.esm-DEhQR8uW.js} +1 -1
  275. package/dist/client/assets/{sso-CpCZW-eP.js → sso-RbRiEKa0.js} +1 -1
  276. package/dist/client/assets/{suggestion-CZpp719s.js → suggestion-Bx_JdcJG.js} +2 -2
  277. package/dist/client/assets/{switch-n_zXX4if.js → switch-BByo6038.js} +1 -1
  278. package/dist/client/assets/{symbol-YpIq4fgA.js → symbol-Dxfa7ArY.js} +1 -1
  279. package/dist/client/assets/{synced-repos-B2cUQUNf.js → synced-repos-COUZBGua.js} +1 -1
  280. package/dist/client/assets/{tab-icon-glyph-D237cGJI.js → tab-icon-glyph-Bk-ZO6Ik.js} +1 -1
  281. package/dist/client/assets/{table-CSojOz4z.js → table-CSNuDYSH.js} +1 -1
  282. package/dist/client/assets/{tabs-C8EZr9R7.js → tabs-D3JiC-AY.js} +1 -1
  283. package/dist/client/assets/{task-assignee-avatar-RKc3yRg-.js → task-assignee-avatar-BmM5P6_t.js} +1 -1
  284. package/dist/client/assets/{task-board-DH9ssxkG.js → task-board-9JuNZBWk.js} +1 -1
  285. package/dist/client/assets/{task-route-bLUOK5JR.js → task-route-8N1kEUR4.js} +1 -1
  286. package/dist/client/assets/{task-status-Bc6ioQFn.js → task-status-CqFVxY8B.js} +1 -1
  287. package/dist/client/assets/{taskboard-analytics-D7vs-xto.js → taskboard-analytics-CJlU-oAO.js} +1 -1
  288. package/dist/client/assets/tasks-BVwsk6i_.js +1 -0
  289. package/dist/client/assets/{tasks-e6DH9H0h.js → tasks-gqaInVx6.js} +3 -3
  290. package/dist/client/assets/{textarea-CDKBkceb.js → textarea-L_ZRNMiO.js} +1 -1
  291. package/dist/client/assets/{thread-analytics-BTiORs_j.js → thread-analytics-BcGg7DjZ.js} +1 -1
  292. package/dist/client/assets/{thread-intent-CZ5_EO2w.js → thread-intent-B7fQ4X9a.js} +1 -1
  293. package/dist/client/assets/{thread-route-BYWxmsao.js → thread-route-P1MEabq1.js} +1 -1
  294. package/dist/client/assets/{thread-route-DIZgBacC.js → thread-route-qfZwEURL.js} +1 -1
  295. package/dist/client/assets/{thread-sheet-body-C_1TXm2y.js → thread-sheet-body-Brz-5Xzp.js} +1 -1
  296. package/dist/client/assets/{time-range-picker-CF_xrXhr.js → time-range-picker-D-N-klXR.js} +1 -1
  297. package/dist/client/assets/{toggle-group-DGx4bXEF.js → toggle-group-DGrVpPy5.js} +1 -1
  298. package/dist/client/assets/{tool-namespace-DO1Qm86o.js → tool-namespace-D6LarB3P.js} +1 -1
  299. package/dist/client/assets/{toolbar-icon-button-DZE2ESw9.js → toolbar-icon-button-DA7DTn0f.js} +1 -1
  300. package/dist/client/assets/{tooltip-Ci3ZwooP.js → tooltip-LAilTl9w.js} +1 -1
  301. package/dist/client/assets/{tooltipContext-DfN2pXFs.js → tooltipContext-BD4z8QR3.js} +1 -1
  302. package/dist/client/assets/{track-BtJWR_CA.js → track-BDBNTOtn.js} +1 -1
  303. package/dist/client/assets/{types-DhOLYbcW.js → types-B-ck70wq.js} +3 -3
  304. package/dist/client/assets/{url-slug-CLyOdzAm.js → url-slug-hCw666fV.js} +1 -1
  305. package/dist/client/assets/{usage-stats-CNLGhk-o.js → usage-stats-C7wY64zK.js} +1 -1
  306. package/dist/client/assets/{use-ai-providers-DOax94rO.js → use-ai-providers-CCh3hgye.js} +1 -1
  307. package/dist/client/assets/{use-apply-named-rule-CJFPy5HY.js → use-apply-named-rule-C3ZZJzlV.js} +1 -1
  308. package/dist/client/assets/{use-automations-CPkt7SVV.js → use-automations-CRFTJK4f.js} +1 -1
  309. package/dist/client/assets/{use-autosave-yGWalCYV.js → use-autosave-DCyEvO0j.js} +1 -1
  310. package/dist/client/assets/{use-chat-layout-state-EYafKK4O.js → use-chat-layout-state-wJjkzkeX.js} +1 -1
  311. package/dist/client/assets/{use-clock-tick-BUftA4XN.js → use-clock-tick-N15XxKsH.js} +1 -1
  312. package/dist/client/assets/use-cms-publish-actions-Ba42J8md.js +10 -0
  313. package/dist/client/assets/{use-connect-companion-BhEYBdV4.js → use-connect-companion-DnBPIlmE.js} +1 -1
  314. package/dist/client/assets/{use-connection-eHzowbKv.js → use-connection-BBWQ1upy.js} +1 -1
  315. package/dist/client/assets/{use-copy-ClerAXdJ.js → use-copy-Bnv2yRR0.js} +1 -1
  316. package/dist/client/assets/{use-create-virtual-mcp-J2E0RhLc.js → use-create-virtual-mcp-CLc8yu5S.js} +1 -1
  317. package/dist/client/assets/{use-date-fns-locale-CrqyAQep.js → use-date-fns-locale-Br988cT0.js} +1 -1
  318. package/dist/client/assets/{use-debounced-autosave-BVxg8vxx.js → use-debounced-autosave-GFM4KrwH.js} +1 -1
  319. package/dist/client/assets/{use-debounced-value-2_mLSVw4.js → use-debounced-value-DLa-riOh.js} +1 -1
  320. package/dist/client/assets/{use-deco-credits-DABk3yY1.js → use-deco-credits-3I0Gmtle.js} +1 -1
  321. package/dist/client/assets/{use-decopilot-events-CA56Gos8.js → use-decopilot-events-C6bScbXe.js} +1 -1
  322. package/dist/client/assets/{use-delete-connection-CVhCNDYo.js → use-delete-connection-BZQtBcN0.js} +1 -1
  323. package/dist/client/assets/{use-deployment-admin-BGnnzyoF.js → use-deployment-admin-D2xZ3EVY.js} +1 -1
  324. package/dist/client/assets/{use-fast-preview-draft-url-DrM2pRhy.js → use-fast-preview-draft-url-DRBVlysi.js} +1 -1
  325. package/dist/client/assets/{use-file-configs-Bg-fEAGm.js → use-file-configs-EhGCWGKO.js} +1 -1
  326. package/dist/client/assets/{use-inbox-feed-C9znaZFi.js → use-inbox-feed-MI8GAssc.js} +1 -1
  327. package/dist/client/assets/{use-infinite-scroll-DfZZeab5.js → use-infinite-scroll-Dl4ppp1T.js} +1 -1
  328. package/dist/client/assets/{use-join-requests-DHGPKNlr.js → use-join-requests-D0RX0KVp.js} +1 -1
  329. package/dist/client/assets/{use-main-panel-tabs-WUAIV6cr.js → use-main-panel-tabs-Dy6OYkJL.js} +1 -1
  330. package/dist/client/assets/{use-mcp-auth-status-DZTVEUgz.js → use-mcp-auth-status-BLS8Hv4S.js} +1 -1
  331. package/dist/client/assets/{use-mcp-client-CfpsAKj4.js → use-mcp-client-DwqRqgyq.js} +1 -1
  332. package/dist/client/assets/{use-mcp-prompts-B6wGbsaO.js → use-mcp-prompts-l19k-bhU.js} +1 -1
  333. package/dist/client/assets/{use-mcp-tools-De9LHWCI.js → use-mcp-tools-CNG9BIav.js} +1 -1
  334. package/dist/client/assets/{use-mobile-99mfVsUI.js → use-mobile-BwQy16Q6.js} +1 -1
  335. package/dist/client/assets/use-move-blocks-Crj0de_N.js +1 -0
  336. package/dist/client/assets/{use-navigate-to-agent-DaAFktW9.js → use-navigate-to-agent-BK5-GF4Q.js} +1 -1
  337. package/dist/client/assets/{use-open-billing-url-Bzh-ntva.js → use-open-billing-url-BQr-ZtMF.js} +1 -1
  338. package/dist/client/assets/{use-org-fs-Dczc29OI.js → use-org-fs-DLZ1-PTn.js} +1 -1
  339. package/dist/client/assets/{use-org-repo-syncs-Cf3GrgqR.js → use-org-repo-syncs-CDoF8IOA.js} +1 -1
  340. package/dist/client/assets/{use-org-sso-CTKiuB0A.js → use-org-sso-C-qEDq8K.js} +1 -1
  341. package/dist/client/assets/{use-organization-roles-BfeXwaiy.js → use-organization-roles-D0H2tUJi.js} +1 -1
  342. package/dist/client/assets/{use-organization-settings-SIasU_tC.js → use-organization-settings-kq9jLGY0.js} +1 -1
  343. package/dist/client/assets/{use-panel-navigate-B12jZOsf.js → use-panel-navigate-BECpOul-.js} +1 -1
  344. package/dist/client/assets/{use-project-native-view-presence-BYkoNVb2.js → use-project-native-view-presence-1uAz-ylt.js} +1 -1
  345. package/dist/client/assets/{use-project-scope-8q_Pr-Xb.js → use-project-scope-DQZacSdf.js} +1 -1
  346. package/dist/client/assets/{use-recent-apps-0tmI_vdA.js → use-recent-apps-ujQcGW4R.js} +1 -1
  347. package/dist/client/assets/{use-releases-BrcgpLBE.js → use-releases-Brr6nY5b.js} +1 -1
  348. package/dist/client/assets/{use-reports-diagnostic-DXt6zEk2.js → use-reports-diagnostic-CSbUL_Ki.js} +1 -1
  349. package/dist/client/assets/{use-sandbox-events-DukuKdrD.js → use-sandbox-events-DDEe74Lx.js} +1 -1
  350. package/dist/client/assets/{use-secrets-zkQum-du.js → use-secrets-B-wd58Sw.js} +1 -1
  351. package/dist/client/assets/{use-section-preview-base-CPGTecvC.js → use-section-preview-base-CyvlvXKC.js} +1 -1
  352. package/dist/client/assets/{use-session-runtime-BkX1p9DX.js → use-session-runtime-oQf5p7F0.js} +1 -1
  353. package/dist/client/assets/{use-sidebar-collapsed-DxKpoCm3.js → use-sidebar-collapsed-CQxN5Dgl.js} +1 -1
  354. package/dist/client/assets/{use-tags-Cf5XANnQ.js → use-tags-Ckwl5Ic8.js} +1 -1
  355. package/dist/client/assets/{use-task-board-analytics-Bm_X5xzM.js → use-task-board-analytics-CxJm3obr.js} +1 -1
  356. package/dist/client/assets/{use-task-board-events-CmQec1Gn.js → use-task-board-events-C11vdnOU.js} +1 -1
  357. package/dist/client/assets/{use-task-board-item-prs-CFwgg281.js → use-task-board-item-prs-OoBVrY5e.js} +1 -1
  358. package/dist/client/assets/{use-task-metadata-ztONCu50.js → use-task-metadata-B5vxvrwt.js} +1 -1
  359. package/dist/client/assets/{use-thread-analytics-D2_R_6NS.js → use-thread-analytics-Ccey92kA.js} +1 -1
  360. package/dist/client/assets/{use-thread-outputs-CM6siwJk.js → use-thread-outputs-AtJj5nDf.js} +1 -1
  361. package/dist/client/assets/useInfiniteQuery-B3ME351M.js +1 -0
  362. package/dist/client/assets/{useQueries-BmYWSC6K.js → useQueries-DwNBQmnp.js} +1 -1
  363. package/dist/client/assets/useSuspenseInfiniteQuery-DdTGZQmz.js +1 -0
  364. package/dist/client/assets/{users-Tw_qkTX5.js → users-47U5EmUY.js} +1 -1
  365. package/dist/client/assets/{utils-gKN9JfVP.js → utils-CLU7TQYj.js} +1 -1
  366. package/dist/client/assets/{variant-calendar-BPJ1qq_6.js → variant-calendar-8QsQaZXX.js} +1 -1
  367. package/dist/client/assets/variant-matcher-override-VqVKqAN8.js +1 -0
  368. package/dist/client/assets/view-header-C8Yesx7u.js +1 -0
  369. package/dist/client/assets/{virtual-mcp-DSjzxtZz.js → virtual-mcp-BO25j0IY.js} +1 -1
  370. package/dist/client/assets/{watch-sse-pool-B-BVtIbV.js → watch-sse-pool-DZPVglNq.js} +1 -1
  371. package/dist/client/index.html +2 -2
  372. package/dist/server/server.js +1 -1
  373. package/package.json +1 -1
  374. package/dist/client/assets/agent-analytics-DekAZPEA.js +0 -1
  375. package/dist/client/assets/agent-app-CTIntyRO.js +0 -1
  376. package/dist/client/assets/agent-calendar-BOwlx26G.js +0 -1
  377. package/dist/client/assets/agent-deck-Blwg0xlI.js +0 -1
  378. package/dist/client/assets/agent-experiments-Dh0XTNYQ.js +0 -1
  379. package/dist/client/assets/agent-icon-C1y4Hi5E.js +0 -1
  380. package/dist/client/assets/agent-library-BvqNBNnB.js +0 -1
  381. package/dist/client/assets/agent-library-file-B3CNW-Ur.js +0 -1
  382. package/dist/client/assets/agent-monitor-CRDNCfA0.js +0 -1
  383. package/dist/client/assets/agent-releases-Cm87ANGo.js +0 -2
  384. package/dist/client/assets/agent-settings-BO1V25up.js +0 -1
  385. package/dist/client/assets/agent-site-editor-code-C_cxtapJ.js +0 -2
  386. package/dist/client/assets/agent-site-editor-content-BGtWv50J.js +0 -1
  387. package/dist/client/assets/agent-site-editor-preview-B0XVbr7I.js +0 -1
  388. package/dist/client/assets/agent-view-sQDimm56.js +0 -1
  389. package/dist/client/assets/alert-DiPve0LV.js +0 -1
  390. package/dist/client/assets/api-keys-6VZ4TzW2.js +0 -1
  391. package/dist/client/assets/app-editor-ajdhmZLY.js +0 -1
  392. package/dist/client/assets/category-editor-DcJjRuKm.js +0 -1
  393. package/dist/client/assets/cms-settings-editor-CFLaDl_s.js +0 -1
  394. package/dist/client/assets/collection-table-wrapper-BRngAqmo.js +0 -1
  395. package/dist/client/assets/content-tab--1ooKCUT.js +0 -22
  396. package/dist/client/assets/context-C0NiIgda.js +0 -1
  397. package/dist/client/assets/experiments-tab-B8wvIAAX.js +0 -1
  398. package/dist/client/assets/index-DfpwvZQG.css +0 -1
  399. package/dist/client/assets/library--gRfaIdM.js +0 -1
  400. package/dist/client/assets/monitoring-VWUfglka.js +0 -1
  401. package/dist/client/assets/mustache-BxO97obl.js +0 -4
  402. package/dist/client/assets/post-calendar-DYyzGtbp.js +0 -1
  403. package/dist/client/assets/project-app-view-BwcoGS-v.js +0 -1
  404. package/dist/client/assets/project-reports-C5SkTKHX.js +0 -1
  405. package/dist/client/assets/project-tasks-CX44ab5v.js +0 -1
  406. package/dist/client/assets/record-editor-FHEv7gn_.js +0 -1
  407. package/dist/client/assets/redirect-editor-BcHXzq7w.js +0 -1
  408. package/dist/client/assets/releases-api-Dd6sHYpc.js +0 -1
  409. package/dist/client/assets/reports-DRzidVXr.js +0 -1
  410. package/dist/client/assets/repositories-Q-unbJnr.js +0 -1
  411. package/dist/client/assets/route-DVaDfduX.js +0 -1
  412. package/dist/client/assets/sections-editor-2zr-sr1i.js +0 -1
  413. package/dist/client/assets/settings-tab-CdOisIW6.js +0 -1
  414. package/dist/client/assets/site-draft-actions-CSQlnRHC.js +0 -12
  415. package/dist/client/assets/site-draft-view-BaHCN82W.js +0 -2
  416. package/dist/client/assets/site-editor-VsNIJVQY.js +0 -1
  417. package/dist/client/assets/site-editor-toast-DQ656FVh.js +0 -1
  418. package/dist/client/assets/tasks-DnPEEzRb.js +0 -1
  419. package/dist/client/assets/use-content-sync-CsEeS6wP.js +0 -1
  420. package/dist/client/assets/use-move-blocks-ChQw5gpw.js +0 -1
  421. package/dist/client/assets/useInfiniteQuery-DFK0dHSs.js +0 -1
  422. package/dist/client/assets/useSuspenseInfiniteQuery-BBbMOBX0.js +0 -1
  423. package/dist/client/assets/variant-matcher-override-DKBTrcbu.js +0 -1
@@ -1 +1 @@
1
- import{r as d,cx as A,ct as ce,j as b,cz as _,cM as ae,eo as O,cA as C,cG as P,cB as ie,c as F,l as $}from"./index-Cuw4uBth.js";import{c as de}from"./index-BdQq_4o_.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,v]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[T,X]=d.useState(null),[x,L]=d.useState(0),[Y,j]=d.useState(0),[D,y]=d.useState(!1),[N,W]=d.useState(!1),m=A(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:T,onScrollbarYChange:X,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:m,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":Y+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=v(J,o),a=d.useRef(null),c=A(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(B,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=M(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(B,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=v(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=M(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(B,{"data-state":n?"visible":"hidden",...t,ref:e})})}),B=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=v(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(me,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),me=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[ve,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=v(g,o),[w,T]=d.useState(null),X=A(e,m=>T(m)),x=d.useRef(null),L=d.useRef(""),Y=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=M(h,10);function W(m){if(x.current){const p=m.clientX-x.current.left,R=m.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const m=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",m,{passive:!1}),()=>document.removeEventListener("wheel",m,{passive:!1})},[Y,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(ve,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:X,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,m=>{m.button===0&&(m.target.setPointerCapture(m.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(m))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,m=>{const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),H="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(H,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=v(H,o),s=ee(H,o),{onThumbPositionChange:a}=s,c=A(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=M(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,T=h.clientY-S.top;s.onThumbPointerDown({x:w,y:T})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=H;var V="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=v(V,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=V;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=v(V,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function M(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] transition-[color,box-shadow] focus-ring",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
1
+ import{r as d,cy as A,cu as ce,j as b,cA as _,cN as ae,ep as O,cB as C,cH as P,cC as ie,c as F,l as $}from"./index-D6lKvaoF.js";import{c as de}from"./index-BdQq_4o_.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,v]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[T,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,H]=d.useState(!1),m=A(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:T,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:H,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:m,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=v(J,o),a=d.useRef(null),c=A(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(B,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(B,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=v(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(B,{"data-state":n?"visible":"hidden",...t,ref:e})})}),B=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=v(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(me,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),me=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[ve,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=v(g,o),[w,T]=d.useState(null),Y=A(e,m=>T(m)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function H(m){if(x.current){const p=m.clientX-x.current.left,R=m.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const m=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",m,{passive:!1}),()=>document.removeEventListener("wheel",m,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(ve,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,m=>{m.button===0&&(m.target.setPointerCapture(m.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),H(m))}),onPointerMove:C(r.onPointerMove,H),onPointerUp:C(r.onPointerUp,m=>{const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),W="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(W,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=v(W,o),s=ee(W,o),{onThumbPositionChange:a}=s,c=A(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,T=h.clientY-S.top;s.onThumbPointerDown({x:w,y:T})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=W;var V="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=v(V,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=V;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=v(V,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] transition-[color,box-shadow] focus-ring",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
@@ -1 +1 @@
1
- import{c as f,j as a,cn as j,h as I,co as S,cp as g}from"./index-Cuw4uBth.js";import{i as v}from"./SearchMd-DO1eOJvD.js";function y(x){const e=f.c(14),{value:r,onChange:l,placeholder:h,onKeyDown:c,className:i,isSearching:p,disabled:u}=x,m=h===void 0?"Search...":h;let s;e[0]!==p?(s=a.jsx(j,{className:"pr-0",children:p?a.jsx(I,{className:"size-4"}):a.jsx(v,{})}),e[0]=p,e[1]=s):s=e[1];let t;e[2]!==l?(t=d=>l(d.target.value),e[2]=l,e[3]=t):t=e[3];let n;e[4]!==u||e[5]!==c||e[6]!==m||e[7]!==t||e[8]!==r?(n=a.jsx(S,{type:"text",value:r,onChange:t,onKeyDown:c,placeholder:m,disabled:u}),e[4]=u,e[5]=c,e[6]=m,e[7]=t,e[8]=r,e[9]=n):n=e[9];let o;return e[10]!==i||e[11]!==s||e[12]!==n?(o=a.jsxs(g,{size:"sm",className:i,children:[s,n]}),e[10]=i,e[11]=s,e[12]=n,e[13]=o):o=e[13],o}export{y as S};
1
+ import{c as f,j as a,co as j,h as I,cp as S,cq as g}from"./index-D6lKvaoF.js";import{i as v}from"./SearchMd-7uzgB_fN.js";function y(x){const e=f.c(14),{value:r,onChange:l,placeholder:h,onKeyDown:c,className:i,isSearching:p,disabled:u}=x,m=h===void 0?"Search...":h;let s;e[0]!==p?(s=a.jsx(j,{className:"pr-0",children:p?a.jsx(I,{className:"size-4"}):a.jsx(v,{})}),e[0]=p,e[1]=s):s=e[1];let t;e[2]!==l?(t=d=>l(d.target.value),e[2]=l,e[3]=t):t=e[3];let n;e[4]!==u||e[5]!==c||e[6]!==m||e[7]!==t||e[8]!==r?(n=a.jsx(S,{type:"text",value:r,onChange:t,onKeyDown:c,placeholder:m,disabled:u}),e[4]=u,e[5]=c,e[6]=m,e[7]=t,e[8]=r,e[9]=n):n=e[9];let o;return e[10]!==i||e[11]!==s||e[12]!==n?(o=a.jsxs(g,{size:"sm",className:i,children:[s,n]}),e[10]=i,e[11]=s,e[12]=n,e[13]=o):o=e[13],o}export{y as S};
@@ -1 +1 @@
1
- import{c as K,r as C,l as B,j as a,b7 as M}from"./index-Cuw4uBth.js";import{i as I}from"./SearchMd-DO1eOJvD.js";import{I as O}from"./icon-button-DhKNS89h.js";function G(S){const e=K.c(34),{value:t,onChange:l,label:E,placeholder:D,clearLabel:F,expanded:o,className:j}=S,w=E===void 0?"Search":E,d=D===void 0?"Search…":D,_=F===void 0?"Clear search":F,[L,p]=C.useState(t!==""),[R,z]=C.useState(!1),[V,$]=C.useState(t);if(t!==V&&($(t),t===""&&!R&&p(!1)),!L&&!o){let s,g;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>p(!0),g=a.jsx(I,{}),e[0]=s,e[1]=g):(s=e[0],g=e[1]);let v;return e[2]!==w?(v=a.jsx(O,{label:w,tooltipSide:"bottom",variant:"outline",onClick:s,children:g}),e[2]=w,e[3]=v):v=e[3],v}const k=o?"h-10 w-full px-3":"h-7 w-32 animate-search-expand px-2.5 sm:w-44";let n;e[4]!==j||e[5]!==k?(n=B("inline-flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-card text-card-foreground shadow-edge",k,j),e[4]=j,e[5]=k,e[6]=n):n=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(I,{className:"size-4 shrink-0 text-muted-foreground"}),e[7]=x):x=e[7];const y=!o;let r;e[8]!==l?(r=s=>l(s.target.value),e[8]=l,e[9]=r):r=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>z(!0),e[10]=h):h=e[10];let i;e[11]!==t?(i=()=>{z(!1),t===""&&p(!1)},e[11]=t,e[12]=i):i=e[12];let c;e[13]!==l?(c=s=>{s.key==="Escape"&&l("")},e[13]=l,e[14]=c):c=e[14];const N=o?"text-sm":"text-xs";let f;e[15]!==N?(f=B("w-full min-w-0 bg-transparent outline-none placeholder:text-muted-foreground",N),e[15]=N,e[16]=f):f=e[16];let u;e[17]!==d||e[18]!==i||e[19]!==c||e[20]!==f||e[21]!==y||e[22]!==r||e[23]!==t?(u=a.jsx("input",{autoFocus:y,value:t,onChange:r,onFocus:h,onBlur:i,onKeyDown:c,placeholder:d,"aria-label":d,className:f}),e[17]=d,e[18]=i,e[19]=c,e[20]=f,e[21]=y,e[22]=r,e[23]=t,e[24]=u):u=e[24];let m;e[25]!==_||e[26]!==o||e[27]!==l||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":_,onMouseDown:P,onClick:()=>{l(""),o||p(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:a.jsx(M,{className:"size-3.5"})}),e[25]=_,e[26]=o,e[27]=l,e[28]=t,e[29]=m):m=e[29];let b;return e[30]!==u||e[31]!==m||e[32]!==n?(b=a.jsxs("div",{className:n,children:[x,u,m]}),e[30]=u,e[31]=m,e[32]=n,e[33]=b):b=e[33],b}function P(S){return S.preventDefault()}export{G as S};
1
+ import{c as K,r as C,l as B,j as a,b7 as M}from"./index-D6lKvaoF.js";import{i as I}from"./SearchMd-7uzgB_fN.js";import{I as O}from"./icon-button-CdKw1JM7.js";function G(S){const e=K.c(34),{value:t,onChange:l,label:E,placeholder:D,clearLabel:F,expanded:o,className:j}=S,w=E===void 0?"Search":E,d=D===void 0?"Search…":D,_=F===void 0?"Clear search":F,[L,p]=C.useState(t!==""),[R,z]=C.useState(!1),[V,$]=C.useState(t);if(t!==V&&($(t),t===""&&!R&&p(!1)),!L&&!o){let s,g;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>p(!0),g=a.jsx(I,{}),e[0]=s,e[1]=g):(s=e[0],g=e[1]);let v;return e[2]!==w?(v=a.jsx(O,{label:w,tooltipSide:"bottom",variant:"outline",onClick:s,children:g}),e[2]=w,e[3]=v):v=e[3],v}const k=o?"h-10 w-full px-3":"h-7 w-32 animate-search-expand px-2.5 sm:w-44";let n;e[4]!==j||e[5]!==k?(n=B("inline-flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-card text-card-foreground shadow-edge",k,j),e[4]=j,e[5]=k,e[6]=n):n=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(I,{className:"size-4 shrink-0 text-muted-foreground"}),e[7]=x):x=e[7];const y=!o;let r;e[8]!==l?(r=s=>l(s.target.value),e[8]=l,e[9]=r):r=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>z(!0),e[10]=h):h=e[10];let i;e[11]!==t?(i=()=>{z(!1),t===""&&p(!1)},e[11]=t,e[12]=i):i=e[12];let c;e[13]!==l?(c=s=>{s.key==="Escape"&&l("")},e[13]=l,e[14]=c):c=e[14];const N=o?"text-sm":"text-xs";let f;e[15]!==N?(f=B("w-full min-w-0 bg-transparent outline-none placeholder:text-muted-foreground",N),e[15]=N,e[16]=f):f=e[16];let u;e[17]!==d||e[18]!==i||e[19]!==c||e[20]!==f||e[21]!==y||e[22]!==r||e[23]!==t?(u=a.jsx("input",{autoFocus:y,value:t,onChange:r,onFocus:h,onBlur:i,onKeyDown:c,placeholder:d,"aria-label":d,className:f}),e[17]=d,e[18]=i,e[19]=c,e[20]=f,e[21]=y,e[22]=r,e[23]=t,e[24]=u):u=e[24];let m;e[25]!==_||e[26]!==o||e[27]!==l||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":_,onMouseDown:P,onClick:()=>{l(""),o||p(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:a.jsx(M,{className:"size-3.5"})}),e[25]=_,e[26]=o,e[27]=l,e[28]=t,e[29]=m):m=e[29];let b;return e[30]!==u||e[31]!==m||e[32]!==n?(b=a.jsxs("div",{className:n,children:[x,u,m]}),e[30]=u,e[31]=m,e[32]=n,e[33]=b):b=e[33],b}function P(S){return S.preventDefault()}export{G as S};
@@ -1 +1 @@
1
- import{c as x,aC as d,b as j,j as i}from"./index-Cuw4uBth.js";import{t as E}from"./Users01-Y9yFg_2K.js";const R=/^[A-Za-z0-9_.-]+$/;function b(f){const e=x.c(15),{field:p,secretById:t}=f,s=j(),n=p.value||"";if(!n)return null;let l;e[0]!==n||e[1]!==t?(l=t.get(n),e[0]=n,e[1]=t,e[2]=l):l=e[2];const c=l;if(!c){let a;e[3]!==n||e[4]!==s?(a=s("sandbox.envVarsField.missingSecret",{id:n}),e[3]=n,e[4]=s,e[5]=a):a=e[5];let u;return e[6]!==a?(u=i.jsx("span",{className:"text-destructive",children:a}),e[6]=a,e[7]=u):u=e[7],u}let o;e[8]!==c.scope?(o=i.jsx(N,{scope:c.scope}),e[8]=c.scope,e[9]=o):o=e[9];let r;e[10]!==c.name?(r=i.jsx("span",{className:"truncate font-mono",children:c.name}),e[10]=c.name,e[11]=r):r=e[11];let m;return e[12]!==o||e[13]!==r?(m=i.jsxs("span",{className:"inline-flex items-center gap-1.5 truncate",children:[o,r]}),e[12]=o,e[13]=r,e[14]=m):m=e[14],m}function N(f){const e=x.c(2),{scope:p}=f,t=p==="user"?d:E;let s;return e[0]!==t?(s=i.jsx(t,{className:"size-3 text-muted-foreground"}),e[0]=t,e[1]=s):s=e[1],s}export{b as S,R as a,N as b};
1
+ import{c as x,aC as d,b as j,j as i}from"./index-D6lKvaoF.js";import{t as E}from"./Users01-Bzd23uge.js";const R=/^[A-Za-z0-9_.-]+$/;function b(f){const e=x.c(15),{field:p,secretById:t}=f,s=j(),n=p.value||"";if(!n)return null;let l;e[0]!==n||e[1]!==t?(l=t.get(n),e[0]=n,e[1]=t,e[2]=l):l=e[2];const c=l;if(!c){let a;e[3]!==n||e[4]!==s?(a=s("sandbox.envVarsField.missingSecret",{id:n}),e[3]=n,e[4]=s,e[5]=a):a=e[5];let u;return e[6]!==a?(u=i.jsx("span",{className:"text-destructive",children:a}),e[6]=a,e[7]=u):u=e[7],u}let o;e[8]!==c.scope?(o=i.jsx(N,{scope:c.scope}),e[8]=c.scope,e[9]=o):o=e[9];let r;e[10]!==c.name?(r=i.jsx("span",{className:"truncate font-mono",children:c.name}),e[10]=c.name,e[11]=r):r=e[11];let m;return e[12]!==o||e[13]!==r?(m=i.jsxs("span",{className:"inline-flex items-center gap-1.5 truncate",children:[o,r]}),e[12]=o,e[13]=r,e[14]=m):m=e[14],m}function N(f){const e=x.c(2),{scope:p}=f,t=p==="user"?d:E;let s;return e[0]!==t?(s=i.jsx(t,{className:"size-3 text-muted-foreground"}),e[0]=t,e[1]=s):s=e[1],s}export{b as S,R as a,N as b};
@@ -1 +1 @@
1
- import{c as j,b as N,j as s,n as C,hd as F,M as k,r as y,bA as L,B as D,aC as O,ag as T,D as A,v as B,w as R,x as I,aY as q,I as _,y as V,t as z,fU as H}from"./index-Cuw4uBth.js";import{i as M}from"./AlertCircle-D9_evsvO.js";import{s as U}from"./Plus-BA90GKs1.js";import{t as Y}from"./Users01-Y9yFg_2K.js";import{E as G}from"./empty-state-Gwq8u3Sk.js";import{L as w}from"./label-GaS9ZdQZ.js";import{S as J,b as K,a as Q,d as W,c as P}from"./select-B73KS7i3.js";import{T as X}from"./textarea-CDKBkceb.js";import{u as Z,a as ee}from"./use-secrets-zkQum-du.js";import{R as te}from"./require-capability-Cmje3DfT.js";import"./index-BdQq_4o_.js";import"./index-B-HoKvLm.js";import"./ChevronUp-7SZxJu8w.js";import"./access-gate-5CuwEsfU.js";import"./capability-load-error-C2YNxboS.js";function se(t){const e=j.c(6),{error:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(M,{size:16}),e[0]=c):c=e[0];let n;e[1]!==r.message||e[2]!==i?(n=i("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=i,e[3]=n):n=e[3];let l;return e[4]!==n?(l=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=l):l=e[5],l}function re(t){const e=j.c(8),{scope:r}=t,i=N(),c=r==="user"?O:Y;let n;e[0]!==r||e[1]!==i?(n=i(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=i,e[2]=n):n=e[2];const l=n;let a;e[3]!==c?(a=s.jsx(c,{size:12}),e[3]=c,e[4]=a):a=e[4];let m;return e[5]!==l||e[6]!==a?(m=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[a,l]}),e[5]=l,e[6]=a,e[7]=m):m=e[7],m}function $(t){const e=j.c(20),{secret:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(T,{size:16,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let n;e[3]!==r.scope?(n=s.jsx(re,{scope:r.scope}),e[3]=r.scope,e[4]=n):n=e[4];let l;e[5]!==c||e[6]!==n?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,n]}),e[5]=c,e[6]=n,e[7]=l):l=e[7];let a;e[8]!==r.description?(a=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=a):a=e[9];let m;e[10]!==l||e[11]!==a?(m=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[i,s.jsxs("div",{className:"min-w-0",children:[l,a]})]}),e[10]=l,e[11]=a,e[12]=m):m=e[12];let d;e[13]!==r.createdAt?(d=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=d):d=e[14];let u;e[15]!==d?(u=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:d}),e[15]=d,e[16]=u):u=e[16];let x;return e[17]!==m||e[18]!==u?(x=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[m,u]}),e[17]=m,e[18]=u,e[19]=x):x=e[19],x}function ne(t){const e=j.c(9),{action:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(T,{}),e[0]=c):c=e[0];let n;e[1]!==i?(n=i("settings.secrets.emptyTitle"),e[1]=i,e[2]=n):n=e[2];let l;e[3]!==i?(l=i("settings.secrets.emptyDescription"),e[3]=i,e[4]=l):l=e[4];let a;return e[5]!==r||e[6]!==n||e[7]!==l?(a=s.jsx(H,{children:s.jsx(G,{size:"inline",icon:c,title:n,description:l,children:r})}),e[5]=r,e[6]=n,e[7]=l,e[8]=a):a=e[8],a}function E({open:t,onOpenChange:e}){const r=N(),[i,c]=y.useState("organization"),[n,l]=y.useState(""),[a,m]=y.useState(""),[d,u]=y.useState(""),x=ee();function g(){c("organization"),l(""),m(""),u("")}function p(){g(),e(!1)}async function S(o){if(o.preventDefault(),!(!n.trim()||!a))try{await x.mutateAsync({scope:i,name:n.trim(),value:a,description:d.trim()||void 0}),z.success(r("settings.secrets.secretCreated",{name:n.trim()})),p()}catch(f){z.error(f instanceof Error?f.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(A,{open:t,onOpenChange:o=>{o?e(o):p()},children:s.jsxs(B,{className:"sm:max-w-lg",children:[s.jsxs(R,{children:[s.jsx(I,{children:r("settings.secrets.newSecretTitle")}),s.jsx(q,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(J,{value:i,onValueChange:o=>c(o),children:[s.jsx(K,{id:"secret-scope",children:s.jsx(Q,{})}),s.jsxs(W,{children:[s.jsx(P,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx(P,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(_,{id:"secret-name",value:n,onChange:o=>l(o.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(_,{id:"secret-value",type:"password",value:a,onChange:o=>m(o.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(X,{id:"secret-description",value:d,onChange:o=>u(o.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(V,{children:[s.jsx(D,{type:"button",variant:"outline",onClick:p,disabled:x.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(D,{type:"submit",disabled:x.isPending||!n.trim()||!a,children:x.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function ie(){const t=j.c(34),e=N(),r=Z(),[i,c]=y.useState(!1);let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>c(!0),l=s.jsx(U,{size:14}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let a;t[2]!==e?(a=e("settings.secrets.newSecret"),t[2]=e,t[3]=a):a=t[3];let m;t[4]!==a?(m=s.jsx(C.Actions,{children:s.jsxs(D,{size:"sm",onClick:n,children:[l,a]})}),t[4]=a,t[5]=m):m=t[5];const d=m;if(r.length===0){let o;t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ne,{action:!1}),t[6]=o):o=t[6];let f;t[7]!==i?(f=s.jsx(E,{open:i,onOpenChange:c}),t[7]=i,t[8]=f):f=t[8];let h;return t[9]!==d||t[10]!==f?(h=s.jsxs(s.Fragment,{children:[d,o,f]}),t[9]=d,t[10]=f,t[11]=h):h=t[11],h}let u,x,g;if(t[12]!==d||t[13]!==r||t[14]!==e){const o=r.filter(oe),f=r.filter(ae),h=r.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let b;t[18]!==r.length||t[19]!==e||t[20]!==h?(b=e(h,{count:r.length}),t[18]=r.length,t[19]=e,t[20]=h,t[21]=b):b=t[21];let v;t[22]!==b?(v=s.jsx("p",{className:"text-sm text-muted-foreground",children:b}),t[22]=b,t[23]=v):v=t[23],t[24]!==d||t[25]!==v?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[v,d]}),t[24]=d,t[25]=v,t[26]=u):u=t[26],x=o.length>0?s.jsxs("section",{className:"surface p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionOrganization")}),s.jsx("div",{children:o.map(le)})]}):null,g=f.length>0?s.jsxs("section",{className:"surface p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionPrivate")}),s.jsx("div",{children:f.map(ce)})]}):null,t[12]=d,t[13]=r,t[14]=e,t[15]=u,t[16]=x,t[17]=g}else u=t[15],x=t[16],g=t[17];let p;t[27]!==i?(p=s.jsx(E,{open:i,onOpenChange:c}),t[27]=i,t[28]=p):p=t[28];let S;return t[29]!==u||t[30]!==x||t[31]!==g||t[32]!==p?(S=s.jsxs(s.Fragment,{children:[u,x,g,p]}),t[29]=u,t[30]=x,t[31]=g,t[32]=p,t[33]=S):S=t[33],S}function ce(t){return s.jsx($,{secret:t},t.id)}function le(t){return s.jsx($,{secret:t},t.id)}function ae(t){return t.scope==="user"}function oe(t){return t.scope==="organization"}function me(){const t=j.c(7),e=N();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let i;t[2]!==r?(i=s.jsx(C.Title,{children:r}),t[2]=r,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(k,{fallback:de,children:s.jsx(y.Suspense,{fallback:s.jsx(L,{className:"h-32 w-full"}),children:s.jsx(ie,{})})}),t[4]=c):c=t[4];let n;return t[5]!==i?(n=s.jsx(C,{children:s.jsx(C.Content,{children:s.jsx(C.Container,{children:s.jsxs(F,{children:[i,c]})})})}),t[5]=i,t[6]=n):n=t[6],n}function de(t){const{error:e}=t;return s.jsx(se,{error:e??new Error("Failed to load secrets")})}function _e(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{capability:"secrets:manage",area:"secrets",children:s.jsx(me,{})}),t[0]=e):e=t[0],e}export{_e as default};
1
+ import{c as j,b as N,j as s,n as C,hd as F,M as k,r as y,bB as B,B as D,aC as L,ag as T,D as O,v as A,w as R,x as I,aY as q,I as _,y as V,t as z,fU as H}from"./index-D6lKvaoF.js";import{i as M}from"./AlertCircle-COvusPgV.js";import{s as U}from"./Plus-CZXpdtEH.js";import{t as Y}from"./Users01-Bzd23uge.js";import{E as G}from"./empty-state-usXK3Xda.js";import{L as w}from"./label-G1B1MWwD.js";import{S as J,b as K,a as Q,d as W,c as P}from"./select-WYGhjx6Y.js";import{T as X}from"./textarea-L_ZRNMiO.js";import{u as Z,a as ee}from"./use-secrets-B-wd58Sw.js";import{R as te}from"./require-capability-Coznh-2O.js";import"./index-BdQq_4o_.js";import"./index-BCVYESVO.js";import"./ChevronUp-krQUb2vU.js";import"./access-gate-BUmBK35t.js";import"./capability-load-error-C_z_eZxA.js";function se(t){const e=j.c(6),{error:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(M,{size:16}),e[0]=c):c=e[0];let n;e[1]!==r.message||e[2]!==i?(n=i("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=i,e[3]=n):n=e[3];let l;return e[4]!==n?(l=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=l):l=e[5],l}function re(t){const e=j.c(8),{scope:r}=t,i=N(),c=r==="user"?L:Y;let n;e[0]!==r||e[1]!==i?(n=i(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=i,e[2]=n):n=e[2];const l=n;let a;e[3]!==c?(a=s.jsx(c,{size:12}),e[3]=c,e[4]=a):a=e[4];let m;return e[5]!==l||e[6]!==a?(m=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[a,l]}),e[5]=l,e[6]=a,e[7]=m):m=e[7],m}function $(t){const e=j.c(20),{secret:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(T,{size:16,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let n;e[3]!==r.scope?(n=s.jsx(re,{scope:r.scope}),e[3]=r.scope,e[4]=n):n=e[4];let l;e[5]!==c||e[6]!==n?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,n]}),e[5]=c,e[6]=n,e[7]=l):l=e[7];let a;e[8]!==r.description?(a=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=a):a=e[9];let m;e[10]!==l||e[11]!==a?(m=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[i,s.jsxs("div",{className:"min-w-0",children:[l,a]})]}),e[10]=l,e[11]=a,e[12]=m):m=e[12];let d;e[13]!==r.createdAt?(d=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=d):d=e[14];let u;e[15]!==d?(u=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:d}),e[15]=d,e[16]=u):u=e[16];let x;return e[17]!==m||e[18]!==u?(x=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[m,u]}),e[17]=m,e[18]=u,e[19]=x):x=e[19],x}function ne(t){const e=j.c(9),{action:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(T,{}),e[0]=c):c=e[0];let n;e[1]!==i?(n=i("settings.secrets.emptyTitle"),e[1]=i,e[2]=n):n=e[2];let l;e[3]!==i?(l=i("settings.secrets.emptyDescription"),e[3]=i,e[4]=l):l=e[4];let a;return e[5]!==r||e[6]!==n||e[7]!==l?(a=s.jsx(H,{children:s.jsx(G,{size:"inline",icon:c,title:n,description:l,children:r})}),e[5]=r,e[6]=n,e[7]=l,e[8]=a):a=e[8],a}function E({open:t,onOpenChange:e}){const r=N(),[i,c]=y.useState("organization"),[n,l]=y.useState(""),[a,m]=y.useState(""),[d,u]=y.useState(""),x=ee();function g(){c("organization"),l(""),m(""),u("")}function p(){g(),e(!1)}async function S(o){if(o.preventDefault(),!(!n.trim()||!a))try{await x.mutateAsync({scope:i,name:n.trim(),value:a,description:d.trim()||void 0}),z.success(r("settings.secrets.secretCreated",{name:n.trim()})),p()}catch(f){z.error(f instanceof Error?f.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(O,{open:t,onOpenChange:o=>{o?e(o):p()},children:s.jsxs(A,{className:"sm:max-w-lg",children:[s.jsxs(R,{children:[s.jsx(I,{children:r("settings.secrets.newSecretTitle")}),s.jsx(q,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(J,{value:i,onValueChange:o=>c(o),children:[s.jsx(K,{id:"secret-scope",children:s.jsx(Q,{})}),s.jsxs(W,{children:[s.jsx(P,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx(P,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(_,{id:"secret-name",value:n,onChange:o=>l(o.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(_,{id:"secret-value",type:"password",value:a,onChange:o=>m(o.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(X,{id:"secret-description",value:d,onChange:o=>u(o.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(V,{children:[s.jsx(D,{type:"button",variant:"outline",onClick:p,disabled:x.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(D,{type:"submit",disabled:x.isPending||!n.trim()||!a,children:x.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function ie(){const t=j.c(34),e=N(),r=Z(),[i,c]=y.useState(!1);let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>c(!0),l=s.jsx(U,{size:14}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let a;t[2]!==e?(a=e("settings.secrets.newSecret"),t[2]=e,t[3]=a):a=t[3];let m;t[4]!==a?(m=s.jsx(C.Actions,{children:s.jsxs(D,{size:"sm",onClick:n,children:[l,a]})}),t[4]=a,t[5]=m):m=t[5];const d=m;if(r.length===0){let o;t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ne,{action:!1}),t[6]=o):o=t[6];let f;t[7]!==i?(f=s.jsx(E,{open:i,onOpenChange:c}),t[7]=i,t[8]=f):f=t[8];let h;return t[9]!==d||t[10]!==f?(h=s.jsxs(s.Fragment,{children:[d,o,f]}),t[9]=d,t[10]=f,t[11]=h):h=t[11],h}let u,x,g;if(t[12]!==d||t[13]!==r||t[14]!==e){const o=r.filter(oe),f=r.filter(ae),h=r.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let b;t[18]!==r.length||t[19]!==e||t[20]!==h?(b=e(h,{count:r.length}),t[18]=r.length,t[19]=e,t[20]=h,t[21]=b):b=t[21];let v;t[22]!==b?(v=s.jsx("p",{className:"text-sm text-muted-foreground",children:b}),t[22]=b,t[23]=v):v=t[23],t[24]!==d||t[25]!==v?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[v,d]}),t[24]=d,t[25]=v,t[26]=u):u=t[26],x=o.length>0?s.jsxs("section",{className:"surface p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionOrganization")}),s.jsx("div",{children:o.map(le)})]}):null,g=f.length>0?s.jsxs("section",{className:"surface p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionPrivate")}),s.jsx("div",{children:f.map(ce)})]}):null,t[12]=d,t[13]=r,t[14]=e,t[15]=u,t[16]=x,t[17]=g}else u=t[15],x=t[16],g=t[17];let p;t[27]!==i?(p=s.jsx(E,{open:i,onOpenChange:c}),t[27]=i,t[28]=p):p=t[28];let S;return t[29]!==u||t[30]!==x||t[31]!==g||t[32]!==p?(S=s.jsxs(s.Fragment,{children:[u,x,g,p]}),t[29]=u,t[30]=x,t[31]=g,t[32]=p,t[33]=S):S=t[33],S}function ce(t){return s.jsx($,{secret:t},t.id)}function le(t){return s.jsx($,{secret:t},t.id)}function ae(t){return t.scope==="user"}function oe(t){return t.scope==="organization"}function me(){const t=j.c(7),e=N();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let i;t[2]!==r?(i=s.jsx(C.Title,{children:r}),t[2]=r,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(k,{fallback:de,children:s.jsx(y.Suspense,{fallback:s.jsx(B,{className:"h-32 w-full"}),children:s.jsx(ie,{})})}),t[4]=c):c=t[4];let n;return t[5]!==i?(n=s.jsx(C,{children:s.jsx(C.Content,{children:s.jsx(C.Container,{children:s.jsxs(F,{children:[i,c]})})})}),t[5]=i,t[6]=n):n=t[6],n}function de(t){const{error:e}=t;return s.jsx(se,{error:e??new Error("Failed to load secrets")})}function _e(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{capability:"secrets:manage",area:"secrets",children:s.jsx(me,{})}),t[0]=e):e=t[0],e}export{_e as default};
@@ -1 +1 @@
1
- import{c as S,b as j,j as i,r as N,ai as w,B as R,l as _,a7 as k,f3 as A}from"./index-Cuw4uBth.js";import{a as C}from"./Copy01-Bu20fOqK.js";import{a as E,b as L,A as O}from"./alert-DiPve0LV.js";import{u as D}from"./use-copy-ClerAXdJ.js";import{K as T}from"./parse-sections-B1uka1Vq.js";const h="https://docs.decocms.com/storefront/blocks",$={quickstart:`${h}/next/quickstart`,siteEditor:`${h}/next/site-editor#edit-on-your-machine`,serve:`${h}/next/cli#deco-serve`,schema:`${h}/next/cli#deco-schema-and-deco-content`,troubleshooting:`${h}/next/troubleshooting#site-editor`};function Y(t){const e=S.c(4),{text:s}=t;let o;e[0]!==s?(o=s.split("`").map(B),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==o?(r=i.jsx(i.Fragment,{children:o}),e[2]=o,e[3]=r):r=e[3],r}function B(t,e){return e%2===1?i.jsx("code",{className:"whitespace-nowrap rounded bg-muted px-1 py-px font-mono text-[0.85em] text-foreground",children:t},e):i.jsx(N.Fragment,{children:t},e)}function H(t){const e=S.c(31),{command:s}=t,o=j(),{handleCopy:r,copied:n}=D();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsxs("span",{"aria-hidden":"true",className:"select-none text-muted-foreground",children:["$"," "]}),e[0]=a):a=e[0];let c;e[1]!==s?(c=s.split(" ").map(P),e[1]=s,e[2]=c):c=e[2];let l;e[3]!==c?(l=i.jsxs("code",{className:"min-w-0 flex-1 overflow-x-auto py-1.5 font-mono text-xs leading-5 text-foreground",children:[a,c]}),e[3]=c,e[4]=l):l=e[4];let d;e[5]!==o?(d=o("decoServe.guide.copy"),e[5]=o,e[6]=d):d=e[6];let f;e[7]!==s||e[8]!==r?(f=()=>{r(s).catch(F)},e[7]=s,e[8]=r,e[9]=f):f=e[9];let u;e[10]!==n?(u=n?i.jsx(w,{className:"text-success"}):i.jsx(C,{}),e[10]=n,e[11]=u):u=e[11];let m;e[12]!==n||e[13]!==o?(m=o(n?"decoServe.guide.copied":"decoServe.guide.copyShort"),e[12]=n,e[13]=o,e[14]=m):m=e[14];let p;e[15]!==m?(p=i.jsx("span",{"aria-hidden":"true",children:m}),e[15]=m,e[16]=p):p=e[16];let g;e[17]!==d||e[18]!==f||e[19]!==u||e[20]!==p?(g=i.jsxs(R,{type:"button",variant:"ghost",size:"sm",className:"shrink-0 self-start","aria-label":d,onClick:f,children:[u,p]}),e[17]=d,e[18]=f,e[19]=u,e[20]=p,e[21]=g):g=e[21];let x;e[22]!==n||e[23]!==o?(x=n?o("decoServe.guide.copiedAnnouncement"):"",e[22]=n,e[23]=o,e[24]=x):x=e[24];let v;e[25]!==x?(v=i.jsx("span",{className:"sr-only","aria-live":"polite",children:x}),e[25]=x,e[26]=v):v=e[26];let y;return e[27]!==v||e[28]!==l||e[29]!==g?(y=i.jsxs("div",{className:"flex items-center gap-1 rounded-lg border border-border bg-muted/60 py-1 pr-1 pl-3",children:[l,g,v]}),e[27]=v,e[28]=l,e[29]=g,e[30]=y):y=e[30],y}function F(){}function P(t,e){return i.jsxs(N.Fragment,{children:[e>0&&" ",i.jsx("span",{className:"whitespace-nowrap",children:t})]},e)}const M={quickstart:"decoServe.docs.quickstart",siteEditor:"decoServe.docs.siteEditor",serve:"decoServe.docs.serve",schema:"decoServe.docs.schema",troubleshooting:"decoServe.docs.troubleshooting"};function K(t){const e=S.c(20),{links:s,className:o}=t,r=j();let n;e[0]!==r?(n=r("decoServe.docs.heading"),e[0]=r,e[1]=n):n=e[1];let a;e[2]!==o?(a=_("flex flex-col gap-2 text-sm",o),e[2]=o,e[3]=a):a=e[3];let c;e[4]!==r?(c=r("decoServe.docs.heading"),e[4]=r,e[5]=c):c=e[5];let l;e[6]!==c?(l=i.jsx("span",{className:"text-muted-foreground",children:c}),e[6]=c,e[7]=l):l=e[7];let d;if(e[8]!==s||e[9]!==r){let m;e[11]!==r?(m=p=>i.jsxs("a",{href:$[p],target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[r(M[p]),i.jsx(k,{"aria-hidden":"true",className:"size-3.5"}),i.jsx("span",{className:"sr-only",children:r("decoServe.docs.newTab")})]},p),e[11]=r,e[12]=m):m=e[12],d=s.map(m),e[8]=s,e[9]=r,e[10]=d}else d=e[10];let f;e[13]!==d?(f=i.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:d}),e[13]=d,e[14]=f):f=e[14];let u;return e[15]!==n||e[16]!==a||e[17]!==l||e[18]!==f?(u=i.jsxs("nav",{"aria-label":n,className:a,children:[l,f]}),e[15]=n,e[16]=a,e[17]=l,e[18]=f,e[19]=u):u=e[19],u}function G(t,e,s){switch(e.reason){case"not-answering":return{title:t("decoServe.state.notAnswering.title"),body:t("decoServe.state.notAnswering.short",{host:s})};case"outdated":return{title:t("decoServe.state.outdated.title"),body:t("decoServe.state.outdated.body",{host:s})};case"version-mismatch":return{title:t("decoServe.state.versionMismatch.title"),body:t("decoServe.state.versionMismatch.body",{host:s})};case"not-deco-serve":return{title:t("decoServe.state.notDecoServe.title",{host:s}),body:t("decoServe.state.notDecoServe.body",{host:s})};case"not-v8":return{title:t("decoServe.state.notV8.title"),body:t("decoServe.state.notV8.body",{host:s})};case"error":return{title:t("decoServe.state.error.title"),body:t("decoServe.state.error.body",{detail:e.detail??""})}}}function J(){const t=S.c(11),e=j();let s;t[0]!==e?(s=e("decoServe.lna.deniedTitle"),t[0]=e,t[1]=s):s=t[1];let o;t[2]!==s?(o=i.jsx(E,{className:"line-clamp-none",children:s}),t[2]=s,t[3]=o):o=t[3];let r;t[4]!==e?(r=e("decoServe.lna.deniedBody"),t[4]=e,t[5]=r):r=t[5];let n;t[6]!==r?(n=i.jsx(L,{children:r}),t[6]=r,t[7]=n):n=t[7];let a;return t[8]!==o||t[9]!==n?(a=i.jsx(O,{variant:"destructive",children:i.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[o,n]})}),t[8]=o,t[9]=n,t[10]=a):a=t[10],a}const Q={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};function b(t){return t.includes("/sections/")||t.includes("multivariate/section")||t===A}function q(t){if(t.anyOfRefs?.length)return t.anyOfRefs.some(s=>b(s.resolveType));const e=t.properties?.__resolveType;return e?.type==="block-ref"&&e.anyOfRefs?.length?e.anyOfRefs.some(s=>b(s.resolveType)):!1}function X(t){return t.type!=="block-ref"||!t.anyOfRefs?.length?!1:t.anyOfRefs.some(e=>b(e.resolveType))}function Z(t,e){if(e==="global"||e==="sections"||T(t))return!0;const s=t.type==="array"?t.items:void 0;return s?q(s):!1}export{H as C,K as D,J as L,Y as R,Q as a,$ as b,X as c,b as d,Z as i,G as s};
1
+ import{c as S,b as j,j as i,r as N,ai as w,B as R,l as _,a7 as k,f3 as A}from"./index-D6lKvaoF.js";import{a as C}from"./Copy01-DMa3yAGL.js";import{a as E,b as O,A as L}from"./alert-Co4rQNsj.js";import{u as D}from"./use-copy-Bnv2yRR0.js";import{O as T}from"./parse-sections-CQtk5pOz.js";const h="https://docs.decocms.com/storefront/blocks",$={quickstart:`${h}/next/quickstart`,siteEditor:`${h}/next/site-editor#edit-on-your-machine`,serve:`${h}/next/cli#deco-serve`,schema:`${h}/next/cli#deco-schema-and-deco-content`,troubleshooting:`${h}/next/troubleshooting#site-editor`};function Y(t){const e=S.c(4),{text:s}=t;let o;e[0]!==s?(o=s.split("`").map(B),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==o?(r=i.jsx(i.Fragment,{children:o}),e[2]=o,e[3]=r):r=e[3],r}function B(t,e){return e%2===1?i.jsx("code",{className:"whitespace-nowrap rounded bg-muted px-1 py-px font-mono text-[0.85em] text-foreground",children:t},e):i.jsx(N.Fragment,{children:t},e)}function H(t){const e=S.c(31),{command:s}=t,o=j(),{handleCopy:r,copied:n}=D();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsxs("span",{"aria-hidden":"true",className:"select-none text-muted-foreground",children:["$"," "]}),e[0]=a):a=e[0];let c;e[1]!==s?(c=s.split(" ").map(P),e[1]=s,e[2]=c):c=e[2];let l;e[3]!==c?(l=i.jsxs("code",{className:"min-w-0 flex-1 overflow-x-auto py-1.5 font-mono text-xs leading-5 text-foreground",children:[a,c]}),e[3]=c,e[4]=l):l=e[4];let d;e[5]!==o?(d=o("decoServe.guide.copy"),e[5]=o,e[6]=d):d=e[6];let f;e[7]!==s||e[8]!==r?(f=()=>{r(s).catch(F)},e[7]=s,e[8]=r,e[9]=f):f=e[9];let u;e[10]!==n?(u=n?i.jsx(w,{className:"text-success"}):i.jsx(C,{}),e[10]=n,e[11]=u):u=e[11];let m;e[12]!==n||e[13]!==o?(m=o(n?"decoServe.guide.copied":"decoServe.guide.copyShort"),e[12]=n,e[13]=o,e[14]=m):m=e[14];let p;e[15]!==m?(p=i.jsx("span",{"aria-hidden":"true",children:m}),e[15]=m,e[16]=p):p=e[16];let g;e[17]!==d||e[18]!==f||e[19]!==u||e[20]!==p?(g=i.jsxs(R,{type:"button",variant:"ghost",size:"sm",className:"shrink-0 self-start","aria-label":d,onClick:f,children:[u,p]}),e[17]=d,e[18]=f,e[19]=u,e[20]=p,e[21]=g):g=e[21];let x;e[22]!==n||e[23]!==o?(x=n?o("decoServe.guide.copiedAnnouncement"):"",e[22]=n,e[23]=o,e[24]=x):x=e[24];let v;e[25]!==x?(v=i.jsx("span",{className:"sr-only","aria-live":"polite",children:x}),e[25]=x,e[26]=v):v=e[26];let y;return e[27]!==v||e[28]!==l||e[29]!==g?(y=i.jsxs("div",{className:"flex items-center gap-1 rounded-lg border border-border bg-muted/60 py-1 pr-1 pl-3",children:[l,g,v]}),e[27]=v,e[28]=l,e[29]=g,e[30]=y):y=e[30],y}function F(){}function P(t,e){return i.jsxs(N.Fragment,{children:[e>0&&" ",i.jsx("span",{className:"whitespace-nowrap",children:t})]},e)}const M={quickstart:"decoServe.docs.quickstart",siteEditor:"decoServe.docs.siteEditor",serve:"decoServe.docs.serve",schema:"decoServe.docs.schema",troubleshooting:"decoServe.docs.troubleshooting"};function G(t){const e=S.c(20),{links:s,className:o}=t,r=j();let n;e[0]!==r?(n=r("decoServe.docs.heading"),e[0]=r,e[1]=n):n=e[1];let a;e[2]!==o?(a=_("flex flex-col gap-2 text-sm",o),e[2]=o,e[3]=a):a=e[3];let c;e[4]!==r?(c=r("decoServe.docs.heading"),e[4]=r,e[5]=c):c=e[5];let l;e[6]!==c?(l=i.jsx("span",{className:"text-muted-foreground",children:c}),e[6]=c,e[7]=l):l=e[7];let d;if(e[8]!==s||e[9]!==r){let m;e[11]!==r?(m=p=>i.jsxs("a",{href:$[p],target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[r(M[p]),i.jsx(k,{"aria-hidden":"true",className:"size-3.5"}),i.jsx("span",{className:"sr-only",children:r("decoServe.docs.newTab")})]},p),e[11]=r,e[12]=m):m=e[12],d=s.map(m),e[8]=s,e[9]=r,e[10]=d}else d=e[10];let f;e[13]!==d?(f=i.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:d}),e[13]=d,e[14]=f):f=e[14];let u;return e[15]!==n||e[16]!==a||e[17]!==l||e[18]!==f?(u=i.jsxs("nav",{"aria-label":n,className:a,children:[l,f]}),e[15]=n,e[16]=a,e[17]=l,e[18]=f,e[19]=u):u=e[19],u}function J(t,e,s){switch(e.reason){case"not-answering":return{title:t("decoServe.state.notAnswering.title"),body:t("decoServe.state.notAnswering.short",{host:s})};case"outdated":return{title:t("decoServe.state.outdated.title"),body:t("decoServe.state.outdated.body",{host:s})};case"version-mismatch":return{title:t("decoServe.state.versionMismatch.title"),body:t("decoServe.state.versionMismatch.body",{host:s})};case"not-deco-serve":return{title:t("decoServe.state.notDecoServe.title",{host:s}),body:t("decoServe.state.notDecoServe.body",{host:s})};case"not-v8":return{title:t("decoServe.state.notV8.title"),body:t("decoServe.state.notV8.body",{host:s})};case"error":return{title:t("decoServe.state.error.title"),body:t("decoServe.state.error.body",{detail:e.detail??""})}}}function K(){const t=S.c(11),e=j();let s;t[0]!==e?(s=e("decoServe.lna.deniedTitle"),t[0]=e,t[1]=s):s=t[1];let o;t[2]!==s?(o=i.jsx(E,{className:"line-clamp-none",children:s}),t[2]=s,t[3]=o):o=t[3];let r;t[4]!==e?(r=e("decoServe.lna.deniedBody"),t[4]=e,t[5]=r):r=t[5];let n;t[6]!==r?(n=i.jsx(O,{children:r}),t[6]=r,t[7]=n):n=t[7];let a;return t[8]!==o||t[9]!==n?(a=i.jsx(L,{variant:"destructive",children:i.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[o,n]})}),t[8]=o,t[9]=n,t[10]=a):a=t[10],a}const Q={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};function b(t){return t.includes("/sections/")||t.includes("multivariate/section")||t===A}function q(t){if(t.anyOfRefs?.length)return t.anyOfRefs.some(s=>b(s.resolveType));const e=t.properties?.__resolveType;return e?.type==="block-ref"&&e.anyOfRefs?.length?e.anyOfRefs.some(s=>b(s.resolveType)):!1}function X(t){return t.type!=="block-ref"||!t.anyOfRefs?.length?!1:t.anyOfRefs.some(e=>b(e.resolveType))}function Z(t,e){if(e==="global"||e==="sections"||T(t))return!0;const s=t.type==="array"?t.items:void 0;return s?q(s):!1}export{H as C,G as D,K as L,Y as R,Q as a,$ as b,X as c,b as d,Z as i,J as s};
@@ -1 +1 @@
1
- import{V as i,F as e}from"./agent-icon-C1y4Hi5E.js";import{i as n}from"./Link01-DXRUIbxg.js";const s=["general","connections","site"],r={general:{icon:e,titleKey:"virtualMcp.settings.general.title",descriptionKey:"virtualMcp.settings.general.description"},connections:{icon:n,titleKey:"virtualMcp.settings.connections.title",descriptionKey:"virtualMcp.settings.connections.description"},site:{icon:i,titleKey:"virtualMcp.settings.site.title",descriptionKey:"virtualMcp.settings.site.description"}};function l(t){return!!t&&s.includes(t)}export{s as P,r as a,l as i};
1
+ import{V as i,F as e}from"./agent-icon-D8I51g86.js";import{i as n}from"./Link01-C15xvQCb.js";const s=["general","connections","site"],r={general:{icon:e,titleKey:"virtualMcp.settings.general.title",descriptionKey:"virtualMcp.settings.general.description"},connections:{icon:n,titleKey:"virtualMcp.settings.connections.title",descriptionKey:"virtualMcp.settings.connections.description"},site:{icon:i,titleKey:"virtualMcp.settings.site.title",descriptionKey:"virtualMcp.settings.site.description"}};function l(t){return!!t&&s.includes(t)}export{s as P,r as a,l as i};
@@ -0,0 +1 @@
1
+ import{hM as Ho,bh as Wo,c as jn,b as Rn,r as S,l as ae,j as r,bQ as qo,bd as Vs,hN as Ra,B as Ut,X as rn,aj as Go,Z as Uo,bg as Yo,Y as Zo,q as Jo,hm as Qo,hO as Xo,hP as ei,bp as xn,h as ti,bi as Rt,hQ as st,hR as Wr,hS as gs,hT as ni,hU as qr,hV as si,bw as ri,hW as ai,hX as Gr,hY as oi,t as q,bZ as Ur,hZ as ii,h_ as Kt,h$ as li,i0 as ci,i1 as ui,bY as Yr,i2 as vs,i3 as di,i4 as fi,i5 as mi,bW as pi,bx as hi,i6 as gi,i7 as vi,bT as Si,f7 as yi,K as bi,bu as Zr,i8 as Jr,i9 as xi,ia as _i,ib as ki,ic as Ss,id as wi,ie as ji,ig as Ri,ih as Ei,bR as Qr,ii as Vi,ij as Ti,ik as Xr,il as Ai,bV as Ni}from"./index-D6lKvaoF.js";import{u as Ci}from"./chat-context-CFRPrQEn.js";import{a2 as Pi,K as Qn,a3 as Ki,a4 as Mi,a5 as Bi,a6 as Di,a7 as Fi,a8 as Ii,a9 as ea,aa as Li,ab as Oi,z as Un,x as Yn,d as zi,u as $i,ac as ta,i as Hi,ad as Wi,k as qi,h as Gi,ae as Ea,af as Ui,ag as Yi,v as na,ah as Zi,ai as Ji,aj as Wn,ak as sa,al as ra,am as aa,an as ys,ao as Qi,D as Xi,ap as el,y as tl,aq as oa,ar as nl,as as ia,at as la,au as ca,M as sl,av as ua,a as rl,aw as an,ax as al,ay as ol,t as qn,az as _n}from"./held-block-view-OUun6HKW.js";import{c as il}from"./repository-binding-DG0YfJ0p.js";import{n as ll,t as cl}from"./ChevronUp-krQUb2vU.js";import{a8 as Va,b as Jn,an as ul,H as dl,a2 as da,_ as fa}from"./agent-icon-D8I51g86.js";import{S as on}from"./scroll-area-DuxlLjxF.js";import{c as Et,T as Vt,a as Tt}from"./tooltip-LAilTl9w.js";import{l as fl,u as ml,m as pl,D as hl,a1 as gl,B as vl,ac as Mt,ad as Bt,N as Sl,ay as ma,Q as yl,Z as bl}from"./site-editor-toast-DYuw8EYm.js";import{u as xl,X as _l,E as bs,Y as pa,A as kl,Z as wl}from"./blocks-tab-states-B1baLGbh.js";import{m as jl,u as Rl,P as El}from"./mustache-Dlytn5tt.js";import{a0 as Gt,T as ks,az as ws,a1 as Dt,U as ln,e as Vl,c as Tl,w as Al,k as Gn,p as wn,a4 as Nl,_ as qt,V as xs,Z as bt,Y as kn,F as Cl,a2 as ha,$ as Pl,ai as Kl,ak as Ml,aA as Bl,aB as Dl,aC as Fl}from"./parse-sections-CQtk5pOz.js";import{a as Il}from"./Copy01-DMa3yAGL.js";import{a as js,e as Ta}from"./UserSquare-Dy6q7vGw.js";import{i as ga}from"./Tool01-D6wuoLhW.js";import{s as va}from"./Image01-C1LM4LI_.js";import{s as Ll}from"./Plus-CZXpdtEH.js";import{s as Ol}from"./Trash01-fFkz00Bo.js";import{i as Rs}from"./ZoomOut-CbRHTtaG.js";import{u as zl,a as Sa,K as $l,P as Hl,b as Wl,C as ql,D as Gl,c as Ul}from"./core.esm-n2M8kvjD.js";import{u as Yl,s as Zl,a as Zn,S as Jl,v as Ql}from"./sortable.esm-DEhQR8uW.js";import{s as Xl,g as ec,u as tc,A as nc}from"./use-section-preview-base-CyvlvXKC.js";import{a as sc,P as ya,w as rc,b as ac}from"./page-seo-form-bDCctB_4.js";import{u as oc}from"./use-apply-named-rule-C3ZZJzlV.js";import{b as ba,a as ic}from"./variant-matcher-override-VqVKqAN8.js";import{c as xa,d as lc,e as cc}from"./variant-draft-pointer-BeAKcq_c.js";import"./use-panel-navigate-BECpOul-.js";import"./thread-route-qfZwEURL.js";import"./use-project-scope-DQZacSdf.js";import"./autosend-CBkC989z.js";import"./thread-intent-B7fQ4X9a.js";import"./use-mcp-client-DwqRqgyq.js";import"./auth-D095ELC6.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DZPVglNq.js";import"./task-board-9JuNZBWk.js";import"./schema-DNxvjoV7.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-C6bScbXe.js";import"./use-ai-providers-CCh3hgye.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-kq9jLGY0.js";import"./utils-CLU7TQYj.js";import"./Play-BG4TP59z.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DAGOA-DW.js";import"./LinkBroken01-C-j1r45F.js";import"./collapsible-B0-dgkow.js";import"./use-copy-Bnv2yRR0.js";import"./usage-stats-C7wY64zK.js";import"./tool-namespace-D6LarB3P.js";import"./form-B15LRu36.js";import"./label-G1B1MWwD.js";import"./utils-CVEq3hMx.js";import"./markdown-qzRhqGiE.js";import"./use-mobile-BwQy16Q6.js";import"./use-clock-tick-N15XxKsH.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BEchnhBH.js";import"./types-B-ck70wq.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./AlertCircle-COvusPgV.js";import"./XClose-Bl8OQypT.js";import"./ShoppingBag01-fwBzMipi.js";import"./SearchMd-7uzgB_fN.js";import"./shell-layout-DIzvUuq-.js";import"./Building02-GTlj-q2W.js";import"./CheckCircle-C512y-MG.js";import"./Monitor01-DkBo0gFa.js";import"./command-yWHdaNhz.js";import"./index-BJ0i7OFb.js";import"./integration-icon-DsUtWvNG.js";import"./project-icon-DSVUD72l.js";import"./new-project-dialog-CMq12kc2.js";import"./ArrowLeft-DLvj60sB.js";import"./repository-import-picker-DmsHSDsT.js";import"./use-navigate-to-agent-BK5-GF4Q.js";import"./repository-picker-DtHxD0oz.js";import"./useInfiniteQuery-B3ME351M.js";import"./infiniteQueryObserver-DoO1tFcg.js";import"./collection-search-CfEbdS6s.js";import"./use-debounced-value-DLa-riOh.js";import"./required-auth-layout-D6rVgMVl.js";import"./use-org-sso-C-qEDq8K.js";import"./sheet-BXLIoGMZ.js";import"./use-connection-BBWQ1upy.js";import"./Link01-C15xvQCb.js";import"./use-mcp-prompts-l19k-bhU.js";import"./use-thread-outputs-AtJj5nDf.js";import"./file-type-icon-BMJ3eu8C.js";import"./section-array-field-D7M_bj6e.js";import"./alert-Co4rQNsj.js";import"./switch-BByo6038.js";import"./textarea-L_ZRNMiO.js";import"./ChevronSelectorVertical-BsYzg3zS.js";import"./popover-0uuKFwAZ.js";import"./monaco-editor-f9CmyWiW.js";import"./editor-DmuvoJYA.js";import"./calendar-r-ZqwkU5.js";import"./SwitchHorizontal01-C8FHYpzr.js";import"./Minus-pd7IxdG4.js";import"./select-WYGhjx6Y.js";import"./index-BdQq_4o_.js";import"./index-BCVYESVO.js";import"./editor-classes-BnQ0j7aI.js";import"./toggle-group-DGrVpPy5.js";import"./active-indicator-CCMhAsc_.js";import"./combobox-B2ABYNJF.js";import"./Upload01-B7NXMv4U.js";import"./DotsVertical-DcrZktRa.js";import"./search-input-D-Pyf_-v.js";import"./tabs-D3JiC-AY.js";import"./use-file-configs-EhGCWGKO.js";import"./asset-utils-BVjUn7sv.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-session-runtime-oQf5p7F0.js";import"./sandbox-git-api-DcqI6XE4.js";import"./sandbox-url-D3mC8qhT.js";import"./ArrowUp-BUXNFn6K.js";import"./CreditCard01-B64VnM4Z.js";import"./Globe04-wvLOPSBv.js";import"./Key01-DBOKyeyp.js";import"./Sun-BndYhLEq.js";import"./Users01-Bzd23uge.js";import"./experiments-tab-choice-0iIRb8Mb.js";import"./use-sandbox-events-DDEe74Lx.js";import"./slider-CViVuHCu.js";import"./index-DTPm19J5.js";import"./tooltipContext-BD4z8QR3.js";import"./CategoricalChart-BYHLRXHR.js";import"./index-BfJfM0M5.js";import"./ActiveShapeUtils-DemHm_Wd.js";import"./Sector-BoQZLv3P.js";import"./symbol-Dxfa7ArY.js";import"./empty-state-TJAbP9DT.js";import"./section-preview-url-7zfngvgW.js";import"./use-move-blocks-Crj0de_N.js";const uc={escape:Pi};function dc(v,e){for(const p of Xl(v,e)){const y=typeof p.title=="string"?p.title:void 0;if(y?.includes("{{"))return y}}function fc(v,e){if(!e)return;const p=Ho(v,Wo(e));if(p)try{const y=dc(p.resolveType,e);return y&&jl.render(y,p.data,{},uc).trim()||void 0}catch{return}}function mc(v){const e=jn.c(13),{icon:p,label:y,className:b}=v;let V;e[0]!==b?(V=ae("size-3.5",b),e[0]=b,e[1]=V):V=e[1];let B;e[2]!==p||e[3]!==V?(B=r.jsx(p,{className:V}),e[2]=p,e[3]=V,e[4]=B):B=e[4];let w;e[5]!==y||e[6]!==B?(w=r.jsx(Vt,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":y,className:"shrink-0 cursor-help",children:B})}),e[5]=y,e[6]=B,e[7]=w):w=e[7];let K;e[8]!==y?(K=r.jsx(Tt,{className:"max-w-56",children:y}),e[8]=y,e[9]=K):K=e[9];let k;return e[10]!==w||e[11]!==K?(k=r.jsxs(Et,{children:[w,K]}),e[10]=w,e[11]=K,e[12]=k):k=e[12],k}const pc="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function _a(v){return Array.from({length:v},(e,p)=>({id:crypto.randomUUID(),index:p}))}function Aa(v){return v.map((e,p)=>({...e,index:p}))}function hc(v,e){if(e===v.length)return v;if(e<v.length)return Aa(v.slice(0,e));const p=Array.from({length:e-v.length},(y,b)=>({id:crypto.randomUUID(),index:v.length+b}));return[...v,...p]}function Na(v){const e=jn.c(44),{section:p,raw:y,meta:b,decofile:V}=v,B=Rn(),w=Qn(),K=p.isSavedBlock===!0,k=p.isMultivariate===!0;let Q;e[0]!==b||e[1]!==y?(Q=y&&b?ec(y,b):void 0,e[0]=b,e[1]=y,e[2]=Q):Q=e[2];const ge=Q;let Ue;e[3]!==b||e[4]!==k||e[5]!==y||e[6]!==K?(Ue=y&&b&&!K&&!k?fc(y,b):void 0,e[3]=b,e[4]=k,e[5]=y,e[6]=K,e[7]=Ue):Ue=e[7];const Oe=Ue;let Ne;e[8]!==V||e[9]!==b||e[10]!==y||e[11]!==p?(Ne=Ii(y,p,V,b),e[8]=V,e[9]=b,e[10]=y,e[11]=p,e[12]=Ne):Ne=e[12];const oe=Ne;let R;e[13]!==k||e[14]!==y?.__resolveType?(R=!k&&Vs(y?.__resolveType??""),e[13]=k,e[14]=y?.__resolveType,e[15]=R):R=e[15];const c=R,xe=K?Jn:k?Va:Ta;let U;e[16]!==k||e[17]!==K?(U=K?{color:Yo}:k?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=k,e[17]=K,e[18]=U):U=e[18];const _e=U;let F;e[19]!==xe||e[20]!==w?(F=w?r.jsxs("span",{className:"relative size-4 shrink-0",children:[r.jsx(xe,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),r.jsx(Oi,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):r.jsx(ul,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=xe,e[20]=w,e[21]=F):F=e[21];let ke;e[22]!==ge?(ke=ge&&r.jsx("img",{src:ge,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=ge,e[23]=ke):ke=e[23];let f;e[24]!==w||e[25]!==_e?(f=!w&&r.jsx(js,{className:"h-4 w-4 shrink-0",style:_e}),e[24]=w,e[25]=_e,e[26]=f):f=e[26];const ze=w?"shrink":"flex-1",u=p.isHidden&&"line-through opacity-50";let Re;e[27]!==u||e[28]!==ze?(Re=ae("min-w-0 truncate text-sm font-medium",ze,u),e[27]=u,e[28]=ze,e[29]=Re):Re=e[29];const X=Oe??p.label;let $e;e[30]!==Re||e[31]!==X?($e=r.jsx("span",{className:Re,children:X}),e[30]=Re,e[31]=X,e[32]=$e):$e=e[32];let rt;e[33]!==c||e[34]!==w||e[35]!==oe||e[36]!==B?(rt=w?r.jsxs(r.Fragment,{children:[c&&r.jsx(mc,{icon:Rs,label:B("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),oe&&r.jsx(ea,{}),r.jsx("span",{className:"min-w-0 flex-1"})]}):oe&&r.jsx(ea,{className:"absolute -right-0.5 -top-0.5"}),e[33]=c,e[34]=w,e[35]=oe,e[36]=B,e[37]=rt):rt=e[37];let Ce;return e[38]!==$e||e[39]!==rt||e[40]!==F||e[41]!==ke||e[42]!==f?(Ce=r.jsxs(r.Fragment,{children:[F,ke,f,$e,rt]}),e[38]=$e,e[39]=rt,e[40]=F,e[41]=ke,e[42]=f,e[43]=Ce):Ce=e[43],Ce}const gc="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",vc="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function Ca(v,e,p){if(p)return Li({selected:e});const y=v.isSavedBlock===!0,b=v.isMultivariate===!0;return ae("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":y?gc:b?vc:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function _s(v,e){return ae("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":v?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function Sc(v){const e=jn.c(90),{section:p,raw:y,meta:b,decofile:V,sortableId:B,selected:w,onSelect:K,onDelete:k,onDuplicate:Q,onMakeReusable:ge,onToggleHidden:Ue,onToggleLazy:Oe,onAddVariant:Ne,onDetach:oe}=v,R=Rn(),c=Qn(),xe=y?Vs(y.__resolveType??""):!1,U=p.isHidden===!0,_e=xe||U;let F;e[0]!==p?(F=Ra(p),e[0]=p,e[1]=F):F=e[1];const ke=F,f=!!Oe&&!p.isMultivariate;let ze;e[2]!==B?(ze={id:B,animateLayoutChanges:xc},e[2]=B,e[3]=ze):ze=e[3];const{attributes:u,listeners:Re,setNodeRef:X,transform:$e,isDragging:rt}=Yl(ze);let Ce;e[4]!==$e?(Ce=ql.Transform.toString($e?{...$e,x:0}:null),e[4]=$e,e[5]=Ce):Ce=e[5];const at=rt?0:void 0;let Pe;e[6]!==Ce||e[7]!==at?(Pe={transform:Ce,opacity:at},e[6]=Ce,e[7]=at,e[8]=Pe):Pe=e[8];const _=Pe;let we;e[9]!==p?(we=Mi(p),e[9]=p,e[10]=we):we=e[10];const ot=we,it="button",m=0;let L;e[11]!==K?(L=T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),K())},e[11]=K,e[12]=L):L=e[12];const et=rt?"cursor-grabbing":"cursor-pointer";let A;e[13]!==c||e[14]!==p||e[15]!==w||e[16]!==et?(A=ae("touch-none transition-colors",et,Ca(p,w,c)),e[13]=c,e[14]=p,e[15]=w,e[16]=et,e[17]=A):A=e[17];let Ye;e[18]!==V||e[19]!==b||e[20]!==y||e[21]!==p?(Ye=r.jsx(Na,{section:p,raw:y,meta:b,decofile:V}),e[18]=V,e[19]=b,e[20]=y,e[21]=p,e[22]=Ye):Ye=e[22];const W=!c&&f&&r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"ghost",size:"icon","aria-label":R(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:ae(_s(_e,xe)),onClick:T=>{T.stopPropagation(),Oe?.()},onPointerDown:bc,children:r.jsx(Rs,{className:ae("h-3.5 w-3.5",xe&&"text-warning")})})}),r.jsx(Tt,{side:"bottom",children:R(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),lt=c?r.jsx(Bi,{label:R(U?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:U,onToggle:Ue,children:U?r.jsx(ga,{className:"h-3.5 w-3.5"}):r.jsx(va,{className:"h-3.5 w-3.5"})}):r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"ghost",size:"icon","aria-label":R(U?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:ae(_s(_e,U)),onClick:T=>{T.stopPropagation(),Ue()},onPointerDown:yc,children:U?r.jsx(ga,{className:"h-3.5 w-3.5"}):r.jsx(va,{className:"h-3.5 w-3.5"})})}),r.jsx(Tt,{side:"bottom",children:R(U?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),fe=Uo,Ze=Di;let ve;e[23]!==R?(ve=R("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=R,e[24]=ve):ve=e[24];const ct=ae(_s(_e,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let He;e[25]!==Ze||e[26]!==ve||e[27]!==ct?(He=r.jsx(Ze,{label:ve,classicClassName:ct}),e[25]=Ze,e[26]=ve,e[27]=ct,e[28]=He):He=e[28];let Ee;e[29]!==c||e[30]!==f||e[31]!==xe||e[32]!==Oe||e[33]!==R?(Ee=c&&f&&r.jsxs(r.Fragment,{children:[r.jsxs(rn,{onClick:T=>{T.stopPropagation(),Oe?.()},children:[r.jsx(Rs,{className:"h-4 w-4"}),R(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),r.jsx(Go,{})]}),e[29]=c,e[30]=f,e[31]=xe,e[32]=Oe,e[33]=R,e[34]=Ee):Ee=e[34];let Ke;e[35]!==Q?(Ke=T=>{T.stopPropagation(),Q()},e[35]=Q,e[36]=Ke):Ke=e[36];let tt;e[37]===Symbol.for("react.memo_cache_sentinel")?(tt=r.jsx(Il,{className:"h-4 w-4"}),e[37]=tt):tt=e[37];let Me;e[38]!==R?(Me=R("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=R,e[39]=Me):Me=e[39];let Be;e[40]!==Ke||e[41]!==Me?(Be=r.jsxs(rn,{onClick:Ke,children:[tt,Me]}),e[40]=Ke,e[41]=Me,e[42]=Be):Be=e[42];let De;e[43]!==c||e[44]!==ke||e[45]!==Ne||e[46]!==R?(De=ke&&r.jsxs(rn,{className:ae(!c&&Fi),onClick:T=>{T.stopPropagation(),Ne()},children:[r.jsx(Va,{className:"h-4 w-4"}),R("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=c,e[44]=ke,e[45]=Ne,e[46]=R,e[47]=De):De=e[47];let Y;e[48]!==c||e[49]!==ot||e[50]!==ge||e[51]!==R?(Y=ot&&r.jsxs(rn,{className:ae(!c&&pc),onClick:T=>{T.stopPropagation(),ge()},children:[c?r.jsx(Jn,{className:"h-4 w-4"}):r.jsx(js,{className:"h-4 w-4"}),R("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=c,e[49]=ot,e[50]=ge,e[51]=R,e[52]=Y):Y=e[52];let Z;e[53]!==c||e[54]!==oe||e[55]!==p.isMultivariate||e[56]!==p.isSavedBlock||e[57]!==R?(Z=p.isSavedBlock===!0&&!p.isMultivariate&&r.jsxs(rn,{onClick:T=>{T.stopPropagation(),oe()},children:[c?r.jsx(Ta,{className:"h-4 w-4"}):r.jsx(js,{className:"h-4 w-4"}),R("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=c,e[54]=oe,e[55]=p.isMultivariate,e[56]=p.isSavedBlock,e[57]=R,e[58]=Z):Z=e[58];let ee;e[59]!==k?(ee=T=>{T.stopPropagation(),k()},e[59]=k,e[60]=ee):ee=e[60];let O;e[61]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(Ol,{className:"h-4 w-4"}),e[61]=O):O=e[61];let N;e[62]!==R?(N=R("sectionsEditor.sectionList.deleteMenuItem"),e[62]=R,e[63]=N):N=e[63];let me;e[64]!==ee||e[65]!==N?(me=r.jsxs(rn,{variant:"destructive",onClick:ee,children:[O,N]}),e[64]=ee,e[65]=N,e[66]=me):me=e[66];let We;e[67]!==Ee||e[68]!==Be||e[69]!==De||e[70]!==Y||e[71]!==Z||e[72]!==me?(We=r.jsxs(Zo,{align:"end",className:"w-44",children:[Ee,Be,De,Y,Z,me]}),e[67]=Ee,e[68]=Be,e[69]=De,e[70]=Y,e[71]=Z,e[72]=me,e[73]=We):We=e[73];let qe;e[74]!==fe||e[75]!==He||e[76]!==We?(qe=r.jsxs(fe,{children:[He,We]}),e[74]=fe,e[75]=He,e[76]=We,e[77]=qe):qe=e[77];let Je;return e[78]!==u||e[79]!==Re||e[80]!==K||e[81]!==X||e[82]!==_||e[83]!==A||e[84]!==Ye||e[85]!==W||e[86]!==lt||e[87]!==qe||e[88]!==L?(Je=r.jsxs("div",{ref:X,style:_,...u,...Re,role:it,tabIndex:m,onClick:K,onKeyDown:L,className:A,children:[Ye,W,lt,qe]}),e[78]=u,e[79]=Re,e[80]=K,e[81]=X,e[82]=_,e[83]=A,e[84]=Ye,e[85]=W,e[86]=lt,e[87]=qe,e[88]=L,e[89]=Je):Je=e[89],Je}function yc(v){return v.stopPropagation()}function bc(v){return v.stopPropagation()}function xc(){return!1}function Es(v){const e=jn.c(11),{canAddSection:p,onAddSection:y,className:b,size:V}=v,B=Rn();let w;e[0]!==b?(w=ae("w-full",b),e[0]=b,e[1]=w):w=e[1];const K=!p;let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Ll,{size:14}),e[2]=k):k=e[2];let Q;e[3]!==B?(Q=B("sectionsEditor.sectionList.addSectionButton"),e[3]=B,e[4]=Q):Q=e[4];let ge;return e[5]!==y||e[6]!==V||e[7]!==w||e[8]!==K||e[9]!==Q?(ge=r.jsxs(Ut,{type:"button",variant:"outline",size:V,className:w,disabled:K,onClick:y,children:[k,Q]}),e[5]=y,e[6]=V,e[7]=w,e[8]=K,e[9]=Q,e[10]=ge):ge=e[10],ge}function _c(v){const e=jn.c(101),{listKey:p,rawSections:y,sections:b,meta:V,decofile:B,selectedIndex:w,onSelect:K,onReorder:k,onDelete:Q,onDuplicate:ge,onMakeReusable:Ue,onToggleHidden:Oe,onToggleLazy:Ne,onAddVariant:oe,onDetach:R,onAddSection:c,canAddSection:xe}=v,U=xe===void 0?!0:xe,_e=Rn(),F=Qn();let ke;e[0]!==b.length?(ke=()=>_a(b.length),e[0]=b.length,e[1]=ke):ke=e[1];const[f,ze]=S.useState(ke),[u,Re]=S.useState(null),[X,$e]=S.useState(p),[rt,Ce]=S.useState(b.length),at=S.useRef(!1);X!==p?($e(p),Ce(b.length),ze(_a(b.length))):rt!==b.length&&(Ce(b.length),ze(Fe=>hc(Fe,b.length)));let Pe;e[2]===Symbol.for("react.memo_cache_sentinel")?(Pe={activationConstraint:{distance:8}},e[2]=Pe):Pe=e[2];let _;e[3]===Symbol.for("react.memo_cache_sentinel")?(_={coordinateGetter:Zl},e[3]=_):_=e[3];const we=zl(Sa(Hl,Pe),Sa($l,_));let ot;e[4]!==f?(ot=f.map(kc),e[4]=f,e[5]=ot):ot=e[5];const it=ot;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=Fe=>{Re(String(Fe.active.id))},e[6]=m):m=e[6];const L=m;let et;e[7]!==it||e[8]!==k?(et=Fe=>{Re(null);const{active:G,over:ie}=Fe;if(!ie||G.id===ie.id)return;const Ve=it.indexOf(String(G.id)),Qe=it.indexOf(String(ie.id));Ve===-1||Qe===-1||(ze(nt=>Aa(Zn([...nt],Ve,Qe))),at.current=!0,requestAnimationFrame(()=>{at.current=!1}),k?.(Ve,Qe))},e[7]=it,e[8]=k,e[9]=et):et=e[9];const A=et;let Ye;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ye=()=>{Re(null)},e[10]=Ye):Ye=e[10];const W=Ye;let lt,fe,Ze,ve,ct,He,Ee,Ke,tt,Me,Be,De,Y,Z,ee;if(e[11]!==u||e[12]!==U||e[13]!==F||e[14]!==B||e[15]!==f||e[16]!==it||e[17]!==A||e[18]!==V||e[19]!==c||e[20]!==oe||e[21]!==Q||e[22]!==R||e[23]!==ge||e[24]!==Ue||e[25]!==K||e[26]!==Oe||e[27]!==Ne||e[28]!==y||e[29]!==b||e[30]!==w||e[31]!==we||e[32]!==_e){Z=Symbol.for("react.early_return_sentinel");e:{const Fe=G=>{at.current||K(G)};if(e[48]!==u||e[49]!==U||e[50]!==F||e[51]!==f||e[52]!==c||e[53]!==y||e[54]!==b||e[55]!==_e){const G=u?f.find(ie=>ie.id===u):null;if(ve=G!=null?b[G.index]:null,Ze=G!=null?y[G.index]:void 0,f.length===0){let ie;e[59]!==_e?(ie=_e("sectionsEditor.sectionList.noSections"),e[59]=_e,e[60]=ie):ie=e[60];let Ve;e[61]!==ie?(Ve=r.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:ie}),e[61]=ie,e[62]=Ve):Ve=e[62];const Qe=Ve;let nt;e[63]!==U||e[64]!==F||e[65]!==Qe||e[66]!==c?(nt=F?Qe:r.jsxs("div",{className:"space-y-2",children:[Qe,r.jsx(Es,{canAddSection:U,onAddSection:c,size:"sm"})]}),e[63]=U,e[64]=F,e[65]=Qe,e[66]=c,e[67]=nt):nt=e[67],Z=nt;break e}Y=ae(G&&"cursor-grabbing"),e[48]=u,e[49]=U,e[50]=F,e[51]=f,e[52]=c,e[53]=y,e[54]=b,e[55]=_e,e[56]=Ze,e[57]=ve,e[58]=Y}else Ze=e[56],ve=e[57],Y=e[58];fe=Gl,Ke=we,tt=Ul,Me=L,Be=A,De=W,lt=Jl,He=it,Ee=Ql,ee="space-y-1",ct=f.map(G=>{const ie=b[G.index];return ie?r.jsx(Sc,{sortableId:G.id,section:ie,raw:y[G.index],meta:V,decofile:B,selected:w===G.index,onSelect:()=>Fe(G.index),onDelete:()=>Q(G.index),onDuplicate:()=>ge(G.index),onMakeReusable:()=>Ue(G.index),onToggleHidden:()=>Oe(G.index),onToggleLazy:Ne?()=>Ne(G.index):void 0,onAddVariant:()=>oe(G.index),onDetach:()=>R(G.index)},G.id):null})}e[11]=u,e[12]=U,e[13]=F,e[14]=B,e[15]=f,e[16]=it,e[17]=A,e[18]=V,e[19]=c,e[20]=oe,e[21]=Q,e[22]=R,e[23]=ge,e[24]=Ue,e[25]=K,e[26]=Oe,e[27]=Ne,e[28]=y,e[29]=b,e[30]=w,e[31]=we,e[32]=_e,e[33]=lt,e[34]=fe,e[35]=Ze,e[36]=ve,e[37]=ct,e[38]=He,e[39]=Ee,e[40]=Ke,e[41]=tt,e[42]=Me,e[43]=Be,e[44]=De,e[45]=Y,e[46]=Z,e[47]=ee}else lt=e[33],fe=e[34],Ze=e[35],ve=e[36],ct=e[37],He=e[38],Ee=e[39],Ke=e[40],tt=e[41],Me=e[42],Be=e[43],De=e[44],Y=e[45],Z=e[46],ee=e[47];if(Z!==Symbol.for("react.early_return_sentinel"))return Z;let O;e[68]!==ct||e[69]!==ee?(O=r.jsx("div",{className:ee,children:ct}),e[68]=ct,e[69]=ee,e[70]=O):O=e[70];let N;e[71]!==lt||e[72]!==He||e[73]!==Ee||e[74]!==O?(N=r.jsx(lt,{items:He,strategy:Ee,children:O}),e[71]=lt,e[72]=He,e[73]=Ee,e[74]=O,e[75]=N):N=e[75];let me;e[76]!==Ze||e[77]!==ve||e[78]!==F||e[79]!==B||e[80]!==V?(me=ve?r.jsx("div",{className:ae("cursor-grabbing shadow-lift",Ca(ve,!1,F)),children:r.jsx(Na,{section:ve,raw:Ze,meta:V,decofile:B})}):null,e[76]=Ze,e[77]=ve,e[78]=F,e[79]=B,e[80]=V,e[81]=me):me=e[81];let We;e[82]!==me?(We=qo.createPortal(r.jsx(Wl,{dropAnimation:Ki,children:me}),document.body),e[82]=me,e[83]=We):We=e[83];let qe;e[84]!==fe||e[85]!==Ke||e[86]!==tt||e[87]!==Me||e[88]!==Be||e[89]!==De||e[90]!==N||e[91]!==We?(qe=r.jsxs(fe,{sensors:Ke,collisionDetection:tt,onDragStart:Me,onDragEnd:Be,onDragCancel:De,children:[N,We]}),e[84]=fe,e[85]=Ke,e[86]=tt,e[87]=Me,e[88]=Be,e[89]=De,e[90]=N,e[91]=We,e[92]=qe):qe=e[92];let Je;e[93]!==U||e[94]!==F||e[95]!==c?(Je=!F&&r.jsx(Es,{canAddSection:U,onAddSection:c,size:"sm",className:"mt-2"}),e[93]=U,e[94]=F,e[95]=c,e[96]=Je):Je=e[96];let T;return e[97]!==Y||e[98]!==qe||e[99]!==Je?(T=r.jsxs("div",{className:Y,children:[qe,Je]}),e[97]=Y,e[98]=qe,e[99]=Je,e[100]=T):T=e[100],T}function kc(v){return v.id}function wc(v,e,p,y){if(!v||typeof v!="object")return{kind:"error",reason:"no-matcher-rule"};const b=e.trim();if(!b)return Gt(v,p,y)?{kind:"inline",blockKey:v.__resolveType??"",inlinedRule:ks(v,p,y)}:{kind:"noop"};const V=ws(v,p,y);if(!V)return{kind:"error",reason:"unreadable-rule"};if(V.blockKey)return{kind:"updateBlock",blockKey:V.blockKey,blockData:Dt(V.resolveType,V.data,b)};const B=Un(b),w=Yn(B,p);return w?{kind:"error",reason:"invalid-block-id",message:w}:{kind:"createBlock",blockId:B,blockData:Dt(V.resolveType,V.data,b),reference:ln(B)}}const ka="section-form-stale-save",jc=3;function wa(v,e,p){const y=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Ea(e.pageKey?v[e.pageKey]?.sections:void 0,v,p),b=Math.max(0,Math.min(e.pageVariantIndex,y.length-1)),V=y[b]?.sections??[];return{pageVariants:y,variantIndex:b,rawSections:V,parsedSections:wn(V,v,p)}}const ja=new WeakMap;let Rc=0;function Ec(v){let e=ja.get(v);return e===void 0&&(e=++Rc,ja.set(v,e)),e}function lf({orgSlug:v,virtualMcpId:e,branch:p,previewReady:y=!0,previewUrl:b,currentPath:V,activePageBlockKey:B=null,activeGlobalBlockKey:w=null,externalSelection:K,onSaved:k,initialEditSeo:Q=!1,onExitSeo:ge,onSelectRoot:Ue,onViewJsonFile:Oe,onFocusedBlockChange:Ne,onVariantPreviewOverride:oe,focusVariant:R}){const c=Rn(),xe=Ci(),U=xe?.taskId??null,_e=y?{orgSlug:v,virtualMcpId:e,branch:p,threadId:U,previewUrl:b}:null,[F,ke]=S.useState([]),{data:f,isLoading:ze}=fl(_e,{pollWhile:F.length>0}),{data:u,isLoading:Re}=xl(_e),X=Qn(),$e=xe?.virtualMcpId,Ce=il($e===e?e:null)?.metadata?.siteSlug??null,at=tc({virtualMcpId:e,branch:p,sandboxUrl:b}),Pe=ml(e,p),_=pl(Pe),we=Si(_),ot=!_,it=!!at||_,[m,L]=S.useState(null),[et,A]=S.useState(null),[Ye,W]=S.useState(null),[lt,fe]=S.useState(0),[Ze,ve]=S.useState(void 0),[ct,He]=S.useState(null),[Ee,Ke]=S.useState(null);R&&R.seq!==ct&&(He(R.seq),Ke(R));const[tt,Me]=S.useState(null),Be={index:tt,remember:Me},[De,Y]=S.useState(null),[Z,ee]=S.useState(null),[O,N]=S.useState([]),me=S.useRef(null),[We,qe]=S.useState(O.length);We!==O.length&&(qe(O.length),requestAnimationFrame(()=>{me.current&&(me.current.scrollTop=0)}));const[Je,T]=S.useState(0),[Fe,G]=S.useState(null),[ie,Ve]=S.useState(null),[Qe,nt]=S.useState(null),[Pa,Yt]=S.useState(!1),[Ts,Xn]=S.useState(!1),En=S.useRef(null),[Vn,Ka]=S.useState(!0),[Zt,Tn]=S.useState(!1),[Ft,An]=S.useState(!1),[Te,cn]=S.useState(Q),[As,Ns]=S.useState(Q);Q&&!As&&(Ns(!0),cn(!0),L(null),A(null),W(null),N([])),!Q&&As&&Ns(!1);const[Ma,un]=S.useState(null),[Cs,Nn]=S.useState(void 0),[Ps,It]=S.useState([]),[Ks,Jt]=S.useState(0),[Ie,ut]=S.useState(0),[Ba,Le]=S.useState(null),[Qt,Ge]=S.useState(null),[Ms,Bs]=S.useState(null),Ds=Jo(),Fs=hl({orgSlug:v,virtualMcpId:e,branch:p},{tunnel:!1}),dn=zi({orgSlug:v,virtualMcpId:e,branch:p}),[Da,Fa]=S.useState(V),[Ia,La]=S.useState(B),[Oa,za]=S.useState(w);(Da!==V||Ia!==B||Oa!==w)&&(queueMicrotask(()=>dn.flush()),Fa(V),La(B),za(w),L(null),A(null),W(null),fe(0),Y(null),ee(null),ut(0),Le(null),Ge(null),N([]),T(t=>t+1),cn(!1),un(null),Nn(void 0),It([]),Jt(t=>t+1));const D=$i({orgSlug:v,virtualMcpId:e,branch:p}),fn=rl((t,n)=>{D.mutate({blockKey:t,data:n},{onSuccess:()=>k?.(),onError:D.reportError})}),Cn=Rl({orgSlug:v,virtualMcpId:e,branch:p}),Is=oc({orgSlug:v,virtualMcpId:e,branch:p}),[Xt,en]=S.useState(!1),C=S.useRef(null),wt=S.useRef(null),gt=S.useRef(null),vt=S.useRef(null),Pn=S.useRef({}),Lt=S.useRef(null),mn=S.useRef(!1),pn=S.useRef(!1),Se=S.useRef(new Map),tn=S.useRef(!1),xt=S.useRef([]),es=S.useRef(new WeakSet);gl(v,e,t=>{const{activePageKey:n,rawSections:s,parsedSections:a,selectedSectionIndex:o}=ne.current,i=new Set;n&&i.add(n);for(const l of[wt.current?.sectionIndex,o]){const d=l==null?void 0:s[l],E=l==null?void 0:a[l],h=d&&E?.isSavedBlock?Ss(d,E):null;h&&i.add(h)}if([...i].some(l=>t.has(l))){for(const l of[C,gt,vt])l.current&&clearTimeout(l.current),l.current=null;wt.current=null,Se.current.clear(),n&&t.has(n)&&(Pn.current={})}});const ne=S.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Ls,Os]=S.useState(0),[$a,Ha]=S.useState(0),zs=Qo(Pe,{orgSlug:v,virtualMcpId:e,branch:p}),$s=Xo(zs,F[0]?.blockKey??null,F[0]?ei(xn(F[0].plan.theirs)):null),[Wa,qa]=S.useState(null),ts=vl(v,e).epoch,[Ga,Ua]=S.useState(ts);if(!y||ze||Re)return r.jsx("div",{className:"h-full w-full flex items-center justify-center",children:r.jsx(ti,{className:"size-5 text-muted-foreground"})});if(!f||!u)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const Ya=Vl(f,u),$=!!w,se=$?null:Tl(Ya,V,B),g=$?w:se?.key??null,Kn=$&&w?f[w]:void 0,Hs=$&&w&&Kn?Al(w,Kn):$&&w?w:"",Ot=!$&&g&&f[g]?f[g]:null,ns=Te&&f&&u&&g&&se?ta(f,{kind:"page",pageKey:g,pageName:String(se.name??""),path:String(se.path??"")},u):null,Za=Te?Ot?.seo:void 0,Mn=Cs!==void 0?Cs:Za,Ja=Te?Hi(Mn):void 0,Ws=ns?.seoTypeOptions??[],qs=Te&&u?Wi(u):"",ss=Ma??Ja??{},Bn=Te&&ns?sc(ss,ns):null,Gs=Te&&Bn&&qi(Mn)?Gn(Bn,u):null,Us=Te?Gi(f,u)?.seoData:void 0,le=$?[{label:"Default",sections:[{__resolveType:w}]}]:Ea(Ot?.sections,f??{},_),St=le.length>1,J=Math.min(lt,le.length-1),ye=le[J],M=ye?.sections??[],ce=wn(M,f,_),Dn=!$&&Nl(Ot?.sections,_);if($&&w&&Ms!==w){Bs(w);const t=M[0],n=ce[0];if(t&&n){L(0),ut(0),N([]);const s=Rt(t,n,f,_);s&&(A(s.data),W(s.resolveType),Ge(null),Le(null))}}!$&&Ms!==null&&Bs(null),ne.current={rawSections:M,parsedSections:ce,decofile:f??{},activePageKey:g,pageVariants:le,variantIndex:J,sectionVariantIndex:Ie,selectedSectionIndex:m};const Qa=()=>({multivariate:Dn,index:J,variants:le.map(t=>({rule:t.rule})),lazyValues:_&&Dn&&yi(Ot?.sections?.variants?.[J]?.value)}),rs=(t,n)=>{if(!oe)return;if(!g||!Dn||t.length<=1){oe(null);return}const s={multivariate:!0,index:n,variants:t},a=_?xa(g,s):ba(g,s,f,u);oe(a.length>0?a:null)},as=oe&&g&&Dn&&St&&!ze&&!Re?g:null;if(as!==Wa&&(qa(as),as)){const t=le.map(s=>({rule:s.rule})),n=J;queueMicrotask(()=>rs(t,n))}const zt=(t,n,s)=>{if(!oe)return;if(!g){oe(null);return}const a=Qa(),o=_?xa(g,a):ba(g,a,f,u);if(!t||n<0){oe(o.length>0?o:null);return}const i={pageKey:g,page:a,sectionIndex:n,sectionLazy:ce[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:s},l=_?lc(i):ic({...i,decofile:f,meta:u}),d=_?cc(o,l):[...o,...l];oe(d.length>0?d:null)},_t=(t,n,s,a=m??-1,o=!1)=>{const i=st(t,n);if(!i){A(null),W(null),Ge(null),Le(null),o&&zt(null,a,s);return}const d=qr(i,we)[s];if(!d){A(null),W(null),Ge(null),Le(null),o&&zt(null,a,s);return}const E=ai(d.value,f);A(E?.data??null),W(E?.resolveType??null);const{resolveType:h,formValue:x}=qt(d.rule,f,u??void 0);Ge(h),Le(x),o&&zt(i,a,s)},hn=t=>{Ve(null),fe(t),L(null),A(null),W(null),N([]);const n=le[t]?.rule,{resolveType:s,formValue:a}=qt(n,f??{},u??void 0);ee(s),Y(a),rs(le.map(o=>({rule:o.rule})),t)},Ys=(t,n)=>{const s=M[t],a=ce[t];if(!s||!a)return!1;const o=a.isMultivariate?st(s,a)?.variants?.length??0:0,i=n<o?n:0;if(L(t),ut(i),N([]),T(l=>l+1),a.isMultivariate)_t(s,a,i,t);else{const l=Rt(s,a,f,_);l?(A(l.data),W(l.resolveType)):(A(null),W(null)),Ge(null),Le(null)}return!0},Zs=K?.index;if(K!==void 0&&(K?.seq??null)!==Ze&&(ve(K?.seq??null),typeof Zs=="number"&&Ys(Zs,0)),Ee&&($?Kn:Ot)){const t=Ee.pageVariant,n=!$&&t!==void 0&&t<le.length;if(n&&t!==J)hn(t);else{Ke(null);const{section:s,variant:a}=Ee;if($)a!==void 0&&(Me(a),N([]),T(o=>o+1));else if(s!==void 0&&Ys(s,a??0)){const o=M[s],i=ce[s],l=i.isMultivariate?st(o,i):null;l&&a!==void 0&&queueMicrotask(()=>zt(l,s,a))}else n&&hn(t)}}if(ts!==Ga){Ua(ts);const t=C.current!==null||Se.current.size>0||vt.current!==null||gt.current!==null||D.isPending||dn.isPending||F.length>0,n=m!==null&&Wr(me.current,document.activeElement);if(!t&&n&&(tn.current=!0),!t&&!n&&m!==null){const s=M[m],a=ce[m];if(N([]),T(o=>o+1),!s||!a)L(null),A(null),W(null);else if(a.isMultivariate)_t(s,a,Ie,m);else{const o=Rt(s,a,f,_);A(o?.data??null),W(o?.resolveType??null)}}!t&&Te&&(un(null),Nn(void 0),Jt(s=>s+1))}if(Ls!==$a){Ha(Ls);const t=m!==null?M[m]:null,n=m!==null?ce[m]:null;if(t&&n&&m!==null)if(N([]),T(s=>s+1),n.isMultivariate)_t(t,n,Ie,m);else{const s=Rt(t,n,f,_);A(s?.data??null),W(s?.resolveType??null)}}const dt=F[0];if(dt){const{formBase:t,target:n}=dt,s=wa(f,n,_),a=t.sectionIndex,o=s.rawSections.length===t.sectionCount?gs(s.rawSections[a],s.parsedSections[a],n.sectionVariantIndex,f,_):null,i=ni(dt,o,l=>Gr(t,l));if(i){const d=[{...dt,...i,changedAgain:!0},...F.slice(1)];xt.current=d,ke(d)}}const gn={orgSlug:v,virtualMcpId:e,branch:p,threadId:U,previewUrl:_?void 0:b??void 0,siteSlug:Ce},Fn=Ye&&u?Gn(Ye,u):null,ft=(t,n)=>{if(!g)return;C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear(),vt.current&&(clearTimeout(vt.current),vt.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null);const s=an(f,g,t,J,le);D.mutate({blockKey:g,data:s},{onSuccess:()=>n?.onSuccess?.()??k?.(),onError:a=>{n?.onError?.(),D.reportError(a)}})},$t=()=>{Ne?.(null),L(null),An(!1),A(null),W(null),ut(0),Le(null),Ge(null),N([]),T(t=>t+1)},Js=()=>Wr(me.current,document.activeElement),os=(t=c("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear(),wt.current=null,q.error(t,{id:ka}),Js()){tn.current=!0;return}Os(n=>n+1)},Qs=()=>{!tn.current||Js()||xt.current.length>0||C.current!==null||mn.current||pn.current||Se.current.size>0||(tn.current=!1,Os(t=>t+1))},Xs=()=>{tn.current&&setTimeout(Qs,0)},er=t=>bl(Ds,Fs,t,Pe.kind==="protocol"?Pe:null),tr=t=>{Se.current.size!==0&&setTimeout(()=>{if(mn.current||pn.current)return;const n=[...Se.current.values()];Se.current.clear();for(const s of n)s()},t)},Xa=t=>{const{activePageKey:n,variantIndex:s,sectionVariantIndex:a}=ne.current,o=Lt.current;return{formBase:o?.sectionIndex===t&&o.variantIndex===a?o:null,pageKey:n,global:$,pageVariantIndex:s,sectionVariantIndex:a,schema:Fn}},vn=t=>{xt.current=t,ke(t)},eo=t=>{const n=xt.current,s=n.findIndex(i=>i.formBase===t.formBase),a=s>=0?n[s]:void 0,o=a?n.with(s,{...t,choices:Jr(a.plan,a.choices,t.plan),fresh:Vi(a.plan,t.plan,a.fresh),changedAgain:a.changedAgain||xn(a.plan.theirs)!==xn(t.plan.theirs)}):[...n,{...t,changedAgain:es.current.has(t.formBase)}];vn(o)},nr=(t,n)=>{const s=xt.current,a=s.findIndex(l=>l.formBase===t),o=s[a];if(!o)return!1;if(xn(o.plan.mine)===xn(n))return!0;const i=Zr({...o.plan,mine:n});if(i.pointers.length===0){const l=s.filter(d=>d!==o);return vn(l),!1}return vn(s.with(a,{...o,plan:i,choices:Jr(o.plan,o.choices,i)})),!0},to=t=>{const n=ne.current;return n.selectedSectionIndex===t.formBase.sectionIndex&&n.activePageKey===t.target.pageKey&&n.variantIndex===t.target.pageVariantIndex&&n.sectionVariantIndex===t.target.sectionVariantIndex},no=()=>{const t=xt.current[0];if(!t)return null;const{formBase:n,target:s}=t;C.current&&wt.current?.sectionIndex===n.sectionIndex&&wt.current.sectionVariantIndex===s.sectionVariantIndex&&(clearTimeout(C.current),C.current=null,wt.current=null),Se.current.delete(`${s.pageKey}:${n.sectionIndex}:${s.sectionVariantIndex}`);const a=n.emitted;return a&&typeof a=="object"&&!nr(n,a)&&Sn(a,n.sectionIndex,0,s),xt.current[0]??null},so=()=>{const t=xt.current[0],n=no();if(!n||!t||n.formBase!==t.formBase||n.plan.pointers.some(i=>!t.plan.pointers.includes(i)))return;const s=hi(n.plan,n.choices);Pe.kind==="protocol"&&Pe.source==="github"&&gi(n.plan,n.choices)&&Sl(c,!1),vn(xt.current.slice(1));const{formBase:a,target:o}=n;a.base=n.plan.theirs,a.version=void 0,a.emitted=s,es.current.add(a),(Lt.current===a||to(n))&&(Lt.current=a,A(s),T(i=>i+1)),Sn(s,a.sectionIndex,0,o)},ro=t=>{const[n,...s]=xt.current;n&&vn([{...n,choices:t},...s])},Sn=(t,n,s=0,a,o=!1)=>{const i=a??Xa(n),l=i.sectionVariantIndex,d=i.formBase,E=wt.current;C.current&&(clearTimeout(C.current),C.current=null,E&&(E.sectionIndex!==n||E.sectionVariantIndex!==l)&&E.write());const h=`${i.pageKey}:${n}:${l}`,x=()=>{if(mn.current||pn.current){Se.current.set(h,x);return}const j=typeof t=="function"?t():t;if(d&&nr(d,j))return;const I=ne.current.decofile,{rawSections:P,parsedSections:pe,pageVariants:ue,variantIndex:be}=wa(I,i,_),z=i.pageKey,H=P[n];if(!H)return;const re=pe[n];if(!re)return;const he=d?.base,Ae=gs(H,re,l,I,_),sn=!!he&&!!Ae&&xi(he,Ae)&&!(d&&Gr(d,Ae));if(sn&&he&&Ae){if(_i(he,Ae)){os(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const te=re.isSavedBlock?"here":ki(he,P.map((de,ht)=>gs(de,pe[ht],l,I,_)),n,d?.sectionCount??P.length);if(te==="unknown"){os(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof te=="number"&&d){d.sectionCount=P.length,d.sectionIndex=te,Lt.current===d&&L(te),Sn(j,te,s,i);return}}const pt=sn&&he&&Ae?Zr({ancestor:he,mine:j,theirs:Ae}):null;if(pt&&pt.pointers.length>0&&d){d.sectionCount=P.length,eo({plan:pt,formBase:d,target:i,sectionIndex:n,choices:wi(pt),changedAgain:!1,blockKey:re.isSavedBlock?Ss(H,re):z,fresh:{}});return}const Xe=pt?pt.merged:null,Pt=Xe??j,zr=ji({merged:!!Xe,tracked:d,current:Lt.current,saved:j});Xe&&q.info(c("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:ka}),zr&&d&&(d.emitted=Xe,A(Xe));const hs=zr||!Xe?Pt:j;d&&(d.base=hs,d.sectionCount=P.length,Ri(d,hs));const $r={onSuccess:()=>{d&&es.current.delete(d),k?.()},onError:te=>{if(d?.base===hs&&he&&(d.base=he),te instanceof yl){if(d&&(d.version=void 0),s<jc){Se.current.delete(h),pn.current=!0;const de=Ti(s,te.carriedStored);setTimeout(()=>{pn.current=!1,Sn(()=>{const ht=d?.emitted;return ht&&typeof ht=="object"?ht:j},n,s+1,i,de.immediate),Se.current.delete(h),tr(_n)},de.delay)}else os();return}D.reportError(te)}},Hr=te=>{mn.current=!0;let de=!1;D.mutateAsync(te).then(()=>$r.onSuccess(),ht=>{de=!0,$r.onError(ht)}).finally(()=>{mn.current=!1,tr(de?_n:0),Qs()})};if(re.isSavedBlock){const te=Ss(H,re);if(!te)return;Hr({blockKey:te,data:Pt,...he?{base:{value:Xe?Ae:he}}:{},rebaseOnConflict:!1,guard:Xr({formBase:d,rebased:!!Xe,versionOf:er})});return}if(!z)return;const Hn={...I[z]},Wt=[...P];if(re.isMultivariate){const te=st(H,re);if(!te||!z)return;const de=Ei(te,l,Pt);Wt[n]=Kt(H,re,de)}else if(re.isHidden){const te=Vs(H.__resolveType),de=te?{...H.section}:{...H},ht=Array.isArray(de.variants)?[...de.variants]:[];ht[0]&&(ht[0]=Qr(de.__resolveType,ht[0],Pt)),de.variants=ht,te?Wt[n]={...H,section:de}:Wt[n]=de}else re.isLazy?Wt[n]={...H,section:Pt}:Wt[n]=Pt;if(ue.length>1){const te=Hn.sections,de=[...te?.variants??[]];de[be]&&(de[be]=Qr(te?.__resolveType,de[be],Wt)),Hn.sections={...te,variants:de}}else Hn.sections=Wt;Hr({blockKey:z,data:Hn,rebaseOnConflict:!1,guard:Xr({formBase:null,rebased:!1,versionOf:er})})};if(wt.current={sectionIndex:n,sectionVariantIndex:l,write:x},o){wt.current=null,x();return}C.current=setTimeout(()=>{C.current=null,x()},_n)},ao=t=>{tn.current=!1,L(t),ut(0),N([]),T(o=>o+1);const n=M[t],s=ce[t];if(Ne?.(s?.isSavedBlock?s.resolveType??null:null),!n||!s)return;if(s.isMultivariate){_t(n,s,0,t);return}const a=Rt(n,s,f,_);if(!a){A(null),W(null),Ge(null),Le(null),zt(null,t,0);return}A(a.data),W(a.resolveType),Ge(null),Le(null),zt(null,t,0)},sr=t=>{const n=t;m!==null&&(Lt.current=vi(Lt.current,{sectionIndex:m,variantIndex:ne.current.sectionVariantIndex,shown:et,next:n,sectionCount:ne.current.rawSections.length})),A(n),m!==null&&Sn(n,m)},is=t=>{if(!g||!f||!u||!se)return;const n={kind:"page",pageKey:g,pageName:String(se.name??""),path:String(se.path??"")},s=ta(f,n,u);s&&dn.save(g,()=>{const a=Ds.getQueryData(bi.decofile(Fs))?.[g];if(!a||typeof a!="object"||a===null||Array.isArray(a))return null;const o={...a,...Pn.current};return Pn.current={},t?.raw!==void 0?rc(o,t.raw,u):t?.inner!==void 0?ac(n,s,o,t.inner):o})},rr=(t,n)=>{g&&(Pn.current[t]=n,is())},oo=(t,n)=>{if(!g)return;const s=Zn([...M],t,n);m!==null&&(m===t?L(n):t<m&&n>=m?L(m-1):t>m&&n<=m&&L(m+1)),ft(s)},io=t=>{if(!g)return;const n=M.filter((s,a)=>a!==t);m===t?$t():m!==null&&m>t&&L(m-1),ft(n)},lo=t=>{if(!g)return;const n=M[t];if(!n)return;const s=[...M];s.splice(t+1,0,al(n)),m!==null&&m>t&&L(m+1),ft(s)},co=t=>{if(!g)return;const n=M[t],s=ce[t];if(!n||!s)return;const a=s.isHidden?fi(n,_):mi(n,u);if(!a)return;const o=[...M];o[t]=a,m===t&&$t(),ft(o)},uo=t=>{if(!g)return;const n=M[t],s=ce[t];if(!n||!s||s.isMultivariate)return;const a=di(n);if(!a)return;const o=[...M];o[t]=a,m===t&&$t(),ft(o)},fo=t=>{if(!g)return;const n=M[t],s=ce[t];if(!n||!s?.isSavedBlock)return;const a=Rt(n,s,f,_);if(!a?.data)return;const{name:o,...i}=a.data,l=[...M];s.isLazy?l[t]={...n,section:i}:l[t]=i,m===t&&$t(),ft(l)},mo=t=>{if(!g)return;const n=[...M,{__resolveType:t.resolveType}],s=n.length-1;ft(n,{onError:()=>{ne.current.selectedSectionIndex===s&&$t()}}),Yt(!1),L(s),ut(0),N([]),T(l=>l+1);const a=n[s],o=wn(n,f,_)[s];if(!a||!o)return;if(o.isMultivariate){_t(a,o,0);return}const i=Rt(a,o,f,_);if(!i){A(null),W(null),Ge(null),Le(null);return}A(i.data),W(i.resolveType),Ge(null),Le(null)},ar=t=>{En.current=t.append,Yt(!0)},po=t=>{const n=En.current;if(!n){mo(t);return}n({__resolveType:t.resolveType}),Yt(!1),En.current=null},or=t=>{if(m===null)return;const n=M[m],s=ce[m];!n||!s?.isMultivariate||(ut(t),N([]),T(a=>a+1),_t(n,s,t,m,!0))},ho=t=>{if(m===null||!g)return;const n=M[m],s=ce[m];if(!n||!s?.isMultivariate)return;const a=st(n,s);if(!a)return;const o=ci(a,t);if(!o){q.error(c("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const i=[...M];i[m]=Kt(n,s,o);const l=o.variants;let d=Ie;t===Ie?d=Math.min(t,l.length-1):t<Ie&&(d=Ie-1),ut(d),N([]),T(E=>E+1),_t(i[m],s,d),ft(i)},go=t=>{if(m===null||!g)return;const n=M[m],s=ce[m];if(!n||!s?.isMultivariate)return;const a=st(n,s);if(!a)return;const o=ui(a,t,_),i=[...M];i[m]=Kt(n,s,o);const l=Yr(a.variants??[],t,_);ut(l),N([]),T(d=>d+1),_t(i[m],s,l,m,_),ft(i)},vo=(t,n)=>{if(m===null||!g||t===n)return;const s=M[m],a=ce[m];if(!s||!a?.isMultivariate)return;const o=st(s,a);if(!o)return;const i=ii(o,t,n),l=[...M];l[m]=Kt(s,a,i);let d=Ie;Ie===t?d=n:t<Ie&&n>=Ie?d=Ie-1:t>Ie&&n<=Ie&&(d=Ie+1),ut(d),_t(l[m],a,d,m,_),ft(l)},yn=t=>{const n=t??m;if(n===null||!g)return;const s=M[n],a=ce[n];if(!s||!a)return;const o=oi(s,a,void 0,u,_);if(!o){q.error(c("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const i=[...M];i[n]=o.section;const l=wn(i,f,_)[n];if(!l?.isMultivariate){q.error(c("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}L(n),ut(o.newVariantIndex),N([]),T(d=>d+1),_t(o.section,l,o.newVariantIndex,n,_),ft(i)},ir=()=>{if(m===null||!g)return;const t=M[m],n=ce[m];if(!t||!n?.isMultivariate)return;const s=st(t,n);if(!s)return;const a=li(t,n,s);if(!a){q.error(c("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const o=[...M];o[m]=a;const i=wn(o,f,_)[m];if(!i)return;ut(0),Ge(null),Le(null),N([]),T(d=>d+1);const l=Rt(a,i,f,_);l?(A(l.data),W(l.resolveType)):(A(null),W(null)),zt(null,m,0),ft(o)},So=async t=>{if(Fe===null||!g)return;const n=Yn(t,f,u);if(n){q.error(n);return}const s=M[Fe],a=ce[Fe];if(!s||!a)return;const o=Rt(s,a,f,_);if(!o){q.error(c("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const i={...o.data,name:t};try{const l=await D.mutateAsync({blockKey:t,data:i,create:!0}),d=[...M];d[Fe]={__resolveType:t},await D.mutateAsync({blockKey:g,data:an(f,g,d,J,le)}),m===Fe&&$t(),G(null),qn(l)||q.success(c("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),k?.()}catch(l){q.error(c("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Mt(c,Bt(l))})}},lr=ye?.rule;if(St&&m===null&&Z===null&&lr){const{resolveType:t,formValue:n}=qt(lr,f??{},u??void 0);ee(t),Y(n)}const nn=u?Ui(u):[],ls=u&&f?Yi(u,f):[],Ht=_&&u&&f?_l(u,f):[],cs=(t,n)=>{if(Ht.length===0)return;const s=Pl(t);return{kinds:Ht,selected:s,campaignPrefill:kl(t),onPick:n}},cr=!$&&!!(it&&u&&f),ur=Z&&u?Gn(Z,u):null,yt=()=>{gt.current&&(clearTimeout(gt.current),gt.current=null),vt.current&&(clearTimeout(vt.current),vt.current=null)},kt=async(t,n)=>{if(!(Dl(n,t,u)>0))try{await Cn.mutateAsync({blockKey:t})}catch(s){q.error(c("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Mt(c,Bt(s))})}},dr=t=>{gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{const{activePageKey:n,decofile:s,variantIndex:a}=ne.current;if(!n)return;const o={...s[n]},i={...o.sections},l=[...i.variants??[]],d=l[a],E=d?.rule;if(Gt(E,s,u)){const h=E?.__resolveType??"",x=s[h],j=typeof x?.name=="string"?x.name:h,{__resolveType:I,...P}=t;D.mutate({blockKey:h,data:Dt(I??"",P,j)},{onSuccess:()=>k?.(),onError:D.reportError});return}d&&(l[a]={...d,rule:t}),o.sections={...i,variants:l},D.mutate({blockKey:n,data:o},{onSuccess:()=>k?.(),onError:D.reportError})},_n)},fr=t=>{ee(t);const n=t?ha(t,u):{__resolveType:Ur(u)};Y(t?n:{}),dr(n)},mr=t=>{const n=t;Y(n);const s=Z?{__resolveType:Z,...n}:{...n};dr(s)},In=async(t,n,s)=>{const a=wl(n,t);if(!a.ok)return a.reason==="conflict"&&q.info(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.conflictTests"):c("sectionsEditor.namedRulePicker.conflictCampaigns"),ma),null;const o={};if(s){const i=s(a.rule);if(!i)return null;o[i.blockKey]=i.data}return a.blockWrite&&(o[a.blockWrite.blockKey]=a.blockWrite.block),Object.keys(o).length>0&&!(await Is.apply({writes:o})).ok?null:(a.blockWrite&&q.success(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):c("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{...ma,description:c("sectionsEditor.namedRulePicker.createdHint")}),{rule:a.rule,projected:{...n,...o}})},pr=Ht.length>0?{kinds:Ht,prepare:async t=>(await In(t,ne.current.decofile,void 0))?.rule??null,ensureBlock:async t=>{const n=Kl(ne.current.decofile,t);return n.kind==="saved"?!0:n.kind==="conflict"?!1:(await Is.apply({writes:{[Ml(t).blockKey]:n.block}})).ok}}:null,hr=async t=>{yt();const{activePageKey:n,decofile:s,variantIndex:a}=ne.current;if(!n)return;let o=null;const i=await In(t,s,E=>{const h=s[n],x=h?.sections;if(!x||typeof x!="object"||Array.isArray(x))return null;const j=x;if(!Array.isArray(j.variants))return null;const I=[...j.variants],P=I[a];return P?(o=bt(P.rule,s,u),I[a]={...P,rule:E},{blockKey:n,data:{...h,sections:{...j,variants:I}}}):null});if(!i)return;const{resolveType:l,formValue:d}=qt(i.rule,i.projected,u??void 0);ee(l),Y(d),o&&await kt(o,i.projected),k?.()},gr=async t=>{yt();const{activePageKey:n,decofile:s,variantIndex:a}=ne.current;if(!n)return;const o=s[n],i=o?.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const d=[...l.variants],E=d[a];if(!E)return;const h=bt(E.rule,s,u),x=ln(t);d[a]={...E,rule:x};const j={...s,[n]:{...o,sections:{...l,variants:d}}},{resolveType:I,formValue:P}=qt(x,j,u??void 0);ee(I),Y(P);try{await D.mutateAsync({blockKey:n,data:j[n]}),h&&h!==t&&await kt(h,j),k?.()}catch(pe){q.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Mt(c,Bt(pe))})}},vr=t=>{vt.current&&clearTimeout(vt.current);const{selectedSectionIndex:n,sectionVariantIndex:s}=ne.current;n!==null&&(vt.current=setTimeout(()=>{const{rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:d,variantIndex:E}=ne.current;if(!l)return;const h=a[n],x=o[n];if(!h||!x?.isMultivariate)return;const j=st(h,x);if(!j)return;const P=(j.variants??[])[s]?.rule;if(Gt(P,i,u)){const z=P?.__resolveType??"",H=i[z],re=typeof H?.name=="string"?H.name:z,{__resolveType:he,...Ae}=t;D.mutate({blockKey:z,data:Dt(he??"",Ae,re)},{onSuccess:()=>k?.(),onError:D.reportError});return}const pe=vs(j,s,t),ue=[...a];ue[n]=Kt(h,x,pe);const be=an(i,l,ue,E,d);D.mutate({blockKey:l,data:be},{onSuccess:()=>k?.(),onError:D.reportError})},_n))},yo=t=>{Ge(t);const n=t?ha(t,u):{__resolveType:Ur(u)};Le(t?n:{}),vr(n)},bo=t=>{const n=t;Le(n);const s=Qt?{__resolveType:Qt,...n}:{...n};vr(s)},xo=async t=>{yt();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:d,variantIndex:E}=ne.current;if(n===null||!l)return;let h=null;const x=await In(t,i,P=>{const pe=a[n],ue=o[n];if(!pe||!ue?.isMultivariate)return null;const be=st(pe,ue);if(!be)return null;const z=be.variants??[];h=bt(z[s]?.rule,i,u);const H=[...a];return H[n]=Kt(pe,ue,vs(be,s,P)),{blockKey:l,data:an(i,l,H,E,d)}});if(!x)return;const{resolveType:j,formValue:I}=qt(x.rule,x.projected,u??void 0);Ge(j),Le(I),h&&await kt(h,x.projected),k?.()},_o=async t=>{yt();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:d,variantIndex:E}=ne.current;if(n===null||!l)return;const h=a[n],x=o[n];if(!h||!x?.isMultivariate)return;const j=st(h,x);if(!j)return;const I=j.variants??[],P=bt(I[s]?.rule,i,u),pe=ln(t),ue=vs(j,s,pe),be=[...a];be[n]=Kt(h,x,ue);const z=an(i,l,be,E,d),H={...i,[l]:z},{resolveType:re,formValue:he}=qt(pe,H,u??void 0);Ge(re),Le(he);try{await D.mutateAsync({blockKey:l,data:z}),P&&P!==t&&await kt(P,H),k?.()}catch(Ae){q.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Mt(c,Bt(Ae))})}};if(!$&&!se)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.noPageFound",{currentPath:V})});if($&&!Kn)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.globalBlockNotFound")});const je=m!==null?ce[m]??null:null,Sr=m!==null?M[m]:null,yr=Sr&&je?.isMultivariate?st(Sr,je):null,At=yr?qr(yr,we):[],Ln=Math.min(Ie,Math.max(At.length-1,0)),jt=At[Ln]??null,Nt=je?.isMultivariate===!0,us=m!==null&&je!==null,Ct=us&&(Nt||!!(Fn&&et)),ko=Ct&&!$&&je?.isSavedBlock===!0,mt=$||ko,br=$?Hs:je?.label??"",wo=Qt&&u?Gn(Qt,u):null,xr=(t,n)=>n&&X?`${t} · ${n}`:t,_r=je?je.variantOf??je.label:"",jo=(()=>{const t=Nt&&jt?jt.label:null;return t?X?[xr(_r,t)]:[je.label,t]:[je?.label??""]})(),ds=xr(se?.name??"",St?ye?.label:null),On=Ct&&(!$||O.length>0)?$?[Hs,...O]:[ds,...jo,...O]:[],kr=Te&&se?[se.name,"SEO",...Ps]:[],wr=c("sectionsEditor.pageVariantTabs.variantsLabel"),jr=Zt&&se?[se.name,wr]:Ft&&se&&je?[ds,_r,wr]:[],zn=jr.length>0?jr:kr.length>0?kr:mt?On.length>0?On:[br]:On.length>0?On:[ds],Rr=us&&!Nt&&!je?.isHidden&&!!g,Ro=mt||!$&&St&&!!ye||Rr,Eo=us&&!Nt&&!$&&O.length===0&&!!je&&Ra(je)&&!!g,Vo=X&&Ct&&!Ft&&Nt&&O.length===0&&!!jt,Er=X&&O.length>0?na(O[O.length-1]):null,To=O.length>1?na(O[O.length-2]):null,Vr=mt?br:Ct?je?.label??"":se?.name??"",Ao=Zt||Ft?c("sectionsEditor.pageVariantTabs.variantsLabel"):Te?c("sectionsEditor.panelSections.seo"):Er??Vr,Tr=Ft?je?.variantOf??je?.label??"":Zt||Te?se?.name??"":Er?To??Vr:mt?c("sectionsEditor.sectionsEditor.globalSectionSubtitle"):Ct?se?.name??"":se?.path??"",fs=!Zt&&!Ft&&!Te&&!Ct&&!mt,No=!X&&!Te&&!$&&Nt&&O.length===0,bn=()=>{if(!g)return;yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const t=f[g],n=Cl(t.sections,M,u,_);if(!n)return;const{sections:s,newVariantIndex:a}=n;D.mutate({blockKey:g,data:{...t,sections:s}},{onSuccess:()=>{fe(a),L(null),A(null),W(null),N([]),Y(null),ee(null)},onError:D.reportError})},$n=(t,n,s)=>{if(!g)return;yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const a=f[g],o=a.sections;if(!o||typeof o!="object"||Array.isArray(o))return;const i=o;if(!Array.isArray(i.variants))return;const l=t([...i.variants]);if(!l)return;const d=Bl(i,l),E={...f,[g]:{...a,sections:d}};D.mutate({blockKey:g,data:E[g]},{onSuccess:()=>{n?.();const h=typeof s=="string"?[s]:s??[];(async()=>{for(const x of h)await kt(x,E)})()},onError:D.reportError})},Ar=(t,n)=>{if(t===n)return;let s=J;J===t?s=n:t<J&&n>=J?s=J-1:t>J&&n<=J&&(s=J+1),fe(s);const a=Zn(le.map(o=>({rule:o.rule})),t,n);rs(a,s),$n(o=>Zn(o,t,n))},Nr=t=>{const n=le[t]?.rule,s=bt(n,f??{},u??void 0);$n(a=>a.length<=1?null:(a.splice(t,1),a),()=>{le.length-1===1?fe(0):t<J?fe(J-1):t===J&&fe(Math.max(0,t-1)),L(null),A(null),W(null),N([]),Y(null),ee(null)},s)},Co=()=>{const t=le.map((n,s)=>({variant:n,index:s})).filter(({variant:n})=>!pi(n.rule)).map(({variant:n})=>bt(n.rule,f??{},u??void 0)).filter(n=>!!n);$n(n=>{const s=Ai({variants:n}),a=n[s];return a?[{...a,rule:Ni(u)}]:null},()=>{fe(0),L(null),A(null),W(null),N([]),Y(null),ee(null),Tn(!1)},t)},Cr=t=>{let n=t+1;$n(s=>(n=Yr(s,t,_),Fl(s,t,_)),()=>{fe(n),L(null),A(null),W(null),N([]),Y(null),ee(null)})},Po=async(t,n)=>{yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const s=ne.current.activePageKey,a=ne.current.decofile;if(!s)return;const o=a[s],i=o.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const d=[...l.variants],E=d[t];if(!E?.rule||typeof E.rule!="object"){q.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const h=E.rule,x=n.trim();en(!0);try{if(!x){if(!Gt(h,a,u)){Ve(null);return}const z=h.__resolveType??"";d[t]={...E,rule:ks(h,a,u)};const H={...a,[s]:{...o,sections:{...l,variants:d}}};await D.mutateAsync({blockKey:s,data:H[s]}),await kt(z,H),Ve(null),k?.();return}const j=ws(h,a,u);if(!j){q.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(j.blockKey){await D.mutateAsync({blockKey:j.blockKey,data:Dt(j.resolveType,j.data,x)}),Ve(null),k?.();return}const I=Un(x),P=Yn(I,a,u);if(P){q.error(P);return}const pe=Dt(j.resolveType,j.data,x);let ue=null,be=!1;try{const z=await D.mutateAsync({blockKey:I,data:pe,create:!0});be=qn(z),ue=be?null:I,d[t]={...E,rule:ln(I)},await D.mutateAsync({blockKey:s,data:{...o,sections:{...l,variants:d}}}),ue=null}catch(z){throw ue&&await Cn.mutateAsync({blockKey:ue}).catch(()=>{}),z}Ve(null),be||q.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:x})),k?.()}catch(j){q.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Mt(c,Bt(j))})}finally{en(!1)}},Ko=async(t,n)=>{yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const{selectedSectionIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:d,variantIndex:E}=ne.current;if(s===null||!l)return;const h=a[s],x=o[s];if(!h||!x?.isMultivariate)return;const j=st(h,x);if(!j)return;const I=j.variants??[],P=I[t];if(!P?.rule||typeof P.rule!="object"){q.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const pe=P.rule,ue=n.trim();en(!0);const be=async z=>{const H={...j,variants:z},re=[...a];re[s]=Kt(h,x,H);const he=an(i,l,re,E,d);return await D.mutateAsync({blockKey:l,data:he}),{...i,[l]:he}};try{if(!ue){if(!Gt(pe,i,u)){nt(null);return}const pt=pe.__resolveType??"",Xe=[...I];Xe[t]={...P,rule:ks(pe,i,u)};const Pt=await be(Xe);await kt(pt,Pt),nt(null),k?.();return}const z=ws(pe,i,u);if(!z){q.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(z.blockKey){await D.mutateAsync({blockKey:z.blockKey,data:Dt(z.resolveType,z.data,ue)}),nt(null),k?.();return}const H=Un(ue),re=Yn(H,i,u);if(re){q.error(re);return}const he=Dt(z.resolveType,z.data,ue);let Ae=null,sn=!1;try{const pt=await D.mutateAsync({blockKey:H,data:he,create:!0});sn=qn(pt),Ae=sn?null:H;const Xe=[...I];Xe[t]={...P,rule:ln(H)},await be(Xe),Ae=null}catch(pt){throw Ae&&await Cn.mutateAsync({blockKey:Ae}).catch(()=>{}),pt}nt(null),sn||q.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:ue})),k?.()}catch(z){q.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Mt(c,Bt(z))})}finally{en(!1)}},Pr=async(t,n,s)=>{A(s);try{await D.mutateAsync({blockKey:t,data:s})}catch(a){throw A(o=>o===s?n:o),a}},Mo={rename:async(t,n,s)=>{yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const{activePageKey:a,decofile:o}=ne.current;if(!a)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n],d=l?.rule&&typeof l.rule=="object"?l.rule:void 0,E=async x=>{const j={...t,variants:x};return await Pr(a,t,j),{...o,[a]:j}},h=wc(d,s,o,u);if(h.kind!=="noop"){if(h.kind==="error"){q.error(h.reason==="no-matcher-rule"?c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):h.reason==="unreadable-rule"?c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):h.message??c("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}en(!0);try{if(h.kind==="inline"){const I=[...i];I[n]={...l,rule:h.inlinedRule};const P=await E(I);await kt(h.blockKey,P),k?.();return}if(h.kind==="updateBlock"){await D.mutateAsync({blockKey:h.blockKey,data:h.blockData}),k?.();return}let x=null,j=!1;try{const I=await D.mutateAsync({blockKey:h.blockId,data:h.blockData,create:!0});j=qn(I),x=j?null:h.blockId;const P=[...i];P[n]={...l,rule:h.reference},await E(P),x=null}catch(I){throw x&&await Cn.mutateAsync({blockKey:x}).catch(()=>{}),I}j||q.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:s.trim()})),k?.()}catch(x){q.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Mt(c,Bt(x))})}finally{en(!1)}}},selectGlobal:async(t,n,s)=>{yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const{activePageKey:a,decofile:o}=ne.current;if(!a)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n];if(!l)return;const d=bt(l.rule,o,u);i[n]={...l,rule:ln(s)};const E={...t,variants:i},h={...o,[a]:E};try{await Pr(a,t,E),d&&d!==s&&await kt(d,h),k?.()}catch(x){q.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Mt(c,Bt(x))})}},selectNamedRule:async(t,n,s)=>{yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const{activePageKey:a,decofile:o}=ne.current;if(!a)return;let i=null,l=null;const d=await In(s,o,E=>{const h=Array.isArray(t.variants)?[...t.variants]:[],x=h[n];return x?(i=bt(x.rule,o,u),h[n]={...x,rule:E},l={...t,variants:h},{blockKey:a,data:l}):null});!d||!l||(A(l),i&&await kt(i,d.projected),k?.())}},Kr=()=>{$t()},Mr=t=>{un(t),is({inner:t})},Br=t=>{Nn(t),is({raw:t})},Dr=()=>{un(null),It([])},Fr=()=>Jt(t=>t+1),Ir=()=>{dn.flush(),cn(!1),un(null),Nn(void 0),It([]),Jt(t=>t+1),ge?.()},Bo=()=>{Tn(!1),An(!1),L(null),cn(!0)},Do=()=>{Te&&Ir(),L(null),Tn(!0)},Fo=()=>An(!0),ms=t=>{if(Zt&&t===0){Tn(!1);return}if(Ft&&t<2){An(!1),t===0&&L(null);return}if(Te){if(t===0){Ir();return}if(t===1){It([]),Jt(s=>s+1);return}It(Ps.slice(0,t-1)),Jt(s=>s+1);return}if($){N(O.slice(0,t)),T(s=>s+1);return}if(t===0){Kr();return}if(t===1){N([]),T(s=>s+1);return}const n=!X&&Nt&&jt?1:0;if(n===1&&t===2){N([]),T(s=>s+1);return}N(O.slice(0,t-1-n))},ps=zn.length>1?r.jsx("button",{type:"button",onClick:()=>ms(ol(zn.length,{isMultivariateSectionTop:No})),title:c("sectionsEditor.sectionsEditor.back"),"aria-label":c("sectionsEditor.sectionsEditor.back"),className:ae("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",mt?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:r.jsx(dl,{className:"size-4"})}):null,Io=mt||Ct||Te?Ro&&r.jsxs("div",{className:ae("border-b px-3 py-2.5",mt&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!$&&St&&ye&&r.jsxs("button",{type:"button",onClick:Kr,title:c("sectionsEditor.sectionsEditor.editingInVariant",{variant:ye.label}),className:ae("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",Ji),children:[r.jsx(Zi,{rule:xs(ye.rule,f??{},u??void 0),matchers:nn}),r.jsx("span",{className:"max-w-[160px] truncate",children:ye.label})]}),r.jsx("div",{className:"flex-1"}),mt&&r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Jn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Tt,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Rr&&r.jsx(Wn,{onClick:()=>yn()})]}),mt&&r.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:c("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):r.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"flex-1 min-w-0",children:r.jsx(sa,{pageKey:g,initialName:se.name,initialPath:se.path,onFieldChange:rr,variant:"header"})}),r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:()=>cn(!0),children:r.jsx(da,{size:14})})}),r.jsx(Tt,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>Oe&&g?Oe():Xn(!0),children:r.jsx(fa,{size:14})})}),r.jsx(Tt,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]}),r.jsx(Wn,{onClick:bn})]}),Lo=r.jsxs(r.Fragment,{children:[St&&g&&r.jsx(ra,{listKey:g,variants:le,activeIndex:J,decofile:f??{},meta:u,matchers:nn,onSelect:hn,onReorder:Ar,onRename:Ve,onDuplicate:Cr,onDelete:Nr,onAdd:bn}),St&&Z!==null&&r.jsx(aa,{className:"mt-3",children:r.jsx("div",{className:ae("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ys,{currentRt:Z,currentLabel:kn(ye?.rule,f??{},we,u??void 0),currentGlobalKey:bt(ye?.rule,f??{},u??void 0)??void 0,matchers:nn,globals:ls,onSelect:fr,onSelectGlobal:gr,named:cs(ye?.rule,hr),namedRow:bs(ye?.rule,Ht),rule:ye?.rule,schema:ur,formValue:De,onChange:mr,formKey:`${J}:${Z??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:f,onSaveReferencedBlock:fn,sandbox:gn})})})]}),Lr=r.jsxs(r.Fragment,{children:[r.jsx(Qi,{listKey:`${g??""}:${m??""}`,variants:At.map((t,n)=>({index:n,label:t.label})),selectedIndex:Ln,onSelect:or,onRename:nt,onDuplicate:go,onDelete:ho,onRemoveAll:ir,onReorder:vo,onAdd:()=>yn()}),r.jsx(aa,{children:r.jsx(ys,{currentRt:Qt??"",currentLabel:kn(jt?.rule,f??{},we,u??void 0),currentGlobalKey:bt(jt?.rule,f??{},u??void 0)??void 0,matchers:nn,globals:ls,onSelect:yo,onSelectGlobal:_o,named:cs(jt?.rule,xo),namedRow:bs(jt?.rule,Ht),rule:jt?.rule,schema:wo,formValue:Ba,onChange:bo,formKey:`${m??"none"}:${Ln}:${Qt??""}`,formWrapperClassName:"pt-1",meta:u??void 0,decofile:f,onSaveReferencedBlock:fn,sandbox:gn})})]}),Or=r.jsx("div",{className:ae(X?"px-2":"p-2 pt-3"),children:r.jsx(_c,{listKey:`${g??""}-${J}`,rawSections:M,sections:ce,meta:u,decofile:f,selectedIndex:m,onSelect:ao,onReorder:oo,onDelete:io,onDuplicate:lo,onMakeReusable:G,onToggleHidden:co,onToggleLazy:ot?uo:void 0,onAddVariant:yn,onDetach:fo,onAddSection:()=>Yt(!0),canAddSection:cr})}),Oo=r.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[g&&se&&r.jsx(sa,{pageKey:g,initialName:se.name,initialPath:se.path,onFieldChange:rr}),Ot&&g?r.jsx(ya,{rawSeo:Mn,innerSeo:ss,defaultResolveType:qs,seoTypesLoading:_&&!u,seoSchema:Gs,activeResolveType:Bn,seoTypeOptions:Ws,formResetKey:Ks,siteDefaultSeo:Us,onBreadcrumbChange:It,onPersistRaw:Br,onInnerChange:Mr,onClearForm:Dr,onBumpFormKey:Fr,asyncRenderAvailable:ot}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),zo=r.jsx(on,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:r.jsx("div",{className:"mx-auto max-w-2xl",children:Ot&&g?r.jsx(ya,{rawSeo:Mn,innerSeo:ss,defaultResolveType:qs,seoTypesLoading:_&&!u,seoSchema:Gs,activeResolveType:Bn,seoTypeOptions:Ws,formResetKey:Ks,siteDefaultSeo:Us,onBreadcrumbChange:It,onPersistRaw:Br,onInnerChange:Mr,onClearForm:Dr,onBumpFormKey:Fr,asyncRenderAvailable:ot}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),$o=r.jsxs(on,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[St&&g&&r.jsx(ra,{listKey:g,variants:le,activeIndex:J,decofile:f??{},meta:u,matchers:nn,onSelect:hn,onReorder:Ar,onRename:Ve,onDuplicate:Cr,onDelete:Nr,onAdd:bn}),St&&Z!==null&&r.jsxs("div",{className:ae("px-3 border-b",Vn?"pt-3 pb-5 space-y-3":"py-2"),children:[r.jsxs("button",{type:"button",onClick:()=>Ka(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-[var(--studio-control-radius,var(--radius-sm))] py-0.5 hover:bg-accent","aria-expanded":Vn,children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.sectionsEditor.variantRule")}),Vn?r.jsx(ll,{className:"size-3.5 shrink-0 text-muted-foreground"}):r.jsx(cl,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),Vn&&r.jsx("div",{className:ae("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ys,{currentRt:Z,currentLabel:kn(ye?.rule,f??{},we,u??void 0),currentGlobalKey:bt(ye?.rule,f??{},u??void 0)??void 0,matchers:nn,globals:ls,onSelect:fr,onSelectGlobal:gr,named:cs(ye?.rule,hr),namedRow:bs(ye?.rule,Ht),rule:ye?.rule,schema:ur,formValue:De,onChange:mr,formKey:`${J}:${Z??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:f,onSaveReferencedBlock:fn,sandbox:gn})})]}),Or]},"editor-section-list");return r.jsx(Xi,{value:_,children:r.jsx(el,{children:r.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!X&&ps&&r.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ps}),(X||zn.length>1)&&r.jsx(tl,{crumbs:zn,onSelect:ms,onSelectRoot:()=>{dn.flush(),Ue?Ue():ms(0)}}),r.jsx("div",{className:"shrink-0",children:X?r.jsxs("div",{className:ae("flex items-center gap-2 border-b px-3 py-2.5",mt&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[X&&ps,mt&&r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Jn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Tt,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r.jsx("span",{className:"truncate text-sm font-semibold",children:Ao}),Tr&&r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Tr})]}),fs&&St&&ye&&r.jsx(oa,{variants:le,activeIndex:J,onSelect:hn,onManage:Do,onRemoveAll:Co}),Vo&&r.jsx(oa,{variants:At,activeIndex:Ln,onSelect:or,onManage:Fo,onRemoveAll:ir}),fs&&!St&&r.jsx(Wn,{onClick:bn}),Eo&&r.jsx(Wn,{onClick:()=>yn()}),r.jsx(nl,{}),fs&&r.jsxs(r.Fragment,{children:[r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:Bo,children:r.jsx(da,{size:14})})}),r.jsx(Tt,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),!Oe&&r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>Xn(!0),children:r.jsx(fa,{size:14})})}),r.jsx(Tt,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Io}),dt&&r.jsx(si,{open:!0,fields:ri(dt.plan,dt.target.schema),choices:dt.choices,changedAgain:dt.changedAgain,author:$s??null,authorPending:$s===void 0,fieldsAsLabeled:zs!==null,fresh:dt.fresh,onChoose:(t,n)=>ro({...dt.choices,[t]:n}),onApply:so},Ec(dt.formBase)),Ft?r.jsx(ia,{onAdd:()=>yn(),children:Lr},"editor-section-variants"):Ct?r.jsxs(on,{viewportRef:me,onBlur:Xs,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!X&&Nt&&At.length>0&&O.length===0&&Lr,r.jsx(pa,{value:pr,children:r.jsx(la,{value:$&&_?Be:null,children:r.jsx(ca,{activeSchema:Fn,formValue:et,formResetKey:Je,onFormChange:sr,onBreadcrumbChange:N,breadcrumbPath:O,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:u,decofile:f,onSaveReferencedBlock:fn,sandbox:gn,previewBaseUrl:at,onRequestAddSection:ar,onVariantMatcherOp:$?Mo:void 0})})})]},"editor-section-form"):$?r.jsx(on,{viewportRef:me,onBlur:Xs,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx(pa,{value:pr,children:r.jsx(la,{value:$&&_?Be:null,children:r.jsx(ca,{activeSchema:Fn,formValue:et,formResetKey:Je,onFormChange:sr,onBreadcrumbChange:N,breadcrumbPath:O,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:u,decofile:f,onSaveReferencedBlock:fn,sandbox:gn,previewBaseUrl:at,onRequestAddSection:ar})})})},"editor-global-block"):Te?X?r.jsx(on,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"p-3",children:Oo})},"editor-seo"):zo:Zt?r.jsx(ia,{onAdd:bn,children:Lo},"editor-variants"):X?r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[r.jsx(on,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"py-2",children:Or})}),r.jsx("div",{className:"shrink-0 border-t p-2",children:r.jsx(Es,{canAddSection:cr,onAddSection:()=>Yt(!0)})})]},"editor-section-list"):$o,r.jsx(sl,{open:Fe!==null,onOpenChange:t=>{t||G(null)},defaultBlockId:Fe!==null?Un(ce[Fe]?.label??""):"",isPending:D.isPending,onSubmit:So}),it&&r.jsx(nc,{open:Pa,onOpenChange:t=>{Yt(t),t||(En.current=null)},meta:u,decofile:f,previewBaseUrl:at,onSelect:po}),Ts&&g&&f&&r.jsx(El,{open:Ts,onOpenChange:Xn,pageKey:g,decofile:f}),ie!==null&&r.jsx(ua,{open:!0,initialName:Gt(le[ie]?.rule,f??{},u??void 0)?kn(le[ie]?.rule,f??{},we,u??void 0):"",autoLabel:we(xs(le[ie]?.rule,f??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await Po(ie,t)},onOpenChange:t=>{!t&&!Xt&&Ve(null)}}),Qe!==null&&r.jsx(ua,{open:!0,initialName:Gt(At[Qe]?.rule,f??{},u??void 0)?kn(At[Qe]?.rule,f??{},we,u??void 0):"",autoLabel:we(xs(At[Qe]?.rule,f??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await Ko(Qe,t)},onOpenChange:t=>{!t&&!Xt&&nt(null)}})]})})})}export{lf as SectionsEditor};
@@ -1 +1 @@
1
- import{r as d,ct as rt,cu as _e,j as c,cv as st,cw as be,cx as k,cy as lt,cz as j,cA as N,cB as $,cC as at,bP as Ee,cD as Re,cE as it,cF as ct,cG as dt,cH as ut,cI as pt,cJ as ft,cK as mt,cL as ht,cM as vt,cN as gt,cO as xt,cP as St,c as ee,l as oe,ai as wt}from"./index-Cuw4uBth.js";import{c as Ne}from"./index-BdQq_4o_.js";import{V as Ct}from"./index-B-HoKvLm.js";import{t as je,n as yt}from"./ChevronUp-7SZxJu8w.js";var It=[" ","Enter","ArrowUp","ArrowDown"],bt=[" ","Enter"],J="Select",[de,ue,Tt]=it(J),[ne]=vt(J,[Tt,Re]),pe=Re(),[_t,G]=ne(J),[Nt,Pt]=ne(J),Me=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:l,value:s,defaultValue:a,onValueChange:i,dir:u,name:f,autoComplete:m,disabled:w,required:C,form:S}=r,p=pe(e),[g,y]=d.useState(null),[v,x]=d.useState(null),[F,M]=d.useState(!1),re=rt(u),[P,O]=_e({prop:o,defaultProp:n??!1,onChange:l,caller:J}),[U,q]=_e({prop:s,defaultProp:a,onChange:i,caller:J}),L=d.useRef(null),B=g?S||!!g.closest("form"):!0,[W,V]=d.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return c.jsx(st,{...p,children:c.jsxs(_t,{required:C,scope:e,trigger:g,onTriggerChange:y,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:P,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:w,children:[c.jsx(de.Provider,{scope:e,children:c.jsx(Nt,{scope:r.__scopeSelect,onNativeOptionAdd:d.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:d.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?c.jsxs(et,{"aria-hidden":!0,required:C,tabIndex:-1,name:f,autoComplete:m,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?c.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};Me.displayName=J;var Ae="SelectTrigger",Oe=d.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,l=pe(t),s=G(Ae,t),a=s.disabled||o,i=k(e,s.onTriggerChange),u=ue(t),f=d.useRef("touch"),[m,w,C]=ot(p=>{const g=u().filter(x=>!x.disabled),y=g.find(x=>x.value===s.value),v=nt(g,p,y);v!==void 0&&s.onValueChange(v.value)}),S=p=>{a||(s.onOpenChange(!0),C()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return c.jsx(lt,{asChild:!0,...l,children:c.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":tt(s.value)?"":void 0,...n,ref:i,onClick:N(n.onClick,p=>{p.currentTarget.focus(),f.current!=="mouse"&&S(p)}),onPointerDown:N(n.onPointerDown,p=>{f.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(n.onKeyDown,p=>{const g=m.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(g&&p.key===" ")&&It.includes(p.key)&&(S(),p.preventDefault())})})})});Oe.displayName=Ae;var De="SelectValue",ke=d.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:l,placeholder:s="",...a}=r,i=G(De,t),{onValueNodeHasChildrenChange:u}=i,f=l!==void 0,m=k(e,i.onValueNodeChange);return $(()=>{u(f)},[u,f]),c.jsx(j.span,{...a,ref:m,style:{pointerEvents:"none"},children:tt(i.value)?c.jsx(c.Fragment,{children:s}):l})});ke.displayName=De;var Et="SelectIcon",Le=d.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return c.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});Le.displayName=Et;var Rt="SelectPortal",Be=r=>c.jsx(at,{asChild:!0,...r});Be.displayName=Rt;var Q="SelectContent",Ve=d.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=d.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const l=o;return l?Ee.createPortal(c.jsx(He,{scope:r.__scopeSelect,children:c.jsx(de.Slot,{scope:r.__scopeSelect,children:c.jsx("div",{children:r.children})})}),l):null}return c.jsx(ze,{...r,ref:e})});Ve.displayName=Q;var A=10,[He,Y]=ne(Q),jt="SelectContentImpl",Mt=gt("SelectContent.RemoveScroll"),ze=d.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:l,onPointerDownOutside:s,side:a,sideOffset:i,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:w,collisionPadding:C,sticky:S,hideWhenDetached:p,avoidCollisions:g,...y}=r,v=G(Q,t),[x,F]=d.useState(null),[M,re]=d.useState(null),P=k(e,h=>F(h)),[O,U]=d.useState(null),[q,L]=d.useState(null),B=ue(t),[W,V]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=d.useCallback(h=>{const[T,...R]=B().map(_=>_.ref.current),[I]=R.slice(-1),b=document.activeElement;for(const _ of h)if(_===b||(_?.scrollIntoView({block:"nearest"}),_===T&&M&&(M.scrollTop=0),_===I&&M&&(M.scrollTop=M.scrollHeight),_?.focus(),document.activeElement!==b))return},[B,M]),D=d.useCallback(()=>E([O,x]),[E,O,x]);d.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=v;d.useEffect(()=>{if(x){let h={x:0,y:0};const T=I=>{h={x:Math.abs(Math.round(I.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(I.pageY)-(K.current?.y??0))}},R=I=>{h.x<=10&&h.y<=10?I.preventDefault():x.contains(I.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),d.useEffect(()=>{const h=()=>z(!1);return window.addEventListener("blur",h),window.addEventListener("resize",h),()=>{window.removeEventListener("blur",h),window.removeEventListener("resize",h)}},[z]);const[fe,ae]=ot(h=>{const T=B().filter(b=>!b.disabled),R=T.find(b=>b.ref.current===document.activeElement),I=nt(T,h,R);I&&setTimeout(()=>I.ref.current.focus())}),me=d.useCallback((h,T,R)=>{const I=!H.current&&!R;(v.value!==void 0&&v.value===T||I)&&(U(h),I&&(H.current=!0))},[v.value]),he=d.useCallback(()=>x?.focus(),[x]),te=d.useCallback((h,T,R)=>{const I=!H.current&&!R;(v.value!==void 0&&v.value===T||I)&&L(h)},[v.value]),ie=o==="popper"?Se:Fe,se=ie===Se?{side:a,sideOffset:i,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:w,collisionPadding:C,sticky:S,hideWhenDetached:p,avoidCollisions:g}:{};return c.jsx(He,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:c.jsx(ft,{as:Mt,allowPinchZoom:!0,children:c.jsx(mt,{asChild:!0,trapped:v.open,onMountAutoFocus:h=>{h.preventDefault()},onUnmountAutoFocus:N(n,h=>{v.trigger?.focus({preventScroll:!0}),h.preventDefault()}),children:c.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:h=>h.preventDefault(),...y,...se,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:N(y.onKeyDown,h=>{const T=h.ctrlKey||h.altKey||h.metaKey;if(h.key==="Tab"&&h.preventDefault(),!T&&h.key.length===1&&ae(h.key),["ArrowUp","ArrowDown","Home","End"].includes(h.key)){let I=B().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(h.key)&&(I=I.slice().reverse()),["ArrowUp","ArrowDown"].includes(h.key)){const b=h.target,_=I.indexOf(b);I=I.slice(_+1)}setTimeout(()=>E(I)),h.preventDefault()}})})})})})})});ze.displayName=jt;var At="SelectItemAlignedPosition",Fe=d.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,l=G(Q,t),s=Y(Q,t),[a,i]=d.useState(null),[u,f]=d.useState(null),m=k(e,P=>f(P)),w=ue(t),C=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:y,focusSelectedItem:v}=s,x=d.useCallback(()=>{if(l.trigger&&l.valueNode&&a&&u&&p&&g&&y){const P=l.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=l.valueNode.getBoundingClientRect(),q=y.getBoundingClientRect();if(l.dir!=="rtl"){const b=q.left-O.left,_=U.left-b,X=P.left-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);a.style.minWidth=Z+"px",a.style.left=xe+"px"}else{const b=O.right-q.right,_=window.innerWidth-U.right-b,X=window.innerWidth-P.right-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);a.style.minWidth=Z+"px",a.style.right=xe+"px"}const L=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=P.top+P.height/2-A,ie=B-te,se=g.offsetHeight/2,h=g.offsetTop+se,T=H+E+h,R=K-T;if(T<=te){const b=L.length>0&&g===L[L.length-1].ref.current;a.style.bottom="0px";const _=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(b?he:0)+_+D),Z=T+X;a.style.height=Z+"px"}else{const b=L.length>0&&g===L[0].ref.current;a.style.top="0px";const X=Math.max(te,H+p.offsetTop+(b?me:0)+se)+R;a.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}a.style.margin=`${A}px 0`,a.style.minHeight=fe+"px",a.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>C.current=!0)}},[w,l.trigger,l.valueNode,a,u,p,g,y,l.dir,o]);$(()=>x(),[x]);const[F,M]=d.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=d.useCallback(P=>{P&&S.current===!0&&(x(),v?.(),S.current=!1)},[x,v]);return c.jsx(Dt,{scope:t,contentWrapper:a,shouldExpandOnScrollRef:C,onScrollButtonChange:re,children:c.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:c.jsx(j.div,{...n,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Fe.displayName=At;var Ot="SelectPopperPosition",Se=d.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...l}=r,s=pe(t);return c.jsx(xt,{...s,...l,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=Ot;var[Dt,Te]=ne(Q,{}),we="SelectViewport",Ue=d.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,l=Y(we,t),s=Te(we,t),a=k(e,l.onViewportChange),i=d.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(de.Slot,{scope:t,children:c.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(n.onScroll,u=>{const f=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:w}=s;if(w?.current&&m){const C=Math.abs(i.current-f.scrollTop);if(C>0){const S=window.innerHeight-A*2,p=parseFloat(m.style.minHeight),g=parseFloat(m.style.height),y=Math.max(p,g);if(y<S){const v=y+C,x=Math.min(S,v),F=v-x;m.style.height=x+"px",m.style.bottom==="0px"&&(f.scrollTop=F>0?F:0,m.style.justifyContent="flex-end")}}}i.current=f.scrollTop})})})]})});Ue.displayName=we;var We="SelectGroup",[kt,Lt]=ne(We),Bt=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return c.jsx(kt,{scope:t,id:n,children:c.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Bt.displayName=We;var Ke="SelectLabel",Vt=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=Lt(Ke,t);return c.jsx(j.div,{id:n.id,...o,ref:e})});Vt.displayName=Ke;var ce="SelectItem",[Ht,$e]=ne(ce),Ge=d.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:l,...s}=r,a=G(ce,t),i=Y(ce,t),u=a.value===o,[f,m]=d.useState(l??""),[w,C]=d.useState(!1),S=k(e,v=>i.itemRefCallback?.(v,o,n)),p=be(),g=d.useRef("touch"),y=()=>{n||(a.onValueChange(o),a.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Ht,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:d.useCallback(v=>{m(x=>x||(v?.textContent??"").trim())},[]),children:c.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:f,children:c.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>C(!0)),onBlur:N(s.onBlur,()=>C(!1)),onClick:N(s.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:N(s.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:N(s.onPointerDown,v=>{g.current=v.pointerType}),onPointerMove:N(s.onPointerMove,v=>{g.current=v.pointerType,n?i.onItemLeave?.():g.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,v=>{v.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,v=>{i.searchRef?.current!==""&&v.key===" "||(bt.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});Ge.displayName=ce;var le="SelectItemText",Ye=d.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...l}=r,s=G(le,t),a=Y(le,t),i=$e(le,t),u=Pt(le,t),[f,m]=d.useState(null),w=k(e,y=>m(y),i.onItemTextChange,y=>a.itemTextRefCallback?.(y,i.value,i.disabled)),C=f?.textContent,S=d.useMemo(()=>c.jsx("option",{value:i.value,disabled:i.disabled,children:C},i.value),[i.disabled,i.value,C]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return $(()=>(p(S),()=>g(S)),[p,g,S]),c.jsxs(c.Fragment,{children:[c.jsx(j.span,{id:i.textId,...l,ref:w}),i.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ee.createPortal(l.children,s.valueNode):null]})});Ye.displayName=le;var qe="SelectItemIndicator",Xe=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return $e(qe,t).isSelected?c.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});Xe.displayName=qe;var Ce="SelectScrollUpButton",Ze=d.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,l]=d.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let a=function(){const u=i.scrollTop>0;l(u)};const i=t.viewport;return a(),i.addEventListener("scroll",a),()=>i.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:i}=t;a&&i&&(a.scrollTop=a.scrollTop-i.offsetHeight)}}):null});Ze.displayName=Ce;var ye="SelectScrollDownButton",Je=d.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,l]=d.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let a=function(){const u=i.scrollHeight-i.clientHeight,f=Math.ceil(i.scrollTop)<u;l(f)};const i=t.viewport;return a(),i.addEventListener("scroll",a),()=>i.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:i}=t;a&&i&&(a.scrollTop=a.scrollTop+i.offsetHeight)}}):null});Je.displayName=ye;var Qe=d.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,l=Y("SelectScrollButton",t),s=d.useRef(null),a=ue(t),i=d.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),$(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),c.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{l.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{i()})})}),zt="SelectSeparator",Ft=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return c.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});Ft.displayName=zt;var Ie="SelectArrow",Ut=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),l=G(Ie,t),s=Y(Ie,t);return l.open&&s.position==="popper"?c.jsx(St,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Wt="SelectBubbleInput",et=d.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=d.useRef(null),l=k(o,n),s=ct(e);return d.useEffect(()=>{const a=n.current;if(!a)return;const i=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(i,"value").set;if(s!==e&&f){const m=new Event("change",{bubbles:!0});f.call(a,e),a.dispatchEvent(m)}},[s,e]),c.jsx(j.select,{...t,style:{...Ct,...t.style},ref:l,defaultValue:e})});et.displayName=Wt;function tt(r){return r===""||r===void 0}function ot(r){const e=dt(r),t=d.useRef(""),o=d.useRef(0),n=d.useCallback(s=>{const a=t.current+s;e(a),(function i(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))})(a)},[e]),l=d.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,l]}function nt(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,l=t?r.indexOf(t):-1;let s=Kt(r,Math.max(l,0));n.length===1&&(s=s.filter(u=>u!==t));const i=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return i!==t?i:void 0}function Kt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var $t=Me,Gt=Oe,Yt=ke,qt=Le,Xt=Be,Zt=Ve,Jt=Ue,Qt=Ge,Pe=Ye,eo=Xe,to=Ze,oo=Je;function co(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx($t,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx(Yt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(15);let t,o,n,l,s;e[0]!==r?({className:o,size:l,variant:s,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=l===void 0?"default":l,i=s===void 0?"outline":s;let u;e[6]!==o?(u=oe("data-[placeholder]:text-subtle-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-ring aria-invalid:bg-destructive/10 aria-invalid:shadow-[inset_0_0_0_1px_var(--destructive)] flex w-fit items-center justify-between gap-1.5 px-3 text-sm whitespace-nowrap transition-[color,background-color,box-shadow] outline-none disabled:text-subtle-foreground disabled:pointer-events-none","data-[variant=outline]:rounded-[var(--studio-control-radius,var(--radius-lg))] data-[variant=outline]:bg-[var(--studio-input-background)] data-[variant=outline]:shadow-edge data-[variant=outline]:hover:bg-sidebar","data-[variant=filled]:rounded-full data-[variant=filled]:bg-muted data-[variant=filled]:hover:bg-secondary-hover","data-[variant=pill]:rounded-full data-[variant=pill]:bg-card data-[variant=pill]:shadow-edge data-[variant=pill]:hover:bg-[var(--studio-outline-hover-background)]","data-[size=default]:h-[var(--studio-control-height,2.25rem)] data-[size=default]:pl-4 data-[size=sm]:h-8 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:text-xs data-[size=xs]:font-medium","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",o),e[6]=o,e[7]=u):u=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=c.jsx(qt,{asChild:!0,children:c.jsx(je,{className:"size-3.5 stroke-[1.5]"})}),e[8]=f):f=e[8];let m;return e[9]!==t||e[10]!==n||e[11]!==a||e[12]!==u||e[13]!==i?(m=c.jsxs(Gt,{"data-slot":"select-trigger","data-size":a,"data-variant":i,className:u,...n,children:[t,f]}),e[9]=t,e[10]=n,e[11]=a,e[12]=u,e[13]=i,e[14]=m):m=e[14],m}function fo(r){const e=ee.c(25);let t,o,n,l,s;e[0]!==r?({className:o,children:t,position:l,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=l===void 0?"popper":l,i=s===void 0?!1:s,u=a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let f;e[6]!==o||e[7]!==u?(f=oe("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--studio-surface-radius,var(--radius-lg))] border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==i?(m=!i&&c.jsx(no,{}),e[9]=i,e[10]=m):m=e[10];const w=a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let C;e[11]!==w?(C=oe("p-1",w),e[11]=w,e[12]=C):C=e[12];let S;e[13]!==t||e[14]!==C?(S=c.jsx(Jt,{className:C,children:t}),e[13]=t,e[14]=C,e[15]=S):S=e[15];let p;e[16]!==i?(p=!i&&c.jsx(ro,{}),e[16]=i,e[17]=p):p=e[17];let g;return e[18]!==a||e[19]!==n||e[20]!==f||e[21]!==m||e[22]!==S||e[23]!==p?(g=c.jsx(Xt,{children:c.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:f,position:a,...n,children:[m,S,p]})}),e[18]=a,e[19]=n,e[20]=f,e[21]=m,e[22]=S,e[23]=p,e[24]=g):g=e[24],g}function mo(r){const e=ee.c(19);let t,o,n,l,s;e[0]!==r?({className:o,children:t,description:n,hideCheck:s,...l}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=s===void 0?!1:s,i=n&&"items-start py-2";let u;e[6]!==o||e[7]!==i?(u=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i,o),e[6]=o,e[7]=i,e[8]=u):u=e[8];let f;e[9]!==a?(f=!a&&c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(eo,{children:c.jsx(wt,{className:"size-4"})})}),e[9]=a,e[10]=f):f=e[10];let m;e[11]!==t||e[12]!==n?(m=n?c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx(Pe,{children:t}),c.jsx("span",{className:"text-xs text-muted-foreground whitespace-normal",children:n})]}):c.jsx(Pe,{children:t}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;return e[14]!==l||e[15]!==u||e[16]!==f||e[17]!==m?(w=c.jsxs(Qt,{"data-slot":"select-item",className:u,...l,children:[f,m]}),e[14]=l,e[15]=u,e[16]=f,e[17]=m,e[18]=w):w=e[18],w}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(yt,{className:"size-4"}),e[5]=l):l=e[5];let s;return e[6]!==o||e[7]!==n?(s=c.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:l}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(je,{className:"size-4"}),e[5]=l):l=e[5];let s;return e[6]!==o||e[7]!==n?(s=c.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:l}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{co as S,uo as a,po as b,mo as c,fo as d};
1
+ import{r as d,cu as rt,cv as _e,j as c,cw as st,cx as be,cy as k,cz as lt,cA as j,cB as N,cC as $,cD as at,bQ as Ee,cE as Re,cF as it,cG as ct,cH as dt,cI as ut,cJ as pt,cK as ft,cL as mt,cM as ht,cN as vt,cO as gt,cP as xt,cQ as St,c as ee,l as oe,ai as wt}from"./index-D6lKvaoF.js";import{c as Ne}from"./index-BdQq_4o_.js";import{V as Ct}from"./index-BCVYESVO.js";import{t as je,n as yt}from"./ChevronUp-krQUb2vU.js";var It=[" ","Enter","ArrowUp","ArrowDown"],bt=[" ","Enter"],Q="Select",[de,ue,Tt]=it(Q),[ne]=vt(Q,[Tt,Re]),pe=Re(),[_t,G]=ne(Q),[Nt,Pt]=ne(Q),Me=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:l,value:s,defaultValue:a,onValueChange:i,dir:u,name:f,autoComplete:m,disabled:w,required:C,form:S}=r,p=pe(e),[g,y]=d.useState(null),[v,x]=d.useState(null),[F,M]=d.useState(!1),re=rt(u),[P,O]=_e({prop:o,defaultProp:n??!1,onChange:l,caller:Q}),[U,q]=_e({prop:s,defaultProp:a,onChange:i,caller:Q}),L=d.useRef(null),B=g?S||!!g.closest("form"):!0,[W,V]=d.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return c.jsx(st,{...p,children:c.jsxs(_t,{required:C,scope:e,trigger:g,onTriggerChange:y,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:P,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:w,children:[c.jsx(de.Provider,{scope:e,children:c.jsx(Nt,{scope:r.__scopeSelect,onNativeOptionAdd:d.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:d.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?c.jsxs(et,{"aria-hidden":!0,required:C,tabIndex:-1,name:f,autoComplete:m,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?c.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};Me.displayName=Q;var Ae="SelectTrigger",Oe=d.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,l=pe(t),s=G(Ae,t),a=s.disabled||o,i=k(e,s.onTriggerChange),u=ue(t),f=d.useRef("touch"),[m,w,C]=ot(p=>{const g=u().filter(x=>!x.disabled),y=g.find(x=>x.value===s.value),v=nt(g,p,y);v!==void 0&&s.onValueChange(v.value)}),S=p=>{a||(s.onOpenChange(!0),C()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return c.jsx(lt,{asChild:!0,...l,children:c.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":tt(s.value)?"":void 0,...n,ref:i,onClick:N(n.onClick,p=>{p.currentTarget.focus(),f.current!=="mouse"&&S(p)}),onPointerDown:N(n.onPointerDown,p=>{f.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(n.onKeyDown,p=>{const g=m.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(g&&p.key===" ")&&It.includes(p.key)&&(S(),p.preventDefault())})})})});Oe.displayName=Ae;var De="SelectValue",ke=d.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:l,placeholder:s="",...a}=r,i=G(De,t),{onValueNodeHasChildrenChange:u}=i,f=l!==void 0,m=k(e,i.onValueNodeChange);return $(()=>{u(f)},[u,f]),c.jsx(j.span,{...a,ref:m,style:{pointerEvents:"none"},children:tt(i.value)?c.jsx(c.Fragment,{children:s}):l})});ke.displayName=De;var Et="SelectIcon",Le=d.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return c.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});Le.displayName=Et;var Rt="SelectPortal",Be=r=>c.jsx(at,{asChild:!0,...r});Be.displayName=Rt;var J="SelectContent",Ve=d.forwardRef((r,e)=>{const t=G(J,r.__scopeSelect),[o,n]=d.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const l=o;return l?Ee.createPortal(c.jsx(He,{scope:r.__scopeSelect,children:c.jsx(de.Slot,{scope:r.__scopeSelect,children:c.jsx("div",{children:r.children})})}),l):null}return c.jsx(ze,{...r,ref:e})});Ve.displayName=J;var A=10,[He,Y]=ne(J),jt="SelectContentImpl",Mt=gt("SelectContent.RemoveScroll"),ze=d.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:l,onPointerDownOutside:s,side:a,sideOffset:i,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:w,collisionPadding:C,sticky:S,hideWhenDetached:p,avoidCollisions:g,...y}=r,v=G(J,t),[x,F]=d.useState(null),[M,re]=d.useState(null),P=k(e,h=>F(h)),[O,U]=d.useState(null),[q,L]=d.useState(null),B=ue(t),[W,V]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=d.useCallback(h=>{const[T,...R]=B().map(_=>_.ref.current),[I]=R.slice(-1),b=document.activeElement;for(const _ of h)if(_===b||(_?.scrollIntoView({block:"nearest"}),_===T&&M&&(M.scrollTop=0),_===I&&M&&(M.scrollTop=M.scrollHeight),_?.focus(),document.activeElement!==b))return},[B,M]),D=d.useCallback(()=>E([O,x]),[E,O,x]);d.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=v;d.useEffect(()=>{if(x){let h={x:0,y:0};const T=I=>{h={x:Math.abs(Math.round(I.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(I.pageY)-(K.current?.y??0))}},R=I=>{h.x<=10&&h.y<=10?I.preventDefault():x.contains(I.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),d.useEffect(()=>{const h=()=>z(!1);return window.addEventListener("blur",h),window.addEventListener("resize",h),()=>{window.removeEventListener("blur",h),window.removeEventListener("resize",h)}},[z]);const[fe,ae]=ot(h=>{const T=B().filter(b=>!b.disabled),R=T.find(b=>b.ref.current===document.activeElement),I=nt(T,h,R);I&&setTimeout(()=>I.ref.current.focus())}),me=d.useCallback((h,T,R)=>{const I=!H.current&&!R;(v.value!==void 0&&v.value===T||I)&&(U(h),I&&(H.current=!0))},[v.value]),he=d.useCallback(()=>x?.focus(),[x]),te=d.useCallback((h,T,R)=>{const I=!H.current&&!R;(v.value!==void 0&&v.value===T||I)&&L(h)},[v.value]),ie=o==="popper"?Se:Fe,se=ie===Se?{side:a,sideOffset:i,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:w,collisionPadding:C,sticky:S,hideWhenDetached:p,avoidCollisions:g}:{};return c.jsx(He,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:c.jsx(ft,{as:Mt,allowPinchZoom:!0,children:c.jsx(mt,{asChild:!0,trapped:v.open,onMountAutoFocus:h=>{h.preventDefault()},onUnmountAutoFocus:N(n,h=>{v.trigger?.focus({preventScroll:!0}),h.preventDefault()}),children:c.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:h=>h.preventDefault(),...y,...se,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:N(y.onKeyDown,h=>{const T=h.ctrlKey||h.altKey||h.metaKey;if(h.key==="Tab"&&h.preventDefault(),!T&&h.key.length===1&&ae(h.key),["ArrowUp","ArrowDown","Home","End"].includes(h.key)){let I=B().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(h.key)&&(I=I.slice().reverse()),["ArrowUp","ArrowDown"].includes(h.key)){const b=h.target,_=I.indexOf(b);I=I.slice(_+1)}setTimeout(()=>E(I)),h.preventDefault()}})})})})})})});ze.displayName=jt;var At="SelectItemAlignedPosition",Fe=d.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,l=G(J,t),s=Y(J,t),[a,i]=d.useState(null),[u,f]=d.useState(null),m=k(e,P=>f(P)),w=ue(t),C=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:y,focusSelectedItem:v}=s,x=d.useCallback(()=>{if(l.trigger&&l.valueNode&&a&&u&&p&&g&&y){const P=l.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=l.valueNode.getBoundingClientRect(),q=y.getBoundingClientRect();if(l.dir!=="rtl"){const b=q.left-O.left,_=U.left-b,X=P.left-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);a.style.minWidth=Z+"px",a.style.left=xe+"px"}else{const b=O.right-q.right,_=window.innerWidth-U.right-b,X=window.innerWidth-P.right-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);a.style.minWidth=Z+"px",a.style.right=xe+"px"}const L=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=P.top+P.height/2-A,ie=B-te,se=g.offsetHeight/2,h=g.offsetTop+se,T=H+E+h,R=K-T;if(T<=te){const b=L.length>0&&g===L[L.length-1].ref.current;a.style.bottom="0px";const _=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(b?he:0)+_+D),Z=T+X;a.style.height=Z+"px"}else{const b=L.length>0&&g===L[0].ref.current;a.style.top="0px";const X=Math.max(te,H+p.offsetTop+(b?me:0)+se)+R;a.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}a.style.margin=`${A}px 0`,a.style.minHeight=fe+"px",a.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>C.current=!0)}},[w,l.trigger,l.valueNode,a,u,p,g,y,l.dir,o]);$(()=>x(),[x]);const[F,M]=d.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=d.useCallback(P=>{P&&S.current===!0&&(x(),v?.(),S.current=!1)},[x,v]);return c.jsx(Dt,{scope:t,contentWrapper:a,shouldExpandOnScrollRef:C,onScrollButtonChange:re,children:c.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:c.jsx(j.div,{...n,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Fe.displayName=At;var Ot="SelectPopperPosition",Se=d.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...l}=r,s=pe(t);return c.jsx(xt,{...s,...l,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=Ot;var[Dt,Te]=ne(J,{}),we="SelectViewport",Ue=d.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,l=Y(we,t),s=Te(we,t),a=k(e,l.onViewportChange),i=d.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(de.Slot,{scope:t,children:c.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(n.onScroll,u=>{const f=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:w}=s;if(w?.current&&m){const C=Math.abs(i.current-f.scrollTop);if(C>0){const S=window.innerHeight-A*2,p=parseFloat(m.style.minHeight),g=parseFloat(m.style.height),y=Math.max(p,g);if(y<S){const v=y+C,x=Math.min(S,v),F=v-x;m.style.height=x+"px",m.style.bottom==="0px"&&(f.scrollTop=F>0?F:0,m.style.justifyContent="flex-end")}}}i.current=f.scrollTop})})})]})});Ue.displayName=we;var We="SelectGroup",[kt,Lt]=ne(We),Bt=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return c.jsx(kt,{scope:t,id:n,children:c.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Bt.displayName=We;var Ke="SelectLabel",Vt=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=Lt(Ke,t);return c.jsx(j.div,{id:n.id,...o,ref:e})});Vt.displayName=Ke;var ce="SelectItem",[Ht,$e]=ne(ce),Ge=d.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:l,...s}=r,a=G(ce,t),i=Y(ce,t),u=a.value===o,[f,m]=d.useState(l??""),[w,C]=d.useState(!1),S=k(e,v=>i.itemRefCallback?.(v,o,n)),p=be(),g=d.useRef("touch"),y=()=>{n||(a.onValueChange(o),a.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Ht,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:d.useCallback(v=>{m(x=>x||(v?.textContent??"").trim())},[]),children:c.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:f,children:c.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>C(!0)),onBlur:N(s.onBlur,()=>C(!1)),onClick:N(s.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:N(s.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:N(s.onPointerDown,v=>{g.current=v.pointerType}),onPointerMove:N(s.onPointerMove,v=>{g.current=v.pointerType,n?i.onItemLeave?.():g.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,v=>{v.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,v=>{i.searchRef?.current!==""&&v.key===" "||(bt.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});Ge.displayName=ce;var le="SelectItemText",Ye=d.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...l}=r,s=G(le,t),a=Y(le,t),i=$e(le,t),u=Pt(le,t),[f,m]=d.useState(null),w=k(e,y=>m(y),i.onItemTextChange,y=>a.itemTextRefCallback?.(y,i.value,i.disabled)),C=f?.textContent,S=d.useMemo(()=>c.jsx("option",{value:i.value,disabled:i.disabled,children:C},i.value),[i.disabled,i.value,C]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return $(()=>(p(S),()=>g(S)),[p,g,S]),c.jsxs(c.Fragment,{children:[c.jsx(j.span,{id:i.textId,...l,ref:w}),i.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ee.createPortal(l.children,s.valueNode):null]})});Ye.displayName=le;var qe="SelectItemIndicator",Xe=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return $e(qe,t).isSelected?c.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});Xe.displayName=qe;var Ce="SelectScrollUpButton",Ze=d.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,l]=d.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let a=function(){const u=i.scrollTop>0;l(u)};const i=t.viewport;return a(),i.addEventListener("scroll",a),()=>i.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),n?c.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:i}=t;a&&i&&(a.scrollTop=a.scrollTop-i.offsetHeight)}}):null});Ze.displayName=Ce;var ye="SelectScrollDownButton",Qe=d.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,l]=d.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let a=function(){const u=i.scrollHeight-i.clientHeight,f=Math.ceil(i.scrollTop)<u;l(f)};const i=t.viewport;return a(),i.addEventListener("scroll",a),()=>i.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),n?c.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:i}=t;a&&i&&(a.scrollTop=a.scrollTop+i.offsetHeight)}}):null});Qe.displayName=ye;var Je=d.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,l=Y("SelectScrollButton",t),s=d.useRef(null),a=ue(t),i=d.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),$(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),c.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{l.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{i()})})}),zt="SelectSeparator",Ft=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return c.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});Ft.displayName=zt;var Ie="SelectArrow",Ut=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),l=G(Ie,t),s=Y(Ie,t);return l.open&&s.position==="popper"?c.jsx(St,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Wt="SelectBubbleInput",et=d.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=d.useRef(null),l=k(o,n),s=ct(e);return d.useEffect(()=>{const a=n.current;if(!a)return;const i=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(i,"value").set;if(s!==e&&f){const m=new Event("change",{bubbles:!0});f.call(a,e),a.dispatchEvent(m)}},[s,e]),c.jsx(j.select,{...t,style:{...Ct,...t.style},ref:l,defaultValue:e})});et.displayName=Wt;function tt(r){return r===""||r===void 0}function ot(r){const e=dt(r),t=d.useRef(""),o=d.useRef(0),n=d.useCallback(s=>{const a=t.current+s;e(a),(function i(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))})(a)},[e]),l=d.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,l]}function nt(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,l=t?r.indexOf(t):-1;let s=Kt(r,Math.max(l,0));n.length===1&&(s=s.filter(u=>u!==t));const i=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return i!==t?i:void 0}function Kt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var $t=Me,Gt=Oe,Yt=ke,qt=Le,Xt=Be,Zt=Ve,Qt=Ue,Jt=Ge,Pe=Ye,eo=Xe,to=Ze,oo=Qe;function co(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx($t,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx(Yt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(15);let t,o,n,l,s;e[0]!==r?({className:o,size:l,variant:s,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=l===void 0?"default":l,i=s===void 0?"outline":s;let u;e[6]!==o?(u=oe("data-[placeholder]:text-subtle-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-ring aria-invalid:bg-destructive/10 aria-invalid:shadow-[inset_0_0_0_1px_var(--destructive)] flex w-fit items-center justify-between gap-1.5 px-3 text-sm whitespace-nowrap transition-[color,background-color,box-shadow] outline-none disabled:text-subtle-foreground disabled:pointer-events-none","data-[variant=outline]:rounded-[var(--studio-control-radius,var(--radius-lg))] data-[variant=outline]:bg-[var(--studio-input-background)] data-[variant=outline]:shadow-edge data-[variant=outline]:hover:bg-sidebar","data-[variant=filled]:rounded-full data-[variant=filled]:bg-muted data-[variant=filled]:hover:bg-secondary-hover","data-[variant=pill]:rounded-full data-[variant=pill]:bg-card data-[variant=pill]:shadow-edge data-[variant=pill]:hover:bg-[var(--studio-outline-hover-background)]","data-[size=default]:h-[var(--studio-control-height,2.25rem)] data-[size=default]:pl-4 data-[size=sm]:h-8 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:text-xs data-[size=xs]:font-medium","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",o),e[6]=o,e[7]=u):u=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=c.jsx(qt,{asChild:!0,children:c.jsx(je,{className:"size-3.5 stroke-[1.5]"})}),e[8]=f):f=e[8];let m;return e[9]!==t||e[10]!==n||e[11]!==a||e[12]!==u||e[13]!==i?(m=c.jsxs(Gt,{"data-slot":"select-trigger","data-size":a,"data-variant":i,className:u,...n,children:[t,f]}),e[9]=t,e[10]=n,e[11]=a,e[12]=u,e[13]=i,e[14]=m):m=e[14],m}function fo(r){const e=ee.c(25);let t,o,n,l,s;e[0]!==r?({className:o,children:t,position:l,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=l===void 0?"popper":l,i=s===void 0?!1:s,u=a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let f;e[6]!==o||e[7]!==u?(f=oe("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--studio-surface-radius,var(--radius-lg))] border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==i?(m=!i&&c.jsx(no,{}),e[9]=i,e[10]=m):m=e[10];const w=a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let C;e[11]!==w?(C=oe("p-1",w),e[11]=w,e[12]=C):C=e[12];let S;e[13]!==t||e[14]!==C?(S=c.jsx(Qt,{className:C,children:t}),e[13]=t,e[14]=C,e[15]=S):S=e[15];let p;e[16]!==i?(p=!i&&c.jsx(ro,{}),e[16]=i,e[17]=p):p=e[17];let g;return e[18]!==a||e[19]!==n||e[20]!==f||e[21]!==m||e[22]!==S||e[23]!==p?(g=c.jsx(Xt,{children:c.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:f,position:a,...n,children:[m,S,p]})}),e[18]=a,e[19]=n,e[20]=f,e[21]=m,e[22]=S,e[23]=p,e[24]=g):g=e[24],g}function mo(r){const e=ee.c(19);let t,o,n,l,s;e[0]!==r?({className:o,children:t,description:n,hideCheck:s,...l}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=s===void 0?!1:s,i=n&&"items-start py-2";let u;e[6]!==o||e[7]!==i?(u=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i,o),e[6]=o,e[7]=i,e[8]=u):u=e[8];let f;e[9]!==a?(f=!a&&c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(eo,{children:c.jsx(wt,{className:"size-4"})})}),e[9]=a,e[10]=f):f=e[10];let m;e[11]!==t||e[12]!==n?(m=n?c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx(Pe,{children:t}),c.jsx("span",{className:"text-xs text-muted-foreground whitespace-normal",children:n})]}):c.jsx(Pe,{children:t}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;return e[14]!==l||e[15]!==u||e[16]!==f||e[17]!==m?(w=c.jsxs(Jt,{"data-slot":"select-item",className:u,...l,children:[f,m]}),e[14]=l,e[15]=u,e[16]=f,e[17]=m,e[18]=w):w=e[18],w}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(yt,{className:"size-4"}),e[5]=l):l=e[5];let s;return e[6]!==o||e[7]!==n?(s=c.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:l}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(je,{className:"size-4"}),e[5]=l):l=e[5];let s;return e[6]!==o||e[7]!==n?(s=c.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:l}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{co as S,uo as a,po as b,mo as c,fo as d};
@@ -1 +1 @@
1
- import{c as $,b as A,r as R,l as G,j as l,B as H,s as J,x as K,v as Q,D as U}from"./index-Cuw4uBth.js";import{c as V,b as W,a as X,D as Y}from"./drawer-hQxgme01.js";import{u as Z}from"./use-mobile-99mfVsUI.js";import{d as ee}from"./chat-context-C2Yxk7gW.js";import{S as F,a as le,M as se,c as te}from"./index-Boaq93Wx.js";function me(L){const e=$.c(48),{variant:o,className:t,placeholder:n,model:s,isLoading:I,credentialId:P,onCredentialChange:k,onModelChange:b,filterModels:E}=L,z=o===void 0?"borderless":o,w=n===void 0?"Select model":n,r=A(),[a,S]=R.useState(!1),i=b!==void 0,q=Z(),O=z==="borderless"?"ghost":"outline",_=z==="borderless"&&"md:border-none";let d;e[0]!==t||e[1]!==_?(d=G("text-sm hover:bg-accent py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group min-w-0 shrink justify-start overflow-hidden",_,t),e[0]=t,e[1]=_,e[2]=d):d=e[2];let c;e[3]!==I||e[4]!==s||e[5]!==w||e[6]!==i?(c=i?l.jsx(F,{model:s??null,placeholder:w,isLoading:I}):l.jsx(ne,{placeholder:w}),e[3]=I,e[4]=s,e[5]=w,e[6]=i,e[7]=c):c=e[7];let D;e[8]!==O||e[9]!==d||e[10]!==c?(D=l.jsx(H,{variant:O,size:"sm",className:d,children:c}),e[8]=O,e[9]=d,e[10]=c,e[11]=D):D=e[11];const m=D;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(le,{}),e[12]=y):y=e[12];let N;e[13]!==P||e[14]!==E||e[15]!==s||e[16]!==k||e[17]!==b||e[18]!==i?(N=l.jsx(R.Suspense,{fallback:y,children:i?l.jsx(se,{onClose:()=>S(!1),credentialId:P??null,onCredentialChange:k??oe,selectedModel:s??null,onModelChange:b,filterModels:E}):l.jsx(te,{onClose:()=>S(!1)})}),e[13]=P,e[14]=E,e[15]=s,e[16]=k,e[17]=b,e[18]=i,e[19]=N):N=e[19];const f=N;if(q){let g;e[20]!==m?(g=l.jsx(V,{asChild:!0,children:m}),e[20]=m,e[21]=g):g=e[21];let j;e[22]!==r?(j=r("chat.selectModel.selectModel"),e[22]=r,e[23]=j):j=e[23];let M;e[24]!==j?(M=l.jsx(W,{className:"sr-only",children:j}),e[24]=j,e[25]=M):M=e[25];let C;e[26]!==f?(C=l.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:f}),e[26]=f,e[27]=C):C=e[27];let v;e[28]!==M||e[29]!==C?(v=l.jsxs(X,{className:"p-0 flex flex-col max-h-[95vh]",children:[M,C]}),e[28]=M,e[29]=C,e[30]=v):v=e[30];let T;return e[31]!==a||e[32]!==g||e[33]!==v?(T=l.jsxs(Y,{open:a,onOpenChange:S,children:[g,v]}),e[31]=a,e[32]=g,e[33]=v,e[34]=T):T=e[34],T}let h;e[35]!==m?(h=l.jsx(J,{asChild:!0,children:m}),e[35]=m,e[36]=h):h=e[36];let x;e[37]!==r?(x=r("chat.selectModel.selectModel"),e[37]=r,e[38]=x):x=e[38];let p;e[39]!==x?(p=l.jsx(K,{className:"sr-only",children:x}),e[39]=x,e[40]=p):p=e[40];let u;e[41]!==f||e[42]!==p?(u=l.jsxs(Q,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[p,f]}),e[41]=f,e[42]=p,e[43]=u):u=e[43];let B;return e[44]!==a||e[45]!==h||e[46]!==u?(B=l.jsxs(U,{open:a,onOpenChange:S,children:[h,u]}),e[44]=a,e[45]=h,e[46]=u,e[47]=B):B=e[47],B}function oe(){}function ne(L){const e=$.c(4),{placeholder:o}=L,{selectedModel:t,isModelsLoading:n}=ee();let s;return e[0]!==n||e[1]!==t||e[2]!==o?(s=l.jsx(F,{model:t,placeholder:o,isLoading:n}),e[0]=n,e[1]=t,e[2]=o,e[3]=s):s=e[3],s}export{me as M};
1
+ import{c as $,b as A,r as R,l as G,j as l,B as H,s as J,x as K,v as Q,D as U}from"./index-D6lKvaoF.js";import{c as V,b as W,a as X,D as Y}from"./drawer-CiMnESz2.js";import{u as Z}from"./use-mobile-BwQy16Q6.js";import{d as ee}from"./chat-context-CFRPrQEn.js";import{S as F,a as le,M as se,c as te}from"./index-Cdp3CJ7S.js";function me(L){const e=$.c(48),{variant:o,className:t,placeholder:n,model:s,isLoading:I,credentialId:P,onCredentialChange:k,onModelChange:b,filterModels:E}=L,z=o===void 0?"borderless":o,w=n===void 0?"Select model":n,r=A(),[a,S]=R.useState(!1),i=b!==void 0,q=Z(),O=z==="borderless"?"ghost":"outline",_=z==="borderless"&&"md:border-none";let d;e[0]!==t||e[1]!==_?(d=G("text-sm hover:bg-accent py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group min-w-0 shrink justify-start overflow-hidden",_,t),e[0]=t,e[1]=_,e[2]=d):d=e[2];let c;e[3]!==I||e[4]!==s||e[5]!==w||e[6]!==i?(c=i?l.jsx(F,{model:s??null,placeholder:w,isLoading:I}):l.jsx(ne,{placeholder:w}),e[3]=I,e[4]=s,e[5]=w,e[6]=i,e[7]=c):c=e[7];let D;e[8]!==O||e[9]!==d||e[10]!==c?(D=l.jsx(H,{variant:O,size:"sm",className:d,children:c}),e[8]=O,e[9]=d,e[10]=c,e[11]=D):D=e[11];const m=D;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(le,{}),e[12]=y):y=e[12];let N;e[13]!==P||e[14]!==E||e[15]!==s||e[16]!==k||e[17]!==b||e[18]!==i?(N=l.jsx(R.Suspense,{fallback:y,children:i?l.jsx(se,{onClose:()=>S(!1),credentialId:P??null,onCredentialChange:k??oe,selectedModel:s??null,onModelChange:b,filterModels:E}):l.jsx(te,{onClose:()=>S(!1)})}),e[13]=P,e[14]=E,e[15]=s,e[16]=k,e[17]=b,e[18]=i,e[19]=N):N=e[19];const f=N;if(q){let g;e[20]!==m?(g=l.jsx(V,{asChild:!0,children:m}),e[20]=m,e[21]=g):g=e[21];let j;e[22]!==r?(j=r("chat.selectModel.selectModel"),e[22]=r,e[23]=j):j=e[23];let M;e[24]!==j?(M=l.jsx(W,{className:"sr-only",children:j}),e[24]=j,e[25]=M):M=e[25];let C;e[26]!==f?(C=l.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:f}),e[26]=f,e[27]=C):C=e[27];let v;e[28]!==M||e[29]!==C?(v=l.jsxs(X,{className:"p-0 flex flex-col max-h-[95vh]",children:[M,C]}),e[28]=M,e[29]=C,e[30]=v):v=e[30];let T;return e[31]!==a||e[32]!==g||e[33]!==v?(T=l.jsxs(Y,{open:a,onOpenChange:S,children:[g,v]}),e[31]=a,e[32]=g,e[33]=v,e[34]=T):T=e[34],T}let h;e[35]!==m?(h=l.jsx(J,{asChild:!0,children:m}),e[35]=m,e[36]=h):h=e[36];let x;e[37]!==r?(x=r("chat.selectModel.selectModel"),e[37]=r,e[38]=x):x=e[38];let p;e[39]!==x?(p=l.jsx(K,{className:"sr-only",children:x}),e[39]=x,e[40]=p):p=e[40];let u;e[41]!==f||e[42]!==p?(u=l.jsxs(Q,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[p,f]}),e[41]=f,e[42]=p,e[43]=u):u=e[43];let B;return e[44]!==a||e[45]!==h||e[46]!==u?(B=l.jsxs(U,{open:a,onOpenChange:S,children:[h,u]}),e[44]=a,e[45]=h,e[46]=u,e[47]=B):B=e[47],B}function oe(){}function ne(L){const e=$.c(4),{placeholder:o}=L,{selectedModel:t,isModelsLoading:n}=ee();let s;return e[0]!==n||e[1]!==t||e[2]!==o?(s=l.jsx(F,{model:t,placeholder:o,isLoading:n}),e[0]=n,e[1]=t,e[2]=o,e[3]=s):s=e[3],s}export{me as M};