decocms 4.167.0 → 4.167.1
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-Cd8M35Wb.js → AlertCircle-B9QqDYpV.js} +1 -1
- package/dist/client/assets/{AreaChart-C78nqQQF.js → AreaChart-DbP5hfAi.js} +1 -1
- package/dist/client/assets/{ArrowUp-4BHUZHFD.js → ArrowUp-DWMmuZz_.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CCEVlmCI.js → ArrowUpRight-BWTRGGcn.js} +1 -1
- package/dist/client/assets/{Check-CK_e8wdj.js → Check-BVpJjApv.js} +1 -1
- package/dist/client/assets/{CheckCircle-D31c9Zko.js → CheckCircle-DqPpDLAb.js} +1 -1
- package/dist/client/assets/{ChevronDown-DSAcD82u.js → ChevronDown-DTyVSvpW.js} +1 -1
- package/dist/client/assets/{ChevronRight-D02mIW0w.js → ChevronRight-MVnPAPii.js} +1 -1
- package/dist/client/assets/{ChevronUp-BqqaHKfG.js → ChevronUp-DNXgZ_10.js} +1 -1
- package/dist/client/assets/{Copy01-CbmbpqVa.js → Copy01-CKPJ5IhB.js} +1 -1
- package/dist/client/assets/{CpuChip01-DHX1tpE2.js → CpuChip01-Du71UW4x.js} +1 -1
- package/dist/client/assets/{DotsVertical-DD9vI7XN.js → DotsVertical-0qwliDrg.js} +1 -1
- package/dist/client/assets/{Eye-CgfUY2cN.js → Eye-DydEPicd.js} +1 -1
- package/dist/client/assets/{FilterLines-BVMJKn0q.js → FilterLines-BJV5RK1l.js} +1 -1
- package/dist/client/assets/{HardDrive-2n4L-vNW.js → HardDrive-CGeasvVZ.js} +1 -1
- package/dist/client/assets/{Key01-T5YNQBm2.js → Key01-DuDppfi_.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CaOxvIEl.js → LayoutLeft-Ciwgy5UL.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CXa8wVjc.js → LinkExternal01--DLqIMAa.js} +1 -1
- package/dist/client/assets/{LogOut01-CM9eugyU.js → LogOut01-DMqcCuTY.js} +1 -1
- package/dist/client/assets/{Monitor01-8S0W2w5U.js → Monitor01-B6vkAJLy.js} +1 -1
- package/dist/client/assets/{Palette-BQLbJJdf.js → Palette-BoJouFtF.js} +1 -1
- package/dist/client/assets/{Play-CuYQk1-M.js → Play-C5V2_mAu.js} +1 -1
- package/dist/client/assets/{Plus-BApQaxo5.js → Plus-hTCIWDtE.js} +1 -1
- package/dist/client/assets/{SearchLg-BSb_OzKH.js → SearchLg-CEMI_Yu5.js} +1 -1
- package/dist/client/assets/{SearchMd-bzt4kP0K.js → SearchMd-CGs342fz.js} +1 -1
- package/dist/client/assets/{Settings02-Cslfpi0u.js → Settings02-CzRrS-qR.js} +1 -1
- package/dist/client/assets/{Shield01-vx0tzuE8.js → Shield01-b0Ri5_gK.js} +1 -1
- package/dist/client/assets/{Star01-DGK3WnVL.js → Star01-BetPRMOP.js} +1 -1
- package/dist/client/assets/{Stars01-BkoB-Q1B.js → Stars01-DQgIK8ZP.js} +1 -1
- package/dist/client/assets/{Stars02-Cx4R-W4T.js → Stars02-JSRi49Xl.js} +1 -1
- package/dist/client/assets/{Sun-Cno0ZL2K.js → Sun-OLuqlB9J.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B1yag0Lu.js → SwitchHorizontal01-GLaQT_tZ.js} +1 -1
- package/dist/client/assets/{Tool01-BPkNcjLe.js → Tool01-D_lBKESF.js} +1 -1
- package/dist/client/assets/{Tool02-8rf_PPrb.js → Tool02-BcNfyibb.js} +1 -1
- package/dist/client/assets/{Trash01-CjLF47KG.js → Trash01--2hLWyEP.js} +1 -1
- package/dist/client/assets/{TrendUp01-B3nbKtR5.js → TrendUp01-4daEWKyg.js} +1 -1
- package/dist/client/assets/{Upload01-C74iA_2l.js → Upload01-CpoC4YD6.js} +1 -1
- package/dist/client/assets/{User01-gol1gjVG.js → User01-Ddv0yRQm.js} +1 -1
- package/dist/client/assets/{Users01-ConkK5Hy.js → Users01-B0XXonaO.js} +1 -1
- package/dist/client/assets/{Users03-C0TiA5ig.js → Users03-C-1TY48R.js} +1 -1
- package/dist/client/assets/{X-D-SXXNOh.js → X-BcM56kD2.js} +1 -1
- package/dist/client/assets/{XCircle-Bdipnf78.js → XCircle-B8N2lyCq.js} +1 -1
- package/dist/client/assets/{XClose-BXyOmw6P.js → XClose-BMHkS-kz.js} +1 -1
- package/dist/client/assets/{Zap-DJXvF0rz.js → Zap-0Vx8dn_e.js} +1 -1
- package/dist/client/assets/{ZapSquare-DRAXQQVP.js → ZapSquare-Nv0rijSe.js} +1 -1
- package/dist/client/assets/{access-gate-BKMOmBMY.js → access-gate-ClCWz49c.js} +1 -1
- package/dist/client/assets/{add-section-modal-B75sXBI5.js → add-section-modal-J4MpuN5T.js} +1 -1
- package/dist/client/assets/{agent-icon-bqP8cd4A.js → agent-icon-DvITB4KO.js} +1 -1
- package/dist/client/assets/{agents-list-JTNfRO7b.js → agents-list-CplH0YOk.js} +1 -1
- package/dist/client/assets/{ai-providers-DB4edqOH.js → ai-providers-EMQ_jn-r.js} +1 -1
- package/dist/client/assets/{alert-kXNc1jQs.js → alert-B3oOnpj5.js} +1 -1
- package/dist/client/assets/{alert-dialog-fWZE2eoL.js → alert-dialog-B9G0eJ9-.js} +1 -1
- package/dist/client/assets/{app-editor-BJoZeDYw.js → app-editor-yXBS1_dG.js} +1 -1
- package/dist/client/assets/{auth-B6-JmtGV.js → auth-C7EjAKuK.js} +1 -1
- package/dist/client/assets/{auth-catchall-cHl02pOC.js → auth-catchall-BfqFoMfa.js} +1 -1
- package/dist/client/assets/{auth-entry-BkcVdNXd.js → auth-entry-BB2Zbbuo.js} +1 -1
- package/dist/client/assets/{auth-split-layout-ozU7OFFM.js → auth-split-layout-DwqQL_lh.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BBAoTw-S.js → authenticate-and-persist-oauth-Drw6R7zD.js} +1 -1
- package/dist/client/assets/{automation-list-row-BkrA0C81.js → automation-list-row-B6zoK1J4.js} +1 -1
- package/dist/client/assets/{automation-runs-1f49gKdv.js → automation-runs-CgyKaz2R.js} +1 -1
- package/dist/client/assets/{automations-CuujfvxS.js → automations-Rl8s5Ge5.js} +1 -1
- package/dist/client/assets/{avatar-CG1sYMC3.js → avatar-BN0lsHoN.js} +1 -1
- package/dist/client/assets/{badge-DTv3ytkG.js → badge-ClnYkgjJ.js} +1 -1
- package/dist/client/assets/{block-document-pKW_gNRc.js → block-document-Cs_WYNJE.js} +1 -1
- package/dist/client/assets/{brand-context-CSdoqkrl.js → brand-context-CtuFGog_.js} +1 -1
- package/dist/client/assets/{buckets-9vcDP1Xx.js → buckets-CWde2N2a.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Z8lz1ptZ.js → bulk-category-panel-CGldf2S5.js} +1 -1
- package/dist/client/assets/{calendar-CSYSRHan.js → calendar-CX7YfHEa.js} +1 -1
- package/dist/client/assets/{capability-load-error-CI7JffNO.js → capability-load-error-D2CLFEVV.js} +1 -1
- package/dist/client/assets/{card-Djqe431m.js → card-Dwttk7rT.js} +1 -1
- package/dist/client/assets/{category-editor-BOkZGzvy.js → category-editor-Zu5hW0O8.js} +1 -1
- package/dist/client/assets/{chat-context-B9IMqX9H.js → chat-context-BbbE9k_D.js} +1 -1
- package/dist/client/assets/{checkbox-g1Xe-Fh0.js → checkbox-CpYf9_vX.js} +1 -1
- package/dist/client/assets/{cli-auth-success-71pX1cOc.js → cli-auth-success-D6c-aysX.js} +1 -1
- package/dist/client/assets/{collection-detail-DSTfsDtj.js → collection-detail-D92VY8wh.js} +1 -1
- package/dist/client/assets/{collection-display-button-DqckpPka.js → collection-display-button-DP3SA4GB.js} +1 -1
- package/dist/client/assets/{collection-search-D8p930-2.js → collection-search-Cz6kdWMP.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C4pkDKfG.js → collection-table-wrapper-D5y3-VS8.js} +1 -1
- package/dist/client/assets/{collection-tabs-Btbvy5wZ.js → collection-tabs-DySS3fYR.js} +1 -1
- package/dist/client/assets/{command-D8VZgYcp.js → command-CBET95DA.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-B_-r2hWt.js → commerce-onboarding-BeqUSNyL.js} +1 -1
- package/dist/client/assets/{companions-core-C6pGrBaV.js → companions-core-DfxidC-a.js} +1 -1
- package/dist/client/assets/{connect-Dggz_rgK.js → connect-BpZc7CVv.js} +1 -1
- package/dist/client/assets/{connection-Bm6D5T7s.js → connection-_mzadKpF.js} +1 -1
- package/dist/client/assets/{connection-card-DaylHwd8.js → connection-card-DDBFrRVD.js} +1 -1
- package/dist/client/assets/{connection-detail-pp291ZsI.js → connection-detail-CQnHH61z.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-abaaeWRW.js → connection-form-helpers-B7chcMcT.js} +1 -1
- package/dist/client/assets/{connections-C-3JQ-RT.js → connections-Ba0_1aAV.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DJTs5v3B.js → decopilot-sse-pool-C5huenWS.js} +1 -1
- package/dist/client/assets/{dialog-BNEf4h73.js → dialog-BSwzm_xb.js} +1 -1
- package/dist/client/assets/{domain-settings-BQw1ZHpG.js → domain-settings-BvGX-H5z.js} +1 -1
- package/dist/client/assets/{drawer-BOicXoW4.js → drawer-Bs_TJ-Xq.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B0OSBqF5.js → dropdown-menu-b_BfGjG2.js} +1 -1
- package/dist/client/assets/{empty-state-Jijm8Zjj.js → empty-state-p3Rv7ykT.js} +1 -1
- package/dist/client/assets/{extract-connection-data-ByQ1VQpk.js → extract-connection-data-CD7g_CXG.js} +1 -1
- package/dist/client/assets/{file-explorer-CheIIdH4.js → file-explorer-wJZqCObJ.js} +1 -1
- package/dist/client/assets/{form-BoZJqj_8.js → form-DH41eKNk.js} +1 -1
- package/dist/client/assets/{general-CtysXkWo.js → general-CMWfkn6U.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CCSv048C.js → github-repo-picker-B3yLKSRu.js} +1 -1
- package/dist/client/assets/{hooks-Bl53PFCW.js → hooks-Bva17Au4.js} +1 -1
- package/dist/client/assets/{index-DFVpce2g.js → index-B3Lyzc7o.js} +5 -5
- package/dist/client/assets/{index-7i5MzulY.js → index-BXC1jJIv.js} +1 -1
- package/dist/client/assets/{index-DW8FWTYY.js → index-BuiYUoEr.js} +1 -1
- package/dist/client/assets/{index-EC0JTBd4.js → index-CHyu4u6F.js} +1 -1
- package/dist/client/assets/{index-BdV3mKMQ.js → index-CMKFDBTg.js} +1 -1
- package/dist/client/assets/{index-BAn2tA3m.js → index-DnYz0HYp.js} +1 -1
- package/dist/client/assets/{index-D7iPCSni.js → index-Pe4ypjX9.js} +10 -10
- package/dist/client/assets/{index-DBW7-LLJ.js → index-bSjz3FLt.js} +3 -3
- package/dist/client/assets/{index-BB4oQ8m2.js → index-kdXFHcLL.js} +1 -1
- package/dist/client/assets/{index-CzdD7w68.js → index-m3kwuU8_.js} +1 -1
- package/dist/client/assets/{index-DS1dPTBr.js → index-r7ibRdki.js} +1 -1
- package/dist/client/assets/{index-redirect-idcaLUlq.js → index-redirect-Dcp2bxDL.js} +1 -1
- package/dist/client/assets/{input-DM14QBHx.js → input-mwCJa3UC.js} +1 -1
- package/dist/client/assets/{integration-icon-BjR4OGAx.js → integration-icon-Dw-S_xW-.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-D9LT_tFK.js → invite-member-dialog-BmhAm9Lx.js} +1 -1
- package/dist/client/assets/{label-BEcprhix.js → label-BdYpUysi.js} +1 -1
- package/dist/client/assets/{layout-DluG1Vni.js → layout-wXBYk3l6.js} +1 -1
- package/dist/client/assets/{login-BUNmGthz.js → login-BT8Xsyxn.js} +1 -1
- package/dist/client/assets/{mcp-oauth-ws9m29vQ.js → mcp-oauth-CFh8Fy0x.js} +1 -1
- package/dist/client/assets/{members-B2rGjbVl.js → members-DkjeT3mE.js} +1 -1
- package/dist/client/assets/{monaco-editor-DJSyif3I.js → monaco-editor-DLbVfQ_7.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B5xpjD5z.js → monitoring-stats-row-B_q91RyA.js} +1 -1
- package/dist/client/assets/{multi-select-DX4wKmiL.js → multi-select-ponRWmkh.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DYANs1ON.js → oauth-callback-ai-provider-3M6tgaHM.js} +1 -1
- package/dist/client/assets/{oauth-callback-qhM58XQs.js → oauth-callback-qeybtKtJ.js} +1 -1
- package/dist/client/assets/{onboarding-WshxsJzF.js → onboarding-DdiUwvH4.js} +1 -1
- package/dist/client/assets/{org-layout-CvfJlqf0.js → org-layout-BO_NrrDG.js} +1 -1
- package/dist/client/assets/{organization-choice-CsgXcMIz.js → organization-choice-BT4w0rse.js} +1 -1
- package/dist/client/assets/{orgs-CGCwj0aX.js → orgs-ChPD5qq-.js} +1 -1
- package/dist/client/assets/{page-seo-form-BUmIrCHq.js → page-seo-form-CP8D3Ih-.js} +1 -1
- package/dist/client/assets/{popover-13d1_Ydy.js → popover-NHkLoGwZ.js} +1 -1
- package/dist/client/assets/{post-editor-CW3QV3HH.js → post-editor-Cr2du04f.js} +1 -1
- package/dist/client/assets/{primitives-CWnjtxmC.js → primitives-2VpPQpUT.js} +1 -1
- package/dist/client/assets/{profile-D-gvwVRu.js → profile-CGYeqX8p.js} +1 -1
- package/dist/client/assets/project-app-view-C9N2qA5x.js +1 -0
- package/dist/client/assets/record-editor-RMLYnDrn.js +1 -0
- package/dist/client/assets/{redirect-editor-BQgkHo14.js → redirect-editor-ZxNWX7KV.js} +1 -1
- package/dist/client/assets/registry-7HcYvODq.js +2 -0
- package/dist/client/assets/{registry-layout-10se5s7s.js → registry-layout-8gQg9AHQ.js} +1 -1
- package/dist/client/assets/{reports-B0dg8-1T.js → reports-DuFKwYsN.js} +1 -1
- package/dist/client/assets/{require-capability-94N1MpBW.js → require-capability-gdmir0q8.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DTRJEXT6.js → required-auth-layout-DNnOiPNc.js} +1 -1
- package/dist/client/assets/{reset-password-DTqfLCFl.js → reset-password-B7ZF2KQd.js} +1 -1
- package/dist/client/assets/{roles-DMaB4I0B.js → roles-DHyl-7I0.js} +1 -1
- package/dist/client/assets/{search-input-Cav-R6u1.js → search-input-D80HsBNG.js} +1 -1
- package/dist/client/assets/{secrets-CmQA_lCO.js → secrets-xULgdM9X.js} +1 -1
- package/dist/client/assets/{sections-editor-B1CYJQwI.js → sections-editor-EBt_1HWU.js} +1 -1
- package/dist/client/assets/{select-p5o_Bt0F.js → select-C_F8-amA.js} +1 -1
- package/dist/client/assets/{select-model-z0c2dMz_.js → select-model-DQDGLP7u.js} +2 -2
- package/dist/client/assets/{self-tool-result-Cgb76l_D.js → self-tool-result-C1Frg_4o.js} +1 -1
- package/dist/client/assets/{seo-editor-DTdLrmHB.js → seo-editor-5b4Q7Rbq.js} +1 -1
- package/dist/client/assets/{settings-layout-BnrJScNO.js → settings-layout-BmqyTuv_.js} +1 -1
- package/dist/client/assets/{settings-section-CZTjnxlV.js → settings-section-BgUHQSVM.js} +1 -1
- package/dist/client/assets/{shell-controls-XiJZc3ao.js → shell-controls-obP95UlH.js} +1 -1
- package/dist/client/assets/{shell-layout-CvSnv4Ng.js → shell-layout-nGpsxb9b.js} +1 -1
- package/dist/client/assets/{sidebar-BBmlF4Le.js → sidebar-ZY9Na73j.js} +1 -1
- package/dist/client/assets/{skeleton-D5maqyjg.js → skeleton-CHQGQrAg.js} +1 -1
- package/dist/client/assets/{spinner-D09NsuWH.js → spinner-CT6gj-U7.js} +1 -1
- package/dist/client/assets/{sso-DqK4eFK8.js → sso-DMVK9tiq.js} +1 -1
- package/dist/client/assets/{store-DRo6GtOx.js → store-DSld3m2K.js} +1 -1
- package/dist/client/assets/store-registry-Cmahj97T.js +2 -0
- package/dist/client/assets/{studio-tools-eC6fCmF6.js → studio-tools-CnY1iRfX.js} +1 -1
- package/dist/client/assets/{switch-DJGvmJgh.js → switch-g5eZwQWn.js} +1 -1
- package/dist/client/assets/{tab-id-ts2R-IK7.js → tab-id-D_shElJ5.js} +1 -1
- package/dist/client/assets/{table-CUPzY57H.js → table-DUzcE7pw.js} +1 -1
- package/dist/client/assets/{tabs-BezZc3NY.js → tabs-CU_nfhem.js} +1 -1
- package/dist/client/assets/{textarea-DHTTJLnr.js → textarea-BNXibmKi.js} +1 -1
- package/dist/client/assets/{toggle-group-CqJpxcmh.js → toggle-group-DGoI3Yg0.js} +1 -1
- package/dist/client/assets/{toolbar-8XCdJRqW.js → toolbar-DI-Q6oWY.js} +1 -1
- package/dist/client/assets/{tooltip-fkTa7gIG.js → tooltip-Bfr58shw.js} +1 -1
- package/dist/client/assets/{use-ai-providers-wy-pIlnl.js → use-ai-providers-b8vjAuOw.js} +1 -1
- package/dist/client/assets/{use-automations-BebUXKcQ.js → use-automations-D6FStJIQ.js} +1 -1
- package/dist/client/assets/{use-autosave-CUZ4cIic.js → use-autosave-BU3YP_ga.js} +1 -1
- package/dist/client/assets/{use-capability-D9H3t7HP.js → use-capability-CamUh6kt.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Cso4aNFM.js → use-clock-tick-XnKcERte.js} +1 -1
- package/dist/client/assets/{use-connection-DJ0b1gTC.js → use-connection-BzH0Kdzc.js} +1 -1
- package/dist/client/assets/{use-copy-BNgRyC_N.js → use-copy-Bb3AUakA.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-pKJoeitk.js → use-create-virtual-mcp-BwmEhwgt.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-B-9KRifB.js → use-debounced-autosave-D3rcIunV.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DrbFDRJg.js → use-debounced-value-GljL4VOJ.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DmpIUFXQ.js → use-deco-credits-Ds-jb_dO.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CPtuygfk.js → use-decopilot-events-D8GZCmLu.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Ca978irp.js → use-delete-connection-CLOnrzoe.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DG7sPT_s.js → use-deployment-admin-BV4YO5qR.js} +1 -1
- package/dist/client/assets/{use-file-configs-BSbmDdF6.js → use-file-configs-Cyy8AsxM.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BLH47khU.js → use-infinite-scroll-Cg9HfQoH.js} +1 -1
- package/dist/client/assets/{use-join-requests-BFZJlmrE.js → use-join-requests-BlRZvCNl.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DtWK2vVN.js → use-mcp-auth-status-BqOdulae.js} +1 -1
- package/dist/client/assets/{use-mcp-client-YC9HMu6y.js → use-mcp-client-BcyA1fq6.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-81zsgjbk.js → use-mcp-tools-Dsxlr_F7.js} +1 -1
- package/dist/client/assets/{use-members-BOo6SBZf.js → use-members-BPAn97Ac.js} +1 -1
- package/dist/client/assets/{use-mobile-DaXh9iB4.js → use-mobile-DtJ9mqo3.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CwseQD-z.js → use-navigate-to-agent-B56yEq2x.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-B_HThHi-.js → use-org-auth-client-BbxxaMLu.js} +1 -1
- package/dist/client/assets/{use-org-sso-vq0R-8A9.js → use-org-sso-9IKzvoT7.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C1XBXdGf.js → use-organization-roles-ROrqTPFl.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Bi013MJn.js → use-organization-settings-B7aJIu7V.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DHHAMc5J.js → use-registry-connections-B--YAga1.js} +1 -1
- package/dist/client/assets/{use-secrets-BCwf7s42.js → use-secrets-DWxO4tT-.js} +1 -1
- package/dist/client/assets/{use-status-sounds-B4bZcx6E.js → use-status-sounds-DGy4iLtW.js} +1 -1
- package/dist/client/assets/{use-tags-CxtVjJTC.js → use-tags-CRJNGby7.js} +1 -1
- package/dist/client/assets/{use-view-mode-2rHbtOa0.js → use-view-mode-CcQ20A8d.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Czn5fHtD.js → use-virtual-mcp-Bujf-aIR.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-gU5karM4.js +1 -0
- package/dist/client/assets/{useQueries-BIMkg7rJ.js → useQueries-CC6kPLN8.js} +1 -1
- package/dist/client/assets/{useRouterState-CQeHJLAo.js → useRouterState-wMiETB_2.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DfcVoJ9U.js +1 -0
- package/dist/client/assets/{users-CbQWIH4c.js → users-BG9VHnqD.js} +1 -1
- package/dist/client/assets/{variant-calendar-CVBnB48e.js → variant-calendar-COmRMH0Y.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CZXwONMQ.js → view-mode-toggle-C-PRhWQn.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +389 -389
- package/dist/server/server.js +265 -265
- package/package.json +1 -1
- package/dist/client/assets/project-app-view-CWjCgPJM.js +0 -1
- package/dist/client/assets/record-editor-Bhe663KT.js +0 -1
- package/dist/client/assets/registry-Dp0LTgEx.js +0 -2
- package/dist/client/assets/store-registry-BfDOrY5J.js +0 -2
- package/dist/client/assets/useInfiniteQuery-yZBiNKu9.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CdZRM8uM.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as Ue,b as ct,r as w,m as Oe,j as n,ag as Yn,B as Qe,k as Jn,o as Na,t as X,K as Da}from"./index-DBW7-LLJ.js";import{a6 as Ta,a7 as Pa,a8 as Aa,a9 as Qn,aa as Xn,ab as Ca,ac as Ma,ad as Ka,N as La,ae as Ba,af as Ct,ag as Fa,S as Zn,ah as lt,ai as Oa,aj as Ia,ak as $a,al as za,D as Ha,F as Ga,am as Ua,an as Wa,ao as qa,ap as Ya,a0 as Gt,aq as Ut,ar as Ja,as as xt,at as Tt,au as Qa,av as Xa,aw as tt,ax as Mn,ay as Za,az as Pt,aA as Wt,aB as eo,aC as dn,aD as to,aE as wt,aF as no,aG as so,aH as ao,aI as oo,aJ as ro,aK as bt,aL as io,aM as lo,aN as co,H as uo,aO as Kn,aP as At,aQ as Ln,aR as Bn,aS as mo,aT as fo,aU as po,aV as go,aW as mn,aX as Fn,aY as On,aZ as Vt,a_ as qt,a$ as In,b0 as ho,b1 as fn,b2 as vo,b3 as So,b4 as xo,b5 as bo,b6 as yo}from"./index-DFVpce2g.js";import{t as _o}from"./ChevronDown-DSAcD82u.js";import{a3 as gn,x as jo,X as es,I as Eo,w as ts,a5 as ko,a6 as Ro}from"./agent-icon-bqP8cd4A.js";import{i as ns}from"./ChevronRight-D02mIW0w.js";import{n as wo}from"./ChevronUp-BqqaHKfG.js";import{i as Vo}from"./Tool02-8rf_PPrb.js";import{l as Yt}from"./automation-runs-1f49gKdv.js";import{c as yt,T as _t,a as jt}from"./tooltip-fkTa7gIG.js";import{b as No,h as Do,a as To,c as Po,d as Ao,e as Co}from"./dialog-BNEf4h73.js";import{I as Mo}from"./input-DM14QBHx.js";import{a as ss}from"./Copy01-CbmbpqVa.js";import{i as Ko}from"./Settings02-Cslfpi0u.js";import{s as Lo}from"./Eye-CgfUY2cN.js";import{s as as}from"./TrendUp01-B3nbKtR5.js";import{s as hn}from"./Plus-BApQaxo5.js";import{s as os}from"./Trash01-CjLF47KG.js";import{i as Bo}from"./Zap-DJXvF0rz.js";import{a as ht,D as rs,b as is,c as ls,i as Fo}from"./dropdown-menu-B0OSBqF5.js";import{o as cs,p as Jt,K as us,P as ds,q as ms,z as fs,C as ps,A as gs,B as Mt,D as hs,v as vs,x as Ss,y as xs}from"./index-D7iPCSni.js";import{S as Oo,r as $n,u as Io,d as $o,a as zo,i as Ho,f as Go,P as Uo,b as Wo}from"./page-seo-form-BUmIrCHq.js";import{c as qo}from"./Tool01-BPkNcjLe.js";import{A as Yo}from"./add-section-modal-B75sXBI5.js";import"./ArrowUp-4BHUZHFD.js";import"./chat-context-B9IMqX9H.js";import"./tab-id-ts2R-IK7.js";import"./Check-CK_e8wdj.js";import"./hooks-Bl53PFCW.js";import"./use-mcp-client-YC9HMu6y.js";import"./auth-B6-JmtGV.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DJTs5v3B.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-Czn5fHtD.js";import"./use-ai-providers-wy-pIlnl.js";import"./studio-tools-eC6fCmF6.js";import"./use-decopilot-events-CPtuygfk.js";import"./use-organization-settings-Bi013MJn.js";import"./spinner-D09NsuWH.js";import"./drawer-BOicXoW4.js";import"./collection-search-D8p930-2.js";import"./SearchMd-bzt4kP0K.js";import"./use-mobile-DaXh9iB4.js";import"./AreaChart-C78nqQQF.js";import"./index-DS1dPTBr.js";import"./calendar-CSYSRHan.js";import"./X-D-SXXNOh.js";import"./shell-layout-CvSnv4Ng.js";import"./avatar-CG1sYMC3.js";import"./User01-gol1gjVG.js";import"./Users03-C0TiA5ig.js";import"./SearchLg-BSb_OzKH.js";import"./Stars02-Cx4R-W4T.js";import"./XClose-BXyOmw6P.js";import"./CheckCircle-D31c9Zko.js";import"./CpuChip01-DHX1tpE2.js";import"./FilterLines-BVMJKn0q.js";import"./Monitor01-8S0W2w5U.js";import"./required-auth-layout-DTRJEXT6.js";import"./use-org-sso-vq0R-8A9.js";import"./ZapSquare-DRAXQQVP.js";import"./Star01-DGK3WnVL.js";import"./Upload01-C74iA_2l.js";import"./AlertCircle-Cd8M35Wb.js";import"./form-BoZJqj_8.js";import"./label-BEcprhix.js";import"./select-p5o_Bt0F.js";import"./XCircle-Bdipnf78.js";import"./tabs-BezZc3NY.js";import"./toggle-group-CqJpxcmh.js";import"./use-deco-credits-DmpIUFXQ.js";import"./sidebar-BBmlF4Le.js";import"./LayoutLeft-CaOxvIEl.js";import"./popover-13d1_Ydy.js";import"./alert-dialog-fWZE2eoL.js";import"./toolbar-8XCdJRqW.js";import"./skeleton-D5maqyjg.js";import"./github-repo-picker-CCSv048C.js";import"./use-debounced-value-DrbFDRJg.js";import"./use-connection-DJ0b1gTC.js";import"./authenticate-and-persist-oauth-BBAoTw-S.js";import"./mcp-oauth-ws9m29vQ.js";import"./LinkExternal01-CXa8wVjc.js";import"./use-mcp-tools-81zsgjbk.js";import"./extract-connection-data-ByQ1VQpk.js";import"./metadata-dUsYcpuu.js";import"./use-navigate-to-agent-CwseQD-z.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-CAXumITS.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-DaylHwd8.js";import"./use-registry-connections-DHHAMc5J.js";import"./useInfiniteQuery-yZBiNKu9.js";import"./use-infinite-scroll-BLH47khU.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-Djqe431m.js";import"./integration-icon-BjR4OGAx.js";import"./textarea-DHTTJLnr.js";import"./connection-form-helpers-abaaeWRW.js";import"./collection-tabs-Btbvy5wZ.js";import"./badge-DTv3ytkG.js";import"./useSuspenseInfiniteQuery-CdZRM8uM.js";import"./select-model-z0c2dMz_.js";import"./checkbox-g1Xe-Fh0.js";import"./Key01-T5YNQBm2.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CZTjnxlV.js";import"./ArrowUpRight-CCEVlmCI.js";import"./Stars01-BkoB-Q1B.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B4bZcx6E.js";import"./empty-state-Jijm8Zjj.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-D9H3t7HP.js";import"./monaco-editor-DJSyif3I.js";import"./pt-BR-CLy76QW2.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-mcp-auth-status-DtWK2vVN.js";import"./DotsVertical-DD9vI7XN.js";import"./Play-CuYQk1-M.js";import"./use-debounced-autosave-B-9KRifB.js";import"./index-CzdD7w68.js";import"./search-input-Cav-R6u1.js";import"./switch-DJGvmJgh.js";import"./Users01-ConkK5Hy.js";import"./use-secrets-BCwf7s42.js";import"./format-time-BnbuEtat.js";import"./use-members-BOo6SBZf.js";import"./use-org-auth-client-B_HThHi-.js";import"./command-D8VZgYcp.js";import"./index-7i5MzulY.js";import"./useQueries-BIMkg7rJ.js";import"./SwitchHorizontal01-B1yag0Lu.js";import"./Palette-BQLbJJdf.js";import"./use-file-configs-BSbmDdF6.js";import"./use-automations-BebUXKcQ.js";import"./automation-list-row-BkrA0C81.js";import"./get-initials-D-f_fDFw.js";import"./HardDrive-2n4L-vNW.js";import"./LogOut01-CM9eugyU.js";import"./Sun-Cno0ZL2K.js";import"./Shield01-vx0tzuE8.js";import"./table-CUPzY57H.js";import"./use-clock-tick-Cso4aNFM.js";import"./use-copy-BNgRyC_N.js";import"./use-tags-CxtVjJTC.js";import"./companions-core-C6pGrBaV.js";function Jo(h){return h.schema?.definitions??h.schema?.$defs??{}}function Qo(h,e){const o=Jo(e),d=o[btoa(h)];if(!d)return;let m=typeof d.image=="string"?d.image:void 0;if(!m&&Array.isArray(d.allOf)){const x=d.allOf.find(b=>typeof b.$ref=="string")?.$ref;if(typeof x=="string"){const b=x.replace("#/definitions/",""),f=o[b];m=typeof f?.image=="string"?f.image:void 0}}if(m?.includes("{{{"))return m}function Xo(h,e){if(!e)return;const o=Ta(h);if(!o)return;const d=Qo(o.resolveType,e);if(!d)return;const m=Pa(d,o.data);if(m)return Aa(m)}const Zo="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",er="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 zn(h){return Array.from({length:h},(e,o)=>({id:crypto.randomUUID(),index:o}))}function bs(h){return h.map((e,o)=>({...e,index:o}))}function tr(h,e){if(e===h.length)return h;if(e<h.length)return bs(h.slice(0,e));const o=Array.from({length:e-h.length},(d,m)=>({id:crypto.randomUUID(),index:h.length+m}));return[...h,...o]}function ys(h){const e=Ue.c(20),{section:o,raw:d,meta:m}=h,x=o.isSavedBlock===!0,b=o.isMultivariate===!0;let f;e[0]!==m||e[1]!==d?(f=d&&m?Xo(d,m):void 0,e[0]=m,e[1]=d,e[2]=f):f=e[2];const v=f;let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(jo,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=u):u=e[3];let y;e[4]!==v?(y=v&&n.jsx("img",{src:v,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=v,e[5]=y):y=e[5];let k;e[6]!==b||e[7]!==x?(k=x?{color:La}:b?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=b,e[7]=x,e[8]=k):k=e[8];let D;e[9]!==k?(D=n.jsx(gn,{className:"h-4 w-4 shrink-0",style:k}),e[9]=k,e[10]=D):D=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 g;e[13]!==o.label||e[14]!==i?(g=n.jsx("span",{className:i,children:o.label}),e[13]=o.label,e[14]=i,e[15]=g):g=e[15];let r;return e[16]!==y||e[17]!==D||e[18]!==g?(r=n.jsxs(n.Fragment,{children:[u,y,D,g]}),e[16]=y,e[17]=D,e[18]=g,e[19]=r):r=e[19],r}function _s(h,e){const o=h.isSavedBlock===!0,d=h.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?Zo: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 nr(h){const e=Ue.c(81),{section:o,raw:d,meta:m,sortableId:x,selected:b,onSelect:f,onDelete:v,onDuplicate:u,onMakeReusable:y,onToggleHidden:k,onToggleLazy:D,onAddVariant:E,onDetach:i}=h,g=ct(),r=d?Xn(d.__resolveType??""):!1;let A;e[0]!==o?(A=Ca(o),e[0]=o,e[1]=A):A=e[1];const l=A;let R;e[2]!==x?(R={id:x,animateLayoutChanges:ir},e[2]=x,e[3]=R):R=e[3];const{attributes:K,listeners:z,setNodeRef:p,transform:N,isDragging:ie}=fs(R);let L;e[4]!==N?(L=ps.Transform.toString(N?{...N,x:0}:null),e[4]=N,e[5]=L):L=e[5];const ce=ie?0:void 0;let M;e[6]!==L||e[7]!==ce?(M={transform:L,opacity:ce},e[6]=L,e[7]=ce,e[8]=M):M=e[8];const ge=M;let O;e[9]!==o?(O=Ma(o),e[9]=o,e[10]=O):O=e[10];const ne=O,he="button",me=0;let I;e[11]!==f?(I=T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),f())},e[11]=f,e[12]=I):I=e[12];const J=ie?"cursor-grabbing":"cursor-pointer";let Z;e[13]!==o||e[14]!==b||e[15]!==J?(Z=Oe("touch-none transition-colors",J,_s(o,b)),e[13]=o,e[14]=b,e[15]=J,e[16]=Z):Z=e[16];let ee;e[17]!==m||e[18]!==d||e[19]!==o?(ee=n.jsx(ys,{section:o,raw:d,meta:m}),e[17]=m,e[18]=d,e[19]=o,e[20]=ee):ee=e[20];const $=!o.isMultivariate&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":g(r?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:Oe("h-7 w-7 shrink-0",r?"":"opacity-0 group-hover:opacity-100"),onClick:T=>{T.stopPropagation(),D()},onPointerDown:rr,children:n.jsx(Bo,{className:Oe("h-3.5 w-3.5",r&&"text-yellow-500")})})}),n.jsx(jt,{side:"bottom",children:g(r?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]});let Ae;e[21]!==k||e[22]!==o.isHidden||e[23]!==o.isMultivariate||e[24]!==g?(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?g("sectionsEditor.sectionList.showSection"):g("sectionsEditor.sectionList.hideSection"),className:Oe("h-7 w-7 shrink-0",o.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:T=>{T.stopPropagation(),k()},onPointerDown:or,children:o.isHidden?n.jsx(Ko,{className:"h-3.5 w-3.5"}):n.jsx(Lo,{className:"h-3.5 w-3.5"})})}),n.jsx(jt,{side:"bottom",children:o.isHidden?g("sectionsEditor.sectionList.showSection"):g("sectionsEditor.sectionList.hideSection")})]}),e[21]=k,e[22]=o.isHidden,e[23]=o.isMultivariate,e[24]=g,e[25]=Ae):Ae=e[25];let Me;e[26]!==g?(Me=g("sectionsEditor.sectionList.sectionActionsMenu"),e[26]=g,e[27]=Me):Me=e[27];let et;e[28]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(es,{className:"h-3.5 w-3.5"}),e[28]=et):et=e[28];let Se;e[29]!==Me?(Se=n.jsx(rs,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":Me,className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:ar,onPointerDown:sr,children:et})}),e[29]=Me,e[30]=Se):Se=e[30];let H;e[31]!==u?(H=T=>{T.stopPropagation(),u()},e[31]=u,e[32]=H):H=e[32];let se;e[33]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(ss,{className:"h-4 w-4"}),e[33]=se):se=e[33];let ae;e[34]!==g?(ae=g("sectionsEditor.sectionList.duplicateMenuItem"),e[34]=g,e[35]=ae):ae=e[35];let ue;e[36]!==H||e[37]!==ae?(ue=n.jsxs(ht,{onClick:H,children:[se,ae]}),e[36]=H,e[37]=ae,e[38]=ue):ue=e[38];let oe;e[39]!==l||e[40]!==E||e[41]!==g?(oe=l&&n.jsxs(ht,{className:Ka,onClick:T=>{T.stopPropagation(),E()},children:[n.jsx(as,{className:"h-4 w-4"}),g("sectionsEditor.sectionList.addVariantMenuItem")]}),e[39]=l,e[40]=E,e[41]=g,e[42]=oe):oe=e[42];let de;e[43]!==ne||e[44]!==y||e[45]!==g?(de=ne&&n.jsxs(ht,{className:er,onClick:T=>{T.stopPropagation(),y()},children:[n.jsx(gn,{className:"h-4 w-4"}),g("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[43]=ne,e[44]=y,e[45]=g,e[46]=de):de=e[46];let le;e[47]!==i||e[48]!==o.isMultivariate||e[49]!==o.isSavedBlock||e[50]!==g?(le=o.isSavedBlock===!0&&!o.isMultivariate&&n.jsxs(ht,{onClick:T=>{T.stopPropagation(),i()},children:[n.jsx(gn,{className:"h-4 w-4"}),g("sectionsEditor.sectionList.detachMenuItem")]}),e[47]=i,e[48]=o.isMultivariate,e[49]=o.isSavedBlock,e[50]=g,e[51]=le):le=e[51];let fe;e[52]!==v?(fe=T=>{T.stopPropagation(),v()},e[52]=v,e[53]=fe):fe=e[53];let De;e[54]===Symbol.for("react.memo_cache_sentinel")?(De=n.jsx(os,{className:"h-4 w-4"}),e[54]=De):De=e[54];let je;e[55]!==g?(je=g("sectionsEditor.sectionList.deleteMenuItem"),e[55]=g,e[56]=je):je=e[56];let re;e[57]!==fe||e[58]!==je?(re=n.jsxs(ht,{className:"text-destructive focus:text-destructive",onClick:fe,children:[De,je]}),e[57]=fe,e[58]=je,e[59]=re):re=e[59];let pe;e[60]!==ue||e[61]!==oe||e[62]!==de||e[63]!==le||e[64]!==re?(pe=n.jsxs(is,{align:"end",className:"w-44",children:[ue,oe,de,le,re]}),e[60]=ue,e[61]=oe,e[62]=de,e[63]=le,e[64]=re,e[65]=pe):pe=e[65];let xe;e[66]!==Se||e[67]!==pe?(xe=n.jsxs(ls,{children:[Se,pe]}),e[66]=Se,e[67]=pe,e[68]=xe):xe=e[68];let be;return e[69]!==K||e[70]!==z||e[71]!==f||e[72]!==p||e[73]!==ge||e[74]!==Z||e[75]!==ee||e[76]!==$||e[77]!==Ae||e[78]!==xe||e[79]!==I?(be=n.jsxs("div",{ref:p,style:ge,...K,...z,role:he,tabIndex:me,onClick:f,onKeyDown:I,className:Z,children:[ee,$,Ae,xe]}),e[69]=K,e[70]=z,e[71]=f,e[72]=p,e[73]=ge,e[74]=Z,e[75]=ee,e[76]=$,e[77]=Ae,e[78]=xe,e[79]=I,e[80]=be):be=e[80],be}function sr(h){return h.stopPropagation()}function ar(h){return h.stopPropagation()}function or(h){return h.stopPropagation()}function rr(h){return h.stopPropagation()}function ir(){return!1}function lr(h){const e=Ue.c(104),{listKey:o,rawSections:d,sections:m,meta:x,selectedIndex:b,onSelect:f,onReorder:v,onDelete:u,onDuplicate:y,onMakeReusable:k,onToggleHidden:D,onToggleLazy:E,onAddVariant:i,onDetach:g,onAddSection:r,canAddSection:A}=h,l=A===void 0?!0:A,R=ct();let K;e[0]!==m.length?(K=()=>zn(m.length),e[0]=m.length,e[1]=K):K=e[1];const[z,p]=w.useState(K),[N,ie]=w.useState(null),[L,ce]=w.useState(o),[M,ge]=w.useState(m.length),O=w.useRef(!1);L!==o?(ce(o),ge(m.length),p(zn(m.length))):M!==m.length&&(ge(m.length),p(ze=>tr(ze,m.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:gs},e[3]=he):he=e[3];const me=cs(Jt(ds,ne),Jt(us,he));let I;e[4]!==z?(I=z.map(cr),e[4]=z,e[5]=I):I=e[5];const J=I;let Z;e[6]===Symbol.for("react.memo_cache_sentinel")?(Z=ze=>{ie(String(ze.active.id))},e[6]=Z):Z=e[6];const ee=Z;let $;e[7]!==J||e[8]!==v?($=ze=>{ie(null);const{active:B,over:F}=ze;if(!F||B.id===F.id)return;const G=J.indexOf(String(B.id)),nt=J.indexOf(String(F.id));G===-1||nt===-1||(p(Re=>bs(Mt([...Re],G,nt))),O.current=!0,requestAnimationFrame(()=>{O.current=!1}),v?.(G,nt))},e[7]=J,e[8]=v,e[9]=$):$=e[9];const Ae=$;let Me;e[10]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>{ie(null)},e[10]=Me):Me=e[10];const et=Me;let Se,H,se,ae,ue,oe,de,le,fe,De,je,re,pe,xe,be;if(e[11]!==N||e[12]!==l||e[13]!==z||e[14]!==J||e[15]!==Ae||e[16]!==x||e[17]!==r||e[18]!==i||e[19]!==u||e[20]!==g||e[21]!==y||e[22]!==k||e[23]!==f||e[24]!==D||e[25]!==E||e[26]!==d||e[27]!==m||e[28]!==b||e[29]!==me||e[30]!==R){xe=Symbol.for("react.early_return_sentinel");e:{const ze=B=>{O.current||f(B)};if(e[46]!==N||e[47]!==l||e[48]!==z||e[49]!==r||e[50]!==d||e[51]!==m||e[52]!==R){const B=N?z.find(F=>F.id===N):null;if(ae=B!=null?m[B.index]:null,se=B!=null?d[B.index]:void 0,z.length===0){let F;e[56]!==R?(F=R("sectionsEditor.sectionList.noSections"),e[56]=R,e[57]=F):F=e[57];let G;e[58]!==F?(G=n.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:F}),e[58]=F,e[59]=G):G=e[59];const nt=!l;let Re;e[60]===Symbol.for("react.memo_cache_sentinel")?(Re=n.jsx(hn,{size:14}),e[60]=Re):Re=e[60];let We;e[61]!==R?(We=R("sectionsEditor.sectionList.addSectionButton"),e[61]=R,e[62]=We):We=e[62];let Ne;e[63]!==r||e[64]!==nt||e[65]!==We?(Ne=n.jsxs(Qe,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:nt,onClick:r,children:[Re,We]}),e[63]=r,e[64]=nt,e[65]=We,e[66]=Ne):Ne=e[66];let vt;e[67]!==G||e[68]!==Ne?(vt=n.jsxs("div",{className:"space-y-2",children:[G,Ne]}),e[67]=G,e[68]=Ne,e[69]=vt):vt=e[69],xe=vt;break e}pe=Oe(B&&"cursor-grabbing"),e[46]=N,e[47]=l,e[48]=z,e[49]=r,e[50]=d,e[51]=m,e[52]=R,e[53]=se,e[54]=ae,e[55]=pe}else se=e[53],ae=e[54],pe=e[55];H=hs,le=me,fe=vs,De=ee,je=Ae,re=et,Se=Ss,oe=J,de=xs,be="space-y-1",ue=z.map(B=>{const F=m[B.index];return F?n.jsx(nr,{sortableId:B.id,section:F,raw:d[B.index],meta:x,selected:b===B.index,onSelect:()=>ze(B.index),onDelete:()=>u(B.index),onDuplicate:()=>y(B.index),onMakeReusable:()=>k(B.index),onToggleHidden:()=>D(B.index),onToggleLazy:()=>E(B.index),onAddVariant:()=>i(B.index),onDetach:()=>g(B.index)},B.id):null})}e[11]=N,e[12]=l,e[13]=z,e[14]=J,e[15]=Ae,e[16]=x,e[17]=r,e[18]=i,e[19]=u,e[20]=g,e[21]=y,e[22]=k,e[23]=f,e[24]=D,e[25]=E,e[26]=d,e[27]=m,e[28]=b,e[29]=me,e[30]=R,e[31]=Se,e[32]=H,e[33]=se,e[34]=ae,e[35]=ue,e[36]=oe,e[37]=de,e[38]=le,e[39]=fe,e[40]=De,e[41]=je,e[42]=re,e[43]=pe,e[44]=xe,e[45]=be}else Se=e[31],H=e[32],se=e[33],ae=e[34],ue=e[35],oe=e[36],de=e[37],le=e[38],fe=e[39],De=e[40],je=e[41],re=e[42],pe=e[43],xe=e[44],be=e[45];if(xe!==Symbol.for("react.early_return_sentinel"))return xe;let T;e[70]!==ue||e[71]!==be?(T=n.jsx("div",{className:be,children:ue}),e[70]=ue,e[71]=be,e[72]=T):T=e[72];let Ke;e[73]!==Se||e[74]!==oe||e[75]!==de||e[76]!==T?(Ke=n.jsx(Se,{items:oe,strategy:de,children:T}),e[73]=Se,e[74]=oe,e[75]=de,e[76]=T,e[77]=Ke):Ke=e[77];let Ie;e[78]!==se||e[79]!==ae||e[80]!==x?(Ie=ae?n.jsx("div",{className:Oe("cursor-grabbing shadow-lg ring-1 ring-border/60",_s(ae,!1)),children:n.jsx(ys,{section:ae,raw:se,meta:x})}):null,e[78]=se,e[79]=ae,e[80]=x,e[81]=Ie):Ie=e[81];let Ge;e[82]!==Ie?(Ge=Yn.createPortal(n.jsx(ms,{dropAnimation:Qn,children:Ie}),document.body),e[82]=Ie,e[83]=Ge):Ge=e[83];let $e;e[84]!==H||e[85]!==le||e[86]!==fe||e[87]!==De||e[88]!==je||e[89]!==re||e[90]!==Ke||e[91]!==Ge?($e=n.jsxs(H,{sensors:le,collisionDetection:fe,onDragStart:De,onDragEnd:je,onDragCancel:re,children:[Ke,Ge]}),e[84]=H,e[85]=le,e[86]=fe,e[87]=De,e[88]=je,e[89]=re,e[90]=Ke,e[91]=Ge,e[92]=$e):$e=e[92];const Ee=!l;let ye;e[93]===Symbol.for("react.memo_cache_sentinel")?(ye=n.jsx(hn,{size:14}),e[93]=ye):ye=e[93];let ke;e[94]!==R?(ke=R("sectionsEditor.sectionList.addSectionButton"),e[94]=R,e[95]=ke):ke=e[95];let Le;e[96]!==r||e[97]!==Ee||e[98]!==ke?(Le=n.jsxs(Qe,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:Ee,onClick:r,children:[ye,ke]}),e[96]=r,e[97]=Ee,e[98]=ke,e[99]=Le):Le=e[99];let Te;return e[100]!==pe||e[101]!==$e||e[102]!==Le?(Te=n.jsxs("div",{className:pe,children:[$e,Le]}),e[100]=pe,e[101]=$e,e[102]=Le,e[103]=Te):Te=e[103],Te}function cr(h){return h.id}function Hn(h){const e=Ue.c(57),{open:o,initialName:d,autoLabel:m,isPending:x,onSubmit:b,onOpenChange:f}=h,v=x===void 0?!1:x,u=ct(),[y,k]=w.useState(d),[D,E]=w.useState(o);o!==D&&(E(o),o&&k(d));let i;e[0]!==v||e[1]!==f?(i=ee=>{!ee&&!v&&f(!1)},e[0]=v,e[1]=f,e[2]=i):i=e[2];const g=i;let r;e[3]!==v||e[4]!==y||e[5]!==b?(r=async ee=>{ee.preventDefault(),!v&&await b(y.trim())},e[3]=v,e[4]=y,e[5]=b,e[6]=r):r=e[6];const A=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(No,{children:l}),e[9]=l,e[10]=R):R=e[10];let K;e[11]!==m||e[12]!==u?(K=u("sectionsEditor.variantRenameDialog.description",{fallback:m||u("sectionsEditor.variantRenameDialog.defaultFallback")}),e[11]=m,e[12]=u,e[13]=K):K=e[13];let z;e[14]!==K?(z=n.jsx(Do,{children:K}),e[14]=K,e[15]=z):z=e[15];let p;e[16]!==R||e[17]!==z?(p=n.jsxs(To,{children:[R,z]}),e[16]=R,e[17]=z,e[18]=p):p=e[18];let N;e[19]!==u?(N=u("sectionsEditor.variantRenameDialog.nameLabel"),e[19]=u,e[20]=N):N=e[20];let ie;e[21]!==N?(ie=n.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:N}),e[21]=N,e[22]=ie):ie=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 ce;e[24]!==m||e[25]!==v||e[26]!==y?(ce=n.jsx(Mo,{id:"variant-rename-name",value:y,onChange:L,placeholder:m,autoFocus:!0,disabled:v}),e[24]=m,e[25]=v,e[26]=y,e[27]=ce):ce=e[27];let M;e[28]!==ie||e[29]!==ce?(M=n.jsxs("div",{className:"space-y-1.5 py-4",children:[ie,ce]}),e[28]=ie,e[29]=ce,e[30]=M):M=e[30];let ge;e[31]!==f?(ge=()=>f(!1),e[31]=f,e[32]=ge):ge=e[32];let O;e[33]!==u?(O=u("sectionsEditor.variantRenameDialog.cancel"),e[33]=u,e[34]=O):O=e[34];let ne;e[35]!==v||e[36]!==ge||e[37]!==O?(ne=n.jsx(Qe,{type:"button",variant:"outline",onClick:ge,disabled:v,children:O}),e[35]=v,e[36]=ge,e[37]=O,e[38]=ne):ne=e[38];let he;e[39]!==v||e[40]!==u?(he=v?n.jsxs(n.Fragment,{children:[n.jsx(Jn,{size:14,className:"animate-spin"}),u("sectionsEditor.variantRenameDialog.saving")]}):u("sectionsEditor.variantRenameDialog.save"),e[39]=v,e[40]=u,e[41]=he):he=e[41];let me;e[42]!==v||e[43]!==he?(me=n.jsx(Qe,{type:"submit",disabled:v,children:he}),e[42]=v,e[43]=he,e[44]=me):me=e[44];let I;e[45]!==ne||e[46]!==me?(I=n.jsxs(Po,{children:[ne,me]}),e[45]=ne,e[46]=me,e[47]=I):I=e[47];let J;e[48]!==A||e[49]!==M||e[50]!==I||e[51]!==p?(J=n.jsx(Ao,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:A,children:[p,M,I]})}),e[48]=A,e[49]=M,e[50]=I,e[51]=p,e[52]=J):J=e[52];let Z;return e[53]!==g||e[54]!==o||e[55]!==J?(Z=n.jsx(Co,{open:o,onOpenChange:g,children:J}),e[53]=g,e[54]=o,e[55]=J,e[56]=Z):Z=e[56],Z}const ur="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)]",js="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 Es(h){const e=Ue.c(5),{rule:o,matchers:d}=h,m=o?.__resolveType??"";let x;if(e[0]!==d||e[1]!==m){const u=d.find(y=>y.resolveType===m)?.iconName??Ba(m);x=Eo(u),e[0]=d,e[1]=m,e[2]=x}else x=e[2];const b=x;if(!b)return null;let f;return e[3]!==b?(f=n.jsx(b,{size:14,className:"shrink-0"}),e[3]=b,e[4]=f):f=e[4],f}function Gn(h){return h.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
1
|
+
import{c as Ue,b as ct,r as w,m as Oe,j as n,ag as Yn,B as Qe,k as Jn,o as Na,t as X,K as Da}from"./index-bSjz3FLt.js";import{a6 as Ta,a7 as Pa,a8 as Aa,a9 as Qn,aa as Xn,ab as Ca,ac as Ma,ad as Ka,N as La,ae as Ba,af as Ct,ag as Fa,S as Zn,ah as lt,ai as Oa,aj as Ia,ak as $a,al as za,D as Ha,F as Ga,am as Ua,an as Wa,ao as qa,ap as Ya,a0 as Gt,aq as Ut,ar as Ja,as as xt,at as Tt,au as Qa,av as Xa,aw as tt,ax as Mn,ay as Za,az as Pt,aA as Wt,aB as eo,aC as dn,aD as to,aE as wt,aF as no,aG as so,aH as ao,aI as oo,aJ as ro,aK as bt,aL as io,aM as lo,aN as co,H as uo,aO as Kn,aP as At,aQ as Ln,aR as Bn,aS as mo,aT as fo,aU as po,aV as go,aW as mn,aX as Fn,aY as On,aZ as Vt,a_ as qt,a$ as In,b0 as ho,b1 as fn,b2 as vo,b3 as So,b4 as xo,b5 as bo,b6 as yo}from"./index-B3Lyzc7o.js";import{t as _o}from"./ChevronDown-DTyVSvpW.js";import{a3 as gn,x as jo,X as es,I as Eo,w as ts,a5 as ko,a6 as Ro}from"./agent-icon-DvITB4KO.js";import{i as ns}from"./ChevronRight-MVnPAPii.js";import{n as wo}from"./ChevronUp-DNXgZ_10.js";import{i as Vo}from"./Tool02-BcNfyibb.js";import{l as Yt}from"./automation-runs-CgyKaz2R.js";import{c as yt,T as _t,a as jt}from"./tooltip-Bfr58shw.js";import{b as No,h as Do,a as To,c as Po,d as Ao,e as Co}from"./dialog-BSwzm_xb.js";import{I as Mo}from"./input-mwCJa3UC.js";import{a as ss}from"./Copy01-CKPJ5IhB.js";import{i as Ko}from"./Settings02-CzRrS-qR.js";import{s as Lo}from"./Eye-DydEPicd.js";import{s as as}from"./TrendUp01-4daEWKyg.js";import{s as hn}from"./Plus-hTCIWDtE.js";import{s as os}from"./Trash01--2hLWyEP.js";import{i as Bo}from"./Zap-0Vx8dn_e.js";import{a as ht,D as rs,b as is,c as ls,i as Fo}from"./dropdown-menu-b_BfGjG2.js";import{o as cs,p as Jt,K as us,P as ds,q as ms,z as fs,C as ps,A as gs,B as Mt,D as hs,v as vs,x as Ss,y as xs}from"./index-Pe4ypjX9.js";import{S as Oo,r as $n,u as Io,d as $o,a as zo,i as Ho,f as Go,P as Uo,b as Wo}from"./page-seo-form-CP8D3Ih-.js";import{c as qo}from"./Tool01-D_lBKESF.js";import{A as Yo}from"./add-section-modal-J4MpuN5T.js";import"./ArrowUp-DWMmuZz_.js";import"./chat-context-BbbE9k_D.js";import"./tab-id-D_shElJ5.js";import"./Check-BVpJjApv.js";import"./hooks-Bva17Au4.js";import"./use-mcp-client-BcyA1fq6.js";import"./auth-C7EjAKuK.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-C5huenWS.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-Bujf-aIR.js";import"./use-ai-providers-b8vjAuOw.js";import"./studio-tools-CnY1iRfX.js";import"./use-decopilot-events-D8GZCmLu.js";import"./use-organization-settings-B7aJIu7V.js";import"./spinner-CT6gj-U7.js";import"./drawer-Bs_TJ-Xq.js";import"./collection-search-Cz6kdWMP.js";import"./SearchMd-CGs342fz.js";import"./use-mobile-DtJ9mqo3.js";import"./AreaChart-DbP5hfAi.js";import"./index-r7ibRdki.js";import"./calendar-CX7YfHEa.js";import"./X-BcM56kD2.js";import"./shell-layout-nGpsxb9b.js";import"./avatar-BN0lsHoN.js";import"./User01-Ddv0yRQm.js";import"./Users03-C-1TY48R.js";import"./SearchLg-CEMI_Yu5.js";import"./Stars02-JSRi49Xl.js";import"./XClose-BMHkS-kz.js";import"./CheckCircle-DqPpDLAb.js";import"./CpuChip01-Du71UW4x.js";import"./FilterLines-BJV5RK1l.js";import"./Monitor01-B6vkAJLy.js";import"./required-auth-layout-DNnOiPNc.js";import"./use-org-sso-9IKzvoT7.js";import"./ZapSquare-Nv0rijSe.js";import"./Star01-BetPRMOP.js";import"./Upload01-CpoC4YD6.js";import"./AlertCircle-B9QqDYpV.js";import"./form-DH41eKNk.js";import"./label-BdYpUysi.js";import"./select-C_F8-amA.js";import"./XCircle-B8N2lyCq.js";import"./tabs-CU_nfhem.js";import"./toggle-group-DGoI3Yg0.js";import"./use-deco-credits-Ds-jb_dO.js";import"./sidebar-ZY9Na73j.js";import"./LayoutLeft-Ciwgy5UL.js";import"./popover-NHkLoGwZ.js";import"./alert-dialog-B9G0eJ9-.js";import"./toolbar-DI-Q6oWY.js";import"./skeleton-CHQGQrAg.js";import"./github-repo-picker-B3yLKSRu.js";import"./use-debounced-value-GljL4VOJ.js";import"./use-connection-BzH0Kdzc.js";import"./authenticate-and-persist-oauth-Drw6R7zD.js";import"./mcp-oauth-CFh8Fy0x.js";import"./LinkExternal01--DLqIMAa.js";import"./use-mcp-tools-Dsxlr_F7.js";import"./extract-connection-data-CD7g_CXG.js";import"./metadata-dUsYcpuu.js";import"./use-navigate-to-agent-B56yEq2x.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-CAXumITS.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-DDBFrRVD.js";import"./use-registry-connections-B--YAga1.js";import"./useInfiniteQuery-gU5karM4.js";import"./use-infinite-scroll-Cg9HfQoH.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-Dwttk7rT.js";import"./integration-icon-Dw-S_xW-.js";import"./textarea-BNXibmKi.js";import"./connection-form-helpers-B7chcMcT.js";import"./collection-tabs-DySS3fYR.js";import"./badge-ClnYkgjJ.js";import"./useSuspenseInfiniteQuery-DfcVoJ9U.js";import"./select-model-DQDGLP7u.js";import"./checkbox-CpYf9_vX.js";import"./Key01-DuDppfi_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BgUHQSVM.js";import"./ArrowUpRight-BWTRGGcn.js";import"./Stars01-DQgIK8ZP.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DGy4iLtW.js";import"./empty-state-p3Rv7ykT.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-CamUh6kt.js";import"./monaco-editor-DLbVfQ_7.js";import"./pt-BR-CLy76QW2.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-mcp-auth-status-BqOdulae.js";import"./DotsVertical-0qwliDrg.js";import"./Play-C5V2_mAu.js";import"./use-debounced-autosave-D3rcIunV.js";import"./index-m3kwuU8_.js";import"./search-input-D80HsBNG.js";import"./switch-g5eZwQWn.js";import"./Users01-B0XXonaO.js";import"./use-secrets-DWxO4tT-.js";import"./format-time-BnbuEtat.js";import"./use-members-BPAn97Ac.js";import"./use-org-auth-client-BbxxaMLu.js";import"./command-CBET95DA.js";import"./index-BXC1jJIv.js";import"./useQueries-CC6kPLN8.js";import"./SwitchHorizontal01-GLaQT_tZ.js";import"./Palette-BoJouFtF.js";import"./use-file-configs-Cyy8AsxM.js";import"./use-automations-D6FStJIQ.js";import"./automation-list-row-B6zoK1J4.js";import"./get-initials-D-f_fDFw.js";import"./HardDrive-CGeasvVZ.js";import"./LogOut01-DMqcCuTY.js";import"./Sun-OLuqlB9J.js";import"./Shield01-b0Ri5_gK.js";import"./table-DUzcE7pw.js";import"./use-clock-tick-XnKcERte.js";import"./use-copy-Bb3AUakA.js";import"./use-tags-CRJNGby7.js";import"./companions-core-DfxidC-a.js";function Jo(h){return h.schema?.definitions??h.schema?.$defs??{}}function Qo(h,e){const o=Jo(e),d=o[btoa(h)];if(!d)return;let m=typeof d.image=="string"?d.image:void 0;if(!m&&Array.isArray(d.allOf)){const x=d.allOf.find(b=>typeof b.$ref=="string")?.$ref;if(typeof x=="string"){const b=x.replace("#/definitions/",""),f=o[b];m=typeof f?.image=="string"?f.image:void 0}}if(m?.includes("{{{"))return m}function Xo(h,e){if(!e)return;const o=Ta(h);if(!o)return;const d=Qo(o.resolveType,e);if(!d)return;const m=Pa(d,o.data);if(m)return Aa(m)}const Zo="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",er="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 zn(h){return Array.from({length:h},(e,o)=>({id:crypto.randomUUID(),index:o}))}function bs(h){return h.map((e,o)=>({...e,index:o}))}function tr(h,e){if(e===h.length)return h;if(e<h.length)return bs(h.slice(0,e));const o=Array.from({length:e-h.length},(d,m)=>({id:crypto.randomUUID(),index:h.length+m}));return[...h,...o]}function ys(h){const e=Ue.c(20),{section:o,raw:d,meta:m}=h,x=o.isSavedBlock===!0,b=o.isMultivariate===!0;let f;e[0]!==m||e[1]!==d?(f=d&&m?Xo(d,m):void 0,e[0]=m,e[1]=d,e[2]=f):f=e[2];const v=f;let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(jo,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=u):u=e[3];let y;e[4]!==v?(y=v&&n.jsx("img",{src:v,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=v,e[5]=y):y=e[5];let k;e[6]!==b||e[7]!==x?(k=x?{color:La}:b?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=b,e[7]=x,e[8]=k):k=e[8];let D;e[9]!==k?(D=n.jsx(gn,{className:"h-4 w-4 shrink-0",style:k}),e[9]=k,e[10]=D):D=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 g;e[13]!==o.label||e[14]!==i?(g=n.jsx("span",{className:i,children:o.label}),e[13]=o.label,e[14]=i,e[15]=g):g=e[15];let r;return e[16]!==y||e[17]!==D||e[18]!==g?(r=n.jsxs(n.Fragment,{children:[u,y,D,g]}),e[16]=y,e[17]=D,e[18]=g,e[19]=r):r=e[19],r}function _s(h,e){const o=h.isSavedBlock===!0,d=h.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?Zo: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 nr(h){const e=Ue.c(81),{section:o,raw:d,meta:m,sortableId:x,selected:b,onSelect:f,onDelete:v,onDuplicate:u,onMakeReusable:y,onToggleHidden:k,onToggleLazy:D,onAddVariant:E,onDetach:i}=h,g=ct(),r=d?Xn(d.__resolveType??""):!1;let A;e[0]!==o?(A=Ca(o),e[0]=o,e[1]=A):A=e[1];const l=A;let R;e[2]!==x?(R={id:x,animateLayoutChanges:ir},e[2]=x,e[3]=R):R=e[3];const{attributes:K,listeners:z,setNodeRef:p,transform:N,isDragging:ie}=fs(R);let L;e[4]!==N?(L=ps.Transform.toString(N?{...N,x:0}:null),e[4]=N,e[5]=L):L=e[5];const ce=ie?0:void 0;let M;e[6]!==L||e[7]!==ce?(M={transform:L,opacity:ce},e[6]=L,e[7]=ce,e[8]=M):M=e[8];const ge=M;let O;e[9]!==o?(O=Ma(o),e[9]=o,e[10]=O):O=e[10];const ne=O,he="button",me=0;let I;e[11]!==f?(I=T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),f())},e[11]=f,e[12]=I):I=e[12];const J=ie?"cursor-grabbing":"cursor-pointer";let Z;e[13]!==o||e[14]!==b||e[15]!==J?(Z=Oe("touch-none transition-colors",J,_s(o,b)),e[13]=o,e[14]=b,e[15]=J,e[16]=Z):Z=e[16];let ee;e[17]!==m||e[18]!==d||e[19]!==o?(ee=n.jsx(ys,{section:o,raw:d,meta:m}),e[17]=m,e[18]=d,e[19]=o,e[20]=ee):ee=e[20];const $=!o.isMultivariate&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":g(r?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:Oe("h-7 w-7 shrink-0",r?"":"opacity-0 group-hover:opacity-100"),onClick:T=>{T.stopPropagation(),D()},onPointerDown:rr,children:n.jsx(Bo,{className:Oe("h-3.5 w-3.5",r&&"text-yellow-500")})})}),n.jsx(jt,{side:"bottom",children:g(r?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]});let Ae;e[21]!==k||e[22]!==o.isHidden||e[23]!==o.isMultivariate||e[24]!==g?(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?g("sectionsEditor.sectionList.showSection"):g("sectionsEditor.sectionList.hideSection"),className:Oe("h-7 w-7 shrink-0",o.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:T=>{T.stopPropagation(),k()},onPointerDown:or,children:o.isHidden?n.jsx(Ko,{className:"h-3.5 w-3.5"}):n.jsx(Lo,{className:"h-3.5 w-3.5"})})}),n.jsx(jt,{side:"bottom",children:o.isHidden?g("sectionsEditor.sectionList.showSection"):g("sectionsEditor.sectionList.hideSection")})]}),e[21]=k,e[22]=o.isHidden,e[23]=o.isMultivariate,e[24]=g,e[25]=Ae):Ae=e[25];let Me;e[26]!==g?(Me=g("sectionsEditor.sectionList.sectionActionsMenu"),e[26]=g,e[27]=Me):Me=e[27];let et;e[28]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(es,{className:"h-3.5 w-3.5"}),e[28]=et):et=e[28];let Se;e[29]!==Me?(Se=n.jsx(rs,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":Me,className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:ar,onPointerDown:sr,children:et})}),e[29]=Me,e[30]=Se):Se=e[30];let H;e[31]!==u?(H=T=>{T.stopPropagation(),u()},e[31]=u,e[32]=H):H=e[32];let se;e[33]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(ss,{className:"h-4 w-4"}),e[33]=se):se=e[33];let ae;e[34]!==g?(ae=g("sectionsEditor.sectionList.duplicateMenuItem"),e[34]=g,e[35]=ae):ae=e[35];let ue;e[36]!==H||e[37]!==ae?(ue=n.jsxs(ht,{onClick:H,children:[se,ae]}),e[36]=H,e[37]=ae,e[38]=ue):ue=e[38];let oe;e[39]!==l||e[40]!==E||e[41]!==g?(oe=l&&n.jsxs(ht,{className:Ka,onClick:T=>{T.stopPropagation(),E()},children:[n.jsx(as,{className:"h-4 w-4"}),g("sectionsEditor.sectionList.addVariantMenuItem")]}),e[39]=l,e[40]=E,e[41]=g,e[42]=oe):oe=e[42];let de;e[43]!==ne||e[44]!==y||e[45]!==g?(de=ne&&n.jsxs(ht,{className:er,onClick:T=>{T.stopPropagation(),y()},children:[n.jsx(gn,{className:"h-4 w-4"}),g("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[43]=ne,e[44]=y,e[45]=g,e[46]=de):de=e[46];let le;e[47]!==i||e[48]!==o.isMultivariate||e[49]!==o.isSavedBlock||e[50]!==g?(le=o.isSavedBlock===!0&&!o.isMultivariate&&n.jsxs(ht,{onClick:T=>{T.stopPropagation(),i()},children:[n.jsx(gn,{className:"h-4 w-4"}),g("sectionsEditor.sectionList.detachMenuItem")]}),e[47]=i,e[48]=o.isMultivariate,e[49]=o.isSavedBlock,e[50]=g,e[51]=le):le=e[51];let fe;e[52]!==v?(fe=T=>{T.stopPropagation(),v()},e[52]=v,e[53]=fe):fe=e[53];let De;e[54]===Symbol.for("react.memo_cache_sentinel")?(De=n.jsx(os,{className:"h-4 w-4"}),e[54]=De):De=e[54];let je;e[55]!==g?(je=g("sectionsEditor.sectionList.deleteMenuItem"),e[55]=g,e[56]=je):je=e[56];let re;e[57]!==fe||e[58]!==je?(re=n.jsxs(ht,{className:"text-destructive focus:text-destructive",onClick:fe,children:[De,je]}),e[57]=fe,e[58]=je,e[59]=re):re=e[59];let pe;e[60]!==ue||e[61]!==oe||e[62]!==de||e[63]!==le||e[64]!==re?(pe=n.jsxs(is,{align:"end",className:"w-44",children:[ue,oe,de,le,re]}),e[60]=ue,e[61]=oe,e[62]=de,e[63]=le,e[64]=re,e[65]=pe):pe=e[65];let xe;e[66]!==Se||e[67]!==pe?(xe=n.jsxs(ls,{children:[Se,pe]}),e[66]=Se,e[67]=pe,e[68]=xe):xe=e[68];let be;return e[69]!==K||e[70]!==z||e[71]!==f||e[72]!==p||e[73]!==ge||e[74]!==Z||e[75]!==ee||e[76]!==$||e[77]!==Ae||e[78]!==xe||e[79]!==I?(be=n.jsxs("div",{ref:p,style:ge,...K,...z,role:he,tabIndex:me,onClick:f,onKeyDown:I,className:Z,children:[ee,$,Ae,xe]}),e[69]=K,e[70]=z,e[71]=f,e[72]=p,e[73]=ge,e[74]=Z,e[75]=ee,e[76]=$,e[77]=Ae,e[78]=xe,e[79]=I,e[80]=be):be=e[80],be}function sr(h){return h.stopPropagation()}function ar(h){return h.stopPropagation()}function or(h){return h.stopPropagation()}function rr(h){return h.stopPropagation()}function ir(){return!1}function lr(h){const e=Ue.c(104),{listKey:o,rawSections:d,sections:m,meta:x,selectedIndex:b,onSelect:f,onReorder:v,onDelete:u,onDuplicate:y,onMakeReusable:k,onToggleHidden:D,onToggleLazy:E,onAddVariant:i,onDetach:g,onAddSection:r,canAddSection:A}=h,l=A===void 0?!0:A,R=ct();let K;e[0]!==m.length?(K=()=>zn(m.length),e[0]=m.length,e[1]=K):K=e[1];const[z,p]=w.useState(K),[N,ie]=w.useState(null),[L,ce]=w.useState(o),[M,ge]=w.useState(m.length),O=w.useRef(!1);L!==o?(ce(o),ge(m.length),p(zn(m.length))):M!==m.length&&(ge(m.length),p(ze=>tr(ze,m.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:gs},e[3]=he):he=e[3];const me=cs(Jt(ds,ne),Jt(us,he));let I;e[4]!==z?(I=z.map(cr),e[4]=z,e[5]=I):I=e[5];const J=I;let Z;e[6]===Symbol.for("react.memo_cache_sentinel")?(Z=ze=>{ie(String(ze.active.id))},e[6]=Z):Z=e[6];const ee=Z;let $;e[7]!==J||e[8]!==v?($=ze=>{ie(null);const{active:B,over:F}=ze;if(!F||B.id===F.id)return;const G=J.indexOf(String(B.id)),nt=J.indexOf(String(F.id));G===-1||nt===-1||(p(Re=>bs(Mt([...Re],G,nt))),O.current=!0,requestAnimationFrame(()=>{O.current=!1}),v?.(G,nt))},e[7]=J,e[8]=v,e[9]=$):$=e[9];const Ae=$;let Me;e[10]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>{ie(null)},e[10]=Me):Me=e[10];const et=Me;let Se,H,se,ae,ue,oe,de,le,fe,De,je,re,pe,xe,be;if(e[11]!==N||e[12]!==l||e[13]!==z||e[14]!==J||e[15]!==Ae||e[16]!==x||e[17]!==r||e[18]!==i||e[19]!==u||e[20]!==g||e[21]!==y||e[22]!==k||e[23]!==f||e[24]!==D||e[25]!==E||e[26]!==d||e[27]!==m||e[28]!==b||e[29]!==me||e[30]!==R){xe=Symbol.for("react.early_return_sentinel");e:{const ze=B=>{O.current||f(B)};if(e[46]!==N||e[47]!==l||e[48]!==z||e[49]!==r||e[50]!==d||e[51]!==m||e[52]!==R){const B=N?z.find(F=>F.id===N):null;if(ae=B!=null?m[B.index]:null,se=B!=null?d[B.index]:void 0,z.length===0){let F;e[56]!==R?(F=R("sectionsEditor.sectionList.noSections"),e[56]=R,e[57]=F):F=e[57];let G;e[58]!==F?(G=n.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:F}),e[58]=F,e[59]=G):G=e[59];const nt=!l;let Re;e[60]===Symbol.for("react.memo_cache_sentinel")?(Re=n.jsx(hn,{size:14}),e[60]=Re):Re=e[60];let We;e[61]!==R?(We=R("sectionsEditor.sectionList.addSectionButton"),e[61]=R,e[62]=We):We=e[62];let Ne;e[63]!==r||e[64]!==nt||e[65]!==We?(Ne=n.jsxs(Qe,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:nt,onClick:r,children:[Re,We]}),e[63]=r,e[64]=nt,e[65]=We,e[66]=Ne):Ne=e[66];let vt;e[67]!==G||e[68]!==Ne?(vt=n.jsxs("div",{className:"space-y-2",children:[G,Ne]}),e[67]=G,e[68]=Ne,e[69]=vt):vt=e[69],xe=vt;break e}pe=Oe(B&&"cursor-grabbing"),e[46]=N,e[47]=l,e[48]=z,e[49]=r,e[50]=d,e[51]=m,e[52]=R,e[53]=se,e[54]=ae,e[55]=pe}else se=e[53],ae=e[54],pe=e[55];H=hs,le=me,fe=vs,De=ee,je=Ae,re=et,Se=Ss,oe=J,de=xs,be="space-y-1",ue=z.map(B=>{const F=m[B.index];return F?n.jsx(nr,{sortableId:B.id,section:F,raw:d[B.index],meta:x,selected:b===B.index,onSelect:()=>ze(B.index),onDelete:()=>u(B.index),onDuplicate:()=>y(B.index),onMakeReusable:()=>k(B.index),onToggleHidden:()=>D(B.index),onToggleLazy:()=>E(B.index),onAddVariant:()=>i(B.index),onDetach:()=>g(B.index)},B.id):null})}e[11]=N,e[12]=l,e[13]=z,e[14]=J,e[15]=Ae,e[16]=x,e[17]=r,e[18]=i,e[19]=u,e[20]=g,e[21]=y,e[22]=k,e[23]=f,e[24]=D,e[25]=E,e[26]=d,e[27]=m,e[28]=b,e[29]=me,e[30]=R,e[31]=Se,e[32]=H,e[33]=se,e[34]=ae,e[35]=ue,e[36]=oe,e[37]=de,e[38]=le,e[39]=fe,e[40]=De,e[41]=je,e[42]=re,e[43]=pe,e[44]=xe,e[45]=be}else Se=e[31],H=e[32],se=e[33],ae=e[34],ue=e[35],oe=e[36],de=e[37],le=e[38],fe=e[39],De=e[40],je=e[41],re=e[42],pe=e[43],xe=e[44],be=e[45];if(xe!==Symbol.for("react.early_return_sentinel"))return xe;let T;e[70]!==ue||e[71]!==be?(T=n.jsx("div",{className:be,children:ue}),e[70]=ue,e[71]=be,e[72]=T):T=e[72];let Ke;e[73]!==Se||e[74]!==oe||e[75]!==de||e[76]!==T?(Ke=n.jsx(Se,{items:oe,strategy:de,children:T}),e[73]=Se,e[74]=oe,e[75]=de,e[76]=T,e[77]=Ke):Ke=e[77];let Ie;e[78]!==se||e[79]!==ae||e[80]!==x?(Ie=ae?n.jsx("div",{className:Oe("cursor-grabbing shadow-lg ring-1 ring-border/60",_s(ae,!1)),children:n.jsx(ys,{section:ae,raw:se,meta:x})}):null,e[78]=se,e[79]=ae,e[80]=x,e[81]=Ie):Ie=e[81];let Ge;e[82]!==Ie?(Ge=Yn.createPortal(n.jsx(ms,{dropAnimation:Qn,children:Ie}),document.body),e[82]=Ie,e[83]=Ge):Ge=e[83];let $e;e[84]!==H||e[85]!==le||e[86]!==fe||e[87]!==De||e[88]!==je||e[89]!==re||e[90]!==Ke||e[91]!==Ge?($e=n.jsxs(H,{sensors:le,collisionDetection:fe,onDragStart:De,onDragEnd:je,onDragCancel:re,children:[Ke,Ge]}),e[84]=H,e[85]=le,e[86]=fe,e[87]=De,e[88]=je,e[89]=re,e[90]=Ke,e[91]=Ge,e[92]=$e):$e=e[92];const Ee=!l;let ye;e[93]===Symbol.for("react.memo_cache_sentinel")?(ye=n.jsx(hn,{size:14}),e[93]=ye):ye=e[93];let ke;e[94]!==R?(ke=R("sectionsEditor.sectionList.addSectionButton"),e[94]=R,e[95]=ke):ke=e[95];let Le;e[96]!==r||e[97]!==Ee||e[98]!==ke?(Le=n.jsxs(Qe,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:Ee,onClick:r,children:[ye,ke]}),e[96]=r,e[97]=Ee,e[98]=ke,e[99]=Le):Le=e[99];let Te;return e[100]!==pe||e[101]!==$e||e[102]!==Le?(Te=n.jsxs("div",{className:pe,children:[$e,Le]}),e[100]=pe,e[101]=$e,e[102]=Le,e[103]=Te):Te=e[103],Te}function cr(h){return h.id}function Hn(h){const e=Ue.c(57),{open:o,initialName:d,autoLabel:m,isPending:x,onSubmit:b,onOpenChange:f}=h,v=x===void 0?!1:x,u=ct(),[y,k]=w.useState(d),[D,E]=w.useState(o);o!==D&&(E(o),o&&k(d));let i;e[0]!==v||e[1]!==f?(i=ee=>{!ee&&!v&&f(!1)},e[0]=v,e[1]=f,e[2]=i):i=e[2];const g=i;let r;e[3]!==v||e[4]!==y||e[5]!==b?(r=async ee=>{ee.preventDefault(),!v&&await b(y.trim())},e[3]=v,e[4]=y,e[5]=b,e[6]=r):r=e[6];const A=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(No,{children:l}),e[9]=l,e[10]=R):R=e[10];let K;e[11]!==m||e[12]!==u?(K=u("sectionsEditor.variantRenameDialog.description",{fallback:m||u("sectionsEditor.variantRenameDialog.defaultFallback")}),e[11]=m,e[12]=u,e[13]=K):K=e[13];let z;e[14]!==K?(z=n.jsx(Do,{children:K}),e[14]=K,e[15]=z):z=e[15];let p;e[16]!==R||e[17]!==z?(p=n.jsxs(To,{children:[R,z]}),e[16]=R,e[17]=z,e[18]=p):p=e[18];let N;e[19]!==u?(N=u("sectionsEditor.variantRenameDialog.nameLabel"),e[19]=u,e[20]=N):N=e[20];let ie;e[21]!==N?(ie=n.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:N}),e[21]=N,e[22]=ie):ie=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 ce;e[24]!==m||e[25]!==v||e[26]!==y?(ce=n.jsx(Mo,{id:"variant-rename-name",value:y,onChange:L,placeholder:m,autoFocus:!0,disabled:v}),e[24]=m,e[25]=v,e[26]=y,e[27]=ce):ce=e[27];let M;e[28]!==ie||e[29]!==ce?(M=n.jsxs("div",{className:"space-y-1.5 py-4",children:[ie,ce]}),e[28]=ie,e[29]=ce,e[30]=M):M=e[30];let ge;e[31]!==f?(ge=()=>f(!1),e[31]=f,e[32]=ge):ge=e[32];let O;e[33]!==u?(O=u("sectionsEditor.variantRenameDialog.cancel"),e[33]=u,e[34]=O):O=e[34];let ne;e[35]!==v||e[36]!==ge||e[37]!==O?(ne=n.jsx(Qe,{type:"button",variant:"outline",onClick:ge,disabled:v,children:O}),e[35]=v,e[36]=ge,e[37]=O,e[38]=ne):ne=e[38];let he;e[39]!==v||e[40]!==u?(he=v?n.jsxs(n.Fragment,{children:[n.jsx(Jn,{size:14,className:"animate-spin"}),u("sectionsEditor.variantRenameDialog.saving")]}):u("sectionsEditor.variantRenameDialog.save"),e[39]=v,e[40]=u,e[41]=he):he=e[41];let me;e[42]!==v||e[43]!==he?(me=n.jsx(Qe,{type:"submit",disabled:v,children:he}),e[42]=v,e[43]=he,e[44]=me):me=e[44];let I;e[45]!==ne||e[46]!==me?(I=n.jsxs(Po,{children:[ne,me]}),e[45]=ne,e[46]=me,e[47]=I):I=e[47];let J;e[48]!==A||e[49]!==M||e[50]!==I||e[51]!==p?(J=n.jsx(Ao,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:A,children:[p,M,I]})}),e[48]=A,e[49]=M,e[50]=I,e[51]=p,e[52]=J):J=e[52];let Z;return e[53]!==g||e[54]!==o||e[55]!==J?(Z=n.jsx(Co,{open:o,onOpenChange:g,children:J}),e[53]=g,e[54]=o,e[55]=J,e[56]=Z):Z=e[56],Z}const ur="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)]",js="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 Es(h){const e=Ue.c(5),{rule:o,matchers:d}=h,m=o?.__resolveType??"";let x;if(e[0]!==d||e[1]!==m){const u=d.find(y=>y.resolveType===m)?.iconName??Ba(m);x=Eo(u),e[0]=d,e[1]=m,e[2]=x}else x=e[2];const b=x;if(!b)return null;let f;return e[3]!==b?(f=n.jsx(b,{size:14,className:"shrink-0"}),e[3]=b,e[4]=f):f=e[4],f}function Gn(h){return h.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
2
2
|
`)}function pn(h){return h.map((e,o)=>({id:crypto.randomUUID(),index:o,variant:e}))}function dr(h){return h.map((e,o)=>({...e,index:o}))}function ks(h){const e=Ue.c(17),{label:o,effectiveRule:d,matchers:m,canDelete:x,dragging:b,onRename:f,onDuplicate:v,onDelete:u}=h,y=ct();let k;e[0]!==d||e[1]!==m?(k=n.jsx(Es,{rule:d,matchers:m}),e[0]=d,e[1]=m,e[2]=k):k=e[2];let D;e[3]!==o?(D=n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:o}),e[3]=o,e[4]=D):D=e[4];let E;e[5]!==x||e[6]!==b||e[7]!==o||e[8]!==u||e[9]!==v||e[10]!==f||e[11]!==y?(E=!b&&n.jsxs(ls,{children:[n.jsx(rs,{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:fr,onPointerDown:mr,children:n.jsx(es,{size:14})})}),n.jsxs(is,{align:"end",className:"w-36",children:[n.jsxs(ht,{onClick:g=>{g.stopPropagation(),f?.()},children:[n.jsx(qo,{size:14}),y("sectionsEditor.pageVariantTabs.renameAction")]}),n.jsxs(ht,{onClick:g=>{g.stopPropagation(),v?.()},children:[n.jsx(ss,{size:14}),y("sectionsEditor.pageVariantTabs.duplicateAction")]}),n.jsx(Fo,{}),n.jsxs(ht,{variant:"destructive",disabled:!x,onClick:g=>{g.stopPropagation(),u?.()},children:[n.jsx(os,{size:14}),y("sectionsEditor.pageVariantTabs.deleteAction")]})]})]}),e[5]=x,e[6]=b,e[7]=o,e[8]=u,e[9]=v,e[10]=f,e[11]=y,e[12]=E):E=e[12];let i;return e[13]!==k||e[14]!==D||e[15]!==E?(i=n.jsxs(n.Fragment,{children:[k,D,E]}),e[13]=k,e[14]=D,e[15]=E,e[16]=i):i=e[16],i}function mr(h){return h.stopPropagation()}function fr(h){return h.stopPropagation()}function pr(h){const e=Ue.c(33),{entry:o,sortableId:d,isActive:m,canDelete:x,decofile:b,meta:f,matchers:v,onSelect:u,onRename:y,onDuplicate:k,onDelete:D}=h;let E;e[0]!==d?(E={id:d,animateLayoutChanges:gr},e[0]=d,e[1]=E):E=e[1];const{attributes:i,listeners:g,setNodeRef:r,transform:A,isDragging:l}=fs(E);let R;e[2]!==A?(R=ps.Transform.toString(A?{...A,x:0}:null),e[2]=A,e[3]=R):R=e[3];const K=l?0:void 0;let z;e[4]!==R||e[5]!==K?(z={transform:R,opacity:K},e[4]=R,e[5]=K,e[6]=z):z=e[6];const p=z,N=f??void 0;let ie;e[7]!==b||e[8]!==o.variant.rule||e[9]!==N?(ie=Ct(o.variant.rule,b,N),e[7]=b,e[8]=o.variant.rule,e[9]=N,e[10]=ie):ie=e[10];const L=ie;let ce;e[11]!==u?(ce=me=>{me.target===me.currentTarget&&(me.key==="Enter"||me.key===" ")&&(me.preventDefault(),u())},e[11]=u,e[12]=ce):ce=e[12];const M=l?"cursor-grabbing":"cursor-pointer active:cursor-grabbing",ge=m?js:ur;let O;e[13]!==M||e[14]!==ge?(O=Oe("group flex select-none items-center gap-2 rounded-md px-2 py-2.5 transition-colors touch-none",M,ge),e[13]=M,e[14]=ge,e[15]=O):O=e[15];let ne;e[16]!==x||e[17]!==L||e[18]!==o.variant.label||e[19]!==v||e[20]!==D||e[21]!==k||e[22]!==y?(ne=n.jsx(ks,{label:o.variant.label,effectiveRule:L,matchers:v,canDelete:x,onRename:y,onDuplicate:k,onDelete:D}),e[16]=x,e[17]=L,e[18]=o.variant.label,e[19]=v,e[20]=D,e[21]=k,e[22]=y,e[23]=ne):ne=e[23];let he;return e[24]!==i||e[25]!==g||e[26]!==u||e[27]!==r||e[28]!==p||e[29]!==O||e[30]!==ne||e[31]!==ce?(he=n.jsx("div",{ref:r,style:p,...i,...g,onClick:u,onKeyDown:ce,className:O,children:ne}),e[24]=i,e[25]=g,e[26]=u,e[27]=r,e[28]=p,e[29]=O,e[30]=ne,e[31]=ce,e[32]=he):he=e[32],he}function gr(){return!1}function hr(h){const e=Ue.c(9),{variant:o,decofile:d,meta:m,matchers:x}=h,b=m??void 0;let f;e[0]!==d||e[1]!==b||e[2]!==o.rule?(f=Ct(o.rule,d,b),e[0]=d,e[1]=b,e[2]=o.rule,e[3]=f):f=e[3];const v=f;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",js),e[4]=u):u=e[4];let y;return e[5]!==v||e[6]!==x||e[7]!==o.label?(y=n.jsx("div",{className:u,children:n.jsx(ks,{label:o.label,effectiveRule:v,matchers:x,canDelete:!1,dragging:!0})}),e[5]=v,e[6]=x,e[7]=o.label,e[8]=y):y=e[8],y}function vr(h){const e=Ue.c(91),{listKey:o,variants:d,activeIndex:m,decofile:x,meta:b,matchers:f,onSelect:v,onReorder:u,onRename:y,onDuplicate:k,onDelete:D,onAdd:E}=h,i=ct();let g;e[0]!==d?(g=()=>pn(d),e[0]=d,e[1]=g):g=e[1];const[r,A]=w.useState(g),[l,R]=w.useState(null),[K,z]=w.useState(o),[p,N]=w.useState(d.length);let ie;e[2]!==d?(ie=()=>Gn(d),e[2]=d,e[3]=ie):ie=e[3];const[L,ce]=w.useState(ie),M=w.useRef(!1),ge=Gn(d);K!==o?(z(o),N(d.length),ce(ge),A(pn(d))):p!==d.length?(N(d.length),ce(ge),A(pn(d))):L!==ge&&(ce(ge),A($e=>d.map((Ee,ye)=>({id:$e[ye]?.id??crypto.randomUUID(),index:ye,variant:Ee}))));let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O={activationConstraint:{distance:8}},e[4]=O):O=e[4];let ne;e[5]===Symbol.for("react.memo_cache_sentinel")?(ne={coordinateGetter:gs},e[5]=ne):ne=e[5];const he=cs(Jt(ds,O),Jt(us,ne));let me;e[6]!==r?(me=r.map(Sr),e[6]=r,e[7]=me):me=e[7];const I=me,J=d.length>1;let Z;e[8]!==r?(Z=$e=>{const Ee=String($e.active.id);R(r.find(ye=>ye.id===Ee)??null)},e[8]=r,e[9]=Z):Z=e[9];const ee=Z;let $;e[10]!==I||e[11]!==u?($=$e=>{R(null);const{active:Ee,over:ye}=$e;if(!ye||Ee.id===ye.id)return;const ke=I.indexOf(String(Ee.id)),Le=I.indexOf(String(ye.id));ke===-1||Le===-1||(A(Te=>dr(Mt([...Te],ke,Le))),M.current=!0,requestAnimationFrame(()=>{M.current=!1}),u(ke,Le))},e[10]=I,e[11]=u,e[12]=$):$=e[12];const Ae=$;let Me;e[13]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>{R(null)},e[13]=Me):Me=e[13];const et=Me;let Se,H,se,ae,ue,oe,de,le,fe,De,je,re,pe;if(e[14]!==m||e[15]!==J||e[16]!==x||e[17]!==r||e[18]!==I||e[19]!==Ae||e[20]!==ee||e[21]!==f||e[22]!==b||e[23]!==E||e[24]!==D||e[25]!==k||e[26]!==y||e[27]!==v||e[28]!==he||e[29]!==i){const $e=G=>{M.current||v(G)};je="space-y-1 border-b p-2";let Ee;e[43]!==i?(Ee=i("sectionsEditor.pageVariantTabs.variantsLabel"),e[43]=i,e[44]=Ee):Ee=e[44];let ye;e[45]!==Ee?(ye=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:Ee}),e[45]=Ee,e[46]=ye):ye=e[46];let ke;e[47]!==i?(ke=i("sectionsEditor.pageVariantTabs.addVariantAriaLabel"),e[47]=i,e[48]=ke):ke=e[48];let Le;e[49]===Symbol.for("react.memo_cache_sentinel")?(Le=n.jsx(hn,{size:14}),e[49]=Le):Le=e[49];let Te;e[50]!==E||e[51]!==ke?(Te=n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":ke,className:"size-6",onClick:E,children:Le})}),e[50]=E,e[51]=ke,e[52]=Te):Te=e[52];let ze;e[53]!==i?(ze=i("sectionsEditor.pageVariantTabs.addVariantTooltip"),e[53]=i,e[54]=ze):ze=e[54];let B;e[55]!==ze?(B=n.jsx(jt,{children:ze}),e[55]=ze,e[56]=B):B=e[56];let F;e[57]!==Te||e[58]!==B?(F=n.jsxs(yt,{children:[Te,B]}),e[57]=Te,e[58]=B,e[59]=F):F=e[59],e[60]!==ye||e[61]!==F?(re=n.jsxs("div",{className:"flex items-center justify-between",children:[ye,F]}),e[60]=ye,e[61]=F,e[62]=re):re=e[62],H=hs,oe=he,de=vs,le=ee,fe=Ae,De=et,Se=Ss,ae=I,ue=xs,pe="space-y-0.5",se=r.map(G=>n.jsx(pr,{sortableId:G.id,entry:G,isActive:G.index===m,canDelete:J,decofile:x,meta:b,matchers:f,onSelect:()=>$e(G.index),onRename:()=>y(G.index),onDuplicate:()=>k(G.index),onDelete:()=>D(G.index)},G.id)),e[14]=m,e[15]=J,e[16]=x,e[17]=r,e[18]=I,e[19]=Ae,e[20]=ee,e[21]=f,e[22]=b,e[23]=E,e[24]=D,e[25]=k,e[26]=y,e[27]=v,e[28]=he,e[29]=i,e[30]=Se,e[31]=H,e[32]=se,e[33]=ae,e[34]=ue,e[35]=oe,e[36]=de,e[37]=le,e[38]=fe,e[39]=De,e[40]=je,e[41]=re,e[42]=pe}else Se=e[30],H=e[31],se=e[32],ae=e[33],ue=e[34],oe=e[35],de=e[36],le=e[37],fe=e[38],De=e[39],je=e[40],re=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 be;e[66]!==Se||e[67]!==ae||e[68]!==ue||e[69]!==xe?(be=n.jsx(Se,{items:ae,strategy:ue,children:xe}),e[66]=Se,e[67]=ae,e[68]=ue,e[69]=xe,e[70]=be):be=e[70];let T;e[71]!==l||e[72]!==x||e[73]!==f||e[74]!==b?(T=l?n.jsx(hr,{variant:l.variant,decofile:x,meta:b,matchers:f}):null,e[71]=l,e[72]=x,e[73]=f,e[74]=b,e[75]=T):T=e[75];let Ke;e[76]!==T?(Ke=Yn.createPortal(n.jsx(ms,{dropAnimation:Qn,children:T}),document.body),e[76]=T,e[77]=Ke):Ke=e[77];let Ie;e[78]!==H||e[79]!==oe||e[80]!==de||e[81]!==le||e[82]!==fe||e[83]!==De||e[84]!==be||e[85]!==Ke?(Ie=n.jsxs(H,{sensors:oe,collisionDetection:de,onDragStart:le,onDragEnd:fe,onDragCancel:De,children:[be,Ke]}),e[78]=H,e[79]=oe,e[80]=de,e[81]=le,e[82]=fe,e[83]=De,e[84]=be,e[85]=Ke,e[86]=Ie):Ie=e[86];let Ge;return e[87]!==je||e[88]!==re||e[89]!==Ie?(Ge=n.jsxs("div",{className:je,children:[re,Ie]}),e[87]=je,e[88]=re,e[89]=Ie,e[90]=Ge):Ge=e[90],Ge}function Sr(h){return h.id}function xr(h){const e=Ue.c(16),{schema:o,value:d,onChange:m,meta:x,decofile:b,onSaveReferencedBlock:f,sandbox:v}=h,u=ct();let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[0]=y):y=e[0];const[k,D]=w.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:()=>D([]),className:"flex shrink-0 items-center gap-0.5 rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",title:u("sectionsEditor.sectionsEditorPanels.backToRule"),children:n.jsx(ts,{className:"size-3.5"})}),k.map((r,A)=>{const l=A===k.length-1;return n.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[A>0&&n.jsx(ns,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>D(k.slice(0,A+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}-${A}`)})]}),e[1]=k,e[2]=u,e[3]=E):E=e[3];let i;e[4]!==k||e[5]!==b||e[6]!==x||e[7]!==m||e[8]!==f||e[9]!==v||e[10]!==o||e[11]!==d?(i=n.jsx(Zn,{schema:o,value:d,onChange:m,basePath:"",breadcrumbPath:k,onBreadcrumbChange:D,meta:x,decofile:b,onSaveReferencedBlock:f,sandbox:v}),e[4]=k,e[5]=b,e[6]=x,e[7]=m,e[8]=f,e[9]=v,e[10]=o,e[11]=d,e[12]=i):i=e[12];let g;return e[13]!==E||e[14]!==i?(g=n.jsxs("div",{className:"space-y-2",children:[E,i]}),e[13]=E,e[14]=i,e[15]=g):g=e[15],g}function Un(h){const e=Ue.c(23),{activeSchema:o,formValue:d,formResetKey:m,onFormChange:x,onBreadcrumbChange:b,breadcrumbPath:f,emptyMessage:v,beforeForm:u,seoResolveType:y,siteDefaultSeo:k,meta:D,decofile:E,onSaveReferencedBlock:i,sandbox:g,previewBaseUrl:r,onRequestAddSection:A}=h;let l;e[0]!==f?(l=f===void 0?[]:f,e[0]=f,e[1]=l):l=e[1];const R=l;let K;e[2]!==o||e[3]!==R||e[4]!==E||e[5]!==m||e[6]!==d||e[7]!==D||e[8]!==b||e[9]!==x||e[10]!==A||e[11]!==i||e[12]!==r||e[13]!==g||e[14]!==y||e[15]!==k?(K=o&&d?y?n.jsx(Oo,{schema:o,resolveType:y,value:d,formResetKey:m,onChange:x,onBreadcrumbChange:b,siteDefaultSeo:k}):n.jsx(Zn,{schema:o,value:d,onChange:x,basePath:"",breadcrumbPath:R,onBreadcrumbChange:b,meta:D,decofile:E,onSaveReferencedBlock:i,sandbox:g,previewBaseUrl:r,onRequestAddSection:A},m):null,e[2]=o,e[3]=R,e[4]=E,e[5]=m,e[6]=d,e[7]=D,e[8]=b,e[9]=x,e[10]=A,e[11]=i,e[12]=r,e[13]=g,e[14]=y,e[15]=k,e[16]=K):K=e[16];const z=K;let p;e[17]!==v||e[18]!==z?(p=z??n.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:v}),e[17]=v,e[18]=z,e[19]=p):p=e[19];let N;return e[20]!==u||e[21]!==p?(N=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,p]})}),e[20]=u,e[21]=p,e[22]=N):N=e[22],N}const br="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 yr(h,e){return Fa(h,e,lt)}function _r(h){const e=Ue.c(19),{pageKey:o,initialName:d,initialPath:m,onFieldChange:x}=h,b=ct(),[f,v]=w.useState(d),[u,y]=w.useState(m),[k,D]=w.useState(o);k!==o&&(D(o),v(d),y(m));let E;e[0]!==x?(E=K=>{v(K.target.value),x("name",K.target.value)},e[0]=x,e[1]=E):E=e[1];let i;e[2]!==b?(i=b("sectionsEditor.sectionsEditorPanels.pageNamePlaceholder"),e[2]=b,e[3]=i):i=e[3];let g;e[4]!==f||e[5]!==E||e[6]!==i?(g=n.jsx("input",{type:"text",value:f,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]=f,e[5]=E,e[6]=i,e[7]=g):g=e[7];let r;e[8]!==x?(r=K=>{y(K.target.value),x("path",K.target.value)},e[8]=x,e[9]=r):r=e[9];let A;e[10]!==b?(A=b("sectionsEditor.sectionsEditorPanels.pathPlaceholder"),e[10]=b,e[11]=A):A=e[11];let l;e[12]!==u||e[13]!==r||e[14]!==A?(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:A}),e[12]=u,e[13]=r,e[14]=A,e[15]=l):l=e[15];let R;return e[16]!==g||e[17]!==l?(R=n.jsxs("div",{className:"space-y-1",children:[g,l]}),e[16]=g,e[17]=l,e[18]=R):R=e[18],R}function Wn(h){const e=Ue.c(13),{onClick:o}=h,d=ct();let m;e[0]!==d?(m=d("sectionsEditor.sectionsEditorPanels.addVariant"),e[0]=d,e[1]=m):m=e[1];let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(as,{size:14}),e[2]=x):x=e[2];let b;e[3]!==o||e[4]!==m?(b=n.jsx(_t,{asChild:!0,children:n.jsx(Qe,{type:"button",variant:"ghost",size:"icon","aria-label":m,className:"size-7 shrink-0 text-[oklch(0.65_0.15_160)]",onClick:o,children:x})}),e[3]=o,e[4]=m,e[5]=b):b=e[5];let f;e[6]!==d?(f=d("sectionsEditor.sectionsEditorPanels.addVariant"),e[6]=d,e[7]=f):f=e[7];let v;e[8]!==f?(v=n.jsx(jt,{side:"bottom",children:f}),e[8]=f,e[9]=v):v=e[9];let u;return e[10]!==b||e[11]!==v?(u=n.jsxs(yt,{children:[b,v]}),e[10]=b,e[11]=v,e[12]=u):u=e[12],u}function qn(h){const e=Ue.c(21),{currentRt:o,currentLabel:d,currentGlobalKey:m,matchers:x,globals:b,onSelect:f,onSelectGlobal:v,schema:u,formValue:y,onChange:k,formKey:D,formWrapperClassName:E,meta:i,decofile:g,onSaveReferencedBlock:r,sandbox:A}=h;let l;e[0]!==m||e[1]!==d||e[2]!==o||e[3]!==b||e[4]!==x||e[5]!==f||e[6]!==v?(l=n.jsx(Oa,{currentRt:o,currentLabel:d,currentGlobalKey:m,matchers:x,globals:b,onSelect:f,onSelectGlobal:v}),e[0]=m,e[1]=d,e[2]=o,e[3]=b,e[4]=x,e[5]=f,e[6]=v,e[7]=l):l=e[7];let R;e[8]!==g||e[9]!==D||e[10]!==y||e[11]!==E||e[12]!==i||e[13]!==k||e[14]!==r||e[15]!==A||e[16]!==u?(R=u&&y&&n.jsx("div",{className:E,children:n.jsx(xr,{schema:u,value:y,onChange:k,meta:i,decofile:g,onSaveReferencedBlock:r,sandbox:A},D)}),e[8]=g,e[9]=D,e[10]=y,e[11]=E,e[12]=i,e[13]=k,e[14]=r,e[15]=A,e[16]=u,e[17]=R):R=e[17];let K;return e[18]!==l||e[19]!==R?(K=n.jsxs(n.Fragment,{children:[l,R]}),e[18]=l,e[19]=R,e[20]=K):K=e[20],K}function uc({orgSlug:h,virtualMcpId:e,branch:o,previewReady:d=!0,previewUrl:m,currentPath:x,activePageBlockKey:b=null,activeGlobalBlockKey:f=null,externalSelectedIndex:v,onSaved:u,initialEditSeo:y=!1,onExitSeo:k,onViewJsonFile:D,onVariantPreviewOverride:E}){const i=ct(),g=d?{orgSlug:h,virtualMcpId:e,branch:o,previewUrl:m}:null,{data:r,isLoading:A}=Ia(g),{data:l,isLoading:R}=$a(g),K=za(),z=K?.entity?.id===e?K.entity.metadata?.siteSlug??null:null,[p,N]=w.useState(null),[ie,L]=w.useState(null),[ce,M]=w.useState(null),[ge,O]=w.useState(0),[ne,he]=w.useState(void 0),[me,I]=w.useState(null),[J,Z]=w.useState(null),[ee,$]=w.useState([]),Ae=w.useRef(null),[Me,et]=w.useState(ee.length);Me!==ee.length&&(et(ee.length),requestAnimationFrame(()=>{Ae.current&&(Ae.current.scrollTop=0)}));const[Se,H]=w.useState(0),[se,ae]=w.useState(null),[ue,oe]=w.useState(null),[de,le]=w.useState(null),[fe,De]=w.useState(!0),[je,re]=w.useState(!1),[pe,xe]=w.useState(!1),be=w.useRef(null),[T,Ke]=w.useState(y),[Ie,Ge]=w.useState(y);y&&!Ie&&(Ge(!0),Ke(!0),N(null),L(null),M(null),$([])),!y&&Ie&&Ge(!1);const[$e,Ee]=w.useState(null),[ye,ke]=w.useState(void 0),[Le,Te]=w.useState([]),[ze,B]=w.useState(0),[F,G]=w.useState(0),[nt,Re]=w.useState(null),[We,Ne]=w.useState(null),[vt,vn]=w.useState(null),Rs=Na(),ws=`${h}/${e}/${o}`,Qt=Ha({orgSlug:h,virtualMcpId:e,branch:o}),[Vs,Ns]=w.useState(x),[Ds,Ts]=w.useState(b),[Ps,As]=w.useState(f);(Vs!==x||Ds!==b||Ps!==f)&&(queueMicrotask(()=>Qt.flush()),Ns(x),Ts(b),As(f),N(null),L(null),M(null),O(0),I(null),Z(null),G(0),Re(null),Ne(null),$([]),H(t=>t+1),Ke(!1),Ee(null),ke(void 0),Te([]),B(t=>t+1));const we=Ga({orgSlug:h,virtualMcpId:e,branch:o}),Kt=uo((t,s)=>{we.mutate({blockKey:t,data:s},{onSuccess:()=>u?.(),onError:a=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:a.message}))})}),Xt=Ua({orgSlug:h,virtualMcpId:e,branch:o}),[Nt,Lt]=w.useState(!1),Be=w.useRef(null),st=w.useRef(null),at=w.useRef(null),Zt=w.useRef({}),Xe=w.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null});if(!d||A||R)return n.jsx("div",{className:"h-full w-full flex items-center justify-center",children:n.jsx(Jn,{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 Cs=Wa(r),Ve=!!f,qe=Ve?null:qa(Cs,x,b),V=Ve?f:qe?.key??null,en=Ve&&f?r[f]:void 0,Sn=Ve&&f&&en?Ya(f,en):Ve&&f?f:"",Bt=!Ve&&V&&r[V]?r[V]:null,tn=T&&r&&l&&V&&qe?$n(r,{kind:"page",pageKey:V,pageName:String(qe.name??""),path:String(qe.path??"")},l):null,Ms=T?Bt?.seo:void 0,nn=ye!==void 0?ye:Ms,Ks=T?Io(nn):void 0,Ls=tn?.seoTypeOptions??[],Bs=T&&l?$o(l):"",xn=$e??Ks??{},sn=T&&tn?zo(xn,tn):null,Fs=T&&sn&&Ho(nn)?Gt(sn,l):null,Os=T?Go(r,l)?.seoData:void 0,He=Ve?[{label:"Default",sections:[{__resolveType:f}]}]:yr(Bt?.sections,r??{}),Ft=He.length>1,Ce=Math.min(ge,He.length-1),ut=He[Ce],q=ut?.sections??[],Fe=Ut(q,r),bn=!Ve&&Ja(Bt?.sections);if(Ve&&f&&vt!==f){vn(f);const t=q[0],s=Fe[0];if(t&&s){N(0),G(0),$([]);const a=xt(t,s,r);a&&(L(a.data),M(a.resolveType),Ne(null),Re(null))}}!Ve&&vt!==null&&vn(null),Xe.current={rawSections:q,parsedSections:Fe,decofile:r??{},activePageKey:V,pageVariants:He,variantIndex:Ce,sectionVariantIndex:F,selectedSectionIndex:p};const Is=()=>({multivariate:bn,index:Ce,variants:He.map(t=>({rule:t.rule}))}),yn=(t,s)=>{if(!E)return;if(!V||!bn||t.length<=1){E(null);return}const a=In(V,{multivariate:!0,index:s,variants:t},r,l);E(a.length>0?a:null)},Et=(t,s,a)=>{if(!E)return;if(!V){E(null);return}const c=Is(),S=In(V,c,r,l);if(!t||s<0){E(S.length>0?S:null);return}const j=ho({pageKey:V,page:c,sectionIndex:s,sectionLazy:Fe[s]?.isLazy??!1,mvObj:t,selectedVariantIndex:a,decofile:r,meta:l}),_=[...S,...j];E(_.length>0?_:null)},dt=(t,s,a,c=p??-1,S=!1)=>{const j=tt(t,s);if(!j){L(null),M(null),Ne(null),Re(null),S&&Et(null,c,a);return}const P=Mn(j,lt)[a];if(!P){L(null),M(null),Ne(null),Re(null),S&&Et(null,c,a);return}const te=no(P.value,r);L(te?.data??null),M(te?.resolveType??null);const{resolveType:C,formValue:U}=Tt(P.rule,r,l??void 0);Ne(C),Re(U),S&&Et(j,c,a)};if(v!==void 0&&v!==ne&&(he(v??null),typeof v=="number")){const t=q[v],s=Fe[v];if(t&&s)if(N(v),G(0),$([]),H(a=>a+1),s.isMultivariate)dt(t,s,0,v);else{const a=xt(t,s,r);a?(L(a.data),M(a.resolveType)):(L(null),M(null)),Ne(null),Re(null)}}const Ot={orgSlug:h,virtualMcpId:e,branch:o,previewUrl:m??void 0,siteSlug:z},an=ce&&l?Gt(ce,l):null,Ye=(t,s)=>{if(!V)return;Be.current&&(clearTimeout(Be.current),Be.current=null),at.current&&(clearTimeout(at.current),at.current=null),st.current&&(clearTimeout(st.current),st.current=null);const a=At(r,V,t,Ce,He);we.mutate({blockKey:V,data:a},{onSuccess:()=>s?.onSuccess?.()??u?.(),onError:c=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:c.message}))})},kt=()=>{N(null),L(null),M(null),G(0),Re(null),Ne(null),$([]),H(t=>t+1)},$s=(t,s)=>{Be.current&&clearTimeout(Be.current);const a=Xe.current.sectionVariantIndex;Be.current=setTimeout(()=>{const{rawSections:c,parsedSections:S,decofile:j,activePageKey:_,pageVariants:P,variantIndex:te}=Xe.current,C=c[s];if(!C)return;const U=S[s];if(!U)return;if(U.isSavedBlock){const Y=U.isLazy?C.section?.__resolveType??C.__resolveType:C.__resolveType;we.mutate({blockKey:Y,data:t},{onSuccess:()=>u?.(),onError:Q=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:Q.message}))});return}if(!_)return;const W={...j[_]},_e=[...c];if(U.isMultivariate){const Y=tt(C,U);if(!Y||!_)return;const Q=So(Y,a,t);_e[s]=bt(C,U,Q)}else if(U.isHidden){const Y=Xn(C.__resolveType),Q=Y?{...C.section}:{...C},Pe=Array.isArray(Q.variants)?[...Q.variants]:[];Pe[0]&&(Pe[0]={...Pe[0],value:t}),Q.variants=Pe,Y?_e[s]={...C,section:Q}:_e[s]=Q}else U.isLazy?_e[s]={...C,section:t}:_e[s]=t;if(P.length>1){const Y=W.sections,Q=[...Y?.variants??[]];Q[te]&&(Q[te]={...Q[te],value:_e}),W.sections={...Y,variants:Q}}else W.sections=_e;we.mutate({blockKey:_,data:W},{onSuccess:()=>u?.(),onError:Y=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:Y.message}))})},fn)},zs=t=>{N(t),G(0),$([]),H(S=>S+1);const s=q[t],a=Fe[t];if(!s||!a)return;if(a.isMultivariate){dt(s,a,0,t);return}const c=xt(s,a,r);if(!c){L(null),M(null),Ne(null),Re(null),Et(null,t,0);return}L(c.data),M(c.resolveType),Ne(null),Re(null),Et(null,t,0)},_n=t=>{const s=t;L(s),p!==null&&$s(s,p)},on=t=>{if(!V||!r||!l||!qe)return;const s={kind:"page",pageKey:V,pageName:String(qe.name??""),path:String(qe.path??"")},a=$n(r,s,l);a&&Qt.save(V,()=>{const c=Rs.getQueryData(Da.decofile(ws))?.[V];if(!c||typeof c!="object"||c===null||Array.isArray(c))return null;const S={...c,...Zt.current};return Zt.current={},t?.raw!==void 0?{...S,seo:t.raw}:t?.inner!==void 0?Wo(s,a,S,t.inner):S})},Hs=(t,s)=>{V&&(Zt.current[t]=s,on())},Gs=(t,s)=>{if(!V)return;const a=Mt([...q],t,s);p!==null&&(p===t?N(s):t<p&&s>=p?N(p-1):t>p&&s<=p&&N(p+1)),Ye(a)},Us=t=>{if(!V)return;const s=q.filter((a,c)=>c!==t);p===t?kt():p!==null&&p>t&&N(p-1),Ye(s)},Ws=t=>{if(!V)return;const s=q[t];if(!s)return;const a=[...q];a.splice(t+1,0,go(s)),p!==null&&p>t&&N(p+1),Ye(a)},qs=t=>{if(!V)return;const s=q[t],a=Fe[t];if(!s||!a||a.isMultivariate)return;const c=a.isHidden?fo(s):po(s);if(!c)return;const S=[...q];S[t]=c,p===t&&kt(),Ye(S)},Ys=t=>{if(!V)return;const s=q[t],a=Fe[t];if(!s||!a||a.isMultivariate)return;const c=mo(s);if(!c)return;const S=[...q];S[t]=c,p===t&&kt(),Ye(S)},Js=t=>{if(!V)return;const s=q[t],a=Fe[t];if(!s||!a?.isSavedBlock)return;const c=xt(s,a,r);if(!c?.data)return;const{name:S,...j}=c.data,_=[...q];a.isLazy?_[t]={...s,section:j}:_[t]=j,p===t&&kt(),Ye(_)},Qs=t=>{if(!V)return;const s=[...q,{__resolveType:t.resolveType}],a=s.length-1;Ye(s,{onSuccess:()=>{re(!1),N(a),G(0),$([]),H(_=>_+1);const c=s[a],S=Ut(s,r)[a];if(!c||!S)return;if(S.isMultivariate){dt(c,S,0);return}const j=xt(c,S,r);if(!j){L(null),M(null),Ne(null),Re(null);return}L(j.data),M(j.resolveType),Ne(null),Re(null)}})},jn=t=>{be.current=t.append,re(!0)},Xs=t=>{const s=be.current;if(!s){Qs(t);return}s({__resolveType:t.resolveType}),re(!1),be.current=null},Zs=t=>{if(p===null)return;const s=q[p],a=Fe[p];!s||!a?.isMultivariate||(G(t),$([]),H(c=>c+1),dt(s,a,t,p,!0))},ea=t=>{if(p===null||!V)return;const s=q[p],a=Fe[p];if(!s||!a?.isMultivariate)return;const c=tt(s,a);if(!c)return;const S=lo(c,t);if(!S){X.error(i("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const j=[...q];j[p]=bt(s,a,S);const _=S.variants;let P=F;t===F?P=Math.min(t,_.length-1):t<F&&(P=F-1),G(P),$([]),H(te=>te+1),dt(j[p],a,P),Ye(j)},ta=t=>{if(p===null||!V)return;const s=q[p],a=Fe[p];if(!s||!a?.isMultivariate)return;const c=tt(s,a);if(!c)return;const S=co(c,t),j=[...q];j[p]=bt(s,a,S);const _=t+1;G(_),$([]),H(P=>P+1),dt(j[p],a,_),Ye(j)},na=(t,s)=>{if(p===null||!V||t===s)return;const a=q[p],c=Fe[p];if(!a||!c?.isMultivariate)return;const S=tt(a,c);if(!S)return;const j=ro(S,t,s),_=[...q];_[p]=bt(a,c,j);let P=F;F===t?P=s:t<F&&s>=F?P=F-1:t>F&&s<=F&&(P=F+1),G(P),dt(_[p],c,P),Ye(_)},rn=t=>{const s=t??p;if(s===null||!V)return;const a=q[s],c=Fe[s];if(!a||!c)return;const S=so(a,c);if(!S){X.error(i("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const j=[...q];j[s]=S.section;const _=Ut(j,r)[s];if(!_?.isMultivariate){X.error(i("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}N(s),G(S.newVariantIndex),$([]),H(P=>P+1),dt(S.section,_,S.newVariantIndex,s),Ye(j)},sa=()=>{if(p===null||!V)return;const t=q[p],s=Fe[p];if(!t||!s?.isMultivariate)return;const a=tt(t,s);if(!a)return;const c=io(t,s,a);if(!c){X.error(i("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const S=[...q];S[p]=c;const j=Ut(S,r)[p];if(!j)return;G(0),Ne(null),Re(null),$([]),H(P=>P+1);const _=xt(c,j,r);_?(L(_.data),M(_.resolveType)):(L(null),M(null)),Et(null,p,0),Ye(S)},aa=async t=>{if(se===null||!V)return;const s=mn(t,r);if(s){X.error(s);return}const a=q[se],c=Fe[se];if(!a||!c)return;const S=xt(a,c,r);if(!S){X.error(i("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const j={...S.data,name:t};try{await we.mutateAsync({blockKey:t,data:j});const _=[...q];_[se]={__resolveType:t},await we.mutateAsync({blockKey:V,data:At(r,V,_,Ce,He)}),p===se&&kt(),ae(null),X.success(i("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),u?.()}catch(_){X.error(_ instanceof Error?_.message:i("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"))}},En=ut?.rule;if(Ft&&p===null&&J===null&&En){const{resolveType:t,formValue:s}=Tt(En,r??{},l??void 0);Z(t),I(s)}const It=l?Qa(l):[],kn=l&&r?Xa(l,r):[],oa=!Ve&&!!(m&&l&&r),ra=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(!(vo(s,t,l)>0))try{await Xt.mutateAsync({blockKey:t})}catch(a){X.error(a instanceof Error?a.message:i("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"))}},Rn=t=>{st.current&&clearTimeout(st.current),st.current=setTimeout(()=>{const{activePageKey:s,decofile:a,variantIndex:c}=Xe.current;if(!s)return;const S={...a[s]},j={...S.sections},_=[...j.variants??[]],P=_[c],te=P?.rule;if(wt(te,a,l)){const C=te?.__resolveType??"",U=a[C],W=typeof U?.name=="string"?U.name:C,{__resolveType:_e,...Y}=t;we.mutate({blockKey:C,data:Vt(_e??"",Y,W)},{onSuccess:()=>u?.(),onError:Q=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:Q.message}))});return}P&&(_[c]={...P,rule:t}),S.sections={...j,variants:_},we.mutate({blockKey:s,data:S},{onSuccess:()=>u?.(),onError:C=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:C.message}))})},fn)},ia=t=>{Z(t);const s=t?Ln(t,l):{__resolveType:Bn};I(t?s:{}),Rn(s)},la=t=>{const s=t;I(s);const a=J?{__resolveType:J,...s}:{...s};Rn(a)},ca=async t=>{Rt();const{activePageKey:s,decofile:a,variantIndex:c}=Xe.current;if(!s)return;const S=a[s],j=S?.sections;if(!j||typeof j!="object"||Array.isArray(j))return;const _=j;if(!Array.isArray(_.variants))return;const P=[..._.variants],te=P[c];if(!te)return;const C=Pt(te.rule,a,l),U=qt(t);P[c]={...te,rule:U};const W={...a,[s]:{...S,sections:{..._,variants:P}}},{resolveType:_e,formValue:Y}=Tt(U,W,l??void 0);Z(_e),I(Y);try{await we.mutateAsync({blockKey:s,data:W[s]}),C&&C!==t&&await Dt(C,W),u?.()}catch(Q){X.error(Q instanceof Error?Q.message:i("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}},wn=t=>{at.current&&clearTimeout(at.current);const{selectedSectionIndex:s,sectionVariantIndex:a}=Xe.current;s!==null&&(at.current=setTimeout(()=>{const{rawSections:c,parsedSections:S,decofile:j,activePageKey:_,pageVariants:P,variantIndex:te}=Xe.current;if(!_)return;const C=c[s],U=S[s];if(!C||!U?.isMultivariate)return;const W=tt(C,U);if(!W)return;const Y=(W.variants??[])[a]?.rule;if(wt(Y,j,l)){const ve=Y?.__resolveType??"",Je=j[ve],rt=typeof Je?.name=="string"?Je.name:ve,{__resolveType:pt,...it}=t;we.mutate({blockKey:ve,data:Vt(pt??"",it,rt)},{onSuccess:()=>u?.(),onError:gt=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:gt.message}))});return}const Q=Kn(W,a,t),Pe=[...c];Pe[s]=bt(C,U,Q);const Ze=At(j,_,Pe,te,P);we.mutate({blockKey:_,data:Ze},{onSuccess:()=>u?.(),onError:ve=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:ve.message}))})},fn))},ua=t=>{Ne(t);const s=t?Ln(t,l):{__resolveType:Bn};Re(t?s:{}),wn(s)},da=t=>{const s=t;Re(s);const a=We?{__resolveType:We,...s}:{...s};wn(a)},ma=async t=>{Rt();const{selectedSectionIndex:s,sectionVariantIndex:a,rawSections:c,parsedSections:S,decofile:j,activePageKey:_,pageVariants:P,variantIndex:te}=Xe.current;if(s===null||!_)return;const C=c[s],U=S[s];if(!C||!U?.isMultivariate)return;const W=tt(C,U);if(!W)return;const _e=W.variants??[],Y=Pt(_e[a]?.rule,j,l),Q=qt(t),Pe=Kn(W,a,Q),Ze=[...c];Ze[s]=bt(C,U,Pe);const ve=At(j,_,Ze,te,P),Je={...j,[_]:ve},{resolveType:rt,formValue:pt}=Tt(Q,Je,l??void 0);Ne(rt),Re(pt);try{await we.mutateAsync({blockKey:_,data:ve}),Y&&Y!==t&&await Dt(Y,Je),u?.()}catch(it){X.error(it instanceof Error?it.message:i("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}};if(!Ve&&!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:x})});if(Ve&&!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=p!==null?Fe[p]??null:null,Vn=p!==null?q[p]:null,Nn=Vn&&mt?.isMultivariate?tt(Vn,mt):null,St=Nn?Mn(Nn,lt):[],ln=Math.min(F,Math.max(St.length-1,0)),$t=St[ln]??null,ft=mt?.isMultivariate===!0,Dn=p!==null&&mt!==null,zt=Dn&&(ft||!!(an&&ie)),fa=zt&&!Ve&&mt?.isSavedBlock===!0,ot=Ve||fa,pa=Ve?Sn:mt?.label??"",ga=We&&l?Gt(We,l):null,cn=zt&&(!Ve||ee.length>0)?Ve?[Sn,...ee]:[qe.name,mt.label,...ft&&$t?[$t.label]:[],...ee]:[],ha=T&&qe?[qe.name,"SEO",...Le]:[],Ht=T?ha:ot?cn.length>0?cn:[pa]:cn,va=!T&&!Ve&&ft&&ee.length===0,Tn=()=>{if(!V)return;Rt(),Be.current&&(clearTimeout(Be.current),Be.current=null);const t=r[V],s=ao(t.sections,q);if(!s)return;const a=oo(s);we.mutate({blockKey:V,data:{...t,sections:s}},{onSuccess:()=>{O(a),N(null),L(null),M(null),$([]),I(null),Z(null)},onError:c=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:c.message}))})},un=(t,s,a)=>{if(!V)return;Rt(),Be.current&&(clearTimeout(Be.current),Be.current=null);const c=r[V],S=c.sections;if(!S||typeof S!="object"||Array.isArray(S))return;const j=S;if(!Array.isArray(j.variants))return;const _=t([...j.variants]);if(!_)return;const P=xo(j,_),te={...r,[V]:{...c,sections:P}};we.mutate({blockKey:V,data:te[V]},{onSuccess:()=>{s?.(),a&&Dt(a,te)},onError:C=>X.error(i("sectionsEditor.sectionsEditor.saveFailed",{error:C.message}))})},Sa=t=>{oe(null),O(t),N(null),L(null),M(null),$([]);const s=He[t]?.rule,{resolveType:a,formValue:c}=Tt(s,r??{},l??void 0);Z(a),I(c),yn(He.map(S=>({rule:S.rule})),t)},xa=(t,s)=>{if(t===s)return;let a=Ce;Ce===t?a=s:t<Ce&&s>=Ce?a=Ce-1:t>Ce&&s<=Ce&&(a=Ce+1),O(a);const c=Mt(He.map(S=>({rule:S.rule})),t,s);yn(c,a),un(S=>Mt(S,t,s))},ba=t=>{const s=He[t]?.rule,a=Pt(s,r??{},l??void 0);un(c=>c.length<=1?null:(c.splice(t,1),c),()=>{He.length-1===1?O(0):t<Ce?O(Ce-1):t===Ce&&O(Math.max(0,t-1)),N(null),L(null),M(null),$([]),I(null),Z(null)},a)},ya=t=>{un(s=>bo(s,t),()=>{O(t+1),N(null),L(null),M(null),$([]),I(null),Z(null)})},_a=async(t,s)=>{Rt(),Be.current&&(clearTimeout(Be.current),Be.current=null);const a=Xe.current.activePageKey,c=Xe.current.decofile;if(!a)return;const S=c[a],j=S.sections;if(!j||typeof j!="object"||Array.isArray(j))return;const _=j;if(!Array.isArray(_.variants))return;const P=[..._.variants],te=P[t];if(!te?.rule||typeof te.rule!="object"){X.error(i("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const C=te.rule,U=s.trim();Lt(!0);try{if(!U){if(!wt(C,c,l)){oe(null);return}const Ze=C.__resolveType??"";P[t]={...te,rule:Fn(C,c,l)};const ve={...c,[a]:{...S,sections:{..._,variants:P}}};await we.mutateAsync({blockKey:a,data:ve[a]}),await Dt(Ze,ve),oe(null),u?.();return}const W=On(C,c,l);if(!W){X.error(i("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(W.blockKey){await we.mutateAsync({blockKey:W.blockKey,data:Vt(W.resolveType,W.data,U)}),oe(null),u?.();return}const _e=dn(U),Y=mn(_e,c);if(Y){X.error(Y);return}const Q=Vt(W.resolveType,W.data,U);let Pe=null;try{await we.mutateAsync({blockKey:_e,data:Q}),Pe=_e,P[t]={...te,rule:qt(_e)},await we.mutateAsync({blockKey:a,data:{...S,sections:{..._,variants:P}}}),Pe=null}catch(Ze){throw Pe&&await Xt.mutateAsync({blockKey:Pe}).catch(()=>{}),Ze}oe(null),X.success(i("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:U})),u?.()}catch(W){X.error(W instanceof Error?W.message:i("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Lt(!1)}},ja=async(t,s)=>{Rt(),Be.current&&(clearTimeout(Be.current),Be.current=null);const{selectedSectionIndex:a,rawSections:c,parsedSections:S,decofile:j,activePageKey:_,pageVariants:P,variantIndex:te}=Xe.current;if(a===null||!_)return;const C=c[a],U=S[a];if(!C||!U?.isMultivariate)return;const W=tt(C,U);if(!W)return;const _e=W.variants??[],Y=_e[t];if(!Y?.rule||typeof Y.rule!="object"){X.error(i("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const Q=Y.rule,Pe=s.trim();Lt(!0);const Ze=async ve=>{const Je={...W,variants:ve},rt=[...c];rt[a]=bt(C,U,Je);const pt=At(j,_,rt,te,P);return await we.mutateAsync({blockKey:_,data:pt}),{...j,[_]:pt}};try{if(!Pe){if(!wt(Q,j,l)){le(null);return}const gt=Q.__resolveType??"",Cn=[..._e];Cn[t]={...Y,rule:Fn(Q,j,l)};const Va=await Ze(Cn);await Dt(gt,Va),le(null),u?.();return}const ve=On(Q,j,l);if(!ve){X.error(i("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(ve.blockKey){await we.mutateAsync({blockKey:ve.blockKey,data:Vt(ve.resolveType,ve.data,Pe)}),le(null),u?.();return}const Je=dn(Pe),rt=mn(Je,j);if(rt){X.error(rt);return}const pt=Vt(ve.resolveType,ve.data,Pe);let it=null;try{await we.mutateAsync({blockKey:Je,data:pt}),it=Je;const gt=[..._e];gt[t]={...Y,rule:qt(Je)},await Ze(gt),it=null}catch(gt){throw it&&await Xt.mutateAsync({blockKey:it}).catch(()=>{}),gt}le(null),X.success(i("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:Pe})),u?.()}catch(ve){X.error(ve instanceof Error?ve.message:i("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Lt(!1)}},Pn=()=>{kt()},Ea=t=>{Ee(t),on({inner:t})},ka=t=>{ke(t),on({raw:t})},Ra=()=>{Ee(null),Te([])},wa=()=>B(t=>t+1),An=t=>{if(T){if(t===0){Qt.flush(),Ke(!1),Ee(null),ke(void 0),Te([]),B(a=>a+1),k?.();return}if(t===1){Te([]),B(a=>a+1);return}Te(Le.slice(0,t-1)),B(a=>a+1);return}if(Ve){$(ee.slice(0,t)),H(a=>a+1);return}if(t===0){Pn();return}if(t===1){$([]),H(a=>a+1);return}if(ft&&t===2){$([]),H(a=>a+1);return}const s=ft?2:1;$(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||T?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:()=>An(yo(Ht.length,{isMultivariateSectionTop:va})),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(ts,{className:"size-4"})}),!Ve&&Ft&&ut&&n.jsxs("button",{type:"button",onClick:Pn,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",br),children:[n.jsx(Es,{rule:Ct(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(ns,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>An(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(Vo,{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")})]}),Dn&&!ft&&!mt?.isHidden&&V&&n.jsx(Wn,{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(_r,{pageKey:V,initialName:qe.name,initialPath:qe.path,onFieldChange:Hs})}),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:()=>Ke(!0),children:n.jsx(ko,{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:()=>D&&V?D(V):xe(!0),children:n.jsx(Ro,{size:14})})}),n.jsx(jt,{side:"bottom",children:i("sectionsEditor.sectionsEditor.viewJson")})]}),n.jsx(Wn,{onClick:Tn})]})}),T?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:Bt&&V?n.jsx(Uo,{rawSeo:nn,innerSeo:xn,defaultResolveType:Bs,seoSchema:Fs,activeResolveType:sn,seoTypeOptions:Ls,formResetKey:ze,siteDefaultSeo:Os,onBreadcrumbChange:Te,onPersistRaw:ka,onInnerChange:Ea,onClearForm:Ra,onBumpFormKey:wa}):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&&St.length>0&&n.jsxs(n.Fragment,{children:[n.jsx(Za,{listKey:`${V??""}:${p??""}`,variants:St.map((t,s)=>({index:s,label:t.label})),selectedIndex:ln,onSelect:Zs,onRename:le,onDuplicate:ta,onDelete:ea,onRemoveAll:sa,onReorder:na,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(qn,{currentRt:We??"",currentLabel:Wt($t?.rule,r??{},lt,l??void 0),currentGlobalKey:Pt($t?.rule,r??{},l??void 0)??void 0,matchers:It,globals:kn,onSelect:ua,onSelectGlobal:ma,schema:ga,formValue:nt,onChange:da,formKey:`${p??"none"}:${ln}:${We??""}`,formWrapperClassName:"pt-1",meta:l??void 0,decofile:r,onSaveReferencedBlock:Kt,sandbox:Ot})]})]}),n.jsx(Un,{activeSchema:an,formValue:ie,formResetKey:Se,onFormChange:_n,onBreadcrumbChange:$,breadcrumbPath:ee,emptyMessage:i("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:l,decofile:r,onSaveReferencedBlock:Kt,sandbox:Ot,previewBaseUrl:m,onRequestAddSection:jn})]}):Ve?n.jsx(Yt,{viewportRef:Ae,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx(Un,{activeSchema:an,formValue:ie,formResetKey:Se,onFormChange:_n,onBreadcrumbChange:$,breadcrumbPath:ee,emptyMessage:i("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:l,decofile:r,onSaveReferencedBlock:Kt,sandbox:Ot,previewBaseUrl:m,onRequestAddSection:jn})}):n.jsxs(Yt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[Ft&&V&&n.jsx(vr,{listKey:V,variants:He,activeIndex:Ce,decofile:r??{},meta:l,matchers:It,onSelect:Sa,onReorder:xa,onRename:oe,onDuplicate:ya,onDelete:ba,onAdd:Tn}),Ft&&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(wo,{className:"size-3.5 shrink-0 text-muted-foreground"}):n.jsx(_o,{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(qn,{currentRt:J,currentLabel:Wt(ut?.rule,r??{},lt,l??void 0),currentGlobalKey:Pt(ut?.rule,r??{},l??void 0)??void 0,matchers:It,globals:kn,onSelect:ia,onSelectGlobal:ca,schema:ra,formValue:me,onChange:la,formKey:`${Ce}:${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(lr,{listKey:`${V??""}-${Ce}`,rawSections:q,sections:Fe,meta:l,selectedIndex:p,onSelect:zs,onReorder:Gs,onDelete:Us,onDuplicate:Ws,onMakeReusable:ae,onToggleHidden:qs,onToggleLazy:Ys,onAddVariant:rn,onDetach:Js,onAddSection:()=>re(!0),canAddSection:oa})})]}),n.jsx(eo,{open:se!==null,onOpenChange:t=>{t||ae(null)},defaultBlockId:se!==null?dn(Fe[se]?.label??""):"",isPending:we.isPending,onSubmit:aa}),m&&n.jsx(Yo,{open:je,onOpenChange:t=>{re(t),t||(be.current=null)},meta:l,decofile:r,previewBaseUrl:m,onSelect:Xs}),pe&&V&&r&&n.jsx(to,{open:pe,onOpenChange:xe,pageKey:V,decofile:r}),ue!==null&&n.jsx(Hn,{open:!0,initialName:wt(He[ue]?.rule,r??{},l??void 0)?Wt(He[ue]?.rule,r??{},lt,l??void 0):"",autoLabel:lt(Ct(He[ue]?.rule,r??{},l??void 0)),isPending:Nt,onSubmit:async t=>{await _a(ue,t)},onOpenChange:t=>{!t&&!Nt&&oe(null)}}),de!==null&&n.jsx(Hn,{open:!0,initialName:wt(St[de]?.rule,r??{},l??void 0)?Wt(St[de]?.rule,r??{},lt,l??void 0):"",autoLabel:lt(Ct(St[de]?.rule,r??{},l??void 0)),isPending:Nt,onSubmit:async t=>{await ja(de,t)},onOpenChange:t=>{!t&&!Nt&&le(null)}})]})}export{uc as SectionsEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,aD as nt,aB as Pe,j as d,c$ as rt,aF as be,aC as k,d0 as st,ay as j,aE as N,bN as $,d1 as lt,ag as _e,d2 as Ee,az as at,bI as ct,bP as it,d8 as dt,d9 as ut,da as pt,db as ft,d3 as mt,aA as ht,dc as gt,d4 as vt,d6 as xt,c as ee,m as oe}from"./index-DBW7-LLJ.js";import{V as St}from"./tooltip-fkTa7gIG.js";import{i as wt}from"./Check-CK_e8wdj.js";import{t as Re}from"./ChevronDown-DSAcD82u.js";import{n as Ct}from"./ChevronUp-BqqaHKfG.js";function Ne(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=at(J),[ne]=ht(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,Nt]=ne(J),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),[_,O]=Pe({prop:o,defaultProp:n??!1,onChange:c,caller:J}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),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:_,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(Qe,{"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=J;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(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(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(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 _t="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=_t;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var Q="SelectContent",Be=i.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=i.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const c=o;return c?_e.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=Q;var A=10,[Ve,Y]=ne(Q),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(Q,t),[x,F]=i.useState(null),[M,re]=i.useState(null),_=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(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:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(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(Q,t),s=Y(Q,t),[l,a]=i.useState(null),[u,h]=i.useState(null),v=k(e,_=>h(_)),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 _=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,X=_.left-P,Z=_.width+X,ge=Math.max(Z,O.width),ve=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-U.right-I,X=window.innerWidth-_.right-P,Z=_.width+X,ge=Math.max(Z,O.width),ve=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.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,X=Math.max(ce,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&g===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,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(_=>{_&&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(Q,{}),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(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:N(s.onFocus,()=>w(!0)),onBlur:N(s.onBlur,()=>w(!1)),onClick:N(s.onClick,()=>{g.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{g.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{g.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{g.current=m.pointerType,n?a.onItemLeave?.():g.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(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=Nt(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?_e.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",Xe=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(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=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(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=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(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{c.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(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",Qe=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})});Qe.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,Xt=Be,Zt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;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(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let 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(Xt,{"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(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let 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,Ne as e};
|
|
1
|
+
import{r as i,aD as nt,aB as Pe,j as d,c$ as rt,aF as be,aC as k,d0 as st,ay as j,aE as N,bN as $,d1 as lt,ag as _e,d2 as Ee,az as at,bI as ct,bP as it,d8 as dt,d9 as ut,da as pt,db as ft,d3 as mt,aA as ht,dc as gt,d4 as vt,d6 as xt,c as ee,m as oe}from"./index-bSjz3FLt.js";import{V as St}from"./tooltip-Bfr58shw.js";import{i as wt}from"./Check-BVpJjApv.js";import{t as Re}from"./ChevronDown-DTyVSvpW.js";import{n as Ct}from"./ChevronUp-DNXgZ_10.js";function Ne(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=at(J),[ne]=ht(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,Nt]=ne(J),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),[_,O]=Pe({prop:o,defaultProp:n??!1,onChange:c,caller:J}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),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:_,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(Qe,{"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=J;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(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(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(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 _t="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=_t;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var Q="SelectContent",Be=i.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=i.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const c=o;return c?_e.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=Q;var A=10,[Ve,Y]=ne(Q),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(Q,t),[x,F]=i.useState(null),[M,re]=i.useState(null),_=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(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:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(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(Q,t),s=Y(Q,t),[l,a]=i.useState(null),[u,h]=i.useState(null),v=k(e,_=>h(_)),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 _=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,X=_.left-P,Z=_.width+X,ge=Math.max(Z,O.width),ve=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-U.right-I,X=window.innerWidth-_.right-P,Z=_.width+X,ge=Math.max(Z,O.width),ve=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.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,X=Math.max(ce,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&g===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,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(_=>{_&&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(Q,{}),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(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:N(s.onFocus,()=>w(!0)),onBlur:N(s.onBlur,()=>w(!1)),onClick:N(s.onClick,()=>{g.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{g.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{g.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{g.current=m.pointerType,n?a.onItemLeave?.():g.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(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=Nt(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?_e.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",Xe=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(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=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(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=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(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{c.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(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",Qe=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})});Qe.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,Xt=Be,Zt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;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(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let 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(Xt,{"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(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let 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,Ne as e};
|