decocms 4.139.21 → 4.139.23
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.
- package/dist/client/assets/{AlertCircle-BqXz_QW3.js → AlertCircle-DcC27WmA.js} +1 -1
- package/dist/client/assets/{AreaChart-DTmhkVdV.js → AreaChart-DsfzIYIp.js} +1 -1
- package/dist/client/assets/{ArrowUp-CuPsp_g8.js → ArrowUp-CdeTFRe8.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-5u0BVlcn.js → ArrowUpRight-kIZaH3BQ.js} +1 -1
- package/dist/client/assets/{Check-D3dAxrw3.js → Check-RPsONqoi.js} +1 -1
- package/dist/client/assets/{CheckCircle-DJgrIUO3.js → CheckCircle-VwoQIY3x.js} +1 -1
- package/dist/client/assets/{ChevronDown-sGinN19i.js → ChevronDown-CvsGy9_V.js} +1 -1
- package/dist/client/assets/{ChevronRight-DQRrACFJ.js → ChevronRight-COrmV1RX.js} +1 -1
- package/dist/client/assets/{ChevronUp-BbsgPeIZ.js → ChevronUp-t2K_HYRx.js} +1 -1
- package/dist/client/assets/{Copy01-CBKme8NM.js → Copy01-dUIi2eZN.js} +1 -1
- package/dist/client/assets/{DotsVertical-BEG934Sy.js → DotsVertical-B5m6mJwx.js} +1 -1
- package/dist/client/assets/{Eye-CgfFpeGb.js → Eye-CPyHsNx9.js} +1 -1
- package/dist/client/assets/{FilterLines-BKryYm8Z.js → FilterLines-C3ejwu4y.js} +1 -1
- package/dist/client/assets/{HardDrive-Ce_49EOW.js → HardDrive-RremZdHb.js} +1 -1
- package/dist/client/assets/{Key01-D3otsQjQ.js → Key01-DrXVRZX2.js} +1 -1
- package/dist/client/assets/{LayoutLeft-D3LTKctD.js → LayoutLeft-CUtVoabE.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DdG8DMp5.js → LinkExternal01-FYanFsTL.js} +1 -1
- package/dist/client/assets/{LogOut01-DYtDxfbG.js → LogOut01-Dibr0QOA.js} +1 -1
- package/dist/client/assets/{Monitor01-B9Ngi6RN.js → Monitor01-0a0QOsYs.js} +1 -1
- package/dist/client/assets/{Palette-BXIMBzzn.js → Palette-C6VwvyVY.js} +1 -1
- package/dist/client/assets/{Play-DtXxBW66.js → Play-Bn0EGB-t.js} +1 -1
- package/dist/client/assets/{Plus-TZoZPDtM.js → Plus-sc0rW8OF.js} +1 -1
- package/dist/client/assets/{SearchLg-D0JVAnZf.js → SearchLg-DXFQe1Sx.js} +1 -1
- package/dist/client/assets/{SearchMd-DTzUg0rC.js → SearchMd-FZNYglTs.js} +1 -1
- package/dist/client/assets/{Settings02-BLjXGanZ.js → Settings02-epU11QVl.js} +1 -1
- package/dist/client/assets/{Shield01-iDkSI_Ov.js → Shield01-DrNeuOUB.js} +1 -1
- package/dist/client/assets/{Star01-BI7bTLeh.js → Star01-Cawt_hmv.js} +1 -1
- package/dist/client/assets/{Stars01-Bk7jyFCH.js → Stars01-DIPcXJk_.js} +1 -1
- package/dist/client/assets/{Stars02-CFDUnzqj.js → Stars02-B8jO1lJL.js} +1 -1
- package/dist/client/assets/{Sun-CsC6IQlI.js → Sun-E9I6kbto.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CjtBAa85.js → SwitchHorizontal01-BxES_zRv.js} +1 -1
- package/dist/client/assets/{Tool01-DvOYqvtL.js → Tool01-DV88LwAF.js} +1 -1
- package/dist/client/assets/{Tool02-w_YdMf1T.js → Tool02-DHfpo6ax.js} +1 -1
- package/dist/client/assets/{Trash01-BCRpsJy6.js → Trash01-BWM43E9g.js} +1 -1
- package/dist/client/assets/{TrendUp01-ClZSGNPD.js → TrendUp01-DNTYrYK3.js} +1 -1
- package/dist/client/assets/{Upload01-DUPVY2Gx.js → Upload01-H15qbd7J.js} +1 -1
- package/dist/client/assets/{User01-DwgmSXVE.js → User01-DnfEmgSx.js} +1 -1
- package/dist/client/assets/{Users01-xF6GoF_3.js → Users01-chZ7Ggai.js} +1 -1
- package/dist/client/assets/{Users03-Y5y_Bnnu.js → Users03-DEjraBJr.js} +1 -1
- package/dist/client/assets/{X-D7TfGl49.js → X-BpPB2vv6.js} +1 -1
- package/dist/client/assets/{XCircle-BBzjwcRg.js → XCircle-A38V1g83.js} +1 -1
- package/dist/client/assets/{XClose-DSzxEgiI.js → XClose-CN5uz5w3.js} +1 -1
- package/dist/client/assets/{Zap-B8RnuHjT.js → Zap-Cnbp-COg.js} +1 -1
- package/dist/client/assets/{ZapSquare-BaUS6VhV.js → ZapSquare-DvCo-SHa.js} +1 -1
- package/dist/client/assets/{access-gate-CvoyuAXP.js → access-gate-BDUkbCsf.js} +1 -1
- package/dist/client/assets/{add-section-modal-BwZRsP3o.js → add-section-modal-DzbJrwq6.js} +1 -1
- package/dist/client/assets/{agent-icon-BgwoOVTy.js → agent-icon-CXm0tG2U.js} +1 -1
- package/dist/client/assets/{agents-list-DiOC6pAt.js → agents-list-CjHAfdf9.js} +1 -1
- package/dist/client/assets/{ai-providers-DysJ4XpD.js → ai-providers-BROkQV92.js} +1 -1
- package/dist/client/assets/{alert-CvZcb5df.js → alert-D30tDfCd.js} +1 -1
- package/dist/client/assets/{alert-dialog-uHbSnxit.js → alert-dialog-CLo68ArF.js} +1 -1
- package/dist/client/assets/{app-editor-gcuEY9pT.js → app-editor-BSkfyJUG.js} +1 -1
- package/dist/client/assets/{auth-Czzx0j0k.js → auth-Cz9MUOH5.js} +1 -1
- package/dist/client/assets/{auth-catchall-BjP7QUb6.js → auth-catchall-BIi2h9s3.js} +1 -1
- package/dist/client/assets/{auth-entry-thK0sQBN.js → auth-entry-CzqhITib.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CucSluN0.js → auth-split-layout-BRyLNUwV.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BVTKYLto.js → authenticate-and-persist-oauth-QRlskZE_.js} +1 -1
- package/dist/client/assets/{automation-list-row-LCWziqcp.js → automation-list-row-D0YQZG_t.js} +1 -1
- package/dist/client/assets/{automation-runs-BIEKHb6d.js → automation-runs-BB4tZxlE.js} +1 -1
- package/dist/client/assets/{automations-CP7ov8Lx.js → automations-BZcwZ-Od.js} +1 -1
- package/dist/client/assets/{avatar-BRD9KdBU.js → avatar-qGQm5tob.js} +1 -1
- package/dist/client/assets/{badge-DDwsRXNR.js → badge-66rG3iWT.js} +1 -1
- package/dist/client/assets/{block-document-CecHU1PK.js → block-document-Cm_jusyJ.js} +1 -1
- package/dist/client/assets/{brand-context-CJHfDs6l.js → brand-context-BqNKSG9k.js} +1 -1
- package/dist/client/assets/{buckets-Ahb6rM_Y.js → buckets-BGXJu3d4.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DsQFT-Hf.js → bulk-category-panel-XvJ7By1M.js} +1 -1
- package/dist/client/assets/{calendar-BrKnCkWQ.js → calendar-CzpAjlxQ.js} +1 -1
- package/dist/client/assets/{capability-load-error-Cp_g8FRh.js → capability-load-error-CGTFJhIa.js} +1 -1
- package/dist/client/assets/{card-BTSKivkX.js → card-Ci1lZJg4.js} +1 -1
- package/dist/client/assets/{category-editor-hsY7reYC.js → category-editor-DYVz_gOe.js} +1 -1
- package/dist/client/assets/{chat-context-6SXYx23Y.js → chat-context-8rUWDM2F.js} +1 -1
- package/dist/client/assets/{checkbox-CBK2tfcP.js → checkbox-BaGAZdHF.js} +1 -1
- package/dist/client/assets/{cli-auth-success-D3UHqcMt.js → cli-auth-success-D8-_HLB1.js} +1 -1
- package/dist/client/assets/{collection-detail-DrTl48DA.js → collection-detail-BDkIUc9G.js} +1 -1
- package/dist/client/assets/{collection-display-button-CPZFWju5.js → collection-display-button-D7yWJ9_C.js} +1 -1
- package/dist/client/assets/{collection-search-BMiVgOB1.js → collection-search-CadXW_fq.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-g19JCIIU.js → collection-table-wrapper-CFX4HclN.js} +1 -1
- package/dist/client/assets/{collection-tabs-DUqXcfp3.js → collection-tabs-CoBnKZKn.js} +1 -1
- package/dist/client/assets/{command-4dtI7K4X.js → command-DM53UzIu.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-B169h72H.js → commerce-onboarding-DgpUymib.js} +1 -1
- package/dist/client/assets/{companions-core-BjD1nv-H.js → companions-core-CKPOUArc.js} +1 -1
- package/dist/client/assets/{connect-O-_wEa7t.js → connect-DjyEX_0G.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-EmUPMW7h.js → connect-desktop-dialog-GV9ICvaM.js} +1 -1
- package/dist/client/assets/{connection-byi4sTeQ.js → connection-Cg-LX4zr.js} +1 -1
- package/dist/client/assets/{connection-card-B7IQPsIT.js → connection-card-DhrUKXbn.js} +1 -1
- package/dist/client/assets/{connection-detail-gBSOppOt.js → connection-detail-DcWby86r.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BuAcwq2m.js → connection-form-helpers-C5m7rYZy.js} +1 -1
- package/dist/client/assets/{connections-l-379sH1.js → connections-CUTRuKYm.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-ryBZ2XcK.js → decopilot-sse-pool-BSWVee71.js} +1 -1
- package/dist/client/assets/{dialog-BrzGrjwQ.js → dialog-BxTzgMQc.js} +1 -1
- package/dist/client/assets/{domain-settings-6iuPQvRk.js → domain-settings-CV5zJhRX.js} +1 -1
- package/dist/client/assets/{drawer-BzRyXmUT.js → drawer-CJiwuDdN.js} +1 -1
- package/dist/client/assets/{dropdown-menu-1UOTocN9.js → dropdown-menu-B4RxTCSq.js} +1 -1
- package/dist/client/assets/{empty-state-CF1KfjKx.js → empty-state-CTXAxK95.js} +1 -1
- package/dist/client/assets/{extract-connection-data-_-65OKSK.js → extract-connection-data-RnIuisTy.js} +1 -1
- package/dist/client/assets/{file-explorer-DkHfsjHS.js → file-explorer-uv_H1vB7.js} +1 -1
- package/dist/client/assets/{form-BX8qMoto.js → form-DQKD1v0g.js} +1 -1
- package/dist/client/assets/{general-BnU1vX54.js → general-BPr6qxJo.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BobG4pdj.js → github-repo-picker-Co6hb63c.js} +1 -1
- package/dist/client/assets/{hooks-BVS2tyiL.js → hooks-CHAv4NGW.js} +1 -1
- package/dist/client/assets/{index-BX05btf2.js → index-7ySSB_wV.js} +1 -1
- package/dist/client/assets/{index-DWYyxUr4.js → index-B1Pu947Q.js} +1 -1
- package/dist/client/assets/{index-CkQPHwRq.js → index-BNgXKQGi.js} +1 -1
- package/dist/client/assets/{index-B4SL8vna.js → index-BaBe80UU.js} +3 -3
- package/dist/client/assets/{index-BArJ9zM9.js → index-BewecO7v.js} +39 -39
- package/dist/client/assets/{index-NEHd_tvO.js → index-Bj16BBtO.js} +1 -1
- package/dist/client/assets/{index-aAdudEgA.js → index-BuLlGRwx.js} +1 -1
- package/dist/client/assets/{index-j7fxIdzH.js → index-CL1Jslvp.js} +1 -1
- package/dist/client/assets/{index-DEu8RRM_.js → index-CTrHbDcT.js} +1 -1
- package/dist/client/assets/{index-BhyteG24.js → index-DAf4hRwd.js} +1 -1
- package/dist/client/assets/{index-DH1sjrfb.js → index-DUUMVVf8.js} +6 -6
- package/dist/client/assets/{index-redirect-C9GYbflf.js → index-redirect-kSXc5CQI.js} +1 -1
- package/dist/client/assets/{input-Ds8gG1fd.js → input-CnmLY31M.js} +1 -1
- package/dist/client/assets/{integration-icon-8Ti4QWx2.js → integration-icon-D8ziNv4e.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DnWyyZ2q.js → invite-member-dialog-CAI8atEf.js} +1 -1
- package/dist/client/assets/{label-Cvqartba.js → label-CtIzDrcX.js} +1 -1
- package/dist/client/assets/{layout-BYsroZAA.js → layout-CxNIjagx.js} +1 -1
- package/dist/client/assets/{login-D0YaQT9R.js → login-BwlmyKrx.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BqRaTzNr.js → mcp-oauth-CCkq-PPq.js} +1 -1
- package/dist/client/assets/{members-Bg079RXh.js → members-PB_LDXIu.js} +1 -1
- package/dist/client/assets/{monaco-editor-BxLiuOeu.js → monaco-editor-RaZqssxu.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BmqauNPl.js → monitoring-stats-row-BwyTITKy.js} +1 -1
- package/dist/client/assets/{multi-select-p2D2J4qv.js → multi-select-Bc2ULJcP.js} +1 -1
- package/dist/client/assets/{oauth-callback-l30vedQM.js → oauth-callback-D12oe1rh.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D8-j-H6i.js → oauth-callback-ai-provider-DDu5oMlE.js} +1 -1
- package/dist/client/assets/{onboarding-PS2gB57L.js → onboarding-BsGu5CIv.js} +1 -1
- package/dist/client/assets/{org-install-BV6HqSmd.js → org-install-B_UnHFzM.js} +1 -1
- package/dist/client/assets/{org-layout--zgqB30e.js → org-layout-DFjKY9G0.js} +1 -1
- package/dist/client/assets/{organization-choice-Svkx4ABU.js → organization-choice-D8VKKjij.js} +1 -1
- package/dist/client/assets/{orgs-CVgI1V5J.js → orgs-DRyKnjXZ.js} +1 -1
- package/dist/client/assets/{page-seo-form-D72Ej1dW.js → page-seo-form-CE-uaaSZ.js} +1 -1
- package/dist/client/assets/{popover-Cl5Mc9gd.js → popover-E3JPeoM_.js} +1 -1
- package/dist/client/assets/{post-editor-DCGf0zG0.js → post-editor-DmtkpxyQ.js} +1 -1
- package/dist/client/assets/{primitives-il0pwDNO.js → primitives-HbonJ6H3.js} +1 -1
- package/dist/client/assets/{profile-Dx_h1RZ2.js → profile-BQdPECxi.js} +1 -1
- package/dist/client/assets/project-app-view-B1lZU9VM.js +1 -0
- package/dist/client/assets/record-editor-BAsNjdjV.js +1 -0
- package/dist/client/assets/{redirect-editor-CSl2En1s.js → redirect-editor-77s4t1K9.js} +1 -1
- package/dist/client/assets/registry-CEz_-21i.js +2 -0
- package/dist/client/assets/{registry-layout-CKtMXK7N.js → registry-layout-DYgygQJb.js} +1 -1
- package/dist/client/assets/{reports-BZIMcYC6.js → reports-CgGoEKZA.js} +1 -1
- package/dist/client/assets/{require-capability-BMA8i9zx.js → require-capability-0koYWXxZ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Cmvklk1H.js → required-auth-layout-mi5ZHwMW.js} +1 -1
- package/dist/client/assets/{reset-password-BXHuVIh6.js → reset-password-C8kyrQo7.js} +1 -1
- package/dist/client/assets/{roles-TsMY4Rff.js → roles-GJBfty57.js} +1 -1
- package/dist/client/assets/{search-input-5sC2b3i6.js → search-input-DQndNQ0y.js} +1 -1
- package/dist/client/assets/{secrets-Ci6occuz.js → secrets-BcGUKHvi.js} +1 -1
- package/dist/client/assets/{sections-editor-IjywG33X.js → sections-editor-tm2zRXuE.js} +1 -1
- package/dist/client/assets/{select-olxknRSu.js → select-BIIO90wp.js} +1 -1
- package/dist/client/assets/{select-model-BtItpQ7d.js → select-model-DpYmAjaB.js} +2 -2
- package/dist/client/assets/{self-tool-result-7ZjSBZgb.js → self-tool-result-C6NpfXvm.js} +1 -1
- package/dist/client/assets/{seo-editor-0isBtajP.js → seo-editor-B3mCpkuz.js} +1 -1
- package/dist/client/assets/{settings-layout-TAJFdLbr.js → settings-layout-DN2z8Sla.js} +1 -1
- package/dist/client/assets/{settings-section-hfb-XBqr.js → settings-section-Bq6IN2K4.js} +1 -1
- package/dist/client/assets/{shell-controls-BIxFtA6H.js → shell-controls-CRmVnIWH.js} +1 -1
- package/dist/client/assets/{shell-layout-qVfaRC7R.js → shell-layout-CODOAxB8.js} +1 -1
- package/dist/client/assets/{sidebar-CTPjB5Wi.js → sidebar-ldg-_gcB.js} +1 -1
- package/dist/client/assets/{skeleton-Bd8P_P_y.js → skeleton-DSYUICHh.js} +1 -1
- package/dist/client/assets/{sso-jaCnGSte.js → sso-ixn9OUuX.js} +1 -1
- package/dist/client/assets/{store-BkDs22GB.js → store-CqlPg4Jm.js} +1 -1
- package/dist/client/assets/store-registry-BNQsgs3Z.js +2 -0
- package/dist/client/assets/{studio-tools-9kid8z0N.js → studio-tools-C5EOIT8V.js} +1 -1
- package/dist/client/assets/{switch-Y5xPOTg7.js → switch-DP_H4qok.js} +1 -1
- package/dist/client/assets/{tab-id-DBqKadVL.js → tab-id-C6_7L5LO.js} +1 -1
- package/dist/client/assets/{table-DoghpL6K.js → table-IQ1eq-kq.js} +1 -1
- package/dist/client/assets/{tabs-C35o5sKq.js → tabs-DCBH6SAb.js} +1 -1
- package/dist/client/assets/{textarea-DQv6de7L.js → textarea-mjweOaPi.js} +1 -1
- package/dist/client/assets/{toggle-group-CU6SdkqY.js → toggle-group-CbDPcMqH.js} +1 -1
- package/dist/client/assets/{toolbar-B61OGwWM.js → toolbar-Cw1AJgYM.js} +1 -1
- package/dist/client/assets/{tooltip-BcvemS6N.js → tooltip-W2R86GKd.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BVw2CHin.js → use-ai-providers-lrxkqJ6z.js} +1 -1
- package/dist/client/assets/{use-api-keys-lN_blV1M.js → use-api-keys-BR3TF35O.js} +1 -1
- package/dist/client/assets/{use-automations-DU90KoX7.js → use-automations-DxXx_lHD.js} +1 -1
- package/dist/client/assets/{use-autosave-ChqIro0p.js → use-autosave-DSRh0RXM.js} +1 -1
- package/dist/client/assets/{use-capability-Ck-Xwe4D.js → use-capability-Kmrr2_DL.js} +1 -1
- package/dist/client/assets/{use-clock-tick-D_NPoqnV.js → use-clock-tick-BKCswZqG.js} +1 -1
- package/dist/client/assets/{use-connection-PubjDNyw.js → use-connection-CLpbKsOa.js} +1 -1
- package/dist/client/assets/{use-copy-yeEn1d7I.js → use-copy-Ctcxuxud.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-GVgzjyVg.js → use-create-virtual-mcp-Bo9StMVq.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-HxnxsdJJ.js → use-debounced-autosave-RLi4BVRQ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Dr_-z1cL.js → use-debounced-value-CF1gvVc7.js} +1 -1
- package/dist/client/assets/{use-deco-credits-B0cJCElK.js → use-deco-credits-BncCMCeP.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DYiQ_xOP.js → use-decopilot-events-Cmb-e7V8.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BKBG41XQ.js → use-delete-connection-DXoT9PVi.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D-6qobkw.js → use-deployment-admin-CwpZWZN0.js} +1 -1
- package/dist/client/assets/{use-file-configs-Cn51f1d2.js → use-file-configs-CZm1ErSy.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-l8bvKhVB.js → use-infinite-scroll-Duo-6Jh0.js} +1 -1
- package/dist/client/assets/{use-join-requests-CY2eYfZF.js → use-join-requests-BiNZX6-t.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-akmi11me.js → use-mcp-auth-status-EUDH_JPu.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DGM7YU-F.js → use-mcp-client-Bn_fKie9.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DRHPvVvo.js → use-mcp-tools-DeNxG47-.js} +1 -1
- package/dist/client/assets/{use-members-DQAFdnQe.js → use-members-CD6ZyOrK.js} +1 -1
- package/dist/client/assets/{use-mobile-DpM0EKIv.js → use-mobile-By0ugXDS.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-hZe3bwKG.js → use-navigate-to-agent-DKnGfo5A.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DQdwaOVQ.js → use-org-auth-client-BTsOFju1.js} +1 -1
- package/dist/client/assets/{use-org-sso-udDavLyS.js → use-org-sso-BLgobVS7.js} +1 -1
- package/dist/client/assets/{use-organization-roles-T6wafrzs.js → use-organization-roles-Be81sAA5.js} +1 -1
- package/dist/client/assets/{use-organization-settings-e7cKE1EV.js → use-organization-settings-DxCjQA-p.js} +1 -1
- package/dist/client/assets/{use-registry-app-CWkIAq8u.js → use-registry-app-CiFGb0BH.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CWu2QJNH.js → use-registry-connections-BtAhGlNY.js} +1 -1
- package/dist/client/assets/{use-secrets-CtItzADM.js → use-secrets-CGGmczJZ.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DwuhuX2o.js → use-status-sounds-C6gn0U8N.js} +1 -1
- package/dist/client/assets/{use-view-mode-C9E6Ia8X.js → use-view-mode-2IyCcfB4.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DYFy1B5_.js → use-virtual-mcp-DRku4bc3.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C3930CkE.js +1 -0
- package/dist/client/assets/{useQueries-Yq2sCMyy.js → useQueries-B2OSOrpG.js} +1 -1
- package/dist/client/assets/{useRouterState-1NjQlc4i.js → useRouterState-DYLxn-4w.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CayL-QrT.js +1 -0
- package/dist/client/assets/{users-BvhyZKaa.js → users-BG8U0FQd.js} +1 -1
- package/dist/client/assets/{variant-calendar-CNISXfPR.js → variant-calendar-DLh6-t_H.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Dt9bWWxZ.js → view-mode-toggle-B14_Ky0k.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +503 -500
- package/dist/server/server.js +381 -381
- package/package.json +1 -1
- package/dist/client/assets/project-app-view-CgywXL9B.js +0 -1
- package/dist/client/assets/record-editor-B4PjiId1.js +0 -1
- package/dist/client/assets/registry-7XTCklCD.js +0 -2
- package/dist/client/assets/store-registry-BNNG_XJq.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BSb7U3ZZ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-2-LAq09Z.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as Ge,b as ct,r as V,m as Oe,j as n,ag as Wn,B as Qe,k as Un,o as ka,t as X,K as Ra}from"./index-DH1sjrfb.js";import{am as wa,an as Va,ao as Na,a1 as qn,a2 as Jt,ap as Yn,aq as Jn,a3 as Qn,a4 as Xn,ar as Zn,as as Da,ab as es,ac as ts,at as Ta,au as Pa,N as Ca,a5 as ns,a6 as At,a9 as ss,aa as as,a7 as os,ah as rs,av as Aa,aw as Mt,ax as Ma,S as is,ay as lt,az as Ka,aA as La,aB as Fa,aC as Ba,D as Oa,F as Ia,aD as $a,aE as za,aF as Ha,aG as Ga,af as Gt,aH as Wt,aI as Wa,aJ as St,aK as Tt,aL as Ua,aM as qa,aN as tt,aO as Cn,aP as Ya,aQ as Pt,aR as Ut,aS as Ja,aT as dn,aU as Qa,aV as wt,aW as Xa,aX as Za,aY as eo,aZ as to,a_ as no,a$ as xt,b0 as so,b1 as ao,b2 as oo,H as ro,b3 as An,b4 as Ct,b5 as io,b6 as lo,b7 as co,b8 as uo,b9 as mn,ba as Mn,bb as Kn,bc as Vt,bd as qt,be as Ln,bf as mo,bg as fn,bh as fo,bi as po,bj as go,bk as Fn,bl as ho,bm as vo}from"./index-BArJ9zM9.js";import{t as bo}from"./ChevronDown-sGinN19i.js";import{a7 as gn,C as So,$ as ls,M as xo,B as cs,a8 as yo,a9 as _o}from"./agent-icon-BgwoOVTy.js";import{i as us}from"./ChevronRight-DQRrACFJ.js";import{n as jo}from"./ChevronUp-BbsgPeIZ.js";import{i as Eo}from"./Tool02-w_YdMf1T.js";import{n as Yt}from"./automation-runs-BIEKHb6d.js";import{c as yt,T as _t,a as jt}from"./tooltip-BcvemS6N.js";import{b as ko,h as Ro,a as wo,c as Vo,d as No,e as Do}from"./dialog-BrzGrjwQ.js";import{I as To}from"./input-Ds8gG1fd.js";import{a as ds}from"./Copy01-CBKme8NM.js";import{i as Po}from"./Settings02-BLjXGanZ.js";import{s as Co}from"./Eye-CgfFpeGb.js";import{s as ms}from"./TrendUp01-ClZSGNPD.js";import{s as hn}from"./Plus-TZoZPDtM.js";import{s as fs}from"./Trash01-BCRpsJy6.js";import{i as Ao}from"./Zap-B8RnuHjT.js";import{a as ht,D as ps,b as gs,c as hs,i as Mo}from"./dropdown-menu-1UOTocN9.js";import{S as Ko,r as Bn,u as Lo,d as Fo,a as Bo,i as Oo,f as Io,P as $o,b as zo}from"./page-seo-form-D72Ej1dW.js";import{c as Ho}from"./Tool01-DvOYqvtL.js";import{A as Go}from"./add-section-modal-BwZRsP3o.js";import"./ArrowUp-CuPsp_g8.js";import"./chat-context-6SXYx23Y.js";import"./tab-id-DBqKadVL.js";import"./hooks-BVS2tyiL.js";import"./use-mcp-client-DGM7YU-F.js";import"./auth-Czzx0j0k.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-ryBZ2XcK.js";import"./studio-tools-9kid8z0N.js";import"./use-virtual-mcp-DYFy1B5_.js";import"./use-ai-providers-BVw2CHin.js";import"./use-decopilot-events-DYiQ_xOP.js";import"./use-organization-settings-e7cKE1EV.js";import"./drawer-BzRyXmUT.js";import"./collection-search-BMiVgOB1.js";import"./SearchMd-DTzUg0rC.js";import"./use-mobile-DpM0EKIv.js";import"./AreaChart-DTmhkVdV.js";import"./index-j7fxIdzH.js";import"./calendar-BrKnCkWQ.js";import"./X-D7TfGl49.js";import"./shell-layout-qVfaRC7R.js";import"./avatar-BRD9KdBU.js";import"./User01-DwgmSXVE.js";import"./Users03-Y5y_Bnnu.js";import"./SearchLg-D0JVAnZf.js";import"./Stars02-CFDUnzqj.js";import"./XClose-DSzxEgiI.js";import"./CheckCircle-DJgrIUO3.js";import"./FilterLines-BKryYm8Z.js";import"./required-auth-layout-Cmvklk1H.js";import"./use-org-sso-udDavLyS.js";import"./index-B4SL8vna.js";import"./get-initials-D-f_fDFw.js";import"./SwitchHorizontal01-CjtBAa85.js";import"./popover-Cl5Mc9gd.js";import"./use-registry-app-CWkIAq8u.js";import"./use-mcp-tools-DRHPvVvo.js";import"./use-connection-PubjDNyw.js";import"./github-repo-scope-CKSTLD3W.js";import"./authenticate-and-persist-oauth-BVTKYLto.js";import"./mcp-oauth-BqRaTzNr.js";import"./extract-connection-data-_-65OKSK.js";import"./metadata-dUsYcpuu.js";import"./use-members-DQAFdnQe.js";import"./use-org-auth-client-DQdwaOVQ.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./AlertCircle-BqXz_QW3.js";import"./DotsVertical-BEG934Sy.js";import"./use-copy-yeEn1d7I.js";import"./Check-D3dAxrw3.js";import"./LinkExternal01-DdG8DMp5.js";import"./command-4dtI7K4X.js";import"./index-BX05btf2.js";import"./XCircle-BBzjwcRg.js";import"./companions-core-BjD1nv-H.js";import"./ZapSquare-BaUS6VhV.js";import"./Star01-BI7bTLeh.js";import"./Upload01-DUPVY2Gx.js";import"./form-BX8qMoto.js";import"./label-Cvqartba.js";import"./select-olxknRSu.js";import"./tabs-C35o5sKq.js";import"./toggle-group-CU6SdkqY.js";import"./use-deco-credits-B0cJCElK.js";import"./sidebar-CTPjB5Wi.js";import"./LayoutLeft-D3LTKctD.js";import"./alert-dialog-uHbSnxit.js";import"./toolbar-B61OGwWM.js";import"./skeleton-Bd8P_P_y.js";import"./github-repo-picker-BobG4pdj.js";import"./use-debounced-value-Dr_-z1cL.js";import"./use-navigate-to-agent-hZe3bwKG.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-Dp638N7g.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-B7IQPsIT.js";import"./use-registry-connections-CWu2QJNH.js";import"./useInfiniteQuery-BSb7U3ZZ.js";import"./use-infinite-scroll-l8bvKhVB.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-BTSKivkX.js";import"./integration-icon-8Ti4QWx2.js";import"./textarea-DQv6de7L.js";import"./connection-form-helpers-BuAcwq2m.js";import"./collection-tabs-DUqXcfp3.js";import"./badge-DDwsRXNR.js";import"./useSuspenseInfiniteQuery-2-LAq09Z.js";import"./Monitor01-B9Ngi6RN.js";import"./connect-desktop-dialog-EmUPMW7h.js";import"./select-model-BtItpQ7d.js";import"./checkbox-CBK2tfcP.js";import"./Key01-D3otsQjQ.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-hfb-XBqr.js";import"./ArrowUpRight-5u0BVlcn.js";import"./Stars01-Bk7jyFCH.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DwuhuX2o.js";import"./empty-state-CF1KfjKx.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-Ck-Xwe4D.js";import"./monaco-editor-BxLiuOeu.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-akmi11me.js";import"./Play-DtXxBW66.js";import"./use-debounced-autosave-HxnxsdJJ.js";import"./index-BhyteG24.js";import"./search-input-5sC2b3i6.js";import"./switch-Y5xPOTg7.js";import"./Users01-xF6GoF_3.js";import"./use-secrets-CtItzADM.js";import"./useQueries-Yq2sCMyy.js";import"./use-file-configs-Cn51f1d2.js";import"./use-automations-DU90KoX7.js";import"./automation-list-row-LCWziqcp.js";import"./Palette-BXIMBzzn.js";import"./HardDrive-Ce_49EOW.js";import"./LogOut01-DYtDxfbG.js";import"./Sun-CsC6IQlI.js";import"./Shield01-iDkSI_Ov.js";import"./table-DoghpL6K.js";import"./use-clock-tick-D_NPoqnV.js";function Wo(g){return g.schema?.definitions??g.schema?.$defs??{}}function Uo(g,e){const o=Wo(e),d=o[btoa(g)];if(!d)return;let f=typeof d.image=="string"?d.image:void 0;if(!f&&Array.isArray(d.allOf)){const S=d.allOf.find(x=>typeof x.$ref=="string")?.$ref;if(typeof S=="string"){const x=S.replace("#/definitions/",""),m=o[x];f=typeof m?.image=="string"?m.image:void 0}}if(f?.includes("{{{"))return f}function qo(g,e){if(!e)return;const o=wa(g);if(!o)return;const d=Uo(o.resolveType,e);if(!d)return;const f=Va(d,o.data);if(f)return Na(f)}const Yo="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Jo="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 On(g){return Array.from({length:g},(e,o)=>({id:crypto.randomUUID(),index:o}))}function vs(g){return g.map((e,o)=>({...e,index:o}))}function Qo(g,e){if(e===g.length)return g;if(e<g.length)return vs(g.slice(0,e));const o=Array.from({length:e-g.length},(d,f)=>({id:crypto.randomUUID(),index:g.length+f}));return[...g,...o]}function bs(g){const e=Ge.c(20),{section:o,raw:d,meta:f}=g,S=o.isSavedBlock===!0,x=o.isMultivariate===!0;let m;e[0]!==f||e[1]!==d?(m=d&&f?qo(d,f):void 0,e[0]=f,e[1]=d,e[2]=m):m=e[2];const h=m;let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(So,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=u):u=e[3];let y;e[4]!==h?(y=h&&n.jsx("img",{src:h,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=h,e[5]=y):y=e[5];let k;e[6]!==x||e[7]!==S?(k=S?{color:Ca}:x?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=x,e[7]=S,e[8]=k):k=e[8];let N;e[9]!==k?(N=n.jsx(gn,{className:"h-4 w-4 shrink-0",style:k}),e[9]=k,e[10]=N):N=e[10];const E=o.isHidden&&"line-through opacity-50";let i;e[11]!==E?(i=Oe("min-w-0 flex-1 truncate text-sm font-medium",E),e[11]=E,e[12]=i):i=e[12];let p;e[13]!==o.label||e[14]!==i?(p=n.jsx("span",{className:i,children:o.label}),e[13]=o.label,e[14]=i,e[15]=p):p=e[15];let r;return e[16]!==y||e[17]!==N||e[18]!==p?(r=n.jsxs(n.Fragment,{children:[u,y,N,p]}),e[16]=y,e[17]=N,e[18]=p,e[19]=r):r=e[19],r}function Ss(g,e){const o=g.isSavedBlock===!0,d=g.isMultivariate===!0;return Oe("group flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":o?Yo:d?"text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]":"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Xo(g){const e=Ge.c(81),{section:o,raw:d,meta:f,sortableId:S,selected:x,onSelect:m,onDelete:h,onDuplicate:u,onMakeReusable:y,onToggleHidden:k,onToggleLazy:N,onAddVariant:E,onDetach:i}=g,p=ct(),r=d?Zn(d.__resolveType??""):!1;let P;e[0]!==o?(P=Da(o),e[0]=o,e[1]=P):P=e[1];const l=P;let R;e[2]!==S?(R={id:S,animateLayoutChanges:sr},e[2]=S,e[3]=R):R=e[3];const{attributes:A,listeners:$,setNodeRef:v,transform:C,isDragging:re}=es(R);let L;e[4]!==C?(L=ts.Transform.toString(C?{...C,x:0}:null),e[4]=C,e[5]=L):L=e[5];const le=re?0:void 0;let K;e[6]!==L||e[7]!==le?(K={transform:L,opacity:le},e[6]=L,e[7]=le,e[8]=K):K=e[8];const ge=K;let F;e[9]!==o?(F=Ta(o),e[9]=o,e[10]=F):F=e[10];const ne=F,he="button",me=0;let B;e[11]!==m?(B=I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),m())},e[11]=m,e[12]=B):B=e[12];const J=re?"cursor-grabbing":"cursor-pointer";let Z;e[13]!==o||e[14]!==x||e[15]!==J?(Z=Oe("touch-none transition-colors",J,Ss(o,x)),e[13]=o,e[14]=x,e[15]=J,e[16]=Z):Z=e[16];let ee;e[17]!==f||e[18]!==d||e[19]!==o?(ee=n.jsx(bs,{section:o,raw:d,meta:f}),e[17]=f,e[18]=d,e[19]=o,e[20]=ee):ee=e[20];const O=!o.isMultivariate&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":p(r?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:Oe("h-7 w-7 shrink-0",r?"":"opacity-0 group-hover:opacity-100"),onClick:I=>{I.stopPropagation(),N()},onPointerDown:nr,children:n.jsx(Ao,{className:Oe("h-3.5 w-3.5",r&&"text-yellow-500")})})}),n.jsx(jt,{side:"bottom",children:p(r?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]});let Ae;e[21]!==k||e[22]!==o.isHidden||e[23]!==o.isMultivariate||e[24]!==p?(Ae=!o.isMultivariate&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":o.isHidden?p("sectionsEditor.sectionList.showSection"):p("sectionsEditor.sectionList.hideSection"),className:Oe("h-7 w-7 shrink-0",o.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:I=>{I.stopPropagation(),k()},onPointerDown:tr,children:o.isHidden?n.jsx(Po,{className:"h-3.5 w-3.5"}):n.jsx(Co,{className:"h-3.5 w-3.5"})})}),n.jsx(jt,{side:"bottom",children:o.isHidden?p("sectionsEditor.sectionList.showSection"):p("sectionsEditor.sectionList.hideSection")})]}),e[21]=k,e[22]=o.isHidden,e[23]=o.isMultivariate,e[24]=p,e[25]=Ae):Ae=e[25];let Le;e[26]!==p?(Le=p("sectionsEditor.sectionList.sectionActionsMenu"),e[26]=p,e[27]=Le):Le=e[27];let et;e[28]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(ls,{className:"h-3.5 w-3.5"}),e[28]=et):et=e[28];let Se;e[29]!==Le?(Se=n.jsx(ps,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":Le,className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:er,onPointerDown:Zo,children:et})}),e[29]=Le,e[30]=Se):Se=e[30];let H;e[31]!==u?(H=I=>{I.stopPropagation(),u()},e[31]=u,e[32]=H):H=e[32];let se;e[33]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(ds,{className:"h-4 w-4"}),e[33]=se):se=e[33];let ae;e[34]!==p?(ae=p("sectionsEditor.sectionList.duplicateMenuItem"),e[34]=p,e[35]=ae):ae=e[35];let ce;e[36]!==H||e[37]!==ae?(ce=n.jsxs(ht,{onClick:H,children:[se,ae]}),e[36]=H,e[37]=ae,e[38]=ce):ce=e[38];let oe;e[39]!==l||e[40]!==E||e[41]!==p?(oe=l&&n.jsxs(ht,{className:Pa,onClick:I=>{I.stopPropagation(),E()},children:[n.jsx(ms,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.addVariantMenuItem")]}),e[39]=l,e[40]=E,e[41]=p,e[42]=oe):oe=e[42];let ue;e[43]!==ne||e[44]!==y||e[45]!==p?(ue=ne&&n.jsxs(ht,{className:Jo,onClick:I=>{I.stopPropagation(),y()},children:[n.jsx(gn,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[43]=ne,e[44]=y,e[45]=p,e[46]=ue):ue=e[46];let ie;e[47]!==i||e[48]!==o.isMultivariate||e[49]!==o.isSavedBlock||e[50]!==p?(ie=o.isSavedBlock===!0&&!o.isMultivariate&&n.jsxs(ht,{onClick:I=>{I.stopPropagation(),i()},children:[n.jsx(gn,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.detachMenuItem")]}),e[47]=i,e[48]=o.isMultivariate,e[49]=o.isSavedBlock,e[50]=p,e[51]=ie):ie=e[51];let fe;e[52]!==h?(fe=I=>{I.stopPropagation(),h()},e[52]=h,e[53]=fe):fe=e[53];let De;e[54]===Symbol.for("react.memo_cache_sentinel")?(De=n.jsx(fs,{className:"h-4 w-4"}),e[54]=De):De=e[54];let Ee;e[55]!==p?(Ee=p("sectionsEditor.sectionList.deleteMenuItem"),e[55]=p,e[56]=Ee):Ee=e[56];let de;e[57]!==fe||e[58]!==Ee?(de=n.jsxs(ht,{className:"text-destructive focus:text-destructive",onClick:fe,children:[De,Ee]}),e[57]=fe,e[58]=Ee,e[59]=de):de=e[59];let pe;e[60]!==ce||e[61]!==oe||e[62]!==ue||e[63]!==ie||e[64]!==de?(pe=n.jsxs(gs,{align:"end",className:"w-44",children:[ce,oe,ue,ie,de]}),e[60]=ce,e[61]=oe,e[62]=ue,e[63]=ie,e[64]=de,e[65]=pe):pe=e[65];let xe;e[66]!==Se||e[67]!==pe?(xe=n.jsxs(hs,{children:[Se,pe]}),e[66]=Se,e[67]=pe,e[68]=xe):xe=e[68];let U;return e[69]!==A||e[70]!==$||e[71]!==m||e[72]!==v||e[73]!==ge||e[74]!==Z||e[75]!==ee||e[76]!==O||e[77]!==Ae||e[78]!==xe||e[79]!==B?(U=n.jsxs("div",{ref:v,style:ge,...A,...$,role:he,tabIndex:me,onClick:m,onKeyDown:B,className:Z,children:[ee,O,Ae,xe]}),e[69]=A,e[70]=$,e[71]=m,e[72]=v,e[73]=ge,e[74]=Z,e[75]=ee,e[76]=O,e[77]=Ae,e[78]=xe,e[79]=B,e[80]=U):U=e[80],U}function Zo(g){return g.stopPropagation()}function er(g){return g.stopPropagation()}function tr(g){return g.stopPropagation()}function nr(g){return g.stopPropagation()}function sr(){return!1}function ar(g){const e=Ge.c(104),{listKey:o,rawSections:d,sections:f,meta:S,selectedIndex:x,onSelect:m,onReorder:h,onDelete:u,onDuplicate:y,onMakeReusable:k,onToggleHidden:N,onToggleLazy:E,onAddVariant:i,onDetach:p,onAddSection:r,canAddSection:P}=g,l=P===void 0?!0:P,R=ct();let A;e[0]!==f.length?(A=()=>On(f.length),e[0]=f.length,e[1]=A):A=e[1];const[$,v]=V.useState(A),[C,re]=V.useState(null),[L,le]=V.useState(o),[K,ge]=V.useState(f.length),F=V.useRef(!1);L!==o?(le(o),ge(f.length),v(On(f.length))):K!==f.length&&(ge(f.length),v(Pe=>Qo(Pe,f.length)));let ne;e[2]===Symbol.for("react.memo_cache_sentinel")?(ne={activationConstraint:{distance:8}},e[2]=ne):ne=e[2];let he;e[3]===Symbol.for("react.memo_cache_sentinel")?(he={coordinateGetter:ns},e[3]=he):he=e[3];const me=qn(Jt(Xn,ne),Jt(Qn,he));let B;e[4]!==$?(B=$.map(or),e[4]=$,e[5]=B):B=e[5];const J=B;let Z;e[6]===Symbol.for("react.memo_cache_sentinel")?(Z=Pe=>{re(String(Pe.active.id))},e[6]=Z):Z=e[6];const ee=Z;let O;e[7]!==J||e[8]!==h?(O=Pe=>{re(null);const{active:D,over:z}=Pe;if(!z||D.id===z.id)return;const ye=J.indexOf(String(D.id)),_e=J.indexOf(String(z.id));ye===-1||_e===-1||(v(Ue=>vs(At([...Ue],ye,_e))),F.current=!0,requestAnimationFrame(()=>{F.current=!1}),h?.(ye,_e))},e[7]=J,e[8]=h,e[9]=O):O=e[9];const Ae=O;let Le;e[10]===Symbol.for("react.memo_cache_sentinel")?(Le=()=>{re(null)},e[10]=Le):Le=e[10];const et=Le;let Se,H,se,ae,ce,oe,ue,ie,fe,De,Ee,de,pe,xe,U;if(e[11]!==C||e[12]!==l||e[13]!==$||e[14]!==J||e[15]!==Ae||e[16]!==S||e[17]!==r||e[18]!==i||e[19]!==u||e[20]!==p||e[21]!==y||e[22]!==k||e[23]!==m||e[24]!==N||e[25]!==E||e[26]!==d||e[27]!==f||e[28]!==x||e[29]!==me||e[30]!==R){xe=Symbol.for("react.early_return_sentinel");e:{const Pe=D=>{F.current||m(D)};if(e[46]!==C||e[47]!==l||e[48]!==$||e[49]!==r||e[50]!==d||e[51]!==f||e[52]!==R){const D=C?$.find(z=>z.id===C):null;if(ae=D!=null?f[D.index]:null,se=D!=null?d[D.index]:void 0,$.length===0){let z;e[56]!==R?(z=R("sectionsEditor.sectionList.noSections"),e[56]=R,e[57]=z):z=e[57];let ye;e[58]!==z?(ye=n.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:z}),e[58]=z,e[59]=ye):ye=e[59];const _e=!l;let Ue;e[60]===Symbol.for("react.memo_cache_sentinel")?(Ue=n.jsx(hn,{size:14}),e[60]=Ue):Ue=e[60];let Ne;e[61]!==R?(Ne=R("sectionsEditor.sectionList.addSectionButton"),e[61]=R,e[62]=Ne):Ne=e[62];let nt;e[63]!==r||e[64]!==_e||e[65]!==Ne?(nt=n.jsxs(Qe,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:_e,onClick:r,children:[Ue,Ne]}),e[63]=r,e[64]=_e,e[65]=Ne,e[66]=nt):nt=e[66];let vt;e[67]!==ye||e[68]!==nt?(vt=n.jsxs("div",{className:"space-y-2",children:[ye,nt]}),e[67]=ye,e[68]=nt,e[69]=vt):vt=e[69],xe=vt;break e}pe=Oe(D&&"cursor-grabbing"),e[46]=C,e[47]=l,e[48]=$,e[49]=r,e[50]=d,e[51]=f,e[52]=R,e[53]=se,e[54]=ae,e[55]=pe}else se=e[53],ae=e[54],pe=e[55];H=ss,ie=me,fe=as,De=ee,Ee=Ae,de=et,Se=os,oe=J,ue=rs,U="space-y-1",ce=$.map(D=>{const z=f[D.index];return z?n.jsx(Xo,{sortableId:D.id,section:z,raw:d[D.index],meta:S,selected:x===D.index,onSelect:()=>Pe(D.index),onDelete:()=>u(D.index),onDuplicate:()=>y(D.index),onMakeReusable:()=>k(D.index),onToggleHidden:()=>N(D.index),onToggleLazy:()=>E(D.index),onAddVariant:()=>i(D.index),onDetach:()=>p(D.index)},D.id):null})}e[11]=C,e[12]=l,e[13]=$,e[14]=J,e[15]=Ae,e[16]=S,e[17]=r,e[18]=i,e[19]=u,e[20]=p,e[21]=y,e[22]=k,e[23]=m,e[24]=N,e[25]=E,e[26]=d,e[27]=f,e[28]=x,e[29]=me,e[30]=R,e[31]=Se,e[32]=H,e[33]=se,e[34]=ae,e[35]=ce,e[36]=oe,e[37]=ue,e[38]=ie,e[39]=fe,e[40]=De,e[41]=Ee,e[42]=de,e[43]=pe,e[44]=xe,e[45]=U}else Se=e[31],H=e[32],se=e[33],ae=e[34],ce=e[35],oe=e[36],ue=e[37],ie=e[38],fe=e[39],De=e[40],Ee=e[41],de=e[42],pe=e[43],xe=e[44],U=e[45];if(xe!==Symbol.for("react.early_return_sentinel"))return xe;let I;e[70]!==ce||e[71]!==U?(I=n.jsx("div",{className:U,children:ce}),e[70]=ce,e[71]=U,e[72]=I):I=e[72];let Ie;e[73]!==Se||e[74]!==oe||e[75]!==ue||e[76]!==I?(Ie=n.jsx(Se,{items:oe,strategy:ue,children:I}),e[73]=Se,e[74]=oe,e[75]=ue,e[76]=I,e[77]=Ie):Ie=e[77];let $e;e[78]!==se||e[79]!==ae||e[80]!==S?($e=ae?n.jsx("div",{className:Oe("cursor-grabbing shadow-lg ring-1 ring-border/60",Ss(ae,!1)),children:n.jsx(bs,{section:ae,raw:se,meta:S})}):null,e[78]=se,e[79]=ae,e[80]=S,e[81]=$e):$e=e[81];let We;e[82]!==$e?(We=Wn.createPortal(n.jsx(Yn,{dropAnimation:Jn,children:$e}),document.body),e[82]=$e,e[83]=We):We=e[83];let Me;e[84]!==H||e[85]!==ie||e[86]!==fe||e[87]!==De||e[88]!==Ee||e[89]!==de||e[90]!==Ie||e[91]!==We?(Me=n.jsxs(H,{sensors:ie,collisionDetection:fe,onDragStart:De,onDragEnd:Ee,onDragCancel:de,children:[Ie,We]}),e[84]=H,e[85]=ie,e[86]=fe,e[87]=De,e[88]=Ee,e[89]=de,e[90]=Ie,e[91]=We,e[92]=Me):Me=e[92];const Te=!l;let ve;e[93]===Symbol.for("react.memo_cache_sentinel")?(ve=n.jsx(hn,{size:14}),e[93]=ve):ve=e[93];let Ve;e[94]!==R?(Ve=R("sectionsEditor.sectionList.addSectionButton"),e[94]=R,e[95]=Ve):Ve=e[95];let ke;e[96]!==r||e[97]!==Te||e[98]!==Ve?(ke=n.jsxs(Qe,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:Te,onClick:r,children:[ve,Ve]}),e[96]=r,e[97]=Te,e[98]=Ve,e[99]=ke):ke=e[99];let He;return e[100]!==pe||e[101]!==Me||e[102]!==ke?(He=n.jsxs("div",{className:pe,children:[Me,ke]}),e[100]=pe,e[101]=Me,e[102]=ke,e[103]=He):He=e[103],He}function or(g){return g.id}function In(g){const e=Ge.c(57),{open:o,initialName:d,autoLabel:f,isPending:S,onSubmit:x,onOpenChange:m}=g,h=S===void 0?!1:S,u=ct(),[y,k]=V.useState(d),[N,E]=V.useState(o);o!==N&&(E(o),o&&k(d));let i;e[0]!==h||e[1]!==m?(i=ee=>{!ee&&!h&&m(!1)},e[0]=h,e[1]=m,e[2]=i):i=e[2];const p=i;let r;e[3]!==h||e[4]!==y||e[5]!==x?(r=async ee=>{ee.preventDefault(),!h&&await x(y.trim())},e[3]=h,e[4]=y,e[5]=x,e[6]=r):r=e[6];const P=r;let l;e[7]!==u?(l=u("sectionsEditor.variantRenameDialog.title"),e[7]=u,e[8]=l):l=e[8];let R;e[9]!==l?(R=n.jsx(ko,{children:l}),e[9]=l,e[10]=R):R=e[10];let A;e[11]!==f||e[12]!==u?(A=u("sectionsEditor.variantRenameDialog.description",{fallback:f||u("sectionsEditor.variantRenameDialog.defaultFallback")}),e[11]=f,e[12]=u,e[13]=A):A=e[13];let $;e[14]!==A?($=n.jsx(Ro,{children:A}),e[14]=A,e[15]=$):$=e[15];let v;e[16]!==R||e[17]!==$?(v=n.jsxs(wo,{children:[R,$]}),e[16]=R,e[17]=$,e[18]=v):v=e[18];let C;e[19]!==u?(C=u("sectionsEditor.variantRenameDialog.nameLabel"),e[19]=u,e[20]=C):C=e[20];let re;e[21]!==C?(re=n.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:C}),e[21]=C,e[22]=re):re=e[22];let L;e[23]===Symbol.for("react.memo_cache_sentinel")?(L=ee=>k(ee.target.value),e[23]=L):L=e[23];let le;e[24]!==f||e[25]!==h||e[26]!==y?(le=n.jsx(To,{id:"variant-rename-name",value:y,onChange:L,placeholder:f,autoFocus:!0,disabled:h}),e[24]=f,e[25]=h,e[26]=y,e[27]=le):le=e[27];let K;e[28]!==re||e[29]!==le?(K=n.jsxs("div",{className:"space-y-1.5 py-4",children:[re,le]}),e[28]=re,e[29]=le,e[30]=K):K=e[30];let ge;e[31]!==m?(ge=()=>m(!1),e[31]=m,e[32]=ge):ge=e[32];let F;e[33]!==u?(F=u("sectionsEditor.variantRenameDialog.cancel"),e[33]=u,e[34]=F):F=e[34];let ne;e[35]!==h||e[36]!==ge||e[37]!==F?(ne=n.jsx(Qe,{type:"button",variant:"outline",onClick:ge,disabled:h,children:F}),e[35]=h,e[36]=ge,e[37]=F,e[38]=ne):ne=e[38];let he;e[39]!==h||e[40]!==u?(he=h?n.jsxs(n.Fragment,{children:[n.jsx(Un,{size:14,className:"animate-spin"}),u("sectionsEditor.variantRenameDialog.saving")]}):u("sectionsEditor.variantRenameDialog.save"),e[39]=h,e[40]=u,e[41]=he):he=e[41];let me;e[42]!==h||e[43]!==he?(me=n.jsx(Qe,{type:"submit",disabled:h,children:he}),e[42]=h,e[43]=he,e[44]=me):me=e[44];let B;e[45]!==ne||e[46]!==me?(B=n.jsxs(Vo,{children:[ne,me]}),e[45]=ne,e[46]=me,e[47]=B):B=e[47];let J;e[48]!==P||e[49]!==K||e[50]!==B||e[51]!==v?(J=n.jsx(No,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:P,children:[v,K,B]})}),e[48]=P,e[49]=K,e[50]=B,e[51]=v,e[52]=J):J=e[52];let Z;return e[53]!==p||e[54]!==o||e[55]!==J?(Z=n.jsx(Do,{open:o,onOpenChange:p,children:J}),e[53]=p,e[54]=o,e[55]=J,e[56]=Z):Z=e[56],Z}const rr="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)]",xs="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.2)]";function ys(g){const e=Ge.c(5),{rule:o,matchers:d}=g,f=o?.__resolveType??"";let S;if(e[0]!==d||e[1]!==f){const u=d.find(y=>y.resolveType===f)?.iconName??Aa(f);S=xo(u),e[0]=d,e[1]=f,e[2]=S}else S=e[2];const x=S;if(!x)return null;let m;return e[3]!==x?(m=n.jsx(x,{size:14,className:"shrink-0"}),e[3]=x,e[4]=m):m=e[4],m}function $n(g){return g.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
1
|
+
import{c as Ge,b as ct,r as V,m as Oe,j as n,ag as Wn,B as Qe,k as Un,o as ka,t as X,K as Ra}from"./index-DUUMVVf8.js";import{am as wa,an as Va,ao as Na,a1 as qn,a2 as Jt,ap as Yn,aq as Jn,a3 as Qn,a4 as Xn,ar as Zn,as as Da,ab as es,ac as ts,at as Ta,au as Pa,N as Ca,a5 as ns,a6 as At,a9 as ss,aa as as,a7 as os,ah as rs,av as Aa,aw as Mt,ax as Ma,S as is,ay as lt,az as Ka,aA as La,aB as Fa,aC as Ba,D as Oa,F as Ia,aD as $a,aE as za,aF as Ha,aG as Ga,af as Gt,aH as Wt,aI as Wa,aJ as St,aK as Tt,aL as Ua,aM as qa,aN as tt,aO as Cn,aP as Ya,aQ as Pt,aR as Ut,aS as Ja,aT as dn,aU as Qa,aV as wt,aW as Xa,aX as Za,aY as eo,aZ as to,a_ as no,a$ as xt,b0 as so,b1 as ao,b2 as oo,H as ro,b3 as An,b4 as Ct,b5 as io,b6 as lo,b7 as co,b8 as uo,b9 as mn,ba as Mn,bb as Kn,bc as Vt,bd as qt,be as Ln,bf as mo,bg as fn,bh as fo,bi as po,bj as go,bk as Fn,bl as ho,bm as vo}from"./index-BewecO7v.js";import{t as bo}from"./ChevronDown-CvsGy9_V.js";import{a7 as gn,C as So,$ as ls,M as xo,B as cs,a8 as yo,a9 as _o}from"./agent-icon-CXm0tG2U.js";import{i as us}from"./ChevronRight-COrmV1RX.js";import{n as jo}from"./ChevronUp-t2K_HYRx.js";import{i as Eo}from"./Tool02-DHfpo6ax.js";import{n as Yt}from"./automation-runs-BB4tZxlE.js";import{c as yt,T as _t,a as jt}from"./tooltip-W2R86GKd.js";import{b as ko,h as Ro,a as wo,c as Vo,d as No,e as Do}from"./dialog-BxTzgMQc.js";import{I as To}from"./input-CnmLY31M.js";import{a as ds}from"./Copy01-dUIi2eZN.js";import{i as Po}from"./Settings02-epU11QVl.js";import{s as Co}from"./Eye-CPyHsNx9.js";import{s as ms}from"./TrendUp01-DNTYrYK3.js";import{s as hn}from"./Plus-sc0rW8OF.js";import{s as fs}from"./Trash01-BWM43E9g.js";import{i as Ao}from"./Zap-Cnbp-COg.js";import{a as ht,D as ps,b as gs,c as hs,i as Mo}from"./dropdown-menu-B4RxTCSq.js";import{S as Ko,r as Bn,u as Lo,d as Fo,a as Bo,i as Oo,f as Io,P as $o,b as zo}from"./page-seo-form-CE-uaaSZ.js";import{c as Ho}from"./Tool01-DV88LwAF.js";import{A as Go}from"./add-section-modal-DzbJrwq6.js";import"./ArrowUp-CdeTFRe8.js";import"./chat-context-8rUWDM2F.js";import"./tab-id-C6_7L5LO.js";import"./hooks-CHAv4NGW.js";import"./use-mcp-client-Bn_fKie9.js";import"./auth-Cz9MUOH5.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BSWVee71.js";import"./studio-tools-C5EOIT8V.js";import"./use-virtual-mcp-DRku4bc3.js";import"./use-ai-providers-lrxkqJ6z.js";import"./use-decopilot-events-Cmb-e7V8.js";import"./use-organization-settings-DxCjQA-p.js";import"./drawer-CJiwuDdN.js";import"./collection-search-CadXW_fq.js";import"./SearchMd-FZNYglTs.js";import"./use-mobile-By0ugXDS.js";import"./AreaChart-DsfzIYIp.js";import"./index-CL1Jslvp.js";import"./calendar-CzpAjlxQ.js";import"./X-BpPB2vv6.js";import"./shell-layout-CODOAxB8.js";import"./avatar-qGQm5tob.js";import"./User01-DnfEmgSx.js";import"./Users03-DEjraBJr.js";import"./SearchLg-DXFQe1Sx.js";import"./Stars02-B8jO1lJL.js";import"./XClose-CN5uz5w3.js";import"./CheckCircle-VwoQIY3x.js";import"./FilterLines-C3ejwu4y.js";import"./required-auth-layout-mi5ZHwMW.js";import"./use-org-sso-BLgobVS7.js";import"./index-BaBe80UU.js";import"./get-initials-D-f_fDFw.js";import"./SwitchHorizontal01-BxES_zRv.js";import"./popover-E3JPeoM_.js";import"./use-registry-app-CiFGb0BH.js";import"./use-mcp-tools-DeNxG47-.js";import"./use-connection-CLpbKsOa.js";import"./github-repo-scope-CKSTLD3W.js";import"./authenticate-and-persist-oauth-QRlskZE_.js";import"./mcp-oauth-CCkq-PPq.js";import"./extract-connection-data-RnIuisTy.js";import"./metadata-dUsYcpuu.js";import"./use-members-CD6ZyOrK.js";import"./use-org-auth-client-BTsOFju1.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./AlertCircle-DcC27WmA.js";import"./DotsVertical-B5m6mJwx.js";import"./use-copy-Ctcxuxud.js";import"./Check-RPsONqoi.js";import"./LinkExternal01-FYanFsTL.js";import"./command-DM53UzIu.js";import"./index-7ySSB_wV.js";import"./XCircle-A38V1g83.js";import"./companions-core-CKPOUArc.js";import"./ZapSquare-DvCo-SHa.js";import"./Star01-Cawt_hmv.js";import"./Upload01-H15qbd7J.js";import"./form-DQKD1v0g.js";import"./label-CtIzDrcX.js";import"./select-BIIO90wp.js";import"./tabs-DCBH6SAb.js";import"./toggle-group-CbDPcMqH.js";import"./use-deco-credits-BncCMCeP.js";import"./sidebar-ldg-_gcB.js";import"./LayoutLeft-CUtVoabE.js";import"./alert-dialog-CLo68ArF.js";import"./toolbar-Cw1AJgYM.js";import"./skeleton-DSYUICHh.js";import"./github-repo-picker-Co6hb63c.js";import"./use-debounced-value-CF1gvVc7.js";import"./use-navigate-to-agent-DKnGfo5A.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-Dp638N7g.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-DhrUKXbn.js";import"./use-registry-connections-BtAhGlNY.js";import"./useInfiniteQuery-C3930CkE.js";import"./use-infinite-scroll-Duo-6Jh0.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-Ci1lZJg4.js";import"./integration-icon-D8ziNv4e.js";import"./textarea-mjweOaPi.js";import"./connection-form-helpers-C5m7rYZy.js";import"./collection-tabs-CoBnKZKn.js";import"./badge-66rG3iWT.js";import"./useSuspenseInfiniteQuery-CayL-QrT.js";import"./Monitor01-0a0QOsYs.js";import"./connect-desktop-dialog-GV9ICvaM.js";import"./select-model-DpYmAjaB.js";import"./checkbox-BaGAZdHF.js";import"./Key01-DrXVRZX2.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Bq6IN2K4.js";import"./ArrowUpRight-kIZaH3BQ.js";import"./Stars01-DIPcXJk_.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C6gn0U8N.js";import"./empty-state-CTXAxK95.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-Kmrr2_DL.js";import"./monaco-editor-RaZqssxu.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-EUDH_JPu.js";import"./Play-Bn0EGB-t.js";import"./use-debounced-autosave-RLi4BVRQ.js";import"./index-DAf4hRwd.js";import"./search-input-DQndNQ0y.js";import"./switch-DP_H4qok.js";import"./Users01-chZ7Ggai.js";import"./use-secrets-CGGmczJZ.js";import"./useQueries-B2OSOrpG.js";import"./use-file-configs-CZm1ErSy.js";import"./use-automations-DxXx_lHD.js";import"./automation-list-row-D0YQZG_t.js";import"./Palette-C6VwvyVY.js";import"./HardDrive-RremZdHb.js";import"./LogOut01-Dibr0QOA.js";import"./Sun-E9I6kbto.js";import"./Shield01-DrNeuOUB.js";import"./table-IQ1eq-kq.js";import"./use-clock-tick-BKCswZqG.js";function Wo(g){return g.schema?.definitions??g.schema?.$defs??{}}function Uo(g,e){const o=Wo(e),d=o[btoa(g)];if(!d)return;let f=typeof d.image=="string"?d.image:void 0;if(!f&&Array.isArray(d.allOf)){const S=d.allOf.find(x=>typeof x.$ref=="string")?.$ref;if(typeof S=="string"){const x=S.replace("#/definitions/",""),m=o[x];f=typeof m?.image=="string"?m.image:void 0}}if(f?.includes("{{{"))return f}function qo(g,e){if(!e)return;const o=wa(g);if(!o)return;const d=Uo(o.resolveType,e);if(!d)return;const f=Va(d,o.data);if(f)return Na(f)}const Yo="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Jo="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 On(g){return Array.from({length:g},(e,o)=>({id:crypto.randomUUID(),index:o}))}function vs(g){return g.map((e,o)=>({...e,index:o}))}function Qo(g,e){if(e===g.length)return g;if(e<g.length)return vs(g.slice(0,e));const o=Array.from({length:e-g.length},(d,f)=>({id:crypto.randomUUID(),index:g.length+f}));return[...g,...o]}function bs(g){const e=Ge.c(20),{section:o,raw:d,meta:f}=g,S=o.isSavedBlock===!0,x=o.isMultivariate===!0;let m;e[0]!==f||e[1]!==d?(m=d&&f?qo(d,f):void 0,e[0]=f,e[1]=d,e[2]=m):m=e[2];const h=m;let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(So,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=u):u=e[3];let y;e[4]!==h?(y=h&&n.jsx("img",{src:h,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=h,e[5]=y):y=e[5];let k;e[6]!==x||e[7]!==S?(k=S?{color:Ca}:x?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=x,e[7]=S,e[8]=k):k=e[8];let N;e[9]!==k?(N=n.jsx(gn,{className:"h-4 w-4 shrink-0",style:k}),e[9]=k,e[10]=N):N=e[10];const E=o.isHidden&&"line-through opacity-50";let i;e[11]!==E?(i=Oe("min-w-0 flex-1 truncate text-sm font-medium",E),e[11]=E,e[12]=i):i=e[12];let p;e[13]!==o.label||e[14]!==i?(p=n.jsx("span",{className:i,children:o.label}),e[13]=o.label,e[14]=i,e[15]=p):p=e[15];let r;return e[16]!==y||e[17]!==N||e[18]!==p?(r=n.jsxs(n.Fragment,{children:[u,y,N,p]}),e[16]=y,e[17]=N,e[18]=p,e[19]=r):r=e[19],r}function Ss(g,e){const o=g.isSavedBlock===!0,d=g.isMultivariate===!0;return Oe("group flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":o?Yo:d?"text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]":"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Xo(g){const e=Ge.c(81),{section:o,raw:d,meta:f,sortableId:S,selected:x,onSelect:m,onDelete:h,onDuplicate:u,onMakeReusable:y,onToggleHidden:k,onToggleLazy:N,onAddVariant:E,onDetach:i}=g,p=ct(),r=d?Zn(d.__resolveType??""):!1;let P;e[0]!==o?(P=Da(o),e[0]=o,e[1]=P):P=e[1];const l=P;let R;e[2]!==S?(R={id:S,animateLayoutChanges:sr},e[2]=S,e[3]=R):R=e[3];const{attributes:A,listeners:$,setNodeRef:v,transform:C,isDragging:re}=es(R);let L;e[4]!==C?(L=ts.Transform.toString(C?{...C,x:0}:null),e[4]=C,e[5]=L):L=e[5];const le=re?0:void 0;let K;e[6]!==L||e[7]!==le?(K={transform:L,opacity:le},e[6]=L,e[7]=le,e[8]=K):K=e[8];const ge=K;let F;e[9]!==o?(F=Ta(o),e[9]=o,e[10]=F):F=e[10];const ne=F,he="button",me=0;let B;e[11]!==m?(B=I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),m())},e[11]=m,e[12]=B):B=e[12];const J=re?"cursor-grabbing":"cursor-pointer";let Z;e[13]!==o||e[14]!==x||e[15]!==J?(Z=Oe("touch-none transition-colors",J,Ss(o,x)),e[13]=o,e[14]=x,e[15]=J,e[16]=Z):Z=e[16];let ee;e[17]!==f||e[18]!==d||e[19]!==o?(ee=n.jsx(bs,{section:o,raw:d,meta:f}),e[17]=f,e[18]=d,e[19]=o,e[20]=ee):ee=e[20];const O=!o.isMultivariate&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":p(r?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:Oe("h-7 w-7 shrink-0",r?"":"opacity-0 group-hover:opacity-100"),onClick:I=>{I.stopPropagation(),N()},onPointerDown:nr,children:n.jsx(Ao,{className:Oe("h-3.5 w-3.5",r&&"text-yellow-500")})})}),n.jsx(jt,{side:"bottom",children:p(r?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]});let Ae;e[21]!==k||e[22]!==o.isHidden||e[23]!==o.isMultivariate||e[24]!==p?(Ae=!o.isMultivariate&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":o.isHidden?p("sectionsEditor.sectionList.showSection"):p("sectionsEditor.sectionList.hideSection"),className:Oe("h-7 w-7 shrink-0",o.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:I=>{I.stopPropagation(),k()},onPointerDown:tr,children:o.isHidden?n.jsx(Po,{className:"h-3.5 w-3.5"}):n.jsx(Co,{className:"h-3.5 w-3.5"})})}),n.jsx(jt,{side:"bottom",children:o.isHidden?p("sectionsEditor.sectionList.showSection"):p("sectionsEditor.sectionList.hideSection")})]}),e[21]=k,e[22]=o.isHidden,e[23]=o.isMultivariate,e[24]=p,e[25]=Ae):Ae=e[25];let Le;e[26]!==p?(Le=p("sectionsEditor.sectionList.sectionActionsMenu"),e[26]=p,e[27]=Le):Le=e[27];let et;e[28]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(ls,{className:"h-3.5 w-3.5"}),e[28]=et):et=e[28];let Se;e[29]!==Le?(Se=n.jsx(ps,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":Le,className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:er,onPointerDown:Zo,children:et})}),e[29]=Le,e[30]=Se):Se=e[30];let H;e[31]!==u?(H=I=>{I.stopPropagation(),u()},e[31]=u,e[32]=H):H=e[32];let se;e[33]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(ds,{className:"h-4 w-4"}),e[33]=se):se=e[33];let ae;e[34]!==p?(ae=p("sectionsEditor.sectionList.duplicateMenuItem"),e[34]=p,e[35]=ae):ae=e[35];let ce;e[36]!==H||e[37]!==ae?(ce=n.jsxs(ht,{onClick:H,children:[se,ae]}),e[36]=H,e[37]=ae,e[38]=ce):ce=e[38];let oe;e[39]!==l||e[40]!==E||e[41]!==p?(oe=l&&n.jsxs(ht,{className:Pa,onClick:I=>{I.stopPropagation(),E()},children:[n.jsx(ms,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.addVariantMenuItem")]}),e[39]=l,e[40]=E,e[41]=p,e[42]=oe):oe=e[42];let ue;e[43]!==ne||e[44]!==y||e[45]!==p?(ue=ne&&n.jsxs(ht,{className:Jo,onClick:I=>{I.stopPropagation(),y()},children:[n.jsx(gn,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[43]=ne,e[44]=y,e[45]=p,e[46]=ue):ue=e[46];let ie;e[47]!==i||e[48]!==o.isMultivariate||e[49]!==o.isSavedBlock||e[50]!==p?(ie=o.isSavedBlock===!0&&!o.isMultivariate&&n.jsxs(ht,{onClick:I=>{I.stopPropagation(),i()},children:[n.jsx(gn,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.detachMenuItem")]}),e[47]=i,e[48]=o.isMultivariate,e[49]=o.isSavedBlock,e[50]=p,e[51]=ie):ie=e[51];let fe;e[52]!==h?(fe=I=>{I.stopPropagation(),h()},e[52]=h,e[53]=fe):fe=e[53];let De;e[54]===Symbol.for("react.memo_cache_sentinel")?(De=n.jsx(fs,{className:"h-4 w-4"}),e[54]=De):De=e[54];let Ee;e[55]!==p?(Ee=p("sectionsEditor.sectionList.deleteMenuItem"),e[55]=p,e[56]=Ee):Ee=e[56];let de;e[57]!==fe||e[58]!==Ee?(de=n.jsxs(ht,{className:"text-destructive focus:text-destructive",onClick:fe,children:[De,Ee]}),e[57]=fe,e[58]=Ee,e[59]=de):de=e[59];let pe;e[60]!==ce||e[61]!==oe||e[62]!==ue||e[63]!==ie||e[64]!==de?(pe=n.jsxs(gs,{align:"end",className:"w-44",children:[ce,oe,ue,ie,de]}),e[60]=ce,e[61]=oe,e[62]=ue,e[63]=ie,e[64]=de,e[65]=pe):pe=e[65];let xe;e[66]!==Se||e[67]!==pe?(xe=n.jsxs(hs,{children:[Se,pe]}),e[66]=Se,e[67]=pe,e[68]=xe):xe=e[68];let U;return e[69]!==A||e[70]!==$||e[71]!==m||e[72]!==v||e[73]!==ge||e[74]!==Z||e[75]!==ee||e[76]!==O||e[77]!==Ae||e[78]!==xe||e[79]!==B?(U=n.jsxs("div",{ref:v,style:ge,...A,...$,role:he,tabIndex:me,onClick:m,onKeyDown:B,className:Z,children:[ee,O,Ae,xe]}),e[69]=A,e[70]=$,e[71]=m,e[72]=v,e[73]=ge,e[74]=Z,e[75]=ee,e[76]=O,e[77]=Ae,e[78]=xe,e[79]=B,e[80]=U):U=e[80],U}function Zo(g){return g.stopPropagation()}function er(g){return g.stopPropagation()}function tr(g){return g.stopPropagation()}function nr(g){return g.stopPropagation()}function sr(){return!1}function ar(g){const e=Ge.c(104),{listKey:o,rawSections:d,sections:f,meta:S,selectedIndex:x,onSelect:m,onReorder:h,onDelete:u,onDuplicate:y,onMakeReusable:k,onToggleHidden:N,onToggleLazy:E,onAddVariant:i,onDetach:p,onAddSection:r,canAddSection:P}=g,l=P===void 0?!0:P,R=ct();let A;e[0]!==f.length?(A=()=>On(f.length),e[0]=f.length,e[1]=A):A=e[1];const[$,v]=V.useState(A),[C,re]=V.useState(null),[L,le]=V.useState(o),[K,ge]=V.useState(f.length),F=V.useRef(!1);L!==o?(le(o),ge(f.length),v(On(f.length))):K!==f.length&&(ge(f.length),v(Pe=>Qo(Pe,f.length)));let ne;e[2]===Symbol.for("react.memo_cache_sentinel")?(ne={activationConstraint:{distance:8}},e[2]=ne):ne=e[2];let he;e[3]===Symbol.for("react.memo_cache_sentinel")?(he={coordinateGetter:ns},e[3]=he):he=e[3];const me=qn(Jt(Xn,ne),Jt(Qn,he));let B;e[4]!==$?(B=$.map(or),e[4]=$,e[5]=B):B=e[5];const J=B;let Z;e[6]===Symbol.for("react.memo_cache_sentinel")?(Z=Pe=>{re(String(Pe.active.id))},e[6]=Z):Z=e[6];const ee=Z;let O;e[7]!==J||e[8]!==h?(O=Pe=>{re(null);const{active:D,over:z}=Pe;if(!z||D.id===z.id)return;const ye=J.indexOf(String(D.id)),_e=J.indexOf(String(z.id));ye===-1||_e===-1||(v(Ue=>vs(At([...Ue],ye,_e))),F.current=!0,requestAnimationFrame(()=>{F.current=!1}),h?.(ye,_e))},e[7]=J,e[8]=h,e[9]=O):O=e[9];const Ae=O;let Le;e[10]===Symbol.for("react.memo_cache_sentinel")?(Le=()=>{re(null)},e[10]=Le):Le=e[10];const et=Le;let Se,H,se,ae,ce,oe,ue,ie,fe,De,Ee,de,pe,xe,U;if(e[11]!==C||e[12]!==l||e[13]!==$||e[14]!==J||e[15]!==Ae||e[16]!==S||e[17]!==r||e[18]!==i||e[19]!==u||e[20]!==p||e[21]!==y||e[22]!==k||e[23]!==m||e[24]!==N||e[25]!==E||e[26]!==d||e[27]!==f||e[28]!==x||e[29]!==me||e[30]!==R){xe=Symbol.for("react.early_return_sentinel");e:{const Pe=D=>{F.current||m(D)};if(e[46]!==C||e[47]!==l||e[48]!==$||e[49]!==r||e[50]!==d||e[51]!==f||e[52]!==R){const D=C?$.find(z=>z.id===C):null;if(ae=D!=null?f[D.index]:null,se=D!=null?d[D.index]:void 0,$.length===0){let z;e[56]!==R?(z=R("sectionsEditor.sectionList.noSections"),e[56]=R,e[57]=z):z=e[57];let ye;e[58]!==z?(ye=n.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:z}),e[58]=z,e[59]=ye):ye=e[59];const _e=!l;let Ue;e[60]===Symbol.for("react.memo_cache_sentinel")?(Ue=n.jsx(hn,{size:14}),e[60]=Ue):Ue=e[60];let Ne;e[61]!==R?(Ne=R("sectionsEditor.sectionList.addSectionButton"),e[61]=R,e[62]=Ne):Ne=e[62];let nt;e[63]!==r||e[64]!==_e||e[65]!==Ne?(nt=n.jsxs(Qe,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:_e,onClick:r,children:[Ue,Ne]}),e[63]=r,e[64]=_e,e[65]=Ne,e[66]=nt):nt=e[66];let vt;e[67]!==ye||e[68]!==nt?(vt=n.jsxs("div",{className:"space-y-2",children:[ye,nt]}),e[67]=ye,e[68]=nt,e[69]=vt):vt=e[69],xe=vt;break e}pe=Oe(D&&"cursor-grabbing"),e[46]=C,e[47]=l,e[48]=$,e[49]=r,e[50]=d,e[51]=f,e[52]=R,e[53]=se,e[54]=ae,e[55]=pe}else se=e[53],ae=e[54],pe=e[55];H=ss,ie=me,fe=as,De=ee,Ee=Ae,de=et,Se=os,oe=J,ue=rs,U="space-y-1",ce=$.map(D=>{const z=f[D.index];return z?n.jsx(Xo,{sortableId:D.id,section:z,raw:d[D.index],meta:S,selected:x===D.index,onSelect:()=>Pe(D.index),onDelete:()=>u(D.index),onDuplicate:()=>y(D.index),onMakeReusable:()=>k(D.index),onToggleHidden:()=>N(D.index),onToggleLazy:()=>E(D.index),onAddVariant:()=>i(D.index),onDetach:()=>p(D.index)},D.id):null})}e[11]=C,e[12]=l,e[13]=$,e[14]=J,e[15]=Ae,e[16]=S,e[17]=r,e[18]=i,e[19]=u,e[20]=p,e[21]=y,e[22]=k,e[23]=m,e[24]=N,e[25]=E,e[26]=d,e[27]=f,e[28]=x,e[29]=me,e[30]=R,e[31]=Se,e[32]=H,e[33]=se,e[34]=ae,e[35]=ce,e[36]=oe,e[37]=ue,e[38]=ie,e[39]=fe,e[40]=De,e[41]=Ee,e[42]=de,e[43]=pe,e[44]=xe,e[45]=U}else Se=e[31],H=e[32],se=e[33],ae=e[34],ce=e[35],oe=e[36],ue=e[37],ie=e[38],fe=e[39],De=e[40],Ee=e[41],de=e[42],pe=e[43],xe=e[44],U=e[45];if(xe!==Symbol.for("react.early_return_sentinel"))return xe;let I;e[70]!==ce||e[71]!==U?(I=n.jsx("div",{className:U,children:ce}),e[70]=ce,e[71]=U,e[72]=I):I=e[72];let Ie;e[73]!==Se||e[74]!==oe||e[75]!==ue||e[76]!==I?(Ie=n.jsx(Se,{items:oe,strategy:ue,children:I}),e[73]=Se,e[74]=oe,e[75]=ue,e[76]=I,e[77]=Ie):Ie=e[77];let $e;e[78]!==se||e[79]!==ae||e[80]!==S?($e=ae?n.jsx("div",{className:Oe("cursor-grabbing shadow-lg ring-1 ring-border/60",Ss(ae,!1)),children:n.jsx(bs,{section:ae,raw:se,meta:S})}):null,e[78]=se,e[79]=ae,e[80]=S,e[81]=$e):$e=e[81];let We;e[82]!==$e?(We=Wn.createPortal(n.jsx(Yn,{dropAnimation:Jn,children:$e}),document.body),e[82]=$e,e[83]=We):We=e[83];let Me;e[84]!==H||e[85]!==ie||e[86]!==fe||e[87]!==De||e[88]!==Ee||e[89]!==de||e[90]!==Ie||e[91]!==We?(Me=n.jsxs(H,{sensors:ie,collisionDetection:fe,onDragStart:De,onDragEnd:Ee,onDragCancel:de,children:[Ie,We]}),e[84]=H,e[85]=ie,e[86]=fe,e[87]=De,e[88]=Ee,e[89]=de,e[90]=Ie,e[91]=We,e[92]=Me):Me=e[92];const Te=!l;let ve;e[93]===Symbol.for("react.memo_cache_sentinel")?(ve=n.jsx(hn,{size:14}),e[93]=ve):ve=e[93];let Ve;e[94]!==R?(Ve=R("sectionsEditor.sectionList.addSectionButton"),e[94]=R,e[95]=Ve):Ve=e[95];let ke;e[96]!==r||e[97]!==Te||e[98]!==Ve?(ke=n.jsxs(Qe,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:Te,onClick:r,children:[ve,Ve]}),e[96]=r,e[97]=Te,e[98]=Ve,e[99]=ke):ke=e[99];let He;return e[100]!==pe||e[101]!==Me||e[102]!==ke?(He=n.jsxs("div",{className:pe,children:[Me,ke]}),e[100]=pe,e[101]=Me,e[102]=ke,e[103]=He):He=e[103],He}function or(g){return g.id}function In(g){const e=Ge.c(57),{open:o,initialName:d,autoLabel:f,isPending:S,onSubmit:x,onOpenChange:m}=g,h=S===void 0?!1:S,u=ct(),[y,k]=V.useState(d),[N,E]=V.useState(o);o!==N&&(E(o),o&&k(d));let i;e[0]!==h||e[1]!==m?(i=ee=>{!ee&&!h&&m(!1)},e[0]=h,e[1]=m,e[2]=i):i=e[2];const p=i;let r;e[3]!==h||e[4]!==y||e[5]!==x?(r=async ee=>{ee.preventDefault(),!h&&await x(y.trim())},e[3]=h,e[4]=y,e[5]=x,e[6]=r):r=e[6];const P=r;let l;e[7]!==u?(l=u("sectionsEditor.variantRenameDialog.title"),e[7]=u,e[8]=l):l=e[8];let R;e[9]!==l?(R=n.jsx(ko,{children:l}),e[9]=l,e[10]=R):R=e[10];let A;e[11]!==f||e[12]!==u?(A=u("sectionsEditor.variantRenameDialog.description",{fallback:f||u("sectionsEditor.variantRenameDialog.defaultFallback")}),e[11]=f,e[12]=u,e[13]=A):A=e[13];let $;e[14]!==A?($=n.jsx(Ro,{children:A}),e[14]=A,e[15]=$):$=e[15];let v;e[16]!==R||e[17]!==$?(v=n.jsxs(wo,{children:[R,$]}),e[16]=R,e[17]=$,e[18]=v):v=e[18];let C;e[19]!==u?(C=u("sectionsEditor.variantRenameDialog.nameLabel"),e[19]=u,e[20]=C):C=e[20];let re;e[21]!==C?(re=n.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:C}),e[21]=C,e[22]=re):re=e[22];let L;e[23]===Symbol.for("react.memo_cache_sentinel")?(L=ee=>k(ee.target.value),e[23]=L):L=e[23];let le;e[24]!==f||e[25]!==h||e[26]!==y?(le=n.jsx(To,{id:"variant-rename-name",value:y,onChange:L,placeholder:f,autoFocus:!0,disabled:h}),e[24]=f,e[25]=h,e[26]=y,e[27]=le):le=e[27];let K;e[28]!==re||e[29]!==le?(K=n.jsxs("div",{className:"space-y-1.5 py-4",children:[re,le]}),e[28]=re,e[29]=le,e[30]=K):K=e[30];let ge;e[31]!==m?(ge=()=>m(!1),e[31]=m,e[32]=ge):ge=e[32];let F;e[33]!==u?(F=u("sectionsEditor.variantRenameDialog.cancel"),e[33]=u,e[34]=F):F=e[34];let ne;e[35]!==h||e[36]!==ge||e[37]!==F?(ne=n.jsx(Qe,{type:"button",variant:"outline",onClick:ge,disabled:h,children:F}),e[35]=h,e[36]=ge,e[37]=F,e[38]=ne):ne=e[38];let he;e[39]!==h||e[40]!==u?(he=h?n.jsxs(n.Fragment,{children:[n.jsx(Un,{size:14,className:"animate-spin"}),u("sectionsEditor.variantRenameDialog.saving")]}):u("sectionsEditor.variantRenameDialog.save"),e[39]=h,e[40]=u,e[41]=he):he=e[41];let me;e[42]!==h||e[43]!==he?(me=n.jsx(Qe,{type:"submit",disabled:h,children:he}),e[42]=h,e[43]=he,e[44]=me):me=e[44];let B;e[45]!==ne||e[46]!==me?(B=n.jsxs(Vo,{children:[ne,me]}),e[45]=ne,e[46]=me,e[47]=B):B=e[47];let J;e[48]!==P||e[49]!==K||e[50]!==B||e[51]!==v?(J=n.jsx(No,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:P,children:[v,K,B]})}),e[48]=P,e[49]=K,e[50]=B,e[51]=v,e[52]=J):J=e[52];let Z;return e[53]!==p||e[54]!==o||e[55]!==J?(Z=n.jsx(Do,{open:o,onOpenChange:p,children:J}),e[53]=p,e[54]=o,e[55]=J,e[56]=Z):Z=e[56],Z}const rr="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)]",xs="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.2)]";function ys(g){const e=Ge.c(5),{rule:o,matchers:d}=g,f=o?.__resolveType??"";let S;if(e[0]!==d||e[1]!==f){const u=d.find(y=>y.resolveType===f)?.iconName??Aa(f);S=xo(u),e[0]=d,e[1]=f,e[2]=S}else S=e[2];const x=S;if(!x)return null;let m;return e[3]!==x?(m=n.jsx(x,{size:14,className:"shrink-0"}),e[3]=x,e[4]=m):m=e[4],m}function $n(g){return g.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
2
2
|
`)}function pn(g){return g.map((e,o)=>({id:crypto.randomUUID(),index:o,variant:e}))}function ir(g){return g.map((e,o)=>({...e,index:o}))}function _s(g){const e=Ge.c(17),{label:o,effectiveRule:d,matchers:f,canDelete:S,dragging:x,onRename:m,onDuplicate:h,onDelete:u}=g,y=ct();let k;e[0]!==d||e[1]!==f?(k=n.jsx(ys,{rule:d,matchers:f}),e[0]=d,e[1]=f,e[2]=k):k=e[2];let N;e[3]!==o?(N=n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:o}),e[3]=o,e[4]=N):N=e[4];let E;e[5]!==S||e[6]!==x||e[7]!==o||e[8]!==u||e[9]!==h||e[10]!==m||e[11]!==y?(E=!x&&n.jsxs(hs,{children:[n.jsx(ps,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":y("sectionsEditor.pageVariantTabs.actionsAriaLabel",{label:o}),className:"size-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100",onClick:cr,onPointerDown:lr,children:n.jsx(ls,{size:14})})}),n.jsxs(gs,{align:"end",className:"w-36",children:[n.jsxs(ht,{onClick:p=>{p.stopPropagation(),m?.()},children:[n.jsx(Ho,{size:14}),y("sectionsEditor.pageVariantTabs.renameAction")]}),n.jsxs(ht,{onClick:p=>{p.stopPropagation(),h?.()},children:[n.jsx(ds,{size:14}),y("sectionsEditor.pageVariantTabs.duplicateAction")]}),n.jsx(Mo,{}),n.jsxs(ht,{variant:"destructive",disabled:!S,onClick:p=>{p.stopPropagation(),u?.()},children:[n.jsx(fs,{size:14}),y("sectionsEditor.pageVariantTabs.deleteAction")]})]})]}),e[5]=S,e[6]=x,e[7]=o,e[8]=u,e[9]=h,e[10]=m,e[11]=y,e[12]=E):E=e[12];let i;return e[13]!==k||e[14]!==N||e[15]!==E?(i=n.jsxs(n.Fragment,{children:[k,N,E]}),e[13]=k,e[14]=N,e[15]=E,e[16]=i):i=e[16],i}function lr(g){return g.stopPropagation()}function cr(g){return g.stopPropagation()}function ur(g){const e=Ge.c(33),{entry:o,sortableId:d,isActive:f,canDelete:S,decofile:x,meta:m,matchers:h,onSelect:u,onRename:y,onDuplicate:k,onDelete:N}=g;let E;e[0]!==d?(E={id:d,animateLayoutChanges:dr},e[0]=d,e[1]=E):E=e[1];const{attributes:i,listeners:p,setNodeRef:r,transform:P,isDragging:l}=es(E);let R;e[2]!==P?(R=ts.Transform.toString(P?{...P,x:0}:null),e[2]=P,e[3]=R):R=e[3];const A=l?0:void 0;let $;e[4]!==R||e[5]!==A?($={transform:R,opacity:A},e[4]=R,e[5]=A,e[6]=$):$=e[6];const v=$,C=m??void 0;let re;e[7]!==x||e[8]!==o.variant.rule||e[9]!==C?(re=Mt(o.variant.rule,x,C),e[7]=x,e[8]=o.variant.rule,e[9]=C,e[10]=re):re=e[10];const L=re;let le;e[11]!==u?(le=me=>{me.target===me.currentTarget&&(me.key==="Enter"||me.key===" ")&&(me.preventDefault(),u())},e[11]=u,e[12]=le):le=e[12];const K=l?"cursor-grabbing":"cursor-pointer active:cursor-grabbing",ge=f?xs:rr;let F;e[13]!==K||e[14]!==ge?(F=Oe("group flex select-none items-center gap-2 rounded-md px-2 py-2.5 transition-colors touch-none",K,ge),e[13]=K,e[14]=ge,e[15]=F):F=e[15];let ne;e[16]!==S||e[17]!==L||e[18]!==o.variant.label||e[19]!==h||e[20]!==N||e[21]!==k||e[22]!==y?(ne=n.jsx(_s,{label:o.variant.label,effectiveRule:L,matchers:h,canDelete:S,onRename:y,onDuplicate:k,onDelete:N}),e[16]=S,e[17]=L,e[18]=o.variant.label,e[19]=h,e[20]=N,e[21]=k,e[22]=y,e[23]=ne):ne=e[23];let he;return e[24]!==i||e[25]!==p||e[26]!==u||e[27]!==r||e[28]!==v||e[29]!==F||e[30]!==ne||e[31]!==le?(he=n.jsx("div",{ref:r,style:v,...i,...p,onClick:u,onKeyDown:le,className:F,children:ne}),e[24]=i,e[25]=p,e[26]=u,e[27]=r,e[28]=v,e[29]=F,e[30]=ne,e[31]=le,e[32]=he):he=e[32],he}function dr(){return!1}function mr(g){const e=Ge.c(9),{variant:o,decofile:d,meta:f,matchers:S}=g,x=f??void 0;let m;e[0]!==d||e[1]!==x||e[2]!==o.rule?(m=Mt(o.rule,d,x),e[0]=d,e[1]=x,e[2]=o.rule,e[3]=m):m=e[3];const h=m;let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=Oe("flex items-center gap-2 rounded-md px-2 py-2.5 shadow-lg ring-1 ring-border/60 cursor-grabbing",xs),e[4]=u):u=e[4];let y;return e[5]!==h||e[6]!==S||e[7]!==o.label?(y=n.jsx("div",{className:u,children:n.jsx(_s,{label:o.label,effectiveRule:h,matchers:S,canDelete:!1,dragging:!0})}),e[5]=h,e[6]=S,e[7]=o.label,e[8]=y):y=e[8],y}function fr(g){const e=Ge.c(91),{listKey:o,variants:d,activeIndex:f,decofile:S,meta:x,matchers:m,onSelect:h,onReorder:u,onRename:y,onDuplicate:k,onDelete:N,onAdd:E}=g,i=ct();let p;e[0]!==d?(p=()=>pn(d),e[0]=d,e[1]=p):p=e[1];const[r,P]=V.useState(p),[l,R]=V.useState(null),[A,$]=V.useState(o),[v,C]=V.useState(d.length);let re;e[2]!==d?(re=()=>$n(d),e[2]=d,e[3]=re):re=e[3];const[L,le]=V.useState(re),K=V.useRef(!1),ge=$n(d);A!==o?($(o),C(d.length),le(ge),P(pn(d))):v!==d.length?(C(d.length),le(ge),P(pn(d))):L!==ge&&(le(ge),P(Me=>d.map((Te,ve)=>({id:Me[ve]?.id??crypto.randomUUID(),index:ve,variant:Te}))));let F;e[4]===Symbol.for("react.memo_cache_sentinel")?(F={activationConstraint:{distance:8}},e[4]=F):F=e[4];let ne;e[5]===Symbol.for("react.memo_cache_sentinel")?(ne={coordinateGetter:ns},e[5]=ne):ne=e[5];const he=qn(Jt(Xn,F),Jt(Qn,ne));let me;e[6]!==r?(me=r.map(pr),e[6]=r,e[7]=me):me=e[7];const B=me,J=d.length>1;let Z;e[8]!==r?(Z=Me=>{const Te=String(Me.active.id);R(r.find(ve=>ve.id===Te)??null)},e[8]=r,e[9]=Z):Z=e[9];const ee=Z;let O;e[10]!==B||e[11]!==u?(O=Me=>{R(null);const{active:Te,over:ve}=Me;if(!ve||Te.id===ve.id)return;const Ve=B.indexOf(String(Te.id)),ke=B.indexOf(String(ve.id));Ve===-1||ke===-1||(P(He=>ir(At([...He],Ve,ke))),K.current=!0,requestAnimationFrame(()=>{K.current=!1}),u(Ve,ke))},e[10]=B,e[11]=u,e[12]=O):O=e[12];const Ae=O;let Le;e[13]===Symbol.for("react.memo_cache_sentinel")?(Le=()=>{R(null)},e[13]=Le):Le=e[13];const et=Le;let Se,H,se,ae,ce,oe,ue,ie,fe,De,Ee,de,pe;if(e[14]!==f||e[15]!==J||e[16]!==S||e[17]!==r||e[18]!==B||e[19]!==Ae||e[20]!==ee||e[21]!==m||e[22]!==x||e[23]!==E||e[24]!==N||e[25]!==k||e[26]!==y||e[27]!==h||e[28]!==he||e[29]!==i){const Me=ye=>{K.current||h(ye)};Ee="space-y-1 border-b p-2";let Te;e[43]!==i?(Te=i("sectionsEditor.pageVariantTabs.variantsLabel"),e[43]=i,e[44]=Te):Te=e[44];let ve;e[45]!==Te?(ve=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:Te}),e[45]=Te,e[46]=ve):ve=e[46];let Ve;e[47]!==i?(Ve=i("sectionsEditor.pageVariantTabs.addVariantAriaLabel"),e[47]=i,e[48]=Ve):Ve=e[48];let ke;e[49]===Symbol.for("react.memo_cache_sentinel")?(ke=n.jsx(hn,{size:14}),e[49]=ke):ke=e[49];let He;e[50]!==E||e[51]!==Ve?(He=n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":Ve,className:"size-6",onClick:E,children:ke})}),e[50]=E,e[51]=Ve,e[52]=He):He=e[52];let Pe;e[53]!==i?(Pe=i("sectionsEditor.pageVariantTabs.addVariantTooltip"),e[53]=i,e[54]=Pe):Pe=e[54];let D;e[55]!==Pe?(D=n.jsx(jt,{children:Pe}),e[55]=Pe,e[56]=D):D=e[56];let z;e[57]!==He||e[58]!==D?(z=n.jsxs(yt,{children:[He,D]}),e[57]=He,e[58]=D,e[59]=z):z=e[59],e[60]!==ve||e[61]!==z?(de=n.jsxs("div",{className:"flex items-center justify-between",children:[ve,z]}),e[60]=ve,e[61]=z,e[62]=de):de=e[62],H=ss,oe=he,ue=as,ie=ee,fe=Ae,De=et,Se=os,ae=B,ce=rs,pe="space-y-0.5",se=r.map(ye=>n.jsx(ur,{sortableId:ye.id,entry:ye,isActive:ye.index===f,canDelete:J,decofile:S,meta:x,matchers:m,onSelect:()=>Me(ye.index),onRename:()=>y(ye.index),onDuplicate:()=>k(ye.index),onDelete:()=>N(ye.index)},ye.id)),e[14]=f,e[15]=J,e[16]=S,e[17]=r,e[18]=B,e[19]=Ae,e[20]=ee,e[21]=m,e[22]=x,e[23]=E,e[24]=N,e[25]=k,e[26]=y,e[27]=h,e[28]=he,e[29]=i,e[30]=Se,e[31]=H,e[32]=se,e[33]=ae,e[34]=ce,e[35]=oe,e[36]=ue,e[37]=ie,e[38]=fe,e[39]=De,e[40]=Ee,e[41]=de,e[42]=pe}else Se=e[30],H=e[31],se=e[32],ae=e[33],ce=e[34],oe=e[35],ue=e[36],ie=e[37],fe=e[38],De=e[39],Ee=e[40],de=e[41],pe=e[42];let xe;e[63]!==se||e[64]!==pe?(xe=n.jsx("div",{className:pe,children:se}),e[63]=se,e[64]=pe,e[65]=xe):xe=e[65];let U;e[66]!==Se||e[67]!==ae||e[68]!==ce||e[69]!==xe?(U=n.jsx(Se,{items:ae,strategy:ce,children:xe}),e[66]=Se,e[67]=ae,e[68]=ce,e[69]=xe,e[70]=U):U=e[70];let I;e[71]!==l||e[72]!==S||e[73]!==m||e[74]!==x?(I=l?n.jsx(mr,{variant:l.variant,decofile:S,meta:x,matchers:m}):null,e[71]=l,e[72]=S,e[73]=m,e[74]=x,e[75]=I):I=e[75];let Ie;e[76]!==I?(Ie=Wn.createPortal(n.jsx(Yn,{dropAnimation:Jn,children:I}),document.body),e[76]=I,e[77]=Ie):Ie=e[77];let $e;e[78]!==H||e[79]!==oe||e[80]!==ue||e[81]!==ie||e[82]!==fe||e[83]!==De||e[84]!==U||e[85]!==Ie?($e=n.jsxs(H,{sensors:oe,collisionDetection:ue,onDragStart:ie,onDragEnd:fe,onDragCancel:De,children:[U,Ie]}),e[78]=H,e[79]=oe,e[80]=ue,e[81]=ie,e[82]=fe,e[83]=De,e[84]=U,e[85]=Ie,e[86]=$e):$e=e[86];let We;return e[87]!==Ee||e[88]!==de||e[89]!==$e?(We=n.jsxs("div",{className:Ee,children:[de,$e]}),e[87]=Ee,e[88]=de,e[89]=$e,e[90]=We):We=e[90],We}function pr(g){return g.id}function gr(g){const e=Ge.c(16),{schema:o,value:d,onChange:f,meta:S,decofile:x,onSaveReferencedBlock:m,sandbox:h}=g,u=ct();let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[0]=y):y=e[0];const[k,N]=V.useState(y);let E;e[1]!==k||e[2]!==u?(E=k.length>0&&n.jsxs("nav",{"aria-label":u("sectionsEditor.sectionsEditorPanels.variantRuleBreadcrumb"),className:"flex min-w-0 items-center gap-1 overflow-hidden text-xs",children:[n.jsx("button",{type:"button",onClick:()=>N([]),className:"flex shrink-0 items-center gap-0.5 rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",title:u("sectionsEditor.sectionsEditorPanels.backToRule"),children:n.jsx(cs,{className:"size-3.5"})}),k.map((r,P)=>{const l=P===k.length-1;return n.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[P>0&&n.jsx(us,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>N(k.slice(0,P+1)),title:r,className:Oe("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",l?"font-medium text-foreground":"text-muted-foreground"),children:r})]},`${r}-${P}`)})]}),e[1]=k,e[2]=u,e[3]=E):E=e[3];let i;e[4]!==k||e[5]!==x||e[6]!==S||e[7]!==f||e[8]!==m||e[9]!==h||e[10]!==o||e[11]!==d?(i=n.jsx(is,{schema:o,value:d,onChange:f,basePath:"",breadcrumbPath:k,onBreadcrumbChange:N,meta:S,decofile:x,onSaveReferencedBlock:m,sandbox:h}),e[4]=k,e[5]=x,e[6]=S,e[7]=f,e[8]=m,e[9]=h,e[10]=o,e[11]=d,e[12]=i):i=e[12];let p;return e[13]!==E||e[14]!==i?(p=n.jsxs("div",{className:"space-y-2",children:[E,i]}),e[13]=E,e[14]=i,e[15]=p):p=e[15],p}function zn(g){const e=Ge.c(21),{activeSchema:o,formValue:d,formResetKey:f,onFormChange:S,onBreadcrumbChange:x,breadcrumbPath:m,emptyMessage:h,beforeForm:u,seoResolveType:y,siteDefaultSeo:k,meta:N,decofile:E,onSaveReferencedBlock:i,sandbox:p}=g;let r;e[0]!==m?(r=m===void 0?[]:m,e[0]=m,e[1]=r):r=e[1];const P=r;let l;e[2]!==o||e[3]!==P||e[4]!==E||e[5]!==f||e[6]!==d||e[7]!==N||e[8]!==x||e[9]!==S||e[10]!==i||e[11]!==p||e[12]!==y||e[13]!==k?(l=o&&d?y?n.jsx(Ko,{schema:o,resolveType:y,value:d,formResetKey:f,onChange:S,onBreadcrumbChange:x,siteDefaultSeo:k}):n.jsx(is,{schema:o,value:d,onChange:S,basePath:"",breadcrumbPath:P,onBreadcrumbChange:x,meta:N,decofile:E,onSaveReferencedBlock:i,sandbox:p},f):null,e[2]=o,e[3]=P,e[4]=E,e[5]=f,e[6]=d,e[7]=N,e[8]=x,e[9]=S,e[10]=i,e[11]=p,e[12]=y,e[13]=k,e[14]=l):l=e[14];const R=l;let A;e[15]!==h||e[16]!==R?(A=R??n.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:h}),e[15]=h,e[16]=R,e[17]=A):A=e[17];let $;return e[18]!==u||e[19]!==A?($=n.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:n.jsxs("div",{className:"mx-auto max-w-2xl",children:[u,A]})}),e[18]=u,e[19]=A,e[20]=$):$=e[20],$}const hr="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.22)]";function vr(g,e){return Ma(g,e,lt)}function br(g){const e=Ge.c(19),{pageKey:o,initialName:d,initialPath:f,onFieldChange:S}=g,x=ct(),[m,h]=V.useState(d),[u,y]=V.useState(f),[k,N]=V.useState(o);k!==o&&(N(o),h(d),y(f));let E;e[0]!==S?(E=A=>{h(A.target.value),S("name",A.target.value)},e[0]=S,e[1]=E):E=e[1];let i;e[2]!==x?(i=x("sectionsEditor.sectionsEditorPanels.pageNamePlaceholder"),e[2]=x,e[3]=i):i=e[3];let p;e[4]!==m||e[5]!==E||e[6]!==i?(p=n.jsx("input",{type:"text",value:m,onChange:E,className:"w-full bg-transparent text-sm font-semibold truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:i}),e[4]=m,e[5]=E,e[6]=i,e[7]=p):p=e[7];let r;e[8]!==S?(r=A=>{y(A.target.value),S("path",A.target.value)},e[8]=S,e[9]=r):r=e[9];let P;e[10]!==x?(P=x("sectionsEditor.sectionsEditorPanels.pathPlaceholder"),e[10]=x,e[11]=P):P=e[11];let l;e[12]!==u||e[13]!==r||e[14]!==P?(l=n.jsx("input",{type:"text",value:u,onChange:r,className:"w-full bg-transparent text-xs text-muted-foreground truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:P}),e[12]=u,e[13]=r,e[14]=P,e[15]=l):l=e[15];let R;return e[16]!==p||e[17]!==l?(R=n.jsxs("div",{className:"space-y-1",children:[p,l]}),e[16]=p,e[17]=l,e[18]=R):R=e[18],R}function Hn(g){const e=Ge.c(13),{onClick:o}=g,d=ct();let f;e[0]!==d?(f=d("sectionsEditor.sectionsEditorPanels.addVariant"),e[0]=d,e[1]=f):f=e[1];let S;e[2]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ms,{size:14}),e[2]=S):S=e[2];let x;e[3]!==o||e[4]!==f?(x=n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":f,className:"size-7 shrink-0 text-[oklch(0.65_0.15_160)]",onClick:o,children:S})}),e[3]=o,e[4]=f,e[5]=x):x=e[5];let m;e[6]!==d?(m=d("sectionsEditor.sectionsEditorPanels.addVariant"),e[6]=d,e[7]=m):m=e[7];let h;e[8]!==m?(h=n.jsx(jt,{side:"bottom",children:m}),e[8]=m,e[9]=h):h=e[9];let u;return e[10]!==x||e[11]!==h?(u=n.jsxs(yt,{children:[x,h]}),e[10]=x,e[11]=h,e[12]=u):u=e[12],u}function Gn(g){const e=Ge.c(21),{currentRt:o,currentLabel:d,currentGlobalKey:f,matchers:S,globals:x,onSelect:m,onSelectGlobal:h,schema:u,formValue:y,onChange:k,formKey:N,formWrapperClassName:E,meta:i,decofile:p,onSaveReferencedBlock:r,sandbox:P}=g;let l;e[0]!==f||e[1]!==d||e[2]!==o||e[3]!==x||e[4]!==S||e[5]!==m||e[6]!==h?(l=n.jsx(Ka,{currentRt:o,currentLabel:d,currentGlobalKey:f,matchers:S,globals:x,onSelect:m,onSelectGlobal:h}),e[0]=f,e[1]=d,e[2]=o,e[3]=x,e[4]=S,e[5]=m,e[6]=h,e[7]=l):l=e[7];let R;e[8]!==p||e[9]!==N||e[10]!==y||e[11]!==E||e[12]!==i||e[13]!==k||e[14]!==r||e[15]!==P||e[16]!==u?(R=u&&y&&n.jsx("div",{className:E,children:n.jsx(gr,{schema:u,value:y,onChange:k,meta:i,decofile:p,onSaveReferencedBlock:r,sandbox:P},N)}),e[8]=p,e[9]=N,e[10]=y,e[11]=E,e[12]=i,e[13]=k,e[14]=r,e[15]=P,e[16]=u,e[17]=R):R=e[17];let A;return e[18]!==l||e[19]!==R?(A=n.jsxs(n.Fragment,{children:[l,R]}),e[18]=l,e[19]=R,e[20]=A):A=e[20],A}function oc({orgSlug:g,virtualMcpId:e,branch:o,previewReady:d=!0,previewUrl:f,currentPath:S,activePageBlockKey:x=null,activeGlobalBlockKey:m=null,externalSelectedIndex:h,onSaved:u,initialEditSeo:y=!1,onExitSeo:k,onViewJsonFile:N,onVariantPreviewOverride:E}){const i=ct(),p=d?{orgSlug:g,virtualMcpId:e,branch:o,previewUrl:f}:null,{data:r,isLoading:P}=La(p),{data:l,isLoading:R}=Fa(p),A=Ba(),$=A?.entity?.id===e?A.entity.metadata?.siteSlug??null:null,[v,C]=V.useState(null),[re,L]=V.useState(null),[le,K]=V.useState(null),[ge,F]=V.useState(0),[ne,he]=V.useState(void 0),[me,B]=V.useState(null),[J,Z]=V.useState(null),[ee,O]=V.useState([]),Ae=V.useRef(null),[Le,et]=V.useState(ee.length);Le!==ee.length&&(et(ee.length),requestAnimationFrame(()=>{Ae.current&&(Ae.current.scrollTop=0)}));const[Se,H]=V.useState(0),[se,ae]=V.useState(null),[ce,oe]=V.useState(null),[ue,ie]=V.useState(null),[fe,De]=V.useState(!0),[Ee,de]=V.useState(!1),[pe,xe]=V.useState(!1),[U,I]=V.useState(y),[Ie,$e]=V.useState(y);y&&!Ie&&($e(!0),I(!0),C(null),L(null),K(null),O([])),!y&&Ie&&$e(!1);const[We,Me]=V.useState(null),[Te,ve]=V.useState(void 0),[Ve,ke]=V.useState([]),[He,Pe]=V.useState(0),[D,z]=V.useState(0),[ye,_e]=V.useState(null),[Ue,Ne]=V.useState(null),[nt,vt]=V.useState(null),js=ka(),Es=`${g}/${e}/${o}`,Qt=Oa({orgSlug:g,virtualMcpId:e,branch:o}),[ks,Rs]=V.useState(S),[ws,Vs]=V.useState(x),[Ns,Ds]=V.useState(m);(ks!==S||ws!==x||Ns!==m)&&(queueMicrotask(()=>Qt.flush()),Rs(S),Vs(x),Ds(m),C(null),L(null),K(null),F(0),B(null),Z(null),z(0),_e(null),Ne(null),O([]),H(t=>t+1),I(!1),Me(null),ve(void 0),ke([]),Pe(t=>t+1));const Re=Ia({orgSlug:g,virtualMcpId:e,branch:o}),Kt=ro((t,s)=>{Re.mutate({blockKey:t,data:s},{onSuccess:()=>u?.(),onError:a=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:a.message}))})}),Xt=$a({orgSlug:g,virtualMcpId:e,branch:o}),[Nt,Lt]=V.useState(!1),Fe=V.useRef(null),st=V.useRef(null),at=V.useRef(null),Zt=V.useRef({}),Xe=V.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null});if(!d||P||R)return n.jsx("div",{className:"h-full w-full flex items-center justify-center",children:n.jsx(Un,{size:20,className:"animate-spin text-muted-foreground"})});if(!r||!l)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:i("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const Ts=za(r),we=!!m,qe=we?null:Ha(Ts,S,x),w=we?m:qe?.key??null,en=we&&m?r[m]:void 0,vn=we&&m&&en?Ga(m,en):we&&m?m:"",Ft=!we&&w&&r[w]?r[w]:null,tn=U&&r&&l&&w&&qe?Bn(r,{kind:"page",pageKey:w,pageName:String(qe.name??""),path:String(qe.path??"")},l):null,Ps=U?Ft?.seo:void 0,nn=Te!==void 0?Te:Ps,Cs=U?Lo(nn):void 0,As=tn?.seoTypeOptions??[],Ms=U&&l?Fo(l):"",bn=We??Cs??{},sn=U&&tn?Bo(bn,tn):null,Ks=U&&sn&&Oo(nn)?Gt(sn,l):null,Ls=U?Io(r,l)?.seoData:void 0,ze=we?[{label:"Default",sections:[{__resolveType:m}]}]:vr(Ft?.sections,r??{}),Bt=ze.length>1,Ke=Math.min(ge,ze.length-1),ut=ze[Ke],q=ut?.sections??[],Be=Wt(q,r),Sn=!we&&Wa(Ft?.sections);if(we&&m&&nt!==m){vt(m);const t=q[0],s=Be[0];if(t&&s){C(0),z(0),O([]);const a=St(t,s,r);a&&(L(a.data),K(a.resolveType),Ne(null),_e(null))}}!we&&nt!==null&&vt(null),Xe.current={rawSections:q,parsedSections:Be,decofile:r??{},activePageKey:w,pageVariants:ze,variantIndex:Ke,sectionVariantIndex:D,selectedSectionIndex:v};const Fs=()=>({multivariate:Sn,index:Ke,variants:ze.map(t=>({rule:t.rule}))}),xn=(t,s)=>{if(!E)return;if(!w||!Sn||t.length<=1){E(null);return}const a=Ln(w,{multivariate:!0,index:s,variants:t},r,l);E(a.length>0?a:null)},Et=(t,s,a)=>{if(!E)return;if(!w){E(null);return}const c=Fs(),b=Ln(w,c,r,l);if(!t||s<0){E(b.length>0?b:null);return}const j=mo({pageKey:w,page:c,sectionIndex:s,sectionLazy:Be[s]?.isLazy??!1,mvObj:t,selectedVariantIndex:a,decofile:r,meta:l}),_=[...b,...j];E(_.length>0?_:null)},dt=(t,s,a,c=v??-1,b=!1)=>{const j=tt(t,s);if(!j){L(null),K(null),Ne(null),_e(null),b&&Et(null,c,a);return}const T=Cn(j,lt)[a];if(!T){L(null),K(null),Ne(null),_e(null),b&&Et(null,c,a);return}const te=Xa(T.value,r);L(te?.data??null),K(te?.resolveType??null);const{resolveType:M,formValue:G}=Tt(T.rule,r,l??void 0);Ne(M),_e(G),b&&Et(j,c,a)};if(h!==void 0&&h!==ne&&(he(h??null),typeof h=="number")){const t=q[h],s=Be[h];if(t&&s)if(C(h),z(0),O([]),H(a=>a+1),s.isMultivariate)dt(t,s,0,h);else{const a=St(t,s,r);a?(L(a.data),K(a.resolveType)):(L(null),K(null)),Ne(null),_e(null)}}const Ot={orgSlug:g,virtualMcpId:e,branch:o,previewUrl:f??void 0,siteSlug:$},an=le&&l?Gt(le,l):null,Ye=(t,s)=>{if(!w)return;Fe.current&&(clearTimeout(Fe.current),Fe.current=null),at.current&&(clearTimeout(at.current),at.current=null),st.current&&(clearTimeout(st.current),st.current=null);const a=Ct(r,w,t,Ke,ze);Re.mutate({blockKey:w,data:a},{onSuccess:()=>s?.onSuccess?.()??u?.(),onError:c=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:c.message}))})},kt=()=>{C(null),L(null),K(null),z(0),_e(null),Ne(null),O([]),H(t=>t+1)},Bs=(t,s)=>{Fe.current&&clearTimeout(Fe.current);const a=Xe.current.sectionVariantIndex;Fe.current=setTimeout(()=>{const{rawSections:c,parsedSections:b,decofile:j,activePageKey:_,pageVariants:T,variantIndex:te}=Xe.current,M=c[s];if(!M)return;const G=b[s];if(!G)return;if(G.isSavedBlock){const Y=G.isLazy?M.section?.__resolveType??M.__resolveType:M.__resolveType;Re.mutate({blockKey:Y,data:t},{onSuccess:()=>u?.(),onError:Q=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:Q.message}))});return}if(!_)return;const W={...j[_]},je=[...c];if(G.isMultivariate){const Y=tt(M,G);if(!Y||!_)return;const Q=po(Y,a,t);je[s]=xt(M,G,Q)}else if(G.isHidden){const Y=Zn(M.__resolveType),Q=Y?{...M.section}:{...M},Ce=Array.isArray(Q.variants)?[...Q.variants]:[];Ce[0]&&(Ce[0]={...Ce[0],value:t}),Q.variants=Ce,Y?je[s]={...M,section:Q}:je[s]=Q}else G.isLazy?je[s]={...M,section:t}:je[s]=t;if(T.length>1){const Y=W.sections,Q=[...Y?.variants??[]];Q[te]&&(Q[te]={...Q[te],value:je}),W.sections={...Y,variants:Q}}else W.sections=je;Re.mutate({blockKey:_,data:W},{onSuccess:()=>u?.(),onError:Y=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:Y.message}))})},fn)},Os=t=>{C(t),z(0),O([]),H(b=>b+1);const s=q[t],a=Be[t];if(!s||!a)return;if(a.isMultivariate){dt(s,a,0,t);return}const c=St(s,a,r);if(!c){L(null),K(null),Ne(null),_e(null),Et(null,t,0);return}L(c.data),K(c.resolveType),Ne(null),_e(null),Et(null,t,0)},yn=t=>{const s=t;L(s),v!==null&&Bs(s,v)},on=t=>{if(!w||!r||!l||!qe)return;const s={kind:"page",pageKey:w,pageName:String(qe.name??""),path:String(qe.path??"")},a=Bn(r,s,l);a&&Qt.save(w,()=>{const c=js.getQueryData(Ra.decofile(Es))?.[w];if(!c||typeof c!="object"||c===null||Array.isArray(c))return null;const b={...c,...Zt.current};return Zt.current={},t?.raw!==void 0?{...b,seo:t.raw}:t?.inner!==void 0?zo(s,a,b,t.inner):b})},Is=(t,s)=>{w&&(Zt.current[t]=s,on())},$s=(t,s)=>{if(!w)return;const a=At([...q],t,s);v!==null&&(v===t?C(s):t<v&&s>=v?C(v-1):t>v&&s<=v&&C(v+1)),Ye(a)},zs=t=>{if(!w)return;const s=q.filter((a,c)=>c!==t);v===t?kt():v!==null&&v>t&&C(v-1),Ye(s)},Hs=t=>{if(!w)return;const s=q[t];if(!s)return;const a=[...q];a.splice(t+1,0,uo(s)),v!==null&&v>t&&C(v+1),Ye(a)},Gs=t=>{if(!w)return;const s=q[t],a=Be[t];if(!s||!a||a.isMultivariate)return;const c=a.isHidden?lo(s):co(s);if(!c)return;const b=[...q];b[t]=c,v===t&&kt(),Ye(b)},Ws=t=>{if(!w)return;const s=q[t],a=Be[t];if(!s||!a||a.isMultivariate)return;const c=io(s);if(!c)return;const b=[...q];b[t]=c,v===t&&kt(),Ye(b)},Us=t=>{if(!w)return;const s=q[t],a=Be[t];if(!s||!a?.isSavedBlock)return;const c=St(s,a,r);if(!c?.data)return;const{name:b,...j}=c.data,_=[...q];a.isLazy?_[t]={...s,section:j}:_[t]=j,v===t&&kt(),Ye(_)},qs=t=>{if(!w)return;const s=[...q,{__resolveType:t.resolveType}],a=s.length-1;Ye(s,{onSuccess:()=>{de(!1),C(a),z(0),O([]),H(_=>_+1);const c=s[a],b=Wt(s,r)[a];if(!c||!b)return;if(b.isMultivariate){dt(c,b,0);return}const j=St(c,b,r);if(!j){L(null),K(null),Ne(null),_e(null);return}L(j.data),K(j.resolveType),Ne(null),_e(null)}})},Ys=t=>{if(v===null)return;const s=q[v],a=Be[v];!s||!a?.isMultivariate||(z(t),O([]),H(c=>c+1),dt(s,a,t,v,!0))},Js=t=>{if(v===null||!w)return;const s=q[v],a=Be[v];if(!s||!a?.isMultivariate)return;const c=tt(s,a);if(!c)return;const b=ao(c,t);if(!b){X.error(i("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const j=[...q];j[v]=xt(s,a,b);const _=b.variants;let T=D;t===D?T=Math.min(t,_.length-1):t<D&&(T=D-1),z(T),O([]),H(te=>te+1),dt(j[v],a,T),Ye(j)},Qs=t=>{if(v===null||!w)return;const s=q[v],a=Be[v];if(!s||!a?.isMultivariate)return;const c=tt(s,a);if(!c)return;const b=oo(c,t),j=[...q];j[v]=xt(s,a,b);const _=t+1;z(_),O([]),H(T=>T+1),dt(j[v],a,_),Ye(j)},Xs=(t,s)=>{if(v===null||!w||t===s)return;const a=q[v],c=Be[v];if(!a||!c?.isMultivariate)return;const b=tt(a,c);if(!b)return;const j=no(b,t,s),_=[...q];_[v]=xt(a,c,j);let T=D;D===t?T=s:t<D&&s>=D?T=D-1:t>D&&s<=D&&(T=D+1),z(T),dt(_[v],c,T),Ye(_)},rn=t=>{const s=t??v;if(s===null||!w)return;const a=q[s],c=Be[s];if(!a||!c)return;const b=Za(a,c);if(!b){X.error(i("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const j=[...q];j[s]=b.section;const _=Wt(j,r)[s];if(!_?.isMultivariate){X.error(i("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}C(s),z(b.newVariantIndex),O([]),H(T=>T+1),dt(b.section,_,b.newVariantIndex,s),Ye(j)},Zs=()=>{if(v===null||!w)return;const t=q[v],s=Be[v];if(!t||!s?.isMultivariate)return;const a=tt(t,s);if(!a)return;const c=so(t,s,a);if(!c){X.error(i("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const b=[...q];b[v]=c;const j=Wt(b,r)[v];if(!j)return;z(0),Ne(null),_e(null),O([]),H(T=>T+1);const _=St(c,j,r);_?(L(_.data),K(_.resolveType)):(L(null),K(null)),Et(null,v,0),Ye(b)},ea=async t=>{if(se===null||!w)return;const s=mn(t,r);if(s){X.error(s);return}const a=q[se],c=Be[se];if(!a||!c)return;const b=St(a,c,r);if(!b){X.error(i("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const j={...b.data,name:t};try{await Re.mutateAsync({blockKey:t,data:j});const _=[...q];_[se]={__resolveType:t},await Re.mutateAsync({blockKey:w,data:Ct(r,w,_,Ke,ze)}),v===se&&kt(),ae(null),X.success(i("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),u?.()}catch(_){X.error(_ instanceof Error?_.message:i("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"))}},_n=ut?.rule;if(Bt&&v===null&&J===null&&_n){const{resolveType:t,formValue:s}=Tt(_n,r??{},l??void 0);Z(t),B(s)}const It=l?Ua(l):[],jn=l&&r?qa(l,r):[],ta=!we&&!!(f&&l&&r),na=J&&l?Gt(J,l):null,Rt=()=>{st.current&&(clearTimeout(st.current),st.current=null),at.current&&(clearTimeout(at.current),at.current=null)},Dt=async(t,s)=>{if(!(fo(s,t,l)>0))try{await Xt.mutateAsync({blockKey:t})}catch(a){X.error(a instanceof Error?a.message:i("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"))}},En=t=>{st.current&&clearTimeout(st.current),st.current=setTimeout(()=>{const{activePageKey:s,decofile:a,variantIndex:c}=Xe.current;if(!s)return;const b={...a[s]},j={...b.sections},_=[...j.variants??[]],T=_[c],te=T?.rule;if(wt(te,a,l)){const M=te?.__resolveType??"",G=a[M],W=typeof G?.name=="string"?G.name:M,{__resolveType:je,...Y}=t;Re.mutate({blockKey:M,data:Vt(je??"",Y,W)},{onSuccess:()=>u?.(),onError:Q=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:Q.message}))});return}T&&(_[c]={...T,rule:t}),b.sections={...j,variants:_},Re.mutate({blockKey:s,data:b},{onSuccess:()=>u?.(),onError:M=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:M.message}))})},fn)},sa=t=>{Z(t);const s=t?{__resolveType:t}:{__resolveType:Fn};B({}),En(s)},aa=t=>{const s=t;B(s);const a=J?{__resolveType:J,...s}:{...s};En(a)},oa=async t=>{Rt();const{activePageKey:s,decofile:a,variantIndex:c}=Xe.current;if(!s)return;const b=a[s],j=b?.sections;if(!j||typeof j!="object"||Array.isArray(j))return;const _=j;if(!Array.isArray(_.variants))return;const T=[..._.variants],te=T[c];if(!te)return;const M=Pt(te.rule,a,l),G=qt(t);T[c]={...te,rule:G};const W={...a,[s]:{...b,sections:{..._,variants:T}}},{resolveType:je,formValue:Y}=Tt(G,W,l??void 0);Z(je),B(Y);try{await Re.mutateAsync({blockKey:s,data:W[s]}),M&&M!==t&&await Dt(M,W),u?.()}catch(Q){X.error(Q instanceof Error?Q.message:i("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}},kn=t=>{at.current&&clearTimeout(at.current);const{selectedSectionIndex:s,sectionVariantIndex:a}=Xe.current;s!==null&&(at.current=setTimeout(()=>{const{rawSections:c,parsedSections:b,decofile:j,activePageKey:_,pageVariants:T,variantIndex:te}=Xe.current;if(!_)return;const M=c[s],G=b[s];if(!M||!G?.isMultivariate)return;const W=tt(M,G);if(!W)return;const Y=(W.variants??[])[a]?.rule;if(wt(Y,j,l)){const be=Y?.__resolveType??"",Je=j[be],rt=typeof Je?.name=="string"?Je.name:be,{__resolveType:pt,...it}=t;Re.mutate({blockKey:be,data:Vt(pt??"",it,rt)},{onSuccess:()=>u?.(),onError:gt=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:gt.message}))});return}const Q=An(W,a,t),Ce=[...c];Ce[s]=xt(M,G,Q);const Ze=Ct(j,_,Ce,te,T);Re.mutate({blockKey:_,data:Ze},{onSuccess:()=>u?.(),onError:be=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:be.message}))})},fn))},ra=t=>{Ne(t),_e({}),kn(t?{__resolveType:t}:{__resolveType:Fn})},ia=t=>{const s=t;_e(s);const a=Ue?{__resolveType:Ue,...s}:{...s};kn(a)},la=async t=>{Rt();const{selectedSectionIndex:s,sectionVariantIndex:a,rawSections:c,parsedSections:b,decofile:j,activePageKey:_,pageVariants:T,variantIndex:te}=Xe.current;if(s===null||!_)return;const M=c[s],G=b[s];if(!M||!G?.isMultivariate)return;const W=tt(M,G);if(!W)return;const je=W.variants??[],Y=Pt(je[a]?.rule,j,l),Q=qt(t),Ce=An(W,a,Q),Ze=[...c];Ze[s]=xt(M,G,Ce);const be=Ct(j,_,Ze,te,T),Je={...j,[_]:be},{resolveType:rt,formValue:pt}=Tt(Q,Je,l??void 0);Ne(rt),_e(pt);try{await Re.mutateAsync({blockKey:_,data:be}),Y&&Y!==t&&await Dt(Y,Je),u?.()}catch(it){X.error(it instanceof Error?it.message:i("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}};if(!we&&!qe)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:i("sectionsEditor.sectionsEditor.noPageFound",{currentPath:S})});if(we&&!en)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:i("sectionsEditor.sectionsEditor.globalBlockNotFound")});const mt=v!==null?Be[v]??null:null,Rn=v!==null?q[v]:null,wn=Rn&&mt?.isMultivariate?tt(Rn,mt):null,bt=wn?Cn(wn,lt):[],ln=Math.min(D,Math.max(bt.length-1,0)),$t=bt[ln]??null,ft=mt?.isMultivariate===!0,Vn=v!==null&&mt!==null,zt=Vn&&(ft||!!(an&&re)),ca=zt&&!we&&mt?.isSavedBlock===!0,ot=we||ca,ua=we?vn:mt?.label??"",da=Ue&&l?Gt(Ue,l):null,cn=zt&&(!we||ee.length>0)?we?[vn,...ee]:[qe.name,mt.label,...ft&&$t?[$t.label]:[],...ee]:[],ma=U&&qe?[qe.name,"SEO",...Ve]:[],Ht=U?ma:ot?cn.length>0?cn:[ua]:cn,fa=!U&&!we&&ft&&ee.length===0,Nn=()=>{if(!w)return;Rt(),Fe.current&&(clearTimeout(Fe.current),Fe.current=null);const t=r[w],s=eo(t.sections,q);if(!s)return;const a=to(s);Re.mutate({blockKey:w,data:{...t,sections:s}},{onSuccess:()=>{F(a),C(null),L(null),K(null),O([]),B(null),Z(null)},onError:c=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:c.message}))})},un=(t,s,a)=>{if(!w)return;Rt(),Fe.current&&(clearTimeout(Fe.current),Fe.current=null);const c=r[w],b=c.sections;if(!b||typeof b!="object"||Array.isArray(b))return;const j=b;if(!Array.isArray(j.variants))return;const _=t([...j.variants]);if(!_)return;const T=go(j,_),te={...r,[w]:{...c,sections:T}};Re.mutate({blockKey:w,data:te[w]},{onSuccess:()=>{s?.(),a&&Dt(a,te)},onError:M=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:M.message}))})},pa=t=>{oe(null),F(t),C(null),L(null),K(null),O([]);const s=ze[t]?.rule,{resolveType:a,formValue:c}=Tt(s,r??{},l??void 0);Z(a),B(c),xn(ze.map(b=>({rule:b.rule})),t)},ga=(t,s)=>{if(t===s)return;let a=Ke;Ke===t?a=s:t<Ke&&s>=Ke?a=Ke-1:t>Ke&&s<=Ke&&(a=Ke+1),F(a);const c=At(ze.map(b=>({rule:b.rule})),t,s);xn(c,a),un(b=>At(b,t,s))},ha=t=>{const s=ze[t]?.rule,a=Pt(s,r??{},l??void 0);un(c=>c.length<=1?null:(c.splice(t,1),c),()=>{ze.length-1===1?F(0):t<Ke?F(Ke-1):t===Ke&&F(Math.max(0,t-1)),C(null),L(null),K(null),O([]),B(null),Z(null)},a)},va=t=>{un(s=>ho(s,t),()=>{F(t+1),C(null),L(null),K(null),O([]),B(null),Z(null)})},ba=async(t,s)=>{Rt(),Fe.current&&(clearTimeout(Fe.current),Fe.current=null);const a=Xe.current.activePageKey,c=Xe.current.decofile;if(!a)return;const b=c[a],j=b.sections;if(!j||typeof j!="object"||Array.isArray(j))return;const _=j;if(!Array.isArray(_.variants))return;const T=[..._.variants],te=T[t];if(!te?.rule||typeof te.rule!="object"){X.error(i("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const M=te.rule,G=s.trim();Lt(!0);try{if(!G){if(!wt(M,c,l)){oe(null);return}const Ze=M.__resolveType??"";T[t]={...te,rule:Mn(M,c,l)};const be={...c,[a]:{...b,sections:{..._,variants:T}}};await Re.mutateAsync({blockKey:a,data:be[a]}),await Dt(Ze,be),oe(null),u?.();return}const W=Kn(M,c,l);if(!W){X.error(i("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(W.blockKey){await Re.mutateAsync({blockKey:W.blockKey,data:Vt(W.resolveType,W.data,G)}),oe(null),u?.();return}const je=dn(G),Y=mn(je,c);if(Y){X.error(Y);return}const Q=Vt(W.resolveType,W.data,G);let Ce=null;try{await Re.mutateAsync({blockKey:je,data:Q}),Ce=je,T[t]={...te,rule:qt(je)},await Re.mutateAsync({blockKey:a,data:{...b,sections:{..._,variants:T}}}),Ce=null}catch(Ze){throw Ce&&await Xt.mutateAsync({blockKey:Ce}).catch(()=>{}),Ze}oe(null),X.success(i("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:G})),u?.()}catch(W){X.error(W instanceof Error?W.message:i("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Lt(!1)}},Sa=async(t,s)=>{Rt(),Fe.current&&(clearTimeout(Fe.current),Fe.current=null);const{selectedSectionIndex:a,rawSections:c,parsedSections:b,decofile:j,activePageKey:_,pageVariants:T,variantIndex:te}=Xe.current;if(a===null||!_)return;const M=c[a],G=b[a];if(!M||!G?.isMultivariate)return;const W=tt(M,G);if(!W)return;const je=W.variants??[],Y=je[t];if(!Y?.rule||typeof Y.rule!="object"){X.error(i("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const Q=Y.rule,Ce=s.trim();Lt(!0);const Ze=async be=>{const Je={...W,variants:be},rt=[...c];rt[a]=xt(M,G,Je);const pt=Ct(j,_,rt,te,T);return await Re.mutateAsync({blockKey:_,data:pt}),{...j,[_]:pt}};try{if(!Ce){if(!wt(Q,j,l)){ie(null);return}const gt=Q.__resolveType??"",Pn=[...je];Pn[t]={...Y,rule:Mn(Q,j,l)};const Ea=await Ze(Pn);await Dt(gt,Ea),ie(null),u?.();return}const be=Kn(Q,j,l);if(!be){X.error(i("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(be.blockKey){await Re.mutateAsync({blockKey:be.blockKey,data:Vt(be.resolveType,be.data,Ce)}),ie(null),u?.();return}const Je=dn(Ce),rt=mn(Je,j);if(rt){X.error(rt);return}const pt=Vt(be.resolveType,be.data,Ce);let it=null;try{await Re.mutateAsync({blockKey:Je,data:pt}),it=Je;const gt=[...je];gt[t]={...Y,rule:qt(Je)},await Ze(gt),it=null}catch(gt){throw it&&await Xt.mutateAsync({blockKey:it}).catch(()=>{}),gt}ie(null),X.success(i("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:Ce})),u?.()}catch(be){X.error(be instanceof Error?be.message:i("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Lt(!1)}},Dn=()=>{kt()},xa=t=>{Me(t),on({inner:t})},ya=t=>{ve(t),on({raw:t})},_a=()=>{Me(null),ke([])},ja=()=>Pe(t=>t+1),Tn=t=>{if(U){if(t===0){Qt.flush(),I(!1),Me(null),ve(void 0),ke([]),Pe(a=>a+1),k?.();return}if(t===1){ke([]),Pe(a=>a+1);return}ke(Ve.slice(0,t-1)),Pe(a=>a+1);return}if(we){O(ee.slice(0,t)),H(a=>a+1);return}if(t===0){Dn();return}if(t===1){O([]),H(a=>a+1);return}if(ft&&t===2){O([]),H(a=>a+1);return}const s=ft?2:1;O(ee.slice(0,t-s))};return n.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[n.jsx("div",{className:"shrink-0",children:ot||zt||U?n.jsxs("div",{className:Oe("border-b px-3 py-2.5",ot&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[Ht.length>1&&n.jsx("button",{type:"button",onClick:()=>Tn(vo(Ht.length,{isMultivariateSectionTop:fa})),title:i("sectionsEditor.sectionsEditor.back"),"aria-label":i("sectionsEditor.sectionsEditor.back"),className:Oe("shrink-0 inline-flex size-6 items-center justify-center rounded-md transition-colors",ot?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:n.jsx(cs,{className:"size-4"})}),!we&&Bt&&ut&&n.jsxs("button",{type:"button",onClick:Dn,title:i("sectionsEditor.sectionsEditor.editingInVariant",{variant:ut.label}),className:Oe("shrink-0 inline-flex items-center gap-1 rounded-md h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",hr),children:[n.jsx(ys,{rule:Mt(ut.rule,r??{},l??void 0),matchers:It}),n.jsx("span",{className:"max-w-[160px] truncate",children:ut.label})]}),n.jsx("nav",{"aria-label":i("sectionsEditor.sectionsEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:Ht.map((t,s)=>{const a=s===Ht.length-1;return n.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[s>0&&n.jsx(us,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>Tn(s),title:t,className:Oe("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",a?ot?"font-semibold text-global-section-fg dark:text-global-section-fg-dark":"font-medium text-foreground":ot?"text-foreground/80":"text-muted-foreground",ot?"hover:bg-global-section/15":"hover:bg-accent hover:text-accent-foreground"),children:t})]},`${t}-${s}`)})}),ot&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx("span",{className:"shrink-0 cursor-help",children:n.jsx(Eo,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),n.jsx(jt,{side:"bottom",className:"max-w-[260px]",children:i("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Vn&&!ft&&!mt?.isHidden&&w&&n.jsx(Hn,{onClick:()=>rn()})]}),ot&&n.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:i("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):n.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(br,{pageKey:w,initialName:qe.name,initialPath:qe.path,onFieldChange:Is})}),n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":i("sectionsEditor.sectionsEditor.editSeo"),className:"size-7 shrink-0",onClick:()=>I(!0),children:n.jsx(yo,{size:14})})}),n.jsx(jt,{side:"bottom",children:i("sectionsEditor.sectionsEditor.editSeo")})]}),n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":i("sectionsEditor.sectionsEditor.viewJson"),className:"size-7 shrink-0",onClick:()=>N&&w?N(w):xe(!0),children:n.jsx(_o,{size:14})})}),n.jsx(jt,{side:"bottom",children:i("sectionsEditor.sectionsEditor.viewJson")})]}),n.jsx(Hn,{onClick:Nn})]})}),U?n.jsx(Yt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:n.jsx("div",{className:"mx-auto max-w-2xl",children:Ft&&w?n.jsx($o,{rawSeo:nn,innerSeo:bn,defaultResolveType:Ms,seoSchema:Ks,activeResolveType:sn,seoTypeOptions:As,formResetKey:He,siteDefaultSeo:Ls,onBreadcrumbChange:ke,onPersistRaw:ya,onInnerChange:xa,onClearForm:_a,onBumpFormKey:ja}):n.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})}):zt?n.jsxs(Yt,{viewportRef:Ae,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[ft&&bt.length>0&&n.jsxs(n.Fragment,{children:[n.jsx(Ya,{listKey:`${w??""}:${v??""}`,variants:bt.map((t,s)=>({index:s,label:t.label})),selectedIndex:ln,onSelect:Ys,onRename:ie,onDuplicate:Qs,onDelete:Js,onRemoveAll:Zs,onReorder:Xs,onAdd:()=>rn()}),ft&&n.jsxs("div",{className:"px-3 py-3 border-b space-y-2",children:[n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i("sectionsEditor.sectionsEditor.variantRule")}),n.jsx(Gn,{currentRt:Ue??"",currentLabel:Ut($t?.rule,r??{},lt,l??void 0),currentGlobalKey:Pt($t?.rule,r??{},l??void 0)??void 0,matchers:It,globals:jn,onSelect:ra,onSelectGlobal:la,schema:da,formValue:ye,onChange:ia,formKey:`${v??"none"}:${ln}:${Ue??""}`,formWrapperClassName:"pt-1",meta:l??void 0,decofile:r,onSaveReferencedBlock:Kt,sandbox:Ot})]})]}),n.jsx(zn,{activeSchema:an,formValue:re,formResetKey:Se,onFormChange:yn,onBreadcrumbChange:O,breadcrumbPath:ee,emptyMessage:i("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:l,decofile:r,onSaveReferencedBlock:Kt,sandbox:Ot})]}):we?n.jsx(Yt,{viewportRef:Ae,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx(zn,{activeSchema:an,formValue:re,formResetKey:Se,onFormChange:yn,onBreadcrumbChange:O,breadcrumbPath:ee,emptyMessage:i("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:l,decofile:r,onSaveReferencedBlock:Kt,sandbox:Ot})}):n.jsxs(Yt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[Bt&&w&&n.jsx(fr,{listKey:w,variants:ze,activeIndex:Ke,decofile:r??{},meta:l,matchers:It,onSelect:pa,onReorder:ga,onRename:oe,onDuplicate:va,onDelete:ha,onAdd:Nn}),Bt&&J!==null&&n.jsxs("div",{className:Oe("px-3 border-b",fe?"pt-3 pb-5 space-y-3":"py-2"),children:[n.jsxs("button",{type:"button",onClick:()=>De(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-sm py-0.5 hover:bg-muted/40","aria-expanded":fe,children:[n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i("sectionsEditor.sectionsEditor.variantRule")}),fe?n.jsx(jo,{className:"size-3.5 shrink-0 text-muted-foreground"}):n.jsx(bo,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),fe&&n.jsx("div",{className:Oe("space-y-3",Nt&&"pointer-events-none opacity-50"),children:n.jsx(Gn,{currentRt:J,currentLabel:Ut(ut?.rule,r??{},lt,l??void 0),currentGlobalKey:Pt(ut?.rule,r??{},l??void 0)??void 0,matchers:It,globals:jn,onSelect:sa,onSelectGlobal:oa,schema:na,formValue:me,onChange:aa,formKey:`${Ke}:${J??""}`,formWrapperClassName:"space-y-3",meta:l??void 0,decofile:r,onSaveReferencedBlock:Kt,sandbox:Ot})})]}),n.jsx("div",{className:"p-2 pt-3",children:n.jsx(ar,{listKey:`${w??""}-${Ke}`,rawSections:q,sections:Be,meta:l,selectedIndex:v,onSelect:Os,onReorder:$s,onDelete:zs,onDuplicate:Hs,onMakeReusable:ae,onToggleHidden:Gs,onToggleLazy:Ws,onAddVariant:rn,onDetach:Us,onAddSection:()=>de(!0),canAddSection:ta})})]}),n.jsx(Ja,{open:se!==null,onOpenChange:t=>{t||ae(null)},defaultBlockId:se!==null?dn(Be[se]?.label??""):"",isPending:Re.isPending,onSubmit:ea}),f&&n.jsx(Go,{open:Ee,onOpenChange:de,meta:l,decofile:r,previewBaseUrl:f,onSelect:qs}),pe&&w&&r&&n.jsx(Qa,{open:pe,onOpenChange:xe,pageKey:w,decofile:r}),ce!==null&&n.jsx(In,{open:!0,initialName:wt(ze[ce]?.rule,r??{},l??void 0)?Ut(ze[ce]?.rule,r??{},lt,l??void 0):"",autoLabel:lt(Mt(ze[ce]?.rule,r??{},l??void 0)),isPending:Nt,onSubmit:async t=>{await ba(ce,t)},onOpenChange:t=>{!t&&!Nt&&oe(null)}}),ue!==null&&n.jsx(In,{open:!0,initialName:wt(bt[ue]?.rule,r??{},l??void 0)?Ut(bt[ue]?.rule,r??{},lt,l??void 0):"",autoLabel:lt(Mt(bt[ue]?.rule,r??{},l??void 0)),isPending:Nt,onSubmit:async t=>{await Sa(ue,t)},onOpenChange:t=>{!t&&!Nt&&ie(null)}})]})}export{oc as SectionsEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,aE as nt,aC as Pe,j as d,cP as rt,aG as be,aD as k,cQ as st,az as j,aF as _,bG as $,cR as lt,ag as Ne,cS as Ee,aA as at,bA as ct,bI as it,cY as dt,cZ as ut,c_ as pt,c$ as ft,cT as mt,aB as ht,d0 as gt,cU as vt,cW as xt,c as ee,m as oe}from"./index-DH1sjrfb.js";import{V as St}from"./tooltip-BcvemS6N.js";import{i as wt}from"./Check-D3dAxrw3.js";import{t as Re}from"./ChevronDown-sGinN19i.js";import{n as Ct}from"./ChevronUp-BbsgPeIZ.js";function _e(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],Q="Select",[de,ue,bt]=at(Q),[ne]=ht(Q,[bt,Ee]),pe=Ee(),[Tt,G]=ne(Q),[Pt,_t]=ne(Q),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:c,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:v,disabled:b,required:w,form:S}=r,p=pe(e),[g,C]=i.useState(null),[m,x]=i.useState(null),[F,M]=i.useState(!1),re=nt(u),[N,O]=Pe({prop:o,defaultProp:n??!1,onChange:c,caller:Q}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:Q}),L=i.useRef(null),B=g?S||!!g.closest("form"):!0,[W,V]=i.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:g,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:N,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:i.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:i.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Je,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:v,value:U,onChange:E=>q(E.target.value),disabled:b,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=Q;var Me="SelectTrigger",Ae=i.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,c=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=i.useRef("touch"),[v,b,w]=tt(p=>{const g=u().filter(x=>!x.disabled),C=g.find(x=>x.value===s.value),m=ot(g,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...c,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:_(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:_(n.onPointerDown,p=>{h.current=p.pointerType;const 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.onKeyDown,p=>{const g=v.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(g&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:c,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=c!==void 0,v=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:v,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):c})});De.displayName=Oe;var Nt="SelectIcon",ke=i.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Nt;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var J="SelectContent",Be=i.forwardRef((r,e)=>{const t=G(J,r.__scopeSelect),[o,n]=i.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const c=o;return c?Ne.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),c):null}return d.jsx(He,{...r,ref:e})});Be.displayName=J;var A=10,[Ve,Y]=ne(J),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=i.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:c,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g,...C}=r,m=G(J,t),[x,F]=i.useState(null),[M,re]=i.useState(null),N=k(e,f=>F(f)),[O,U]=i.useState(null),[q,L]=i.useState(null),B=ue(t),[W,V]=i.useState(!1),H=i.useRef(!1);i.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=i.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=i.useCallback(()=>E([O,x]),[E,O,x]);i.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;i.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),i.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=i.useCallback(()=>x?.focus(),[x]),te=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ce=o==="popper"?Se:ze,se=ce===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:_(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ce,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:_(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=i.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,c=G(J,t),s=Y(J,t),[l,a]=i.useState(null),[u,h]=i.useState(null),v=k(e,N=>h(N)),b=ue(t),w=i.useRef(!1),S=i.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:C,focusSelectedItem:m}=s,x=i.useCallback(()=>{if(c.trigger&&c.valueNode&&l&&u&&p&&g&&C){const N=c.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=c.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(c.dir!=="rtl"){const I=q.left-O.left,P=U.left-I,Z=N.left-P,X=N.width+Z,ge=Math.max(X,O.width),ve=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=X+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-U.right-I,Z=window.innerWidth-N.right-P,X=N.width+Z,ge=Math.max(X,O.width),ve=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=X+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=N.top+N.height/2-A,ce=B-te,se=g.offsetHeight/2,f=g.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&g===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,Z=Math.max(ce,se+(I?he:0)+P+D),X=T+Z;l.style.height=X+"px"}else{const I=L.length>0&&g===L[0].ref.current;l.style.top="0px";const Z=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=Z+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,l,u,p,g,C,c.dir,o]);$(()=>x(),[x]);const[F,M]=i.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=i.useCallback(N=>{N&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...n,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=i.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...c}=r,s=pe(t);return d.jsx(vt,{...s,...c,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(J,{}),we="SelectViewport",Fe=i.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,c=Y(we,t),s=Te(we,t),l=k(e,c.onViewportChange),a=i.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:_(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:b}=s;if(b?.current&&v){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(v.style.minHeight),g=parseFloat(v.style.height),C=Math.max(p,g);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;v.style.height=x+"px",v.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,v.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),Lt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Ue;var We="SelectLabel",Bt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ie="SelectItem",[Vt,Ke]=ne(ie),$e=i.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:c,...s}=r,l=G(ie,t),a=Y(ie,t),u=l.value===o,[h,v]=i.useState(c??""),[b,w]=i.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),g=i.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:i.useCallback(m=>{v(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:_(s.onFocus,()=>w(!0)),onBlur:_(s.onBlur,()=>w(!1)),onClick:_(s.onClick,()=>{g.current!=="mouse"&&C()}),onPointerUp:_(s.onPointerUp,()=>{g.current==="mouse"&&C()}),onPointerDown:_(s.onPointerDown,m=>{g.current=m.pointerType}),onPointerMove:_(s.onPointerMove,m=>{g.current=m.pointerType,n?a.onItemLeave?.():g.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:_(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ie;var le="SelectItemText",Ge=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...c}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=_t(le,t),[h,v]=i.useState(null),b=k(e,C=>v(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=i.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return $(()=>(p(S),()=>g(S)),[p,g,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...c,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ne.createPortal(c.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Ze=i.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;c(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Ze.displayName=Ce;var ye="SelectScrollDownButton",Xe=i.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;c(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Xe.displayName=ye;var Qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,c=Y("SelectScrollButton",t),s=i.useRef(null),l=ue(t),a=i.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return i.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:_(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:_(n.onPointerMove,()=>{c.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:_(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ft=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),c=G(Ie,t),s=Y(Ie,t);return c.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Je=i.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=i.useRef(null),c=k(o,n),s=ct(e);return i.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const v=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(v)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:c,defaultValue:e})});Je.displayName=Ut;function et(r){return r===""||r===void 0}function tt(r){const e=it(r),t=i.useRef(""),o=i.useRef(0),n=i.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),c=i.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,c]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,c=t?r.indexOf(t):-1;let s=Wt(r,Math.max(c,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Zt=Be,Xt=Fe,Qt=$e,Jt=Ge,eo=qe,to=Ze,oo=Xe;function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(r){const e=ee.c(13);let t,o,n,c;e[0]!==r?({className:o,size:c,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?"default":c;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(r){const e=ee.c(25);let t,o,n,c,s;e[0]!==r?({className:o,children:t,position:c,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c,e[5]=s):(t=e[1],o=e[2],n=e[3],c=e[4],s=e[5]);const l=c===void 0?"popper":c,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("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-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let v;e[9]!==a?(v=!a&&d.jsx(no,{}),e[9]=a,e[10]=v):v=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Xt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let g;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==v||e[22]!==S||e[23]!==p?(g=d.jsx(qt,{children:d.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:h,position:l,...n,children:[v,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=v,e[22]=S,e[23]=p,e[24]=g):g=e[24],g}function ho(r){const e=ee.c(16);let t,o,n,c;e[0]!==r?({className:o,children:t,hideCheck:c,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?!1:c;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Jt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Qt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Ct,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:c}),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 c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Re,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{uo as S,fo as a,po as b,mo as c,ho as d,_e as e};
|
|
1
|
+
import{r as i,aE as nt,aC as Pe,j as d,cP as rt,aG as be,aD as k,cQ as st,az as j,aF as _,bG as $,cR as lt,ag as Ne,cS as Ee,aA as at,bA as ct,bI as it,cY as dt,cZ as ut,c_ as pt,c$ as ft,cT as mt,aB as ht,d0 as gt,cU as vt,cW as xt,c as ee,m as oe}from"./index-DUUMVVf8.js";import{V as St}from"./tooltip-W2R86GKd.js";import{i as wt}from"./Check-RPsONqoi.js";import{t as Re}from"./ChevronDown-CvsGy9_V.js";import{n as Ct}from"./ChevronUp-t2K_HYRx.js";function _e(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],Q="Select",[de,ue,bt]=at(Q),[ne]=ht(Q,[bt,Ee]),pe=Ee(),[Tt,G]=ne(Q),[Pt,_t]=ne(Q),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:c,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:v,disabled:b,required:w,form:S}=r,p=pe(e),[g,C]=i.useState(null),[m,x]=i.useState(null),[F,M]=i.useState(!1),re=nt(u),[N,O]=Pe({prop:o,defaultProp:n??!1,onChange:c,caller:Q}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:Q}),L=i.useRef(null),B=g?S||!!g.closest("form"):!0,[W,V]=i.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:g,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:N,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:i.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:i.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Je,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:v,value:U,onChange:E=>q(E.target.value),disabled:b,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=Q;var Me="SelectTrigger",Ae=i.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,c=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=i.useRef("touch"),[v,b,w]=tt(p=>{const g=u().filter(x=>!x.disabled),C=g.find(x=>x.value===s.value),m=ot(g,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...c,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:_(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:_(n.onPointerDown,p=>{h.current=p.pointerType;const 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.onKeyDown,p=>{const g=v.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(g&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:c,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=c!==void 0,v=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:v,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):c})});De.displayName=Oe;var Nt="SelectIcon",ke=i.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Nt;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var J="SelectContent",Be=i.forwardRef((r,e)=>{const t=G(J,r.__scopeSelect),[o,n]=i.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const c=o;return c?Ne.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),c):null}return d.jsx(He,{...r,ref:e})});Be.displayName=J;var A=10,[Ve,Y]=ne(J),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=i.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:c,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g,...C}=r,m=G(J,t),[x,F]=i.useState(null),[M,re]=i.useState(null),N=k(e,f=>F(f)),[O,U]=i.useState(null),[q,L]=i.useState(null),B=ue(t),[W,V]=i.useState(!1),H=i.useRef(!1);i.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=i.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=i.useCallback(()=>E([O,x]),[E,O,x]);i.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;i.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),i.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=i.useCallback(()=>x?.focus(),[x]),te=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ce=o==="popper"?Se:ze,se=ce===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:_(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ce,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:_(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=i.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,c=G(J,t),s=Y(J,t),[l,a]=i.useState(null),[u,h]=i.useState(null),v=k(e,N=>h(N)),b=ue(t),w=i.useRef(!1),S=i.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:C,focusSelectedItem:m}=s,x=i.useCallback(()=>{if(c.trigger&&c.valueNode&&l&&u&&p&&g&&C){const N=c.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=c.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(c.dir!=="rtl"){const I=q.left-O.left,P=U.left-I,Z=N.left-P,X=N.width+Z,ge=Math.max(X,O.width),ve=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=X+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-U.right-I,Z=window.innerWidth-N.right-P,X=N.width+Z,ge=Math.max(X,O.width),ve=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=X+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=N.top+N.height/2-A,ce=B-te,se=g.offsetHeight/2,f=g.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&g===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,Z=Math.max(ce,se+(I?he:0)+P+D),X=T+Z;l.style.height=X+"px"}else{const I=L.length>0&&g===L[0].ref.current;l.style.top="0px";const Z=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=Z+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,l,u,p,g,C,c.dir,o]);$(()=>x(),[x]);const[F,M]=i.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=i.useCallback(N=>{N&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...n,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=i.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...c}=r,s=pe(t);return d.jsx(vt,{...s,...c,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(J,{}),we="SelectViewport",Fe=i.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,c=Y(we,t),s=Te(we,t),l=k(e,c.onViewportChange),a=i.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:_(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:b}=s;if(b?.current&&v){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(v.style.minHeight),g=parseFloat(v.style.height),C=Math.max(p,g);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;v.style.height=x+"px",v.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,v.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),Lt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Ue;var We="SelectLabel",Bt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ie="SelectItem",[Vt,Ke]=ne(ie),$e=i.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:c,...s}=r,l=G(ie,t),a=Y(ie,t),u=l.value===o,[h,v]=i.useState(c??""),[b,w]=i.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),g=i.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:i.useCallback(m=>{v(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:_(s.onFocus,()=>w(!0)),onBlur:_(s.onBlur,()=>w(!1)),onClick:_(s.onClick,()=>{g.current!=="mouse"&&C()}),onPointerUp:_(s.onPointerUp,()=>{g.current==="mouse"&&C()}),onPointerDown:_(s.onPointerDown,m=>{g.current=m.pointerType}),onPointerMove:_(s.onPointerMove,m=>{g.current=m.pointerType,n?a.onItemLeave?.():g.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:_(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ie;var le="SelectItemText",Ge=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...c}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=_t(le,t),[h,v]=i.useState(null),b=k(e,C=>v(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=i.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return $(()=>(p(S),()=>g(S)),[p,g,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...c,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ne.createPortal(c.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Ze=i.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;c(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Ze.displayName=Ce;var ye="SelectScrollDownButton",Xe=i.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;c(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Xe.displayName=ye;var Qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,c=Y("SelectScrollButton",t),s=i.useRef(null),l=ue(t),a=i.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return i.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:_(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:_(n.onPointerMove,()=>{c.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:_(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ft=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),c=G(Ie,t),s=Y(Ie,t);return c.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Je=i.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=i.useRef(null),c=k(o,n),s=ct(e);return i.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const v=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(v)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:c,defaultValue:e})});Je.displayName=Ut;function et(r){return r===""||r===void 0}function tt(r){const e=it(r),t=i.useRef(""),o=i.useRef(0),n=i.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),c=i.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,c]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,c=t?r.indexOf(t):-1;let s=Wt(r,Math.max(c,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Zt=Be,Xt=Fe,Qt=$e,Jt=Ge,eo=qe,to=Ze,oo=Xe;function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(r){const e=ee.c(13);let t,o,n,c;e[0]!==r?({className:o,size:c,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?"default":c;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(r){const e=ee.c(25);let t,o,n,c,s;e[0]!==r?({className:o,children:t,position:c,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c,e[5]=s):(t=e[1],o=e[2],n=e[3],c=e[4],s=e[5]);const l=c===void 0?"popper":c,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("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-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let v;e[9]!==a?(v=!a&&d.jsx(no,{}),e[9]=a,e[10]=v):v=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Xt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let g;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==v||e[22]!==S||e[23]!==p?(g=d.jsx(qt,{children:d.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:h,position:l,...n,children:[v,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=v,e[22]=S,e[23]=p,e[24]=g):g=e[24],g}function ho(r){const e=ee.c(16);let t,o,n,c;e[0]!==r?({className:o,children:t,hideCheck:c,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?!1:c;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Jt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Qt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Ct,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:c}),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 c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Re,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{uo as S,fo as a,po as b,mo as c,ho as d,_e as e};
|