decocms 3.18.14 → 3.18.15
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-bw8APVTP.js → AlertCircle-2Km0CX2z.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Dbduy1m4.js → ArrowUpRight-BLByMWEr.js} +1 -1
- package/dist/client/assets/{Check-Bf81oHIx.js → Check-B05JiFMG.js} +1 -1
- package/dist/client/assets/{CheckCircle-C2YKXIzz.js → CheckCircle-D2PakmMP.js} +1 -1
- package/dist/client/assets/{ChevronDown-BvRbGG6-.js → ChevronDown-B-1h0qij.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CiPwn0ab.js → ChevronLeft-DZmvAgUs.js} +1 -1
- package/dist/client/assets/{ChevronRight-BvmZ62FM.js → ChevronRight-UH18q_3i.js} +1 -1
- package/dist/client/assets/{ChevronUp-BIjgRrwO.js → ChevronUp-CNAXIcyx.js} +1 -1
- package/dist/client/assets/{Container-CtL-mp48.js → Container-CnVkM2IK.js} +1 -1
- package/dist/client/assets/{DotsVertical-B73bYg9n.js → DotsVertical-CBkWO2us.js} +1 -1
- package/dist/client/assets/{Eye-CZAVODeF.js → Eye-BF--IKG8.js} +1 -1
- package/dist/client/assets/{FilterLines-CP_9llH7.js → FilterLines-NzTnzrsm.js} +1 -1
- package/dist/client/assets/{Globe01-i2XbOy99.js → Globe01-C6CmSgYh.js} +1 -1
- package/dist/client/assets/{HardDrive-CfrLg2xf.js → HardDrive-C8gbUBwi.js} +1 -1
- package/dist/client/assets/{Key01-BYQMCT4A.js → Key01-DdkT4-r1.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Zaw_5BZm.js → LayoutLeft-Cq-3SzOV.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Bj00t0ru.js → LinkExternal01-BuKoKvOJ.js} +1 -1
- package/dist/client/assets/{Monitor01-B1o877E7.js → Monitor01-DtzCrxlL.js} +1 -1
- package/dist/client/assets/{Palette-D3jRmDwk.js → Palette-qBV8jtn1.js} +1 -1
- package/dist/client/assets/{Play-BZYwkUau.js → Play-BwyGr6Ll.js} +1 -1
- package/dist/client/assets/{Plus-CMEcOONB.js → Plus-2y8e9M50.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DMnRH0ZT.js → RefreshCcw01-7LgZ2KuS.js} +1 -1
- package/dist/client/assets/{SearchMd-DOIvnVlG.js → SearchMd-BNL3h-Lw.js} +1 -1
- package/dist/client/assets/{Settings02-DdkUIvok.js → Settings02-D3dhPmVM.js} +1 -1
- package/dist/client/assets/{Shield01-CSZCc7MG.js → Shield01-02qnRjhT.js} +1 -1
- package/dist/client/assets/{Star01-D_E6-i0i.js → Star01-BIOcBShW.js} +1 -1
- package/dist/client/assets/{Stars01-DzexK6QI.js → Stars01-Ra7VZDk8.js} +1 -1
- package/dist/client/assets/{Stars02-BwO5G7ui.js → Stars02-BxWZ5xUE.js} +1 -1
- package/dist/client/assets/{Sun-BZiXbHNs.js → Sun-cNIbkxvb.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-5FcSEvbO.js → SwitchHorizontal01-D8n2_4Ky.js} +1 -1
- package/dist/client/assets/{Tool01-OQo-uXCC.js → Tool01-CHQi6ime.js} +1 -1
- package/dist/client/assets/{Trash01-C616xT4q.js → Trash01-De5yP0M0.js} +1 -1
- package/dist/client/assets/{Upload01-Oh0sLtTm.js → Upload01-C4oU-PRW.js} +1 -1
- package/dist/client/assets/{User01-D2gFSNxI.js → User01-BQtKeucE.js} +1 -1
- package/dist/client/assets/{Users01-5inxqowf.js → Users01-B5Mk__ya.js} +1 -1
- package/dist/client/assets/{Users03-yWp-llAL.js → Users03-CyIgvftP.js} +1 -1
- package/dist/client/assets/{X-B1c3_NKe.js → X-3fwJpxV0.js} +1 -1
- package/dist/client/assets/{XCircle-Cy7JAcBV.js → XCircle-86RGTWAp.js} +1 -1
- package/dist/client/assets/{XClose-Bt6MNhcr.js → XClose-BlyN_Sc4.js} +1 -1
- package/dist/client/assets/{Zap-o4dnVQUJ.js → Zap-Ca8RLP4U.js} +1 -1
- package/dist/client/assets/{ZapSquare-C2cv_s4k.js → ZapSquare-CzOxfiLh.js} +1 -1
- package/dist/client/assets/{ZoomOut-DPmFOUrW.js → ZoomOut-sWkdOBib.js} +1 -1
- package/dist/client/assets/{access-gate-C6VWMT89.js → access-gate-DhxGxw4d.js} +1 -1
- package/dist/client/assets/{accordion-xYY9Vs3i.js → accordion-B7nmBs3G.js} +1 -1
- package/dist/client/assets/{add-section-modal-DDNbG-LT.js → add-section-modal-BvUFLbIa.js} +1 -1
- package/dist/client/assets/{agent-capabilities-g1017n-e.js → agent-capabilities-DBe6gbqa.js} +1 -1
- package/dist/client/assets/{agent-icon-DM5cF00W.js → agent-icon-DvIbcdW2.js} +1 -1
- package/dist/client/assets/{agent-icons-C8WXPWgd.js → agent-icons-DyjPUCsW.js} +1 -1
- package/dist/client/assets/{agents-list-7KvSth3W.js → agents-list-DaNStHnT.js} +1 -1
- package/dist/client/assets/{ai-providers-CShrfZ48.js → ai-providers-Bib_oH4I.js} +1 -1
- package/dist/client/assets/{alert-ClStgHjS.js → alert-DEBP9hUS.js} +1 -1
- package/dist/client/assets/{alert-dialog-BkN9zKKs.js → alert-dialog-CZIXkgul.js} +1 -1
- package/dist/client/assets/app-editor-DsVP0toS.js +1 -0
- package/dist/client/assets/{auth-catchall-Bo64tC2X.js → auth-catchall-DdQvjuma.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BUZnTB74.js → auth-split-layout-n-ujQmbR.js} +1 -1
- package/dist/client/assets/{automation-list-row-Cw_2pXsa.js → automation-list-row-DriahbPJ.js} +1 -1
- package/dist/client/assets/{automation-runs-CEdKyT7s.js → automation-runs-Ctj_mEp6.js} +1 -1
- package/dist/client/assets/{automations-_fUbD5-a.js → automations-BUfuHGwZ.js} +1 -1
- package/dist/client/assets/{avatar-sm34rGJY.js → avatar-5lbWWNzy.js} +1 -1
- package/dist/client/assets/{badge-DpbVwDlO.js → badge-C8lUCNjK.js} +1 -1
- package/dist/client/assets/{brand-context-CYMUZ_Py.js → brand-context-DvNIUdF6.js} +1 -1
- package/dist/client/assets/{buckets-xQnvHRYr.js → buckets-BJfOjTUl.js} +1 -1
- package/dist/client/assets/{calendar-j_Bkwk5e.js → calendar-DBINhNQa.js} +1 -1
- package/dist/client/assets/{capability-load-error-D0CbsEH-.js → capability-load-error-BBTZEgSS.js} +1 -1
- package/dist/client/assets/{card-DznbXvu1.js → card-BojXSjgh.js} +1 -1
- package/dist/client/assets/{chat-context-DkA0z7QG.js → chat-context-CAiaOJBn.js} +1 -1
- package/dist/client/assets/{checkbox-DJbe24ej.js → checkbox-BRdsmoVp.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BTsn5sKe.js → cli-auth-success-DvdLHTjh.js} +1 -1
- package/dist/client/assets/{collection-detail-3gGoT9BT.js → collection-detail-CSRnSI9A.js} +1 -1
- package/dist/client/assets/{collection-display-button-IEmM7S5W.js → collection-display-button-CqdzzRsa.js} +1 -1
- package/dist/client/assets/{collection-search-CFhPioUl.js → collection-search-7eYR8rmz.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DtNDRZOW.js → collection-table-wrapper-IozlTqh-.js} +1 -1
- package/dist/client/assets/{collection-tabs-BOrvD3ee.js → collection-tabs-wah4r8cS.js} +1 -1
- package/dist/client/assets/{collections-BWns8Fl4.js → collections-6h-er8nI.js} +1 -1
- package/dist/client/assets/{command-CGrKj_q2.js → command-BW6ahm7f.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-Cx6ZiLsH.js → connect-desktop-dialog-B5JH2LsR.js} +1 -1
- package/dist/client/assets/{connection-card-C5Ck0pdF.js → connection-card-CLgdMTGQ.js} +1 -1
- package/dist/client/assets/{connection-detail-CL7d8hb5.js → connection-detail-BnDl_hu3.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CoUR8Gdd.js → connection-form-helpers-BOF_wZkg.js} +1 -1
- package/dist/client/assets/{connections-n2cWHSFA.js → connections-CZjXDeMK.js} +1 -1
- package/dist/client/assets/{constants-CpnKa-xF.js → constants-z4dXNe1A.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DovlgNgn.js → decopilot-sse-pool-D_E34tmA.js} +1 -1
- package/dist/client/assets/{dialog-BgR7sKjj.js → dialog-D4L8eWam.js} +1 -1
- package/dist/client/assets/{domain-settings-BoNB4OyD.js → domain-settings-B_ZzeQnr.js} +1 -1
- package/dist/client/assets/{drawer-yi2RSYSs.js → drawer-_tDof6Q1.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CmFjLD69.js → dropdown-menu-Dl0H7aq8.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CAghhmrX.js → dynamic-plugin-layout-zDEHkdNd.js} +1 -1
- package/dist/client/assets/{empty-state-BLShIxQO.js → empty-state-DQ2A49Za.js} +1 -1
- package/dist/client/assets/{empty-state-DZiP84xj.js → empty-state-n6SIHgFi.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Cu0TihZD.js → extract-connection-data-DubVfj_8.js} +1 -1
- package/dist/client/assets/{features-CQ7eQ45h.js → features-Bt5trMQR.js} +1 -1
- package/dist/client/assets/{file-explorer-BXGYEc6t.js → file-explorer-Cta1sV0c.js} +1 -1
- package/dist/client/assets/{file-type-icon-C-p7ShzI.js → file-type-icon-CYcdJQBd.js} +1 -1
- package/dist/client/assets/{files-CA5Kud-R.js → files-DxLfFYV8.js} +1 -1
- package/dist/client/assets/{form-CQCVrb2A.js → form-DWpWJxH3.js} +1 -1
- package/dist/client/assets/{general-n7zJ-Tmv.js → general-BOEBqJTT.js} +1 -1
- package/dist/client/assets/{generate-id-D2atcitn.js → generate-id-CUPl0OgE.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CW5Lm0LI.js → github-repo-picker-CIX9qNpb.js} +1 -1
- package/dist/client/assets/{header-tab-button-3G28EYnu.js → header-tab-button-DWdrQrci.js} +1 -1
- package/dist/client/assets/{hover-card-Cbez29Eh.js → hover-card-BpUlDOcu.js} +1 -1
- package/dist/client/assets/{image-field-D0VeC8fd.js → image-field-B9LJ-oo3.js} +1 -1
- package/dist/client/assets/{index-dnazHw5V.js → index-5dm8s9_d.js} +1 -1
- package/dist/client/assets/{index-BT_raHV2.js → index-8LKP27D8.js} +1 -1
- package/dist/client/assets/{index-DTIMrSki.js → index-B-PHV3oz.js} +3 -3
- package/dist/client/assets/{index-Dif3zHHN.js → index-B6gGXliX.js} +1 -1
- package/dist/client/assets/{index-ChUipotL.js → index-BAFQUCvL.js} +1 -1
- package/dist/client/assets/{index-TpB5789m.js → index-BHNzJyJJ.js} +4 -4
- package/dist/client/assets/{index-D9EvcvjG.js → index-C6_q3Fvb.js} +1 -1
- package/dist/client/assets/{index-D9S2FyNx.js → index-Ce4_XeXN.js} +1 -1
- package/dist/client/assets/{index-svSMHN0w.js → index-DCXIRuG9.js} +1 -1
- package/dist/client/assets/{index-DGlN_9W_.js → index-DKhTnIGj.js} +1 -1
- package/dist/client/assets/{index-_lE9LP-s.js → index-DPSjO83e.js} +1 -1
- package/dist/client/assets/{index-C3kEUtyw.js → index-Dd2xeqBU.js} +1 -1
- package/dist/client/assets/{index-X1FaP_lK.js → index-PCvAjjUF.js} +1 -1
- package/dist/client/assets/{index-DpRtSKGx.js → index-r6D2rnm-.js} +1 -1
- package/dist/client/assets/{index-redirect-BdTNQBy1.js → index-redirect-DvO-nY0l.js} +1 -1
- package/dist/client/assets/{index-BvOXlcfp.js → index-xIEUKOci.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-qU5LO8rc.js → infiniteQueryObserver-D8VqrbcP.js} +1 -1
- package/dist/client/assets/{input-COyKwj-n.js → input-DMqfVdLl.js} +1 -1
- package/dist/client/assets/{integration-icon-D6-qSe9e.js → integration-icon-D82j_1fN.js} +1 -1
- package/dist/client/assets/{label-BqzXVIx8.js → label-CEKSGqhJ.js} +1 -1
- package/dist/client/assets/{layout-Dgoj1q-v.js → layout-CZFlWOtF.js} +1 -1
- package/dist/client/assets/{login-CJ-M9FDx.js → login-CTWgO0AK.js} +1 -1
- package/dist/client/assets/{members-CY1JRcOT.js → members-kt9gLt-h.js} +1 -1
- package/dist/client/assets/{monaco-editor-Bc8JgloZ.js → monaco-editor-C46m31Dh.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-HPV40e1F.js → monitoring-stats-row-CebqP6k-.js} +1 -1
- package/dist/client/assets/{oauth-callback-DEbnvZpM.js → oauth-callback-BZrRM5kU.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BxzGllvJ.js → oauth-callback-ai-provider-BBuEC5Wz.js} +1 -1
- package/dist/client/assets/{onboarding-DB5AWt_c.js → onboarding-rzwzYzm_.js} +1 -1
- package/dist/client/assets/{org-install-D-h5ZLYW.js → org-install-Gip9a1hb.js} +1 -1
- package/dist/client/assets/{org-layout-gkZ1ckS_.js → org-layout-dh0ltVLd.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-CUdY7qHI.js → org-plugin-layout-DF3qU2QR.js} +1 -1
- package/dist/client/assets/{page-seo-form-DHVvMQEp.js → page-seo-form-CYUPfUAt.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Dd5zcjqg.js +1 -0
- package/dist/client/assets/{pair-_1qYDL9O.js → pair-crvFYVBr.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CY_Wyooh.js → plugin-empty-state-x9gnUm1V.js} +1 -1
- package/dist/client/assets/{plugin-header-x-FR2fIR.js → plugin-header-Df3pEPu9.js} +1 -1
- package/dist/client/assets/{plugin-layout-CPzWmWjs.js → plugin-layout-D3EhJ7op.js} +1 -1
- package/dist/client/assets/{popover-BuZ8Y8iu.js → popover-Dl1ZkjR5.js} +1 -1
- package/dist/client/assets/{post-editor-txhYuHfn.js → post-editor-zf_w60KH.js} +1 -1
- package/dist/client/assets/{primitives-BjI65GQ9.js → primitives-CKiHtqRB.js} +1 -1
- package/dist/client/assets/{profile-CUO4qF-t.js → profile-CIaXotrp.js} +1 -1
- package/dist/client/assets/project-app-view-IEYOUU7q.js +1 -0
- package/dist/client/assets/record-editor-BYoxxfKk.js +1 -0
- package/dist/client/assets/registry-B0clmo5b.js +2 -0
- package/dist/client/assets/{registry-layout-DkT4OpIe.js → registry-layout-DGFplxm8.js} +1 -1
- package/dist/client/assets/{require-capability-VFrqa_TF.js → require-capability-DcqVaeiX.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C-P6JOpD.js → required-auth-layout-XAFLruT3.js} +1 -1
- package/dist/client/assets/{reset-password-Coe_gvDQ.js → reset-password-BZZgl7lT.js} +1 -1
- package/dist/client/assets/{resizable-CdwyF2Th.js → resizable-CwNlFXM0.js} +1 -1
- package/dist/client/assets/{roles-CLHJjzsb.js → roles-qmPrLYMg.js} +1 -1
- package/dist/client/assets/{save-status-CSnhnIzR.js → save-status-BoMz5J28.js} +1 -1
- package/dist/client/assets/{schema-form-SHU04h0X.js → schema-form-B_vVRhXa.js} +1 -1
- package/dist/client/assets/{scroll-area-DNFFm-Da.js → scroll-area-Cm6OwqFg.js} +1 -1
- package/dist/client/assets/{search-input-kS6oNZ8N.js → search-input-BmRW3Wrv.js} +1 -1
- package/dist/client/assets/{secrets-cm7K67gb.js → secrets-BHdH4vfv.js} +1 -1
- package/dist/client/assets/{sections-editor-CIRhTc6O.js → sections-editor-MEEsh-TE.js} +1 -1
- package/dist/client/assets/{select-model-CBJr1n3A.js → select-model-D6htI6Ma.js} +1 -1
- package/dist/client/assets/{select-BwWN8yYM.js → select-xdBxNMUb.js} +1 -1
- package/dist/client/assets/{seo-editor-C6kUTQbL.js → seo-editor-BHelQny3.js} +1 -1
- package/dist/client/assets/{settings-layout-CLR44Cfr.js → settings-layout-DSZYNuri.js} +1 -1
- package/dist/client/assets/{settings-section-D8pPcHrJ.js → settings-section-C5SA5_8A.js} +1 -1
- package/dist/client/assets/{sheet-DgB1c-VM.js → sheet-D_M_IVaY.js} +1 -1
- package/dist/client/assets/{shell-controls-GYTzk8VK.js → shell-controls-DVl-40mx.js} +1 -1
- package/dist/client/assets/{shell-layout-DhcPxoJD.js → shell-layout-xKUGAKiS.js} +1 -1
- package/dist/client/assets/{shell-route-loading-CjSh1k0Y.js → shell-route-loading-BSSaTyIa.js} +1 -1
- package/dist/client/assets/{sidebar-DlrNB2Xp.js → sidebar-CWkpLi-3.js} +1 -1
- package/dist/client/assets/{skeleton-vS5RdX08.js → skeleton-9nqYTB4H.js} +1 -1
- package/dist/client/assets/{sortable.esm-DsVAkcb-.js → sortable.esm-BcFz9Psy.js} +1 -1
- package/dist/client/assets/{spinner-ClPrRNae.js → spinner-B2vBmLe8.js} +1 -1
- package/dist/client/assets/{sso-BfQZTXOa.js → sso-jXmArOcD.js} +1 -1
- package/dist/client/assets/{store-Dh4OeDzo.js → store-Zu--mnH4.js} +1 -1
- package/dist/client/assets/store-registry-CoE86eRH.js +2 -0
- package/dist/client/assets/{switch-TwwoKMLD.js → switch-UTjje473.js} +1 -1
- package/dist/client/assets/{tab-id-BvDwqq5G.js → tab-id-D6B9k9rp.js} +1 -1
- package/dist/client/assets/{table-CqpgXtvV.js → table-DCodMVmA.js} +1 -1
- package/dist/client/assets/{tabs-7ZwKh-ET.js → tabs-B8C4rHnI.js} +1 -1
- package/dist/client/assets/{task-status-DJ8zGGL1.js → task-status-CY705BLe.js} +1 -1
- package/dist/client/assets/{textarea-BVSBUQBw.js → textarea-DHIira09.js} +1 -1
- package/dist/client/assets/{toggle-group-DitpC9UH.js → toggle-group-C4X1dcf6.js} +1 -1
- package/dist/client/assets/{toolbar-C4mR5FDC.js → toolbar-Dfgzdkic.js} +1 -1
- package/dist/client/assets/{tools-list-CzPzcLtp.js → tools-list-BEiQpjim.js} +1 -1
- package/dist/client/assets/{tooltip-B73tUZ1m.js → tooltip-5zCZryvU.js} +1 -1
- package/dist/client/assets/{types-DcJ-04H3.js → types-ChK1eRLX.js} +1 -1
- package/dist/client/assets/{use-ai-providers-2aN6ivvn.js → use-ai-providers-DOlhyKeN.js} +1 -1
- package/dist/client/assets/{use-automations-5zzS4QL6.js → use-automations-CYo7bTL2.js} +1 -1
- package/dist/client/assets/{use-capability-qzt5yc4K.js → use-capability-Dh4mghw5.js} +1 -1
- package/dist/client/assets/{use-collections-DwKsUMti.js → use-collections-B47GVLOL.js} +1 -1
- package/dist/client/assets/{use-connection-Cwv1LoHp.js → use-connection-xtan9MLA.js} +1 -1
- package/dist/client/assets/{use-copy-CKQfjDVo.js → use-copy-C4ZAj4f4.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-lUbyVuL2.js → use-create-virtual-mcp-Ct03M34V.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DZjvQqdP.js → use-debounced-autosave-CCI4Blgp.js} +1 -1
- package/dist/client/assets/{use-delete-connection-kPPh9tkW.js → use-delete-connection-0rOlwE36.js} +1 -1
- package/dist/client/assets/{use-file-configs-D8DD3_j6.js → use-file-configs-CTGSVeMB.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C6qx_zOj.js → use-infinite-scroll-DOmZgM0o.js} +1 -1
- package/dist/client/assets/{use-list-state-BwjzrQt0.js → use-list-state-DYrqWRC5.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CLjWTejk.js → use-mcp-prompts-NDfKteCA.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DZOvxGCI.js → use-mcp-tools-OpAnzK8L.js} +1 -1
- package/dist/client/assets/{use-members-CItAFL92.js → use-members-B4vP4n73.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BDPVPFmk.js → use-navigate-to-agent-Bj_pSs39.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CB-HyejF.js → use-org-auth-client-0xYqT1He.js} +1 -1
- package/dist/client/assets/{use-org-sso-CvUHQ8hJ.js → use-org-sso-C0VlDkck.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BSPq9MzU.js → use-organization-roles-B_y3meLa.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B437Sgc-.js → use-organization-settings-CDjtm6S0.js} +1 -1
- package/dist/client/assets/{use-registry-connections-C2Tx39xp.js → use-registry-connections-BGN7oY_B.js} +1 -1
- package/dist/client/assets/{use-secrets-CaxOFigl.js → use-secrets-KLXtsaQq.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DBw9c6R5.js → use-status-sounds-BQZXHMUe.js} +1 -1
- package/dist/client/assets/{use-view-mode-Cbbs6eev.js → use-view-mode-ByOIjp8l.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DsknuxfQ.js → use-virtual-mcp-DPpsp0b-.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-5f-XmzuR.js +1 -0
- package/dist/client/assets/{useRouterState-BuKQPQqt.js → useRouterState-C1tnhy3B.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CI2XOApz.js +1 -0
- package/dist/client/assets/{user-Cr6KrMQF.js → user-BN8x6_Oz.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Bw6oVmE9.js → view-mode-toggle-CXjX5DI_.js} +1 -1
- package/dist/client/assets/{workflow-BS6qyoTg.js → workflow-CYHY-omo.js} +1 -1
- package/dist/client/assets/workflow-detail-5cTcIfwi.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +161 -161
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +157 -157
- package/package.json +1 -1
- package/dist/client/assets/app-editor-CvCtk6DP.js +0 -1
- package/dist/client/assets/page-seo-sheet-86Ob0SKm.js +0 -1
- package/dist/client/assets/project-app-view-CXcT_osU.js +0 -1
- package/dist/client/assets/record-editor-DQxbE3JE.js +0 -1
- package/dist/client/assets/registry-3vxU2iaj.js +0 -2
- package/dist/client/assets/store-registry-G-33lnXc.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CRK338_N.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CDSuZvB0.js +0 -1
- package/dist/client/assets/workflow-detail-DR4AjhaL.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as $e,r as N,j as t,B as Ve,l as Yt,c as de,G as ea,o as xe,K as ta}from"./index-DTIMrSki.js";import{t as $n}from"./ChevronDown-BvRbGG6-.js";import{i as na}from"./ChevronRight-BvmZ62FM.js";import{n as sa}from"./ChevronUp-BIjgRrwO.js";import{D as qt,u as Wt,g as bt,E as aa,F as ra,J as oa}from"./agent-icon-DM5cF00W.js";import{i as ia}from"./Globe01-i2XbOy99.js";import{S as ft}from"./scroll-area-DNFFm-Da.js";import{T as rt,a as ot,b as it}from"./tooltip-B73tUZ1m.js";import{c as On,b as Ln,e as zn,d as In,a as Fn,D as Bn}from"./dialog-BgR7sKjj.js";import{I as Kn}from"./input-COyKwj-n.js";import{r as la,i as Xe,P as Hn,S as Un,N as ca,l as Ke,G as ua,a as da,b as gt,u as ma,c as fa,d as pa,e as ha,f as ga,g as va,h as xa,j as pt,k as $t,m as Ze,p as jn,n as kn,o as ya,q as Ot,s as ba,t as Sa,v as _a,w as ja,x as ka,y as Na,z as wa,A as Ta,B as ht,C as Ca,D as Ra,E as Da,F as Aa,H as Pa,I as Ma,J as Lt,K as Ea,L as Va,M as $a,O as zt,Q as Oa,R as La,T as Nn}from"./index-TpB5789m.js";import{s as za,a as Yn}from"./Eye-CZAVODeF.js";import{d as Ia}from"./ZoomOut-DPmFOUrW.js";import{a as Fa}from"./RefreshCcw01-DMnRH0ZT.js";import{s as Ht}from"./Plus-CMEcOONB.js";import{s as St}from"./Trash01-C616xT4q.js";import{i as Ba}from"./Zap-o4dnVQUJ.js";import{a as Gt,c as Qe,D as Jt,b as Zt,d as Ka}from"./dropdown-menu-CmFjLD69.js";import{u as qn,a as vt,K as Wn,P as Gn,b as Jn,C as Zn,s as Qn,d as xt,D as Xn,c as es,S as ts,v as Ha,e as ns,h as Ua}from"./sortable.esm-DsVAkcb-.js";import{r as Ya,s as qa,S as Ut}from"./schema-form-SHU04h0X.js";import{r as wn,u as Wa,d as Ga,a as Ja,i as Za,f as Qa,P as Xa,b as er,S as tr}from"./page-seo-form-DHVvMQEp.js";import{c as nr,C as sr,e as Tn,d as ar,a as rr,g as or}from"./command-CGrKj_q2.js";import{i as ir}from"./FilterLines-CP_9llH7.js";import{i as lr}from"./Tool01-OQo-uXCC.js";import{AddSectionModal as cr}from"./add-section-modal-DDNbG-LT.js";import"./AlertCircle-bw8APVTP.js";import"./SwitchHorizontal01-5FcSEvbO.js";import"./XCircle-Cy7JAcBV.js";import"./ArrowUpRight-Dbduy1m4.js";import"./ZapSquare-C2cv_s4k.js";import"./Users03-yWp-llAL.js";import"./CheckCircle-C2YKXIzz.js";import"./Check-Bf81oHIx.js";import"./ChevronLeft-CiPwn0ab.js";import"./DotsVertical-B73bYg9n.js";import"./Container-CtL-mp48.js";import"./Star01-D_E6-i0i.js";import"./Palette-D3jRmDwk.js";import"./HardDrive-CfrLg2xf.js";import"./Stars02-BwO5G7ui.js";import"./Key01-BYQMCT4A.js";import"./LayoutLeft-Zaw_5BZm.js";import"./LinkExternal01-Bj00t0ru.js";import"./Monitor01-B1o877E7.js";import"./Sun-BZiXbHNs.js";import"./Play-BZYwkUau.js";import"./SearchMd-DOIvnVlG.js";import"./Settings02-DdkUIvok.js";import"./Shield01-CSZCc7MG.js";import"./Stars01-DzexK6QI.js";import"./Upload01-Oh0sLtTm.js";import"./User01-D2gFSNxI.js";import"./Users01-5inxqowf.js";import"./XClose-Bt6MNhcr.js";import"./X-B1c3_NKe.js";import"./select-BwWN8yYM.js";import"./agent-capabilities-g1017n-e.js";import"./chat-context-DkA0z7QG.js";import"./tab-id-BvDwqq5G.js";import"./constants-CpnKa-xF.js";import"./decopilot-sse-pool-DovlgNgn.js";import"./create-sse-subscription-BS5983N4.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-virtual-mcp-DsknuxfQ.js";import"./use-collections-DwKsUMti.js";import"./use-ai-providers-2aN6ivvn.js";import"./use-organization-settings-B437Sgc-.js";import"./pair-_1qYDL9O.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CKQfjDVo.js";import"./file-type-icon-C-p7ShzI.js";import"./content-blocks-o63cs2vh.js";import"./types-DcJ-04H3.js";import"./shell-layout-DhcPxoJD.js";import"./avatar-sm34rGJY.js";import"./required-auth-layout-C-P6JOpD.js";import"./useRouterState-BuKQPQqt.js";import"./use-org-sso-CvUHQ8hJ.js";import"./integration-icon-D6-qSe9e.js";import"./use-navigate-to-agent-BDPVPFmk.js";import"./use-connection-Cwv1LoHp.js";import"./use-mcp-prompts-CLjWTejk.js";import"./form-CQCVrb2A.js";import"./label-BqzXVIx8.js";import"./spinner-ClPrRNae.js";import"./drawer-yi2RSYSs.js";import"./collection-search-CFhPioUl.js";import"./tabs-7ZwKh-ET.js";import"./toggle-group-DitpC9UH.js";import"./connect-desktop-dialog-Cx6ZiLsH.js";import"./agent-icons-C8WXPWgd.js";import"./checkbox-DJbe24ej.js";import"./skeleton-vS5RdX08.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-D8pPcHrJ.js";import"./card-DznbXvu1.js";import"./popover-BuZ8Y8iu.js";import"./useInfiniteQuery-CRK338_N.js";import"./infiniteQueryObserver-qU5LO8rc.js";import"./index-dnazHw5V.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-CjSh1k0Y.js";import"./sidebar-DlrNB2Xp.js";import"./sheet-DgB1c-VM.js";import"./toolbar-C4mR5FDC.js";import"./use-create-virtual-mcp-lUbyVuL2.js";import"./github-repo-picker-CW5Lm0LI.js";import"./use-mcp-tools-DZOvxGCI.js";import"./extract-connection-data-Cu0TihZD.js";import"./generate-id-D2atcitn.js";import"./collections-BWns8Fl4.js";import"./alert-dialog-BkN9zKKs.js";import"./index-Dif3zHHN.js";import"./use-org-auth-client-CB-HyejF.js";import"./hover-card-Cbez29Eh.js";import"./task-status-DJ8zGGL1.js";import"./use-status-sounds-DBw9c6R5.js";import"./empty-state-BLShIxQO.js";import"./resizable-CdwyF2Th.js";import"./use-capability-qzt5yc4K.js";import"./header-tab-button-3G28EYnu.js";import"./index-D9S2FyNx.js";import"./textarea-BVSBUQBw.js";import"./user-Cr6KrMQF.js";import"./tools-list-CzPzcLtp.js";import"./badge-DpbVwDlO.js";import"./connection-slug-eyAPH6o3.js";import"./switch-TwwoKMLD.js";import"./use-debounced-autosave-DZjvQqdP.js";import"./index-ChUipotL.js";import"./search-input-kS6oNZ8N.js";import"./collection-tabs-BOrvD3ee.js";import"./use-secrets-CaxOFigl.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-xYY9Vs3i.js";import"./view-mode-toggle-Bw6oVmE9.js";import"./select-model-CBJr1n3A.js";import"./use-automations-5zzS4QL6.js";import"./monaco-editor-Bc8JgloZ.js";import"./automation-runs-CEdKyT7s.js";import"./table-CqpgXtvV.js";import"./use-infinite-scroll-C6qx_zOj.js";import"./use-members-CItAFL92.js";import"./useSuspenseInfiniteQuery-CDSuZvB0.js";import"./automation-list-row-Cw_2pXsa.js";import"./connection-card-C5Ck0pdF.js";import"./use-registry-connections-C2Tx39xp.js";import"./connection-form-helpers-CoUR8Gdd.js";import"./calendar-j_Bkwk5e.js";import"./image-field-D0VeC8fd.js";import"./use-file-configs-D8DD3_j6.js";import"./index-_lE9LP-s.js";function ur(a){const e=$e.c(38),{open:n,initialName:r,autoLabel:o,isPending:u,onSubmit:h,onOpenChange:d}=a,i=u===void 0?!1:u,[g,v]=N.useState(r),[x,b]=N.useState(n);n!==x&&(b(n),n&&v(r));let S;e[0]!==i||e[1]!==d?(S=T=>{!T&&!i&&d(!1)},e[0]=i,e[1]=d,e[2]=S):S=e[2];const l=S;let _;e[3]!==i||e[4]!==g||e[5]!==h?(_=async T=>{T.preventDefault(),!i&&await h(g.trim())},e[3]=i,e[4]=g,e[5]=h,e[6]=_):_=e[6];const p=_;let R;e[7]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(On,{children:"Rename variant"}),e[7]=R):R=e[7];const f=o||"the rule";let w;e[8]!==f?(w=t.jsxs(Ln,{children:[R,t.jsxs(zn,{children:["Save this matcher as a global block with a custom label. Leave empty to inline the matcher again and fall back to"," ",t.jsx("span",{className:"font-medium",children:f}),"."]})]}),e[8]=f,e[9]=w):w=e[9];let D;e[10]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[10]=D):D=e[10];let j;e[11]===Symbol.for("react.memo_cache_sentinel")?(j=T=>v(T.target.value),e[11]=j):j=e[11];let V;e[12]!==o||e[13]!==i||e[14]!==g?(V=t.jsxs("div",{className:"space-y-1.5 py-4",children:[D,t.jsx(Kn,{id:"variant-rename-name",value:g,onChange:j,placeholder:o,autoFocus:!0,disabled:i})]}),e[12]=o,e[13]=i,e[14]=g,e[15]=V):V=e[15];let k;e[16]!==d?(k=()=>d(!1),e[16]=d,e[17]=k):k=e[17];let $;e[18]!==i||e[19]!==k?($=t.jsx(Ve,{type:"button",variant:"outline",onClick:k,disabled:i,children:"Cancel"}),e[18]=i,e[19]=k,e[20]=$):$=e[20];let C;e[21]!==i?(C=i?t.jsxs(t.Fragment,{children:[t.jsx(Yt,{size:14,className:"animate-spin"}),"Saving…"]}):"Save",e[21]=i,e[22]=C):C=e[22];let A;e[23]!==i||e[24]!==C?(A=t.jsx(Ve,{type:"submit",disabled:i,children:C}),e[23]=i,e[24]=C,e[25]=A):A=e[25];let z;e[26]!==$||e[27]!==A?(z=t.jsxs(In,{children:[$,A]}),e[26]=$,e[27]=A,e[28]=z):z=e[28];let O;e[29]!==p||e[30]!==z||e[31]!==w||e[32]!==V?(O=t.jsx(Fn,{className:"sm:max-w-md",children:t.jsxs("form",{onSubmit:p,children:[w,V,z]})}),e[29]=p,e[30]=z,e[31]=w,e[32]=V,e[33]=O):O=e[33];let E;return e[34]!==l||e[35]!==n||e[36]!==O?(E=t.jsx(Bn,{open:n,onOpenChange:l,children:O}),e[34]=l,e[35]=n,e[36]=O,e[37]=E):E=e[37],E}function It(a,e,n,r,o){const u={...a[e]};if(o.length>1){const h=u.sections,d=[...h?.variants??[]];d[r]&&(d[r]={...d[r],value:n}),u.sections={...h,variants:d}}else u.sections=n;return u}function dr(a){return structuredClone(a)}function mr(a){return!a.isSavedBlock&&!a.isMultivariate}function Cn(a){const e=a.replace(/[^A-Za-z0-9_-]/g,"");return/^[A-Za-z]/.test(e)?e:e?`Block${e}`:""}function Rn(a,e){const n=a.trim();return n?n.includes("/")?"Block name cannot contain slashes.":Object.hasOwn(e,n)?"A block with this name already exists.":/^[A-Za-z][A-Za-z0-9_-]*$/.test(n)?null:"Use letters, numbers, hyphens, or underscores. Must start with a letter.":"Block name is required."}function fr(a){return a.schema?.definitions??a.schema?.$defs??{}}function pr(a,e){const n=fr(e),r=n[btoa(a)];if(!r)return;let o=typeof r.image=="string"?r.image:void 0;if(!o&&Array.isArray(r.allOf)){const u=r.allOf.find(h=>typeof h.$ref=="string")?.$ref;if(typeof u=="string"){const h=u.replace("#/definitions/",""),d=n[h];o=typeof d?.image=="string"?d.image:void 0}}if(o?.includes("{{{"))return o}function hr(a,e){if(!e)return;const n=la(a);if(!n)return;const r=pr(n.resolveType,e);if(!r)return;const o=Ya(r,n.data);if(o)return qa(o)}function Ft(a,e){return a.map((n,r)=>{const o=n.__resolveType??"",u=Xe(o);if(!u&&o!==""&&!o.includes("/")&&o in e){const g=e[o],v=typeof g?.name=="string"&&g.name||o.replace(/[-_]/g," ").replace(/\b\w/g,x=>x.toUpperCase())||`Section ${r+1}`;return{index:r,resolveType:o,label:v,isLazy:!1,isSavedBlock:!0}}const h=u?n.section:void 0,d=u?h?.__resolveType??"":o;if(d===Hn||d===Un){const g=u?h:n,v=Array.isArray(g?.variants)?g.variants:[];if(v.length===1&&(v[0]?.rule?.__resolveType??"")===ca){const S=v[0]?.value??{};let l=S.__resolveType??"";const _=Xe(l);return _&&(l=S.section?.__resolveType??l),{index:r,resolveType:o,label:Ke(l)||`Section ${r+1}`,isHidden:!0,isLazy:_}}const x=v[0]?.value?.__resolveType,b=x?Ke(x):"Section";return{index:r,resolveType:o,label:`Variants of ${b}`,isMultivariate:!0,isLazy:u}}const i=u?n.section?.__resolveType??o:o;if(u&&i!==""&&!i.includes("/")&&i in e){const g=e[i],v=typeof g?.name=="string"&&g.name||i.replace(/[-_]/g," ").replace(/\b\w/g,x=>x.toUpperCase())||`Section ${r+1}`;return{index:r,resolveType:o,label:v,isLazy:!0,isSavedBlock:!0}}return{index:r,resolveType:o,label:Ke(i)||`Section ${r+1}`,isLazy:u}})}const gr="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",vr="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 Dn(a){return Array.from({length:a},(e,n)=>({id:crypto.randomUUID(),index:n}))}function ss(a){return a.map((e,n)=>({...e,index:n}))}function xr(a,e){if(e===a.length)return a;if(e<a.length)return ss(a.slice(0,e));const n=Array.from({length:e-a.length},(r,o)=>({id:crypto.randomUUID(),index:a.length+o}));return[...a,...n]}function as(a){const e=$e.c(20),{section:n,raw:r,meta:o}=a,u=n.isSavedBlock===!0,h=n.isMultivariate===!0;let d;e[0]!==o||e[1]!==r?(d=r&&o?hr(r,o):void 0,e[0]=o,e[1]=r,e[2]=d):d=e[2];const i=d;let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ia,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=g):g=e[3];let v;e[4]!==i?(v=i&&t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=i,e[5]=v):v=e[5];let x;e[6]!==h||e[7]!==u?(x=u?{color:ua}:h?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=h,e[7]=u,e[8]=x):x=e[8];let b;e[9]!==x?(b=t.jsx(qt,{className:"h-4 w-4 shrink-0",style:x}),e[9]=x,e[10]=b):b=e[10];const S=n.isHidden&&"line-through opacity-50";let l;e[11]!==S?(l=de("min-w-0 flex-1 truncate text-sm font-medium",S),e[11]=S,e[12]=l):l=e[12];let _;e[13]!==n.label||e[14]!==l?(_=t.jsx("span",{className:l,children:n.label}),e[13]=n.label,e[14]=l,e[15]=_):_=e[15];let p;return e[16]!==v||e[17]!==b||e[18]!==_?(p=t.jsxs(t.Fragment,{children:[g,v,b,_]}),e[16]=v,e[17]=b,e[18]=_,e[19]=p):p=e[19],p}function rs(a,e){const n=a.isSavedBlock===!0,r=a.isMultivariate===!0;return de("group flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":n?gr:r?"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 yr(a){const e=$e.c(53),{section:n,raw:r,meta:o,sortableId:u,selected:h,onSelect:d,onDelete:i,onDuplicate:g,onMakeReusable:v,onToggleHidden:x,onToggleLazy:b}=a,S=r?Xe(r.__resolveType??""):!1;let l;e[0]!==u?(l={id:u,animateLayoutChanges:kr},e[0]=u,e[1]=l):l=e[1];const{attributes:_,listeners:p,setNodeRef:R,transform:f,isDragging:w}=Jn(l);let D;e[2]!==f?(D=Zn.Transform.toString(f?{...f,x:0}:null),e[2]=f,e[3]=D):D=e[3];const j=w?0:void 0;let V;e[4]!==D||e[5]!==j?(V={transform:D,opacity:j},e[4]=D,e[5]=j,e[6]=V):V=e[6];const k=V;let $;e[7]!==n?($=mr(n),e[7]=n,e[8]=$):$=e[8];const C=$,A="button",z=0;let O;e[9]!==d?(O=H=>{(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),d())},e[9]=d,e[10]=O):O=e[10];const E=w?"cursor-grabbing":"cursor-pointer";let T;e[11]!==n||e[12]!==h||e[13]!==E?(T=de("touch-none transition-colors",E,rs(n,h)),e[11]=n,e[12]=h,e[13]=E,e[14]=T):T=e[14];let Y;e[15]!==o||e[16]!==r||e[17]!==n?(Y=t.jsx(as,{section:n,raw:r,meta:o}),e[15]=o,e[16]=r,e[17]=n,e[18]=Y):Y=e[18];const oe=!n.isMultivariate&&t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":S?"Disable async render":"Enable async render",className:de("h-7 w-7 shrink-0",S?"":"opacity-0 group-hover:opacity-100"),onClick:H=>{H.stopPropagation(),b()},onPointerDown:jr,children:t.jsx(Ba,{className:de("h-3.5 w-3.5",S&&"text-yellow-500")})});let I;e[19]!==x||e[20]!==n.isHidden||e[21]!==n.isMultivariate?(I=!n.isMultivariate&&t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":n.isHidden?"Show section":"Hide section",className:de("h-7 w-7 shrink-0",n.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:H=>{H.stopPropagation(),x()},onPointerDown:_r,children:n.isHidden?t.jsx(Fa,{className:"h-3.5 w-3.5"}):t.jsx(za,{className:"h-3.5 w-3.5"})}),e[19]=x,e[20]=n.isHidden,e[21]=n.isMultivariate,e[22]=I):I=e[22];let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(Gt,{asChild:!0,children:t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":"Section actions",className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:Sr,onPointerDown:br,children:t.jsx(Wt,{className:"h-3.5 w-3.5"})})}),e[23]=ie):ie=e[23];let K;e[24]!==g?(K=H=>{H.stopPropagation(),g()},e[24]=g,e[25]=K):K=e[25];let X;e[26]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(Yn,{className:"h-4 w-4"}),e[26]=X):X=e[26];let ae;e[27]!==K?(ae=t.jsxs(Qe,{onClick:K,children:[X,"Duplicate"]}),e[27]=K,e[28]=ae):ae=e[28];let te;e[29]!==C||e[30]!==v?(te=C&&t.jsxs(Qe,{className:vr,onClick:H=>{H.stopPropagation(),v()},children:[t.jsx(qt,{className:"h-4 w-4"}),"Make reusable"]}),e[29]=C,e[30]=v,e[31]=te):te=e[31];let W;e[32]!==i?(W=H=>{H.stopPropagation(),i()},e[32]=i,e[33]=W):W=e[33];let G;e[34]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(St,{className:"h-4 w-4"}),e[34]=G):G=e[34];let q;e[35]!==W?(q=t.jsxs(Qe,{className:"text-destructive focus:text-destructive",onClick:W,children:[G,"Delete"]}),e[35]=W,e[36]=q):q=e[36];let J;e[37]!==ae||e[38]!==te||e[39]!==q?(J=t.jsxs(Jt,{children:[ie,t.jsxs(Zt,{align:"end",className:"w-44",children:[ae,te,q]})]}),e[37]=ae,e[38]=te,e[39]=q,e[40]=J):J=e[40];let Z;return e[41]!==_||e[42]!==p||e[43]!==d||e[44]!==R||e[45]!==k||e[46]!==T||e[47]!==Y||e[48]!==oe||e[49]!==I||e[50]!==J||e[51]!==O?(Z=t.jsxs("div",{ref:R,style:k,..._,...p,role:A,tabIndex:z,onClick:d,onKeyDown:O,className:T,children:[Y,oe,I,J]}),e[41]=_,e[42]=p,e[43]=d,e[44]=R,e[45]=k,e[46]=T,e[47]=Y,e[48]=oe,e[49]=I,e[50]=J,e[51]=O,e[52]=Z):Z=e[52],Z}function br(a){return a.stopPropagation()}function Sr(a){return a.stopPropagation()}function _r(a){return a.stopPropagation()}function jr(a){return a.stopPropagation()}function kr(){return!1}function Nr(a){const e=$e.c(88),{listKey:n,rawSections:r,sections:o,meta:u,selectedIndex:h,onSelect:d,onReorder:i,onDelete:g,onDuplicate:v,onMakeReusable:x,onToggleHidden:b,onToggleLazy:S,onAddSection:l,canAddSection:_}=a,p=_===void 0?!0:_;let R;e[0]!==o.length?(R=()=>Dn(o.length),e[0]=o.length,e[1]=R):R=e[1];const[f,w]=N.useState(R),[D,j]=N.useState(null),[V,k]=N.useState(n),[$,C]=N.useState(o.length),A=N.useRef(!1);V!==n?(k(n),C(o.length),w(Dn(o.length))):$!==o.length&&(C(o.length),w(le=>xr(le,o.length)));let z;e[2]===Symbol.for("react.memo_cache_sentinel")?(z={activationConstraint:{distance:8}},e[2]=z):z=e[2];let O;e[3]===Symbol.for("react.memo_cache_sentinel")?(O={coordinateGetter:Qn},e[3]=O):O=e[3];const E=qn(vt(Gn,z),vt(Wn,O));let T;e[4]!==f?(T=f.map(wr),e[4]=f,e[5]=T):T=e[5];const Y=T;let oe;e[6]===Symbol.for("react.memo_cache_sentinel")?(oe=le=>{j(String(le.active.id))},e[6]=oe):oe=e[6];const I=oe;let ie;e[7]!==Y||e[8]!==i?(ie=le=>{j(null);const{active:P,over:U}=le;if(!U||P.id===U.id)return;const Me=Y.indexOf(String(P.id)),Oe=Y.indexOf(String(U.id));Me===-1||Oe===-1||(w(He=>ss(xt([...He],Me,Oe))),A.current=!0,requestAnimationFrame(()=>{A.current=!1}),i?.(Me,Oe))},e[7]=Y,e[8]=i,e[9]=ie):ie=e[9];const K=ie;let X;e[10]===Symbol.for("react.memo_cache_sentinel")?(X=()=>{j(null)},e[10]=X):X=e[10];const ae=X;let te,W,G,q,J,Z,H,we,ee,ye,be,Te,_e,Se,Ce;if(e[11]!==D||e[12]!==p||e[13]!==f||e[14]!==Y||e[15]!==K||e[16]!==u||e[17]!==l||e[18]!==g||e[19]!==v||e[20]!==x||e[21]!==d||e[22]!==b||e[23]!==S||e[24]!==r||e[25]!==o||e[26]!==h||e[27]!==E){Se=Symbol.for("react.early_return_sentinel");e:{const le=P=>{A.current||d(P)};if(e[43]!==D||e[44]!==p||e[45]!==f||e[46]!==l||e[47]!==r||e[48]!==o){const P=D?f.find(U=>U.id===D):null;if(q=P!=null?o[P.index]:null,G=P!=null?r[P.index]:void 0,f.length===0){let U;e[52]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:"No sections in this page."}),e[52]=U):U=e[52];const Me=!p;let Oe;e[53]===Symbol.for("react.memo_cache_sentinel")?(Oe=t.jsx(Ht,{size:14}),e[53]=Oe):Oe=e[53];let He;e[54]!==l||e[55]!==Me?(He=t.jsxs("div",{className:"space-y-2",children:[U,t.jsxs(Ve,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:Me,onClick:l,children:[Oe,"Add section"]})]}),e[54]=l,e[55]=Me,e[56]=He):He=e[56],Se=He;break e}_e=de(P&&"cursor-grabbing"),e[43]=D,e[44]=p,e[45]=f,e[46]=l,e[47]=r,e[48]=o,e[49]=G,e[50]=q,e[51]=_e}else G=e[49],q=e[50],_e=e[51];W=Xn,we=E,ee=es,ye=I,be=K,Te=ae,te=ts,Z=Y,H=Ha,Ce="space-y-1",J=f.map(P=>{const U=o[P.index];return U?t.jsx(yr,{sortableId:P.id,section:U,raw:r[P.index],meta:u,selected:h===P.index,onSelect:()=>le(P.index),onDelete:()=>g(P.index),onDuplicate:()=>v(P.index),onMakeReusable:()=>x(P.index),onToggleHidden:()=>b(P.index),onToggleLazy:()=>S(P.index)},P.id):null})}e[11]=D,e[12]=p,e[13]=f,e[14]=Y,e[15]=K,e[16]=u,e[17]=l,e[18]=g,e[19]=v,e[20]=x,e[21]=d,e[22]=b,e[23]=S,e[24]=r,e[25]=o,e[26]=h,e[27]=E,e[28]=te,e[29]=W,e[30]=G,e[31]=q,e[32]=J,e[33]=Z,e[34]=H,e[35]=we,e[36]=ee,e[37]=ye,e[38]=be,e[39]=Te,e[40]=_e,e[41]=Se,e[42]=Ce}else te=e[28],W=e[29],G=e[30],q=e[31],J=e[32],Z=e[33],H=e[34],we=e[35],ee=e[36],ye=e[37],be=e[38],Te=e[39],_e=e[40],Se=e[41],Ce=e[42];if(Se!==Symbol.for("react.early_return_sentinel"))return Se;let je;e[57]!==J||e[58]!==Ce?(je=t.jsx("div",{className:Ce,children:J}),e[57]=J,e[58]=Ce,e[59]=je):je=e[59];let Re;e[60]!==te||e[61]!==Z||e[62]!==H||e[63]!==je?(Re=t.jsx(te,{items:Z,strategy:H,children:je}),e[60]=te,e[61]=Z,e[62]=H,e[63]=je,e[64]=Re):Re=e[64];let me;e[65]!==G||e[66]!==q||e[67]!==u?(me=q?t.jsx("div",{className:de("cursor-grabbing shadow-lg ring-1 ring-border/60",rs(q,!1)),children:t.jsx(as,{section:q,raw:G,meta:u})}):null,e[65]=G,e[66]=q,e[67]=u,e[68]=me):me=e[68];let ze;e[69]!==me?(ze=t.jsx(ns,{dropAnimation:null,children:me}),e[69]=me,e[70]=ze):ze=e[70];let ke;e[71]!==W||e[72]!==we||e[73]!==ee||e[74]!==ye||e[75]!==be||e[76]!==Te||e[77]!==Re||e[78]!==ze?(ke=t.jsxs(W,{sensors:we,collisionDetection:ee,onDragStart:ye,onDragEnd:be,onDragCancel:Te,children:[Re,ze]}),e[71]=W,e[72]=we,e[73]=ee,e[74]=ye,e[75]=be,e[76]=Te,e[77]=Re,e[78]=ze,e[79]=ke):ke=e[79];const Ne=!p;let fe;e[80]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(Ht,{size:14}),e[80]=fe):fe=e[80];let De;e[81]!==l||e[82]!==Ne?(De=t.jsxs(Ve,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:Ne,onClick:l,children:[fe,"Add section"]}),e[81]=l,e[82]=Ne,e[83]=De):De=e[83];let re;return e[84]!==_e||e[85]!==ke||e[86]!==De?(re=t.jsxs("div",{className:_e,children:[ke,De]}),e[84]=_e,e[85]=ke,e[86]=De,e[87]=re):re=e[87],re}function wr(a){return a.id}function os(a){return a===Un||a===Hn}function Qt(a,e){if(!(a in e))return null;const n=e[a]??{},r=n.__resolveType??a;return{data:{...n},resolveType:r}}function yt(a,e){const n=a.__resolveType??"";if(!n)return null;if(Xe(n)){const r=a.section??{};return is(r,e)}if(os(n)){const r=a.variants?.[0]?.value;return r?yt(r,e):null}return!n.includes("/")&&n in e?Qt(n,e):{data:{...a},resolveType:n}}function is(a,e){const n=a.__resolveType??"";if(!n)return null;if(os(n)){const r=a.variants?.[0]?.value;return r?yt(r,e):null}return!n.includes("/")&&n in e?Qt(n,e):{data:{...a},resolveType:n}}function at(a,e,n){if(e.isMultivariate)return null;if(e.isSavedBlock){const r=e.isLazy?a.section?.__resolveType??a.__resolveType:a.__resolveType;return Qt(r,n)}if(e.isHidden){const u=(Xe(a.__resolveType)?a.section:a)?.variants?.[0]?.value??a;return yt(u,n)}if(e.isLazy||Xe(a.__resolveType)){const r=a.section??{};return is(r,n)}return yt(a,n)}const Tr=[[/always|matchalways/i,"Users03"],[/device|matchdevice/i,"Phone02"],[/date|matchdate/i,"Calendar"],[/random|matchrandom/i,"Shuffle01"],[/host|matchhost/i,"Globe02"],[/location|matchlocation/i,"MarkerPin01"],[/pathname/i,"Link03"],[/cron|matchcron/i,"Clock"],[/multi|matchmulti/i,"FilterLines"],[/never|matchnever/i,"EyeOff"],[/environment|matchenvironment/i,"Cloud01"],[/eq\.ts|\/eq$/i,"Brackets"],[/user|requser|isdecouser/i,"User01"],[/site|template/i,"LayoutAlt01"]],Cr={"device-mobile":"Phone02","device-desktop":"Monitor01","device-tablet":"Tablet01","calendar-event":"Calendar","calendar-month":"Calendar",clock:"Clock","current-location":"MarkerPin01","map-2":"MarkerPin01","world-search":"Globe02",shuffle:"Shuffle01",filter:"FilterLines","eye-off":"EyeOff",flask:"Beaker02",link:"Link03","git-merge":"GitBranch01",users:"Users03",flag:"Flag01","cloud-storm":"Cloud01",campaign:"Announcement01",experiment:"Beaker02",language:"Globe02","hand-click":"CursorClick01"};function Bt(a){return bt(a)!==void 0}function Xt(a,e){if(e){if(Bt(e))return e;const n=Cr[e];if(n&&Bt(n))return n}for(const[n,r]of Tr)if(n.test(a)&&Bt(r))return r;return"FilterLines"}function Rr(a){return bt(a)??ir}function An(a){const e=$e.c(11),{iconName:n,size:r,className:o}=a,u=r===void 0?"md":r;let h;e[0]!==n?(h=Rr(n),e[0]=n,e[1]=h):h=e[1];const d=h,i=u==="sm"?"size-7":"size-9",g=u==="sm"?16:18;let v;e[2]!==i||e[3]!==o?(v=de("flex shrink-0 items-center justify-center rounded-full bg-muted",i,o),e[2]=i,e[3]=o,e[4]=v):v=e[4];let x;e[5]!==d||e[6]!==g?(x=t.jsx(d,{size:g,className:"text-muted-foreground"}),e[5]=d,e[6]=g,e[7]=x):x=e[7];let b;return e[8]!==v||e[9]!==x?(b=t.jsx("div",{className:v,children:x}),e[8]=v,e[9]=x,e[10]=b):b=e[10],b}const ls="Users03";function Dr(a){const e=a.manifest?.blocks??{},n=[];for(const[r,o]of Object.entries(e))if(r.includes("matchers"))for(const u of Object.keys(o)){if(u.includes("always"))continue;const h=da(u,a);n.push({resolveType:u,title:h.title??Ke(u),description:h.description,iconName:Xt(u,h.icon)})}return n}function Ar(a,e){if(!a)return ls;const n=e.find(r=>r.resolveType===a);return n?n.iconName:Xt(a)}function Pn(a){const e=$e.c(41),{currentRt:n,currentLabel:r,matchers:o,onSelect:u}=a,[h,d]=N.useState(!1);let i;if(e[0]!==n||e[1]!==o){const E=Ar(n,o);i=bt(E),e[0]=n,e[1]=o,e[2]=i}else i=e[2];const g=i;let v;e[3]!==u?(v=E=>{u(E),d(!1)},e[3]=u,e[4]=v):v=e[4];const x=v;let b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>d(!0),e[5]=b):b=e[5];let S;e[6]!==g?(S=g&&t.jsx(g,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),e[6]=g,e[7]=S):S=e[7];let l;e[8]!==r?(l=t.jsx("span",{className:"flex-1 truncate",children:r}),e[8]=r,e[9]=l):l=e[9];let _;e[10]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx($n,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),e[10]=_):_=e[10];let p;e[11]!==S||e[12]!==l?(p=t.jsxs("button",{type:"button",onClick:b,className:"flex h-10 w-full items-center gap-2 rounded-md border border-input bg-transparent px-3 text-left text-sm shadow-xs transition-colors hover:bg-accent/40 cursor-pointer",children:[S,l,_]}),e[11]=S,e[12]=l,e[13]=p):p=e[13];let R;e[14]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(nr,{placeholder:"Search rules..."}),e[14]=R):R=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(sr,{children:"No rules found."}),e[15]=f):f=e[15];let w;e[16]!==x?(w=()=>x(""),e[16]=x,e[17]=w):w=e[17];const D=!n&&"bg-accent/60";let j;e[18]!==D?(j=de("gap-2.5",D),e[18]=D,e[19]=j):j=e[19];let V;e[20]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(An,{iconName:ls,size:"sm"}),e[20]=V):V=e[20];let k;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[t.jsx("span",{className:"text-sm",children:"Always"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Target all users"})]}),e[21]=k):k=e[21];let $;e[22]!==w||e[23]!==j?($=t.jsxs(Tn,{value:"always Target all users",onSelect:w,className:j,children:[V,k]}),e[22]=w,e[23]=j,e[24]=$):$=e[24];let C;if(e[25]!==n||e[26]!==x||e[27]!==o){let E;e[29]!==n||e[30]!==x?(E=T=>t.jsxs(Tn,{value:`${T.title} ${T.resolveType} ${T.description??""}`,onSelect:()=>x(T.resolveType),className:de("gap-2.5",n===T.resolveType&&"bg-accent/60"),children:[t.jsx(An,{iconName:T.iconName,size:"sm"}),t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[t.jsx("span",{className:"text-sm",children:T.title}),T.description&&t.jsx("span",{className:"truncate text-xs text-muted-foreground",children:T.description})]})]},T.resolveType),e[29]=n,e[30]=x,e[31]=E):E=e[31],C=o.map(E),e[25]=n,e[26]=x,e[27]=o,e[28]=C}else C=e[28];let A;e[32]!==$||e[33]!==C?(A=t.jsxs(ar,{children:[f,t.jsxs(rr,{children:[$,C]})]}),e[32]=$,e[33]=C,e[34]=A):A=e[34];let z;e[35]!==h||e[36]!==A?(z=t.jsxs(or,{open:h,onOpenChange:d,title:"Choose a rule",description:"Pick how to target users for this variant",className:"sm:max-w-lg",children:[R,A]}),e[35]=h,e[36]=A,e[37]=z):z=e[37];let O;return e[38]!==z||e[39]!==p?(O=t.jsxs(t.Fragment,{children:[p,z]}),e[38]=z,e[39]=p,e[40]=O):O=e[40],O}const Pr="oklch(0.65 0.15 160)",cs="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 en(a){const e=$e.c(5),{rule:n,matchers:r}=a,o=n?.__resolveType??"";let u;if(e[0]!==r||e[1]!==o){const g=r.find(v=>v.resolveType===o)?.iconName??Xt(o);u=bt(g),e[0]=r,e[1]=o,e[2]=u}else u=e[2];const h=u;if(!h)return null;let d;return e[3]!==h?(d=t.jsx(h,{size:14,className:"shrink-0"}),e[3]=h,e[4]=d):d=e[4],d}function Mn(a){return a.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
1
|
+
import{e as $e,r as N,j as t,B as Ve,l as Yt,c as de,G as ea,o as xe,K as ta}from"./index-B-PHV3oz.js";import{t as $n}from"./ChevronDown-B-1h0qij.js";import{i as na}from"./ChevronRight-UH18q_3i.js";import{n as sa}from"./ChevronUp-CNAXIcyx.js";import{D as qt,u as Wt,g as bt,E as aa,F as ra,J as oa}from"./agent-icon-DvIbcdW2.js";import{i as ia}from"./Globe01-C6CmSgYh.js";import{S as ft}from"./scroll-area-Cm6OwqFg.js";import{T as rt,a as ot,b as it}from"./tooltip-5zCZryvU.js";import{c as On,b as Ln,e as zn,d as In,a as Fn,D as Bn}from"./dialog-D4L8eWam.js";import{I as Kn}from"./input-DMqfVdLl.js";import{r as la,i as Xe,P as Hn,S as Un,N as ca,l as Ke,G as ua,a as da,b as gt,u as ma,c as fa,d as pa,e as ha,f as ga,g as va,h as xa,j as pt,k as $t,m as Ze,p as jn,n as kn,o as ya,q as Ot,s as ba,t as Sa,v as _a,w as ja,x as ka,y as Na,z as wa,A as Ta,B as ht,C as Ca,D as Ra,E as Da,F as Aa,H as Pa,I as Ma,J as Lt,K as Ea,L as Va,M as $a,O as zt,Q as Oa,R as La,T as Nn}from"./index-BHNzJyJJ.js";import{s as za,a as Yn}from"./Eye-BF--IKG8.js";import{d as Ia}from"./ZoomOut-sWkdOBib.js";import{a as Fa}from"./RefreshCcw01-7LgZ2KuS.js";import{s as Ht}from"./Plus-2y8e9M50.js";import{s as St}from"./Trash01-De5yP0M0.js";import{i as Ba}from"./Zap-Ca8RLP4U.js";import{a as Gt,c as Qe,D as Jt,b as Zt,d as Ka}from"./dropdown-menu-Dl0H7aq8.js";import{u as qn,a as vt,K as Wn,P as Gn,b as Jn,C as Zn,s as Qn,d as xt,D as Xn,c as es,S as ts,v as Ha,e as ns,h as Ua}from"./sortable.esm-BcFz9Psy.js";import{r as Ya,s as qa,S as Ut}from"./schema-form-B_vVRhXa.js";import{r as wn,u as Wa,d as Ga,a as Ja,i as Za,f as Qa,P as Xa,b as er,S as tr}from"./page-seo-form-CYUPfUAt.js";import{c as nr,C as sr,e as Tn,d as ar,a as rr,g as or}from"./command-BW6ahm7f.js";import{i as ir}from"./FilterLines-NzTnzrsm.js";import{i as lr}from"./Tool01-CHQi6ime.js";import{AddSectionModal as cr}from"./add-section-modal-BvUFLbIa.js";import"./AlertCircle-2Km0CX2z.js";import"./SwitchHorizontal01-D8n2_4Ky.js";import"./XCircle-86RGTWAp.js";import"./ArrowUpRight-BLByMWEr.js";import"./ZapSquare-CzOxfiLh.js";import"./Users03-CyIgvftP.js";import"./CheckCircle-D2PakmMP.js";import"./Check-B05JiFMG.js";import"./ChevronLeft-DZmvAgUs.js";import"./DotsVertical-CBkWO2us.js";import"./Container-CnVkM2IK.js";import"./Star01-BIOcBShW.js";import"./Palette-qBV8jtn1.js";import"./HardDrive-C8gbUBwi.js";import"./Stars02-BxWZ5xUE.js";import"./Key01-DdkT4-r1.js";import"./LayoutLeft-Cq-3SzOV.js";import"./LinkExternal01-BuKoKvOJ.js";import"./Monitor01-DtzCrxlL.js";import"./Sun-cNIbkxvb.js";import"./Play-BwyGr6Ll.js";import"./SearchMd-BNL3h-Lw.js";import"./Settings02-D3dhPmVM.js";import"./Shield01-02qnRjhT.js";import"./Stars01-Ra7VZDk8.js";import"./Upload01-C4oU-PRW.js";import"./User01-BQtKeucE.js";import"./Users01-B5Mk__ya.js";import"./XClose-BlyN_Sc4.js";import"./X-3fwJpxV0.js";import"./select-xdBxNMUb.js";import"./agent-capabilities-DBe6gbqa.js";import"./chat-context-CAiaOJBn.js";import"./tab-id-D6B9k9rp.js";import"./constants-z4dXNe1A.js";import"./decopilot-sse-pool-D_E34tmA.js";import"./create-sse-subscription-BS5983N4.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-virtual-mcp-DPpsp0b-.js";import"./use-collections-B47GVLOL.js";import"./use-ai-providers-DOlhyKeN.js";import"./use-organization-settings-CDjtm6S0.js";import"./pair-crvFYVBr.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-C4ZAj4f4.js";import"./file-type-icon-CYcdJQBd.js";import"./content-blocks-o63cs2vh.js";import"./types-ChK1eRLX.js";import"./shell-layout-xKUGAKiS.js";import"./avatar-5lbWWNzy.js";import"./required-auth-layout-XAFLruT3.js";import"./useRouterState-C1tnhy3B.js";import"./use-org-sso-C0VlDkck.js";import"./integration-icon-D82j_1fN.js";import"./use-navigate-to-agent-Bj_pSs39.js";import"./use-connection-xtan9MLA.js";import"./use-mcp-prompts-NDfKteCA.js";import"./form-DWpWJxH3.js";import"./label-CEKSGqhJ.js";import"./spinner-B2vBmLe8.js";import"./drawer-_tDof6Q1.js";import"./collection-search-7eYR8rmz.js";import"./tabs-B8C4rHnI.js";import"./toggle-group-C4X1dcf6.js";import"./connect-desktop-dialog-B5JH2LsR.js";import"./agent-icons-DyjPUCsW.js";import"./checkbox-BRdsmoVp.js";import"./skeleton-9nqYTB4H.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C5SA5_8A.js";import"./card-BojXSjgh.js";import"./popover-Dl1ZkjR5.js";import"./useInfiniteQuery-5f-XmzuR.js";import"./infiniteQueryObserver-D8VqrbcP.js";import"./index-5dm8s9_d.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-BSSaTyIa.js";import"./sidebar-CWkpLi-3.js";import"./sheet-D_M_IVaY.js";import"./toolbar-Dfgzdkic.js";import"./use-create-virtual-mcp-Ct03M34V.js";import"./github-repo-picker-CIX9qNpb.js";import"./use-mcp-tools-OpAnzK8L.js";import"./extract-connection-data-DubVfj_8.js";import"./generate-id-CUPl0OgE.js";import"./collections-6h-er8nI.js";import"./alert-dialog-CZIXkgul.js";import"./index-B6gGXliX.js";import"./use-org-auth-client-0xYqT1He.js";import"./hover-card-BpUlDOcu.js";import"./task-status-CY705BLe.js";import"./use-status-sounds-BQZXHMUe.js";import"./empty-state-DQ2A49Za.js";import"./resizable-CwNlFXM0.js";import"./use-capability-Dh4mghw5.js";import"./header-tab-button-DWdrQrci.js";import"./index-Ce4_XeXN.js";import"./textarea-DHIira09.js";import"./user-BN8x6_Oz.js";import"./tools-list-BEiQpjim.js";import"./badge-C8lUCNjK.js";import"./connection-slug-eyAPH6o3.js";import"./switch-UTjje473.js";import"./use-debounced-autosave-CCI4Blgp.js";import"./index-BAFQUCvL.js";import"./search-input-BmRW3Wrv.js";import"./collection-tabs-wah4r8cS.js";import"./use-secrets-KLXtsaQq.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-B7nmBs3G.js";import"./view-mode-toggle-CXjX5DI_.js";import"./select-model-D6htI6Ma.js";import"./use-automations-CYo7bTL2.js";import"./monaco-editor-C46m31Dh.js";import"./automation-runs-Ctj_mEp6.js";import"./table-DCodMVmA.js";import"./use-infinite-scroll-DOmZgM0o.js";import"./use-members-B4vP4n73.js";import"./useSuspenseInfiniteQuery-CI2XOApz.js";import"./automation-list-row-DriahbPJ.js";import"./connection-card-CLgdMTGQ.js";import"./use-registry-connections-BGN7oY_B.js";import"./connection-form-helpers-BOF_wZkg.js";import"./calendar-DBINhNQa.js";import"./image-field-B9LJ-oo3.js";import"./use-file-configs-CTGSVeMB.js";import"./index-DPSjO83e.js";function ur(a){const e=$e.c(38),{open:n,initialName:r,autoLabel:o,isPending:u,onSubmit:h,onOpenChange:d}=a,i=u===void 0?!1:u,[g,v]=N.useState(r),[x,b]=N.useState(n);n!==x&&(b(n),n&&v(r));let S;e[0]!==i||e[1]!==d?(S=T=>{!T&&!i&&d(!1)},e[0]=i,e[1]=d,e[2]=S):S=e[2];const l=S;let _;e[3]!==i||e[4]!==g||e[5]!==h?(_=async T=>{T.preventDefault(),!i&&await h(g.trim())},e[3]=i,e[4]=g,e[5]=h,e[6]=_):_=e[6];const p=_;let R;e[7]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(On,{children:"Rename variant"}),e[7]=R):R=e[7];const f=o||"the rule";let w;e[8]!==f?(w=t.jsxs(Ln,{children:[R,t.jsxs(zn,{children:["Save this matcher as a global block with a custom label. Leave empty to inline the matcher again and fall back to"," ",t.jsx("span",{className:"font-medium",children:f}),"."]})]}),e[8]=f,e[9]=w):w=e[9];let D;e[10]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[10]=D):D=e[10];let j;e[11]===Symbol.for("react.memo_cache_sentinel")?(j=T=>v(T.target.value),e[11]=j):j=e[11];let V;e[12]!==o||e[13]!==i||e[14]!==g?(V=t.jsxs("div",{className:"space-y-1.5 py-4",children:[D,t.jsx(Kn,{id:"variant-rename-name",value:g,onChange:j,placeholder:o,autoFocus:!0,disabled:i})]}),e[12]=o,e[13]=i,e[14]=g,e[15]=V):V=e[15];let k;e[16]!==d?(k=()=>d(!1),e[16]=d,e[17]=k):k=e[17];let $;e[18]!==i||e[19]!==k?($=t.jsx(Ve,{type:"button",variant:"outline",onClick:k,disabled:i,children:"Cancel"}),e[18]=i,e[19]=k,e[20]=$):$=e[20];let C;e[21]!==i?(C=i?t.jsxs(t.Fragment,{children:[t.jsx(Yt,{size:14,className:"animate-spin"}),"Saving…"]}):"Save",e[21]=i,e[22]=C):C=e[22];let A;e[23]!==i||e[24]!==C?(A=t.jsx(Ve,{type:"submit",disabled:i,children:C}),e[23]=i,e[24]=C,e[25]=A):A=e[25];let z;e[26]!==$||e[27]!==A?(z=t.jsxs(In,{children:[$,A]}),e[26]=$,e[27]=A,e[28]=z):z=e[28];let O;e[29]!==p||e[30]!==z||e[31]!==w||e[32]!==V?(O=t.jsx(Fn,{className:"sm:max-w-md",children:t.jsxs("form",{onSubmit:p,children:[w,V,z]})}),e[29]=p,e[30]=z,e[31]=w,e[32]=V,e[33]=O):O=e[33];let E;return e[34]!==l||e[35]!==n||e[36]!==O?(E=t.jsx(Bn,{open:n,onOpenChange:l,children:O}),e[34]=l,e[35]=n,e[36]=O,e[37]=E):E=e[37],E}function It(a,e,n,r,o){const u={...a[e]};if(o.length>1){const h=u.sections,d=[...h?.variants??[]];d[r]&&(d[r]={...d[r],value:n}),u.sections={...h,variants:d}}else u.sections=n;return u}function dr(a){return structuredClone(a)}function mr(a){return!a.isSavedBlock&&!a.isMultivariate}function Cn(a){const e=a.replace(/[^A-Za-z0-9_-]/g,"");return/^[A-Za-z]/.test(e)?e:e?`Block${e}`:""}function Rn(a,e){const n=a.trim();return n?n.includes("/")?"Block name cannot contain slashes.":Object.hasOwn(e,n)?"A block with this name already exists.":/^[A-Za-z][A-Za-z0-9_-]*$/.test(n)?null:"Use letters, numbers, hyphens, or underscores. Must start with a letter.":"Block name is required."}function fr(a){return a.schema?.definitions??a.schema?.$defs??{}}function pr(a,e){const n=fr(e),r=n[btoa(a)];if(!r)return;let o=typeof r.image=="string"?r.image:void 0;if(!o&&Array.isArray(r.allOf)){const u=r.allOf.find(h=>typeof h.$ref=="string")?.$ref;if(typeof u=="string"){const h=u.replace("#/definitions/",""),d=n[h];o=typeof d?.image=="string"?d.image:void 0}}if(o?.includes("{{{"))return o}function hr(a,e){if(!e)return;const n=la(a);if(!n)return;const r=pr(n.resolveType,e);if(!r)return;const o=Ya(r,n.data);if(o)return qa(o)}function Ft(a,e){return a.map((n,r)=>{const o=n.__resolveType??"",u=Xe(o);if(!u&&o!==""&&!o.includes("/")&&o in e){const g=e[o],v=typeof g?.name=="string"&&g.name||o.replace(/[-_]/g," ").replace(/\b\w/g,x=>x.toUpperCase())||`Section ${r+1}`;return{index:r,resolveType:o,label:v,isLazy:!1,isSavedBlock:!0}}const h=u?n.section:void 0,d=u?h?.__resolveType??"":o;if(d===Hn||d===Un){const g=u?h:n,v=Array.isArray(g?.variants)?g.variants:[];if(v.length===1&&(v[0]?.rule?.__resolveType??"")===ca){const S=v[0]?.value??{};let l=S.__resolveType??"";const _=Xe(l);return _&&(l=S.section?.__resolveType??l),{index:r,resolveType:o,label:Ke(l)||`Section ${r+1}`,isHidden:!0,isLazy:_}}const x=v[0]?.value?.__resolveType,b=x?Ke(x):"Section";return{index:r,resolveType:o,label:`Variants of ${b}`,isMultivariate:!0,isLazy:u}}const i=u?n.section?.__resolveType??o:o;if(u&&i!==""&&!i.includes("/")&&i in e){const g=e[i],v=typeof g?.name=="string"&&g.name||i.replace(/[-_]/g," ").replace(/\b\w/g,x=>x.toUpperCase())||`Section ${r+1}`;return{index:r,resolveType:o,label:v,isLazy:!0,isSavedBlock:!0}}return{index:r,resolveType:o,label:Ke(i)||`Section ${r+1}`,isLazy:u}})}const gr="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",vr="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 Dn(a){return Array.from({length:a},(e,n)=>({id:crypto.randomUUID(),index:n}))}function ss(a){return a.map((e,n)=>({...e,index:n}))}function xr(a,e){if(e===a.length)return a;if(e<a.length)return ss(a.slice(0,e));const n=Array.from({length:e-a.length},(r,o)=>({id:crypto.randomUUID(),index:a.length+o}));return[...a,...n]}function as(a){const e=$e.c(20),{section:n,raw:r,meta:o}=a,u=n.isSavedBlock===!0,h=n.isMultivariate===!0;let d;e[0]!==o||e[1]!==r?(d=r&&o?hr(r,o):void 0,e[0]=o,e[1]=r,e[2]=d):d=e[2];const i=d;let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ia,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=g):g=e[3];let v;e[4]!==i?(v=i&&t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=i,e[5]=v):v=e[5];let x;e[6]!==h||e[7]!==u?(x=u?{color:ua}:h?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=h,e[7]=u,e[8]=x):x=e[8];let b;e[9]!==x?(b=t.jsx(qt,{className:"h-4 w-4 shrink-0",style:x}),e[9]=x,e[10]=b):b=e[10];const S=n.isHidden&&"line-through opacity-50";let l;e[11]!==S?(l=de("min-w-0 flex-1 truncate text-sm font-medium",S),e[11]=S,e[12]=l):l=e[12];let _;e[13]!==n.label||e[14]!==l?(_=t.jsx("span",{className:l,children:n.label}),e[13]=n.label,e[14]=l,e[15]=_):_=e[15];let p;return e[16]!==v||e[17]!==b||e[18]!==_?(p=t.jsxs(t.Fragment,{children:[g,v,b,_]}),e[16]=v,e[17]=b,e[18]=_,e[19]=p):p=e[19],p}function rs(a,e){const n=a.isSavedBlock===!0,r=a.isMultivariate===!0;return de("group flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":n?gr:r?"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 yr(a){const e=$e.c(53),{section:n,raw:r,meta:o,sortableId:u,selected:h,onSelect:d,onDelete:i,onDuplicate:g,onMakeReusable:v,onToggleHidden:x,onToggleLazy:b}=a,S=r?Xe(r.__resolveType??""):!1;let l;e[0]!==u?(l={id:u,animateLayoutChanges:kr},e[0]=u,e[1]=l):l=e[1];const{attributes:_,listeners:p,setNodeRef:R,transform:f,isDragging:w}=Jn(l);let D;e[2]!==f?(D=Zn.Transform.toString(f?{...f,x:0}:null),e[2]=f,e[3]=D):D=e[3];const j=w?0:void 0;let V;e[4]!==D||e[5]!==j?(V={transform:D,opacity:j},e[4]=D,e[5]=j,e[6]=V):V=e[6];const k=V;let $;e[7]!==n?($=mr(n),e[7]=n,e[8]=$):$=e[8];const C=$,A="button",z=0;let O;e[9]!==d?(O=H=>{(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),d())},e[9]=d,e[10]=O):O=e[10];const E=w?"cursor-grabbing":"cursor-pointer";let T;e[11]!==n||e[12]!==h||e[13]!==E?(T=de("touch-none transition-colors",E,rs(n,h)),e[11]=n,e[12]=h,e[13]=E,e[14]=T):T=e[14];let Y;e[15]!==o||e[16]!==r||e[17]!==n?(Y=t.jsx(as,{section:n,raw:r,meta:o}),e[15]=o,e[16]=r,e[17]=n,e[18]=Y):Y=e[18];const oe=!n.isMultivariate&&t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":S?"Disable async render":"Enable async render",className:de("h-7 w-7 shrink-0",S?"":"opacity-0 group-hover:opacity-100"),onClick:H=>{H.stopPropagation(),b()},onPointerDown:jr,children:t.jsx(Ba,{className:de("h-3.5 w-3.5",S&&"text-yellow-500")})});let I;e[19]!==x||e[20]!==n.isHidden||e[21]!==n.isMultivariate?(I=!n.isMultivariate&&t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":n.isHidden?"Show section":"Hide section",className:de("h-7 w-7 shrink-0",n.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:H=>{H.stopPropagation(),x()},onPointerDown:_r,children:n.isHidden?t.jsx(Fa,{className:"h-3.5 w-3.5"}):t.jsx(za,{className:"h-3.5 w-3.5"})}),e[19]=x,e[20]=n.isHidden,e[21]=n.isMultivariate,e[22]=I):I=e[22];let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(Gt,{asChild:!0,children:t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":"Section actions",className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:Sr,onPointerDown:br,children:t.jsx(Wt,{className:"h-3.5 w-3.5"})})}),e[23]=ie):ie=e[23];let K;e[24]!==g?(K=H=>{H.stopPropagation(),g()},e[24]=g,e[25]=K):K=e[25];let X;e[26]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(Yn,{className:"h-4 w-4"}),e[26]=X):X=e[26];let ae;e[27]!==K?(ae=t.jsxs(Qe,{onClick:K,children:[X,"Duplicate"]}),e[27]=K,e[28]=ae):ae=e[28];let te;e[29]!==C||e[30]!==v?(te=C&&t.jsxs(Qe,{className:vr,onClick:H=>{H.stopPropagation(),v()},children:[t.jsx(qt,{className:"h-4 w-4"}),"Make reusable"]}),e[29]=C,e[30]=v,e[31]=te):te=e[31];let W;e[32]!==i?(W=H=>{H.stopPropagation(),i()},e[32]=i,e[33]=W):W=e[33];let G;e[34]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(St,{className:"h-4 w-4"}),e[34]=G):G=e[34];let q;e[35]!==W?(q=t.jsxs(Qe,{className:"text-destructive focus:text-destructive",onClick:W,children:[G,"Delete"]}),e[35]=W,e[36]=q):q=e[36];let J;e[37]!==ae||e[38]!==te||e[39]!==q?(J=t.jsxs(Jt,{children:[ie,t.jsxs(Zt,{align:"end",className:"w-44",children:[ae,te,q]})]}),e[37]=ae,e[38]=te,e[39]=q,e[40]=J):J=e[40];let Z;return e[41]!==_||e[42]!==p||e[43]!==d||e[44]!==R||e[45]!==k||e[46]!==T||e[47]!==Y||e[48]!==oe||e[49]!==I||e[50]!==J||e[51]!==O?(Z=t.jsxs("div",{ref:R,style:k,..._,...p,role:A,tabIndex:z,onClick:d,onKeyDown:O,className:T,children:[Y,oe,I,J]}),e[41]=_,e[42]=p,e[43]=d,e[44]=R,e[45]=k,e[46]=T,e[47]=Y,e[48]=oe,e[49]=I,e[50]=J,e[51]=O,e[52]=Z):Z=e[52],Z}function br(a){return a.stopPropagation()}function Sr(a){return a.stopPropagation()}function _r(a){return a.stopPropagation()}function jr(a){return a.stopPropagation()}function kr(){return!1}function Nr(a){const e=$e.c(88),{listKey:n,rawSections:r,sections:o,meta:u,selectedIndex:h,onSelect:d,onReorder:i,onDelete:g,onDuplicate:v,onMakeReusable:x,onToggleHidden:b,onToggleLazy:S,onAddSection:l,canAddSection:_}=a,p=_===void 0?!0:_;let R;e[0]!==o.length?(R=()=>Dn(o.length),e[0]=o.length,e[1]=R):R=e[1];const[f,w]=N.useState(R),[D,j]=N.useState(null),[V,k]=N.useState(n),[$,C]=N.useState(o.length),A=N.useRef(!1);V!==n?(k(n),C(o.length),w(Dn(o.length))):$!==o.length&&(C(o.length),w(le=>xr(le,o.length)));let z;e[2]===Symbol.for("react.memo_cache_sentinel")?(z={activationConstraint:{distance:8}},e[2]=z):z=e[2];let O;e[3]===Symbol.for("react.memo_cache_sentinel")?(O={coordinateGetter:Qn},e[3]=O):O=e[3];const E=qn(vt(Gn,z),vt(Wn,O));let T;e[4]!==f?(T=f.map(wr),e[4]=f,e[5]=T):T=e[5];const Y=T;let oe;e[6]===Symbol.for("react.memo_cache_sentinel")?(oe=le=>{j(String(le.active.id))},e[6]=oe):oe=e[6];const I=oe;let ie;e[7]!==Y||e[8]!==i?(ie=le=>{j(null);const{active:P,over:U}=le;if(!U||P.id===U.id)return;const Me=Y.indexOf(String(P.id)),Oe=Y.indexOf(String(U.id));Me===-1||Oe===-1||(w(He=>ss(xt([...He],Me,Oe))),A.current=!0,requestAnimationFrame(()=>{A.current=!1}),i?.(Me,Oe))},e[7]=Y,e[8]=i,e[9]=ie):ie=e[9];const K=ie;let X;e[10]===Symbol.for("react.memo_cache_sentinel")?(X=()=>{j(null)},e[10]=X):X=e[10];const ae=X;let te,W,G,q,J,Z,H,we,ee,ye,be,Te,_e,Se,Ce;if(e[11]!==D||e[12]!==p||e[13]!==f||e[14]!==Y||e[15]!==K||e[16]!==u||e[17]!==l||e[18]!==g||e[19]!==v||e[20]!==x||e[21]!==d||e[22]!==b||e[23]!==S||e[24]!==r||e[25]!==o||e[26]!==h||e[27]!==E){Se=Symbol.for("react.early_return_sentinel");e:{const le=P=>{A.current||d(P)};if(e[43]!==D||e[44]!==p||e[45]!==f||e[46]!==l||e[47]!==r||e[48]!==o){const P=D?f.find(U=>U.id===D):null;if(q=P!=null?o[P.index]:null,G=P!=null?r[P.index]:void 0,f.length===0){let U;e[52]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:"No sections in this page."}),e[52]=U):U=e[52];const Me=!p;let Oe;e[53]===Symbol.for("react.memo_cache_sentinel")?(Oe=t.jsx(Ht,{size:14}),e[53]=Oe):Oe=e[53];let He;e[54]!==l||e[55]!==Me?(He=t.jsxs("div",{className:"space-y-2",children:[U,t.jsxs(Ve,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:Me,onClick:l,children:[Oe,"Add section"]})]}),e[54]=l,e[55]=Me,e[56]=He):He=e[56],Se=He;break e}_e=de(P&&"cursor-grabbing"),e[43]=D,e[44]=p,e[45]=f,e[46]=l,e[47]=r,e[48]=o,e[49]=G,e[50]=q,e[51]=_e}else G=e[49],q=e[50],_e=e[51];W=Xn,we=E,ee=es,ye=I,be=K,Te=ae,te=ts,Z=Y,H=Ha,Ce="space-y-1",J=f.map(P=>{const U=o[P.index];return U?t.jsx(yr,{sortableId:P.id,section:U,raw:r[P.index],meta:u,selected:h===P.index,onSelect:()=>le(P.index),onDelete:()=>g(P.index),onDuplicate:()=>v(P.index),onMakeReusable:()=>x(P.index),onToggleHidden:()=>b(P.index),onToggleLazy:()=>S(P.index)},P.id):null})}e[11]=D,e[12]=p,e[13]=f,e[14]=Y,e[15]=K,e[16]=u,e[17]=l,e[18]=g,e[19]=v,e[20]=x,e[21]=d,e[22]=b,e[23]=S,e[24]=r,e[25]=o,e[26]=h,e[27]=E,e[28]=te,e[29]=W,e[30]=G,e[31]=q,e[32]=J,e[33]=Z,e[34]=H,e[35]=we,e[36]=ee,e[37]=ye,e[38]=be,e[39]=Te,e[40]=_e,e[41]=Se,e[42]=Ce}else te=e[28],W=e[29],G=e[30],q=e[31],J=e[32],Z=e[33],H=e[34],we=e[35],ee=e[36],ye=e[37],be=e[38],Te=e[39],_e=e[40],Se=e[41],Ce=e[42];if(Se!==Symbol.for("react.early_return_sentinel"))return Se;let je;e[57]!==J||e[58]!==Ce?(je=t.jsx("div",{className:Ce,children:J}),e[57]=J,e[58]=Ce,e[59]=je):je=e[59];let Re;e[60]!==te||e[61]!==Z||e[62]!==H||e[63]!==je?(Re=t.jsx(te,{items:Z,strategy:H,children:je}),e[60]=te,e[61]=Z,e[62]=H,e[63]=je,e[64]=Re):Re=e[64];let me;e[65]!==G||e[66]!==q||e[67]!==u?(me=q?t.jsx("div",{className:de("cursor-grabbing shadow-lg ring-1 ring-border/60",rs(q,!1)),children:t.jsx(as,{section:q,raw:G,meta:u})}):null,e[65]=G,e[66]=q,e[67]=u,e[68]=me):me=e[68];let ze;e[69]!==me?(ze=t.jsx(ns,{dropAnimation:null,children:me}),e[69]=me,e[70]=ze):ze=e[70];let ke;e[71]!==W||e[72]!==we||e[73]!==ee||e[74]!==ye||e[75]!==be||e[76]!==Te||e[77]!==Re||e[78]!==ze?(ke=t.jsxs(W,{sensors:we,collisionDetection:ee,onDragStart:ye,onDragEnd:be,onDragCancel:Te,children:[Re,ze]}),e[71]=W,e[72]=we,e[73]=ee,e[74]=ye,e[75]=be,e[76]=Te,e[77]=Re,e[78]=ze,e[79]=ke):ke=e[79];const Ne=!p;let fe;e[80]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(Ht,{size:14}),e[80]=fe):fe=e[80];let De;e[81]!==l||e[82]!==Ne?(De=t.jsxs(Ve,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:Ne,onClick:l,children:[fe,"Add section"]}),e[81]=l,e[82]=Ne,e[83]=De):De=e[83];let re;return e[84]!==_e||e[85]!==ke||e[86]!==De?(re=t.jsxs("div",{className:_e,children:[ke,De]}),e[84]=_e,e[85]=ke,e[86]=De,e[87]=re):re=e[87],re}function wr(a){return a.id}function os(a){return a===Un||a===Hn}function Qt(a,e){if(!(a in e))return null;const n=e[a]??{},r=n.__resolveType??a;return{data:{...n},resolveType:r}}function yt(a,e){const n=a.__resolveType??"";if(!n)return null;if(Xe(n)){const r=a.section??{};return is(r,e)}if(os(n)){const r=a.variants?.[0]?.value;return r?yt(r,e):null}return!n.includes("/")&&n in e?Qt(n,e):{data:{...a},resolveType:n}}function is(a,e){const n=a.__resolveType??"";if(!n)return null;if(os(n)){const r=a.variants?.[0]?.value;return r?yt(r,e):null}return!n.includes("/")&&n in e?Qt(n,e):{data:{...a},resolveType:n}}function at(a,e,n){if(e.isMultivariate)return null;if(e.isSavedBlock){const r=e.isLazy?a.section?.__resolveType??a.__resolveType:a.__resolveType;return Qt(r,n)}if(e.isHidden){const u=(Xe(a.__resolveType)?a.section:a)?.variants?.[0]?.value??a;return yt(u,n)}if(e.isLazy||Xe(a.__resolveType)){const r=a.section??{};return is(r,n)}return yt(a,n)}const Tr=[[/always|matchalways/i,"Users03"],[/device|matchdevice/i,"Phone02"],[/date|matchdate/i,"Calendar"],[/random|matchrandom/i,"Shuffle01"],[/host|matchhost/i,"Globe02"],[/location|matchlocation/i,"MarkerPin01"],[/pathname/i,"Link03"],[/cron|matchcron/i,"Clock"],[/multi|matchmulti/i,"FilterLines"],[/never|matchnever/i,"EyeOff"],[/environment|matchenvironment/i,"Cloud01"],[/eq\.ts|\/eq$/i,"Brackets"],[/user|requser|isdecouser/i,"User01"],[/site|template/i,"LayoutAlt01"]],Cr={"device-mobile":"Phone02","device-desktop":"Monitor01","device-tablet":"Tablet01","calendar-event":"Calendar","calendar-month":"Calendar",clock:"Clock","current-location":"MarkerPin01","map-2":"MarkerPin01","world-search":"Globe02",shuffle:"Shuffle01",filter:"FilterLines","eye-off":"EyeOff",flask:"Beaker02",link:"Link03","git-merge":"GitBranch01",users:"Users03",flag:"Flag01","cloud-storm":"Cloud01",campaign:"Announcement01",experiment:"Beaker02",language:"Globe02","hand-click":"CursorClick01"};function Bt(a){return bt(a)!==void 0}function Xt(a,e){if(e){if(Bt(e))return e;const n=Cr[e];if(n&&Bt(n))return n}for(const[n,r]of Tr)if(n.test(a)&&Bt(r))return r;return"FilterLines"}function Rr(a){return bt(a)??ir}function An(a){const e=$e.c(11),{iconName:n,size:r,className:o}=a,u=r===void 0?"md":r;let h;e[0]!==n?(h=Rr(n),e[0]=n,e[1]=h):h=e[1];const d=h,i=u==="sm"?"size-7":"size-9",g=u==="sm"?16:18;let v;e[2]!==i||e[3]!==o?(v=de("flex shrink-0 items-center justify-center rounded-full bg-muted",i,o),e[2]=i,e[3]=o,e[4]=v):v=e[4];let x;e[5]!==d||e[6]!==g?(x=t.jsx(d,{size:g,className:"text-muted-foreground"}),e[5]=d,e[6]=g,e[7]=x):x=e[7];let b;return e[8]!==v||e[9]!==x?(b=t.jsx("div",{className:v,children:x}),e[8]=v,e[9]=x,e[10]=b):b=e[10],b}const ls="Users03";function Dr(a){const e=a.manifest?.blocks??{},n=[];for(const[r,o]of Object.entries(e))if(r.includes("matchers"))for(const u of Object.keys(o)){if(u.includes("always"))continue;const h=da(u,a);n.push({resolveType:u,title:h.title??Ke(u),description:h.description,iconName:Xt(u,h.icon)})}return n}function Ar(a,e){if(!a)return ls;const n=e.find(r=>r.resolveType===a);return n?n.iconName:Xt(a)}function Pn(a){const e=$e.c(41),{currentRt:n,currentLabel:r,matchers:o,onSelect:u}=a,[h,d]=N.useState(!1);let i;if(e[0]!==n||e[1]!==o){const E=Ar(n,o);i=bt(E),e[0]=n,e[1]=o,e[2]=i}else i=e[2];const g=i;let v;e[3]!==u?(v=E=>{u(E),d(!1)},e[3]=u,e[4]=v):v=e[4];const x=v;let b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>d(!0),e[5]=b):b=e[5];let S;e[6]!==g?(S=g&&t.jsx(g,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),e[6]=g,e[7]=S):S=e[7];let l;e[8]!==r?(l=t.jsx("span",{className:"flex-1 truncate",children:r}),e[8]=r,e[9]=l):l=e[9];let _;e[10]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx($n,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),e[10]=_):_=e[10];let p;e[11]!==S||e[12]!==l?(p=t.jsxs("button",{type:"button",onClick:b,className:"flex h-10 w-full items-center gap-2 rounded-md border border-input bg-transparent px-3 text-left text-sm shadow-xs transition-colors hover:bg-accent/40 cursor-pointer",children:[S,l,_]}),e[11]=S,e[12]=l,e[13]=p):p=e[13];let R;e[14]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(nr,{placeholder:"Search rules..."}),e[14]=R):R=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(sr,{children:"No rules found."}),e[15]=f):f=e[15];let w;e[16]!==x?(w=()=>x(""),e[16]=x,e[17]=w):w=e[17];const D=!n&&"bg-accent/60";let j;e[18]!==D?(j=de("gap-2.5",D),e[18]=D,e[19]=j):j=e[19];let V;e[20]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(An,{iconName:ls,size:"sm"}),e[20]=V):V=e[20];let k;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[t.jsx("span",{className:"text-sm",children:"Always"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Target all users"})]}),e[21]=k):k=e[21];let $;e[22]!==w||e[23]!==j?($=t.jsxs(Tn,{value:"always Target all users",onSelect:w,className:j,children:[V,k]}),e[22]=w,e[23]=j,e[24]=$):$=e[24];let C;if(e[25]!==n||e[26]!==x||e[27]!==o){let E;e[29]!==n||e[30]!==x?(E=T=>t.jsxs(Tn,{value:`${T.title} ${T.resolveType} ${T.description??""}`,onSelect:()=>x(T.resolveType),className:de("gap-2.5",n===T.resolveType&&"bg-accent/60"),children:[t.jsx(An,{iconName:T.iconName,size:"sm"}),t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[t.jsx("span",{className:"text-sm",children:T.title}),T.description&&t.jsx("span",{className:"truncate text-xs text-muted-foreground",children:T.description})]})]},T.resolveType),e[29]=n,e[30]=x,e[31]=E):E=e[31],C=o.map(E),e[25]=n,e[26]=x,e[27]=o,e[28]=C}else C=e[28];let A;e[32]!==$||e[33]!==C?(A=t.jsxs(ar,{children:[f,t.jsxs(rr,{children:[$,C]})]}),e[32]=$,e[33]=C,e[34]=A):A=e[34];let z;e[35]!==h||e[36]!==A?(z=t.jsxs(or,{open:h,onOpenChange:d,title:"Choose a rule",description:"Pick how to target users for this variant",className:"sm:max-w-lg",children:[R,A]}),e[35]=h,e[36]=A,e[37]=z):z=e[37];let O;return e[38]!==z||e[39]!==p?(O=t.jsxs(t.Fragment,{children:[p,z]}),e[38]=z,e[39]=p,e[40]=O):O=e[40],O}const Pr="oklch(0.65 0.15 160)",cs="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 en(a){const e=$e.c(5),{rule:n,matchers:r}=a,o=n?.__resolveType??"";let u;if(e[0]!==r||e[1]!==o){const g=r.find(v=>v.resolveType===o)?.iconName??Xt(o);u=bt(g),e[0]=r,e[1]=o,e[2]=u}else u=e[2];const h=u;if(!h)return null;let d;return e[3]!==h?(d=t.jsx(h,{size:14,className:"shrink-0"}),e[3]=h,e[4]=d):d=e[4],d}function Mn(a){return a.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
2
2
|
`)}function Kt(a){return a.map((e,n)=>({id:crypto.randomUUID(),index:n,variant:e}))}function Mr(a){return a.map((e,n)=>({...e,index:n}))}function Er(a){const e=$e.c(51),{entry:n,sortableId:r,isActive:o,canDelete:u,decofile:h,meta:d,matchers:i,onSelect:g,onRename:v,onDelete:x}=a;let b;e[0]!==r?(b={id:r,animateLayoutChanges:Or},e[0]=r,e[1]=b):b=e[1];const{attributes:S,listeners:l,setNodeRef:_,transform:p,isDragging:R}=Jn(b);let f;e[2]!==p?(f=Zn.Transform.toString(p?{...p,y:0}:null),e[2]=p,e[3]=f):f=e[3];const w=R?0:void 0;let D;e[4]!==f||e[5]!==w?(D={transform:f,opacity:w},e[4]=f,e[5]=w,e[6]=D):D=e[6];const j=D,V=d??void 0;let k;e[7]!==h||e[8]!==n.variant.rule||e[9]!==V?(k=gt(n.variant.rule,h,V),e[7]=h,e[8]=n.variant.rule,e[9]=V,e[10]=k):k=e[10];const $=k,C=o?cs:"text-muted-foreground hover:bg-muted hover:text-foreground",A=R?"cursor-grabbing":"cursor-grab";let z;e[11]!==C||e[12]!==A?(z=de("group shrink-0 inline-flex items-center rounded-md transition-colors touch-none",C,A),e[11]=C,e[12]=A,e[13]=z):z=e[13];let O;e[14]!==$||e[15]!==i?(O=t.jsx(en,{rule:$,matchers:i}),e[14]=$,e[15]=i,e[16]=O):O=e[16];let E;e[17]!==n.variant.label?(E=t.jsx("span",{className:"truncate",children:n.variant.label}),e[17]=n.variant.label,e[18]=E):E=e[18];let T;e[19]!==S||e[20]!==l||e[21]!==g||e[22]!==O||e[23]!==E?(T=t.jsxs("button",{type:"button",...S,...l,onClick:g,className:"inline-flex items-center gap-1.5 h-8 pl-3 pr-1.5 text-sm font-medium cursor-[inherit]",children:[O,E]}),e[19]=S,e[20]=l,e[21]=g,e[22]=O,e[23]=E,e[24]=T):T=e[24];const Y=`Actions for ${n.variant.label}`,oe=o&&"opacity-100";let I;e[25]!==oe?(I=de("inline-flex h-8 w-6 items-center justify-center pr-1 cursor-pointer transition-opacity","opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",oe),e[25]=oe,e[26]=I):I=e[26];let ie;e[27]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(Wt,{size:12}),e[27]=ie):ie=e[27];let K;e[28]!==Y||e[29]!==I?(K=t.jsx(Gt,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":Y,onClick:$r,onPointerDown:Vr,className:I,children:ie})}),e[28]=Y,e[29]=I,e[30]=K):K=e[30];let X;e[31]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(lr,{size:14}),e[31]=X):X=e[31];let ae;e[32]!==v?(ae=t.jsxs(Qe,{onClick:v,children:[X,"Rename"]}),e[32]=v,e[33]=ae):ae=e[33];let te;e[34]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(Ka,{}),e[34]=te):te=e[34];const W=!u;let G;e[35]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(St,{size:14}),e[35]=G):G=e[35];let q;e[36]!==x||e[37]!==W?(q=t.jsxs(Qe,{variant:"destructive",disabled:W,onClick:x,children:[G,"Delete"]}),e[36]=x,e[37]=W,e[38]=q):q=e[38];let J;e[39]!==ae||e[40]!==q?(J=t.jsxs(Zt,{align:"start",className:"w-36",children:[ae,te,q]}),e[39]=ae,e[40]=q,e[41]=J):J=e[41];let Z;e[42]!==K||e[43]!==J?(Z=t.jsxs(Jt,{children:[K,J]}),e[42]=K,e[43]=J,e[44]=Z):Z=e[44];let H;return e[45]!==_||e[46]!==j||e[47]!==T||e[48]!==Z||e[49]!==z?(H=t.jsxs("div",{ref:_,style:j,className:z,children:[T,Z]}),e[45]=_,e[46]=j,e[47]=T,e[48]=Z,e[49]=z,e[50]=H):H=e[50],H}function Vr(a){return a.stopPropagation()}function $r(a){return a.stopPropagation()}function Or(){return!1}function Lr(a){const e=$e.c(13),{variant:n,decofile:r,meta:o,matchers:u}=a,h=o??void 0;let d;e[0]!==r||e[1]!==h||e[2]!==n.rule?(d=gt(n.rule,r,h),e[0]=r,e[1]=h,e[2]=n.rule,e[3]=d):d=e[3];const i=d;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=de("inline-flex items-center gap-1.5 h-8 pl-3 pr-3 text-sm font-medium rounded-md shadow-lg ring-1 ring-border/60 cursor-grabbing",cs),e[4]=g):g=e[4];let v;e[5]!==i||e[6]!==u?(v=t.jsx(en,{rule:i,matchers:u}),e[5]=i,e[6]=u,e[7]=v):v=e[7];let x;e[8]!==n.label?(x=t.jsx("span",{className:"truncate",children:n.label}),e[8]=n.label,e[9]=x):x=e[9];let b;return e[10]!==v||e[11]!==x?(b=t.jsxs("div",{className:g,children:[v,x]}),e[10]=v,e[11]=x,e[12]=b):b=e[12],b}function zr(a){const e=$e.c(77),{listKey:n,variants:r,activeIndex:o,decofile:u,meta:h,matchers:d,onSelect:i,onReorder:g,onRename:v,onDelete:x,onAdd:b}=a;let S;e[0]!==r?(S=()=>Kt(r),e[0]=r,e[1]=S):S=e[1];const[l,_]=N.useState(S),[p,R]=N.useState(null),[f,w]=N.useState(n),[D,j]=N.useState(r.length);let V;e[2]!==r?(V=()=>Mn(r),e[2]=r,e[3]=V):V=e[3];const[k,$]=N.useState(V),C=N.useRef(!1),A=Mn(r);f!==n?(w(n),j(r.length),$(A),_(Kt(r))):D!==r.length?(j(r.length),$(A),_(Kt(r))):k!==A&&($(A),_(le=>r.map((P,U)=>({id:le[U]?.id??crypto.randomUUID(),index:U,variant:P}))));let z;e[4]===Symbol.for("react.memo_cache_sentinel")?(z={activationConstraint:{distance:8}},e[4]=z):z=e[4];let O;e[5]===Symbol.for("react.memo_cache_sentinel")?(O={coordinateGetter:Qn},e[5]=O):O=e[5];const E=qn(vt(Gn,z),vt(Wn,O));let T;e[6]!==l?(T=l.map(Ir),e[6]=l,e[7]=T):T=e[7];const Y=T,oe=r.length>1;let I;e[8]!==l?(I=le=>{const P=String(le.active.id);R(l.find(U=>U.id===P)??null)},e[8]=l,e[9]=I):I=e[9];const ie=I;let K;e[10]!==Y||e[11]!==g?(K=le=>{R(null);const{active:P,over:U}=le;if(!U||P.id===U.id)return;const Me=Y.indexOf(String(P.id)),Oe=Y.indexOf(String(U.id));Me===-1||Oe===-1||(_(He=>Mr(xt([...He],Me,Oe))),C.current=!0,requestAnimationFrame(()=>{C.current=!1}),g(Me,Oe))},e[10]=Y,e[11]=g,e[12]=K):K=e[12];const X=K;let ae;e[13]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>{R(null)},e[13]=ae):ae=e[13];const te=ae;let W,G,q,J,Z,H,we,ee,ye,be,Te,_e;if(e[14]!==p||e[15]!==o||e[16]!==oe||e[17]!==u||e[18]!==l||e[19]!==Y||e[20]!==X||e[21]!==ie||e[22]!==d||e[23]!==h||e[24]!==x||e[25]!==v||e[26]!==i||e[27]!==E){const le=U=>{C.current||i(U)};Te="flex items-center border-b shrink-0";const P=p&&"cursor-grabbing";e[40]!==P?(be=de("flex flex-1 min-w-0 items-center gap-1.5 pl-3 pr-2 py-2 overflow-x-auto",P),e[40]=P,e[41]=be):be=e[41],G=Xn,Z=E,H=es,we=ie,ee=X,ye=te,W=ts,_e=Y,q=Ua,J=l.map(U=>t.jsx(Er,{sortableId:U.id,entry:U,isActive:U.index===o,canDelete:oe,decofile:u,meta:h,matchers:d,onSelect:()=>le(U.index),onRename:()=>v(U.index),onDelete:()=>x(U.index)},U.id)),e[14]=p,e[15]=o,e[16]=oe,e[17]=u,e[18]=l,e[19]=Y,e[20]=X,e[21]=ie,e[22]=d,e[23]=h,e[24]=x,e[25]=v,e[26]=i,e[27]=E,e[28]=W,e[29]=G,e[30]=q,e[31]=J,e[32]=Z,e[33]=H,e[34]=we,e[35]=ee,e[36]=ye,e[37]=be,e[38]=Te,e[39]=_e}else W=e[28],G=e[29],q=e[30],J=e[31],Z=e[32],H=e[33],we=e[34],ee=e[35],ye=e[36],be=e[37],Te=e[38],_e=e[39];let Se;e[42]!==W||e[43]!==q||e[44]!==J||e[45]!==_e?(Se=t.jsx(W,{items:_e,strategy:q,children:J}),e[42]=W,e[43]=q,e[44]=J,e[45]=_e,e[46]=Se):Se=e[46];let Ce;e[47]!==p||e[48]!==u||e[49]!==d||e[50]!==h?(Ce=p?t.jsx(Lr,{variant:p.variant,decofile:u,meta:h,matchers:d}):null,e[47]=p,e[48]=u,e[49]=d,e[50]=h,e[51]=Ce):Ce=e[51];let je;e[52]!==Ce?(je=t.jsx(ns,{dropAnimation:null,children:Ce}),e[52]=Ce,e[53]=je):je=e[53];let Re;e[54]!==G||e[55]!==Z||e[56]!==H||e[57]!==we||e[58]!==ee||e[59]!==ye||e[60]!==Se||e[61]!==je?(Re=t.jsxs(G,{sensors:Z,collisionDetection:H,onDragStart:we,onDragEnd:ee,onDragCancel:ye,children:[Se,je]}),e[54]=G,e[55]=Z,e[56]=H,e[57]=we,e[58]=ee,e[59]=ye,e[60]=Se,e[61]=je,e[62]=Re):Re=e[62];let me;e[63]!==be||e[64]!==Re?(me=t.jsx("div",{className:be,children:Re}),e[63]=be,e[64]=Re,e[65]=me):me=e[65];let ze;e[66]===Symbol.for("react.memo_cache_sentinel")?(ze={color:Pr},e[66]=ze):ze=e[66];let ke;e[67]===Symbol.for("react.memo_cache_sentinel")?(ke=t.jsx(Ht,{size:14}),e[67]=ke):ke=e[67];let Ne;e[68]!==b?(Ne=t.jsx(rt,{asChild:!0,children:t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":"Add variant",className:"size-8 shrink-0 cursor-pointer",style:ze,onClick:b,children:ke})}),e[68]=b,e[69]=Ne):Ne=e[69];let fe;e[70]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(ot,{side:"bottom",children:"Add variant"}),e[70]=fe):fe=e[70];let De;e[71]!==Ne?(De=t.jsx("div",{className:"shrink-0 pr-3 pl-1 py-2",children:t.jsxs(it,{children:[Ne,fe]})}),e[71]=Ne,e[72]=De):De=e[72];let re;return e[73]!==Te||e[74]!==me||e[75]!==De?(re=t.jsxs("div",{className:Te,children:[me,De]}),e[73]=Te,e[74]=me,e[75]=De,e[76]=re):re=e[76],re}function Ir(a){return a.id}function Fr(a){const e=$e.c(37),{open:n,onOpenChange:r,defaultBlockId:o,isPending:u,onSubmit:h}=a,d=o===void 0?"":o,i=u===void 0?!1:u,[g,v]=N.useState(d),[x,b]=N.useState(n);n!==x&&(b(n),n&&v(d));let S;e[0]!==i||e[1]!==r?(S=E=>{!E&&!i&&r(!1)},e[0]=i,e[1]=r,e[2]=S):S=e[2];const l=S;let _;e[3]!==g||e[4]!==i||e[5]!==h?(_=async E=>{E.preventDefault();const T=g.trim();!T||i||await h(T)},e[3]=g,e[4]=i,e[5]=h,e[6]=_):_=e[6];const p=_;let R;e[7]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsxs(Ln,{children:[t.jsx(On,{children:"Save as global"}),t.jsx(zn,{children:"Save this section as a global block so it can be reused on other pages."})]}),e[7]=R):R=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("label",{htmlFor:"block-id",className:"text-sm font-medium",children:"Block name"}),e[8]=f):f=e[8];let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=E=>v(E.target.value),e[9]=w):w=e[9];let D;e[10]!==g||e[11]!==i?(D=t.jsxs("div",{className:"py-4 space-y-2",children:[f,t.jsx(Kn,{id:"block-id",value:g,onChange:w,placeholder:"MyNewBlock",autoFocus:!0,disabled:i})]}),e[10]=g,e[11]=i,e[12]=D):D=e[12];let j;e[13]!==r?(j=()=>r(!1),e[13]=r,e[14]=j):j=e[14];let V;e[15]!==i||e[16]!==j?(V=t.jsx(Ve,{type:"button",variant:"outline",onClick:j,disabled:i,children:"Cancel"}),e[15]=i,e[16]=j,e[17]=V):V=e[17];let k;e[18]!==g||e[19]!==i?(k=!g.trim()||i,e[18]=g,e[19]=i,e[20]=k):k=e[20];let $;e[21]!==i?($=i?t.jsxs(t.Fragment,{children:[t.jsx(Yt,{size:14,className:"animate-spin"}),"Saving…"]}):"Save",e[21]=i,e[22]=$):$=e[22];let C;e[23]!==k||e[24]!==$?(C=t.jsx(Ve,{type:"submit",disabled:k,children:$}),e[23]=k,e[24]=$,e[25]=C):C=e[25];let A;e[26]!==V||e[27]!==C?(A=t.jsxs(In,{children:[V,C]}),e[26]=V,e[27]=C,e[28]=A):A=e[28];let z;e[29]!==p||e[30]!==A||e[31]!==D?(z=t.jsx(Fn,{className:"sm:max-w-md",children:t.jsxs("form",{onSubmit:p,children:[R,D,A]})}),e[29]=p,e[30]=A,e[31]=D,e[32]=z):z=e[32];let O;return e[33]!==l||e[34]!==n||e[35]!==z?(O=t.jsx(Bn,{open:n,onOpenChange:l,children:z}),e[33]=l,e[34]=n,e[35]=z,e[36]=O):O=e[36],O}const Br="oklch(0.65 0.15 160)",Kr="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)]",Hr="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.2)]";function Ur(a){const e=$e.c(33),{variant:n,selected:r,canDelete:o,onSelect:u,onDuplicate:h,onDelete:d}=a;let i;e[0]!==u?(i=A=>{A.target===A.currentTarget&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),u())},e[0]=u,e[1]=i):i=e[1];const g=r?Hr:Kr;let v;e[2]!==g?(v=de("group flex select-none items-center gap-2 rounded-md px-2 py-2.5 transition-colors cursor-pointer",g),e[2]=g,e[3]=v):v=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(qt,{className:"h-4 w-4 shrink-0",style:{color:Br}}),e[4]=x):x=e[4];let b;e[5]!==n.label?(b=t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:n.label}),e[5]=n.label,e[6]=b):b=e[6];const S=`Open actions for ${n.label}`;let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Wt,{size:14}),e[7]=l):l=e[7];let _;e[8]!==S?(_=t.jsx(Gt,{asChild:!0,children:t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":S,className:"size-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100",onClick:qr,onPointerDown:Yr,children:l})}),e[8]=S,e[9]=_):_=e[9];let p;e[10]!==h?(p=A=>{A.stopPropagation(),h()},e[10]=h,e[11]=p):p=e[11];let R;e[12]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(Yn,{size:14}),e[12]=R):R=e[12];let f;e[13]!==p?(f=t.jsxs(Qe,{onClick:p,children:[R,"Duplicate"]}),e[13]=p,e[14]=f):f=e[14];const w=!o;let D;e[15]!==d?(D=A=>{A.stopPropagation(),d()},e[15]=d,e[16]=D):D=e[16];let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(St,{size:14}),e[17]=j):j=e[17];let V;e[18]!==w||e[19]!==D?(V=t.jsxs(Qe,{variant:"destructive",disabled:w,onClick:D,children:[j,"Delete"]}),e[18]=w,e[19]=D,e[20]=V):V=e[20];let k;e[21]!==f||e[22]!==V?(k=t.jsxs(Zt,{align:"end",children:[f,V]}),e[21]=f,e[22]=V,e[23]=k):k=e[23];let $;e[24]!==k||e[25]!==_?($=t.jsxs(Jt,{children:[_,k]}),e[24]=k,e[25]=_,e[26]=$):$=e[26];let C;return e[27]!==u||e[28]!==i||e[29]!==$||e[30]!==v||e[31]!==b?(C=t.jsxs("div",{role:"button",tabIndex:0,onClick:u,onKeyDown:i,className:v,children:[x,b,$]}),e[27]=u,e[28]=i,e[29]=$,e[30]=v,e[31]=b,e[32]=C):C=e[32],C}function Yr(a){return a.stopPropagation()}function qr(a){return a.stopPropagation()}function Wr(a){const e=$e.c(25),{variants:n,selectedIndex:r,onSelect:o,onDuplicate:u,onDelete:h,onRemoveAll:d}=a,i=n.length>1;let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variants"}),e[0]=g):g=e[0];let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(St,{size:14}),e[1]=v):v=e[1];let x;e[2]!==d?(x=t.jsx(rt,{asChild:!0,children:t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":"Remove all variants",className:"size-6 text-muted-foreground hover:text-destructive",onClick:d,children:v})}),e[2]=d,e[3]=x):x=e[3];let b;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(ot,{children:"Remove all variants"}),e[4]=b):b=e[4];let S;e[5]!==x?(S=t.jsxs("div",{className:"flex items-center justify-between",children:[g,t.jsxs(it,{children:[x,b]})]}),e[5]=x,e[6]=S):S=e[6];let l;if(e[7]!==i||e[8]!==h||e[9]!==u||e[10]!==o||e[11]!==r||e[12]!==n){let R;e[14]!==i||e[15]!==h||e[16]!==u||e[17]!==o||e[18]!==r?(R=f=>t.jsx(Ur,{variant:f,selected:f.index===r,canDelete:i,onSelect:()=>o(f.index),onDuplicate:()=>u(f.index),onDelete:()=>h(f.index)},`${f.label}-${f.index}`),e[14]=i,e[15]=h,e[16]=u,e[17]=o,e[18]=r,e[19]=R):R=e[19],l=n.map(R),e[7]=i,e[8]=h,e[9]=u,e[10]=o,e[11]=r,e[12]=n,e[13]=l}else l=e[13];let _;e[20]!==l?(_=t.jsx("div",{className:"space-y-0.5",children:l}),e[20]=l,e[21]=_):_=e[21];let p;return e[22]!==S||e[23]!==_?(p=t.jsxs("div",{className:"space-y-1 border-b p-2",children:[S,_]}),e[22]=S,e[23]=_,e[24]=p):p=e[24],p}function En(a){const e=$e.c(14),{activeSchema:n,formValue:r,formResetKey:o,onFormChange:u,onBreadcrumbChange:h,emptyMessage:d,beforeForm:i,seoResolveType:g,siteDefaultSeo:v}=a;let x;e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==h||e[4]!==u||e[5]!==g||e[6]!==v?(x=n&&r?g?t.jsx(tr,{schema:n,resolveType:g,value:r,formResetKey:o,onChange:u,onBreadcrumbChange:h,siteDefaultSeo:v}):t.jsx(Ut,{schema:n,value:r,onChange:u,basePath:"",breadcrumbPath:[],onBreadcrumbChange:h},o):null,e[0]=n,e[1]=o,e[2]=r,e[3]=h,e[4]=u,e[5]=g,e[6]=v,e[7]=x):x=e[7];const b=x;let S;e[8]!==d||e[9]!==b?(S=b??t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:d}),e[8]=d,e[9]=b,e[10]=S):S=e[10];let l;return e[11]!==i||e[12]!==S?(l=t.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:t.jsxs("div",{className:"mx-auto max-w-2xl",children:[i,S]})}),e[11]=i,e[12]=S,e[13]=l):l=e[13],l}const Gr="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)]",Jr=a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase();function Vn(a){const{start:e,end:n}=a,r=typeof e=="string"?e:"",o=typeof n=="string"?n:"";if(!r&&!o)return null;const u=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"}),h=g=>{if(!g)return null;const v=new Date(g);return Number.isNaN(v.getTime())?null:u.format(v)},d=h(r),i=h(o);return d&&i?`${d} → ${i}`:d?`From ${d}`:i?`Until ${i}`:null}function We(a){if(!a)return"Default";const e=a.__resolveType??"";if(["website/matchers/always.ts","$live/matchers/MatchAlways.ts"].includes(e)||e==="")return"Default";switch(e){case"website/matchers/never.ts":return"Hidden";case"website/matchers/device.ts":case"$live/matchers/MatchDevice.ts":{const{mobile:r,tablet:o,desktop:u,devices:h=[]}=a,d=[...h];return r&&d.push("Mobile"),o&&d.push("Tablet"),u&&d.push("Desktop"),d.length>0?d.map(Jr).join(" & "):Ke(e)}case"website/matchers/date.ts":case"$live/matchers/MatchDate.ts":return Vn(a)??Ke(e);case"website/matchers/random.ts":case"$live/matchers/MatchRandom.ts":{const{traffic:r}=a;return typeof r=="number"?`${Math.ceil(r*100)}% of sessions`:Ke(e)}case"website/matchers/host.ts":case"$live/matchers/MatchHost.ts":{const{includes:r,match:o}=a,u=[];return r&&u.push(r),o&&u.push(o),u.length>0?u.join(" - "):Ke(e)}case"website/matchers/pathname.ts":{const r=a.case,{type:o,pathname:u}=r??{};return o&&u?`Pathname ${o} ${u}`:Ke(e)}case"website/matchers/location.ts":case"$live/matchers/MatchLocation.ts":{const{includeLocations:r,excludeLocations:o}=a,u=i=>[i.city,i.regionCode,i.country].filter(Boolean).join(" - "),h=r?.[0];if(h){const i=(r?.length??0)-1;return`${u(h)}${i>0?` +${i}`:""}`}const d=o?.[0];if(d){const i=(o?.length??0)-1;return`Except ${u(d)}${i>0?` +${i}`:""}`}return"Any location"}case"website/matchers/multi.ts":case"$live/matchers/MatchMulti.ts":{const{matchers:r,op:o="AND"}=a;return r&&r.length>0?r.map(We).join(` ${o} `):Ke(e)}default:{const r=Vn(a);return r||Ke(e)||"Default"}}}function Zr(a,e){return Sa(a,e,We)}function Qr(a){const e=$e.c(13),{pageKey:n,initialName:r,initialPath:o,onFieldChange:u}=a,[h,d]=N.useState(r),[i,g]=N.useState(o),[v,x]=N.useState(n);v!==n&&(x(n),d(r),g(o));let b;e[0]!==u?(b=R=>{d(R.target.value),u("name",R.target.value)},e[0]=u,e[1]=b):b=e[1];let S;e[2]!==h||e[3]!==b?(S=t.jsx("input",{type:"text",value:h,onChange:b,className:"w-full bg-transparent text-sm font-semibold truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:"Page name"}),e[2]=h,e[3]=b,e[4]=S):S=e[4];let l;e[5]!==u?(l=R=>{g(R.target.value),u("path",R.target.value)},e[5]=u,e[6]=l):l=e[6];let _;e[7]!==i||e[8]!==l?(_=t.jsx("input",{type:"text",value:i,onChange:l,className:"w-full bg-transparent text-xs text-muted-foreground truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:"/path"}),e[7]=i,e[8]=l,e[9]=_):_=e[9];let p;return e[10]!==S||e[11]!==_?(p=t.jsxs("div",{className:"space-y-1",children:[S,_]}),e[10]=S,e[11]=_,e[12]=p):p=e[12],p}function Yl({orgSlug:a,virtualMcpId:e,branch:n,previewReady:r=!0,previewUrl:o,currentPath:u,activePageBlockKey:h=null,activeGlobalBlockKey:d=null,externalSelectedIndex:i,onSaved:g,initialEditSeo:v=!1,onExitSeo:x,onViewJsonFile:b}){const S=r?{orgSlug:a,virtualMcpId:e,branch:n}:null,{data:l,isLoading:_}=ma(S),{data:p,isLoading:R}=fa(S),[f,w]=N.useState(null),[D,j]=N.useState(null),[V,k]=N.useState(null),[$,C]=N.useState(0),[A,z]=N.useState(void 0),[O,E]=N.useState(null),[T,Y]=N.useState(null),[oe,I]=N.useState([]),[ie,K]=N.useState(0),[X,ae]=N.useState(null),[te,W]=N.useState(null),[G,q]=N.useState(!0),[J,Z]=N.useState(!1),[H,we]=N.useState(!1),[ee,ye]=N.useState(v),[be,Te]=N.useState(v);v&&!be&&(Te(!0),ye(!0),w(null),j(null),k(null),I([])),!v&&be&&Te(!1);const[_e,Se]=N.useState(null),[Ce,je]=N.useState(void 0),[Re,me]=N.useState([]),[ze,ke]=N.useState(0),[Ne,fe]=N.useState(0),[De,re]=N.useState(null),[le,P]=N.useState(null),[U,Me]=N.useState(null),Oe=ea(),He=`${a}/${e}/${n}`,_t=pa({orgSlug:a,virtualMcpId:e,branch:n}),[us,ds]=N.useState(u),[ms,fs]=N.useState(h),[ps,hs]=N.useState(d);(us!==u||ms!==h||ps!==d)&&(queueMicrotask(()=>_t.flush()),ds(u),fs(h),hs(d),w(null),j(null),k(null),C(0),E(null),Y(null),fe(0),re(null),P(null),I([]),K(s=>s+1),ye(!1),Se(null),je(void 0),me([]),ke(s=>s+1));const Ee=ha({orgSlug:a,virtualMcpId:e,branch:n}),tn=ga({orgSlug:a,virtualMcpId:e,branch:n}),[jt,nn]=N.useState(!1),kt=N.useRef(null),et=N.useRef(null),tt=N.useRef(null),Nt=N.useRef({}),Ye=N.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null});if(!r||_||R)return t.jsx("div",{className:"h-full w-full flex items-center justify-center",children:t.jsx(Yt,{size:20,className:"animate-spin text-muted-foreground"})});if(!l||!p)return t.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:"Could not load site data."});const sn=va(l),an=ba,pe=!!d,Ie=pe?null:h?sn.find(s=>s.key===h)??null:sn.find(s=>an(s.path)===an(u))??null,L=pe?d:Ie?.key??null,wt=pe&&d?l[d]:void 0,rn=pe&&d&&wt?xa(d,wt):pe&&d?d:"",Tt=!pe&&L&&l[L]?l[L]:null,Ct=ee&&l&&p&&L&&Ie?wn(l,{kind:"page",pageKey:L,pageName:String(Ie.name??""),path:String(Ie.path??"")},p):null,gs=ee?Tt?.seo:void 0,Rt=Ce!==void 0?Ce:gs,vs=ee?Wa(Rt):void 0,xs=Ct?.seoTypeOptions??[],ys=ee&&p?Ga(p):"",on=_e??vs??{},Dt=ee&&Ct?Ja(on,Ct):null,bs=ee&&Dt&&Za(Rt)?pt(Dt,p):null,Ss=ee?Qa(l,p)?.seoData:void 0,Fe=pe?[{label:"Default",sections:[{__resolveType:d}]}]:Zr(Tt?.sections,l??{}),ut=Fe.length>1,Ae=Math.min($,Fe.length-1),Ge=Fe[Ae],ne=Ge?.sections??[],Le=Ft(ne,l);if(pe&&d&&U!==d){Me(d);const s=ne[0],c=Le[0];if(s&&c){w(0),fe(0),I([]);const m=at(s,c,l);m&&(j(m.data),k(m.resolveType),P(null),re(null))}}!pe&&U!==null&&Me(null),Ye.current={rawSections:ne,parsedSections:Le,decofile:l??{},activePageKey:L,pageVariants:Fe,variantIndex:Ae,sectionVariantIndex:Ne,selectedSectionIndex:f};const nt=(s,c,m)=>{const y=Ze(s,c);if(!y){j(null),k(null),P(null),re(null);return}const B=jn(y,We)[m];if(!B){j(null),k(null),P(null),re(null);return}const F=_a(B.value,l);j(F?.data??null),k(F?.resolveType??null);const{resolveType:se,formValue:ce}=$t(B.rule,l,p??void 0);P(se),re(ce)};if(i!==void 0&&i!==A&&(z(i??null),typeof i=="number")){const s=ne[i],c=Le[i];if(s&&c)if(w(i),fe(0),I([]),K(m=>m+1),c.isMultivariate)nt(s,c,0);else{const m=at(s,c,l);m?(j(m.data),k(m.resolveType)):(j(null),k(null)),P(null),re(null)}}const At=V&&p?pt(V,p):null,Ue=(s,c)=>{if(!L)return;const m=It(l,L,s,Ae,Fe);Ee.mutate({blockKey:L,data:m},{onSuccess:()=>c?.onSuccess?.()??g?.(),onError:y=>xe.error(`Save failed: ${y.message}`)})},lt=()=>{w(null),j(null),k(null),fe(0),re(null),P(null),I([]),K(s=>s+1)},_s=(s,c)=>{kt.current&&clearTimeout(kt.current);const m=Ye.current.sectionVariantIndex;kt.current=setTimeout(()=>{const{rawSections:y,parsedSections:M,decofile:B,activePageKey:F,pageVariants:se,variantIndex:ce}=Ye.current,Q=y[c];if(!Q)return;const ue=M[c];if(!ue)return;if(ue.isSavedBlock){const ge=ue.isLazy?Q.section?.__resolveType??Q.__resolveType:Q.__resolveType;Ee.mutate({blockKey:ge,data:s},{onSuccess:()=>g?.(),onError:ve=>xe.error(`Save failed: ${ve.message}`)});return}if(!F)return;const he={...B[F]},Pe=[...y];if(ue.isMultivariate){const ge=Ze(Q,ue);if(!ge||!F)return;const ve=Oa(ge,m,s);Pe[c]=ht(Q,ue,ve)}else if(ue.isHidden){const ge=Xe(Q.__resolveType),ve=ge?{...Q.section}:{...Q},Be=Array.isArray(ve.variants)?[...ve.variants]:[];Be[0]&&(Be[0]={...Be[0],value:s}),ve.variants=Be,ge?Pe[c]={...Q,section:ve}:Pe[c]=ve}else ue.isLazy?Pe[c]={...Q,section:s}:Pe[c]=s;if(se.length>1){const ge=he.sections,ve=[...ge?.variants??[]];ve[ce]&&(ve[ce]={...ve[ce],value:Pe}),he.sections={...ge,variants:ve}}else he.sections=Pe;Ee.mutate({blockKey:F,data:he},{onSuccess:()=>g?.(),onError:ge=>xe.error(`Save failed: ${ge.message}`)})},zt)},js=s=>{w(s),fe(0),I([]),K(M=>M+1);const c=ne[s],m=Le[s];if(!c||!m)return;if(m.isMultivariate){nt(c,m,0);return}const y=at(c,m,l);if(!y){j(null),k(null),P(null),re(null);return}j(y.data),k(y.resolveType),P(null),re(null)},ln=s=>{const c=s;j(c),f!==null&&_s(c,f)},Pt=s=>{if(!L||!l||!p||!Ie)return;const c={kind:"page",pageKey:L,pageName:String(Ie.name??""),path:String(Ie.path??"")},m=wn(l,c,p);m&&_t.save(L,()=>{const y=Oe.getQueryData(ta.decofile(He))?.[L];if(!y||typeof y!="object"||y===null||Array.isArray(y))return null;const M={...y,...Nt.current};return Nt.current={},s?.raw!==void 0?{...M,seo:s.raw}:s?.inner!==void 0?er(c,m,M,s.inner):M})},ks=(s,c)=>{L&&(Nt.current[s]=c,Pt())},Ns=(s,c)=>{if(!L)return;const m=xt([...ne],s,c);f!==null&&(f===s?w(c):s<f&&c>=f?w(f-1):s>f&&c<=f&&w(f+1)),Ue(m)},ws=s=>{if(!L)return;const c=ne.filter((m,y)=>y!==s);f===s?lt():f!==null&&f>s&&w(f-1),Ue(c)},Ts=s=>{if(!L)return;const c=ne[s];if(!c)return;const m=[...ne];m.splice(s+1,0,dr(c)),f!==null&&f>s&&w(f+1),Ue(m)},Cs=s=>{if(!L)return;const c=ne[s],m=Le[s];if(!c||!m||m.isMultivariate)return;const y=m.isHidden?Da(c):Aa(c);if(!y)return;const M=[...ne];M[s]=y,f===s&<(),Ue(M)},Rs=s=>{if(!L)return;const c=ne[s],m=Le[s];if(!c||!m||m.isMultivariate)return;const y=Ra(c);if(!y)return;const M=[...ne];M[s]=y,f===s&<(),Ue(M)},Ds=s=>{if(!L)return;const c=[...ne,{__resolveType:s.resolveType}],m=c.length-1;Ue(c,{onSuccess:()=>{Z(!1),w(m),fe(0),I([]),K(F=>F+1);const y=c[m],M=Ft(c,l)[m];if(!y||!M)return;if(M.isMultivariate){nt(y,M,0);return}const B=at(y,M,l);if(!B){j(null),k(null),P(null),re(null);return}j(B.data),k(B.resolveType),P(null),re(null)}})},As=s=>{if(f===null)return;const c=ne[f],m=Le[f];!c||!m?.isMultivariate||(fe(s),I([]),K(y=>y+1),nt(c,m,s))},Ps=s=>{if(f===null||!L)return;const c=ne[f],m=Le[f];if(!c||!m?.isMultivariate)return;const y=Ze(c,m);if(!y)return;const M=Ta(y,s);if(!M){xe.error("Cannot delete the only variant.");return}const B=[...ne];B[f]=ht(c,m,M);const F=M.variants;let se=Ne;s===Ne?se=Math.min(s,F.length-1):s<Ne&&(se=Ne-1),fe(se),I([]),K(ce=>ce+1),nt(B[f],m,se),Ue(B)},Ms=s=>{if(f===null||!L)return;const c=ne[f],m=Le[f];if(!c||!m?.isMultivariate)return;const y=Ze(c,m);if(!y)return;const M=Ca(y,s),B=[...ne];B[f]=ht(c,m,M);const F=s+1;fe(F),I([]),K(se=>se+1),nt(B[f],m,F),Ue(B)},Es=()=>{if(f===null||!L)return;const s=ne[f],c=Le[f];if(!s||!c?.isMultivariate)return;const m=Ze(s,c);if(!m)return;const y=wa(s,c,m);if(!y){xe.error("Could not remove variants.");return}const M=[...ne];M[f]=y;const B=Ft(M,l)[f];if(!B)return;fe(0),P(null),re(null),I([]),K(se=>se+1);const F=at(y,B,l);F?(j(F.data),k(F.resolveType)):(j(null),k(null)),Ue(M)},Vs=async s=>{if(X===null||!L)return;const c=Rn(s,l);if(c){xe.error(c);return}const m=ne[X],y=Le[X];if(!m||!y)return;const M=at(m,y,l);if(!M){xe.error("This section cannot be saved as global.");return}const B={...M.data,name:s};try{await Ee.mutateAsync({blockKey:s,data:B});const F=[...ne];F[X]={__resolveType:s},await Ee.mutateAsync({blockKey:L,data:It(l,L,F,Ae,Fe)}),f===X&<(),ae(null),xe.success(`Saved global block "${s}"`),g?.()}catch(F){xe.error(F instanceof Error?F.message:"Failed to save global block")}},cn=Ge?.rule;if(ut&&f===null&&T===null&&cn){const{resolveType:s,formValue:c}=$t(cn,l??{},p??void 0);Y(s),E(c)}const dt=p?Dr(p):[],$s=!pe&&!!(o&&p&&l),un=T&&p?pt(T,p):null,Os=()=>{et.current&&(clearTimeout(et.current),et.current=null),tt.current&&(clearTimeout(tt.current),tt.current=null)},dn=async(s,c)=>{if(!(La(c,s,p)>0))try{await tn.mutateAsync({blockKey:s})}catch(m){xe.error(m instanceof Error?m.message:"Could not delete matcher block")}},mn=s=>{et.current&&clearTimeout(et.current),et.current=setTimeout(()=>{const{activePageKey:c,decofile:m,variantIndex:y}=Ye.current;if(!c)return;const M={...m[c]},B={...M.sections},F=[...B.variants??[]],se=F[y],ce=se?.rule;if(Ot(ce,m,p)){const Q=ce?.__resolveType??"",ue=m[Q],he=typeof ue?.name=="string"?ue.name:Q,{__resolveType:Pe,...ge}=s;Ee.mutate({blockKey:Q,data:Lt(Pe??"",ge,he)},{onSuccess:()=>g?.(),onError:ve=>xe.error(`Save failed: ${ve.message}`)});return}se&&(F[y]={...se,rule:s}),M.sections={...B,variants:F},Ee.mutate({blockKey:c,data:M},{onSuccess:()=>g?.(),onError:Q=>xe.error(`Save failed: ${Q.message}`)})},zt)},Ls=s=>{Y(s);const c=s?{__resolveType:s}:{__resolveType:Nn};E({}),mn(c)},zs=s=>{const c=s;E(c);const m=T?{__resolveType:T,...c}:{...c};mn(m)},fn=s=>{tt.current&&clearTimeout(tt.current);const{selectedSectionIndex:c,sectionVariantIndex:m}=Ye.current;c!==null&&(tt.current=setTimeout(()=>{const{rawSections:y,parsedSections:M,decofile:B,activePageKey:F,pageVariants:se,variantIndex:ce}=Ye.current;if(!F)return;const Q=y[c],ue=M[c];if(!Q||!ue?.isMultivariate)return;const he=Ze(Q,ue);if(!he)return;const Pe=$a(he,m,s),ge=[...y];ge[c]=ht(Q,ue,Pe);const ve=It(B,F,ge,ce,se);Ee.mutate({blockKey:F,data:ve},{onSuccess:()=>g?.(),onError:Be=>xe.error(`Save failed: ${Be.message}`)})},zt))},Is=s=>{P(s),re({}),fn(s?{__resolveType:s}:{__resolveType:Nn})},Fs=s=>{const c=s;re(c);const m=le?{__resolveType:le,...c}:{...c};fn(m)};if(!pe&&!Ie)return t.jsxs("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:["No page found for ",u]});if(pe&&!wt)return t.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:"Global block not found"});const Je=f!==null?Le[f]??null:null,pn=f!==null?ne[f]:null,hn=pn&&Je?.isMultivariate?Ze(pn,Je):null,mt=hn?jn(hn,We):[],gn=Math.min(Ne,Math.max(mt.length-1,0)),Mt=mt[gn]??null,st=Je?.isMultivariate===!0,ct=f!==null&&Je!==null&&(st||!!(At&&D)),Bs=ct&&!pe&&Je?.isSavedBlock===!0,qe=pe||Bs,Ks=pe?rn:Je?.label??"",vn=le&&p?pt(le,p):null,Et=ct&&(!pe||oe.length>0)?pe?[rn,...oe]:[Ie.name,Je.label,...st&&Mt?[Mt.label]:[],...oe]:[],Hs=ee&&Ie?[Ie.name,"SEO",...Re]:[],xn=ee?Hs:qe?Et.length>0?Et:[Ks]:Et,yn=()=>{if(!L)return;const s=l[L],c=ja(s.sections,ne);if(!c)return;const m=ka(c);Ee.mutate({blockKey:L,data:{...s,sections:c}},{onSuccess:()=>{C(m),w(null),j(null),k(null),I([]),E(null),Y(null)},onError:y=>xe.error(`Save failed: ${y.message}`)})},bn=(s,c,m)=>{if(!L)return;const y=l[L],M=y.sections;if(!M||typeof M!="object"||Array.isArray(M))return;const B=M;if(!Array.isArray(B.variants))return;const F=s([...B.variants]);if(!F)return;const se=Va(B,F),ce={...l,[L]:{...y,sections:se}};Ee.mutate({blockKey:L,data:ce[L]},{onSuccess:()=>{c?.(),m&&dn(m,ce)},onError:Q=>xe.error(`Save failed: ${Q.message}`)})},Us=s=>{W(null),C(s),w(null),j(null),k(null),I([]);const c=Fe[s]?.rule,{resolveType:m,formValue:y}=$t(c,l??{},p??void 0);Y(m),E(y)},Ys=(s,c)=>{s!==c&&(Ae===s?C(c):s<Ae&&c>=Ae?C(Ae-1):s>Ae&&c<=Ae&&C(Ae+1),bn(m=>xt(m,s,c)))},qs=s=>{const c=Fe[s]?.rule,m=Na(c,l??{},p??void 0);bn(y=>y.length<=1?null:(y.splice(s,1),y),()=>{Fe.length-1===1?C(0):s<Ae?C(Ae-1):s===Ae&&C(Math.max(0,s-1)),w(null),j(null),k(null),I([]),E(null),Y(null)},m)},Ws=async(s,c)=>{Os();const m=Ye.current.activePageKey,y=Ye.current.decofile;if(!m)return;const M=y[m],B=M.sections;if(!B||typeof B!="object"||Array.isArray(B))return;const F=B;if(!Array.isArray(F.variants))return;const se=[...F.variants],ce=se[s];if(!ce?.rule||typeof ce.rule!="object"){xe.error("This variant has no matcher rule to rename.");return}const Q=ce.rule,ue=c.trim();nn(!0);try{if(!ue){if(!Ot(Q,y,p)){W(null);return}const Vt=Q.__resolveType??"";se[s]={...ce,rule:Pa(Q,y,p)};const _n={...y,[m]:{...M,sections:{...F,variants:se}}};await Ee.mutateAsync({blockKey:m,data:_n[m]}),await dn(Vt,_n),W(null),g?.();return}const he=Ma(Q,y,p);if(!he){xe.error("Could not read this variant's matcher rule.");return}if(he.blockKey){await Ee.mutateAsync({blockKey:he.blockKey,data:Lt(he.resolveType,he.data,ue)}),W(null),g?.();return}const Pe=Cn(ue),ge=Rn(Pe,y);if(ge){xe.error(ge);return}const ve=Lt(he.resolveType,he.data,ue);let Be=null;try{await Ee.mutateAsync({blockKey:Pe,data:ve}),Be=Pe,se[s]={...ce,rule:Ea(Pe)},await Ee.mutateAsync({blockKey:m,data:{...M,sections:{...F,variants:se}}}),Be=null}catch(Vt){throw Be&&await tn.mutateAsync({blockKey:Be}).catch(()=>{}),Vt}W(null),xe.success(`Saved matcher as global block "${ue}"`),g?.()}catch(he){xe.error(he instanceof Error?he.message:"Failed to rename variant")}finally{nn(!1)}},Sn=()=>{lt()},Gs=s=>{Se(s),Pt({inner:s})},Js=s=>{je(s),Pt({raw:s})},Zs=()=>{Se(null),me([])},Qs=()=>ke(s=>s+1),Xs=s=>{if(ee){if(s===0){_t.flush(),ye(!1),Se(null),je(void 0),me([]),ke(m=>m+1),x?.();return}if(s===1){me([]),ke(m=>m+1);return}me(Re.slice(0,s-1)),ke(m=>m+1);return}if(pe){I(oe.slice(0,s)),K(m=>m+1);return}if(s===0){Sn();return}if(s===1){I([]),K(m=>m+1);return}if(st&&s===2){I([]),K(m=>m+1);return}const c=st?2:1;I(oe.slice(0,s-c))};return t.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[t.jsx("div",{className:"shrink-0",children:qe||ct||ee?t.jsxs("div",{className:de("border-b px-3 py-2.5",qe&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!pe&&ut&&Ge&&t.jsxs("button",{type:"button",onClick:Sn,title:`Editing in variant: ${Ge.label}`,className:de("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",Gr),children:[t.jsx(en,{rule:gt(Ge.rule,l??{},p??void 0),matchers:dt}),t.jsx("span",{className:"max-w-[160px] truncate",children:Ge.label})]}),t.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:xn.map((s,c)=>{const m=c===xn.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[c>0&&t.jsx(na,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("button",{type:"button",onClick:()=>Xs(c),title:s,className:de("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",m?qe?"font-semibold text-global-section-fg dark:text-global-section-fg-dark":"font-medium text-foreground":qe?"text-foreground/80":"text-muted-foreground",qe?"hover:bg-global-section/15":"hover:bg-accent hover:text-accent-foreground"),children:s})]},`${s}-${c}`)})}),qe&&t.jsxs(it,{children:[t.jsx(rt,{asChild:!0,children:t.jsx("span",{className:"shrink-0 cursor-help",children:t.jsx(ia,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),t.jsx(ot,{side:"bottom",className:"max-w-[260px]",children:"A global section is a reusable block shared across your site. Editing it here updates it everywhere it's used."})]})]}),qe&&t.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:"This is a global section. Changes apply everywhere this section is used across your site."})]}):t.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx(Qr,{pageKey:L,initialName:Ie.name,initialPath:Ie.path,onFieldChange:ks})}),t.jsxs(it,{children:[t.jsx(rt,{asChild:!0,children:t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":"Edit SEO",className:"size-7 shrink-0",onClick:()=>ye(!0),children:t.jsx(aa,{size:14})})}),t.jsx(ot,{side:"bottom",children:"Edit SEO"})]}),t.jsxs(it,{children:[t.jsx(rt,{asChild:!0,children:t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":"View JSON",className:"size-7 shrink-0",onClick:()=>b&&L?b(L):we(!0),children:t.jsx(ra,{size:14})})}),t.jsx(ot,{side:"bottom",children:"View JSON"})]}),t.jsxs(it,{children:[t.jsx(rt,{asChild:!0,children:t.jsx(Ve,{type:"button",variant:"ghost",size:"icon","aria-label":"Add variant",className:"size-7 shrink-0",style:{color:"oklch(0.65 0.15 160)"},onClick:yn,children:t.jsx(oa,{size:14})})}),t.jsx(ot,{side:"bottom",children:"Add variant"})]})]})}),ut&&!ct&&!ee&&L&&t.jsx(zr,{listKey:L,variants:Fe,activeIndex:Ae,decofile:l??{},meta:p,matchers:dt,onSelect:Us,onReorder:Ys,onRename:W,onDelete:qs,onAdd:yn}),ee?t.jsx(ft,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:t.jsx("div",{className:"mx-auto max-w-2xl",children:Tt&&L?t.jsx(Xa,{rawSeo:Rt,innerSeo:on,defaultResolveType:ys,seoSchema:bs,activeResolveType:Dt,seoTypeOptions:xs,formResetKey:ze,siteDefaultSeo:Ss,onBreadcrumbChange:me,onPersistRaw:Js,onInnerChange:Gs,onClearForm:Zs,onBumpFormKey:Qs}):t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"SEO schema not found for this site."})})})}):ct?t.jsxs(ft,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[st&&mt.length>0&&t.jsxs(t.Fragment,{children:[t.jsx(Wr,{variants:mt.map((s,c)=>({index:c,label:s.label})),selectedIndex:gn,onSelect:As,onDuplicate:Ms,onDelete:Ps,onRemoveAll:Es}),st&&t.jsxs("div",{className:"px-3 py-3 border-b space-y-2",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variant rule"}),t.jsx(Pn,{currentRt:le??"",currentLabel:We(Mt?.rule),matchers:dt,onSelect:Is}),vn&&De&&t.jsx("div",{className:"pt-1",children:t.jsx(Ut,{schema:vn,value:De,onChange:Fs,basePath:""})})]})]}),t.jsx(En,{activeSchema:At,formValue:D,formResetKey:ie,onFormChange:ln,onBreadcrumbChange:I,emptyMessage:"No editable fields for this variant."})]}):pe?t.jsx(ft,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx(En,{activeSchema:At,formValue:D,formResetKey:ie,onFormChange:ln,onBreadcrumbChange:I,emptyMessage:"No editable fields for this global block."})}):t.jsxs(ft,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[ut&&T!==null&&t.jsxs("div",{className:de("px-3 border-b",G?"pt-3 pb-5 space-y-3":"py-2"),children:[t.jsxs("button",{type:"button",onClick:()=>q(s=>!s),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":G,children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variant rule"}),G?t.jsx(sa,{className:"size-3.5 shrink-0 text-muted-foreground"}):t.jsx($n,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),G&&t.jsxs("div",{className:de("space-y-3",jt&&"pointer-events-none opacity-50"),children:[t.jsx(Pn,{currentRt:T,currentLabel:kn(Ge?.rule,l??{},We,p??void 0),matchers:dt,onSelect:Ls}),un&&O&&t.jsx("div",{className:"space-y-3",children:t.jsx(Ut,{schema:un,value:O,onChange:zs,basePath:""})})]})]}),t.jsx("div",{className:"p-2 pt-3",children:t.jsx(Nr,{listKey:`${L??""}-${Ae}`,rawSections:ne,sections:Le,meta:p,selectedIndex:f,onSelect:js,onReorder:Ns,onDelete:ws,onDuplicate:Ts,onMakeReusable:ae,onToggleHidden:Cs,onToggleLazy:Rs,onAddSection:()=>Z(!0),canAddSection:$s})})]}),t.jsx(Fr,{open:X!==null,onOpenChange:s=>{s||ae(null)},defaultBlockId:X!==null?Cn(Le[X]?.label??""):"",isPending:Ee.isPending,onSubmit:Vs}),o&&t.jsx(cr,{open:J,onOpenChange:Z,meta:p,decofile:l,previewBaseUrl:o,onSelect:Ds}),H&&L&&l&&t.jsx(ya,{open:H,onOpenChange:we,pageKey:L,decofile:l}),te!==null&&t.jsx(ur,{open:!0,initialName:Ot(Fe[te]?.rule,l??{},p??void 0)?kn(Fe[te]?.rule,l??{},We,p??void 0):"",autoLabel:We(gt(Fe[te]?.rule,l??{},p??void 0)),isPending:jt,onSubmit:async s=>{await Ws(te,s)},onOpenChange:s=>{!s&&!jt&&W(null)}})]})}export{Yl as SectionsEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as D,j as o,c as R,r as $,B as H}from"./index-
|
|
1
|
+
import{e as D,j as o,c as R,r as $,B as H}from"./index-B-PHV3oz.js";import{i as Q,c as W,a as J,D as K}from"./dialog-D4L8eWam.js";import{g as V,D as Y,a as Z,b as ee}from"./drawer-_tDof6Q1.js";import{u as oe}from"./tooltip-5zCZryvU.js";import{c as A}from"./chat-context-CAiaOJBn.js";import{C as G,a as z,D as te,d as le,S as U,M as se}from"./agent-icons-DyjPUCsW.js";const ie=[{tier:"fast",description:"Quicker responses"},{tier:"smart",description:"Balanced quality"},{tier:"thinking",description:"Deeper reasoning"}];function X(r){const e=D.c(10),{modelSet:t,selectedModelId:s,onSelect:i}=r;let l,c;if(e[0]!==t.logo||e[1]!==t.models||e[2]!==t.tiers||e[3]!==i||e[4]!==s){const a=Object.fromEntries(t.models.map(ne));l="flex flex-col p-2 w-[320px]",c=ie.map(d=>{const{tier:p,description:m}=d,u=t.tiers[p];if(!u.modelId)return null;const x=a[u.modelId];if(!x)return null;const f=s===u.modelId;return o.jsxs("button",{type:"button",onClick:()=>i(x),className:R("flex items-center gap-3 px-3 py-2.5 rounded-lg text-left hover:bg-accent",f&&"bg-accent/50"),children:[o.jsx("img",{src:t.logo,alt:u.label,className:"size-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),o.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[o.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:u.label}),o.jsx("span",{className:"text-xs text-muted-foreground leading-tight",children:m})]})]},p)}),e[0]=t.logo,e[1]=t.models,e[2]=t.tiers,e[3]=i,e[4]=s,e[5]=l,e[6]=c}else l=e[5],c=e[6];let n;return e[7]!==l||e[8]!==c?(n=o.jsx("div",{className:l,children:c}),e[7]=l,e[8]=c,e[9]=n):n=e[9],n}function ne(r){return[r.modelId,r]}const de=[{providerId:"claude-code",modelId:"claude-code:haiku",title:"Claude Code Haiku",description:"Fast and lightweight",capabilities:["text"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:sonnet",title:"Claude Code Sonnet",description:"Balanced performance",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus",title:"Claude Code Opus",description:"Most capable",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus-1m",title:"Claude Code Opus 4.8 1M",description:"Most capable, 1M context window",capabilities:["text","reasoning"],limits:{contextWindow:1e6,maxOutputTokens:null},costs:null}],L="https://assets.decocache.com/decocms/6ac44f1c-c0cf-4480-84b5-2ae6fe742d0b/codex-app.png.png",ce=[{providerId:"codex",modelId:"codex:gpt-5.5",title:"GPT-5.5",description:"Frontier model for complex coding, research, and real-world work",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.4",title:"GPT-5.4",description:"Strong model for everyday coding",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.4-mini",title:"GPT-5.4 Mini",description:"Small, fast, and cost-efficient model for simpler coding tasks",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.3-codex-spark",title:"GPT-5.3 Codex Spark",description:"Ultra-fast coding model",capabilities:["text","reasoning"],logo:L,limits:null,costs:null}],re="https://decoims.com/decocms/93e4059c-e598-412b-87eb-54d72a946ec8/claude-stroke-rounded.svg",ae="https://decoims.com/decocms/9170ffd4-b9cc-4661-ad8f-ae2eea019e00/codex.svg",me={fast:{modelId:"claude-code:haiku",label:"Haiku 4.5",description:"Quicker responses",iconNode:o.jsx(G,{size:16})},smart:{modelId:"claude-code:sonnet",label:"Sonnet 4.6",description:"Balanced quality",iconNode:o.jsx(G,{size:16})},thinking:{modelId:"claude-code:opus-1m",label:"Opus 4.8 1M",description:"Deeper reasoning",iconNode:o.jsx(G,{size:16})}},pe={fast:{modelId:"codex:gpt-5.4-mini",label:"GPT-5.4 Mini",description:"Quicker responses",iconNode:o.jsx(z,{size:16})},smart:{modelId:"codex:gpt-5.4",label:"GPT-5.4",description:"Balanced quality",iconNode:o.jsx(z,{size:16})},thinking:{modelId:"codex:gpt-5.5",label:"GPT-5.5",description:"Deeper reasoning",iconNode:o.jsx(z,{size:16})}};function q(r){return r==="claude-code"?{logo:re,tiers:me,models:de}:r==="codex"?{logo:ae,tiers:pe,models:ce}:null}function ue(r){const e=D.c(11),{onClose:t,agent:s}=r,i=A(),l=s??i.pendingHarnessId??"decopilot";let c;e[0]!==l?(c=q(l),e[0]=l,e[1]=c):c=e[1];const n=c;if(!n){let m;return e[2]!==t?(m=o.jsx(le,{onClose:t}),e[2]=t,e[3]=m):m=e[3],m}const a=i.selectedModel?.modelId??n.tiers[i.simpleModeTier].modelId;let d;e[4]!==t||e[5]!==i?(d=m=>{i.setModel({...m,keyId:void 0}),t()},e[4]=t,e[5]=i,e[6]=d):d=e[6];let p;return e[7]!==n||e[8]!==a||e[9]!==d?(p=o.jsx(X,{modelSet:n,selectedModelId:a,onSelect:d}),e[7]=n,e[8]=a,e[9]=d,e[10]=p):p=e[10],p}function fe(r){const e=D.c(13);let t,s;e[0]!==r?({agent:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=t?q(t):null,e[3]=t,e[4]=i):i=e[4];const l=i;if(!l){let d;return e[5]!==s?(d=o.jsx(te,{...s}),e[5]=s,e[6]=d):d=e[6],d}const c=s.selectedModel?.modelId??l.tiers.smart.modelId;let n;e[7]!==s?(n=d=>{s.onModelChange(d),s.onClose()},e[7]=s,e[8]=n):n=e[8];let a;return e[9]!==l||e[10]!==c||e[11]!==n?(a=o.jsx(X,{modelSet:l,selectedModelId:c,onSelect:n}),e[9]=l,e[10]=c,e[11]=n,e[12]=a):a=e[12],a}function Me(r){const e=D.c(39),{variant:t,className:s,placeholder:i,model:l,isLoading:c,credentialId:n,onCredentialChange:a,onModelChange:d,filterModels:p,agent:m}=r,u=t===void 0?"borderless":t,x=i===void 0?"Select model":i,[f,k]=$.useState(!1),g=d!==void 0,F=oe(),B=u==="borderless"?"ghost":"outline",P=u==="borderless"&&"md:border-none";let h;e[0]!==s||e[1]!==P?(h=R("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",P,s),e[0]=s,e[1]=P,e[2]=h):h=e[2];let b;e[3]!==c||e[4]!==l||e[5]!==x||e[6]!==g?(b=g?o.jsx(U,{model:l??null,placeholder:x,isLoading:c}):o.jsx(ge,{placeholder:x}),e[3]=c,e[4]=l,e[5]=x,e[6]=g,e[7]=b):b=e[7];let O;e[8]!==B||e[9]!==h||e[10]!==b?(O=o.jsx(H,{variant:B,size:"sm",className:h,children:b}),e[8]=B,e[9]=h,e[10]=b,e[11]=O):O=e[11];const C=O;let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(se,{}),e[12]=w):w=e[12];let y;e[13]!==m||e[14]!==n||e[15]!==p||e[16]!==l||e[17]!==a||e[18]!==d||e[19]!==g?(y=o.jsx($.Suspense,{fallback:w,children:g?o.jsx(fe,{onClose:()=>k(!1),agent:m,credentialId:n??null,onCredentialChange:a??xe,selectedModel:l??null,onModelChange:d,filterModels:p}):o.jsx(ue,{onClose:()=>k(!1),agent:m})}),e[13]=m,e[14]=n,e[15]=p,e[16]=l,e[17]=a,e[18]=d,e[19]=g,e[20]=y):y=e[20];const I=y;if(F){let M;e[21]!==C?(M=o.jsx(V,{asChild:!0,children:C}),e[21]=C,e[22]=M):M=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(Y,{className:"sr-only",children:"Select model"}),e[23]=_):_=e[23];let v;e[24]!==I?(v=o.jsxs(Z,{className:"p-0 flex flex-col max-h-[95vh]",children:[_,o.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:I})]}),e[24]=I,e[25]=v):v=e[25];let T;return e[26]!==f||e[27]!==M||e[28]!==v?(T=o.jsxs(ee,{open:f,onOpenChange:k,children:[M,v]}),e[26]=f,e[27]=M,e[28]=v,e[29]=T):T=e[29],T}let S;e[30]!==C?(S=o.jsx(Q,{asChild:!0,children:C}),e[30]=C,e[31]=S):S=e[31];let N;e[32]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx(W,{className:"sr-only",children:"Select model"}),e[32]=N):N=e[32];let j;e[33]!==I?(j=o.jsxs(J,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[N,I]}),e[33]=I,e[34]=j):j=e[34];let E;return e[35]!==f||e[36]!==S||e[37]!==j?(E=o.jsxs(K,{open:f,onOpenChange:k,children:[S,j]}),e[35]=f,e[36]=S,e[37]=j,e[38]=E):E=e[38],E}function xe(){}function ge(r){const e=D.c(4),{placeholder:t}=r,{selectedModel:s,isModelsLoading:i}=A();let l;return e[0]!==i||e[1]!==s||e[2]!==t?(l=o.jsx(U,{model:s,placeholder:t,isLoading:i}),e[0]=i,e[1]=s,e[2]=t,e[3]=l):l=e[3],l}export{Me as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,bg as nt,bh as Pe,j as d,dj as rt,bi as be,bx as k,dk as st,a7 as j,a8 as N,dy as $,dl as lt,aU as _e,dm as Ee,bA as at,by as it,ad as ct,ds as dt,dv as ut,dt as pt,dw as ft,dn as mt,ag as ht,du as gt,dp as vt,dr as xt,e as ee,c as oe}from"./index-DTIMrSki.js";import{V as St}from"./tooltip-B73tUZ1m.js";import{i as wt}from"./Check-Bf81oHIx.js";import{t as Re}from"./ChevronDown-BvRbGG6-.js";import{n as yt}from"./ChevronUp-BIjgRrwO.js";function Ne(r,[e,t]){return Math.min(t,Math.max(e,r))}var Ct=[" ","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:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:v,disabled:b,required:w,form:S}=r,p=pe(e),[g,y]=c.useState(null),[m,x]=c.useState(null),[U,M]=c.useState(!1),re=nt(u),[_,O]=Pe({prop:o,defaultProp:n??!1,onChange:i,caller:J}),[F,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=g?S||!!g.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:g,onTriggerChange:y,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:be(),value:F,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:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:v,value:F,onChange:E=>q(E.target.value),disabled:b,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[v,b,w]=tt(p=>{const g=u().filter(x=>!x.disabled),y=g.find(x=>x.value===s.value),m=ot(g,p,y);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:N(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===" ")&&Ct.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:i,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,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}):i})});De.displayName=Oe;var _t="SelectIcon",ke=c.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=c.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const i=o;return i?_e.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),i):null}return d.jsx(He,{...r,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=c.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g,...y}=r,m=G(Q,t),[x,U]=c.useState(null),[M,re]=c.useState(null),_=k(e,f=>U(f)),[O,F]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=c.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[C]=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===C&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=C=>{f={x:Math.abs(Math.round(C.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(C.pageY)-(K.current?.y??0))}},R=C=>{f.x<=10&&f.y<=10?C.preventDefault():x.contains(C.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),C=ot(T,f,R);C&&setTimeout(()=>C.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const C=!H.current&&!R;(m.value!==void 0&&m.value===T||C)&&(F(f),C&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const C=!H.current&&!R;(m.value!==void 0&&m.value===T||C)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===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:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...y,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:N(y.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 C=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(C=C.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=C.indexOf(I);C=C.slice(P+1)}setTimeout(()=>E(C)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),v=k(e,_=>h(_)),b=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:y,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&g&&y){const _=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),q=y.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,P=F.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-F.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,ie=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(ie,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,i.trigger,i.valueNode,l,u,p,g,y,i.dir,o]);$(()=>x(),[x]);const[U,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.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:U},children:d.jsx(j.div,{...n,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...i}=r,s=pe(t);return d.jsx(vt,{...s,...i,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Ue=c.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(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),y=Math.max(p,g);if(y<S){const m=y+w,x=Math.min(S,m),U=m-x;v.style.height=x+"px",v.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,v.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:i,...s}=r,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,v]=c.useState(i??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),g=c.useRef("touch"),y=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{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"&&y()}),onPointerUp:N(s.onPointerUp,()=>{g.current==="mouse"&&y()}),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)&&y(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...i}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,v]=c.useState(null),b=k(e,y=>v(y),a.onItemTextChange,y=>l.itemTextRefCallback?.(y,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return $(()=>(p(S),()=>g(S)),[p,g,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var ye="SelectScrollUpButton",Xe=c.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=ye;var Ce="SelectScrollDownButton",Ze=c.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=Ce;var Je=c.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ut=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Ft="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=c.useRef(null),i=k(o,n),s=it(e);return c.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const 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:i,defaultValue:e})});Qe.displayName=Ft;function et(r){return r===""||r===void 0}function tt(r){const e=ct(r),t=c.useRef(""),o=c.useRef(0),n=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,i]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?r.indexOf(t):-1;let s=Wt(r,Math.max(i,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Ue,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;function 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,i;e[0]!==r?({className:o,size:i,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(r){const e=ee.c(25);let t,o,n,i,s;e[0]!==r?({className:o,children:t,position:i,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i,e[5]=s):(t=e[1],o=e[2],n=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let 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",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,i;e[0]!==r?({className:o,children:t,hideCheck:i,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(yt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{fo as S,po as a,mo as b,ho as c,uo as d,Ne as e};
|
|
1
|
+
import{r as c,bg as nt,bh as Pe,j as d,dj as rt,bi as be,bx as k,dk as st,a7 as j,a8 as N,dy as $,dl as lt,aU as _e,dm as Ee,bA as at,by as it,ad as ct,ds as dt,dv as ut,dt as pt,dw as ft,dn as mt,ag as ht,du as gt,dp as vt,dr as xt,e as ee,c as oe}from"./index-B-PHV3oz.js";import{V as St}from"./tooltip-5zCZryvU.js";import{i as wt}from"./Check-B05JiFMG.js";import{t as Re}from"./ChevronDown-B-1h0qij.js";import{n as yt}from"./ChevronUp-CNAXIcyx.js";function Ne(r,[e,t]){return Math.min(t,Math.max(e,r))}var Ct=[" ","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:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:v,disabled:b,required:w,form:S}=r,p=pe(e),[g,y]=c.useState(null),[m,x]=c.useState(null),[U,M]=c.useState(!1),re=nt(u),[_,O]=Pe({prop:o,defaultProp:n??!1,onChange:i,caller:J}),[F,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=g?S||!!g.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:g,onTriggerChange:y,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:be(),value:F,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:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:v,value:F,onChange:E=>q(E.target.value),disabled:b,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[v,b,w]=tt(p=>{const g=u().filter(x=>!x.disabled),y=g.find(x=>x.value===s.value),m=ot(g,p,y);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:N(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===" ")&&Ct.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:i,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,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}):i})});De.displayName=Oe;var _t="SelectIcon",ke=c.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=c.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const i=o;return i?_e.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),i):null}return d.jsx(He,{...r,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=c.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g,...y}=r,m=G(Q,t),[x,U]=c.useState(null),[M,re]=c.useState(null),_=k(e,f=>U(f)),[O,F]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=c.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[C]=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===C&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=C=>{f={x:Math.abs(Math.round(C.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(C.pageY)-(K.current?.y??0))}},R=C=>{f.x<=10&&f.y<=10?C.preventDefault():x.contains(C.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),C=ot(T,f,R);C&&setTimeout(()=>C.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const C=!H.current&&!R;(m.value!==void 0&&m.value===T||C)&&(F(f),C&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const C=!H.current&&!R;(m.value!==void 0&&m.value===T||C)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===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:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...y,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:N(y.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 C=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(C=C.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=C.indexOf(I);C=C.slice(P+1)}setTimeout(()=>E(C)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),v=k(e,_=>h(_)),b=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:y,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&g&&y){const _=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),q=y.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,P=F.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-F.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,ie=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(ie,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,i.trigger,i.valueNode,l,u,p,g,y,i.dir,o]);$(()=>x(),[x]);const[U,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.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:U},children:d.jsx(j.div,{...n,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...i}=r,s=pe(t);return d.jsx(vt,{...s,...i,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Ue=c.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(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),y=Math.max(p,g);if(y<S){const m=y+w,x=Math.min(S,m),U=m-x;v.style.height=x+"px",v.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,v.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:i,...s}=r,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,v]=c.useState(i??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),g=c.useRef("touch"),y=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{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"&&y()}),onPointerUp:N(s.onPointerUp,()=>{g.current==="mouse"&&y()}),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)&&y(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...i}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,v]=c.useState(null),b=k(e,y=>v(y),a.onItemTextChange,y=>l.itemTextRefCallback?.(y,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return $(()=>(p(S),()=>g(S)),[p,g,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var ye="SelectScrollUpButton",Xe=c.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=ye;var Ce="SelectScrollDownButton",Ze=c.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=Ce;var Je=c.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ut=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Ft="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=c.useRef(null),i=k(o,n),s=it(e);return c.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const 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:i,defaultValue:e})});Qe.displayName=Ft;function et(r){return r===""||r===void 0}function tt(r){const e=ct(r),t=c.useRef(""),o=c.useRef(0),n=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,i]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?r.indexOf(t):-1;let s=Wt(r,Math.max(i,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Ue,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;function 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,i;e[0]!==r?({className:o,size:i,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(r){const e=ee.c(25);let t,o,n,i,s;e[0]!==r?({className:o,children:t,position:i,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i,e[5]=s):(t=e[1],o=e[2],n=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let 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",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,i;e[0]!==r?({className:o,children:t,hideCheck:i,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(yt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{fo as S,po as a,mo as b,ho as c,uo as d,Ne as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as T,j as t,r as Q,B as je,l as Se}from"./index-DTIMrSki.js";import{i as be}from"./ChevronRight-BvmZ62FM.js";import{E as fe}from"./agent-icon-DM5cF00W.js";import{S as ue}from"./scroll-area-DNFFm-Da.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Te,f as Fe,P as Ee,S as Re}from"./page-seo-form-DHVvMQEp.js";import{j as ze}from"./index-TpB5789m.js";import{a as ge}from"./Tool01-OQo-uXCC.js";import{s as xe}from"./schema-form-SHU04h0X.js";import"./AlertCircle-bw8APVTP.js";import"./SwitchHorizontal01-5FcSEvbO.js";import"./RefreshCcw01-DMnRH0ZT.js";import"./XCircle-Cy7JAcBV.js";import"./ArrowUpRight-Dbduy1m4.js";import"./ZapSquare-C2cv_s4k.js";import"./Users03-yWp-llAL.js";import"./CheckCircle-C2YKXIzz.js";import"./Check-Bf81oHIx.js";import"./ChevronDown-BvRbGG6-.js";import"./ChevronLeft-CiPwn0ab.js";import"./ChevronUp-BIjgRrwO.js";import"./DotsVertical-B73bYg9n.js";import"./Container-CtL-mp48.js";import"./Eye-CZAVODeF.js";import"./ZoomOut-DPmFOUrW.js";import"./Globe01-i2XbOy99.js";import"./FilterLines-CP_9llH7.js";import"./Star01-D_E6-i0i.js";import"./Palette-D3jRmDwk.js";import"./HardDrive-CfrLg2xf.js";import"./Stars02-BwO5G7ui.js";import"./Key01-BYQMCT4A.js";import"./LayoutLeft-Zaw_5BZm.js";import"./LinkExternal01-Bj00t0ru.js";import"./Monitor01-B1o877E7.js";import"./Sun-BZiXbHNs.js";import"./Play-BZYwkUau.js";import"./Plus-CMEcOONB.js";import"./SearchMd-DOIvnVlG.js";import"./Settings02-DdkUIvok.js";import"./Shield01-CSZCc7MG.js";import"./Stars01-DzexK6QI.js";import"./Trash01-C616xT4q.js";import"./Upload01-Oh0sLtTm.js";import"./User01-D2gFSNxI.js";import"./Users01-5inxqowf.js";import"./XClose-Bt6MNhcr.js";import"./X-B1c3_NKe.js";import"./Zap-o4dnVQUJ.js";import"./select-BwWN8yYM.js";import"./tooltip-B73tUZ1m.js";import"./label-BqzXVIx8.js";import"./switch-TwwoKMLD.js";import"./agent-capabilities-g1017n-e.js";import"./chat-context-DkA0z7QG.js";import"./tab-id-BvDwqq5G.js";import"./constants-CpnKa-xF.js";import"./decopilot-sse-pool-DovlgNgn.js";import"./create-sse-subscription-BS5983N4.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-virtual-mcp-DsknuxfQ.js";import"./use-collections-DwKsUMti.js";import"./use-ai-providers-2aN6ivvn.js";import"./use-organization-settings-B437Sgc-.js";import"./pair-_1qYDL9O.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CKQfjDVo.js";import"./file-type-icon-C-p7ShzI.js";import"./dialog-BgR7sKjj.js";import"./content-blocks-o63cs2vh.js";import"./types-DcJ-04H3.js";import"./shell-layout-DhcPxoJD.js";import"./avatar-sm34rGJY.js";import"./required-auth-layout-C-P6JOpD.js";import"./useRouterState-BuKQPQqt.js";import"./use-org-sso-CvUHQ8hJ.js";import"./integration-icon-D6-qSe9e.js";import"./use-navigate-to-agent-BDPVPFmk.js";import"./use-connection-Cwv1LoHp.js";import"./use-mcp-prompts-CLjWTejk.js";import"./form-CQCVrb2A.js";import"./input-COyKwj-n.js";import"./spinner-ClPrRNae.js";import"./drawer-yi2RSYSs.js";import"./collection-search-CFhPioUl.js";import"./tabs-7ZwKh-ET.js";import"./toggle-group-DitpC9UH.js";import"./connect-desktop-dialog-Cx6ZiLsH.js";import"./agent-icons-C8WXPWgd.js";import"./checkbox-DJbe24ej.js";import"./skeleton-vS5RdX08.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-D8pPcHrJ.js";import"./card-DznbXvu1.js";import"./popover-BuZ8Y8iu.js";import"./command-CGrKj_q2.js";import"./index-_lE9LP-s.js";import"./useInfiniteQuery-CRK338_N.js";import"./infiniteQueryObserver-qU5LO8rc.js";import"./sortable.esm-DsVAkcb-.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C5Ck0pdF.js";import"./use-registry-connections-C2Tx39xp.js";import"./extract-connection-data-Cu0TihZD.js";import"./generate-id-D2atcitn.js";import"./collections-BWns8Fl4.js";import"./collection-tabs-BOrvD3ee.js";import"./badge-DpbVwDlO.js";import"./textarea-BVSBUQBw.js";import"./connection-form-helpers-CoUR8Gdd.js";import"./use-infinite-scroll-C6qx_zOj.js";import"./useSuspenseInfiniteQuery-CDSuZvB0.js";import"./index-dnazHw5V.js";import"./dropdown-menu-CmFjLD69.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-CjSh1k0Y.js";import"./sidebar-DlrNB2Xp.js";import"./sheet-DgB1c-VM.js";import"./toolbar-C4mR5FDC.js";import"./use-create-virtual-mcp-lUbyVuL2.js";import"./github-repo-picker-CW5Lm0LI.js";import"./use-mcp-tools-DZOvxGCI.js";import"./alert-dialog-BkN9zKKs.js";import"./index-Dif3zHHN.js";import"./use-org-auth-client-CB-HyejF.js";import"./hover-card-Cbez29Eh.js";import"./task-status-DJ8zGGL1.js";import"./use-status-sounds-DBw9c6R5.js";import"./empty-state-BLShIxQO.js";import"./resizable-CdwyF2Th.js";import"./use-capability-qzt5yc4K.js";import"./header-tab-button-3G28EYnu.js";import"./index-D9S2FyNx.js";import"./user-Cr6KrMQF.js";import"./tools-list-CzPzcLtp.js";import"./use-debounced-autosave-DZjvQqdP.js";import"./index-ChUipotL.js";import"./search-input-kS6oNZ8N.js";import"./use-secrets-CaxOFigl.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-xYY9Vs3i.js";import"./view-mode-toggle-Bw6oVmE9.js";import"./select-model-CBJr1n3A.js";import"./use-automations-5zzS4QL6.js";import"./monaco-editor-Bc8JgloZ.js";import"./automation-runs-CEdKyT7s.js";import"./table-CqpgXtvV.js";import"./use-members-CItAFL92.js";import"./automation-list-row-Cw_2pXsa.js";import"./calendar-j_Bkwk5e.js";import"./image-field-D0VeC8fd.js";import"./use-file-configs-D8DD3_j6.js";function U(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=U(n.title),i=U(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(n.description),image:U(n.image),favicon:U(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==u||e[24]!==y||e[25]!==g?(S=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=S):S=e[26],S}function De(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const S=i.description??ee;let _;e[17]!==y||e[18]!==S?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:S}),e[17]=y,e[18]=S,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let b;e[24]!==i.image?(b=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=b):b=e[25];let k;e[26]!==N||e[27]!==b||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,b]}),e[26]=N,e[27]=b,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function Di(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,S]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),S(Me));const{persistSeo:b,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!K||Ce(B))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let E,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(E=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(E,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=E,e[7]=G):(E=e[6],G=e[7]);const ie=G;let V;e[8]!==b||e[9]!==c||e[10]!==v?(V=R=>{if(!c)return;const de=R;v(de),b(de)},e[8]=b,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==S?(H=()=>S(Ke),e[14]=S,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(be,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==b||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==E?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Ee,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:E,onPersistRaw:R=>{N(R),k(R)},onInnerChange:R=>{v(R),b(R)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Re,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=b,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=E,e[59]=A):A=e[59];let J;return e[60]!==I||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=J):J=e[62],J}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{Di as SeoEditor};
|
|
1
|
+
import{e as T,j as t,r as Q,B as je,l as Se}from"./index-B-PHV3oz.js";import{i as be}from"./ChevronRight-UH18q_3i.js";import{E as fe}from"./agent-icon-DvIbcdW2.js";import{S as ue}from"./scroll-area-Cm6OwqFg.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Te,f as Fe,P as Ee,S as Re}from"./page-seo-form-CYUPfUAt.js";import{j as ze}from"./index-BHNzJyJJ.js";import{a as ge}from"./Tool01-CHQi6ime.js";import{s as xe}from"./schema-form-B_vVRhXa.js";import"./AlertCircle-2Km0CX2z.js";import"./SwitchHorizontal01-D8n2_4Ky.js";import"./RefreshCcw01-7LgZ2KuS.js";import"./XCircle-86RGTWAp.js";import"./ArrowUpRight-BLByMWEr.js";import"./ZapSquare-CzOxfiLh.js";import"./Users03-CyIgvftP.js";import"./CheckCircle-D2PakmMP.js";import"./Check-B05JiFMG.js";import"./ChevronDown-B-1h0qij.js";import"./ChevronLeft-DZmvAgUs.js";import"./ChevronUp-CNAXIcyx.js";import"./DotsVertical-CBkWO2us.js";import"./Container-CnVkM2IK.js";import"./Eye-BF--IKG8.js";import"./ZoomOut-sWkdOBib.js";import"./Globe01-C6CmSgYh.js";import"./FilterLines-NzTnzrsm.js";import"./Star01-BIOcBShW.js";import"./Palette-qBV8jtn1.js";import"./HardDrive-C8gbUBwi.js";import"./Stars02-BxWZ5xUE.js";import"./Key01-DdkT4-r1.js";import"./LayoutLeft-Cq-3SzOV.js";import"./LinkExternal01-BuKoKvOJ.js";import"./Monitor01-DtzCrxlL.js";import"./Sun-cNIbkxvb.js";import"./Play-BwyGr6Ll.js";import"./Plus-2y8e9M50.js";import"./SearchMd-BNL3h-Lw.js";import"./Settings02-D3dhPmVM.js";import"./Shield01-02qnRjhT.js";import"./Stars01-Ra7VZDk8.js";import"./Trash01-De5yP0M0.js";import"./Upload01-C4oU-PRW.js";import"./User01-BQtKeucE.js";import"./Users01-B5Mk__ya.js";import"./XClose-BlyN_Sc4.js";import"./X-3fwJpxV0.js";import"./Zap-Ca8RLP4U.js";import"./select-xdBxNMUb.js";import"./tooltip-5zCZryvU.js";import"./label-CEKSGqhJ.js";import"./switch-UTjje473.js";import"./agent-capabilities-DBe6gbqa.js";import"./chat-context-CAiaOJBn.js";import"./tab-id-D6B9k9rp.js";import"./constants-z4dXNe1A.js";import"./decopilot-sse-pool-D_E34tmA.js";import"./create-sse-subscription-BS5983N4.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-virtual-mcp-DPpsp0b-.js";import"./use-collections-B47GVLOL.js";import"./use-ai-providers-DOlhyKeN.js";import"./use-organization-settings-CDjtm6S0.js";import"./pair-crvFYVBr.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-C4ZAj4f4.js";import"./file-type-icon-CYcdJQBd.js";import"./dialog-D4L8eWam.js";import"./content-blocks-o63cs2vh.js";import"./types-ChK1eRLX.js";import"./shell-layout-xKUGAKiS.js";import"./avatar-5lbWWNzy.js";import"./required-auth-layout-XAFLruT3.js";import"./useRouterState-C1tnhy3B.js";import"./use-org-sso-C0VlDkck.js";import"./integration-icon-D82j_1fN.js";import"./use-navigate-to-agent-Bj_pSs39.js";import"./use-connection-xtan9MLA.js";import"./use-mcp-prompts-NDfKteCA.js";import"./form-DWpWJxH3.js";import"./input-DMqfVdLl.js";import"./spinner-B2vBmLe8.js";import"./drawer-_tDof6Q1.js";import"./collection-search-7eYR8rmz.js";import"./tabs-B8C4rHnI.js";import"./toggle-group-C4X1dcf6.js";import"./connect-desktop-dialog-B5JH2LsR.js";import"./agent-icons-DyjPUCsW.js";import"./checkbox-BRdsmoVp.js";import"./skeleton-9nqYTB4H.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C5SA5_8A.js";import"./card-BojXSjgh.js";import"./popover-Dl1ZkjR5.js";import"./command-BW6ahm7f.js";import"./index-DPSjO83e.js";import"./useInfiniteQuery-5f-XmzuR.js";import"./infiniteQueryObserver-D8VqrbcP.js";import"./sortable.esm-BcFz9Psy.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CLgdMTGQ.js";import"./use-registry-connections-BGN7oY_B.js";import"./extract-connection-data-DubVfj_8.js";import"./generate-id-CUPl0OgE.js";import"./collections-6h-er8nI.js";import"./collection-tabs-wah4r8cS.js";import"./badge-C8lUCNjK.js";import"./textarea-DHIira09.js";import"./connection-form-helpers-BOF_wZkg.js";import"./use-infinite-scroll-DOmZgM0o.js";import"./useSuspenseInfiniteQuery-CI2XOApz.js";import"./index-5dm8s9_d.js";import"./dropdown-menu-Dl0H7aq8.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-BSSaTyIa.js";import"./sidebar-CWkpLi-3.js";import"./sheet-D_M_IVaY.js";import"./toolbar-Dfgzdkic.js";import"./use-create-virtual-mcp-Ct03M34V.js";import"./github-repo-picker-CIX9qNpb.js";import"./use-mcp-tools-OpAnzK8L.js";import"./alert-dialog-CZIXkgul.js";import"./index-B6gGXliX.js";import"./use-org-auth-client-0xYqT1He.js";import"./hover-card-BpUlDOcu.js";import"./task-status-CY705BLe.js";import"./use-status-sounds-BQZXHMUe.js";import"./empty-state-DQ2A49Za.js";import"./resizable-CwNlFXM0.js";import"./use-capability-Dh4mghw5.js";import"./header-tab-button-DWdrQrci.js";import"./index-Ce4_XeXN.js";import"./user-BN8x6_Oz.js";import"./tools-list-BEiQpjim.js";import"./use-debounced-autosave-CCI4Blgp.js";import"./index-BAFQUCvL.js";import"./search-input-BmRW3Wrv.js";import"./use-secrets-KLXtsaQq.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-B7nmBs3G.js";import"./view-mode-toggle-CXjX5DI_.js";import"./select-model-D6htI6Ma.js";import"./use-automations-CYo7bTL2.js";import"./monaco-editor-C46m31Dh.js";import"./automation-runs-Ctj_mEp6.js";import"./table-DCodMVmA.js";import"./use-members-B4vP4n73.js";import"./automation-list-row-DriahbPJ.js";import"./calendar-DBINhNQa.js";import"./image-field-B9LJ-oo3.js";import"./use-file-configs-CTGSVeMB.js";function U(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=U(n.title),i=U(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(n.description),image:U(n.image),favicon:U(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==u||e[24]!==y||e[25]!==g?(S=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=S):S=e[26],S}function De(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const S=i.description??ee;let _;e[17]!==y||e[18]!==S?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:S}),e[17]=y,e[18]=S,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let b;e[24]!==i.image?(b=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=b):b=e[25];let k;e[26]!==N||e[27]!==b||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,b]}),e[26]=N,e[27]=b,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function Di(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,S]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),S(Me));const{persistSeo:b,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!K||Ce(B))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let E,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(E=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(E,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=E,e[7]=G):(E=e[6],G=e[7]);const ie=G;let V;e[8]!==b||e[9]!==c||e[10]!==v?(V=R=>{if(!c)return;const de=R;v(de),b(de)},e[8]=b,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==S?(H=()=>S(Ke),e[14]=S,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(be,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==b||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==E?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Ee,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:E,onPersistRaw:R=>{N(R),k(R)},onInnerChange:R=>{v(R),b(R)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Re,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=b,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=E,e[59]=A):A=e[59];let J;return e[60]!==I||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=J):J=e[62],J}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{Di as SeoEditor};
|